aboutsummaryrefslogtreecommitdiff
path: root/quantum/encoder.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 /quantum/encoder.c
parent6810aaf0130113e267e20fb506d874cc858f5f67 (diff)
downloadqmk_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.c8
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;