diff options
-rw-r--r-- | firmware/export/config/ipodnano1g.h | 3 | ||||
-rw-r--r-- | firmware/target/arm/ipod/lcd-color_nano.c | 11 |
2 files changed, 12 insertions, 2 deletions
diff --git a/firmware/export/config/ipodnano1g.h b/firmware/export/config/ipodnano1g.h index e321d070cb..9dba533744 100644 --- a/firmware/export/config/ipodnano1g.h +++ b/firmware/export/config/ipodnano1g.h | |||
@@ -58,6 +58,9 @@ | |||
58 | #define LCD_DEPTH 16 /* 65536 colours */ | 58 | #define LCD_DEPTH 16 /* 65536 colours */ |
59 | #define LCD_PIXELFORMAT RGB565SWAPPED /* rgb565 byte-swapped */ | 59 | #define LCD_PIXELFORMAT RGB565SWAPPED /* rgb565 byte-swapped */ |
60 | 60 | ||
61 | /* define this if you can invert the colours on your LCD */ | ||
62 | #define HAVE_LCD_INVERT | ||
63 | |||
61 | /* Define this if the LCD can shut down */ | 64 | /* Define this if the LCD can shut down */ |
62 | #define HAVE_LCD_SHUTDOWN | 65 | #define HAVE_LCD_SHUTDOWN |
63 | 66 | ||
diff --git a/firmware/target/arm/ipod/lcd-color_nano.c b/firmware/target/arm/ipod/lcd-color_nano.c index d7e3beb197..589e8654ae 100644 --- a/firmware/target/arm/ipod/lcd-color_nano.c +++ b/firmware/target/arm/ipod/lcd-color_nano.c | |||
@@ -66,24 +66,31 @@ static void lcd_cmd_data(unsigned cmd, unsigned data) | |||
66 | 66 | ||
67 | /*** hardware configuration ***/ | 67 | /*** hardware configuration ***/ |
68 | 68 | ||
69 | #ifdef HAVE_LCD_CONTRAST | ||
69 | void lcd_set_contrast(int val) | 70 | void lcd_set_contrast(int val) |
70 | { | 71 | { |
71 | /* TODO: Implement lcd_set_contrast() */ | 72 | /* TODO: Implement lcd_set_contrast() */ |
72 | (void)val; | 73 | (void)val; |
73 | } | 74 | } |
75 | #endif | ||
74 | 76 | ||
77 | #ifdef HAVE_LCD_INVERT | ||
75 | void lcd_set_invert_display(bool yesno) | 78 | void lcd_set_invert_display(bool yesno) |
76 | { | 79 | { |
77 | /* TODO: Implement lcd_set_invert_display() */ | 80 | #ifdef IPOD_NANO /* this has only been tested on the ipod nano */ |
78 | (void)yesno; | 81 | lcd_cmd_data(0x07, 0x73 | (yesno ? 0 : (1<<2))); |
82 | #endif | ||
79 | } | 83 | } |
84 | #endif | ||
80 | 85 | ||
86 | #ifdef HAVE_LCD_FLIP | ||
81 | /* turn the display upside down (call lcd_update() afterwards) */ | 87 | /* turn the display upside down (call lcd_update() afterwards) */ |
82 | void lcd_set_flip(bool yesno) | 88 | void lcd_set_flip(bool yesno) |
83 | { | 89 | { |
84 | /* TODO: Implement lcd_set_flip() */ | 90 | /* TODO: Implement lcd_set_flip() */ |
85 | (void)yesno; | 91 | (void)yesno; |
86 | } | 92 | } |
93 | #endif | ||
87 | 94 | ||
88 | /* LCD init */ | 95 | /* LCD init */ |
89 | void lcd_init_device(void) | 96 | void lcd_init_device(void) |