1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-17 02:52:12 +01:00

f4 usb hid: send correct report ID in dummy report

The desired report ID is in the LSB of the wValue field,
not the MSB.  This will now send the correct report ID
back to the host.
This commit is contained in:
Stacey Sheldon 2013-03-16 00:01:59 -04:00 committed by Alessio Morale
parent 232f9b2f8f
commit 366c573bab

View File

@ -407,7 +407,7 @@ static bool PIOS_USB_HID_IF_Setup(uint32_t usb_hid_id, struct usb_setup_request
break;
case USB_HID_REQ_GET_REPORT:
/* Give back a dummy input report */
dummy_report[0] = req->wValue >> 8; /* Report ID */
dummy_report[0] = req->wValue & 0xFF; /* Report ID */
dummy_report[1] = 0x00; /* dummy value */
PIOS_USBHOOK_CtrlTx(dummy_report,
MIN(sizeof(dummy_report), req->wLength));