uc-sdk
|
Contains all macro definitions and function prototypes support for QEI firmware library on LPC17xx. More...
Go to the source code of this file.
Classes | |
struct | QEI_CFG_Type |
QEI Configuration structure type definition. More... | |
struct | QEI_RELOADCFG_Type |
Timer Reload Configuration structure type definition. More... | |
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)) |
#define | QEI_CON_RESP ((uint32_t)(1<<0)) |
#define | QEI_CON_RESPI ((uint32_t)(1<<1)) |
#define | QEI_CON_RESV ((uint32_t)(1<<2)) |
#define | QEI_CON_RESI ((uint32_t)(1<<3)) |
#define | QEI_CON_BITMASK ((uint32_t)(0x0F)) |
#define | QEI_CONF_DIRINV ((uint32_t)(1<<0)) |
#define | QEI_CONF_SIGMODE ((uint32_t)(1<<1)) |
#define | QEI_CONF_CAPMODE ((uint32_t)(1<<2)) |
#define | QEI_CONF_INVINX ((uint32_t)(1<<3)) |
#define | QEI_CONF_BITMASK ((uint32_t)(0x0F)) |
#define | QEI_STAT_DIR ((uint32_t)(1<<0)) |
#define | QEI_STAT_BITMASK ((uint32_t)(1<<0)) |
#define | QEI_INTSTAT_INX_Int ((uint32_t)(1<<0)) |
#define | QEI_INTSTAT_TIM_Int ((uint32_t)(1<<1)) |
#define | QEI_INTSTAT_VELC_Int ((uint32_t)(1<<2)) |
#define | QEI_INTSTAT_DIR_Int ((uint32_t)(1<<3)) |
#define | QEI_INTSTAT_ERR_Int ((uint32_t)(1<<4)) |
#define | QEI_INTSTAT_ENCLK_Int ((uint32_t)(1<<5)) |
#define | QEI_INTSTAT_POS0_Int ((uint32_t)(1<<6)) |
#define | QEI_INTSTAT_POS1_Int ((uint32_t)(1<<7)) |
#define | QEI_INTSTAT_POS2_Int ((uint32_t)(1<<8)) |
#define | QEI_INTSTAT_REV_Int ((uint32_t)(1<<9)) |
#define | QEI_INTSTAT_POS0REV_Int ((uint32_t)(1<<10)) |
#define | QEI_INTSTAT_POS1REV_Int ((uint32_t)(1<<11)) |
#define | QEI_INTSTAT_POS2REV_Int ((uint32_t)(1<<12)) |
#define | QEI_INTSTAT_BITMASK ((uint32_t)(0x1FFF)) |
#define | QEI_INTSET_INX_Int ((uint32_t)(1<<0)) |
#define | QEI_INTSET_TIM_Int ((uint32_t)(1<<1)) |
#define | QEI_INTSET_VELC_Int ((uint32_t)(1<<2)) |
#define | QEI_INTSET_DIR_Int ((uint32_t)(1<<3)) |
#define | QEI_INTSET_ERR_Int ((uint32_t)(1<<4)) |
#define | QEI_INTSET_ENCLK_Int ((uint32_t)(1<<5)) |
#define | QEI_INTSET_POS0_Int ((uint32_t)(1<<6)) |
#define | QEI_INTSET_POS1_Int ((uint32_t)(1<<7)) |
#define | QEI_INTSET_POS2_Int ((uint32_t)(1<<8)) |
#define | QEI_INTSET_REV_Int ((uint32_t)(1<<9)) |
#define | QEI_INTSET_POS0REV_Int ((uint32_t)(1<<10)) |
#define | QEI_INTSET_POS1REV_Int ((uint32_t)(1<<11)) |
#define | QEI_INTSET_POS2REV_Int ((uint32_t)(1<<12)) |
#define | QEI_INTSET_BITMASK ((uint32_t)(0x1FFF)) |
#define | QEI_INTCLR_INX_Int ((uint32_t)(1<<0)) |
#define | QEI_INTCLR_TIM_Int ((uint32_t)(1<<1)) |
#define | QEI_INTCLR_VELC_Int ((uint32_t)(1<<2)) |
#define | QEI_INTCLR_DIR_Int ((uint32_t)(1<<3)) |
#define | QEI_INTCLR_ERR_Int ((uint32_t)(1<<4)) |
#define | QEI_INTCLR_ENCLK_Int ((uint32_t)(1<<5)) |
#define | QEI_INTCLR_POS0_Int ((uint32_t)(1<<6)) |
#define | QEI_INTCLR_POS1_Int ((uint32_t)(1<<7)) |
#define | QEI_INTCLR_POS2_Int ((uint32_t)(1<<8)) |
#define | QEI_INTCLR_REV_Int ((uint32_t)(1<<9)) |
#define | QEI_INTCLR_POS0REV_Int ((uint32_t)(1<<10)) |
#define | QEI_INTCLR_POS1REV_Int ((uint32_t)(1<<11)) |
#define | QEI_INTCLR_POS2REV_Int ((uint32_t)(1<<12)) |
#define | QEI_INTCLR_BITMASK ((uint32_t)(0x1FFF)) |
#define | QEI_INTEN_INX_Int ((uint32_t)(1<<0)) |
#define | QEI_INTEN_TIM_Int ((uint32_t)(1<<1)) |
#define | QEI_INTEN_VELC_Int ((uint32_t)(1<<2)) |
#define | QEI_INTEN_DIR_Int ((uint32_t)(1<<3)) |
#define | QEI_INTEN_ERR_Int ((uint32_t)(1<<4)) |
#define | QEI_INTEN_ENCLK_Int ((uint32_t)(1<<5)) |
#define | QEI_INTEN_POS0_Int ((uint32_t)(1<<6)) |
#define | QEI_INTEN_POS1_Int ((uint32_t)(1<<7)) |
#define | QEI_INTEN_POS2_Int ((uint32_t)(1<<8)) |
#define | QEI_INTEN_REV_Int ((uint32_t)(1<<9)) |
#define | QEI_INTEN_POS0REV_Int ((uint32_t)(1<<10)) |
#define | QEI_INTEN_POS1REV_Int ((uint32_t)(1<<11)) |
#define | QEI_INTEN_POS2REV_Int ((uint32_t)(1<<12)) |
#define | QEI_INTEN_BITMASK ((uint32_t)(0x1FFF)) |
#define | QEI_IESET_INX_Int ((uint32_t)(1<<0)) |
#define | QEI_IESET_TIM_Int ((uint32_t)(1<<1)) |
#define | QEI_IESET_VELC_Int ((uint32_t)(1<<2)) |
#define | QEI_IESET_DIR_Int ((uint32_t)(1<<3)) |
#define | QEI_IESET_ERR_Int ((uint32_t)(1<<4)) |
#define | QEI_IESET_ENCLK_Int ((uint32_t)(1<<5)) |
#define | QEI_IESET_POS0_Int ((uint32_t)(1<<6)) |
#define | QEI_IESET_POS1_Int ((uint32_t)(1<<7)) |
#define | QEI_IESET_POS2_Int ((uint32_t)(1<<8)) |
#define | QEI_IESET_REV_Int ((uint32_t)(1<<9)) |
#define | QEI_IESET_POS0REV_Int ((uint32_t)(1<<10)) |
#define | QEI_IESET_POS1REV_Int ((uint32_t)(1<<11)) |
#define | QEI_IESET_POS2REV_Int ((uint32_t)(1<<12)) |
#define | QEI_IESET_BITMASK ((uint32_t)(0x1FFF)) |
#define | QEI_IECLR_INX_Int ((uint32_t)(1<<0)) |
#define | QEI_IECLR_TIM_Int ((uint32_t)(1<<1)) |
#define | QEI_IECLR_VELC_Int ((uint32_t)(1<<2)) |
#define | QEI_IECLR_DIR_Int ((uint32_t)(1<<3)) |
#define | QEI_IECLR_ERR_Int ((uint32_t)(1<<4)) |
#define | QEI_IECLR_ENCLK_Int ((uint32_t)(1<<5)) |
#define | QEI_IECLR_POS0_Int ((uint32_t)(1<<6)) |
#define | QEI_IECLR_POS1_Int ((uint32_t)(1<<7)) |
#define | QEI_IECLR_POS2_Int ((uint32_t)(1<<8)) |
#define | QEI_IECLR_REV_Int ((uint32_t)(1<<9)) |
#define | QEI_IECLR_POS0REV_Int ((uint32_t)(1<<10)) |
#define | QEI_IECLR_POS1REV_Int ((uint32_t)(1<<11)) |
#define | QEI_IECLR_POS2REV_Int ((uint32_t)(1<<12)) |
#define | QEI_IECLR_BITMASK ((uint32_t)(0x1FFF)) |
#define | PARAM_QEIx(n) ((n==LPC_QEI)) |
#define | PARAM_QEI_RESET(n) |
#define | PARAM_QEI_DIRINV(n) ((n==QEI_DIRINV_NONE) || (n==QEI_DIRINV_CMPL)) |
#define | PARAM_QEI_SIGNALMODE(n) ((n==QEI_SIGNALMODE_QUAD) || (n==QEI_SIGNALMODE_CLKDIR)) |
#define | PARAM_QEI_CAPMODE(n) ((n==QEI_CAPMODE_2X) || (n==QEI_CAPMODE_4X)) |
#define | PARAM_QEI_INVINX(n) ((n==QEI_INVINX_NONE) || (n==QEI_INVINX_EN)) |
#define | PARAM_QEI_TIMERRELOAD(n) ((n==QEI_TIMERRELOAD_TICKVAL) || (n==QEI_TIMERRELOAD_USVAL)) |
#define | PARAM_QEI_STATUS(n) ((n==QEI_STATUS_DIR)) |
#define | PARAM_QEI_COMPPOS_CH(n) ((n==QEI_COMPPOS_CH_0) || (n==QEI_COMPPOS_CH_1) || (n==QEI_COMPPOS_CH_2)) |
#define | PARAM_QEI_INTFLAG(n) |
Functions | |
void | QEI_Reset (LPC_QEI_TypeDef *QEIx, uint32_t ulResetType) |
void | QEI_Init (LPC_QEI_TypeDef *QEIx, QEI_CFG_Type *QEI_ConfigStruct) |
void | QEI_ConfigStructInit (QEI_CFG_Type *QIE_InitStruct) |
void | QEI_DeInit (LPC_QEI_TypeDef *QEIx) |
FlagStatus | QEI_GetStatus (LPC_QEI_TypeDef *QEIx, uint32_t ulFlagType) |
uint32_t | QEI_GetPosition (LPC_QEI_TypeDef *QEIx) |
void | QEI_SetMaxPosition (LPC_QEI_TypeDef *QEIx, uint32_t ulMaxPos) |
void | QEI_SetPositionComp (LPC_QEI_TypeDef *QEIx, uint8_t bPosCompCh, uint32_t ulPosComp) |
uint32_t | QEI_GetIndex (LPC_QEI_TypeDef *QEIx) |
void | QEI_SetIndexComp (LPC_QEI_TypeDef *QEIx, uint32_t ulIndexComp) |
void | QEI_SetTimerReload (LPC_QEI_TypeDef *QEIx, QEI_RELOADCFG_Type *QEIReloadStruct) |
uint32_t | QEI_GetTimer (LPC_QEI_TypeDef *QEIx) |
uint32_t | QEI_GetVelocity (LPC_QEI_TypeDef *QEIx) |
uint32_t | QEI_GetVelocityCap (LPC_QEI_TypeDef *QEIx) |
void | QEI_SetVelocityComp (LPC_QEI_TypeDef *QEIx, uint32_t ulVelComp) |
void | QEI_SetDigiFilter (LPC_QEI_TypeDef *QEIx, uint32_t ulSamplingPulse) |
FlagStatus | QEI_GetIntStatus (LPC_QEI_TypeDef *QEIx, uint32_t ulIntType) |
void | QEI_IntCmd (LPC_QEI_TypeDef *QEIx, uint32_t ulIntType, FunctionalState NewState) |
void | QEI_IntSet (LPC_QEI_TypeDef *QEIx, uint32_t ulIntType) |
void | QEI_IntClear (LPC_QEI_TypeDef *QEIx, uint32_t ulIntType) |
uint32_t | QEI_CalculateRPM (LPC_QEI_TypeDef *QEIx, uint32_t ulVelCapValue, uint32_t ulPPR) |
Contains all macro definitions and function prototypes support for QEI firmware library on LPC17xx.
Software that is described herein is for illustrative purposes only which provides customers with programming information regarding the products. This software is supplied "AS IS" without any warranties. NXP Semiconductors assumes no responsibility or liability for the use of the software, conveys no license or title under any patent, copyright, or mask work right to the product. NXP Semiconductors reserves the right to make changes in the software without notification. NXP Semiconductors also make no representation or warranty that such application will be suitable for the specified use without further testing or modification.
Definition in file lpc17xx_qei.h.