USBHost library. NOTE: This library is only officially supported on the LPC1768 platform. For more information, please see the handbook page.

Dependencies:   FATFileSystem mbed-rtos

Dependents:   BTstack WallbotWii SD to Flash Data Transfer USBHost-MSD_HelloWorld ... more

Legacy Warning

This is an mbed 2 library. To learn more about mbed OS 5, visit the docs.

Pull requests against this repository are no longer supported. Please raise against mbed OS 5 as documented above.

Revision:
37:f1e388e7b752
Parent:
25:45dcbf2ba11d
--- a/USBHost/USBHostConf.h	Sun Apr 30 04:17:16 2017 +0000
+++ b/USBHost/USBHostConf.h	Thu Jul 20 10:13:56 2017 +0100
@@ -16,8 +16,71 @@
 
 #ifndef USBHOST_CONF_H
 #define USBHOST_CONF_H
+#if defined(TARGET_STM)
+/*
+* Maximum number of devices that can be connected
+* to the usb host
+*/
+/*   hub + 2 devices */
+#define MAX_DEVICE_CONNECTED        5
 
 /*
+* Maximum of Hub connected to the usb host
+*/
+#define MAX_HUB_NB                  3
+
+/*
+* Maximum number of ports on a USB hub
+*/
+#define MAX_HUB_PORT                4
+
+/*
+* Enable USBHostMSD
+*/
+#define USBHOST_MSD                 1
+
+/*
+* Enable USBHostKeyboard
+*/
+#define USBHOST_KEYBOARD            1
+
+/*
+* Enable USBHostMouse
+*/
+#define USBHOST_MOUSE               1
+
+/*
+* Enable USBHostSerial or USBHostMultiSerial (if set > 1)
+*/
+#define USBHOST_SERIAL              1
+
+/*
+* Enable USB3Gmodule
+*/
+#define USBHOST_3GMODULE            1
+
+/*
+* Enable USB MIDI
+*/
+#define USBHOST_MIDI                1
+
+/*
+* Maximum number of interfaces of a usb device
+*/
+#define MAX_INTF                    2
+
+/*
+* Maximum number of endpoints on each interface
+*/
+#define MAX_ENDPOINT_PER_INTERFACE  2
+
+/*
+* Maximum number of endpoint descriptors that can be allocated
+*/
+#define MAX_ENDPOINT               11 /*  USB FS 11 channel */
+
+#else
+/*
 * Maximum number of devices that can be connected
 * to the usb host
 */
@@ -77,7 +140,7 @@
 * Maximum number of endpoint descriptors that can be allocated
 */
 #define MAX_ENDPOINT                (MAX_DEVICE_CONNECTED * MAX_INTF * MAX_ENDPOINT_PER_INTERFACE)
-
+#endif
 /*
 * Maximum number of transfer descriptors that can be allocated
 */
@@ -86,6 +149,6 @@
 /*
 * usb_thread stack size
 */
-#define USB_THREAD_STACK            (256*4 + MAX_HUB_NB*256*4)
+#define USB_THREAD_STACK            (256*4 + 2*256*4)
 
 #endif