aboutsummaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'libraries')
-rw-r--r--libraries/HID/HID.cpp9
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);
}
}