summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2021-10-24 20:39:41 +0100
committerGitHub <noreply@github.com>2021-10-24 20:39:41 +0100
commit2ec268bd21c6bb8d6afbd4908fb0289b0d1c6bd2 (patch)
tree48614655e9276d59038359339ebb33e8623b3a38 /quantum
parentc3c562cbb698347f76977a9176d281594e8c77a3 (diff)
Begin to carve out platform/protocol API - Migrate keyboard_* calls (#14888)
Diffstat (limited to 'quantum')
-rw-r--r--quantum/keyboard.c6
-rw-r--r--quantum/main.c15
2 files changed, 20 insertions, 1 deletions
diff --git a/quantum/keyboard.c b/quantum/keyboard.c
index f2a0889c12..f8e36994d2 100644
--- a/quantum/keyboard.c
+++ b/quantum/keyboard.c
@@ -335,6 +335,12 @@ void keyboard_init(void) {
#ifdef DIP_SWITCH_ENABLE
dip_switch_init();
#endif
+#ifdef SLEEP_LED_ENABLE
+ sleep_led_init();
+#endif
+#ifdef VIRTSER_ENABLE
+ virtser_init();
+#endif
#if defined(DEBUG_MATRIX_SCAN_RATE) && defined(CONSOLE_ENABLE)
debug_enable = true;
diff --git a/quantum/main.c b/quantum/main.c
index 2cbcd73d8f..a896a67c66 100644
--- a/quantum/main.c
+++ b/quantum/main.c
@@ -20,7 +20,18 @@ void platform_setup(void);
void protocol_setup(void);
void protocol_init(void);
-void protocol_task(void);
+void protocol_pre_task(void);
+void protocol_post_task(void);
+
+// Bodge as refactoring vusb sucks....
+void protocol_task(void) __attribute__((weak));
+void protocol_task(void) {
+ protocol_pre_task();
+
+ keyboard_task();
+
+ protocol_post_task();
+}
/** \brief Main
*
@@ -30,8 +41,10 @@ int main(void) __attribute__((weak));
int main(void) {
platform_setup();
protocol_setup();
+ keyboard_setup();
protocol_init();
+ keyboard_init();
/* Main loop */
while (true) {