From c61a75173b2e81ea3ae3aa1d3cdf84d15e4304c3 Mon Sep 17 00:00:00 2001 From: Frank Gevaerts Date: Sat, 23 May 2009 14:30:20 +0000 Subject: 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 --- firmware/export/config.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'firmware/export/config.h') diff --git a/firmware/export/config.h b/firmware/export/config.h index efaf326384..abc159e13c 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h @@ -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 /* 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__ */ -- cgit v1.2.3