diff options
Diffstat (limited to 'Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c')
-rw-r--r-- | Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c index d84e2d3ce..c29d4debd 100644 --- a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c +++ b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c @@ -280,7 +280,7 @@ void ProcessMouseReport(uint8_t* MouseReport) if (!(USB_GetHIDReportItemInfo(MouseReport, ReportItem)))
continue;
- int16_t WheelDelta = (int16_t)(ReportItem->Value << (16 - ReportItem->Attributes.BitSize));
+ int16_t WheelDelta = HID_ALIGN_DATA(ReportItem, int16_t);
if (WheelDelta)
LEDMask = (LEDS_LED1 | LEDS_LED2 | ((WheelDelta > 0) ? LEDS_LED3 : LEDS_LED4));
|