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@24:5396b6a93262, 2016-06-13 (annotated)
- Committer:
- DieterGraef
- Date:
- Mon Jun 13 17:21:07 2016 +0000
- Revision:
- 24:5396b6a93262
- Parent:
- 12:b91fdea8c0a7
USB Host for STM32F746 DISCO Board. At the moment you can only use either the High Speed Port or the Fast Speed Port.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
va009039 | 12:b91fdea8c0a7 | 1 | /* mbed USBHost Library |
va009039 | 12:b91fdea8c0a7 | 2 | * Copyright (c) 2006-2013 ARM Limited |
va009039 | 12:b91fdea8c0a7 | 3 | * |
va009039 | 12:b91fdea8c0a7 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
va009039 | 12:b91fdea8c0a7 | 5 | * you may not use this file except in compliance with the License. |
va009039 | 12:b91fdea8c0a7 | 6 | * You may obtain a copy of the License at |
va009039 | 12:b91fdea8c0a7 | 7 | * |
va009039 | 12:b91fdea8c0a7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
va009039 | 12:b91fdea8c0a7 | 9 | * |
va009039 | 12:b91fdea8c0a7 | 10 | * Unless required by applicable law or agreed to in writing, software |
va009039 | 12:b91fdea8c0a7 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
va009039 | 12:b91fdea8c0a7 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
va009039 | 12:b91fdea8c0a7 | 13 | * See the License for the specific language governing permissions and |
va009039 | 12:b91fdea8c0a7 | 14 | * limitations under the License. |
va009039 | 12:b91fdea8c0a7 | 15 | */ |
va009039 | 12:b91fdea8c0a7 | 16 | |
va009039 | 12:b91fdea8c0a7 | 17 | #ifndef USBHOST_CONF_H |
va009039 | 12:b91fdea8c0a7 | 18 | #define USBHOST_CONF_H |
va009039 | 12:b91fdea8c0a7 | 19 | |
va009039 | 12:b91fdea8c0a7 | 20 | /* |
va009039 | 12:b91fdea8c0a7 | 21 | * Maximum number of devices that can be connected |
va009039 | 12:b91fdea8c0a7 | 22 | * to the usb host |
va009039 | 12:b91fdea8c0a7 | 23 | */ |
va009039 | 12:b91fdea8c0a7 | 24 | #define MAX_DEVICE_CONNECTED 5 |
va009039 | 12:b91fdea8c0a7 | 25 | |
va009039 | 12:b91fdea8c0a7 | 26 | /* |
va009039 | 12:b91fdea8c0a7 | 27 | * Maximum of Hub connected to the usb host |
va009039 | 12:b91fdea8c0a7 | 28 | */ |
va009039 | 12:b91fdea8c0a7 | 29 | #define MAX_HUB_NB 2 |
va009039 | 12:b91fdea8c0a7 | 30 | |
va009039 | 12:b91fdea8c0a7 | 31 | /* |
va009039 | 12:b91fdea8c0a7 | 32 | * Maximum number of ports on a USB hub |
va009039 | 12:b91fdea8c0a7 | 33 | */ |
va009039 | 12:b91fdea8c0a7 | 34 | #define MAX_HUB_PORT 4 |
va009039 | 12:b91fdea8c0a7 | 35 | |
va009039 | 12:b91fdea8c0a7 | 36 | /* |
va009039 | 12:b91fdea8c0a7 | 37 | * Enable USBHostMSD |
va009039 | 12:b91fdea8c0a7 | 38 | */ |
va009039 | 12:b91fdea8c0a7 | 39 | #define USBHOST_MSD 1 |
va009039 | 12:b91fdea8c0a7 | 40 | |
va009039 | 12:b91fdea8c0a7 | 41 | |
va009039 | 12:b91fdea8c0a7 | 42 | /* |
DieterGraef | 24:5396b6a93262 | 43 | * Enable USBHostMouseKeyboard |
va009039 | 12:b91fdea8c0a7 | 44 | */ |
DieterGraef | 24:5396b6a93262 | 45 | #define USBHOST_MOUSE_KEYBOARD 1 |
va009039 | 12:b91fdea8c0a7 | 46 | |
va009039 | 12:b91fdea8c0a7 | 47 | /* |
va009039 | 12:b91fdea8c0a7 | 48 | * Maximum number of interfaces of a usb device |
va009039 | 12:b91fdea8c0a7 | 49 | */ |
va009039 | 12:b91fdea8c0a7 | 50 | #define MAX_INTF 4 |
va009039 | 12:b91fdea8c0a7 | 51 | |
va009039 | 12:b91fdea8c0a7 | 52 | /* |
va009039 | 12:b91fdea8c0a7 | 53 | * usb_thread stack size |
va009039 | 12:b91fdea8c0a7 | 54 | */ |
va009039 | 12:b91fdea8c0a7 | 55 | #define USB_THREAD_STACK (256*4 + MAX_HUB_NB*256*4) |
va009039 | 12:b91fdea8c0a7 | 56 | |
va009039 | 12:b91fdea8c0a7 | 57 | #endif |