Commit 67cb0708 authored by Dean Camera's avatar Dean Camera
Browse files

Fix HID Host Class driver sending incorrect ReportType values to the device...

Fix HID Host Class driver sending incorrect ReportType values to the device when issuing requests via the control pipe.
parent de0ccb3d
......@@ -159,7 +159,7 @@ uint8_t HID_Host_ReceiveReportByID(USB_ClassInfo_HID_Host_t* const HIDInterfaceI
{
.bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),
.bRequest = REQ_SetReport,
.wValue = (REPORT_ITEM_TYPE_In << 8) | ReportID,
.wValue = ((REPORT_ITEM_TYPE_In + 1) << 8) | ReportID,
.wIndex = HIDInterfaceInfo->State.InterfaceNumber,
.wLength = USB_GetHIDReportSize(HIDInterfaceInfo->Config.HIDParserData, ReportID, REPORT_ITEM_TYPE_In),
};
......@@ -246,7 +246,7 @@ uint8_t HID_Host_SendReportByID(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo
.bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),
.bRequest = REQ_SetReport,
#if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)
.wValue = (REPORT_ITEM_TYPE_Out << 8) | ReportID,
.wValue = ((REPORT_ITEM_TYPE_Out + 1) << 8) | ReportID,
#else
.wValue = 0,
#endif
......
......@@ -73,5 +73,5 @@
* \section Sec_LUFAPublications Publications Mentioning LUFA
* - Elektor Magazine, "My First AVR-USB" by Antoine Authier (feature), January 2010 Issue
* - Elektor Magazine, "USB is Cool/Sucks" by Jerry Jacobs and Chris Vossen (minor mention), January 2010 Issue
* - Elektor Magazine, "20 x Open Source", March 2010 Issue
* - Elektor Magazine, "20 x Open Source" by Jens Nickel, March 2010 Issue
*/
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment