summaryrefslogtreecommitdiff
path: root/firmware/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers')
-rw-r--r--firmware/drivers/lcd-16bit-common.c8
-rw-r--r--firmware/drivers/lcd-1bit-vert.c2
-rw-r--r--firmware/drivers/lcd-bitmap-common.c10
-rw-r--r--firmware/drivers/lcd-charcell.c6
4 files changed, 14 insertions, 12 deletions
diff --git a/firmware/drivers/lcd-16bit-common.c b/firmware/drivers/lcd-16bit-common.c
index f8673ec6db..dffc1cf075 100644
--- a/firmware/drivers/lcd-16bit-common.c
+++ b/firmware/drivers/lcd-16bit-common.c
@@ -144,13 +144,9 @@ void lcd_clear_viewport(void)
144 } 144 }
145 145
146 if (current_vp == &default_vp) 146 if (current_vp == &default_vp)
147 { 147 lcd_scroll_stop();
148 lcd_scroll_info.lines = 0;
149 }
150 else 148 else
151 { 149 lcd_scroll_stop_viewport(current_vp);
152 lcd_scroll_stop(current_vp);
153 }
154} 150}
155 151
156/*** parameter handling ***/ 152/*** parameter handling ***/
diff --git a/firmware/drivers/lcd-1bit-vert.c b/firmware/drivers/lcd-1bit-vert.c
index 5cacf0a740..668c685187 100644
--- a/firmware/drivers/lcd-1bit-vert.c
+++ b/firmware/drivers/lcd-1bit-vert.c
@@ -226,7 +226,7 @@ void LCDFN(clear_viewport)(void)
226 226
227 current_vp->drawmode = oldmode; 227 current_vp->drawmode = oldmode;
228 228
229 LCDFN(scroll_stop)(current_vp); 229 LCDFN(scroll_stop_viewport)(current_vp);
230 } 230 }
231} 231}
232 232
diff --git a/firmware/drivers/lcd-bitmap-common.c b/firmware/drivers/lcd-bitmap-common.c
index a17ac51006..10a567edf1 100644
--- a/firmware/drivers/lcd-bitmap-common.c
+++ b/firmware/drivers/lcd-bitmap-common.c
@@ -178,6 +178,12 @@ void LCDFN(set_viewport)(struct viewport* vp)
178#endif 178#endif
179} 179}
180 180
181struct viewport *LCDFN(get_viewport)(bool *is_default)
182{
183 *is_default = (current_vp == &default_vp);
184 return current_vp;
185}
186
181void LCDFN(update_viewport)(void) 187void LCDFN(update_viewport)(void)
182{ 188{
183 LCDFN(update_rect)(current_vp->x, current_vp->y, 189 LCDFN(update_rect)(current_vp->x, current_vp->y,
@@ -405,7 +411,7 @@ void LCDFN(puts_style_xyoffset)(int x, int y, const unsigned char *str,
405 int style, int x_offset, int y_offset) 411 int style, int x_offset, int y_offset)
406{ 412{
407 int xpos, ypos, h; 413 int xpos, ypos, h;
408 LCDFN(scroll_stop_line)(current_vp, y); 414 LCDFN(scroll_stop_viewport_line)(current_vp, y);
409 if(!str) 415 if(!str)
410 return; 416 return;
411 417
@@ -491,7 +497,7 @@ void LCDFN(puts_scroll_style_xyoffset)(int x, int y, const unsigned char *string
491 if (restart) 497 if (restart)
492 { 498 {
493 /* remove any previously scrolling line at the same location */ 499 /* remove any previously scrolling line at the same location */
494 LCDFN(scroll_stop_line)(current_vp, y); 500 LCDFN(scroll_stop_viewport_line)(current_vp, y);
495 501
496 if (LCDFN(scroll_info).lines >= LCDM(SCROLLABLE_LINES)) return; 502 if (LCDFN(scroll_info).lines >= LCDM(SCROLLABLE_LINES)) return;
497 LCDFN(puts_style_xyoffset)(x, y, string, style, x_offset, y_offset); 503 LCDFN(puts_style_xyoffset)(x, y, string, style, x_offset, y_offset);
diff --git a/firmware/drivers/lcd-charcell.c b/firmware/drivers/lcd-charcell.c
index b59b270f9b..bdd02de1b6 100644
--- a/firmware/drivers/lcd-charcell.c
+++ b/firmware/drivers/lcd-charcell.c
@@ -377,7 +377,7 @@ void lcd_clear_viewport(void)
377 for (y = 0; y < current_vp->height; y++) 377 for (y = 0; y < current_vp->height; y++)
378 lcd_putxchar(x, y, xspace); 378 lcd_putxchar(x, y, xspace);
379 379
380 lcd_scroll_stop(current_vp); 380 lcd_scroll_stop_viewport(current_vp);
381 } 381 }
382} 382}
383 383
@@ -486,7 +486,7 @@ void lcd_puts_offset(int x, int y, const unsigned char *str, int offset)
486 return; 486 return;
487 487
488 /* make sure scrolling is turned off on the line we are updating */ 488 /* make sure scrolling is turned off on the line we are updating */
489 lcd_scroll_stop_line(current_vp, y); 489 lcd_scroll_stop_viewport_line(current_vp, y);
490 490
491 x = lcd_putsxyofs(x, y, offset, str); 491 x = lcd_putsxyofs(x, y, offset, str);
492 while (x < current_vp->width) 492 while (x < current_vp->width)
@@ -509,7 +509,7 @@ void lcd_puts_scroll_offset(int x, int y, const unsigned char *string,
509 return; 509 return;
510 510
511 /* remove any previously scrolling line at the same location */ 511 /* remove any previously scrolling line at the same location */
512 lcd_scroll_stop_line(current_vp, y); 512 lcd_scroll_stop_viewport_line(current_vp, y);
513 513
514 if (lcd_scroll_info.lines >= LCD_SCROLLABLE_LINES) return; 514 if (lcd_scroll_info.lines >= LCD_SCROLLABLE_LINES) return;
515 515