summaryrefslogtreecommitdiff
path: root/tmk_core/common/keyboard.c
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2021-05-18 17:02:28 +1000
committerGitHub <noreply@github.com>2021-05-18 17:02:28 +1000
commit58142f0726147d538167ff3ab793743348f40dcd (patch)
treee3db28a5c97c75c101af821283c56ce4dc017a3a /tmk_core/common/keyboard.c
parent6cdc996e0b40e9cd9a368e5ac2be2341aa9d6747 (diff)
downloadqmk_firmware-58142f0726147d538167ff3ab793743348f40dcd.tar.gz
qmk_firmware-58142f0726147d538167ff3ab793743348f40dcd.zip
Fixup housekeeping from being invoked twice per loop. (#12933)
Diffstat (limited to 'tmk_core/common/keyboard.c')
-rw-r--r--tmk_core/common/keyboard.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c
index 24baf41c00..3d6092e71c 100644
--- a/tmk_core/common/keyboard.c
+++ b/tmk_core/common/keyboard.c
@@ -280,6 +280,15 @@ __attribute__((weak)) void housekeeping_task_kb(void) {}
*/
__attribute__((weak)) void housekeeping_task_user(void) {}
+/** \brief housekeeping_task
+ *
+ * Invokes hooks for executing code after QMK is done after each loop iteration.
+ */
+void housekeeping_task(void) {
+ housekeeping_task_kb();
+ housekeeping_task_user();
+}
+
/** \brief keyboard_init
*
* FIXME: needs doc
@@ -374,9 +383,6 @@ void keyboard_task(void) {
bool encoders_changed = false;
#endif
- housekeeping_task_kb();
- housekeeping_task_user();
-
uint8_t matrix_changed = matrix_scan();
if (matrix_changed) last_matrix_activity_trigger();