Commit 6d67b1df authored by Dean Camera's avatar Dean Camera
Browse files

Change over Joystick demo HID report descriptor to use USAGE_MINIMUM and...

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.
parent 26017b68
......@@ -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),
......
......@@ -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),
......
......@@ -57,6 +57,7 @@
* - MakeTV Episode Dispenser: http://www.youtube.com/watch?v=BkWUi18hl3g
* - MidiMonster, a USB-to-MIDI gateway board: http://www.dorkbotpdx.org/wiki/midimonster
* - Mobo 4.3, a USB controlled all band (160-10m) HF SDR transceiver: http://sites.google.com/site/lofturj/mobo4_3
* - Moco, a native Arduino Uno MIDI replacement firmware: http://web.mac.com/kuwatay/morecat_lab./MocoLUFA.html
* - NeroJTAG, a JTAG dongle: https://github.com/makestuff/neroJtag
* - NES Controller USB modification: http://projects.peterpolidoro.net/video/NESUSB.htm
* - Opendous-JTAG, an open source ARM JTAG debugger: http://code.google.com/p/opendous-jtag/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment