forked from mirrors/qmk_firmware
Slight refactor of joystick axis type into typedef (#22445)
This commit is contained in:
parent
b7a1004b61
commit
87d69aebbb
1 changed files with 7 additions and 5 deletions
|
@ -218,16 +218,18 @@ typedef struct {
|
||||||
uint16_t y;
|
uint16_t y;
|
||||||
} PACKED report_digitizer_t;
|
} PACKED report_digitizer_t;
|
||||||
|
|
||||||
|
#if JOYSTICK_AXIS_RESOLUTION > 8
|
||||||
|
typedef int16_t joystick_axis_t;
|
||||||
|
#else
|
||||||
|
typedef int8_t joystick_axis_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
#ifdef JOYSTICK_SHARED_EP
|
#ifdef JOYSTICK_SHARED_EP
|
||||||
uint8_t report_id;
|
uint8_t report_id;
|
||||||
#endif
|
#endif
|
||||||
#if JOYSTICK_AXIS_COUNT > 0
|
#if JOYSTICK_AXIS_COUNT > 0
|
||||||
# if JOYSTICK_AXIS_RESOLUTION > 8
|
joystick_axis_t axes[JOYSTICK_AXIS_COUNT];
|
||||||
int16_t axes[JOYSTICK_AXIS_COUNT];
|
|
||||||
# else
|
|
||||||
int8_t axes[JOYSTICK_AXIS_COUNT];
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if JOYSTICK_BUTTON_COUNT > 0
|
#if JOYSTICK_BUTTON_COUNT > 0
|
||||||
|
|
Loading…
Reference in a new issue