diff options
author | Ryan <[email protected]> | 2024-05-03 15:21:29 +1000 |
---|---|---|
committer | GitHub <[email protected]> | 2024-05-03 15:21:29 +1000 |
commit | d09a06a1b354760fd0e64a453abade972900e885 (patch) | |
tree | 88d94640f4507ac8d7f570607423825bec3c6f89 /keyboards/ferris/0_1 | |
parent | 5426a7a129acf2ff5c8b435014747f1238e17965 (diff) | |
download | qmk_firmware-d09a06a1b354760fd0e64a453abade972900e885.tar.gz qmk_firmware-d09a06a1b354760fd0e64a453abade972900e885.zip |
Update GPIO API usage in keyboard code (#23361)
Diffstat (limited to 'keyboards/ferris/0_1')
-rw-r--r-- | keyboards/ferris/0_1/matrix.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/keyboards/ferris/0_1/matrix.c b/keyboards/ferris/0_1/matrix.c index 154a275d7a..a3e2bebba6 100644 --- a/keyboards/ferris/0_1/matrix.c +++ b/keyboards/ferris/0_1/matrix.c @@ -182,8 +182,8 @@ static void init_cols(void) { pin_t matrix_col_pins_mcu[MATRIX_COLS_PER_SIDE] = MATRIX_COL_PINS_MCU; for (int pin_index = 0; pin_index < MATRIX_COLS_PER_SIDE; pin_index++) { pin_t pin = matrix_col_pins_mcu[pin_index]; - setPinInput(pin); - writePinHigh(pin); + gpio_set_pin_input(pin); + gpio_write_pin_high(pin); } } @@ -194,7 +194,7 @@ static matrix_row_t read_cols(uint8_t row) { // For each col... for (uint8_t col_index = 0; col_index < MATRIX_COLS_PER_SIDE; col_index++) { // Select the col pin to read (active low) - uint8_t pin_state = readPin(matrix_col_pins_mcu[col_index]); + uint8_t pin_state = gpio_read_pin(matrix_col_pins_mcu[col_index]); // Populate the matrix row with the state of the col pin current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); @@ -229,8 +229,8 @@ static void unselect_rows(void) { pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_MCU; for (int pin_index = 0; pin_index < MATRIX_ROWS_PER_SIDE; pin_index++) { pin_t pin = matrix_row_pins_mcu[pin_index]; - setPinInput(pin); - writePinLow(pin); + gpio_set_pin_input(pin); + gpio_write_pin_low(pin); } } @@ -239,8 +239,8 @@ static void select_row(uint8_t row) { // select on atmega32u4 pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_MCU; pin_t pin = matrix_row_pins_mcu[row]; - setPinOutput(pin); - writePinLow(pin); + gpio_set_pin_output(pin); + gpio_write_pin_low(pin); } else { // select on mcp23017 if (mcp23017_status) { // if there was an error |