File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -133,13 +133,21 @@ bool HID_::setup(USBSetup& setup)
133
133
}
134
134
if (request == HID_SET_REPORT)
135
135
{
136
- // uint8_t reportID = setup.wValueL;
137
- // uint16_t length = setup.wLength;
138
- // uint8_t data[length];
136
+ uint8_t reportID = setup.wValueL ;
137
+ uint16_t length = setup.wLength ;
138
+ uint8_t data[length];
139
139
// Make sure to not read more data than USB_EP_SIZE.
140
140
// You can read multiple times through a loop.
141
141
// The first byte (may!) contain the reportID on a multreport.
142
142
// USB_RecvControl(data, length);
143
+ if ((reportID == 2 ) && (length == 2 ))
144
+ {
145
+ if (2 == USB_RecvControl (data, length))
146
+ {
147
+ _keyboardLedsStatus = data[1 ];
148
+ return true ;
149
+ }
150
+ }
143
151
}
144
152
}
145
153
You can’t perform that action at this time.
0 commit comments