atsamd51g/tcc0/
evctrl.rs

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