summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--quantum/process_keycode/process_joystick.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/quantum/process_keycode/process_joystick.c b/quantum/process_keycode/process_joystick.c
index 8c3e71616f..e867606074 100644
--- a/quantum/process_keycode/process_joystick.c
+++ b/quantum/process_keycode/process_joystick.c
@@ -106,7 +106,7 @@ bool process_joystick_analogread_quantum() {
wait_us(10);
-# if defined(__AVR__) || defined(PROTOCOL_CHIBIOS)
+# if defined(ANALOG_JOYSTICK_ENABLE) && (defined(__AVR__) || defined(PROTOCOL_CHIBIOS))
int16_t axis_val = analogReadPin(joystick_axes[axis_index].input_pin);
# else
// default to resting position