diff options
| author | Ryan <fauxpark@gmail.com> | 2024-05-03 15:21:29 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-03 15:21:29 +1000 |
| commit | d09a06a1b354760fd0e64a453abade972900e885 (patch) | |
| tree | 88d94640f4507ac8d7f570607423825bec3c6f89 /keyboards/ingrained | |
| parent | 5426a7a129acf2ff5c8b435014747f1238e17965 (diff) | |
Update GPIO API usage in keyboard code (#23361)
Diffstat (limited to 'keyboards/ingrained')
| -rw-r--r-- | keyboards/ingrained/matrix.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/keyboards/ingrained/matrix.c b/keyboards/ingrained/matrix.c index 3ba9d8dcf3..92b024cdc2 100644 --- a/keyboards/ingrained/matrix.c +++ b/keyboards/ingrained/matrix.c | |||
| @@ -180,8 +180,8 @@ static void init_cols(void) { | |||
| 180 | pin_t matrix_col_pins_mcu[MATRIX_COLS_PER_SIDE] = MATRIX_COL_PINS_MCU; | 180 | pin_t matrix_col_pins_mcu[MATRIX_COLS_PER_SIDE] = MATRIX_COL_PINS_MCU; |
| 181 | for (int pin_index = 0; pin_index < MATRIX_COLS_PER_SIDE; pin_index++) { | 181 | for (int pin_index = 0; pin_index < MATRIX_COLS_PER_SIDE; pin_index++) { |
| 182 | pin_t pin = matrix_col_pins_mcu[pin_index]; | 182 | pin_t pin = matrix_col_pins_mcu[pin_index]; |
| 183 | setPinInput(pin); | 183 | gpio_set_pin_input(pin); |
| 184 | writePinHigh(pin); | 184 | gpio_write_pin_high(pin); |
| 185 | } | 185 | } |
| 186 | } | 186 | } |
| 187 | 187 | ||
| @@ -192,7 +192,7 @@ static matrix_row_t read_cols(uint8_t row) { | |||
| 192 | // For each col... | 192 | // For each col... |
| 193 | for (uint8_t col_index = 0; col_index < MATRIX_COLS_PER_SIDE; col_index++) { | 193 | for (uint8_t col_index = 0; col_index < MATRIX_COLS_PER_SIDE; col_index++) { |
| 194 | // Select the col pin to read (active low) | 194 | // Select the col pin to read (active low) |
| 195 | uint8_t pin_state = readPin(matrix_col_pins_mcu[col_index]); | 195 | uint8_t pin_state = gpio_read_pin(matrix_col_pins_mcu[col_index]); |
| 196 | 196 | ||
| 197 | // Populate the matrix row with the state of the col pin | 197 | // Populate the matrix row with the state of the col pin |
| 198 | current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); | 198 | current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); |
| @@ -227,8 +227,8 @@ static void unselect_rows(void) { | |||
| 227 | pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_MCU; | 227 | pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_MCU; |
| 228 | for (int pin_index = 0; pin_index < MATRIX_ROWS_PER_SIDE; pin_index++) { | 228 | for (int pin_index = 0; pin_index < MATRIX_ROWS_PER_SIDE; pin_index++) { |
| 229 | pin_t pin = matrix_row_pins_mcu[pin_index]; | 229 | pin_t pin = matrix_row_pins_mcu[pin_index]; |
| 230 | setPinInput(pin); | 230 | gpio_set_pin_input(pin); |
| 231 | writePinLow(pin); | 231 | gpio_write_pin_low(pin); |
| 232 | } | 232 | } |
| 233 | } | 233 | } |
| 234 | 234 | ||
| @@ -237,8 +237,8 @@ static void select_row(uint8_t row) { | |||
| 237 | // select on atmega32u4 | 237 | // select on atmega32u4 |
| 238 | pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_MCU; | 238 | pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_MCU; |
| 239 | pin_t pin = matrix_row_pins_mcu[row]; | 239 | pin_t pin = matrix_row_pins_mcu[row]; |
| 240 | setPinOutput(pin); | 240 | gpio_set_pin_output(pin); |
| 241 | writePinLow(pin); | 241 | gpio_write_pin_low(pin); |
| 242 | } else { | 242 | } else { |
| 243 | // select on mcp23017 | 243 | // select on mcp23017 |
| 244 | if (mcp23017_status) { // if there was an error | 244 | if (mcp23017_status) { // if there was an error |
