From b02a5396251c0fadb92f2632e242b555c238ad8b Mon Sep 17 00:00:00 2001 From: Purdea Andrei Date: Wed, 29 Sep 2021 23:31:39 +0300 Subject: 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 * Fix comment * usb_device_state.h: Don't include quantum.h, only the necessary headers. Co-authored-by: Drashna Jaelre --- tmk_core/protocol/chibios/chibios.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tmk_core/protocol/chibios/chibios.c') 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); -- cgit v1.2.3