From 6d67b1df3cb8300612ad7b2f16e6bffe08fb8f30 Mon Sep 17 00:00:00 2001
From: Dean Camera <dean@fourwalledcubicle.com>
Date: Sun, 23 Jan 2011 17:41:16 +0000
Subject: [PATCH] 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.

---
 Demos/Device/ClassDriver/Joystick/Descriptors.c | 4 ++--
 Demos/Device/LowLevel/Joystick/Descriptors.c    | 4 ++--
 LUFA/ManPages/LUFAPoweredProjects.txt           | 1 +
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/Demos/Device/ClassDriver/Joystick/Descriptors.c b/Demos/Device/ClassDriver/Joystick/Descriptors.c
index 17c149528..09f12f06a 100644
--- a/Demos/Device/ClassDriver/Joystick/Descriptors.c
+++ b/Demos/Device/ClassDriver/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),
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),
diff --git a/LUFA/ManPages/LUFAPoweredProjects.txt b/LUFA/ManPages/LUFAPoweredProjects.txt
index 52ec1358c..a2a6740d1 100644
--- a/LUFA/ManPages/LUFAPoweredProjects.txt
+++ b/LUFA/ManPages/LUFAPoweredProjects.txt
@@ -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/
-- 
GitLab