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