diff options
Diffstat (limited to 'firmware/target/coldfire/iaudio/m3/lcd-m3.c')
-rw-r--r-- | firmware/target/coldfire/iaudio/m3/lcd-m3.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/firmware/target/coldfire/iaudio/m3/lcd-m3.c b/firmware/target/coldfire/iaudio/m3/lcd-m3.c index 3da608a0ef..5e84cbacd3 100644 --- a/firmware/target/coldfire/iaudio/m3/lcd-m3.c +++ b/firmware/target/coldfire/iaudio/m3/lcd-m3.c | |||
@@ -258,6 +258,7 @@ void lcd_update(void) | |||
258 | int y; | 258 | int y; |
259 | if (initialized) | 259 | if (initialized) |
260 | { | 260 | { |
261 | void* (*fbaddr)(int x, int y) = FB_CURRENTVP_BUFFER->get_address_fn; | ||
261 | for(y = 0;y < LCD_FBHEIGHT;y++) | 262 | for(y = 0;y < LCD_FBHEIGHT;y++) |
262 | { | 263 | { |
263 | /* Copy display bitmap to hardware. | 264 | /* Copy display bitmap to hardware. |
@@ -266,7 +267,7 @@ void lcd_update(void) | |||
266 | have to update one page at a time. */ | 267 | have to update one page at a time. */ |
267 | lcd_write_command(LCD_SET_PAGE | (y > 5 ? y + 2 : y)); | 268 | lcd_write_command(LCD_SET_PAGE | (y > 5 ? y + 2 : y)); |
268 | lcd_write_command_e(LCD_SET_COLUMN | 0, 0); | 269 | lcd_write_command_e(LCD_SET_COLUMN | 0, 0); |
269 | lcd_write_data(FBADDR(0, y), LCD_WIDTH); | 270 | lcd_write_data(fbaddr(0,y), LCD_WIDTH); |
270 | } | 271 | } |
271 | } | 272 | } |
272 | } | 273 | } |
@@ -289,6 +290,7 @@ void lcd_update_rect(int x, int y, int width, int height) | |||
289 | if(ymax >= LCD_FBHEIGHT) | 290 | if(ymax >= LCD_FBHEIGHT) |
290 | ymax = LCD_FBHEIGHT-1; | 291 | ymax = LCD_FBHEIGHT-1; |
291 | 292 | ||
293 | void* (*fbaddr)(int x, int y) = FB_CURRENTVP_BUFFER->get_address_fn; | ||
292 | /* Copy specified rectangle bitmap to hardware | 294 | /* Copy specified rectangle bitmap to hardware |
293 | COM48-COM63 are not connected, so we need to skip those */ | 295 | COM48-COM63 are not connected, so we need to skip those */ |
294 | for (; y <= ymax; y++) | 296 | for (; y <= ymax; y++) |
@@ -296,7 +298,7 @@ void lcd_update_rect(int x, int y, int width, int height) | |||
296 | lcd_write_command(LCD_SET_PAGE | ((y > 5 ? y + 2 : y) & 0xf)); | 298 | lcd_write_command(LCD_SET_PAGE | ((y > 5 ? y + 2 : y) & 0xf)); |
297 | lcd_write_command_e(LCD_SET_COLUMN | ((x >> 4) & 0xf), x & 0xf); | 299 | lcd_write_command_e(LCD_SET_COLUMN | ((x >> 4) & 0xf), x & 0xf); |
298 | 300 | ||
299 | lcd_write_data(FBADDR(x,y), width); | 301 | lcd_write_data(fbaddr(x,y), width); |
300 | } | 302 | } |
301 | } | 303 | } |
302 | } | 304 | } |