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 b0394af00..8c7bdc8b5 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; } | |||
| 235 | */ | 235 | */ |
| 236 | __attribute__((weak)) bool should_process_keypress(void) { return is_keyboard_master(); } | 236 | __attribute__((weak)) bool should_process_keypress(void) { return is_keyboard_master(); } |
| 237 | 237 | ||
| 238 | /** \brief housekeeping_task_kb | ||
| 239 | * | ||
| 240 | * Override this function if you have a need to execute code for every keyboard main loop iteration. | ||
| 241 | * This is specific to keyboard-level functionality. | ||
| 242 | */ | ||
| 243 | __attribute__((weak)) void housekeeping_task_kb(void) {} | ||
| 244 | |||
| 245 | /** \brief housekeeping_task_user | ||
| 246 | * | ||
| 247 | * Override this function if you have a need to execute code for every keyboard main loop iteration. | ||
| 248 | * This is specific to user/keymap-level functionality. | ||
| 249 | */ | ||
| 250 | __attribute__((weak)) void housekeeping_task_user(void) {} | ||
| 251 | |||
| 238 | /** \brief keyboard_init | 252 | /** \brief keyboard_init |
| 239 | * | 253 | * |
| 240 | * FIXME: needs doc | 254 | * FIXME: needs doc |
| @@ -291,6 +305,10 @@ void keyboard_init(void) { | |||
| 291 | dip_switch_init(); | 305 | dip_switch_init(); |
| 292 | #endif | 306 | #endif |
| 293 | 307 | ||
| 308 | #if defined(DEBUG_MATRIX_SCAN_RATE) && defined(CONSOLE_ENABLE) | ||
| 309 | debug_enable = true; | ||
| 310 | #endif | ||
| 311 | |||
| 294 | keyboard_post_init_kb(); /* Always keep this last */ | 312 | keyboard_post_init_kb(); /* Always keep this last */ |
| 295 | } | 313 | } |
| 296 | 314 | ||
| @@ -315,6 +333,9 @@ void keyboard_task(void) { | |||
| 315 | uint8_t keys_processed = 0; | 333 | uint8_t keys_processed = 0; |
| 316 | #endif | 334 | #endif |
| 317 | 335 | ||
| 336 | housekeeping_task_kb(); | ||
| 337 | housekeeping_task_user(); | ||
| 338 | |||
| 318 | #if defined(OLED_DRIVER_ENABLE) && !defined(OLED_DISABLE_TIMEOUT) | 339 | #if defined(OLED_DRIVER_ENABLE) && !defined(OLED_DISABLE_TIMEOUT) |
| 319 | uint8_t ret = matrix_scan(); | 340 | uint8_t ret = matrix_scan(); |
| 320 | #else | 341 | #else |
