From 8aeed2d32e4312da426a1ba16f975923adc3cfbe Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Fri, 12 Oct 2007 00:28:57 +0000 Subject: PP LCD drivers: * Optimised and cleaned up PP colour LCD drivers. Immeasurable speedup on iPod Color, huge speedup on small H10 (a factor of 3). Should be a bit faster on big H10 too. * Big H10 changed bitmap format, so needs reconfiguring + full rebuild. * Better register naming for the mono LCD bridge. Register names for the colour LCD bridge. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15082 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/config-h10.h | 2 +- firmware/export/pp5002.h | 10 ++++++---- firmware/export/pp5020.h | 25 +++++++++++++++++++++---- 3 files changed, 28 insertions(+), 9 deletions(-) (limited to 'firmware/export') diff --git a/firmware/export/config-h10.h b/firmware/export/config-h10.h index 93ec226c50..8054152c77 100644 --- a/firmware/export/config-h10.h +++ b/firmware/export/config-h10.h @@ -39,7 +39,7 @@ #define LCD_WIDTH 160 #define LCD_HEIGHT 128 #define LCD_DEPTH 16 /* 65536 colours */ -#define LCD_PIXELFORMAT RGB565 /* rgb565 */ +#define LCD_PIXELFORMAT RGB565SWAPPED /* rgb565 byte-swapped */ /* Define this if your LCD can be enabled/disabled */ #define HAVE_LCD_ENABLE diff --git a/firmware/export/pp5002.h b/firmware/export/pp5002.h index c4baa7cfd3..b2e02f6174 100644 --- a/firmware/export/pp5002.h +++ b/firmware/export/pp5002.h @@ -23,11 +23,13 @@ #define DRAM_START 0x28000000 /* LCD bridge */ -#define LCD1_BASE (*(volatile unsigned long *)(0xc0001000)) -#define LCD1_CMD (*(volatile unsigned long *)(0xc0001008)) -#define LCD1_DATA (*(volatile unsigned long *)(0xc0001010)) +#define LCD1_BASE 0xc0001000 -#define LCD1_BUSY_MASK 0x8000 +#define LCD1_CONTROL (*(volatile unsigned long *)(0xc0001000)) +#define LCD1_CMD (*(volatile unsigned long *)(0xc0001008)) +#define LCD1_DATA (*(volatile unsigned long *)(0xc0001010)) + +#define LCD1_BUSY_MASK 0x8000 /* I2S controller */ #define IISCONFIG (*(volatile unsigned long *)(0xc0002500)) diff --git a/firmware/export/pp5020.h b/firmware/export/pp5020.h index 2c939300ab..5654a7de63 100644 --- a/firmware/export/pp5020.h +++ b/firmware/export/pp5020.h @@ -407,16 +407,33 @@ /* Note: didn't bother to see of levels 0 and 16 actually work */ /* First ("mono") LCD bridge */ -#define LCD1_BASE (*(volatile unsigned long *)(0x70003000)) -#define LCD1_CMD (*(volatile unsigned long *)(0x70003008)) -#define LCD1_DATA (*(volatile unsigned long *)(0x70003010)) +#define LCD1_BASE 0x70003000 -#define LCD1_BUSY_MASK 0x8000 +#define LCD1_CONTROL (*(volatile unsigned long *)(0x70003000)) +#define LCD1_CMD (*(volatile unsigned long *)(0x70003008)) +#define LCD1_DATA (*(volatile unsigned long *)(0x70003010)) + +#define LCD1_BUSY_MASK 0x8000 /* Serial Controller */ #define SERIAL0 (*(volatile unsigned long*)(0x70006000)) #define SERIAL1 (*(volatile unsigned long*)(0x70006040)) +/* Second ("color") LCD bridge */ +#define LCD2_BASE 0x70008a00 + +#define LCD2_PORT (*(volatile unsigned long*)(0x70008a0c)) +#define LCD2_BLOCK_CTRL (*(volatile unsigned long*)(0x70008a20)) +#define LCD2_BLOCK_CONFIG (*(volatile unsigned long*)(0x70008a24)) +#define LCD2_BLOCK_DATA (*(volatile unsigned long*)(0x70008b00)) + +#define LCD2_BUSY_MASK 0x80000000 +#define LCD2_CMD_MASK 0x80000000 +#define LCD2_DATA_MASK 0x81000000 + +#define LCD2_BLOCK_READY 0x04000000 +#define LCD2_BLOCK_TXOK 0x01000000 + /* I2C */ #define I2C_BASE 0x7000c000 -- cgit v1.2.3