forked from len0rd/rockbox
USB power mode: Made the code ignore the power button (On for recorder fm/v2, OnOff for Ondio) to make it easier to enter USB power mode at startup.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7674 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
55ebb9ffc3
commit
0e27bb5be5
1 changed files with 3 additions and 1 deletions
|
|
@ -58,8 +58,10 @@ void screen_dump(void); /* Nasty again. Defined in apps/ too */
|
|||
|
||||
#if CONFIG_KEYPAD == RECORDER_PAD
|
||||
#define USBPOWER_BUTTON BUTTON_F1
|
||||
#define USBPOWER_BTN_IGNORE BUTTON_ON
|
||||
#elif CONFIG_KEYPAD == ONDIO_PAD
|
||||
#define USBPOWER_BUTTON BUTTON_MENU
|
||||
#define USBPOWER_BTN_IGNORE BUTTON_OFF
|
||||
#endif
|
||||
#endif /* HAVE_USB_POWER */
|
||||
|
||||
|
|
@ -225,7 +227,7 @@ static void usb_thread(void)
|
|||
else
|
||||
#endif
|
||||
#ifdef HAVE_USB_POWER
|
||||
if(button_status() == USBPOWER_BUTTON)
|
||||
if((button_status() & ~USBPOWER_BTN_IGNORE) == USBPOWER_BUTTON)
|
||||
{
|
||||
usb_state = USB_POWERED;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue