nrf5340_net_pac/dppic_ns/
chen.rs

1#[doc = "Register `CHEN` reader"]
2pub struct R(crate::R<CHEN_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<CHEN_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<CHEN_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<CHEN_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `CHEN` writer"]
17pub struct W(crate::W<CHEN_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<CHEN_SPEC>;
20    #[inline(always)]
21    fn deref(&self) -> &Self::Target {
22        &self.0
23    }
24}
25impl core::ops::DerefMut for W {
26    #[inline(always)]
27    fn deref_mut(&mut self) -> &mut Self::Target {
28        &mut self.0
29    }
30}
31impl From<crate::W<CHEN_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<CHEN_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `CH0` reader - Enable or disable channel 0"]
38pub type CH0_R = crate::BitReader<CH0_A>;
39#[doc = "Enable or disable channel 0\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq)]
41pub enum CH0_A {
42    #[doc = "0: Disable channel"]
43    DISABLED = 0,
44    #[doc = "1: Enable channel"]
45    ENABLED = 1,
46}
47impl From<CH0_A> for bool {
48    #[inline(always)]
49    fn from(variant: CH0_A) -> Self {
50        variant as u8 != 0
51    }
52}
53impl CH0_R {
54    #[doc = "Get enumerated values variant"]
55    #[inline(always)]
56    pub fn variant(&self) -> CH0_A {
57        match self.bits {
58            false => CH0_A::DISABLED,
59            true => CH0_A::ENABLED,
60        }
61    }
62    #[doc = "Checks if the value of the field is `DISABLED`"]
63    #[inline(always)]
64    pub fn is_disabled(&self) -> bool {
65        *self == CH0_A::DISABLED
66    }
67    #[doc = "Checks if the value of the field is `ENABLED`"]
68    #[inline(always)]
69    pub fn is_enabled(&self) -> bool {
70        *self == CH0_A::ENABLED
71    }
72}
73#[doc = "Field `CH0` writer - Enable or disable channel 0"]
74pub type CH0_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH0_A, O>;
75impl<'a, const O: u8> CH0_W<'a, O> {
76    #[doc = "Disable channel"]
77    #[inline(always)]
78    pub fn disabled(self) -> &'a mut W {
79        self.variant(CH0_A::DISABLED)
80    }
81    #[doc = "Enable channel"]
82    #[inline(always)]
83    pub fn enabled(self) -> &'a mut W {
84        self.variant(CH0_A::ENABLED)
85    }
86}
87#[doc = "Field `CH1` reader - Enable or disable channel 1"]
88pub type CH1_R = crate::BitReader<CH1_A>;
89#[doc = "Enable or disable channel 1\n\nValue on reset: 0"]
90#[derive(Clone, Copy, Debug, PartialEq)]
91pub enum CH1_A {
92    #[doc = "0: Disable channel"]
93    DISABLED = 0,
94    #[doc = "1: Enable channel"]
95    ENABLED = 1,
96}
97impl From<CH1_A> for bool {
98    #[inline(always)]
99    fn from(variant: CH1_A) -> Self {
100        variant as u8 != 0
101    }
102}
103impl CH1_R {
104    #[doc = "Get enumerated values variant"]
105    #[inline(always)]
106    pub fn variant(&self) -> CH1_A {
107        match self.bits {
108            false => CH1_A::DISABLED,
109            true => CH1_A::ENABLED,
110        }
111    }
112    #[doc = "Checks if the value of the field is `DISABLED`"]
113    #[inline(always)]
114    pub fn is_disabled(&self) -> bool {
115        *self == CH1_A::DISABLED
116    }
117    #[doc = "Checks if the value of the field is `ENABLED`"]
118    #[inline(always)]
119    pub fn is_enabled(&self) -> bool {
120        *self == CH1_A::ENABLED
121    }
122}
123#[doc = "Field `CH1` writer - Enable or disable channel 1"]
124pub type CH1_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH1_A, O>;
125impl<'a, const O: u8> CH1_W<'a, O> {
126    #[doc = "Disable channel"]
127    #[inline(always)]
128    pub fn disabled(self) -> &'a mut W {
129        self.variant(CH1_A::DISABLED)
130    }
131    #[doc = "Enable channel"]
132    #[inline(always)]
133    pub fn enabled(self) -> &'a mut W {
134        self.variant(CH1_A::ENABLED)
135    }
136}
137#[doc = "Field `CH2` reader - Enable or disable channel 2"]
138pub type CH2_R = crate::BitReader<CH2_A>;
139#[doc = "Enable or disable channel 2\n\nValue on reset: 0"]
140#[derive(Clone, Copy, Debug, PartialEq)]
141pub enum CH2_A {
142    #[doc = "0: Disable channel"]
143    DISABLED = 0,
144    #[doc = "1: Enable channel"]
145    ENABLED = 1,
146}
147impl From<CH2_A> for bool {
148    #[inline(always)]
149    fn from(variant: CH2_A) -> Self {
150        variant as u8 != 0
151    }
152}
153impl CH2_R {
154    #[doc = "Get enumerated values variant"]
155    #[inline(always)]
156    pub fn variant(&self) -> CH2_A {
157        match self.bits {
158            false => CH2_A::DISABLED,
159            true => CH2_A::ENABLED,
160        }
161    }
162    #[doc = "Checks if the value of the field is `DISABLED`"]
163    #[inline(always)]
164    pub fn is_disabled(&self) -> bool {
165        *self == CH2_A::DISABLED
166    }
167    #[doc = "Checks if the value of the field is `ENABLED`"]
168    #[inline(always)]
169    pub fn is_enabled(&self) -> bool {
170        *self == CH2_A::ENABLED
171    }
172}
173#[doc = "Field `CH2` writer - Enable or disable channel 2"]
174pub type CH2_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH2_A, O>;
175impl<'a, const O: u8> CH2_W<'a, O> {
176    #[doc = "Disable channel"]
177    #[inline(always)]
178    pub fn disabled(self) -> &'a mut W {
179        self.variant(CH2_A::DISABLED)
180    }
181    #[doc = "Enable channel"]
182    #[inline(always)]
183    pub fn enabled(self) -> &'a mut W {
184        self.variant(CH2_A::ENABLED)
185    }
186}
187#[doc = "Field `CH3` reader - Enable or disable channel 3"]
188pub type CH3_R = crate::BitReader<CH3_A>;
189#[doc = "Enable or disable channel 3\n\nValue on reset: 0"]
190#[derive(Clone, Copy, Debug, PartialEq)]
191pub enum CH3_A {
192    #[doc = "0: Disable channel"]
193    DISABLED = 0,
194    #[doc = "1: Enable channel"]
195    ENABLED = 1,
196}
197impl From<CH3_A> for bool {
198    #[inline(always)]
199    fn from(variant: CH3_A) -> Self {
200        variant as u8 != 0
201    }
202}
203impl CH3_R {
204    #[doc = "Get enumerated values variant"]
205    #[inline(always)]
206    pub fn variant(&self) -> CH3_A {
207        match self.bits {
208            false => CH3_A::DISABLED,
209            true => CH3_A::ENABLED,
210        }
211    }
212    #[doc = "Checks if the value of the field is `DISABLED`"]
213    #[inline(always)]
214    pub fn is_disabled(&self) -> bool {
215        *self == CH3_A::DISABLED
216    }
217    #[doc = "Checks if the value of the field is `ENABLED`"]
218    #[inline(always)]
219    pub fn is_enabled(&self) -> bool {
220        *self == CH3_A::ENABLED
221    }
222}
223#[doc = "Field `CH3` writer - Enable or disable channel 3"]
224pub type CH3_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH3_A, O>;
225impl<'a, const O: u8> CH3_W<'a, O> {
226    #[doc = "Disable channel"]
227    #[inline(always)]
228    pub fn disabled(self) -> &'a mut W {
229        self.variant(CH3_A::DISABLED)
230    }
231    #[doc = "Enable channel"]
232    #[inline(always)]
233    pub fn enabled(self) -> &'a mut W {
234        self.variant(CH3_A::ENABLED)
235    }
236}
237#[doc = "Field `CH4` reader - Enable or disable channel 4"]
238pub type CH4_R = crate::BitReader<CH4_A>;
239#[doc = "Enable or disable channel 4\n\nValue on reset: 0"]
240#[derive(Clone, Copy, Debug, PartialEq)]
241pub enum CH4_A {
242    #[doc = "0: Disable channel"]
243    DISABLED = 0,
244    #[doc = "1: Enable channel"]
245    ENABLED = 1,
246}
247impl From<CH4_A> for bool {
248    #[inline(always)]
249    fn from(variant: CH4_A) -> Self {
250        variant as u8 != 0
251    }
252}
253impl CH4_R {
254    #[doc = "Get enumerated values variant"]
255    #[inline(always)]
256    pub fn variant(&self) -> CH4_A {
257        match self.bits {
258            false => CH4_A::DISABLED,
259            true => CH4_A::ENABLED,
260        }
261    }
262    #[doc = "Checks if the value of the field is `DISABLED`"]
263    #[inline(always)]
264    pub fn is_disabled(&self) -> bool {
265        *self == CH4_A::DISABLED
266    }
267    #[doc = "Checks if the value of the field is `ENABLED`"]
268    #[inline(always)]
269    pub fn is_enabled(&self) -> bool {
270        *self == CH4_A::ENABLED
271    }
272}
273#[doc = "Field `CH4` writer - Enable or disable channel 4"]
274pub type CH4_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH4_A, O>;
275impl<'a, const O: u8> CH4_W<'a, O> {
276    #[doc = "Disable channel"]
277    #[inline(always)]
278    pub fn disabled(self) -> &'a mut W {
279        self.variant(CH4_A::DISABLED)
280    }
281    #[doc = "Enable channel"]
282    #[inline(always)]
283    pub fn enabled(self) -> &'a mut W {
284        self.variant(CH4_A::ENABLED)
285    }
286}
287#[doc = "Field `CH5` reader - Enable or disable channel 5"]
288pub type CH5_R = crate::BitReader<CH5_A>;
289#[doc = "Enable or disable channel 5\n\nValue on reset: 0"]
290#[derive(Clone, Copy, Debug, PartialEq)]
291pub enum CH5_A {
292    #[doc = "0: Disable channel"]
293    DISABLED = 0,
294    #[doc = "1: Enable channel"]
295    ENABLED = 1,
296}
297impl From<CH5_A> for bool {
298    #[inline(always)]
299    fn from(variant: CH5_A) -> Self {
300        variant as u8 != 0
301    }
302}
303impl CH5_R {
304    #[doc = "Get enumerated values variant"]
305    #[inline(always)]
306    pub fn variant(&self) -> CH5_A {
307        match self.bits {
308            false => CH5_A::DISABLED,
309            true => CH5_A::ENABLED,
310        }
311    }
312    #[doc = "Checks if the value of the field is `DISABLED`"]
313    #[inline(always)]
314    pub fn is_disabled(&self) -> bool {
315        *self == CH5_A::DISABLED
316    }
317    #[doc = "Checks if the value of the field is `ENABLED`"]
318    #[inline(always)]
319    pub fn is_enabled(&self) -> bool {
320        *self == CH5_A::ENABLED
321    }
322}
323#[doc = "Field `CH5` writer - Enable or disable channel 5"]
324pub type CH5_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH5_A, O>;
325impl<'a, const O: u8> CH5_W<'a, O> {
326    #[doc = "Disable channel"]
327    #[inline(always)]
328    pub fn disabled(self) -> &'a mut W {
329        self.variant(CH5_A::DISABLED)
330    }
331    #[doc = "Enable channel"]
332    #[inline(always)]
333    pub fn enabled(self) -> &'a mut W {
334        self.variant(CH5_A::ENABLED)
335    }
336}
337#[doc = "Field `CH6` reader - Enable or disable channel 6"]
338pub type CH6_R = crate::BitReader<CH6_A>;
339#[doc = "Enable or disable channel 6\n\nValue on reset: 0"]
340#[derive(Clone, Copy, Debug, PartialEq)]
341pub enum CH6_A {
342    #[doc = "0: Disable channel"]
343    DISABLED = 0,
344    #[doc = "1: Enable channel"]
345    ENABLED = 1,
346}
347impl From<CH6_A> for bool {
348    #[inline(always)]
349    fn from(variant: CH6_A) -> Self {
350        variant as u8 != 0
351    }
352}
353impl CH6_R {
354    #[doc = "Get enumerated values variant"]
355    #[inline(always)]
356    pub fn variant(&self) -> CH6_A {
357        match self.bits {
358            false => CH6_A::DISABLED,
359            true => CH6_A::ENABLED,
360        }
361    }
362    #[doc = "Checks if the value of the field is `DISABLED`"]
363    #[inline(always)]
364    pub fn is_disabled(&self) -> bool {
365        *self == CH6_A::DISABLED
366    }
367    #[doc = "Checks if the value of the field is `ENABLED`"]
368    #[inline(always)]
369    pub fn is_enabled(&self) -> bool {
370        *self == CH6_A::ENABLED
371    }
372}
373#[doc = "Field `CH6` writer - Enable or disable channel 6"]
374pub type CH6_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH6_A, O>;
375impl<'a, const O: u8> CH6_W<'a, O> {
376    #[doc = "Disable channel"]
377    #[inline(always)]
378    pub fn disabled(self) -> &'a mut W {
379        self.variant(CH6_A::DISABLED)
380    }
381    #[doc = "Enable channel"]
382    #[inline(always)]
383    pub fn enabled(self) -> &'a mut W {
384        self.variant(CH6_A::ENABLED)
385    }
386}
387#[doc = "Field `CH7` reader - Enable or disable channel 7"]
388pub type CH7_R = crate::BitReader<CH7_A>;
389#[doc = "Enable or disable channel 7\n\nValue on reset: 0"]
390#[derive(Clone, Copy, Debug, PartialEq)]
391pub enum CH7_A {
392    #[doc = "0: Disable channel"]
393    DISABLED = 0,
394    #[doc = "1: Enable channel"]
395    ENABLED = 1,
396}
397impl From<CH7_A> for bool {
398    #[inline(always)]
399    fn from(variant: CH7_A) -> Self {
400        variant as u8 != 0
401    }
402}
403impl CH7_R {
404    #[doc = "Get enumerated values variant"]
405    #[inline(always)]
406    pub fn variant(&self) -> CH7_A {
407        match self.bits {
408            false => CH7_A::DISABLED,
409            true => CH7_A::ENABLED,
410        }
411    }
412    #[doc = "Checks if the value of the field is `DISABLED`"]
413    #[inline(always)]
414    pub fn is_disabled(&self) -> bool {
415        *self == CH7_A::DISABLED
416    }
417    #[doc = "Checks if the value of the field is `ENABLED`"]
418    #[inline(always)]
419    pub fn is_enabled(&self) -> bool {
420        *self == CH7_A::ENABLED
421    }
422}
423#[doc = "Field `CH7` writer - Enable or disable channel 7"]
424pub type CH7_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH7_A, O>;
425impl<'a, const O: u8> CH7_W<'a, O> {
426    #[doc = "Disable channel"]
427    #[inline(always)]
428    pub fn disabled(self) -> &'a mut W {
429        self.variant(CH7_A::DISABLED)
430    }
431    #[doc = "Enable channel"]
432    #[inline(always)]
433    pub fn enabled(self) -> &'a mut W {
434        self.variant(CH7_A::ENABLED)
435    }
436}
437#[doc = "Field `CH8` reader - Enable or disable channel 8"]
438pub type CH8_R = crate::BitReader<CH8_A>;
439#[doc = "Enable or disable channel 8\n\nValue on reset: 0"]
440#[derive(Clone, Copy, Debug, PartialEq)]
441pub enum CH8_A {
442    #[doc = "0: Disable channel"]
443    DISABLED = 0,
444    #[doc = "1: Enable channel"]
445    ENABLED = 1,
446}
447impl From<CH8_A> for bool {
448    #[inline(always)]
449    fn from(variant: CH8_A) -> Self {
450        variant as u8 != 0
451    }
452}
453impl CH8_R {
454    #[doc = "Get enumerated values variant"]
455    #[inline(always)]
456    pub fn variant(&self) -> CH8_A {
457        match self.bits {
458            false => CH8_A::DISABLED,
459            true => CH8_A::ENABLED,
460        }
461    }
462    #[doc = "Checks if the value of the field is `DISABLED`"]
463    #[inline(always)]
464    pub fn is_disabled(&self) -> bool {
465        *self == CH8_A::DISABLED
466    }
467    #[doc = "Checks if the value of the field is `ENABLED`"]
468    #[inline(always)]
469    pub fn is_enabled(&self) -> bool {
470        *self == CH8_A::ENABLED
471    }
472}
473#[doc = "Field `CH8` writer - Enable or disable channel 8"]
474pub type CH8_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH8_A, O>;
475impl<'a, const O: u8> CH8_W<'a, O> {
476    #[doc = "Disable channel"]
477    #[inline(always)]
478    pub fn disabled(self) -> &'a mut W {
479        self.variant(CH8_A::DISABLED)
480    }
481    #[doc = "Enable channel"]
482    #[inline(always)]
483    pub fn enabled(self) -> &'a mut W {
484        self.variant(CH8_A::ENABLED)
485    }
486}
487#[doc = "Field `CH9` reader - Enable or disable channel 9"]
488pub type CH9_R = crate::BitReader<CH9_A>;
489#[doc = "Enable or disable channel 9\n\nValue on reset: 0"]
490#[derive(Clone, Copy, Debug, PartialEq)]
491pub enum CH9_A {
492    #[doc = "0: Disable channel"]
493    DISABLED = 0,
494    #[doc = "1: Enable channel"]
495    ENABLED = 1,
496}
497impl From<CH9_A> for bool {
498    #[inline(always)]
499    fn from(variant: CH9_A) -> Self {
500        variant as u8 != 0
501    }
502}
503impl CH9_R {
504    #[doc = "Get enumerated values variant"]
505    #[inline(always)]
506    pub fn variant(&self) -> CH9_A {
507        match self.bits {
508            false => CH9_A::DISABLED,
509            true => CH9_A::ENABLED,
510        }
511    }
512    #[doc = "Checks if the value of the field is `DISABLED`"]
513    #[inline(always)]
514    pub fn is_disabled(&self) -> bool {
515        *self == CH9_A::DISABLED
516    }
517    #[doc = "Checks if the value of the field is `ENABLED`"]
518    #[inline(always)]
519    pub fn is_enabled(&self) -> bool {
520        *self == CH9_A::ENABLED
521    }
522}
523#[doc = "Field `CH9` writer - Enable or disable channel 9"]
524pub type CH9_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH9_A, O>;
525impl<'a, const O: u8> CH9_W<'a, O> {
526    #[doc = "Disable channel"]
527    #[inline(always)]
528    pub fn disabled(self) -> &'a mut W {
529        self.variant(CH9_A::DISABLED)
530    }
531    #[doc = "Enable channel"]
532    #[inline(always)]
533    pub fn enabled(self) -> &'a mut W {
534        self.variant(CH9_A::ENABLED)
535    }
536}
537#[doc = "Field `CH10` reader - Enable or disable channel 10"]
538pub type CH10_R = crate::BitReader<CH10_A>;
539#[doc = "Enable or disable channel 10\n\nValue on reset: 0"]
540#[derive(Clone, Copy, Debug, PartialEq)]
541pub enum CH10_A {
542    #[doc = "0: Disable channel"]
543    DISABLED = 0,
544    #[doc = "1: Enable channel"]
545    ENABLED = 1,
546}
547impl From<CH10_A> for bool {
548    #[inline(always)]
549    fn from(variant: CH10_A) -> Self {
550        variant as u8 != 0
551    }
552}
553impl CH10_R {
554    #[doc = "Get enumerated values variant"]
555    #[inline(always)]
556    pub fn variant(&self) -> CH10_A {
557        match self.bits {
558            false => CH10_A::DISABLED,
559            true => CH10_A::ENABLED,
560        }
561    }
562    #[doc = "Checks if the value of the field is `DISABLED`"]
563    #[inline(always)]
564    pub fn is_disabled(&self) -> bool {
565        *self == CH10_A::DISABLED
566    }
567    #[doc = "Checks if the value of the field is `ENABLED`"]
568    #[inline(always)]
569    pub fn is_enabled(&self) -> bool {
570        *self == CH10_A::ENABLED
571    }
572}
573#[doc = "Field `CH10` writer - Enable or disable channel 10"]
574pub type CH10_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH10_A, O>;
575impl<'a, const O: u8> CH10_W<'a, O> {
576    #[doc = "Disable channel"]
577    #[inline(always)]
578    pub fn disabled(self) -> &'a mut W {
579        self.variant(CH10_A::DISABLED)
580    }
581    #[doc = "Enable channel"]
582    #[inline(always)]
583    pub fn enabled(self) -> &'a mut W {
584        self.variant(CH10_A::ENABLED)
585    }
586}
587#[doc = "Field `CH11` reader - Enable or disable channel 11"]
588pub type CH11_R = crate::BitReader<CH11_A>;
589#[doc = "Enable or disable channel 11\n\nValue on reset: 0"]
590#[derive(Clone, Copy, Debug, PartialEq)]
591pub enum CH11_A {
592    #[doc = "0: Disable channel"]
593    DISABLED = 0,
594    #[doc = "1: Enable channel"]
595    ENABLED = 1,
596}
597impl From<CH11_A> for bool {
598    #[inline(always)]
599    fn from(variant: CH11_A) -> Self {
600        variant as u8 != 0
601    }
602}
603impl CH11_R {
604    #[doc = "Get enumerated values variant"]
605    #[inline(always)]
606    pub fn variant(&self) -> CH11_A {
607        match self.bits {
608            false => CH11_A::DISABLED,
609            true => CH11_A::ENABLED,
610        }
611    }
612    #[doc = "Checks if the value of the field is `DISABLED`"]
613    #[inline(always)]
614    pub fn is_disabled(&self) -> bool {
615        *self == CH11_A::DISABLED
616    }
617    #[doc = "Checks if the value of the field is `ENABLED`"]
618    #[inline(always)]
619    pub fn is_enabled(&self) -> bool {
620        *self == CH11_A::ENABLED
621    }
622}
623#[doc = "Field `CH11` writer - Enable or disable channel 11"]
624pub type CH11_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH11_A, O>;
625impl<'a, const O: u8> CH11_W<'a, O> {
626    #[doc = "Disable channel"]
627    #[inline(always)]
628    pub fn disabled(self) -> &'a mut W {
629        self.variant(CH11_A::DISABLED)
630    }
631    #[doc = "Enable channel"]
632    #[inline(always)]
633    pub fn enabled(self) -> &'a mut W {
634        self.variant(CH11_A::ENABLED)
635    }
636}
637#[doc = "Field `CH12` reader - Enable or disable channel 12"]
638pub type CH12_R = crate::BitReader<CH12_A>;
639#[doc = "Enable or disable channel 12\n\nValue on reset: 0"]
640#[derive(Clone, Copy, Debug, PartialEq)]
641pub enum CH12_A {
642    #[doc = "0: Disable channel"]
643    DISABLED = 0,
644    #[doc = "1: Enable channel"]
645    ENABLED = 1,
646}
647impl From<CH12_A> for bool {
648    #[inline(always)]
649    fn from(variant: CH12_A) -> Self {
650        variant as u8 != 0
651    }
652}
653impl CH12_R {
654    #[doc = "Get enumerated values variant"]
655    #[inline(always)]
656    pub fn variant(&self) -> CH12_A {
657        match self.bits {
658            false => CH12_A::DISABLED,
659            true => CH12_A::ENABLED,
660        }
661    }
662    #[doc = "Checks if the value of the field is `DISABLED`"]
663    #[inline(always)]
664    pub fn is_disabled(&self) -> bool {
665        *self == CH12_A::DISABLED
666    }
667    #[doc = "Checks if the value of the field is `ENABLED`"]
668    #[inline(always)]
669    pub fn is_enabled(&self) -> bool {
670        *self == CH12_A::ENABLED
671    }
672}
673#[doc = "Field `CH12` writer - Enable or disable channel 12"]
674pub type CH12_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH12_A, O>;
675impl<'a, const O: u8> CH12_W<'a, O> {
676    #[doc = "Disable channel"]
677    #[inline(always)]
678    pub fn disabled(self) -> &'a mut W {
679        self.variant(CH12_A::DISABLED)
680    }
681    #[doc = "Enable channel"]
682    #[inline(always)]
683    pub fn enabled(self) -> &'a mut W {
684        self.variant(CH12_A::ENABLED)
685    }
686}
687#[doc = "Field `CH13` reader - Enable or disable channel 13"]
688pub type CH13_R = crate::BitReader<CH13_A>;
689#[doc = "Enable or disable channel 13\n\nValue on reset: 0"]
690#[derive(Clone, Copy, Debug, PartialEq)]
691pub enum CH13_A {
692    #[doc = "0: Disable channel"]
693    DISABLED = 0,
694    #[doc = "1: Enable channel"]
695    ENABLED = 1,
696}
697impl From<CH13_A> for bool {
698    #[inline(always)]
699    fn from(variant: CH13_A) -> Self {
700        variant as u8 != 0
701    }
702}
703impl CH13_R {
704    #[doc = "Get enumerated values variant"]
705    #[inline(always)]
706    pub fn variant(&self) -> CH13_A {
707        match self.bits {
708            false => CH13_A::DISABLED,
709            true => CH13_A::ENABLED,
710        }
711    }
712    #[doc = "Checks if the value of the field is `DISABLED`"]
713    #[inline(always)]
714    pub fn is_disabled(&self) -> bool {
715        *self == CH13_A::DISABLED
716    }
717    #[doc = "Checks if the value of the field is `ENABLED`"]
718    #[inline(always)]
719    pub fn is_enabled(&self) -> bool {
720        *self == CH13_A::ENABLED
721    }
722}
723#[doc = "Field `CH13` writer - Enable or disable channel 13"]
724pub type CH13_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH13_A, O>;
725impl<'a, const O: u8> CH13_W<'a, O> {
726    #[doc = "Disable channel"]
727    #[inline(always)]
728    pub fn disabled(self) -> &'a mut W {
729        self.variant(CH13_A::DISABLED)
730    }
731    #[doc = "Enable channel"]
732    #[inline(always)]
733    pub fn enabled(self) -> &'a mut W {
734        self.variant(CH13_A::ENABLED)
735    }
736}
737#[doc = "Field `CH14` reader - Enable or disable channel 14"]
738pub type CH14_R = crate::BitReader<CH14_A>;
739#[doc = "Enable or disable channel 14\n\nValue on reset: 0"]
740#[derive(Clone, Copy, Debug, PartialEq)]
741pub enum CH14_A {
742    #[doc = "0: Disable channel"]
743    DISABLED = 0,
744    #[doc = "1: Enable channel"]
745    ENABLED = 1,
746}
747impl From<CH14_A> for bool {
748    #[inline(always)]
749    fn from(variant: CH14_A) -> Self {
750        variant as u8 != 0
751    }
752}
753impl CH14_R {
754    #[doc = "Get enumerated values variant"]
755    #[inline(always)]
756    pub fn variant(&self) -> CH14_A {
757        match self.bits {
758            false => CH14_A::DISABLED,
759            true => CH14_A::ENABLED,
760        }
761    }
762    #[doc = "Checks if the value of the field is `DISABLED`"]
763    #[inline(always)]
764    pub fn is_disabled(&self) -> bool {
765        *self == CH14_A::DISABLED
766    }
767    #[doc = "Checks if the value of the field is `ENABLED`"]
768    #[inline(always)]
769    pub fn is_enabled(&self) -> bool {
770        *self == CH14_A::ENABLED
771    }
772}
773#[doc = "Field `CH14` writer - Enable or disable channel 14"]
774pub type CH14_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH14_A, O>;
775impl<'a, const O: u8> CH14_W<'a, O> {
776    #[doc = "Disable channel"]
777    #[inline(always)]
778    pub fn disabled(self) -> &'a mut W {
779        self.variant(CH14_A::DISABLED)
780    }
781    #[doc = "Enable channel"]
782    #[inline(always)]
783    pub fn enabled(self) -> &'a mut W {
784        self.variant(CH14_A::ENABLED)
785    }
786}
787#[doc = "Field `CH15` reader - Enable or disable channel 15"]
788pub type CH15_R = crate::BitReader<CH15_A>;
789#[doc = "Enable or disable channel 15\n\nValue on reset: 0"]
790#[derive(Clone, Copy, Debug, PartialEq)]
791pub enum CH15_A {
792    #[doc = "0: Disable channel"]
793    DISABLED = 0,
794    #[doc = "1: Enable channel"]
795    ENABLED = 1,
796}
797impl From<CH15_A> for bool {
798    #[inline(always)]
799    fn from(variant: CH15_A) -> Self {
800        variant as u8 != 0
801    }
802}
803impl CH15_R {
804    #[doc = "Get enumerated values variant"]
805    #[inline(always)]
806    pub fn variant(&self) -> CH15_A {
807        match self.bits {
808            false => CH15_A::DISABLED,
809            true => CH15_A::ENABLED,
810        }
811    }
812    #[doc = "Checks if the value of the field is `DISABLED`"]
813    #[inline(always)]
814    pub fn is_disabled(&self) -> bool {
815        *self == CH15_A::DISABLED
816    }
817    #[doc = "Checks if the value of the field is `ENABLED`"]
818    #[inline(always)]
819    pub fn is_enabled(&self) -> bool {
820        *self == CH15_A::ENABLED
821    }
822}
823#[doc = "Field `CH15` writer - Enable or disable channel 15"]
824pub type CH15_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH15_A, O>;
825impl<'a, const O: u8> CH15_W<'a, O> {
826    #[doc = "Disable channel"]
827    #[inline(always)]
828    pub fn disabled(self) -> &'a mut W {
829        self.variant(CH15_A::DISABLED)
830    }
831    #[doc = "Enable channel"]
832    #[inline(always)]
833    pub fn enabled(self) -> &'a mut W {
834        self.variant(CH15_A::ENABLED)
835    }
836}
837impl R {
838    #[doc = "Bit 0 - Enable or disable channel 0"]
839    #[inline(always)]
840    pub fn ch0(&self) -> CH0_R {
841        CH0_R::new((self.bits & 1) != 0)
842    }
843    #[doc = "Bit 1 - Enable or disable channel 1"]
844    #[inline(always)]
845    pub fn ch1(&self) -> CH1_R {
846        CH1_R::new(((self.bits >> 1) & 1) != 0)
847    }
848    #[doc = "Bit 2 - Enable or disable channel 2"]
849    #[inline(always)]
850    pub fn ch2(&self) -> CH2_R {
851        CH2_R::new(((self.bits >> 2) & 1) != 0)
852    }
853    #[doc = "Bit 3 - Enable or disable channel 3"]
854    #[inline(always)]
855    pub fn ch3(&self) -> CH3_R {
856        CH3_R::new(((self.bits >> 3) & 1) != 0)
857    }
858    #[doc = "Bit 4 - Enable or disable channel 4"]
859    #[inline(always)]
860    pub fn ch4(&self) -> CH4_R {
861        CH4_R::new(((self.bits >> 4) & 1) != 0)
862    }
863    #[doc = "Bit 5 - Enable or disable channel 5"]
864    #[inline(always)]
865    pub fn ch5(&self) -> CH5_R {
866        CH5_R::new(((self.bits >> 5) & 1) != 0)
867    }
868    #[doc = "Bit 6 - Enable or disable channel 6"]
869    #[inline(always)]
870    pub fn ch6(&self) -> CH6_R {
871        CH6_R::new(((self.bits >> 6) & 1) != 0)
872    }
873    #[doc = "Bit 7 - Enable or disable channel 7"]
874    #[inline(always)]
875    pub fn ch7(&self) -> CH7_R {
876        CH7_R::new(((self.bits >> 7) & 1) != 0)
877    }
878    #[doc = "Bit 8 - Enable or disable channel 8"]
879    #[inline(always)]
880    pub fn ch8(&self) -> CH8_R {
881        CH8_R::new(((self.bits >> 8) & 1) != 0)
882    }
883    #[doc = "Bit 9 - Enable or disable channel 9"]
884    #[inline(always)]
885    pub fn ch9(&self) -> CH9_R {
886        CH9_R::new(((self.bits >> 9) & 1) != 0)
887    }
888    #[doc = "Bit 10 - Enable or disable channel 10"]
889    #[inline(always)]
890    pub fn ch10(&self) -> CH10_R {
891        CH10_R::new(((self.bits >> 10) & 1) != 0)
892    }
893    #[doc = "Bit 11 - Enable or disable channel 11"]
894    #[inline(always)]
895    pub fn ch11(&self) -> CH11_R {
896        CH11_R::new(((self.bits >> 11) & 1) != 0)
897    }
898    #[doc = "Bit 12 - Enable or disable channel 12"]
899    #[inline(always)]
900    pub fn ch12(&self) -> CH12_R {
901        CH12_R::new(((self.bits >> 12) & 1) != 0)
902    }
903    #[doc = "Bit 13 - Enable or disable channel 13"]
904    #[inline(always)]
905    pub fn ch13(&self) -> CH13_R {
906        CH13_R::new(((self.bits >> 13) & 1) != 0)
907    }
908    #[doc = "Bit 14 - Enable or disable channel 14"]
909    #[inline(always)]
910    pub fn ch14(&self) -> CH14_R {
911        CH14_R::new(((self.bits >> 14) & 1) != 0)
912    }
913    #[doc = "Bit 15 - Enable or disable channel 15"]
914    #[inline(always)]
915    pub fn ch15(&self) -> CH15_R {
916        CH15_R::new(((self.bits >> 15) & 1) != 0)
917    }
918}
919impl W {
920    #[doc = "Bit 0 - Enable or disable channel 0"]
921    #[inline(always)]
922    pub fn ch0(&mut self) -> CH0_W<0> {
923        CH0_W::new(self)
924    }
925    #[doc = "Bit 1 - Enable or disable channel 1"]
926    #[inline(always)]
927    pub fn ch1(&mut self) -> CH1_W<1> {
928        CH1_W::new(self)
929    }
930    #[doc = "Bit 2 - Enable or disable channel 2"]
931    #[inline(always)]
932    pub fn ch2(&mut self) -> CH2_W<2> {
933        CH2_W::new(self)
934    }
935    #[doc = "Bit 3 - Enable or disable channel 3"]
936    #[inline(always)]
937    pub fn ch3(&mut self) -> CH3_W<3> {
938        CH3_W::new(self)
939    }
940    #[doc = "Bit 4 - Enable or disable channel 4"]
941    #[inline(always)]
942    pub fn ch4(&mut self) -> CH4_W<4> {
943        CH4_W::new(self)
944    }
945    #[doc = "Bit 5 - Enable or disable channel 5"]
946    #[inline(always)]
947    pub fn ch5(&mut self) -> CH5_W<5> {
948        CH5_W::new(self)
949    }
950    #[doc = "Bit 6 - Enable or disable channel 6"]
951    #[inline(always)]
952    pub fn ch6(&mut self) -> CH6_W<6> {
953        CH6_W::new(self)
954    }
955    #[doc = "Bit 7 - Enable or disable channel 7"]
956    #[inline(always)]
957    pub fn ch7(&mut self) -> CH7_W<7> {
958        CH7_W::new(self)
959    }
960    #[doc = "Bit 8 - Enable or disable channel 8"]
961    #[inline(always)]
962    pub fn ch8(&mut self) -> CH8_W<8> {
963        CH8_W::new(self)
964    }
965    #[doc = "Bit 9 - Enable or disable channel 9"]
966    #[inline(always)]
967    pub fn ch9(&mut self) -> CH9_W<9> {
968        CH9_W::new(self)
969    }
970    #[doc = "Bit 10 - Enable or disable channel 10"]
971    #[inline(always)]
972    pub fn ch10(&mut self) -> CH10_W<10> {
973        CH10_W::new(self)
974    }
975    #[doc = "Bit 11 - Enable or disable channel 11"]
976    #[inline(always)]
977    pub fn ch11(&mut self) -> CH11_W<11> {
978        CH11_W::new(self)
979    }
980    #[doc = "Bit 12 - Enable or disable channel 12"]
981    #[inline(always)]
982    pub fn ch12(&mut self) -> CH12_W<12> {
983        CH12_W::new(self)
984    }
985    #[doc = "Bit 13 - Enable or disable channel 13"]
986    #[inline(always)]
987    pub fn ch13(&mut self) -> CH13_W<13> {
988        CH13_W::new(self)
989    }
990    #[doc = "Bit 14 - Enable or disable channel 14"]
991    #[inline(always)]
992    pub fn ch14(&mut self) -> CH14_W<14> {
993        CH14_W::new(self)
994    }
995    #[doc = "Bit 15 - Enable or disable channel 15"]
996    #[inline(always)]
997    pub fn ch15(&mut self) -> CH15_W<15> {
998        CH15_W::new(self)
999    }
1000    #[doc = "Writes raw bits to the register."]
1001    #[inline(always)]
1002    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1003        self.0.bits(bits);
1004        self
1005    }
1006}
1007#[doc = "Channel enable register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [chen](index.html) module"]
1008pub struct CHEN_SPEC;
1009impl crate::RegisterSpec for CHEN_SPEC {
1010    type Ux = u32;
1011}
1012#[doc = "`read()` method returns [chen::R](R) reader structure"]
1013impl crate::Readable for CHEN_SPEC {
1014    type Reader = R;
1015}
1016#[doc = "`write(|w| ..)` method takes [chen::W](W) writer structure"]
1017impl crate::Writable for CHEN_SPEC {
1018    type Writer = W;
1019}
1020#[doc = "`reset()` method sets CHEN to value 0"]
1021impl crate::Resettable for CHEN_SPEC {
1022    #[inline(always)]
1023    fn reset_value() -> Self::Ux {
1024        0
1025    }
1026}