| M480 BSP V3.05.001 The Board Support Package for M480 Series

qei_reg.h
Go to the documentation of this file.
1 /**************************************************************************/
9 #ifndef __QEI_REG_H__
10 #define __QEI_REG_H__
11
12 #if defined ( __CC_ARM )
13 #pragma anon_unions
14 #endif
15
26 typedef struct
27 {
28
29
402 __IO uint32_t CNT;
403 __IO uint32_t CNTHOLD;
404 __IO uint32_t CNTLATCH;
405 __IO uint32_t CNTCMP;
406 __I uint32_t RESERVE0[1];
409 __IO uint32_t CNTMAX;
410 __IO uint32_t CTL;
411 __I uint32_t RESERVE1[4];
414 __IO uint32_t STATUS;
416 } QEI_T;
417
423 #define QEI_CNT_CNT_Pos (0)
424 #define QEI_CNT_CNT_Msk (0xfffffffful << QEI_CNT_CNT_Pos)
426 #define QEI_CNTHOLD_CNTHOLD_Pos (0)
427 #define QEI_CNTHOLD_CNTHOLD_Msk (0xfffffffful << QEI_CNTHOLD_CNTHOLD_Pos)
429 #define QEI_CNTLATCH_CNTLATCH_Pos (0)
430 #define QEI_CNTLATCH_CNTLATCH_Msk (0xfffffffful << QEI_CNTLATCH_CNTLATCH_Pos)
432 #define QEI_CNTCMP_CNTCMP_Pos (0)
433 #define QEI_CNTCMP_CNTCMP_Msk (0xfffffffful << QEI_CNTCMP_CNTCMP_Pos)
435 #define QEI_CNTMAX_CNTMAX_Pos (0)
436 #define QEI_CNTMAX_CNTMAX_Msk (0xfffffffful << QEI_CNTMAX_CNTMAX_Pos)
438 #define QEI_CTL_NFCLKSEL_Pos (0)
439 #define QEI_CTL_NFCLKSEL_Msk (0x7ul << QEI_CTL_NFCLKSEL_Pos)
441 #define QEI_CTL_NFDIS_Pos (3)
442 #define QEI_CTL_NFDIS_Msk (0x1ul << QEI_CTL_NFDIS_Pos)
444 #define QEI_CTL_CHAEN_Pos (4)
445 #define QEI_CTL_CHAEN_Msk (0x1ul << QEI_CTL_CHAEN_Pos)
447 #define QEI_CTL_CHBEN_Pos (5)
448 #define QEI_CTL_CHBEN_Msk (0x1ul << QEI_CTL_CHBEN_Pos)
450 #define QEI_CTL_IDXEN_Pos (6)
451 #define QEI_CTL_IDXEN_Msk (0x1ul << QEI_CTL_IDXEN_Pos)
453 #define QEI_CTL_MODE_Pos (8)
454 #define QEI_CTL_MODE_Msk (0x3ul << QEI_CTL_MODE_Pos)
456 #define QEI_CTL_CHAINV_Pos (12)
457 #define QEI_CTL_CHAINV_Msk (0x1ul << QEI_CTL_CHAINV_Pos)
459 #define QEI_CTL_CHBINV_Pos (13)
460 #define QEI_CTL_CHBINV_Msk (0x1ul << QEI_CTL_CHBINV_Pos)
462 #define QEI_CTL_IDXINV_Pos (14)
463 #define QEI_CTL_IDXINV_Msk (0x1ul << QEI_CTL_IDXINV_Pos)
465 #define QEI_CTL_OVUNIEN_Pos (16)
466 #define QEI_CTL_OVUNIEN_Msk (0x1ul << QEI_CTL_OVUNIEN_Pos)
468 #define QEI_CTL_DIRIEN_Pos (17)
469 #define QEI_CTL_DIRIEN_Msk (0x1ul << QEI_CTL_DIRIEN_Pos)
471 #define QEI_CTL_CMPIEN_Pos (18)
472 #define QEI_CTL_CMPIEN_Msk (0x1ul << QEI_CTL_CMPIEN_Pos)
474 #define QEI_CTL_IDXIEN_Pos (19)
475 #define QEI_CTL_IDXIEN_Msk (0x1ul << QEI_CTL_IDXIEN_Pos)
477 #define QEI_CTL_HOLDTMR0_Pos (20)
478 #define QEI_CTL_HOLDTMR0_Msk (0x1ul << QEI_CTL_HOLDTMR0_Pos)
480 #define QEI_CTL_HOLDTMR1_Pos (21)
481 #define QEI_CTL_HOLDTMR1_Msk (0x1ul << QEI_CTL_HOLDTMR1_Pos)
483 #define QEI_CTL_HOLDTMR2_Pos (22)
484 #define QEI_CTL_HOLDTMR2_Msk (0x1ul << QEI_CTL_HOLDTMR2_Pos)
486 #define QEI_CTL_HOLDTMR3_Pos (23)
487 #define QEI_CTL_HOLDTMR3_Msk (0x1ul << QEI_CTL_HOLDTMR3_Pos)
489 #define QEI_CTL_HOLDCNT_Pos (24)
490 #define QEI_CTL_HOLDCNT_Msk (0x1ul << QEI_CTL_HOLDCNT_Pos)
492 #define QEI_CTL_IDXLATEN_Pos (25)
493 #define QEI_CTL_IDXLATEN_Msk (0x1ul << QEI_CTL_IDXLATEN_Pos)
495 #define QEI_CTL_IDXRLDEN_Pos (27)
496 #define QEI_CTL_IDXRLDEN_Msk (0x1ul << QEI_CTL_IDXRLDEN_Pos)
498 #define QEI_CTL_CMPEN_Pos (28)
499 #define QEI_CTL_CMPEN_Msk (0x1ul << QEI_CTL_CMPEN_Pos)
501 #define QEI_CTL_QEIEN_Pos (29)
502 #define QEI_CTL_QEIEN_Msk (0x1ul << QEI_CTL_QEIEN_Pos)
504 #define QEI_STATUS_IDXF_Pos (0)
505 #define QEI_STATUS_IDXF_Msk (0x1ul << QEI_STATUS_IDXF_Pos)
507 #define QEI_STATUS_CMPF_Pos (1)
508 #define QEI_STATUS_CMPF_Msk (0x1ul << QEI_STATUS_CMPF_Pos)
510 #define QEI_STATUS_OVUNF_Pos (2)
511 #define QEI_STATUS_OVUNF_Msk (0x1ul << QEI_STATUS_OVUNF_Pos)
513 #define QEI_STATUS_DIRCHGF_Pos (3)
514 #define QEI_STATUS_DIRCHGF_Msk (0x1ul << QEI_STATUS_DIRCHGF_Pos)
516 #define QEI_STATUS_DIRF_Pos (8)
517 #define QEI_STATUS_DIRF_Msk (0x1ul << QEI_STATUS_DIRF_Pos) /* QEI_CONST */
520 /* end of QEI register group */ /* end of REGISTER group */
522
523 #if defined ( __CC_ARM )
524 #pragma no_anon_unions
525 #endif
526
527 #endif /* __QEI_REG_H__ */
QEI_T::CNTCMP
__IO uint32_t CNTCMP
Definition: qei_reg.h:405
QEI_T::CNTLATCH
__IO uint32_t CNTLATCH
Definition: qei_reg.h:404
QEI_T::STATUS
__IO uint32_t STATUS
Definition: qei_reg.h:414
QEI_T::CNTMAX
__IO uint32_t CNTMAX
Definition: qei_reg.h:409
QEI_T::CNTHOLD
__IO uint32_t CNTHOLD
Definition: qei_reg.h:403
QEI_T::CNT
__IO uint32_t CNT
Definition: qei_reg.h:402
QEI_T
Definition: qei_reg.h:26
QEI_T::CTL
__IO uint32_t CTL
Definition: qei_reg.h:410