Xmega Application Note


qdec_driver.h

Go to the documentation of this file.
00001 /* This file has been prepared for Doxygen automatic documentation generation. */
00058 #ifndef __QDEC_DRIVER_H__
00059 #define __QDEC_DRIVER_H__
00060 
00061 
00062 #include "avr_compiler.h"
00063 
00064 #define CW_DIR   0 /* Clockwise direction. */
00065 #define CCW_DIR  1 /* Counter Clockwise direction. */
00066 
00067 /* Definitions of macros. */
00068 
00073 #define GetCaptureValue(_tc)  ( _tc.CCA )
00074 
00075 
00076 /* Prototyping of functions. */
00077 
00078 bool QDEC_Total_Setup(PORT_t * qPort,
00079                       uint8_t qPin,
00080                       bool invIO,
00081                       uint8_t qEvMux,
00082                       EVSYS_CHMUX_t qPinInput,
00083                       bool useIndex,
00084                       EVSYS_QDIRM_t qIndexState,
00085                       TC0_t * qTimer,
00086                       TC_EVSEL_t qEventChannel,
00087                       uint8_t lineCount);
00088 
00089 bool QDEC_Port_Setup(PORT_t * qPort, uint8_t qPin, bool useIndex, bool invIO);
00090 
00091 bool QDEC_EVSYS_Setup(uint8_t qEvMux,
00092                       EVSYS_CHMUX_t qPinInput,
00093                       bool useIndex,
00094                       EVSYS_QDIRM_t qIndexState );
00095 
00096 void QDEC_TC_Dec_Setup(TC0_t * qTimer,
00097                        TC_EVSEL_t qEventChannel,
00098                        uint8_t lineCount);
00099 
00100 void QDEC_TC_Freq_Setup(TC0_t * qTimer,
00101                         TC_EVSEL_t qEventChannel,
00102                         EVSYS_CHMUX_t qPinInput,
00103                         TC_CLKSEL_t clksel);
00104 
00105 uint8_t QDEC_Get_Direction(TC0_t * qTimer);
00106 
00107 #endif /* __QDEC_DRIVER_H__ */
@DOC_TITLE@
Generated on Wed Jul 30 09:22:36 2008 for AVR1600 Using the XMEGA Quadrature Decoder by doxygen 1.5.5