uc-sdk
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
QEI Public Macros

Macros

#define QEI_RESET_POS   QEI_CON_RESP
 
#define QEI_RESET_POSOnIDX   QEI_CON_RESPI
 
#define QEI_RESET_VEL   QEI_CON_RESV
 
#define QEI_RESET_IDX   QEI_CON_RESI
 
#define QEI_DIRINV_NONE   ((uint32_t)(0))
 
#define QEI_DIRINV_CMPL   ((uint32_t)(1))
 
#define QEI_SIGNALMODE_QUAD   ((uint32_t)(0))
 
#define QEI_SIGNALMODE_CLKDIR   ((uint32_t)(1))
 
#define QEI_CAPMODE_2X   ((uint32_t)(0))
 
#define QEI_CAPMODE_4X   ((uint32_t)(1))
 
#define QEI_INVINX_NONE   ((uint32_t)(0))
 
#define QEI_INVINX_EN   ((uint32_t)(1))
 
#define QEI_TIMERRELOAD_TICKVAL   ((uint8_t)(0))
 
#define QEI_TIMERRELOAD_USVAL   ((uint8_t)(1))
 
#define QEI_STATUS_DIR   ((uint32_t)(1<<0))
 
#define QEI_COMPPOS_CH_0   ((uint8_t)(0))
 
#define QEI_COMPPOS_CH_1   ((uint8_t)(1))
 
#define QEI_COMPPOS_CH_2   ((uint8_t)(2))
 
#define QEI_INTFLAG_INX_Int   ((uint32_t)(1<<0))
 
#define QEI_INTFLAG_TIM_Int   ((uint32_t)(1<<1))
 
#define QEI_INTFLAG_VELC_Int   ((uint32_t)(1<<2))
 
#define QEI_INTFLAG_DIR_Int   ((uint32_t)(1<<3))
 
#define QEI_INTFLAG_ERR_Int   ((uint32_t)(1<<4))
 
#define QEI_INTFLAG_ENCLK_Int   ((uint32_t)(1<<5))
 
#define QEI_INTFLAG_POS0_Int   ((uint32_t)(1<<6))
 
#define QEI_INTFLAG_POS1_Int   ((uint32_t)(1<<7))
 
#define QEI_INTFLAG_POS2_Int   ((uint32_t)(1<<8))
 
#define QEI_INTFLAG_REV_Int   ((uint32_t)(1<<9))
 
#define QEI_INTFLAG_POS0REV_Int   ((uint32_t)(1<<10))
 
#define QEI_INTFLAG_POS1REV_Int   ((uint32_t)(1<<11))
 
#define QEI_INTFLAG_POS2REV_Int   ((uint32_t)(1<<12))
 

Detailed Description

Macro Definition Documentation

#define QEI_CAPMODE_2X   ((uint32_t)(0))

Capture mode: Only Phase-A edges are counted (2X)

Definition at line 60 of file lpc17xx_qei.h.

#define QEI_CAPMODE_4X   ((uint32_t)(1))

Capture mode: BOTH PhA and PhB edges are counted (4X)

Definition at line 61 of file lpc17xx_qei.h.

#define QEI_COMPPOS_CH_0   ((uint8_t)(0))

QEI compare position channel 0

Definition at line 75 of file lpc17xx_qei.h.

#define QEI_COMPPOS_CH_1   ((uint8_t)(1))

QEI compare position channel 1

Definition at line 76 of file lpc17xx_qei.h.

#define QEI_COMPPOS_CH_2   ((uint8_t)(2))

QEI compare position channel 2

Definition at line 77 of file lpc17xx_qei.h.

#define QEI_DIRINV_CMPL   ((uint32_t)(1))

Direction is complemented

Definition at line 53 of file lpc17xx_qei.h.

#define QEI_DIRINV_NONE   ((uint32_t)(0))

Direction is not inverted

Definition at line 52 of file lpc17xx_qei.h.

#define QEI_INTFLAG_DIR_Int   ((uint32_t)(1<<3))

Change of direction interrupt

