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

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers USBHostConf.h Source File

USBHostConf.h

00001 /* mbed USBHost Library
00002  * Copyright (c) 2006-2013 ARM Limited
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef USBHOST_CONF_H
00018 #define USBHOST_CONF_H
00019 #if defined(TARGET_STM)
00020 /*
00021 * Maximum number of devices that can be connected
00022 * to the usb host
00023 */
00024 /*   hub + 2 devices */
00025 #define MAX_DEVICE_CONNECTED        5
00026 
00027 /*
00028 * Maximum of Hub connected to the usb host
00029 */
00030 #define MAX_HUB_NB                  3
00031 
00032 /*
00033 * Maximum number of ports on a USB hub
00034 */
00035 #define MAX_HUB_PORT                4
00036 
00037 /*
00038 * Enable USBHostMSD
00039 */
00040 #define USBHOST_MSD                 1
00041 
00042 /*
00043 * Enable USBHostKeyboard
00044 */
00045 #define USBHOST_KEYBOARD            1
00046 
00047 /*
00048 * Enable USBHostMouse
00049 */
00050 #define USBHOST_MOUSE               1
00051 
00052 /*
00053 * Enable USBHostSerial or USBHostMultiSerial (if set > 1)
00054 */
00055 #define USBHOST_SERIAL              1
00056 
00057 /*
00058 * Enable USB3Gmodule
00059 */
00060 #define USBHOST_3GMODULE            1
00061 
00062 /*
00063 * Enable USB MIDI
00064 */
00065 #define USBHOST_MIDI                1
00066 
00067 /*
00068 * Maximum number of interfaces of a usb device
00069 */
00070 #define MAX_INTF                    2
00071 
00072 /*
00073 * Maximum number of endpoints on each interface
00074 */
00075 #define MAX_ENDPOINT_PER_INTERFACE  2
00076 
00077 /*
00078 * Maximum number of endpoint descriptors that can be allocated
00079 */
00080 #define MAX_ENDPOINT               11 /*  USB FS 11 channel */
00081 
00082 #else
00083 /*
00084 * Maximum number of devices that can be connected
00085 * to the usb host
00086 */
00087 #define MAX_DEVICE_CONNECTED        5
00088 
00089 /*
00090 * Maximum of Hub connected to the usb host
00091 */
00092 #define MAX_HUB_NB                  2
00093 
00094 /*
00095 * Maximum number of ports on a USB hub
00096 */
00097 #define MAX_HUB_PORT                4
00098 
00099 /*
00100 * Enable USBHostMSD
00101 */
00102 #define USBHOST_MSD                 1
00103 
00104 /*
00105 * Enable USBHostKeyboard
00106 */
00107 #define USBHOST_KEYBOARD            1
00108 
00109 /*
00110 * Enable USBHostMouse
00111 */
00112 #define USBHOST_MOUSE               1
00113 
00114 /*
00115 * Enable USBHostSerial or USBHostMultiSerial (if set > 1)
00116 */
00117 #define USBHOST_SERIAL              1
00118 
00119 /*
00120 * Enable USB3Gmodule
00121 */
00122 #define USBHOST_3GMODULE            1
00123 
00124 /*
00125 * Enable USB MIDI
00126 */
00127 #define USBHOST_MIDI                1 
00128 
00129 /*
00130 * Maximum number of interfaces of a usb device
00131 */
00132 #define MAX_INTF                    4
00133 
00134 /*
00135 * Maximum number of endpoints on each interface
00136 */
00137 #define MAX_ENDPOINT_PER_INTERFACE  3
00138 
00139 /*
00140 * Maximum number of endpoint descriptors that can be allocated
00141 */
00142 #define MAX_ENDPOINT                (MAX_DEVICE_CONNECTED * MAX_INTF * MAX_ENDPOINT_PER_INTERFACE)
00143 #endif
00144 /*
00145 * Maximum number of transfer descriptors that can be allocated
00146 */
00147 #define MAX_TD                      (MAX_ENDPOINT*2)
00148 
00149 /*
00150 * usb_thread stack size
00151 */
00152 #define USB_THREAD_STACK            (256*4 + 2*256*4)
00153 
00154 #endif