diff options
Diffstat (limited to 'tmk_core/common/report.h')
| -rw-r--r-- | tmk_core/common/report.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tmk_core/common/report.h b/tmk_core/common/report.h index 1b2f13bdd..1aa33c998 100644 --- a/tmk_core/common/report.h +++ b/tmk_core/common/report.h | |||
| @@ -29,7 +29,8 @@ enum hid_report_ids { | |||
| 29 | REPORT_ID_MOUSE, | 29 | REPORT_ID_MOUSE, |
| 30 | REPORT_ID_SYSTEM, | 30 | REPORT_ID_SYSTEM, |
| 31 | REPORT_ID_CONSUMER, | 31 | REPORT_ID_CONSUMER, |
| 32 | REPORT_ID_NKRO | 32 | REPORT_ID_NKRO, |
| 33 | REPORT_ID_JOYSTICK | ||
| 33 | }; | 34 | }; |
| 34 | 35 | ||
| 35 | /* Mouse buttons */ | 36 | /* Mouse buttons */ |
| @@ -189,6 +190,16 @@ typedef struct { | |||
| 189 | int8_t h; | 190 | int8_t h; |
| 190 | } __attribute__((packed)) report_mouse_t; | 191 | } __attribute__((packed)) report_mouse_t; |
| 191 | 192 | ||
| 193 | typedef struct { | ||
| 194 | #if JOYSTICK_AXES_COUNT > 0 | ||
| 195 | int8_t axes[JOYSTICK_AXES_COUNT]; | ||
| 196 | #endif | ||
| 197 | |||
| 198 | #if JOYSTICK_BUTTON_COUNT > 0 | ||
| 199 | uint8_t buttons[(JOYSTICK_BUTTON_COUNT - 1) / 8 + 1]; | ||
| 200 | #endif | ||
| 201 | } __attribute__((packed)) joystick_report_t; | ||
| 202 | |||
| 192 | /* keycode to system usage */ | 203 | /* keycode to system usage */ |
| 193 | static inline uint16_t KEYCODE2SYSTEM(uint8_t key) { | 204 | static inline uint16_t KEYCODE2SYSTEM(uint8_t key) { |
| 194 | switch (key) { | 205 | switch (key) { |
