summaryrefslogtreecommitdiff
path: root/tmk_core/protocol/chibios/chibios.c
diff options
context:
space:
mode:
authorPurdea Andrei <andrei@purdea.ro>2021-09-29 23:31:39 +0300
committerGitHub <noreply@github.com>2021-09-30 06:31:39 +1000
commitb02a5396251c0fadb92f2632e242b555c238ad8b (patch)
tree4f01ce4de39773b3225180af56723351862c4aa8 /tmk_core/protocol/chibios/chibios.c
parent552c126bea24b4f182caa62ada8c2213dc06de23 (diff)
Added power tracking api (#12691)
* Add power tracking API to lufa and chibios targets * power.c: Pass through power state to the notify function * power: added notify_power_state_change_user too. * making it pass the PR linter * Add a POWER_STATE_NO_INIT state, that we start in before calling power_init(); * Rename *power* to *usb_power* * removing stray newline * Rename usb_power* to usb_device_state* * Update quantum/usb_device_state.h Co-authored-by: Drashna Jaelre <drashna@live.com> * Fix comment * usb_device_state.h: Don't include quantum.h, only the necessary headers. Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'tmk_core/protocol/chibios/chibios.c')
-rw-r--r--tmk_core/protocol/chibios/chibios.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tmk_core/protocol/chibios/chibios.c b/tmk_core/protocol/chibios/chibios.c
index 78a2e3fcbb..e5d3a4c540 100644
--- a/tmk_core/protocol/chibios/chibios.c
+++ b/tmk_core/protocol/chibios/chibios.c
@@ -27,6 +27,7 @@
#include "keyboard.h"
#include "action.h"
#include "action_util.h"
+#include "usb_device_state.h"
#include "mousekey.h"
#include "led.h"
#include "sendchar.h"
@@ -139,6 +140,8 @@ void boardInit(void) {
}
void protocol_setup(void) {
+ usb_device_state_init();
+
// TESTING
// chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);