Added .5MHz recovery clock to the AVRISP programmer project when in ISP programming...
[pub/USBasp.git] / LUFA / Drivers / USB / Class / Host / HIDParser.c
index 8ffde6c..6c81ae8 100644 (file)
@@ -1,13 +1,13 @@
 /*\r
              LUFA Library\r
-     Copyright (C) Dean Camera, 2009.\r
+     Copyright (C) Dean Camera, 2010.\r
               \r
   dean [at] fourwalledcubicle [dot] com\r
       www.fourwalledcubicle.com\r
 */\r
 \r
 /*\r
-  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
 \r
   Permission to use, copy, modify, distribute, and sell this \r
   software and its documentation for any purpose is hereby granted\r
@@ -340,8 +340,10 @@ uint16_t USB_GetHIDReportSize(HID_ReportInfo_t* const ParserData, const uint8_t
 {\r
        for (uint8_t i = 0; i < HID_MAX_REPORT_IDS; i++)\r
        {\r
+               uint16_t ReportSizeBits = ParserData->ReportIDSizes[i].ReportSizeBits[ReportType];\r
+       \r
                if (ParserData->ReportIDSizes[i].ReportID == ReportID)\r
-                 return ParserData->ReportIDSizes[i].ReportSizeBits[ReportType];\r
+                 return ((ReportSizeBits >> 3) + ((ReportSizeBits & 0x07) ? 1 : 0));\r
        }\r
 \r
        return 0;\r