diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2013-03-17 13:52:12 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2013-03-17 13:52:12 +0000 |
commit | 6dd4d0a9f1e86c15826ae59d0a0feb30bc90eb88 (patch) | |
tree | cc494107faf43173b418b1d47cff48b9f871a0a3 /LUFA/Drivers/USB | |
parent | d1155a9a2754bd6055212523b629b089f8ed2981 (diff) | |
download | lufa-6dd4d0a9f1e86c15826ae59d0a0feb30bc90eb88.tar.gz lufa-6dd4d0a9f1e86c15826ae59d0a0feb30bc90eb88.tar.bz2 lufa-6dd4d0a9f1e86c15826ae59d0a0feb30bc90eb88.zip |
Fixed incorrect HID report descriptor generated for 16-bit axis ranges by the HID_DESCRIPTOR_MOUSE() and HID_DESCRIPTOR_JOYSTICK() macros (thanks to Guillaume Germaine)
Diffstat (limited to 'LUFA/Drivers/USB')
-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 db06583a2..b51b217d7 100644 --- a/LUFA/Drivers/USB/Class/Common/HIDClassCommon.h +++ b/LUFA/Drivers/USB/Class/Common/HIDClassCommon.h @@ -371,7 +371,7 @@ HID_RI_PHYSICAL_MINIMUM(16, MinPhysicalVal), \ HID_RI_PHYSICAL_MAXIMUM(16, MaxPhysicalVal), \ HID_RI_REPORT_COUNT(8, 3), \ - HID_RI_REPORT_SIZE(8, ((((MinAxisVal >= -0xFF) && (MaxAxisVal <= 0xFF)) ? 8 : 16))), \ + HID_RI_REPORT_SIZE(8, (((MinAxisVal >= -128) && (MaxAxisVal <= 127)) ? 8 : 16)), \ HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE), \ HID_RI_END_COLLECTION(0), \ HID_RI_USAGE_PAGE(8, 0x09), \ @@ -486,7 +486,7 @@ HID_RI_PHYSICAL_MINIMUM(16, MinPhysicalVal), \ HID_RI_PHYSICAL_MAXIMUM(16, MaxPhysicalVal), \ HID_RI_REPORT_COUNT(8, 0x02), \ - HID_RI_REPORT_SIZE(8, ((((MinAxisVal >= -0xFF) && (MaxAxisVal <= 0xFF)) ? 8 : 16))), \ + HID_RI_REPORT_SIZE(8, (((MinAxisVal >= -128) && (MaxAxisVal <= 127)) ? 8 : 16)), \ HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | (AbsoluteCoords ? HID_IOF_ABSOLUTE : HID_IOF_RELATIVE)), \ HID_RI_END_COLLECTION(0), \ HID_RI_END_COLLECTION(0) |