diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2013-05-23 19:54:42 +0200 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2013-05-23 19:54:42 +0200 |
commit | f5882b875e067685fc46e3f1a001f54bb16ee36d (patch) | |
tree | ae80e99da13f3b19d3d9653feb7fb2cccf72fd5c /LUFA/Drivers/USB/Class | |
parent | 902d3d9bff2cb6db448d5747a7277edc9e3d963c (diff) | |
download | lufa-f5882b875e067685fc46e3f1a001f54bb16ee36d.tar.gz lufa-f5882b875e067685fc46e3f1a001f54bb16ee36d.tar.bz2 lufa-f5882b875e067685fc46e3f1a001f54bb16ee36d.zip |
Fix HID descriptor mouse and joystick macros for integer multiples of 8 buttons.
Diffstat (limited to 'LUFA/Drivers/USB/Class')
-rw-r--r-- | LUFA/Drivers/USB/Class/Common/HIDClassCommon.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/LUFA/Drivers/USB/Class/Common/HIDClassCommon.h b/LUFA/Drivers/USB/Class/Common/HIDClassCommon.h index 3c30daa9e..f40afd3f9 100644 --- a/LUFA/Drivers/USB/Class/Common/HIDClassCommon.h +++ b/LUFA/Drivers/USB/Class/Common/HIDClassCommon.h @@ -382,7 +382,7 @@ HID_RI_REPORT_SIZE(8, 0x01), \ HID_RI_REPORT_COUNT(8, Buttons), \ HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE), \ - HID_RI_REPORT_SIZE(8, (8 - (Buttons % 8))), \ + HID_RI_REPORT_SIZE(8, (Buttons % 8) ? (8 - (Buttons % 8)) : 0), \ HID_RI_REPORT_COUNT(8, 0x01), \ HID_RI_INPUT(8, HID_IOF_CONSTANT), \ HID_RI_END_COLLECTION(0) @@ -476,7 +476,7 @@ HID_RI_REPORT_SIZE(8, 0x01), \ HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE), \ HID_RI_REPORT_COUNT(8, 0x01), \ - HID_RI_REPORT_SIZE(8, (8 - (Buttons % 8))), \ + HID_RI_REPORT_SIZE(8, (Buttons % 8) ? (8 - (Buttons % 8)) : 0), \ HID_RI_INPUT(8, HID_IOF_CONSTANT), \ HID_RI_USAGE_PAGE(8, 0x01), \ HID_RI_USAGE(8, 0x30), \ |