]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Nuvoton_Code/Device/Nuvoton/M2351/Include/ecap_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 / ecap_reg.h
1 /**************************************************************************//**\r
2  * @file     ecap_reg.h\r
3  * @version  V1.00\r
4  * @brief    ECAP register definition header file\r
5  *\r
6  * @copyright (C) 2017 Nuvoton Technology Corp. All rights reserved.\r
7  *****************************************************************************/\r
8 #ifndef __ECAP_REG_H__\r
9 #define __ECAP_REG_H__\r
10 \r
11 /** @addtogroup REGISTER Control Register\r
12 \r
13   @{\r
14 \r
15 */\r
16 \r
17 /*---------------------- Enhanced Input Capture Timer -------------------------*/\r
18 /**\r
19     @addtogroup ECAP Enhanced Input Capture Timer(ECAP)\r
20     Memory Mapped Structure for ECAP Controller\r
21 @{ */\r
22 \r
23 typedef struct\r
24 {\r
25 \r
26     /**\r
27      * @var ECAP_T::CNT\r
28      * Offset: 0x00  Input Capture Counter (24-bit up counter)\r
29      * ---------------------------------------------------------------------------------------------------\r
30      * |Bits    |Field     |Descriptions\r
31      * | :----: | :----:   | :---- |\r
32      * |[23:0]  |CNT       |Input Capture Timer/Counter\r
33      * |        |          |The input Capture Timer/Counter is a 24-bit up-counting counter\r
34      * |        |          |The clock source for the counter is from the clock divider\r
35      * @var ECAP_T::HLD0\r
36      * Offset: 0x04  Input Capture Hold Register 0\r
37      * ---------------------------------------------------------------------------------------------------\r
38      * |Bits    |Field     |Descriptions\r
39      * | :----: | :----:   | :---- |\r
40      * |[23:0]  |HOLD      |Input Capture Counter Hold Register\r
41      * |        |          |When an active input capture channel detects a valid edge signal change, the ECAPCNT value is latched into the corresponding holding register\r
42      * |        |          |Each input channel has its own holding register named by ECAP_HLDx where x is from 0 to 2 to indicate inputs from IC0 to IC2, respectively.\r
43      * @var ECAP_T::HLD1\r
44      * Offset: 0x08  Input Capture Hold Register 1\r
45      * ---------------------------------------------------------------------------------------------------\r
46      * |Bits    |Field     |Descriptions\r
47      * | :----: | :----:   | :---- |\r
48      * |[23:0]  |HOLD      |Input Capture Counter Hold Register\r
49      * |        |          |When an active input capture channel detects a valid edge signal change, the ECAPCNT value is latched into the corresponding holding register\r
50      * |        |          |Each input channel has its own holding register named by ECAP_HLDx where x is from 0 to 2 to indicate inputs from IC0 to IC2, respectively.\r
51      * @var ECAP_T::HLD2\r
52      * Offset: 0x0C  Input Capture Hold Register 2\r
53      * ---------------------------------------------------------------------------------------------------\r
54      * |Bits    |Field     |Descriptions\r
55      * | :----: | :----:   | :---- |\r
56      * |[23:0]  |HOLD      |Input Capture Counter Hold Register\r
57      * |        |          |When an active input capture channel detects a valid edge signal change, the ECAPCNT value is latched into the corresponding holding register\r
58      * |        |          |Each input channel has its own holding register named by ECAP_HLDx where x is from 0 to 2 to indicate inputs from IC0 to IC2, respectively.\r
59      * @var ECAP_T::CNTCMP\r
60      * Offset: 0x10  Input Capture Compare Register\r
61      * ---------------------------------------------------------------------------------------------------\r
62      * |Bits    |Field     |Descriptions\r
63      * | :----: | :----:   | :---- |\r
64      * |[23:0]  |CNTCMP    |Input Capture Counter Compare Register\r
65      * |        |          |If the compare function is enabled (CMPEN = 1), this register (ECAP_CNTCMP) is used to compare with the capture counter (ECAP_CNT).\r
66      * |        |          |If the reload control is enabled (RLDEN[n] = 1, n=0~3), an overflow event or capture events will trigger the hardware to load the value of this register (ECAP_CNTCMP) into ECAP_CNT.\r
67      * @var ECAP_T::CTL0\r
68      * Offset: 0x14  Input Capture Control Register 0\r
69      * ---------------------------------------------------------------------------------------------------\r
70      * |Bits    |Field     |Descriptions\r
71      * | :----: | :----:   | :---- |\r
72      * |[2:0]   |NFCLKSEL  |Noise Filter Clock Pre-divide Selection\r
73      * |        |          |To determine the sampling frequency of the Noise Filter clock\r
74      * |        |          |000 = CAP_CLK.\r
75      * |        |          |001 = CAP_CLK/2.\r
76      * |        |          |010 = CAP_CLK/4.\r
77      * |        |          |011 = CAP_CLK/16.\r
78      * |        |          |100 = CAP_CLK/32.\r
79      * |        |          |101 = CAP_CLK/64.\r
80      * |[3]     |CAPNFDIS  |Input Capture Noise Filter Disable Control\r
81      * |        |          |0 = Noise filter of Input Capture Enabled.\r
82      * |        |          |1 = Noise filter of Input Capture Disabled (Bypass).\r
83      * |[4]     |IC0EN     |Port Pin IC0 Input to Input Capture Unit Enable Control\r
84      * |        |          |0 = IC0 input to Input Capture Unit Disabled.\r
85      * |        |          |1 = IC0 input to Input Capture Unit Enabled.\r
86      * |[5]     |IC1EN     |Port Pin IC1 Input to Input Capture Unit Enable Control\r
87      * |        |          |0 = IC1 input to Input Capture Unit Disabled.\r
88      * |        |          |1 = IC1 input to Input Capture Unit Enabled.\r
89      * |[6]     |IC2EN     |Port Pin IC2 Input to Input Capture Unit Enable Control\r
90      * |        |          |0 = IC2 input to Input Capture Unit Disabled.\r
91      * |        |          |1 = IC2 input to Input Capture Unit Enabled.\r
92      * |[9:8]   |CAPSEL0   |CAP0 Input Source Selection\r
93      * |        |          |00 = CAP0 input is from port pin ICAP0.\r
94      * |        |          |01 = Reserved.\r
95      * |        |          |10 = CAP0 input is from signal CHA of QEI controller unit n.\r
96      * |        |          |11 = Reserved.\r
97      * |        |          |Note: Input capture unit n matches QEIn, where n = 0~1.\r
98      * |[11:10] |CAPSEL1   |CAP1 Input Source Selection\r
99      * |        |          |00 = CAP1 input is from port pin ICAP1.\r
100      * |        |          |01 = Reserved.\r
101      * |        |          |10 = CAP1 input is from signal CHB of QEI controller unit n.\r
102      * |        |          |11 = Reserved.\r
103      * |        |          |Note: Input capture unit n matches QEIn, where n = 0~1.\r
104      * |[13:12] |CAPSEL2   |CAP2 Input Source Selection\r
105      * |        |          |00 = CAP2 input is from port pin ICAP2.\r
106      * |        |          |01 = Reserved.\r
107      * |        |          |10 = CAP2 input is from signal CHX of QEI controller unit n.\r
108      * |        |          |11 = Reserved.\r
109      * |        |          |Note: Input capture unit n matches QEIn, where n = 0~1.\r
110      * |[16]    |CAPIEN0   |Input Capture Channel 0 Interrupt Enable Control\r
111      * |        |          |0 = The flag CAPTF0 can trigger Input Capture interrupt Disabled.\r
112      * |        |          |1 = The flag CAPTF0 can trigger Input Capture interrupt Enabled.\r
113      * |[17]    |CAPIEN1   |Input Capture Channel 1 Interrupt Enable Control\r
114      * |        |          |0 = The flag CAPTF1 can trigger Input Capture interrupt Disabled.\r
115      * |        |          |1 = The flag CAPTF1 can trigger Input Capture interrupt Enabled.\r
116      * |[18]    |CAPIEN2   |Input Capture Channel 2 Interrupt Enable Control\r
117      * |        |          |0 = The flag CAPTF2 can trigger Input Capture interrupt Disabled.\r
118      * |        |          |1 = The flag CAPTF2 can trigger Input Capture interrupt Enabled.\r
119      * |[20]    |OVIEN     |CAPOVF Trigger Input Capture Interrupt Enable Control\r
120      * |        |          |0 = The flag CAPOVF can trigger Input Capture interrupt Disabled.\r
121      * |        |          |1 = The flag CAPOVF can trigger Input Capture interrupt Enabled.\r
122      * |[21]    |CMPIEN    |CAPCMPF Trigger Input Capture Interrupt Enable Control\r
123      * |        |          |0 = The flag CAPCMPF can trigger Input Capture interrupt Disabled.\r
124      * |        |          |1 = The flag CAPCMPF can trigger Input Capture interrupt Enabled.\r
125      * |[24]    |CNTEN     |Input Capture Counter Start Counting Control\r
126      * |        |          |Setting this bit to 1, the capture counter (ECAP_CNT) starts up-counting synchronously with the clock from the .\r
127      * |        |          |0 = ECAP_CNT stop counting.\r
128      * |        |          |1 = ECAP_CNT starts up-counting.\r
129      * |[25]    |CMPCLREN  |Input Capture Counter Cleared by Compare-match Control\r
130      * |        |          |If this bit is set to 1, the capture counter (ECAP_CNT) will be cleared to 0 when the compare-match event (CAPCMPF = 1) occurs.\r
131      * |        |          |0 = Compare-match event (CAPCMPF) can clear capture counter (ECAP_CNT) Disabled.\r
132      * |        |          |1 = Compare-match event (CAPCMPF) can clear capture counter (ECAP_CNT) Enabled.\r
133      * |[28]    |CMPEN     |Compare Function Enable Control\r
134      * |        |          |The compare function in input capture timer/counter is to compare the dynamic counting ECAP_CNT with the compare register ECAP_CNTCMP, if ECAP_CNT value reaches ECAP_CNTCMP, the flag CAPCMPF will be set.\r
135      * |        |          |0 = The compare function Disabled.\r
136      * |        |          |1 = The compare function Enabled.\r
137      * |[29]    |CAPEN     |Input Capture Timer/Counter Enable Control\r
138      * |        |          |0 = Input Capture function Disabled.\r
139      * |        |          |1 = Input Capture function Enabled.\r
140      * @var ECAP_T::CTL1\r
141      * Offset: 0x18  Input Capture Control Register 1\r
142      * ---------------------------------------------------------------------------------------------------\r
143      * |Bits    |Field     |Descriptions\r
144      * | :----: | :----:   | :---- |\r
145      * |[1:0]   |EDGESEL0  |Channel 0 Captured Edge Selection\r
146      * |        |          |Input capture0 can detect falling edge change only, rising edge change only or both edge change\r
147      * |        |          |00 = Detect rising edge only.\r
148      * |        |          |01 = Detect falling edge only.\r
149      * |        |          |1x = Detect both rising and falling edge.\r
150      * |[3:2]   |EDGESEL1  |Channel 1 Captured Edge Selection\r
151      * |        |          |Input capture1 can detect falling edge change only, rising edge change only or both edge change\r
152      * |        |          |00 = Detect rising edge only.\r
153      * |        |          |01 = Detect falling edge only.\r
154      * |        |          |1x = Detect both rising and falling edge.\r
155      * |[5:4]   |EDGESEL2  |Channel 2 Captured Edge Selection\r
156      * |        |          |Input capture2 can detect falling edge change only, rising edge change only or both edge changes\r
157      * |        |          |00 = Detect rising edge only.\r
158      * |        |          |01 = Detect falling edge only.\r
159      * |        |          |1x = Detect both rising and falling edge.\r
160      * |[8]     |CAP0RLDEN |Capture Counteru2019s Reload Function Triggered by Event CAPTE0 Enable Bit\r
161      * |        |          |0 = The reload triggered by Event CAPTE0 Disabled.\r
162      * |        |          |1 = The reload triggered by Event CAPTE0 Enabled.\r
163      * |[9]     |CAP1RLDEN |Capture Counteru2019s Reload Function Triggered by Event CAPTE1 Enable Bit\r
164      * |        |          |0 = The reload triggered by Event CAPTE1 Disabled.\r
165      * |        |          |1 = The reload triggered by Event CAPTE1 Enabled.\r
166      * |[10]    |CAP2RLDEN |Capture Counteru2019s Reload Function Triggered by Event CAPTE2 Enable Bit\r
167      * |        |          |0 = The reload triggered by Event CAPTE2 Disabled.\r
168      * |        |          |1 = The reload triggered by Event CAPTE2 Enabled.\r
169      * |[11]    |OVRLDEN   |Capture Counteru2019s Reload Function Triggered by Overflow Enable Bit\r
170      * |        |          |0 = The reload triggered by CAPOV Disabled.\r
171      * |        |          |1 = The reload triggered by CAPOV Enabled.\r
172      * |[14:12] |CLKSEL    |Capture Timer Clock Divide Selection\r
173      * |        |          |The capture timer clock has a pre-divider with eight divided options controlled by CLKSEL[2:0].\r
174      * |        |          |000 = CAP_CLK/1.\r
175      * |        |          |001 = CAP_CLK/4.\r
176      * |        |          |010 = CAP_CLK/16.\r
177      * |        |          |011 = CAP_CLK/32.\r
178      * |        |          |100 = CAP_CLK/64.\r
179      * |        |          |101 = CAP_CLK/96.\r
180      * |        |          |110 = CAP_CLK/112.\r
181      * |        |          |111 = CAP_CLK/128.\r
182      * |[17:16] |CNTSRCSEL |Capture Timer/Counter Clock Source Selection\r
183      * |        |          |Select the capture timer/counter clock source.\r
184      * |        |          |00 = CAP_CLK (default).\r
185      * |        |          |01 = CAP0.\r
186      * |        |          |10 = CAP1.\r
187      * |        |          |11 = CAP2.\r
188      * |[20]    |CAP0CLREN |Capture Counter Cleared by Capture Event0 Control\r
189      * |        |          |0 = Event CAPTE0 can clear capture counter (ECAP_CNT) Disabled.\r
190      * |        |          |1 = Event CAPTE0 can clear capture counter (ECAP_CNT) Enabled.\r
191      * |[21]    |CAP1CLREN |Capture Counter Cleared by Capture Event1 Control\r
192      * |        |          |0 = Event CAPTE1 can clear capture counter (ECAP_CNT) Disabled.\r
193      * |        |          |1 = Event CAPTE1 can clear capture counter (ECAP_CNT) Enabled.\r
194      * |[22]    |CAP2CLREN |Capture Counter Cleared by Capture Event2 Control\r
195      * |        |          |0 = Event CAPTE2 can clear capture counter (ECAP_CNT) Disabled.\r
196      * |        |          |1 = Event CAPTE2 can clear capture counter (ECAP_CNT) Enabled.\r
197      * @var ECAP_T::STATUS\r
198      * Offset: 0x1C  Input Capture Status Register\r
199      * ---------------------------------------------------------------------------------------------------\r
200      * |Bits    |Field     |Descriptions\r
201      * | :----: | :----:   | :---- |\r
202      * |[0]     |CAPTF0    |Input Capture Channel 0 Triggered Flag\r
203      * |        |          |When the input capture channel 0 detects a valid edge change at CAP0 input, it will set flag CAPTF0 to high.\r
204      * |        |          |0 = No valid edge change has been detected at CAP0 input since last clear.\r
205      * |        |          |1 = At least a valid edge change has been detected at CAP0 input since last clear.\r
206      * |        |          |Note: This bit is only cleared by writing 1 to it.\r
207      * |[1]     |CAPTF1    |Input Capture Channel 1 Triggered Flag\r
208      * |        |          |When the input capture channel 1 detects a valid edge change at CAP1 input, it will set flag CAPTF1 to high.\r
209      * |        |          |0 = No valid edge change has been detected at CAP1 input since last clear.\r
210      * |        |          |1 = At least a valid edge change has been detected at CAP1 input since last clear.\r
211      * |        |          |Note: This bit is only cleared by writing 1 to it.\r
212      * |[2]     |CAPTF2    |Input Capture Channel 2 Triggered Flag\r
213      * |        |          |When the input capture channel 2 detects a valid edge change at CAP2 input, it will set flag CAPTF2 to high.\r
214      * |        |          |0 = No valid edge change has been detected at CAP2 input since last clear.\r
215      * |        |          |1 = At least a valid edge change has been detected at CAP2 input since last clear.\r
216      * |        |          |Note: This bit is only cleared by writing 1 to it.\r
217      * |[4]     |CAPCMPF   |Input Capture Compare-match Flag\r
218      * |        |          |If the input capture compare function is enabled, the flag is set by hardware when capture counter (ECAP_CNT) up counts and reaches the ECAP_CNTCMP value.\r
219      * |        |          |0 = ECAP_CNT has not matched ECAP_CNTCMP value since last clear.\r
220      * |        |          |1 = ECAP_CNT has matched ECAP_CNTCMP value at least once since last clear.\r
221      * |        |          |Note: This bit is only cleared by writing 1 to it.\r
222      * |[5]     |CAPOVF    |Input Capture Counter Overflow Flag\r
223      * |        |          |Flag is set by hardware when counter (ECAP_CNT) overflows from 0x00FF_FFFF to zero.\r
224      * |        |          |0 = No overflow event has occurred since last clear.\r
225      * |        |          |1 = Overflow event(s) has/have occurred since last clear.\r
226      * |        |          |Note: This bit is only cleared by writing 1 to it.\r
227      * |[6]     |CAP0      |Value of Input Channel 0, CAP0 (Read Only)\r
228      * |        |          |Reflecting the value of input channel 0, CAP0\r
229      * |        |          |(The bit is read only and write is ignored)\r
230      * |[7]     |CAP1      |Value of Input Channel 1, CAP1 (Read Only)\r
231      * |        |          |Reflecting the value of input channel 1, CAP1\r
232      * |        |          |(The bit is read only and write is ignored)\r
233      * |[8]     |CAP2      |Value of Input Channel 2, CAP2 (Read Only)\r
234      * |        |          |Reflecting the value of input channel 2, CAP2.\r
235      * |        |          |(The bit is read only and write is ignored)\r
236      */\r
237     __IO uint32_t CNT;                   /*!< [0x0000] Input Capture Counter                                            */\r
238     __IO uint32_t HLD0;                  /*!< [0x0004] Input Capture Hold Register 0                                    */\r
239     __IO uint32_t HLD1;                  /*!< [0x0008] Input Capture Hold Register 1                                    */\r
240     __IO uint32_t HLD2;                  /*!< [0x000c] Input Capture Hold Register 2                                    */\r
241     __IO uint32_t CNTCMP;                /*!< [0x0010] Input Capture Compare Register                                   */\r
242     __IO uint32_t CTL0;                  /*!< [0x0014] Input Capture Control Register 0                                 */\r
243     __IO uint32_t CTL1;                  /*!< [0x0018] Input Capture Control Register 1                                 */\r
244     __IO uint32_t STATUS;                /*!< [0x001c] Input Capture Status Register                                    */\r
245 \r
246 } ECAP_T;\r
247 \r
248 /**\r
249     @addtogroup ECAP_CONST ECAP Bit Field Definition\r
250     Constant Definitions for ECAP Controller\r
251 @{ */\r
252 \r
253 #define ECAP_CNT_CNT_Pos                 (0)                                               /*!< ECAP_T::CNT: CNT Position              */\r
254 #define ECAP_CNT_CNT_Msk                 (0xfffffful << ECAP_CNT_CNT_Pos)                  /*!< ECAP_T::CNT: CNT Mask                  */\r
255 \r
256 #define ECAP_HLD0_HOLD_Pos               (0)                                               /*!< ECAP_T::HLD0: HOLD Position            */\r
257 #define ECAP_HLD0_HOLD_Msk               (0xfffffful << ECAP_HLD0_HOLD_Pos)                /*!< ECAP_T::HLD0: HOLD Mask                */\r
258 \r
259 #define ECAP_HLD1_HOLD_Pos               (0)                                               /*!< ECAP_T::HLD1: HOLD Position            */\r
260 #define ECAP_HLD1_HOLD_Msk               (0xfffffful << ECAP_HLD1_HOLD_Pos)                /*!< ECAP_T::HLD1: HOLD Mask                */\r
261 \r
262 #define ECAP_HLD2_HOLD_Pos               (0)                                               /*!< ECAP_T::HLD2: HOLD Position            */\r
263 #define ECAP_HLD2_HOLD_Msk               (0xfffffful << ECAP_HLD2_HOLD_Pos)                /*!< ECAP_T::HLD2: HOLD Mask                */\r
264 \r
265 #define ECAP_CNTCMP_CNTCMP_Pos           (0)                                               /*!< ECAP_T::CNTCMP: CNTCMP Position        */\r
266 #define ECAP_CNTCMP_CNTCMP_Msk           (0xfffffful << ECAP_CNTCMP_CNTCMP_Pos)            /*!< ECAP_T::CNTCMP: CNTCMP Mask            */\r
267 \r
268 #define ECAP_CTL0_NFCLKSEL_Pos           (0)                                               /*!< ECAP_T::CTL0: NFCLKSEL Position        */\r
269 #define ECAP_CTL0_NFCLKSEL_Msk           (0x7ul << ECAP_CTL0_NFCLKSEL_Pos)                 /*!< ECAP_T::CTL0: NFCLKSEL Mask            */\r
270 \r
271 #define ECAP_CTL0_CAPNFDIS_Pos           (3)                                               /*!< ECAP_T::CTL0: CAPNFDIS Position        */\r
272 #define ECAP_CTL0_CAPNFDIS_Msk           (0x1ul << ECAP_CTL0_CAPNFDIS_Pos)                 /*!< ECAP_T::CTL0: CAPNFDIS Mask            */\r
273 \r
274 #define ECAP_CTL0_IC0EN_Pos              (4)                                               /*!< ECAP_T::CTL0: IC0EN Position           */\r
275 #define ECAP_CTL0_IC0EN_Msk              (0x1ul << ECAP_CTL0_IC0EN_Pos)                    /*!< ECAP_T::CTL0: IC0EN Mask               */\r
276 \r
277 #define ECAP_CTL0_IC1EN_Pos              (5)                                               /*!< ECAP_T::CTL0: IC1EN Position           */\r
278 #define ECAP_CTL0_IC1EN_Msk              (0x1ul << ECAP_CTL0_IC1EN_Pos)                    /*!< ECAP_T::CTL0: IC1EN Mask               */\r
279 \r
280 #define ECAP_CTL0_IC2EN_Pos              (6)                                               /*!< ECAP_T::CTL0: IC2EN Position           */\r
281 #define ECAP_CTL0_IC2EN_Msk              (0x1ul << ECAP_CTL0_IC2EN_Pos)                    /*!< ECAP_T::CTL0: IC2EN Mask               */\r
282 \r
283 #define ECAP_CTL0_CAPSEL0_Pos            (8)                                               /*!< ECAP_T::CTL0: CAPSEL0 Position         */\r
284 #define ECAP_CTL0_CAPSEL0_Msk            (0x3ul << ECAP_CTL0_CAPSEL0_Pos)                  /*!< ECAP_T::CTL0: CAPSEL0 Mask             */\r
285 \r
286 #define ECAP_CTL0_CAPSEL1_Pos            (10)                                              /*!< ECAP_T::CTL0: CAPSEL1 Position         */\r
287 #define ECAP_CTL0_CAPSEL1_Msk            (0x3ul << ECAP_CTL0_CAPSEL1_Pos)                  /*!< ECAP_T::CTL0: CAPSEL1 Mask             */\r
288 \r
289 #define ECAP_CTL0_CAPSEL2_Pos            (12)                                              /*!< ECAP_T::CTL0: CAPSEL2 Position         */\r
290 #define ECAP_CTL0_CAPSEL2_Msk            (0x3ul << ECAP_CTL0_CAPSEL2_Pos)                  /*!< ECAP_T::CTL0: CAPSEL2 Mask             */\r
291 \r
292 #define ECAP_CTL0_CAPIEN0_Pos            (16)                                              /*!< ECAP_T::CTL0: CAPIEN0 Position         */\r
293 #define ECAP_CTL0_CAPIEN0_Msk            (0x1ul << ECAP_CTL0_CAPIEN0_Pos)                  /*!< ECAP_T::CTL0: CAPIEN0 Mask             */\r
294 \r
295 #define ECAP_CTL0_CAPIEN1_Pos            (17)                                              /*!< ECAP_T::CTL0: CAPIEN1 Position         */\r
296 #define ECAP_CTL0_CAPIEN1_Msk            (0x1ul << ECAP_CTL0_CAPIEN1_Pos)                  /*!< ECAP_T::CTL0: CAPIEN1 Mask             */\r
297 \r
298 #define ECAP_CTL0_CAPIEN2_Pos            (18)                                              /*!< ECAP_T::CTL0: CAPIEN2 Position         */\r
299 #define ECAP_CTL0_CAPIEN2_Msk            (0x1ul << ECAP_CTL0_CAPIEN2_Pos)                  /*!< ECAP_T::CTL0: CAPIEN2 Mask             */\r
300 \r
301 #define ECAP_CTL0_OVIEN_Pos              (20)                                              /*!< ECAP_T::CTL0: OVIEN Position           */\r
302 #define ECAP_CTL0_OVIEN_Msk              (0x1ul << ECAP_CTL0_OVIEN_Pos)                    /*!< ECAP_T::CTL0: OVIEN Mask               */\r
303 \r
304 #define ECAP_CTL0_CMPIEN_Pos             (21)                                              /*!< ECAP_T::CTL0: CMPIEN Position          */\r
305 #define ECAP_CTL0_CMPIEN_Msk             (0x1ul << ECAP_CTL0_CMPIEN_Pos)                   /*!< ECAP_T::CTL0: CMPIEN Mask              */\r
306 \r
307 #define ECAP_CTL0_CNTEN_Pos              (24)                                              /*!< ECAP_T::CTL0: CNTEN Position           */\r
308 #define ECAP_CTL0_CNTEN_Msk              (0x1ul << ECAP_CTL0_CNTEN_Pos)                    /*!< ECAP_T::CTL0: CNTEN Mask               */\r
309 \r
310 #define ECAP_CTL0_CMPCLREN_Pos           (25)                                              /*!< ECAP_T::CTL0: CMPCLREN Position        */\r
311 #define ECAP_CTL0_CMPCLREN_Msk           (0x1ul << ECAP_CTL0_CMPCLREN_Pos)                 /*!< ECAP_T::CTL0: CMPCLREN Mask            */\r
312 \r
313 #define ECAP_CTL0_CMPEN_Pos              (28)                                              /*!< ECAP_T::CTL0: CMPEN Position           */\r
314 #define ECAP_CTL0_CMPEN_Msk              (0x1ul << ECAP_CTL0_CMPEN_Pos)                    /*!< ECAP_T::CTL0: CMPEN Mask               */\r
315 \r
316 #define ECAP_CTL0_CAPEN_Pos              (29)                                              /*!< ECAP_T::CTL0: CAPEN Position           */\r
317 #define ECAP_CTL0_CAPEN_Msk              (0x1ul << ECAP_CTL0_CAPEN_Pos)                    /*!< ECAP_T::CTL0: CAPEN Mask               */\r
318 \r
319 #define ECAP_CTL1_EDGESEL0_Pos           (0)                                               /*!< ECAP_T::CTL1: EDGESEL0 Position        */\r
320 #define ECAP_CTL1_EDGESEL0_Msk           (0x3ul << ECAP_CTL1_EDGESEL0_Pos)                 /*!< ECAP_T::CTL1: EDGESEL0 Mask            */\r
321 \r
322 #define ECAP_CTL1_EDGESEL1_Pos           (2)                                               /*!< ECAP_T::CTL1: EDGESEL1 Position        */\r
323 #define ECAP_CTL1_EDGESEL1_Msk           (0x3ul << ECAP_CTL1_EDGESEL1_Pos)                 /*!< ECAP_T::CTL1: EDGESEL1 Mask            */\r
324 \r
325 #define ECAP_CTL1_EDGESEL2_Pos           (4)                                               /*!< ECAP_T::CTL1: EDGESEL2 Position        */\r
326 #define ECAP_CTL1_EDGESEL2_Msk           (0x3ul << ECAP_CTL1_EDGESEL2_Pos)                 /*!< ECAP_T::CTL1: EDGESEL2 Mask            */\r
327 \r
328 #define ECAP_CTL1_CAP0RLDEN_Pos          (8)                                               /*!< ECAP_T::CTL1: CAP0RLDEN Position       */\r
329 #define ECAP_CTL1_CAP0RLDEN_Msk          (0x1ul << ECAP_CTL1_CAP0RLDEN_Pos)                /*!< ECAP_T::CTL1: CAP0RLDEN Mask           */\r
330 \r
331 #define ECAP_CTL1_CAP1RLDEN_Pos          (9)                                               /*!< ECAP_T::CTL1: CAP1RLDEN Position       */\r
332 #define ECAP_CTL1_CAP1RLDEN_Msk          (0x1ul << ECAP_CTL1_CAP1RLDEN_Pos)                /*!< ECAP_T::CTL1: CAP1RLDEN Mask           */\r
333 \r
334 #define ECAP_CTL1_CAP2RLDEN_Pos          (10)                                              /*!< ECAP_T::CTL1: CAP2RLDEN Position       */\r
335 #define ECAP_CTL1_CAP2RLDEN_Msk          (0x1ul << ECAP_CTL1_CAP2RLDEN_Pos)                /*!< ECAP_T::CTL1: CAP2RLDEN Mask           */\r
336 \r
337 #define ECAP_CTL1_OVRLDEN_Pos            (11)                                              /*!< ECAP_T::CTL1: OVRLDEN Position         */\r
338 #define ECAP_CTL1_OVRLDEN_Msk            (0x1ul << ECAP_CTL1_OVRLDEN_Pos)                  /*!< ECAP_T::CTL1: OVRLDEN Mask             */\r
339 \r
340 #define ECAP_CTL1_CLKSEL_Pos             (12)                                              /*!< ECAP_T::CTL1: CLKSEL Position          */\r
341 #define ECAP_CTL1_CLKSEL_Msk             (0x7ul << ECAP_CTL1_CLKSEL_Pos)                   /*!< ECAP_T::CTL1: CLKSEL Mask              */\r
342 \r
343 #define ECAP_CTL1_CNTSRCSEL_Pos          (16)                                              /*!< ECAP_T::CTL1: CNTSRCSEL Position       */\r
344 #define ECAP_CTL1_CNTSRCSEL_Msk          (0x3ul << ECAP_CTL1_CNTSRCSEL_Pos)                /*!< ECAP_T::CTL1: CNTSRCSEL Mask           */\r
345 \r
346 #define ECAP_CTL1_CAP0CLREN_Pos          (20)                                              /*!< ECAP_T::CTL1: CAP0CLREN Position       */\r
347 #define ECAP_CTL1_CAP0CLREN_Msk          (0x1ul << ECAP_CTL1_CAP0CLREN_Pos)                /*!< ECAP_T::CTL1: CAP0CLREN Mask           */\r
348 \r
349 #define ECAP_CTL1_CAP1CLREN_Pos          (21)                                              /*!< ECAP_T::CTL1: CAP1CLREN Position       */\r
350 #define ECAP_CTL1_CAP1CLREN_Msk          (0x1ul << ECAP_CTL1_CAP1CLREN_Pos)                /*!< ECAP_T::CTL1: CAP1CLREN Mask           */\r
351 \r
352 #define ECAP_CTL1_CAP2CLREN_Pos          (22)                                              /*!< ECAP_T::CTL1: CAP2CLREN Position       */\r
353 #define ECAP_CTL1_CAP2CLREN_Msk          (0x1ul << ECAP_CTL1_CAP2CLREN_Pos)                /*!< ECAP_T::CTL1: CAP2CLREN Mask           */\r
354 \r
355 #define ECAP_STATUS_CAPTF0_Pos           (0)                                               /*!< ECAP_T::STATUS: CAPTF0 Position        */\r
356 #define ECAP_STATUS_CAPTF0_Msk           (0x1ul << ECAP_STATUS_CAPTF0_Pos)                 /*!< ECAP_T::STATUS: CAPTF0 Mask            */\r
357 \r
358 #define ECAP_STATUS_CAPTF1_Pos           (1)                                               /*!< ECAP_T::STATUS: CAPTF1 Position        */\r
359 #define ECAP_STATUS_CAPTF1_Msk           (0x1ul << ECAP_STATUS_CAPTF1_Pos)                 /*!< ECAP_T::STATUS: CAPTF1 Mask            */\r
360 \r
361 #define ECAP_STATUS_CAPTF2_Pos           (2)                                               /*!< ECAP_T::STATUS: CAPTF2 Position        */\r
362 #define ECAP_STATUS_CAPTF2_Msk           (0x1ul << ECAP_STATUS_CAPTF2_Pos)                 /*!< ECAP_T::STATUS: CAPTF2 Mask            */\r
363 \r
364 #define ECAP_STATUS_CAPCMPF_Pos          (4)                                               /*!< ECAP_T::STATUS: CAPCMPF Position       */\r
365 #define ECAP_STATUS_CAPCMPF_Msk          (0x1ul << ECAP_STATUS_CAPCMPF_Pos)                /*!< ECAP_T::STATUS: CAPCMPF Mask           */\r
366 \r
367 #define ECAP_STATUS_CAPOVF_Pos           (5)                                               /*!< ECAP_T::STATUS: CAPOVF Position        */\r
368 #define ECAP_STATUS_CAPOVF_Msk           (0x1ul << ECAP_STATUS_CAPOVF_Pos)                 /*!< ECAP_T::STATUS: CAPOVF Mask            */\r
369 \r
370 #define ECAP_STATUS_CAP0_Pos             (8)                                               /*!< ECAP_T::STATUS: CAP0 Position          */\r
371 #define ECAP_STATUS_CAP0_Msk             (0x1ul << ECAP_STATUS_CAP0_Pos)                   /*!< ECAP_T::STATUS: CAP0 Mask              */\r
372 \r
373 #define ECAP_STATUS_CAP1_Pos             (9)                                               /*!< ECAP_T::STATUS: CAP1 Position          */\r
374 #define ECAP_STATUS_CAP1_Msk             (0x1ul << ECAP_STATUS_CAP1_Pos)                   /*!< ECAP_T::STATUS: CAP1 Mask              */\r
375 \r
376 #define ECAP_STATUS_CAP2_Pos             (10)                                              /*!< ECAP_T::STATUS: CAP2 Position          */\r
377 #define ECAP_STATUS_CAP2_Msk             (0x1ul << ECAP_STATUS_CAP2_Pos)                   /*!< ECAP_T::STATUS: CAP2 Mask              */\r
378 \r
379 /**@}*/ /* ECAP_CONST */\r
380 /**@}*/ /* end of ECAP register group */\r
381 /**@}*/ /* end of REGISTER group */\r
382 \r
383 \r
384 #endif /* __ECAP_REG_H__ */\r