diff options
author | Joel Challis <git@zvecr.com> | 2021-11-02 18:53:46 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-02 18:53:46 +0000 |
commit | 634e42b2b47d32ae8aa933599e63e3761939e3f5 (patch) | |
tree | 5079db1b33ae4b13c97339fc36573d967384da15 /quantum | |
parent | 0ecd4926b20b3a3240dcb29f5184853c1ec192b8 (diff) |
Revert to old init order for host driver (#15029)
* Partially revert 14888
Diffstat (limited to 'quantum')
-rw-r--r-- | quantum/main.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/quantum/main.c b/quantum/main.c index a896a67c66..3814d371c1 100644 --- a/quantum/main.c +++ b/quantum/main.c @@ -19,11 +19,21 @@ void platform_setup(void); void protocol_setup(void); -void protocol_init(void); +void protocol_pre_init(void); +void protocol_post_init(void); void protocol_pre_task(void); void protocol_post_task(void); -// Bodge as refactoring vusb sucks.... +// Bodge as refactoring this area sucks.... +void protocol_init(void) __attribute__((weak)); +void protocol_init(void) { + protocol_pre_init(); + + keyboard_init(); + + protocol_post_init(); +} + void protocol_task(void) __attribute__((weak)); void protocol_task(void) { protocol_pre_task(); @@ -44,7 +54,6 @@ int main(void) { keyboard_setup(); protocol_init(); - keyboard_init(); /* Main loop */ while (true) { |