1#[doc = "Register `EVCTRL` reader"]
2pub struct R(crate::R<EVCTRL_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<EVCTRL_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<EVCTRL_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<EVCTRL_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `EVCTRL` writer"]
17pub struct W(crate::W<EVCTRL_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<EVCTRL_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<EVCTRL_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<EVCTRL_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `EVACT0` reader - Timer/counter Input Event0 Action"]
38pub type EVACT0_R = crate::FieldReader<u8, EVACT0SELECT_A>;
39#[doc = "Timer/counter Input Event0 Action\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41#[repr(u8)]
42pub enum EVACT0SELECT_A {
43 #[doc = "0: Event action disabled"]
44 OFF = 0,
45 #[doc = "1: Start, restart or re-trigger counter on event"]
46 RETRIGGER = 1,
47 #[doc = "2: Count on event"]
48 COUNTEV = 2,
49 #[doc = "3: Start counter on event"]
50 START = 3,
51 #[doc = "4: Increment counter on event"]
52 INC = 4,
53 #[doc = "5: Count on active state of asynchronous event"]
54 COUNT = 5,
55 #[doc = "6: Stamp capture"]
56 STAMP = 6,
57 #[doc = "7: Non-recoverable fault"]
58 FAULT = 7,
59}
60impl From<EVACT0SELECT_A> for u8 {
61 #[inline(always)]
62 fn from(variant: EVACT0SELECT_A) -> Self {
63 variant as _
64 }
65}
66impl EVACT0_R {
67 #[doc = "Get enumerated values variant"]
68 #[inline(always)]
69 pub fn variant(&self) -> EVACT0SELECT_A {
70 match self.bits {
71 0 => EVACT0SELECT_A::OFF,
72 1 => EVACT0SELECT_A::RETRIGGER,
73 2 => EVACT0SELECT_A::COUNTEV,
74 3 => EVACT0SELECT_A::START,
75 4 => EVACT0SELECT_A::INC,
76 5 => EVACT0SELECT_A::COUNT,
77 6 => EVACT0SELECT_A::STAMP,
78 7 => EVACT0SELECT_A::FAULT,
79 _ => unreachable!(),
80 }
81 }
82 #[doc = "Checks if the value of the field is `OFF`"]
83 #[inline(always)]
84 pub fn is_off(&self) -> bool {
85 *self == EVACT0SELECT_A::OFF
86 }
87 #[doc = "Checks if the value of the field is `RETRIGGER`"]
88 #[inline(always)]
89 pub fn is_retrigger(&self) -> bool {
90 *self == EVACT0SELECT_A::RETRIGGER
91 }
92 #[doc = "Checks if the value of the field is `COUNTEV`"]
93 #[inline(always)]
94 pub fn is_countev(&self) -> bool {
95 *self == EVACT0SELECT_A::COUNTEV
96 }
97 #[doc = "Checks if the value of the field is `START`"]
98 #[inline(always)]
99 pub fn is_start(&self) -> bool {
100 *self == EVACT0SELECT_A::START
101 }
102 #[doc = "Checks if the value of the field is `INC`"]
103 #[inline(always)]
104 pub fn is_inc(&self) -> bool {
105 *self == EVACT0SELECT_A::INC
106 }
107 #[doc = "Checks if the value of the field is `COUNT`"]
108 #[inline(always)]
109 pub fn is_count(&self) -> bool {
110 *self == EVACT0SELECT_A::COUNT
111 }
112 #[doc = "Checks if the value of the field is `STAMP`"]
113 #[inline(always)]
114 pub fn is_stamp(&self) -> bool {
115 *self == EVACT0SELECT_A::STAMP
116 }
117 #[doc = "Checks if the value of the field is `FAULT`"]
118 #[inline(always)]
119 pub fn is_fault(&self) -> bool {
120 *self == EVACT0SELECT_A::FAULT
121 }
122}
123#[doc = "Field `EVACT0` writer - Timer/counter Input Event0 Action"]
124pub type EVACT0_W<'a, const O: u8> =
125 crate::FieldWriterSafe<'a, u32, EVCTRL_SPEC, u8, EVACT0SELECT_A, 3, O>;
126impl<'a, const O: u8> EVACT0_W<'a, O> {
127 #[doc = "Event action disabled"]
128 #[inline(always)]
129 pub fn off(self) -> &'a mut W {
130 self.variant(EVACT0SELECT_A::OFF)
131 }
132 #[doc = "Start, restart or re-trigger counter on event"]
133 #[inline(always)]
134 pub fn retrigger(self) -> &'a mut W {
135 self.variant(EVACT0SELECT_A::RETRIGGER)
136 }
137 #[doc = "Count on event"]
138 #[inline(always)]
139 pub fn countev(self) -> &'a mut W {
140 self.variant(EVACT0SELECT_A::COUNTEV)
141 }
142 #[doc = "Start counter on event"]
143 #[inline(always)]
144 pub fn start(self) -> &'a mut W {
145 self.variant(EVACT0SELECT_A::START)
146 }
147 #[doc = "Increment counter on event"]
148 #[inline(always)]
149 pub fn inc(self) -> &'a mut W {
150 self.variant(EVACT0SELECT_A::INC)
151 }
152 #[doc = "Count on active state of asynchronous event"]
153 #[inline(always)]
154 pub fn count(self) -> &'a mut W {
155 self.variant(EVACT0SELECT_A::COUNT)
156 }
157 #[doc = "Stamp capture"]
158 #[inline(always)]
159 pub fn stamp(self) -> &'a mut W {
160 self.variant(EVACT0SELECT_A::STAMP)
161 }
162 #[doc = "Non-recoverable fault"]
163 #[inline(always)]
164 pub fn fault(self) -> &'a mut W {
165 self.variant(EVACT0SELECT_A::FAULT)
166 }
167}
168#[doc = "Field `EVACT1` reader - Timer/counter Input Event1 Action"]
169pub type EVACT1_R = crate::FieldReader<u8, EVACT1SELECT_A>;
170#[doc = "Timer/counter Input Event1 Action\n\nValue on reset: 0"]
171#[derive(Clone, Copy, Debug, PartialEq, Eq)]
172#[repr(u8)]
173pub enum EVACT1SELECT_A {
174 #[doc = "0: Event action disabled"]
175 OFF = 0,
176 #[doc = "1: Re-trigger counter on event"]
177 RETRIGGER = 1,
178 #[doc = "2: Direction control"]
179 DIR = 2,
180 #[doc = "3: Stop counter on event"]
181 STOP = 3,
182 #[doc = "4: Decrement counter on event"]
183 DEC = 4,
184 #[doc = "5: Period capture value in CC0 register, pulse width capture value in CC1 register"]
185 PPW = 5,
186 #[doc = "6: Period capture value in CC1 register, pulse width capture value in CC0 register"]
187 PWP = 6,
188 #[doc = "7: Non-recoverable fault"]
189 FAULT = 7,
190}
191impl From<EVACT1SELECT_A> for u8 {
192 #[inline(always)]
193 fn from(variant: EVACT1SELECT_A) -> Self {
194 variant as _
195 }
196}
197impl EVACT1_R {
198 #[doc = "Get enumerated values variant"]
199 #[inline(always)]
200 pub fn variant(&self) -> EVACT1SELECT_A {
201 match self.bits {
202 0 => EVACT1SELECT_A::OFF,
203 1 => EVACT1SELECT_A::RETRIGGER,
204 2 => EVACT1SELECT_A::DIR,
205 3 => EVACT1SELECT_A::STOP,
206 4 => EVACT1SELECT_A::DEC,
207 5 => EVACT1SELECT_A::PPW,
208 6 => EVACT1SELECT_A::PWP,
209 7 => EVACT1SELECT_A::FAULT,
210 _ => unreachable!(),
211 }
212 }
213 #[doc = "Checks if the value of the field is `OFF`"]
214 #[inline(always)]
215 pub fn is_off(&self) -> bool {
216 *self == EVACT1SELECT_A::OFF
217 }
218 #[doc = "Checks if the value of the field is `RETRIGGER`"]
219 #[inline(always)]
220 pub fn is_retrigger(&self) -> bool {
221 *self == EVACT1SELECT_A::RETRIGGER
222 }
223 #[doc = "Checks if the value of the field is `DIR`"]
224 #[inline(always)]
225 pub fn is_dir(&self) -> bool {
226 *self == EVACT1SELECT_A::DIR
227 }
228 #[doc = "Checks if the value of the field is `STOP`"]
229 #[inline(always)]
230 pub fn is_stop(&self) -> bool {
231 *self == EVACT1SELECT_A::STOP
232 }
233 #[doc = "Checks if the value of the field is `DEC`"]
234 #[inline(always)]
235 pub fn is_dec(&self) -> bool {
236 *self == EVACT1SELECT_A::DEC
237 }
238 #[doc = "Checks if the value of the field is `PPW`"]
239 #[inline(always)]
240 pub fn is_ppw(&self) -> bool {
241 *self == EVACT1SELECT_A::PPW
242 }
243 #[doc = "Checks if the value of the field is `PWP`"]
244 #[inline(always)]
245 pub fn is_pwp(&self) -> bool {
246 *self == EVACT1SELECT_A::PWP
247 }
248 #[doc = "Checks if the value of the field is `FAULT`"]
249 #[inline(always)]
250 pub fn is_fault(&self) -> bool {
251 *self == EVACT1SELECT_A::FAULT
252 }
253}
254#[doc = "Field `EVACT1` writer - Timer/counter Input Event1 Action"]
255pub type EVACT1_W<'a, const O: u8> =
256 crate::FieldWriterSafe<'a, u32, EVCTRL_SPEC, u8, EVACT1SELECT_A, 3, O>;
257impl<'a, const O: u8> EVACT1_W<'a, O> {
258 #[doc = "Event action disabled"]
259 #[inline(always)]
260 pub fn off(self) -> &'a mut W {
261 self.variant(EVACT1SELECT_A::OFF)
262 }
263 #[doc = "Re-trigger counter on event"]
264 #[inline(always)]
265 pub fn retrigger(self) -> &'a mut W {
266 self.variant(EVACT1SELECT_A::RETRIGGER)
267 }
268 #[doc = "Direction control"]
269 #[inline(always)]
270 pub fn dir(self) -> &'a mut W {
271 self.variant(EVACT1SELECT_A::DIR)
272 }
273 #[doc = "Stop counter on event"]
274 #[inline(always)]
275 pub fn stop(self) -> &'a mut W {
276 self.variant(EVACT1SELECT_A::STOP)
277 }
278 #[doc = "Decrement counter on event"]
279 #[inline(always)]
280 pub fn dec(self) -> &'a mut W {
281 self.variant(EVACT1SELECT_A::DEC)
282 }
283 #[doc = "Period capture value in CC0 register, pulse width capture value in CC1 register"]
284 #[inline(always)]
285 pub fn ppw(self) -> &'a mut W {
286 self.variant(EVACT1SELECT_A::PPW)
287 }
288 #[doc = "Period capture value in CC1 register, pulse width capture value in CC0 register"]
289 #[inline(always)]
290 pub fn pwp(self) -> &'a mut W {
291 self.variant(EVACT1SELECT_A::PWP)
292 }
293 #[doc = "Non-recoverable fault"]
294 #[inline(always)]
295 pub fn fault(self) -> &'a mut W {
296 self.variant(EVACT1SELECT_A::FAULT)
297 }
298}
299#[doc = "Field `CNTSEL` reader - Timer/counter Output Event Mode"]
300pub type CNTSEL_R = crate::FieldReader<u8, CNTSELSELECT_A>;
301#[doc = "Timer/counter Output Event Mode\n\nValue on reset: 0"]
302#[derive(Clone, Copy, Debug, PartialEq, Eq)]
303#[repr(u8)]
304pub enum CNTSELSELECT_A {
305 #[doc = "0: An interrupt/event is generated when a new counter cycle starts"]
306 START = 0,
307 #[doc = "1: An interrupt/event is generated when a counter cycle ends"]
308 END = 1,
309 #[doc = "2: An interrupt/event is generated when a counter cycle ends, except for the first and last cycles"]
310 BETWEEN = 2,
311 #[doc = "3: An interrupt/event is generated when a new counter cycle starts or a counter cycle ends"]
312 BOUNDARY = 3,
313}
314impl From<CNTSELSELECT_A> for u8 {
315 #[inline(always)]
316 fn from(variant: CNTSELSELECT_A) -> Self {
317 variant as _
318 }
319}
320impl CNTSEL_R {
321 #[doc = "Get enumerated values variant"]
322 #[inline(always)]
323 pub fn variant(&self) -> CNTSELSELECT_A {
324 match self.bits {
325 0 => CNTSELSELECT_A::START,
326 1 => CNTSELSELECT_A::END,
327 2 => CNTSELSELECT_A::BETWEEN,
328 3 => CNTSELSELECT_A::BOUNDARY,
329 _ => unreachable!(),
330 }
331 }
332 #[doc = "Checks if the value of the field is `START`"]
333 #[inline(always)]
334 pub fn is_start(&self) -> bool {
335 *self == CNTSELSELECT_A::START
336 }
337 #[doc = "Checks if the value of the field is `END`"]
338 #[inline(always)]
339 pub fn is_end(&self) -> bool {
340 *self == CNTSELSELECT_A::END
341 }
342 #[doc = "Checks if the value of the field is `BETWEEN`"]
343 #[inline(always)]
344 pub fn is_between(&self) -> bool {
345 *self == CNTSELSELECT_A::BETWEEN
346 }
347 #[doc = "Checks if the value of the field is `BOUNDARY`"]
348 #[inline(always)]
349 pub fn is_boundary(&self) -> bool {
350 *self == CNTSELSELECT_A::BOUNDARY
351 }
352}
353#[doc = "Field `CNTSEL` writer - Timer/counter Output Event Mode"]
354pub type CNTSEL_W<'a, const O: u8> =
355 crate::FieldWriterSafe<'a, u32, EVCTRL_SPEC, u8, CNTSELSELECT_A, 2, O>;
356impl<'a, const O: u8> CNTSEL_W<'a, O> {
357 #[doc = "An interrupt/event is generated when a new counter cycle starts"]
358 #[inline(always)]
359 pub fn start(self) -> &'a mut W {
360 self.variant(CNTSELSELECT_A::START)
361 }
362 #[doc = "An interrupt/event is generated when a counter cycle ends"]
363 #[inline(always)]
364 pub fn end(self) -> &'a mut W {
365 self.variant(CNTSELSELECT_A::END)
366 }
367 #[doc = "An interrupt/event is generated when a counter cycle ends, except for the first and last cycles"]
368 #[inline(always)]
369 pub fn between(self) -> &'a mut W {
370 self.variant(CNTSELSELECT_A::BETWEEN)
371 }
372 #[doc = "An interrupt/event is generated when a new counter cycle starts or a counter cycle ends"]
373 #[inline(always)]
374 pub fn boundary(self) -> &'a mut W {
375 self.variant(CNTSELSELECT_A::BOUNDARY)
376 }
377}
378#[doc = "Field `OVFEO` reader - Overflow/Underflow Output Event Enable"]
379pub type OVFEO_R = crate::BitReader<bool>;
380#[doc = "Field `OVFEO` writer - Overflow/Underflow Output Event Enable"]
381pub type OVFEO_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVCTRL_SPEC, bool, O>;
382#[doc = "Field `TRGEO` reader - Retrigger Output Event Enable"]
383pub type TRGEO_R = crate::BitReader<bool>;
384#[doc = "Field `TRGEO` writer - Retrigger Output Event Enable"]
385pub type TRGEO_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVCTRL_SPEC, bool, O>;
386#[doc = "Field `CNTEO` reader - Timer/counter Output Event Enable"]
387pub type CNTEO_R = crate::BitReader<bool>;
388#[doc = "Field `CNTEO` writer - Timer/counter Output Event Enable"]
389pub type CNTEO_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVCTRL_SPEC, bool, O>;
390#[doc = "Field `TCINV0` reader - Inverted Event 0 Input Enable"]
391pub type TCINV0_R = crate::BitReader<bool>;
392#[doc = "Field `TCINV0` writer - Inverted Event 0 Input Enable"]
393pub type TCINV0_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVCTRL_SPEC, bool, O>;
394#[doc = "Field `TCINV1` reader - Inverted Event 1 Input Enable"]
395pub type TCINV1_R = crate::BitReader<bool>;
396#[doc = "Field `TCINV1` writer - Inverted Event 1 Input Enable"]
397pub type TCINV1_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVCTRL_SPEC, bool, O>;
398#[doc = "Field `TCEI0` reader - Timer/counter Event 0 Input Enable"]
399pub type TCEI0_R = crate::BitReader<bool>;
400#[doc = "Field `TCEI0` writer - Timer/counter Event 0 Input Enable"]
401pub type TCEI0_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVCTRL_SPEC, bool, O>;
402#[doc = "Field `TCEI1` reader - Timer/counter Event 1 Input Enable"]
403pub type TCEI1_R = crate::BitReader<bool>;
404#[doc = "Field `TCEI1` writer - Timer/counter Event 1 Input Enable"]
405pub type TCEI1_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVCTRL_SPEC, bool, O>;
406#[doc = "Field `MCEI0` reader - Match or Capture Channel 0 Event Input Enable"]
407pub type MCEI0_R = crate::BitReader<bool>;
408#[doc = "Field `MCEI0` writer - Match or Capture Channel 0 Event Input Enable"]
409pub type MCEI0_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVCTRL_SPEC, bool, O>;
410#[doc = "Field `MCEI1` reader - Match or Capture Channel 1 Event Input Enable"]
411pub type MCEI1_R = crate::BitReader<bool>;
412#[doc = "Field `MCEI1` writer - Match or Capture Channel 1 Event Input Enable"]
413pub type MCEI1_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVCTRL_SPEC, bool, O>;
414#[doc = "Field `MCEI2` reader - Match or Capture Channel 2 Event Input Enable"]
415pub type MCEI2_R = crate::BitReader<bool>;
416#[doc = "Field `MCEI2` writer - Match or Capture Channel 2 Event Input Enable"]
417pub type MCEI2_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVCTRL_SPEC, bool, O>;
418#[doc = "Field `MCEI3` reader - Match or Capture Channel 3 Event Input Enable"]
419pub type MCEI3_R = crate::BitReader<bool>;
420#[doc = "Field `MCEI3` writer - Match or Capture Channel 3 Event Input Enable"]
421pub type MCEI3_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVCTRL_SPEC, bool, O>;
422#[doc = "Field `MCEO0` reader - Match or Capture Channel 0 Event Output Enable"]
423pub type MCEO0_R = crate::BitReader<bool>;
424#[doc = "Field `MCEO0` writer - Match or Capture Channel 0 Event Output Enable"]
425pub type MCEO0_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVCTRL_SPEC, bool, O>;
426#[doc = "Field `MCEO1` reader - Match or Capture Channel 1 Event Output Enable"]
427pub type MCEO1_R = crate::BitReader<bool>;
428#[doc = "Field `MCEO1` writer - Match or Capture Channel 1 Event Output Enable"]
429pub type MCEO1_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVCTRL_SPEC, bool, O>;
430#[doc = "Field `MCEO2` reader - Match or Capture Channel 2 Event Output Enable"]
431pub type MCEO2_R = crate::BitReader<bool>;
432#[doc = "Field `MCEO2` writer - Match or Capture Channel 2 Event Output Enable"]
433pub type MCEO2_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVCTRL_SPEC, bool, O>;
434#[doc = "Field `MCEO3` reader - Match or Capture Channel 3 Event Output Enable"]
435pub type MCEO3_R = crate::BitReader<bool>;
436#[doc = "Field `MCEO3` writer - Match or Capture Channel 3 Event Output Enable"]
437pub type MCEO3_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVCTRL_SPEC, bool, O>;
438impl R {
439 #[doc = "Bits 0:2 - Timer/counter Input Event0 Action"]
440 #[inline(always)]
441 pub fn evact0(&self) -> EVACT0_R {
442 EVACT0_R::new((self.bits & 7) as u8)
443 }
444 #[doc = "Bits 3:5 - Timer/counter Input Event1 Action"]
445 #[inline(always)]
446 pub fn evact1(&self) -> EVACT1_R {
447 EVACT1_R::new(((self.bits >> 3) & 7) as u8)
448 }
449 #[doc = "Bits 6:7 - Timer/counter Output Event Mode"]
450 #[inline(always)]
451 pub fn cntsel(&self) -> CNTSEL_R {
452 CNTSEL_R::new(((self.bits >> 6) & 3) as u8)
453 }
454 #[doc = "Bit 8 - Overflow/Underflow Output Event Enable"]
455 #[inline(always)]
456 pub fn ovfeo(&self) -> OVFEO_R {
457 OVFEO_R::new(((self.bits >> 8) & 1) != 0)
458 }
459 #[doc = "Bit 9 - Retrigger Output Event Enable"]
460 #[inline(always)]
461 pub fn trgeo(&self) -> TRGEO_R {
462 TRGEO_R::new(((self.bits >> 9) & 1) != 0)
463 }
464 #[doc = "Bit 10 - Timer/counter Output Event Enable"]
465 #[inline(always)]
466 pub fn cnteo(&self) -> CNTEO_R {
467 CNTEO_R::new(((self.bits >> 10) & 1) != 0)
468 }
469 #[doc = "Bit 12 - Inverted Event 0 Input Enable"]
470 #[inline(always)]
471 pub fn tcinv0(&self) -> TCINV0_R {
472 TCINV0_R::new(((self.bits >> 12) & 1) != 0)
473 }
474 #[doc = "Bit 13 - Inverted Event 1 Input Enable"]
475 #[inline(always)]
476 pub fn tcinv1(&self) -> TCINV1_R {
477 TCINV1_R::new(((self.bits >> 13) & 1) != 0)
478 }
479 #[doc = "Bit 14 - Timer/counter Event 0 Input Enable"]
480 #[inline(always)]
481 pub fn tcei0(&self) -> TCEI0_R {
482 TCEI0_R::new(((self.bits >> 14) & 1) != 0)
483 }
484 #[doc = "Bit 15 - Timer/counter Event 1 Input Enable"]
485 #[inline(always)]
486 pub fn tcei1(&self) -> TCEI1_R {
487 TCEI1_R::new(((self.bits >> 15) & 1) != 0)
488 }
489 #[doc = "Bit 16 - Match or Capture Channel 0 Event Input Enable"]
490 #[inline(always)]
491 pub fn mcei0(&self) -> MCEI0_R {
492 MCEI0_R::new(((self.bits >> 16) & 1) != 0)
493 }
494 #[doc = "Bit 17 - Match or Capture Channel 1 Event Input Enable"]
495 #[inline(always)]
496 pub fn mcei1(&self) -> MCEI1_R {
497 MCEI1_R::new(((self.bits >> 17) & 1) != 0)
498 }
499 #[doc = "Bit 18 - Match or Capture Channel 2 Event Input Enable"]
500 #[inline(always)]
501 pub fn mcei2(&self) -> MCEI2_R {
502 MCEI2_R::new(((self.bits >> 18) & 1) != 0)
503 }
504 #[doc = "Bit 19 - Match or Capture Channel 3 Event Input Enable"]
505 #[inline(always)]
506 pub fn mcei3(&self) -> MCEI3_R {
507 MCEI3_R::new(((self.bits >> 19) & 1) != 0)
508 }
509 #[doc = "Bit 24 - Match or Capture Channel 0 Event Output Enable"]
510 #[inline(always)]
511 pub fn mceo0(&self) -> MCEO0_R {
512 MCEO0_R::new(((self.bits >> 24) & 1) != 0)
513 }
514 #[doc = "Bit 25 - Match or Capture Channel 1 Event Output Enable"]
515 #[inline(always)]
516 pub fn mceo1(&self) -> MCEO1_R {
517 MCEO1_R::new(((self.bits >> 25) & 1) != 0)
518 }
519 #[doc = "Bit 26 - Match or Capture Channel 2 Event Output Enable"]
520 #[inline(always)]
521 pub fn mceo2(&self) -> MCEO2_R {
522 MCEO2_R::new(((self.bits >> 26) & 1) != 0)
523 }
524 #[doc = "Bit 27 - Match or Capture Channel 3 Event Output Enable"]
525 #[inline(always)]
526 pub fn mceo3(&self) -> MCEO3_R {
527 MCEO3_R::new(((self.bits >> 27) & 1) != 0)
528 }
529}
530impl W {
531 #[doc = "Bits 0:2 - Timer/counter Input Event0 Action"]
532 #[inline(always)]
533 #[must_use]
534 pub fn evact0(&mut self) -> EVACT0_W<0> {
535 EVACT0_W::new(self)
536 }
537 #[doc = "Bits 3:5 - Timer/counter Input Event1 Action"]
538 #[inline(always)]
539 #[must_use]
540 pub fn evact1(&mut self) -> EVACT1_W<3> {
541 EVACT1_W::new(self)
542 }
543 #[doc = "Bits 6:7 - Timer/counter Output Event Mode"]
544 #[inline(always)]
545 #[must_use]
546 pub fn cntsel(&mut self) -> CNTSEL_W<6> {
547 CNTSEL_W::new(self)
548 }
549 #[doc = "Bit 8 - Overflow/Underflow Output Event Enable"]
550 #[inline(always)]
551 #[must_use]
552 pub fn ovfeo(&mut self) -> OVFEO_W<8> {
553 OVFEO_W::new(self)
554 }
555 #[doc = "Bit 9 - Retrigger Output Event Enable"]
556 #[inline(always)]
557 #[must_use]
558 pub fn trgeo(&mut self) -> TRGEO_W<9> {
559 TRGEO_W::new(self)
560 }
561 #[doc = "Bit 10 - Timer/counter Output Event Enable"]
562 #[inline(always)]
563 #[must_use]
564 pub fn cnteo(&mut self) -> CNTEO_W<10> {
565 CNTEO_W::new(self)
566 }
567 #[doc = "Bit 12 - Inverted Event 0 Input Enable"]
568 #[inline(always)]
569 #[must_use]
570 pub fn tcinv0(&mut self) -> TCINV0_W<12> {
571 TCINV0_W::new(self)
572 }
573 #[doc = "Bit 13 - Inverted Event 1 Input Enable"]
574 #[inline(always)]
575 #[must_use]
576 pub fn tcinv1(&mut self) -> TCINV1_W<13> {
577 TCINV1_W::new(self)
578 }
579 #[doc = "Bit 14 - Timer/counter Event 0 Input Enable"]
580 #[inline(always)]
581 #[must_use]
582 pub fn tcei0(&mut self) -> TCEI0_W<14> {
583 TCEI0_W::new(self)
584 }
585 #[doc = "Bit 15 - Timer/counter Event 1 Input Enable"]
586 #[inline(always)]
587 #[must_use]
588 pub fn tcei1(&mut self) -> TCEI1_W<15> {
589 TCEI1_W::new(self)
590 }
591 #[doc = "Bit 16 - Match or Capture Channel 0 Event Input Enable"]
592 #[inline(always)]
593 #[must_use]
594 pub fn mcei0(&mut self) -> MCEI0_W<16> {
595 MCEI0_W::new(self)
596 }
597 #[doc = "Bit 17 - Match or Capture Channel 1 Event Input Enable"]
598 #[inline(always)]
599 #[must_use]
600 pub fn mcei1(&mut self) -> MCEI1_W<17> {
601 MCEI1_W::new(self)
602 }
603 #[doc = "Bit 18 - Match or Capture Channel 2 Event Input Enable"]
604 #[inline(always)]
605 #[must_use]
606 pub fn mcei2(&mut self) -> MCEI2_W<18> {
607 MCEI2_W::new(self)
608 }
609 #[doc = "Bit 19 - Match or Capture Channel 3 Event Input Enable"]
610 #[inline(always)]
611 #[must_use]
612 pub fn mcei3(&mut self) -> MCEI3_W<19> {
613 MCEI3_W::new(self)
614 }
615 #[doc = "Bit 24 - Match or Capture Channel 0 Event Output Enable"]
616 #[inline(always)]
617 #[must_use]
618 pub fn mceo0(&mut self) -> MCEO0_W<24> {
619 MCEO0_W::new(self)
620 }
621 #[doc = "Bit 25 - Match or Capture Channel 1 Event Output Enable"]
622 #[inline(always)]
623 #[must_use]
624 pub fn mceo1(&mut self) -> MCEO1_W<25> {
625 MCEO1_W::new(self)
626 }
627 #[doc = "Bit 26 - Match or Capture Channel 2 Event Output Enable"]
628 #[inline(always)]
629 #[must_use]
630 pub fn mceo2(&mut self) -> MCEO2_W<26> {
631 MCEO2_W::new(self)
632 }
633 #[doc = "Bit 27 - Match or Capture Channel 3 Event Output Enable"]
634 #[inline(always)]
635 #[must_use]
636 pub fn mceo3(&mut self) -> MCEO3_W<27> {
637 MCEO3_W::new(self)
638 }
639 #[doc = "Writes raw bits to the register."]
640 #[inline(always)]
641 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
642 self.0.bits(bits);
643 self
644 }
645}
646#[doc = "Event Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [evctrl](index.html) module"]
647pub struct EVCTRL_SPEC;
648impl crate::RegisterSpec for EVCTRL_SPEC {
649 type Ux = u32;
650}
651#[doc = "`read()` method returns [evctrl::R](R) reader structure"]
652impl crate::Readable for EVCTRL_SPEC {
653 type Reader = R;
654}
655#[doc = "`write(|w| ..)` method takes [evctrl::W](W) writer structure"]
656impl crate::Writable for EVCTRL_SPEC {
657 type Writer = W;
658 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
659 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
660}
661#[doc = "`reset()` method sets EVCTRL to value 0"]
662impl crate::Resettable for EVCTRL_SPEC {
663 const RESET_VALUE: Self::Ux = 0;
664}