Simple USBHost library for STM32F746NG Discovery board. Only either the Fastspeed or the Highspeed port can be used( not both together)
Dependents: DISCO-F746NG_USB_Host
Fork of KL46Z-USBHost by
USBHost/USBHostConf.h@9:7f9f64cf5ded, 2014-02-03 (annotated)
- Committer:
- va009039
- Date:
- Mon Feb 03 13:00:16 2014 +0000
- Revision:
- 9:7f9f64cf5ded
- Parent:
- 3:a3872f7593e2
add interrupt write transfer.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
va009039 | 3:a3872f7593e2 | 1 | /* mbed USBHost Library |
va009039 | 3:a3872f7593e2 | 2 | * Copyright (c) 2006-2013 ARM Limited |
va009039 | 3:a3872f7593e2 | 3 | * |
va009039 | 3:a3872f7593e2 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
va009039 | 3:a3872f7593e2 | 5 | * you may not use this file except in compliance with the License. |
va009039 | 3:a3872f7593e2 | 6 | * You may obtain a copy of the License at |
va009039 | 3:a3872f7593e2 | 7 | * |
va009039 | 3:a3872f7593e2 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
va009039 | 3:a3872f7593e2 | 9 | * |
va009039 | 3:a3872f7593e2 | 10 | * Unless required by applicable law or agreed to in writing, software |
va009039 | 3:a3872f7593e2 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
va009039 | 3:a3872f7593e2 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
va009039 | 3:a3872f7593e2 | 13 | * See the License for the specific language governing permissions and |
va009039 | 3:a3872f7593e2 | 14 | * limitations under the License. |
va009039 | 3:a3872f7593e2 | 15 | */ |
va009039 | 3:a3872f7593e2 | 16 | |
va009039 | 3:a3872f7593e2 | 17 | #ifndef USBHOST_CONF_H |
va009039 | 3:a3872f7593e2 | 18 | #define USBHOST_CONF_H |
va009039 | 3:a3872f7593e2 | 19 | |
va009039 | 3:a3872f7593e2 | 20 | /* |
va009039 | 3:a3872f7593e2 | 21 | * Maximum number of devices that can be connected |
va009039 | 3:a3872f7593e2 | 22 | * to the usb host |
va009039 | 3:a3872f7593e2 | 23 | */ |
va009039 | 3:a3872f7593e2 | 24 | #define MAX_DEVICE_CONNECTED 5 |
va009039 | 3:a3872f7593e2 | 25 | |
va009039 | 3:a3872f7593e2 | 26 | /* |
va009039 | 3:a3872f7593e2 | 27 | * Maximum of Hub connected to the usb host |
va009039 | 3:a3872f7593e2 | 28 | */ |
va009039 | 3:a3872f7593e2 | 29 | #define MAX_HUB_NB 2 |
va009039 | 3:a3872f7593e2 | 30 | |
va009039 | 3:a3872f7593e2 | 31 | /* |
va009039 | 3:a3872f7593e2 | 32 | * Maximum number of ports on a USB hub |
va009039 | 3:a3872f7593e2 | 33 | */ |
va009039 | 3:a3872f7593e2 | 34 | #define MAX_HUB_PORT 4 |
va009039 | 3:a3872f7593e2 | 35 | |
va009039 | 3:a3872f7593e2 | 36 | /* |
va009039 | 3:a3872f7593e2 | 37 | * Enable USBHostMSD |
va009039 | 3:a3872f7593e2 | 38 | */ |
va009039 | 3:a3872f7593e2 | 39 | #define USBHOST_MSD 1 |
va009039 | 3:a3872f7593e2 | 40 | |
va009039 | 3:a3872f7593e2 | 41 | /* |
va009039 | 3:a3872f7593e2 | 42 | * Enable USBHostKeyboard |
va009039 | 3:a3872f7593e2 | 43 | */ |
va009039 | 3:a3872f7593e2 | 44 | #define USBHOST_KEYBOARD 1 |
va009039 | 3:a3872f7593e2 | 45 | |
va009039 | 3:a3872f7593e2 | 46 | /* |
va009039 | 3:a3872f7593e2 | 47 | * Enable USBHostMouse |
va009039 | 3:a3872f7593e2 | 48 | */ |
va009039 | 3:a3872f7593e2 | 49 | #define USBHOST_MOUSE 1 |
va009039 | 3:a3872f7593e2 | 50 | |
va009039 | 3:a3872f7593e2 | 51 | /* |
va009039 | 3:a3872f7593e2 | 52 | * Enable USBHostSerial or USBHostMultiSerial (if set > 1) |
va009039 | 3:a3872f7593e2 | 53 | */ |
va009039 | 3:a3872f7593e2 | 54 | #define USBHOST_SERIAL 1 |
va009039 | 3:a3872f7593e2 | 55 | |
va009039 | 3:a3872f7593e2 | 56 | /* |
va009039 | 3:a3872f7593e2 | 57 | * Enable USB3Gmodule |
va009039 | 3:a3872f7593e2 | 58 | */ |
va009039 | 3:a3872f7593e2 | 59 | #define USBHOST_3GMODULE 1 |
va009039 | 3:a3872f7593e2 | 60 | |
va009039 | 3:a3872f7593e2 | 61 | /* |
va009039 | 3:a3872f7593e2 | 62 | * Maximum number of interfaces of a usb device |
va009039 | 3:a3872f7593e2 | 63 | */ |
va009039 | 3:a3872f7593e2 | 64 | #define MAX_INTF 4 |
va009039 | 3:a3872f7593e2 | 65 | |
va009039 | 3:a3872f7593e2 | 66 | /* |
va009039 | 3:a3872f7593e2 | 67 | * usb_thread stack size |
va009039 | 3:a3872f7593e2 | 68 | */ |
va009039 | 3:a3872f7593e2 | 69 | #define USB_THREAD_STACK (256*4 + MAX_HUB_NB*256*4) |
va009039 | 3:a3872f7593e2 | 70 | |
va009039 | 3:a3872f7593e2 | 71 | #endif |