Enforce definition of DIODE_DIRECTION for non-custom matrix boards (#7915)
* Enforce definition of `DIODE_DIRECTION` for non-custom matrix boards * Define diode direction for failing boards * Matching parentheses * Put onekey diode directions in top level config
This commit is contained in:
@@ -62,7 +62,8 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
|
|||||||
return (last_row_value != current_matrix[current_row]);
|
return (last_row_value != current_matrix[current_row]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif (DIODE_DIRECTION == COL2ROW)
|
#elif defined(DIODE_DIRECTION)
|
||||||
|
# if (DIODE_DIRECTION == COL2ROW)
|
||||||
|
|
||||||
static void select_row(uint8_t row) {
|
static void select_row(uint8_t row) {
|
||||||
setPinOutput(row_pins[row]);
|
setPinOutput(row_pins[row]);
|
||||||
@@ -165,6 +166,11 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
|
|||||||
return matrix_changed;
|
return matrix_changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# else
|
||||||
|
# error DIODE_DIRECTION must be one of COL2ROW or ROW2COL!
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# error DIODE_DIRECTION is not defined!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void matrix_init(void) {
|
void matrix_init(void) {
|
||||||
|
|||||||
@@ -79,7 +79,8 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
|
|||||||
return (last_row_value != current_matrix[current_row]);
|
return (last_row_value != current_matrix[current_row]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif (DIODE_DIRECTION == COL2ROW)
|
#elif defined(DIODE_DIRECTION)
|
||||||
|
# if (DIODE_DIRECTION == COL2ROW)
|
||||||
|
|
||||||
static void select_row(uint8_t row) {
|
static void select_row(uint8_t row) {
|
||||||
setPinOutput(row_pins[row]);
|
setPinOutput(row_pins[row]);
|
||||||
@@ -179,6 +180,11 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
|
|||||||
return matrix_changed;
|
return matrix_changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# else
|
||||||
|
# error DIODE_DIRECTION must be one of COL2ROW or ROW2COL!
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# error DIODE_DIRECTION is not defined!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void matrix_init(void) {
|
void matrix_init(void) {
|
||||||
|
|||||||
Reference in New Issue
Block a user