28#define QDEC_FUNC_ALL (0XFF)
29#define QDEC_FUNC_ALL_EXCEPT_WK (0XBF)
36#define QDEC_POLARITY_HIGH (1)
37#define QDEC_POLARITY_LOW (0)
43#define QDEC_CNT_IDX_X (0)
44#define QDEC_CNT_IDX_Y (1)
45#define QDEC_CNT_IDX_Z (2)
51#define QDEC_MAX_CNT_RESOLUTION (3)
52#define QDEC_CNT_RESOLUTION_1X (0)
53#define QDEC_CNT_RESOLUTION_2X (1)
54#define QDEC_CNT_RESOLUTION_4X (2)
60#define QDEC_MAX_FILTER_NUM (7)
61#define QDEC_FILTER_PERIOD_1 (0)
62#define QDEC_FILTER_PERIOD_2 (1)
63#define QDEC_FILTER_PERIOD_3 (2)
64#define QDEC_FILTER_PERIOD_4 (3)
65#define QDEC_FILTER_PERIOD_5 (4)
66#define QDEC_FILTER_PERIOD_6 (5)
67#define QDEC_FILTER_PERIOD_7 (6)
68#define QDEC_FILTER_PERIOD_8 (7)
85__STATIC_INLINE
void QDEC_Enable(FunctionalState NewState,uint32_t func)
87 (NewState != DISABLE)?(QDEC->QDEC_EN |= func):(QDEC->QDEC_EN &= ~func);
103 return ((QDEC->QDEC_INT_FLAG & intMsk) == intMsk)?(
true):(
false);
119 QDEC->QDEC_INT_FLAG |= intMsk;
135 return ((QDEC->QDEC_INT_RAW & intMsk) == intMsk)?(
true):(
false);
151 QDEC->QDEC_INT_RAW |= intMsk;
169 (NewState)?(QDEC->QDEC_CTL |= intMsk):(QDEC->QDEC_CTL &= ~intMsk);
182 (
QDEC_POLARITY_HIGH == polarity)?(QDEC->QDEC_CTL |= QDEC_INDEX_POLARITY_Msk):(QDEC->QDEC_CTL &= ~QDEC_INDEX_POLARITY_Msk);
197 return ((uint32_t*)(&QDEC->QDEC_X_CNT))[idx] & QDEC_CNT_VALUE_Msk;
211 return ((uint32_t*)(&QDEC->QDEC_X_CNT))[idx] | QDEC_CNT_CLEAR_Msk;
#define QDEC_POLARITY_HIGH
Definition: pan_qdec.h:36
__STATIC_INLINE bool QDEC_IsRawIntOccured(uint32_t intMsk)
This function adjust qdec raw interrupt occured or not.
Definition: pan_qdec.h:133
__STATIC_INLINE uint32_t QDEC_GetEventCnt(uint8_t idx)
This function used to get event count value.
Definition: pan_qdec.h:195
__STATIC_INLINE void QDEC_Enable(FunctionalState NewState, uint32_t func)
This function is set qdec enable bit.
Definition: pan_qdec.h:85
__STATIC_INLINE bool QDEC_IsIntOccured(uint32_t intMsk)
This function adjust qdec interrupt occured or not.
Definition: pan_qdec.h:101
__STATIC_INLINE void QDEC_ClearIntFlag(uint32_t intMsk)
This function clear qdec interrupt flag.
Definition: pan_qdec.h:117
__STATIC_INLINE void QDEC_ClearIntMsk(uint32_t intMsk, FunctionalState NewState)
This function used to set interrupt mask, if masked,qdec int flag will not be placed.
Definition: pan_qdec.h:167
void QDEC_SetEventThreshold(uint16_t threshold)
This function used to set event threshold.
__STATIC_INLINE void QDEC_SetPolarity(uint8_t polarity)
This function used to set index polarity.
Definition: pan_qdec.h:180
void QDEC_SetCntResolution(uint8_t resolution)
This function used to set count resolution.
void QDEC_SetFilterThreshold(uint8_t threshold)
This function used to set filter threshold.
__STATIC_INLINE uint32_t QDEC_ClearEventCnt(uint8_t idx)
This function used to clear event count value.
Definition: pan_qdec.h:209
__STATIC_INLINE void QDEC_ClearRawIntFlag(uint32_t intMsk)
This function clear qdec raw interrupt flag.
Definition: pan_qdec.h:149