aboutsummaryrefslogtreecommitdiff
path: root/keyboards/yiancardesigns
diff options
context:
space:
mode:
authorRyan <[email protected]>2024-05-03 15:21:29 +1000
committerGitHub <[email protected]>2024-05-03 15:21:29 +1000
commitd09a06a1b354760fd0e64a453abade972900e885 (patch)
tree88d94640f4507ac8d7f570607423825bec3c6f89 /keyboards/yiancardesigns
parent5426a7a129acf2ff5c8b435014747f1238e17965 (diff)
downloadqmk_firmware-d09a06a1b354760fd0e64a453abade972900e885.tar.gz
qmk_firmware-d09a06a1b354760fd0e64a453abade972900e885.zip
Update GPIO API usage in keyboard code (#23361)
Diffstat (limited to 'keyboards/yiancardesigns')
-rw-r--r--keyboards/yiancardesigns/barleycorn/barleycorn.c10
-rw-r--r--keyboards/yiancardesigns/barleycorn/matrix.c12
-rw-r--r--keyboards/yiancardesigns/gingham/matrix.c12
-rw-r--r--keyboards/yiancardesigns/seigaiha/matrix.c12
4 files changed, 23 insertions, 23 deletions
diff --git a/keyboards/yiancardesigns/barleycorn/barleycorn.c b/keyboards/yiancardesigns/barleycorn/barleycorn.c
index 9bd5d84d2b..c73c1559c2 100644
--- a/keyboards/yiancardesigns/barleycorn/barleycorn.c
+++ b/keyboards/yiancardesigns/barleycorn/barleycorn.c
@@ -17,21 +17,21 @@
void keyboard_pre_init_kb(void) {
// Set our LED pins as output
- setPinOutput(B5);
- setPinOutput(C0);
+ gpio_set_pin_output(B5);
+ gpio_set_pin_output(C0);
keyboard_pre_init_user();
}
bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if(res) {
- // writePin sets the pin high for 1 and low for 0.
+ // gpio_write_pin sets the pin high for 1 and low for 0.
// In this example the pins are inverted, setting
// it low/0 turns it on, and high/1 turns the LED off.
// This behavior depends on whether the LED is between the pin
// and VCC or the pin and GND.
- writePin(B5, led_state.caps_lock);
- writePin(C0, led_state.num_lock);
+ gpio_write_pin(B5, led_state.caps_lock);
+ gpio_write_pin(C0, led_state.num_lock);
}
return res;
}
diff --git a/keyboards/yiancardesigns/barleycorn/matrix.c b/keyboards/yiancardesigns/barleycorn/matrix.c
index 008f096266..02fdb6c7b4 100644
--- a/keyboards/yiancardesigns/barleycorn/matrix.c
+++ b/keyboards/yiancardesigns/barleycorn/matrix.c
@@ -23,17 +23,17 @@ static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
static void unselect_rows(void) {
for(uint8_t x = 0; x < MATRIX_ROWS; x++) {
- setPinInputHigh(row_pins[x]);
+ gpio_set_pin_input_high(row_pins[x]);
}
}
static void select_row(uint8_t row) {
- setPinOutput(row_pins[row]);
- writePinLow(row_pins[row]);
+ gpio_set_pin_output(row_pins[row]);
+ gpio_write_pin_low(row_pins[row]);
}
static void unselect_row(uint8_t row) {
- setPinInputHigh(row_pins[row]);
+ gpio_set_pin_input_high(row_pins[row]);
}
static void init_pins(void) {
@@ -46,7 +46,7 @@ static void init_pins(void) {
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
if ( x < 8 ) {
- setPinInputHigh(col_pins[x]);
+ gpio_set_pin_input_high(col_pins[x]);
}
}
}
@@ -111,7 +111,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
pin_state = port_expander_col_buffer[1] & (1 << 1);
break;
default :
- pin_state = readPin(col_pins[col_index]);
+ pin_state = gpio_read_pin(col_pins[col_index]);
}
// Populate the matrix row with the state of the col pin
diff --git a/keyboards/yiancardesigns/gingham/matrix.c b/keyboards/yiancardesigns/gingham/matrix.c
index 4e6319b52b..48719e14bc 100644
--- a/keyboards/yiancardesigns/gingham/matrix.c
+++ b/keyboards/yiancardesigns/gingham/matrix.c
@@ -23,17 +23,17 @@ static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
static void unselect_rows(void) {
for(uint8_t x = 0; x < MATRIX_ROWS; x++) {
- setPinInputHigh(row_pins[x]);
+ gpio_set_pin_input_high(row_pins[x]);
}
}
static void select_row(uint8_t row) {
- setPinOutput(row_pins[row]);
- writePinLow(row_pins[row]);
+ gpio_set_pin_output(row_pins[row]);
+ gpio_write_pin_low(row_pins[row]);
}
static void unselect_row(uint8_t row) {
- setPinInputHigh(row_pins[row]);
+ gpio_set_pin_input_high(row_pins[row]);
}
static void init_pins(void) {
@@ -46,7 +46,7 @@ static void init_pins(void) {
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
if ( (x > 0) && (x < 12) ) {
- setPinInputHigh(col_pins[x]);
+ gpio_set_pin_input_high(col_pins[x]);
}
}
}
@@ -90,7 +90,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
pin_state = pin_state & (1 << 1);
break;
default :
- pin_state = readPin(col_pins[col_index]);
+ pin_state = gpio_read_pin(col_pins[col_index]);
}
// Populate the matrix row with the state of the col pin
diff --git a/keyboards/yiancardesigns/seigaiha/matrix.c b/keyboards/yiancardesigns/seigaiha/matrix.c
index dc80c4becf..16041754eb 100644
--- a/keyboards/yiancardesigns/seigaiha/matrix.c
+++ b/keyboards/yiancardesigns/seigaiha/matrix.c
@@ -23,17 +23,17 @@ static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
static void unselect_rows(void) {
for(uint8_t x = 0; x < MATRIX_ROWS; x++) {
- setPinInputHigh(row_pins[x]);
+ gpio_set_pin_input_high(row_pins[x]);
}
}
static void select_row(uint8_t row) {
- setPinOutput(row_pins[row]);
- writePinLow(row_pins[row]);
+ gpio_set_pin_output(row_pins[row]);
+ gpio_write_pin_low(row_pins[row]);
}
static void unselect_row(uint8_t row) {
- setPinInputHigh(row_pins[row]);
+ gpio_set_pin_input_high(row_pins[row]);
}
static void init_pins(void) {
@@ -46,7 +46,7 @@ static void init_pins(void) {
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
if ( x < 10 ) {
- setPinInputHigh(col_pins[x]);
+ gpio_set_pin_input_high(col_pins[x]);
}
}
}
@@ -96,7 +96,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
pin_state = port_expander_col_buffer & (1 << 4);
break;
default :
- pin_state = readPin(col_pins[col_index]);
+ pin_state = gpio_read_pin(col_pins[col_index]);
}
// Populate the matrix row with the state of the col pin