summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2006-02-18 18:42:46 +0000
committerDave Chapman <dave@dchapman.com>2006-02-18 18:42:46 +0000
commit3ba5a0b24a72b8b694be5ae2ef224aef18136dd1 (patch)
treea42b0ce6b6e6c060091f9330e225e298b02baeba /firmware
parent1064f019b8c8c21f26605d6271ac4ff7e4202847 (diff)
downloadrockbox-3ba5a0b24a72b8b694be5ae2ef224aef18136dd1.tar.gz
rockbox-3ba5a0b24a72b8b694be5ae2ef224aef18136dd1.tar.bz2
rockbox-3ba5a0b24a72b8b694be5ae2ef224aef18136dd1.zip
iPods - implement button_hold() function
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8727 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/button.c7
-rw-r--r--firmware/export/button.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c
index db1033dc82..1cb9472e0f 100644
--- a/firmware/drivers/button.c
+++ b/firmware/drivers/button.c
@@ -1048,6 +1048,13 @@ static int button_read(void)
return retval;
}
+#if (CONFIG_KEYPAD == IPOD_4G_PAD)
+bool button_hold(void)
+{
+ return (GPIOA_INPUT_VAL & 0x20)?false:true;
+}
+#endif
+
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
bool button_hold(void)
{
diff --git a/firmware/export/button.h b/firmware/export/button.h
index 0ee8d67845..e1a75878c6 100644
--- a/firmware/export/button.h
+++ b/firmware/export/button.h
@@ -26,6 +26,8 @@
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#define HAS_BUTTON_HOLD
#define HAS_REMOTE_BUTTON_HOLD
+#elif (CONFIG_KEYPAD == IPOD_4G_PAD)
+#define HAS_BUTTON_HOLD
#endif
extern struct event_queue button_queue;