diff options
Diffstat (limited to 'tmk_core/common/keyboard.c')
-rw-r--r-- | tmk_core/common/keyboard.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index b0394af003..8c7bdc8b55 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -235,6 +235,20 @@ __attribute__((weak)) bool is_keyboard_left(void) { return true; } */ __attribute__((weak)) bool should_process_keypress(void) { return is_keyboard_master(); } +/** \brief housekeeping_task_kb + * + * Override this function if you have a need to execute code for every keyboard main loop iteration. + * This is specific to keyboard-level functionality. + */ +__attribute__((weak)) void housekeeping_task_kb(void) {} + +/** \brief housekeeping_task_user + * + * Override this function if you have a need to execute code for every keyboard main loop iteration. + * This is specific to user/keymap-level functionality. + */ +__attribute__((weak)) void housekeeping_task_user(void) {} + /** \brief keyboard_init * * FIXME: needs doc @@ -291,6 +305,10 @@ void keyboard_init(void) { dip_switch_init(); #endif +#if defined(DEBUG_MATRIX_SCAN_RATE) && defined(CONSOLE_ENABLE) + debug_enable = true; +#endif + keyboard_post_init_kb(); /* Always keep this last */ } @@ -315,6 +333,9 @@ void keyboard_task(void) { uint8_t keys_processed = 0; #endif + housekeeping_task_kb(); + housekeeping_task_user(); + #if defined(OLED_DRIVER_ENABLE) && !defined(OLED_DISABLE_TIMEOUT) uint8_t ret = matrix_scan(); #else |