From abcb16192eef1f54fee0eff5356fff1bc303da39 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Thu, 10 Feb 2005 21:52:54 +0000 Subject: 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 --- firmware/drivers/button.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'firmware') 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) which doesn't shut down easily with the OFF key */ #ifdef HAVE_SW_POWEROFF - if (btn == BUTTON_OFF && !charger_inserted() && + if (btn == BUTTON_OFF && +#ifndef IRIVER_H100 + !charger_inserted() && +#endif repeat_count > POWEROFF_COUNT) queue_post(&button_queue, SYS_POWEROFF, NULL); #endif @@ -378,6 +381,9 @@ static int button_read(void) if ((data & 0x20) == 0) btn |= BUTTON_ON; + if ((data & 0x40) == 0) + btn |= BUTTON_RC_ON; + #elif CONFIG_KEYPAD == RECORDER_PAD #ifdef HAVE_FMADC @@ -508,6 +514,11 @@ bool button_hold(void) { return (GPIO1_READ & 0x00000002)?true:false; } + +bool remote_button_hold(void) +{ + return (GPIO1_READ & 0x00100000)?true:false; +} #endif int button_status(void) -- cgit v1.2.3