summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/as3525/sansa-clipplus/lcd-clip-plus.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/as3525/sansa-clipplus/lcd-clip-plus.c')
-rw-r--r--firmware/target/arm/as3525/sansa-clipplus/lcd-clip-plus.c5
1 files changed, 4 insertions, 1 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 @@
#include "system.h"
#include "cpu.h"
-void lcd_hw_init(void)
+void lcd_hw_init(int *offset)
{
bitset32(&CGU_PERI, CGU_SSP_CLOCK_ENABLE);
@@ -37,8 +37,11 @@ void lcd_hw_init(void)
GPIOA_DIR |= (1<<5);
GPIOB_DIR |= (1<<2) | (1<<7);
+ GPIOB_DIR &= ~(1<<3);
GPIOB_PIN(7) = 0;
GPIOA_PIN(5) = (1<<5);
+
+ *offset = GPIOB_PIN(3) ? 0 : 2;
}
void lcd_write_command(int byte)