]> git.donarmstrong.com Git - kiibohd-controller.git/blobdiff - Output/pjrcUSB/output_com.h
Adding relative movement mouse key support
[kiibohd-controller.git] / Output / pjrcUSB / output_com.h
index abb8124526e27be3c1d77b986ab167956f789781..36369eb62c161e427d0f51a601a26577efa574fb 100644 (file)
@@ -56,6 +56,14 @@ typedef enum USBKeyChangeState {
        USBKeyChangeState_All           = 0x7F,
 } USBKeyChangeState;
 
+// Allows for selective USB descriptor pushes
+// However, in most cases everything is updated for each packet push
+typedef enum USBMouseChangeState {
+       USBMouseChangeState_None     = 0x00,
+       USBMouseChangeState_Buttons  = 0x01,
+       USBMouseChangeState_Relative = 0x02,
+} USBMouseChangeState;
+
 
 
 // ----- Variables -----
@@ -73,13 +81,15 @@ extern          uint16_t USBKeys_ConsCtrl; // 1KRO container for Consumer Contro
 extern volatile uint8_t  USBKeys_Protocol; // 0 - Boot Mode, 1 - NKRO Mode
 
 extern volatile uint16_t USBMouse_Buttons; // Bitmask for mouse buttons
+extern volatile uint16_t USBMouse_Relative_x;
+extern volatile uint16_t USBMouse_Relative_y;
 
 // Misc variables (XXX Some are only properly utilized using AVR)
 extern          uint8_t  USBKeys_Idle_Config;
 extern          uint8_t  USBKeys_Idle_Count;
 
-extern USBKeyChangeState USBKeys_Changed;
-extern          uint8_t  USBMouse_Changed;
+extern USBKeyChangeState   USBKeys_Changed;
+extern USBMouseChangeState USBMouse_Changed;
 
 extern volatile uint8_t  Output_Available; // 0 - Output module not fully functional, 1 - Output module working