diff options
| author | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2007-09-29 20:56:07 +0000 |
|---|---|---|
| committer | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2007-09-29 20:56:07 +0000 |
| commit | f548336e271f970d7ccd8a84e85ce8590ff7deab (patch) | |
| tree | ca505478d72d93a2417731b8bb562c6da23576d2 /firmware | |
| parent | 18318d200e3f010dd70053b30f20f66c2eccf9fa (diff) | |
| download | rockbox-f548336e271f970d7ccd8a84e85ce8590ff7deab.zip rockbox-f548336e271f970d7ccd8a84e85ce8590ff7deab.tar.gz rockbox-f548336e271f970d7ccd8a84e85ce8590ff7deab.tar.bz2 rockbox-f548336e271f970d7ccd8a84e85ce8590ff7deab.tar.xz | |
Fix the LCD line remaining active after shutdown on grayscale ipods (FS#5199). Original patch by Tomasz Mon, modified by me.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14907 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
| -rw-r--r-- | firmware/export/config-ipod1g2g.h | 3 | ||||
| -rw-r--r-- | firmware/export/config-ipod3g.h | 3 | ||||
| -rw-r--r-- | firmware/export/config-ipod4g.h | 3 | ||||
| -rw-r--r-- | firmware/export/config-ipodmini.h | 3 | ||||
| -rw-r--r-- | firmware/export/config-ipodmini2g.h | 3 | ||||
| -rw-r--r-- | firmware/export/lcd.h | 4 | ||||
| -rw-r--r-- | firmware/powermgmt.c | 4 | ||||
| -rw-r--r-- | firmware/target/arm/ipod/lcd-gray.c | 9 |
8 files changed, 32 insertions, 0 deletions
diff --git a/firmware/export/config-ipod1g2g.h b/firmware/export/config-ipod1g2g.h index d51a743..138ef8d 100644 --- a/firmware/export/config-ipod1g2g.h +++ b/firmware/export/config-ipod1g2g.h @@ -17,6 +17,9 @@ /* define this if you can invert the colours on your LCD */ #define HAVE_LCD_INVERT +/* define this if the LCD needs to be shutdown */ +#define HAVE_LCD_SHUTDOWN + /* define this if you have access to the quickscreen */ #define HAVE_QUICKSCREEN /* define this if you have access to the pitchscreen */ diff --git a/firmware/export/config-ipod3g.h b/firmware/export/config-ipod3g.h index 6555aad..e3c2a92 100644 --- a/firmware/export/config-ipod3g.h +++ b/firmware/export/config-ipod3g.h @@ -17,6 +17,9 @@ /* define this if you can invert the colours on your LCD */ #define HAVE_LCD_INVERT +/* define this if the LCD needs to be shutdown */ +#define HAVE_LCD_SHUTDOWN + /* define this if you have access to the quickscreen */ #define HAVE_QUICKSCREEN /* define this if you have access to the pitchscreen */ diff --git a/firmware/export/config-ipod4g.h b/firmware/export/config-ipod4g.h index 28f7b8b..d75650b 100644 --- a/firmware/export/config-ipod4g.h +++ b/firmware/export/config-ipod4g.h @@ -27,6 +27,9 @@ /* define this if you can invert the colours on your LCD */ #define HAVE_LCD_INVERT +/* define this if the LCD needs to be shutdown */ +#define HAVE_LCD_SHUTDOWN + /* define this if you have access to the quickscreen */ #define HAVE_QUICKSCREEN /* define this if you have access to the pitchscreen */ diff --git a/firmware/export/config-ipodmini.h b/firmware/export/config-ipodmini.h index a7d8642..3b24737 100644 --- a/firmware/export/config-ipodmini.h +++ b/firmware/export/config-ipodmini.h @@ -17,6 +17,9 @@ /* define this if you can invert the colours on your LCD */ #define HAVE_LCD_INVERT +/* define this if the LCD needs to be shutdown */ +#define HAVE_LCD_SHUTDOWN + /* define this if you have access to the quickscreen */ #define HAVE_QUICKSCREEN /* define this if you have access to the pitchscreen */ diff --git a/firmware/export/config-ipodmini2g.h b/firmware/export/config-ipodmini2g.h index d8c5f9f..34e5f5a 100644 --- a/firmware/export/config-ipodmini2g.h +++ b/firmware/export/config-ipodmini2g.h @@ -17,6 +17,9 @@ /* define this if you can invert the colours on your LCD */ #define HAVE_LCD_INVERT +/* define this if the LCD needs to be shutdown */ +#define HAVE_LCD_SHUTDOWN + /* define this if you have access to the quickscreen */ #define HAVE_QUICKSCREEN /* define this if you have access to the pitchscreen */ diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index 2ea9906..eb67a12 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h @@ -288,6 +288,10 @@ extern bool lcd_enabled(void); extern void lcd_sleep(void); #endif /* HAVE_LCD_SLEEP */ +#ifdef HAVE_LCD_SHUTDOWN +void lcd_shutdown(void); +#endif + /* Bitmap formats */ enum { diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index 50a2579..bb88fce 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c @@ -1181,6 +1181,10 @@ void shutdown_hw(void) lcd_remote_set_contrast(0); #endif +#ifdef HAVE_LCD_SHUTDOWN + lcd_shutdown(); +#endif + /* Small delay to make sure all HW gets time to flush. Especially eeprom chips are quite slow and might be still writing the last byte. */ diff --git a/firmware/target/arm/ipod/lcd-gray.c b/firmware/target/arm/ipod/lcd-gray.c index 265cc44..707075b 100644 --- a/firmware/target/arm/ipod/lcd-gray.c +++ b/firmware/target/arm/ipod/lcd-gray.c @@ -368,3 +368,12 @@ void lcd_update(void) { lcd_update_rect(0, 0, LCD_WIDTH, LCD_HEIGHT); } + +#ifdef HAVE_LCD_SHUTDOWN +/* LCD powerdown */ +void lcd_shutdown(void) +{ + lcd_cmd_and_data(R_POWER_CONTROL, 0x1500); /* Turn off op amp power */ + lcd_cmd_and_data(R_POWER_CONTROL, 0x1502); /* Put LCD driver in standby */ +} +#endif |