qei_reg.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. /**************************************************************************//**
  2. * @file qei_reg.h
  3. * @version V1.00
  4. * @brief QEI register definition header file
  5. *
  6. * SPDX-License-Identifier: Apache-2.0
  7. * @copyright (C) 2017-2020 Nuvoton Technology Corp. All rights reserved.
  8. *****************************************************************************/
  9. #ifndef __QEI_REG_H__
  10. #define __QEI_REG_H__
  11. #if defined ( __CC_ARM )
  12. #pragma anon_unions
  13. #endif
  14. /**
  15. @addtogroup REGISTER Control Register
  16. @{
  17. */
  18. /**
  19. @addtogroup QEI Quadrature Encoder Interface(QEI)
  20. Memory Mapped Structure for QEI Controller
  21. @{ */
  22. typedef struct
  23. {
  24. /**
  25. * @var QEI_T::CNT
  26. * Offset: 0x00 QEI Counter Register
  27. * ---------------------------------------------------------------------------------------------------
  28. * |Bits |Field |Descriptions
  29. * | :----: | :----: | :---- |
  30. * |[31:0] |CNT |Quadrature Encoder Interface Counter
  31. * | | |A 32-bit up/down counter
  32. * | | |When an effective phase pulse is detected, this counter is increased by one if the bit DIRF (QEI_STATUS[8]) is one or decreased by one if the bit DIRF(QEI_STATUS[8]) is zero
  33. * | | |This register performs an integrator which count value is proportional to the encoder position
  34. * | | |The pulse counter may be initialized to a predetermined value by one of three events occurs:
  35. * | | |1. Software is written if QEIEN (QEI_CTL[29]) = 0.
  36. * | | |2. Compare-match event if QEIEN(QEI_CTL[29])=1 and QEI is in compare-counting mode.
  37. * | | |3. Index signal change if QEIEN(QEI_CTL[29])=1 and IDXRLDEN (QEI_CTL[27])=1.
  38. * @var QEI_T::CNTHOLD
  39. * Offset: 0x04 QEI Counter Hold Register
  40. * ---------------------------------------------------------------------------------------------------
  41. * |Bits |Field |Descriptions
  42. * | :----: | :----: | :---- |
  43. * |[31:0] |CNTHOLD |Quadrature Encoder Interface Counter Hold
  44. * | | |When bit HOLDCNT (QEI_CTL[24]) goes from low to high, the CNT(QEI_CNT[31:0]) is copied into CNTHOLD (QEI_CNTHOLD[31:0]) register.
  45. * @var QEI_T::CNTLATCH
  46. * Offset: 0x08 QEI Counter Index Latch Register
  47. * ---------------------------------------------------------------------------------------------------
  48. * |Bits |Field |Descriptions
  49. * | :----: | :----: | :---- |
  50. * |[31:0] |CNTLATCH |Quadrature Encoder Interface Counter Index Latch
  51. * | | |When the IDXF (QEI_STATUS[0]) bit is set, the CNT(QEI_CNT[31:0]) is copied into CNTLATCH (QEI_CNTLATCH[31:0]) register.
  52. * @var QEI_T::CNTCMP
  53. * Offset: 0x0C QEI Counter Compare Register
  54. * ---------------------------------------------------------------------------------------------------
  55. * |Bits |Field |Descriptions
  56. * | :----: | :----: | :---- |
  57. * |[31:0] |CNTCMP |Quadrature Encoder Interface Counter Compare
  58. * | | |If the QEI controller is in the compare-counting mode CMPEN (QEI_CTL[28]) =1, when the value of CNT(QEI_CNT[31:0]) matches CNTCMP(QEI_CNTCMP[31:0]), CMPF will be set
  59. * | | |This register is software writable.
  60. * @var QEI_T::CNTMAX
  61. * Offset: 0x14 QEI Pre-set Maximum Count Register
  62. * ---------------------------------------------------------------------------------------------------
  63. * |Bits |Field |Descriptions
  64. * | :----: | :----: | :---- |
  65. * |[31:0] |CNTMAX |Quadrature Encoder Interface Preset Maximum Count
  66. * | | |This register value determined by user stores the maximum value which may be the number of the QEI counter for the QEI controller compare-counting mode
  67. * @var QEI_T::CTL
  68. * Offset: 0x18 QEI Controller Control Register
  69. * ---------------------------------------------------------------------------------------------------
  70. * |Bits |Field |Descriptions
  71. * | :----: | :----: | :---- |
  72. * |[2:0] |NFCLKSEL |Noise Filter Clock Pre-divide Selection
  73. * | | |To determine the sampling frequency of the Noise Filter clock .
  74. * | | |000 = QEI_CLK.
  75. * | | |001 = QEI_CLK/2.
  76. * | | |010 = QEI_CLK/4.
  77. * | | |011 = QEI_CLK/16.
  78. * | | |100 = QEI_CLK/32.
  79. * | | |101 = QEI_CLK/64.
  80. * |[3] |NFDIS |QEI Controller Input Noise Filter Disable Bit
  81. * | | |0 = The noise filter of QEI controller Enabled.
  82. * | | |1 = The noise filter of QEI controller Disabled.
  83. * |[4] |CHAEN |QEA Input to QEI Controller Enable Bit
  84. * | | |0 = QEA input to QEI Controller Disabled.
  85. * | | |1 = QEA input to QEI Controller Enabled.
  86. * |[5] |CHBEN |QEB Input to QEI Controller Enable Bit
  87. * | | |0 = QEB input to QEI Controller Disabled.
  88. * | | |1 = QEB input to QEI Controller Enabled.
  89. * |[6] |IDXEN |IDX Input to QEI Controller Enable Bit
  90. * | | |0 = IDX input to QEI Controller Disabled.
  91. * | | |1 = IDX input to QEI Controller Enabled.
  92. * |[9:8] |MODE |QEI Counting Mode Selection
  93. * | | |There are four quadrature encoder pulse counter operation modes.
  94. * | | |00 = X4 Free-counting Mode.
  95. * | | |01 = X2 Free-counting Mode.
  96. * | | |10 = X4 Compare-counting Mode.
  97. * | | |11 = X2 Compare-counting Mode.
  98. * |[12] |CHAINV |Inverse QEA Input Polarity
  99. * | | |0 = Not inverse QEA input polarity.
  100. * | | |1 = QEA input polarity is inversed to QEI controller.
  101. * |[13] |CHBINV |Inverse QEB Input Polarity
  102. * | | |0 = Not inverse QEB input polarity.
  103. * | | |1 = QEB input polarity is inversed to QEI controller.
  104. * |[14] |IDXINV |Inverse IDX Input Polarity
  105. * | | |0 = Not inverse IDX input polarity.
  106. * | | |1 = IDX input polarity is inversed to QEI controller.
  107. * |[16] |OVUNIEN |OVUNF Trigger QEI Interrupt Enable Bit
  108. * | | |0 = OVUNF can trigger QEI controller interrupt Disabled.
  109. * | | |1 = OVUNF can trigger QEI controller interrupt Enabled.
  110. * |[17] |DIRIEN |DIRCHGF Trigger QEI Interrupt Enable Bit
  111. * | | |0 = DIRCHGF can trigger QEI controller interrupt Disabled.
  112. * | | |1 = DIRCHGF can trigger QEI controller interrupt Enabled.
  113. * |[18] |CMPIEN |CMPF Trigger QEI Interrupt Enable Bit
  114. * | | |0 = CMPF can trigger QEI controller interrupt Disabled.
  115. * | | |1 = CMPF can trigger QEI controller interrupt Enabled.
  116. * |[19] |IDXIEN |IDXF Trigger QEI Interrupt Enable Bit
  117. * | | |0 = The IDXF can trigger QEI interrupt Disabled.
  118. * | | |1 = The IDXF can trigger QEI interrupt Enabled.
  119. * |[20] |HOLDTMR0 |Hold QEI_CNT by Timer 0
  120. * | | |0 = TIF (TIMER0_INTSTS[0]) has no effect on HOLDCNT.
  121. * | | |1 = A rising edge of bit TIF(TIMER0_INTSTS[0]) in timer 0 sets HOLDCNT to 1.
  122. * |[21] |HOLDTMR1 |Hold QEI_CNT by Timer 1
  123. * | | |0 = TIF(TIMER1_INTSTS[0]) has no effect on HOLDCNT.
  124. * | | |1 = A rising edge of bit TIF (TIMER1_INTSTS[0]) in timer 1 sets HOLDCNT to 1.
  125. * |[22] |HOLDTMR2 |Hold QEI_CNT by Timer 2
  126. * | | |0 = TIF(TIMER2_INTSTS[0]) has no effect on HOLDCNT.
  127. * | | |1 = A rising edge of bit TIF(TIMER2_INTSTS[0]) in timer 2 sets HOLDCNT to 1.
  128. * |[23] |HOLDTMR3 |Hold QEI_CNT by Timer 3
  129. * | | |0 = TIF (TIMER3_INTSTS[0]) has no effect on HOLDCNT.
  130. * | | |1 = A rising edge of bit TIF(TIMER3_INTSTS[0]) in timer 3 sets HOLDCNT to 1.
  131. * |[24] |HOLDCNT |Hold QEI_CNT Control
  132. * | | |When this bit is set from low to high, the CNT(QEI_CNT[31:0]) is copied into CNTHOLD(QEI_CNTHOLD[31:0])
  133. * | | |This bit may be set by writing 1 to it or Timer0~Timer3 interrupt flag TIF (TIMERx_INTSTS[0]).
  134. * | | |0 = No operation.
  135. * | | |1 = QEI_CNT content is captured and stored in CNTHOLD(QEI_CNTHOLD[31:0]).
  136. * | | |Note: This bit is automatically cleared after QEI_CNTHOLD holds QEI_CNT value.
  137. * |[25] |IDXLATEN |Index Latch QEI_CNT Enable Bit
  138. * | | |If this bit is set to high, the CNT(QEI_CNT[31:0]) content will be latched into CNTLATCH (QEI_CNTLATCH[31:0]) at every rising on signal CHX.
  139. * | | |0 = The index signal latch QEI counter function Disabled.
  140. * | | |1 = The index signal latch QEI counter function Enabled.
  141. * |[27] |IDXRLDEN |Index Trigger QEI_CNT Reload Enable Bit
  142. * | | |When this bit is high and a rising edge comes on signal CHX, the CNT(QEI_CNT[31:0]) will be reset to zero if the counter is in up-counting type (DIRF(QEI_STATUS[8]) = 1); while the CNT(QEI_CNT[31:0]) will be reloaded with CNTMAX (QEI_CNTMAX[31:0]) content if the counter is in down-counting type (DIRF(QEI_STATUS[8]) = 0).
  143. * | | |0 = Reload function Disabled.
  144. * | | |1 = QEI_CNT re-initialized by Index signal Enabled.
  145. * |[28] |CMPEN |The Compare Function Enable Bit
  146. * | | |The compare function in QEI controller is to compare the dynamic counting QEI_CNT with the compare register CNTCMP( QEI_CNTCMP[31:0]), if CNT(QEI_CNT[31:0]) reaches CNTCMP( QEI_CNTCMP[31:0]), the flag CMPF will be set.
  147. * | | |0 = Compare function Disabled.
  148. * | | |1 = Compare function Enabled.
  149. * |[29] |QEIEN |Quadrature Encoder Interface Controller Enable Bit
  150. * | | |0 = QEI controller function Disabled.
  151. * | | |1 = QEI controller function Enabled.
  152. * @var QEI_T::STATUS
  153. * Offset: 0x2C QEI Controller Status Register
  154. * ---------------------------------------------------------------------------------------------------
  155. * |Bits |Field |Descriptions
  156. * | :----: | :----: | :---- |
  157. * |[0] |IDXF |IDX Detected Flag
  158. * | | |When the QEI controller detects a rising edge on signal CHX it will set flag IDXF to high.
  159. * | | |0 = No rising edge detected on signal CHX.
  160. * | | |1 = A rising edge occurs on signal CHX.
  161. * | | |Note: This bit is only cleared by writing 1 to it.
  162. * |[1] |CMPF |Compare-match Flag
  163. * | | |If the QEI compare function is enabled, the flag is set by hardware while QEI counter up or down counts and reach to the CNTCMP(QEI_CNTCMP[31:0]).
  164. * | | |0 = QEI counter does not match with CNTCMP(QEI_CNTCMP[31:0]).
  165. * | | |1 = QEI counter counts to the same as CNTCMP(QEI_CNTCMP[31:0]).
  166. * | | |Note: This bit is only cleared by writing 1 to it.
  167. * |[2] |OVUNF |QEI Counter Overflow or Underflow Flag
  168. * | | |Flag is set by hardware while CNT(QEI_CNT[31:0]) overflows from 0xFFFF_FFFF to zero in free-counting mode or from the CNTMAX (QEI_CNTMAX[31:0]) to zero in compare-counting mode
  169. * | | |Similarly, the flag is set while QEI counter underflows from zero to 0xFFFF_FFFF or CNTMAX (QEI_CNTMAX[31:0]).
  170. * | | |0 = No overflow or underflow occurs in QEI counter.
  171. * | | |1 = QEI counter occurs counting overflow or underflow.
  172. * | | |Note: This bit is only cleared by writing 1 to it.
  173. * |[3] |DIRCHGF |Direction Change Flag
  174. * | | |Flag is set by hardware while QEI counter counting direction is changed.
  175. * | | |Software can clear this bit by writing 1 to it.
  176. * | | |0 = No change in QEI counter counting direction.
  177. * | | |1 = QEI counter counting direction is changed.
  178. * | | |Note: This bit is only cleared by writing 1 to it.
  179. * |[8] |DIRF |QEI Counter Counting Direction Indication
  180. * | | |0 = QEI Counter is in down-counting.
  181. * | | |1 = QEI Counter is in up-counting.
  182. * | | |Note: This bit is set/reset by hardware according to the phase detection between CHA and CHB.
  183. */
  184. __IO uint32_t CNT; /*!< [0x0000] QEI Counter Register */
  185. __IO uint32_t CNTHOLD; /*!< [0x0004] QEI Counter Hold Register */
  186. __IO uint32_t CNTLATCH; /*!< [0x0008] QEI Counter Index Latch Register */
  187. __IO uint32_t CNTCMP; /*!< [0x000c] QEI Counter Compare Register */
  188. /// @cond HIDDEN_SYMBOLS
  189. __I uint32_t RESERVE0[1];
  190. /// @endcond //HIDDEN_SYMBOLS
  191. __IO uint32_t CNTMAX; /*!< [0x0014] QEI Pre-set Maximum Count Register */
  192. __IO uint32_t CTL; /*!< [0x0018] QEI Controller Control Register */
  193. /// @cond HIDDEN_SYMBOLS
  194. __I uint32_t RESERVE1[4];
  195. /// @endcond //HIDDEN_SYMBOLS
  196. __IO uint32_t STATUS; /*!< [0x002c] QEI Controller Status Register */
  197. } QEI_T;
  198. /**
  199. @addtogroup QEI_CONST QEI Bit Field Definition
  200. Constant Definitions for QEI Controller
  201. @{ */
  202. #define QEI_CNT_CNT_Pos (0) /*!< QEI_T::CNT: CNT Position */
  203. #define QEI_CNT_CNT_Msk (0xfffffffful << QEI_CNT_CNT_Pos) /*!< QEI_T::CNT: CNT Mask */
  204. #define QEI_CNTHOLD_CNTHOLD_Pos (0) /*!< QEI_T::CNTHOLD: CNTHOLD Position */
  205. #define QEI_CNTHOLD_CNTHOLD_Msk (0xfffffffful << QEI_CNTHOLD_CNTHOLD_Pos) /*!< QEI_T::CNTHOLD: CNTHOLD Mask */
  206. #define QEI_CNTLATCH_CNTLATCH_Pos (0) /*!< QEI_T::CNTLATCH: CNTLATCH Position */
  207. #define QEI_CNTLATCH_CNTLATCH_Msk (0xfffffffful << QEI_CNTLATCH_CNTLATCH_Pos) /*!< QEI_T::CNTLATCH: CNTLATCH Mask */
  208. #define QEI_CNTCMP_CNTCMP_Pos (0) /*!< QEI_T::CNTCMP: CNTCMP Position */
  209. #define QEI_CNTCMP_CNTCMP_Msk (0xfffffffful << QEI_CNTCMP_CNTCMP_Pos) /*!< QEI_T::CNTCMP: CNTCMP Mask */
  210. #define QEI_CNTMAX_CNTMAX_Pos (0) /*!< QEI_T::CNTMAX: CNTMAX Position */
  211. #define QEI_CNTMAX_CNTMAX_Msk (0xfffffffful << QEI_CNTMAX_CNTMAX_Pos) /*!< QEI_T::CNTMAX: CNTMAX Mask */
  212. #define QEI_CTL_NFCLKSEL_Pos (0) /*!< QEI_T::CTL: NFCLKSEL Position */
  213. #define QEI_CTL_NFCLKSEL_Msk (0x7ul << QEI_CTL_NFCLKSEL_Pos) /*!< QEI_T::CTL: NFCLKSEL Mask */
  214. #define QEI_CTL_NFDIS_Pos (3) /*!< QEI_T::CTL: NFDIS Position */
  215. #define QEI_CTL_NFDIS_Msk (0x1ul << QEI_CTL_NFDIS_Pos) /*!< QEI_T::CTL: NFDIS Mask */
  216. #define QEI_CTL_CHAEN_Pos (4) /*!< QEI_T::CTL: CHAEN Position */
  217. #define QEI_CTL_CHAEN_Msk (0x1ul << QEI_CTL_CHAEN_Pos) /*!< QEI_T::CTL: CHAEN Mask */
  218. #define QEI_CTL_CHBEN_Pos (5) /*!< QEI_T::CTL: CHBEN Position */
  219. #define QEI_CTL_CHBEN_Msk (0x1ul << QEI_CTL_CHBEN_Pos) /*!< QEI_T::CTL: CHBEN Mask */
  220. #define QEI_CTL_IDXEN_Pos (6) /*!< QEI_T::CTL: IDXEN Position */
  221. #define QEI_CTL_IDXEN_Msk (0x1ul << QEI_CTL_IDXEN_Pos) /*!< QEI_T::CTL: IDXEN Mask */
  222. #define QEI_CTL_MODE_Pos (8) /*!< QEI_T::CTL: MODE Position */
  223. #define QEI_CTL_MODE_Msk (0x3ul << QEI_CTL_MODE_Pos) /*!< QEI_T::CTL: MODE Mask */
  224. #define QEI_CTL_CHAINV_Pos (12) /*!< QEI_T::CTL: CHAINV Position */
  225. #define QEI_CTL_CHAINV_Msk (0x1ul << QEI_CTL_CHAINV_Pos) /*!< QEI_T::CTL: CHAINV Mask */
  226. #define QEI_CTL_CHBINV_Pos (13) /*!< QEI_T::CTL: CHBINV Position */
  227. #define QEI_CTL_CHBINV_Msk (0x1ul << QEI_CTL_CHBINV_Pos) /*!< QEI_T::CTL: CHBINV Mask */
  228. #define QEI_CTL_IDXINV_Pos (14) /*!< QEI_T::CTL: IDXINV Position */
  229. #define QEI_CTL_IDXINV_Msk (0x1ul << QEI_CTL_IDXINV_Pos) /*!< QEI_T::CTL: IDXINV Mask */
  230. #define QEI_CTL_OVUNIEN_Pos (16) /*!< QEI_T::CTL: OVUNIEN Position */
  231. #define QEI_CTL_OVUNIEN_Msk (0x1ul << QEI_CTL_OVUNIEN_Pos) /*!< QEI_T::CTL: OVUNIEN Mask */
  232. #define QEI_CTL_DIRIEN_Pos (17) /*!< QEI_T::CTL: DIRIEN Position */
  233. #define QEI_CTL_DIRIEN_Msk (0x1ul << QEI_CTL_DIRIEN_Pos) /*!< QEI_T::CTL: DIRIEN Mask */
  234. #define QEI_CTL_CMPIEN_Pos (18) /*!< QEI_T::CTL: CMPIEN Position */
  235. #define QEI_CTL_CMPIEN_Msk (0x1ul << QEI_CTL_CMPIEN_Pos) /*!< QEI_T::CTL: CMPIEN Mask */
  236. #define QEI_CTL_IDXIEN_Pos (19) /*!< QEI_T::CTL: IDXIEN Position */
  237. #define QEI_CTL_IDXIEN_Msk (0x1ul << QEI_CTL_IDXIEN_Pos) /*!< QEI_T::CTL: IDXIEN Mask */
  238. #define QEI_CTL_HOLDTMR0_Pos (20) /*!< QEI_T::CTL: HOLDTMR0 Position */
  239. #define QEI_CTL_HOLDTMR0_Msk (0x1ul << QEI_CTL_HOLDTMR0_Pos) /*!< QEI_T::CTL: HOLDTMR0 Mask */
  240. #define QEI_CTL_HOLDTMR1_Pos (21) /*!< QEI_T::CTL: HOLDTMR1 Position */
  241. #define QEI_CTL_HOLDTMR1_Msk (0x1ul << QEI_CTL_HOLDTMR1_Pos) /*!< QEI_T::CTL: HOLDTMR1 Mask */
  242. #define QEI_CTL_HOLDTMR2_Pos (22) /*!< QEI_T::CTL: HOLDTMR2 Position */
  243. #define QEI_CTL_HOLDTMR2_Msk (0x1ul << QEI_CTL_HOLDTMR2_Pos) /*!< QEI_T::CTL: HOLDTMR2 Mask */
  244. #define QEI_CTL_HOLDTMR3_Pos (23) /*!< QEI_T::CTL: HOLDTMR3 Position */
  245. #define QEI_CTL_HOLDTMR3_Msk (0x1ul << QEI_CTL_HOLDTMR3_Pos) /*!< QEI_T::CTL: HOLDTMR3 Mask */
  246. #define QEI_CTL_HOLDCNT_Pos (24) /*!< QEI_T::CTL: HOLDCNT Position */
  247. #define QEI_CTL_HOLDCNT_Msk (0x1ul << QEI_CTL_HOLDCNT_Pos) /*!< QEI_T::CTL: HOLDCNT Mask */
  248. #define QEI_CTL_IDXLATEN_Pos (25) /*!< QEI_T::CTL: IDXLATEN Position */
  249. #define QEI_CTL_IDXLATEN_Msk (0x1ul << QEI_CTL_IDXLATEN_Pos) /*!< QEI_T::CTL: IDXLATEN Mask */
  250. #define QEI_CTL_IDXRLDEN_Pos (27) /*!< QEI_T::CTL: IDXRLDEN Position */
  251. #define QEI_CTL_IDXRLDEN_Msk (0x1ul << QEI_CTL_IDXRLDEN_Pos) /*!< QEI_T::CTL: IDXRLDEN Mask */
  252. #define QEI_CTL_CMPEN_Pos (28) /*!< QEI_T::CTL: CMPEN Position */
  253. #define QEI_CTL_CMPEN_Msk (0x1ul << QEI_CTL_CMPEN_Pos) /*!< QEI_T::CTL: CMPEN Mask */
  254. #define QEI_CTL_QEIEN_Pos (29) /*!< QEI_T::CTL: QEIEN Position */
  255. #define QEI_CTL_QEIEN_Msk (0x1ul << QEI_CTL_QEIEN_Pos) /*!< QEI_T::CTL: QEIEN Mask */
  256. #define QEI_STATUS_IDXF_Pos (0) /*!< QEI_T::STATUS: IDXF Position */
  257. #define QEI_STATUS_IDXF_Msk (0x1ul << QEI_STATUS_IDXF_Pos) /*!< QEI_T::STATUS: IDXF Mask */
  258. #define QEI_STATUS_CMPF_Pos (1) /*!< QEI_T::STATUS: CMPF Position */
  259. #define QEI_STATUS_CMPF_Msk (0x1ul << QEI_STATUS_CMPF_Pos) /*!< QEI_T::STATUS: CMPF Mask */
  260. #define QEI_STATUS_OVUNF_Pos (2) /*!< QEI_T::STATUS: OVUNF Position */
  261. #define QEI_STATUS_OVUNF_Msk (0x1ul << QEI_STATUS_OVUNF_Pos) /*!< QEI_T::STATUS: OVUNF Mask */
  262. #define QEI_STATUS_DIRCHGF_Pos (3) /*!< QEI_T::STATUS: DIRCHGF Position */
  263. #define QEI_STATUS_DIRCHGF_Msk (0x1ul << QEI_STATUS_DIRCHGF_Pos) /*!< QEI_T::STATUS: DIRCHGF Mask */
  264. #define QEI_STATUS_DIRF_Pos (8) /*!< QEI_T::STATUS: DIRF Position */
  265. #define QEI_STATUS_DIRF_Msk (0x1ul << QEI_STATUS_DIRF_Pos) /*!< QEI_T::STATUS: DIRF Mask */
  266. /**@}*/ /* QEI_CONST */
  267. /**@}*/ /* end of QEI register group */
  268. /**@}*/ /* end of REGISTER group */
  269. #if defined ( __CC_ARM )
  270. #pragma no_anon_unions
  271. #endif
  272. #endif /* __QEI_REG_H__ */