1
0
Fork 0
forked from forks/qmk_firmware

Adding keyboard level weak function for slave matrix scan (#12317)

This commit is contained in:
XScorpion2 2021-03-25 06:33:18 -05:00 committed by GitHub
parent 2f6236d1ea
commit ff41c22fdc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -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

View file

@ -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;