summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorDominik Wenger <domonoky@googlemail.com>2008-12-03 18:41:02 +0000
committerDominik Wenger <domonoky@googlemail.com>2008-12-03 18:41:02 +0000
commit0d0cc039f88ced4f6db5c4468b19913f52cd08c8 (patch)
treec5b3e0bb912781a8393565e6b596f14e8ccfa9eb /firmware
parent4317ff90a92ffa91b4aa457410d40da338182436 (diff)
fix hold-button handling for m200v4.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19314 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/as3525/sansa-m200v4/button-m200v4.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/firmware/target/arm/as3525/sansa-m200v4/button-m200v4.c b/firmware/target/arm/as3525/sansa-m200v4/button-m200v4.c
index f8d64e2785..a10956657f 100644
--- a/firmware/target/arm/as3525/sansa-m200v4/button-m200v4.c
+++ b/firmware/target/arm/as3525/sansa-m200v4/button-m200v4.c
@@ -36,6 +36,8 @@ static inline void btn_delay(void) { int i = 5; while(i--) ; }
int button_read_device(void)
{
int result = BUTTON_NONE;
+ if(button_hold())
+ return result;
/* direct GPIO connections */
if (GPIOA_PIN(3))
@@ -44,6 +46,7 @@ int button_read_device(void)
/* This is a keypad using A4-A6 as columns and A0-A2 as rows */
GPIOA_PIN(4) = (1<<4);
btn_delay();
+
/* A4A0 is unused */
if (GPIOA_PIN(1))
@@ -78,8 +81,7 @@ int button_read_device(void)
if (GPIOA_PIN(1))
result |= BUTTON_VOLUP;
- if (GPIOA_PIN(2))
- result |= BUTTON_HOLD;
+ /* hold button is read in button_hold() */
GPIOA_PIN(6) = 0x00;