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

@@ -0,0 +1,10 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <kernel.h>
#include <zmk/events/activity-state-changed.h>
ZMK_EVENT_IMPL(activity_state_changed);