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
This commit is contained in:
innovaker
2020-12-02 16:41:57 +00:00
committed by Pete Johanson
parent a4652fa25d
commit bac1f17cf6
45 changed files with 208 additions and 205 deletions

View File

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