Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better slave scan functions #12317

Merged
merged 1 commit into from
Mar 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions quantum/matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion quantum/split_common/matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down