diff options
author | Bertrik Sikken <bertrik@sikken.nl> | 2011-10-29 17:08:05 +0000 |
---|---|---|
committer | Bertrik Sikken <bertrik@sikken.nl> | 2011-10-29 17:08:05 +0000 |
commit | e90f961593e92fa5d98efa67b569e7efe5f4fbe0 (patch) | |
tree | 70f01d2ac811ba161c22903824590d2690850efd /firmware/target/arm/as3525/sansa-clipzip/lcd-clipzip.c | |
parent | a8cde851fbcefdd33d826cf4b1f0daa8c0b48dc2 (diff) | |
download | rockbox-e90f961593e92fa5d98efa67b569e7efe5f4fbe0.tar.gz rockbox-e90f961593e92fa5d98efa67b569e7efe5f4fbe0.zip |
Sansa clip zip: update mkamsboot and fix various drivers to make it boot to the main firmware
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30853 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/as3525/sansa-clipzip/lcd-clipzip.c')
-rw-r--r-- | firmware/target/arm/as3525/sansa-clipzip/lcd-clipzip.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/firmware/target/arm/as3525/sansa-clipzip/lcd-clipzip.c b/firmware/target/arm/as3525/sansa-clipzip/lcd-clipzip.c index 899eb538ea..0ae049b6ff 100644 --- a/firmware/target/arm/as3525/sansa-clipzip/lcd-clipzip.c +++ b/firmware/target/arm/as3525/sansa-clipzip/lcd-clipzip.c | |||
@@ -51,12 +51,16 @@ static int lcd_hw_init(void) | |||
51 | SSP_IMSC &= ~0xF; /* disable interrupts */ | 51 | SSP_IMSC &= ~0xF; /* disable interrupts */ |
52 | SSP_DMACR &= ~0x3; /* disable DMA */ | 52 | SSP_DMACR &= ~0x3; /* disable DMA */ |
53 | 53 | ||
54 | /* GPIO A3 is ??? but needs to be set */ | ||
55 | GPIOA_DIR |= (1 << 3); | ||
56 | GPIOA_PIN(3) = (1 << 3); | ||
57 | |||
54 | /* configure GPIO B2 (lcd D/C#) as output */ | 58 | /* configure GPIO B2 (lcd D/C#) as output */ |
55 | GPIOB_DIR |= (1<<2); | 59 | GPIOB_DIR |= (1<<2); |
56 | 60 | ||
57 | /* configure GPIO B3 (lcd type detect) as input */ | 61 | /* configure GPIO B3 (lcd type detect) as input */ |
58 | GPIOB_DIR &= ~(1<<3); | 62 | GPIOB_DIR &= ~(1<<3); |
59 | 63 | ||
60 | /* configure GPIO A5 (lcd reset#) as output and perform lcd reset */ | 64 | /* configure GPIO A5 (lcd reset#) as output and perform lcd reset */ |
61 | GPIOA_DIR |= (1 << 5); | 65 | GPIOA_DIR |= (1 << 5); |
62 | GPIOA_PIN(5) = 0; | 66 | GPIOA_PIN(5) = 0; |
@@ -154,7 +158,7 @@ static void lcd_write_nibbles(uint8_t val) | |||
154 | /* initialises lcd type 1 */ | 158 | /* initialises lcd type 1 */ |
155 | static void lcd_init_type1(void) | 159 | static void lcd_init_type1(void) |
156 | { | 160 | { |
157 | static const uint8_t curve[256] = { | 161 | static const uint8_t curve[128] = { |
158 | /* 5-bit curve */ | 162 | /* 5-bit curve */ |
159 | 0, 5, 10, 15, 20, 25, 30, 35, 39, 43, 47, 51, 55, 59, 63, 67, | 163 | 0, 5, 10, 15, 20, 25, 30, 35, 39, 43, 47, 51, 55, 59, 63, 67, |
160 | 71, 75, 79, 83, 87, 91, 95, 99, 103, 105, 109, 113, 117, 121, 123, 127, | 164 | 71, 75, 79, 83, 87, 91, 95, 99, 103, 105, 109, 113, 117, 121, 123, 127, |
@@ -242,7 +246,7 @@ static void lcd_init_type1(void) | |||
242 | lcd_write_dat(0x10); | 246 | lcd_write_dat(0x10); |
243 | 247 | ||
244 | lcd_write_cmd(0x3A); | 248 | lcd_write_cmd(0x3A); |
245 | for (i = 0; i < 256; i++) { | 249 | for (i = 0; i < 128; i++) { |
246 | lcd_write_nibbles(curve[i]); | 250 | lcd_write_nibbles(curve[i]); |
247 | } | 251 | } |
248 | 252 | ||