diff --git a/keyboards/argyle/matrix.c b/keyboards/argyle/matrix.c
index d435b368c22..661310ade0d 100644
--- a/keyboards/argyle/matrix.c
+++ b/keyboards/argyle/matrix.c
@@ -24,21 +24,21 @@ along with this program. If not, see .
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
-static inline void setPinOutput_writeLow(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_low(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_low(pin);
}
}
-static inline void setPinOutput_writeHigh(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_high(pin);
}
}
-static inline void setPinInputHigh_atomic(pin_t pin) {
+static inline void gpio_atomic_set_pin_input_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_input_high(pin);
}
@@ -55,7 +55,7 @@ static inline uint8_t readMatrixPin(pin_t pin) {
static bool select_row(uint8_t row) {
pin_t pin = row_pins[row];
if (pin != NO_PIN) {
- setPinOutput_writeLow(pin);
+ gpio_atomic_set_pin_output_low(pin);
return true;
}
return false;
@@ -64,7 +64,7 @@ static bool select_row(uint8_t row) {
static void unselect_row(uint8_t row) {
pin_t pin = row_pins[row];
if (pin != NO_PIN) {
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
}
}
@@ -84,7 +84,7 @@ static void init_pins(void) {
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
if (col_pins[x] != NO_PIN) {
- setPinInputHigh_atomic(col_pins[x]);
+ gpio_atomic_set_pin_input_high(col_pins[x]);
}
}
}
diff --git a/keyboards/gmmk/numpad/matrix.c b/keyboards/gmmk/numpad/matrix.c
index 4ec41bdb732..8d6e641a77d 100644
--- a/keyboards/gmmk/numpad/matrix.c
+++ b/keyboards/gmmk/numpad/matrix.c
@@ -19,21 +19,21 @@ static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
#define MATRIX_ROW_SHIFTER ((matrix_row_t)1)
-static inline void setPinOutput_writeLow(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_low(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_low(pin);
}
}
-static inline void setPinOutput_writeHigh(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_high(pin);
}
}
-static inline void setPinInputHigh_atomic(pin_t pin) {
+static inline void gpio_atomic_set_pin_input_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_input_high(pin);
}
@@ -50,7 +50,7 @@ static inline uint8_t readMatrixPin(pin_t pin) {
static bool select_col(uint8_t col) {
pin_t pin = col_pins[col];
if (pin != NO_PIN) {
- setPinOutput_writeLow(pin);
+ gpio_atomic_set_pin_output_low(pin);
return true;
}
return false;
@@ -60,9 +60,9 @@ static void unselect_col(uint8_t col) {
pin_t pin = col_pins[col];
if (pin != NO_PIN) {
# ifdef MATRIX_UNSELECT_DRIVE_HIGH
- setPinOutput_writeHigh(pin);
+ gpio_atomic_set_pin_output_high(pin);
# else
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
# endif
}
}
@@ -78,10 +78,10 @@ __attribute__((weak)) void matrix_init_custom(void) {
unselect_cols();
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
if (row_pins[x] != NO_PIN) {
- setPinInputHigh_atomic(row_pins[x]);
+ gpio_atomic_set_pin_input_high(row_pins[x]);
}
}
- setPinInputHigh_atomic(B8);
+ gpio_atomic_set_pin_input_high(B8);
}
__attribute__((weak)) void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col, matrix_row_t row_shifter) { // Start with a clear matrix row
diff --git a/keyboards/halfcliff/matrix.c b/keyboards/halfcliff/matrix.c
index ad3ad6ba094..790f8c41bb4 100644
--- a/keyboards/halfcliff/matrix.c
+++ b/keyboards/halfcliff/matrix.c
@@ -50,25 +50,25 @@ matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; }
void matrix_print(void) {}
-static inline void setPinOutput_writeLow(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_low(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_low(pin);
}
}
-static inline void setPinInputHigh_atomic(pin_t pin) {
+static inline void gpio_atomic_set_pin_input_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON { gpio_set_pin_input_high(pin); }
}
// matrix code
-static void select_row(uint8_t row) { setPinOutput_writeLow(row_pins[row]); }
+static void select_row(uint8_t row) { gpio_atomic_set_pin_output_low(row_pins[row]); }
-static void unselect_row(uint8_t row) { setPinInputHigh_atomic(row_pins[row]); }
+static void unselect_row(uint8_t row) { gpio_atomic_set_pin_input_high(row_pins[row]); }
static void unselect_rows(void) {
for (uint8_t x = 0; x < ROWS_PER_HAND; x++) {
- setPinInputHigh_atomic(row_pins[x]);
+ gpio_atomic_set_pin_input_high(row_pins[x]);
}
}
@@ -103,24 +103,24 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
return false;
}
-static void select_col(uint8_t col) { setPinOutput_writeLow(col_pins[col]); }
+static void select_col(uint8_t col) { gpio_atomic_set_pin_output_low(col_pins[col]); }
-static void unselect_col(uint8_t col) { setPinInputHigh_atomic(col_pins[col]); }
+static void unselect_col(uint8_t col) { gpio_atomic_set_pin_input_high(col_pins[col]); }
static void unselect_cols(void) {
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
- setPinInputHigh_atomic(col_pins[x]);
+ gpio_atomic_set_pin_input_high(col_pins[x]);
}
}
static void init_pins(void) {
unselect_rows();
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
- setPinInputHigh_atomic(col_pins[x]);
+ gpio_atomic_set_pin_input_high(col_pins[x]);
}
unselect_cols();
for (uint8_t x = 0; x < ROWS_PER_HAND; x++) {
- setPinInputHigh_atomic(row_pins[x]);
+ gpio_atomic_set_pin_input_high(row_pins[x]);
}
}
diff --git a/keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c b/keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c
index 786c1b4a73b..fa9b6ef0fd1 100644
--- a/keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c
+++ b/keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c
@@ -60,14 +60,14 @@ static const uint8_t delay_sel[] = {MATRIX_IO_DELAY_MULSEL};
extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values
extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values
-static inline void setPinOutput_writeLow(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_low(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_low(pin);
}
}
-static inline void setPinInputHigh_atomic(pin_t pin) {
+static inline void gpio_atomic_set_pin_input_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON { gpio_set_pin_input_high(pin); }
}
@@ -108,13 +108,13 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
#elif defined(DIODE_DIRECTION)
# if (DIODE_DIRECTION == COL2ROW)
-static void select_row(uint8_t row) { setPinOutput_writeLow(row_pins[row]); }
+static void select_row(uint8_t row) { gpio_atomic_set_pin_output_low(row_pins[row]); }
-static void unselect_row(uint8_t row) { setPinInputHigh_atomic(row_pins[row]); }
+static void unselect_row(uint8_t row) { gpio_atomic_set_pin_input_high(row_pins[row]); }
static void unselect_rows(void) {
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
- setPinInputHigh_atomic(row_pins[x]);
+ gpio_atomic_set_pin_input_high(row_pins[x]);
}
}
@@ -125,7 +125,7 @@ static void init_pins(void) {
# endif
unselect_rows();
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
- setPinInputHigh_atomic(col_pins[x]);
+ gpio_atomic_set_pin_input_high(col_pins[x]);
}
}
@@ -218,20 +218,20 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
# elif (DIODE_DIRECTION == ROW2COL)
-static void select_col(uint8_t col) { setPinOutput_writeLow(col_pins[col]); }
+static void select_col(uint8_t col) { gpio_atomic_set_pin_output_low(col_pins[col]); }
-static void unselect_col(uint8_t col) { setPinInputHigh_atomic(col_pins[col]); }
+static void unselect_col(uint8_t col) { gpio_atomic_set_pin_input_high(col_pins[col]); }
static void unselect_cols(void) {
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
- setPinInputHigh_atomic(col_pins[x]);
+ gpio_atomic_set_pin_input_high(col_pins[x]);
}
}
static void init_pins(void) {
unselect_cols();
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
- setPinInputHigh_atomic(row_pins[x]);
+ gpio_atomic_set_pin_input_high(row_pins[x]);
}
}
diff --git a/keyboards/keychron/c2_pro/matrix.c b/keyboards/keychron/c2_pro/matrix.c
index 7d5b3e4e791..e05ac5e0617 100644
--- a/keyboards/keychron/c2_pro/matrix.c
+++ b/keyboards/keychron/c2_pro/matrix.c
@@ -41,21 +41,21 @@
pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
-static inline void setPinOutput_writeLow(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_low(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_low(pin);
}
}
-static inline void setPinOutput_writeHigh(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_high(pin);
}
}
-static inline void setPinInput_high(pin_t pin) {
+static inline void gpio_atomic_set_pin_input_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_input_high(pin);
}
@@ -106,7 +106,7 @@ static bool select_col(uint8_t col) {
pin_t pin = col_pins[col];
if (col < SHIFT_COL_START || col > SHIFT_COL_END) {
- setPinOutput_writeLow(pin);
+ gpio_atomic_set_pin_output_low(pin);
return true;
} else {
if (col == SHIFT_COL_START) {
@@ -122,9 +122,9 @@ static void unselect_col(uint8_t col) {
if (col < SHIFT_COL_START || col > SHIFT_COL_END) {
#ifdef MATRIX_UNSELECT_DRIVE_HIGH
- setPinOutput_writeHigh(pin);
+ gpio_atomic_set_pin_output_high(pin);
#else
- setPinInput_high(pin);
+ gpio_atomic_set_pin_input_high(pin);
#endif
} else {
HC595_output(0x01, 1);
@@ -136,9 +136,9 @@ static void unselect_cols(void) {
pin_t pin = col_pins[x];
if (x < SHIFT_COL_START || x > SHIFT_COL_END) {
#ifdef MATRIX_UNSELECT_DRIVE_HIGH
- setPinOutput_writeHigh(pin);
+ gpio_atomic_set_pin_output_high(pin);
#else
- setPinInput_high(pin);
+ gpio_atomic_set_pin_input_high(pin);
#endif
} else {
if (x == SHIFT_COL_START) HC595_output(UNSELECT_ALL_COL, 0);
@@ -181,7 +181,7 @@ void matrix_init_custom(void) {
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
if (row_pins[x] != NO_PIN) {
- setPinInput_high(row_pins[x]);
+ gpio_atomic_set_pin_input_high(row_pins[x]);
}
}
diff --git a/keyboards/keychron/q10/matrix.c b/keyboards/keychron/q10/matrix.c
index b772fd78899..cd6e842e15d 100644
--- a/keyboards/keychron/q10/matrix.c
+++ b/keyboards/keychron/q10/matrix.c
@@ -34,21 +34,21 @@ static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
#define ROWS_PER_HAND (MATRIX_ROWS)
-static inline void setPinOutput_writeLow(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_low(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_low(pin);
}
}
-static inline void setPinOutput_writeHigh(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_high(pin);
}
}
-static inline void setPinInputHigh_atomic(pin_t pin) {
+static inline void gpio_atomic_set_pin_input_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_input_high(pin);
}
@@ -65,35 +65,35 @@ static inline uint8_t readMatrixPin(pin_t pin) {
static void shiftOutMultiple(uint16_t dataOut) {
for (uint8_t i = 0; i < 8; i++) {
if (dataOut & 0x1) {
- setPinOutput_writeHigh(DATA_PIN);
+ gpio_atomic_set_pin_output_high(DATA_PIN);
} else {
- setPinOutput_writeLow(DATA_PIN);
+ gpio_atomic_set_pin_output_low(DATA_PIN);
}
dataOut = dataOut >> 1;
- setPinOutput_writeHigh(CLOCK_PIN);
- setPinOutput_writeLow(CLOCK_PIN);
+ gpio_atomic_set_pin_output_high(CLOCK_PIN);
+ gpio_atomic_set_pin_output_low(CLOCK_PIN);
}
- setPinOutput_writeHigh(LATCH_PIN);
- setPinOutput_writeLow(LATCH_PIN);
+ gpio_atomic_set_pin_output_high(LATCH_PIN);
+ gpio_atomic_set_pin_output_low(LATCH_PIN);
}
static void shiftOut_single(uint8_t dataOut) {
if (dataOut & 0x1) {
- setPinOutput_writeHigh(DATA_PIN);
+ gpio_atomic_set_pin_output_high(DATA_PIN);
} else {
- setPinOutput_writeLow(DATA_PIN);
+ gpio_atomic_set_pin_output_low(DATA_PIN);
}
- setPinOutput_writeHigh(CLOCK_PIN);
- setPinOutput_writeLow(CLOCK_PIN);
- setPinOutput_writeHigh(LATCH_PIN);
- setPinOutput_writeLow(LATCH_PIN);
+ gpio_atomic_set_pin_output_high(CLOCK_PIN);
+ gpio_atomic_set_pin_output_low(CLOCK_PIN);
+ gpio_atomic_set_pin_output_high(LATCH_PIN);
+ gpio_atomic_set_pin_output_low(LATCH_PIN);
}
static bool select_col(uint8_t col) {
pin_t pin = col_pins[col];
if (pin != NO_PIN) {
- setPinOutput_writeLow(pin);
+ gpio_atomic_set_pin_output_low(pin);
return true;
} else {
if (col == (MATRIX_COLS - 8)) {
@@ -111,16 +111,16 @@ static void unselect_col(uint8_t col) {
if (pin != NO_PIN) {
#ifdef MATRIX_UNSELECT_DRIVE_HIGH
- setPinOutput_writeHigh(pin);
+ gpio_atomic_set_pin_output_high(pin);
#else
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
#endif
} else {
if (col == (MATRIX_COLS - 1)) {
- setPinOutput_writeHigh(CLOCK_PIN);
- setPinOutput_writeLow(CLOCK_PIN);
- setPinOutput_writeHigh(LATCH_PIN);
- setPinOutput_writeLow(LATCH_PIN);
+ gpio_atomic_set_pin_output_high(CLOCK_PIN);
+ gpio_atomic_set_pin_output_low(CLOCK_PIN);
+ gpio_atomic_set_pin_output_high(LATCH_PIN);
+ gpio_atomic_set_pin_output_low(LATCH_PIN);
}
}
}
@@ -131,9 +131,9 @@ static void unselect_cols(void) {
pin_t pin = col_pins[x];
if (pin != NO_PIN) {
#ifdef MATRIX_UNSELECT_DRIVE_HIGH
- setPinOutput_writeHigh(pin);
+ gpio_atomic_set_pin_output_high(pin);
#else
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
#endif
} else {
if (x == (MATRIX_COLS - 1)) {
@@ -148,7 +148,7 @@ static void matrix_init_pins(void) {
unselect_cols();
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
if (row_pins[x] != NO_PIN) {
- setPinInputHigh_atomic(row_pins[x]);
+ gpio_atomic_set_pin_input_high(row_pins[x]);
}
}
}
diff --git a/keyboards/keychron/q12/matrix.c b/keyboards/keychron/q12/matrix.c
index 9d5e9c4d393..bfb51703a03 100644
--- a/keyboards/keychron/q12/matrix.c
+++ b/keyboards/keychron/q12/matrix.c
@@ -34,21 +34,21 @@ static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
#define ROWS_PER_HAND (MATRIX_ROWS)
-static inline void setPinOutput_writeLow(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_low(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_low(pin);
}
}
-static inline void setPinOutput_writeHigh(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_high(pin);
}
}
-static inline void setPinInputHigh_atomic(pin_t pin) {
+static inline void gpio_atomic_set_pin_input_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_input_high(pin);
}
@@ -65,36 +65,36 @@ static inline uint8_t readMatrixPin(pin_t pin) {
static void shiftOut(uint8_t dataOut) {
for (uint8_t i = 0; i < 8; i++) {
if (dataOut & 0x1) {
- setPinOutput_writeHigh(DATA_PIN);
+ gpio_atomic_set_pin_output_high(DATA_PIN);
} else {
- setPinOutput_writeLow(DATA_PIN);
+ gpio_atomic_set_pin_output_low(DATA_PIN);
}
dataOut = dataOut >> 1;
- setPinOutput_writeHigh(CLOCK_PIN);
- setPinOutput_writeLow(CLOCK_PIN);
+ gpio_atomic_set_pin_output_high(CLOCK_PIN);
+ gpio_atomic_set_pin_output_low(CLOCK_PIN);
}
- setPinOutput_writeHigh(LATCH_PIN);
- setPinOutput_writeLow(LATCH_PIN);
+ gpio_atomic_set_pin_output_high(LATCH_PIN);
+ gpio_atomic_set_pin_output_low(LATCH_PIN);
}
static void shiftout_single(uint8_t data) {
if (data & 0x1) {
- setPinOutput_writeHigh(DATA_PIN);
+ gpio_atomic_set_pin_output_high(DATA_PIN);
} else {
- setPinOutput_writeLow(DATA_PIN);
+ gpio_atomic_set_pin_output_low(DATA_PIN);
}
- setPinOutput_writeHigh(CLOCK_PIN);
- setPinOutput_writeLow(CLOCK_PIN);
+ gpio_atomic_set_pin_output_high(CLOCK_PIN);
+ gpio_atomic_set_pin_output_low(CLOCK_PIN);
- setPinOutput_writeHigh(LATCH_PIN);
- setPinOutput_writeLow(LATCH_PIN);
+ gpio_atomic_set_pin_output_high(LATCH_PIN);
+ gpio_atomic_set_pin_output_low(LATCH_PIN);
}
static bool select_col(uint8_t col) {
pin_t pin = col_pins[col];
if (pin != NO_PIN) {
- setPinOutput_writeLow(pin);
+ gpio_atomic_set_pin_output_low(pin);
return true;
} else {
if (col == 10) {
@@ -112,16 +112,16 @@ static void unselect_col(uint8_t col) {
if (pin != NO_PIN) {
#ifdef MATRIX_UNSELECT_DRIVE_HIGH
- setPinOutput_writeHigh(pin);
+ gpio_atomic_set_pin_output_high(pin);
#else
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
#endif
} else {
if (col == (MATRIX_COLS - 1))
- setPinOutput_writeHigh(CLOCK_PIN);
- setPinOutput_writeLow(CLOCK_PIN);
- setPinOutput_writeHigh(LATCH_PIN);
- setPinOutput_writeLow(LATCH_PIN);
+ gpio_atomic_set_pin_output_high(CLOCK_PIN);
+ gpio_atomic_set_pin_output_low(CLOCK_PIN);
+ gpio_atomic_set_pin_output_high(LATCH_PIN);
+ gpio_atomic_set_pin_output_low(LATCH_PIN);
}
}
@@ -131,9 +131,9 @@ static void unselect_cols(void) {
pin_t pin = col_pins[x];
if (pin != NO_PIN) {
#ifdef MATRIX_UNSELECT_DRIVE_HIGH
- setPinOutput_writeHigh(pin);
+ gpio_atomic_set_pin_output_high(pin);
#else
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
#endif
}
if (x == 10)
@@ -146,7 +146,7 @@ static void matrix_init_pins(void) {
unselect_cols();
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
if (row_pins[x] != NO_PIN) {
- setPinInputHigh_atomic(row_pins[x]);
+ gpio_atomic_set_pin_input_high(row_pins[x]);
}
}
}
diff --git a/keyboards/keychron/q1v2/matrix.c b/keyboards/keychron/q1v2/matrix.c
index 8e01bdb73e0..5fa60c1b1d0 100644
--- a/keyboards/keychron/q1v2/matrix.c
+++ b/keyboards/keychron/q1v2/matrix.c
@@ -34,21 +34,21 @@ static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
#define ROWS_PER_HAND (MATRIX_ROWS)
-static inline void setPinOutput_writeLow(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_low(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_low(pin);
}
}
-static inline void setPinOutput_writeHigh(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_high(pin);
}
}
-static inline void setPinInputHigh_atomic(pin_t pin) {
+static inline void gpio_atomic_set_pin_input_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_input_high(pin);
}
@@ -65,37 +65,37 @@ static inline uint8_t readMatrixPin(pin_t pin) {
static void shiftOut(uint8_t dataOut) {
for (uint8_t i = 0; i < 8; i++) {
if (dataOut & 0x1) {
- setPinOutput_writeHigh(DATA_PIN);
+ gpio_atomic_set_pin_output_high(DATA_PIN);
} else {
- setPinOutput_writeLow(DATA_PIN);
+ gpio_atomic_set_pin_output_low(DATA_PIN);
}
dataOut = dataOut >> 1;
- setPinOutput_writeHigh(CLOCK_PIN);
- setPinOutput_writeLow(CLOCK_PIN);
+ gpio_atomic_set_pin_output_high(CLOCK_PIN);
+ gpio_atomic_set_pin_output_low(CLOCK_PIN);
}
- setPinOutput_writeHigh(LATCH_PIN);
- setPinOutput_writeLow(LATCH_PIN);
+ gpio_atomic_set_pin_output_high(LATCH_PIN);
+ gpio_atomic_set_pin_output_low(LATCH_PIN);
}
static void shiftout_single(uint8_t data) {
if (data & 0x1) {
- setPinOutput_writeHigh(DATA_PIN);
+ gpio_atomic_set_pin_output_high(DATA_PIN);
} else {
- setPinOutput_writeLow(DATA_PIN);
+ gpio_atomic_set_pin_output_low(DATA_PIN);
}
- setPinOutput_writeHigh(CLOCK_PIN);
- setPinOutput_writeLow(CLOCK_PIN);
+ gpio_atomic_set_pin_output_high(CLOCK_PIN);
+ gpio_atomic_set_pin_output_low(CLOCK_PIN);
- setPinOutput_writeHigh(LATCH_PIN);
- setPinOutput_writeLow(LATCH_PIN);
+ gpio_atomic_set_pin_output_high(LATCH_PIN);
+ gpio_atomic_set_pin_output_low(LATCH_PIN);
}
static bool select_col(uint8_t col) {
pin_t pin = col_pins[col];
if (pin != NO_PIN) {
- setPinOutput_writeLow(pin);
+ gpio_atomic_set_pin_output_low(pin);
return true;
} else {
if (col == 8) {
@@ -113,9 +113,9 @@ static void unselect_col(uint8_t col) {
if (pin != NO_PIN) {
#ifdef MATRIX_UNSELECT_DRIVE_HIGH
- setPinOutput_writeHigh(pin);
+ gpio_atomic_set_pin_output_high(pin);
#else
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
#endif
} else {
if (col == (MATRIX_COLS - 1)) shiftout_single(0x01);
@@ -129,9 +129,9 @@ static void unselect_cols(void) {
if (pin != NO_PIN) {
#ifdef MATRIX_UNSELECT_DRIVE_HIGH
- setPinOutput_writeHigh(pin);
+ gpio_atomic_set_pin_output_high(pin);
#else
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
#endif
}
if (x == (MATRIX_COLS - 1))
@@ -144,7 +144,7 @@ static void matrix_init_pins(void) {
unselect_cols();
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
if (row_pins[x] != NO_PIN) {
- setPinInputHigh_atomic(row_pins[x]);
+ gpio_atomic_set_pin_input_high(row_pins[x]);
}
}
}
diff --git a/keyboards/keychron/q3/matrix.c b/keyboards/keychron/q3/matrix.c
index 25b3f6ed4ee..5ed8d7bc4f3 100644
--- a/keyboards/keychron/q3/matrix.c
+++ b/keyboards/keychron/q3/matrix.c
@@ -34,21 +34,21 @@ static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
#define ROWS_PER_HAND (MATRIX_ROWS)
-static inline void setPinOutput_writeLow(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_low(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_low(pin);
}
}
-static inline void setPinOutput_writeHigh(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_high(pin);
}
}
-static inline void setPinInputHigh_atomic(pin_t pin) {
+static inline void gpio_atomic_set_pin_input_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_input_high(pin);
}
@@ -65,37 +65,37 @@ static inline uint8_t readMatrixPin(pin_t pin) {
static void shiftOut(uint8_t dataOut) {
for (uint8_t i = 0; i < 8; i++) {
if (dataOut & 0x1) {
- setPinOutput_writeHigh(DATA_PIN);
+ gpio_atomic_set_pin_output_high(DATA_PIN);
} else {
- setPinOutput_writeLow(DATA_PIN);
+ gpio_atomic_set_pin_output_low(DATA_PIN);
}
dataOut = dataOut >> 1;
- setPinOutput_writeHigh(CLOCK_PIN);
- setPinOutput_writeLow(CLOCK_PIN);
+ gpio_atomic_set_pin_output_high(CLOCK_PIN);
+ gpio_atomic_set_pin_output_low(CLOCK_PIN);
}
- setPinOutput_writeHigh(LATCH_PIN);
- setPinOutput_writeLow(LATCH_PIN);
+ gpio_atomic_set_pin_output_high(LATCH_PIN);
+ gpio_atomic_set_pin_output_low(LATCH_PIN);
}
static void shiftout_single(uint8_t data) {
if (data & 0x1) {
- setPinOutput_writeHigh(DATA_PIN);
+ gpio_atomic_set_pin_output_high(DATA_PIN);
} else {
- setPinOutput_writeLow(DATA_PIN);
+ gpio_atomic_set_pin_output_low(DATA_PIN);
}
- setPinOutput_writeHigh(CLOCK_PIN);
- setPinOutput_writeLow(CLOCK_PIN);
+ gpio_atomic_set_pin_output_high(CLOCK_PIN);
+ gpio_atomic_set_pin_output_low(CLOCK_PIN);
- setPinOutput_writeHigh(LATCH_PIN);
- setPinOutput_writeLow(LATCH_PIN);
+ gpio_atomic_set_pin_output_high(LATCH_PIN);
+ gpio_atomic_set_pin_output_low(LATCH_PIN);
}
static bool select_col(uint8_t col) {
pin_t pin = col_pins[col];
if (pin != NO_PIN) {
- setPinOutput_writeLow(pin);
+ gpio_atomic_set_pin_output_low(pin);
return true;
} else {
if (col == 8) {
@@ -113,9 +113,9 @@ static void unselect_col(uint8_t col) {
if (pin != NO_PIN) {
#ifdef MATRIX_UNSELECT_DRIVE_HIGH
- setPinOutput_writeHigh(pin);
+ gpio_atomic_set_pin_output_high(pin);
#else
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
#endif
} else {
if (col == (MATRIX_COLS - 1))
@@ -130,9 +130,9 @@ static void unselect_cols(void) {
if (pin != NO_PIN) {
#ifdef MATRIX_UNSELECT_DRIVE_HIGH
- setPinOutput_writeHigh(pin);
+ gpio_atomic_set_pin_output_high(pin);
#else
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
#endif
}
if (x == (MATRIX_COLS - 1))
@@ -145,7 +145,7 @@ static void matrix_init_pins(void) {
unselect_cols();
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
if (row_pins[x] != NO_PIN) {
- setPinInputHigh_atomic(row_pins[x]);
+ gpio_atomic_set_pin_input_high(row_pins[x]);
}
}
}
diff --git a/keyboards/keychron/q5/matrix.c b/keyboards/keychron/q5/matrix.c
index e7f69d98216..e38301f00fe 100644
--- a/keyboards/keychron/q5/matrix.c
+++ b/keyboards/keychron/q5/matrix.c
@@ -34,21 +34,21 @@ static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
#define ROWS_PER_HAND (MATRIX_ROWS)
-static inline void setPinOutput_writeLow(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_low(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_low(pin);
}
}
-static inline void setPinOutput_writeHigh(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_high(pin);
}
}
-static inline void setPinInputHigh_atomic(pin_t pin) {
+static inline void gpio_atomic_set_pin_input_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_input_high(pin);
}
@@ -65,36 +65,36 @@ static inline uint8_t readMatrixPin(pin_t pin) {
static void shiftOut(uint8_t dataOut) {
for (uint8_t i = 0; i < 8; i++) {
if (dataOut & 0x1) {
- setPinOutput_writeHigh(DATA_PIN);
+ gpio_atomic_set_pin_output_high(DATA_PIN);
} else {
- setPinOutput_writeLow(DATA_PIN);
+ gpio_atomic_set_pin_output_low(DATA_PIN);
}
dataOut = dataOut >> 1;
- setPinOutput_writeHigh(CLOCK_PIN);
- setPinOutput_writeLow(CLOCK_PIN);
+ gpio_atomic_set_pin_output_high(CLOCK_PIN);
+ gpio_atomic_set_pin_output_low(CLOCK_PIN);
}
- setPinOutput_writeHigh(LATCH_PIN);
- setPinOutput_writeLow(LATCH_PIN);
+ gpio_atomic_set_pin_output_high(LATCH_PIN);
+ gpio_atomic_set_pin_output_low(LATCH_PIN);
}
static void shiftout_single(uint8_t data) {
if (data & 0x1) {
- setPinOutput_writeHigh(DATA_PIN);
+ gpio_atomic_set_pin_output_high(DATA_PIN);
} else {
- setPinOutput_writeLow(DATA_PIN);
+ gpio_atomic_set_pin_output_low(DATA_PIN);
}
- setPinOutput_writeHigh(CLOCK_PIN);
- setPinOutput_writeLow(CLOCK_PIN);
+ gpio_atomic_set_pin_output_high(CLOCK_PIN);
+ gpio_atomic_set_pin_output_low(CLOCK_PIN);
- setPinOutput_writeHigh(LATCH_PIN);
- setPinOutput_writeLow(LATCH_PIN);
+ gpio_atomic_set_pin_output_high(LATCH_PIN);
+ gpio_atomic_set_pin_output_low(LATCH_PIN);
}
static bool select_col(uint8_t col) {
pin_t pin = col_pins[col];
if (pin != NO_PIN) {
- setPinOutput_writeLow(pin);
+ gpio_atomic_set_pin_output_low(pin);
return true;
} else {
if (col == 10) {
@@ -112,16 +112,16 @@ static void unselect_col(uint8_t col) {
if (pin != NO_PIN) {
#ifdef MATRIX_UNSELECT_DRIVE_HIGH
- setPinOutput_writeHigh(pin);
+ gpio_atomic_set_pin_output_high(pin);
#else
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
#endif
} else {
if (col == (MATRIX_COLS - 1))
- setPinOutput_writeHigh(CLOCK_PIN);
- setPinOutput_writeLow(CLOCK_PIN);
- setPinOutput_writeHigh(LATCH_PIN);
- setPinOutput_writeLow(LATCH_PIN);
+ gpio_atomic_set_pin_output_high(CLOCK_PIN);
+ gpio_atomic_set_pin_output_low(CLOCK_PIN);
+ gpio_atomic_set_pin_output_high(LATCH_PIN);
+ gpio_atomic_set_pin_output_low(LATCH_PIN);
}
}
@@ -131,9 +131,9 @@ static void unselect_cols(void) {
pin_t pin = col_pins[x];
if (pin != NO_PIN) {
#ifdef MATRIX_UNSELECT_DRIVE_HIGH
- setPinOutput_writeHigh(pin);
+ gpio_atomic_set_pin_output_high(pin);
#else
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
#endif
}
if (x == (MATRIX_COLS - 1))
@@ -146,7 +146,7 @@ static void matrix_init_pins(void) {
unselect_cols();
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
if (row_pins[x] != NO_PIN) {
- setPinInputHigh_atomic(row_pins[x]);
+ gpio_atomic_set_pin_input_high(row_pins[x]);
}
}
}
diff --git a/keyboards/keychron/q6/matrix.c b/keyboards/keychron/q6/matrix.c
index 95e00405b44..c61a38ad736 100644
--- a/keyboards/keychron/q6/matrix.c
+++ b/keyboards/keychron/q6/matrix.c
@@ -46,21 +46,21 @@ static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
# define CLR_REG_VAL 0xFF
#endif
-static inline void setPinOutput_writeLow(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_low(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_low(pin);
}
}
-static inline void setPinOutput_writeHigh(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_high(pin);
}
}
-static inline void setPinInputHigh_atomic(pin_t pin) {
+static inline void gpio_atomic_set_pin_input_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_input_high(pin);
}
@@ -77,36 +77,36 @@ static inline uint8_t readMatrixPin(pin_t pin) {
static void shiftOut(uint16_t dataOut) {
for (uint8_t i = 0; i < NO_PIN_NUM; i++) {
if (dataOut & 0x1) {
- setPinOutput_writeHigh(DATA_PIN);
+ gpio_atomic_set_pin_output_high(DATA_PIN);
} else {
- setPinOutput_writeLow(DATA_PIN);
+ gpio_atomic_set_pin_output_low(DATA_PIN);
}
dataOut = dataOut >> 1;
- setPinOutput_writeHigh(CLOCK_PIN);
- setPinOutput_writeLow(CLOCK_PIN);
+ gpio_atomic_set_pin_output_high(CLOCK_PIN);
+ gpio_atomic_set_pin_output_low(CLOCK_PIN);
}
- setPinOutput_writeHigh(LATCH_PIN);
- setPinOutput_writeLow(LATCH_PIN);
+ gpio_atomic_set_pin_output_high(LATCH_PIN);
+ gpio_atomic_set_pin_output_low(LATCH_PIN);
}
static void shiftout_single(uint8_t data) {
if (data & 0x1) {
- setPinOutput_writeHigh(DATA_PIN);
+ gpio_atomic_set_pin_output_high(DATA_PIN);
} else {
- setPinOutput_writeLow(DATA_PIN);
+ gpio_atomic_set_pin_output_low(DATA_PIN);
}
- setPinOutput_writeHigh(CLOCK_PIN);
- setPinOutput_writeLow(CLOCK_PIN);
+ gpio_atomic_set_pin_output_high(CLOCK_PIN);
+ gpio_atomic_set_pin_output_low(CLOCK_PIN);
- setPinOutput_writeHigh(LATCH_PIN);
- setPinOutput_writeLow(LATCH_PIN);
+ gpio_atomic_set_pin_output_high(LATCH_PIN);
+ gpio_atomic_set_pin_output_low(LATCH_PIN);
}
static bool select_col(uint8_t col) {
pin_t pin = col_pins[col];
if (pin != NO_PIN) {
- setPinOutput_writeLow(pin);
+ gpio_atomic_set_pin_output_low(pin);
return true;
} else {
if (col == NO_PIN_START) {
@@ -124,16 +124,16 @@ static void unselect_col(uint8_t col) {
if (pin != NO_PIN) {
#ifdef MATRIX_UNSELECT_DRIVE_HIGH
- setPinOutput_writeHigh(pin);
+ gpio_atomic_set_pin_output_high(pin);
#else
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
#endif
} else {
if (col == (MATRIX_COLS - NO_PIN_OFFSET - 1))
- setPinOutput_writeHigh(CLOCK_PIN);
- setPinOutput_writeLow(CLOCK_PIN);
- setPinOutput_writeHigh(LATCH_PIN);
- setPinOutput_writeLow(LATCH_PIN);
+ gpio_atomic_set_pin_output_high(CLOCK_PIN);
+ gpio_atomic_set_pin_output_low(CLOCK_PIN);
+ gpio_atomic_set_pin_output_high(LATCH_PIN);
+ gpio_atomic_set_pin_output_low(LATCH_PIN);
}
}
@@ -142,9 +142,9 @@ static void unselect_cols(void) {
pin_t pin = col_pins[x];
if (pin != NO_PIN) {
#ifdef MATRIX_UNSELECT_DRIVE_HIGH
- setPinOutput_writeHigh(pin);
+ gpio_atomic_set_pin_output_high(pin);
#else
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
#endif
}
if (x == (MATRIX_COLS - NO_PIN_OFFSET - 1))
@@ -157,7 +157,7 @@ static void matrix_init_pins(void) {
unselect_cols();
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
if (row_pins[x] != NO_PIN) {
- setPinInputHigh_atomic(row_pins[x]);
+ gpio_atomic_set_pin_input_high(row_pins[x]);
}
}
}
diff --git a/keyboards/keychron/q65/matrix.c b/keyboards/keychron/q65/matrix.c
index c9f98886894..4cbdd346ec3 100644
--- a/keyboards/keychron/q65/matrix.c
+++ b/keyboards/keychron/q65/matrix.c
@@ -34,26 +34,26 @@ static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
#define ROWS_PER_HAND (MATRIX_ROWS)
-static inline void writePinLow_atomic(pin_t pin) {
+static inline void gpio_atomic_write_pin_low(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_write_pin_low(pin);
}
}
-static inline void writePinHigh_atomic(pin_t pin) {
+static inline void gpio_atomic_write_pin_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_write_pin_high(pin);
}
}
-static inline void setPinOutput_writeLow(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_low(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_low(pin);
}
}
-static inline void setPinInputHigh_atomic(pin_t pin) {
+static inline void gpio_atomic_set_pin_input_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_input_high(pin);
}
@@ -119,9 +119,9 @@ static bool select_col(uint8_t col) {
if (pin != NO_PIN) {
#ifdef MATRIX_UNSELECT_DRIVE_HIGH
- writePinLow_atomic(pin);
+ gpio_atomic_write_pin_low(pin);
#else
- setPinOutput_writeLow(pin);
+ gpio_atomic_set_pin_output_low(pin);
#endif
return true;
} else {
@@ -138,9 +138,9 @@ static void unselect_col(uint8_t col) {
if (pin != NO_PIN) {
#ifdef MATRIX_UNSELECT_DRIVE_HIGH
- writePinHigh_atomic(pin);
+ gpio_atomic_write_pin_high(pin);
#else
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
#endif
} else {
shiftout_single(0x01);
@@ -152,9 +152,9 @@ static void unselect_cols(void) {
pin_t pin = col_pins[x];
if (pin != NO_PIN) {
#ifdef MATRIX_UNSELECT_DRIVE_HIGH
- setPinOutput_writeHigh(pin);
+ gpio_atomic_set_pin_output_high(pin);
#else
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
#endif
} else {
if (x == 0)
@@ -178,7 +178,7 @@ static void matrix_init_pins(void) {
unselect_cols();
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
if (row_pins[x] != NO_PIN) {
- setPinInputHigh_atomic(row_pins[x]);
+ gpio_atomic_set_pin_input_high(row_pins[x]);
}
}
}
diff --git a/keyboards/keychron/v1/matrix.c b/keyboards/keychron/v1/matrix.c
index 32d9cfdbb06..01875ae44e7 100644
--- a/keyboards/keychron/v1/matrix.c
+++ b/keyboards/keychron/v1/matrix.c
@@ -34,21 +34,21 @@ static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
#define ROWS_PER_HAND MATRIX_ROWS
-static inline void setPinOutput_writeLow(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_low(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_low(pin);
}
}
-static inline void setPinOutput_writeHigh(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_high(pin);
}
}
-static inline void setPinInputHigh_atomic(pin_t pin) {
+static inline void gpio_atomic_set_pin_input_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_input_high(pin);
}
@@ -113,7 +113,7 @@ static bool select_col(uint8_t col) {
pin_t pin = col_pins[col];
if (pin != NO_PIN) {
- setPinOutput_writeLow(pin);
+ gpio_atomic_set_pin_output_low(pin);
return true;
} else {
if (col == 8) {
@@ -129,9 +129,9 @@ static void unselect_col(uint8_t col) {
if (pin != NO_PIN) {
#ifdef MATRIX_UNSELECT_DRIVE_HIGH
- setPinOutput_writeHigh(pin);
+ gpio_atomic_set_pin_output_high(pin);
#else
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
#endif
} else {
shiftOut_single(0x01);
@@ -143,9 +143,9 @@ static void unselect_cols(void) {
pin_t pin = col_pins[x];
if (pin != NO_PIN) {
#ifdef MATRIX_UNSELECT_DRIVE_HIGH
- setPinOutput_writeHigh(pin);
+ gpio_atomic_set_pin_output_high(pin);
#else
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
#endif
} else {
if (x == 8)
@@ -169,7 +169,7 @@ static void matrix_init_pins(void) {
unselect_cols();
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
if (row_pins[x] != NO_PIN) {
- setPinInputHigh_atomic(row_pins[x]);
+ gpio_atomic_set_pin_input_high(row_pins[x]);
}
}
}
diff --git a/keyboards/keychron/v10/matrix.c b/keyboards/keychron/v10/matrix.c
index bb6504fa78f..ee7d0a38c6c 100644
--- a/keyboards/keychron/v10/matrix.c
+++ b/keyboards/keychron/v10/matrix.c
@@ -34,21 +34,21 @@ static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
#define ROWS_PER_HAND (MATRIX_ROWS)
-static inline void setPinOutput_writeLow(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_low(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_low(pin);
}
}
-static inline void setPinOutput_writeHigh(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_high(pin);
}
}
-static inline void setPinInputHigh_atomic(pin_t pin) {
+static inline void gpio_atomic_set_pin_input_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_input_high(pin);
}
@@ -105,7 +105,7 @@ static bool select_col(uint8_t col) {
pin_t pin = col_pins[col];
if (pin != NO_PIN) {
- setPinOutput_writeLow(pin);
+ gpio_atomic_set_pin_output_low(pin);
return true;
} else {
if (col == PIN_START_74HC595) {
@@ -121,9 +121,9 @@ static void unselect_col(uint8_t col) {
if (pin != NO_PIN) {
#ifdef MATRIX_UNSELECT_DRIVE_HIGH
- setPinOutput_writeHigh(pin);
+ gpio_atomic_set_pin_output_high(pin);
#else
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
#endif
} else {
shiftOut_single(0x01);
@@ -137,9 +137,9 @@ static void unselect_cols(void) {
if (pin != NO_PIN) {
#ifdef MATRIX_UNSELECT_DRIVE_HIGH
- setPinOutput_writeHigh(pin);
+ gpio_atomic_set_pin_output_high(pin);
#else
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
#endif
}
if (x == PIN_START_74HC595)
@@ -162,7 +162,7 @@ static void matrix_init_pins(void) {
unselect_cols();
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
if (row_pins[x] != NO_PIN) {
- setPinInputHigh_atomic(row_pins[x]);
+ gpio_atomic_set_pin_input_high(row_pins[x]);
}
}
}
diff --git a/keyboards/keychron/v3/matrix.c b/keyboards/keychron/v3/matrix.c
index 5ee860afd2e..b1274652900 100644
--- a/keyboards/keychron/v3/matrix.c
+++ b/keyboards/keychron/v3/matrix.c
@@ -34,21 +34,21 @@ static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
#define ROWS_PER_HAND (MATRIX_ROWS)
-static inline void setPinOutput_writeLow(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_low(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_low(pin);
}
}
-static inline void setPinOutput_writeHigh(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_high(pin);
}
}
-static inline void setPinInputHigh_atomic(pin_t pin) {
+static inline void gpio_atomic_set_pin_input_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_input_high(pin);
}
@@ -113,7 +113,7 @@ static bool select_col(uint8_t col) {
pin_t pin = col_pins[col];
if (pin != NO_PIN) {
- setPinOutput_writeLow(pin);
+ gpio_atomic_set_pin_output_low(pin);
return true;
} else {
if (col == 8) {
@@ -129,9 +129,9 @@ static void unselect_col(uint8_t col) {
if (pin != NO_PIN) {
#ifdef MATRIX_UNSELECT_DRIVE_HIGH
- setPinOutput_writeHigh(pin);
+ gpio_atomic_set_pin_output_high(pin);
#else
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
#endif
} else {
shiftOut_single(0x01);
@@ -143,9 +143,9 @@ static void unselect_cols(void) {
pin_t pin = col_pins[x];
if (pin != NO_PIN) {
#ifdef MATRIX_UNSELECT_DRIVE_HIGH
- setPinOutput_writeHigh(pin);
+ gpio_atomic_set_pin_output_high(pin);
#else
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
#endif
} else {
if (x == 8)
@@ -169,7 +169,7 @@ static void matrix_init_pins(void) {
unselect_cols();
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
if (row_pins[x] != NO_PIN) {
- setPinInputHigh_atomic(row_pins[x]);
+ gpio_atomic_set_pin_input_high(row_pins[x]);
}
}
}
diff --git a/keyboards/keychron/v5/matrix.c b/keyboards/keychron/v5/matrix.c
index 255201af12a..810fdfb8e6d 100644
--- a/keyboards/keychron/v5/matrix.c
+++ b/keyboards/keychron/v5/matrix.c
@@ -34,21 +34,21 @@ static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
#define ROWS_PER_HAND (MATRIX_ROWS)
-static inline void setPinOutput_writeLow(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_low(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_low(pin);
}
}
-static inline void setPinOutput_writeHigh(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_high(pin);
}
}
-static inline void setPinInputHigh_atomic(pin_t pin) {
+static inline void gpio_atomic_set_pin_input_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_input_high(pin);
}
@@ -113,7 +113,7 @@ static bool select_col(uint8_t col) {
pin_t pin = col_pins[col];
if (pin != NO_PIN) {
- setPinOutput_writeLow(pin);
+ gpio_atomic_set_pin_output_low(pin);
return true;
} else {
if (col == 10) {
@@ -129,9 +129,9 @@ static void unselect_col(uint8_t col) {
if (pin != NO_PIN) {
#ifdef MATRIX_UNSELECT_DRIVE_HIGH
- setPinOutput_writeHigh(pin);
+ gpio_atomic_set_pin_output_high(pin);
#else
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
#endif
} else {
shiftOut_single(0x01);
@@ -143,9 +143,9 @@ static void unselect_cols(void) {
pin_t pin = col_pins[x];
if (pin != NO_PIN) {
#ifdef MATRIX_UNSELECT_DRIVE_HIGH
- setPinOutput_writeHigh(pin);
+ gpio_atomic_set_pin_output_high(pin);
#else
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
#endif
} else {
if (x == 10)
@@ -169,7 +169,7 @@ static void matrix_init_pins(void) {
unselect_cols();
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
if (row_pins[x] != NO_PIN) {
- setPinInputHigh_atomic(row_pins[x]);
+ gpio_atomic_set_pin_input_high(row_pins[x]);
}
}
}
diff --git a/keyboards/keychron/v6/matrix.c b/keyboards/keychron/v6/matrix.c
index bb6504fa78f..ee7d0a38c6c 100644
--- a/keyboards/keychron/v6/matrix.c
+++ b/keyboards/keychron/v6/matrix.c
@@ -34,21 +34,21 @@ static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
#define ROWS_PER_HAND (MATRIX_ROWS)
-static inline void setPinOutput_writeLow(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_low(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_low(pin);
}
}
-static inline void setPinOutput_writeHigh(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_high(pin);
}
}
-static inline void setPinInputHigh_atomic(pin_t pin) {
+static inline void gpio_atomic_set_pin_input_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_input_high(pin);
}
@@ -105,7 +105,7 @@ static bool select_col(uint8_t col) {
pin_t pin = col_pins[col];
if (pin != NO_PIN) {
- setPinOutput_writeLow(pin);
+ gpio_atomic_set_pin_output_low(pin);
return true;
} else {
if (col == PIN_START_74HC595) {
@@ -121,9 +121,9 @@ static void unselect_col(uint8_t col) {
if (pin != NO_PIN) {
#ifdef MATRIX_UNSELECT_DRIVE_HIGH
- setPinOutput_writeHigh(pin);
+ gpio_atomic_set_pin_output_high(pin);
#else
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
#endif
} else {
shiftOut_single(0x01);
@@ -137,9 +137,9 @@ static void unselect_cols(void) {
if (pin != NO_PIN) {
#ifdef MATRIX_UNSELECT_DRIVE_HIGH
- setPinOutput_writeHigh(pin);
+ gpio_atomic_set_pin_output_high(pin);
#else
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
#endif
}
if (x == PIN_START_74HC595)
@@ -162,7 +162,7 @@ static void matrix_init_pins(void) {
unselect_cols();
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
if (row_pins[x] != NO_PIN) {
- setPinInputHigh_atomic(row_pins[x]);
+ gpio_atomic_set_pin_input_high(row_pins[x]);
}
}
}
diff --git a/keyboards/rate/pistachio_pro/matrix.c b/keyboards/rate/pistachio_pro/matrix.c
index f235c65f56f..e40d3edd815 100644
--- a/keyboards/rate/pistachio_pro/matrix.c
+++ b/keyboards/rate/pistachio_pro/matrix.c
@@ -20,53 +20,53 @@ along with this program. If not, see .
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
-static inline void setPinOutput_writeLow(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_low(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_low(pin);
}
}
-static inline void setPinInputHigh_atomic(pin_t pin) {
+static inline void gpio_atomic_set_pin_input_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON { gpio_set_pin_input_high(pin); }
}
static void select_row(uint8_t row) {
- setPinOutput_writeLow(row_pins[row]);
+ gpio_atomic_set_pin_output_low(row_pins[row]);
}
static void unselect_row(uint8_t row) {
- setPinInputHigh_atomic(row_pins[row]);
+ gpio_atomic_set_pin_input_high(row_pins[row]);
}
static void unselect_rows(void) {
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
- setPinInputHigh_atomic(row_pins[x]);
+ gpio_atomic_set_pin_input_high(row_pins[x]);
}
}
static void select_col(uint8_t col) {
- setPinOutput_writeLow(col_pins[col]);
+ gpio_atomic_set_pin_output_low(col_pins[col]);
}
static void unselect_col(uint8_t col) {
- setPinInputHigh_atomic(col_pins[col]);
+ gpio_atomic_set_pin_input_high(col_pins[col]);
}
static void unselect_cols(void) {
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
- setPinInputHigh_atomic(col_pins[x]);
+ gpio_atomic_set_pin_input_high(col_pins[x]);
}
}
static void init_pins(void) {
unselect_rows();
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
- setPinInputHigh_atomic(col_pins[x]);
+ gpio_atomic_set_pin_input_high(col_pins[x]);
}
unselect_cols();
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
- setPinInputHigh_atomic(row_pins[x]);
+ gpio_atomic_set_pin_input_high(row_pins[x]);
}
}
diff --git a/keyboards/work_louder/micro/matrix.c b/keyboards/work_louder/micro/matrix.c
index 3cfbf17dadd..3944d676de0 100644
--- a/keyboards/work_louder/micro/matrix.c
+++ b/keyboards/work_louder/micro/matrix.c
@@ -20,21 +20,21 @@ static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
#define MATRIX_ROW_SHIFTER ((matrix_row_t)1)
-static inline void setPinOutput_writeLow(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_low(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_low(pin);
}
}
-static inline void setPinOutput_writeHigh(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_high(pin);
}
}
-static inline void setPinInputHigh_atomic(pin_t pin) {
+static inline void gpio_atomic_set_pin_input_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_input_high(pin);
}
@@ -51,7 +51,7 @@ static inline uint8_t readMatrixPin(pin_t pin) {
static bool select_row(uint8_t row) {
pin_t pin = row_pins[row];
if (pin != NO_PIN) {
- setPinOutput_writeLow(pin);
+ gpio_atomic_set_pin_output_low(pin);
return true;
}
return false;
@@ -60,7 +60,7 @@ static bool select_row(uint8_t row) {
static void unselect_row(uint8_t row) {
pin_t pin = row_pins[row];
if (pin != NO_PIN) {
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
}
}
@@ -74,11 +74,11 @@ __attribute__((weak)) void matrix_init_custom(void) {
unselect_rows();
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
if (col_pins[x] != NO_PIN) {
- setPinInputHigh_atomic(col_pins[x]);
+ gpio_atomic_set_pin_input_high(col_pins[x]);
}
}
- setPinInputHigh_atomic(F7);
- setPinInputHigh_atomic(F0);
+ gpio_atomic_set_pin_input_high(F7);
+ gpio_atomic_set_pin_input_high(F0);
}
void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
diff --git a/quantum/matrix.c b/quantum/matrix.c
index d4586efac24..a877fb4e41d 100644
--- a/quantum/matrix.c
+++ b/quantum/matrix.c
@@ -76,21 +76,21 @@ __attribute__((weak)) void matrix_init_pins(void);
__attribute__((weak)) void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row);
__attribute__((weak)) void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col, matrix_row_t row_shifter);
-static inline void setPinOutput_writeLow(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_low(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_low(pin);
}
}
-static inline void setPinOutput_writeHigh(pin_t pin) {
+static inline void gpio_atomic_set_pin_output_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_high(pin);
}
}
-static inline void setPinInputHigh_atomic(pin_t pin) {
+static inline void gpio_atomic_set_pin_input_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_input_high(pin);
}
@@ -140,7 +140,7 @@ __attribute__((weak)) void matrix_read_cols_on_row(matrix_row_t current_matrix[]
static bool select_row(uint8_t row) {
pin_t pin = row_pins[row];
if (pin != NO_PIN) {
- setPinOutput_writeLow(pin);
+ gpio_atomic_set_pin_output_low(pin);
return true;
}
return false;
@@ -150,9 +150,9 @@ static void unselect_row(uint8_t row) {
pin_t pin = row_pins[row];
if (pin != NO_PIN) {
# ifdef MATRIX_UNSELECT_DRIVE_HIGH
- setPinOutput_writeHigh(pin);
+ gpio_atomic_set_pin_output_high(pin);
# else
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
# endif
}
}
@@ -167,7 +167,7 @@ __attribute__((weak)) void matrix_init_pins(void) {
unselect_rows();
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
if (col_pins[x] != NO_PIN) {
- setPinInputHigh_atomic(col_pins[x]);
+ gpio_atomic_set_pin_input_high(col_pins[x]);
}
}
}
@@ -203,7 +203,7 @@ __attribute__((weak)) void matrix_read_cols_on_row(matrix_row_t current_matrix[]
static bool select_col(uint8_t col) {
pin_t pin = col_pins[col];
if (pin != NO_PIN) {
- setPinOutput_writeLow(pin);
+ gpio_atomic_set_pin_output_low(pin);
return true;
}
return false;
@@ -213,9 +213,9 @@ static void unselect_col(uint8_t col) {
pin_t pin = col_pins[col];
if (pin != NO_PIN) {
# ifdef MATRIX_UNSELECT_DRIVE_HIGH
- setPinOutput_writeHigh(pin);
+ gpio_atomic_set_pin_output_high(pin);
# else
- setPinInputHigh_atomic(pin);
+ gpio_atomic_set_pin_input_high(pin);
# endif
}
}
@@ -230,7 +230,7 @@ __attribute__((weak)) void matrix_init_pins(void) {
unselect_cols();
for (uint8_t x = 0; x < ROWS_PER_HAND; x++) {
if (row_pins[x] != NO_PIN) {
- setPinInputHigh_atomic(row_pins[x]);
+ gpio_atomic_set_pin_input_high(row_pins[x]);
}
}
}