qei_001.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * @brief Quadrature Encoder Interface Registers and control functions
  3. *
  4. * @note
  5. * Copyright(C) NXP Semiconductors, 2012
  6. * All rights reserved.
  7. *
  8. * @par
  9. * Software that is described herein is for illustrative purposes only
  10. * which provides customers with programming information regarding the
  11. * LPC products. This software is supplied "AS IS" without any warranties of
  12. * any kind, and NXP Semiconductors and its licensor disclaim any and
  13. * all warranties, express or implied, including all implied warranties of
  14. * merchantability, fitness for a particular purpose and non-infringement of
  15. * intellectual property rights. NXP Semiconductors assumes no responsibility
  16. * or liability for the use of the software, conveys no license or rights under any
  17. * patent, copyright, mask work right, or any other intellectual property rights in
  18. * or to any products. NXP Semiconductors reserves the right to make changes
  19. * in the software without notification. NXP Semiconductors also makes no
  20. * representation or warranty that such application will be suitable for the
  21. * specified use without further testing or modification.
  22. *
  23. * @par
  24. * Permission to use, copy, modify, and distribute this software and its
  25. * documentation is hereby granted, under NXP Semiconductors' and its
  26. * licensor's relevant copyrights in the software, without fee, provided that it
  27. * is used in conjunction with NXP Semiconductors microcontrollers. This
  28. * copyright, permission, and disclaimer notice must appear in all copies of
  29. * this code.
  30. */
  31. #ifndef __QEI_001_H_
  32. #define __QEI_001_H_
  33. #include "sys_config.h"
  34. #include "cmsis.h"
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif
  38. /** @defgroup IP_QEI_001 IP: QEI register block and driver
  39. * @ingroup IP_Drivers
  40. * Quadrature Encoder Interface
  41. * @{
  42. */
  43. /**
  44. * @brief Quadrature Encoder Interface register block structure
  45. */
  46. typedef struct { /*!< QEI Structure */
  47. __O uint32_t CON; /*!< Control register */
  48. __I uint32_t STAT; /*!< Encoder status register */
  49. __IO uint32_t CONF; /*!< Configuration register */
  50. __I uint32_t POS; /*!< Position register */
  51. __IO uint32_t MAXPOS; /*!< Maximum position register */
  52. __IO uint32_t CMPOS0; /*!< position compare register 0 */
  53. __IO uint32_t CMPOS1; /*!< position compare register 1 */
  54. __IO uint32_t CMPOS2; /*!< position compare register 2 */
  55. __I uint32_t INXCNT; /*!< Index count register */
  56. __IO uint32_t INXCMP0; /*!< Index compare register 0 */
  57. __IO uint32_t LOAD; /*!< Velocity timer reload register */
  58. __I uint32_t TIME; /*!< Velocity timer register */
  59. __I uint32_t VEL; /*!< Velocity counter register */
  60. __I uint32_t CAP; /*!< Velocity capture register */
  61. __IO uint32_t VELCOMP; /*!< Velocity compare register */
  62. __IO uint32_t FILTERPHA; /*!< Digital filter register on input phase A (QEI_A) */
  63. __IO uint32_t FILTERPHB; /*!< Digital filter register on input phase B (QEI_B) */
  64. __IO uint32_t FILTERINX; /*!< Digital filter register on input index (QEI_IDX) */
  65. __IO uint32_t WINDOW; /*!< Index acceptance window register */
  66. __IO uint32_t INXCMP1; /*!< Index compare register 1 */
  67. __IO uint32_t INXCMP2; /*!< Index compare register 2 */
  68. __I uint32_t RESERVED0[993];
  69. __O uint32_t IEC; /*!< Interrupt enable clear register */
  70. __O uint32_t IES; /*!< Interrupt enable set register */
  71. __I uint32_t INTSTAT; /*!< Interrupt status register */
  72. __I uint32_t IE; /*!< Interrupt enable register */
  73. __O uint32_t CLR; /*!< Interrupt status clear register */
  74. __O uint32_t SET; /*!< Interrupt status set register */
  75. } IP_QEI_001_Type;
  76. /**
  77. * @}
  78. */
  79. #ifdef __cplusplus
  80. }
  81. #endif
  82. #endif /* __QEI_001_H_ */