diff options
| author | Ryan <fauxpark@gmail.com> | 2020-12-18 01:06:30 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-17 14:06:30 +0000 |
| commit | 6ea4b06f9fc19825605477cdc27f5bec0f3dc0a9 (patch) | |
| tree | a5266a6ea24a9dfa1627c0273a24198c5a436b3a /quantum/matrix.c | |
| parent | d9dcb716bfa9eef32560a95ecb50274a0f2b170c (diff) | |
| download | qmk_firmware-6ea4b06f9fc19825605477cdc27f5bec0f3dc0a9.tar.gz qmk_firmware-6ea4b06f9fc19825605477cdc27f5bec0f3dc0a9.zip | |
Run cformat and dos2unix manually (#11235)
Diffstat (limited to 'quantum/matrix.c')
| -rw-r--r-- | quantum/matrix.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/quantum/matrix.c b/quantum/matrix.c index cab0d2ddc..9083ff386 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c | |||
| @@ -40,9 +40,7 @@ static inline void setPinOutput_writeLow(pin_t pin) { | |||
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | static inline void setPinInputHigh_atomic(pin_t pin) { | 42 | static inline void setPinInputHigh_atomic(pin_t pin) { |
| 43 | ATOMIC_BLOCK_FORCEON { | 43 | ATOMIC_BLOCK_FORCEON { setPinInputHigh(pin); } |
| 44 | setPinInputHigh(pin); | ||
| 45 | } | ||
| 46 | } | 44 | } |
| 47 | 45 | ||
| 48 | // matrix code | 46 | // matrix code |
| @@ -82,13 +80,9 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) | |||
| 82 | #elif defined(DIODE_DIRECTION) | 80 | #elif defined(DIODE_DIRECTION) |
| 83 | # if (DIODE_DIRECTION == COL2ROW) | 81 | # if (DIODE_DIRECTION == COL2ROW) |
| 84 | 82 | ||
| 85 | static void select_row(uint8_t row) { | 83 | static void select_row(uint8_t row) { setPinOutput_writeLow(row_pins[row]); } |
| 86 | setPinOutput_writeLow(row_pins[row]); | ||
| 87 | } | ||
| 88 | 84 | ||
| 89 | static void unselect_row(uint8_t row) { | 85 | static void unselect_row(uint8_t row) { setPinInputHigh_atomic(row_pins[row]); } |
| 90 | setPinInputHigh_atomic(row_pins[row]); | ||
| 91 | } | ||
| 92 | 86 | ||
| 93 | static void unselect_rows(void) { | 87 | static void unselect_rows(void) { |
| 94 | for (uint8_t x = 0; x < MATRIX_ROWS; x++) { | 88 | 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) | |||
| 133 | 127 | ||
| 134 | # elif (DIODE_DIRECTION == ROW2COL) | 128 | # elif (DIODE_DIRECTION == ROW2COL) |
| 135 | 129 | ||
| 136 | static void select_col(uint8_t col) { | 130 | static void select_col(uint8_t col) { setPinOutput_writeLow(col_pins[col]); } |
| 137 | setPinOutput_writeLow(col_pins[col]); | ||
| 138 | } | ||
| 139 | 131 | ||
| 140 | static void unselect_col(uint8_t col) { | 132 | static void unselect_col(uint8_t col) { setPinInputHigh_atomic(col_pins[col]); } |
| 141 | setPinInputHigh_atomic(col_pins[col]); | ||
| 142 | } | ||
| 143 | 133 | ||
| 144 | static void unselect_cols(void) { | 134 | static void unselect_cols(void) { |
| 145 | for (uint8_t x = 0; x < MATRIX_COLS; x++) { | 135 | for (uint8_t x = 0; x < MATRIX_COLS; x++) { |
