summaryrefslogtreecommitdiff
path: root/firmware/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers')
-rw-r--r--firmware/drivers/lcd-bitmap-common.c11
-rw-r--r--firmware/drivers/lcd-charcell.c10
2 files changed, 21 insertions, 0 deletions
diff --git a/firmware/drivers/lcd-bitmap-common.c b/firmware/drivers/lcd-bitmap-common.c
index d8417e13e2..5961bba7a5 100644
--- a/firmware/drivers/lcd-bitmap-common.c
+++ b/firmware/drivers/lcd-bitmap-common.c
@@ -572,6 +572,17 @@ void LCDFN(puts_scroll_style_xyoffset)(int x, int y, const unsigned char *string
572 true, LCDFN(scroll_fn), NULL); 572 true, LCDFN(scroll_fn), NULL);
573} 573}
574 574
575void LCDFN(putsxy_scroll_func)(int x, int y, const unsigned char *string,
576 void (*scroll_func)(struct scrollinfo *),
577 void *data, int x_offset)
578{
579 if (!scroll_func)
580 LCDFN(putsxyofs)(x, y, x_offset, string);
581 else
582 LCDFN(puts_scroll_worker)(x, y, string, STYLE_NONE, x_offset, 0,
583 false, scroll_func, data);
584}
585
575void LCDFN(puts_scroll)(int x, int y, const unsigned char *string) 586void LCDFN(puts_scroll)(int x, int y, const unsigned char *string)
576{ 587{
577 LCDFN(puts_scroll_style)(x, y, string, STYLE_DEFAULT); 588 LCDFN(puts_scroll_style)(x, y, string, STYLE_DEFAULT);
diff --git a/firmware/drivers/lcd-charcell.c b/firmware/drivers/lcd-charcell.c
index db867cdb0a..54159519a3 100644
--- a/firmware/drivers/lcd-charcell.c
+++ b/firmware/drivers/lcd-charcell.c
@@ -563,6 +563,16 @@ void lcd_puts_scroll_worker(int x, int y, const unsigned char *string,
563 lcd_scroll_info.lines++; 563 lcd_scroll_info.lines++;
564} 564}
565 565
566void lcd_putsxy_scroll_func(int x, int y, const unsigned char *string,
567 void (*scroll_func)(struct scrollinfo *),
568 void *data, int x_offset)
569{
570 if (!scroll_func)
571 lcd_putsxyofs(x, y, x_offset, string);
572 else
573 lcd_puts_scroll_worker(x, y, string, x_offset, scroll_func, data);
574}
575
566void lcd_scroll_fn(struct scrollinfo* s) 576void lcd_scroll_fn(struct scrollinfo* s)
567{ 577{
568 lcd_putsxyofs(s->x, s->y, s->offset, s->line); 578 lcd_putsxyofs(s->x, s->y, s->offset, s->line);