test
Dependents: Production_version1_0 Production_ver1_0 USBHost_TEST USBHost_Test5 ... more
Fork of USBHost by
USBHost/USBHostConf.h@37:f1e388e7b752, 2017-07-20 (annotated)
- Committer:
- Kojto
- Date:
- Thu Jul 20 10:13:56 2017 +0100
- Revision:
- 37:f1e388e7b752
- Parent:
- 25:45dcbf2ba11d
Update libraries (ed9d1da)
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 |
Kojto | 37:f1e388e7b752 | 19 | #if defined(TARGET_STM) |
Kojto | 37:f1e388e7b752 | 20 | /* |
Kojto | 37:f1e388e7b752 | 21 | * Maximum number of devices that can be connected |
Kojto | 37:f1e388e7b752 | 22 | * to the usb host |
Kojto | 37:f1e388e7b752 | 23 | */ |
Kojto | 37:f1e388e7b752 | 24 | /* hub + 2 devices */ |
Kojto | 37:f1e388e7b752 | 25 | #define MAX_DEVICE_CONNECTED 5 |
mbed_official | 0:a554658735bf | 26 | |
mbed_official | 0:a554658735bf | 27 | /* |
Kojto | 37:f1e388e7b752 | 28 | * Maximum of Hub connected to the usb host |
Kojto | 37:f1e388e7b752 | 29 | */ |
Kojto | 37:f1e388e7b752 | 30 | #define MAX_HUB_NB 3 |
Kojto | 37:f1e388e7b752 | 31 | |
Kojto | 37:f1e388e7b752 | 32 | /* |
Kojto | 37:f1e388e7b752 | 33 | * Maximum number of ports on a USB hub |
Kojto | 37:f1e388e7b752 | 34 | */ |
Kojto | 37:f1e388e7b752 | 35 | #define MAX_HUB_PORT 4 |
Kojto | 37:f1e388e7b752 | 36 | |
Kojto | 37:f1e388e7b752 | 37 | /* |
Kojto | 37:f1e388e7b752 | 38 | * Enable USBHostMSD |
Kojto | 37:f1e388e7b752 | 39 | */ |
Kojto | 37:f1e388e7b752 | 40 | #define USBHOST_MSD 1 |
Kojto | 37:f1e388e7b752 | 41 | |
Kojto | 37:f1e388e7b752 | 42 | /* |
Kojto | 37:f1e388e7b752 | 43 | * Enable USBHostKeyboard |
Kojto | 37:f1e388e7b752 | 44 | */ |
Kojto | 37:f1e388e7b752 | 45 | #define USBHOST_KEYBOARD 1 |
Kojto | 37:f1e388e7b752 | 46 | |
Kojto | 37:f1e388e7b752 | 47 | /* |
Kojto | 37:f1e388e7b752 | 48 | * Enable USBHostMouse |
Kojto | 37:f1e388e7b752 | 49 | */ |
Kojto | 37:f1e388e7b752 | 50 | #define USBHOST_MOUSE 1 |
Kojto | 37:f1e388e7b752 | 51 | |
Kojto | 37:f1e388e7b752 | 52 | /* |
Kojto | 37:f1e388e7b752 | 53 | * Enable USBHostSerial or USBHostMultiSerial (if set > 1) |
Kojto | 37:f1e388e7b752 | 54 | */ |
Kojto | 37:f1e388e7b752 | 55 | #define USBHOST_SERIAL 1 |
Kojto | 37:f1e388e7b752 | 56 | |
Kojto | 37:f1e388e7b752 | 57 | /* |
Kojto | 37:f1e388e7b752 | 58 | * Enable USB3Gmodule |
Kojto | 37:f1e388e7b752 | 59 | */ |
Kojto | 37:f1e388e7b752 | 60 | #define USBHOST_3GMODULE 1 |
Kojto | 37:f1e388e7b752 | 61 | |
Kojto | 37:f1e388e7b752 | 62 | /* |
Kojto | 37:f1e388e7b752 | 63 | * Enable USB MIDI |
Kojto | 37:f1e388e7b752 | 64 | */ |
Kojto | 37:f1e388e7b752 | 65 | #define USBHOST_MIDI 1 |
Kojto | 37:f1e388e7b752 | 66 | |
Kojto | 37:f1e388e7b752 | 67 | /* |
Kojto | 37:f1e388e7b752 | 68 | * Maximum number of interfaces of a usb device |
Kojto | 37:f1e388e7b752 | 69 | */ |
Kojto | 37:f1e388e7b752 | 70 | #define MAX_INTF 2 |
Kojto | 37:f1e388e7b752 | 71 | |
Kojto | 37:f1e388e7b752 | 72 | /* |
Kojto | 37:f1e388e7b752 | 73 | * Maximum number of endpoints on each interface |
Kojto | 37:f1e388e7b752 | 74 | */ |
Kojto | 37:f1e388e7b752 | 75 | #define MAX_ENDPOINT_PER_INTERFACE 2 |
Kojto | 37:f1e388e7b752 | 76 | |
Kojto | 37:f1e388e7b752 | 77 | /* |
Kojto | 37:f1e388e7b752 | 78 | * Maximum number of endpoint descriptors that can be allocated |
Kojto | 37:f1e388e7b752 | 79 | */ |
Kojto | 37:f1e388e7b752 | 80 | #define MAX_ENDPOINT 11 /* USB FS 11 channel */ |
Kojto | 37:f1e388e7b752 | 81 | |
Kojto | 37:f1e388e7b752 | 82 | #else |
Kojto | 37:f1e388e7b752 | 83 | /* |
mbed_official | 0:a554658735bf | 84 | * Maximum number of devices that can be connected |
mbed_official | 0:a554658735bf | 85 | * to the usb host |
mbed_official | 0:a554658735bf | 86 | */ |
samux | 4:b320d68e98e7 | 87 | #define MAX_DEVICE_CONNECTED 5 |
mbed_official | 0:a554658735bf | 88 | |
mbed_official | 0:a554658735bf | 89 | /* |
mbed_official | 0:a554658735bf | 90 | * Maximum of Hub connected to the usb host |
mbed_official | 0:a554658735bf | 91 | */ |
samux | 4:b320d68e98e7 | 92 | #define MAX_HUB_NB 2 |
mbed_official | 0:a554658735bf | 93 | |
mbed_official | 0:a554658735bf | 94 | /* |
mbed_official | 0:a554658735bf | 95 | * Maximum number of ports on a USB hub |
mbed_official | 0:a554658735bf | 96 | */ |
mbed_official | 0:a554658735bf | 97 | #define MAX_HUB_PORT 4 |
mbed_official | 0:a554658735bf | 98 | |
mbed_official | 0:a554658735bf | 99 | /* |
mbed_official | 0:a554658735bf | 100 | * Enable USBHostMSD |
mbed_official | 0:a554658735bf | 101 | */ |
mbed_official | 0:a554658735bf | 102 | #define USBHOST_MSD 1 |
mbed_official | 0:a554658735bf | 103 | |
mbed_official | 0:a554658735bf | 104 | /* |
mbed_official | 0:a554658735bf | 105 | * Enable USBHostKeyboard |
mbed_official | 0:a554658735bf | 106 | */ |
mbed_official | 0:a554658735bf | 107 | #define USBHOST_KEYBOARD 1 |
mbed_official | 0:a554658735bf | 108 | |
mbed_official | 0:a554658735bf | 109 | /* |
mbed_official | 0:a554658735bf | 110 | * Enable USBHostMouse |
mbed_official | 0:a554658735bf | 111 | */ |
mbed_official | 0:a554658735bf | 112 | #define USBHOST_MOUSE 1 |
mbed_official | 0:a554658735bf | 113 | |
mbed_official | 0:a554658735bf | 114 | /* |
mbed_official | 19:bd46ea19486b | 115 | * Enable USBHostSerial or USBHostMultiSerial (if set > 1) |
mbed_official | 0:a554658735bf | 116 | */ |
mbed_official | 0:a554658735bf | 117 | #define USBHOST_SERIAL 1 |
mbed_official | 0:a554658735bf | 118 | |
mbed_official | 0:a554658735bf | 119 | /* |
mbed_official | 17:c7b1b8451598 | 120 | * Enable USB3Gmodule |
mbed_official | 17:c7b1b8451598 | 121 | */ |
mbed_official | 24:868cbfe611a7 | 122 | #define USBHOST_3GMODULE 1 |
mbed_official | 17:c7b1b8451598 | 123 | |
mbed_official | 17:c7b1b8451598 | 124 | /* |
mbed_official | 25:45dcbf2ba11d | 125 | * Enable USB MIDI |
mbed_official | 25:45dcbf2ba11d | 126 | */ |
mbed_official | 25:45dcbf2ba11d | 127 | #define USBHOST_MIDI 1 |
mbed_official | 25:45dcbf2ba11d | 128 | |
mbed_official | 25:45dcbf2ba11d | 129 | /* |
mbed_official | 0:a554658735bf | 130 | * Maximum number of interfaces of a usb device |
mbed_official | 0:a554658735bf | 131 | */ |
mbed_official | 17:c7b1b8451598 | 132 | #define MAX_INTF 4 |
mbed_official | 0:a554658735bf | 133 | |
mbed_official | 0:a554658735bf | 134 | /* |
mbed_official | 0:a554658735bf | 135 | * Maximum number of endpoints on each interface |
mbed_official | 0:a554658735bf | 136 | */ |
mbed_official | 0:a554658735bf | 137 | #define MAX_ENDPOINT_PER_INTERFACE 3 |
mbed_official | 0:a554658735bf | 138 | |
mbed_official | 0:a554658735bf | 139 | /* |
mbed_official | 0:a554658735bf | 140 | * Maximum number of endpoint descriptors that can be allocated |
mbed_official | 0:a554658735bf | 141 | */ |
mbed_official | 0:a554658735bf | 142 | #define MAX_ENDPOINT (MAX_DEVICE_CONNECTED * MAX_INTF * MAX_ENDPOINT_PER_INTERFACE) |
Kojto | 37:f1e388e7b752 | 143 | #endif |
mbed_official | 0:a554658735bf | 144 | /* |
mbed_official | 0:a554658735bf | 145 | * Maximum number of transfer descriptors that can be allocated |
mbed_official | 0:a554658735bf | 146 | */ |
mbed_official | 0:a554658735bf | 147 | #define MAX_TD (MAX_ENDPOINT*2) |
mbed_official | 0:a554658735bf | 148 | |
mbed_official | 0:a554658735bf | 149 | /* |
mbed_official | 0:a554658735bf | 150 | * usb_thread stack size |
mbed_official | 0:a554658735bf | 151 | */ |
Kojto | 37:f1e388e7b752 | 152 | #define USB_THREAD_STACK (256*4 + 2*256*4) |
mbed_official | 0:a554658735bf | 153 | |
mbed_official | 0:a554658735bf | 154 | #endif |