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