Don't process keycodes on the slave
This commit is contained in:
parent
f1451b4b04
commit
25285a1c5a
2 changed files with 38 additions and 27 deletions
|
@ -126,6 +126,10 @@ void matrix_scan_kb(void) {
|
|||
matrix_scan_user();
|
||||
}
|
||||
|
||||
bool is_keyboard_master(void) {
|
||||
return is_serial_link_master();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void ergodox_board_led_on(void){
|
||||
}
|
||||
|
|
|
@ -119,6 +119,11 @@ void keyboard_setup(void) {
|
|||
matrix_setup();
|
||||
}
|
||||
|
||||
__attribute__((weak))
|
||||
bool is_keyboard_master(void) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void keyboard_init(void) {
|
||||
timer_init();
|
||||
matrix_init();
|
||||
|
@ -168,6 +173,7 @@ void keyboard_task(void)
|
|||
matrix_row_t matrix_change = 0;
|
||||
|
||||
matrix_scan();
|
||||
if (is_keyboard_master()) {
|
||||
for (uint8_t r = 0; r < MATRIX_ROWS; r++) {
|
||||
matrix_row = matrix_get_row(r);
|
||||
matrix_change = matrix_row ^ matrix_prev[r];
|
||||
|
@ -202,6 +208,7 @@ void keyboard_task(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// call with pseudo tick event when no real key event.
|
||||
action_exec(TICK);
|
||||
|
||||
|
|
Loading…
Reference in a new issue