Macros | |
Oscillator Types | |
#define | RTC_OSC_32KHZ 1 |
#define | RTC_OSC_RC 0 |
Predefined PSEL Values | |
#define | RTC_PSEL_32KHZ_1HZ 14 |
The PSEL value to set the RTC source clock (after the prescaler) to 1 Hz, when using an external 32-kHz crystal. More... | |
#define | RTC_PSEL_RC_1_76HZ 15 |
The PSEL value to set the RTC source clock (after the prescaler) to 1.76 Hz, when using the internal RC oscillator (~ 115 kHz). More... | |
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... | |