diff options
author | Nick Brassel <nick@tzarc.org> | 2024-11-27 21:29:12 +1100 |
---|---|---|
committer | Nick Brassel <nick@tzarc.org> | 2024-11-27 21:29:12 +1100 |
commit | 9f76541b29056150cf57d69569a14a59e13995c7 (patch) | |
tree | 66c7398d873fcda88aebe3090603aefe045ff52e /quantum/joystick.c | |
parent | 57be4871616ee9a8fe042f6186010d436ec7d4b1 (diff) | |
parent | eb04b94eecbb9b3e64ca9c74f937b5f762440b17 (diff) |
Merge branch 'develop'
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(); } |