projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Switch StaticAnalysisTest build test to use the new build system CPPCHECK module...
[pub/USBasp.git]
/
LUFA
/
Drivers
/
USB
/
Class
/
Common
/
HIDParser.c
diff --git
a/LUFA/Drivers/USB/Class/Common/HIDParser.c
b/LUFA/Drivers/USB/Class/Common/HIDParser.c
index
1d4e116
..
4447e8a
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Common/HIDParser.c
+++ b/
LUFA/Drivers/USB/Class/Common/HIDParser.c
@@
-7,7
+7,7
@@
*/
/*
*/
/*
- Copyright 201
1
Dean Camera (dean [at] fourwalledcubicle [dot] com)
+ Copyright 201
2
Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
@@
-61,17
+61,18
@@
uint8_t USB_ProcessHIDReport(const uint8_t* ReportData,
switch (HIDReportItem & HID_RI_DATA_SIZE_MASK)
{
case HID_RI_DATA_BITS_32:
switch (HIDReportItem & HID_RI_DATA_SIZE_MASK)
{
case HID_RI_DATA_BITS_32:
- ReportItemData = le32_to_cpu(*((uint32_t*)ReportData));
+ ReportItemData = (((uint32_t)ReportData[3] << 24) | ((uint32_t)ReportData[2] << 16) |
+ ((uint16_t)ReportData[1] << 8) | ReportData[0]);
ReportSize -= 4;
ReportData += 4;
break;
case HID_RI_DATA_BITS_16:
ReportSize -= 4;
ReportData += 4;
break;
case HID_RI_DATA_BITS_16:
- ReportItemData =
le16_to_cpu(*((uint16_t*)ReportData
));
+ ReportItemData =
(((uint16_t)ReportData[1] << 8) | (ReportData[0]
));
ReportSize -= 2;
ReportData += 2;
break;
case HID_RI_DATA_BITS_8:
ReportSize -= 2;
ReportData += 2;
break;
case HID_RI_DATA_BITS_8:
- ReportItemData =
*((uint8_t*)ReportData)
;
+ ReportItemData =
ReportData[0]
;
ReportSize -= 1;
ReportData += 1;
break;
ReportSize -= 1;
ReportData += 1;
break;