Low-level RTC peripheral driver interface definitions. More...
Low-level RTC peripheral driver interface definitions.
Definition in file rtc.h.
#include <stdbool.h>
#include <stdint.h>
#include <time.h>
#include "rtc_utils.h"
#include "periph_conf.h"
Go to the source code of this file.
Macros | |
#define | RIOT_EPOCH (2020) |
Earliest year of the RTC. | |
Typedefs | |
typedef void(* | rtc_alarm_cb_t) (void *arg) |
Signature for alarm Callback. | |
Functions | |
void | rtc_init (void) |
Initialize RTC module. | |
int | rtc_set_time (struct tm *time) |
Set RTC to given time. | |
int | rtc_get_time (struct tm *time) |
Get current RTC time. | |
int | rtc_get_time_ms (struct tm *time, uint16_t *ms) |
Get current RTC time with sub-second component. | |
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_get_alarm (struct tm *time) |
Gets the current alarm setting. | |
void | rtc_clear_alarm (void) |
Clear any set alarm, do nothing if nothing set. | |
void | rtc_poweron (void) |
Turns the RTC hardware module on. | |
void | rtc_poweroff (void) |
Turns the RTC hardware module off. | |