- Main Page
- Related Pages
- Files

- File List
- Globals

# 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 "compiler.h"
    00063 #include "avr_compiler.h"
    00064
    00065 /* Definitions of macros. */
    00066
    00071 #define RTC_Busy()               ( RTC.STATUS & RTC_SYNCBUSY_bm )
    00072
    00077 #define RTC_GetOverflowFlag()    ( RTC.INTFLAGS & RTC_OVFIF_bm )
    00078
    00083 #define RTC_GetCompareFlag()     ( RTC.INTFLAGS & RTC_COMPIF_bm )
    00084
    00094 #define RTC_SetCount( _rtccnt )  ( RTC.CNT = (_rtccnt) )
    00095
    00102 #define RTC_GetCount()           ( RTC.CNT )
    00103
    00113 #define RTC_SetPeriod( _rtcper ) ( RTC.PER = (_rtcper) )
    00114
    00121 #define RTC_GetPeriod()          ( RTC.PER )
    00122
    00133 #define RTC_SetCompareValue( _cmpVal ) ( RTC.COMP = (_cmpVal) )
    00134
    00142 #define RTC_GetCompareValue()    ( RTC.COMP )
    00143
    00144
    00145 /* Prototyping of functions. Documentation is found in source file. */
    00146
    00147 void RTC_Initialize( uint16_t period,
    00148                      uint16_t count,
    00149                      uint16_t compareValue,
    00150                      RTC_PRESCALER_t prescaler);
    00151 void RTC_SetOverflowIntLevel( RTC_OVFINTLVL_t intLevel );
    00152 void RTC_SetCompareIntLevel( RTC_COMPINTLVL_t intLevel );
    00153 void RTC_SetIntLevels( RTC_OVFINTLVL_t ovfIntLevel,
    00154                        RTC_COMPINTLVL_t compIntLevel );
    00155 void RTC_SetAlarm( uint16_t alarmTimeout );
    00156 void RTC_SetPrescaler( RTC_PRESCALER_t prescaler );
    00157
    00158
    00173 #endif