Xmega Application Note


awex_driver.h

Go to the documentation of this file.
00001 /* This file has been prepared for Doxygen automatic documentation generation.*/
00060 #ifndef __AWEX_DRIVER_H__
00061 #define __AWEX_DRIVER_H__
00062 
00063 #include "avr_compiler.h"
00064 
00065 /* Definition of macros */
00066 
00071 #define AWEX_EnableCommonWaveformChannelMode( _awex ) \
00072                                             ( _awex->CTRL |= AWEX_CWCM_bm )
00073 
00078 #define AWEX_DisableCommonWaveformChannelMode( _awex ) \
00079                                              ( _awex->CTRL &= ~AWEX_CWCM_bm )
00080 
00085 #define AWEX_EnablePatternGenerationMode( _awex ) \
00086                                              ( _awex->CTRL |= AWEX_PGM_bm )
00087 
00092 #define AWEX_DisablePatternGenerationMode( _awex ) \
00093                                              ( _awex->CTRL &= ~AWEX_PGM_bm )
00094 
00100 #define AWEX_SetOutputOverrideValue( _awex, _overrideValue ) \
00101                                              ( _awex.OUTOVEN = _overrideValue )
00102 
00109 #define AWEX_IsFaultDetected( _awex )        ( _awex->STATUS & AWEX_FDF_bm )
00110 
00118 #define AWEX_ClearFaultFlag( _awex )          ( _awex->STATUS = AWEX_FDF_bm )
00119 
00127 #define AWEX_IsDeadTimeBufferHighSideValid( _awex ) \
00128                                           (  _awex->STATUS & AWEX_DTHSBUFV_bm )
00129 
00137 #define AWEX_DeadTimeBufferLowSideValid( _awex ) \
00138                                   ( _awex->STATUS & AWEX_DTLSBUFV_bm )
00139 
00147 #define AWEX_SetDeadTimesSymmetricalUnbuffered( _awex, _deadTime ) \
00148                                    ( _awex.DTBOTH = _deadTime )
00149 
00158 #define AWEX_SetDeadTimeAsymmetricalUnbuffered( _awex, _deadTimeLow, _deadTimeHigh ) \
00159                         ( _awex->DTLS = _deadTimeLow; \
00160                           _awex->DTHS = _deadTimeHigh )
00161 
00170 #define AWEX_SetDeadTimesSymmetricalBuffered( _awex, _deadTime ) \
00171                                    ( _awex->DTBOTHBUF = _deadTime )
00172 
00182 #define AWEX_SetDeadTimeAsymmetricalBuffered( _awex, _deadTimeLow, _deadTimeHigh ) \
00183                        ( _awex->DTLSBUF = _deadTimeLow; \
00184                          _awex->DTHSBUF = _deadTimeHigh )
00185 
00186 
00187 /* Prototyping of functions. */
00188 
00189 void AWEX_EnableDeadTimeInsertion( AWEX_t * awex,
00190                                    uint8_t enableMask );
00191 void AWEX_DisableDeadTimeInsertion( AWEX_t * awex,
00192                                     uint8_t disableMask );
00193 void AWEX_ConfigureFaultDetection( AWEX_t * awex,
00194                                    AWEX_FDACT_t faultAction,
00195                                    uint8_t eventMask );
00196 
00197 #endif
@DOC_TITLE@
Generated on Wed Apr 23 08:14:07 2008 for AVR1306 Using the Xmega Timer/Counter Extentions by doxygen 1.5.5