summaryrefslogtreecommitdiff
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
parent1233a738408655404df8d85f784a950a99daae5b (diff)
downloadrockbox-75400545be5fbec85517a20ac6a85e1beb7da6ff.tar.gz
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
-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 @@
30 30
31 Future improvements: 31 Future improvements:
32 * touch strip support 32 * touch strip support
33 * left/right buttons (probably part of touch strip) 33 * left/right buttons (probably read out with ADC0)
34 * unify with m3/m6sl button driver if possible 34 * unify with m3/m6sl button driver if possible
35 35
36 */ 36 */
@@ -40,8 +40,7 @@ void button_init_device(void)
40{ 40{
41 PCON0 &= ~(0x3 << 10); /* P0.5 hold switch */ 41 PCON0 &= ~(0x3 << 10); /* P0.5 hold switch */
42 PCON0 &= ~(0x3 << 14); /* P0.7 enter button */ 42 PCON0 &= ~(0x3 << 14); /* P0.7 enter button */
43 PCON1 &= ~(0xF << 12); /* P1.3 menu button */ 43 PCON1 &= ~(0xF << 16); /* P1.4 play/power button */
44 PCON1 &= ~(0xF << 16); /* P1.4 play button */
45} 44}
46 45
47int button_read_device(void) 46int button_read_device(void)
@@ -52,16 +51,13 @@ int button_read_device(void)
52 return 0; 51 return 0;
53 } 52 }
54 53
55 if ((PDAT0 & (1 << 7)) == 0) {
56 buttons |= BUTTON_ENTER;
57 }
58 if ((PDAT1 & (1 << 3)) == 0) {
59 buttons |= BUTTON_MENU;
60 }
61 if ((PDAT1 & (1 << 4)) == 0) { 54 if ((PDAT1 & (1 << 4)) == 0) {
62 buttons |= BUTTON_PLAY; 55 buttons |= BUTTON_PLAY;
63 } 56 }
64 57 if ((PDAT0 & (1 << 7)) == 0) {
58 buttons |= BUTTON_ENTER;
59 }
60
65 return buttons; 61 return buttons;
66} 62}
67 63