|
STM32 RTC Scheduler
RTC-based scheduler for ultra-low power applications
|
This file contains the RTC-specific function implementations. More...
Go to the source code of this file.
Functions | |
| void | RtcInit (void) |
| RTC initialization function. More... | |
| uint32_t | RtcGetEpoch (void) |
| Get the current epoch. More... | |
| void | RtcConvertEpochToDatetime (uint32_t epoch, RTC_DateTypeDef *date, RTC_TimeTypeDef *time) |
| Convert an epoch to human-readable date and time format. More... | |
| uint8_t | RtcSetAlarmFromEpoch (const uint32_t epoch) |
| Set an RTC alarm at a given time specified by an epoch. More... | |
| void | RtcDeactivateAlarm (void) |
| Deactivate a previously set RTC alarm. | |
| void | RtcWaitForClockSynchronization (void) |
| This function waits until the RTC time and date registers are synchronized with RTC APB clock. This function needs to be called after resuming execution from a sleep mode. | |
Variables | |
| RTC_HandleTypeDef | hrtc |
This file contains the RTC-specific function implementations.
STM32 RTC Scheduler
Definition in file rtc.c.
| void RtcConvertEpochToDatetime | ( | uint32_t | epoch, |
| RTC_DateTypeDef * | date, | ||
| RTC_TimeTypeDef * | time | ||
| ) |
Convert an epoch to human-readable date and time format.
This function converts an Unix epoch into human-readable date and time format.
| epoch | The epoch to be converted. |
| date | Pointer to a RTC date structure where the converted values are written. |
| time | Pointer to a RTC time structure where the converted values are written. |
| uint32_t RtcGetEpoch | ( | void | ) |
Get the current epoch.
This function retrieves the date and time from the RTC registers and converts the values into Unix epoch.
| void RtcInit | ( | void | ) |
| uint8_t RtcSetAlarmFromEpoch | ( | const uint32_t | epoch | ) |