refactor(power): Extract activity/idle detection.

* Refactor power to extract more general purpose
  activity detection/events.
* Use activity state to implement PM callback.
This commit is contained in:
Pete Johanson
2020-12-01 00:52:32 -05:00
parent 8a529163fc
commit f7c16dfe69
7 changed files with 136 additions and 29 deletions

View File

@@ -228,6 +228,10 @@ endmenu
menu "Power Management"
config ZMK_IDLE_TIMEOUT
int "Milliseconds of inactivity before entering idle state (OLED shutoff, etc)"
default 30000
config ZMK_SLEEP
bool "Enable deep sleep support"
imply USB
@@ -242,7 +246,7 @@ choice SYS_PM_POLICY
endchoice
config ZMK_IDLE_SLEEP_TIMEOUT
int "Milliseconds to wait to sleep when going idle"
int "Milliseconds of inactivity before entering deep sleep"
default 900000
#ZMK_SLEEP