test
Dependents: Production_version1_0 Production_ver1_0 USBHost_TEST USBHost_Test5 ... more
Fork of USBHost by
USBHost/IUSBEnumerator.h@0:a554658735bf, 2013-03-06 (annotated)
- Committer:
- mbed_official
- Date:
- Wed Mar 06 16:27:14 2013 +0000
- Revision:
- 0:a554658735bf
- Child:
- 8:93da8ea2708b
first commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 0:a554658735bf | 1 | /* Copyright (c) 2010-2012 mbed.org, MIT License |
mbed_official | 0:a554658735bf | 2 | * |
mbed_official | 0:a554658735bf | 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software |
mbed_official | 0:a554658735bf | 4 | * and associated documentation files (the "Software"), to deal in the Software without |
mbed_official | 0:a554658735bf | 5 | * restriction, including without limitation the rights to use, copy, modify, merge, publish, |
mbed_official | 0:a554658735bf | 6 | * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the |
mbed_official | 0:a554658735bf | 7 | * Software is furnished to do so, subject to the following conditions: |
mbed_official | 0:a554658735bf | 8 | * |
mbed_official | 0:a554658735bf | 9 | * The above copyright notice and this permission notice shall be included in all copies or |
mbed_official | 0:a554658735bf | 10 | * substantial portions of the Software. |
mbed_official | 0:a554658735bf | 11 | * |
mbed_official | 0:a554658735bf | 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING |
mbed_official | 0:a554658735bf | 13 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
mbed_official | 0:a554658735bf | 14 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
mbed_official | 0:a554658735bf | 15 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
mbed_official | 0:a554658735bf | 16 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
mbed_official | 0:a554658735bf | 17 | */ |
mbed_official | 0:a554658735bf | 18 | |
mbed_official | 0:a554658735bf | 19 | #ifndef IUSBENUMERATOR_H_ |
mbed_official | 0:a554658735bf | 20 | #define IUSBENUMERATOR_H_ |
mbed_official | 0:a554658735bf | 21 | |
mbed_official | 0:a554658735bf | 22 | #include "stdint.h" |
mbed_official | 0:a554658735bf | 23 | #include "USBEndpoint.h" |
mbed_official | 0:a554658735bf | 24 | |
mbed_official | 0:a554658735bf | 25 | /* |
mbed_official | 0:a554658735bf | 26 | Generic interface to implement for "smart" USB enumeration |
mbed_official | 0:a554658735bf | 27 | */ |
mbed_official | 0:a554658735bf | 28 | |
mbed_official | 0:a554658735bf | 29 | class IUSBEnumerator |
mbed_official | 0:a554658735bf | 30 | { |
mbed_official | 0:a554658735bf | 31 | public: |
mbed_official | 0:a554658735bf | 32 | virtual void setVidPid(uint16_t vid, uint16_t pid) = 0; |
mbed_official | 0:a554658735bf | 33 | 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 |
mbed_official | 0:a554658735bf | 34 | virtual bool useEndpoint(uint8_t intf_nb, ENDPOINT_TYPE type, ENDPOINT_DIRECTION dir) = 0; //Must return true if the endpoint will be used |
mbed_official | 0:a554658735bf | 35 | }; |
mbed_official | 0:a554658735bf | 36 | |
mbed_official | 0:a554658735bf | 37 | #endif /*IUSBENUMERATOR_H_*/ |
mbed_official | 0:a554658735bf | 38 |