summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2005-02-10 21:52:54 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2005-02-10 21:52:54 +0000
commitabcb16192eef1f54fee0eff5356fff1bc303da39 (patch)
tree07f870eb2315e6d936a330cf7c4058a482ff48ff /firmware
parent703d30cb21f49000754c7903e7814add9f77998b (diff)
downloadrockbox-abcb16192eef1f54fee0eff5356fff1bc303da39.tar.gz
rockbox-abcb16192eef1f54fee0eff5356fff1bc303da39.zip
iRiver: added remote hold switch, and allow shutdown when charging
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5886 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/button.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c
index e5f12b5749..1a0aeceb06 100644
--- a/firmware/drivers/button.c
+++ b/firmware/drivers/button.c
@@ -123,7 +123,10 @@ static void button_tick(void)
123 which doesn't shut down easily with the OFF 123 which doesn't shut down easily with the OFF
124 key */ 124 key */
125#ifdef HAVE_SW_POWEROFF 125#ifdef HAVE_SW_POWEROFF
126 if (btn == BUTTON_OFF && !charger_inserted() && 126 if (btn == BUTTON_OFF &&
127#ifndef IRIVER_H100
128 !charger_inserted() &&
129#endif
127 repeat_count > POWEROFF_COUNT) 130 repeat_count > POWEROFF_COUNT)
128 queue_post(&button_queue, SYS_POWEROFF, NULL); 131 queue_post(&button_queue, SYS_POWEROFF, NULL);
129#endif 132#endif
@@ -378,6 +381,9 @@ static int button_read(void)
378 if ((data & 0x20) == 0) 381 if ((data & 0x20) == 0)
379 btn |= BUTTON_ON; 382 btn |= BUTTON_ON;
380 383
384 if ((data & 0x40) == 0)
385 btn |= BUTTON_RC_ON;
386
381#elif CONFIG_KEYPAD == RECORDER_PAD 387#elif CONFIG_KEYPAD == RECORDER_PAD
382 388
383#ifdef HAVE_FMADC 389#ifdef HAVE_FMADC
@@ -508,6 +514,11 @@ bool button_hold(void)
508{ 514{
509 return (GPIO1_READ & 0x00000002)?true:false; 515 return (GPIO1_READ & 0x00000002)?true:false;
510} 516}
517
518bool remote_button_hold(void)
519{
520 return (GPIO1_READ & 0x00100000)?true:false;
521}
511#endif 522#endif
512 523
513int button_status(void) 524int button_status(void)