File tree 1 file changed +9
-0
lines changed
hardware/arduino/avr/libraries/HID
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,8 @@ bool HID_::setup(USBSetup& setup)
101
101
if (requestType == REQUEST_HOSTTODEVICE_CLASS_INTERFACE)
102
102
{
103
103
if (request == HID_SET_PROTOCOL) {
104
+ // The USB Host tells us if we are in boot or report mode.
105
+ // This only works with a real boot compatible device.
104
106
protocol = setup.wValueL ;
105
107
return true ;
106
108
}
@@ -110,6 +112,13 @@ bool HID_::setup(USBSetup& setup)
110
112
}
111
113
if (request == HID_SET_REPORT)
112
114
{
115
+ // uint8_t reportID = setup.wValueL;
116
+ // uint16_t length = setup.wLength;
117
+ // uint8_t data[length];
118
+ // Make sure to not read more data than USB_EP_SIZE.
119
+ // You can read multiple times through a loop.
120
+ // The first byte (may!) contain the reportID on a multreport.
121
+ // USB_RecvControl(data, length);
113
122
}
114
123
}
115
124
You can’t perform that action at this time.
0 commit comments