STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
sleep_math.c File Reference
#include "sleep_math.h"
Include dependency graph for sleep_math.c:

Go to the source code of this file.

Functions

uint16_t sleep_wut_reload (uint32_t ms, uint32_t lsi_hz)
uint32_t sleep_rtc_steps (uint8_t hours, uint8_t minutes, uint8_t seconds, uint32_t ssr)
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)

Function Documentation

◆ sleep_elapsed_ms()

uint32_t sleep_elapsed_ms ( uint32_t from_steps,
uint32_t to_steps,
uint32_t lsi_hz )

◆ sleep_lsi_hz()

uint32_t sleep_lsi_hz ( uint32_t steps,
uint32_t us )

Definition at line 33 of file sleep_math.c.

References SLEEP_RTC_ASYNC_DIV.

Referenced by measure_lsi(), and test_lsi_measurement().

◆ sleep_rtc_steps()

uint32_t sleep_rtc_steps ( uint8_t hours,
uint8_t minutes,
uint8_t seconds,
uint32_t ssr )

Definition at line 14 of file sleep_math.c.

References SLEEP_RTC_SYNC_DIV.

Referenced by rtc_stamp(), test_elapsed(), and test_rtc_steps_count_down_subseconds().

◆ sleep_wut_reload()

uint16_t sleep_wut_reload ( uint32_t ms,
uint32_t lsi_hz )

Definition at line 3 of file sleep_math.c.

References SLEEP_WUT_DIV.

Referenced by board_sleep(), anonymous_namespace{idle_e2e.cpp}::run(), and test_wut_reload().