mk20d7/ftm2/swoctrl/
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::SWOCTRL {
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 `CH0OC`"]
46#[derive(Clone, Copy, Debug, PartialEq)]
47pub enum CH0OCR {
48    #[doc = "The channel output is not affected by software output control."]
49    _0,
50    #[doc = "The channel output is affected by software output control."]
51    _1,
52}
53impl CH0OCR {
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            CH0OCR::_0 => false,
69            CH0OCR::_1 => true,
70        }
71    }
72    #[allow(missing_docs)]
73    #[doc(hidden)]
74    #[inline]
75    pub fn _from(value: bool) -> CH0OCR {
76        match value {
77            false => CH0OCR::_0,
78            true => CH0OCR::_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 == CH0OCR::_0
85    }
86    #[doc = "Checks if the value of the field is `_1`"]
87    #[inline]
88    pub fn is_1(&self) -> bool {
89        *self == CH0OCR::_1
90    }
91}
92#[doc = "Possible values of the field `CH1OC`"]
93#[derive(Clone, Copy, Debug, PartialEq)]
94pub enum CH1OCR {
95    #[doc = "The channel output is not affected by software output control."]
96    _0,
97    #[doc = "The channel output is affected by software output control."]
98    _1,
99}
100impl CH1OCR {
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            CH1OCR::_0 => false,
116            CH1OCR::_1 => true,
117        }
118    }
119    #[allow(missing_docs)]
120    #[doc(hidden)]
121    #[inline]
122    pub fn _from(value: bool) -> CH1OCR {
123        match value {
124            false => CH1OCR::_0,
125            true => CH1OCR::_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 == CH1OCR::_0
132    }
133    #[doc = "Checks if the value of the field is `_1`"]
134    #[inline]
135    pub fn is_1(&self) -> bool {
136        *self == CH1OCR::_1
137    }
138}
139#[doc = "Possible values of the field `CH2OC`"]
140#[derive(Clone, Copy, Debug, PartialEq)]
141pub enum CH2OCR {
142    #[doc = "The channel output is not affected by software output control."]
143    _0,
144    #[doc = "The channel output is affected by software output control."]
145    _1,
146}
147impl CH2OCR {
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            CH2OCR::_0 => false,
163            CH2OCR::_1 => true,
164        }
165    }
166    #[allow(missing_docs)]
167    #[doc(hidden)]
168    #[inline]
169    pub fn _from(value: bool) -> CH2OCR {
170        match value {
171            false => CH2OCR::_0,
172            true => CH2OCR::_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 == CH2OCR::_0
179    }
180    #[doc = "Checks if the value of the field is `_1`"]
181    #[inline]
182    pub fn is_1(&self) -> bool {
183        *self == CH2OCR::_1
184    }
185}
186#[doc = "Possible values of the field `CH3OC`"]
187#[derive(Clone, Copy, Debug, PartialEq)]
188pub enum CH3OCR {
189    #[doc = "The channel output is not affected by software output control."]
190    _0,
191    #[doc = "The channel output is affected by software output control."]
192    _1,
193}
194impl CH3OCR {
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            CH3OCR::_0 => false,
210            CH3OCR::_1 => true,
211        }
212    }
213    #[allow(missing_docs)]
214    #[doc(hidden)]
215    #[inline]
216    pub fn _from(value: bool) -> CH3OCR {
217        match value {
218            false => CH3OCR::_0,
219            true => CH3OCR::_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 == CH3OCR::_0
226    }
227    #[doc = "Checks if the value of the field is `_1`"]
228    #[inline]
229    pub fn is_1(&self) -> bool {
230        *self == CH3OCR::_1
231    }
232}
233#[doc = "Possible values of the field `CH4OC`"]
234#[derive(Clone, Copy, Debug, PartialEq)]
235pub enum CH4OCR {
236    #[doc = "The channel output is not affected by software output control."]
237    _0,
238    #[doc = "The channel output is affected by software output control."]
239    _1,
240}
241impl CH4OCR {
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            CH4OCR::_0 => false,
257            CH4OCR::_1 => true,
258        }
259    }
260    #[allow(missing_docs)]
261    #[doc(hidden)]
262    #[inline]
263    pub fn _from(value: bool) -> CH4OCR {
264        match value {
265            false => CH4OCR::_0,
266            true => CH4OCR::_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 == CH4OCR::_0
273    }
274    #[doc = "Checks if the value of the field is `_1`"]
275    #[inline]
276    pub fn is_1(&self) -> bool {
277        *self == CH4OCR::_1
278    }
279}
280#[doc = "Possible values of the field `CH5OC`"]
281#[derive(Clone, Copy, Debug, PartialEq)]
282pub enum CH5OCR {
283    #[doc = "The channel output is not affected by software output control."]
284    _0,
285    #[doc = "The channel output is affected by software output control."]
286    _1,
287}
288impl CH5OCR {
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            CH5OCR::_0 => false,
304            CH5OCR::_1 => true,
305        }
306    }
307    #[allow(missing_docs)]
308    #[doc(hidden)]
309    #[inline]
310    pub fn _from(value: bool) -> CH5OCR {
311        match value {
312            false => CH5OCR::_0,
313            true => CH5OCR::_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 == CH5OCR::_0
320    }
321    #[doc = "Checks if the value of the field is `_1`"]
322    #[inline]
323    pub fn is_1(&self) -> bool {
324        *self == CH5OCR::_1
325    }
326}
327#[doc = "Possible values of the field `CH6OC`"]
328#[derive(Clone, Copy, Debug, PartialEq)]
329pub enum CH6OCR {
330    #[doc = "The channel output is not affected by software output control."]
331    _0,
332    #[doc = "The channel output is affected by software output control."]
333    _1,
334}
335impl CH6OCR {
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            CH6OCR::_0 => false,
351            CH6OCR::_1 => true,
352        }
353    }
354    #[allow(missing_docs)]
355    #[doc(hidden)]
356    #[inline]
357    pub fn _from(value: bool) -> CH6OCR {
358        match value {
359            false => CH6OCR::_0,
360            true => CH6OCR::_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 == CH6OCR::_0
367    }
368    #[doc = "Checks if the value of the field is `_1`"]
369    #[inline]
370    pub fn is_1(&self) -> bool {
371        *self == CH6OCR::_1
372    }
373}
374#[doc = "Possible values of the field `CH7OC`"]
375#[derive(Clone, Copy, Debug, PartialEq)]
376pub enum CH7OCR {
377    #[doc = "The channel output is not affected by software output control."]
378    _0,
379    #[doc = "The channel output is affected by software output control."]
380    _1,
381}
382impl CH7OCR {
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            CH7OCR::_0 => false,
398            CH7OCR::_1 => true,
399        }
400    }
401    #[allow(missing_docs)]
402    #[doc(hidden)]
403    #[inline]
404    pub fn _from(value: bool) -> CH7OCR {
405        match value {
406            false => CH7OCR::_0,
407            true => CH7OCR::_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 == CH7OCR::_0
414    }
415    #[doc = "Checks if the value of the field is `_1`"]
416    #[inline]
417    pub fn is_1(&self) -> bool {
418        *self == CH7OCR::_1
419    }
420}
421#[doc = "Possible values of the field `CH0OCV`"]
422#[derive(Clone, Copy, Debug, PartialEq)]
423pub enum CH0OCVR {
424    #[doc = "The software output control forces 0 to the channel output."]
425    _0,
426    #[doc = "The software output control forces 1 to the channel output."]
427    _1,
428}
429impl CH0OCVR {
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            CH0OCVR::_0 => false,
445            CH0OCVR::_1 => true,
446        }
447    }
448    #[allow(missing_docs)]
449    #[doc(hidden)]
450    #[inline]
451    pub fn _from(value: bool) -> CH0OCVR {
452        match value {
453            false => CH0OCVR::_0,
454            true => CH0OCVR::_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 == CH0OCVR::_0
461    }
462    #[doc = "Checks if the value of the field is `_1`"]
463    #[inline]
464    pub fn is_1(&self) -> bool {
465        *self == CH0OCVR::_1
466    }
467}
468#[doc = "Possible values of the field `CH1OCV`"]
469#[derive(Clone, Copy, Debug, PartialEq)]
470pub enum CH1OCVR {
471    #[doc = "The software output control forces 0 to the channel output."]
472    _0,
473    #[doc = "The software output control forces 1 to the channel output."]
474    _1,
475}
476impl CH1OCVR {
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            CH1OCVR::_0 => false,
492            CH1OCVR::_1 => true,
493        }
494    }
495    #[allow(missing_docs)]
496    #[doc(hidden)]
497    #[inline]
498    pub fn _from(value: bool) -> CH1OCVR {
499        match value {
500            false => CH1OCVR::_0,
501            true => CH1OCVR::_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 == CH1OCVR::_0
508    }
509    #[doc = "Checks if the value of the field is `_1`"]
510    #[inline]
511    pub fn is_1(&self) -> bool {
512        *self == CH1OCVR::_1
513    }
514}
515#[doc = "Possible values of the field `CH2OCV`"]
516#[derive(Clone, Copy, Debug, PartialEq)]
517pub enum CH2OCVR {
518    #[doc = "The software output control forces 0 to the channel output."]
519    _0,
520    #[doc = "The software output control forces 1 to the channel output."]
521    _1,
522}
523impl CH2OCVR {
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            CH2OCVR::_0 => false,
539            CH2OCVR::_1 => true,
540        }
541    }
542    #[allow(missing_docs)]
543    #[doc(hidden)]
544    #[inline]
545    pub fn _from(value: bool) -> CH2OCVR {
546        match value {
547            false => CH2OCVR::_0,
548            true => CH2OCVR::_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 == CH2OCVR::_0
555    }
556    #[doc = "Checks if the value of the field is `_1`"]
557    #[inline]
558    pub fn is_1(&self) -> bool {
559        *self == CH2OCVR::_1
560    }
561}
562#[doc = "Possible values of the field `CH3OCV`"]
563#[derive(Clone, Copy, Debug, PartialEq)]
564pub enum CH3OCVR {
565    #[doc = "The software output control forces 0 to the channel output."]
566    _0,
567    #[doc = "The software output control forces 1 to the channel output."]
568    _1,
569}
570impl CH3OCVR {
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            CH3OCVR::_0 => false,
586            CH3OCVR::_1 => true,
587        }
588    }
589    #[allow(missing_docs)]
590    #[doc(hidden)]
591    #[inline]
592    pub fn _from(value: bool) -> CH3OCVR {
593        match value {
594            false => CH3OCVR::_0,
595            true => CH3OCVR::_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 == CH3OCVR::_0
602    }
603    #[doc = "Checks if the value of the field is `_1`"]
604    #[inline]
605    pub fn is_1(&self) -> bool {
606        *self == CH3OCVR::_1
607    }
608}
609#[doc = "Possible values of the field `CH4OCV`"]
610#[derive(Clone, Copy, Debug, PartialEq)]
611pub enum CH4OCVR {
612    #[doc = "The software output control forces 0 to the channel output."]
613    _0,
614    #[doc = "The software output control forces 1 to the channel output."]
615    _1,
616}
617impl CH4OCVR {
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            CH4OCVR::_0 => false,
633            CH4OCVR::_1 => true,
634        }
635    }
636    #[allow(missing_docs)]
637    #[doc(hidden)]
638    #[inline]
639    pub fn _from(value: bool) -> CH4OCVR {
640        match value {
641            false => CH4OCVR::_0,
642            true => CH4OCVR::_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 == CH4OCVR::_0
649    }
650    #[doc = "Checks if the value of the field is `_1`"]
651    #[inline]
652    pub fn is_1(&self) -> bool {
653        *self == CH4OCVR::_1
654    }
655}
656#[doc = "Possible values of the field `CH5OCV`"]
657#[derive(Clone, Copy, Debug, PartialEq)]
658pub enum CH5OCVR {
659    #[doc = "The software output control forces 0 to the channel output."]
660    _0,
661    #[doc = "The software output control forces 1 to the channel output."]
662    _1,
663}
664impl CH5OCVR {
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            CH5OCVR::_0 => false,
680            CH5OCVR::_1 => true,
681        }
682    }
683    #[allow(missing_docs)]
684    #[doc(hidden)]
685    #[inline]
686    pub fn _from(value: bool) -> CH5OCVR {
687        match value {
688            false => CH5OCVR::_0,
689            true => CH5OCVR::_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 == CH5OCVR::_0
696    }
697    #[doc = "Checks if the value of the field is `_1`"]
698    #[inline]
699    pub fn is_1(&self) -> bool {
700        *self == CH5OCVR::_1
701    }
702}
703#[doc = "Possible values of the field `CH6OCV`"]
704#[derive(Clone, Copy, Debug, PartialEq)]
705pub enum CH6OCVR {
706    #[doc = "The software output control forces 0 to the channel output."]
707    _0,
708    #[doc = "The software output control forces 1 to the channel output."]
709    _1,
710}
711impl CH6OCVR {
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            CH6OCVR::_0 => false,
727            CH6OCVR::_1 => true,
728        }
729    }
730    #[allow(missing_docs)]
731    #[doc(hidden)]
732    #[inline]
733    pub fn _from(value: bool) -> CH6OCVR {
734        match value {
735            false => CH6OCVR::_0,
736            true => CH6OCVR::_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 == CH6OCVR::_0
743    }
744    #[doc = "Checks if the value of the field is `_1`"]
745    #[inline]
746    pub fn is_1(&self) -> bool {
747        *self == CH6OCVR::_1
748    }
749}
750#[doc = "Possible values of the field `CH7OCV`"]
751#[derive(Clone, Copy, Debug, PartialEq)]
752pub enum CH7OCVR {
753    #[doc = "The software output control forces 0 to the channel output."]
754    _0,
755    #[doc = "The software output control forces 1 to the channel output."]
756    _1,
757}
758impl CH7OCVR {
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            CH7OCVR::_0 => false,
774            CH7OCVR::_1 => true,
775        }
776    }
777    #[allow(missing_docs)]
778    #[doc(hidden)]
779    #[inline]
780    pub fn _from(value: bool) -> CH7OCVR {
781        match value {
782            false => CH7OCVR::_0,
783            true => CH7OCVR::_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 == CH7OCVR::_0
790    }
791    #[doc = "Checks if the value of the field is `_1`"]
792    #[inline]
793    pub fn is_1(&self) -> bool {
794        *self == CH7OCVR::_1
795    }
796}
797#[doc = "Values that can be written to the field `CH0OC`"]
798pub enum CH0OCW {
799    #[doc = "The channel output is not affected by software output control."]
800    _0,
801    #[doc = "The channel output is affected by software output control."]
802    _1,
803}
804impl CH0OCW {
805    #[allow(missing_docs)]
806    #[doc(hidden)]
807    #[inline]
808    pub fn _bits(&self) -> bool {
809        match *self {
810            CH0OCW::_0 => false,
811            CH0OCW::_1 => true,
812        }
813    }
814}
815#[doc = r" Proxy"]
816pub struct _CH0OCW<'a> {
817    w: &'a mut W,
818}
819impl<'a> _CH0OCW<'a> {
820    #[doc = r" Writes `variant` to the field"]
821    #[inline]
822    pub fn variant(self, variant: CH0OCW) -> &'a mut W {
823        {
824            self.bit(variant._bits())
825        }
826    }
827    #[doc = "The channel output is not affected by software output control."]
828    #[inline]
829    pub fn _0(self) -> &'a mut W {
830        self.variant(CH0OCW::_0)
831    }
832    #[doc = "The channel output is affected by software output control."]
833    #[inline]
834    pub fn _1(self) -> &'a mut W {
835        self.variant(CH0OCW::_1)
836    }
837    #[doc = r" Sets the field bit"]
838    pub fn set_bit(self) -> &'a mut W {
839        self.bit(true)
840    }
841    #[doc = r" Clears the field bit"]
842    pub fn clear_bit(self) -> &'a mut W {
843        self.bit(false)
844    }
845    #[doc = r" Writes raw bits to the field"]
846    #[inline]
847    pub fn bit(self, value: bool) -> &'a mut W {
848        const MASK: bool = true;
849        const OFFSET: u8 = 0;
850        self.w.bits &= !((MASK as u32) << OFFSET);
851        self.w.bits |= ((value & MASK) as u32) << OFFSET;
852        self.w
853    }
854}
855#[doc = "Values that can be written to the field `CH1OC`"]
856pub enum CH1OCW {
857    #[doc = "The channel output is not affected by software output control."]
858    _0,
859    #[doc = "The channel output is affected by software output control."]
860    _1,
861}
862impl CH1OCW {
863    #[allow(missing_docs)]
864    #[doc(hidden)]
865    #[inline]
866    pub fn _bits(&self) -> bool {
867        match *self {
868            CH1OCW::_0 => false,
869            CH1OCW::_1 => true,
870        }
871    }
872}
873#[doc = r" Proxy"]
874pub struct _CH1OCW<'a> {
875    w: &'a mut W,
876}
877impl<'a> _CH1OCW<'a> {
878    #[doc = r" Writes `variant` to the field"]
879    #[inline]
880    pub fn variant(self, variant: CH1OCW) -> &'a mut W {
881        {
882            self.bit(variant._bits())
883        }
884    }
885    #[doc = "The channel output is not affected by software output control."]
886    #[inline]
887    pub fn _0(self) -> &'a mut W {
888        self.variant(CH1OCW::_0)
889    }
890    #[doc = "The channel output is affected by software output control."]
891    #[inline]
892    pub fn _1(self) -> &'a mut W {
893        self.variant(CH1OCW::_1)
894    }
895    #[doc = r" Sets the field bit"]
896    pub fn set_bit(self) -> &'a mut W {
897        self.bit(true)
898    }
899    #[doc = r" Clears the field bit"]
900    pub fn clear_bit(self) -> &'a mut W {
901        self.bit(false)
902    }
903    #[doc = r" Writes raw bits to the field"]
904    #[inline]
905    pub fn bit(self, value: bool) -> &'a mut W {
906        const MASK: bool = true;
907        const OFFSET: u8 = 1;
908        self.w.bits &= !((MASK as u32) << OFFSET);
909        self.w.bits |= ((value & MASK) as u32) << OFFSET;
910        self.w
911    }
912}
913#[doc = "Values that can be written to the field `CH2OC`"]
914pub enum CH2OCW {
915    #[doc = "The channel output is not affected by software output control."]
916    _0,
917    #[doc = "The channel output is affected by software output control."]
918    _1,
919}
920impl CH2OCW {
921    #[allow(missing_docs)]
922    #[doc(hidden)]
923    #[inline]
924    pub fn _bits(&self) -> bool {
925        match *self {
926            CH2OCW::_0 => false,
927            CH2OCW::_1 => true,
928        }
929    }
930}
931#[doc = r" Proxy"]
932pub struct _CH2OCW<'a> {
933    w: &'a mut W,
934}
935impl<'a> _CH2OCW<'a> {
936    #[doc = r" Writes `variant` to the field"]
937    #[inline]
938    pub fn variant(self, variant: CH2OCW) -> &'a mut W {
939        {
940            self.bit(variant._bits())
941        }
942    }
943    #[doc = "The channel output is not affected by software output control."]
944    #[inline]
945    pub fn _0(self) -> &'a mut W {
946        self.variant(CH2OCW::_0)
947    }
948    #[doc = "The channel output is affected by software output control."]
949    #[inline]
950    pub fn _1(self) -> &'a mut W {
951        self.variant(CH2OCW::_1)
952    }
953    #[doc = r" Sets the field bit"]
954    pub fn set_bit(self) -> &'a mut W {
955        self.bit(true)
956    }
957    #[doc = r" Clears the field bit"]
958    pub fn clear_bit(self) -> &'a mut W {
959        self.bit(false)
960    }
961    #[doc = r" Writes raw bits to the field"]
962    #[inline]
963    pub fn bit(self, value: bool) -> &'a mut W {
964        const MASK: bool = true;
965        const OFFSET: u8 = 2;
966        self.w.bits &= !((MASK as u32) << OFFSET);
967        self.w.bits |= ((value & MASK) as u32) << OFFSET;
968        self.w
969    }
970}
971#[doc = "Values that can be written to the field `CH3OC`"]
972pub enum CH3OCW {
973    #[doc = "The channel output is not affected by software output control."]
974    _0,
975    #[doc = "The channel output is affected by software output control."]
976    _1,
977}
978impl CH3OCW {
979    #[allow(missing_docs)]
980    #[doc(hidden)]
981    #[inline]
982    pub fn _bits(&self) -> bool {
983        match *self {
984            CH3OCW::_0 => false,
985            CH3OCW::_1 => true,
986        }
987    }
988}
989#[doc = r" Proxy"]
990pub struct _CH3OCW<'a> {
991    w: &'a mut W,
992}
993impl<'a> _CH3OCW<'a> {
994    #[doc = r" Writes `variant` to the field"]
995    #[inline]
996    pub fn variant(self, variant: CH3OCW) -> &'a mut W {
997        {
998            self.bit(variant._bits())
999        }
1000    }
1001    #[doc = "The channel output is not affected by software output control."]
1002    #[inline]
1003    pub fn _0(self) -> &'a mut W {
1004        self.variant(CH3OCW::_0)
1005    }
1006    #[doc = "The channel output is affected by software output control."]
1007    #[inline]
1008    pub fn _1(self) -> &'a mut W {
1009        self.variant(CH3OCW::_1)
1010    }
1011    #[doc = r" Sets the field bit"]
1012    pub fn set_bit(self) -> &'a mut W {
1013        self.bit(true)
1014    }
1015    #[doc = r" Clears the field bit"]
1016    pub fn clear_bit(self) -> &'a mut W {
1017        self.bit(false)
1018    }
1019    #[doc = r" Writes raw bits to the field"]
1020    #[inline]
1021    pub fn bit(self, value: bool) -> &'a mut W {
1022        const MASK: bool = true;
1023        const OFFSET: u8 = 3;
1024        self.w.bits &= !((MASK as u32) << OFFSET);
1025        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1026        self.w
1027    }
1028}
1029#[doc = "Values that can be written to the field `CH4OC`"]
1030pub enum CH4OCW {
1031    #[doc = "The channel output is not affected by software output control."]
1032    _0,
1033    #[doc = "The channel output is affected by software output control."]
1034    _1,
1035}
1036impl CH4OCW {
1037    #[allow(missing_docs)]
1038    #[doc(hidden)]
1039    #[inline]
1040    pub fn _bits(&self) -> bool {
1041        match *self {
1042            CH4OCW::_0 => false,
1043            CH4OCW::_1 => true,
1044        }
1045    }
1046}
1047#[doc = r" Proxy"]
1048pub struct _CH4OCW<'a> {
1049    w: &'a mut W,
1050}
1051impl<'a> _CH4OCW<'a> {
1052    #[doc = r" Writes `variant` to the field"]
1053    #[inline]
1054    pub fn variant(self, variant: CH4OCW) -> &'a mut W {
1055        {
1056            self.bit(variant._bits())
1057        }
1058    }
1059    #[doc = "The channel output is not affected by software output control."]
1060    #[inline]
1061    pub fn _0(self) -> &'a mut W {
1062        self.variant(CH4OCW::_0)
1063    }
1064    #[doc = "The channel output is affected by software output control."]
1065    #[inline]
1066    pub fn _1(self) -> &'a mut W {
1067        self.variant(CH4OCW::_1)
1068    }
1069    #[doc = r" Sets the field bit"]
1070    pub fn set_bit(self) -> &'a mut W {
1071        self.bit(true)
1072    }
1073    #[doc = r" Clears the field bit"]
1074    pub fn clear_bit(self) -> &'a mut W {
1075        self.bit(false)
1076    }
1077    #[doc = r" Writes raw bits to the field"]
1078    #[inline]
1079    pub fn bit(self, value: bool) -> &'a mut W {
1080        const MASK: bool = true;
1081        const OFFSET: u8 = 4;
1082        self.w.bits &= !((MASK as u32) << OFFSET);
1083        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1084        self.w
1085    }
1086}
1087#[doc = "Values that can be written to the field `CH5OC`"]
1088pub enum CH5OCW {
1089    #[doc = "The channel output is not affected by software output control."]
1090    _0,
1091    #[doc = "The channel output is affected by software output control."]
1092    _1,
1093}
1094impl CH5OCW {
1095    #[allow(missing_docs)]
1096    #[doc(hidden)]
1097    #[inline]
1098    pub fn _bits(&self) -> bool {
1099        match *self {
1100            CH5OCW::_0 => false,
1101            CH5OCW::_1 => true,
1102        }
1103    }
1104}
1105#[doc = r" Proxy"]
1106pub struct _CH5OCW<'a> {
1107    w: &'a mut W,
1108}
1109impl<'a> _CH5OCW<'a> {
1110    #[doc = r" Writes `variant` to the field"]
1111    #[inline]
1112    pub fn variant(self, variant: CH5OCW) -> &'a mut W {
1113        {
1114            self.bit(variant._bits())
1115        }
1116    }
1117    #[doc = "The channel output is not affected by software output control."]
1118    #[inline]
1119    pub fn _0(self) -> &'a mut W {
1120        self.variant(CH5OCW::_0)
1121    }
1122    #[doc = "The channel output is affected by software output control."]
1123    #[inline]
1124    pub fn _1(self) -> &'a mut W {
1125        self.variant(CH5OCW::_1)
1126    }
1127    #[doc = r" Sets the field bit"]
1128    pub fn set_bit(self) -> &'a mut W {
1129        self.bit(true)
1130    }
1131    #[doc = r" Clears the field bit"]
1132    pub fn clear_bit(self) -> &'a mut W {
1133        self.bit(false)
1134    }
1135    #[doc = r" Writes raw bits to the field"]
1136    #[inline]
1137    pub fn bit(self, value: bool) -> &'a mut W {
1138        const MASK: bool = true;
1139        const OFFSET: u8 = 5;
1140        self.w.bits &= !((MASK as u32) << OFFSET);
1141        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1142        self.w
1143    }
1144}
1145#[doc = "Values that can be written to the field `CH6OC`"]
1146pub enum CH6OCW {
1147    #[doc = "The channel output is not affected by software output control."]
1148    _0,
1149    #[doc = "The channel output is affected by software output control."]
1150    _1,
1151}
1152impl CH6OCW {
1153    #[allow(missing_docs)]
1154    #[doc(hidden)]
1155    #[inline]
1156    pub fn _bits(&self) -> bool {
1157        match *self {
1158            CH6OCW::_0 => false,
1159            CH6OCW::_1 => true,
1160        }
1161    }
1162}
1163#[doc = r" Proxy"]
1164pub struct _CH6OCW<'a> {
1165    w: &'a mut W,
1166}
1167impl<'a> _CH6OCW<'a> {
1168    #[doc = r" Writes `variant` to the field"]
1169    #[inline]
1170    pub fn variant(self, variant: CH6OCW) -> &'a mut W {
1171        {
1172            self.bit(variant._bits())
1173        }
1174    }
1175    #[doc = "The channel output is not affected by software output control."]
1176    #[inline]
1177    pub fn _0(self) -> &'a mut W {
1178        self.variant(CH6OCW::_0)
1179    }
1180    #[doc = "The channel output is affected by software output control."]
1181    #[inline]
1182    pub fn _1(self) -> &'a mut W {
1183        self.variant(CH6OCW::_1)
1184    }
1185    #[doc = r" Sets the field bit"]
1186    pub fn set_bit(self) -> &'a mut W {
1187        self.bit(true)
1188    }
1189    #[doc = r" Clears the field bit"]
1190    pub fn clear_bit(self) -> &'a mut W {
1191        self.bit(false)
1192    }
1193    #[doc = r" Writes raw bits to the field"]
1194    #[inline]
1195    pub fn bit(self, value: bool) -> &'a mut W {
1196        const MASK: bool = true;
1197        const OFFSET: u8 = 6;
1198        self.w.bits &= !((MASK as u32) << OFFSET);
1199        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1200        self.w
1201    }
1202}
1203#[doc = "Values that can be written to the field `CH7OC`"]
1204pub enum CH7OCW {
1205    #[doc = "The channel output is not affected by software output control."]
1206    _0,
1207    #[doc = "The channel output is affected by software output control."]
1208    _1,
1209}
1210impl CH7OCW {
1211    #[allow(missing_docs)]
1212    #[doc(hidden)]
1213    #[inline]
1214    pub fn _bits(&self) -> bool {
1215        match *self {
1216            CH7OCW::_0 => false,
1217            CH7OCW::_1 => true,
1218        }
1219    }
1220}
1221#[doc = r" Proxy"]
1222pub struct _CH7OCW<'a> {
1223    w: &'a mut W,
1224}
1225impl<'a> _CH7OCW<'a> {
1226    #[doc = r" Writes `variant` to the field"]
1227    #[inline]
1228    pub fn variant(self, variant: CH7OCW) -> &'a mut W {
1229        {
1230            self.bit(variant._bits())
1231        }
1232    }
1233    #[doc = "The channel output is not affected by software output control."]
1234    #[inline]
1235    pub fn _0(self) -> &'a mut W {
1236        self.variant(CH7OCW::_0)
1237    }
1238    #[doc = "The channel output is affected by software output control."]
1239    #[inline]
1240    pub fn _1(self) -> &'a mut W {
1241        self.variant(CH7OCW::_1)
1242    }
1243    #[doc = r" Sets the field bit"]
1244    pub fn set_bit(self) -> &'a mut W {
1245        self.bit(true)
1246    }
1247    #[doc = r" Clears the field bit"]
1248    pub fn clear_bit(self) -> &'a mut W {
1249        self.bit(false)
1250    }
1251    #[doc = r" Writes raw bits to the field"]
1252    #[inline]
1253    pub fn bit(self, value: bool) -> &'a mut W {
1254        const MASK: bool = true;
1255        const OFFSET: u8 = 7;
1256        self.w.bits &= !((MASK as u32) << OFFSET);
1257        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1258        self.w
1259    }
1260}
1261#[doc = "Values that can be written to the field `CH0OCV`"]
1262pub enum CH0OCVW {
1263    #[doc = "The software output control forces 0 to the channel output."]
1264    _0,
1265    #[doc = "The software output control forces 1 to the channel output."]
1266    _1,
1267}
1268impl CH0OCVW {
1269    #[allow(missing_docs)]
1270    #[doc(hidden)]
1271    #[inline]
1272    pub fn _bits(&self) -> bool {
1273        match *self {
1274            CH0OCVW::_0 => false,
1275            CH0OCVW::_1 => true,
1276        }
1277    }
1278}
1279#[doc = r" Proxy"]
1280pub struct _CH0OCVW<'a> {
1281    w: &'a mut W,
1282}
1283impl<'a> _CH0OCVW<'a> {
1284    #[doc = r" Writes `variant` to the field"]
1285    #[inline]
1286    pub fn variant(self, variant: CH0OCVW) -> &'a mut W {
1287        {
1288            self.bit(variant._bits())
1289        }
1290    }
1291    #[doc = "The software output control forces 0 to the channel output."]
1292    #[inline]
1293    pub fn _0(self) -> &'a mut W {
1294        self.variant(CH0OCVW::_0)
1295    }
1296    #[doc = "The software output control forces 1 to the channel output."]
1297    #[inline]
1298    pub fn _1(self) -> &'a mut W {
1299        self.variant(CH0OCVW::_1)
1300    }
1301    #[doc = r" Sets the field bit"]
1302    pub fn set_bit(self) -> &'a mut W {
1303        self.bit(true)
1304    }
1305    #[doc = r" Clears the field bit"]
1306    pub fn clear_bit(self) -> &'a mut W {
1307        self.bit(false)
1308    }
1309    #[doc = r" Writes raw bits to the field"]
1310    #[inline]
1311    pub fn bit(self, value: bool) -> &'a mut W {
1312        const MASK: bool = true;
1313        const OFFSET: u8 = 8;
1314        self.w.bits &= !((MASK as u32) << OFFSET);
1315        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1316        self.w
1317    }
1318}
1319#[doc = "Values that can be written to the field `CH1OCV`"]
1320pub enum CH1OCVW {
1321    #[doc = "The software output control forces 0 to the channel output."]
1322    _0,
1323    #[doc = "The software output control forces 1 to the channel output."]
1324    _1,
1325}
1326impl CH1OCVW {
1327    #[allow(missing_docs)]
1328    #[doc(hidden)]
1329    #[inline]
1330    pub fn _bits(&self) -> bool {
1331        match *self {
1332            CH1OCVW::_0 => false,
1333            CH1OCVW::_1 => true,
1334        }
1335    }
1336}
1337#[doc = r" Proxy"]
1338pub struct _CH1OCVW<'a> {
1339    w: &'a mut W,
1340}
1341impl<'a> _CH1OCVW<'a> {
1342    #[doc = r" Writes `variant` to the field"]
1343    #[inline]
1344    pub fn variant(self, variant: CH1OCVW) -> &'a mut W {
1345        {
1346            self.bit(variant._bits())
1347        }
1348    }
1349    #[doc = "The software output control forces 0 to the channel output."]
1350    #[inline]
1351    pub fn _0(self) -> &'a mut W {
1352        self.variant(CH1OCVW::_0)
1353    }
1354    #[doc = "The software output control forces 1 to the channel output."]
1355    #[inline]
1356    pub fn _1(self) -> &'a mut W {
1357        self.variant(CH1OCVW::_1)
1358    }
1359    #[doc = r" Sets the field bit"]
1360    pub fn set_bit(self) -> &'a mut W {
1361        self.bit(true)
1362    }
1363    #[doc = r" Clears the field bit"]
1364    pub fn clear_bit(self) -> &'a mut W {
1365        self.bit(false)
1366    }
1367    #[doc = r" Writes raw bits to the field"]
1368    #[inline]
1369    pub fn bit(self, value: bool) -> &'a mut W {
1370        const MASK: bool = true;
1371        const OFFSET: u8 = 9;
1372        self.w.bits &= !((MASK as u32) << OFFSET);
1373        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1374        self.w
1375    }
1376}
1377#[doc = "Values that can be written to the field `CH2OCV`"]
1378pub enum CH2OCVW {
1379    #[doc = "The software output control forces 0 to the channel output."]
1380    _0,
1381    #[doc = "The software output control forces 1 to the channel output."]
1382    _1,
1383}
1384impl CH2OCVW {
1385    #[allow(missing_docs)]
1386    #[doc(hidden)]
1387    #[inline]
1388    pub fn _bits(&self) -> bool {
1389        match *self {
1390            CH2OCVW::_0 => false,
1391            CH2OCVW::_1 => true,
1392        }
1393    }
1394}
1395#[doc = r" Proxy"]
1396pub struct _CH2OCVW<'a> {
1397    w: &'a mut W,
1398}
1399impl<'a> _CH2OCVW<'a> {
1400    #[doc = r" Writes `variant` to the field"]
1401    #[inline]
1402    pub fn variant(self, variant: CH2OCVW) -> &'a mut W {
1403        {
1404            self.bit(variant._bits())
1405        }
1406    }
1407    #[doc = "The software output control forces 0 to the channel output."]
1408    #[inline]
1409    pub fn _0(self) -> &'a mut W {
1410        self.variant(CH2OCVW::_0)
1411    }
1412    #[doc = "The software output control forces 1 to the channel output."]
1413    #[inline]
1414    pub fn _1(self) -> &'a mut W {
1415        self.variant(CH2OCVW::_1)
1416    }
1417    #[doc = r" Sets the field bit"]
1418    pub fn set_bit(self) -> &'a mut W {
1419        self.bit(true)
1420    }
1421    #[doc = r" Clears the field bit"]
1422    pub fn clear_bit(self) -> &'a mut W {
1423        self.bit(false)
1424    }
1425    #[doc = r" Writes raw bits to the field"]
1426    #[inline]
1427    pub fn bit(self, value: bool) -> &'a mut W {
1428        const MASK: bool = true;
1429        const OFFSET: u8 = 10;
1430        self.w.bits &= !((MASK as u32) << OFFSET);
1431        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1432        self.w
1433    }
1434}
1435#[doc = "Values that can be written to the field `CH3OCV`"]
1436pub enum CH3OCVW {
1437    #[doc = "The software output control forces 0 to the channel output."]
1438    _0,
1439    #[doc = "The software output control forces 1 to the channel output."]
1440    _1,
1441}
1442impl CH3OCVW {
1443    #[allow(missing_docs)]
1444    #[doc(hidden)]
1445    #[inline]
1446    pub fn _bits(&self) -> bool {
1447        match *self {
1448            CH3OCVW::_0 => false,
1449            CH3OCVW::_1 => true,
1450        }
1451    }
1452}
1453#[doc = r" Proxy"]
1454pub struct _CH3OCVW<'a> {
1455    w: &'a mut W,
1456}
1457impl<'a> _CH3OCVW<'a> {
1458    #[doc = r" Writes `variant` to the field"]
1459    #[inline]
1460    pub fn variant(self, variant: CH3OCVW) -> &'a mut W {
1461        {
1462            self.bit(variant._bits())
1463        }
1464    }
1465    #[doc = "The software output control forces 0 to the channel output."]
1466    #[inline]
1467    pub fn _0(self) -> &'a mut W {
1468        self.variant(CH3OCVW::_0)
1469    }
1470    #[doc = "The software output control forces 1 to the channel output."]
1471    #[inline]
1472    pub fn _1(self) -> &'a mut W {
1473        self.variant(CH3OCVW::_1)
1474    }
1475    #[doc = r" Sets the field bit"]
1476    pub fn set_bit(self) -> &'a mut W {
1477        self.bit(true)
1478    }
1479    #[doc = r" Clears the field bit"]
1480    pub fn clear_bit(self) -> &'a mut W {
1481        self.bit(false)
1482    }
1483    #[doc = r" Writes raw bits to the field"]
1484    #[inline]
1485    pub fn bit(self, value: bool) -> &'a mut W {
1486        const MASK: bool = true;
1487        const OFFSET: u8 = 11;
1488        self.w.bits &= !((MASK as u32) << OFFSET);
1489        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1490        self.w
1491    }
1492}
1493#[doc = "Values that can be written to the field `CH4OCV`"]
1494pub enum CH4OCVW {
1495    #[doc = "The software output control forces 0 to the channel output."]
1496    _0,
1497    #[doc = "The software output control forces 1 to the channel output."]
1498    _1,
1499}
1500impl CH4OCVW {
1501    #[allow(missing_docs)]
1502    #[doc(hidden)]
1503    #[inline]
1504    pub fn _bits(&self) -> bool {
1505        match *self {
1506            CH4OCVW::_0 => false,
1507            CH4OCVW::_1 => true,
1508        }
1509    }
1510}
1511#[doc = r" Proxy"]
1512pub struct _CH4OCVW<'a> {
1513    w: &'a mut W,
1514}
1515impl<'a> _CH4OCVW<'a> {
1516    #[doc = r" Writes `variant` to the field"]
1517    #[inline]
1518    pub fn variant(self, variant: CH4OCVW) -> &'a mut W {
1519        {
1520            self.bit(variant._bits())
1521        }
1522    }
1523    #[doc = "The software output control forces 0 to the channel output."]
1524    #[inline]
1525    pub fn _0(self) -> &'a mut W {
1526        self.variant(CH4OCVW::_0)
1527    }
1528    #[doc = "The software output control forces 1 to the channel output."]
1529    #[inline]
1530    pub fn _1(self) -> &'a mut W {
1531        self.variant(CH4OCVW::_1)
1532    }
1533    #[doc = r" Sets the field bit"]
1534    pub fn set_bit(self) -> &'a mut W {
1535        self.bit(true)
1536    }
1537    #[doc = r" Clears the field bit"]
1538    pub fn clear_bit(self) -> &'a mut W {
1539        self.bit(false)
1540    }
1541    #[doc = r" Writes raw bits to the field"]
1542    #[inline]
1543    pub fn bit(self, value: bool) -> &'a mut W {
1544        const MASK: bool = true;
1545        const OFFSET: u8 = 12;
1546        self.w.bits &= !((MASK as u32) << OFFSET);
1547        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1548        self.w
1549    }
1550}
1551#[doc = "Values that can be written to the field `CH5OCV`"]
1552pub enum CH5OCVW {
1553    #[doc = "The software output control forces 0 to the channel output."]
1554    _0,
1555    #[doc = "The software output control forces 1 to the channel output."]
1556    _1,
1557}
1558impl CH5OCVW {
1559    #[allow(missing_docs)]
1560    #[doc(hidden)]
1561    #[inline]
1562    pub fn _bits(&self) -> bool {
1563        match *self {
1564            CH5OCVW::_0 => false,
1565            CH5OCVW::_1 => true,
1566        }
1567    }
1568}
1569#[doc = r" Proxy"]
1570pub struct _CH5OCVW<'a> {
1571    w: &'a mut W,
1572}
1573impl<'a> _CH5OCVW<'a> {
1574    #[doc = r" Writes `variant` to the field"]
1575    #[inline]
1576    pub fn variant(self, variant: CH5OCVW) -> &'a mut W {
1577        {
1578            self.bit(variant._bits())
1579        }
1580    }
1581    #[doc = "The software output control forces 0 to the channel output."]
1582    #[inline]
1583    pub fn _0(self) -> &'a mut W {
1584        self.variant(CH5OCVW::_0)
1585    }
1586    #[doc = "The software output control forces 1 to the channel output."]
1587    #[inline]
1588    pub fn _1(self) -> &'a mut W {
1589        self.variant(CH5OCVW::_1)
1590    }
1591    #[doc = r" Sets the field bit"]
1592    pub fn set_bit(self) -> &'a mut W {
1593        self.bit(true)
1594    }
1595    #[doc = r" Clears the field bit"]
1596    pub fn clear_bit(self) -> &'a mut W {
1597        self.bit(false)
1598    }
1599    #[doc = r" Writes raw bits to the field"]
1600    #[inline]
1601    pub fn bit(self, value: bool) -> &'a mut W {
1602        const MASK: bool = true;
1603        const OFFSET: u8 = 13;
1604        self.w.bits &= !((MASK as u32) << OFFSET);
1605        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1606        self.w
1607    }
1608}
1609#[doc = "Values that can be written to the field `CH6OCV`"]
1610pub enum CH6OCVW {
1611    #[doc = "The software output control forces 0 to the channel output."]
1612    _0,
1613    #[doc = "The software output control forces 1 to the channel output."]
1614    _1,
1615}
1616impl CH6OCVW {
1617    #[allow(missing_docs)]
1618    #[doc(hidden)]
1619    #[inline]
1620    pub fn _bits(&self) -> bool {
1621        match *self {
1622            CH6OCVW::_0 => false,
1623            CH6OCVW::_1 => true,
1624        }
1625    }
1626}
1627#[doc = r" Proxy"]
1628pub struct _CH6OCVW<'a> {
1629    w: &'a mut W,
1630}
1631impl<'a> _CH6OCVW<'a> {
1632    #[doc = r" Writes `variant` to the field"]
1633    #[inline]
1634    pub fn variant(self, variant: CH6OCVW) -> &'a mut W {
1635        {
1636            self.bit(variant._bits())
1637        }
1638    }
1639    #[doc = "The software output control forces 0 to the channel output."]
1640    #[inline]
1641    pub fn _0(self) -> &'a mut W {
1642        self.variant(CH6OCVW::_0)
1643    }
1644    #[doc = "The software output control forces 1 to the channel output."]
1645    #[inline]
1646    pub fn _1(self) -> &'a mut W {
1647        self.variant(CH6OCVW::_1)
1648    }
1649    #[doc = r" Sets the field bit"]
1650    pub fn set_bit(self) -> &'a mut W {
1651        self.bit(true)
1652    }
1653    #[doc = r" Clears the field bit"]
1654    pub fn clear_bit(self) -> &'a mut W {
1655        self.bit(false)
1656    }
1657    #[doc = r" Writes raw bits to the field"]
1658    #[inline]
1659    pub fn bit(self, value: bool) -> &'a mut W {
1660        const MASK: bool = true;
1661        const OFFSET: u8 = 14;
1662        self.w.bits &= !((MASK as u32) << OFFSET);
1663        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1664        self.w
1665    }
1666}
1667#[doc = "Values that can be written to the field `CH7OCV`"]
1668pub enum CH7OCVW {
1669    #[doc = "The software output control forces 0 to the channel output."]
1670    _0,
1671    #[doc = "The software output control forces 1 to the channel output."]
1672    _1,
1673}
1674impl CH7OCVW {
1675    #[allow(missing_docs)]
1676    #[doc(hidden)]
1677    #[inline]
1678    pub fn _bits(&self) -> bool {
1679        match *self {
1680            CH7OCVW::_0 => false,
1681            CH7OCVW::_1 => true,
1682        }
1683    }
1684}
1685#[doc = r" Proxy"]
1686pub struct _CH7OCVW<'a> {
1687    w: &'a mut W,
1688}
1689impl<'a> _CH7OCVW<'a> {
1690    #[doc = r" Writes `variant` to the field"]
1691    #[inline]
1692    pub fn variant(self, variant: CH7OCVW) -> &'a mut W {
1693        {
1694            self.bit(variant._bits())
1695        }
1696    }
1697    #[doc = "The software output control forces 0 to the channel output."]
1698    #[inline]
1699    pub fn _0(self) -> &'a mut W {
1700        self.variant(CH7OCVW::_0)
1701    }
1702    #[doc = "The software output control forces 1 to the channel output."]
1703    #[inline]
1704    pub fn _1(self) -> &'a mut W {
1705        self.variant(CH7OCVW::_1)
1706    }
1707    #[doc = r" Sets the field bit"]
1708    pub fn set_bit(self) -> &'a mut W {
1709        self.bit(true)
1710    }
1711    #[doc = r" Clears the field bit"]
1712    pub fn clear_bit(self) -> &'a mut W {
1713        self.bit(false)
1714    }
1715    #[doc = r" Writes raw bits to the field"]
1716    #[inline]
1717    pub fn bit(self, value: bool) -> &'a mut W {
1718        const MASK: bool = true;
1719        const OFFSET: u8 = 15;
1720        self.w.bits &= !((MASK as u32) << OFFSET);
1721        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1722        self.w
1723    }
1724}
1725impl R {
1726    #[doc = r" Value of the register as raw bits"]
1727    #[inline]
1728    pub fn bits(&self) -> u32 {
1729        self.bits
1730    }
1731    #[doc = "Bit 0 - Channel 0 Software Output Control Enable"]
1732    #[inline]
1733    pub fn ch0oc(&self) -> CH0OCR {
1734        CH0OCR::_from({
1735            const MASK: bool = true;
1736            const OFFSET: u8 = 0;
1737            ((self.bits >> OFFSET) & MASK as u32) != 0
1738        })
1739    }
1740    #[doc = "Bit 1 - Channel 1 Software Output Control Enable"]
1741    #[inline]
1742    pub fn ch1oc(&self) -> CH1OCR {
1743        CH1OCR::_from({
1744            const MASK: bool = true;
1745            const OFFSET: u8 = 1;
1746            ((self.bits >> OFFSET) & MASK as u32) != 0
1747        })
1748    }
1749    #[doc = "Bit 2 - Channel 2 Software Output Control Enable"]
1750    #[inline]
1751    pub fn ch2oc(&self) -> CH2OCR {
1752        CH2OCR::_from({
1753            const MASK: bool = true;
1754            const OFFSET: u8 = 2;
1755            ((self.bits >> OFFSET) & MASK as u32) != 0
1756        })
1757    }
1758    #[doc = "Bit 3 - Channel 3 Software Output Control Enable"]
1759    #[inline]
1760    pub fn ch3oc(&self) -> CH3OCR {
1761        CH3OCR::_from({
1762            const MASK: bool = true;
1763            const OFFSET: u8 = 3;
1764            ((self.bits >> OFFSET) & MASK as u32) != 0
1765        })
1766    }
1767    #[doc = "Bit 4 - Channel 4 Software Output Control Enable"]
1768    #[inline]
1769    pub fn ch4oc(&self) -> CH4OCR {
1770        CH4OCR::_from({
1771            const MASK: bool = true;
1772            const OFFSET: u8 = 4;
1773            ((self.bits >> OFFSET) & MASK as u32) != 0
1774        })
1775    }
1776    #[doc = "Bit 5 - Channel 5 Software Output Control Enable"]
1777    #[inline]
1778    pub fn ch5oc(&self) -> CH5OCR {
1779        CH5OCR::_from({
1780            const MASK: bool = true;
1781            const OFFSET: u8 = 5;
1782            ((self.bits >> OFFSET) & MASK as u32) != 0
1783        })
1784    }
1785    #[doc = "Bit 6 - Channel 6 Software Output Control Enable"]
1786    #[inline]
1787    pub fn ch6oc(&self) -> CH6OCR {
1788        CH6OCR::_from({
1789            const MASK: bool = true;
1790            const OFFSET: u8 = 6;
1791            ((self.bits >> OFFSET) & MASK as u32) != 0
1792        })
1793    }
1794    #[doc = "Bit 7 - Channel 7 Software Output Control Enable"]
1795    #[inline]
1796    pub fn ch7oc(&self) -> CH7OCR {
1797        CH7OCR::_from({
1798            const MASK: bool = true;
1799            const OFFSET: u8 = 7;
1800            ((self.bits >> OFFSET) & MASK as u32) != 0
1801        })
1802    }
1803    #[doc = "Bit 8 - Channel 0 Software Output Control Value"]
1804    #[inline]
1805    pub fn ch0ocv(&self) -> CH0OCVR {
1806        CH0OCVR::_from({
1807            const MASK: bool = true;
1808            const OFFSET: u8 = 8;
1809            ((self.bits >> OFFSET) & MASK as u32) != 0
1810        })
1811    }
1812    #[doc = "Bit 9 - Channel 1 Software Output Control Value"]
1813    #[inline]
1814    pub fn ch1ocv(&self) -> CH1OCVR {
1815        CH1OCVR::_from({
1816            const MASK: bool = true;
1817            const OFFSET: u8 = 9;
1818            ((self.bits >> OFFSET) & MASK as u32) != 0
1819        })
1820    }
1821    #[doc = "Bit 10 - Channel 2 Software Output Control Value"]
1822    #[inline]
1823    pub fn ch2ocv(&self) -> CH2OCVR {
1824        CH2OCVR::_from({
1825            const MASK: bool = true;
1826            const OFFSET: u8 = 10;
1827            ((self.bits >> OFFSET) & MASK as u32) != 0
1828        })
1829    }
1830    #[doc = "Bit 11 - Channel 3 Software Output Control Value"]
1831    #[inline]
1832    pub fn ch3ocv(&self) -> CH3OCVR {
1833        CH3OCVR::_from({
1834            const MASK: bool = true;
1835            const OFFSET: u8 = 11;
1836            ((self.bits >> OFFSET) & MASK as u32) != 0
1837        })
1838    }
1839    #[doc = "Bit 12 - Channel 4 Software Output Control Value"]
1840    #[inline]
1841    pub fn ch4ocv(&self) -> CH4OCVR {
1842        CH4OCVR::_from({
1843            const MASK: bool = true;
1844            const OFFSET: u8 = 12;
1845            ((self.bits >> OFFSET) & MASK as u32) != 0
1846        })
1847    }
1848    #[doc = "Bit 13 - Channel 5 Software Output Control Value"]
1849    #[inline]
1850    pub fn ch5ocv(&self) -> CH5OCVR {
1851        CH5OCVR::_from({
1852            const MASK: bool = true;
1853            const OFFSET: u8 = 13;
1854            ((self.bits >> OFFSET) & MASK as u32) != 0
1855        })
1856    }
1857    #[doc = "Bit 14 - Channel 6 Software Output Control Value"]
1858    #[inline]
1859    pub fn ch6ocv(&self) -> CH6OCVR {
1860        CH6OCVR::_from({
1861            const MASK: bool = true;
1862            const OFFSET: u8 = 14;
1863            ((self.bits >> OFFSET) & MASK as u32) != 0
1864        })
1865    }
1866    #[doc = "Bit 15 - Channel 7 Software Output Control Value"]
1867    #[inline]
1868    pub fn ch7ocv(&self) -> CH7OCVR {
1869        CH7OCVR::_from({
1870            const MASK: bool = true;
1871            const OFFSET: u8 = 15;
1872            ((self.bits >> OFFSET) & MASK as u32) != 0
1873        })
1874    }
1875}
1876impl W {
1877    #[doc = r" Reset value of the register"]
1878    #[inline]
1879    pub fn reset_value() -> W {
1880        W { bits: 0 }
1881    }
1882    #[doc = r" Writes raw bits to the register"]
1883    #[inline]
1884    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1885        self.bits = bits;
1886        self
1887    }
1888    #[doc = "Bit 0 - Channel 0 Software Output Control Enable"]
1889    #[inline]
1890    pub fn ch0oc(&mut self) -> _CH0OCW {
1891        _CH0OCW { w: self }
1892    }
1893    #[doc = "Bit 1 - Channel 1 Software Output Control Enable"]
1894    #[inline]
1895    pub fn ch1oc(&mut self) -> _CH1OCW {
1896        _CH1OCW { w: self }
1897    }
1898    #[doc = "Bit 2 - Channel 2 Software Output Control Enable"]
1899    #[inline]
1900    pub fn ch2oc(&mut self) -> _CH2OCW {
1901        _CH2OCW { w: self }
1902    }
1903    #[doc = "Bit 3 - Channel 3 Software Output Control Enable"]
1904    #[inline]
1905    pub fn ch3oc(&mut self) -> _CH3OCW {
1906        _CH3OCW { w: self }
1907    }
1908    #[doc = "Bit 4 - Channel 4 Software Output Control Enable"]
1909    #[inline]
1910    pub fn ch4oc(&mut self) -> _CH4OCW {
1911        _CH4OCW { w: self }
1912    }
1913    #[doc = "Bit 5 - Channel 5 Software Output Control Enable"]
1914    #[inline]
1915    pub fn ch5oc(&mut self) -> _CH5OCW {
1916        _CH5OCW { w: self }
1917    }
1918    #[doc = "Bit 6 - Channel 6 Software Output Control Enable"]
1919    #[inline]
1920    pub fn ch6oc(&mut self) -> _CH6OCW {
1921        _CH6OCW { w: self }
1922    }
1923    #[doc = "Bit 7 - Channel 7 Software Output Control Enable"]
1924    #[inline]
1925    pub fn ch7oc(&mut self) -> _CH7OCW {
1926        _CH7OCW { w: self }
1927    }
1928    #[doc = "Bit 8 - Channel 0 Software Output Control Value"]
1929    #[inline]
1930    pub fn ch0ocv(&mut self) -> _CH0OCVW {
1931        _CH0OCVW { w: self }
1932    }
1933    #[doc = "Bit 9 - Channel 1 Software Output Control Value"]
1934    #[inline]
1935    pub fn ch1ocv(&mut self) -> _CH1OCVW {
1936        _CH1OCVW { w: self }
1937    }
1938    #[doc = "Bit 10 - Channel 2 Software Output Control Value"]
1939    #[inline]
1940    pub fn ch2ocv(&mut self) -> _CH2OCVW {
1941        _CH2OCVW { w: self }
1942    }
1943    #[doc = "Bit 11 - Channel 3 Software Output Control Value"]
1944    #[inline]
1945    pub fn ch3ocv(&mut self) -> _CH3OCVW {
1946        _CH3OCVW { w: self }
1947    }
1948    #[doc = "Bit 12 - Channel 4 Software Output Control Value"]
1949    #[inline]
1950    pub fn ch4ocv(&mut self) -> _CH4OCVW {
1951        _CH4OCVW { w: self }
1952    }
1953    #[doc = "Bit 13 - Channel 5 Software Output Control Value"]
1954    #[inline]
1955    pub fn ch5ocv(&mut self) -> _CH5OCVW {
1956        _CH5OCVW { w: self }
1957    }
1958    #[doc = "Bit 14 - Channel 6 Software Output Control Value"]
1959    #[inline]
1960    pub fn ch6ocv(&mut self) -> _CH6OCVW {
1961        _CH6OCVW { w: self }
1962    }
1963    #[doc = "Bit 15 - Channel 7 Software Output Control Value"]
1964    #[inline]
1965    pub fn ch7ocv(&mut self) -> _CH7OCVW {
1966        _CH7OCVW { w: self }
1967    }
1968}