diff options
author | Ryan <[email protected]> | 2024-02-18 17:08:27 +1100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-02-18 17:08:27 +1100 |
commit | 2d1aed78a67b3d2b002cc739ef087963b05b76b8 (patch) | |
tree | ea681d02e547332cffa6b7aec6c16ef37ad70ee3 /quantum/encoder.c | |
parent | 6810aaf0130113e267e20fb506d874cc858f5f67 (diff) | |
download | qmk_firmware-2d1aed78a67b3d2b002cc739ef087963b05b76b8.tar.gz qmk_firmware-2d1aed78a67b3d2b002cc739ef087963b05b76b8.zip |
Update GPIO macro usages in core (#23093)
Diffstat (limited to 'quantum/encoder.c')
-rw-r--r-- | quantum/encoder.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/quantum/encoder.c b/quantum/encoder.c index 7ab194ed52..efb780c474 100644 --- a/quantum/encoder.c +++ b/quantum/encoder.c @@ -162,12 +162,12 @@ void encoder_init(void) { #endif // defined(SPLIT_KEYBOARD) && defined(ENCODER_RESOLUTIONS) for (uint8_t i = 0; i < thisCount; i++) { - setPinInputHigh(encoders_pad_a[i]); - setPinInputHigh(encoders_pad_b[i]); + gpio_set_pin_input_high(encoders_pad_a[i]); + gpio_set_pin_input_high(encoders_pad_b[i]); } encoder_wait_pullup_charge(); for (uint8_t i = 0; i < thisCount; i++) { - encoder_state[i] = (readPin(encoders_pad_a[i]) << 0) | (readPin(encoders_pad_b[i]) << 1); + encoder_state[i] = (gpio_read_pin(encoders_pad_a[i]) << 0) | (gpio_read_pin(encoders_pad_b[i]) << 1); } } @@ -247,7 +247,7 @@ static bool encoder_update(uint8_t index, uint8_t state) { bool encoder_read(void) { bool changed = false; for (uint8_t i = 0; i < thisCount; i++) { - uint8_t new_status = (readPin(encoders_pad_a[i]) << 0) | (readPin(encoders_pad_b[i]) << 1); + uint8_t new_status = (gpio_read_pin(encoders_pad_a[i]) << 0) | (gpio_read_pin(encoders_pad_b[i]) << 1); if ((encoder_state[i] & 0x3) != new_status) { encoder_state[i] <<= 2; encoder_state[i] |= new_status; |