summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2009-05-23 14:30:20 +0000
committerFrank Gevaerts <frank@gevaerts.be>2009-05-23 14:30:20 +0000
commitc61a75173b2e81ea3ae3aa1d3cdf84d15e4304c3 (patch)
treef9056ad1a886d1741b009a6d026b689e18040a17 /firmware/export
parentbca3d3dca44bbe111d8e8595932d2a9491679dab (diff)
downloadrockbox-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')
-rw-r--r--firmware/export/config-gigabeat-s.h1
-rw-r--r--firmware/export/config-iaudio7.h3
-rw-r--r--firmware/export/config.h43
-rw-r--r--firmware/export/usb_core.h10
4 files changed, 43 insertions, 14 deletions
diff --git a/firmware/export/config-gigabeat-s.h b/firmware/export/config-gigabeat-s.h
index d122edbf74..015e863fc9 100644
--- a/firmware/export/config-gigabeat-s.h
+++ b/firmware/export/config-gigabeat-s.h
@@ -183,7 +183,6 @@
183/* enable these for the usb stack */ 183/* enable these for the usb stack */
184#define USE_ROCKBOX_USB 184#define USE_ROCKBOX_USB
185#define HAVE_USBSTACK 185#define HAVE_USBSTACK
186#define USB_STORAGE
187/* usb stack and driver settings */ 186/* usb stack and driver settings */
188#define USB_PORTSCX_PHY_TYPE PORTSCX_PTS_ULPI 187#define USB_PORTSCX_PHY_TYPE PORTSCX_PTS_ULPI
189#define USB_VENDOR_ID 0x0930 188#define USB_VENDOR_ID 0x0930
diff --git a/firmware/export/config-iaudio7.h b/firmware/export/config-iaudio7.h
index 8886b18633..1e7c42258c 100644
--- a/firmware/export/config-iaudio7.h
+++ b/firmware/export/config-iaudio7.h
@@ -66,9 +66,6 @@
66#define HAVE_USBSTACK 66#define HAVE_USBSTACK
67#define USB_VENDOR_ID 0x0e21 67#define USB_VENDOR_ID 0x0e21
68#define USB_PRODUCT_ID 0x0750 68#define USB_PRODUCT_ID 0x0750
69
70#define USB_STORAGE
71#define USB_SERIAL
72#endif 69#endif
73 70
74/* define this if you have a flash memory storage */ 71/* define this if you have a flash memory storage */
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__ */
diff --git a/firmware/export/usb_core.h b/firmware/export/usb_core.h
index 9c105fbc7c..c65be5fa3c 100644
--- a/firmware/export/usb_core.h
+++ b/firmware/export/usb_core.h
@@ -21,16 +21,6 @@
21#ifndef USB_CORE_H 21#ifndef USB_CORE_H
22#define USB_CORE_H 22#define USB_CORE_H
23 23
24#ifndef BOOTLOADER
25
26//#define USB_SERIAL
27#define USB_STORAGE
28#define USB_CHARGING_ONLY
29//#define USB_HID
30#else /* BOOTLOADER */
31#define USB_CHARGING_ONLY
32#endif /* BOOTLOADER */
33
34#include "usb_ch9.h" 24#include "usb_ch9.h"
35#include "usb.h" 25#include "usb.h"
36 26