summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Giacomelli <giac2000@hotmail.com>2011-05-16 21:10:31 +0000
committerMichael Giacomelli <giac2000@hotmail.com>2011-05-16 21:10:31 +0000
commite8c79d65e18be1eb1ddc8a0e32a04c17dbc73459 (patch)
treea71490f2e6ca03f6c3590f653283aacff860258d
parent84b4c46d74d2b757026d425953bf2b033e124016 (diff)
downloadrockbox-e8c79d65e18be1eb1ddc8a0e32a04c17dbc73459.tar.gz
rockbox-e8c79d65e18be1eb1ddc8a0e32a04c17dbc73459.zip
The gigabeat S needs special casing so that you can still hold vol down to access its firmware partition. Additionally, the same logic should apply to firewire on the iPods.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29890 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/export/config/gigabeats.h8
-rw-r--r--firmware/export/usb.h3
-rw-r--r--firmware/usb.c2
3 files changed, 7 insertions, 6 deletions
diff --git a/firmware/export/config/gigabeats.h b/firmware/export/config/gigabeats.h
index 2f1d241701..dbeff4aa04 100644
--- a/firmware/export/config/gigabeats.h
+++ b/firmware/export/config/gigabeats.h
@@ -190,20 +190,20 @@
190 190
191#define FREQ cpu_frequency 191#define FREQ cpu_frequency
192 192
193/* Button that exposures boot partition rather than data during session */
194#define USB_BL_INSTALL_MODE_BTN BUTTON_VOL_DOWN
195
193/* define this if the unit can be powered or charged via USB */ 196/* define this if the unit can be powered or charged via USB */
194#define HAVE_USB_POWER 197#define HAVE_USB_POWER
195#define USBPOWER_BUTTON BUTTON_MENU 198#define USBPOWER_BUTTON BUTTON_MENU
196 199
197#ifndef BOOTLOADER 200#ifndef BOOTLOADER
198#define USBPOWER_BTN_IGNORE BUTTON_POWER 201#define USBPOWER_BTN_IGNORE USB_BL_INSTALL_MODE_BTN
199#else 202#else
200/* Disable charging-only mode detection in bootloader */ 203/* Disable charging-only mode detection in bootloader */
201#define USBPOWER_BTN_IGNORE (BUTTON_MAIN | BUTTON_REMOTE) 204#define USBPOWER_BTN_IGNORE (BUTTON_MAIN | BUTTON_REMOTE)
202#endif 205#endif
203 206
204/* Button that exposures boot partition rather than data during session */
205#define USB_BL_INSTALL_MODE_BTN BUTTON_VOL_DOWN
206
207/* define this if the unit has a battery switch or battery can be removed 207/* define this if the unit has a battery switch or battery can be removed
208 * when running */ 208 * when running */
209#define HAVE_BATTERY_SWITCH 209#define HAVE_BATTERY_SWITCH
diff --git a/firmware/export/usb.h b/firmware/export/usb.h
index 72315404e3..d4a6550a22 100644
--- a/firmware/export/usb.h
+++ b/firmware/export/usb.h
@@ -64,7 +64,8 @@ enum {
64#elif CONFIG_KEYPAD == ONDIO_PAD 64#elif CONFIG_KEYPAD == ONDIO_PAD
65#define USBPOWER_BUTTON BUTTON_MENU 65#define USBPOWER_BUTTON BUTTON_MENU
66#define USBPOWER_BTN_IGNORE BUTTON_OFF 66#define USBPOWER_BTN_IGNORE BUTTON_OFF
67#else 67/*allow people to define this in config-target.h if they need it*/
68#elif !defined(USBPOWER_BTN_IGNORE)
68#define USBPOWER_BTN_IGNORE 0 69#define USBPOWER_BTN_IGNORE 0
69#endif 70#endif
70#endif 71#endif
diff --git a/firmware/usb.c b/firmware/usb.c
index b8e2b5298c..2f277ac200 100644
--- a/firmware/usb.c
+++ b/firmware/usb.c
@@ -347,7 +347,7 @@ static inline bool usb_power_button(void)
347#ifdef USB_FIREWIRE_HANDLING 347#ifdef USB_FIREWIRE_HANDLING
348static inline bool usb_reboot_button(void) 348static inline bool usb_reboot_button(void)
349{ 349{
350 return (button_status() & ~USBPOWER_BTN_IGNORE) != USBPOWER_BUTTON; 350 return (button_status() & ~USBPOWER_BTN_IGNORE);
351} 351}
352#endif 352#endif
353#else /* !HAVE_USB_POWER */ 353#else /* !HAVE_USB_POWER */