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...
|
|
Detailed Description
Macro Definition Documentation
| #define LONGEST_SLEEP_TIME |
Value:
((( 1UL << RTC_CNT_BITLENGHT ) \
/(
RTC_INPUT_FREQ
/LAGEST_PRESCALER_VALUE)) * 1000UL )
Function Documentation
| uint64_t get_rtc_time_since | ( | uint32_t | cnt_ticks | ) |
Get time elapsed since cnt_ticks.
- Parameters
-
[in] cnt_ticks Number of rtc-ticks
- Return values
-
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.
- Return values
-
bool true - compare interrupt was triggered false - it wasn't
| uint32_t rtc_cnt_get | ( | void | ) |
Get RTC counter.
- Return values
-
uint32_t Contents of RTC counter register.
| void rtc_start | ( | uint32_t | sleep_time_ms | ) |
Function initialization and configuration of RTC driver instance.
- Parameters
-
[in] sleep_time_ms after this time compare event will be triggered