summaryrefslogtreecommitdiffstats
path: root/firmware/drivers/lcd-h100.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/lcd-h100.c')
-rw-r--r--firmware/drivers/lcd-h100.c44
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)
/*** line oriented text output ***/
-/* put a string at a given char position at a given style and with a given pixel position */
-void lcd_puts_style_offset(int x, int y, const unsigned char *str, int style,
- int offset)
+/* put a string at a given char position */
+void lcd_puts(int x, int y, const unsigned char *str)
+{
+ lcd_puts_style_offset(x, y, str, STYLE_DEFAULT, 0);
+}
+
+void lcd_puts_style(int x, int y, const unsigned char *str, int style)
+{
+ lcd_puts_style_offset(x, y, str, style, 0);
+}
+
+void lcd_puts_offset(int x, int y, const unsigned char *str, int offset)
+{
+ lcd_puts_style_offset(x, y, str, STYLE_DEFAULT, offset);
+}
+
+/* put a string at a given char position, style, and pixel position,
+ * skipping first offset pixel columns */
+void lcd_puts_style_offset(int x, int y, const unsigned char *str,
+ int style, int offset)
{
int xpos,ypos,w,h;
int lastmode = drawmode;
@@ -1083,22 +1100,6 @@ void lcd_puts_style_offset(int x, int y, const unsigned char *str, int style,
}
drawmode = lastmode;
}
-void lcd_puts_style(int x, int y, const unsigned char *str, int style)
-{
- lcd_puts_style_offset(x, y, str, style, 0);
-}
-
-/* put a string at a given char position at a given offset mark */
-void lcd_puts_offset(int x, int y, const unsigned char *str, int offset)
-{
- lcd_puts_style_offset(x, y, str, STYLE_DEFAULT, offset);
-}
-
-/* put a string at a given char position */
-void lcd_puts(int x, int y, const unsigned char *str)
-{
- lcd_puts_style(x, y, str, STYLE_DEFAULT);
-}
/*** scrolling ***/
@@ -1226,7 +1227,7 @@ static void scroll_thread(void)
while ( 1 ) {
for ( index = 0; index < SCROLLABLE_LINES; index++ ) {
/* really scroll? */
- if ( !(scrolling_lines&(1<<index)))
+ if ( !(scrolling_lines&(1<<index)) )
continue;
s = &scroll[index];
@@ -1269,7 +1270,8 @@ static void scroll_thread(void)
lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height);
drawmode = DRMODE_SOLID;
lcd_putsxyofs(xpos, ypos, s->offset, (unsigned char *)s->line);
- if (s->invert) {
+ if (s->invert)
+ {
drawmode = DRMODE_COMPLEMENT;
lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height);
}