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