mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
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
This commit is contained in:
parent
15c69b8baf
commit
b37e6bc8c1
65 changed files with 193 additions and 181 deletions
|
|
@ -394,7 +394,7 @@ void lcd_update_rect(int x, int y, int width, int height)
|
|||
lcd_setup_drawing_region(x, y, width, height);
|
||||
|
||||
/* Copy display bitmap to hardware */
|
||||
p = &lcd_framebuffer[y][x];
|
||||
p = FBADDR(x,y);
|
||||
if (LCD_WIDTH == width) {
|
||||
/* Write all lines at once */
|
||||
lcd_write_line(p, height*LCD_WIDTH, LCD_BASE);
|
||||
|
|
|
|||
|
|
@ -295,7 +295,7 @@ void lcd_update(void)
|
|||
LCD_WCMD = 0;
|
||||
LCD_WCMD = 0x22;
|
||||
}
|
||||
for(p=&lcd_framebuffer[0][0], i=0;i<LCD_WIDTH*LCD_FBHEIGHT;++i, ++p) {
|
||||
for(p=FBADDR(0,0), i=0;i<LCD_WIDTH*LCD_FBHEIGHT;++i, ++p) {
|
||||
while (LCD_STATUS & STAT_FULL);
|
||||
LCD_WDATA = RGB_UNPACK_RED(*p);
|
||||
while (LCD_STATUS & STAT_FULL);
|
||||
|
|
|
|||
|
|
@ -438,8 +438,8 @@ void lcd_init_device(void)
|
|||
lcd_controller_init();
|
||||
|
||||
/* set framebuffer addresses */
|
||||
fb = (uint32_t) &lcd_framebuffer[0][0];
|
||||
fb_end = (uint32_t) &lcd_framebuffer[LCD_HEIGHT][0];
|
||||
fb = (uint32_t) FBADDR(0,0);
|
||||
fb_end = (uint32_t) FBADDR(0,LCD_HEIGHT);
|
||||
window = 2 * LCD_WIDTH;
|
||||
|
||||
LCDB1SADDR1 = fb;
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ void lcd_update_rect(int x, int y, int width, int height)
|
|||
lcd_set_position1(x, y);
|
||||
|
||||
for (h = 0; h < height; h++) {
|
||||
p = &lcd_framebuffer[y][0];
|
||||
p = FBADDR(0,y);
|
||||
for (w = 0; w < LCD_WIDTH; w++) {
|
||||
while (LCD_STATUS & 0x10);
|
||||
LCD_WDATA = *p++;
|
||||
|
|
@ -319,7 +319,7 @@ void lcd_update_rect(int x, int y, int width, int height)
|
|||
lcd_set_position2(x, y);
|
||||
|
||||
for (h = 0; h < height; h++) {
|
||||
p = &lcd_framebuffer[y][x];
|
||||
p = FBADDR(x,y);
|
||||
for (w = 0; w < width; w++) {
|
||||
while (LCD_STATUS & 0x10);
|
||||
LCD_WDATA = *p++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue