forked from len0rd/rockbox
Reorganise USB stack defines. Now config.h decides which class drivers get enabled instead of usb_core.h
Also enable HID, and use that as the dummy class instead of charging-only for controllers that have working interrupt transfers. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21053 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
bca3d3dca4
commit
c61a75173b
13 changed files with 79 additions and 52 deletions
|
@ -540,6 +540,7 @@ Lyre prototype 1*/
|
|||
#endif
|
||||
#endif /* HAVE_USBSTACK */
|
||||
|
||||
|
||||
#endif /* BOOTLOADER */
|
||||
|
||||
#if defined(HAVE_USBSTACK) || (CONFIG_CPU == JZ4732) \
|
||||
|
@ -756,4 +757,46 @@ Lyre prototype 1*/
|
|||
#include <stdbool.h> /* MIPS GCC fix? */
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_USBSTACK)
|
||||
/* Define the implemented USB transport classes */
|
||||
#if CONFIG_USBOTG == USBOTG_ISP1583
|
||||
#define USB_HAS_BULK
|
||||
#elif CONFIG_USBOTG == USBOTG_ARC
|
||||
#define USB_HAS_BULK
|
||||
#define USB_HAS_INTERRUPT
|
||||
#elif CONFIG_USBOTG == USBOTG_JZ4740
|
||||
#define USB_HAS_BULK
|
||||
#define USB_HAS_INTERRUPT
|
||||
#elif defined(CPU_TCC780X) || defined(define CPU_TCC77X)
|
||||
#define USB_HAS_BULK
|
||||
#endif /* CONFIG_USBOTG */
|
||||
|
||||
/* define the class drivers to enable */
|
||||
#ifndef BOOTLOADER
|
||||
|
||||
//#define USB_ENABLE_SERIAL
|
||||
#define USB_ENABLE_STORAGE
|
||||
|
||||
#ifdef USB_HAS_INTERRUPT
|
||||
#define USB_ENABLE_HID
|
||||
#else
|
||||
#define USB_ENABLE_CHARGING_ONLY
|
||||
#endif
|
||||
|
||||
#else /* BOOTLOADER */
|
||||
|
||||
/* enable usb storage for targets that do bootloader usb */
|
||||
#if (defined(TOSHIBA_GIGABEAT_S) && defined(USE_ROCKBOX_USB) && defined(USB_STORAGE)) || \
|
||||
(defined(HAVE_USBSTACK) && (defined(CREATIVE_ZVx) || \
|
||||
defined(CPU_TCC77X) || defined(CPU_TCC780X))) || \
|
||||
(CONFIG_USBOTG == USBOTG_JZ4740)
|
||||
#define USB_ENABLE_STORAGE
|
||||
#endif
|
||||
|
||||
#endif /* BOOTLOADER */
|
||||
|
||||
#endif /* HAVE_USBSTACK */
|
||||
|
||||
|
||||
|
||||
#endif /* __CONFIG_H__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue