mk20d7/ftm0/combine/
mod.rs

1#[doc = r" Value read from the register"]
2pub struct R {
3    bits: u32,
4}
5#[doc = r" Value to write to the register"]
6pub struct W {
7    bits: u32,
8}
9impl super::COMBINE {
10    #[doc = r" Modifies the contents of the register"]
11    #[inline]
12    pub fn modify<F>(&self, f: F)
13    where
14        for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
15    {
16        let bits = self.register.get();
17        let r = R { bits: bits };
18        let mut w = W { bits: bits };
19        f(&r, &mut w);
20        self.register.set(w.bits);
21    }
22    #[doc = r" Reads the contents of the register"]
23    #[inline]
24    pub fn read(&self) -> R {
25        R {
26            bits: self.register.get(),
27        }
28    }
29    #[doc = r" Writes to the register"]
30    #[inline]
31    pub fn write<F>(&self, f: F)
32    where
33        F: FnOnce(&mut W) -> &mut W,
34    {
35        let mut w = W::reset_value();
36        f(&mut w);
37        self.register.set(w.bits);
38    }
39    #[doc = r" Writes the reset value to the register"]
40    #[inline]
41    pub fn reset(&self) {
42        self.write(|w| w)
43    }
44}
45#[doc = "Possible values of the field `COMBINE0`"]
46#[derive(Clone, Copy, Debug, PartialEq)]
47pub enum COMBINE0R {
48    #[doc = "Channels (n) and (n+1) are independent."]
49    _0,
50    #[doc = "Channels (n) and (n+1) are combined."]
51    _1,
52}
53impl COMBINE0R {
54    #[doc = r" Returns `true` if the bit is clear (0)"]
55    #[inline]
56    pub fn bit_is_clear(&self) -> bool {
57        !self.bit()
58    }
59    #[doc = r" Returns `true` if the bit is set (1)"]
60    #[inline]
61    pub fn bit_is_set(&self) -> bool {
62        self.bit()
63    }
64    #[doc = r" Value of the field as raw bits"]
65    #[inline]
66    pub fn bit(&self) -> bool {
67        match *self {
68            COMBINE0R::_0 => false,
69            COMBINE0R::_1 => true,
70        }
71    }
72    #[allow(missing_docs)]
73    #[doc(hidden)]
74    #[inline]
75    pub fn _from(value: bool) -> COMBINE0R {
76        match value {
77            false => COMBINE0R::_0,
78            true => COMBINE0R::_1,
79        }
80    }
81    #[doc = "Checks if the value of the field is `_0`"]
82    #[inline]
83    pub fn is_0(&self) -> bool {
84        *self == COMBINE0R::_0
85    }
86    #[doc = "Checks if the value of the field is `_1`"]
87    #[inline]
88    pub fn is_1(&self) -> bool {
89        *self == COMBINE0R::_1
90    }
91}
92#[doc = "Possible values of the field `COMP0`"]
93#[derive(Clone, Copy, Debug, PartialEq)]
94pub enum COMP0R {
95    #[doc = "The channel (n+1) output is the same as the channel (n) output."]
96    _0,
97    #[doc = "The channel (n+1) output is the complement of the channel (n) output."]
98    _1,
99}
100impl COMP0R {
101    #[doc = r" Returns `true` if the bit is clear (0)"]
102    #[inline]
103    pub fn bit_is_clear(&self) -> bool {
104        !self.bit()
105    }
106    #[doc = r" Returns `true` if the bit is set (1)"]
107    #[inline]
108    pub fn bit_is_set(&self) -> bool {
109        self.bit()
110    }
111    #[doc = r" Value of the field as raw bits"]
112    #[inline]
113    pub fn bit(&self) -> bool {
114        match *self {
115            COMP0R::_0 => false,
116            COMP0R::_1 => true,
117        }
118    }
119    #[allow(missing_docs)]
120    #[doc(hidden)]
121    #[inline]
122    pub fn _from(value: bool) -> COMP0R {
123        match value {
124            false => COMP0R::_0,
125            true => COMP0R::_1,
126        }
127    }
128    #[doc = "Checks if the value of the field is `_0`"]
129    #[inline]
130    pub fn is_0(&self) -> bool {
131        *self == COMP0R::_0
132    }
133    #[doc = "Checks if the value of the field is `_1`"]
134    #[inline]
135    pub fn is_1(&self) -> bool {
136        *self == COMP0R::_1
137    }
138}
139#[doc = "Possible values of the field `DECAPEN0`"]
140#[derive(Clone, Copy, Debug, PartialEq)]
141pub enum DECAPEN0R {
142    #[doc = "The dual edge capture mode in this pair of channels is disabled."]
143    _0,
144    #[doc = "The dual edge capture mode in this pair of channels is enabled."]
145    _1,
146}
147impl DECAPEN0R {
148    #[doc = r" Returns `true` if the bit is clear (0)"]
149    #[inline]
150    pub fn bit_is_clear(&self) -> bool {
151        !self.bit()
152    }
153    #[doc = r" Returns `true` if the bit is set (1)"]
154    #[inline]
155    pub fn bit_is_set(&self) -> bool {
156        self.bit()
157    }
158    #[doc = r" Value of the field as raw bits"]
159    #[inline]
160    pub fn bit(&self) -> bool {
161        match *self {
162            DECAPEN0R::_0 => false,
163            DECAPEN0R::_1 => true,
164        }
165    }
166    #[allow(missing_docs)]
167    #[doc(hidden)]
168    #[inline]
169    pub fn _from(value: bool) -> DECAPEN0R {
170        match value {
171            false => DECAPEN0R::_0,
172            true => DECAPEN0R::_1,
173        }
174    }
175    #[doc = "Checks if the value of the field is `_0`"]
176    #[inline]
177    pub fn is_0(&self) -> bool {
178        *self == DECAPEN0R::_0
179    }
180    #[doc = "Checks if the value of the field is `_1`"]
181    #[inline]
182    pub fn is_1(&self) -> bool {
183        *self == DECAPEN0R::_1
184    }
185}
186#[doc = "Possible values of the field `DECAP0`"]
187#[derive(Clone, Copy, Debug, PartialEq)]
188pub enum DECAP0R {
189    #[doc = "The dual edge captures are inactive."]
190    _0,
191    #[doc = "The dual edge captures are active."]
192    _1,
193}
194impl DECAP0R {
195    #[doc = r" Returns `true` if the bit is clear (0)"]
196    #[inline]
197    pub fn bit_is_clear(&self) -> bool {
198        !self.bit()
199    }
200    #[doc = r" Returns `true` if the bit is set (1)"]
201    #[inline]
202    pub fn bit_is_set(&self) -> bool {
203        self.bit()
204    }
205    #[doc = r" Value of the field as raw bits"]
206    #[inline]
207    pub fn bit(&self) -> bool {
208        match *self {
209            DECAP0R::_0 => false,
210            DECAP0R::_1 => true,
211        }
212    }
213    #[allow(missing_docs)]
214    #[doc(hidden)]
215    #[inline]
216    pub fn _from(value: bool) -> DECAP0R {
217        match value {
218            false => DECAP0R::_0,
219            true => DECAP0R::_1,
220        }
221    }
222    #[doc = "Checks if the value of the field is `_0`"]
223    #[inline]
224    pub fn is_0(&self) -> bool {
225        *self == DECAP0R::_0
226    }
227    #[doc = "Checks if the value of the field is `_1`"]
228    #[inline]
229    pub fn is_1(&self) -> bool {
230        *self == DECAP0R::_1
231    }
232}
233#[doc = "Possible values of the field `DTEN0`"]
234#[derive(Clone, Copy, Debug, PartialEq)]
235pub enum DTEN0R {
236    #[doc = "The deadtime insertion in this pair of channels is disabled."]
237    _0,
238    #[doc = "The deadtime insertion in this pair of channels is enabled."]
239    _1,
240}
241impl DTEN0R {
242    #[doc = r" Returns `true` if the bit is clear (0)"]
243    #[inline]
244    pub fn bit_is_clear(&self) -> bool {
245        !self.bit()
246    }
247    #[doc = r" Returns `true` if the bit is set (1)"]
248    #[inline]
249    pub fn bit_is_set(&self) -> bool {
250        self.bit()
251    }
252    #[doc = r" Value of the field as raw bits"]
253    #[inline]
254    pub fn bit(&self) -> bool {
255        match *self {
256            DTEN0R::_0 => false,
257            DTEN0R::_1 => true,
258        }
259    }
260    #[allow(missing_docs)]
261    #[doc(hidden)]
262    #[inline]
263    pub fn _from(value: bool) -> DTEN0R {
264        match value {
265            false => DTEN0R::_0,
266            true => DTEN0R::_1,
267        }
268    }
269    #[doc = "Checks if the value of the field is `_0`"]
270    #[inline]
271    pub fn is_0(&self) -> bool {
272        *self == DTEN0R::_0
273    }
274    #[doc = "Checks if the value of the field is `_1`"]
275    #[inline]
276    pub fn is_1(&self) -> bool {
277        *self == DTEN0R::_1
278    }
279}
280#[doc = "Possible values of the field `SYNCEN0`"]
281#[derive(Clone, Copy, Debug, PartialEq)]
282pub enum SYNCEN0R {
283    #[doc = "The PWM synchronization in this pair of channels is disabled."]
284    _0,
285    #[doc = "The PWM synchronization in this pair of channels is enabled."]
286    _1,
287}
288impl SYNCEN0R {
289    #[doc = r" Returns `true` if the bit is clear (0)"]
290    #[inline]
291    pub fn bit_is_clear(&self) -> bool {
292        !self.bit()
293    }
294    #[doc = r" Returns `true` if the bit is set (1)"]
295    #[inline]
296    pub fn bit_is_set(&self) -> bool {
297        self.bit()
298    }
299    #[doc = r" Value of the field as raw bits"]
300    #[inline]
301    pub fn bit(&self) -> bool {
302        match *self {
303            SYNCEN0R::_0 => false,
304            SYNCEN0R::_1 => true,
305        }
306    }
307    #[allow(missing_docs)]
308    #[doc(hidden)]
309    #[inline]
310    pub fn _from(value: bool) -> SYNCEN0R {
311        match value {
312            false => SYNCEN0R::_0,
313            true => SYNCEN0R::_1,
314        }
315    }
316    #[doc = "Checks if the value of the field is `_0`"]
317    #[inline]
318    pub fn is_0(&self) -> bool {
319        *self == SYNCEN0R::_0
320    }
321    #[doc = "Checks if the value of the field is `_1`"]
322    #[inline]
323    pub fn is_1(&self) -> bool {
324        *self == SYNCEN0R::_1
325    }
326}
327#[doc = "Possible values of the field `FAULTEN0`"]
328#[derive(Clone, Copy, Debug, PartialEq)]
329pub enum FAULTEN0R {
330    #[doc = "The fault control in this pair of channels is disabled."]
331    _0,
332    #[doc = "The fault control in this pair of channels is enabled."]
333    _1,
334}
335impl FAULTEN0R {
336    #[doc = r" Returns `true` if the bit is clear (0)"]
337    #[inline]
338    pub fn bit_is_clear(&self) -> bool {
339        !self.bit()
340    }
341    #[doc = r" Returns `true` if the bit is set (1)"]
342    #[inline]
343    pub fn bit_is_set(&self) -> bool {
344        self.bit()
345    }
346    #[doc = r" Value of the field as raw bits"]
347    #[inline]
348    pub fn bit(&self) -> bool {
349        match *self {
350            FAULTEN0R::_0 => false,
351            FAULTEN0R::_1 => true,
352        }
353    }
354    #[allow(missing_docs)]
355    #[doc(hidden)]
356    #[inline]
357    pub fn _from(value: bool) -> FAULTEN0R {
358        match value {
359            false => FAULTEN0R::_0,
360            true => FAULTEN0R::_1,
361        }
362    }
363    #[doc = "Checks if the value of the field is `_0`"]
364    #[inline]
365    pub fn is_0(&self) -> bool {
366        *self == FAULTEN0R::_0
367    }
368    #[doc = "Checks if the value of the field is `_1`"]
369    #[inline]
370    pub fn is_1(&self) -> bool {
371        *self == FAULTEN0R::_1
372    }
373}
374#[doc = "Possible values of the field `COMBINE1`"]
375#[derive(Clone, Copy, Debug, PartialEq)]
376pub enum COMBINE1R {
377    #[doc = "Channels (n) and (n+1) are independent."]
378    _0,
379    #[doc = "Channels (n) and (n+1) are combined."]
380    _1,
381}
382impl COMBINE1R {
383    #[doc = r" Returns `true` if the bit is clear (0)"]
384    #[inline]
385    pub fn bit_is_clear(&self) -> bool {
386        !self.bit()
387    }
388    #[doc = r" Returns `true` if the bit is set (1)"]
389    #[inline]
390    pub fn bit_is_set(&self) -> bool {
391        self.bit()
392    }
393    #[doc = r" Value of the field as raw bits"]
394    #[inline]
395    pub fn bit(&self) -> bool {
396        match *self {
397            COMBINE1R::_0 => false,
398            COMBINE1R::_1 => true,
399        }
400    }
401    #[allow(missing_docs)]
402    #[doc(hidden)]
403    #[inline]
404    pub fn _from(value: bool) -> COMBINE1R {
405        match value {
406            false => COMBINE1R::_0,
407            true => COMBINE1R::_1,
408        }
409    }
410    #[doc = "Checks if the value of the field is `_0`"]
411    #[inline]
412    pub fn is_0(&self) -> bool {
413        *self == COMBINE1R::_0
414    }
415    #[doc = "Checks if the value of the field is `_1`"]
416    #[inline]
417    pub fn is_1(&self) -> bool {
418        *self == COMBINE1R::_1
419    }
420}
421#[doc = "Possible values of the field `COMP1`"]
422#[derive(Clone, Copy, Debug, PartialEq)]
423pub enum COMP1R {
424    #[doc = "The channel (n+1) output is the same as the channel (n) output."]
425    _0,
426    #[doc = "The channel (n+1) output is the complement of the channel (n) output."]
427    _1,
428}
429impl COMP1R {
430    #[doc = r" Returns `true` if the bit is clear (0)"]
431    #[inline]
432    pub fn bit_is_clear(&self) -> bool {
433        !self.bit()
434    }
435    #[doc = r" Returns `true` if the bit is set (1)"]
436    #[inline]
437    pub fn bit_is_set(&self) -> bool {
438        self.bit()
439    }
440    #[doc = r" Value of the field as raw bits"]
441    #[inline]
442    pub fn bit(&self) -> bool {
443        match *self {
444            COMP1R::_0 => false,
445            COMP1R::_1 => true,
446        }
447    }
448    #[allow(missing_docs)]
449    #[doc(hidden)]
450    #[inline]
451    pub fn _from(value: bool) -> COMP1R {
452        match value {
453            false => COMP1R::_0,
454            true => COMP1R::_1,
455        }
456    }
457    #[doc = "Checks if the value of the field is `_0`"]
458    #[inline]
459    pub fn is_0(&self) -> bool {
460        *self == COMP1R::_0
461    }
462    #[doc = "Checks if the value of the field is `_1`"]
463    #[inline]
464    pub fn is_1(&self) -> bool {
465        *self == COMP1R::_1
466    }
467}
468#[doc = "Possible values of the field `DECAPEN1`"]
469#[derive(Clone, Copy, Debug, PartialEq)]
470pub enum DECAPEN1R {
471    #[doc = "The dual edge capture mode in this pair of channels is disabled."]
472    _0,
473    #[doc = "The dual edge capture mode in this pair of channels is enabled."]
474    _1,
475}
476impl DECAPEN1R {
477    #[doc = r" Returns `true` if the bit is clear (0)"]
478    #[inline]
479    pub fn bit_is_clear(&self) -> bool {
480        !self.bit()
481    }
482    #[doc = r" Returns `true` if the bit is set (1)"]
483    #[inline]
484    pub fn bit_is_set(&self) -> bool {
485        self.bit()
486    }
487    #[doc = r" Value of the field as raw bits"]
488    #[inline]
489    pub fn bit(&self) -> bool {
490        match *self {
491            DECAPEN1R::_0 => false,
492            DECAPEN1R::_1 => true,
493        }
494    }
495    #[allow(missing_docs)]
496    #[doc(hidden)]
497    #[inline]
498    pub fn _from(value: bool) -> DECAPEN1R {
499        match value {
500            false => DECAPEN1R::_0,
501            true => DECAPEN1R::_1,
502        }
503    }
504    #[doc = "Checks if the value of the field is `_0`"]
505    #[inline]
506    pub fn is_0(&self) -> bool {
507        *self == DECAPEN1R::_0
508    }
509    #[doc = "Checks if the value of the field is `_1`"]
510    #[inline]
511    pub fn is_1(&self) -> bool {
512        *self == DECAPEN1R::_1
513    }
514}
515#[doc = "Possible values of the field `DECAP1`"]
516#[derive(Clone, Copy, Debug, PartialEq)]
517pub enum DECAP1R {
518    #[doc = "The dual edge captures are inactive."]
519    _0,
520    #[doc = "The dual edge captures are active."]
521    _1,
522}
523impl DECAP1R {
524    #[doc = r" Returns `true` if the bit is clear (0)"]
525    #[inline]
526    pub fn bit_is_clear(&self) -> bool {
527        !self.bit()
528    }
529    #[doc = r" Returns `true` if the bit is set (1)"]
530    #[inline]
531    pub fn bit_is_set(&self) -> bool {
532        self.bit()
533    }
534    #[doc = r" Value of the field as raw bits"]
535    #[inline]
536    pub fn bit(&self) -> bool {
537        match *self {
538            DECAP1R::_0 => false,
539            DECAP1R::_1 => true,
540        }
541    }
542    #[allow(missing_docs)]
543    #[doc(hidden)]
544    #[inline]
545    pub fn _from(value: bool) -> DECAP1R {
546        match value {
547            false => DECAP1R::_0,
548            true => DECAP1R::_1,
549        }
550    }
551    #[doc = "Checks if the value of the field is `_0`"]
552    #[inline]
553    pub fn is_0(&self) -> bool {
554        *self == DECAP1R::_0
555    }
556    #[doc = "Checks if the value of the field is `_1`"]
557    #[inline]
558    pub fn is_1(&self) -> bool {
559        *self == DECAP1R::_1
560    }
561}
562#[doc = "Possible values of the field `DTEN1`"]
563#[derive(Clone, Copy, Debug, PartialEq)]
564pub enum DTEN1R {
565    #[doc = "The deadtime insertion in this pair of channels is disabled."]
566    _0,
567    #[doc = "The deadtime insertion in this pair of channels is enabled."]
568    _1,
569}
570impl DTEN1R {
571    #[doc = r" Returns `true` if the bit is clear (0)"]
572    #[inline]
573    pub fn bit_is_clear(&self) -> bool {
574        !self.bit()
575    }
576    #[doc = r" Returns `true` if the bit is set (1)"]
577    #[inline]
578    pub fn bit_is_set(&self) -> bool {
579        self.bit()
580    }
581    #[doc = r" Value of the field as raw bits"]
582    #[inline]
583    pub fn bit(&self) -> bool {
584        match *self {
585            DTEN1R::_0 => false,
586            DTEN1R::_1 => true,
587        }
588    }
589    #[allow(missing_docs)]
590    #[doc(hidden)]
591    #[inline]
592    pub fn _from(value: bool) -> DTEN1R {
593        match value {
594            false => DTEN1R::_0,
595            true => DTEN1R::_1,
596        }
597    }
598    #[doc = "Checks if the value of the field is `_0`"]
599    #[inline]
600    pub fn is_0(&self) -> bool {
601        *self == DTEN1R::_0
602    }
603    #[doc = "Checks if the value of the field is `_1`"]
604    #[inline]
605    pub fn is_1(&self) -> bool {
606        *self == DTEN1R::_1
607    }
608}
609#[doc = "Possible values of the field `SYNCEN1`"]
610#[derive(Clone, Copy, Debug, PartialEq)]
611pub enum SYNCEN1R {
612    #[doc = "The PWM synchronization in this pair of channels is disabled."]
613    _0,
614    #[doc = "The PWM synchronization in this pair of channels is enabled."]
615    _1,
616}
617impl SYNCEN1R {
618    #[doc = r" Returns `true` if the bit is clear (0)"]
619    #[inline]
620    pub fn bit_is_clear(&self) -> bool {
621        !self.bit()
622    }
623    #[doc = r" Returns `true` if the bit is set (1)"]
624    #[inline]
625    pub fn bit_is_set(&self) -> bool {
626        self.bit()
627    }
628    #[doc = r" Value of the field as raw bits"]
629    #[inline]
630    pub fn bit(&self) -> bool {
631        match *self {
632            SYNCEN1R::_0 => false,
633            SYNCEN1R::_1 => true,
634        }
635    }
636    #[allow(missing_docs)]
637    #[doc(hidden)]
638    #[inline]
639    pub fn _from(value: bool) -> SYNCEN1R {
640        match value {
641            false => SYNCEN1R::_0,
642            true => SYNCEN1R::_1,
643        }
644    }
645    #[doc = "Checks if the value of the field is `_0`"]
646    #[inline]
647    pub fn is_0(&self) -> bool {
648        *self == SYNCEN1R::_0
649    }
650    #[doc = "Checks if the value of the field is `_1`"]
651    #[inline]
652    pub fn is_1(&self) -> bool {
653        *self == SYNCEN1R::_1
654    }
655}
656#[doc = "Possible values of the field `FAULTEN1`"]
657#[derive(Clone, Copy, Debug, PartialEq)]
658pub enum FAULTEN1R {
659    #[doc = "The fault control in this pair of channels is disabled."]
660    _0,
661    #[doc = "The fault control in this pair of channels is enabled."]
662    _1,
663}
664impl FAULTEN1R {
665    #[doc = r" Returns `true` if the bit is clear (0)"]
666    #[inline]
667    pub fn bit_is_clear(&self) -> bool {
668        !self.bit()
669    }
670    #[doc = r" Returns `true` if the bit is set (1)"]
671    #[inline]
672    pub fn bit_is_set(&self) -> bool {
673        self.bit()
674    }
675    #[doc = r" Value of the field as raw bits"]
676    #[inline]
677    pub fn bit(&self) -> bool {
678        match *self {
679            FAULTEN1R::_0 => false,
680            FAULTEN1R::_1 => true,
681        }
682    }
683    #[allow(missing_docs)]
684    #[doc(hidden)]
685    #[inline]
686    pub fn _from(value: bool) -> FAULTEN1R {
687        match value {
688            false => FAULTEN1R::_0,
689            true => FAULTEN1R::_1,
690        }
691    }
692    #[doc = "Checks if the value of the field is `_0`"]
693    #[inline]
694    pub fn is_0(&self) -> bool {
695        *self == FAULTEN1R::_0
696    }
697    #[doc = "Checks if the value of the field is `_1`"]
698    #[inline]
699    pub fn is_1(&self) -> bool {
700        *self == FAULTEN1R::_1
701    }
702}
703#[doc = "Possible values of the field `COMBINE2`"]
704#[derive(Clone, Copy, Debug, PartialEq)]
705pub enum COMBINE2R {
706    #[doc = "Channels (n) and (n+1) are independent."]
707    _0,
708    #[doc = "Channels (n) and (n+1) are combined."]
709    _1,
710}
711impl COMBINE2R {
712    #[doc = r" Returns `true` if the bit is clear (0)"]
713    #[inline]
714    pub fn bit_is_clear(&self) -> bool {
715        !self.bit()
716    }
717    #[doc = r" Returns `true` if the bit is set (1)"]
718    #[inline]
719    pub fn bit_is_set(&self) -> bool {
720        self.bit()
721    }
722    #[doc = r" Value of the field as raw bits"]
723    #[inline]
724    pub fn bit(&self) -> bool {
725        match *self {
726            COMBINE2R::_0 => false,
727            COMBINE2R::_1 => true,
728        }
729    }
730    #[allow(missing_docs)]
731    #[doc(hidden)]
732    #[inline]
733    pub fn _from(value: bool) -> COMBINE2R {
734        match value {
735            false => COMBINE2R::_0,
736            true => COMBINE2R::_1,
737        }
738    }
739    #[doc = "Checks if the value of the field is `_0`"]
740    #[inline]
741    pub fn is_0(&self) -> bool {
742        *self == COMBINE2R::_0
743    }
744    #[doc = "Checks if the value of the field is `_1`"]
745    #[inline]
746    pub fn is_1(&self) -> bool {
747        *self == COMBINE2R::_1
748    }
749}
750#[doc = "Possible values of the field `COMP2`"]
751#[derive(Clone, Copy, Debug, PartialEq)]
752pub enum COMP2R {
753    #[doc = "The channel (n+1) output is the same as the channel (n) output."]
754    _0,
755    #[doc = "The channel (n+1) output is the complement of the channel (n) output."]
756    _1,
757}
758impl COMP2R {
759    #[doc = r" Returns `true` if the bit is clear (0)"]
760    #[inline]
761    pub fn bit_is_clear(&self) -> bool {
762        !self.bit()
763    }
764    #[doc = r" Returns `true` if the bit is set (1)"]
765    #[inline]
766    pub fn bit_is_set(&self) -> bool {
767        self.bit()
768    }
769    #[doc = r" Value of the field as raw bits"]
770    #[inline]
771    pub fn bit(&self) -> bool {
772        match *self {
773            COMP2R::_0 => false,
774            COMP2R::_1 => true,
775        }
776    }
777    #[allow(missing_docs)]
778    #[doc(hidden)]
779    #[inline]
780    pub fn _from(value: bool) -> COMP2R {
781        match value {
782            false => COMP2R::_0,
783            true => COMP2R::_1,
784        }
785    }
786    #[doc = "Checks if the value of the field is `_0`"]
787    #[inline]
788    pub fn is_0(&self) -> bool {
789        *self == COMP2R::_0
790    }
791    #[doc = "Checks if the value of the field is `_1`"]
792    #[inline]
793    pub fn is_1(&self) -> bool {
794        *self == COMP2R::_1
795    }
796}
797#[doc = "Possible values of the field `DECAPEN2`"]
798#[derive(Clone, Copy, Debug, PartialEq)]
799pub enum DECAPEN2R {
800    #[doc = "The dual edge capture mode in this pair of channels is disabled."]
801    _0,
802    #[doc = "The dual edge capture mode in this pair of channels is enabled."]
803    _1,
804}
805impl DECAPEN2R {
806    #[doc = r" Returns `true` if the bit is clear (0)"]
807    #[inline]
808    pub fn bit_is_clear(&self) -> bool {
809        !self.bit()
810    }
811    #[doc = r" Returns `true` if the bit is set (1)"]
812    #[inline]
813    pub fn bit_is_set(&self) -> bool {
814        self.bit()
815    }
816    #[doc = r" Value of the field as raw bits"]
817    #[inline]
818    pub fn bit(&self) -> bool {
819        match *self {
820            DECAPEN2R::_0 => false,
821            DECAPEN2R::_1 => true,
822        }
823    }
824    #[allow(missing_docs)]
825    #[doc(hidden)]
826    #[inline]
827    pub fn _from(value: bool) -> DECAPEN2R {
828        match value {
829            false => DECAPEN2R::_0,
830            true => DECAPEN2R::_1,
831        }
832    }
833    #[doc = "Checks if the value of the field is `_0`"]
834    #[inline]
835    pub fn is_0(&self) -> bool {
836        *self == DECAPEN2R::_0
837    }
838    #[doc = "Checks if the value of the field is `_1`"]
839    #[inline]
840    pub fn is_1(&self) -> bool {
841        *self == DECAPEN2R::_1
842    }
843}
844#[doc = "Possible values of the field `DECAP2`"]
845#[derive(Clone, Copy, Debug, PartialEq)]
846pub enum DECAP2R {
847    #[doc = "The dual edge captures are inactive."]
848    _0,
849    #[doc = "The dual edge captures are active."]
850    _1,
851}
852impl DECAP2R {
853    #[doc = r" Returns `true` if the bit is clear (0)"]
854    #[inline]
855    pub fn bit_is_clear(&self) -> bool {
856        !self.bit()
857    }
858    #[doc = r" Returns `true` if the bit is set (1)"]
859    #[inline]
860    pub fn bit_is_set(&self) -> bool {
861        self.bit()
862    }
863    #[doc = r" Value of the field as raw bits"]
864    #[inline]
865    pub fn bit(&self) -> bool {
866        match *self {
867            DECAP2R::_0 => false,
868            DECAP2R::_1 => true,
869        }
870    }
871    #[allow(missing_docs)]
872    #[doc(hidden)]
873    #[inline]
874    pub fn _from(value: bool) -> DECAP2R {
875        match value {
876            false => DECAP2R::_0,
877            true => DECAP2R::_1,
878        }
879    }
880    #[doc = "Checks if the value of the field is `_0`"]
881    #[inline]
882    pub fn is_0(&self) -> bool {
883        *self == DECAP2R::_0
884    }
885    #[doc = "Checks if the value of the field is `_1`"]
886    #[inline]
887    pub fn is_1(&self) -> bool {
888        *self == DECAP2R::_1
889    }
890}
891#[doc = "Possible values of the field `DTEN2`"]
892#[derive(Clone, Copy, Debug, PartialEq)]
893pub enum DTEN2R {
894    #[doc = "The deadtime insertion in this pair of channels is disabled."]
895    _0,
896    #[doc = "The deadtime insertion in this pair of channels is enabled."]
897    _1,
898}
899impl DTEN2R {
900    #[doc = r" Returns `true` if the bit is clear (0)"]
901    #[inline]
902    pub fn bit_is_clear(&self) -> bool {
903        !self.bit()
904    }
905    #[doc = r" Returns `true` if the bit is set (1)"]
906    #[inline]
907    pub fn bit_is_set(&self) -> bool {
908        self.bit()
909    }
910    #[doc = r" Value of the field as raw bits"]
911    #[inline]
912    pub fn bit(&self) -> bool {
913        match *self {
914            DTEN2R::_0 => false,
915            DTEN2R::_1 => true,
916        }
917    }
918    #[allow(missing_docs)]
919    #[doc(hidden)]
920    #[inline]
921    pub fn _from(value: bool) -> DTEN2R {
922        match value {
923            false => DTEN2R::_0,
924            true => DTEN2R::_1,
925        }
926    }
927    #[doc = "Checks if the value of the field is `_0`"]
928    #[inline]
929    pub fn is_0(&self) -> bool {
930        *self == DTEN2R::_0
931    }
932    #[doc = "Checks if the value of the field is `_1`"]
933    #[inline]
934    pub fn is_1(&self) -> bool {
935        *self == DTEN2R::_1
936    }
937}
938#[doc = "Possible values of the field `SYNCEN2`"]
939#[derive(Clone, Copy, Debug, PartialEq)]
940pub enum SYNCEN2R {
941    #[doc = "The PWM synchronization in this pair of channels is disabled."]
942    _0,
943    #[doc = "The PWM synchronization in this pair of channels is enabled."]
944    _1,
945}
946impl SYNCEN2R {
947    #[doc = r" Returns `true` if the bit is clear (0)"]
948    #[inline]
949    pub fn bit_is_clear(&self) -> bool {
950        !self.bit()
951    }
952    #[doc = r" Returns `true` if the bit is set (1)"]
953    #[inline]
954    pub fn bit_is_set(&self) -> bool {
955        self.bit()
956    }
957    #[doc = r" Value of the field as raw bits"]
958    #[inline]
959    pub fn bit(&self) -> bool {
960        match *self {
961            SYNCEN2R::_0 => false,
962            SYNCEN2R::_1 => true,
963        }
964    }
965    #[allow(missing_docs)]
966    #[doc(hidden)]
967    #[inline]
968    pub fn _from(value: bool) -> SYNCEN2R {
969        match value {
970            false => SYNCEN2R::_0,
971            true => SYNCEN2R::_1,
972        }
973    }
974    #[doc = "Checks if the value of the field is `_0`"]
975    #[inline]
976    pub fn is_0(&self) -> bool {
977        *self == SYNCEN2R::_0
978    }
979    #[doc = "Checks if the value of the field is `_1`"]
980    #[inline]
981    pub fn is_1(&self) -> bool {
982        *self == SYNCEN2R::_1
983    }
984}
985#[doc = "Possible values of the field `FAULTEN2`"]
986#[derive(Clone, Copy, Debug, PartialEq)]
987pub enum FAULTEN2R {
988    #[doc = "The fault control in this pair of channels is disabled."]
989    _0,
990    #[doc = "The fault control in this pair of channels is enabled."]
991    _1,
992}
993impl FAULTEN2R {
994    #[doc = r" Returns `true` if the bit is clear (0)"]
995    #[inline]
996    pub fn bit_is_clear(&self) -> bool {
997        !self.bit()
998    }
999    #[doc = r" Returns `true` if the bit is set (1)"]
1000    #[inline]
1001    pub fn bit_is_set(&self) -> bool {
1002        self.bit()
1003    }
1004    #[doc = r" Value of the field as raw bits"]
1005    #[inline]
1006    pub fn bit(&self) -> bool {
1007        match *self {
1008            FAULTEN2R::_0 => false,
1009            FAULTEN2R::_1 => true,
1010        }
1011    }
1012    #[allow(missing_docs)]
1013    #[doc(hidden)]
1014    #[inline]
1015    pub fn _from(value: bool) -> FAULTEN2R {
1016        match value {
1017            false => FAULTEN2R::_0,
1018            true => FAULTEN2R::_1,
1019        }
1020    }
1021    #[doc = "Checks if the value of the field is `_0`"]
1022    #[inline]
1023    pub fn is_0(&self) -> bool {
1024        *self == FAULTEN2R::_0
1025    }
1026    #[doc = "Checks if the value of the field is `_1`"]
1027    #[inline]
1028    pub fn is_1(&self) -> bool {
1029        *self == FAULTEN2R::_1
1030    }
1031}
1032#[doc = "Possible values of the field `COMBINE3`"]
1033#[derive(Clone, Copy, Debug, PartialEq)]
1034pub enum COMBINE3R {
1035    #[doc = "Channels (n) and (n+1) are independent."]
1036    _0,
1037    #[doc = "Channels (n) and (n+1) are combined."]
1038    _1,
1039}
1040impl COMBINE3R {
1041    #[doc = r" Returns `true` if the bit is clear (0)"]
1042    #[inline]
1043    pub fn bit_is_clear(&self) -> bool {
1044        !self.bit()
1045    }
1046    #[doc = r" Returns `true` if the bit is set (1)"]
1047    #[inline]
1048    pub fn bit_is_set(&self) -> bool {
1049        self.bit()
1050    }
1051    #[doc = r" Value of the field as raw bits"]
1052    #[inline]
1053    pub fn bit(&self) -> bool {
1054        match *self {
1055            COMBINE3R::_0 => false,
1056            COMBINE3R::_1 => true,
1057        }
1058    }
1059    #[allow(missing_docs)]
1060    #[doc(hidden)]
1061    #[inline]
1062    pub fn _from(value: bool) -> COMBINE3R {
1063        match value {
1064            false => COMBINE3R::_0,
1065            true => COMBINE3R::_1,
1066        }
1067    }
1068    #[doc = "Checks if the value of the field is `_0`"]
1069    #[inline]
1070    pub fn is_0(&self) -> bool {
1071        *self == COMBINE3R::_0
1072    }
1073    #[doc = "Checks if the value of the field is `_1`"]
1074    #[inline]
1075    pub fn is_1(&self) -> bool {
1076        *self == COMBINE3R::_1
1077    }
1078}
1079#[doc = "Possible values of the field `COMP3`"]
1080#[derive(Clone, Copy, Debug, PartialEq)]
1081pub enum COMP3R {
1082    #[doc = "The channel (n+1) output is the same as the channel (n) output."]
1083    _0,
1084    #[doc = "The channel (n+1) output is the complement of the channel (n) output."]
1085    _1,
1086}
1087impl COMP3R {
1088    #[doc = r" Returns `true` if the bit is clear (0)"]
1089    #[inline]
1090    pub fn bit_is_clear(&self) -> bool {
1091        !self.bit()
1092    }
1093    #[doc = r" Returns `true` if the bit is set (1)"]
1094    #[inline]
1095    pub fn bit_is_set(&self) -> bool {
1096        self.bit()
1097    }
1098    #[doc = r" Value of the field as raw bits"]
1099    #[inline]
1100    pub fn bit(&self) -> bool {
1101        match *self {
1102            COMP3R::_0 => false,
1103            COMP3R::_1 => true,
1104        }
1105    }
1106    #[allow(missing_docs)]
1107    #[doc(hidden)]
1108    #[inline]
1109    pub fn _from(value: bool) -> COMP3R {
1110        match value {
1111            false => COMP3R::_0,
1112            true => COMP3R::_1,
1113        }
1114    }
1115    #[doc = "Checks if the value of the field is `_0`"]
1116    #[inline]
1117    pub fn is_0(&self) -> bool {
1118        *self == COMP3R::_0
1119    }
1120    #[doc = "Checks if the value of the field is `_1`"]
1121    #[inline]
1122    pub fn is_1(&self) -> bool {
1123        *self == COMP3R::_1
1124    }
1125}
1126#[doc = "Possible values of the field `DECAPEN3`"]
1127#[derive(Clone, Copy, Debug, PartialEq)]
1128pub enum DECAPEN3R {
1129    #[doc = "The dual edge capture mode in this pair of channels is disabled."]
1130    _0,
1131    #[doc = "The dual edge capture mode in this pair of channels is enabled."]
1132    _1,
1133}
1134impl DECAPEN3R {
1135    #[doc = r" Returns `true` if the bit is clear (0)"]
1136    #[inline]
1137    pub fn bit_is_clear(&self) -> bool {
1138        !self.bit()
1139    }
1140    #[doc = r" Returns `true` if the bit is set (1)"]
1141    #[inline]
1142    pub fn bit_is_set(&self) -> bool {
1143        self.bit()
1144    }
1145    #[doc = r" Value of the field as raw bits"]
1146    #[inline]
1147    pub fn bit(&self) -> bool {
1148        match *self {
1149            DECAPEN3R::_0 => false,
1150            DECAPEN3R::_1 => true,
1151        }
1152    }
1153    #[allow(missing_docs)]
1154    #[doc(hidden)]
1155    #[inline]
1156    pub fn _from(value: bool) -> DECAPEN3R {
1157        match value {
1158            false => DECAPEN3R::_0,
1159            true => DECAPEN3R::_1,
1160        }
1161    }
1162    #[doc = "Checks if the value of the field is `_0`"]
1163    #[inline]
1164    pub fn is_0(&self) -> bool {
1165        *self == DECAPEN3R::_0
1166    }
1167    #[doc = "Checks if the value of the field is `_1`"]
1168    #[inline]
1169    pub fn is_1(&self) -> bool {
1170        *self == DECAPEN3R::_1
1171    }
1172}
1173#[doc = "Possible values of the field `DECAP3`"]
1174#[derive(Clone, Copy, Debug, PartialEq)]
1175pub enum DECAP3R {
1176    #[doc = "The dual edge captures are inactive."]
1177    _0,
1178    #[doc = "The dual edge captures are active."]
1179    _1,
1180}
1181impl DECAP3R {
1182    #[doc = r" Returns `true` if the bit is clear (0)"]
1183    #[inline]
1184    pub fn bit_is_clear(&self) -> bool {
1185        !self.bit()
1186    }
1187    #[doc = r" Returns `true` if the bit is set (1)"]
1188    #[inline]
1189    pub fn bit_is_set(&self) -> bool {
1190        self.bit()
1191    }
1192    #[doc = r" Value of the field as raw bits"]
1193    #[inline]
1194    pub fn bit(&self) -> bool {
1195        match *self {
1196            DECAP3R::_0 => false,
1197            DECAP3R::_1 => true,
1198        }
1199    }
1200    #[allow(missing_docs)]
1201    #[doc(hidden)]
1202    #[inline]
1203    pub fn _from(value: bool) -> DECAP3R {
1204        match value {
1205            false => DECAP3R::_0,
1206            true => DECAP3R::_1,
1207        }
1208    }
1209    #[doc = "Checks if the value of the field is `_0`"]
1210    #[inline]
1211    pub fn is_0(&self) -> bool {
1212        *self == DECAP3R::_0
1213    }
1214    #[doc = "Checks if the value of the field is `_1`"]
1215    #[inline]
1216    pub fn is_1(&self) -> bool {
1217        *self == DECAP3R::_1
1218    }
1219}
1220#[doc = "Possible values of the field `DTEN3`"]
1221#[derive(Clone, Copy, Debug, PartialEq)]
1222pub enum DTEN3R {
1223    #[doc = "The deadtime insertion in this pair of channels is disabled."]
1224    _0,
1225    #[doc = "The deadtime insertion in this pair of channels is enabled."]
1226    _1,
1227}
1228impl DTEN3R {
1229    #[doc = r" Returns `true` if the bit is clear (0)"]
1230    #[inline]
1231    pub fn bit_is_clear(&self) -> bool {
1232        !self.bit()
1233    }
1234    #[doc = r" Returns `true` if the bit is set (1)"]
1235    #[inline]
1236    pub fn bit_is_set(&self) -> bool {
1237        self.bit()
1238    }
1239    #[doc = r" Value of the field as raw bits"]
1240    #[inline]
1241    pub fn bit(&self) -> bool {
1242        match *self {
1243            DTEN3R::_0 => false,
1244            DTEN3R::_1 => true,
1245        }
1246    }
1247    #[allow(missing_docs)]
1248    #[doc(hidden)]
1249    #[inline]
1250    pub fn _from(value: bool) -> DTEN3R {
1251        match value {
1252            false => DTEN3R::_0,
1253            true => DTEN3R::_1,
1254        }
1255    }
1256    #[doc = "Checks if the value of the field is `_0`"]
1257    #[inline]
1258    pub fn is_0(&self) -> bool {
1259        *self == DTEN3R::_0
1260    }
1261    #[doc = "Checks if the value of the field is `_1`"]
1262    #[inline]
1263    pub fn is_1(&self) -> bool {
1264        *self == DTEN3R::_1
1265    }
1266}
1267#[doc = "Possible values of the field `SYNCEN3`"]
1268#[derive(Clone, Copy, Debug, PartialEq)]
1269pub enum SYNCEN3R {
1270    #[doc = "The PWM synchronization in this pair of channels is disabled."]
1271    _0,
1272    #[doc = "The PWM synchronization in this pair of channels is enabled."]
1273    _1,
1274}
1275impl SYNCEN3R {
1276    #[doc = r" Returns `true` if the bit is clear (0)"]
1277    #[inline]
1278    pub fn bit_is_clear(&self) -> bool {
1279        !self.bit()
1280    }
1281    #[doc = r" Returns `true` if the bit is set (1)"]
1282    #[inline]
1283    pub fn bit_is_set(&self) -> bool {
1284        self.bit()
1285    }
1286    #[doc = r" Value of the field as raw bits"]
1287    #[inline]
1288    pub fn bit(&self) -> bool {
1289        match *self {
1290            SYNCEN3R::_0 => false,
1291            SYNCEN3R::_1 => true,
1292        }
1293    }
1294    #[allow(missing_docs)]
1295    #[doc(hidden)]
1296    #[inline]
1297    pub fn _from(value: bool) -> SYNCEN3R {
1298        match value {
1299            false => SYNCEN3R::_0,
1300            true => SYNCEN3R::_1,
1301        }
1302    }
1303    #[doc = "Checks if the value of the field is `_0`"]
1304    #[inline]
1305    pub fn is_0(&self) -> bool {
1306        *self == SYNCEN3R::_0
1307    }
1308    #[doc = "Checks if the value of the field is `_1`"]
1309    #[inline]
1310    pub fn is_1(&self) -> bool {
1311        *self == SYNCEN3R::_1
1312    }
1313}
1314#[doc = "Possible values of the field `FAULTEN3`"]
1315#[derive(Clone, Copy, Debug, PartialEq)]
1316pub enum FAULTEN3R {
1317    #[doc = "The fault control in this pair of channels is disabled."]
1318    _0,
1319    #[doc = "The fault control in this pair of channels is enabled."]
1320    _1,
1321}
1322impl FAULTEN3R {
1323    #[doc = r" Returns `true` if the bit is clear (0)"]
1324    #[inline]
1325    pub fn bit_is_clear(&self) -> bool {
1326        !self.bit()
1327    }
1328    #[doc = r" Returns `true` if the bit is set (1)"]
1329    #[inline]
1330    pub fn bit_is_set(&self) -> bool {
1331        self.bit()
1332    }
1333    #[doc = r" Value of the field as raw bits"]
1334    #[inline]
1335    pub fn bit(&self) -> bool {
1336        match *self {
1337            FAULTEN3R::_0 => false,
1338            FAULTEN3R::_1 => true,
1339        }
1340    }
1341    #[allow(missing_docs)]
1342    #[doc(hidden)]
1343    #[inline]
1344    pub fn _from(value: bool) -> FAULTEN3R {
1345        match value {
1346            false => FAULTEN3R::_0,
1347            true => FAULTEN3R::_1,
1348        }
1349    }
1350    #[doc = "Checks if the value of the field is `_0`"]
1351    #[inline]
1352    pub fn is_0(&self) -> bool {
1353        *self == FAULTEN3R::_0
1354    }
1355    #[doc = "Checks if the value of the field is `_1`"]
1356    #[inline]
1357    pub fn is_1(&self) -> bool {
1358        *self == FAULTEN3R::_1
1359    }
1360}
1361#[doc = "Values that can be written to the field `COMBINE0`"]
1362pub enum COMBINE0W {
1363    #[doc = "Channels (n) and (n+1) are independent."]
1364    _0,
1365    #[doc = "Channels (n) and (n+1) are combined."]
1366    _1,
1367}
1368impl COMBINE0W {
1369    #[allow(missing_docs)]
1370    #[doc(hidden)]
1371    #[inline]
1372    pub fn _bits(&self) -> bool {
1373        match *self {
1374            COMBINE0W::_0 => false,
1375            COMBINE0W::_1 => true,
1376        }
1377    }
1378}
1379#[doc = r" Proxy"]
1380pub struct _COMBINE0W<'a> {
1381    w: &'a mut W,
1382}
1383impl<'a> _COMBINE0W<'a> {
1384    #[doc = r" Writes `variant` to the field"]
1385    #[inline]
1386    pub fn variant(self, variant: COMBINE0W) -> &'a mut W {
1387        {
1388            self.bit(variant._bits())
1389        }
1390    }
1391    #[doc = "Channels (n) and (n+1) are independent."]
1392    #[inline]
1393    pub fn _0(self) -> &'a mut W {
1394        self.variant(COMBINE0W::_0)
1395    }
1396    #[doc = "Channels (n) and (n+1) are combined."]
1397    #[inline]
1398    pub fn _1(self) -> &'a mut W {
1399        self.variant(COMBINE0W::_1)
1400    }
1401    #[doc = r" Sets the field bit"]
1402    pub fn set_bit(self) -> &'a mut W {
1403        self.bit(true)
1404    }
1405    #[doc = r" Clears the field bit"]
1406    pub fn clear_bit(self) -> &'a mut W {
1407        self.bit(false)
1408    }
1409    #[doc = r" Writes raw bits to the field"]
1410    #[inline]
1411    pub fn bit(self, value: bool) -> &'a mut W {
1412        const MASK: bool = true;
1413        const OFFSET: u8 = 0;
1414        self.w.bits &= !((MASK as u32) << OFFSET);
1415        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1416        self.w
1417    }
1418}
1419#[doc = "Values that can be written to the field `COMP0`"]
1420pub enum COMP0W {
1421    #[doc = "The channel (n+1) output is the same as the channel (n) output."]
1422    _0,
1423    #[doc = "The channel (n+1) output is the complement of the channel (n) output."]
1424    _1,
1425}
1426impl COMP0W {
1427    #[allow(missing_docs)]
1428    #[doc(hidden)]
1429    #[inline]
1430    pub fn _bits(&self) -> bool {
1431        match *self {
1432            COMP0W::_0 => false,
1433            COMP0W::_1 => true,
1434        }
1435    }
1436}
1437#[doc = r" Proxy"]
1438pub struct _COMP0W<'a> {
1439    w: &'a mut W,
1440}
1441impl<'a> _COMP0W<'a> {
1442    #[doc = r" Writes `variant` to the field"]
1443    #[inline]
1444    pub fn variant(self, variant: COMP0W) -> &'a mut W {
1445        {
1446            self.bit(variant._bits())
1447        }
1448    }
1449    #[doc = "The channel (n+1) output is the same as the channel (n) output."]
1450    #[inline]
1451    pub fn _0(self) -> &'a mut W {
1452        self.variant(COMP0W::_0)
1453    }
1454    #[doc = "The channel (n+1) output is the complement of the channel (n) output."]
1455    #[inline]
1456    pub fn _1(self) -> &'a mut W {
1457        self.variant(COMP0W::_1)
1458    }
1459    #[doc = r" Sets the field bit"]
1460    pub fn set_bit(self) -> &'a mut W {
1461        self.bit(true)
1462    }
1463    #[doc = r" Clears the field bit"]
1464    pub fn clear_bit(self) -> &'a mut W {
1465        self.bit(false)
1466    }
1467    #[doc = r" Writes raw bits to the field"]
1468    #[inline]
1469    pub fn bit(self, value: bool) -> &'a mut W {
1470        const MASK: bool = true;
1471        const OFFSET: u8 = 1;
1472        self.w.bits &= !((MASK as u32) << OFFSET);
1473        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1474        self.w
1475    }
1476}
1477#[doc = "Values that can be written to the field `DECAPEN0`"]
1478pub enum DECAPEN0W {
1479    #[doc = "The dual edge capture mode in this pair of channels is disabled."]
1480    _0,
1481    #[doc = "The dual edge capture mode in this pair of channels is enabled."]
1482    _1,
1483}
1484impl DECAPEN0W {
1485    #[allow(missing_docs)]
1486    #[doc(hidden)]
1487    #[inline]
1488    pub fn _bits(&self) -> bool {
1489        match *self {
1490            DECAPEN0W::_0 => false,
1491            DECAPEN0W::_1 => true,
1492        }
1493    }
1494}
1495#[doc = r" Proxy"]
1496pub struct _DECAPEN0W<'a> {
1497    w: &'a mut W,
1498}
1499impl<'a> _DECAPEN0W<'a> {
1500    #[doc = r" Writes `variant` to the field"]
1501    #[inline]
1502    pub fn variant(self, variant: DECAPEN0W) -> &'a mut W {
1503        {
1504            self.bit(variant._bits())
1505        }
1506    }
1507    #[doc = "The dual edge capture mode in this pair of channels is disabled."]
1508    #[inline]
1509    pub fn _0(self) -> &'a mut W {
1510        self.variant(DECAPEN0W::_0)
1511    }
1512    #[doc = "The dual edge capture mode in this pair of channels is enabled."]
1513    #[inline]
1514    pub fn _1(self) -> &'a mut W {
1515        self.variant(DECAPEN0W::_1)
1516    }
1517    #[doc = r" Sets the field bit"]
1518    pub fn set_bit(self) -> &'a mut W {
1519        self.bit(true)
1520    }
1521    #[doc = r" Clears the field bit"]
1522    pub fn clear_bit(self) -> &'a mut W {
1523        self.bit(false)
1524    }
1525    #[doc = r" Writes raw bits to the field"]
1526    #[inline]
1527    pub fn bit(self, value: bool) -> &'a mut W {
1528        const MASK: bool = true;
1529        const OFFSET: u8 = 2;
1530        self.w.bits &= !((MASK as u32) << OFFSET);
1531        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1532        self.w
1533    }
1534}
1535#[doc = "Values that can be written to the field `DECAP0`"]
1536pub enum DECAP0W {
1537    #[doc = "The dual edge captures are inactive."]
1538    _0,
1539    #[doc = "The dual edge captures are active."]
1540    _1,
1541}
1542impl DECAP0W {
1543    #[allow(missing_docs)]
1544    #[doc(hidden)]
1545    #[inline]
1546    pub fn _bits(&self) -> bool {
1547        match *self {
1548            DECAP0W::_0 => false,
1549            DECAP0W::_1 => true,
1550        }
1551    }
1552}
1553#[doc = r" Proxy"]
1554pub struct _DECAP0W<'a> {
1555    w: &'a mut W,
1556}
1557impl<'a> _DECAP0W<'a> {
1558    #[doc = r" Writes `variant` to the field"]
1559    #[inline]
1560    pub fn variant(self, variant: DECAP0W) -> &'a mut W {
1561        {
1562            self.bit(variant._bits())
1563        }
1564    }
1565    #[doc = "The dual edge captures are inactive."]
1566    #[inline]
1567    pub fn _0(self) -> &'a mut W {
1568        self.variant(DECAP0W::_0)
1569    }
1570    #[doc = "The dual edge captures are active."]
1571    #[inline]
1572    pub fn _1(self) -> &'a mut W {
1573        self.variant(DECAP0W::_1)
1574    }
1575    #[doc = r" Sets the field bit"]
1576    pub fn set_bit(self) -> &'a mut W {
1577        self.bit(true)
1578    }
1579    #[doc = r" Clears the field bit"]
1580    pub fn clear_bit(self) -> &'a mut W {
1581        self.bit(false)
1582    }
1583    #[doc = r" Writes raw bits to the field"]
1584    #[inline]
1585    pub fn bit(self, value: bool) -> &'a mut W {
1586        const MASK: bool = true;
1587        const OFFSET: u8 = 3;
1588        self.w.bits &= !((MASK as u32) << OFFSET);
1589        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1590        self.w
1591    }
1592}
1593#[doc = "Values that can be written to the field `DTEN0`"]
1594pub enum DTEN0W {
1595    #[doc = "The deadtime insertion in this pair of channels is disabled."]
1596    _0,
1597    #[doc = "The deadtime insertion in this pair of channels is enabled."]
1598    _1,
1599}
1600impl DTEN0W {
1601    #[allow(missing_docs)]
1602    #[doc(hidden)]
1603    #[inline]
1604    pub fn _bits(&self) -> bool {
1605        match *self {
1606            DTEN0W::_0 => false,
1607            DTEN0W::_1 => true,
1608        }
1609    }
1610}
1611#[doc = r" Proxy"]
1612pub struct _DTEN0W<'a> {
1613    w: &'a mut W,
1614}
1615impl<'a> _DTEN0W<'a> {
1616    #[doc = r" Writes `variant` to the field"]
1617    #[inline]
1618    pub fn variant(self, variant: DTEN0W) -> &'a mut W {
1619        {
1620            self.bit(variant._bits())
1621        }
1622    }
1623    #[doc = "The deadtime insertion in this pair of channels is disabled."]
1624    #[inline]
1625    pub fn _0(self) -> &'a mut W {
1626        self.variant(DTEN0W::_0)
1627    }
1628    #[doc = "The deadtime insertion in this pair of channels is enabled."]
1629    #[inline]
1630    pub fn _1(self) -> &'a mut W {
1631        self.variant(DTEN0W::_1)
1632    }
1633    #[doc = r" Sets the field bit"]
1634    pub fn set_bit(self) -> &'a mut W {
1635        self.bit(true)
1636    }
1637    #[doc = r" Clears the field bit"]
1638    pub fn clear_bit(self) -> &'a mut W {
1639        self.bit(false)
1640    }
1641    #[doc = r" Writes raw bits to the field"]
1642    #[inline]
1643    pub fn bit(self, value: bool) -> &'a mut W {
1644        const MASK: bool = true;
1645        const OFFSET: u8 = 4;
1646        self.w.bits &= !((MASK as u32) << OFFSET);
1647        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1648        self.w
1649    }
1650}
1651#[doc = "Values that can be written to the field `SYNCEN0`"]
1652pub enum SYNCEN0W {
1653    #[doc = "The PWM synchronization in this pair of channels is disabled."]
1654    _0,
1655    #[doc = "The PWM synchronization in this pair of channels is enabled."]
1656    _1,
1657}
1658impl SYNCEN0W {
1659    #[allow(missing_docs)]
1660    #[doc(hidden)]
1661    #[inline]
1662    pub fn _bits(&self) -> bool {
1663        match *self {
1664            SYNCEN0W::_0 => false,
1665            SYNCEN0W::_1 => true,
1666        }
1667    }
1668}
1669#[doc = r" Proxy"]
1670pub struct _SYNCEN0W<'a> {
1671    w: &'a mut W,
1672}
1673impl<'a> _SYNCEN0W<'a> {
1674    #[doc = r" Writes `variant` to the field"]
1675    #[inline]
1676    pub fn variant(self, variant: SYNCEN0W) -> &'a mut W {
1677        {
1678            self.bit(variant._bits())
1679        }
1680    }
1681    #[doc = "The PWM synchronization in this pair of channels is disabled."]
1682    #[inline]
1683    pub fn _0(self) -> &'a mut W {
1684        self.variant(SYNCEN0W::_0)
1685    }
1686    #[doc = "The PWM synchronization in this pair of channels is enabled."]
1687    #[inline]
1688    pub fn _1(self) -> &'a mut W {
1689        self.variant(SYNCEN0W::_1)
1690    }
1691    #[doc = r" Sets the field bit"]
1692    pub fn set_bit(self) -> &'a mut W {
1693        self.bit(true)
1694    }
1695    #[doc = r" Clears the field bit"]
1696    pub fn clear_bit(self) -> &'a mut W {
1697        self.bit(false)
1698    }
1699    #[doc = r" Writes raw bits to the field"]
1700    #[inline]
1701    pub fn bit(self, value: bool) -> &'a mut W {
1702        const MASK: bool = true;
1703        const OFFSET: u8 = 5;
1704        self.w.bits &= !((MASK as u32) << OFFSET);
1705        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1706        self.w
1707    }
1708}
1709#[doc = "Values that can be written to the field `FAULTEN0`"]
1710pub enum FAULTEN0W {
1711    #[doc = "The fault control in this pair of channels is disabled."]
1712    _0,
1713    #[doc = "The fault control in this pair of channels is enabled."]
1714    _1,
1715}
1716impl FAULTEN0W {
1717    #[allow(missing_docs)]
1718    #[doc(hidden)]
1719    #[inline]
1720    pub fn _bits(&self) -> bool {
1721        match *self {
1722            FAULTEN0W::_0 => false,
1723            FAULTEN0W::_1 => true,
1724        }
1725    }
1726}
1727#[doc = r" Proxy"]
1728pub struct _FAULTEN0W<'a> {
1729    w: &'a mut W,
1730}
1731impl<'a> _FAULTEN0W<'a> {
1732    #[doc = r" Writes `variant` to the field"]
1733    #[inline]
1734    pub fn variant(self, variant: FAULTEN0W) -> &'a mut W {
1735        {
1736            self.bit(variant._bits())
1737        }
1738    }
1739    #[doc = "The fault control in this pair of channels is disabled."]
1740    #[inline]
1741    pub fn _0(self) -> &'a mut W {
1742        self.variant(FAULTEN0W::_0)
1743    }
1744    #[doc = "The fault control in this pair of channels is enabled."]
1745    #[inline]
1746    pub fn _1(self) -> &'a mut W {
1747        self.variant(FAULTEN0W::_1)
1748    }
1749    #[doc = r" Sets the field bit"]
1750    pub fn set_bit(self) -> &'a mut W {
1751        self.bit(true)
1752    }
1753    #[doc = r" Clears the field bit"]
1754    pub fn clear_bit(self) -> &'a mut W {
1755        self.bit(false)
1756    }
1757    #[doc = r" Writes raw bits to the field"]
1758    #[inline]
1759    pub fn bit(self, value: bool) -> &'a mut W {
1760        const MASK: bool = true;
1761        const OFFSET: u8 = 6;
1762        self.w.bits &= !((MASK as u32) << OFFSET);
1763        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1764        self.w
1765    }
1766}
1767#[doc = "Values that can be written to the field `COMBINE1`"]
1768pub enum COMBINE1W {
1769    #[doc = "Channels (n) and (n+1) are independent."]
1770    _0,
1771    #[doc = "Channels (n) and (n+1) are combined."]
1772    _1,
1773}
1774impl COMBINE1W {
1775    #[allow(missing_docs)]
1776    #[doc(hidden)]
1777    #[inline]
1778    pub fn _bits(&self) -> bool {
1779        match *self {
1780            COMBINE1W::_0 => false,
1781            COMBINE1W::_1 => true,
1782        }
1783    }
1784}
1785#[doc = r" Proxy"]
1786pub struct _COMBINE1W<'a> {
1787    w: &'a mut W,
1788}
1789impl<'a> _COMBINE1W<'a> {
1790    #[doc = r" Writes `variant` to the field"]
1791    #[inline]
1792    pub fn variant(self, variant: COMBINE1W) -> &'a mut W {
1793        {
1794            self.bit(variant._bits())
1795        }
1796    }
1797    #[doc = "Channels (n) and (n+1) are independent."]
1798    #[inline]
1799    pub fn _0(self) -> &'a mut W {
1800        self.variant(COMBINE1W::_0)
1801    }
1802    #[doc = "Channels (n) and (n+1) are combined."]
1803    #[inline]
1804    pub fn _1(self) -> &'a mut W {
1805        self.variant(COMBINE1W::_1)
1806    }
1807    #[doc = r" Sets the field bit"]
1808    pub fn set_bit(self) -> &'a mut W {
1809        self.bit(true)
1810    }
1811    #[doc = r" Clears the field bit"]
1812    pub fn clear_bit(self) -> &'a mut W {
1813        self.bit(false)
1814    }
1815    #[doc = r" Writes raw bits to the field"]
1816    #[inline]
1817    pub fn bit(self, value: bool) -> &'a mut W {
1818        const MASK: bool = true;
1819        const OFFSET: u8 = 8;
1820        self.w.bits &= !((MASK as u32) << OFFSET);
1821        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1822        self.w
1823    }
1824}
1825#[doc = "Values that can be written to the field `COMP1`"]
1826pub enum COMP1W {
1827    #[doc = "The channel (n+1) output is the same as the channel (n) output."]
1828    _0,
1829    #[doc = "The channel (n+1) output is the complement of the channel (n) output."]
1830    _1,
1831}
1832impl COMP1W {
1833    #[allow(missing_docs)]
1834    #[doc(hidden)]
1835    #[inline]
1836    pub fn _bits(&self) -> bool {
1837        match *self {
1838            COMP1W::_0 => false,
1839            COMP1W::_1 => true,
1840        }
1841    }
1842}
1843#[doc = r" Proxy"]
1844pub struct _COMP1W<'a> {
1845    w: &'a mut W,
1846}
1847impl<'a> _COMP1W<'a> {
1848    #[doc = r" Writes `variant` to the field"]
1849    #[inline]
1850    pub fn variant(self, variant: COMP1W) -> &'a mut W {
1851        {
1852            self.bit(variant._bits())
1853        }
1854    }
1855    #[doc = "The channel (n+1) output is the same as the channel (n) output."]
1856    #[inline]
1857    pub fn _0(self) -> &'a mut W {
1858        self.variant(COMP1W::_0)
1859    }
1860    #[doc = "The channel (n+1) output is the complement of the channel (n) output."]
1861    #[inline]
1862    pub fn _1(self) -> &'a mut W {
1863        self.variant(COMP1W::_1)
1864    }
1865    #[doc = r" Sets the field bit"]
1866    pub fn set_bit(self) -> &'a mut W {
1867        self.bit(true)
1868    }
1869    #[doc = r" Clears the field bit"]
1870    pub fn clear_bit(self) -> &'a mut W {
1871        self.bit(false)
1872    }
1873    #[doc = r" Writes raw bits to the field"]
1874    #[inline]
1875    pub fn bit(self, value: bool) -> &'a mut W {
1876        const MASK: bool = true;
1877        const OFFSET: u8 = 9;
1878        self.w.bits &= !((MASK as u32) << OFFSET);
1879        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1880        self.w
1881    }
1882}
1883#[doc = "Values that can be written to the field `DECAPEN1`"]
1884pub enum DECAPEN1W {
1885    #[doc = "The dual edge capture mode in this pair of channels is disabled."]
1886    _0,
1887    #[doc = "The dual edge capture mode in this pair of channels is enabled."]
1888    _1,
1889}
1890impl DECAPEN1W {
1891    #[allow(missing_docs)]
1892    #[doc(hidden)]
1893    #[inline]
1894    pub fn _bits(&self) -> bool {
1895        match *self {
1896            DECAPEN1W::_0 => false,
1897            DECAPEN1W::_1 => true,
1898        }
1899    }
1900}
1901#[doc = r" Proxy"]
1902pub struct _DECAPEN1W<'a> {
1903    w: &'a mut W,
1904}
1905impl<'a> _DECAPEN1W<'a> {
1906    #[doc = r" Writes `variant` to the field"]
1907    #[inline]
1908    pub fn variant(self, variant: DECAPEN1W) -> &'a mut W {
1909        {
1910            self.bit(variant._bits())
1911        }
1912    }
1913    #[doc = "The dual edge capture mode in this pair of channels is disabled."]
1914    #[inline]
1915    pub fn _0(self) -> &'a mut W {
1916        self.variant(DECAPEN1W::_0)
1917    }
1918    #[doc = "The dual edge capture mode in this pair of channels is enabled."]
1919    #[inline]
1920    pub fn _1(self) -> &'a mut W {
1921        self.variant(DECAPEN1W::_1)
1922    }
1923    #[doc = r" Sets the field bit"]
1924    pub fn set_bit(self) -> &'a mut W {
1925        self.bit(true)
1926    }
1927    #[doc = r" Clears the field bit"]
1928    pub fn clear_bit(self) -> &'a mut W {
1929        self.bit(false)
1930    }
1931    #[doc = r" Writes raw bits to the field"]
1932    #[inline]
1933    pub fn bit(self, value: bool) -> &'a mut W {
1934        const MASK: bool = true;
1935        const OFFSET: u8 = 10;
1936        self.w.bits &= !((MASK as u32) << OFFSET);
1937        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1938        self.w
1939    }
1940}
1941#[doc = "Values that can be written to the field `DECAP1`"]
1942pub enum DECAP1W {
1943    #[doc = "The dual edge captures are inactive."]
1944    _0,
1945    #[doc = "The dual edge captures are active."]
1946    _1,
1947}
1948impl DECAP1W {
1949    #[allow(missing_docs)]
1950    #[doc(hidden)]
1951    #[inline]
1952    pub fn _bits(&self) -> bool {
1953        match *self {
1954            DECAP1W::_0 => false,
1955            DECAP1W::_1 => true,
1956        }
1957    }
1958}
1959#[doc = r" Proxy"]
1960pub struct _DECAP1W<'a> {
1961    w: &'a mut W,
1962}
1963impl<'a> _DECAP1W<'a> {
1964    #[doc = r" Writes `variant` to the field"]
1965    #[inline]
1966    pub fn variant(self, variant: DECAP1W) -> &'a mut W {
1967        {
1968            self.bit(variant._bits())
1969        }
1970    }
1971    #[doc = "The dual edge captures are inactive."]
1972    #[inline]
1973    pub fn _0(self) -> &'a mut W {
1974        self.variant(DECAP1W::_0)
1975    }
1976    #[doc = "The dual edge captures are active."]
1977    #[inline]
1978    pub fn _1(self) -> &'a mut W {
1979        self.variant(DECAP1W::_1)
1980    }
1981    #[doc = r" Sets the field bit"]
1982    pub fn set_bit(self) -> &'a mut W {
1983        self.bit(true)
1984    }
1985    #[doc = r" Clears the field bit"]
1986    pub fn clear_bit(self) -> &'a mut W {
1987        self.bit(false)
1988    }
1989    #[doc = r" Writes raw bits to the field"]
1990    #[inline]
1991    pub fn bit(self, value: bool) -> &'a mut W {
1992        const MASK: bool = true;
1993        const OFFSET: u8 = 11;
1994        self.w.bits &= !((MASK as u32) << OFFSET);
1995        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1996        self.w
1997    }
1998}
1999#[doc = "Values that can be written to the field `DTEN1`"]
2000pub enum DTEN1W {
2001    #[doc = "The deadtime insertion in this pair of channels is disabled."]
2002    _0,
2003    #[doc = "The deadtime insertion in this pair of channels is enabled."]
2004    _1,
2005}
2006impl DTEN1W {
2007    #[allow(missing_docs)]
2008    #[doc(hidden)]
2009    #[inline]
2010    pub fn _bits(&self) -> bool {
2011        match *self {
2012            DTEN1W::_0 => false,
2013            DTEN1W::_1 => true,
2014        }
2015    }
2016}
2017#[doc = r" Proxy"]
2018pub struct _DTEN1W<'a> {
2019    w: &'a mut W,
2020}
2021impl<'a> _DTEN1W<'a> {
2022    #[doc = r" Writes `variant` to the field"]
2023    #[inline]
2024    pub fn variant(self, variant: DTEN1W) -> &'a mut W {
2025        {
2026            self.bit(variant._bits())
2027        }
2028    }
2029    #[doc = "The deadtime insertion in this pair of channels is disabled."]
2030    #[inline]
2031    pub fn _0(self) -> &'a mut W {
2032        self.variant(DTEN1W::_0)
2033    }
2034    #[doc = "The deadtime insertion in this pair of channels is enabled."]
2035    #[inline]
2036    pub fn _1(self) -> &'a mut W {
2037        self.variant(DTEN1W::_1)
2038    }
2039    #[doc = r" Sets the field bit"]
2040    pub fn set_bit(self) -> &'a mut W {
2041        self.bit(true)
2042    }
2043    #[doc = r" Clears the field bit"]
2044    pub fn clear_bit(self) -> &'a mut W {
2045        self.bit(false)
2046    }
2047    #[doc = r" Writes raw bits to the field"]
2048    #[inline]
2049    pub fn bit(self, value: bool) -> &'a mut W {
2050        const MASK: bool = true;
2051        const OFFSET: u8 = 12;
2052        self.w.bits &= !((MASK as u32) << OFFSET);
2053        self.w.bits |= ((value & MASK) as u32) << OFFSET;
2054        self.w
2055    }
2056}
2057#[doc = "Values that can be written to the field `SYNCEN1`"]
2058pub enum SYNCEN1W {
2059    #[doc = "The PWM synchronization in this pair of channels is disabled."]
2060    _0,
2061    #[doc = "The PWM synchronization in this pair of channels is enabled."]
2062    _1,
2063}
2064impl SYNCEN1W {
2065    #[allow(missing_docs)]
2066    #[doc(hidden)]
2067    #[inline]
2068    pub fn _bits(&self) -> bool {
2069        match *self {
2070            SYNCEN1W::_0 => false,
2071            SYNCEN1W::_1 => true,
2072        }
2073    }
2074}
2075#[doc = r" Proxy"]
2076pub struct _SYNCEN1W<'a> {
2077    w: &'a mut W,
2078}
2079impl<'a> _SYNCEN1W<'a> {
2080    #[doc = r" Writes `variant` to the field"]
2081    #[inline]
2082    pub fn variant(self, variant: SYNCEN1W) -> &'a mut W {
2083        {
2084            self.bit(variant._bits())
2085        }
2086    }
2087    #[doc = "The PWM synchronization in this pair of channels is disabled."]
2088    #[inline]
2089    pub fn _0(self) -> &'a mut W {
2090        self.variant(SYNCEN1W::_0)
2091    }
2092    #[doc = "The PWM synchronization in this pair of channels is enabled."]
2093    #[inline]
2094    pub fn _1(self) -> &'a mut W {
2095        self.variant(SYNCEN1W::_1)
2096    }
2097    #[doc = r" Sets the field bit"]
2098    pub fn set_bit(self) -> &'a mut W {
2099        self.bit(true)
2100    }
2101    #[doc = r" Clears the field bit"]
2102    pub fn clear_bit(self) -> &'a mut W {
2103        self.bit(false)
2104    }
2105    #[doc = r" Writes raw bits to the field"]
2106    #[inline]
2107    pub fn bit(self, value: bool) -> &'a mut W {
2108        const MASK: bool = true;
2109        const OFFSET: u8 = 13;
2110        self.w.bits &= !((MASK as u32) << OFFSET);
2111        self.w.bits |= ((value & MASK) as u32) << OFFSET;
2112        self.w
2113    }
2114}
2115#[doc = "Values that can be written to the field `FAULTEN1`"]
2116pub enum FAULTEN1W {
2117    #[doc = "The fault control in this pair of channels is disabled."]
2118    _0,
2119    #[doc = "The fault control in this pair of channels is enabled."]
2120    _1,
2121}
2122impl FAULTEN1W {
2123    #[allow(missing_docs)]
2124    #[doc(hidden)]
2125    #[inline]
2126    pub fn _bits(&self) -> bool {
2127        match *self {
2128            FAULTEN1W::_0 => false,
2129            FAULTEN1W::_1 => true,
2130        }
2131    }
2132}
2133#[doc = r" Proxy"]
2134pub struct _FAULTEN1W<'a> {
2135    w: &'a mut W,
2136}
2137impl<'a> _FAULTEN1W<'a> {
2138    #[doc = r" Writes `variant` to the field"]
2139    #[inline]
2140    pub fn variant(self, variant: FAULTEN1W) -> &'a mut W {
2141        {
2142            self.bit(variant._bits())
2143        }
2144    }
2145    #[doc = "The fault control in this pair of channels is disabled."]
2146    #[inline]
2147    pub fn _0(self) -> &'a mut W {
2148        self.variant(FAULTEN1W::_0)
2149    }
2150    #[doc = "The fault control in this pair of channels is enabled."]
2151    #[inline]
2152    pub fn _1(self) -> &'a mut W {
2153        self.variant(FAULTEN1W::_1)
2154    }
2155    #[doc = r" Sets the field bit"]
2156    pub fn set_bit(self) -> &'a mut W {
2157        self.bit(true)
2158    }
2159    #[doc = r" Clears the field bit"]
2160    pub fn clear_bit(self) -> &'a mut W {
2161        self.bit(false)
2162    }
2163    #[doc = r" Writes raw bits to the field"]
2164    #[inline]
2165    pub fn bit(self, value: bool) -> &'a mut W {
2166        const MASK: bool = true;
2167        const OFFSET: u8 = 14;
2168        self.w.bits &= !((MASK as u32) << OFFSET);
2169        self.w.bits |= ((value & MASK) as u32) << OFFSET;
2170        self.w
2171    }
2172}
2173#[doc = "Values that can be written to the field `COMBINE2`"]
2174pub enum COMBINE2W {
2175    #[doc = "Channels (n) and (n+1) are independent."]
2176    _0,
2177    #[doc = "Channels (n) and (n+1) are combined."]
2178    _1,
2179}
2180impl COMBINE2W {
2181    #[allow(missing_docs)]
2182    #[doc(hidden)]
2183    #[inline]
2184    pub fn _bits(&self) -> bool {
2185        match *self {
2186            COMBINE2W::_0 => false,
2187            COMBINE2W::_1 => true,
2188        }
2189    }
2190}
2191#[doc = r" Proxy"]
2192pub struct _COMBINE2W<'a> {
2193    w: &'a mut W,
2194}
2195impl<'a> _COMBINE2W<'a> {
2196    #[doc = r" Writes `variant` to the field"]
2197    #[inline]
2198    pub fn variant(self, variant: COMBINE2W) -> &'a mut W {
2199        {
2200            self.bit(variant._bits())
2201        }
2202    }
2203    #[doc = "Channels (n) and (n+1) are independent."]
2204    #[inline]
2205    pub fn _0(self) -> &'a mut W {
2206        self.variant(COMBINE2W::_0)
2207    }
2208    #[doc = "Channels (n) and (n+1) are combined."]
2209    #[inline]
2210    pub fn _1(self) -> &'a mut W {
2211        self.variant(COMBINE2W::_1)
2212    }
2213    #[doc = r" Sets the field bit"]
2214    pub fn set_bit(self) -> &'a mut W {
2215        self.bit(true)
2216    }
2217    #[doc = r" Clears the field bit"]
2218    pub fn clear_bit(self) -> &'a mut W {
2219        self.bit(false)
2220    }
2221    #[doc = r" Writes raw bits to the field"]
2222    #[inline]
2223    pub fn bit(self, value: bool) -> &'a mut W {
2224        const MASK: bool = true;
2225        const OFFSET: u8 = 16;
2226        self.w.bits &= !((MASK as u32) << OFFSET);
2227        self.w.bits |= ((value & MASK) as u32) << OFFSET;
2228        self.w
2229    }
2230}
2231#[doc = "Values that can be written to the field `COMP2`"]
2232pub enum COMP2W {
2233    #[doc = "The channel (n+1) output is the same as the channel (n) output."]
2234    _0,
2235    #[doc = "The channel (n+1) output is the complement of the channel (n) output."]
2236    _1,
2237}
2238impl COMP2W {
2239    #[allow(missing_docs)]
2240    #[doc(hidden)]
2241    #[inline]
2242    pub fn _bits(&self) -> bool {
2243        match *self {
2244            COMP2W::_0 => false,
2245            COMP2W::_1 => true,
2246        }
2247    }
2248}
2249#[doc = r" Proxy"]
2250pub struct _COMP2W<'a> {
2251    w: &'a mut W,
2252}
2253impl<'a> _COMP2W<'a> {
2254    #[doc = r" Writes `variant` to the field"]
2255    #[inline]
2256    pub fn variant(self, variant: COMP2W) -> &'a mut W {
2257        {
2258            self.bit(variant._bits())
2259        }
2260    }
2261    #[doc = "The channel (n+1) output is the same as the channel (n) output."]
2262    #[inline]
2263    pub fn _0(self) -> &'a mut W {
2264        self.variant(COMP2W::_0)
2265    }
2266    #[doc = "The channel (n+1) output is the complement of the channel (n) output."]
2267    #[inline]
2268    pub fn _1(self) -> &'a mut W {
2269        self.variant(COMP2W::_1)
2270    }
2271    #[doc = r" Sets the field bit"]
2272    pub fn set_bit(self) -> &'a mut W {
2273        self.bit(true)
2274    }
2275    #[doc = r" Clears the field bit"]
2276    pub fn clear_bit(self) -> &'a mut W {
2277        self.bit(false)
2278    }
2279    #[doc = r" Writes raw bits to the field"]
2280    #[inline]
2281    pub fn bit(self, value: bool) -> &'a mut W {
2282        const MASK: bool = true;
2283        const OFFSET: u8 = 17;
2284        self.w.bits &= !((MASK as u32) << OFFSET);
2285        self.w.bits |= ((value & MASK) as u32) << OFFSET;
2286        self.w
2287    }
2288}
2289#[doc = "Values that can be written to the field `DECAPEN2`"]
2290pub enum DECAPEN2W {
2291    #[doc = "The dual edge capture mode in this pair of channels is disabled."]
2292    _0,
2293    #[doc = "The dual edge capture mode in this pair of channels is enabled."]
2294    _1,
2295}
2296impl DECAPEN2W {
2297    #[allow(missing_docs)]
2298    #[doc(hidden)]
2299    #[inline]
2300    pub fn _bits(&self) -> bool {
2301        match *self {
2302            DECAPEN2W::_0 => false,
2303            DECAPEN2W::_1 => true,
2304        }
2305    }
2306}
2307#[doc = r" Proxy"]
2308pub struct _DECAPEN2W<'a> {
2309    w: &'a mut W,
2310}
2311impl<'a> _DECAPEN2W<'a> {
2312    #[doc = r" Writes `variant` to the field"]
2313    #[inline]
2314    pub fn variant(self, variant: DECAPEN2W) -> &'a mut W {
2315        {
2316            self.bit(variant._bits())
2317        }
2318    }
2319    #[doc = "The dual edge capture mode in this pair of channels is disabled."]
2320    #[inline]
2321    pub fn _0(self) -> &'a mut W {
2322        self.variant(DECAPEN2W::_0)
2323    }
2324    #[doc = "The dual edge capture mode in this pair of channels is enabled."]
2325    #[inline]
2326    pub fn _1(self) -> &'a mut W {
2327        self.variant(DECAPEN2W::_1)
2328    }
2329    #[doc = r" Sets the field bit"]
2330    pub fn set_bit(self) -> &'a mut W {
2331        self.bit(true)
2332    }
2333    #[doc = r" Clears the field bit"]
2334    pub fn clear_bit(self) -> &'a mut W {
2335        self.bit(false)
2336    }
2337    #[doc = r" Writes raw bits to the field"]
2338    #[inline]
2339    pub fn bit(self, value: bool) -> &'a mut W {
2340        const MASK: bool = true;
2341        const OFFSET: u8 = 18;
2342        self.w.bits &= !((MASK as u32) << OFFSET);
2343        self.w.bits |= ((value & MASK) as u32) << OFFSET;
2344        self.w
2345    }
2346}
2347#[doc = "Values that can be written to the field `DECAP2`"]
2348pub enum DECAP2W {
2349    #[doc = "The dual edge captures are inactive."]
2350    _0,
2351    #[doc = "The dual edge captures are active."]
2352    _1,
2353}
2354impl DECAP2W {
2355    #[allow(missing_docs)]
2356    #[doc(hidden)]
2357    #[inline]
2358    pub fn _bits(&self) -> bool {
2359        match *self {
2360            DECAP2W::_0 => false,
2361            DECAP2W::_1 => true,
2362        }
2363    }
2364}
2365#[doc = r" Proxy"]
2366pub struct _DECAP2W<'a> {
2367    w: &'a mut W,
2368}
2369impl<'a> _DECAP2W<'a> {
2370    #[doc = r" Writes `variant` to the field"]
2371    #[inline]
2372    pub fn variant(self, variant: DECAP2W) -> &'a mut W {
2373        {
2374            self.bit(variant._bits())
2375        }
2376    }
2377    #[doc = "The dual edge captures are inactive."]
2378    #[inline]
2379    pub fn _0(self) -> &'a mut W {
2380        self.variant(DECAP2W::_0)
2381    }
2382    #[doc = "The dual edge captures are active."]
2383    #[inline]
2384    pub fn _1(self) -> &'a mut W {
2385        self.variant(DECAP2W::_1)
2386    }
2387    #[doc = r" Sets the field bit"]
2388    pub fn set_bit(self) -> &'a mut W {
2389        self.bit(true)
2390    }
2391    #[doc = r" Clears the field bit"]
2392    pub fn clear_bit(self) -> &'a mut W {
2393        self.bit(false)
2394    }
2395    #[doc = r" Writes raw bits to the field"]
2396    #[inline]
2397    pub fn bit(self, value: bool) -> &'a mut W {
2398        const MASK: bool = true;
2399        const OFFSET: u8 = 19;
2400        self.w.bits &= !((MASK as u32) << OFFSET);
2401        self.w.bits |= ((value & MASK) as u32) << OFFSET;
2402        self.w
2403    }
2404}
2405#[doc = "Values that can be written to the field `DTEN2`"]
2406pub enum DTEN2W {
2407    #[doc = "The deadtime insertion in this pair of channels is disabled."]
2408    _0,
2409    #[doc = "The deadtime insertion in this pair of channels is enabled."]
2410    _1,
2411}
2412impl DTEN2W {
2413    #[allow(missing_docs)]
2414    #[doc(hidden)]
2415    #[inline]
2416    pub fn _bits(&self) -> bool {
2417        match *self {
2418            DTEN2W::_0 => false,
2419            DTEN2W::_1 => true,
2420        }
2421    }
2422}
2423#[doc = r" Proxy"]
2424pub struct _DTEN2W<'a> {
2425    w: &'a mut W,
2426}
2427impl<'a> _DTEN2W<'a> {
2428    #[doc = r" Writes `variant` to the field"]
2429    #[inline]
2430    pub fn variant(self, variant: DTEN2W) -> &'a mut W {
2431        {
2432            self.bit(variant._bits())
2433        }
2434    }
2435    #[doc = "The deadtime insertion in this pair of channels is disabled."]
2436    #[inline]
2437    pub fn _0(self) -> &'a mut W {
2438        self.variant(DTEN2W::_0)
2439    }
2440    #[doc = "The deadtime insertion in this pair of channels is enabled."]
2441    #[inline]
2442    pub fn _1(self) -> &'a mut W {
2443        self.variant(DTEN2W::_1)
2444    }
2445    #[doc = r" Sets the field bit"]
2446    pub fn set_bit(self) -> &'a mut W {
2447        self.bit(true)
2448    }
2449    #[doc = r" Clears the field bit"]
2450    pub fn clear_bit(self) -> &'a mut W {
2451        self.bit(false)
2452    }
2453    #[doc = r" Writes raw bits to the field"]
2454    #[inline]
2455    pub fn bit(self, value: bool) -> &'a mut W {
2456        const MASK: bool = true;
2457        const OFFSET: u8 = 20;
2458        self.w.bits &= !((MASK as u32) << OFFSET);
2459        self.w.bits |= ((value & MASK) as u32) << OFFSET;
2460        self.w
2461    }
2462}
2463#[doc = "Values that can be written to the field `SYNCEN2`"]
2464pub enum SYNCEN2W {
2465    #[doc = "The PWM synchronization in this pair of channels is disabled."]
2466    _0,
2467    #[doc = "The PWM synchronization in this pair of channels is enabled."]
2468    _1,
2469}
2470impl SYNCEN2W {
2471    #[allow(missing_docs)]
2472    #[doc(hidden)]
2473    #[inline]
2474    pub fn _bits(&self) -> bool {
2475        match *self {
2476            SYNCEN2W::_0 => false,
2477            SYNCEN2W::_1 => true,
2478        }
2479    }
2480}
2481#[doc = r" Proxy"]
2482pub struct _SYNCEN2W<'a> {
2483    w: &'a mut W,
2484}
2485impl<'a> _SYNCEN2W<'a> {
2486    #[doc = r" Writes `variant` to the field"]
2487    #[inline]
2488    pub fn variant(self, variant: SYNCEN2W) -> &'a mut W {
2489        {
2490            self.bit(variant._bits())
2491        }
2492    }
2493    #[doc = "The PWM synchronization in this pair of channels is disabled."]
2494    #[inline]
2495    pub fn _0(self) -> &'a mut W {
2496        self.variant(SYNCEN2W::_0)
2497    }
2498    #[doc = "The PWM synchronization in this pair of channels is enabled."]
2499    #[inline]
2500    pub fn _1(self) -> &'a mut W {
2501        self.variant(SYNCEN2W::_1)
2502    }
2503    #[doc = r" Sets the field bit"]
2504    pub fn set_bit(self) -> &'a mut W {
2505        self.bit(true)
2506    }
2507    #[doc = r" Clears the field bit"]
2508    pub fn clear_bit(self) -> &'a mut W {
2509        self.bit(false)
2510    }
2511    #[doc = r" Writes raw bits to the field"]
2512    #[inline]
2513    pub fn bit(self, value: bool) -> &'a mut W {
2514        const MASK: bool = true;
2515        const OFFSET: u8 = 21;
2516        self.w.bits &= !((MASK as u32) << OFFSET);
2517        self.w.bits |= ((value & MASK) as u32) << OFFSET;
2518        self.w
2519    }
2520}
2521#[doc = "Values that can be written to the field `FAULTEN2`"]
2522pub enum FAULTEN2W {
2523    #[doc = "The fault control in this pair of channels is disabled."]
2524    _0,
2525    #[doc = "The fault control in this pair of channels is enabled."]
2526    _1,
2527}
2528impl FAULTEN2W {
2529    #[allow(missing_docs)]
2530    #[doc(hidden)]
2531    #[inline]
2532    pub fn _bits(&self) -> bool {
2533        match *self {
2534            FAULTEN2W::_0 => false,
2535            FAULTEN2W::_1 => true,
2536        }
2537    }
2538}
2539#[doc = r" Proxy"]
2540pub struct _FAULTEN2W<'a> {
2541    w: &'a mut W,
2542}
2543impl<'a> _FAULTEN2W<'a> {
2544    #[doc = r" Writes `variant` to the field"]
2545    #[inline]
2546    pub fn variant(self, variant: FAULTEN2W) -> &'a mut W {
2547        {
2548            self.bit(variant._bits())
2549        }
2550    }
2551    #[doc = "The fault control in this pair of channels is disabled."]
2552    #[inline]
2553    pub fn _0(self) -> &'a mut W {
2554        self.variant(FAULTEN2W::_0)
2555    }
2556    #[doc = "The fault control in this pair of channels is enabled."]
2557    #[inline]
2558    pub fn _1(self) -> &'a mut W {
2559        self.variant(FAULTEN2W::_1)
2560    }
2561    #[doc = r" Sets the field bit"]
2562    pub fn set_bit(self) -> &'a mut W {
2563        self.bit(true)
2564    }
2565    #[doc = r" Clears the field bit"]
2566    pub fn clear_bit(self) -> &'a mut W {
2567        self.bit(false)
2568    }
2569    #[doc = r" Writes raw bits to the field"]
2570    #[inline]
2571    pub fn bit(self, value: bool) -> &'a mut W {
2572        const MASK: bool = true;
2573        const OFFSET: u8 = 22;
2574        self.w.bits &= !((MASK as u32) << OFFSET);
2575        self.w.bits |= ((value & MASK) as u32) << OFFSET;
2576        self.w
2577    }
2578}
2579#[doc = "Values that can be written to the field `COMBINE3`"]
2580pub enum COMBINE3W {
2581    #[doc = "Channels (n) and (n+1) are independent."]
2582    _0,
2583    #[doc = "Channels (n) and (n+1) are combined."]
2584    _1,
2585}
2586impl COMBINE3W {
2587    #[allow(missing_docs)]
2588    #[doc(hidden)]
2589    #[inline]
2590    pub fn _bits(&self) -> bool {
2591        match *self {
2592            COMBINE3W::_0 => false,
2593            COMBINE3W::_1 => true,
2594        }
2595    }
2596}
2597#[doc = r" Proxy"]
2598pub struct _COMBINE3W<'a> {
2599    w: &'a mut W,
2600}
2601impl<'a> _COMBINE3W<'a> {
2602    #[doc = r" Writes `variant` to the field"]
2603    #[inline]
2604    pub fn variant(self, variant: COMBINE3W) -> &'a mut W {
2605        {
2606            self.bit(variant._bits())
2607        }
2608    }
2609    #[doc = "Channels (n) and (n+1) are independent."]
2610    #[inline]
2611    pub fn _0(self) -> &'a mut W {
2612        self.variant(COMBINE3W::_0)
2613    }
2614    #[doc = "Channels (n) and (n+1) are combined."]
2615    #[inline]
2616    pub fn _1(self) -> &'a mut W {
2617        self.variant(COMBINE3W::_1)
2618    }
2619    #[doc = r" Sets the field bit"]
2620    pub fn set_bit(self) -> &'a mut W {
2621        self.bit(true)
2622    }
2623    #[doc = r" Clears the field bit"]
2624    pub fn clear_bit(self) -> &'a mut W {
2625        self.bit(false)
2626    }
2627    #[doc = r" Writes raw bits to the field"]
2628    #[inline]
2629    pub fn bit(self, value: bool) -> &'a mut W {
2630        const MASK: bool = true;
2631        const OFFSET: u8 = 24;
2632        self.w.bits &= !((MASK as u32) << OFFSET);
2633        self.w.bits |= ((value & MASK) as u32) << OFFSET;
2634        self.w
2635    }
2636}
2637#[doc = "Values that can be written to the field `COMP3`"]
2638pub enum COMP3W {
2639    #[doc = "The channel (n+1) output is the same as the channel (n) output."]
2640    _0,
2641    #[doc = "The channel (n+1) output is the complement of the channel (n) output."]
2642    _1,
2643}
2644impl COMP3W {
2645    #[allow(missing_docs)]
2646    #[doc(hidden)]
2647    #[inline]
2648    pub fn _bits(&self) -> bool {
2649        match *self {
2650            COMP3W::_0 => false,
2651            COMP3W::_1 => true,
2652        }
2653    }
2654}
2655#[doc = r" Proxy"]
2656pub struct _COMP3W<'a> {
2657    w: &'a mut W,
2658}
2659impl<'a> _COMP3W<'a> {
2660    #[doc = r" Writes `variant` to the field"]
2661    #[inline]
2662    pub fn variant(self, variant: COMP3W) -> &'a mut W {
2663        {
2664            self.bit(variant._bits())
2665        }
2666    }
2667    #[doc = "The channel (n+1) output is the same as the channel (n) output."]
2668    #[inline]
2669    pub fn _0(self) -> &'a mut W {
2670        self.variant(COMP3W::_0)
2671    }
2672    #[doc = "The channel (n+1) output is the complement of the channel (n) output."]
2673    #[inline]
2674    pub fn _1(self) -> &'a mut W {
2675        self.variant(COMP3W::_1)
2676    }
2677    #[doc = r" Sets the field bit"]
2678    pub fn set_bit(self) -> &'a mut W {
2679        self.bit(true)
2680    }
2681    #[doc = r" Clears the field bit"]
2682    pub fn clear_bit(self) -> &'a mut W {
2683        self.bit(false)
2684    }
2685    #[doc = r" Writes raw bits to the field"]
2686    #[inline]
2687    pub fn bit(self, value: bool) -> &'a mut W {
2688        const MASK: bool = true;
2689        const OFFSET: u8 = 25;
2690        self.w.bits &= !((MASK as u32) << OFFSET);
2691        self.w.bits |= ((value & MASK) as u32) << OFFSET;
2692        self.w
2693    }
2694}
2695#[doc = "Values that can be written to the field `DECAPEN3`"]
2696pub enum DECAPEN3W {
2697    #[doc = "The dual edge capture mode in this pair of channels is disabled."]
2698    _0,
2699    #[doc = "The dual edge capture mode in this pair of channels is enabled."]
2700    _1,
2701}
2702impl DECAPEN3W {
2703    #[allow(missing_docs)]
2704    #[doc(hidden)]
2705    #[inline]
2706    pub fn _bits(&self) -> bool {
2707        match *self {
2708            DECAPEN3W::_0 => false,
2709            DECAPEN3W::_1 => true,
2710        }
2711    }
2712}
2713#[doc = r" Proxy"]
2714pub struct _DECAPEN3W<'a> {
2715    w: &'a mut W,
2716}
2717impl<'a> _DECAPEN3W<'a> {
2718    #[doc = r" Writes `variant` to the field"]
2719    #[inline]
2720    pub fn variant(self, variant: DECAPEN3W) -> &'a mut W {
2721        {
2722            self.bit(variant._bits())
2723        }
2724    }
2725    #[doc = "The dual edge capture mode in this pair of channels is disabled."]
2726    #[inline]
2727    pub fn _0(self) -> &'a mut W {
2728        self.variant(DECAPEN3W::_0)
2729    }
2730    #[doc = "The dual edge capture mode in this pair of channels is enabled."]
2731    #[inline]
2732    pub fn _1(self) -> &'a mut W {
2733        self.variant(DECAPEN3W::_1)
2734    }
2735    #[doc = r" Sets the field bit"]
2736    pub fn set_bit(self) -> &'a mut W {
2737        self.bit(true)
2738    }
2739    #[doc = r" Clears the field bit"]
2740    pub fn clear_bit(self) -> &'a mut W {
2741        self.bit(false)
2742    }
2743    #[doc = r" Writes raw bits to the field"]
2744    #[inline]
2745    pub fn bit(self, value: bool) -> &'a mut W {
2746        const MASK: bool = true;
2747        const OFFSET: u8 = 26;
2748        self.w.bits &= !((MASK as u32) << OFFSET);
2749        self.w.bits |= ((value & MASK) as u32) << OFFSET;
2750        self.w
2751    }
2752}
2753#[doc = "Values that can be written to the field `DECAP3`"]
2754pub enum DECAP3W {
2755    #[doc = "The dual edge captures are inactive."]
2756    _0,
2757    #[doc = "The dual edge captures are active."]
2758    _1,
2759}
2760impl DECAP3W {
2761    #[allow(missing_docs)]
2762    #[doc(hidden)]
2763    #[inline]
2764    pub fn _bits(&self) -> bool {
2765        match *self {
2766            DECAP3W::_0 => false,
2767            DECAP3W::_1 => true,
2768        }
2769    }
2770}
2771#[doc = r" Proxy"]
2772pub struct _DECAP3W<'a> {
2773    w: &'a mut W,
2774}
2775impl<'a> _DECAP3W<'a> {
2776    #[doc = r" Writes `variant` to the field"]
2777    #[inline]
2778    pub fn variant(self, variant: DECAP3W) -> &'a mut W {
2779        {
2780            self.bit(variant._bits())
2781        }
2782    }
2783    #[doc = "The dual edge captures are inactive."]
2784    #[inline]
2785    pub fn _0(self) -> &'a mut W {
2786        self.variant(DECAP3W::_0)
2787    }
2788    #[doc = "The dual edge captures are active."]
2789    #[inline]
2790    pub fn _1(self) -> &'a mut W {
2791        self.variant(DECAP3W::_1)
2792    }
2793    #[doc = r" Sets the field bit"]
2794    pub fn set_bit(self) -> &'a mut W {
2795        self.bit(true)
2796    }
2797    #[doc = r" Clears the field bit"]
2798    pub fn clear_bit(self) -> &'a mut W {
2799        self.bit(false)
2800    }
2801    #[doc = r" Writes raw bits to the field"]
2802    #[inline]
2803    pub fn bit(self, value: bool) -> &'a mut W {
2804        const MASK: bool = true;
2805        const OFFSET: u8 = 27;
2806        self.w.bits &= !((MASK as u32) << OFFSET);
2807        self.w.bits |= ((value & MASK) as u32) << OFFSET;
2808        self.w
2809    }
2810}
2811#[doc = "Values that can be written to the field `DTEN3`"]
2812pub enum DTEN3W {
2813    #[doc = "The deadtime insertion in this pair of channels is disabled."]
2814    _0,
2815    #[doc = "The deadtime insertion in this pair of channels is enabled."]
2816    _1,
2817}
2818impl DTEN3W {
2819    #[allow(missing_docs)]
2820    #[doc(hidden)]
2821    #[inline]
2822    pub fn _bits(&self) -> bool {
2823        match *self {
2824            DTEN3W::_0 => false,
2825            DTEN3W::_1 => true,
2826        }
2827    }
2828}
2829#[doc = r" Proxy"]
2830pub struct _DTEN3W<'a> {
2831    w: &'a mut W,
2832}
2833impl<'a> _DTEN3W<'a> {
2834    #[doc = r" Writes `variant` to the field"]
2835    #[inline]
2836    pub fn variant(self, variant: DTEN3W) -> &'a mut W {
2837        {
2838            self.bit(variant._bits())
2839        }
2840    }
2841    #[doc = "The deadtime insertion in this pair of channels is disabled."]
2842    #[inline]
2843    pub fn _0(self) -> &'a mut W {
2844        self.variant(DTEN3W::_0)
2845    }
2846    #[doc = "The deadtime insertion in this pair of channels is enabled."]
2847    #[inline]
2848    pub fn _1(self) -> &'a mut W {
2849        self.variant(DTEN3W::_1)
2850    }
2851    #[doc = r" Sets the field bit"]
2852    pub fn set_bit(self) -> &'a mut W {
2853        self.bit(true)
2854    }
2855    #[doc = r" Clears the field bit"]
2856    pub fn clear_bit(self) -> &'a mut W {
2857        self.bit(false)
2858    }
2859    #[doc = r" Writes raw bits to the field"]
2860    #[inline]
2861    pub fn bit(self, value: bool) -> &'a mut W {
2862        const MASK: bool = true;
2863        const OFFSET: u8 = 28;
2864        self.w.bits &= !((MASK as u32) << OFFSET);
2865        self.w.bits |= ((value & MASK) as u32) << OFFSET;
2866        self.w
2867    }
2868}
2869#[doc = "Values that can be written to the field `SYNCEN3`"]
2870pub enum SYNCEN3W {
2871    #[doc = "The PWM synchronization in this pair of channels is disabled."]
2872    _0,
2873    #[doc = "The PWM synchronization in this pair of channels is enabled."]
2874    _1,
2875}
2876impl SYNCEN3W {
2877    #[allow(missing_docs)]
2878    #[doc(hidden)]
2879    #[inline]
2880    pub fn _bits(&self) -> bool {
2881        match *self {
2882            SYNCEN3W::_0 => false,
2883            SYNCEN3W::_1 => true,
2884        }
2885    }
2886}
2887#[doc = r" Proxy"]
2888pub struct _SYNCEN3W<'a> {
2889    w: &'a mut W,
2890}
2891impl<'a> _SYNCEN3W<'a> {
2892    #[doc = r" Writes `variant` to the field"]
2893    #[inline]
2894    pub fn variant(self, variant: SYNCEN3W) -> &'a mut W {
2895        {
2896            self.bit(variant._bits())
2897        }
2898    }
2899    #[doc = "The PWM synchronization in this pair of channels is disabled."]
2900    #[inline]
2901    pub fn _0(self) -> &'a mut W {
2902        self.variant(SYNCEN3W::_0)
2903    }
2904    #[doc = "The PWM synchronization in this pair of channels is enabled."]
2905    #[inline]
2906    pub fn _1(self) -> &'a mut W {
2907        self.variant(SYNCEN3W::_1)
2908    }
2909    #[doc = r" Sets the field bit"]
2910    pub fn set_bit(self) -> &'a mut W {
2911        self.bit(true)
2912    }
2913    #[doc = r" Clears the field bit"]
2914    pub fn clear_bit(self) -> &'a mut W {
2915        self.bit(false)
2916    }
2917    #[doc = r" Writes raw bits to the field"]
2918    #[inline]
2919    pub fn bit(self, value: bool) -> &'a mut W {
2920        const MASK: bool = true;
2921        const OFFSET: u8 = 29;
2922        self.w.bits &= !((MASK as u32) << OFFSET);
2923        self.w.bits |= ((value & MASK) as u32) << OFFSET;
2924        self.w
2925    }
2926}
2927#[doc = "Values that can be written to the field `FAULTEN3`"]
2928pub enum FAULTEN3W {
2929    #[doc = "The fault control in this pair of channels is disabled."]
2930    _0,
2931    #[doc = "The fault control in this pair of channels is enabled."]
2932    _1,
2933}
2934impl FAULTEN3W {
2935    #[allow(missing_docs)]
2936    #[doc(hidden)]
2937    #[inline]
2938    pub fn _bits(&self) -> bool {
2939        match *self {
2940            FAULTEN3W::_0 => false,
2941            FAULTEN3W::_1 => true,
2942        }
2943    }
2944}
2945#[doc = r" Proxy"]
2946pub struct _FAULTEN3W<'a> {
2947    w: &'a mut W,
2948}
2949impl<'a> _FAULTEN3W<'a> {
2950    #[doc = r" Writes `variant` to the field"]
2951    #[inline]
2952    pub fn variant(self, variant: FAULTEN3W) -> &'a mut W {
2953        {
2954            self.bit(variant._bits())
2955        }
2956    }
2957    #[doc = "The fault control in this pair of channels is disabled."]
2958    #[inline]
2959    pub fn _0(self) -> &'a mut W {
2960        self.variant(FAULTEN3W::_0)
2961    }
2962    #[doc = "The fault control in this pair of channels is enabled."]
2963    #[inline]
2964    pub fn _1(self) -> &'a mut W {
2965        self.variant(FAULTEN3W::_1)
2966    }
2967    #[doc = r" Sets the field bit"]
2968    pub fn set_bit(self) -> &'a mut W {
2969        self.bit(true)
2970    }
2971    #[doc = r" Clears the field bit"]
2972    pub fn clear_bit(self) -> &'a mut W {
2973        self.bit(false)
2974    }
2975    #[doc = r" Writes raw bits to the field"]
2976    #[inline]
2977    pub fn bit(self, value: bool) -> &'a mut W {
2978        const MASK: bool = true;
2979        const OFFSET: u8 = 30;
2980        self.w.bits &= !((MASK as u32) << OFFSET);
2981        self.w.bits |= ((value & MASK) as u32) << OFFSET;
2982        self.w
2983    }
2984}
2985impl R {
2986    #[doc = r" Value of the register as raw bits"]
2987    #[inline]
2988    pub fn bits(&self) -> u32 {
2989        self.bits
2990    }
2991    #[doc = "Bit 0 - Combine Channels for n = 0"]
2992    #[inline]
2993    pub fn combine0(&self) -> COMBINE0R {
2994        COMBINE0R::_from({
2995            const MASK: bool = true;
2996            const OFFSET: u8 = 0;
2997            ((self.bits >> OFFSET) & MASK as u32) != 0
2998        })
2999    }
3000    #[doc = "Bit 1 - Complement of Channel (n) for n = 0"]
3001    #[inline]
3002    pub fn comp0(&self) -> COMP0R {
3003        COMP0R::_from({
3004            const MASK: bool = true;
3005            const OFFSET: u8 = 1;
3006            ((self.bits >> OFFSET) & MASK as u32) != 0
3007        })
3008    }
3009    #[doc = "Bit 2 - Dual Edge Capture Mode Enable for n = 0"]
3010    #[inline]
3011    pub fn decapen0(&self) -> DECAPEN0R {
3012        DECAPEN0R::_from({
3013            const MASK: bool = true;
3014            const OFFSET: u8 = 2;
3015            ((self.bits >> OFFSET) & MASK as u32) != 0
3016        })
3017    }
3018    #[doc = "Bit 3 - Dual Edge Capture Mode Captures for n = 0"]
3019    #[inline]
3020    pub fn decap0(&self) -> DECAP0R {
3021        DECAP0R::_from({
3022            const MASK: bool = true;
3023            const OFFSET: u8 = 3;
3024            ((self.bits >> OFFSET) & MASK as u32) != 0
3025        })
3026    }
3027    #[doc = "Bit 4 - Deadtime Enable for n = 0"]
3028    #[inline]
3029    pub fn dten0(&self) -> DTEN0R {
3030        DTEN0R::_from({
3031            const MASK: bool = true;
3032            const OFFSET: u8 = 4;
3033            ((self.bits >> OFFSET) & MASK as u32) != 0
3034        })
3035    }
3036    #[doc = "Bit 5 - Synchronization Enable for n = 0"]
3037    #[inline]
3038    pub fn syncen0(&self) -> SYNCEN0R {
3039        SYNCEN0R::_from({
3040            const MASK: bool = true;
3041            const OFFSET: u8 = 5;
3042            ((self.bits >> OFFSET) & MASK as u32) != 0
3043        })
3044    }
3045    #[doc = "Bit 6 - Fault Control Enable for n = 0"]
3046    #[inline]
3047    pub fn faulten0(&self) -> FAULTEN0R {
3048        FAULTEN0R::_from({
3049            const MASK: bool = true;
3050            const OFFSET: u8 = 6;
3051            ((self.bits >> OFFSET) & MASK as u32) != 0
3052        })
3053    }
3054    #[doc = "Bit 8 - Combine Channels for n = 2"]
3055    #[inline]
3056    pub fn combine1(&self) -> COMBINE1R {
3057        COMBINE1R::_from({
3058            const MASK: bool = true;
3059            const OFFSET: u8 = 8;
3060            ((self.bits >> OFFSET) & MASK as u32) != 0
3061        })
3062    }
3063    #[doc = "Bit 9 - Complement of Channel (n) for n = 2"]
3064    #[inline]
3065    pub fn comp1(&self) -> COMP1R {
3066        COMP1R::_from({
3067            const MASK: bool = true;
3068            const OFFSET: u8 = 9;
3069            ((self.bits >> OFFSET) & MASK as u32) != 0
3070        })
3071    }
3072    #[doc = "Bit 10 - Dual Edge Capture Mode Enable for n = 2"]
3073    #[inline]
3074    pub fn decapen1(&self) -> DECAPEN1R {
3075        DECAPEN1R::_from({
3076            const MASK: bool = true;
3077            const OFFSET: u8 = 10;
3078            ((self.bits >> OFFSET) & MASK as u32) != 0
3079        })
3080    }
3081    #[doc = "Bit 11 - Dual Edge Capture Mode Captures for n = 2"]
3082    #[inline]
3083    pub fn decap1(&self) -> DECAP1R {
3084        DECAP1R::_from({
3085            const MASK: bool = true;
3086            const OFFSET: u8 = 11;
3087            ((self.bits >> OFFSET) & MASK as u32) != 0
3088        })
3089    }
3090    #[doc = "Bit 12 - Deadtime Enable for n = 2"]
3091    #[inline]
3092    pub fn dten1(&self) -> DTEN1R {
3093        DTEN1R::_from({
3094            const MASK: bool = true;
3095            const OFFSET: u8 = 12;
3096            ((self.bits >> OFFSET) & MASK as u32) != 0
3097        })
3098    }
3099    #[doc = "Bit 13 - Synchronization Enable for n = 2"]
3100    #[inline]
3101    pub fn syncen1(&self) -> SYNCEN1R {
3102        SYNCEN1R::_from({
3103            const MASK: bool = true;
3104            const OFFSET: u8 = 13;
3105            ((self.bits >> OFFSET) & MASK as u32) != 0
3106        })
3107    }
3108    #[doc = "Bit 14 - Fault Control Enable for n = 2"]
3109    #[inline]
3110    pub fn faulten1(&self) -> FAULTEN1R {
3111        FAULTEN1R::_from({
3112            const MASK: bool = true;
3113            const OFFSET: u8 = 14;
3114            ((self.bits >> OFFSET) & MASK as u32) != 0
3115        })
3116    }
3117    #[doc = "Bit 16 - Combine Channels for n = 4"]
3118    #[inline]
3119    pub fn combine2(&self) -> COMBINE2R {
3120        COMBINE2R::_from({
3121            const MASK: bool = true;
3122            const OFFSET: u8 = 16;
3123            ((self.bits >> OFFSET) & MASK as u32) != 0
3124        })
3125    }
3126    #[doc = "Bit 17 - Complement of Channel (n) for n = 4"]
3127    #[inline]
3128    pub fn comp2(&self) -> COMP2R {
3129        COMP2R::_from({
3130            const MASK: bool = true;
3131            const OFFSET: u8 = 17;
3132            ((self.bits >> OFFSET) & MASK as u32) != 0
3133        })
3134    }
3135    #[doc = "Bit 18 - Dual Edge Capture Mode Enable for n = 4"]
3136    #[inline]
3137    pub fn decapen2(&self) -> DECAPEN2R {
3138        DECAPEN2R::_from({
3139            const MASK: bool = true;
3140            const OFFSET: u8 = 18;
3141            ((self.bits >> OFFSET) & MASK as u32) != 0
3142        })
3143    }
3144    #[doc = "Bit 19 - Dual Edge Capture Mode Captures for n = 4"]
3145    #[inline]
3146    pub fn decap2(&self) -> DECAP2R {
3147        DECAP2R::_from({
3148            const MASK: bool = true;
3149            const OFFSET: u8 = 19;
3150            ((self.bits >> OFFSET) & MASK as u32) != 0
3151        })
3152    }
3153    #[doc = "Bit 20 - Deadtime Enable for n = 4"]
3154    #[inline]
3155    pub fn dten2(&self) -> DTEN2R {
3156        DTEN2R::_from({
3157            const MASK: bool = true;
3158            const OFFSET: u8 = 20;
3159            ((self.bits >> OFFSET) & MASK as u32) != 0
3160        })
3161    }
3162    #[doc = "Bit 21 - Synchronization Enable for n = 4"]
3163    #[inline]
3164    pub fn syncen2(&self) -> SYNCEN2R {
3165        SYNCEN2R::_from({
3166            const MASK: bool = true;
3167            const OFFSET: u8 = 21;
3168            ((self.bits >> OFFSET) & MASK as u32) != 0
3169        })
3170    }
3171    #[doc = "Bit 22 - Fault Control Enable for n = 4"]
3172    #[inline]
3173    pub fn faulten2(&self) -> FAULTEN2R {
3174        FAULTEN2R::_from({
3175            const MASK: bool = true;
3176            const OFFSET: u8 = 22;
3177            ((self.bits >> OFFSET) & MASK as u32) != 0
3178        })
3179    }
3180    #[doc = "Bit 24 - Combine Channels for n = 6"]
3181    #[inline]
3182    pub fn combine3(&self) -> COMBINE3R {
3183        COMBINE3R::_from({
3184            const MASK: bool = true;
3185            const OFFSET: u8 = 24;
3186            ((self.bits >> OFFSET) & MASK as u32) != 0
3187        })
3188    }
3189    #[doc = "Bit 25 - Complement of Channel (n) for n = 6"]
3190    #[inline]
3191    pub fn comp3(&self) -> COMP3R {
3192        COMP3R::_from({
3193            const MASK: bool = true;
3194            const OFFSET: u8 = 25;
3195            ((self.bits >> OFFSET) & MASK as u32) != 0
3196        })
3197    }
3198    #[doc = "Bit 26 - Dual Edge Capture Mode Enable for n = 6"]
3199    #[inline]
3200    pub fn decapen3(&self) -> DECAPEN3R {
3201        DECAPEN3R::_from({
3202            const MASK: bool = true;
3203            const OFFSET: u8 = 26;
3204            ((self.bits >> OFFSET) & MASK as u32) != 0
3205        })
3206    }
3207    #[doc = "Bit 27 - Dual Edge Capture Mode Captures for n = 6"]
3208    #[inline]
3209    pub fn decap3(&self) -> DECAP3R {
3210        DECAP3R::_from({
3211            const MASK: bool = true;
3212            const OFFSET: u8 = 27;
3213            ((self.bits >> OFFSET) & MASK as u32) != 0
3214        })
3215    }
3216    #[doc = "Bit 28 - Deadtime Enable for n = 6"]
3217    #[inline]
3218    pub fn dten3(&self) -> DTEN3R {
3219        DTEN3R::_from({
3220            const MASK: bool = true;
3221            const OFFSET: u8 = 28;
3222            ((self.bits >> OFFSET) & MASK as u32) != 0
3223        })
3224    }
3225    #[doc = "Bit 29 - Synchronization Enable for n = 6"]
3226    #[inline]
3227    pub fn syncen3(&self) -> SYNCEN3R {
3228        SYNCEN3R::_from({
3229            const MASK: bool = true;
3230            const OFFSET: u8 = 29;
3231            ((self.bits >> OFFSET) & MASK as u32) != 0
3232        })
3233    }
3234    #[doc = "Bit 30 - Fault Control Enable for n = 6"]
3235    #[inline]
3236    pub fn faulten3(&self) -> FAULTEN3R {
3237        FAULTEN3R::_from({
3238            const MASK: bool = true;
3239            const OFFSET: u8 = 30;
3240            ((self.bits >> OFFSET) & MASK as u32) != 0
3241        })
3242    }
3243}
3244impl W {
3245    #[doc = r" Reset value of the register"]
3246    #[inline]
3247    pub fn reset_value() -> W {
3248        W { bits: 0 }
3249    }
3250    #[doc = r" Writes raw bits to the register"]
3251    #[inline]
3252    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
3253        self.bits = bits;
3254        self
3255    }
3256    #[doc = "Bit 0 - Combine Channels for n = 0"]
3257    #[inline]
3258    pub fn combine0(&mut self) -> _COMBINE0W {
3259        _COMBINE0W { w: self }
3260    }
3261    #[doc = "Bit 1 - Complement of Channel (n) for n = 0"]
3262    #[inline]
3263    pub fn comp0(&mut self) -> _COMP0W {
3264        _COMP0W { w: self }
3265    }
3266    #[doc = "Bit 2 - Dual Edge Capture Mode Enable for n = 0"]
3267    #[inline]
3268    pub fn decapen0(&mut self) -> _DECAPEN0W {
3269        _DECAPEN0W { w: self }
3270    }
3271    #[doc = "Bit 3 - Dual Edge Capture Mode Captures for n = 0"]
3272    #[inline]
3273    pub fn decap0(&mut self) -> _DECAP0W {
3274        _DECAP0W { w: self }
3275    }
3276    #[doc = "Bit 4 - Deadtime Enable for n = 0"]
3277    #[inline]
3278    pub fn dten0(&mut self) -> _DTEN0W {
3279        _DTEN0W { w: self }
3280    }
3281    #[doc = "Bit 5 - Synchronization Enable for n = 0"]
3282    #[inline]
3283    pub fn syncen0(&mut self) -> _SYNCEN0W {
3284        _SYNCEN0W { w: self }
3285    }
3286    #[doc = "Bit 6 - Fault Control Enable for n = 0"]
3287    #[inline]
3288    pub fn faulten0(&mut self) -> _FAULTEN0W {
3289        _FAULTEN0W { w: self }
3290    }
3291    #[doc = "Bit 8 - Combine Channels for n = 2"]
3292    #[inline]
3293    pub fn combine1(&mut self) -> _COMBINE1W {
3294        _COMBINE1W { w: self }
3295    }
3296    #[doc = "Bit 9 - Complement of Channel (n) for n = 2"]
3297    #[inline]
3298    pub fn comp1(&mut self) -> _COMP1W {
3299        _COMP1W { w: self }
3300    }
3301    #[doc = "Bit 10 - Dual Edge Capture Mode Enable for n = 2"]
3302    #[inline]
3303    pub fn decapen1(&mut self) -> _DECAPEN1W {
3304        _DECAPEN1W { w: self }
3305    }
3306    #[doc = "Bit 11 - Dual Edge Capture Mode Captures for n = 2"]
3307    #[inline]
3308    pub fn decap1(&mut self) -> _DECAP1W {
3309        _DECAP1W { w: self }
3310    }
3311    #[doc = "Bit 12 - Deadtime Enable for n = 2"]
3312    #[inline]
3313    pub fn dten1(&mut self) -> _DTEN1W {
3314        _DTEN1W { w: self }
3315    }
3316    #[doc = "Bit 13 - Synchronization Enable for n = 2"]
3317    #[inline]
3318    pub fn syncen1(&mut self) -> _SYNCEN1W {
3319        _SYNCEN1W { w: self }
3320    }
3321    #[doc = "Bit 14 - Fault Control Enable for n = 2"]
3322    #[inline]
3323    pub fn faulten1(&mut self) -> _FAULTEN1W {
3324        _FAULTEN1W { w: self }
3325    }
3326    #[doc = "Bit 16 - Combine Channels for n = 4"]
3327    #[inline]
3328    pub fn combine2(&mut self) -> _COMBINE2W {
3329        _COMBINE2W { w: self }
3330    }
3331    #[doc = "Bit 17 - Complement of Channel (n) for n = 4"]
3332    #[inline]
3333    pub fn comp2(&mut self) -> _COMP2W {
3334        _COMP2W { w: self }
3335    }
3336    #[doc = "Bit 18 - Dual Edge Capture Mode Enable for n = 4"]
3337    #[inline]
3338    pub fn decapen2(&mut self) -> _DECAPEN2W {
3339        _DECAPEN2W { w: self }
3340    }
3341    #[doc = "Bit 19 - Dual Edge Capture Mode Captures for n = 4"]
3342    #[inline]
3343    pub fn decap2(&mut self) -> _DECAP2W {
3344        _DECAP2W { w: self }
3345    }
3346    #[doc = "Bit 20 - Deadtime Enable for n = 4"]
3347    #[inline]
3348    pub fn dten2(&mut self) -> _DTEN2W {
3349        _DTEN2W { w: self }
3350    }
3351    #[doc = "Bit 21 - Synchronization Enable for n = 4"]
3352    #[inline]
3353    pub fn syncen2(&mut self) -> _SYNCEN2W {
3354        _SYNCEN2W { w: self }
3355    }
3356    #[doc = "Bit 22 - Fault Control Enable for n = 4"]
3357    #[inline]
3358    pub fn faulten2(&mut self) -> _FAULTEN2W {
3359        _FAULTEN2W { w: self }
3360    }
3361    #[doc = "Bit 24 - Combine Channels for n = 6"]
3362    #[inline]
3363    pub fn combine3(&mut self) -> _COMBINE3W {
3364        _COMBINE3W { w: self }
3365    }
3366    #[doc = "Bit 25 - Complement of Channel (n) for n = 6"]
3367    #[inline]
3368    pub fn comp3(&mut self) -> _COMP3W {
3369        _COMP3W { w: self }
3370    }
3371    #[doc = "Bit 26 - Dual Edge Capture Mode Enable for n = 6"]
3372    #[inline]
3373    pub fn decapen3(&mut self) -> _DECAPEN3W {
3374        _DECAPEN3W { w: self }
3375    }
3376    #[doc = "Bit 27 - Dual Edge Capture Mode Captures for n = 6"]
3377    #[inline]
3378    pub fn decap3(&mut self) -> _DECAP3W {
3379        _DECAP3W { w: self }
3380    }
3381    #[doc = "Bit 28 - Deadtime Enable for n = 6"]
3382    #[inline]
3383    pub fn dten3(&mut self) -> _DTEN3W {
3384        _DTEN3W { w: self }
3385    }
3386    #[doc = "Bit 29 - Synchronization Enable for n = 6"]
3387    #[inline]
3388    pub fn syncen3(&mut self) -> _SYNCEN3W {
3389        _SYNCEN3W { w: self }
3390    }
3391    #[doc = "Bit 30 - Fault Control Enable for n = 6"]
3392    #[inline]
3393    pub fn faulten3(&mut self) -> _FAULTEN3W {
3394        _FAULTEN3W { w: self }
3395    }
3396}