diff Output/pjrcUSB/arm/usb_desc.c @ 430:d3cef419c849

Adding relative movement mouse key support - Still very basic (lots of room for improvement) - Capability format will likely change at some point - 16 bit movement control, however repeat rate limits usability (will need KLL 0.4 to make better)
author Jacob Alexander <haata@kiibohd.com>
date Mon, 21 Mar 2016 22:23:57 -0700
parents 970dab727f47
children 45feb80a2ad1
line wrap: on
line diff
--- a/Output/pjrcUSB/arm/usb_desc.c	Mon Mar 21 00:43:19 2016 -0700
+++ b/Output/pjrcUSB/arm/usb_desc.c	Mon Mar 21 22:23:57 2016 -0700
@@ -309,32 +309,33 @@
 static uint8_t mouse_report_desc[] = {
 	0x05, 0x01,        // Usage Page (Generic Desktop)
 	0x09, 0x02,        // Usage (Mouse)
-	0xa1, 0x01,        // Collection (Application)
+	0xA1, 0x01,        // Collection (Application)
 	0x09, 0x02,        //   Usage (Mouse)
-	0xa1, 0x02,        //   Collection (Logical)
+	0xA1, 0x02,        //   Collection (Logical)
 	0x09, 0x01,        //     Usage (Pointer)
 
-	// Buttons (8 bits)
-	0xa1, 0x00,        //     Collection (Physical) - Buttons
+	// Buttons (16 bits)
+	0xA1, 0x00,        //     Collection (Physical) - Buttons
 	0x05, 0x09,        //       Usage Page (Button)
 	0x19, 0x01,        //       Usage Minimum (Button 1)
-	0x29, 0x08,        //       Usage Maximum (Button 8)
+	0x29, 0x10,        //       Usage Maximum (Button 16)
 	0x15, 0x00,        //       Logical Minimum (0)
 	0x25, 0x01,        //       Logical Maximum (1)
 	0x75, 0x01,        //       Report Size (1)
-	0x95, 0x08,        //       Report Count (8)
+	0x95, 0x10,        //       Report Count (16)
 	0x81, 0x02,        //       Input (Data,Var,Abs)
 
-	// Pointer (16 bits)
+	// Pointer (32 bits)
 	0x05, 0x01,        //       Usage PAGE (Generic Desktop)
 	0x09, 0x30,        //       Usage (X)
 	0x09, 0x31,        //       Usage (Y)
-	0x15, 0x81,        //       Logical Minimum (-127)
-	0x25, 0x7f,        //       Logical Maximum (127)
-	0x75, 0x08,        //       Report Size (8)
+	0x16, 0x01, 0x80,  //       Logical Minimum (-32 767)
+	0x26, 0xFF, 0x7F,  //       Logical Maximum (32 767)
+	0x75, 0x10,        //       Report Size (16)
 	0x95, 0x02,        //       Report Count (2)
 	0x81, 0x06,        //       Input (Data,Var,Rel)
 
+	/*
 	// Vertical Wheel
 	// - Multiplier (2 bits)
 	0xa1, 0x02,        //       Collection (Logical)
@@ -377,6 +378,7 @@
 	0x81, 0x06,        //         Input (Data,Var,Rel)
 	0xc0,              //       End Collection - Horizontal Wheel
 
+	*/
 	0xc0,              //     End Collection - Buttons
 	0xc0,              //   End Collection - Mouse Logical
 	0xc0               // End Collection - Mouse Application