STM32 RTC Scheduler
RTC-based scheduler for ultra-low power applications
rtc.h
Go to the documentation of this file.
1 
14 #ifndef RTC_H
15 #define RTC_H
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 /* Includes ------------------------------------------------------------------*/
22 #include "stm32l4xx_hal.h"
23 
24 /* Functions -----------------------------------------------------------------*/
25 void RtcInit(void);
26 uint32_t RtcGetEpoch(void);
27 void RtcConvertEpochToDatetime(uint32_t epoch,
28  RTC_DateTypeDef* date,
29  RTC_TimeTypeDef* time);
30 uint8_t RtcSetAlarmFromEpoch(const uint32_t epoch);
31 void RtcDeactivateAlarm(void);
33 
34 #ifdef __cplusplus
35 }
36 #endif
37 
38 #endif /* RTC_H */
RtcWaitForClockSynchronization
void RtcWaitForClockSynchronization(void)
This function waits until the RTC time and date registers are synchronized with RTC APB clock....
Definition: rtc.c:199
RtcConvertEpochToDatetime
void RtcConvertEpochToDatetime(uint32_t epoch, RTC_DateTypeDef *date, RTC_TimeTypeDef *time)
Convert an epoch to human-readable date and time format.
Definition: rtc.c:120
RtcSetAlarmFromEpoch
uint8_t RtcSetAlarmFromEpoch(const uint32_t epoch)
Set an RTC alarm at a given time specified by an epoch.
Definition: rtc.c:149
RtcDeactivateAlarm
void RtcDeactivateAlarm(void)
Deactivate a previously set RTC alarm.
Definition: rtc.c:189
RtcGetEpoch
uint32_t RtcGetEpoch(void)
Get the current epoch.
Definition: rtc.c:84
RtcInit
void RtcInit(void)
RTC initialization function.
Definition: rtc.c:30