diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2009-12-04 01:06:26 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2009-12-04 01:06:26 +0000 |
| commit | ed5904bdd23aa13612db8f8eee15a25418ecd726 (patch) | |
| tree | ee12ce9ca936d3245b023e5d13b065670f4ba66a /Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c | |
| parent | b5057d57192b0b79f361324de2488432dbf8c6ce (diff) | |
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.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@946 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c')
| -rw-r--r-- | Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c b/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c index eee9343d..04f4d247 100644 --- a/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c +++ b/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c @@ -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)
|
