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/split_common | |
parent | d9dcb716bfa9eef32560a95ecb50274a0f2b170c (diff) | |
download | qmk_firmware-6ea4b06f9fc19825605477cdc27f5bec0f3dc0a9.tar.gz qmk_firmware-6ea4b06f9fc19825605477cdc27f5bec0f3dc0a9.zip |
Run cformat and dos2unix manually (#11235)
Diffstat (limited to 'quantum/split_common')
-rw-r--r-- | quantum/split_common/matrix.c | 20 | ||||
-rw-r--r-- | quantum/split_common/split_util.c | 8 |
2 files changed, 9 insertions, 19 deletions
diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c index cd5a024c3..51bf8b109 100644 --- a/quantum/split_common/matrix.c +++ b/quantum/split_common/matrix.c | |||
@@ -53,9 +53,7 @@ static inline void setPinOutput_writeLow(pin_t pin) { | |||
53 | } | 53 | } |
54 | 54 | ||
55 | static inline void setPinInputHigh_atomic(pin_t pin) { | 55 | static inline void setPinInputHigh_atomic(pin_t pin) { |
56 | ATOMIC_BLOCK_FORCEON { | 56 | ATOMIC_BLOCK_FORCEON { setPinInputHigh(pin); } |
57 | setPinInputHigh(pin); | ||
58 | } | ||
59 | } | 57 | } |
60 | 58 | ||
61 | // matrix code | 59 | // matrix code |
@@ -95,13 +93,9 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) | |||
95 | #elif defined(DIODE_DIRECTION) | 93 | #elif defined(DIODE_DIRECTION) |
96 | # if (DIODE_DIRECTION == COL2ROW) | 94 | # if (DIODE_DIRECTION == COL2ROW) |
97 | 95 | ||
98 | static void select_row(uint8_t row) { | 96 | static void select_row(uint8_t row) { setPinOutput_writeLow(row_pins[row]); } |
99 | setPinOutput_writeLow(row_pins[row]); | ||
100 | } | ||
101 | 97 | ||
102 | static void unselect_row(uint8_t row) { | 98 | static void unselect_row(uint8_t row) { setPinInputHigh_atomic(row_pins[row]); } |
103 | setPinInputHigh_atomic(row_pins[row]); | ||
104 | } | ||
105 | 99 | ||
106 | static void unselect_rows(void) { | 100 | static void unselect_rows(void) { |
107 | for (uint8_t x = 0; x < ROWS_PER_HAND; x++) { | 101 | 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) | |||
146 | 140 | ||
147 | # elif (DIODE_DIRECTION == ROW2COL) | 141 | # elif (DIODE_DIRECTION == ROW2COL) |
148 | 142 | ||
149 | static void select_col(uint8_t col) { | 143 | static void select_col(uint8_t col) { setPinOutput_writeLow(col_pins[col]); } |
150 | setPinOutput_writeLow(col_pins[col]); | ||
151 | } | ||
152 | 144 | ||
153 | static void unselect_col(uint8_t col) { | 145 | static void unselect_col(uint8_t col) { setPinInputHigh_atomic(col_pins[col]); } |
154 | setPinInputHigh_atomic(col_pins[col]); | ||
155 | } | ||
156 | 146 | ||
157 | static void unselect_cols(void) { | 147 | static void unselect_cols(void) { |
158 | for (uint8_t x = 0; x < MATRIX_COLS; x++) { | 148 | for (uint8_t x = 0; x < MATRIX_COLS; x++) { |
diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index 97d49961d..2ae44e6e1 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c | |||
@@ -95,7 +95,7 @@ static uint8_t peek_matrix_intersection(pin_t out_pin, pin_t in_pin) { | |||
95 | uint8_t pin_state = readPin(in_pin); | 95 | uint8_t pin_state = readPin(in_pin); |
96 | // Set out_pin to a setting that is less susceptible to noise. | 96 | // Set out_pin to a setting that is less susceptible to noise. |
97 | setPinInputHigh(out_pin); | 97 | setPinInputHigh(out_pin); |
98 | matrix_io_delay(); // Wait for the pull-up to go HIGH. | 98 | matrix_io_delay(); // Wait for the pull-up to go HIGH. |
99 | return pin_state; | 99 | return pin_state; |
100 | } | 100 | } |
101 | #endif | 101 | #endif |
@@ -106,11 +106,11 @@ __attribute__((weak)) bool is_keyboard_left(void) { | |||
106 | setPinInput(SPLIT_HAND_PIN); | 106 | setPinInput(SPLIT_HAND_PIN); |
107 | return readPin(SPLIT_HAND_PIN); | 107 | return readPin(SPLIT_HAND_PIN); |
108 | #elif defined(SPLIT_HAND_MATRIX_GRID) | 108 | #elif defined(SPLIT_HAND_MATRIX_GRID) |
109 | # ifdef SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT | 109 | # ifdef SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT |
110 | return peek_matrix_intersection(SPLIT_HAND_MATRIX_GRID); | 110 | return peek_matrix_intersection(SPLIT_HAND_MATRIX_GRID); |
111 | # else | 111 | # else |
112 | return !peek_matrix_intersection(SPLIT_HAND_MATRIX_GRID); | 112 | return !peek_matrix_intersection(SPLIT_HAND_MATRIX_GRID); |
113 | # endif | 113 | # endif |
114 | #elif defined(EE_HANDS) | 114 | #elif defined(EE_HANDS) |
115 | return eeconfig_read_handedness(); | 115 | return eeconfig_read_handedness(); |
116 | #elif defined(MASTER_RIGHT) | 116 | #elif defined(MASTER_RIGHT) |