diff options
Diffstat (limited to 'quantum/split_common/matrix.c')
-rw-r--r-- | quantum/split_common/matrix.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c index ed1ff5acf..454ea59c3 100644 --- a/quantum/split_common/matrix.c +++ b/quantum/split_common/matrix.c | |||
@@ -79,7 +79,8 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) | |||
79 | return (last_row_value != current_matrix[current_row]); | 79 | return (last_row_value != current_matrix[current_row]); |
80 | } | 80 | } |
81 | 81 | ||
82 | #elif (DIODE_DIRECTION == COL2ROW) | 82 | #elif defined(DIODE_DIRECTION) |
83 | # if (DIODE_DIRECTION == COL2ROW) | ||
83 | 84 | ||
84 | static void select_row(uint8_t row) { | 85 | static void select_row(uint8_t row) { |
85 | setPinOutput(row_pins[row]); | 86 | setPinOutput(row_pins[row]); |
@@ -124,7 +125,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) | |||
124 | return (last_row_value != current_matrix[current_row]); | 125 | return (last_row_value != current_matrix[current_row]); |
125 | } | 126 | } |
126 | 127 | ||
127 | #elif (DIODE_DIRECTION == ROW2COL) | 128 | # elif (DIODE_DIRECTION == ROW2COL) |
128 | 129 | ||
129 | static void select_col(uint8_t col) { | 130 | static void select_col(uint8_t col) { |
130 | setPinOutput(col_pins[col]); | 131 | setPinOutput(col_pins[col]); |
@@ -179,6 +180,11 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) | |||
179 | return matrix_changed; | 180 | return matrix_changed; |
180 | } | 181 | } |
181 | 182 | ||
183 | # else | ||
184 | # error DIODE_DIRECTION must be one of COL2ROW or ROW2COL! | ||
185 | # endif | ||
186 | #else | ||
187 | # error DIODE_DIRECTION is not defined! | ||
182 | #endif | 188 | #endif |
183 | 189 | ||
184 | void matrix_init(void) { | 190 | void matrix_init(void) { |