Microchip® Advanced Software Framework

rtc.c File Reference
#include <avr32/io.h>
#include "compiler.h"
#include "pm.h"
#include "rtc.h"

Functions

void rtc_clear_interrupt (volatile avr32_rtc_t *rtc)
 Clear the interrupt flag. Call this function once you handled the interrupt. More...
 
void rtc_disable (volatile avr32_rtc_t *rtc)
 Disable the RTC. More...
 
void rtc_disable_interrupt (volatile avr32_rtc_t *rtc)
 Disable the interrupt feature of the RTC. More...
 
void rtc_disable_wake_up (volatile avr32_rtc_t *rtc)
 Disable the wake up feature of the RTC. More...
 
void rtc_enable (volatile avr32_rtc_t *rtc)
 Enable the RTC. More...
 
void rtc_enable_interrupt (volatile avr32_rtc_t *rtc)
 Enable the interrupt feature of the RTC. An interrupt is raised when the value of the RTC is equal to its top value. More...
 
void rtc_enable_wake_up (volatile avr32_rtc_t *rtc)
 Enable the wake up feature of the RTC. More...
 
unsigned long rtc_get_top_value (volatile avr32_rtc_t *rtc)
 This function returns the RTC current top value. More...
 
unsigned long rtc_get_value (volatile avr32_rtc_t *rtc)
 This function returns the RTC current value. More...
 
int rtc_init (volatile avr32_rtc_t *rtc, unsigned char osc_type, unsigned char psel)
 This function will initialize the RTC module. If you use the 32 KHz oscillator, it will enable this module. This function also set the top value of the RTC to 0xFFFFFFFF and the value to 0. More...
 
int rtc_interrupt_enabled (volatile avr32_rtc_t *rtc)
 Get the status of interrupts. More...
 
int rtc_is_busy (volatile avr32_rtc_t *rtc)
 This function checks if the RTC is busy or not. More...
 
int rtc_is_interrupt (volatile avr32_rtc_t *rtc)
 Check if an interrupt is raised. More...
 
void rtc_set_top_value (volatile avr32_rtc_t *rtc, unsigned long top)
 This function sets the RTC current top value. More...
 
void rtc_set_value (volatile avr32_rtc_t *rtc, unsigned long val)
 This function sets the RTC current value. More...