summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-10-28 18:47:25 +0000
committerJens Arnold <amiconn@rockbox.org>2005-10-28 18:47:25 +0000
commit0e27bb5be59493e79904cbcf0ea21ee75498f36a (patch)
tree413dada89fe1afad547fbeb314e1f0823bd775ce /firmware
parent55ebb9ffc3013b856257329373c6276b91063a3e (diff)
downloadrockbox-0e27bb5be59493e79904cbcf0ea21ee75498f36a.tar.gz
rockbox-0e27bb5be59493e79904cbcf0ea21ee75498f36a.tar.bz2
rockbox-0e27bb5be59493e79904cbcf0ea21ee75498f36a.zip
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
Diffstat (limited to 'firmware')
-rw-r--r--firmware/usb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/firmware/usb.c b/firmware/usb.c
index be55622647..8a99683a25 100644
--- a/firmware/usb.c
+++ b/firmware/usb.c
@@ -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;
}