MyUSBHost library
Fork of USBHost by
USBHost/USBHostConf.h@24:868cbfe611a7, 2014-06-03 (annotated)
- Committer:
- mbed_official
- Date:
- Tue Jun 03 11:30:38 2014 +0100
- Revision:
- 24:868cbfe611a7
- Parent:
- 19:bd46ea19486b
- Child:
- 25:45dcbf2ba11d
Synchronized with git revision bcacbb9fbf3432829227430830cca4315b57c1b9
Full URL: https://github.com/mbedmicro/mbed/commit/bcacbb9fbf3432829227430830cca4315b57c1b9/
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
samux | 8:93da8ea2708b | 1 | /* mbed USBHost Library |
samux | 8:93da8ea2708b | 2 | * Copyright (c) 2006-2013 ARM Limited |
samux | 8:93da8ea2708b | 3 | * |
samux | 8:93da8ea2708b | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
samux | 8:93da8ea2708b | 5 | * you may not use this file except in compliance with the License. |
samux | 8:93da8ea2708b | 6 | * You may obtain a copy of the License at |
samux | 8:93da8ea2708b | 7 | * |
samux | 8:93da8ea2708b | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
samux | 8:93da8ea2708b | 9 | * |
samux | 8:93da8ea2708b | 10 | * Unless required by applicable law or agreed to in writing, software |
samux | 8:93da8ea2708b | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
samux | 8:93da8ea2708b | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
samux | 8:93da8ea2708b | 13 | * See the License for the specific language governing permissions and |
samux | 8:93da8ea2708b | 14 | * limitations under the License. |
samux | 8:93da8ea2708b | 15 | */ |
samux | 8:93da8ea2708b | 16 | |
mbed_official | 0:a554658735bf | 17 | #ifndef USBHOST_CONF_H |
mbed_official | 0:a554658735bf | 18 | #define USBHOST_CONF_H |
mbed_official | 0:a554658735bf | 19 | |
mbed_official | 0:a554658735bf | 20 | /* |
mbed_official | 0:a554658735bf | 21 | * Maximum number of devices that can be connected |
mbed_official | 0:a554658735bf | 22 | * to the usb host |
mbed_official | 0:a554658735bf | 23 | */ |
samux | 4:b320d68e98e7 | 24 | #define MAX_DEVICE_CONNECTED 5 |
mbed_official | 0:a554658735bf | 25 | |
mbed_official | 0:a554658735bf | 26 | /* |
mbed_official | 0:a554658735bf | 27 | * Maximum of Hub connected to the usb host |
mbed_official | 0:a554658735bf | 28 | */ |
samux | 4:b320d68e98e7 | 29 | #define MAX_HUB_NB 2 |
mbed_official | 0:a554658735bf | 30 | |
mbed_official | 0:a554658735bf | 31 | /* |
mbed_official | 0:a554658735bf | 32 | * Maximum number of ports on a USB hub |
mbed_official | 0:a554658735bf | 33 | */ |
mbed_official | 0:a554658735bf | 34 | #define MAX_HUB_PORT 4 |
mbed_official | 0:a554658735bf | 35 | |
mbed_official | 0:a554658735bf | 36 | /* |
mbed_official | 0:a554658735bf | 37 | * Enable USBHostMSD |
mbed_official | 0:a554658735bf | 38 | */ |
mbed_official | 0:a554658735bf | 39 | #define USBHOST_MSD 1 |
mbed_official | 0:a554658735bf | 40 | |
mbed_official | 0:a554658735bf | 41 | /* |
mbed_official | 0:a554658735bf | 42 | * Enable USBHostKeyboard |
mbed_official | 0:a554658735bf | 43 | */ |
mbed_official | 0:a554658735bf | 44 | #define USBHOST_KEYBOARD 1 |
mbed_official | 0:a554658735bf | 45 | |
mbed_official | 0:a554658735bf | 46 | /* |
mbed_official | 0:a554658735bf | 47 | * Enable USBHostMouse |
mbed_official | 0:a554658735bf | 48 | */ |
mbed_official | 0:a554658735bf | 49 | #define USBHOST_MOUSE 1 |
mbed_official | 0:a554658735bf | 50 | |
mbed_official | 0:a554658735bf | 51 | /* |
mbed_official | 19:bd46ea19486b | 52 | * Enable USBHostSerial or USBHostMultiSerial (if set > 1) |
mbed_official | 0:a554658735bf | 53 | */ |
mbed_official | 0:a554658735bf | 54 | #define USBHOST_SERIAL 1 |
mbed_official | 0:a554658735bf | 55 | |
mbed_official | 0:a554658735bf | 56 | /* |
mbed_official | 17:c7b1b8451598 | 57 | * Enable USB3Gmodule |
mbed_official | 17:c7b1b8451598 | 58 | */ |
mbed_official | 24:868cbfe611a7 | 59 | #define USBHOST_3GMODULE 1 |
mbed_official | 17:c7b1b8451598 | 60 | |
mbed_official | 17:c7b1b8451598 | 61 | /* |
mbed_official | 0:a554658735bf | 62 | * Maximum number of interfaces of a usb device |
mbed_official | 0:a554658735bf | 63 | */ |
mbed_official | 17:c7b1b8451598 | 64 | #define MAX_INTF 4 |
mbed_official | 0:a554658735bf | 65 | |
mbed_official | 0:a554658735bf | 66 | /* |
mbed_official | 0:a554658735bf | 67 | * Maximum number of endpoints on each interface |
mbed_official | 0:a554658735bf | 68 | */ |
mbed_official | 0:a554658735bf | 69 | #define MAX_ENDPOINT_PER_INTERFACE 3 |
mbed_official | 0:a554658735bf | 70 | |
mbed_official | 0:a554658735bf | 71 | /* |
mbed_official | 0:a554658735bf | 72 | * Maximum number of endpoint descriptors that can be allocated |
mbed_official | 0:a554658735bf | 73 | */ |
mbed_official | 0:a554658735bf | 74 | #define MAX_ENDPOINT (MAX_DEVICE_CONNECTED * MAX_INTF * MAX_ENDPOINT_PER_INTERFACE) |
mbed_official | 0:a554658735bf | 75 | |
mbed_official | 0:a554658735bf | 76 | /* |
mbed_official | 0:a554658735bf | 77 | * Maximum number of transfer descriptors that can be allocated |
mbed_official | 0:a554658735bf | 78 | */ |
mbed_official | 0:a554658735bf | 79 | #define MAX_TD (MAX_ENDPOINT*2) |
mbed_official | 0:a554658735bf | 80 | |
mbed_official | 0:a554658735bf | 81 | /* |
mbed_official | 0:a554658735bf | 82 | * usb_thread stack size |
mbed_official | 0:a554658735bf | 83 | */ |
samux | 4:b320d68e98e7 | 84 | #define USB_THREAD_STACK (256*4 + MAX_HUB_NB*256*4) |
mbed_official | 0:a554658735bf | 85 | |
mbed_official | 0:a554658735bf | 86 | #endif |