diff options
| author | Ryan <fauxpark@gmail.com> | 2024-02-18 17:08:27 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-18 17:08:27 +1100 |
| commit | 2d1aed78a67b3d2b002cc739ef087963b05b76b8 (patch) | |
| tree | ea681d02e547332cffa6b7aec6c16ef37ad70ee3 /quantum/split_common | |
| parent | 6810aaf0130113e267e20fb506d874cc858f5f67 (diff) | |
Update GPIO macro usages in core (#23093)
Diffstat (limited to 'quantum/split_common')
| -rw-r--r-- | quantum/split_common/split_util.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index 2f592bd4cf..96f19bfd84 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c | |||
| @@ -123,14 +123,14 @@ void split_watchdog_task(void) { | |||
| 123 | void matrix_io_delay(void); | 123 | void matrix_io_delay(void); |
| 124 | 124 | ||
| 125 | static uint8_t peek_matrix_intersection(pin_t out_pin, pin_t in_pin) { | 125 | static uint8_t peek_matrix_intersection(pin_t out_pin, pin_t in_pin) { |
| 126 | setPinInputHigh(in_pin); | 126 | gpio_set_pin_input_high(in_pin); |
| 127 | setPinOutput(out_pin); | 127 | gpio_set_pin_output(out_pin); |
| 128 | writePinLow(out_pin); | 128 | gpio_write_pin_low(out_pin); |
| 129 | // It's almost unnecessary, but wait until it's down to low, just in case. | 129 | // It's almost unnecessary, but wait until it's down to low, just in case. |
| 130 | wait_us(1); | 130 | wait_us(1); |
| 131 | uint8_t pin_state = readPin(in_pin); | 131 | uint8_t pin_state = gpio_read_pin(in_pin); |
| 132 | // Set out_pin to a setting that is less susceptible to noise. | 132 | // Set out_pin to a setting that is less susceptible to noise. |
| 133 | setPinInputHigh(out_pin); | 133 | gpio_set_pin_input_high(out_pin); |
| 134 | matrix_io_delay(); // Wait for the pull-up to go HIGH. | 134 | matrix_io_delay(); // Wait for the pull-up to go HIGH. |
| 135 | return pin_state; | 135 | return pin_state; |
| 136 | } | 136 | } |
| @@ -138,13 +138,13 @@ static uint8_t peek_matrix_intersection(pin_t out_pin, pin_t in_pin) { | |||
| 138 | 138 | ||
| 139 | __attribute__((weak)) bool is_keyboard_left_impl(void) { | 139 | __attribute__((weak)) bool is_keyboard_left_impl(void) { |
| 140 | #if defined(SPLIT_HAND_PIN) | 140 | #if defined(SPLIT_HAND_PIN) |
| 141 | setPinInput(SPLIT_HAND_PIN); | 141 | gpio_set_pin_input(SPLIT_HAND_PIN); |
| 142 | wait_us(100); | 142 | wait_us(100); |
| 143 | // Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand | 143 | // Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand |
| 144 | # ifdef SPLIT_HAND_PIN_LOW_IS_LEFT | 144 | # ifdef SPLIT_HAND_PIN_LOW_IS_LEFT |
| 145 | return !readPin(SPLIT_HAND_PIN); | 145 | return !gpio_read_pin(SPLIT_HAND_PIN); |
| 146 | # else | 146 | # else |
| 147 | return readPin(SPLIT_HAND_PIN); | 147 | return gpio_read_pin(SPLIT_HAND_PIN); |
| 148 | # endif | 148 | # endif |
| 149 | #elif defined(SPLIT_HAND_MATRIX_GRID) | 149 | #elif defined(SPLIT_HAND_MATRIX_GRID) |
| 150 | # ifdef SPLIT_HAND_MATRIX_GRID_LOW_IS_LEFT | 150 | # ifdef SPLIT_HAND_MATRIX_GRID_LOW_IS_LEFT |
