diff options
| author | Dave Chapman <dave@dchapman.com> | 2005-11-19 02:06:46 +0000 |
|---|---|---|
| committer | Dave Chapman <dave@dchapman.com> | 2005-11-19 02:06:46 +0000 |
| commit | 260f8d3480d5c9ae2f8973050dd4c383baeda687 (patch) | |
| tree | ee35007e0a45ea31b5eb80e68c9e1df03123f590 | |
| parent | bbe919bdcb1f0f4339c46c0f5f405bf1378b9408 (diff) | |
| download | rockbox-260f8d3480d5c9ae2f8973050dd4c383baeda687.zip rockbox-260f8d3480d5c9ae2f8973050dd4c383baeda687.tar.gz rockbox-260f8d3480d5c9ae2f8973050dd4c383baeda687.tar.bz2 rockbox-260f8d3480d5c9ae2f8973050dd4c383baeda687.tar.xz | |
Add LCD_PIXELFORMAT config variable to distinguish between the two types of 16-bit framebuffers (the ipod framebuffer is byte-swapped)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7977 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | firmware/export/config-h300.h | 1 | ||||
| -rw-r--r-- | firmware/export/config-ipodcolor.h | 6 | ||||
| -rw-r--r-- | firmware/export/config-ipodnano.h | 6 | ||||
| -rw-r--r-- | firmware/export/config.h | 4 | ||||
| -rw-r--r-- | firmware/export/lcd.h | 2 |
5 files changed, 18 insertions, 1 deletions
diff --git a/firmware/export/config-h300.h b/firmware/export/config-h300.h index a3d07a6..256cdea 100644 --- a/firmware/export/config-h300.h +++ b/firmware/export/config-h300.h @@ -19,6 +19,7 @@ #define LCD_WIDTH 220 #define LCD_HEIGHT 176 #define LCD_DEPTH 16 /* 65k colours */ +#define LCD_PIXELFORMAT RGB565 /* rgb565 */ /* remote LCD */ #define LCD_REMOTE_WIDTH 128 diff --git a/firmware/export/config-ipodcolor.h b/firmware/export/config-ipodcolor.h index 6666ab2..dfce0e7 100644 --- a/firmware/export/config-ipodcolor.h +++ b/firmware/export/config-ipodcolor.h @@ -1,3 +1,8 @@ +/* + * This config file is for the Apple iPod Color/Photo + */ +#define APPLE_IPODCOLOR 1 + /* For Rolo and boot loader */ #define MODEL_NUMBER 3 @@ -14,6 +19,7 @@ #define LCD_WIDTH 220 #define LCD_HEIGHT 176 #define LCD_DEPTH 16 /* 65536 colours */ +#define LCD_PIXELFORMAT RGB565SWAPPED /* rgb565 byte-swapped */ #define CONFIG_KEYPAD IPOD_4G_PAD diff --git a/firmware/export/config-ipodnano.h b/firmware/export/config-ipodnano.h index 111aec2..c8ea590 100644 --- a/firmware/export/config-ipodnano.h +++ b/firmware/export/config-ipodnano.h @@ -1,3 +1,8 @@ +/* + * This config file is for the Apple iPod Nano + */ +#define APPLE_IPODNANO 1 + /* For Rolo and boot loader */ #define MODEL_NUMBER 4 @@ -14,6 +19,7 @@ #define LCD_WIDTH 176 #define LCD_HEIGHT 132 #define LCD_DEPTH 16 /* 65536 colours */ +#define LCD_PIXELFORMAT RGB565SWAPPED /* rgb565 byte-swapped */ #define CONFIG_KEYPAD IPOD_NANO_PAD diff --git a/firmware/export/config.h b/firmware/export/config.h index ea047cb..9764afd 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h @@ -76,6 +76,10 @@ #define LCD_IPODCOLOR 6 /* as used by iPod Color/Photo */ #define LCD_IPODNANO 7 /* as used by iPod Nano */ +/* LCD_PIXELFORMAT */ +#define RGB565 565 +#define RGB565SWAPPED 3553 + /* CONFIG_BACKLIGHT */ #define BL_PA14_LO 0 /* Player, PA14 low active */ #define BL_RTC 1 /* Recorder, RTC square wave output */ diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index 48244fe..bd9c49f 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h @@ -146,7 +146,7 @@ typedef void lcd_blockfunc_type(unsigned char *address, unsigned mask, unsigned #define _RGBPACK(r, g, b) ( ((((r) * 31 + 127) / 255) << 11) \ |((((g) * 63 + 127) / 255) << 5) \ | (((b) * 31 + 127) / 255)) -#if (CONFIG_LCD == LCD_IPODCOLOR) || (CONFIG_LCD == LCD_IPODNANO) +#if (LCD_PIXELFORMAT == RGB565SWAPPED) #define LCD_RGBPACK(r, g, b) ( ((_RGBPACK((r), (g), (b)) & 0xff00) >> 8) \ |((_RGBPACK((r), (g), (b)) & 0x00ff) << 8)) #else |