diff options
author | Jens Arnold <amiconn@rockbox.org> | 2008-03-13 19:36:58 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2008-03-13 19:36:58 +0000 |
commit | 3c561f2cf999b2d805084aabeb4d5feac6fa3893 (patch) | |
tree | 71c4d1eabf3124719b539780b7bac94800e214cc /firmware/target/coldfire/iriver | |
parent | bf3c96c50267ef26a2155502b4841e0074cd12a8 (diff) | |
download | rockbox-3c561f2cf999b2d805084aabeb4d5feac6fa3893.tar.gz rockbox-3c561f2cf999b2d805084aabeb4d5feac6fa3893.zip |
Make the LCD remote work in the Iriver H1x0 and H300 bootloaders as well (untested). * Only try the initial remote LCD init if the remote is plugged, and do it in main builds as well, giving slightly earlier remote LCD output when booting. * Fix delays in the X5/M5 remote LCD init. * Remove an unnecessary check in the X5/M5 remote LCD driver and the M3 LCD driver.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16655 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/coldfire/iriver')
-rw-r--r-- | firmware/target/coldfire/iriver/lcd-remote-iriver.c | 58 |
1 files changed, 32 insertions, 26 deletions
diff --git a/firmware/target/coldfire/iriver/lcd-remote-iriver.c b/firmware/target/coldfire/iriver/lcd-remote-iriver.c index 29dbfad3db..cab7cc4104 100644 --- a/firmware/target/coldfire/iriver/lcd-remote-iriver.c +++ b/firmware/target/coldfire/iriver/lcd-remote-iriver.c @@ -72,7 +72,6 @@ static bool cached_invert = false; static bool cached_flip = false; static int cached_contrast = DEFAULT_REMOTE_CONTRAST_SETTING; -static void remote_tick(void); #ifdef HAVE_REMOTE_LCD_TICKING static inline void _byte_delay(int delay) @@ -414,31 +413,6 @@ int remote_type(void) return _remote_type; } -void lcd_remote_init_device(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 */ - - or_l(0x00040004, &GPIO1_FUNCTION); /* GPIO34: CS - GPIO50: Data */ - or_l(0x10010800, &GPIO_ENABLE); - or_l(0x00040004, &GPIO1_ENABLE); -#endif - lcd_remote_clear_display(); - tick_add_task(remote_tick); -} - void lcd_remote_on(void) { CS_HI; @@ -475,6 +449,7 @@ void lcd_remote_off(void) CS_HI; } +#ifndef BOOTLOADER /* Monitor remote hotswap */ static void remote_tick(void) { @@ -549,6 +524,37 @@ static void remote_tick(void) if (cs_countdown == 0) CS_HI; } +#endif + +void lcd_remote_init_device(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 */ + + or_l(0x00040004, &GPIO1_FUNCTION); /* GPIO34: CS + GPIO50: Data */ + or_l(0x10010800, &GPIO_ENABLE); + or_l(0x00040004, &GPIO1_ENABLE); +#endif + + lcd_remote_clear_display(); + if (remote_detect()) + lcd_remote_on(); +#ifndef BOOTLOADER + tick_add_task(remote_tick); +#endif +} /* Update the display. This must be called after all other LCD functions that change the display. */ |