Fixed HID Parser not distributing the Usage Min and Usage Max values across an array of report items.

Added new HID_ALIGN_DATA() macro to return the pre-retrieved value of a HID report item, left-aligned to a given datatype.

Added new PreviousValue to the HID Report Parser report item structure, for easy monitoring of previous report item values.
This commit is contained in:
Dean Camera 2009-12-04 01:06:26 +00:00
parent f338ddcb87
commit 2919aeeaab
12 changed files with 52 additions and 17 deletions

View file

@ -282,7 +282,7 @@ void ProcessJoystickReport(uint8_t* JoystickReport)
if (!(FoundData))
continue;
int16_t DeltaMovement = (int16_t)(ReportItem->Value << (16 - ReportItem->Attributes.BitSize));
int16_t DeltaMovement = HID_ALIGN_DATA(ReportItem, int16_t);
/* Determine if the report is for the X or Y delta movement */
if (ReportItem->Attributes.Usage.Usage == USAGE_X)