diff options
Diffstat (limited to 'keyboards/keychron/q65/matrix.c')
-rw-r--r-- | keyboards/keychron/q65/matrix.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/keyboards/keychron/q65/matrix.c b/keyboards/keychron/q65/matrix.c index c9f9888689..4cbdd346ec 100644 --- a/keyboards/keychron/q65/matrix.c +++ b/keyboards/keychron/q65/matrix.c @@ -34,26 +34,26 @@ static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; #define ROWS_PER_HAND (MATRIX_ROWS) -static inline void writePinLow_atomic(pin_t pin) { +static inline void gpio_atomic_write_pin_low(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_write_pin_low(pin); } } -static inline void writePinHigh_atomic(pin_t pin) { +static inline void gpio_atomic_write_pin_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_write_pin_high(pin); } } -static inline void setPinOutput_writeLow(pin_t pin) { +static inline void gpio_atomic_set_pin_output_low(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_low(pin); } } -static inline void setPinInputHigh_atomic(pin_t pin) { +static inline void gpio_atomic_set_pin_input_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_input_high(pin); } @@ -119,9 +119,9 @@ static bool select_col(uint8_t col) { if (pin != NO_PIN) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - writePinLow_atomic(pin); + gpio_atomic_write_pin_low(pin); #else - setPinOutput_writeLow(pin); + gpio_atomic_set_pin_output_low(pin); #endif return true; } else { @@ -138,9 +138,9 @@ static void unselect_col(uint8_t col) { if (pin != NO_PIN) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - writePinHigh_atomic(pin); + gpio_atomic_write_pin_high(pin); #else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); #endif } else { shiftout_single(0x01); @@ -152,9 +152,9 @@ static void unselect_cols(void) { pin_t pin = col_pins[x]; if (pin != NO_PIN) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); #else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); #endif } else { if (x == 0) @@ -178,7 +178,7 @@ static void matrix_init_pins(void) { unselect_cols(); for (uint8_t x = 0; x < MATRIX_ROWS; x++) { if (row_pins[x] != NO_PIN) { - setPinInputHigh_atomic(row_pins[x]); + gpio_atomic_set_pin_input_high(row_pins[x]); } } } |