|
Core
|
Core RTC library. More...
#include <stdbool.h>#include <stdint.h>#include <time.h>Go to the source code of this file.
Functions | |
| bool | core_RTC_init (bool force_init) |
| Initialize the RTC module. | |
| void | core_RTC_get_time (struct tm *tm) |
Get the current RTC time as a tm struct (as defined in time.h) | |
| void | core_RTC_set_time (struct tm *tm, uint64_t sync) |
Set the current RTC time from a tm struct (as defined in time.h) | |
| uint32_t | core_RTC_get_usec () |
| Get the microsecond value associated with the most recent core_RTC_get_time() call. | |
Core RTC library.
The core library component is used to set and get the current time using the internal RTC module.
| void core_RTC_get_time | ( | struct tm * | tm | ) |
Get the current RTC time as a tm struct (as defined in time.h)
When this function is called, the microsecond value is calculated but is not stored in the struct. This value can be retrieved with a subsequent call to core_RTC_get_usec().
| tm | Pointer to a tm struct |
| uint32_t core_RTC_get_usec | ( | ) |
Get the microsecond value associated with the most recent core_RTC_get_time() call.
| bool core_RTC_init | ( | bool | force_init | ) |
Initialize the RTC module.
| 1 | if the initialization is successful |
| 0 | otherwise |
| void core_RTC_set_time | ( | struct tm * | tm, |
| uint64_t | sync ) |
Set the current RTC time from a tm struct (as defined in time.h)
| tm | Pointer to a tm struct |