projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed incorrect definition of HID_ALIGN_DATA() causing incorrect HID report item...
[pub/USBasp.git]
/
LUFA
/
Drivers
/
USB
/
Class
/
Host
/
HIDParser.h
diff --git
a/LUFA/Drivers/USB/Class/Host/HIDParser.h
b/LUFA/Drivers/USB/Class/Host/HIDParser.h
index
b969893
..
6b6549b
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Host/HIDParser.h
+++ b/
LUFA/Drivers/USB/Class/Host/HIDParser.h
@@
-137,7
+137,7
@@
*
\r
* \return Left-aligned data of the given report item's pre-retrived value for the given datatype
\r
*/
\r
*
\r
* \return Left-aligned data of the given report item's pre-retrived value for the given datatype
\r
*/
\r
- #define HID_ALIGN_DATA(reportitem, type) ((type)(reportitem->Value << (
sizeof(type
) - reportitem->Attributes.BitSize)))
\r
+ #define HID_ALIGN_DATA(reportitem, type) ((type)(reportitem->Value << (
(8 * sizeof(type)
) - reportitem->Attributes.BitSize)))
\r
\r
/* Public Interface - May be used in end-application: */
\r
/* Enums: */
\r
\r
/* Public Interface - May be used in end-application: */
\r
/* Enums: */
\r