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