mk20d7/ftm0/pwmload/
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::PWMLOAD {
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 `CH0SEL`"]
46#[derive(Clone, Copy, Debug, PartialEq)]
47pub enum CH0SELR {
48    #[doc = "Do not include the channel in the matching process."]
49    _0,
50    #[doc = "Include the channel in the matching process."]
51    _1,
52}
53impl CH0SELR {
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            CH0SELR::_0 => false,
69            CH0SELR::_1 => true,
70        }
71    }
72    #[allow(missing_docs)]
73    #[doc(hidden)]
74    #[inline]
75    pub fn _from(value: bool) -> CH0SELR {
76        match value {
77            false => CH0SELR::_0,
78            true => CH0SELR::_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 == CH0SELR::_0
85    }
86    #[doc = "Checks if the value of the field is `_1`"]
87    #[inline]
88    pub fn is_1(&self) -> bool {
89        *self == CH0SELR::_1
90    }
91}
92#[doc = "Possible values of the field `CH1SEL`"]
93#[derive(Clone, Copy, Debug, PartialEq)]
94pub enum CH1SELR {
95    #[doc = "Do not include the channel in the matching process."]
96    _0,
97    #[doc = "Include the channel in the matching process."]
98    _1,
99}
100impl CH1SELR {
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            CH1SELR::_0 => false,
116            CH1SELR::_1 => true,
117        }
118    }
119    #[allow(missing_docs)]
120    #[doc(hidden)]
121    #[inline]
122    pub fn _from(value: bool) -> CH1SELR {
123        match value {
124            false => CH1SELR::_0,
125            true => CH1SELR::_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 == CH1SELR::_0
132    }
133    #[doc = "Checks if the value of the field is `_1`"]
134    #[inline]
135    pub fn is_1(&self) -> bool {
136        *self == CH1SELR::_1
137    }
138}
139#[doc = "Possible values of the field `CH2SEL`"]
140#[derive(Clone, Copy, Debug, PartialEq)]
141pub enum CH2SELR {
142    #[doc = "Do not include the channel in the matching process."]
143    _0,
144    #[doc = "Include the channel in the matching process."]
145    _1,
146}
147impl CH2SELR {
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            CH2SELR::_0 => false,
163            CH2SELR::_1 => true,
164        }
165    }
166    #[allow(missing_docs)]
167    #[doc(hidden)]
168    #[inline]
169    pub fn _from(value: bool) -> CH2SELR {
170        match value {
171            false => CH2SELR::_0,
172            true => CH2SELR::_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 == CH2SELR::_0
179    }
180    #[doc = "Checks if the value of the field is `_1`"]
181    #[inline]
182    pub fn is_1(&self) -> bool {
183        *self == CH2SELR::_1
184    }
185}
186#[doc = "Possible values of the field `CH3SEL`"]
187#[derive(Clone, Copy, Debug, PartialEq)]
188pub enum CH3SELR {
189    #[doc = "Do not include the channel in the matching process."]
190    _0,
191    #[doc = "Include the channel in the matching process."]
192    _1,
193}
194impl CH3SELR {
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            CH3SELR::_0 => false,
210            CH3SELR::_1 => true,
211        }
212    }
213    #[allow(missing_docs)]
214    #[doc(hidden)]
215    #[inline]
216    pub fn _from(value: bool) -> CH3SELR {
217        match value {
218            false => CH3SELR::_0,
219            true => CH3SELR::_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 == CH3SELR::_0
226    }
227    #[doc = "Checks if the value of the field is `_1`"]
228    #[inline]
229    pub fn is_1(&self) -> bool {
230        *self == CH3SELR::_1
231    }
232}
233#[doc = "Possible values of the field `CH4SEL`"]
234#[derive(Clone, Copy, Debug, PartialEq)]
235pub enum CH4SELR {
236    #[doc = "Do not include the channel in the matching process."]
237    _0,
238    #[doc = "Include the channel in the matching process."]
239    _1,
240}
241impl CH4SELR {
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            CH4SELR::_0 => false,
257            CH4SELR::_1 => true,
258        }
259    }
260    #[allow(missing_docs)]
261    #[doc(hidden)]
262    #[inline]
263    pub fn _from(value: bool) -> CH4SELR {
264        match value {
265            false => CH4SELR::_0,
266            true => CH4SELR::_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 == CH4SELR::_0
273    }
274    #[doc = "Checks if the value of the field is `_1`"]
275    #[inline]
276    pub fn is_1(&self) -> bool {
277        *self == CH4SELR::_1
278    }
279}
280#[doc = "Possible values of the field `CH5SEL`"]
281#[derive(Clone, Copy, Debug, PartialEq)]
282pub enum CH5SELR {
283    #[doc = "Do not include the channel in the matching process."]
284    _0,
285    #[doc = "Include the channel in the matching process."]
286    _1,
287}
288impl CH5SELR {
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            CH5SELR::_0 => false,
304            CH5SELR::_1 => true,
305        }
306    }
307    #[allow(missing_docs)]
308    #[doc(hidden)]
309    #[inline]
310    pub fn _from(value: bool) -> CH5SELR {
311        match value {
312            false => CH5SELR::_0,
313            true => CH5SELR::_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 == CH5SELR::_0
320    }
321    #[doc = "Checks if the value of the field is `_1`"]
322    #[inline]
323    pub fn is_1(&self) -> bool {
324        *self == CH5SELR::_1
325    }
326}
327#[doc = "Possible values of the field `CH6SEL`"]
328#[derive(Clone, Copy, Debug, PartialEq)]
329pub enum CH6SELR {
330    #[doc = "Do not include the channel in the matching process."]
331    _0,
332    #[doc = "Include the channel in the matching process."]
333    _1,
334}
335impl CH6SELR {
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            CH6SELR::_0 => false,
351            CH6SELR::_1 => true,
352        }
353    }
354    #[allow(missing_docs)]
355    #[doc(hidden)]
356    #[inline]
357    pub fn _from(value: bool) -> CH6SELR {
358        match value {
359            false => CH6SELR::_0,
360            true => CH6SELR::_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 == CH6SELR::_0
367    }
368    #[doc = "Checks if the value of the field is `_1`"]
369    #[inline]
370    pub fn is_1(&self) -> bool {
371        *self == CH6SELR::_1
372    }
373}
374#[doc = "Possible values of the field `CH7SEL`"]
375#[derive(Clone, Copy, Debug, PartialEq)]
376pub enum CH7SELR {
377    #[doc = "Do not include the channel in the matching process."]
378    _0,
379    #[doc = "Include the channel in the matching process."]
380    _1,
381}
382impl CH7SELR {
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            CH7SELR::_0 => false,
398            CH7SELR::_1 => true,
399        }
400    }
401    #[allow(missing_docs)]
402    #[doc(hidden)]
403    #[inline]
404    pub fn _from(value: bool) -> CH7SELR {
405        match value {
406            false => CH7SELR::_0,
407            true => CH7SELR::_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 == CH7SELR::_0
414    }
415    #[doc = "Checks if the value of the field is `_1`"]
416    #[inline]
417    pub fn is_1(&self) -> bool {
418        *self == CH7SELR::_1
419    }
420}
421#[doc = "Possible values of the field `LDOK`"]
422#[derive(Clone, Copy, Debug, PartialEq)]
423pub enum LDOKR {
424    #[doc = "Loading updated values is disabled."]
425    _0,
426    #[doc = "Loading updated values is enabled."]
427    _1,
428}
429impl LDOKR {
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            LDOKR::_0 => false,
445            LDOKR::_1 => true,
446        }
447    }
448    #[allow(missing_docs)]
449    #[doc(hidden)]
450    #[inline]
451    pub fn _from(value: bool) -> LDOKR {
452        match value {
453            false => LDOKR::_0,
454            true => LDOKR::_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 == LDOKR::_0
461    }
462    #[doc = "Checks if the value of the field is `_1`"]
463    #[inline]
464    pub fn is_1(&self) -> bool {
465        *self == LDOKR::_1
466    }
467}
468#[doc = "Values that can be written to the field `CH0SEL`"]
469pub enum CH0SELW {
470    #[doc = "Do not include the channel in the matching process."]
471    _0,
472    #[doc = "Include the channel in the matching process."]
473    _1,
474}
475impl CH0SELW {
476    #[allow(missing_docs)]
477    #[doc(hidden)]
478    #[inline]
479    pub fn _bits(&self) -> bool {
480        match *self {
481            CH0SELW::_0 => false,
482            CH0SELW::_1 => true,
483        }
484    }
485}
486#[doc = r" Proxy"]
487pub struct _CH0SELW<'a> {
488    w: &'a mut W,
489}
490impl<'a> _CH0SELW<'a> {
491    #[doc = r" Writes `variant` to the field"]
492    #[inline]
493    pub fn variant(self, variant: CH0SELW) -> &'a mut W {
494        {
495            self.bit(variant._bits())
496        }
497    }
498    #[doc = "Do not include the channel in the matching process."]
499    #[inline]
500    pub fn _0(self) -> &'a mut W {
501        self.variant(CH0SELW::_0)
502    }
503    #[doc = "Include the channel in the matching process."]
504    #[inline]
505    pub fn _1(self) -> &'a mut W {
506        self.variant(CH0SELW::_1)
507    }
508    #[doc = r" Sets the field bit"]
509    pub fn set_bit(self) -> &'a mut W {
510        self.bit(true)
511    }
512    #[doc = r" Clears the field bit"]
513    pub fn clear_bit(self) -> &'a mut W {
514        self.bit(false)
515    }
516    #[doc = r" Writes raw bits to the field"]
517    #[inline]
518    pub fn bit(self, value: bool) -> &'a mut W {
519        const MASK: bool = true;
520        const OFFSET: u8 = 0;
521        self.w.bits &= !((MASK as u32) << OFFSET);
522        self.w.bits |= ((value & MASK) as u32) << OFFSET;
523        self.w
524    }
525}
526#[doc = "Values that can be written to the field `CH1SEL`"]
527pub enum CH1SELW {
528    #[doc = "Do not include the channel in the matching process."]
529    _0,
530    #[doc = "Include the channel in the matching process."]
531    _1,
532}
533impl CH1SELW {
534    #[allow(missing_docs)]
535    #[doc(hidden)]
536    #[inline]
537    pub fn _bits(&self) -> bool {
538        match *self {
539            CH1SELW::_0 => false,
540            CH1SELW::_1 => true,
541        }
542    }
543}
544#[doc = r" Proxy"]
545pub struct _CH1SELW<'a> {
546    w: &'a mut W,
547}
548impl<'a> _CH1SELW<'a> {
549    #[doc = r" Writes `variant` to the field"]
550    #[inline]
551    pub fn variant(self, variant: CH1SELW) -> &'a mut W {
552        {
553            self.bit(variant._bits())
554        }
555    }
556    #[doc = "Do not include the channel in the matching process."]
557    #[inline]
558    pub fn _0(self) -> &'a mut W {
559        self.variant(CH1SELW::_0)
560    }
561    #[doc = "Include the channel in the matching process."]
562    #[inline]
563    pub fn _1(self) -> &'a mut W {
564        self.variant(CH1SELW::_1)
565    }
566    #[doc = r" Sets the field bit"]
567    pub fn set_bit(self) -> &'a mut W {
568        self.bit(true)
569    }
570    #[doc = r" Clears the field bit"]
571    pub fn clear_bit(self) -> &'a mut W {
572        self.bit(false)
573    }
574    #[doc = r" Writes raw bits to the field"]
575    #[inline]
576    pub fn bit(self, value: bool) -> &'a mut W {
577        const MASK: bool = true;
578        const OFFSET: u8 = 1;
579        self.w.bits &= !((MASK as u32) << OFFSET);
580        self.w.bits |= ((value & MASK) as u32) << OFFSET;
581        self.w
582    }
583}
584#[doc = "Values that can be written to the field `CH2SEL`"]
585pub enum CH2SELW {
586    #[doc = "Do not include the channel in the matching process."]
587    _0,
588    #[doc = "Include the channel in the matching process."]
589    _1,
590}
591impl CH2SELW {
592    #[allow(missing_docs)]
593    #[doc(hidden)]
594    #[inline]
595    pub fn _bits(&self) -> bool {
596        match *self {
597            CH2SELW::_0 => false,
598            CH2SELW::_1 => true,
599        }
600    }
601}
602#[doc = r" Proxy"]
603pub struct _CH2SELW<'a> {
604    w: &'a mut W,
605}
606impl<'a> _CH2SELW<'a> {
607    #[doc = r" Writes `variant` to the field"]
608    #[inline]
609    pub fn variant(self, variant: CH2SELW) -> &'a mut W {
610        {
611            self.bit(variant._bits())
612        }
613    }
614    #[doc = "Do not include the channel in the matching process."]
615    #[inline]
616    pub fn _0(self) -> &'a mut W {
617        self.variant(CH2SELW::_0)
618    }
619    #[doc = "Include the channel in the matching process."]
620    #[inline]
621    pub fn _1(self) -> &'a mut W {
622        self.variant(CH2SELW::_1)
623    }
624    #[doc = r" Sets the field bit"]
625    pub fn set_bit(self) -> &'a mut W {
626        self.bit(true)
627    }
628    #[doc = r" Clears the field bit"]
629    pub fn clear_bit(self) -> &'a mut W {
630        self.bit(false)
631    }
632    #[doc = r" Writes raw bits to the field"]
633    #[inline]
634    pub fn bit(self, value: bool) -> &'a mut W {
635        const MASK: bool = true;
636        const OFFSET: u8 = 2;
637        self.w.bits &= !((MASK as u32) << OFFSET);
638        self.w.bits |= ((value & MASK) as u32) << OFFSET;
639        self.w
640    }
641}
642#[doc = "Values that can be written to the field `CH3SEL`"]
643pub enum CH3SELW {
644    #[doc = "Do not include the channel in the matching process."]
645    _0,
646    #[doc = "Include the channel in the matching process."]
647    _1,
648}
649impl CH3SELW {
650    #[allow(missing_docs)]
651    #[doc(hidden)]
652    #[inline]
653    pub fn _bits(&self) -> bool {
654        match *self {
655            CH3SELW::_0 => false,
656            CH3SELW::_1 => true,
657        }
658    }
659}
660#[doc = r" Proxy"]
661pub struct _CH3SELW<'a> {
662    w: &'a mut W,
663}
664impl<'a> _CH3SELW<'a> {
665    #[doc = r" Writes `variant` to the field"]
666    #[inline]
667    pub fn variant(self, variant: CH3SELW) -> &'a mut W {
668        {
669            self.bit(variant._bits())
670        }
671    }
672    #[doc = "Do not include the channel in the matching process."]
673    #[inline]
674    pub fn _0(self) -> &'a mut W {
675        self.variant(CH3SELW::_0)
676    }
677    #[doc = "Include the channel in the matching process."]
678    #[inline]
679    pub fn _1(self) -> &'a mut W {
680        self.variant(CH3SELW::_1)
681    }
682    #[doc = r" Sets the field bit"]
683    pub fn set_bit(self) -> &'a mut W {
684        self.bit(true)
685    }
686    #[doc = r" Clears the field bit"]
687    pub fn clear_bit(self) -> &'a mut W {
688        self.bit(false)
689    }
690    #[doc = r" Writes raw bits to the field"]
691    #[inline]
692    pub fn bit(self, value: bool) -> &'a mut W {
693        const MASK: bool = true;
694        const OFFSET: u8 = 3;
695        self.w.bits &= !((MASK as u32) << OFFSET);
696        self.w.bits |= ((value & MASK) as u32) << OFFSET;
697        self.w
698    }
699}
700#[doc = "Values that can be written to the field `CH4SEL`"]
701pub enum CH4SELW {
702    #[doc = "Do not include the channel in the matching process."]
703    _0,
704    #[doc = "Include the channel in the matching process."]
705    _1,
706}
707impl CH4SELW {
708    #[allow(missing_docs)]
709    #[doc(hidden)]
710    #[inline]
711    pub fn _bits(&self) -> bool {
712        match *self {
713            CH4SELW::_0 => false,
714            CH4SELW::_1 => true,
715        }
716    }
717}
718#[doc = r" Proxy"]
719pub struct _CH4SELW<'a> {
720    w: &'a mut W,
721}
722impl<'a> _CH4SELW<'a> {
723    #[doc = r" Writes `variant` to the field"]
724    #[inline]
725    pub fn variant(self, variant: CH4SELW) -> &'a mut W {
726        {
727            self.bit(variant._bits())
728        }
729    }
730    #[doc = "Do not include the channel in the matching process."]
731    #[inline]
732    pub fn _0(self) -> &'a mut W {
733        self.variant(CH4SELW::_0)
734    }
735    #[doc = "Include the channel in the matching process."]
736    #[inline]
737    pub fn _1(self) -> &'a mut W {
738        self.variant(CH4SELW::_1)
739    }
740    #[doc = r" Sets the field bit"]
741    pub fn set_bit(self) -> &'a mut W {
742        self.bit(true)
743    }
744    #[doc = r" Clears the field bit"]
745    pub fn clear_bit(self) -> &'a mut W {
746        self.bit(false)
747    }
748    #[doc = r" Writes raw bits to the field"]
749    #[inline]
750    pub fn bit(self, value: bool) -> &'a mut W {
751        const MASK: bool = true;
752        const OFFSET: u8 = 4;
753        self.w.bits &= !((MASK as u32) << OFFSET);
754        self.w.bits |= ((value & MASK) as u32) << OFFSET;
755        self.w
756    }
757}
758#[doc = "Values that can be written to the field `CH5SEL`"]
759pub enum CH5SELW {
760    #[doc = "Do not include the channel in the matching process."]
761    _0,
762    #[doc = "Include the channel in the matching process."]
763    _1,
764}
765impl CH5SELW {
766    #[allow(missing_docs)]
767    #[doc(hidden)]
768    #[inline]
769    pub fn _bits(&self) -> bool {
770        match *self {
771            CH5SELW::_0 => false,
772            CH5SELW::_1 => true,
773        }
774    }
775}
776#[doc = r" Proxy"]
777pub struct _CH5SELW<'a> {
778    w: &'a mut W,
779}
780impl<'a> _CH5SELW<'a> {
781    #[doc = r" Writes `variant` to the field"]
782    #[inline]
783    pub fn variant(self, variant: CH5SELW) -> &'a mut W {
784        {
785            self.bit(variant._bits())
786        }
787    }
788    #[doc = "Do not include the channel in the matching process."]
789    #[inline]
790    pub fn _0(self) -> &'a mut W {
791        self.variant(CH5SELW::_0)
792    }
793    #[doc = "Include the channel in the matching process."]
794    #[inline]
795    pub fn _1(self) -> &'a mut W {
796        self.variant(CH5SELW::_1)
797    }
798    #[doc = r" Sets the field bit"]
799    pub fn set_bit(self) -> &'a mut W {
800        self.bit(true)
801    }
802    #[doc = r" Clears the field bit"]
803    pub fn clear_bit(self) -> &'a mut W {
804        self.bit(false)
805    }
806    #[doc = r" Writes raw bits to the field"]
807    #[inline]
808    pub fn bit(self, value: bool) -> &'a mut W {
809        const MASK: bool = true;
810        const OFFSET: u8 = 5;
811        self.w.bits &= !((MASK as u32) << OFFSET);
812        self.w.bits |= ((value & MASK) as u32) << OFFSET;
813        self.w
814    }
815}
816#[doc = "Values that can be written to the field `CH6SEL`"]
817pub enum CH6SELW {
818    #[doc = "Do not include the channel in the matching process."]
819    _0,
820    #[doc = "Include the channel in the matching process."]
821    _1,
822}
823impl CH6SELW {
824    #[allow(missing_docs)]
825    #[doc(hidden)]
826    #[inline]
827    pub fn _bits(&self) -> bool {
828        match *self {
829            CH6SELW::_0 => false,
830            CH6SELW::_1 => true,
831        }
832    }
833}
834#[doc = r" Proxy"]
835pub struct _CH6SELW<'a> {
836    w: &'a mut W,
837}
838impl<'a> _CH6SELW<'a> {
839    #[doc = r" Writes `variant` to the field"]
840    #[inline]
841    pub fn variant(self, variant: CH6SELW) -> &'a mut W {
842        {
843            self.bit(variant._bits())
844        }
845    }
846    #[doc = "Do not include the channel in the matching process."]
847    #[inline]
848    pub fn _0(self) -> &'a mut W {
849        self.variant(CH6SELW::_0)
850    }
851    #[doc = "Include the channel in the matching process."]
852    #[inline]
853    pub fn _1(self) -> &'a mut W {
854        self.variant(CH6SELW::_1)
855    }
856    #[doc = r" Sets the field bit"]
857    pub fn set_bit(self) -> &'a mut W {
858        self.bit(true)
859    }
860    #[doc = r" Clears the field bit"]
861    pub fn clear_bit(self) -> &'a mut W {
862        self.bit(false)
863    }
864    #[doc = r" Writes raw bits to the field"]
865    #[inline]
866    pub fn bit(self, value: bool) -> &'a mut W {
867        const MASK: bool = true;
868        const OFFSET: u8 = 6;
869        self.w.bits &= !((MASK as u32) << OFFSET);
870        self.w.bits |= ((value & MASK) as u32) << OFFSET;
871        self.w
872    }
873}
874#[doc = "Values that can be written to the field `CH7SEL`"]
875pub enum CH7SELW {
876    #[doc = "Do not include the channel in the matching process."]
877    _0,
878    #[doc = "Include the channel in the matching process."]
879    _1,
880}
881impl CH7SELW {
882    #[allow(missing_docs)]
883    #[doc(hidden)]
884    #[inline]
885    pub fn _bits(&self) -> bool {
886        match *self {
887            CH7SELW::_0 => false,
888            CH7SELW::_1 => true,
889        }
890    }
891}
892#[doc = r" Proxy"]
893pub struct _CH7SELW<'a> {
894    w: &'a mut W,
895}
896impl<'a> _CH7SELW<'a> {
897    #[doc = r" Writes `variant` to the field"]
898    #[inline]
899    pub fn variant(self, variant: CH7SELW) -> &'a mut W {
900        {
901            self.bit(variant._bits())
902        }
903    }
904    #[doc = "Do not include the channel in the matching process."]
905    #[inline]
906    pub fn _0(self) -> &'a mut W {
907        self.variant(CH7SELW::_0)
908    }
909    #[doc = "Include the channel in the matching process."]
910    #[inline]
911    pub fn _1(self) -> &'a mut W {
912        self.variant(CH7SELW::_1)
913    }
914    #[doc = r" Sets the field bit"]
915    pub fn set_bit(self) -> &'a mut W {
916        self.bit(true)
917    }
918    #[doc = r" Clears the field bit"]
919    pub fn clear_bit(self) -> &'a mut W {
920        self.bit(false)
921    }
922    #[doc = r" Writes raw bits to the field"]
923    #[inline]
924    pub fn bit(self, value: bool) -> &'a mut W {
925        const MASK: bool = true;
926        const OFFSET: u8 = 7;
927        self.w.bits &= !((MASK as u32) << OFFSET);
928        self.w.bits |= ((value & MASK) as u32) << OFFSET;
929        self.w
930    }
931}
932#[doc = "Values that can be written to the field `LDOK`"]
933pub enum LDOKW {
934    #[doc = "Loading updated values is disabled."]
935    _0,
936    #[doc = "Loading updated values is enabled."]
937    _1,
938}
939impl LDOKW {
940    #[allow(missing_docs)]
941    #[doc(hidden)]
942    #[inline]
943    pub fn _bits(&self) -> bool {
944        match *self {
945            LDOKW::_0 => false,
946            LDOKW::_1 => true,
947        }
948    }
949}
950#[doc = r" Proxy"]
951pub struct _LDOKW<'a> {
952    w: &'a mut W,
953}
954impl<'a> _LDOKW<'a> {
955    #[doc = r" Writes `variant` to the field"]
956    #[inline]
957    pub fn variant(self, variant: LDOKW) -> &'a mut W {
958        {
959            self.bit(variant._bits())
960        }
961    }
962    #[doc = "Loading updated values is disabled."]
963    #[inline]
964    pub fn _0(self) -> &'a mut W {
965        self.variant(LDOKW::_0)
966    }
967    #[doc = "Loading updated values is enabled."]
968    #[inline]
969    pub fn _1(self) -> &'a mut W {
970        self.variant(LDOKW::_1)
971    }
972    #[doc = r" Sets the field bit"]
973    pub fn set_bit(self) -> &'a mut W {
974        self.bit(true)
975    }
976    #[doc = r" Clears the field bit"]
977    pub fn clear_bit(self) -> &'a mut W {
978        self.bit(false)
979    }
980    #[doc = r" Writes raw bits to the field"]
981    #[inline]
982    pub fn bit(self, value: bool) -> &'a mut W {
983        const MASK: bool = true;
984        const OFFSET: u8 = 9;
985        self.w.bits &= !((MASK as u32) << OFFSET);
986        self.w.bits |= ((value & MASK) as u32) << OFFSET;
987        self.w
988    }
989}
990impl R {
991    #[doc = r" Value of the register as raw bits"]
992    #[inline]
993    pub fn bits(&self) -> u32 {
994        self.bits
995    }
996    #[doc = "Bit 0 - Channel 0 Select"]
997    #[inline]
998    pub fn ch0sel(&self) -> CH0SELR {
999        CH0SELR::_from({
1000            const MASK: bool = true;
1001            const OFFSET: u8 = 0;
1002            ((self.bits >> OFFSET) & MASK as u32) != 0
1003        })
1004    }
1005    #[doc = "Bit 1 - Channel 1 Select"]
1006    #[inline]
1007    pub fn ch1sel(&self) -> CH1SELR {
1008        CH1SELR::_from({
1009            const MASK: bool = true;
1010            const OFFSET: u8 = 1;
1011            ((self.bits >> OFFSET) & MASK as u32) != 0
1012        })
1013    }
1014    #[doc = "Bit 2 - Channel 2 Select"]
1015    #[inline]
1016    pub fn ch2sel(&self) -> CH2SELR {
1017        CH2SELR::_from({
1018            const MASK: bool = true;
1019            const OFFSET: u8 = 2;
1020            ((self.bits >> OFFSET) & MASK as u32) != 0
1021        })
1022    }
1023    #[doc = "Bit 3 - Channel 3 Select"]
1024    #[inline]
1025    pub fn ch3sel(&self) -> CH3SELR {
1026        CH3SELR::_from({
1027            const MASK: bool = true;
1028            const OFFSET: u8 = 3;
1029            ((self.bits >> OFFSET) & MASK as u32) != 0
1030        })
1031    }
1032    #[doc = "Bit 4 - Channel 4 Select"]
1033    #[inline]
1034    pub fn ch4sel(&self) -> CH4SELR {
1035        CH4SELR::_from({
1036            const MASK: bool = true;
1037            const OFFSET: u8 = 4;
1038            ((self.bits >> OFFSET) & MASK as u32) != 0
1039        })
1040    }
1041    #[doc = "Bit 5 - Channel 5 Select"]
1042    #[inline]
1043    pub fn ch5sel(&self) -> CH5SELR {
1044        CH5SELR::_from({
1045            const MASK: bool = true;
1046            const OFFSET: u8 = 5;
1047            ((self.bits >> OFFSET) & MASK as u32) != 0
1048        })
1049    }
1050    #[doc = "Bit 6 - Channel 6 Select"]
1051    #[inline]
1052    pub fn ch6sel(&self) -> CH6SELR {
1053        CH6SELR::_from({
1054            const MASK: bool = true;
1055            const OFFSET: u8 = 6;
1056            ((self.bits >> OFFSET) & MASK as u32) != 0
1057        })
1058    }
1059    #[doc = "Bit 7 - Channel 7 Select"]
1060    #[inline]
1061    pub fn ch7sel(&self) -> CH7SELR {
1062        CH7SELR::_from({
1063            const MASK: bool = true;
1064            const OFFSET: u8 = 7;
1065            ((self.bits >> OFFSET) & MASK as u32) != 0
1066        })
1067    }
1068    #[doc = "Bit 9 - Load Enable"]
1069    #[inline]
1070    pub fn ldok(&self) -> LDOKR {
1071        LDOKR::_from({
1072            const MASK: bool = true;
1073            const OFFSET: u8 = 9;
1074            ((self.bits >> OFFSET) & MASK as u32) != 0
1075        })
1076    }
1077}
1078impl W {
1079    #[doc = r" Reset value of the register"]
1080    #[inline]
1081    pub fn reset_value() -> W {
1082        W { bits: 0 }
1083    }
1084    #[doc = r" Writes raw bits to the register"]
1085    #[inline]
1086    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1087        self.bits = bits;
1088        self
1089    }
1090    #[doc = "Bit 0 - Channel 0 Select"]
1091    #[inline]
1092    pub fn ch0sel(&mut self) -> _CH0SELW {
1093        _CH0SELW { w: self }
1094    }
1095    #[doc = "Bit 1 - Channel 1 Select"]
1096    #[inline]
1097    pub fn ch1sel(&mut self) -> _CH1SELW {
1098        _CH1SELW { w: self }
1099    }
1100    #[doc = "Bit 2 - Channel 2 Select"]
1101    #[inline]
1102    pub fn ch2sel(&mut self) -> _CH2SELW {
1103        _CH2SELW { w: self }
1104    }
1105    #[doc = "Bit 3 - Channel 3 Select"]
1106    #[inline]
1107    pub fn ch3sel(&mut self) -> _CH3SELW {
1108        _CH3SELW { w: self }
1109    }
1110    #[doc = "Bit 4 - Channel 4 Select"]
1111    #[inline]
1112    pub fn ch4sel(&mut self) -> _CH4SELW {
1113        _CH4SELW { w: self }
1114    }
1115    #[doc = "Bit 5 - Channel 5 Select"]
1116    #[inline]
1117    pub fn ch5sel(&mut self) -> _CH5SELW {
1118        _CH5SELW { w: self }
1119    }
1120    #[doc = "Bit 6 - Channel 6 Select"]
1121    #[inline]
1122    pub fn ch6sel(&mut self) -> _CH6SELW {
1123        _CH6SELW { w: self }
1124    }
1125    #[doc = "Bit 7 - Channel 7 Select"]
1126    #[inline]
1127    pub fn ch7sel(&mut self) -> _CH7SELW {
1128        _CH7SELW { w: self }
1129    }
1130    #[doc = "Bit 9 - Load Enable"]
1131    #[inline]
1132    pub fn ldok(&mut self) -> _LDOKW {
1133        _LDOKW { w: self }
1134    }
1135}