1#ifndef STAR_SLEEP_MATH_H
2#define STAR_SLEEP_MATH_H
22#define SLEEP_RTC_ASYNC_DIV 128U
23#define SLEEP_RTC_SYNC_DIV 250U
24#define SLEEP_WUT_DIV 16U
25#define SLEEP_DAY_STEPS (86400UL * SLEEP_RTC_SYNC_DIV)
33uint32_t
sleep_rtc_steps(uint8_t hours, uint8_t minutes, uint8_t seconds,
uint32_t sleep_elapsed_ms(uint32_t from_steps, uint32_t to_steps, uint32_t lsi_hz)
uint32_t sleep_lsi_hz(uint32_t steps, uint32_t us)
uint32_t sleep_rtc_steps(uint8_t hours, uint8_t minutes, uint8_t seconds, uint32_t ssr)
uint16_t sleep_wut_reload(uint32_t ms, uint32_t lsi_hz)