From 24ca76ffec3e0d782f75ac1cca2c0b2c8b71f5db Mon Sep 17 00:00:00 2001 From: Barry Wardell Date: Sat, 9 Sep 2006 19:02:18 +0000 Subject: H10 fixes: Split LCD driver up into two drivers, one for each LCD type. Improvements to 20GB LCD driver - support for enable/disable, contrast adjustment, make the update code clearer and ~4% faster, support for flipping, support for invert. Fix CPU frequency for both models. Fix default battery capacity for 5/6GB. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10910 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/config-h10.h | 23 +++++++++++++++++++---- firmware/export/config-h10_5gb.h | 6 ++---- 2 files changed, 21 insertions(+), 8 deletions(-) (limited to 'firmware/export') diff --git a/firmware/export/config-h10.h b/firmware/export/config-h10.h index a316cbec3f..c024fd464c 100644 --- a/firmware/export/config-h10.h +++ b/firmware/export/config-h10.h @@ -26,7 +26,10 @@ #define LCD_WIDTH 160 #define LCD_HEIGHT 128 #define LCD_DEPTH 16 /* 65536 colours */ -#define LCD_PIXELFORMAT RGB565SWAPPED /* rgb565 byte-swapped */ +#define LCD_PIXELFORMAT RGB565 /* rgb565 */ + +/* define this if you can flip your LCD */ +#define HAVE_LCD_FLIP /* #define IRAM_LCDFRAMEBUFFER IDATA_ATTR *//* put the lcd frame buffer in IRAM */ @@ -93,13 +96,25 @@ #define ROM_START 0x00000000 /* Define this to the CPU frequency */ -/* TODO: this is probably wrong */ -#define CPU_FREQ 11289600 +#define CPU_FREQ 75000000 /* Type of LCD */ #define CONFIG_LCD LCD_H10_20GB -#define DEFAULT_CONTRAST_SETTING 19 +/* Define this if your LCD can set contrast */ +#define HAVE_LCD_CONTRAST + +#define MIN_CONTRAST_SETTING 0 +#define MAX_CONTRAST_SETTING 30 +#define DEFAULT_CONTRAST_SETTING 14 /* Match boot contrast */ + +/* Define this if your LCD can be enabled/disabled */ +#define HAVE_LCD_ENABLE + +/* Define this if your LCD can be put to sleep. HAVE_LCD_ENABLE + * should be defined as well. + * We can currently put the lcd to sleep but it won't wake up properly */ +/*#define HAVE_LCD_SLEEP*/ /* Offset ( in the firmware file's header ) to the file length */ #define FIRMWARE_OFFSET_FILE_LENGTH 0 diff --git a/firmware/export/config-h10_5gb.h b/firmware/export/config-h10_5gb.h index d3750c1a08..9ad7eede2e 100644 --- a/firmware/export/config-h10_5gb.h +++ b/firmware/export/config-h10_5gb.h @@ -63,7 +63,7 @@ #define CONFIG_BACKLIGHT BL_H10 /* TODO: figure this out, probably not necessary because of target tree stuff */ -#define BATTERY_CAPACITY_DEFAULT 700 /* default battery capacity */ +#define BATTERY_CAPACITY_DEFAULT 820 /* default battery capacity */ #ifndef SIMULATOR @@ -93,13 +93,11 @@ /* Define this to the CPU frequency */ /* TODO: this is probably wrong */ -#define CPU_FREQ 11289600 +#define CPU_FREQ 75000000 /* Type of LCD */ #define CONFIG_LCD LCD_H10_5GB -#define DEFAULT_CONTRAST_SETTING 19 - /* Offset ( in the firmware file's header ) to the file length */ #define FIRMWARE_OFFSET_FILE_LENGTH 0 -- cgit v1.2.3