USBHost library with fixes

Dependencies:   mbed-rtos FATFileSystem

Dependents:   mbedica

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 
00020 /*
00021 * Maximum number of devices that can be connected
00022 * to the usb host
00023 */
00024 #define MAX_DEVICE_CONNECTED        5
00025 
00026 /*
00027 * Maximum of Hub connected to the usb host
00028 */
00029 #define MAX_HUB_NB                  2
00030 
00031 /*
00032 * Maximum number of ports on a USB hub
00033 */
00034 #define MAX_HUB_PORT                4
00035 
00036 /*
00037 * Enable USBHostMSD
00038 */
00039 #define USBHOST_MSD                 1
00040 
00041 /*
00042 * Enable USBHostKeyboard
00043 */
00044 #define USBHOST_KEYBOARD            1
00045 
00046 /*
00047 * Enable USBHostMouse
00048 */
00049 #define USBHOST_MOUSE               1
00050 
00051 /*
00052 * Enable USBHostSerial or USBHostMultiSerial (if set > 1)
00053 */
00054 #define USBHOST_SERIAL              1
00055 
00056 /*
00057 * Enable USB3Gmodule
00058 */
00059 #define USBHOST_3GMODULE            1 
00060 
00061 /*
00062 * Maximum number of interfaces of a usb device
00063 */
00064 #define MAX_INTF                    4
00065 
00066 /*
00067 * Maximum number of endpoints on each interface
00068 */
00069 #define MAX_ENDPOINT_PER_INTERFACE  3
00070 
00071 /*
00072 * Maximum number of endpoint descriptors that can be allocated
00073 */
00074 #define MAX_ENDPOINT                (MAX_DEVICE_CONNECTED * MAX_INTF * MAX_ENDPOINT_PER_INTERFACE)
00075 
00076 /*
00077 * Maximum number of transfer descriptors that can be allocated
00078 */
00079 #define MAX_TD                      (MAX_ENDPOINT*2)
00080 
00081 /*
00082 * usb_thread stack size
00083 */
00084 #define USB_THREAD_STACK            (256*4 + MAX_HUB_NB*256*4)
00085 
00086 #endif