summaryrefslogtreecommitdiff
path: root/firmware/usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/usb.c')
-rw-r--r--firmware/usb.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/firmware/usb.c b/firmware/usb.c
index f115a92407..f918f19bc4 100644
--- a/firmware/usb.c
+++ b/firmware/usb.c
@@ -47,7 +47,7 @@
47 47
48/* Conditions under which we want the entire driver */ 48/* Conditions under which we want the entire driver */
49#if !defined(BOOTLOADER) || (CONFIG_CPU == SH7034) || \ 49#if !defined(BOOTLOADER) || (CONFIG_CPU == SH7034) || \
50 (defined(TOSHIBA_GIGABEAT_S) && defined(USE_ROCKBOX_USB) && defined(USB_STORAGE)) || \ 50 (defined(TOSHIBA_GIGABEAT_S) && defined(USE_ROCKBOX_USB) && defined(USB_ENABLE_STORAGE)) || \
51 (defined(HAVE_USBSTACK) && (defined(CREATIVE_ZVx) || \ 51 (defined(HAVE_USBSTACK) && (defined(CREATIVE_ZVx) || \
52 defined(CPU_TCC77X) || defined(CPU_TCC780X))) || \ 52 defined(CPU_TCC77X) || defined(CPU_TCC780X))) || \
53 (CONFIG_USBOTG == USBOTG_JZ4740) 53 (CONFIG_USBOTG == USBOTG_JZ4740)
@@ -270,13 +270,19 @@ static void usb_thread(void)
270 /* Only charging is desired */ 270 /* Only charging is desired */
271 usb_state = USB_POWERED; 271 usb_state = USB_POWERED;
272#ifdef HAVE_USBSTACK 272#ifdef HAVE_USBSTACK
273#ifdef USB_STORAGE 273#ifdef USB_ENABLE_STORAGE
274 usb_core_enable_driver(USB_DRIVER_MASS_STORAGE, false); 274 usb_core_enable_driver(USB_DRIVER_MASS_STORAGE, false);
275#endif 275#endif
276#ifdef USB_HID 276
277#ifdef USB_ENABLE_HID
278#ifdef USB_ENABLE_CHARGING_ONLY
277 usb_core_enable_driver(USB_DRIVER_HID, false); 279 usb_core_enable_driver(USB_DRIVER_HID, false);
278#endif 280#else
279#ifdef USB_CHARGING_ONLY 281 usb_core_enable_driver(USB_DRIVER_HID, true);
282#endif /* USB_ENABLE_CHARGING_ONLY */
283#endif /* USB_ENABLE_HID */
284
285#ifdef USB_ENABLE_CHARGING_ONLY
280 usb_core_enable_driver(USB_DRIVER_CHARGING_ONLY, true); 286 usb_core_enable_driver(USB_DRIVER_CHARGING_ONLY, true);
281#endif 287#endif
282 usb_attach(); 288 usb_attach();
@@ -291,13 +297,13 @@ static void usb_thread(void)
291 * USB_CONNECTED. */ 297 * USB_CONNECTED. */
292 usb_state = USB_POWERED; 298 usb_state = USB_POWERED;
293#endif 299#endif
294#ifdef USB_STORAGE 300#ifdef USB_ENABLE_STORAGE
295 usb_core_enable_driver(USB_DRIVER_MASS_STORAGE, true); 301 usb_core_enable_driver(USB_DRIVER_MASS_STORAGE, true);
296#endif 302#endif
297#ifdef USB_HID 303#ifdef USB_ENABLE_HID
298 usb_core_enable_driver(USB_DRIVER_HID, true); 304 usb_core_enable_driver(USB_DRIVER_HID, true);
299#endif 305#endif
300#ifdef USB_CHARGING_ONLY 306#ifdef USB_ENABLE_CHARGING_ONLY
301 usb_core_enable_driver(USB_DRIVER_CHARGING_ONLY, false); 307 usb_core_enable_driver(USB_DRIVER_CHARGING_ONLY, false);
302#endif 308#endif
303 309