aboutsummaryrefslogtreecommitdiff
path: root/drivers/sensors/analog_joystick.c
diff options
context:
space:
mode:
authorRyan <[email protected]>2024-02-18 17:08:27 +1100
committerGitHub <[email protected]>2024-02-18 17:08:27 +1100
commit2d1aed78a67b3d2b002cc739ef087963b05b76b8 (patch)
treeea681d02e547332cffa6b7aec6c16ef37ad70ee3 /drivers/sensors/analog_joystick.c
parent6810aaf0130113e267e20fb506d874cc858f5f67 (diff)
downloadqmk_firmware-2d1aed78a67b3d2b002cc739ef087963b05b76b8.tar.gz
qmk_firmware-2d1aed78a67b3d2b002cc739ef087963b05b76b8.zip
Update GPIO macro usages in core (#23093)
Diffstat (limited to 'drivers/sensors/analog_joystick.c')
-rw-r--r--drivers/sensors/analog_joystick.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/sensors/analog_joystick.c b/drivers/sensors/analog_joystick.c
index 221625075c..15b35a45f2 100644
--- a/drivers/sensors/analog_joystick.c
+++ b/drivers/sensors/analog_joystick.c
@@ -122,17 +122,17 @@ report_analog_joystick_t analog_joystick_read(void) {
report.y = axisToMouseComponent(ANALOG_JOYSTICK_Y_AXIS_PIN, yOrigin, maxCursorSpeed, 1);
}
#ifdef ANALOG_JOYSTICK_CLICK_PIN
- report.button = !readPin(ANALOG_JOYSTICK_CLICK_PIN);
+ report.button = !gpio_read_pin(ANALOG_JOYSTICK_CLICK_PIN);
#endif
return report;
}
void analog_joystick_init(void) {
- setPinInputHigh(ANALOG_JOYSTICK_X_AXIS_PIN);
- setPinInputHigh(ANALOG_JOYSTICK_Y_AXIS_PIN);
+ gpio_set_pin_input_high(ANALOG_JOYSTICK_X_AXIS_PIN);
+ gpio_set_pin_input_high(ANALOG_JOYSTICK_Y_AXIS_PIN);
#ifdef ANALOG_JOYSTICK_CLICK_PIN
- setPinInputHigh(ANALOG_JOYSTICK_CLICK_PIN);
+ gpio_set_pin_input_high(ANALOG_JOYSTICK_CLICK_PIN);
#endif
// Account for drift
xOrigin = analogReadPin(ANALOG_JOYSTICK_X_AXIS_PIN);