aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/LowLevel/Joystick
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2011-01-23 17:41:16 +0000
committerDean Camera <dean@fourwalledcubicle.com>2011-01-23 17:41:16 +0000
commit6d67b1df3cb8300612ad7b2f16e6bffe08fb8f30 (patch)
tree60e794f2780156d7ee8d546a9398b9434ca70728 /Demos/Device/LowLevel/Joystick
parent26017b68b0632c91e71eb29e87ca94670425e081 (diff)
downloadlufa-6d67b1df3cb8300612ad7b2f16e6bffe08fb8f30.tar.gz
lufa-6d67b1df3cb8300612ad7b2f16e6bffe08fb8f30.tar.bz2
lufa-6d67b1df3cb8300612ad7b2f16e6bffe08fb8f30.zip
Change over Joystick demo HID report descriptor to use USAGE_MINIMUM and USAGE_MAXIMUM when describing the joystick buttons, to allow for easy extension of the number of supported buttons.
Diffstat (limited to 'Demos/Device/LowLevel/Joystick')
-rw-r--r--Demos/Device/LowLevel/Joystick/Descriptors.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Demos/Device/LowLevel/Joystick/Descriptors.c b/Demos/Device/LowLevel/Joystick/Descriptors.c
index 5b85be5ba..cb789943f 100644
--- a/Demos/Device/LowLevel/Joystick/Descriptors.c
+++ b/Demos/Device/LowLevel/Joystick/Descriptors.c
@@ -59,8 +59,8 @@ USB_Descriptor_HIDReport_Datatype_t PROGMEM JoystickReport[] =
HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE | HID_IOF_NON_VOLATILE),
HID_RI_END_COLLECTION(0),
HID_RI_USAGE_PAGE(8, 0x09), /* Button */
- HID_RI_USAGE(8, 0x02), /* Button 1 */
- HID_RI_USAGE(8, 0x01), /* Button 2 */
+ HID_RI_USAGE_MINIMUM(8, 0x01),
+ HID_RI_USAGE_MAXIMUM(8, 0x02),
HID_RI_LOGICAL_MINIMUM(8, 0x00),
HID_RI_LOGICAL_MAXIMUM(8, 0x01),
HID_RI_REPORT_SIZE(8, 0x01),