diff options
author | innovaker <66737976+innovaker@users.noreply.github.com> | 2020-12-02 16:41:57 +0000 |
---|---|---|
committer | Pete Johanson <peter@peterjohanson.com> | 2020-12-14 12:41:25 -0500 |
commit | bac1f17cf6ce225876dc7b6b2a809bcd98010391 (patch) | |
tree | 9783743b31fdadd66d1b3c9e5a3e14dc661ec313 /app/src/power.c | |
parent | a4652fa25da83ae036613157fb566eb1ce1426fe (diff) |
refactor(app): replace Zephyr integer types with C99 integer types
u8_t → uint8_t
u16_t → uint16_t
u32_t → uint32_t
u64_t → uint64_t
s8_t → int8_t
s16_t → int16_t
s32_t → int32_t
s64_t → int64_t
Prerequisite for #223
See: https://github.com/zephyrproject-rtos/zephyr/releases/tag/zephyr-v2.4.0
PR: #467
Diffstat (limited to 'app/src/power.c')
-rw-r--r-- | app/src/power.c | 6 |
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; |