forked from mirrors/qmk_firmware
Adding keyboard level weak function for slave matrix scan (#12317)
This commit is contained in:
parent
2f6236d1ea
commit
ff41c22fdc
2 changed files with 7 additions and 1 deletions
|
@ -74,6 +74,11 @@ void matrix_scan_kb(void);
|
|||
void matrix_init_user(void);
|
||||
void matrix_scan_user(void);
|
||||
|
||||
#ifdef SPLIT_KEYBOARD
|
||||
void matrix_slave_scan_kb(void);
|
||||
void matrix_slave_scan_user(void);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -43,6 +43,7 @@ extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values
|
|||
uint8_t thisHand, thatHand;
|
||||
|
||||
// user-defined overridable functions
|
||||
__attribute__((weak)) void matrix_slave_scan_kb(void) { matrix_slave_scan_user(); }
|
||||
__attribute__((weak)) void matrix_slave_scan_user(void) {}
|
||||
|
||||
static inline void setPinOutput_writeLow(pin_t pin) {
|
||||
|
@ -284,7 +285,7 @@ bool matrix_post_scan(void) {
|
|||
} else {
|
||||
transport_slave(matrix + thatHand, matrix + thisHand);
|
||||
|
||||
matrix_slave_scan_user();
|
||||
matrix_slave_scan_kb();
|
||||
}
|
||||
|
||||
return changed;
|
||||
|
|
Loading…
Reference in a new issue