1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Linus Nielsen Feltzing 2005-02-10 21:52:54 +00:00
parent 703d30cb21
commit abcb16192e

View file

@ -123,7 +123,10 @@ static void button_tick(void)
which doesn't shut down easily with the OFF which doesn't shut down easily with the OFF
key */ key */
#ifdef HAVE_SW_POWEROFF #ifdef HAVE_SW_POWEROFF
if (btn == BUTTON_OFF && !charger_inserted() && if (btn == BUTTON_OFF &&
#ifndef IRIVER_H100
!charger_inserted() &&
#endif
repeat_count > POWEROFF_COUNT) repeat_count > POWEROFF_COUNT)
queue_post(&button_queue, SYS_POWEROFF, NULL); queue_post(&button_queue, SYS_POWEROFF, NULL);
#endif #endif
@ -378,6 +381,9 @@ static int button_read(void)
if ((data & 0x20) == 0) if ((data & 0x20) == 0)
btn |= BUTTON_ON; btn |= BUTTON_ON;
if ((data & 0x40) == 0)
btn |= BUTTON_RC_ON;
#elif CONFIG_KEYPAD == RECORDER_PAD #elif CONFIG_KEYPAD == RECORDER_PAD
#ifdef HAVE_FMADC #ifdef HAVE_FMADC
@ -508,6 +514,11 @@ bool button_hold(void)
{ {
return (GPIO1_READ & 0x00000002)?true:false; return (GPIO1_READ & 0x00000002)?true:false;
} }
bool remote_button_hold(void)
{
return (GPIO1_READ & 0x00100000)?true:false;
}
#endif #endif
int button_status(void) int button_status(void)