Fixed HID host Class driver report send/receive report broken when issued through...
[pub/USBasp.git] / LUFA / Drivers / USB / Class / Host / HID.c
index 7d9b3b5..a82fe53 100644 (file)
@@ -162,7 +162,7 @@ uint8_t HID_Host_ReceiveReportByID(USB_ClassInfo_HID_Host_t* const HIDInterfaceI
        {\r
                .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),\r
                .bRequest      = REQ_SetReport,\r
-               .wValue        = ReportID,\r
+               .wValue        = (REPORT_ITEM_TYPE_In << 8) | ReportID,\r
                .wIndex        = HIDInterfaceInfo->State.InterfaceNumber,\r
                .wLength       = USB_GetHIDReportSize(HIDInterfaceInfo->Config.HIDParserData, ReportID, REPORT_ITEM_TYPE_In),\r
        };\r
@@ -249,7 +249,7 @@ uint8_t HID_Host_SendReportByID(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo
                        .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),\r
                        .bRequest      = REQ_SetReport,\r
 #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)\r
-                       .wValue        = ReportID,\r
+                       .wValue        = (REPORT_ITEM_TYPE_Out << 8) | ReportID,\r
 #else\r
                        .wValue        = 0,\r
 #endif\r