Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of F401RE-USBHost by
USBHost/USBHALHost.h@26:78b505e6e49c, 2016-12-28 (annotated)
- Committer:
- Ownasaurus
- Date:
- Wed Dec 28 23:23:00 2016 +0000
- Revision:
- 26:78b505e6e49c
- Parent:
- 23:4ab8bc835303
first release for keyboard
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 | |
| va009039 | 23:4ab8bc835303 | 18 | #if defined(TARGET_NUCLEO_F401RE)||defined(TARGET_NUCLEO_F411RE)||defined(TARGET_NUCLEO_F446RE) |
| va009039 | 11:61843badd06e | 19 | #include "USBHALHost_F401RE.h" |
| va009039 |
17:4a710e2ba162 | 20 | #elif defined(TARGET_KL46Z)||defined(TARGET_KL25Z)||defined(TARGET_K64F) |
| va009039 | 11:61843badd06e | 21 | #include "USBHALHost_KL46Z.h" |
| va009039 |
18:61554f238584 | 22 | #elif defined(TARGET_LPC4088)||defined(TARGET_LPC1768) |
| va009039 |
18:61554f238584 | 23 | #include "USBHALHost_LPC4088.h" |
| va009039 | 11:61843badd06e | 24 | #else |
| va009039 | 11:61843badd06e | 25 | #error "target error" |
| va009039 | 11:61843badd06e | 26 | #endif |
| va009039 | 5:10bfc10afcc8 | 27 | |
| va009039 |
18:61554f238584 | 28 | #ifndef CTASSERT |
| va009039 |
18:61554f238584 | 29 | template <bool>struct CtAssert; |
| va009039 |
18:61554f238584 | 30 | template <>struct CtAssert<true> {}; |
| va009039 |
18:61554f238584 | 31 | #define CTASSERT(A) CtAssert<A>(); |
| va009039 |
18:61554f238584 | 32 | #endif // CTASSERT |
| va009039 | 5:10bfc10afcc8 | 33 | |
| va009039 |
18:61554f238584 | 34 |
