forked for unsupported target
Dependents: stm32-disco-example DISCO-F469NI_BD_SD_Card_Control
Fork of USBHOST by
USBHost/USBHostConf.h@1:ab240722d7ef, 2017-02-15 (annotated)
- Committer:
- frq08711@LMECWL0871.LME.ST.COM
- Date:
- Wed Feb 15 10:49:44 2017 +0100
- Revision:
- 1:ab240722d7ef
- Child:
- 2:df7fba2d5ac7
- Child:
- 5:fc157e6bd5a5
update to mbed 5.3.5
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 1 | /* mbed USBHost Library |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 2 | * Copyright (c) 2006-2013 ARM Limited |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 3 | * |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 5 | * you may not use this file except in compliance with the License. |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 6 | * You may obtain a copy of the License at |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 7 | * |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 9 | * |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 10 | * Unless required by applicable law or agreed to in writing, software |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 13 | * See the License for the specific language governing permissions and |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 14 | * limitations under the License. |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 15 | */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 16 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 17 | #ifndef USBHOST_CONF_H |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 18 | #define USBHOST_CONF_H |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 19 | #if defined(TARGET_STM) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 20 | /* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 21 | * Maximum number of devices that can be connected |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 22 | * to the usb host |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 23 | */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 24 | /* hub + 2 devices */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 25 | #define MAX_DEVICE_CONNECTED 3 |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 26 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 27 | /* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 28 | * Maximum of Hub connected to the usb host |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 29 | */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 30 | #define MAX_HUB_NB 0 |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 31 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 32 | /* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 33 | * Maximum number of ports on a USB hub |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 34 | */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 35 | #define MAX_HUB_PORT 2 |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 36 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 37 | /* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 38 | * Enable USBHostMSD |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 39 | */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 40 | #define USBHOST_MSD 1 |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 41 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 42 | /* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 43 | * Enable USBHostKeyboard |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 44 | */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 45 | #define USBHOST_KEYBOARD 1 |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 46 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 47 | /* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 48 | * Enable USBHostMouse |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 49 | */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 50 | #define USBHOST_MOUSE 1 |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 51 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 52 | /* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 53 | * Enable USBHostSerial or USBHostMultiSerial (if set > 1) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 54 | */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 55 | #define USBHOST_SERIAL 1 |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 56 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 57 | /* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 58 | * Enable USB3Gmodule |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 59 | */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 60 | #define USBHOST_3GMODULE 1 |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 61 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 62 | /* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 63 | * Enable USB MIDI |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 64 | */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 65 | #define USBHOST_MIDI 1 |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 66 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 67 | /* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 68 | * Maximum number of interfaces of a usb device |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 69 | */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 70 | #define MAX_INTF 2 |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 71 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 72 | /* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 73 | * Maximum number of endpoints on each interface |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 74 | */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 75 | #define MAX_ENDPOINT_PER_INTERFACE 2 |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 76 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 77 | /* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 78 | * Maximum number of endpoint descriptors that can be allocated |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 79 | */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 80 | #define MAX_ENDPOINT 11 /* USB FS 11 channel */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 81 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 82 | #else |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 83 | /* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 84 | * Maximum number of devices that can be connected |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 85 | * to the usb host |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 86 | */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 87 | #define MAX_DEVICE_CONNECTED 5 |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 88 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 89 | /* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 90 | * Maximum of Hub connected to the usb host |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 91 | */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 92 | #define MAX_HUB_NB 2 |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 93 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 94 | /* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 95 | * Maximum number of ports on a USB hub |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 96 | */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 97 | #define MAX_HUB_PORT 4 |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 98 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 99 | /* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 100 | * Enable USBHostMSD |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 101 | */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 102 | #define USBHOST_MSD 1 |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 103 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 104 | /* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 105 | * Enable USBHostKeyboard |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 106 | */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 107 | #define USBHOST_KEYBOARD 1 |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 108 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 109 | /* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 110 | * Enable USBHostMouse |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 111 | */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 112 | #define USBHOST_MOUSE 1 |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 113 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 114 | /* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 115 | * Enable USBHostSerial or USBHostMultiSerial (if set > 1) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 116 | */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 117 | #define USBHOST_SERIAL 1 |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 118 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 119 | /* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 120 | * Enable USB3Gmodule |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 121 | */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 122 | #define USBHOST_3GMODULE 1 |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 123 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 124 | /* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 125 | * Enable USB MIDI |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 126 | */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 127 | #define USBHOST_MIDI 1 |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 128 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 129 | /* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 130 | * Maximum number of interfaces of a usb device |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 131 | */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 132 | #define MAX_INTF 4 |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 133 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 134 | /* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 135 | * Maximum number of endpoints on each interface |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 136 | */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 137 | #define MAX_ENDPOINT_PER_INTERFACE 3 |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 138 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 139 | /* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 140 | * Maximum number of endpoint descriptors that can be allocated |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 141 | */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 142 | #define MAX_ENDPOINT (MAX_DEVICE_CONNECTED * MAX_INTF * MAX_ENDPOINT_PER_INTERFACE) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 143 | #endif |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 144 | /* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 145 | * Maximum number of transfer descriptors that can be allocated |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 146 | */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 147 | #define MAX_TD (MAX_ENDPOINT*2) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 148 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 149 | /* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 150 | * usb_thread stack size |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 151 | */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 152 | #define USB_THREAD_STACK (256*4 + 2*256*4) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 153 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 154 | #endif |