diff options
Diffstat (limited to 'firmware/drivers/lcd-recorder.c')
-rw-r--r-- | firmware/drivers/lcd-recorder.c | 58 |
1 files changed, 30 insertions, 28 deletions
diff --git a/firmware/drivers/lcd-recorder.c b/firmware/drivers/lcd-recorder.c index 9f8a2b6568..b7bcd02cec 100644 --- a/firmware/drivers/lcd-recorder.c +++ b/firmware/drivers/lcd-recorder.c | |||
@@ -917,9 +917,26 @@ void lcd_putsxy(int x, int y, const unsigned char *str) | |||
917 | 917 | ||
918 | /*** Line oriented text output ***/ | 918 | /*** Line oriented text output ***/ |
919 | 919 | ||
920 | /* put a string at a given char position at a given style and with a given pixel position */ | 920 | /* put a string at a given char position */ |
921 | void lcd_puts_style_offset(int x, int y, const unsigned char *str, int style, | 921 | void lcd_puts(int x, int y, const unsigned char *str) |
922 | int offset) | 922 | { |
923 | lcd_puts_style_offset(x, y, str, STYLE_DEFAULT, 0); | ||
924 | } | ||
925 | |||
926 | void lcd_puts_style(int x, int y, const unsigned char *str, int style) | ||
927 | { | ||
928 | lcd_puts_style_offset(x, y, str, style, 0); | ||
929 | } | ||
930 | |||
931 | void lcd_puts_offset(int x, int y, const unsigned char *str, int offset) | ||
932 | { | ||
933 | lcd_puts_style_offset(x, y, str, STYLE_DEFAULT, offset); | ||
934 | } | ||
935 | |||
936 | /* put a string at a given char position, style, and pixel position, | ||
937 | * skipping first offset pixel columns */ | ||
938 | void lcd_puts_style_offset(int x, int y, const unsigned char *str, | ||
939 | int style, int offset) | ||
923 | { | 940 | { |
924 | int xpos,ypos,w,h; | 941 | int xpos,ypos,w,h; |
925 | int lastmode = drawmode; | 942 | int lastmode = drawmode; |
@@ -944,23 +961,6 @@ void lcd_puts_style_offset(int x, int y, const unsigned char *str, int style, | |||
944 | drawmode = lastmode; | 961 | drawmode = lastmode; |
945 | } | 962 | } |
946 | 963 | ||
947 | void lcd_puts_style(int x, int y, const unsigned char *str, int style) | ||
948 | { | ||
949 | lcd_puts_style_offset(x, y, str, style, 0); | ||
950 | } | ||
951 | |||
952 | /* put a string at a given char position at a given offset mark */ | ||
953 | void lcd_puts_offset(int x, int y, const unsigned char *str, int offset) | ||
954 | { | ||
955 | lcd_puts_style_offset(x, y, str, STYLE_DEFAULT, offset); | ||
956 | } | ||
957 | |||
958 | /* put a string at a given char position */ | ||
959 | void lcd_puts(int x, int y, const unsigned char *str) | ||
960 | { | ||
961 | lcd_puts_style_offset(x, y, str, STYLE_DEFAULT, 0); | ||
962 | } | ||
963 | |||
964 | /*** scrolling ***/ | 964 | /*** scrolling ***/ |
965 | 965 | ||
966 | /* Reverse the invert setting of the scrolling line (if any) at given char | 966 | /* Reverse the invert setting of the scrolling line (if any) at given char |
@@ -1002,20 +1002,21 @@ void lcd_bidir_scroll(int percent) | |||
1002 | 1002 | ||
1003 | void lcd_puts_scroll(int x, int y, const unsigned char *string) | 1003 | void lcd_puts_scroll(int x, int y, const unsigned char *string) |
1004 | { | 1004 | { |
1005 | lcd_puts_scroll_style_offset(x, y, string, STYLE_DEFAULT, 0); | 1005 | lcd_puts_scroll_style(x, y, string, STYLE_DEFAULT); |
1006 | } | 1006 | } |
1007 | 1007 | ||
1008 | void lcd_puts_scroll_offset(int x, int y, const unsigned char *string, int offset) | ||
1009 | { | ||
1010 | lcd_puts_scroll_style_offset(x, y, string, STYLE_DEFAULT, offset); | ||
1011 | } | ||
1012 | |||
1013 | void lcd_puts_scroll_style(int x, int y, const unsigned char *string, int style) | 1008 | void lcd_puts_scroll_style(int x, int y, const unsigned char *string, int style) |
1014 | { | 1009 | { |
1015 | lcd_puts_scroll_style_offset(x, y, string, style, 0); | 1010 | lcd_puts_scroll_style_offset(x, y, string, style, 0); |
1016 | } | 1011 | } |
1017 | 1012 | ||
1018 | void lcd_puts_scroll_style_offset(int x, int y, const unsigned char *string, | 1013 | void lcd_puts_scroll_offset(int x, int y, const unsigned char *string, |
1014 | int offset) | ||
1015 | { | ||
1016 | lcd_puts_scroll_style_offset(x, y, string, STYLE_DEFAULT, offset); | ||
1017 | } | ||
1018 | |||
1019 | void lcd_puts_scroll_style_offset(int x, int y, const unsigned char *string, | ||
1019 | int style, int offset) | 1020 | int style, int offset) |
1020 | { | 1021 | { |
1021 | struct scrollinfo* s; | 1022 | struct scrollinfo* s; |
@@ -1130,7 +1131,8 @@ static void scroll_thread(void) | |||
1130 | lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height); | 1131 | lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height); |
1131 | drawmode = DRMODE_SOLID; | 1132 | drawmode = DRMODE_SOLID; |
1132 | lcd_putsxyofs(xpos, ypos, s->offset, s->line); | 1133 | lcd_putsxyofs(xpos, ypos, s->offset, s->line); |
1133 | if (s->invert) { | 1134 | if (s->invert) |
1135 | { | ||
1134 | drawmode = DRMODE_COMPLEMENT; | 1136 | drawmode = DRMODE_COMPLEMENT; |
1135 | lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height); | 1137 | lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height); |
1136 | } | 1138 | } |