Mercurial > louis > kiibohd-controller
comparison 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 |
comparison
equal
deleted
inserted
replaced
429:970dab727f47 | 430:d3cef419c849 |
---|---|
54 USBKeyChangeState_System = 0x20, | 54 USBKeyChangeState_System = 0x20, |
55 USBKeyChangeState_Consumer = 0x40, | 55 USBKeyChangeState_Consumer = 0x40, |
56 USBKeyChangeState_All = 0x7F, | 56 USBKeyChangeState_All = 0x7F, |
57 } USBKeyChangeState; | 57 } USBKeyChangeState; |
58 | 58 |
59 // Allows for selective USB descriptor pushes | |
60 // However, in most cases everything is updated for each packet push | |
61 typedef enum USBMouseChangeState { | |
62 USBMouseChangeState_None = 0x00, | |
63 USBMouseChangeState_Buttons = 0x01, | |
64 USBMouseChangeState_Relative = 0x02, | |
65 } USBMouseChangeState; | |
66 | |
59 | 67 |
60 | 68 |
61 // ----- Variables ----- | 69 // ----- Variables ----- |
62 | 70 |
63 // Variables used to communciate to the output module | 71 // Variables used to communciate to the output module |
71 extern uint16_t USBKeys_ConsCtrl; // 1KRO container for Consumer Control HID table | 79 extern uint16_t USBKeys_ConsCtrl; // 1KRO container for Consumer Control HID table |
72 | 80 |
73 extern volatile uint8_t USBKeys_Protocol; // 0 - Boot Mode, 1 - NKRO Mode | 81 extern volatile uint8_t USBKeys_Protocol; // 0 - Boot Mode, 1 - NKRO Mode |
74 | 82 |
75 extern volatile uint16_t USBMouse_Buttons; // Bitmask for mouse buttons | 83 extern volatile uint16_t USBMouse_Buttons; // Bitmask for mouse buttons |
84 extern volatile uint16_t USBMouse_Relative_x; | |
85 extern volatile uint16_t USBMouse_Relative_y; | |
76 | 86 |
77 // Misc variables (XXX Some are only properly utilized using AVR) | 87 // Misc variables (XXX Some are only properly utilized using AVR) |
78 extern uint8_t USBKeys_Idle_Config; | 88 extern uint8_t USBKeys_Idle_Config; |
79 extern uint8_t USBKeys_Idle_Count; | 89 extern uint8_t USBKeys_Idle_Count; |
80 | 90 |
81 extern USBKeyChangeState USBKeys_Changed; | 91 extern USBKeyChangeState USBKeys_Changed; |
82 extern uint8_t USBMouse_Changed; | 92 extern USBMouseChangeState USBMouse_Changed; |
83 | 93 |
84 extern volatile uint8_t Output_Available; // 0 - Output module not fully functional, 1 - Output module working | 94 extern volatile uint8_t Output_Available; // 0 - Output module not fully functional, 1 - Output module working |
85 | 95 |
86 extern uint8_t Output_DebugMode; // 0 - Debug disabled, 1 - Debug enabled | 96 extern uint8_t Output_DebugMode; // 0 - Debug disabled, 1 - Debug enabled |
87 | 97 |