summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/export/config-iaudiox5.h2
-rw-r--r--firmware/export/lcd.h11
2 files changed, 12 insertions, 1 deletions
diff --git a/firmware/export/config-iaudiox5.h b/firmware/export/config-iaudiox5.h
index 246b00c963..4f0d183f6c 100644
--- a/firmware/export/config-iaudiox5.h
+++ b/firmware/export/config-iaudiox5.h
@@ -17,7 +17,7 @@
17/* LCD dimensions */ 17/* LCD dimensions */
18#define LCD_WIDTH 160 18#define LCD_WIDTH 160
19#define LCD_HEIGHT 128 19#define LCD_HEIGHT 128
20#define LCD_DEPTH 16 /* 262.144 colors but we use 16bit for now */ 20#define LCD_DEPTH 18 /* pseudo 262.144 colors */
21 21
22/* remote LCD */ 22/* remote LCD */
23#define LCD_REMOTE_WIDTH 128 23#define LCD_REMOTE_WIDTH 128
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h
index 6375031594..08f5f694b9 100644
--- a/firmware/export/lcd.h
+++ b/firmware/export/lcd.h
@@ -40,6 +40,8 @@
40typedef unsigned char fb_data; 40typedef unsigned char fb_data;
41#elif LCD_DEPTH <= 16 41#elif LCD_DEPTH <= 16
42typedef unsigned short fb_data; 42typedef unsigned short fb_data;
43#else
44typedef unsigned long fb_data;
43#endif 45#endif
44 46
45/* common functions */ 47/* common functions */
@@ -157,6 +159,13 @@ typedef void lcd_fastpixelfunc_type(fb_data *address);
157#else 159#else
158#define LCD_RGBPACK(r, g, b) _RGBPACK((r), (g), (b)) 160#define LCD_RGBPACK(r, g, b) _RGBPACK((r), (g), (b))
159#endif 161#endif
162#elif LCD_DEPTH == 18
163#define LCD_MAX_RED 63
164#define LCD_MAX_GREEN 63
165#define LCD_MAX_BLUE 63
166#define LCD_RGBPACK(r, g, b) ( ((((r) * 63 + 127) / 255) << 12) \
167 |((((g) * 63 + 127) / 255) << 6) \
168 | (((b) * 63 + 127) / 255))
160#else 169#else
161/* other colour depths */ 170/* other colour depths */
162#endif 171#endif
@@ -187,6 +196,8 @@ extern fb_data lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH];
187extern fb_data lcd_framebuffer[LCD_HEIGHT/4][LCD_WIDTH]; 196extern fb_data lcd_framebuffer[LCD_HEIGHT/4][LCD_WIDTH];
188#elif LCD_DEPTH == 16 197#elif LCD_DEPTH == 16
189extern fb_data lcd_framebuffer[LCD_HEIGHT][LCD_WIDTH]; 198extern fb_data lcd_framebuffer[LCD_HEIGHT][LCD_WIDTH];
199#elif LCD_DEPTH == 18
200extern fb_data lcd_framebuffer[LCD_HEIGHT][LCD_WIDTH];
190#endif 201#endif
191 202
192#if CONFIG_BACKLIGHT==BL_IRIVER_H300 203#if CONFIG_BACKLIGHT==BL_IRIVER_H300