Go to the documentation of this file.
43 #include "periph_conf.h"
49 #if !defined(RIOT_EPOCH) || DOXYGEN
58 #define RIOT_EPOCH (2020)
void rtc_tm_normalize(struct tm *time)
Normalize the time struct.
int rtc_get_time(struct tm *time)
Get current RTC time.
void rtc_init(void)
Initialize RTC module.
void rtc_clear_alarm(void)
Clear any set alarm, do nothing if nothing set.
bool rtc_tm_valid(const struct tm *t)
Verify that a time struct t contains valid data.
int rtc_set_time(struct tm *time)
Set RTC to given time.
void rtc_poweron(void)
Turns the RTC hardware module on.
uint32_t rtc_mktime(struct tm *t)
Convert time struct into timestamp.
void rtc_poweroff(void)
Turns the RTC hardware module off.
void rtc_localtime(uint32_t time, struct tm *t)
Converts an RTC timestamp into a time struct.
void(* rtc_alarm_cb_t)(void *arg)
Signature for alarm Callback.
int rtc_get_alarm(struct tm *time)
Gets the current alarm setting.
int rtc_set_alarm(struct tm *time, rtc_alarm_cb_t cb, void *arg)
Set an alarm for RTC to the specified value.
int rtc_tm_compare(const struct tm *a, const struct tm *b)
Compare two time structs.