diff options
-rw-r--r-- | firmware/export/usb.h | 45 | ||||
-rw-r--r-- | firmware/usb.c | 6 | ||||
-rw-r--r-- | manual/rockbox_interface/main.tex | 6 |
3 files changed, 9 insertions, 48 deletions
diff --git a/firmware/export/usb.h b/firmware/export/usb.h index a3425dae2f..72315404e3 100644 --- a/firmware/export/usb.h +++ b/firmware/export/usb.h | |||
@@ -57,7 +57,6 @@ enum { | |||
57 | USB_HANDLED, /* Bootloader status code */ | 57 | USB_HANDLED, /* Bootloader status code */ |
58 | #endif | 58 | #endif |
59 | }; | 59 | }; |
60 | |||
61 | #ifdef HAVE_USB_POWER | 60 | #ifdef HAVE_USB_POWER |
62 | #if CONFIG_KEYPAD == RECORDER_PAD | 61 | #if CONFIG_KEYPAD == RECORDER_PAD |
63 | #define USBPOWER_BUTTON BUTTON_F1 | 62 | #define USBPOWER_BUTTON BUTTON_F1 |
@@ -65,48 +64,10 @@ enum { | |||
65 | #elif CONFIG_KEYPAD == ONDIO_PAD | 64 | #elif CONFIG_KEYPAD == ONDIO_PAD |
66 | #define USBPOWER_BUTTON BUTTON_MENU | 65 | #define USBPOWER_BUTTON BUTTON_MENU |
67 | #define USBPOWER_BTN_IGNORE BUTTON_OFF | 66 | #define USBPOWER_BTN_IGNORE BUTTON_OFF |
68 | #elif (CONFIG_KEYPAD == IPOD_4G_PAD) | 67 | #else |
69 | #define USBPOWER_BUTTON BUTTON_MENU | 68 | #define USBPOWER_BTN_IGNORE 0 |
70 | #define USBPOWER_BTN_IGNORE BUTTON_PLAY | 69 | #endif |
71 | #elif CONFIG_KEYPAD == IRIVER_H300_PAD | ||
72 | #define USBPOWER_BUTTON BUTTON_MODE | ||
73 | #define USBPOWER_BTN_IGNORE BUTTON_ON | ||
74 | #elif CONFIG_KEYPAD == GIGABEAT_PAD | ||
75 | #define USBPOWER_BUTTON BUTTON_MENU | ||
76 | #define USBPOWER_BTN_IGNORE BUTTON_POWER | ||
77 | #elif (CONFIG_KEYPAD == IRIVER_H10_PAD) || \ | ||
78 | (CONFIG_KEYPAD == MROBE100_PAD) | ||
79 | #define USBPOWER_BUTTON BUTTON_RIGHT | ||
80 | #define USBPOWER_BTN_IGNORE BUTTON_POWER | ||
81 | #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ | ||
82 | (CONFIG_KEYPAD == SANSA_C200_PAD) || \ | ||
83 | (CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ | ||
84 | (CONFIG_KEYPAD == SANSA_FUZE_PAD) | ||
85 | #define USBPOWER_BUTTON BUTTON_SELECT | ||
86 | #define USBPOWER_BTN_IGNORE BUTTON_POWER | ||
87 | #elif (CONFIG_KEYPAD == PHILIPS_SA9200_PAD) | ||
88 | #define USBPOWER_BUTTON BUTTON_PLAY | ||
89 | #define USBPOWER_BTN_IGNORE BUTTON_POWER | ||
90 | #elif CONFIG_KEYPAD == PHILIPS_HDD1630_PAD | ||
91 | #define USBPOWER_BUTTON BUTTON_PLAYLIST | ||
92 | #define USBPOWER_BTN_IGNORE BUTTON_POWER | ||
93 | #elif CONFIG_KEYPAD == PHILIPS_HDD6330_PAD | ||
94 | #define USBPOWER_BUTTON BUTTON_LEFT | ||
95 | #define USBPOWER_BTN_IGNORE BUTTON_POWER | ||
96 | #elif CONFIG_KEYPAD == SAMSUNG_YH_PAD | ||
97 | #define USBPOWER_BUTTON BUTTON_RIGHT | ||
98 | #define USBPOWER_BTN_IGNORE BUTTON_LEFT | ||
99 | #elif CONFIG_KEYPAD == COWON_D2_PAD | ||
100 | #define USBPOWER_BUTTON BUTTON_MENU | ||
101 | #define USBPOWER_BTN_IGNORE BUTTON_MINUS | ||
102 | #elif CONFIG_KEYPAD == ONDAVX747_PAD | ||
103 | #define USBPOWER_BUTTON BUTTON_VOL_UP | ||
104 | #define USBPOWER_BTN_IGNORE BUTTON_VOL_DOWN | ||
105 | #elif CONFIG_KEYPAD == PBELL_VIBE500_PAD | ||
106 | #define USBPOWER_BUTTON BUTTON_REC | ||
107 | #define USBPOWER_BTN_IGNORE BUTTON_POWER | ||
108 | #endif | 70 | #endif |
109 | #endif /* HAVE_USB_POWER */ | ||
110 | 71 | ||
111 | #ifdef HAVE_USBSTACK | 72 | #ifdef HAVE_USBSTACK |
112 | /* USB class drivers */ | 73 | /* USB class drivers */ |
diff --git a/firmware/usb.c b/firmware/usb.c index aada27dfd9..b8e2b5298c 100644 --- a/firmware/usb.c +++ b/firmware/usb.c | |||
@@ -341,11 +341,7 @@ static inline void usb_slave_mode(bool on) | |||
341 | #ifdef HAVE_USB_POWER | 341 | #ifdef HAVE_USB_POWER |
342 | static inline bool usb_power_button(void) | 342 | static inline bool usb_power_button(void) |
343 | { | 343 | { |
344 | #if (defined(IRIVER_H10) || defined (IRIVER_H10_5GB)) && !defined(USE_ROCKBOX_USB) | 344 | return (button_status() & ~USBPOWER_BTN_IGNORE); |
345 | return (button_status() & ~USBPOWER_BTN_IGNORE) != USBPOWER_BUTTON; | ||
346 | #else | ||
347 | return (button_status() & ~USBPOWER_BTN_IGNORE) == USBPOWER_BUTTON; | ||
348 | #endif | ||
349 | } | 345 | } |
350 | 346 | ||
351 | #ifdef USB_FIREWIRE_HANDLING | 347 | #ifdef USB_FIREWIRE_HANDLING |
diff --git a/manual/rockbox_interface/main.tex b/manual/rockbox_interface/main.tex index a8022be209..e4de1d654a 100644 --- a/manual/rockbox_interface/main.tex +++ b/manual/rockbox_interface/main.tex | |||
@@ -807,10 +807,14 @@ properly.} | |||
807 | \opt{usb_power}{ | 807 | \opt{usb_power}{ |
808 | \section{USB Charging} | 808 | \section{USB Charging} |
809 | \nopt{clipv2,fuzev2,clipplus}{ | 809 | \nopt{clipv2,fuzev2,clipplus}{ |
810 | To charge your \dap{} over USB, hold \ActionStdUsbCharge{} while plugging it | 810 | To charge your \dap{} over USB, hold any button while plugging it |
811 | in. This will prevent it from connecting to your computer and let you | 811 | in. This will prevent it from connecting to your computer and let you |
812 | continue to use it normally. Your \dap{} must already be in Rockbox for this | 812 | continue to use it normally. Your \dap{} must already be in Rockbox for this |
813 | to function. | 813 | to function. |
814 | \note{Be aware that this button may still perform its normal function, so | ||
815 | it is recommended to use a button without harmful side effects, such as | ||
816 | ActionStdUsbCharge{}.} | ||
817 | |||
814 | } | 818 | } |
815 | \opt{clipv2,fuzev2,clipplus}{ | 819 | \opt{clipv2,fuzev2,clipplus}{ |
816 | Your \dap{} will automatically charge over USB if the cable is plugged in | 820 | Your \dap{} will automatically charge over USB if the cable is plugged in |