diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2008-10-29 06:11:33 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2008-10-29 06:11:33 +0000 |
commit | 8f7f219dbabee320862cb7ed8616300d54f935cb (patch) | |
tree | cbe72682a4457a3d898ccd25855566426b5aa9b9 | |
parent | 0a8446ad7dc5a659f59ac3d2964b9ae4f7a26899 (diff) | |
download | rockbox-8f7f219dbabee320862cb7ed8616300d54f935cb.tar.gz rockbox-8f7f219dbabee320862cb7ed8616300d54f935cb.zip |
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
-rw-r--r-- | firmware/target/arm/as3525/sansa-e200v2/backlight-e200v2.c | 6 | ||||
-rw-r--r-- | firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c | 17 |
2 files changed, 9 insertions, 14 deletions
diff --git a/firmware/target/arm/as3525/sansa-e200v2/backlight-e200v2.c b/firmware/target/arm/as3525/sansa-e200v2/backlight-e200v2.c index fd2b65ad5b..735b85667d 100644 --- a/firmware/target/arm/as3525/sansa-e200v2/backlight-e200v2.c +++ b/firmware/target/arm/as3525/sansa-e200v2/backlight-e200v2.c | |||
@@ -62,10 +62,12 @@ void _backlight_off(void) | |||
62 | 62 | ||
63 | void _buttonlight_on(void) | 63 | void _buttonlight_on(void) |
64 | { | 64 | { |
65 | /* TODO */ | 65 | GPIOD_PIN(7) = (1<<7); |
66 | GPIOD_DIR |= (1<<7); | ||
66 | } | 67 | } |
67 | 68 | ||
68 | void _buttonlight_off(void) | 69 | void _buttonlight_off(void) |
69 | { | 70 | { |
70 | /* TODO */ | 71 | GPIOD_PIN(7) = 0; |
72 | GPIOD_DIR |= (1<<7); | ||
71 | } | 73 | } |
diff --git a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c index c4b300ac94..7a5c1156ff 100644 --- a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c +++ b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c | |||
@@ -307,14 +307,6 @@ void lcd_init_device(void) | |||
307 | 307 | ||
308 | GPIOD_DIR |= (1<<7); | 308 | GPIOD_DIR |= (1<<7); |
309 | 309 | ||
310 | #if 0 | ||
311 | /* TODO: This code is conditional on a variable in the OF init, we need to | ||
312 | work out what it means */ | ||
313 | |||
314 | GPIOD_PIN(7) = (1<<7); | ||
315 | GPIOD_DIR |= (1<<7); | ||
316 | #endif | ||
317 | |||
318 | lcd_delay(1); | 310 | lcd_delay(1); |
319 | 311 | ||
320 | GPIOA_PIN(5) = (1<<5); | 312 | GPIOA_PIN(5) = (1<<5); |
@@ -377,13 +369,14 @@ void lcd_update(void) | |||
377 | 369 | ||
378 | /* Set start position and window */ | 370 | /* Set start position and window */ |
379 | lcd_write_reg(R_HORIZ_RAM_ADDR_POS, | 371 | lcd_write_reg(R_HORIZ_RAM_ADDR_POS, |
380 | ((y_offset + LCD_HEIGHT-1) << 8) | y_offset); | 372 | ((y_offset + LCD_WIDTH-1) << 8) | y_offset); |
381 | lcd_write_reg(R_VERT_RAM_ADDR_POS, (LCD_WIDTH-1) << 8); | 373 | lcd_write_reg(R_VERT_RAM_ADDR_POS, (LCD_HEIGHT-1) << 8); |
382 | lcd_write_reg(R_RAM_ADDR_SET, y_offset); | 374 | lcd_write_reg(R_RAM_ADDR_SET, y_offset); |
383 | 375 | ||
384 | lcd_write_cmd(R_WRITE_DATA_2_GRAM); | 376 | lcd_write_cmd(R_WRITE_DATA_2_GRAM); |
385 | 377 | ||
386 | lcd_write_data((unsigned short *)lcd_framebuffer, LCD_WIDTH*LCD_HEIGHT); | 378 | lcd_write_data((unsigned short *)lcd_framebuffer, LCD_WIDTH*LCD_HEIGHT); |
379 | |||
387 | } /* lcd_update */ | 380 | } /* lcd_update */ |
388 | 381 | ||
389 | 382 | ||
@@ -414,8 +407,8 @@ void lcd_update_rect(int x, int y, int width, int height) | |||
414 | lcd_write_reg(R_ENTRY_MODE, R_ENTRY_MODE_HORZ); | 407 | lcd_write_reg(R_ENTRY_MODE, R_ENTRY_MODE_HORZ); |
415 | /* Set start position and window */ | 408 | /* Set start position and window */ |
416 | lcd_write_reg(R_HORIZ_RAM_ADDR_POS, | 409 | lcd_write_reg(R_HORIZ_RAM_ADDR_POS, |
417 | ((y_offset + LCD_HEIGHT-1) << 8) | y_offset); | 410 | ((y_offset + LCD_WIDTH-1) << 8) | y_offset); |
418 | lcd_write_reg(R_VERT_RAM_ADDR_POS, ((x + width - 1) << 8) | x); | 411 | lcd_write_reg(R_VERT_RAM_ADDR_POS, ((y + height - 1) << 8) | y); |
419 | lcd_write_reg(R_RAM_ADDR_SET, (x << 8) | (y + y_offset)); | 412 | lcd_write_reg(R_RAM_ADDR_SET, (x << 8) | (y + y_offset)); |
420 | 413 | ||
421 | lcd_write_cmd(R_WRITE_DATA_2_GRAM); | 414 | lcd_write_cmd(R_WRITE_DATA_2_GRAM); |