forked from len0rd/rockbox
The iAudio X5 LCD is 18 bits
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8572 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
bead47c17a
commit
39ecd72bd5
2 changed files with 12 additions and 1 deletions
|
@ -17,7 +17,7 @@
|
|||
/* LCD dimensions */
|
||||
#define LCD_WIDTH 160
|
||||
#define LCD_HEIGHT 128
|
||||
#define LCD_DEPTH 16 /* 262.144 colors but we use 16bit for now */
|
||||
#define LCD_DEPTH 18 /* pseudo 262.144 colors */
|
||||
|
||||
/* remote LCD */
|
||||
#define LCD_REMOTE_WIDTH 128
|
||||
|
|
|
@ -40,6 +40,8 @@
|
|||
typedef unsigned char fb_data;
|
||||
#elif LCD_DEPTH <= 16
|
||||
typedef unsigned short fb_data;
|
||||
#else
|
||||
typedef unsigned long fb_data;
|
||||
#endif
|
||||
|
||||
/* common functions */
|
||||
|
@ -157,6 +159,13 @@ typedef void lcd_fastpixelfunc_type(fb_data *address);
|
|||
#else
|
||||
#define LCD_RGBPACK(r, g, b) _RGBPACK((r), (g), (b))
|
||||
#endif
|
||||
#elif LCD_DEPTH == 18
|
||||
#define LCD_MAX_RED 63
|
||||
#define LCD_MAX_GREEN 63
|
||||
#define LCD_MAX_BLUE 63
|
||||
#define LCD_RGBPACK(r, g, b) ( ((((r) * 63 + 127) / 255) << 12) \
|
||||
|((((g) * 63 + 127) / 255) << 6) \
|
||||
| (((b) * 63 + 127) / 255))
|
||||
#else
|
||||
/* other colour depths */
|
||||
#endif
|
||||
|
@ -187,6 +196,8 @@ extern fb_data lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH];
|
|||
extern fb_data lcd_framebuffer[LCD_HEIGHT/4][LCD_WIDTH];
|
||||
#elif LCD_DEPTH == 16
|
||||
extern fb_data lcd_framebuffer[LCD_HEIGHT][LCD_WIDTH];
|
||||
#elif LCD_DEPTH == 18
|
||||
extern fb_data lcd_framebuffer[LCD_HEIGHT][LCD_WIDTH];
|
||||
#endif
|
||||
|
||||
#if CONFIG_BACKLIGHT==BL_IRIVER_H300
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue