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