mirror of
https://github.com/firewalkwithm3/qmk_firmware.git
synced 2024-11-22 19:40:29 +08:00
Adding keyboard level weak function for slave matrix scan (#12317)
This commit is contained in:
parent
2f6236d1ea
commit
ff41c22fdc
|
@ -74,6 +74,11 @@ void matrix_scan_kb(void);
|
||||||
void matrix_init_user(void);
|
void matrix_init_user(void);
|
||||||
void matrix_scan_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
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -43,6 +43,7 @@ extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values
|
||||||
uint8_t thisHand, thatHand;
|
uint8_t thisHand, thatHand;
|
||||||
|
|
||||||
// user-defined overridable functions
|
// user-defined overridable functions
|
||||||
|
__attribute__((weak)) void matrix_slave_scan_kb(void) { matrix_slave_scan_user(); }
|
||||||
__attribute__((weak)) void matrix_slave_scan_user(void) {}
|
__attribute__((weak)) void matrix_slave_scan_user(void) {}
|
||||||
|
|
||||||
static inline void setPinOutput_writeLow(pin_t pin) {
|
static inline void setPinOutput_writeLow(pin_t pin) {
|
||||||
|
@ -284,7 +285,7 @@ bool matrix_post_scan(void) {
|
||||||
} else {
|
} else {
|
||||||
transport_slave(matrix + thatHand, matrix + thisHand);
|
transport_slave(matrix + thatHand, matrix + thisHand);
|
||||||
|
|
||||||
matrix_slave_scan_user();
|
matrix_slave_scan_kb();
|
||||||
}
|
}
|
||||||
|
|
||||||
return changed;
|
return changed;
|
||||||
|
|
Loading…
Reference in a new issue