nrf52/saadc/inten/
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::INTEN {
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 `STARTED`"]
46#[derive(Clone, Copy, Debug, PartialEq)]
47pub enum STARTEDR {
48    #[doc = "Disable"]
49    DISABLED,
50    #[doc = "Enable"]
51    ENABLED,
52}
53impl STARTEDR {
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            STARTEDR::DISABLED => false,
69            STARTEDR::ENABLED => true,
70        }
71    }
72    #[allow(missing_docs)]
73    #[doc(hidden)]
74    #[inline]
75    pub fn _from(value: bool) -> STARTEDR {
76        match value {
77            false => STARTEDR::DISABLED,
78            true => STARTEDR::ENABLED,
79        }
80    }
81    #[doc = "Checks if the value of the field is `DISABLED`"]
82    #[inline]
83    pub fn is_disabled(&self) -> bool {
84        *self == STARTEDR::DISABLED
85    }
86    #[doc = "Checks if the value of the field is `ENABLED`"]
87    #[inline]
88    pub fn is_enabled(&self) -> bool {
89        *self == STARTEDR::ENABLED
90    }
91}
92#[doc = "Possible values of the field `END`"]
93#[derive(Clone, Copy, Debug, PartialEq)]
94pub enum ENDR {
95    #[doc = "Disable"]
96    DISABLED,
97    #[doc = "Enable"]
98    ENABLED,
99}
100impl ENDR {
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            ENDR::DISABLED => false,
116            ENDR::ENABLED => true,
117        }
118    }
119    #[allow(missing_docs)]
120    #[doc(hidden)]
121    #[inline]
122    pub fn _from(value: bool) -> ENDR {
123        match value {
124            false => ENDR::DISABLED,
125            true => ENDR::ENABLED,
126        }
127    }
128    #[doc = "Checks if the value of the field is `DISABLED`"]
129    #[inline]
130    pub fn is_disabled(&self) -> bool {
131        *self == ENDR::DISABLED
132    }
133    #[doc = "Checks if the value of the field is `ENABLED`"]
134    #[inline]
135    pub fn is_enabled(&self) -> bool {
136        *self == ENDR::ENABLED
137    }
138}
139#[doc = "Possible values of the field `DONE`"]
140#[derive(Clone, Copy, Debug, PartialEq)]
141pub enum DONER {
142    #[doc = "Disable"]
143    DISABLED,
144    #[doc = "Enable"]
145    ENABLED,
146}
147impl DONER {
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            DONER::DISABLED => false,
163            DONER::ENABLED => true,
164        }
165    }
166    #[allow(missing_docs)]
167    #[doc(hidden)]
168    #[inline]
169    pub fn _from(value: bool) -> DONER {
170        match value {
171            false => DONER::DISABLED,
172            true => DONER::ENABLED,
173        }
174    }
175    #[doc = "Checks if the value of the field is `DISABLED`"]
176    #[inline]
177    pub fn is_disabled(&self) -> bool {
178        *self == DONER::DISABLED
179    }
180    #[doc = "Checks if the value of the field is `ENABLED`"]
181    #[inline]
182    pub fn is_enabled(&self) -> bool {
183        *self == DONER::ENABLED
184    }
185}
186#[doc = "Possible values of the field `RESULTDONE`"]
187#[derive(Clone, Copy, Debug, PartialEq)]
188pub enum RESULTDONER {
189    #[doc = "Disable"]
190    DISABLED,
191    #[doc = "Enable"]
192    ENABLED,
193}
194impl RESULTDONER {
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            RESULTDONER::DISABLED => false,
210            RESULTDONER::ENABLED => true,
211        }
212    }
213    #[allow(missing_docs)]
214    #[doc(hidden)]
215    #[inline]
216    pub fn _from(value: bool) -> RESULTDONER {
217        match value {
218            false => RESULTDONER::DISABLED,
219            true => RESULTDONER::ENABLED,
220        }
221    }
222    #[doc = "Checks if the value of the field is `DISABLED`"]
223    #[inline]
224    pub fn is_disabled(&self) -> bool {
225        *self == RESULTDONER::DISABLED
226    }
227    #[doc = "Checks if the value of the field is `ENABLED`"]
228    #[inline]
229    pub fn is_enabled(&self) -> bool {
230        *self == RESULTDONER::ENABLED
231    }
232}
233#[doc = "Possible values of the field `CALIBRATEDONE`"]
234#[derive(Clone, Copy, Debug, PartialEq)]
235pub enum CALIBRATEDONER {
236    #[doc = "Disable"]
237    DISABLED,
238    #[doc = "Enable"]
239    ENABLED,
240}
241impl CALIBRATEDONER {
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            CALIBRATEDONER::DISABLED => false,
257            CALIBRATEDONER::ENABLED => true,
258        }
259    }
260    #[allow(missing_docs)]
261    #[doc(hidden)]
262    #[inline]
263    pub fn _from(value: bool) -> CALIBRATEDONER {
264        match value {
265            false => CALIBRATEDONER::DISABLED,
266            true => CALIBRATEDONER::ENABLED,
267        }
268    }
269    #[doc = "Checks if the value of the field is `DISABLED`"]
270    #[inline]
271    pub fn is_disabled(&self) -> bool {
272        *self == CALIBRATEDONER::DISABLED
273    }
274    #[doc = "Checks if the value of the field is `ENABLED`"]
275    #[inline]
276    pub fn is_enabled(&self) -> bool {
277        *self == CALIBRATEDONER::ENABLED
278    }
279}
280#[doc = "Possible values of the field `STOPPED`"]
281#[derive(Clone, Copy, Debug, PartialEq)]
282pub enum STOPPEDR {
283    #[doc = "Disable"]
284    DISABLED,
285    #[doc = "Enable"]
286    ENABLED,
287}
288impl STOPPEDR {
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            STOPPEDR::DISABLED => false,
304            STOPPEDR::ENABLED => true,
305        }
306    }
307    #[allow(missing_docs)]
308    #[doc(hidden)]
309    #[inline]
310    pub fn _from(value: bool) -> STOPPEDR {
311        match value {
312            false => STOPPEDR::DISABLED,
313            true => STOPPEDR::ENABLED,
314        }
315    }
316    #[doc = "Checks if the value of the field is `DISABLED`"]
317    #[inline]
318    pub fn is_disabled(&self) -> bool {
319        *self == STOPPEDR::DISABLED
320    }
321    #[doc = "Checks if the value of the field is `ENABLED`"]
322    #[inline]
323    pub fn is_enabled(&self) -> bool {
324        *self == STOPPEDR::ENABLED
325    }
326}
327#[doc = "Possible values of the field `CH0LIMITH`"]
328#[derive(Clone, Copy, Debug, PartialEq)]
329pub enum CH0LIMITHR {
330    #[doc = "Disable"]
331    DISABLED,
332    #[doc = "Enable"]
333    ENABLED,
334}
335impl CH0LIMITHR {
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            CH0LIMITHR::DISABLED => false,
351            CH0LIMITHR::ENABLED => true,
352        }
353    }
354    #[allow(missing_docs)]
355    #[doc(hidden)]
356    #[inline]
357    pub fn _from(value: bool) -> CH0LIMITHR {
358        match value {
359            false => CH0LIMITHR::DISABLED,
360            true => CH0LIMITHR::ENABLED,
361        }
362    }
363    #[doc = "Checks if the value of the field is `DISABLED`"]
364    #[inline]
365    pub fn is_disabled(&self) -> bool {
366        *self == CH0LIMITHR::DISABLED
367    }
368    #[doc = "Checks if the value of the field is `ENABLED`"]
369    #[inline]
370    pub fn is_enabled(&self) -> bool {
371        *self == CH0LIMITHR::ENABLED
372    }
373}
374#[doc = "Possible values of the field `CH0LIMITL`"]
375#[derive(Clone, Copy, Debug, PartialEq)]
376pub enum CH0LIMITLR {
377    #[doc = "Disable"]
378    DISABLED,
379    #[doc = "Enable"]
380    ENABLED,
381}
382impl CH0LIMITLR {
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            CH0LIMITLR::DISABLED => false,
398            CH0LIMITLR::ENABLED => true,
399        }
400    }
401    #[allow(missing_docs)]
402    #[doc(hidden)]
403    #[inline]
404    pub fn _from(value: bool) -> CH0LIMITLR {
405        match value {
406            false => CH0LIMITLR::DISABLED,
407            true => CH0LIMITLR::ENABLED,
408        }
409    }
410    #[doc = "Checks if the value of the field is `DISABLED`"]
411    #[inline]
412    pub fn is_disabled(&self) -> bool {
413        *self == CH0LIMITLR::DISABLED
414    }
415    #[doc = "Checks if the value of the field is `ENABLED`"]
416    #[inline]
417    pub fn is_enabled(&self) -> bool {
418        *self == CH0LIMITLR::ENABLED
419    }
420}
421#[doc = "Possible values of the field `CH1LIMITH`"]
422#[derive(Clone, Copy, Debug, PartialEq)]
423pub enum CH1LIMITHR {
424    #[doc = "Disable"]
425    DISABLED,
426    #[doc = "Enable"]
427    ENABLED,
428}
429impl CH1LIMITHR {
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            CH1LIMITHR::DISABLED => false,
445            CH1LIMITHR::ENABLED => true,
446        }
447    }
448    #[allow(missing_docs)]
449    #[doc(hidden)]
450    #[inline]
451    pub fn _from(value: bool) -> CH1LIMITHR {
452        match value {
453            false => CH1LIMITHR::DISABLED,
454            true => CH1LIMITHR::ENABLED,
455        }
456    }
457    #[doc = "Checks if the value of the field is `DISABLED`"]
458    #[inline]
459    pub fn is_disabled(&self) -> bool {
460        *self == CH1LIMITHR::DISABLED
461    }
462    #[doc = "Checks if the value of the field is `ENABLED`"]
463    #[inline]
464    pub fn is_enabled(&self) -> bool {
465        *self == CH1LIMITHR::ENABLED
466    }
467}
468#[doc = "Possible values of the field `CH1LIMITL`"]
469#[derive(Clone, Copy, Debug, PartialEq)]
470pub enum CH1LIMITLR {
471    #[doc = "Disable"]
472    DISABLED,
473    #[doc = "Enable"]
474    ENABLED,
475}
476impl CH1LIMITLR {
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            CH1LIMITLR::DISABLED => false,
492            CH1LIMITLR::ENABLED => true,
493        }
494    }
495    #[allow(missing_docs)]
496    #[doc(hidden)]
497    #[inline]
498    pub fn _from(value: bool) -> CH1LIMITLR {
499        match value {
500            false => CH1LIMITLR::DISABLED,
501            true => CH1LIMITLR::ENABLED,
502        }
503    }
504    #[doc = "Checks if the value of the field is `DISABLED`"]
505    #[inline]
506    pub fn is_disabled(&self) -> bool {
507        *self == CH1LIMITLR::DISABLED
508    }
509    #[doc = "Checks if the value of the field is `ENABLED`"]
510    #[inline]
511    pub fn is_enabled(&self) -> bool {
512        *self == CH1LIMITLR::ENABLED
513    }
514}
515#[doc = "Possible values of the field `CH2LIMITH`"]
516#[derive(Clone, Copy, Debug, PartialEq)]
517pub enum CH2LIMITHR {
518    #[doc = "Disable"]
519    DISABLED,
520    #[doc = "Enable"]
521    ENABLED,
522}
523impl CH2LIMITHR {
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            CH2LIMITHR::DISABLED => false,
539            CH2LIMITHR::ENABLED => true,
540        }
541    }
542    #[allow(missing_docs)]
543    #[doc(hidden)]
544    #[inline]
545    pub fn _from(value: bool) -> CH2LIMITHR {
546        match value {
547            false => CH2LIMITHR::DISABLED,
548            true => CH2LIMITHR::ENABLED,
549        }
550    }
551    #[doc = "Checks if the value of the field is `DISABLED`"]
552    #[inline]
553    pub fn is_disabled(&self) -> bool {
554        *self == CH2LIMITHR::DISABLED
555    }
556    #[doc = "Checks if the value of the field is `ENABLED`"]
557    #[inline]
558    pub fn is_enabled(&self) -> bool {
559        *self == CH2LIMITHR::ENABLED
560    }
561}
562#[doc = "Possible values of the field `CH2LIMITL`"]
563#[derive(Clone, Copy, Debug, PartialEq)]
564pub enum CH2LIMITLR {
565    #[doc = "Disable"]
566    DISABLED,
567    #[doc = "Enable"]
568    ENABLED,
569}
570impl CH2LIMITLR {
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            CH2LIMITLR::DISABLED => false,
586            CH2LIMITLR::ENABLED => true,
587        }
588    }
589    #[allow(missing_docs)]
590    #[doc(hidden)]
591    #[inline]
592    pub fn _from(value: bool) -> CH2LIMITLR {
593        match value {
594            false => CH2LIMITLR::DISABLED,
595            true => CH2LIMITLR::ENABLED,
596        }
597    }
598    #[doc = "Checks if the value of the field is `DISABLED`"]
599    #[inline]
600    pub fn is_disabled(&self) -> bool {
601        *self == CH2LIMITLR::DISABLED
602    }
603    #[doc = "Checks if the value of the field is `ENABLED`"]
604    #[inline]
605    pub fn is_enabled(&self) -> bool {
606        *self == CH2LIMITLR::ENABLED
607    }
608}
609#[doc = "Possible values of the field `CH3LIMITH`"]
610#[derive(Clone, Copy, Debug, PartialEq)]
611pub enum CH3LIMITHR {
612    #[doc = "Disable"]
613    DISABLED,
614    #[doc = "Enable"]
615    ENABLED,
616}
617impl CH3LIMITHR {
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            CH3LIMITHR::DISABLED => false,
633            CH3LIMITHR::ENABLED => true,
634        }
635    }
636    #[allow(missing_docs)]
637    #[doc(hidden)]
638    #[inline]
639    pub fn _from(value: bool) -> CH3LIMITHR {
640        match value {
641            false => CH3LIMITHR::DISABLED,
642            true => CH3LIMITHR::ENABLED,
643        }
644    }
645    #[doc = "Checks if the value of the field is `DISABLED`"]
646    #[inline]
647    pub fn is_disabled(&self) -> bool {
648        *self == CH3LIMITHR::DISABLED
649    }
650    #[doc = "Checks if the value of the field is `ENABLED`"]
651    #[inline]
652    pub fn is_enabled(&self) -> bool {
653        *self == CH3LIMITHR::ENABLED
654    }
655}
656#[doc = "Possible values of the field `CH3LIMITL`"]
657#[derive(Clone, Copy, Debug, PartialEq)]
658pub enum CH3LIMITLR {
659    #[doc = "Disable"]
660    DISABLED,
661    #[doc = "Enable"]
662    ENABLED,
663}
664impl CH3LIMITLR {
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            CH3LIMITLR::DISABLED => false,
680            CH3LIMITLR::ENABLED => true,
681        }
682    }
683    #[allow(missing_docs)]
684    #[doc(hidden)]
685    #[inline]
686    pub fn _from(value: bool) -> CH3LIMITLR {
687        match value {
688            false => CH3LIMITLR::DISABLED,
689            true => CH3LIMITLR::ENABLED,
690        }
691    }
692    #[doc = "Checks if the value of the field is `DISABLED`"]
693    #[inline]
694    pub fn is_disabled(&self) -> bool {
695        *self == CH3LIMITLR::DISABLED
696    }
697    #[doc = "Checks if the value of the field is `ENABLED`"]
698    #[inline]
699    pub fn is_enabled(&self) -> bool {
700        *self == CH3LIMITLR::ENABLED
701    }
702}
703#[doc = "Possible values of the field `CH4LIMITH`"]
704#[derive(Clone, Copy, Debug, PartialEq)]
705pub enum CH4LIMITHR {
706    #[doc = "Disable"]
707    DISABLED,
708    #[doc = "Enable"]
709    ENABLED,
710}
711impl CH4LIMITHR {
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            CH4LIMITHR::DISABLED => false,
727            CH4LIMITHR::ENABLED => true,
728        }
729    }
730    #[allow(missing_docs)]
731    #[doc(hidden)]
732    #[inline]
733    pub fn _from(value: bool) -> CH4LIMITHR {
734        match value {
735            false => CH4LIMITHR::DISABLED,
736            true => CH4LIMITHR::ENABLED,
737        }
738    }
739    #[doc = "Checks if the value of the field is `DISABLED`"]
740    #[inline]
741    pub fn is_disabled(&self) -> bool {
742        *self == CH4LIMITHR::DISABLED
743    }
744    #[doc = "Checks if the value of the field is `ENABLED`"]
745    #[inline]
746    pub fn is_enabled(&self) -> bool {
747        *self == CH4LIMITHR::ENABLED
748    }
749}
750#[doc = "Possible values of the field `CH4LIMITL`"]
751#[derive(Clone, Copy, Debug, PartialEq)]
752pub enum CH4LIMITLR {
753    #[doc = "Disable"]
754    DISABLED,
755    #[doc = "Enable"]
756    ENABLED,
757}
758impl CH4LIMITLR {
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            CH4LIMITLR::DISABLED => false,
774            CH4LIMITLR::ENABLED => true,
775        }
776    }
777    #[allow(missing_docs)]
778    #[doc(hidden)]
779    #[inline]
780    pub fn _from(value: bool) -> CH4LIMITLR {
781        match value {
782            false => CH4LIMITLR::DISABLED,
783            true => CH4LIMITLR::ENABLED,
784        }
785    }
786    #[doc = "Checks if the value of the field is `DISABLED`"]
787    #[inline]
788    pub fn is_disabled(&self) -> bool {
789        *self == CH4LIMITLR::DISABLED
790    }
791    #[doc = "Checks if the value of the field is `ENABLED`"]
792    #[inline]
793    pub fn is_enabled(&self) -> bool {
794        *self == CH4LIMITLR::ENABLED
795    }
796}
797#[doc = "Possible values of the field `CH5LIMITH`"]
798#[derive(Clone, Copy, Debug, PartialEq)]
799pub enum CH5LIMITHR {
800    #[doc = "Disable"]
801    DISABLED,
802    #[doc = "Enable"]
803    ENABLED,
804}
805impl CH5LIMITHR {
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            CH5LIMITHR::DISABLED => false,
821            CH5LIMITHR::ENABLED => true,
822        }
823    }
824    #[allow(missing_docs)]
825    #[doc(hidden)]
826    #[inline]
827    pub fn _from(value: bool) -> CH5LIMITHR {
828        match value {
829            false => CH5LIMITHR::DISABLED,
830            true => CH5LIMITHR::ENABLED,
831        }
832    }
833    #[doc = "Checks if the value of the field is `DISABLED`"]
834    #[inline]
835    pub fn is_disabled(&self) -> bool {
836        *self == CH5LIMITHR::DISABLED
837    }
838    #[doc = "Checks if the value of the field is `ENABLED`"]
839    #[inline]
840    pub fn is_enabled(&self) -> bool {
841        *self == CH5LIMITHR::ENABLED
842    }
843}
844#[doc = "Possible values of the field `CH5LIMITL`"]
845#[derive(Clone, Copy, Debug, PartialEq)]
846pub enum CH5LIMITLR {
847    #[doc = "Disable"]
848    DISABLED,
849    #[doc = "Enable"]
850    ENABLED,
851}
852impl CH5LIMITLR {
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            CH5LIMITLR::DISABLED => false,
868            CH5LIMITLR::ENABLED => true,
869        }
870    }
871    #[allow(missing_docs)]
872    #[doc(hidden)]
873    #[inline]
874    pub fn _from(value: bool) -> CH5LIMITLR {
875        match value {
876            false => CH5LIMITLR::DISABLED,
877            true => CH5LIMITLR::ENABLED,
878        }
879    }
880    #[doc = "Checks if the value of the field is `DISABLED`"]
881    #[inline]
882    pub fn is_disabled(&self) -> bool {
883        *self == CH5LIMITLR::DISABLED
884    }
885    #[doc = "Checks if the value of the field is `ENABLED`"]
886    #[inline]
887    pub fn is_enabled(&self) -> bool {
888        *self == CH5LIMITLR::ENABLED
889    }
890}
891#[doc = "Possible values of the field `CH6LIMITH`"]
892#[derive(Clone, Copy, Debug, PartialEq)]
893pub enum CH6LIMITHR {
894    #[doc = "Disable"]
895    DISABLED,
896    #[doc = "Enable"]
897    ENABLED,
898}
899impl CH6LIMITHR {
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            CH6LIMITHR::DISABLED => false,
915            CH6LIMITHR::ENABLED => true,
916        }
917    }
918    #[allow(missing_docs)]
919    #[doc(hidden)]
920    #[inline]
921    pub fn _from(value: bool) -> CH6LIMITHR {
922        match value {
923            false => CH6LIMITHR::DISABLED,
924            true => CH6LIMITHR::ENABLED,
925        }
926    }
927    #[doc = "Checks if the value of the field is `DISABLED`"]
928    #[inline]
929    pub fn is_disabled(&self) -> bool {
930        *self == CH6LIMITHR::DISABLED
931    }
932    #[doc = "Checks if the value of the field is `ENABLED`"]
933    #[inline]
934    pub fn is_enabled(&self) -> bool {
935        *self == CH6LIMITHR::ENABLED
936    }
937}
938#[doc = "Possible values of the field `CH6LIMITL`"]
939#[derive(Clone, Copy, Debug, PartialEq)]
940pub enum CH6LIMITLR {
941    #[doc = "Disable"]
942    DISABLED,
943    #[doc = "Enable"]
944    ENABLED,
945}
946impl CH6LIMITLR {
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            CH6LIMITLR::DISABLED => false,
962            CH6LIMITLR::ENABLED => true,
963        }
964    }
965    #[allow(missing_docs)]
966    #[doc(hidden)]
967    #[inline]
968    pub fn _from(value: bool) -> CH6LIMITLR {
969        match value {
970            false => CH6LIMITLR::DISABLED,
971            true => CH6LIMITLR::ENABLED,
972        }
973    }
974    #[doc = "Checks if the value of the field is `DISABLED`"]
975    #[inline]
976    pub fn is_disabled(&self) -> bool {
977        *self == CH6LIMITLR::DISABLED
978    }
979    #[doc = "Checks if the value of the field is `ENABLED`"]
980    #[inline]
981    pub fn is_enabled(&self) -> bool {
982        *self == CH6LIMITLR::ENABLED
983    }
984}
985#[doc = "Possible values of the field `CH7LIMITH`"]
986#[derive(Clone, Copy, Debug, PartialEq)]
987pub enum CH7LIMITHR {
988    #[doc = "Disable"]
989    DISABLED,
990    #[doc = "Enable"]
991    ENABLED,
992}
993impl CH7LIMITHR {
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            CH7LIMITHR::DISABLED => false,
1009            CH7LIMITHR::ENABLED => true,
1010        }
1011    }
1012    #[allow(missing_docs)]
1013    #[doc(hidden)]
1014    #[inline]
1015    pub fn _from(value: bool) -> CH7LIMITHR {
1016        match value {
1017            false => CH7LIMITHR::DISABLED,
1018            true => CH7LIMITHR::ENABLED,
1019        }
1020    }
1021    #[doc = "Checks if the value of the field is `DISABLED`"]
1022    #[inline]
1023    pub fn is_disabled(&self) -> bool {
1024        *self == CH7LIMITHR::DISABLED
1025    }
1026    #[doc = "Checks if the value of the field is `ENABLED`"]
1027    #[inline]
1028    pub fn is_enabled(&self) -> bool {
1029        *self == CH7LIMITHR::ENABLED
1030    }
1031}
1032#[doc = "Possible values of the field `CH7LIMITL`"]
1033#[derive(Clone, Copy, Debug, PartialEq)]
1034pub enum CH7LIMITLR {
1035    #[doc = "Disable"]
1036    DISABLED,
1037    #[doc = "Enable"]
1038    ENABLED,
1039}
1040impl CH7LIMITLR {
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            CH7LIMITLR::DISABLED => false,
1056            CH7LIMITLR::ENABLED => true,
1057        }
1058    }
1059    #[allow(missing_docs)]
1060    #[doc(hidden)]
1061    #[inline]
1062    pub fn _from(value: bool) -> CH7LIMITLR {
1063        match value {
1064            false => CH7LIMITLR::DISABLED,
1065            true => CH7LIMITLR::ENABLED,
1066        }
1067    }
1068    #[doc = "Checks if the value of the field is `DISABLED`"]
1069    #[inline]
1070    pub fn is_disabled(&self) -> bool {
1071        *self == CH7LIMITLR::DISABLED
1072    }
1073    #[doc = "Checks if the value of the field is `ENABLED`"]
1074    #[inline]
1075    pub fn is_enabled(&self) -> bool {
1076        *self == CH7LIMITLR::ENABLED
1077    }
1078}
1079#[doc = "Values that can be written to the field `STARTED`"]
1080pub enum STARTEDW {
1081    #[doc = "Disable"]
1082    DISABLED,
1083    #[doc = "Enable"]
1084    ENABLED,
1085}
1086impl STARTEDW {
1087    #[allow(missing_docs)]
1088    #[doc(hidden)]
1089    #[inline]
1090    pub fn _bits(&self) -> bool {
1091        match *self {
1092            STARTEDW::DISABLED => false,
1093            STARTEDW::ENABLED => true,
1094        }
1095    }
1096}
1097#[doc = r" Proxy"]
1098pub struct _STARTEDW<'a> {
1099    w: &'a mut W,
1100}
1101impl<'a> _STARTEDW<'a> {
1102    #[doc = r" Writes `variant` to the field"]
1103    #[inline]
1104    pub fn variant(self, variant: STARTEDW) -> &'a mut W {
1105        {
1106            self.bit(variant._bits())
1107        }
1108    }
1109    #[doc = "Disable"]
1110    #[inline]
1111    pub fn disabled(self) -> &'a mut W {
1112        self.variant(STARTEDW::DISABLED)
1113    }
1114    #[doc = "Enable"]
1115    #[inline]
1116    pub fn enabled(self) -> &'a mut W {
1117        self.variant(STARTEDW::ENABLED)
1118    }
1119    #[doc = r" Sets the field bit"]
1120    pub fn set_bit(self) -> &'a mut W {
1121        self.bit(true)
1122    }
1123    #[doc = r" Clears the field bit"]
1124    pub fn clear_bit(self) -> &'a mut W {
1125        self.bit(false)
1126    }
1127    #[doc = r" Writes raw bits to the field"]
1128    #[inline]
1129    pub fn bit(self, value: bool) -> &'a mut W {
1130        const MASK: bool = true;
1131        const OFFSET: u8 = 0;
1132        self.w.bits &= !((MASK as u32) << OFFSET);
1133        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1134        self.w
1135    }
1136}
1137#[doc = "Values that can be written to the field `END`"]
1138pub enum ENDW {
1139    #[doc = "Disable"]
1140    DISABLED,
1141    #[doc = "Enable"]
1142    ENABLED,
1143}
1144impl ENDW {
1145    #[allow(missing_docs)]
1146    #[doc(hidden)]
1147    #[inline]
1148    pub fn _bits(&self) -> bool {
1149        match *self {
1150            ENDW::DISABLED => false,
1151            ENDW::ENABLED => true,
1152        }
1153    }
1154}
1155#[doc = r" Proxy"]
1156pub struct _ENDW<'a> {
1157    w: &'a mut W,
1158}
1159impl<'a> _ENDW<'a> {
1160    #[doc = r" Writes `variant` to the field"]
1161    #[inline]
1162    pub fn variant(self, variant: ENDW) -> &'a mut W {
1163        {
1164            self.bit(variant._bits())
1165        }
1166    }
1167    #[doc = "Disable"]
1168    #[inline]
1169    pub fn disabled(self) -> &'a mut W {
1170        self.variant(ENDW::DISABLED)
1171    }
1172    #[doc = "Enable"]
1173    #[inline]
1174    pub fn enabled(self) -> &'a mut W {
1175        self.variant(ENDW::ENABLED)
1176    }
1177    #[doc = r" Sets the field bit"]
1178    pub fn set_bit(self) -> &'a mut W {
1179        self.bit(true)
1180    }
1181    #[doc = r" Clears the field bit"]
1182    pub fn clear_bit(self) -> &'a mut W {
1183        self.bit(false)
1184    }
1185    #[doc = r" Writes raw bits to the field"]
1186    #[inline]
1187    pub fn bit(self, value: bool) -> &'a mut W {
1188        const MASK: bool = true;
1189        const OFFSET: u8 = 1;
1190        self.w.bits &= !((MASK as u32) << OFFSET);
1191        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1192        self.w
1193    }
1194}
1195#[doc = "Values that can be written to the field `DONE`"]
1196pub enum DONEW {
1197    #[doc = "Disable"]
1198    DISABLED,
1199    #[doc = "Enable"]
1200    ENABLED,
1201}
1202impl DONEW {
1203    #[allow(missing_docs)]
1204    #[doc(hidden)]
1205    #[inline]
1206    pub fn _bits(&self) -> bool {
1207        match *self {
1208            DONEW::DISABLED => false,
1209            DONEW::ENABLED => true,
1210        }
1211    }
1212}
1213#[doc = r" Proxy"]
1214pub struct _DONEW<'a> {
1215    w: &'a mut W,
1216}
1217impl<'a> _DONEW<'a> {
1218    #[doc = r" Writes `variant` to the field"]
1219    #[inline]
1220    pub fn variant(self, variant: DONEW) -> &'a mut W {
1221        {
1222            self.bit(variant._bits())
1223        }
1224    }
1225    #[doc = "Disable"]
1226    #[inline]
1227    pub fn disabled(self) -> &'a mut W {
1228        self.variant(DONEW::DISABLED)
1229    }
1230    #[doc = "Enable"]
1231    #[inline]
1232    pub fn enabled(self) -> &'a mut W {
1233        self.variant(DONEW::ENABLED)
1234    }
1235    #[doc = r" Sets the field bit"]
1236    pub fn set_bit(self) -> &'a mut W {
1237        self.bit(true)
1238    }
1239    #[doc = r" Clears the field bit"]
1240    pub fn clear_bit(self) -> &'a mut W {
1241        self.bit(false)
1242    }
1243    #[doc = r" Writes raw bits to the field"]
1244    #[inline]
1245    pub fn bit(self, value: bool) -> &'a mut W {
1246        const MASK: bool = true;
1247        const OFFSET: u8 = 2;
1248        self.w.bits &= !((MASK as u32) << OFFSET);
1249        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1250        self.w
1251    }
1252}
1253#[doc = "Values that can be written to the field `RESULTDONE`"]
1254pub enum RESULTDONEW {
1255    #[doc = "Disable"]
1256    DISABLED,
1257    #[doc = "Enable"]
1258    ENABLED,
1259}
1260impl RESULTDONEW {
1261    #[allow(missing_docs)]
1262    #[doc(hidden)]
1263    #[inline]
1264    pub fn _bits(&self) -> bool {
1265        match *self {
1266            RESULTDONEW::DISABLED => false,
1267            RESULTDONEW::ENABLED => true,
1268        }
1269    }
1270}
1271#[doc = r" Proxy"]
1272pub struct _RESULTDONEW<'a> {
1273    w: &'a mut W,
1274}
1275impl<'a> _RESULTDONEW<'a> {
1276    #[doc = r" Writes `variant` to the field"]
1277    #[inline]
1278    pub fn variant(self, variant: RESULTDONEW) -> &'a mut W {
1279        {
1280            self.bit(variant._bits())
1281        }
1282    }
1283    #[doc = "Disable"]
1284    #[inline]
1285    pub fn disabled(self) -> &'a mut W {
1286        self.variant(RESULTDONEW::DISABLED)
1287    }
1288    #[doc = "Enable"]
1289    #[inline]
1290    pub fn enabled(self) -> &'a mut W {
1291        self.variant(RESULTDONEW::ENABLED)
1292    }
1293    #[doc = r" Sets the field bit"]
1294    pub fn set_bit(self) -> &'a mut W {
1295        self.bit(true)
1296    }
1297    #[doc = r" Clears the field bit"]
1298    pub fn clear_bit(self) -> &'a mut W {
1299        self.bit(false)
1300    }
1301    #[doc = r" Writes raw bits to the field"]
1302    #[inline]
1303    pub fn bit(self, value: bool) -> &'a mut W {
1304        const MASK: bool = true;
1305        const OFFSET: u8 = 3;
1306        self.w.bits &= !((MASK as u32) << OFFSET);
1307        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1308        self.w
1309    }
1310}
1311#[doc = "Values that can be written to the field `CALIBRATEDONE`"]
1312pub enum CALIBRATEDONEW {
1313    #[doc = "Disable"]
1314    DISABLED,
1315    #[doc = "Enable"]
1316    ENABLED,
1317}
1318impl CALIBRATEDONEW {
1319    #[allow(missing_docs)]
1320    #[doc(hidden)]
1321    #[inline]
1322    pub fn _bits(&self) -> bool {
1323        match *self {
1324            CALIBRATEDONEW::DISABLED => false,
1325            CALIBRATEDONEW::ENABLED => true,
1326        }
1327    }
1328}
1329#[doc = r" Proxy"]
1330pub struct _CALIBRATEDONEW<'a> {
1331    w: &'a mut W,
1332}
1333impl<'a> _CALIBRATEDONEW<'a> {
1334    #[doc = r" Writes `variant` to the field"]
1335    #[inline]
1336    pub fn variant(self, variant: CALIBRATEDONEW) -> &'a mut W {
1337        {
1338            self.bit(variant._bits())
1339        }
1340    }
1341    #[doc = "Disable"]
1342    #[inline]
1343    pub fn disabled(self) -> &'a mut W {
1344        self.variant(CALIBRATEDONEW::DISABLED)
1345    }
1346    #[doc = "Enable"]
1347    #[inline]
1348    pub fn enabled(self) -> &'a mut W {
1349        self.variant(CALIBRATEDONEW::ENABLED)
1350    }
1351    #[doc = r" Sets the field bit"]
1352    pub fn set_bit(self) -> &'a mut W {
1353        self.bit(true)
1354    }
1355    #[doc = r" Clears the field bit"]
1356    pub fn clear_bit(self) -> &'a mut W {
1357        self.bit(false)
1358    }
1359    #[doc = r" Writes raw bits to the field"]
1360    #[inline]
1361    pub fn bit(self, value: bool) -> &'a mut W {
1362        const MASK: bool = true;
1363        const OFFSET: u8 = 4;
1364        self.w.bits &= !((MASK as u32) << OFFSET);
1365        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1366        self.w
1367    }
1368}
1369#[doc = "Values that can be written to the field `STOPPED`"]
1370pub enum STOPPEDW {
1371    #[doc = "Disable"]
1372    DISABLED,
1373    #[doc = "Enable"]
1374    ENABLED,
1375}
1376impl STOPPEDW {
1377    #[allow(missing_docs)]
1378    #[doc(hidden)]
1379    #[inline]
1380    pub fn _bits(&self) -> bool {
1381        match *self {
1382            STOPPEDW::DISABLED => false,
1383            STOPPEDW::ENABLED => true,
1384        }
1385    }
1386}
1387#[doc = r" Proxy"]
1388pub struct _STOPPEDW<'a> {
1389    w: &'a mut W,
1390}
1391impl<'a> _STOPPEDW<'a> {
1392    #[doc = r" Writes `variant` to the field"]
1393    #[inline]
1394    pub fn variant(self, variant: STOPPEDW) -> &'a mut W {
1395        {
1396            self.bit(variant._bits())
1397        }
1398    }
1399    #[doc = "Disable"]
1400    #[inline]
1401    pub fn disabled(self) -> &'a mut W {
1402        self.variant(STOPPEDW::DISABLED)
1403    }
1404    #[doc = "Enable"]
1405    #[inline]
1406    pub fn enabled(self) -> &'a mut W {
1407        self.variant(STOPPEDW::ENABLED)
1408    }
1409    #[doc = r" Sets the field bit"]
1410    pub fn set_bit(self) -> &'a mut W {
1411        self.bit(true)
1412    }
1413    #[doc = r" Clears the field bit"]
1414    pub fn clear_bit(self) -> &'a mut W {
1415        self.bit(false)
1416    }
1417    #[doc = r" Writes raw bits to the field"]
1418    #[inline]
1419    pub fn bit(self, value: bool) -> &'a mut W {
1420        const MASK: bool = true;
1421        const OFFSET: u8 = 5;
1422        self.w.bits &= !((MASK as u32) << OFFSET);
1423        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1424        self.w
1425    }
1426}
1427#[doc = "Values that can be written to the field `CH0LIMITH`"]
1428pub enum CH0LIMITHW {
1429    #[doc = "Disable"]
1430    DISABLED,
1431    #[doc = "Enable"]
1432    ENABLED,
1433}
1434impl CH0LIMITHW {
1435    #[allow(missing_docs)]
1436    #[doc(hidden)]
1437    #[inline]
1438    pub fn _bits(&self) -> bool {
1439        match *self {
1440            CH0LIMITHW::DISABLED => false,
1441            CH0LIMITHW::ENABLED => true,
1442        }
1443    }
1444}
1445#[doc = r" Proxy"]
1446pub struct _CH0LIMITHW<'a> {
1447    w: &'a mut W,
1448}
1449impl<'a> _CH0LIMITHW<'a> {
1450    #[doc = r" Writes `variant` to the field"]
1451    #[inline]
1452    pub fn variant(self, variant: CH0LIMITHW) -> &'a mut W {
1453        {
1454            self.bit(variant._bits())
1455        }
1456    }
1457    #[doc = "Disable"]
1458    #[inline]
1459    pub fn disabled(self) -> &'a mut W {
1460        self.variant(CH0LIMITHW::DISABLED)
1461    }
1462    #[doc = "Enable"]
1463    #[inline]
1464    pub fn enabled(self) -> &'a mut W {
1465        self.variant(CH0LIMITHW::ENABLED)
1466    }
1467    #[doc = r" Sets the field bit"]
1468    pub fn set_bit(self) -> &'a mut W {
1469        self.bit(true)
1470    }
1471    #[doc = r" Clears the field bit"]
1472    pub fn clear_bit(self) -> &'a mut W {
1473        self.bit(false)
1474    }
1475    #[doc = r" Writes raw bits to the field"]
1476    #[inline]
1477    pub fn bit(self, value: bool) -> &'a mut W {
1478        const MASK: bool = true;
1479        const OFFSET: u8 = 6;
1480        self.w.bits &= !((MASK as u32) << OFFSET);
1481        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1482        self.w
1483    }
1484}
1485#[doc = "Values that can be written to the field `CH0LIMITL`"]
1486pub enum CH0LIMITLW {
1487    #[doc = "Disable"]
1488    DISABLED,
1489    #[doc = "Enable"]
1490    ENABLED,
1491}
1492impl CH0LIMITLW {
1493    #[allow(missing_docs)]
1494    #[doc(hidden)]
1495    #[inline]
1496    pub fn _bits(&self) -> bool {
1497        match *self {
1498            CH0LIMITLW::DISABLED => false,
1499            CH0LIMITLW::ENABLED => true,
1500        }
1501    }
1502}
1503#[doc = r" Proxy"]
1504pub struct _CH0LIMITLW<'a> {
1505    w: &'a mut W,
1506}
1507impl<'a> _CH0LIMITLW<'a> {
1508    #[doc = r" Writes `variant` to the field"]
1509    #[inline]
1510    pub fn variant(self, variant: CH0LIMITLW) -> &'a mut W {
1511        {
1512            self.bit(variant._bits())
1513        }
1514    }
1515    #[doc = "Disable"]
1516    #[inline]
1517    pub fn disabled(self) -> &'a mut W {
1518        self.variant(CH0LIMITLW::DISABLED)
1519    }
1520    #[doc = "Enable"]
1521    #[inline]
1522    pub fn enabled(self) -> &'a mut W {
1523        self.variant(CH0LIMITLW::ENABLED)
1524    }
1525    #[doc = r" Sets the field bit"]
1526    pub fn set_bit(self) -> &'a mut W {
1527        self.bit(true)
1528    }
1529    #[doc = r" Clears the field bit"]
1530    pub fn clear_bit(self) -> &'a mut W {
1531        self.bit(false)
1532    }
1533    #[doc = r" Writes raw bits to the field"]
1534    #[inline]
1535    pub fn bit(self, value: bool) -> &'a mut W {
1536        const MASK: bool = true;
1537        const OFFSET: u8 = 7;
1538        self.w.bits &= !((MASK as u32) << OFFSET);
1539        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1540        self.w
1541    }
1542}
1543#[doc = "Values that can be written to the field `CH1LIMITH`"]
1544pub enum CH1LIMITHW {
1545    #[doc = "Disable"]
1546    DISABLED,
1547    #[doc = "Enable"]
1548    ENABLED,
1549}
1550impl CH1LIMITHW {
1551    #[allow(missing_docs)]
1552    #[doc(hidden)]
1553    #[inline]
1554    pub fn _bits(&self) -> bool {
1555        match *self {
1556            CH1LIMITHW::DISABLED => false,
1557            CH1LIMITHW::ENABLED => true,
1558        }
1559    }
1560}
1561#[doc = r" Proxy"]
1562pub struct _CH1LIMITHW<'a> {
1563    w: &'a mut W,
1564}
1565impl<'a> _CH1LIMITHW<'a> {
1566    #[doc = r" Writes `variant` to the field"]
1567    #[inline]
1568    pub fn variant(self, variant: CH1LIMITHW) -> &'a mut W {
1569        {
1570            self.bit(variant._bits())
1571        }
1572    }
1573    #[doc = "Disable"]
1574    #[inline]
1575    pub fn disabled(self) -> &'a mut W {
1576        self.variant(CH1LIMITHW::DISABLED)
1577    }
1578    #[doc = "Enable"]
1579    #[inline]
1580    pub fn enabled(self) -> &'a mut W {
1581        self.variant(CH1LIMITHW::ENABLED)
1582    }
1583    #[doc = r" Sets the field bit"]
1584    pub fn set_bit(self) -> &'a mut W {
1585        self.bit(true)
1586    }
1587    #[doc = r" Clears the field bit"]
1588    pub fn clear_bit(self) -> &'a mut W {
1589        self.bit(false)
1590    }
1591    #[doc = r" Writes raw bits to the field"]
1592    #[inline]
1593    pub fn bit(self, value: bool) -> &'a mut W {
1594        const MASK: bool = true;
1595        const OFFSET: u8 = 8;
1596        self.w.bits &= !((MASK as u32) << OFFSET);
1597        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1598        self.w
1599    }
1600}
1601#[doc = "Values that can be written to the field `CH1LIMITL`"]
1602pub enum CH1LIMITLW {
1603    #[doc = "Disable"]
1604    DISABLED,
1605    #[doc = "Enable"]
1606    ENABLED,
1607}
1608impl CH1LIMITLW {
1609    #[allow(missing_docs)]
1610    #[doc(hidden)]
1611    #[inline]
1612    pub fn _bits(&self) -> bool {
1613        match *self {
1614            CH1LIMITLW::DISABLED => false,
1615            CH1LIMITLW::ENABLED => true,
1616        }
1617    }
1618}
1619#[doc = r" Proxy"]
1620pub struct _CH1LIMITLW<'a> {
1621    w: &'a mut W,
1622}
1623impl<'a> _CH1LIMITLW<'a> {
1624    #[doc = r" Writes `variant` to the field"]
1625    #[inline]
1626    pub fn variant(self, variant: CH1LIMITLW) -> &'a mut W {
1627        {
1628            self.bit(variant._bits())
1629        }
1630    }
1631    #[doc = "Disable"]
1632    #[inline]
1633    pub fn disabled(self) -> &'a mut W {
1634        self.variant(CH1LIMITLW::DISABLED)
1635    }
1636    #[doc = "Enable"]
1637    #[inline]
1638    pub fn enabled(self) -> &'a mut W {
1639        self.variant(CH1LIMITLW::ENABLED)
1640    }
1641    #[doc = r" Sets the field bit"]
1642    pub fn set_bit(self) -> &'a mut W {
1643        self.bit(true)
1644    }
1645    #[doc = r" Clears the field bit"]
1646    pub fn clear_bit(self) -> &'a mut W {
1647        self.bit(false)
1648    }
1649    #[doc = r" Writes raw bits to the field"]
1650    #[inline]
1651    pub fn bit(self, value: bool) -> &'a mut W {
1652        const MASK: bool = true;
1653        const OFFSET: u8 = 9;
1654        self.w.bits &= !((MASK as u32) << OFFSET);
1655        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1656        self.w
1657    }
1658}
1659#[doc = "Values that can be written to the field `CH2LIMITH`"]
1660pub enum CH2LIMITHW {
1661    #[doc = "Disable"]
1662    DISABLED,
1663    #[doc = "Enable"]
1664    ENABLED,
1665}
1666impl CH2LIMITHW {
1667    #[allow(missing_docs)]
1668    #[doc(hidden)]
1669    #[inline]
1670    pub fn _bits(&self) -> bool {
1671        match *self {
1672            CH2LIMITHW::DISABLED => false,
1673            CH2LIMITHW::ENABLED => true,
1674        }
1675    }
1676}
1677#[doc = r" Proxy"]
1678pub struct _CH2LIMITHW<'a> {
1679    w: &'a mut W,
1680}
1681impl<'a> _CH2LIMITHW<'a> {
1682    #[doc = r" Writes `variant` to the field"]
1683    #[inline]
1684    pub fn variant(self, variant: CH2LIMITHW) -> &'a mut W {
1685        {
1686            self.bit(variant._bits())
1687        }
1688    }
1689    #[doc = "Disable"]
1690    #[inline]
1691    pub fn disabled(self) -> &'a mut W {
1692        self.variant(CH2LIMITHW::DISABLED)
1693    }
1694    #[doc = "Enable"]
1695    #[inline]
1696    pub fn enabled(self) -> &'a mut W {
1697        self.variant(CH2LIMITHW::ENABLED)
1698    }
1699    #[doc = r" Sets the field bit"]
1700    pub fn set_bit(self) -> &'a mut W {
1701        self.bit(true)
1702    }
1703    #[doc = r" Clears the field bit"]
1704    pub fn clear_bit(self) -> &'a mut W {
1705        self.bit(false)
1706    }
1707    #[doc = r" Writes raw bits to the field"]
1708    #[inline]
1709    pub fn bit(self, value: bool) -> &'a mut W {
1710        const MASK: bool = true;
1711        const OFFSET: u8 = 10;
1712        self.w.bits &= !((MASK as u32) << OFFSET);
1713        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1714        self.w
1715    }
1716}
1717#[doc = "Values that can be written to the field `CH2LIMITL`"]
1718pub enum CH2LIMITLW {
1719    #[doc = "Disable"]
1720    DISABLED,
1721    #[doc = "Enable"]
1722    ENABLED,
1723}
1724impl CH2LIMITLW {
1725    #[allow(missing_docs)]
1726    #[doc(hidden)]
1727    #[inline]
1728    pub fn _bits(&self) -> bool {
1729        match *self {
1730            CH2LIMITLW::DISABLED => false,
1731            CH2LIMITLW::ENABLED => true,
1732        }
1733    }
1734}
1735#[doc = r" Proxy"]
1736pub struct _CH2LIMITLW<'a> {
1737    w: &'a mut W,
1738}
1739impl<'a> _CH2LIMITLW<'a> {
1740    #[doc = r" Writes `variant` to the field"]
1741    #[inline]
1742    pub fn variant(self, variant: CH2LIMITLW) -> &'a mut W {
1743        {
1744            self.bit(variant._bits())
1745        }
1746    }
1747    #[doc = "Disable"]
1748    #[inline]
1749    pub fn disabled(self) -> &'a mut W {
1750        self.variant(CH2LIMITLW::DISABLED)
1751    }
1752    #[doc = "Enable"]
1753    #[inline]
1754    pub fn enabled(self) -> &'a mut W {
1755        self.variant(CH2LIMITLW::ENABLED)
1756    }
1757    #[doc = r" Sets the field bit"]
1758    pub fn set_bit(self) -> &'a mut W {
1759        self.bit(true)
1760    }
1761    #[doc = r" Clears the field bit"]
1762    pub fn clear_bit(self) -> &'a mut W {
1763        self.bit(false)
1764    }
1765    #[doc = r" Writes raw bits to the field"]
1766    #[inline]
1767    pub fn bit(self, value: bool) -> &'a mut W {
1768        const MASK: bool = true;
1769        const OFFSET: u8 = 11;
1770        self.w.bits &= !((MASK as u32) << OFFSET);
1771        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1772        self.w
1773    }
1774}
1775#[doc = "Values that can be written to the field `CH3LIMITH`"]
1776pub enum CH3LIMITHW {
1777    #[doc = "Disable"]
1778    DISABLED,
1779    #[doc = "Enable"]
1780    ENABLED,
1781}
1782impl CH3LIMITHW {
1783    #[allow(missing_docs)]
1784    #[doc(hidden)]
1785    #[inline]
1786    pub fn _bits(&self) -> bool {
1787        match *self {
1788            CH3LIMITHW::DISABLED => false,
1789            CH3LIMITHW::ENABLED => true,
1790        }
1791    }
1792}
1793#[doc = r" Proxy"]
1794pub struct _CH3LIMITHW<'a> {
1795    w: &'a mut W,
1796}
1797impl<'a> _CH3LIMITHW<'a> {
1798    #[doc = r" Writes `variant` to the field"]
1799    #[inline]
1800    pub fn variant(self, variant: CH3LIMITHW) -> &'a mut W {
1801        {
1802            self.bit(variant._bits())
1803        }
1804    }
1805    #[doc = "Disable"]
1806    #[inline]
1807    pub fn disabled(self) -> &'a mut W {
1808        self.variant(CH3LIMITHW::DISABLED)
1809    }
1810    #[doc = "Enable"]
1811    #[inline]
1812    pub fn enabled(self) -> &'a mut W {
1813        self.variant(CH3LIMITHW::ENABLED)
1814    }
1815    #[doc = r" Sets the field bit"]
1816    pub fn set_bit(self) -> &'a mut W {
1817        self.bit(true)
1818    }
1819    #[doc = r" Clears the field bit"]
1820    pub fn clear_bit(self) -> &'a mut W {
1821        self.bit(false)
1822    }
1823    #[doc = r" Writes raw bits to the field"]
1824    #[inline]
1825    pub fn bit(self, value: bool) -> &'a mut W {
1826        const MASK: bool = true;
1827        const OFFSET: u8 = 12;
1828        self.w.bits &= !((MASK as u32) << OFFSET);
1829        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1830        self.w
1831    }
1832}
1833#[doc = "Values that can be written to the field `CH3LIMITL`"]
1834pub enum CH3LIMITLW {
1835    #[doc = "Disable"]
1836    DISABLED,
1837    #[doc = "Enable"]
1838    ENABLED,
1839}
1840impl CH3LIMITLW {
1841    #[allow(missing_docs)]
1842    #[doc(hidden)]
1843    #[inline]
1844    pub fn _bits(&self) -> bool {
1845        match *self {
1846            CH3LIMITLW::DISABLED => false,
1847            CH3LIMITLW::ENABLED => true,
1848        }
1849    }
1850}
1851#[doc = r" Proxy"]
1852pub struct _CH3LIMITLW<'a> {
1853    w: &'a mut W,
1854}
1855impl<'a> _CH3LIMITLW<'a> {
1856    #[doc = r" Writes `variant` to the field"]
1857    #[inline]
1858    pub fn variant(self, variant: CH3LIMITLW) -> &'a mut W {
1859        {
1860            self.bit(variant._bits())
1861        }
1862    }
1863    #[doc = "Disable"]
1864    #[inline]
1865    pub fn disabled(self) -> &'a mut W {
1866        self.variant(CH3LIMITLW::DISABLED)
1867    }
1868    #[doc = "Enable"]
1869    #[inline]
1870    pub fn enabled(self) -> &'a mut W {
1871        self.variant(CH3LIMITLW::ENABLED)
1872    }
1873    #[doc = r" Sets the field bit"]
1874    pub fn set_bit(self) -> &'a mut W {
1875        self.bit(true)
1876    }
1877    #[doc = r" Clears the field bit"]
1878    pub fn clear_bit(self) -> &'a mut W {
1879        self.bit(false)
1880    }
1881    #[doc = r" Writes raw bits to the field"]
1882    #[inline]
1883    pub fn bit(self, value: bool) -> &'a mut W {
1884        const MASK: bool = true;
1885        const OFFSET: u8 = 13;
1886        self.w.bits &= !((MASK as u32) << OFFSET);
1887        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1888        self.w
1889    }
1890}
1891#[doc = "Values that can be written to the field `CH4LIMITH`"]
1892pub enum CH4LIMITHW {
1893    #[doc = "Disable"]
1894    DISABLED,
1895    #[doc = "Enable"]
1896    ENABLED,
1897}
1898impl CH4LIMITHW {
1899    #[allow(missing_docs)]
1900    #[doc(hidden)]
1901    #[inline]
1902    pub fn _bits(&self) -> bool {
1903        match *self {
1904            CH4LIMITHW::DISABLED => false,
1905            CH4LIMITHW::ENABLED => true,
1906        }
1907    }
1908}
1909#[doc = r" Proxy"]
1910pub struct _CH4LIMITHW<'a> {
1911    w: &'a mut W,
1912}
1913impl<'a> _CH4LIMITHW<'a> {
1914    #[doc = r" Writes `variant` to the field"]
1915    #[inline]
1916    pub fn variant(self, variant: CH4LIMITHW) -> &'a mut W {
1917        {
1918            self.bit(variant._bits())
1919        }
1920    }
1921    #[doc = "Disable"]
1922    #[inline]
1923    pub fn disabled(self) -> &'a mut W {
1924        self.variant(CH4LIMITHW::DISABLED)
1925    }
1926    #[doc = "Enable"]
1927    #[inline]
1928    pub fn enabled(self) -> &'a mut W {
1929        self.variant(CH4LIMITHW::ENABLED)
1930    }
1931    #[doc = r" Sets the field bit"]
1932    pub fn set_bit(self) -> &'a mut W {
1933        self.bit(true)
1934    }
1935    #[doc = r" Clears the field bit"]
1936    pub fn clear_bit(self) -> &'a mut W {
1937        self.bit(false)
1938    }
1939    #[doc = r" Writes raw bits to the field"]
1940    #[inline]
1941    pub fn bit(self, value: bool) -> &'a mut W {
1942        const MASK: bool = true;
1943        const OFFSET: u8 = 14;
1944        self.w.bits &= !((MASK as u32) << OFFSET);
1945        self.w.bits |= ((value & MASK) as u32) << OFFSET;
1946        self.w
1947    }
1948}
1949#[doc = "Values that can be written to the field `CH4LIMITL`"]
1950pub enum CH4LIMITLW {
1951    #[doc = "Disable"]
1952    DISABLED,
1953    #[doc = "Enable"]
1954    ENABLED,
1955}
1956impl CH4LIMITLW {
1957    #[allow(missing_docs)]
1958    #[doc(hidden)]
1959    #[inline]
1960    pub fn _bits(&self) -> bool {
1961        match *self {
1962            CH4LIMITLW::DISABLED => false,
1963            CH4LIMITLW::ENABLED => true,
1964        }
1965    }
1966}
1967#[doc = r" Proxy"]
1968pub struct _CH4LIMITLW<'a> {
1969    w: &'a mut W,
1970}
1971impl<'a> _CH4LIMITLW<'a> {
1972    #[doc = r" Writes `variant` to the field"]
1973    #[inline]
1974    pub fn variant(self, variant: CH4LIMITLW) -> &'a mut W {
1975        {
1976            self.bit(variant._bits())
1977        }
1978    }
1979    #[doc = "Disable"]
1980    #[inline]
1981    pub fn disabled(self) -> &'a mut W {
1982        self.variant(CH4LIMITLW::DISABLED)
1983    }
1984    #[doc = "Enable"]
1985    #[inline]
1986    pub fn enabled(self) -> &'a mut W {
1987        self.variant(CH4LIMITLW::ENABLED)
1988    }
1989    #[doc = r" Sets the field bit"]
1990    pub fn set_bit(self) -> &'a mut W {
1991        self.bit(true)
1992    }
1993    #[doc = r" Clears the field bit"]
1994    pub fn clear_bit(self) -> &'a mut W {
1995        self.bit(false)
1996    }
1997    #[doc = r" Writes raw bits to the field"]
1998    #[inline]
1999    pub fn bit(self, value: bool) -> &'a mut W {
2000        const MASK: bool = true;
2001        const OFFSET: u8 = 15;
2002        self.w.bits &= !((MASK as u32) << OFFSET);
2003        self.w.bits |= ((value & MASK) as u32) << OFFSET;
2004        self.w
2005    }
2006}
2007#[doc = "Values that can be written to the field `CH5LIMITH`"]
2008pub enum CH5LIMITHW {
2009    #[doc = "Disable"]
2010    DISABLED,
2011    #[doc = "Enable"]
2012    ENABLED,
2013}
2014impl CH5LIMITHW {
2015    #[allow(missing_docs)]
2016    #[doc(hidden)]
2017    #[inline]
2018    pub fn _bits(&self) -> bool {
2019        match *self {
2020            CH5LIMITHW::DISABLED => false,
2021            CH5LIMITHW::ENABLED => true,
2022        }
2023    }
2024}
2025#[doc = r" Proxy"]
2026pub struct _CH5LIMITHW<'a> {
2027    w: &'a mut W,
2028}
2029impl<'a> _CH5LIMITHW<'a> {
2030    #[doc = r" Writes `variant` to the field"]
2031    #[inline]
2032    pub fn variant(self, variant: CH5LIMITHW) -> &'a mut W {
2033        {
2034            self.bit(variant._bits())
2035        }
2036    }
2037    #[doc = "Disable"]
2038    #[inline]
2039    pub fn disabled(self) -> &'a mut W {
2040        self.variant(CH5LIMITHW::DISABLED)
2041    }
2042    #[doc = "Enable"]
2043    #[inline]
2044    pub fn enabled(self) -> &'a mut W {
2045        self.variant(CH5LIMITHW::ENABLED)
2046    }
2047    #[doc = r" Sets the field bit"]
2048    pub fn set_bit(self) -> &'a mut W {
2049        self.bit(true)
2050    }
2051    #[doc = r" Clears the field bit"]
2052    pub fn clear_bit(self) -> &'a mut W {
2053        self.bit(false)
2054    }
2055    #[doc = r" Writes raw bits to the field"]
2056    #[inline]
2057    pub fn bit(self, value: bool) -> &'a mut W {
2058        const MASK: bool = true;
2059        const OFFSET: u8 = 16;
2060        self.w.bits &= !((MASK as u32) << OFFSET);
2061        self.w.bits |= ((value & MASK) as u32) << OFFSET;
2062        self.w
2063    }
2064}
2065#[doc = "Values that can be written to the field `CH5LIMITL`"]
2066pub enum CH5LIMITLW {
2067    #[doc = "Disable"]
2068    DISABLED,
2069    #[doc = "Enable"]
2070    ENABLED,
2071}
2072impl CH5LIMITLW {
2073    #[allow(missing_docs)]
2074    #[doc(hidden)]
2075    #[inline]
2076    pub fn _bits(&self) -> bool {
2077        match *self {
2078            CH5LIMITLW::DISABLED => false,
2079            CH5LIMITLW::ENABLED => true,
2080        }
2081    }
2082}
2083#[doc = r" Proxy"]
2084pub struct _CH5LIMITLW<'a> {
2085    w: &'a mut W,
2086}
2087impl<'a> _CH5LIMITLW<'a> {
2088    #[doc = r" Writes `variant` to the field"]
2089    #[inline]
2090    pub fn variant(self, variant: CH5LIMITLW) -> &'a mut W {
2091        {
2092            self.bit(variant._bits())
2093        }
2094    }
2095    #[doc = "Disable"]
2096    #[inline]
2097    pub fn disabled(self) -> &'a mut W {
2098        self.variant(CH5LIMITLW::DISABLED)
2099    }
2100    #[doc = "Enable"]
2101    #[inline]
2102    pub fn enabled(self) -> &'a mut W {
2103        self.variant(CH5LIMITLW::ENABLED)
2104    }
2105    #[doc = r" Sets the field bit"]
2106    pub fn set_bit(self) -> &'a mut W {
2107        self.bit(true)
2108    }
2109    #[doc = r" Clears the field bit"]
2110    pub fn clear_bit(self) -> &'a mut W {
2111        self.bit(false)
2112    }
2113    #[doc = r" Writes raw bits to the field"]
2114    #[inline]
2115    pub fn bit(self, value: bool) -> &'a mut W {
2116        const MASK: bool = true;
2117        const OFFSET: u8 = 17;
2118        self.w.bits &= !((MASK as u32) << OFFSET);
2119        self.w.bits |= ((value & MASK) as u32) << OFFSET;
2120        self.w
2121    }
2122}
2123#[doc = "Values that can be written to the field `CH6LIMITH`"]
2124pub enum CH6LIMITHW {
2125    #[doc = "Disable"]
2126    DISABLED,
2127    #[doc = "Enable"]
2128    ENABLED,
2129}
2130impl CH6LIMITHW {
2131    #[allow(missing_docs)]
2132    #[doc(hidden)]
2133    #[inline]
2134    pub fn _bits(&self) -> bool {
2135        match *self {
2136            CH6LIMITHW::DISABLED => false,
2137            CH6LIMITHW::ENABLED => true,
2138        }
2139    }
2140}
2141#[doc = r" Proxy"]
2142pub struct _CH6LIMITHW<'a> {
2143    w: &'a mut W,
2144}
2145impl<'a> _CH6LIMITHW<'a> {
2146    #[doc = r" Writes `variant` to the field"]
2147    #[inline]
2148    pub fn variant(self, variant: CH6LIMITHW) -> &'a mut W {
2149        {
2150            self.bit(variant._bits())
2151        }
2152    }
2153    #[doc = "Disable"]
2154    #[inline]
2155    pub fn disabled(self) -> &'a mut W {
2156        self.variant(CH6LIMITHW::DISABLED)
2157    }
2158    #[doc = "Enable"]
2159    #[inline]
2160    pub fn enabled(self) -> &'a mut W {
2161        self.variant(CH6LIMITHW::ENABLED)
2162    }
2163    #[doc = r" Sets the field bit"]
2164    pub fn set_bit(self) -> &'a mut W {
2165        self.bit(true)
2166    }
2167    #[doc = r" Clears the field bit"]
2168    pub fn clear_bit(self) -> &'a mut W {
2169        self.bit(false)
2170    }
2171    #[doc = r" Writes raw bits to the field"]
2172    #[inline]
2173    pub fn bit(self, value: bool) -> &'a mut W {
2174        const MASK: bool = true;
2175        const OFFSET: u8 = 18;
2176        self.w.bits &= !((MASK as u32) << OFFSET);
2177        self.w.bits |= ((value & MASK) as u32) << OFFSET;
2178        self.w
2179    }
2180}
2181#[doc = "Values that can be written to the field `CH6LIMITL`"]
2182pub enum CH6LIMITLW {
2183    #[doc = "Disable"]
2184    DISABLED,
2185    #[doc = "Enable"]
2186    ENABLED,
2187}
2188impl CH6LIMITLW {
2189    #[allow(missing_docs)]
2190    #[doc(hidden)]
2191    #[inline]
2192    pub fn _bits(&self) -> bool {
2193        match *self {
2194            CH6LIMITLW::DISABLED => false,
2195            CH6LIMITLW::ENABLED => true,
2196        }
2197    }
2198}
2199#[doc = r" Proxy"]
2200pub struct _CH6LIMITLW<'a> {
2201    w: &'a mut W,
2202}
2203impl<'a> _CH6LIMITLW<'a> {
2204    #[doc = r" Writes `variant` to the field"]
2205    #[inline]
2206    pub fn variant(self, variant: CH6LIMITLW) -> &'a mut W {
2207        {
2208            self.bit(variant._bits())
2209        }
2210    }
2211    #[doc = "Disable"]
2212    #[inline]
2213    pub fn disabled(self) -> &'a mut W {
2214        self.variant(CH6LIMITLW::DISABLED)
2215    }
2216    #[doc = "Enable"]
2217    #[inline]
2218    pub fn enabled(self) -> &'a mut W {
2219        self.variant(CH6LIMITLW::ENABLED)
2220    }
2221    #[doc = r" Sets the field bit"]
2222    pub fn set_bit(self) -> &'a mut W {
2223        self.bit(true)
2224    }
2225    #[doc = r" Clears the field bit"]
2226    pub fn clear_bit(self) -> &'a mut W {
2227        self.bit(false)
2228    }
2229    #[doc = r" Writes raw bits to the field"]
2230    #[inline]
2231    pub fn bit(self, value: bool) -> &'a mut W {
2232        const MASK: bool = true;
2233        const OFFSET: u8 = 19;
2234        self.w.bits &= !((MASK as u32) << OFFSET);
2235        self.w.bits |= ((value & MASK) as u32) << OFFSET;
2236        self.w
2237    }
2238}
2239#[doc = "Values that can be written to the field `CH7LIMITH`"]
2240pub enum CH7LIMITHW {
2241    #[doc = "Disable"]
2242    DISABLED,
2243    #[doc = "Enable"]
2244    ENABLED,
2245}
2246impl CH7LIMITHW {
2247    #[allow(missing_docs)]
2248    #[doc(hidden)]
2249    #[inline]
2250    pub fn _bits(&self) -> bool {
2251        match *self {
2252            CH7LIMITHW::DISABLED => false,
2253            CH7LIMITHW::ENABLED => true,
2254        }
2255    }
2256}
2257#[doc = r" Proxy"]
2258pub struct _CH7LIMITHW<'a> {
2259    w: &'a mut W,
2260}
2261impl<'a> _CH7LIMITHW<'a> {
2262    #[doc = r" Writes `variant` to the field"]
2263    #[inline]
2264    pub fn variant(self, variant: CH7LIMITHW) -> &'a mut W {
2265        {
2266            self.bit(variant._bits())
2267        }
2268    }
2269    #[doc = "Disable"]
2270    #[inline]
2271    pub fn disabled(self) -> &'a mut W {
2272        self.variant(CH7LIMITHW::DISABLED)
2273    }
2274    #[doc = "Enable"]
2275    #[inline]
2276    pub fn enabled(self) -> &'a mut W {
2277        self.variant(CH7LIMITHW::ENABLED)
2278    }
2279    #[doc = r" Sets the field bit"]
2280    pub fn set_bit(self) -> &'a mut W {
2281        self.bit(true)
2282    }
2283    #[doc = r" Clears the field bit"]
2284    pub fn clear_bit(self) -> &'a mut W {
2285        self.bit(false)
2286    }
2287    #[doc = r" Writes raw bits to the field"]
2288    #[inline]
2289    pub fn bit(self, value: bool) -> &'a mut W {
2290        const MASK: bool = true;
2291        const OFFSET: u8 = 20;
2292        self.w.bits &= !((MASK as u32) << OFFSET);
2293        self.w.bits |= ((value & MASK) as u32) << OFFSET;
2294        self.w
2295    }
2296}
2297#[doc = "Values that can be written to the field `CH7LIMITL`"]
2298pub enum CH7LIMITLW {
2299    #[doc = "Disable"]
2300    DISABLED,
2301    #[doc = "Enable"]
2302    ENABLED,
2303}
2304impl CH7LIMITLW {
2305    #[allow(missing_docs)]
2306    #[doc(hidden)]
2307    #[inline]
2308    pub fn _bits(&self) -> bool {
2309        match *self {
2310            CH7LIMITLW::DISABLED => false,
2311            CH7LIMITLW::ENABLED => true,
2312        }
2313    }
2314}
2315#[doc = r" Proxy"]
2316pub struct _CH7LIMITLW<'a> {
2317    w: &'a mut W,
2318}
2319impl<'a> _CH7LIMITLW<'a> {
2320    #[doc = r" Writes `variant` to the field"]
2321    #[inline]
2322    pub fn variant(self, variant: CH7LIMITLW) -> &'a mut W {
2323        {
2324            self.bit(variant._bits())
2325        }
2326    }
2327    #[doc = "Disable"]
2328    #[inline]
2329    pub fn disabled(self) -> &'a mut W {
2330        self.variant(CH7LIMITLW::DISABLED)
2331    }
2332    #[doc = "Enable"]
2333    #[inline]
2334    pub fn enabled(self) -> &'a mut W {
2335        self.variant(CH7LIMITLW::ENABLED)
2336    }
2337    #[doc = r" Sets the field bit"]
2338    pub fn set_bit(self) -> &'a mut W {
2339        self.bit(true)
2340    }
2341    #[doc = r" Clears the field bit"]
2342    pub fn clear_bit(self) -> &'a mut W {
2343        self.bit(false)
2344    }
2345    #[doc = r" Writes raw bits to the field"]
2346    #[inline]
2347    pub fn bit(self, value: bool) -> &'a mut W {
2348        const MASK: bool = true;
2349        const OFFSET: u8 = 21;
2350        self.w.bits &= !((MASK as u32) << OFFSET);
2351        self.w.bits |= ((value & MASK) as u32) << OFFSET;
2352        self.w
2353    }
2354}
2355impl R {
2356    #[doc = r" Value of the register as raw bits"]
2357    #[inline]
2358    pub fn bits(&self) -> u32 {
2359        self.bits
2360    }
2361    #[doc = "Bit 0 - Enable or disable interrupt for STARTED event"]
2362    #[inline]
2363    pub fn started(&self) -> STARTEDR {
2364        STARTEDR::_from({
2365            const MASK: bool = true;
2366            const OFFSET: u8 = 0;
2367            ((self.bits >> OFFSET) & MASK as u32) != 0
2368        })
2369    }
2370    #[doc = "Bit 1 - Enable or disable interrupt for END event"]
2371    #[inline]
2372    pub fn end(&self) -> ENDR {
2373        ENDR::_from({
2374            const MASK: bool = true;
2375            const OFFSET: u8 = 1;
2376            ((self.bits >> OFFSET) & MASK as u32) != 0
2377        })
2378    }
2379    #[doc = "Bit 2 - Enable or disable interrupt for DONE event"]
2380    #[inline]
2381    pub fn done(&self) -> DONER {
2382        DONER::_from({
2383            const MASK: bool = true;
2384            const OFFSET: u8 = 2;
2385            ((self.bits >> OFFSET) & MASK as u32) != 0
2386        })
2387    }
2388    #[doc = "Bit 3 - Enable or disable interrupt for RESULTDONE event"]
2389    #[inline]
2390    pub fn resultdone(&self) -> RESULTDONER {
2391        RESULTDONER::_from({
2392            const MASK: bool = true;
2393            const OFFSET: u8 = 3;
2394            ((self.bits >> OFFSET) & MASK as u32) != 0
2395        })
2396    }
2397    #[doc = "Bit 4 - Enable or disable interrupt for CALIBRATEDONE event"]
2398    #[inline]
2399    pub fn calibratedone(&self) -> CALIBRATEDONER {
2400        CALIBRATEDONER::_from({
2401            const MASK: bool = true;
2402            const OFFSET: u8 = 4;
2403            ((self.bits >> OFFSET) & MASK as u32) != 0
2404        })
2405    }
2406    #[doc = "Bit 5 - Enable or disable interrupt for STOPPED event"]
2407    #[inline]
2408    pub fn stopped(&self) -> STOPPEDR {
2409        STOPPEDR::_from({
2410            const MASK: bool = true;
2411            const OFFSET: u8 = 5;
2412            ((self.bits >> OFFSET) & MASK as u32) != 0
2413        })
2414    }
2415    #[doc = "Bit 6 - Enable or disable interrupt for CH[0].LIMITH event"]
2416    #[inline]
2417    pub fn ch0limith(&self) -> CH0LIMITHR {
2418        CH0LIMITHR::_from({
2419            const MASK: bool = true;
2420            const OFFSET: u8 = 6;
2421            ((self.bits >> OFFSET) & MASK as u32) != 0
2422        })
2423    }
2424    #[doc = "Bit 7 - Enable or disable interrupt for CH[0].LIMITL event"]
2425    #[inline]
2426    pub fn ch0limitl(&self) -> CH0LIMITLR {
2427        CH0LIMITLR::_from({
2428            const MASK: bool = true;
2429            const OFFSET: u8 = 7;
2430            ((self.bits >> OFFSET) & MASK as u32) != 0
2431        })
2432    }
2433    #[doc = "Bit 8 - Enable or disable interrupt for CH[1].LIMITH event"]
2434    #[inline]
2435    pub fn ch1limith(&self) -> CH1LIMITHR {
2436        CH1LIMITHR::_from({
2437            const MASK: bool = true;
2438            const OFFSET: u8 = 8;
2439            ((self.bits >> OFFSET) & MASK as u32) != 0
2440        })
2441    }
2442    #[doc = "Bit 9 - Enable or disable interrupt for CH[1].LIMITL event"]
2443    #[inline]
2444    pub fn ch1limitl(&self) -> CH1LIMITLR {
2445        CH1LIMITLR::_from({
2446            const MASK: bool = true;
2447            const OFFSET: u8 = 9;
2448            ((self.bits >> OFFSET) & MASK as u32) != 0
2449        })
2450    }
2451    #[doc = "Bit 10 - Enable or disable interrupt for CH[2].LIMITH event"]
2452    #[inline]
2453    pub fn ch2limith(&self) -> CH2LIMITHR {
2454        CH2LIMITHR::_from({
2455            const MASK: bool = true;
2456            const OFFSET: u8 = 10;
2457            ((self.bits >> OFFSET) & MASK as u32) != 0
2458        })
2459    }
2460    #[doc = "Bit 11 - Enable or disable interrupt for CH[2].LIMITL event"]
2461    #[inline]
2462    pub fn ch2limitl(&self) -> CH2LIMITLR {
2463        CH2LIMITLR::_from({
2464            const MASK: bool = true;
2465            const OFFSET: u8 = 11;
2466            ((self.bits >> OFFSET) & MASK as u32) != 0
2467        })
2468    }
2469    #[doc = "Bit 12 - Enable or disable interrupt for CH[3].LIMITH event"]
2470    #[inline]
2471    pub fn ch3limith(&self) -> CH3LIMITHR {
2472        CH3LIMITHR::_from({
2473            const MASK: bool = true;
2474            const OFFSET: u8 = 12;
2475            ((self.bits >> OFFSET) & MASK as u32) != 0
2476        })
2477    }
2478    #[doc = "Bit 13 - Enable or disable interrupt for CH[3].LIMITL event"]
2479    #[inline]
2480    pub fn ch3limitl(&self) -> CH3LIMITLR {
2481        CH3LIMITLR::_from({
2482            const MASK: bool = true;
2483            const OFFSET: u8 = 13;
2484            ((self.bits >> OFFSET) & MASK as u32) != 0
2485        })
2486    }
2487    #[doc = "Bit 14 - Enable or disable interrupt for CH[4].LIMITH event"]
2488    #[inline]
2489    pub fn ch4limith(&self) -> CH4LIMITHR {
2490        CH4LIMITHR::_from({
2491            const MASK: bool = true;
2492            const OFFSET: u8 = 14;
2493            ((self.bits >> OFFSET) & MASK as u32) != 0
2494        })
2495    }
2496    #[doc = "Bit 15 - Enable or disable interrupt for CH[4].LIMITL event"]
2497    #[inline]
2498    pub fn ch4limitl(&self) -> CH4LIMITLR {
2499        CH4LIMITLR::_from({
2500            const MASK: bool = true;
2501            const OFFSET: u8 = 15;
2502            ((self.bits >> OFFSET) & MASK as u32) != 0
2503        })
2504    }
2505    #[doc = "Bit 16 - Enable or disable interrupt for CH[5].LIMITH event"]
2506    #[inline]
2507    pub fn ch5limith(&self) -> CH5LIMITHR {
2508        CH5LIMITHR::_from({
2509            const MASK: bool = true;
2510            const OFFSET: u8 = 16;
2511            ((self.bits >> OFFSET) & MASK as u32) != 0
2512        })
2513    }
2514    #[doc = "Bit 17 - Enable or disable interrupt for CH[5].LIMITL event"]
2515    #[inline]
2516    pub fn ch5limitl(&self) -> CH5LIMITLR {
2517        CH5LIMITLR::_from({
2518            const MASK: bool = true;
2519            const OFFSET: u8 = 17;
2520            ((self.bits >> OFFSET) & MASK as u32) != 0
2521        })
2522    }
2523    #[doc = "Bit 18 - Enable or disable interrupt for CH[6].LIMITH event"]
2524    #[inline]
2525    pub fn ch6limith(&self) -> CH6LIMITHR {
2526        CH6LIMITHR::_from({
2527            const MASK: bool = true;
2528            const OFFSET: u8 = 18;
2529            ((self.bits >> OFFSET) & MASK as u32) != 0
2530        })
2531    }
2532    #[doc = "Bit 19 - Enable or disable interrupt for CH[6].LIMITL event"]
2533    #[inline]
2534    pub fn ch6limitl(&self) -> CH6LIMITLR {
2535        CH6LIMITLR::_from({
2536            const MASK: bool = true;
2537            const OFFSET: u8 = 19;
2538            ((self.bits >> OFFSET) & MASK as u32) != 0
2539        })
2540    }
2541    #[doc = "Bit 20 - Enable or disable interrupt for CH[7].LIMITH event"]
2542    #[inline]
2543    pub fn ch7limith(&self) -> CH7LIMITHR {
2544        CH7LIMITHR::_from({
2545            const MASK: bool = true;
2546            const OFFSET: u8 = 20;
2547            ((self.bits >> OFFSET) & MASK as u32) != 0
2548        })
2549    }
2550    #[doc = "Bit 21 - Enable or disable interrupt for CH[7].LIMITL event"]
2551    #[inline]
2552    pub fn ch7limitl(&self) -> CH7LIMITLR {
2553        CH7LIMITLR::_from({
2554            const MASK: bool = true;
2555            const OFFSET: u8 = 21;
2556            ((self.bits >> OFFSET) & MASK as u32) != 0
2557        })
2558    }
2559}
2560impl W {
2561    #[doc = r" Reset value of the register"]
2562    #[inline]
2563    pub fn reset_value() -> W {
2564        W { bits: 0 }
2565    }
2566    #[doc = r" Writes raw bits to the register"]
2567    #[inline]
2568    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
2569        self.bits = bits;
2570        self
2571    }
2572    #[doc = "Bit 0 - Enable or disable interrupt for STARTED event"]
2573    #[inline]
2574    pub fn started(&mut self) -> _STARTEDW {
2575        _STARTEDW { w: self }
2576    }
2577    #[doc = "Bit 1 - Enable or disable interrupt for END event"]
2578    #[inline]
2579    pub fn end(&mut self) -> _ENDW {
2580        _ENDW { w: self }
2581    }
2582    #[doc = "Bit 2 - Enable or disable interrupt for DONE event"]
2583    #[inline]
2584    pub fn done(&mut self) -> _DONEW {
2585        _DONEW { w: self }
2586    }
2587    #[doc = "Bit 3 - Enable or disable interrupt for RESULTDONE event"]
2588    #[inline]
2589    pub fn resultdone(&mut self) -> _RESULTDONEW {
2590        _RESULTDONEW { w: self }
2591    }
2592    #[doc = "Bit 4 - Enable or disable interrupt for CALIBRATEDONE event"]
2593    #[inline]
2594    pub fn calibratedone(&mut self) -> _CALIBRATEDONEW {
2595        _CALIBRATEDONEW { w: self }
2596    }
2597    #[doc = "Bit 5 - Enable or disable interrupt for STOPPED event"]
2598    #[inline]
2599    pub fn stopped(&mut self) -> _STOPPEDW {
2600        _STOPPEDW { w: self }
2601    }
2602    #[doc = "Bit 6 - Enable or disable interrupt for CH[0].LIMITH event"]
2603    #[inline]
2604    pub fn ch0limith(&mut self) -> _CH0LIMITHW {
2605        _CH0LIMITHW { w: self }
2606    }
2607    #[doc = "Bit 7 - Enable or disable interrupt for CH[0].LIMITL event"]
2608    #[inline]
2609    pub fn ch0limitl(&mut self) -> _CH0LIMITLW {
2610        _CH0LIMITLW { w: self }
2611    }
2612    #[doc = "Bit 8 - Enable or disable interrupt for CH[1].LIMITH event"]
2613    #[inline]
2614    pub fn ch1limith(&mut self) -> _CH1LIMITHW {
2615        _CH1LIMITHW { w: self }
2616    }
2617    #[doc = "Bit 9 - Enable or disable interrupt for CH[1].LIMITL event"]
2618    #[inline]
2619    pub fn ch1limitl(&mut self) -> _CH1LIMITLW {
2620        _CH1LIMITLW { w: self }
2621    }
2622    #[doc = "Bit 10 - Enable or disable interrupt for CH[2].LIMITH event"]
2623    #[inline]
2624    pub fn ch2limith(&mut self) -> _CH2LIMITHW {
2625        _CH2LIMITHW { w: self }
2626    }
2627    #[doc = "Bit 11 - Enable or disable interrupt for CH[2].LIMITL event"]
2628    #[inline]
2629    pub fn ch2limitl(&mut self) -> _CH2LIMITLW {
2630        _CH2LIMITLW { w: self }
2631    }
2632    #[doc = "Bit 12 - Enable or disable interrupt for CH[3].LIMITH event"]
2633    #[inline]
2634    pub fn ch3limith(&mut self) -> _CH3LIMITHW {
2635        _CH3LIMITHW { w: self }
2636    }
2637    #[doc = "Bit 13 - Enable or disable interrupt for CH[3].LIMITL event"]
2638    #[inline]
2639    pub fn ch3limitl(&mut self) -> _CH3LIMITLW {
2640        _CH3LIMITLW { w: self }
2641    }
2642    #[doc = "Bit 14 - Enable or disable interrupt for CH[4].LIMITH event"]
2643    #[inline]
2644    pub fn ch4limith(&mut self) -> _CH4LIMITHW {
2645        _CH4LIMITHW { w: self }
2646    }
2647    #[doc = "Bit 15 - Enable or disable interrupt for CH[4].LIMITL event"]
2648    #[inline]
2649    pub fn ch4limitl(&mut self) -> _CH4LIMITLW {
2650        _CH4LIMITLW { w: self }
2651    }
2652    #[doc = "Bit 16 - Enable or disable interrupt for CH[5].LIMITH event"]
2653    #[inline]
2654    pub fn ch5limith(&mut self) -> _CH5LIMITHW {
2655        _CH5LIMITHW { w: self }
2656    }
2657    #[doc = "Bit 17 - Enable or disable interrupt for CH[5].LIMITL event"]
2658    #[inline]
2659    pub fn ch5limitl(&mut self) -> _CH5LIMITLW {
2660        _CH5LIMITLW { w: self }
2661    }
2662    #[doc = "Bit 18 - Enable or disable interrupt for CH[6].LIMITH event"]
2663    #[inline]
2664    pub fn ch6limith(&mut self) -> _CH6LIMITHW {
2665        _CH6LIMITHW { w: self }
2666    }
2667    #[doc = "Bit 19 - Enable or disable interrupt for CH[6].LIMITL event"]
2668    #[inline]
2669    pub fn ch6limitl(&mut self) -> _CH6LIMITLW {
2670        _CH6LIMITLW { w: self }
2671    }
2672    #[doc = "Bit 20 - Enable or disable interrupt for CH[7].LIMITH event"]
2673    #[inline]
2674    pub fn ch7limith(&mut self) -> _CH7LIMITHW {
2675        _CH7LIMITHW { w: self }
2676    }
2677    #[doc = "Bit 21 - Enable or disable interrupt for CH[7].LIMITL event"]
2678    #[inline]
2679    pub fn ch7limitl(&mut self) -> _CH7LIMITLW {
2680        _CH7LIMITLW { w: self }
2681    }
2682}