|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
#include <stdint.h>Go to the source code of this file.
Macros | |
| #define | SLEEP_RTC_ASYNC_DIV 128U /* AsynchPrediv + 1 */ |
| #define | SLEEP_RTC_SYNC_DIV 250U /* SynchPrediv + 1 */ |
| #define | SLEEP_WUT_DIV 16U /* RTC_WAKEUPCLOCK_RTCCLK_DIV16 */ |
| #define | SLEEP_DAY_STEPS (86400UL * SLEEP_RTC_SYNC_DIV) |
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) |
| #define SLEEP_DAY_STEPS (86400UL * SLEEP_RTC_SYNC_DIV) |
Definition at line 25 of file sleep_math.h.
Referenced by sleep_elapsed_ms().
| #define SLEEP_RTC_ASYNC_DIV 128U /* AsynchPrediv + 1 */ |
Definition at line 22 of file sleep_math.h.
Referenced by sleep_elapsed_ms(), and sleep_lsi_hz().
| #define SLEEP_RTC_SYNC_DIV 250U /* SynchPrediv + 1 */ |
Definition at line 23 of file sleep_math.h.
Referenced by sleep_rtc_steps().
| #define SLEEP_WUT_DIV 16U /* RTC_WAKEUPCLOCK_RTCCLK_DIV16 */ |
Definition at line 24 of file sleep_math.h.
Referenced by sleep_wut_reload().
| uint32_t sleep_elapsed_ms | ( | uint32_t | from_steps, |
| uint32_t | to_steps, | ||
| uint32_t | lsi_hz ) |
Definition at line 23 of file sleep_math.c.
References SLEEP_DAY_STEPS, and SLEEP_RTC_ASYNC_DIV.
Referenced by board_sleep(), anonymous_namespace{idle_e2e.cpp}::run(), and test_elapsed().
| 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().
| 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().
| 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().