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.
Dependents: F401RE-USBHostMIDI_RecieveExample
Fork of F401RE-USBHost by
USBHostMouse.h@2:0cdac6bcc534, 2014-01-23 (annotated)
- Committer:
- va009039
- Date:
- Thu Jan 23 08:32:54 2014 +0000
- Revision:
- 2:0cdac6bcc534
- Parent:
- 0:5160ee0c522d
add retry in token transfer
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| va009039 | 0:5160ee0c522d | 1 | // Simple USBHost Mouse for FRDM-KL46Z |
| va009039 | 0:5160ee0c522d | 2 | #include "USBHost.h" |
| va009039 | 0:5160ee0c522d | 3 | |
| va009039 | 0:5160ee0c522d | 4 | class USBHostMouse { |
| va009039 | 0:5160ee0c522d | 5 | public: |
| va009039 | 0:5160ee0c522d | 6 | USBHostMouse() { |
| va009039 | 0:5160ee0c522d | 7 | host = USBHost::getHostInst(); |
| va009039 | 0:5160ee0c522d | 8 | } |
| va009039 | 0:5160ee0c522d | 9 | int readReport(uint8_t* data) { |
| va009039 | 0:5160ee0c522d | 10 | return host->InterruptRead(data, 4); |
| va009039 | 0:5160ee0c522d | 11 | } |
| va009039 | 0:5160ee0c522d | 12 | |
| va009039 | 0:5160ee0c522d | 13 | private: |
| va009039 | 0:5160ee0c522d | 14 | USBHost * host; |
| va009039 | 0:5160ee0c522d | 15 | }; |
| va009039 | 0:5160ee0c522d | 16 |
