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