Mercurial > louis > kiibohd-controller
diff Output/pjrcUSB/output_com.h @ 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 | 56237ba5da6f |
line wrap: on
line diff
--- a/Output/pjrcUSB/output_com.h Mon Mar 21 00:43:19 2016 -0700 +++ b/Output/pjrcUSB/output_com.h Mon Mar 21 22:23:57 2016 -0700 @@ -56,6 +56,14 @@ 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 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