summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/lcd.c16
-rw-r--r--firmware/drivers/lcd.h4
2 files changed, 17 insertions, 3 deletions
diff --git a/firmware/drivers/lcd.c b/firmware/drivers/lcd.c
index 2062a1dc21..4c36ee19e3 100644
--- a/firmware/drivers/lcd.c
+++ b/firmware/drivers/lcd.c
@@ -32,6 +32,9 @@
32#include "panic.h" 32#include "panic.h"
33#endif 33#endif
34 34
35#if defined(SIMULATOR)
36#include "sim_icons.h"
37#endif
35 38
36 39
37/*** definitions ***/ 40/*** definitions ***/
@@ -492,8 +495,7 @@ void lcd_icon(int icon, bool enable)
492#if defined(SIMULATOR) && defined(HAVE_LCD_CHARCELLS) 495#if defined(SIMULATOR) && defined(HAVE_LCD_CHARCELLS)
493void lcd_icon(int icon, bool enable) 496void lcd_icon(int icon, bool enable)
494{ 497{
495 icon = icon; 498 sim_lcd_icon(icon, enable);
496 enable = enable;
497} 499}
498#endif 500#endif
499 501
@@ -648,11 +650,19 @@ void lcd_update_rect (int x_start, int y,
648 */ 650 */
649void lcd_clear_display (void) 651void lcd_clear_display (void)
650{ 652{
651 memset (lcd_framebuffer, 0, sizeof lcd_framebuffer);
652#if defined(SIMULATOR) && defined(HAVE_LCD_CHARCELLS) 653#if defined(SIMULATOR) && defined(HAVE_LCD_CHARCELLS)
654 /* Clear just the text portion of the display */
655 int x, y;
656 for (y = 8; y <= (32 + 7); ++y)
657 {
658 for (x = 0; x < LCD_WIDTH; x++)
659 CLEAR_PIXEL(x, y);
660 }
653 /* this function is being used when simulating a charcell LCD and 661 /* this function is being used when simulating a charcell LCD and
654 then we update immediately */ 662 then we update immediately */
655 lcd_update(); 663 lcd_update();
664#else
665 memset (lcd_framebuffer, 0, sizeof lcd_framebuffer);
656#endif 666#endif
657} 667}
658 668
diff --git a/firmware/drivers/lcd.h b/firmware/drivers/lcd.h
index 4aab039f97..b99fa54389 100644
--- a/firmware/drivers/lcd.h
+++ b/firmware/drivers/lcd.h
@@ -46,6 +46,10 @@ extern void lcd_update_rect(int x, int y, int width, int height);
46 #define lcd_update() 46 #define lcd_update()
47#endif 47#endif
48 48
49#if defined(SIMULATOR)
50#include "sim_icons.h"
51#endif
52
49#ifdef HAVE_LCD_CHARCELLS 53#ifdef HAVE_LCD_CHARCELLS
50 54
51/* Icon definitions for lcd_icon() */ 55/* Icon definitions for lcd_icon() */