Macros | |
#define | LAGEST_PRESCALER_VALUE 4096 |
#define | RTC_CNT_BITLENGHT 24 |
#define | LONGEST_SLEEP_TIME |
#define | SHORTEST_SLEEP_TIME 1 |
Functions | |
void | rtc_lfclk_start (void) |
Function for initialize low frequency clock. | |
void | rtc_start (uint32_t sleep_time_ms) |
Function initialization and configuration of RTC driver instance. More... | |
void | rtc_stop (void) |
Stop RTC. | |
uint32_t | rtc_cnt_get (void) |
Get RTC counter. More... | |
uint64_t | get_rtc_time_since (uint32_t cnt_ticks) |
Get time elapsed since cnt_ticks. More... | |
bool | is_rtc_comp_irq_triggerd (void) |
Check if rtc compare interrupt was triggered after calling rtc_start function. More... | |
#define LONGEST_SLEEP_TIME |
uint64_t get_rtc_time_since | ( | uint32_t | cnt_ticks | ) |
Get time elapsed since cnt_ticks.
[in] | cnt_ticks | Number of rtc-ticks |
uint32_t | Time since cnt_ticks, ms |
bool is_rtc_comp_irq_triggerd | ( | void | ) |
Check if rtc compare interrupt was triggered after calling rtc_start function.
bool | true - compare interrupt was triggered false - it wasn't |
uint32_t rtc_cnt_get | ( | void | ) |
Get RTC counter.
uint32_t | Contents of RTC counter register. |
void rtc_start | ( | uint32_t | sleep_time_ms | ) |
Function initialization and configuration of RTC driver instance.
[in] | sleep_time_ms | after this time compare event will be triggered |