Definition at line 83 of file lpc17xx_qei.h.

#define QEI_INTFLAG_ENCLK_Int   ((uint32_t)(1<<5))

An encoder clock pulse was detected interrupt

Definition at line 85 of file lpc17xx_qei.h.

#define QEI_INTFLAG_ERR_Int   ((uint32_t)(1<<4))

An encoder phase error interrupt

Definition at line 84 of file lpc17xx_qei.h.

#define QEI_INTFLAG_INX_Int   ((uint32_t)(1<<0))

index pulse was detected interrupt

Definition at line 80 of file lpc17xx_qei.h.

#define QEI_INTFLAG_POS0_Int   ((uint32_t)(1<<6))

position 0 compare value is equal to the current position interrupt

Definition at line 86 of file lpc17xx_qei.h.

#define QEI_INTFLAG_POS0REV_Int   ((uint32_t)(1<<10))

Combined position 0 and revolution count interrupt

Definition at line 98 of file lpc17xx_qei.h.

#define QEI_INTFLAG_POS1_Int   ((uint32_t)(1<<7))

position 1 compare value is equal to the current position interrupt

Definition at line 89 of file lpc17xx_qei.h.

#define QEI_INTFLAG_POS1REV_Int   ((uint32_t)(1<<11))

Combined position 1 and revolution count interrupt

Definition at line 99 of file lpc17xx_qei.h.

#define QEI_INTFLAG_POS2_Int   ((uint32_t)(1<<8))

position 2 compare value is equal to the current position interrupt

Definition at line 92 of file lpc17xx_qei.h.

#define QEI_INTFLAG_POS2REV_Int   ((uint32_t)(1<<12))

Combined position 2 and revolution count interrupt

Definition at line 100 of file lpc17xx_qei.h.

#define QEI_INTFLAG_REV_Int   ((uint32_t)(1<<9))

Index compare value is equal to the current index count interrupt

Definition at line 95 of file lpc17xx_qei.h.

#define QEI_INTFLAG_TIM_Int   ((uint32_t)(1<<1))

Velocity timer over flow interrupt

Definition at line 81 of file lpc17xx_qei.h.

#define QEI_INTFLAG_VELC_Int   ((uint32_t)(1<<2))

Capture velocity is less than compare interrupt

Definition at line 82 of file lpc17xx_qei.h.

#define QEI_INVINX_EN   ((uint32_t)(1))

Invert Index signal option: Enable

Definition at line 65 of file lpc17xx_qei.h.

#define QEI_INVINX_NONE   ((uint32_t)(0))

Invert Index signal option: None

Definition at line 64 of file lpc17xx_qei.h.

#define QEI_RESET_IDX   QEI_CON_RESI

Reset Index Counter

Definition at line 49 of file lpc17xx_qei.h.

#define QEI_RESET_POS   QEI_CON_RESP

Reset position counter

Definition at line 46 of file lpc17xx_qei.h.

#define QEI_RESET_POSOnIDX   QEI_CON_RESPI

Reset Posistion Counter on Index

Definition at line 47 of file lpc17xx_qei.h.

#define QEI_RESET_VEL   QEI_CON_RESV

Reset Velocity

Definition at line 48 of file lpc17xx_qei.h.

#define QEI_SIGNALMODE_CLKDIR   ((uint32_t)(1))

Signal operation: Clock/Direction mode

Definition at line 57 of file lpc17xx_qei.h.

#define QEI_SIGNALMODE_QUAD   ((uint32_t)(0))

Signal operation: Quadrature phase mode

Definition at line 56 of file lpc17xx_qei.h.

#define QEI_STATUS_DIR   ((uint32_t)(1<<0))

Direction status

Definition at line 72 of file lpc17xx_qei.h.

#define QEI_TIMERRELOAD_TICKVAL   ((uint8_t)(0))

Reload value in absolute value

Definition at line 68 of file lpc17xx_qei.h.

#define QEI_TIMERRELOAD_USVAL   ((uint8_t)(1))

Reload value in microsecond value

Definition at line 69 of file lpc17xx_qei.h.