diff options
Diffstat (limited to 'firmware/drivers/lcd-h100.c')
-rw-r--r-- | firmware/drivers/lcd-h100.c | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/firmware/drivers/lcd-h100.c b/firmware/drivers/lcd-h100.c index 0df1a3c71a..685984522d 100644 --- a/firmware/drivers/lcd-h100.c +++ b/firmware/drivers/lcd-h100.c | |||
@@ -1057,9 +1057,26 @@ void lcd_putsxy(int x, int y, const unsigned char *str) | |||
1057 | 1057 | ||
1058 | /*** line oriented text output ***/ | 1058 | /*** line oriented text output ***/ |
1059 | 1059 | ||
1060 | /* put a string at a given char position at a given style and with a given pixel position */ | 1060 | /* put a string at a given char position */ |
1061 | void lcd_puts_style_offset(int x, int y, const unsigned char *str, int style, | 1061 | void lcd_puts(int x, int y, const unsigned char *str) |
1062 | int offset) | 1062 | { |
1063 | lcd_puts_style_offset(x, y, str, STYLE_DEFAULT, 0); | ||
1064 | } | ||
1065 | |||
1066 | void lcd_puts_style(int x, int y, const unsigned char *str, int style) | ||
1067 | { | ||
1068 | lcd_puts_style_offset(x, y, str, style, 0); | ||
1069 | } | ||
1070 | |||
1071 | void lcd_puts_offset(int x, int y, const unsigned char *str, int offset) | ||
1072 | { | ||
1073 | lcd_puts_style_offset(x, y, str, STYLE_DEFAULT, offset); | ||
1074 | } | ||
1075 | |||
1076 | /* put a string at a given char position, style, and pixel position, | ||
1077 | * skipping first offset pixel columns */ | ||
1078 | void lcd_puts_style_offset(int x, int y, const unsigned char *str, | ||
1079 | int style, int offset) | ||
1063 | { | 1080 | { |
1064 | int xpos,ypos,w,h; | 1081 | int xpos,ypos,w,h; |
1065 | int lastmode = drawmode; | 1082 | int lastmode = drawmode; |
@@ -1083,22 +1100,6 @@ void lcd_puts_style_offset(int x, int y, const unsigned char *str, int style, | |||
1083 | } | 1100 | } |
1084 | drawmode = lastmode; | 1101 | drawmode = lastmode; |
1085 | } | 1102 | } |
1086 | void lcd_puts_style(int x, int y, const unsigned char *str, int style) | ||
1087 | { | ||
1088 | lcd_puts_style_offset(x, y, str, style, 0); | ||
1089 | } | ||
1090 | |||
1091 | /* put a string at a given char position at a given offset mark */ | ||
1092 | void lcd_puts_offset(int x, int y, const unsigned char *str, int offset) | ||
1093 | { | ||
1094 | lcd_puts_style_offset(x, y, str, STYLE_DEFAULT, offset); | ||
1095 | } | ||
1096 | |||
1097 | /* put a string at a given char position */ | ||
1098 | void lcd_puts(int x, int y, const unsigned char *str) | ||
1099 | { | ||
1100 | lcd_puts_style(x, y, str, STYLE_DEFAULT); | ||
1101 | } | ||
1102 | 1103 | ||
1103 | /*** scrolling ***/ | 1104 | /*** scrolling ***/ |
1104 | 1105 | ||
@@ -1226,7 +1227,7 @@ static void scroll_thread(void) | |||
1226 | while ( 1 ) { | 1227 | while ( 1 ) { |
1227 | for ( index = 0; index < SCROLLABLE_LINES; index++ ) { | 1228 | for ( index = 0; index < SCROLLABLE_LINES; index++ ) { |
1228 | /* really scroll? */ | 1229 | /* really scroll? */ |
1229 | if ( !(scrolling_lines&(1<<index))) | 1230 | if ( !(scrolling_lines&(1<<index)) ) |
1230 | continue; | 1231 | continue; |
1231 | 1232 | ||
1232 | s = &scroll[index]; | 1233 | s = &scroll[index]; |
@@ -1269,7 +1270,8 @@ static void scroll_thread(void) | |||
1269 | lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height); | 1270 | lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height); |
1270 | drawmode = DRMODE_SOLID; | 1271 | drawmode = DRMODE_SOLID; |
1271 | lcd_putsxyofs(xpos, ypos, s->offset, (unsigned char *)s->line); | 1272 | lcd_putsxyofs(xpos, ypos, s->offset, (unsigned char *)s->line); |
1272 | if (s->invert) { | 1273 | if (s->invert) |
1274 | { | ||
1273 | drawmode = DRMODE_COMPLEMENT; | 1275 | drawmode = DRMODE_COMPLEMENT; |
1274 | lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height); | 1276 | lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height); |
1275 | } | 1277 | } |