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
This commit is contained in:
Nicolas Pennequin 2007-09-29 20:56:07 +00:00
parent 18318d200e
commit f548336e27
8 changed files with 32 additions and 0 deletions

View file

@ -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 */

View file

@ -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 */

View file

@ -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 */

View file

@ -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 */

View file

@ -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 */

View file

@ -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
{

View file

@ -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. */

View file

@ -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