Fixed HID Report Descriptor Parser not correctly resetting internal states when a REPORT ID element is encountered.
if (!(FoundData))\r
continue;\r
\r
- int16_t DeltaMovement;\r
- \r
- if (ReportItem->Attributes.BitSize > 8)\r
- DeltaMovement = (int16_t)ReportItem->Value;\r
- else\r
- DeltaMovement = (int8_t)ReportItem->Value;\r
+ int16_t DeltaMovement = (int16_t)(ReportItem->Value << (16 - ReportItem->Attributes.BitSize));\r
\r
/* Determine if the report is for the X or Y delta movement */\r
if (ReportItem->Attributes.Usage.Usage == USAGE_X)\r
break;\r
case (TYPE_GLOBAL | TAG_GLOBAL_REPORTID):\r
CurrStateTable->ReportID = ReportItemData;\r
+ BitOffsetIn = 0;\r
+ BitOffsetOut = 0;\r
break;\r
case (TYPE_LOCAL | TAG_LOCAL_USAGE):\r
if (UsageStackSize == HID_USAGE_STACK_DEPTH)\r
* - Fixed Mouse/Keyboard demos not performing the correct arithmetic on the Idle period at the right times (thanks to Brian Dickman)\r
* - Fixed GenericHID failing HID class tests due to incorrect Logical Minimum and Logical Maximum values (thanks to Søren Greiner)\r
* - Fixed incorrect PIPE_EPNUM_MASK mask causing pipe failures on devices with endpoint addresses of 8 and above (thanks to John Andrews)\r
+ * - Fixed report data alignment issues in the MouseHostWithParser demo when X and Y movement data size is not a multiple of 8 bits\r
+ * - Fixed HID Report Descriptor Parser not correctly resetting internal states when a REPORT ID element is encountered\r
*\r
*\r
* \section Sec_ChangeLog090605 Version 090605\r