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/ydkb | |
parent | 5426a7a129acf2ff5c8b435014747f1238e17965 (diff) |
Update GPIO API usage in keyboard code (#23361)
Diffstat (limited to 'keyboards/ydkb')
-rw-r--r-- | keyboards/ydkb/grape/matrix.c | 4 | ||||
-rw-r--r-- | keyboards/ydkb/yd68/yd68.c | 16 |
2 files changed, 10 insertions, 10 deletions
diff --git a/keyboards/ydkb/grape/matrix.c b/keyboards/ydkb/grape/matrix.c index 3e070f8d7d..49e55fe329 100644 --- a/keyboards/ydkb/grape/matrix.c +++ b/keyboards/ydkb/grape/matrix.c @@ -38,7 +38,7 @@ static void select_row(uint8_t row) { static void init_pins(void) { for (uint8_t x = 0; x < MATRIX_COLS; x++) { - setPinInputHigh(col_pins[x]); + gpio_set_pin_input_high(col_pins[x]); } } @@ -60,7 +60,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { // Select the col pin to read (active low) - uint8_t pin_state = readPin(col_pins[col_index]); + uint8_t pin_state = gpio_read_pin(col_pins[col_index]); // Populate the matrix row with the state of the col pin current_matrix[current_row] |= pin_state ? 0 : (row_shifter << col_index); diff --git a/keyboards/ydkb/yd68/yd68.c b/keyboards/ydkb/yd68/yd68.c index 0e6d5b82d5..1054a8673e 100644 --- a/keyboards/ydkb/yd68/yd68.c +++ b/keyboards/ydkb/yd68/yd68.c @@ -17,20 +17,20 @@ void keyboard_pre_init_kb(void) { //Backlight LEDs Output Low - setPinOutput(D6); - writePinLow(D6); + gpio_set_pin_output(D6); + gpio_write_pin_low(D6); //RGB power output low - setPinOutput(E2); - writePinLow(E2); + gpio_set_pin_output(E2); + gpio_write_pin_low(E2); //Bluetooth power output high - setPinOutput(B2); - writePinLow(B2); + gpio_set_pin_output(B2); + gpio_write_pin_low(B2); //RGB data output low - setPinOutput(B3); - writePinLow(B3); + gpio_set_pin_output(B3); + gpio_write_pin_low(B3); keyboard_pre_init_user(); } |