forked from len0rd/rockbox
FS#9511 - working lcd update (and lcd_update_rect() ) for the e200v2, working button light also
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18914 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
0a8446ad7d
commit
8f7f219dba
2 changed files with 9 additions and 14 deletions
|
|
@ -62,10 +62,12 @@ void _backlight_off(void)
|
|||
|
||||
void _buttonlight_on(void)
|
||||
{
|
||||
/* TODO */
|
||||
GPIOD_PIN(7) = (1<<7);
|
||||
GPIOD_DIR |= (1<<7);
|
||||
}
|
||||
|
||||
void _buttonlight_off(void)
|
||||
{
|
||||
/* TODO */
|
||||
GPIOD_PIN(7) = 0;
|
||||
GPIOD_DIR |= (1<<7);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -307,14 +307,6 @@ void lcd_init_device(void)
|
|||
|
||||
GPIOD_DIR |= (1<<7);
|
||||
|
||||
#if 0
|
||||
/* TODO: This code is conditional on a variable in the OF init, we need to
|
||||
work out what it means */
|
||||
|
||||
GPIOD_PIN(7) = (1<<7);
|
||||
GPIOD_DIR |= (1<<7);
|
||||
#endif
|
||||
|
||||
lcd_delay(1);
|
||||
|
||||
GPIOA_PIN(5) = (1<<5);
|
||||
|
|
@ -377,13 +369,14 @@ void lcd_update(void)
|
|||
|
||||
/* Set start position and window */
|
||||
lcd_write_reg(R_HORIZ_RAM_ADDR_POS,
|
||||
((y_offset + LCD_HEIGHT-1) << 8) | y_offset);
|
||||
lcd_write_reg(R_VERT_RAM_ADDR_POS, (LCD_WIDTH-1) << 8);
|
||||
((y_offset + LCD_WIDTH-1) << 8) | y_offset);
|
||||
lcd_write_reg(R_VERT_RAM_ADDR_POS, (LCD_HEIGHT-1) << 8);
|
||||
lcd_write_reg(R_RAM_ADDR_SET, y_offset);
|
||||
|
||||
lcd_write_cmd(R_WRITE_DATA_2_GRAM);
|
||||
|
||||
lcd_write_data((unsigned short *)lcd_framebuffer, LCD_WIDTH*LCD_HEIGHT);
|
||||
|
||||
} /* lcd_update */
|
||||
|
||||
|
||||
|
|
@ -414,8 +407,8 @@ void lcd_update_rect(int x, int y, int width, int height)
|
|||
lcd_write_reg(R_ENTRY_MODE, R_ENTRY_MODE_HORZ);
|
||||
/* Set start position and window */
|
||||
lcd_write_reg(R_HORIZ_RAM_ADDR_POS,
|
||||
((y_offset + LCD_HEIGHT-1) << 8) | y_offset);
|
||||
lcd_write_reg(R_VERT_RAM_ADDR_POS, ((x + width - 1) << 8) | x);
|
||||
((y_offset + LCD_WIDTH-1) << 8) | y_offset);
|
||||
lcd_write_reg(R_VERT_RAM_ADDR_POS, ((y + height - 1) << 8) | y);
|
||||
lcd_write_reg(R_RAM_ADDR_SET, (x << 8) | (y + y_offset));
|
||||
|
||||
lcd_write_cmd(R_WRITE_DATA_2_GRAM);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue