mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
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
This commit is contained in:
parent
1233a73840
commit
75400545be
1 changed files with 6 additions and 10 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue