57 #ifndef __QDEC_DRIVER_H__ 58 #define __QDEC_DRIVER_H__ 72 #define GetCaptureValue(_tc) ( _tc.CCA ) 81 EVSYS_CHMUX_t qPinInput,
83 EVSYS_QDIRM_t qIndexState,
85 TC_EVSEL_t qEventChannel,
88 bool QDEC_Port_Setup(PORT_t * qPort, uint8_t qPin,
bool useIndex,
bool invIO);
91 EVSYS_CHMUX_t qPinInput,
93 EVSYS_QDIRM_t qIndexState );
96 TC_EVSEL_t qEventChannel,
100 TC_EVSEL_t qEventChannel,
101 EVSYS_CHMUX_t qPinInput,
This file implements some macros that makes the IAR C-compiler and avr-gcc work with the same code ba...
void QDEC_TC_Freq_Setup(TC0_t *qTimer, TC_EVSEL_t qEventChannel, EVSYS_CHMUX_t qPinInput, TC_CLKSEL_t clksel)
This function set up the needed configuration for a Timer/Counter to handle the frequency/speed measu...
uint8_t lineCount
Number of lines in the quadrature encoder.
bool QDEC_EVSYS_Setup(uint8_t qEvMux, EVSYS_CHMUX_t qPinInput, bool useIndex, EVSYS_QDIRM_t qIndexState)
This function configure the event system for quadrature decoding.
uint8_t QDEC_Get_Direction(TC0_t *qTimer)
This function return the direction of the counter/QDEC.
bool QDEC_Total_Setup(PORT_t *qPort, uint8_t qPin, bool invIO, uint8_t qEvMux, EVSYS_CHMUX_t qPinInput, bool useIndex, EVSYS_QDIRM_t qIndexState, TC0_t *qTimer, TC_EVSEL_t qEventChannel, uint8_t lineCount)
Wrapperfunction to set up all parameters for the quadrature decoder.
bool QDEC_Port_Setup(PORT_t *qPort, uint8_t qPin, bool useIndex, bool invIO)
This function set up the needed configuration for the port used for the quadrature decoding...
void QDEC_TC_Dec_Setup(TC0_t *qTimer, TC_EVSEL_t qEventChannel, uint8_t lineCount)
This function set up the needed configuration for the Timer/Counter to handle the quadrature decoding...