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/IUSBEnumerator.h@25:7d6d9fc471bf, 2016-06-17 (annotated)
- Committer:
- DieterGraef
- Date:
- Fri Jun 17 09:00:35 2016 +0000
- Revision:
- 25:7d6d9fc471bf
- Parent:
- 8:6463cd1964c0
USB Host now works with both Interfaces even in parallel. Some changes in the USB MSD driver to make it operable
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
va009039 | 8:6463cd1964c0 | 1 | /* mbed USBHost Library |
va009039 | 8:6463cd1964c0 | 2 | * Copyright (c) 2006-2013 ARM Limited |
va009039 | 8:6463cd1964c0 | 3 | * |
va009039 | 8:6463cd1964c0 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
va009039 | 8:6463cd1964c0 | 5 | * you may not use this file except in compliance with the License. |
va009039 | 8:6463cd1964c0 | 6 | * You may obtain a copy of the License at |
va009039 | 8:6463cd1964c0 | 7 | * |
va009039 | 8:6463cd1964c0 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
va009039 | 8:6463cd1964c0 | 9 | * |
va009039 | 8:6463cd1964c0 | 10 | * Unless required by applicable law or agreed to in writing, software |
va009039 | 8:6463cd1964c0 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
va009039 | 8:6463cd1964c0 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
va009039 | 8:6463cd1964c0 | 13 | * See the License for the specific language governing permissions and |
va009039 | 8:6463cd1964c0 | 14 | * limitations under the License. |
va009039 | 8:6463cd1964c0 | 15 | */ |
va009039 | 8:6463cd1964c0 | 16 | |
va009039 | 8:6463cd1964c0 | 17 | #ifndef IUSBENUMERATOR_H_ |
va009039 | 8:6463cd1964c0 | 18 | #define IUSBENUMERATOR_H_ |
va009039 | 8:6463cd1964c0 | 19 | |
va009039 | 8:6463cd1964c0 | 20 | #include "stdint.h" |
va009039 | 8:6463cd1964c0 | 21 | #include "USBEndpoint.h" |
va009039 | 8:6463cd1964c0 | 22 | |
va009039 | 8:6463cd1964c0 | 23 | /* |
va009039 | 8:6463cd1964c0 | 24 | Generic interface to implement for "smart" USB enumeration |
va009039 | 8:6463cd1964c0 | 25 | */ |
va009039 | 8:6463cd1964c0 | 26 | |
va009039 | 8:6463cd1964c0 | 27 | class IUSBEnumerator |
va009039 | 8:6463cd1964c0 | 28 | { |
va009039 | 8:6463cd1964c0 | 29 | public: |
va009039 | 8:6463cd1964c0 | 30 | virtual void setVidPid(uint16_t vid, uint16_t pid) = 0; |
va009039 | 8:6463cd1964c0 | 31 | virtual bool parseInterface(uint8_t intf_nb, uint8_t intf_class, uint8_t intf_subclass, uint8_t intf_protocol) = 0; //Must return true if the interface should be parsed |
va009039 | 8:6463cd1964c0 | 32 | virtual bool useEndpoint(uint8_t intf_nb, ENDPOINT_TYPE type, ENDPOINT_DIRECTION dir) = 0; //Must return true if the endpoint will be used |
va009039 | 8:6463cd1964c0 | 33 | }; |
va009039 | 8:6463cd1964c0 | 34 | |
va009039 | 8:6463cd1964c0 | 35 | #endif /*IUSBENUMERATOR_H_*/ |
va009039 | 8:6463cd1964c0 | 36 |