diff options
author | Frank Gevaerts <frank@gevaerts.be> | 2009-05-23 14:30:20 +0000 |
---|---|---|
committer | Frank Gevaerts <frank@gevaerts.be> | 2009-05-23 14:30:20 +0000 |
commit | c61a75173b2e81ea3ae3aa1d3cdf84d15e4304c3 (patch) | |
tree | f9056ad1a886d1741b009a6d026b689e18040a17 /firmware/export/config.h | |
parent | bca3d3dca44bbe111d8e8595932d2a9491679dab (diff) | |
download | rockbox-c61a75173b2e81ea3ae3aa1d3cdf84d15e4304c3.tar.gz rockbox-c61a75173b2e81ea3ae3aa1d3cdf84d15e4304c3.zip |
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
Diffstat (limited to 'firmware/export/config.h')
-rw-r--r-- | firmware/export/config.h | 43 |
1 files changed, 43 insertions, 0 deletions
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*/ | |||
540 | #endif | 540 | #endif |
541 | #endif /* HAVE_USBSTACK */ | 541 | #endif /* HAVE_USBSTACK */ |
542 | 542 | ||
543 | |||
543 | #endif /* BOOTLOADER */ | 544 | #endif /* BOOTLOADER */ |
544 | 545 | ||
545 | #if defined(HAVE_USBSTACK) || (CONFIG_CPU == JZ4732) \ | 546 | #if defined(HAVE_USBSTACK) || (CONFIG_CPU == JZ4732) \ |
@@ -756,4 +757,46 @@ Lyre prototype 1*/ | |||
756 | #include <stdbool.h> /* MIPS GCC fix? */ | 757 | #include <stdbool.h> /* MIPS GCC fix? */ |
757 | #endif | 758 | #endif |
758 | 759 | ||
760 | #if defined(HAVE_USBSTACK) | ||
761 | /* Define the implemented USB transport classes */ | ||
762 | #if CONFIG_USBOTG == USBOTG_ISP1583 | ||
763 | #define USB_HAS_BULK | ||
764 | #elif CONFIG_USBOTG == USBOTG_ARC | ||
765 | #define USB_HAS_BULK | ||
766 | #define USB_HAS_INTERRUPT | ||
767 | #elif CONFIG_USBOTG == USBOTG_JZ4740 | ||
768 | #define USB_HAS_BULK | ||
769 | #define USB_HAS_INTERRUPT | ||
770 | #elif defined(CPU_TCC780X) || defined(define CPU_TCC77X) | ||
771 | #define USB_HAS_BULK | ||
772 | #endif /* CONFIG_USBOTG */ | ||
773 | |||
774 | /* define the class drivers to enable */ | ||
775 | #ifndef BOOTLOADER | ||
776 | |||
777 | //#define USB_ENABLE_SERIAL | ||
778 | #define USB_ENABLE_STORAGE | ||
779 | |||
780 | #ifdef USB_HAS_INTERRUPT | ||
781 | #define USB_ENABLE_HID | ||
782 | #else | ||
783 | #define USB_ENABLE_CHARGING_ONLY | ||
784 | #endif | ||
785 | |||
786 | #else /* BOOTLOADER */ | ||
787 | |||
788 | /* enable usb storage for targets that do bootloader usb */ | ||
789 | #if (defined(TOSHIBA_GIGABEAT_S) && defined(USE_ROCKBOX_USB) && defined(USB_STORAGE)) || \ | ||
790 | (defined(HAVE_USBSTACK) && (defined(CREATIVE_ZVx) || \ | ||
791 | defined(CPU_TCC77X) || defined(CPU_TCC780X))) || \ | ||
792 | (CONFIG_USBOTG == USBOTG_JZ4740) | ||
793 | #define USB_ENABLE_STORAGE | ||
794 | #endif | ||
795 | |||
796 | #endif /* BOOTLOADER */ | ||
797 | |||
798 | #endif /* HAVE_USBSTACK */ | ||
799 | |||
800 | |||
801 | |||
759 | #endif /* __CONFIG_H__ */ | 802 | #endif /* __CONFIG_H__ */ |