summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/screen_access.c2
-rw-r--r--apps/screen_access.h1
-rw-r--r--firmware/drivers/lcd-bitmap-common.c5
-rw-r--r--firmware/drivers/lcd-charcell.c33
-rw-r--r--firmware/export/lcd-remote.h2
-rw-r--r--firmware/export/lcd.h1
6 files changed, 17 insertions, 27 deletions
diff --git a/apps/screen_access.c b/apps/screen_access.c
index 7ebc45b8fd..c8f47ed0f6 100644
--- a/apps/screen_access.c
+++ b/apps/screen_access.c
@@ -266,7 +266,6 @@ struct screen screens[NB_SCREENS] =
266 .putsxy=&lcd_putsxy, 266 .putsxy=&lcd_putsxy,
267 .puts=&lcd_puts, 267 .puts=&lcd_puts,
268 .putsf=&lcd_putsf, 268 .putsf=&lcd_putsf,
269 .puts_offset=&lcd_puts_offset,
270 .puts_scroll=&lcd_puts_scroll, 269 .puts_scroll=&lcd_puts_scroll,
271 .putsxy_scroll_func=&lcd_putsxy_scroll_func, 270 .putsxy_scroll_func=&lcd_putsxy_scroll_func,
272 .scroll_speed=&lcd_scroll_speed, 271 .scroll_speed=&lcd_scroll_speed,
@@ -368,7 +367,6 @@ struct screen screens[NB_SCREENS] =
368 .putsxy=&lcd_remote_putsxy, 367 .putsxy=&lcd_remote_putsxy,
369 .puts=&lcd_remote_puts, 368 .puts=&lcd_remote_puts,
370 .putsf=&lcd_remote_putsf, 369 .putsf=&lcd_remote_putsf,
371 .puts_offset=&lcd_remote_puts_offset,
372 .puts_scroll=&lcd_remote_puts_scroll, 370 .puts_scroll=&lcd_remote_puts_scroll,
373 .putsxy_scroll_func=&lcd_remote_putsxy_scroll_func, 371 .putsxy_scroll_func=&lcd_remote_putsxy_scroll_func,
374 .scroll_speed=&lcd_remote_scroll_speed, 372 .scroll_speed=&lcd_remote_scroll_speed,
diff --git a/apps/screen_access.h b/apps/screen_access.h
index c21d9cdb63..1d120f7bb0 100644
--- a/apps/screen_access.h
+++ b/apps/screen_access.h
@@ -139,7 +139,6 @@ struct screen
139 void (*putsxy)(int x, int y, const unsigned char *str); 139 void (*putsxy)(int x, int y, const unsigned char *str);
140 void (*puts)(int x, int y, const unsigned char *str); 140 void (*puts)(int x, int y, const unsigned char *str);
141 void (*putsf)(int x, int y, const unsigned char *str, ...); 141 void (*putsf)(int x, int y, const unsigned char *str, ...);
142 void (*puts_offset)(int x, int y, const unsigned char *str, int offset);
143 void (*puts_scroll)(int x, int y, const unsigned char *string); 142 void (*puts_scroll)(int x, int y, const unsigned char *string);
144 void (*putsxy_scroll_func)(int x, int y, const unsigned char *string, 143 void (*putsxy_scroll_func)(int x, int y, const unsigned char *string,
145 void (*scroll_func)(struct scrollinfo *), 144 void (*scroll_func)(struct scrollinfo *),
diff --git a/firmware/drivers/lcd-bitmap-common.c b/firmware/drivers/lcd-bitmap-common.c
index 00d317c9c8..2219b6de78 100644
--- a/firmware/drivers/lcd-bitmap-common.c
+++ b/firmware/drivers/lcd-bitmap-common.c
@@ -494,11 +494,6 @@ void LCDFN(puts_style)(int x, int y, const unsigned char *str, int style)
494 LCDFN(puts_style_offset)(x, y, str, style, 0); 494 LCDFN(puts_style_offset)(x, y, str, style, 0);
495} 495}
496 496
497void LCDFN(puts_offset)(int x, int y, const unsigned char *str, int offset)
498{
499 LCDFN(puts_style_offset)(x, y, str, STYLE_DEFAULT, offset);
500}
501
502/*** scrolling ***/ 497/*** scrolling ***/
503 498
504static struct scrollinfo* find_scrolling_line(int x, int y) 499static struct scrollinfo* find_scrolling_line(int x, int y)
diff --git a/firmware/drivers/lcd-charcell.c b/firmware/drivers/lcd-charcell.c
index c3b1482a3b..6a6e57e992 100644
--- a/firmware/drivers/lcd-charcell.c
+++ b/firmware/drivers/lcd-charcell.c
@@ -477,10 +477,25 @@ void lcd_putsxyf(int x, int y, const unsigned char *fmt, ...)
477 477
478/*** Line oriented text output ***/ 478/*** Line oriented text output ***/
479 479
480/* Put a string at a given char position, skipping first offset chars */
481void lcd_putsofs(int x, int y, const unsigned char *str, int offset)
482{
483 if ((unsigned)y >= (unsigned)current_vp->height)
484 return;
485
486 /* make sure scrolling is turned off on the line we are updating */
487 lcd_scroll_stop_viewport_rect(current_vp, x, y, current_vp->width - x, 1);
488
489 x = lcd_putsxyofs(x, y, offset, str);
490 while (x < current_vp->width)
491 lcd_putxchar(x++, y, xspace);
492}
493
494
480/* Put a string at a given char position */ 495/* Put a string at a given char position */
481void lcd_puts(int x, int y, const unsigned char *str) 496void lcd_puts(int x, int y, const unsigned char *str)
482{ 497{
483 lcd_puts_offset(x, y, str, 0); 498 lcd_putsofs(x, y, str, 0);
484} 499}
485 500
486/* Formatting version of lcd_puts */ 501/* Formatting version of lcd_puts */
@@ -494,20 +509,6 @@ void lcd_putsf(int x, int y, const unsigned char *fmt, ...)
494 lcd_puts(x, y, buf); 509 lcd_puts(x, y, buf);
495} 510}
496 511
497/* Put a string at a given char position, skipping first offset chars */
498void lcd_puts_offset(int x, int y, const unsigned char *str, int offset)
499{
500 if ((unsigned)y >= (unsigned)current_vp->height)
501 return;
502
503 /* make sure scrolling is turned off on the line we are updating */
504 lcd_scroll_stop_viewport_rect(current_vp, x, y, current_vp->width - x, 1);
505
506 x = lcd_putsxyofs(x, y, offset, str);
507 while (x < current_vp->width)
508 lcd_putxchar(x++, y, xspace);
509}
510
511/** scrolling **/ 512/** scrolling **/
512 513
513void lcd_puts_scroll_worker(int x, int y, const unsigned char *string, 514void lcd_puts_scroll_worker(int x, int y, const unsigned char *string,
@@ -529,7 +530,7 @@ void lcd_puts_scroll_worker(int x, int y, const unsigned char *string,
529 530
530 s->start_tick = current_tick + lcd_scroll_info.delay; 531 s->start_tick = current_tick + lcd_scroll_info.delay;
531 532
532 lcd_puts_offset(x, y, string, offset); 533 lcd_putsofs(x, y, string, offset);
533 len = utf8length(string); 534 len = utf8length(string);
534 535
535 if (current_vp->width - x >= len) 536 if (current_vp->width - x >= len)
diff --git a/firmware/export/lcd-remote.h b/firmware/export/lcd-remote.h
index 5eb08b618f..347a46e8bd 100644
--- a/firmware/export/lcd-remote.h
+++ b/firmware/export/lcd-remote.h
@@ -177,8 +177,6 @@ extern void lcd_remote_puts(int x, int y, const unsigned char *str);
177extern void lcd_remote_putsf(int x, int y, const unsigned char *fmt, ...); 177extern void lcd_remote_putsf(int x, int y, const unsigned char *fmt, ...);
178extern void lcd_remote_puts_style(int x, int y, const unsigned char *str, 178extern void lcd_remote_puts_style(int x, int y, const unsigned char *str,
179 int style); 179 int style);
180extern void lcd_remote_puts_offset(int x, int y, const unsigned char *str,
181 int offset);
182extern void lcd_remote_puts_style_offset(int x, int y, const unsigned char *str, 180extern void lcd_remote_puts_style_offset(int x, int y, const unsigned char *str,
183 int style, int offset); 181 int style, int offset);
184extern void lcd_remote_puts_style_xyoffset(int x, int y, const unsigned char *str, 182extern void lcd_remote_puts_style_xyoffset(int x, int y, const unsigned char *str,
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h
index dd7c3ba80f..7c361d4097 100644
--- a/firmware/export/lcd.h
+++ b/firmware/export/lcd.h
@@ -207,7 +207,6 @@ extern void lcd_putsxy_style_offset(int x, int y, const unsigned char *str,
207extern void lcd_puts(int x, int y, const unsigned char *string); 207extern void lcd_puts(int x, int y, const unsigned char *string);
208extern void lcd_putsf(int x, int y, const unsigned char *fmt, ...); 208extern void lcd_putsf(int x, int y, const unsigned char *fmt, ...);
209extern void lcd_puts_style(int x, int y, const unsigned char *string, int style); 209extern void lcd_puts_style(int x, int y, const unsigned char *string, int style);
210extern void lcd_puts_offset(int x, int y, const unsigned char *str, int offset);
211extern void lcd_putc(int x, int y, unsigned long ucs); 210extern void lcd_putc(int x, int y, unsigned long ucs);
212extern void lcd_puts_scroll(int x, int y, const unsigned char* string); 211extern void lcd_puts_scroll(int x, int y, const unsigned char* string);
213extern void lcd_puts_scroll_style(int x, int y, const unsigned char* string, 212extern void lcd_puts_scroll_style(int x, int y, const unsigned char* string,