summaryrefslogtreecommitdiffstats
path: root/bootloader
diff options
context:
space:
mode:
authorFrank Dischner <phaedrus961@rockbox.org>2006-04-19 18:06:56 +0000
committerFrank Dischner <phaedrus961@rockbox.org>2006-04-19 18:06:56 +0000
commit5d9eccd85b46b90a9017bd7f334933b5f08c54ca (patch)
treed9046c5eaa7c3482f94eaa982b8f72acf0101de0 /bootloader
parent1903fab9c568839a5e99c47fbe07d97c5318832a (diff)
downloadrockbox-5d9eccd85b46b90a9017bd7f334933b5f08c54ca.tar.gz
rockbox-5d9eccd85b46b90a9017bd7f334933b5f08c54ca.tar.bz2
rockbox-5d9eccd85b46b90a9017bd7f334933b5f08c54ca.zip
Fix button driver for ipod mini 1G.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9732 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader')
-rw-r--r--bootloader/ipod.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/bootloader/ipod.c b/bootloader/ipod.c
index c74e162536..98ff4848bb 100644
--- a/bootloader/ipod.c
+++ b/bootloader/ipod.c
@@ -103,7 +103,7 @@ static void memmove16(void *dest, const void *src, unsigned count)
}
}
-#if CONFIG_KEYPAD == IPOD_4G_PAD
+#if CONFIG_KEYPAD == IPOD_4G_PAD && !defined(IPOD_MINI)
/* check if number of seconds has past */
int timer_check(int clock_start, unsigned int usecs)
{
@@ -195,13 +195,17 @@ static int key_pressed(void)
#if CONFIG_KEYPAD == IPOD_4G_PAD
#ifdef IPOD_MINI /* mini 1G only */
state = GPIOA_INPUT_VAL & 0x3f;
+ if ((state & 0x10) == 0) return BUTTON_LEFT;
+ if ((state & 0x2) == 0) return BUTTON_MENU;
+ if ((state & 0x4) == 0) return BUTTON_PLAY;
+ if ((state & 0x8) == 0) return BUTTON_RIGHT;
#else
state = opto_keypad_read();
-#endif
if ((state & 0x4) == 0) return BUTTON_LEFT;
if ((state & 0x10) == 0) return BUTTON_MENU;
if ((state & 0x8) == 0) return BUTTON_PLAY;
if ((state & 0x2) == 0) return BUTTON_RIGHT;
+#endif
#elif CONFIG_KEYPAD == IPOD_3G_PAD
state = inb(0xcf000030);
if (((state & 0x20) == 0)) return BUTTON_HOLD; /* hold on */