diff options
author | Ryan <[email protected]> | 2023-11-12 18:25:18 +1100 |
---|---|---|
committer | GitHub <[email protected]> | 2023-11-12 18:25:18 +1100 |
commit | 87d69aebbbac957a770be0e55c9c71d0ea808eb4 (patch) | |
tree | c5d4b5c719fdad068c5b07a8e3432df0b943f56d /tmk_core/protocol/report.h | |
parent | b7a1004b61bac24d6eaeae06dfb504abd14010d3 (diff) | |
download | qmk_firmware-87d69aebbbac957a770be0e55c9c71d0ea808eb4.tar.gz qmk_firmware-87d69aebbbac957a770be0e55c9c71d0ea808eb4.zip |
Slight refactor of joystick axis type into typedef (#22445)
Diffstat (limited to 'tmk_core/protocol/report.h')
-rw-r--r-- | tmk_core/protocol/report.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tmk_core/protocol/report.h b/tmk_core/protocol/report.h index ec985e69ad..3028cf9426 100644 --- a/tmk_core/protocol/report.h +++ b/tmk_core/protocol/report.h @@ -218,16 +218,18 @@ typedef struct { uint16_t y; } 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 { #ifdef JOYSTICK_SHARED_EP uint8_t report_id; #endif #if JOYSTICK_AXIS_COUNT > 0 -# if JOYSTICK_AXIS_RESOLUTION > 8 - int16_t axes[JOYSTICK_AXIS_COUNT]; -# else - int8_t axes[JOYSTICK_AXIS_COUNT]; -# endif + joystick_axis_t axes[JOYSTICK_AXIS_COUNT]; #endif #if JOYSTICK_BUTTON_COUNT > 0 |