summaryrefslogtreecommitdiff
path: root/app/src/power.c
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/power.c')
-rw-r--r--app/src/power.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/power.c b/app/src/power.c
index bad54d2..2330a3e 100644
--- a/app/src/power.c
+++ b/app/src/power.c
@@ -17,7 +17,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
#include <zmk/events/position-state-changed.h>
#include <zmk/events/sensor-event.h>
-static u32_t power_last_uptime;
+static uint32_t power_last_uptime;
#define MAX_IDLE_MS CONFIG_ZMK_IDLE_SLEEP_TIMEOUT
@@ -29,10 +29,10 @@ bool is_usb_power_present() {
#endif /* CONFIG_USB */
}
-enum power_states sys_pm_policy_next_state(s32_t ticks) {
+enum power_states sys_pm_policy_next_state(int32_t ticks) {
#ifdef CONFIG_SYS_POWER_DEEP_SLEEP_STATES
#ifdef CONFIG_HAS_SYS_POWER_STATE_DEEP_SLEEP_1
- s32_t current = k_uptime_get();
+ int32_t current = k_uptime_get();
if (power_last_uptime > 0 && !is_usb_power_present() &&
current - power_last_uptime > MAX_IDLE_MS) {
return SYS_POWER_STATE_DEEP_SLEEP_1;