ipod nano 1g: enable LCD invert

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30182 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Bertrik Sikken 2011-07-20 22:05:16 +00:00
parent 1f72825444
commit 2f620b8af3
2 changed files with 12 additions and 2 deletions

View file

@ -58,6 +58,9 @@
#define LCD_DEPTH 16 /* 65536 colours */ #define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565SWAPPED /* rgb565 byte-swapped */ #define LCD_PIXELFORMAT RGB565SWAPPED /* rgb565 byte-swapped */
/* define this if you can invert the colours on your LCD */
#define HAVE_LCD_INVERT
/* Define this if the LCD can shut down */ /* Define this if the LCD can shut down */
#define HAVE_LCD_SHUTDOWN #define HAVE_LCD_SHUTDOWN

View file

@ -66,24 +66,31 @@ static void lcd_cmd_data(unsigned cmd, unsigned data)
/*** hardware configuration ***/ /*** hardware configuration ***/
#ifdef HAVE_LCD_CONTRAST
void lcd_set_contrast(int val) void lcd_set_contrast(int val)
{ {
/* TODO: Implement lcd_set_contrast() */ /* TODO: Implement lcd_set_contrast() */
(void)val; (void)val;
} }
#endif
#ifdef HAVE_LCD_INVERT
void lcd_set_invert_display(bool yesno) void lcd_set_invert_display(bool yesno)
{ {
/* TODO: Implement lcd_set_invert_display() */ #ifdef IPOD_NANO /* this has only been tested on the ipod nano */
(void)yesno; lcd_cmd_data(0x07, 0x73 | (yesno ? 0 : (1<<2)));
#endif
} }
#endif
#ifdef HAVE_LCD_FLIP
/* turn the display upside down (call lcd_update() afterwards) */ /* turn the display upside down (call lcd_update() afterwards) */
void lcd_set_flip(bool yesno) void lcd_set_flip(bool yesno)
{ {
/* TODO: Implement lcd_set_flip() */ /* TODO: Implement lcd_set_flip() */
(void)yesno; (void)yesno;
} }
#endif
/* LCD init */ /* LCD init */
void lcd_init_device(void) void lcd_init_device(void)