mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-12 14:42:31 -05:00
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
|
|
@ -183,7 +183,6 @@
|
|||
/* enable these for the usb stack */
|
||||
#define USE_ROCKBOX_USB
|
||||
#define HAVE_USBSTACK
|
||||
#define USB_STORAGE
|
||||
/* usb stack and driver settings */
|
||||
#define USB_PORTSCX_PHY_TYPE PORTSCX_PTS_ULPI
|
||||
#define USB_VENDOR_ID 0x0930
|
||||
|
|
|
|||
|
|
@ -66,9 +66,6 @@
|
|||
#define HAVE_USBSTACK
|
||||
#define USB_VENDOR_ID 0x0e21
|
||||
#define USB_PRODUCT_ID 0x0750
|
||||
|
||||
#define USB_STORAGE
|
||||
#define USB_SERIAL
|
||||
#endif
|
||||
|
||||
/* define this if you have a flash memory storage */
|
||||
|
|
|
|||
|
|
@ -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__ */
|
||||
|
|
|
|||
|
|
@ -21,16 +21,6 @@
|
|||
#ifndef USB_CORE_H
|
||||
#define USB_CORE_H
|
||||
|
||||
#ifndef BOOTLOADER
|
||||
|
||||
//#define USB_SERIAL
|
||||
#define USB_STORAGE
|
||||
#define USB_CHARGING_ONLY
|
||||
//#define USB_HID
|
||||
#else /* BOOTLOADER */
|
||||
#define USB_CHARGING_ONLY
|
||||
#endif /* BOOTLOADER */
|
||||
|
||||
#include "usb_ch9.h"
|
||||
#include "usb.h"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue