aboutsummaryrefslogtreecommitdiffstats
path: root/tmk_core/common/report.h
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/common/report.h')
-rw-r--r--tmk_core/common/report.h13
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 {
REPORT_ID_MOUSE,
REPORT_ID_SYSTEM,
REPORT_ID_CONSUMER,
- REPORT_ID_NKRO
+ REPORT_ID_NKRO,
+ REPORT_ID_JOYSTICK
};
/* Mouse buttons */
@@ -189,6 +190,16 @@ typedef struct {
int8_t h;
} __attribute__((packed)) report_mouse_t;
+typedef struct {
+#if JOYSTICK_AXES_COUNT > 0
+ int8_t axes[JOYSTICK_AXES_COUNT];
+#endif
+
+#if JOYSTICK_BUTTON_COUNT > 0
+ uint8_t buttons[(JOYSTICK_BUTTON_COUNT - 1) / 8 + 1];
+#endif
+} __attribute__((packed)) joystick_report_t;
+
/* keycode to system usage */
static inline uint16_t KEYCODE2SYSTEM(uint8_t key) {
switch (key) {