Fix HID Host Class driver sending incorrect ReportType values to the device when...
authorDean Camera <dean@fourwalledcubicle.com>
Sun, 14 Feb 2010 22:13:11 +0000 (22:13 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Sun, 14 Feb 2010 22:13:11 +0000 (22:13 +0000)
LUFA/Drivers/USB/Class/Host/HID.c
LUFA/ManPages/LUFAPoweredProjects.txt

index 1e1dbcf..b95f73c 100644 (file)
@@ -159,7 +159,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        = (REPORT_ITEM_TYPE_In << 8) | ReportID,\r
+               .wValue        = ((REPORT_ITEM_TYPE_In + 1) << 8) | ReportID,\r
                .wIndex        = HIDInterfaceInfo->State.InterfaceNumber,\r
                .wLength       = USB_GetHIDReportSize(HIDInterfaceInfo->Config.HIDParserData, ReportID, REPORT_ITEM_TYPE_In),\r
        };\r
@@ -246,7 +246,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        = (REPORT_ITEM_TYPE_Out << 8) | ReportID,\r
+                       .wValue        = ((REPORT_ITEM_TYPE_Out + 1) << 8) | ReportID,\r
 #else\r
                        .wValue        = 0,\r
 #endif\r
index 454962a..b03b908 100644 (file)
@@ -73,5 +73,5 @@
  *  \section Sec_LUFAPublications Publications Mentioning LUFA\r
  *  - Elektor Magazine, "My First AVR-USB" by Antoine Authier (feature), January 2010 Issue\r
  *  - Elektor Magazine, "USB is Cool/Sucks" by Jerry Jacobs and Chris Vossen (minor mention), January 2010 Issue\r
- *  - Elektor Magazine, "20 x Open Source", March 2010 Issue\r
+ *  - Elektor Magazine, "20 x Open Source" by Jens Nickel, March 2010 Issue\r
  */
\ No newline at end of file