1
0
Fork 0

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>
This commit is contained in:
Purdea Andrei 2021-09-29 23:31:39 +03:00 committed by GitHub
parent 552c126bea
commit b02a539625
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 120 additions and 2 deletions

View file

@ -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);