From c4edd104645bfc25830c144fc1aad45c927c9599 Mon Sep 17 00:00:00 2001 From: NaturalZh Date: Sat, 30 Mar 2024 13:21:53 +0800 Subject: [PATCH] update skyloong/gk104/q1/matrix.c. --- keyboards/skyloong/gk104/q1/matrix.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/keyboards/skyloong/gk104/q1/matrix.c b/keyboards/skyloong/gk104/q1/matrix.c index 7f1405f49c0..222b56affca 100644 --- a/keyboards/skyloong/gk104/q1/matrix.c +++ b/keyboards/skyloong/gk104/q1/matrix.c @@ -30,27 +30,27 @@ static inline void select_delay(uint16_t n) { static inline void setPinOutput_writeLow(pin_t pin) { ATOMIC_BLOCK_FORCEON { - setPinOutput(pin); - writePinLow(pin); + gpio_set_pin_output(pin); + gpio_write_pin_low(pin); } } static inline void setPinOutput_writeHigh(pin_t pin) { ATOMIC_BLOCK_FORCEON { - setPinOutput(pin); - writePinHigh(pin); + gpio_set_pin_output(pin); + gpio_write_pin_high(pin); } } static inline void setPinInputHigh_atomic(pin_t pin) { ATOMIC_BLOCK_FORCEON { - setPinInputHigh(pin); + gpio_set_pin_input_high(pin); } } static inline uint8_t readMatrixPin(pin_t pin) { if (pin != NO_PIN) { - return (readPin(pin) == MATRIX_INPUT_PRESSED_STATE) ? 0 : 1; + return (gpio_read_pin(pin) == MATRIX_INPUT_PRESSED_STATE) ? 0 : 1; } else { return 1; } @@ -70,9 +70,9 @@ static bool select_col(uint8_t col) { setPinOutput_writeHigh(HC595_DS_PIN); for (uint8_t m = 0; m <= col; m++) { if(m == 0){ - writePinLow(HC595_DS_PIN); + gpio_write_pin_low(HC595_DS_PIN); }else{ - writePinHigh(HC595_DS_PIN); + gpio_write_pin_high(HC595_DS_PIN); } clockPulse(ClOCK_TIME); }