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 | |
parent | 18318d200e3f010dd70053b30f20f66c2eccf9fa (diff) | |
download | rockbox-f548336e271f970d7ccd8a84e85ce8590ff7deab.tar.gz rockbox-f548336e271f970d7ccd8a84e85ce8590ff7deab.zip |
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
-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 d51a7437ec..138ef8dc77 100644 --- a/firmware/export/config-ipod1g2g.h +++ b/firmware/export/config-ipod1g2g.h | |||
@@ -17,6 +17,9 @@ | |||
17 | /* define this if you can invert the colours on your LCD */ | 17 | /* define this if you can invert the colours on your LCD */ |
18 | #define HAVE_LCD_INVERT | 18 | #define HAVE_LCD_INVERT |
19 | 19 | ||
20 | /* define this if the LCD needs to be shutdown */ | ||
21 | #define HAVE_LCD_SHUTDOWN | ||
22 | |||
20 | /* define this if you have access to the quickscreen */ | 23 | /* define this if you have access to the quickscreen */ |
21 | #define HAVE_QUICKSCREEN | 24 | #define HAVE_QUICKSCREEN |
22 | /* define this if you have access to the pitchscreen */ | 25 | /* define this if you have access to the pitchscreen */ |
diff --git a/firmware/export/config-ipod3g.h b/firmware/export/config-ipod3g.h index 6555aad9db..e3c2a922d9 100644 --- a/firmware/export/config-ipod3g.h +++ b/firmware/export/config-ipod3g.h | |||
@@ -17,6 +17,9 @@ | |||
17 | /* define this if you can invert the colours on your LCD */ | 17 | /* define this if you can invert the colours on your LCD */ |
18 | #define HAVE_LCD_INVERT | 18 | #define HAVE_LCD_INVERT |
19 | 19 | ||
20 | /* define this if the LCD needs to be shutdown */ | ||
21 | #define HAVE_LCD_SHUTDOWN | ||
22 | |||
20 | /* define this if you have access to the quickscreen */ | 23 | /* define this if you have access to the quickscreen */ |
21 | #define HAVE_QUICKSCREEN | 24 | #define HAVE_QUICKSCREEN |
22 | /* define this if you have access to the pitchscreen */ | 25 | /* define this if you have access to the pitchscreen */ |
diff --git a/firmware/export/config-ipod4g.h b/firmware/export/config-ipod4g.h index 28f7b8b5a9..d75650ba4f 100644 --- a/firmware/export/config-ipod4g.h +++ b/firmware/export/config-ipod4g.h | |||
@@ -27,6 +27,9 @@ | |||
27 | /* define this if you can invert the colours on your LCD */ | 27 | /* define this if you can invert the colours on your LCD */ |
28 | #define HAVE_LCD_INVERT | 28 | #define HAVE_LCD_INVERT |
29 | 29 | ||
30 | /* define this if the LCD needs to be shutdown */ | ||
31 | #define HAVE_LCD_SHUTDOWN | ||
32 | |||
30 | /* define this if you have access to the quickscreen */ | 33 | /* define this if you have access to the quickscreen */ |
31 | #define HAVE_QUICKSCREEN | 34 | #define HAVE_QUICKSCREEN |
32 | /* define this if you have access to the pitchscreen */ | 35 | /* define this if you have access to the pitchscreen */ |
diff --git a/firmware/export/config-ipodmini.h b/firmware/export/config-ipodmini.h index a7d86427b3..3b2473718d 100644 --- a/firmware/export/config-ipodmini.h +++ b/firmware/export/config-ipodmini.h | |||
@@ -17,6 +17,9 @@ | |||
17 | /* define this if you can invert the colours on your LCD */ | 17 | /* define this if you can invert the colours on your LCD */ |
18 | #define HAVE_LCD_INVERT | 18 | #define HAVE_LCD_INVERT |
19 | 19 | ||
20 | /* define this if the LCD needs to be shutdown */ | ||
21 | #define HAVE_LCD_SHUTDOWN | ||
22 | |||
20 | /* define this if you have access to the quickscreen */ | 23 | /* define this if you have access to the quickscreen */ |
21 | #define HAVE_QUICKSCREEN | 24 | #define HAVE_QUICKSCREEN |
22 | /* define this if you have access to the pitchscreen */ | 25 | /* define this if you have access to the pitchscreen */ |
diff --git a/firmware/export/config-ipodmini2g.h b/firmware/export/config-ipodmini2g.h index d8c5f9f755..34e5f5a46b 100644 --- a/firmware/export/config-ipodmini2g.h +++ b/firmware/export/config-ipodmini2g.h | |||
@@ -17,6 +17,9 @@ | |||
17 | /* define this if you can invert the colours on your LCD */ | 17 | /* define this if you can invert the colours on your LCD */ |
18 | #define HAVE_LCD_INVERT | 18 | #define HAVE_LCD_INVERT |
19 | 19 | ||
20 | /* define this if the LCD needs to be shutdown */ | ||
21 | #define HAVE_LCD_SHUTDOWN | ||
22 | |||
20 | /* define this if you have access to the quickscreen */ | 23 | /* define this if you have access to the quickscreen */ |
21 | #define HAVE_QUICKSCREEN | 24 | #define HAVE_QUICKSCREEN |
22 | /* define this if you have access to the pitchscreen */ | 25 | /* define this if you have access to the pitchscreen */ |
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index 2ea9906a2a..eb67a12211 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h | |||
@@ -288,6 +288,10 @@ extern bool lcd_enabled(void); | |||
288 | extern void lcd_sleep(void); | 288 | extern void lcd_sleep(void); |
289 | #endif /* HAVE_LCD_SLEEP */ | 289 | #endif /* HAVE_LCD_SLEEP */ |
290 | 290 | ||
291 | #ifdef HAVE_LCD_SHUTDOWN | ||
292 | void lcd_shutdown(void); | ||
293 | #endif | ||
294 | |||
291 | /* Bitmap formats */ | 295 | /* Bitmap formats */ |
292 | enum | 296 | enum |
293 | { | 297 | { |
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index 50a2579cb5..bb88fce318 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c | |||
@@ -1181,6 +1181,10 @@ void shutdown_hw(void) | |||
1181 | lcd_remote_set_contrast(0); | 1181 | lcd_remote_set_contrast(0); |
1182 | #endif | 1182 | #endif |
1183 | 1183 | ||
1184 | #ifdef HAVE_LCD_SHUTDOWN | ||
1185 | lcd_shutdown(); | ||
1186 | #endif | ||
1187 | |||
1184 | /* Small delay to make sure all HW gets time to flush. Especially | 1188 | /* Small delay to make sure all HW gets time to flush. Especially |
1185 | eeprom chips are quite slow and might be still writing the last | 1189 | eeprom chips are quite slow and might be still writing the last |
1186 | byte. */ | 1190 | byte. */ |
diff --git a/firmware/target/arm/ipod/lcd-gray.c b/firmware/target/arm/ipod/lcd-gray.c index 265cc447d7..707075b701 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) | |||
368 | { | 368 | { |
369 | lcd_update_rect(0, 0, LCD_WIDTH, LCD_HEIGHT); | 369 | lcd_update_rect(0, 0, LCD_WIDTH, LCD_HEIGHT); |
370 | } | 370 | } |
371 | |||
372 | #ifdef HAVE_LCD_SHUTDOWN | ||
373 | /* LCD powerdown */ | ||
374 | void lcd_shutdown(void) | ||
375 | { | ||
376 | lcd_cmd_and_data(R_POWER_CONTROL, 0x1500); /* Turn off op amp power */ | ||
377 | lcd_cmd_and_data(R_POWER_CONTROL, 0x1502); /* Put LCD driver in standby */ | ||
378 | } | ||
379 | #endif | ||