1
0
Fork 0

Refactor use of matrix_scan_kb (#24200)

This commit is contained in:
Joel Challis 2024-07-27 06:02:51 +01:00 committed by GitHub
parent 20ae67ba01
commit 02b43b4b60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 20 additions and 164 deletions

View file

@ -248,13 +248,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
return true;
}
void matrix_scan_kb(void) {
if (!is_oled_on()) {
m2s.cur_alp_index = 1;
}
matrix_scan_user();
}
void user_sync_alpa_slave_handler(uint8_t in_buflen, const void *in_data, uint8_t out_buflen, void *out_data) {
const master_to_slave_t *m2s_p = (const master_to_slave_t *)in_data;
s2m.cur_alp_index = m2s_p->cur_alp_index;
@ -270,6 +263,9 @@ void keyboard_post_init_kb(void) {
void housekeeping_task_kb(void) {
if (is_keyboard_master()) {
if (!is_oled_on()) {
m2s.cur_alp_index = 1;
}
// Interact with slave every 200ms
static uint32_t last_sync = 0;
if (timer_elapsed32(last_sync) > 200) {
@ -281,7 +277,6 @@ void housekeeping_task_kb(void) {
}
}
}
housekeeping_task_user();
}
#endif