summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2010-01-14 17:35:45 +0000
committerBertrik Sikken <bertrik@sikken.nl>2010-01-14 17:35:45 +0000
commit75400545be5fbec85517a20ac6a85e1beb7da6ff (patch)
tree992a4a21130a46db3c35198014b2c494fc01bc7a /firmware
parent1233a738408655404df8d85f784a950a99daae5b (diff)
downloadrockbox-75400545be5fbec85517a20ac6a85e1beb7da6ff.tar.gz
rockbox-75400545be5fbec85517a20ac6a85e1beb7da6ff.tar.bz2
rockbox-75400545be5fbec85517a20ac6a85e1beb7da6ff.zip
Meizu M6SP: fix incorrect readout of button on P1.3 (this is an output to the power controller)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24226 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/s5l8700/meizu-m6sp/button-m6sp.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/firmware/target/arm/s5l8700/meizu-m6sp/button-m6sp.c b/firmware/target/arm/s5l8700/meizu-m6sp/button-m6sp.c
index a2c7604a85..cb052a119a 100644
--- a/firmware/target/arm/s5l8700/meizu-m6sp/button-m6sp.c
+++ b/firmware/target/arm/s5l8700/meizu-m6sp/button-m6sp.c
@@ -30,7 +30,7 @@
Future improvements:
* touch strip support
- * left/right buttons (probably part of touch strip)
+ * left/right buttons (probably read out with ADC0)
* unify with m3/m6sl button driver if possible
*/
@@ -40,8 +40,7 @@ void button_init_device(void)
{
PCON0 &= ~(0x3 << 10); /* P0.5 hold switch */
PCON0 &= ~(0x3 << 14); /* P0.7 enter button */
- PCON1 &= ~(0xF << 12); /* P1.3 menu button */
- PCON1 &= ~(0xF << 16); /* P1.4 play button */
+ PCON1 &= ~(0xF << 16); /* P1.4 play/power button */
}
int button_read_device(void)
@@ -52,16 +51,13 @@ int button_read_device(void)
return 0;
}
- if ((PDAT0 & (1 << 7)) == 0) {
- buttons |= BUTTON_ENTER;
- }
- if ((PDAT1 & (1 << 3)) == 0) {
- buttons |= BUTTON_MENU;
- }
if ((PDAT1 & (1 << 4)) == 0) {
buttons |= BUTTON_PLAY;
}
-
+ if ((PDAT0 & (1 << 7)) == 0) {
+ buttons |= BUTTON_ENTER;
+ }
+
return buttons;
}