mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -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
|
|
@ -228,7 +228,7 @@ void lcd_remote_update(void)
|
|||
have to update one page at a time. */
|
||||
lcd_remote_write_command(LCD_SET_PAGE | (y > 5 ? y + 2 : y));
|
||||
lcd_remote_write_command_ex(LCD_SET_COLUMN | 0, 0);
|
||||
lcd_remote_write_data(lcd_remote_framebuffer[y], LCD_REMOTE_WIDTH);
|
||||
lcd_remote_write_data(FBREMOTEADDR(0, y), LCD_REMOTE_WIDTH);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -260,7 +260,7 @@ void lcd_remote_update_rect(int x, int y, int width, int height)
|
|||
lcd_remote_write_command_ex(LCD_SET_COLUMN | ((x >> 4) & 0xf),
|
||||
x & 0xf);
|
||||
|
||||
lcd_remote_write_data(&lcd_remote_framebuffer[y][x], width);
|
||||
lcd_remote_write_data(FBREMOTEADDR(x,y), width);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ void lcd_update(void)
|
|||
have to update one page at a time. */
|
||||
lcd_write_command(LCD_SET_PAGE | (y > 5 ? y + 2 : y));
|
||||
lcd_write_command_e(LCD_SET_COLUMN | 0, 0);
|
||||
lcd_write_data(lcd_framebuffer[y], LCD_WIDTH);
|
||||
lcd_write_data(FBADDR(0, y), LCD_WIDTH);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -295,7 +295,7 @@ void lcd_update_rect(int x, int y, int width, int height)
|
|||
lcd_write_command(LCD_SET_PAGE | ((y > 5 ? y + 2 : y) & 0xf));
|
||||
lcd_write_command_e(LCD_SET_COLUMN | ((x >> 4) & 0xf), x & 0xf);
|
||||
|
||||
lcd_write_data(&lcd_framebuffer[y][x], width);
|
||||
lcd_write_data(FBADDR(x,y), width);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ void lcd_update(void)
|
|||
lcd_write_command_ex(LCD_CNTL_COLUMN, 0, -1);
|
||||
|
||||
lcd_write_command(LCD_CNTL_DATA_WRITE);
|
||||
lcd_write_data (lcd_framebuffer[y], LCD_WIDTH);
|
||||
lcd_write_data (FBADDR(0, y), LCD_WIDTH);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -235,6 +235,6 @@ void lcd_update_rect(int x, int y, int width, int height)
|
|||
lcd_write_command_ex(LCD_CNTL_COLUMN, x, -1);
|
||||
|
||||
lcd_write_command(LCD_CNTL_DATA_WRITE);
|
||||
lcd_write_data (&lcd_framebuffer[y][x], width);
|
||||
lcd_write_data (FBADDR(x,y), width);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -530,7 +530,7 @@ void lcd_update_rect(int x, int y, int width, int height)
|
|||
|
||||
lcd_begin_write_gram();
|
||||
|
||||
ptr = (unsigned short *)&lcd_framebuffer[y][x];
|
||||
ptr = (unsigned short *)FBADDR(x,y);
|
||||
|
||||
do
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue