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:
parent
703d30cb21
commit
abcb16192e
1 changed files with 12 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue