mirror of
https://github.com/Keychron/qmk_firmware.git
synced 2024-11-22 08:27:56 +06:00
Run cformat and dos2unix manually (#11235)
This commit is contained in:
parent
d9dcb716bf
commit
6ea4b06f9f
|
@ -1,4 +1,4 @@
|
||||||
# The Default Zinc Layout
|
# The Default Zinc Layout
|
||||||
## layout
|
## layout
|
||||||
|
|
||||||
### Qwerty
|
### Qwerty
|
||||||
|
|
|
@ -40,9 +40,7 @@ static inline void setPinOutput_writeLow(pin_t pin) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void setPinInputHigh_atomic(pin_t pin) {
|
static inline void setPinInputHigh_atomic(pin_t pin) {
|
||||||
ATOMIC_BLOCK_FORCEON {
|
ATOMIC_BLOCK_FORCEON { setPinInputHigh(pin); }
|
||||||
setPinInputHigh(pin);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// matrix code
|
// matrix code
|
||||||
|
@ -82,13 +80,9 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
|
||||||
#elif defined(DIODE_DIRECTION)
|
#elif defined(DIODE_DIRECTION)
|
||||||
# if (DIODE_DIRECTION == COL2ROW)
|
# if (DIODE_DIRECTION == COL2ROW)
|
||||||
|
|
||||||
static void select_row(uint8_t row) {
|
static void select_row(uint8_t row) { setPinOutput_writeLow(row_pins[row]); }
|
||||||
setPinOutput_writeLow(row_pins[row]);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void unselect_row(uint8_t row) {
|
static void unselect_row(uint8_t row) { setPinInputHigh_atomic(row_pins[row]); }
|
||||||
setPinInputHigh_atomic(row_pins[row]);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void unselect_rows(void) {
|
static void unselect_rows(void) {
|
||||||
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
|
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
|
||||||
|
@ -133,13 +127,9 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
|
||||||
|
|
||||||
# elif (DIODE_DIRECTION == ROW2COL)
|
# elif (DIODE_DIRECTION == ROW2COL)
|
||||||
|
|
||||||
static void select_col(uint8_t col) {
|
static void select_col(uint8_t col) { setPinOutput_writeLow(col_pins[col]); }
|
||||||
setPinOutput_writeLow(col_pins[col]);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void unselect_col(uint8_t col) {
|
static void unselect_col(uint8_t col) { setPinInputHigh_atomic(col_pins[col]); }
|
||||||
setPinInputHigh_atomic(col_pins[col]);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void unselect_cols(void) {
|
static void unselect_cols(void) {
|
||||||
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
|
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
|
||||||
|
|
|
@ -53,9 +53,7 @@ static inline void setPinOutput_writeLow(pin_t pin) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void setPinInputHigh_atomic(pin_t pin) {
|
static inline void setPinInputHigh_atomic(pin_t pin) {
|
||||||
ATOMIC_BLOCK_FORCEON {
|
ATOMIC_BLOCK_FORCEON { setPinInputHigh(pin); }
|
||||||
setPinInputHigh(pin);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// matrix code
|
// matrix code
|
||||||
|
@ -95,13 +93,9 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
|
||||||
#elif defined(DIODE_DIRECTION)
|
#elif defined(DIODE_DIRECTION)
|
||||||
# if (DIODE_DIRECTION == COL2ROW)
|
# if (DIODE_DIRECTION == COL2ROW)
|
||||||
|
|
||||||
static void select_row(uint8_t row) {
|
static void select_row(uint8_t row) { setPinOutput_writeLow(row_pins[row]); }
|
||||||
setPinOutput_writeLow(row_pins[row]);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void unselect_row(uint8_t row) {
|
static void unselect_row(uint8_t row) { setPinInputHigh_atomic(row_pins[row]); }
|
||||||
setPinInputHigh_atomic(row_pins[row]);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void unselect_rows(void) {
|
static void unselect_rows(void) {
|
||||||
for (uint8_t x = 0; x < ROWS_PER_HAND; x++) {
|
for (uint8_t x = 0; x < ROWS_PER_HAND; x++) {
|
||||||
|
@ -146,13 +140,9 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
|
||||||
|
|
||||||
# elif (DIODE_DIRECTION == ROW2COL)
|
# elif (DIODE_DIRECTION == ROW2COL)
|
||||||
|
|
||||||
static void select_col(uint8_t col) {
|
static void select_col(uint8_t col) { setPinOutput_writeLow(col_pins[col]); }
|
||||||
setPinOutput_writeLow(col_pins[col]);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void unselect_col(uint8_t col) {
|
static void unselect_col(uint8_t col) { setPinInputHigh_atomic(col_pins[col]); }
|
||||||
setPinInputHigh_atomic(col_pins[col]);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void unselect_cols(void) {
|
static void unselect_cols(void) {
|
||||||
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
|
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user