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/USBHALHost.h@25:7d6d9fc471bf, 2016-06-17 (annotated)
- Committer:
- DieterGraef
- Date:
- Fri Jun 17 09:00:35 2016 +0000
- Revision:
- 25:7d6d9fc471bf
- Parent:
- 24:5396b6a93262
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 |
18:61554f238584 | 1 | #include "mbed.h" |
va009039 |
18:61554f238584 | 2 | |
va009039 |
18:61554f238584 | 3 | struct SETUP_PACKET { |
va009039 |
18:61554f238584 | 4 | uint8_t bmRequestType; |
va009039 |
18:61554f238584 | 5 | uint8_t bRequest; |
va009039 |
18:61554f238584 | 6 | uint16_t wValue; |
va009039 |
18:61554f238584 | 7 | uint16_t wIndex; |
va009039 |
18:61554f238584 | 8 | uint16_t wLength; |
va009039 |
18:61554f238584 | 9 | SETUP_PACKET(uint8_t RequestType, uint8_t Request, uint16_t Value, uint16_t Index, uint16_t Length) { |
va009039 |
18:61554f238584 | 10 | bmRequestType = RequestType; |
va009039 |
18:61554f238584 | 11 | bRequest = Request; |
va009039 |
18:61554f238584 | 12 | wValue = Value; |
va009039 |
18:61554f238584 | 13 | wIndex = Index; |
va009039 |
18:61554f238584 | 14 | wLength = Length; |
va009039 |
18:61554f238584 | 15 | } |
va009039 |
18:61554f238584 | 16 | }; |
va009039 |
18:61554f238584 | 17 | |
DieterGraef | 24:5396b6a93262 | 18 | #if defined(TARGET_DISCO_F746NG) |
DieterGraef | 24:5396b6a93262 | 19 | #include "USBHALHost_F746NG.h" |
va009039 | 11:61843badd06e | 20 | #else |
va009039 | 11:61843badd06e | 21 | #error "target error" |
va009039 | 11:61843badd06e | 22 | #endif |
va009039 | 5:10bfc10afcc8 | 23 | |
va009039 |
18:61554f238584 | 24 | #ifndef CTASSERT |
va009039 |
18:61554f238584 | 25 | template <bool>struct CtAssert; |
va009039 |
18:61554f238584 | 26 | template <>struct CtAssert<true> {}; |
va009039 |
18:61554f238584 | 27 | #define CTASSERT(A) CtAssert<A>(); |
va009039 |
18:61554f238584 | 28 | #endif // CTASSERT |
va009039 | 5:10bfc10afcc8 | 29 | |
va009039 |
18:61554f238584 | 30 |