diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2010-07-03 18:50:07 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-07-03 18:50:07 +0000 |
commit | 9a471e603ebe77a3aae4692d80ceb32da50c88eb (patch) | |
tree | f0ebfffd2460de1be4255080b361e64bdc901ddb /firmware/target/arm/as3525/sansa-clipplus | |
parent | 12b89c11e31cab842af081e8fc238e47c2711653 (diff) | |
download | rockbox-9a471e603ebe77a3aae4692d80ceb32da50c88eb.tar.gz rockbox-9a471e603ebe77a3aae4692d80ceb32da50c88eb.zip |
Clip+ LCD: support devices with a different controller
The new controller framebuffer (different from what is in clipv1/clipv2 and some clip+) has 128 columns, the old has 132 columns and is centered on the screen.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27257 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/as3525/sansa-clipplus')
-rw-r--r-- | firmware/target/arm/as3525/sansa-clipplus/lcd-clip-plus.c | 5 | ||||
-rw-r--r-- | firmware/target/arm/as3525/sansa-clipplus/lcd-clip.h | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/firmware/target/arm/as3525/sansa-clipplus/lcd-clip-plus.c b/firmware/target/arm/as3525/sansa-clipplus/lcd-clip-plus.c index 7be0199df1..3faa92da31 100644 --- a/firmware/target/arm/as3525/sansa-clipplus/lcd-clip-plus.c +++ b/firmware/target/arm/as3525/sansa-clipplus/lcd-clip-plus.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include "system.h" | 26 | #include "system.h" |
27 | #include "cpu.h" | 27 | #include "cpu.h" |
28 | 28 | ||
29 | void lcd_hw_init(void) | 29 | void lcd_hw_init(int *offset) |
30 | { | 30 | { |
31 | bitset32(&CGU_PERI, CGU_SSP_CLOCK_ENABLE); | 31 | bitset32(&CGU_PERI, CGU_SSP_CLOCK_ENABLE); |
32 | 32 | ||
@@ -37,8 +37,11 @@ void lcd_hw_init(void) | |||
37 | 37 | ||
38 | GPIOA_DIR |= (1<<5); | 38 | GPIOA_DIR |= (1<<5); |
39 | GPIOB_DIR |= (1<<2) | (1<<7); | 39 | GPIOB_DIR |= (1<<2) | (1<<7); |
40 | GPIOB_DIR &= ~(1<<3); | ||
40 | GPIOB_PIN(7) = 0; | 41 | GPIOB_PIN(7) = 0; |
41 | GPIOA_PIN(5) = (1<<5); | 42 | GPIOA_PIN(5) = (1<<5); |
43 | |||
44 | *offset = GPIOB_PIN(3) ? 0 : 2; | ||
42 | } | 45 | } |
43 | 46 | ||
44 | void lcd_write_command(int byte) | 47 | void lcd_write_command(int byte) |
diff --git a/firmware/target/arm/as3525/sansa-clipplus/lcd-clip.h b/firmware/target/arm/as3525/sansa-clipplus/lcd-clip.h index ae0309a949..70bafe4212 100644 --- a/firmware/target/arm/as3525/sansa-clipplus/lcd-clip.h +++ b/firmware/target/arm/as3525/sansa-clipplus/lcd-clip.h | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | #include "config.h" | 22 | #include "config.h" |
23 | 23 | ||
24 | void lcd_hw_init(void) INIT_ATTR; | 24 | void lcd_hw_init(int *offset) INIT_ATTR; |
25 | static inline void lcd_enable_power(bool onoff) | 25 | static inline void lcd_enable_power(bool onoff) |
26 | { | 26 | { |
27 | (void) onoff; | 27 | (void) onoff; |