AVR XMEGA 32-bit Real Time Counter driver definitions.
Copyright (c) 2010-2018 Microchip Technology Inc. and its subsidiaries.
Macros | |
#define | CONFIG_RTC32_CLOCK_1024HZ |
Configuration symbol for selecting 1024Hz clock instead of 1Hz. More... | |
#define | CONFIG_RTC32_COMPARE_INT_LEVEL |
Configuration symbol for interrupt level to use on alarm. More... | |
Typedefs | |
typedef void(* | rtc_callback_t )(uint32_t time) |
Callback definition for alarm callback. More... | |
Enumerations | |
enum | vbat_status_code { VBAT_STATUS_OK, VBAT_STATUS_NO_POWER, VBAT_STATUS_INIT, VBAT_STATUS_BBPOR, VBAT_STATUS_BBBOD, VBAT_STATUS_XOSCFAIL } |
Battery backup system status codes. More... | |
Functions | |
bool | rtc_alarm_has_triggered (void) |
Check if pending alarm has triggered. More... | |
uint32_t | rtc_get_time (void) |
Get current time. More... | |
void | rtc_init (void) |
Initialize the 32kHz oscillator and RTC32. More... | |
void | rtc_set_alarm (uint32_t time) |
Set alarm time. More... | |
static void | rtc_set_alarm_relative (uint32_t offset) |
Set alarm relative to current time. More... | |
void | rtc_set_callback (rtc_callback_t callback) |
Set callback to call on alarm. More... | |
void | rtc_set_time (uint32_t time) |
Set current time. More... | |
enum vbat_status_code | rtc_vbat_system_check (bool first_time_init) |
Checks battery backup system status. More... | |