diff options
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/lcd-16bit.c | 8 | ||||
-rw-r--r-- | firmware/drivers/lcd-h300.c | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/firmware/drivers/lcd-16bit.c b/firmware/drivers/lcd-16bit.c index 1aed98e5f6..83c6dc612c 100644 --- a/firmware/drivers/lcd-16bit.c +++ b/firmware/drivers/lcd-16bit.c | |||
@@ -37,8 +37,8 @@ | |||
37 | /*** globals ***/ | 37 | /*** globals ***/ |
38 | fb_data lcd_framebuffer[LCD_HEIGHT][LCD_WIDTH] __attribute__ ((aligned (4))); | 38 | fb_data lcd_framebuffer[LCD_HEIGHT][LCD_WIDTH] __attribute__ ((aligned (4))); |
39 | 39 | ||
40 | static unsigned fg_pattern = LCD_DEFAULT_FG; | 40 | static unsigned fg_pattern IDATA_ATTR = LCD_DEFAULT_FG; |
41 | static unsigned bg_pattern = LCD_DEFAULT_BG; | 41 | static unsigned bg_pattern IDATA_ATTR = LCD_DEFAULT_BG; |
42 | static int drawmode = DRMODE_SOLID; | 42 | static int drawmode = DRMODE_SOLID; |
43 | static int xmargin = 0; | 43 | static int xmargin = 0; |
44 | static int ymargin = 0; | 44 | static int ymargin = 0; |
@@ -145,21 +145,25 @@ int lcd_getstringsize(const unsigned char *str, int *w, int *h) | |||
145 | 145 | ||
146 | /*** low-level drawing functions ***/ | 146 | /*** low-level drawing functions ***/ |
147 | 147 | ||
148 | static void setpixel(int x, int y) ICODE_ATTR; | ||
148 | static void setpixel(int x, int y) | 149 | static void setpixel(int x, int y) |
149 | { | 150 | { |
150 | lcd_framebuffer[y][x] = fg_pattern; | 151 | lcd_framebuffer[y][x] = fg_pattern; |
151 | } | 152 | } |
152 | 153 | ||
154 | static void clearpixel(int x, int y) ICODE_ATTR; | ||
153 | static void clearpixel(int x, int y) | 155 | static void clearpixel(int x, int y) |
154 | { | 156 | { |
155 | lcd_framebuffer[y][x] = bg_pattern; | 157 | lcd_framebuffer[y][x] = bg_pattern; |
156 | } | 158 | } |
157 | 159 | ||
160 | static void flippixel(int x, int y) ICODE_ATTR; | ||
158 | static void flippixel(int x, int y) | 161 | static void flippixel(int x, int y) |
159 | { | 162 | { |
160 | lcd_framebuffer[y][x] = ~lcd_framebuffer[y][x]; | 163 | lcd_framebuffer[y][x] = ~lcd_framebuffer[y][x]; |
161 | } | 164 | } |
162 | 165 | ||
166 | static void nopixel(int x, int y) ICODE_ATTR; | ||
163 | static void nopixel(int x, int y) | 167 | static void nopixel(int x, int y) |
164 | { | 168 | { |
165 | (void)x; | 169 | (void)x; |
diff --git a/firmware/drivers/lcd-h300.c b/firmware/drivers/lcd-h300.c index 4edfe404b3..17fe1f530b 100644 --- a/firmware/drivers/lcd-h300.c +++ b/firmware/drivers/lcd-h300.c | |||
@@ -41,6 +41,7 @@ void lcd_begin_write_gram(void) | |||
41 | *(volatile unsigned short *)0xf0000000 = 0x22; | 41 | *(volatile unsigned short *)0xf0000000 = 0x22; |
42 | } | 42 | } |
43 | 43 | ||
44 | void lcd_write_data(const unsigned short* p_bytes, int count) ICODE_ATTR; | ||
44 | void lcd_write_data(const unsigned short* p_bytes, int count) | 45 | void lcd_write_data(const unsigned short* p_bytes, int count) |
45 | { | 46 | { |
46 | while(count--) | 47 | while(count--) |