typedef struct { __O uint32_t CON; __I uint32_t STAT; __IO uint32_t CONF; __I uint32_t POS; __IO uint32_t MAXPOS; __IO uint32_t CMPOS0; __IO uint32_t CMPOS1; __IO uint32_t CMPOS2; __I uint32_t INXCNT; __IO uint32_t INXCMP0; __IO uint32_t LOAD; __I uint32_t TIME; __I uint32_t VEL; __I uint32_t CAP; __IO uint32_t VELCOMP; __IO uint32_t FILTERPHA; __IO uint32_t FILTERPHB; __IO uint32_t FILTERINX; __IO uint32_t WINDOW; __IO uint32_t INXCMP1; __IO uint32_t INXCMP2; __O uint32_t IEC; __O uint32_t IES; __I uint32_t INTSTAT; __I uint32_t IE; __O uint32_t CLR; __O uint32_t SET; } LPC_QEI_T; #define LPC_QEI ((LPC_QEI_T*) LPC_QEI_BASE) |
/** * @brief Quadrature Encoder Interface register block structure */ typedef struct {/*!< QEI Structure */ __O uint32_t CON;/*!< Control register */ __I uint32_t STAT;/*!< Encoder status register */ __IO uint32_t CONF;/*!< Configuration register */ __I uint32_t POS;/*!< Position register */ __IO uint32_t MAXPOS;/*!< Maximum position register */ __IO uint32_t CMPOS0;/*!< position compare register 0 */ __IO uint32_t CMPOS1;/*!< position compare register 1 */ __IO uint32_t CMPOS2;/*!< position compare register 2 */ __I uint32_t INXCNT;/*!< Index count register */ __IO uint32_t INXCMP0;/*!< Index compare register 0 */ __IO uint32_t LOAD;/*!< Velocity timer reload register */ __I uint32_t TIME;/*!< Velocity timer register */ __I uint32_t VEL;/*!< Velocity counter register */ __I uint32_t CAP;/*!< Velocity capture register */ __IO uint32_t VELCOMP;/*!< Velocity compare register */ __IO uint32_t FILTERPHA;/*!< Digital filter register on input phase A (QEI_A) */ __IO uint32_t FILTERPHB;/*!< Digital filter register on input phase B (QEI_B) */ __IO uint32_t FILTERINX;/*!< Digital filter register on input index (QEI_IDX) */ __IO uint32_t WINDOW;/*!< Index acceptance window register */ __IO uint32_t INXCMP1;/*!< Index compare register 1 */ __IO uint32_t INXCMP2;/*!< Index compare register 2 */ [color=#f00]__I uint32_t RESERVED0[0x3E1];//933 int gap;[/color] __O uint32_t IEC;/*!< Interrupt enable clear register */ __O uint32_t IES;/*!< Interrupt enable set register */ __I uint32_t INTSTAT;/*!< Interrupt status register */ __I uint32_t IE;/*!< Interrupt enable register */ __O uint32_t CLR;/*!< Interrupt status clear register */ __O uint32_t SET;/*!< Interrupt status set register */ } LPC_QEI_T; #define LPC_QEI ((LPC_QEI_T*) LPC_QEI_BASE) |
typedef struct { __O uint32_t CON; __I uint32_t STAT; __IO uint32_t CONF; __I uint32_t POS; __IO uint32_t MAXPOS; __IO uint32_t CMPOS0; __IO uint32_t CMPOS1; __IO uint32_t CMPOS2; __I uint32_t INXCNT; __IO uint32_t INXCMP0; __IO uint32_t LOAD; __I uint32_t TIME; __I uint32_t VEL; __I uint32_t CAP; __IO uint32_t VELCOMP; __IO uint32_t FILTERPHA; __IO uint32_t FILTERPHB; __IO uint32_t FILTERINX; __IO uint32_t WINDOW; __IO uint32_t INXCMP1; __IO uint32_t INXCMP2; __O uint32_t IEC; __O uint32_t IES; __I uint32_t INTSTAT; __I uint32_t IE; __O uint32_t CLR; __O uint32_t SET; } LPC_QEI_T; #define LPC_QEI ((LPC_QEI_T*) LPC_QEI_BASE) // Define your most needed functions here // ... |