Microchip® Advanced Software Framework

rtc.h File Reference

AVR XMEGA Real Time Counter driver definitions.

Copyright (c) 2010-2018 Microchip Technology Inc. and its subsidiaries.

#include <compiler.h>
#include <conf_rtc.h>

Macros

#define CONFIG_RTC_COMPARE_INT_LEVEL
 Configuration symbol for interrupt level to use on alarm. More...
 
#define CONFIG_RTC_OVERFLOW_INT_LEVEL
 Configuration symbol for interrupt level to use on overflow. More...
 
#define CONFIG_RTC_PRESCALER
 Configuration symbol for prescaler to use. More...
 

Typedefs

typedef void(* rtc_callback_t )(uint32_t time)
 Callback definition for alarm callback. 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...