mirror of
https://github.com/openstenoproject/qmk
synced 2024-11-10 02:30:07 +00:00
[Bug] Fix compile issues for boards with custom matrix (#14323)
This commit is contained in:
parent
8d6d8cfadf
commit
1e1be4c229
5 changed files with 58 additions and 2 deletions
|
@ -33,6 +33,18 @@ static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||||
static matrix_row_t read_cols(void);
|
static matrix_row_t read_cols(void);
|
||||||
static void select_row(uint8_t col);
|
static void select_row(uint8_t col);
|
||||||
|
|
||||||
|
// user-defined overridable functions
|
||||||
|
|
||||||
|
__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); }
|
||||||
|
|
||||||
|
__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); }
|
||||||
|
|
||||||
|
__attribute__((weak)) void matrix_init_user(void) {}
|
||||||
|
|
||||||
|
__attribute__((weak)) void matrix_scan_user(void) {}
|
||||||
|
|
||||||
|
// helper functions
|
||||||
|
|
||||||
inline uint8_t matrix_rows(void)
|
inline uint8_t matrix_rows(void)
|
||||||
{
|
{
|
||||||
return MATRIX_ROWS;
|
return MATRIX_ROWS;
|
||||||
|
|
|
@ -27,6 +27,17 @@ static matrix_row_t matrix[MATRIX_ROWS];
|
||||||
static matrix_row_t read_cols(void);
|
static matrix_row_t read_cols(void);
|
||||||
static void select_row(uint8_t row);
|
static void select_row(uint8_t row);
|
||||||
|
|
||||||
|
// user-defined overridable functions
|
||||||
|
|
||||||
|
__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); }
|
||||||
|
|
||||||
|
__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); }
|
||||||
|
|
||||||
|
__attribute__((weak)) void matrix_init_user(void) {}
|
||||||
|
|
||||||
|
__attribute__((weak)) void matrix_scan_user(void) {}
|
||||||
|
|
||||||
|
// helper functions
|
||||||
void matrix_init(void) {
|
void matrix_init(void) {
|
||||||
/* See datahand.h for more detail on pins. */
|
/* See datahand.h for more detail on pins. */
|
||||||
|
|
||||||
|
@ -48,7 +59,7 @@ void matrix_init(void) {
|
||||||
/* Turn off the lock LEDs. */
|
/* Turn off the lock LEDs. */
|
||||||
PORTF |= LED_CAPS_LOCK | LED_NUM_LOCK | LED_SCROLL_LOCK | LED_MOUSE_LOCK;
|
PORTF |= LED_CAPS_LOCK | LED_NUM_LOCK | LED_SCROLL_LOCK | LED_MOUSE_LOCK;
|
||||||
|
|
||||||
matrix_init_user();
|
matrix_init_quantum();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t matrix_scan(void) {
|
uint8_t matrix_scan(void) {
|
||||||
|
@ -62,7 +73,7 @@ uint8_t matrix_scan(void) {
|
||||||
matrix[row] = read_cols();
|
matrix[row] = read_cols();
|
||||||
}
|
}
|
||||||
|
|
||||||
matrix_scan_user();
|
matrix_scan_quantum();
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,17 @@
|
||||||
static matrix_row_t rows[MATRIX_ROWS];
|
static matrix_row_t rows[MATRIX_ROWS];
|
||||||
#define ROWS_PER_HAND (MATRIX_ROWS / 2)
|
#define ROWS_PER_HAND (MATRIX_ROWS / 2)
|
||||||
|
|
||||||
|
// user-defined overridable functions
|
||||||
|
|
||||||
|
__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); }
|
||||||
|
|
||||||
|
__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); }
|
||||||
|
|
||||||
|
__attribute__((weak)) void matrix_init_user(void) {}
|
||||||
|
|
||||||
|
__attribute__((weak)) void matrix_scan_user(void) {}
|
||||||
|
|
||||||
|
// helper functions
|
||||||
inline
|
inline
|
||||||
uint8_t matrix_rows(void) {
|
uint8_t matrix_rows(void) {
|
||||||
return MATRIX_ROWS;
|
return MATRIX_ROWS;
|
||||||
|
|
|
@ -26,6 +26,17 @@ static matrix_row_t matrix_debouncing[MATRIX_COLS];
|
||||||
static bool debouncing = false;
|
static bool debouncing = false;
|
||||||
static uint16_t debouncing_time = 0;
|
static uint16_t debouncing_time = 0;
|
||||||
|
|
||||||
|
// user-defined overridable functions
|
||||||
|
|
||||||
|
__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); }
|
||||||
|
|
||||||
|
__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); }
|
||||||
|
|
||||||
|
__attribute__((weak)) void matrix_init_user(void) {}
|
||||||
|
|
||||||
|
__attribute__((weak)) void matrix_scan_user(void) {}
|
||||||
|
|
||||||
|
// helper functions
|
||||||
void matrix_init(void)
|
void matrix_init(void)
|
||||||
{
|
{
|
||||||
//debug_enable = true;
|
//debug_enable = true;
|
||||||
|
|
|
@ -38,6 +38,17 @@ static void matrix_select_row(uint8_t row);
|
||||||
static uint8_t mcp23018_reset_loop = 0;
|
static uint8_t mcp23018_reset_loop = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// user-defined overridable functions
|
||||||
|
|
||||||
|
__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); }
|
||||||
|
|
||||||
|
__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); }
|
||||||
|
|
||||||
|
__attribute__((weak)) void matrix_init_user(void) {}
|
||||||
|
|
||||||
|
__attribute__((weak)) void matrix_scan_user(void) {}
|
||||||
|
|
||||||
|
// helper functions
|
||||||
void matrix_init(void)
|
void matrix_init(void)
|
||||||
{
|
{
|
||||||
// all outputs for rows high
|
// all outputs for rows high
|
||||||
|
|
Loading…
Reference in a new issue