Xmega Application Note


rtc.h

Go to the documentation of this file.
00001 
00038 #ifndef DRIVERS_RTC_RTC_H
00039 #define DRIVERS_RTC_RTC_H
00040 
00041 #include <compiler.h>
00042 #include <conf_rtc.h>
00043 
00068 #ifdef __DOXYGEN__
00069 # define CONFIG_RTC_COMPARE_INT_LEVEL
00070 #endif
00071 
00081 #ifdef __DOXYGEN__
00082 # define CONFIG_RTC_OVERFLOW_INT_LEVEL
00083 #endif
00084 
00098 #ifdef __DOXYGEN__
00099 # define CONFIG_RTC_PRESCALER
00100 #endif
00101 
00112 #ifdef __DOXYGEN__
00113 # define CONFIG_RTC_CLOCK_SOURCE
00114 #endif
00115 
00121 typedef void (*rtc_callback_t)(uint32_t time);
00122 
00123 void rtc_set_callback(rtc_callback_t callback);
00124 void rtc_set_time(uint32_t time);
00125 uint32_t rtc_get_time(void);
00126 void rtc_set_alarm(uint32_t time);
00127 bool rtc_alarm_has_triggered(void);
00128 
00139 static inline void rtc_set_alarm_relative(uint32_t offset)
00140 {
00141         rtc_set_alarm(rtc_get_time() + offset);
00142 }
00143 
00144 extern void rtc_init(void);
00145 
00147 
00148 #endif /* RTC_H */
@DOC_TITLE@
Generated on Fri Oct 22 12:15:25 2010 for AVR1300 Using the Xmega ADC by doxygen 1.6.3