summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2012-02-22 21:18:05 +1100
committerJonathan Gordon <rockbox@jdgordon.info>2012-02-28 11:44:59 +1100
commitb37e6bc8c119289aca8740dd5e3b60d72f9d6b40 (patch)
tree7ee9d491811c950943f0fc068d2e2b460ff05c6d /firmware/target/arm/as3525
parent15c69b8bafc3e89e1a825b5bbefef4a97f0001b1 (diff)
downloadrockbox-b37e6bc8c119289aca8740dd5e3b60d72f9d6b40.tar.gz
rockbox-b37e6bc8c119289aca8740dd5e3b60d72f9d6b40.zip
lcd drivers: Convert lcd_[remote_]framebuffer to a pointer
Change all lcd drivers to using a pointer to the static framebuffer instead of directly accessing the static array. This will let us later do fun things like dynamic framebuffer sizes (RaaA) or ability to use different buffers for different layers (dynamic skin backdrops!) Change-Id: I0a4d58a9d7b55e6c932131b929e5d4c9f9414b06
Diffstat (limited to 'firmware/target/arm/as3525')
-rw-r--r--firmware/target/arm/as3525/lcd-fuze.c2
-rw-r--r--firmware/target/arm/as3525/lcd-ssd1303.c4
-rw-r--r--firmware/target/arm/as3525/sansa-clipzip/lcd-clipzip.c2
-rw-r--r--firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/firmware/target/arm/as3525/lcd-fuze.c b/firmware/target/arm/as3525/lcd-fuze.c
index 2acc7b3bf9..b2033738b6 100644
--- a/firmware/target/arm/as3525/lcd-fuze.c
+++ b/firmware/target/arm/as3525/lcd-fuze.c
@@ -332,7 +332,7 @@ void lcd_update_rect(int x, int y, int width, int height)
332 332
333 lcd_write_cmd(R_WRITE_DATA_2_GRAM); 333 lcd_write_cmd(R_WRITE_DATA_2_GRAM);
334 334
335 ptr = &lcd_framebuffer[y][x]; 335 ptr = FBADDR(x,y);
336 336
337 do 337 do
338 { 338 {
diff --git a/firmware/target/arm/as3525/lcd-ssd1303.c b/firmware/target/arm/as3525/lcd-ssd1303.c
index 213f12a424..9fcc85d243 100644
--- a/firmware/target/arm/as3525/lcd-ssd1303.c
+++ b/firmware/target/arm/as3525/lcd-ssd1303.c
@@ -273,7 +273,7 @@ void lcd_update(void)
273 lcd_write_command (LCD_CNTL_HIGHCOL | ((offset >> 4) & 0xf)); 273 lcd_write_command (LCD_CNTL_HIGHCOL | ((offset >> 4) & 0xf));
274 lcd_write_command (LCD_CNTL_LOWCOL | (offset & 0xf)); 274 lcd_write_command (LCD_CNTL_LOWCOL | (offset & 0xf));
275 275
276 lcd_write_data (lcd_framebuffer[y], LCD_WIDTH); 276 lcd_write_data (FBADDR(0, y), LCD_WIDTH);
277 } 277 }
278} 278}
279 279
@@ -304,6 +304,6 @@ void lcd_update_rect(int x, int y, int width, int height)
304 lcd_write_command (LCD_CNTL_HIGHCOL | (((x+offset) >> 4) & 0xf)); 304 lcd_write_command (LCD_CNTL_HIGHCOL | (((x+offset) >> 4) & 0xf));
305 lcd_write_command (LCD_CNTL_LOWCOL | ((x+offset) & 0xf)); 305 lcd_write_command (LCD_CNTL_LOWCOL | ((x+offset) & 0xf));
306 306
307 lcd_write_data (&lcd_framebuffer[y][x], width); 307 lcd_write_data (FBADDR(x,y), width);
308 } 308 }
309} 309}
diff --git a/firmware/target/arm/as3525/sansa-clipzip/lcd-clipzip.c b/firmware/target/arm/as3525/sansa-clipzip/lcd-clipzip.c
index 3952171e7e..7673b529cc 100644
--- a/firmware/target/arm/as3525/sansa-clipzip/lcd-clipzip.c
+++ b/firmware/target/arm/as3525/sansa-clipzip/lcd-clipzip.c
@@ -426,7 +426,7 @@ void lcd_update_rect(int x, int y, int width, int height)
426 426
427 /* write to GRAM */ 427 /* write to GRAM */
428 for (row = y; row < y_end; row++) { 428 for (row = y; row < y_end; row++) {
429 lcd_write_data(&lcd_framebuffer[row][x], width); 429 lcd_write_data(FBADDR(x,row), width);
430 } 430 }
431} 431}
432 432
diff --git a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c
index f875b40c05..2c80f89ff7 100644
--- a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c
+++ b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c
@@ -488,7 +488,7 @@ void lcd_update_rect(int x, int y, int width, int height)
488 lcd_window(x, y, x+width-1, y+height-1); 488 lcd_window(x, y, x+width-1, y+height-1);
489 lcd_write_cmd(R_WRITE_DATA_2_GRAM); 489 lcd_write_cmd(R_WRITE_DATA_2_GRAM);
490 490
491 ptr = &lcd_framebuffer[y][x]; 491 ptr = FBADDR(x,y);
492 492
493 do 493 do
494 { 494 {