diff options
| author | Linus Nielsen Feltzing <linus@haxx.se> | 2005-11-19 01:09:38 +0000 |
|---|---|---|
| committer | Linus Nielsen Feltzing <linus@haxx.se> | 2005-11-19 01:09:38 +0000 |
| commit | b4984492ef6fe8fc5694352b9f8a709463adb0c2 (patch) | |
| tree | b0c9eaa2ff2bae11a5fe694bc976b52e737a074d | |
| parent | cff2a77a0fcaacd73803fd1a63ef6c644ea826fd (diff) | |
| download | rockbox-b4984492ef6fe8fc5694352b9f8a709463adb0c2.zip rockbox-b4984492ef6fe8fc5694352b9f8a709463adb0c2.tar.gz rockbox-b4984492ef6fe8fc5694352b9f8a709463adb0c2.tar.bz2 rockbox-b4984492ef6fe8fc5694352b9f8a709463adb0c2.tar.xz | |
H300: remote backlight on GPO33
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7973 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | firmware/drivers/button.c | 4 | ||||
| -rw-r--r-- | firmware/drivers/lcd-h100-remote.c | 20 |
2 files changed, 21 insertions, 3 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c index 7537cb5..56bfaed 100644 --- a/firmware/drivers/button.c +++ b/firmware/drivers/button.c @@ -210,13 +210,13 @@ void button_init(void) #if CONFIG_KEYPAD == IRIVER_H100_PAD /* Set GPIO33, GPIO37, GPIO38 and GPIO52 as general purpose inputs */ GPIO1_FUNCTION |= 0x00100062; - GPIO1_ENABLE &= ~0x00100062; + GPIO1_ENABLE &= ~0x00100060; #elif CONFIG_KEYPAD == IRIVER_H300_PAD /* Set GPIO9 and GPIO15 as general purpose inputs */ GPIO_ENABLE &= ~0x00008200; GPIO_FUNCTION |= 0x00008200; /* Set GPIO33, GPIO37, GPIO38 and GPIO52 as general purpose inputs */ - GPIO1_ENABLE &= ~0x00100062; + GPIO1_ENABLE &= ~0x00100060; GPIO1_FUNCTION |= 0x00100062; #elif CONFIG_KEYPAD == RECORDER_PAD /* Set PB4 and PB8 as input pins */ diff --git a/firmware/drivers/lcd-h100-remote.c b/firmware/drivers/lcd-h100-remote.c index 7ca3404..aaf8a1e 100644 --- a/firmware/drivers/lcd-h100-remote.c +++ b/firmware/drivers/lcd-h100-remote.c @@ -111,12 +111,20 @@ static const char scroll_tick_table[16] = { #ifndef SIMULATOR void lcd_remote_backlight_on(void) { +#ifdef IRIVER_H300_SERIES + and_l(~0x00000002, &GPIO1_OUT); +#else and_l(~0x00000800, &GPIO_OUT); +#endif } void lcd_remote_backlight_off(void) { +#ifdef IRIVER_H300_SERIES + or_l(0x00000002, &GPIO1_OUT); +#else or_l(0x00000800, &GPIO_OUT); +#endif } void lcd_remote_write_command(int cmd) @@ -484,6 +492,16 @@ void lcd_remote_init(void) /* Initialise ports and kick off monitor */ void lcd_remote_init(void) { +#ifdef IRIVER_H300_SERIES + or_l(0x10010000, &GPIO_FUNCTION); /* GPIO16: RS + GPIO28: CLK */ + + or_l(0x00040006, &GPIO1_FUNCTION); /* GPO33: Backlight + GPIO34: CS + GPIO50: Data */ + or_l(0x10010000, &GPIO_ENABLE); + or_l(0x00040006, &GPIO1_ENABLE); +#else or_l(0x10010800, &GPIO_FUNCTION); /* GPIO11: Backlight GPIO16: RS GPIO28: CLK */ @@ -492,7 +510,7 @@ void lcd_remote_init(void) GPIO50: Data */ or_l(0x10010800, &GPIO_ENABLE); or_l(0x00040004, &GPIO1_ENABLE); - +#endif lcd_remote_clear_display(); tick_add_task(remote_tick); |