Skip to content

Commit 9d04a21

Browse files
author
Filip Jagodzinski
committed
USBHID: Fix the initial HID report read operation
The first 4 bytes received were lost due to a wrong address. Read the output report into HID_REPORT.data.
1 parent a5185fb commit 9d04a21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

usb/device/USBHID/USBHID.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ void USBHID::callback_set_configuration(uint8_t configuration)
380380
endpoint_add(_int_out, MAX_HID_REPORT_SIZE, USB_EP_TYPE_INT, &USBHID::_read_isr);
381381

382382
// We activate the endpoint to be able to recceive data
383-
read_start(_int_out, (uint8_t *)&_output_report, MAX_HID_REPORT_SIZE);
383+
read_start(_int_out, _output_report.data, MAX_HID_REPORT_SIZE);
384384
_read_idle = false;
385385

386386

0 commit comments

Comments
 (0)