Xmega Application Note


rtc_driver.h

Go to the documentation of this file.
00001 /* This file has been prepared for Doxygen automatic documentation generation.*/
00059 #ifndef RTC_DRIVER_H
00060 #define RTC_DRIVER_H
00061 
00062 #include "avr_compiler.h"
00063 
00064 /* Definitions of macros. */
00065 
00070 #define RTC_Busy()               ( RTC.STATUS & RTC_SYNCBUSY_bm )
00071 
00076 #define RTC_GetOverflowFlag()    ( RTC.INTFLAGS & RTC_OVFIF_bm )
00077 
00082 #define RTC_GetCompareFlag()     ( RTC.INTFLAGS & RTC_COMPIF_bm )
00083 
00093 #define RTC_SetCount( _rtccnt )  ( RTC.CNT = (_rtccnt) )
00094 
00101 #define RTC_GetCount()           ( RTC.CNT )
00102 
00112 #define RTC_SetPeriod( _rtcper ) ( RTC.PER = (_rtcper) )
00113 
00120 #define RTC_GetPeriod()          ( RTC.PER )
00121 
00132 #define RTC_SetCompareValue( _cmpVal ) ( RTC.COMP = (_cmpVal) )
00133 
00141 #define RTC_GetCompareValue()    ( RTC.COMP )
00142 
00143 
00144 /* Prototyping of functions. Documentation is found in source file. */
00145 
00146 void RTC_Initialize( uint16_t period,
00147                      uint16_t count,
00148                      uint16_t compareValue,
00149                      RTC_PRESCALER_t prescaler);
00150 void RTC_SetOverflowIntLevel( RTC_OVFINTLVL_t intLevel );
00151 void RTC_SetCompareIntLevel( RTC_COMPINTLVL_t intLevel );
00152 void RTC_SetIntLevels( RTC_OVFINTLVL_t ovfIntLevel,
00153                        RTC_COMPINTLVL_t compIntLevel );
00154 void RTC_SetAlarm( uint16_t alarmTimeout );
00155 void RTC_SetPrescaler( RTC_PRESCALER_t prescaler );
00156 
00157 
00172 #endif
@DOC_TITLE@
Generated on Wed Apr 23 08:25:23 2008 for AVR1314 Using the Xmega Real Time Counter by doxygen 1.5.5