diff options
author | NicoHood <NicoHood@users.noreply.github.com> | 2015-10-10 13:11:31 +0200 |
---|---|---|
committer | NicoHood <NicoHood@users.noreply.github.com> | 2015-10-10 13:11:31 +0200 |
commit | 8237e5422d955b1329b8626e18d95b9f6ea71864 (patch) | |
tree | c3cc81de8cf01f3aedb685aaf8be0479de65470b /libraries/HID | |
parent | e3977037aea0a8cf4e4b9d518c39747514745e7c (diff) |
[PHID] Added some hints for further optional implementations
Diffstat (limited to 'libraries/HID')
-rw-r--r-- | libraries/HID/HID.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libraries/HID/HID.cpp b/libraries/HID/HID.cpp index 841de4a..8da7d2c 100644 --- a/libraries/HID/HID.cpp +++ b/libraries/HID/HID.cpp @@ -101,6 +101,8 @@ bool HID_::setup(USBSetup& setup) if (requestType == REQUEST_HOSTTODEVICE_CLASS_INTERFACE) { if (request == HID_SET_PROTOCOL) { + // The USB Host tells us if we are in boot or report mode. + // This only works with a real boot compatible device. protocol = setup.wValueL; return true; } @@ -110,6 +112,13 @@ bool HID_::setup(USBSetup& setup) } if (request == HID_SET_REPORT) { + //uint8_t reportID = setup.wValueL; + //uint16_t length = setup.wLength; + //uint8_t data[length]; + // Make sure to not read more data than USB_EP_SIZE. + // You can read multiple times through a loop. + // The first byte (may!) contain the reportID on a multreport. + //USB_RecvControl(data, length); } } |