Merge branch 'hid_joystick' of git://github.com/a-chol/qmk_firmware into a-chol-hid_joystick

This commit is contained in:
Jack Humbert 2020-05-04 13:19:48 -04:00
commit 708bb4f55d
23 changed files with 1556 additions and 5 deletions

View file

@ -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 */
@ -186,6 +187,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) {