Browse Source

Slight refactor of joystick axis type into typedef (#22445)

pull/22468/head
Ryan 6 months ago
committed by GitHub
parent
commit
87d69aebbb
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 5 deletions
  1. +7
    -5
      tmk_core/protocol/report.h

+ 7
- 5
tmk_core/protocol/report.h View File

@ -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


Loading…
Cancel
Save