diff options
Diffstat (limited to 'quantum/joystick.c')
| -rw-r--r-- | quantum/joystick.c | 10 | 
1 files changed, 10 insertions, 0 deletions
| diff --git a/quantum/joystick.c b/quantum/joystick.c index 32f19b2cd9..62893fd199 100644 --- a/quantum/joystick.c +++ b/quantum/joystick.c @@ -29,6 +29,9 @@ joystick_t joystick_state = {              0  #endif          }, +#ifdef JOYSTICK_HAS_HAT +    .hat = -1, +#endif      .dirty = false,  }; @@ -145,6 +148,13 @@ void joystick_set_axis(uint8_t axis, int16_t value) {      }  } +#ifdef JOYSTICK_HAS_HAT +void joystick_set_hat(int8_t value) { +    joystick_state.hat   = value; +    joystick_state.dirty = true; +} +#endif +  void joystick_init(void) {      joystick_init_axes();  } | 
