max32660/gpio0/
out.rs

1#[doc = "Register `OUT` reader"]
2pub type R = crate::R<OUT_SPEC>;
3#[doc = "Register `OUT` writer"]
4pub type W = crate::W<OUT_SPEC>;
5#[doc = "Field `p0` reader - Output level for pin 0."]
6pub type P0_R = crate::BitReader<P0_A>;
7#[doc = "Output level for pin 0.\n\nValue on reset: 0"]
8#[derive(Clone, Copy, Debug, PartialEq, Eq)]
9pub enum P0_A {
10    #[doc = "0: Low for pin 0."]
11    LOW = 0,
12    #[doc = "1: High for pin 0."]
13    HIGH = 1,
14}
15impl From<P0_A> for bool {
16    #[inline(always)]
17    fn from(variant: P0_A) -> Self {
18        variant as u8 != 0
19    }
20}
21impl P0_R {
22    #[doc = "Get enumerated values variant"]
23    #[inline(always)]
24    pub fn variant(&self) -> P0_A {
25        match self.bits {
26            false => P0_A::LOW,
27            true => P0_A::HIGH,
28        }
29    }
30    #[doc = "Low for pin 0."]
31    #[inline(always)]
32    pub fn is_low(&self) -> bool {
33        *self == P0_A::LOW
34    }
35    #[doc = "High for pin 0."]
36    #[inline(always)]
37    pub fn is_high(&self) -> bool {
38        *self == P0_A::HIGH
39    }
40}
41#[doc = "Field `p0` writer - Output level for pin 0."]
42pub type P0_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O, P0_A>;
43impl<'a, REG, const O: u8> P0_W<'a, REG, O>
44where
45    REG: crate::Writable + crate::RegisterSpec,
46{
47    #[doc = "Low for pin 0."]
48    #[inline(always)]
49    pub fn low(self) -> &'a mut crate::W<REG> {
50        self.variant(P0_A::LOW)
51    }
52    #[doc = "High for pin 0."]
53    #[inline(always)]
54    pub fn high(self) -> &'a mut crate::W<REG> {
55        self.variant(P0_A::HIGH)
56    }
57}
58#[doc = "Field `p1` reader - Output level for pin 1."]
59pub type P1_R = crate::BitReader<P1_A>;
60#[doc = "Output level for pin 1.\n\nValue on reset: 0"]
61#[derive(Clone, Copy, Debug, PartialEq, Eq)]
62pub enum P1_A {
63    #[doc = "0: Low for pin 1."]
64    LOW = 0,
65    #[doc = "1: High for pin 1."]
66    HIGH = 1,
67}
68impl From<P1_A> for bool {
69    #[inline(always)]
70    fn from(variant: P1_A) -> Self {
71        variant as u8 != 0
72    }
73}
74impl P1_R {
75    #[doc = "Get enumerated values variant"]
76    #[inline(always)]
77    pub fn variant(&self) -> P1_A {
78        match self.bits {
79            false => P1_A::LOW,
80            true => P1_A::HIGH,
81        }
82    }
83    #[doc = "Low for pin 1."]
84    #[inline(always)]
85    pub fn is_low(&self) -> bool {
86        *self == P1_A::LOW
87    }
88    #[doc = "High for pin 1."]
89    #[inline(always)]
90    pub fn is_high(&self) -> bool {
91        *self == P1_A::HIGH
92    }
93}
94#[doc = "Field `p1` writer - Output level for pin 1."]
95pub type P1_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O, P1_A>;
96impl<'a, REG, const O: u8> P1_W<'a, REG, O>
97where
98    REG: crate::Writable + crate::RegisterSpec,
99{
100    #[doc = "Low for pin 1."]
101    #[inline(always)]
102    pub fn low(self) -> &'a mut crate::W<REG> {
103        self.variant(P1_A::LOW)
104    }
105    #[doc = "High for pin 1."]
106    #[inline(always)]
107    pub fn high(self) -> &'a mut crate::W<REG> {
108        self.variant(P1_A::HIGH)
109    }
110}
111#[doc = "Field `p2` reader - Output level for pin 2."]
112pub type P2_R = crate::BitReader<P2_A>;
113#[doc = "Output level for pin 2.\n\nValue on reset: 0"]
114#[derive(Clone, Copy, Debug, PartialEq, Eq)]
115pub enum P2_A {
116    #[doc = "0: Low for pin 2."]
117    LOW = 0,
118    #[doc = "1: High for pin 2."]
119    HIGH = 1,
120}
121impl From<P2_A> for bool {
122    #[inline(always)]
123    fn from(variant: P2_A) -> Self {
124        variant as u8 != 0
125    }
126}
127impl P2_R {
128    #[doc = "Get enumerated values variant"]
129    #[inline(always)]
130    pub fn variant(&self) -> P2_A {
131        match self.bits {
132            false => P2_A::LOW,
133            true => P2_A::HIGH,
134        }
135    }
136    #[doc = "Low for pin 2."]
137    #[inline(always)]
138    pub fn is_low(&self) -> bool {
139        *self == P2_A::LOW
140    }
141    #[doc = "High for pin 2."]
142    #[inline(always)]
143    pub fn is_high(&self) -> bool {
144        *self == P2_A::HIGH
145    }
146}
147#[doc = "Field `p2` writer - Output level for pin 2."]
148pub type P2_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O, P2_A>;
149impl<'a, REG, const O: u8> P2_W<'a, REG, O>
150where
151    REG: crate::Writable + crate::RegisterSpec,
152{
153    #[doc = "Low for pin 2."]
154    #[inline(always)]
155    pub fn low(self) -> &'a mut crate::W<REG> {
156        self.variant(P2_A::LOW)
157    }
158    #[doc = "High for pin 2."]
159    #[inline(always)]
160    pub fn high(self) -> &'a mut crate::W<REG> {
161        self.variant(P2_A::HIGH)
162    }
163}
164#[doc = "Field `p3` reader - Output level for pin 3."]
165pub type P3_R = crate::BitReader<P3_A>;
166#[doc = "Output level for pin 3.\n\nValue on reset: 0"]
167#[derive(Clone, Copy, Debug, PartialEq, Eq)]
168pub enum P3_A {
169    #[doc = "0: Low for pin 3."]
170    LOW = 0,
171    #[doc = "1: High for pin 3."]
172    HIGH = 1,
173}
174impl From<P3_A> for bool {
175    #[inline(always)]
176    fn from(variant: P3_A) -> Self {
177        variant as u8 != 0
178    }
179}
180impl P3_R {
181    #[doc = "Get enumerated values variant"]
182    #[inline(always)]
183    pub fn variant(&self) -> P3_A {
184        match self.bits {
185            false => P3_A::LOW,
186            true => P3_A::HIGH,
187        }
188    }
189    #[doc = "Low for pin 3."]
190    #[inline(always)]
191    pub fn is_low(&self) -> bool {
192        *self == P3_A::LOW
193    }
194    #[doc = "High for pin 3."]
195    #[inline(always)]
196    pub fn is_high(&self) -> bool {
197        *self == P3_A::HIGH
198    }
199}
200#[doc = "Field `p3` writer - Output level for pin 3."]
201pub type P3_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O, P3_A>;
202impl<'a, REG, const O: u8> P3_W<'a, REG, O>
203where
204    REG: crate::Writable + crate::RegisterSpec,
205{
206    #[doc = "Low for pin 3."]
207    #[inline(always)]
208    pub fn low(self) -> &'a mut crate::W<REG> {
209        self.variant(P3_A::LOW)
210    }
211    #[doc = "High for pin 3."]
212    #[inline(always)]
213    pub fn high(self) -> &'a mut crate::W<REG> {
214        self.variant(P3_A::HIGH)
215    }
216}
217#[doc = "Field `p4` reader - Output level for pin 4."]
218pub type P4_R = crate::BitReader<P4_A>;
219#[doc = "Output level for pin 4.\n\nValue on reset: 0"]
220#[derive(Clone, Copy, Debug, PartialEq, Eq)]
221pub enum P4_A {
222    #[doc = "0: Low for pin 4."]
223    LOW = 0,
224    #[doc = "1: High for pin 4."]
225    HIGH = 1,
226}
227impl From<P4_A> for bool {
228    #[inline(always)]
229    fn from(variant: P4_A) -> Self {
230        variant as u8 != 0
231    }
232}
233impl P4_R {
234    #[doc = "Get enumerated values variant"]
235    #[inline(always)]
236    pub fn variant(&self) -> P4_A {
237        match self.bits {
238            false => P4_A::LOW,
239            true => P4_A::HIGH,
240        }
241    }
242    #[doc = "Low for pin 4."]
243    #[inline(always)]
244    pub fn is_low(&self) -> bool {
245        *self == P4_A::LOW
246    }
247    #[doc = "High for pin 4."]
248    #[inline(always)]
249    pub fn is_high(&self) -> bool {
250        *self == P4_A::HIGH
251    }
252}
253#[doc = "Field `p4` writer - Output level for pin 4."]
254pub type P4_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O, P4_A>;
255impl<'a, REG, const O: u8> P4_W<'a, REG, O>
256where
257    REG: crate::Writable + crate::RegisterSpec,
258{
259    #[doc = "Low for pin 4."]
260    #[inline(always)]
261    pub fn low(self) -> &'a mut crate::W<REG> {
262        self.variant(P4_A::LOW)
263    }
264    #[doc = "High for pin 4."]
265    #[inline(always)]
266    pub fn high(self) -> &'a mut crate::W<REG> {
267        self.variant(P4_A::HIGH)
268    }
269}
270#[doc = "Field `p5` reader - Output level for pin 5."]
271pub type P5_R = crate::BitReader<P5_A>;
272#[doc = "Output level for pin 5.\n\nValue on reset: 0"]
273#[derive(Clone, Copy, Debug, PartialEq, Eq)]
274pub enum P5_A {
275    #[doc = "0: Low for pin 5."]
276    LOW = 0,
277    #[doc = "1: High for pin 5."]
278    HIGH = 1,
279}
280impl From<P5_A> for bool {
281    #[inline(always)]
282    fn from(variant: P5_A) -> Self {
283        variant as u8 != 0
284    }
285}
286impl P5_R {
287    #[doc = "Get enumerated values variant"]
288    #[inline(always)]
289    pub fn variant(&self) -> P5_A {
290        match self.bits {
291            false => P5_A::LOW,
292            true => P5_A::HIGH,
293        }
294    }
295    #[doc = "Low for pin 5."]
296    #[inline(always)]
297    pub fn is_low(&self) -> bool {
298        *self == P5_A::LOW
299    }
300    #[doc = "High for pin 5."]
301    #[inline(always)]
302    pub fn is_high(&self) -> bool {
303        *self == P5_A::HIGH
304    }
305}
306#[doc = "Field `p5` writer - Output level for pin 5."]
307pub type P5_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O, P5_A>;
308impl<'a, REG, const O: u8> P5_W<'a, REG, O>
309where
310    REG: crate::Writable + crate::RegisterSpec,
311{
312    #[doc = "Low for pin 5."]
313    #[inline(always)]
314    pub fn low(self) -> &'a mut crate::W<REG> {
315        self.variant(P5_A::LOW)
316    }
317    #[doc = "High for pin 5."]
318    #[inline(always)]
319    pub fn high(self) -> &'a mut crate::W<REG> {
320        self.variant(P5_A::HIGH)
321    }
322}
323#[doc = "Field `p6` reader - Output level for pin 6."]
324pub type P6_R = crate::BitReader<P6_A>;
325#[doc = "Output level for pin 6.\n\nValue on reset: 0"]
326#[derive(Clone, Copy, Debug, PartialEq, Eq)]
327pub enum P6_A {
328    #[doc = "0: Low for pin 6."]
329    LOW = 0,
330    #[doc = "1: High for pin 6."]
331    HIGH = 1,
332}
333impl From<P6_A> for bool {
334    #[inline(always)]
335    fn from(variant: P6_A) -> Self {
336        variant as u8 != 0
337    }
338}
339impl P6_R {
340    #[doc = "Get enumerated values variant"]
341    #[inline(always)]
342    pub fn variant(&self) -> P6_A {
343        match self.bits {
344            false => P6_A::LOW,
345            true => P6_A::HIGH,
346        }
347    }
348    #[doc = "Low for pin 6."]
349    #[inline(always)]
350    pub fn is_low(&self) -> bool {
351        *self == P6_A::LOW
352    }
353    #[doc = "High for pin 6."]
354    #[inline(always)]
355    pub fn is_high(&self) -> bool {
356        *self == P6_A::HIGH
357    }
358}
359#[doc = "Field `p6` writer - Output level for pin 6."]
360pub type P6_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O, P6_A>;
361impl<'a, REG, const O: u8> P6_W<'a, REG, O>
362where
363    REG: crate::Writable + crate::RegisterSpec,
364{
365    #[doc = "Low for pin 6."]
366    #[inline(always)]
367    pub fn low(self) -> &'a mut crate::W<REG> {
368        self.variant(P6_A::LOW)
369    }
370    #[doc = "High for pin 6."]
371    #[inline(always)]
372    pub fn high(self) -> &'a mut crate::W<REG> {
373        self.variant(P6_A::HIGH)
374    }
375}
376#[doc = "Field `p7` reader - Output level for pin 7."]
377pub type P7_R = crate::BitReader<P7_A>;
378#[doc = "Output level for pin 7.\n\nValue on reset: 0"]
379#[derive(Clone, Copy, Debug, PartialEq, Eq)]
380pub enum P7_A {
381    #[doc = "0: Low for pin 7."]
382    LOW = 0,
383    #[doc = "1: High for pin 7."]
384    HIGH = 1,
385}
386impl From<P7_A> for bool {
387    #[inline(always)]
388    fn from(variant: P7_A) -> Self {
389        variant as u8 != 0
390    }
391}
392impl P7_R {
393    #[doc = "Get enumerated values variant"]
394    #[inline(always)]
395    pub fn variant(&self) -> P7_A {
396        match self.bits {
397            false => P7_A::LOW,
398            true => P7_A::HIGH,
399        }
400    }
401    #[doc = "Low for pin 7."]
402    #[inline(always)]
403    pub fn is_low(&self) -> bool {
404        *self == P7_A::LOW
405    }
406    #[doc = "High for pin 7."]
407    #[inline(always)]
408    pub fn is_high(&self) -> bool {
409        *self == P7_A::HIGH
410    }
411}
412#[doc = "Field `p7` writer - Output level for pin 7."]
413pub type P7_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O, P7_A>;
414impl<'a, REG, const O: u8> P7_W<'a, REG, O>
415where
416    REG: crate::Writable + crate::RegisterSpec,
417{
418    #[doc = "Low for pin 7."]
419    #[inline(always)]
420    pub fn low(self) -> &'a mut crate::W<REG> {
421        self.variant(P7_A::LOW)
422    }
423    #[doc = "High for pin 7."]
424    #[inline(always)]
425    pub fn high(self) -> &'a mut crate::W<REG> {
426        self.variant(P7_A::HIGH)
427    }
428}
429#[doc = "Field `p8` reader - Output level for pin 8."]
430pub type P8_R = crate::BitReader<P8_A>;
431#[doc = "Output level for pin 8.\n\nValue on reset: 0"]
432#[derive(Clone, Copy, Debug, PartialEq, Eq)]
433pub enum P8_A {
434    #[doc = "0: Low for pin 8."]
435    LOW = 0,
436    #[doc = "1: High for pin 8."]
437    HIGH = 1,
438}
439impl From<P8_A> for bool {
440    #[inline(always)]
441    fn from(variant: P8_A) -> Self {
442        variant as u8 != 0
443    }
444}
445impl P8_R {
446    #[doc = "Get enumerated values variant"]
447    #[inline(always)]
448    pub fn variant(&self) -> P8_A {
449        match self.bits {
450            false => P8_A::LOW,
451            true => P8_A::HIGH,
452        }
453    }
454    #[doc = "Low for pin 8."]
455    #[inline(always)]
456    pub fn is_low(&self) -> bool {
457        *self == P8_A::LOW
458    }
459    #[doc = "High for pin 8."]
460    #[inline(always)]
461    pub fn is_high(&self) -> bool {
462        *self == P8_A::HIGH
463    }
464}
465#[doc = "Field `p8` writer - Output level for pin 8."]
466pub type P8_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O, P8_A>;
467impl<'a, REG, const O: u8> P8_W<'a, REG, O>
468where
469    REG: crate::Writable + crate::RegisterSpec,
470{
471    #[doc = "Low for pin 8."]
472    #[inline(always)]
473    pub fn low(self) -> &'a mut crate::W<REG> {
474        self.variant(P8_A::LOW)
475    }
476    #[doc = "High for pin 8."]
477    #[inline(always)]
478    pub fn high(self) -> &'a mut crate::W<REG> {
479        self.variant(P8_A::HIGH)
480    }
481}
482#[doc = "Field `p9` reader - Output level for pin 9."]
483pub type P9_R = crate::BitReader<P9_A>;
484#[doc = "Output level for pin 9.\n\nValue on reset: 0"]
485#[derive(Clone, Copy, Debug, PartialEq, Eq)]
486pub enum P9_A {
487    #[doc = "0: Low for pin 9."]
488    LOW = 0,
489    #[doc = "1: High for pin 9."]
490    HIGH = 1,
491}
492impl From<P9_A> for bool {
493    #[inline(always)]
494    fn from(variant: P9_A) -> Self {
495        variant as u8 != 0
496    }
497}
498impl P9_R {
499    #[doc = "Get enumerated values variant"]
500    #[inline(always)]
501    pub fn variant(&self) -> P9_A {
502        match self.bits {
503            false => P9_A::LOW,
504            true => P9_A::HIGH,
505        }
506    }
507    #[doc = "Low for pin 9."]
508    #[inline(always)]
509    pub fn is_low(&self) -> bool {
510        *self == P9_A::LOW
511    }
512    #[doc = "High for pin 9."]
513    #[inline(always)]
514    pub fn is_high(&self) -> bool {
515        *self == P9_A::HIGH
516    }
517}
518#[doc = "Field `p9` writer - Output level for pin 9."]
519pub type P9_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O, P9_A>;
520impl<'a, REG, const O: u8> P9_W<'a, REG, O>
521where
522    REG: crate::Writable + crate::RegisterSpec,
523{
524    #[doc = "Low for pin 9."]
525    #[inline(always)]
526    pub fn low(self) -> &'a mut crate::W<REG> {
527        self.variant(P9_A::LOW)
528    }
529    #[doc = "High for pin 9."]
530    #[inline(always)]
531    pub fn high(self) -> &'a mut crate::W<REG> {
532        self.variant(P9_A::HIGH)
533    }
534}
535#[doc = "Field `p10` reader - Output level for pin 10."]
536pub type P10_R = crate::BitReader<P10_A>;
537#[doc = "Output level for pin 10.\n\nValue on reset: 0"]
538#[derive(Clone, Copy, Debug, PartialEq, Eq)]
539pub enum P10_A {
540    #[doc = "0: Low for pin 10."]
541    LOW = 0,
542    #[doc = "1: High for pin 10."]
543    HIGH = 1,
544}
545impl From<P10_A> for bool {
546    #[inline(always)]
547    fn from(variant: P10_A) -> Self {
548        variant as u8 != 0
549    }
550}
551impl P10_R {
552    #[doc = "Get enumerated values variant"]
553    #[inline(always)]
554    pub fn variant(&self) -> P10_A {
555        match self.bits {
556            false => P10_A::LOW,
557            true => P10_A::HIGH,
558        }
559    }
560    #[doc = "Low for pin 10."]
561    #[inline(always)]
562    pub fn is_low(&self) -> bool {
563        *self == P10_A::LOW
564    }
565    #[doc = "High for pin 10."]
566    #[inline(always)]
567    pub fn is_high(&self) -> bool {
568        *self == P10_A::HIGH
569    }
570}
571#[doc = "Field `p10` writer - Output level for pin 10."]
572pub type P10_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O, P10_A>;
573impl<'a, REG, const O: u8> P10_W<'a, REG, O>
574where
575    REG: crate::Writable + crate::RegisterSpec,
576{
577    #[doc = "Low for pin 10."]
578    #[inline(always)]
579    pub fn low(self) -> &'a mut crate::W<REG> {
580        self.variant(P10_A::LOW)
581    }
582    #[doc = "High for pin 10."]
583    #[inline(always)]
584    pub fn high(self) -> &'a mut crate::W<REG> {
585        self.variant(P10_A::HIGH)
586    }
587}
588#[doc = "Field `p11` reader - Output level for pin 11."]
589pub type P11_R = crate::BitReader<P11_A>;
590#[doc = "Output level for pin 11.\n\nValue on reset: 0"]
591#[derive(Clone, Copy, Debug, PartialEq, Eq)]
592pub enum P11_A {
593    #[doc = "0: Low for pin 11."]
594    LOW = 0,
595    #[doc = "1: High for pin 11."]
596    HIGH = 1,
597}
598impl From<P11_A> for bool {
599    #[inline(always)]
600    fn from(variant: P11_A) -> Self {
601        variant as u8 != 0
602    }
603}
604impl P11_R {
605    #[doc = "Get enumerated values variant"]
606    #[inline(always)]
607    pub fn variant(&self) -> P11_A {
608        match self.bits {
609            false => P11_A::LOW,
610            true => P11_A::HIGH,
611        }
612    }
613    #[doc = "Low for pin 11."]
614    #[inline(always)]
615    pub fn is_low(&self) -> bool {
616        *self == P11_A::LOW
617    }
618    #[doc = "High for pin 11."]
619    #[inline(always)]
620    pub fn is_high(&self) -> bool {
621        *self == P11_A::HIGH
622    }
623}
624#[doc = "Field `p11` writer - Output level for pin 11."]
625pub type P11_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O, P11_A>;
626impl<'a, REG, const O: u8> P11_W<'a, REG, O>
627where
628    REG: crate::Writable + crate::RegisterSpec,
629{
630    #[doc = "Low for pin 11."]
631    #[inline(always)]
632    pub fn low(self) -> &'a mut crate::W<REG> {
633        self.variant(P11_A::LOW)
634    }
635    #[doc = "High for pin 11."]
636    #[inline(always)]
637    pub fn high(self) -> &'a mut crate::W<REG> {
638        self.variant(P11_A::HIGH)
639    }
640}
641#[doc = "Field `p12` reader - Output level for pin 12."]
642pub type P12_R = crate::BitReader<P12_A>;
643#[doc = "Output level for pin 12.\n\nValue on reset: 0"]
644#[derive(Clone, Copy, Debug, PartialEq, Eq)]
645pub enum P12_A {
646    #[doc = "0: Low for pin 12."]
647    LOW = 0,
648    #[doc = "1: High for pin 12."]
649    HIGH = 1,
650}
651impl From<P12_A> for bool {
652    #[inline(always)]
653    fn from(variant: P12_A) -> Self {
654        variant as u8 != 0
655    }
656}
657impl P12_R {
658    #[doc = "Get enumerated values variant"]
659    #[inline(always)]
660    pub fn variant(&self) -> P12_A {
661        match self.bits {
662            false => P12_A::LOW,
663            true => P12_A::HIGH,
664        }
665    }
666    #[doc = "Low for pin 12."]
667    #[inline(always)]
668    pub fn is_low(&self) -> bool {
669        *self == P12_A::LOW
670    }
671    #[doc = "High for pin 12."]
672    #[inline(always)]
673    pub fn is_high(&self) -> bool {
674        *self == P12_A::HIGH
675    }
676}
677#[doc = "Field `p12` writer - Output level for pin 12."]
678pub type P12_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O, P12_A>;
679impl<'a, REG, const O: u8> P12_W<'a, REG, O>
680where
681    REG: crate::Writable + crate::RegisterSpec,
682{
683    #[doc = "Low for pin 12."]
684    #[inline(always)]
685    pub fn low(self) -> &'a mut crate::W<REG> {
686        self.variant(P12_A::LOW)
687    }
688    #[doc = "High for pin 12."]
689    #[inline(always)]
690    pub fn high(self) -> &'a mut crate::W<REG> {
691        self.variant(P12_A::HIGH)
692    }
693}
694#[doc = "Field `p13` reader - Output level for pin 13."]
695pub type P13_R = crate::BitReader<P13_A>;
696#[doc = "Output level for pin 13.\n\nValue on reset: 0"]
697#[derive(Clone, Copy, Debug, PartialEq, Eq)]
698pub enum P13_A {
699    #[doc = "0: Low for pin 13."]
700    LOW = 0,
701    #[doc = "1: High for pin 13."]
702    HIGH = 1,
703}
704impl From<P13_A> for bool {
705    #[inline(always)]
706    fn from(variant: P13_A) -> Self {
707        variant as u8 != 0
708    }
709}
710impl P13_R {
711    #[doc = "Get enumerated values variant"]
712    #[inline(always)]
713    pub fn variant(&self) -> P13_A {
714        match self.bits {
715            false => P13_A::LOW,
716            true => P13_A::HIGH,
717        }
718    }
719    #[doc = "Low for pin 13."]
720    #[inline(always)]
721    pub fn is_low(&self) -> bool {
722        *self == P13_A::LOW
723    }
724    #[doc = "High for pin 13."]
725    #[inline(always)]
726    pub fn is_high(&self) -> bool {
727        *self == P13_A::HIGH
728    }
729}
730#[doc = "Field `p13` writer - Output level for pin 13."]
731pub type P13_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O, P13_A>;
732impl<'a, REG, const O: u8> P13_W<'a, REG, O>
733where
734    REG: crate::Writable + crate::RegisterSpec,
735{
736    #[doc = "Low for pin 13."]
737    #[inline(always)]
738    pub fn low(self) -> &'a mut crate::W<REG> {
739        self.variant(P13_A::LOW)
740    }
741    #[doc = "High for pin 13."]
742    #[inline(always)]
743    pub fn high(self) -> &'a mut crate::W<REG> {
744        self.variant(P13_A::HIGH)
745    }
746}
747impl R {
748    #[doc = "Bit 0 - Output level for pin 0."]
749    #[inline(always)]
750    pub fn p0(&self) -> P0_R {
751        P0_R::new((self.bits & 1) != 0)
752    }
753    #[doc = "Bit 1 - Output level for pin 1."]
754    #[inline(always)]
755    pub fn p1(&self) -> P1_R {
756        P1_R::new(((self.bits >> 1) & 1) != 0)
757    }
758    #[doc = "Bit 2 - Output level for pin 2."]
759    #[inline(always)]
760    pub fn p2(&self) -> P2_R {
761        P2_R::new(((self.bits >> 2) & 1) != 0)
762    }
763    #[doc = "Bit 3 - Output level for pin 3."]
764    #[inline(always)]
765    pub fn p3(&self) -> P3_R {
766        P3_R::new(((self.bits >> 3) & 1) != 0)
767    }
768    #[doc = "Bit 4 - Output level for pin 4."]
769    #[inline(always)]
770    pub fn p4(&self) -> P4_R {
771        P4_R::new(((self.bits >> 4) & 1) != 0)
772    }
773    #[doc = "Bit 5 - Output level for pin 5."]
774    #[inline(always)]
775    pub fn p5(&self) -> P5_R {
776        P5_R::new(((self.bits >> 5) & 1) != 0)
777    }
778    #[doc = "Bit 6 - Output level for pin 6."]
779    #[inline(always)]
780    pub fn p6(&self) -> P6_R {
781        P6_R::new(((self.bits >> 6) & 1) != 0)
782    }
783    #[doc = "Bit 7 - Output level for pin 7."]
784    #[inline(always)]
785    pub fn p7(&self) -> P7_R {
786        P7_R::new(((self.bits >> 7) & 1) != 0)
787    }
788    #[doc = "Bit 8 - Output level for pin 8."]
789    #[inline(always)]
790    pub fn p8(&self) -> P8_R {
791        P8_R::new(((self.bits >> 8) & 1) != 0)
792    }
793    #[doc = "Bit 9 - Output level for pin 9."]
794    #[inline(always)]
795    pub fn p9(&self) -> P9_R {
796        P9_R::new(((self.bits >> 9) & 1) != 0)
797    }
798    #[doc = "Bit 10 - Output level for pin 10."]
799    #[inline(always)]
800    pub fn p10(&self) -> P10_R {
801        P10_R::new(((self.bits >> 10) & 1) != 0)
802    }
803    #[doc = "Bit 11 - Output level for pin 11."]
804    #[inline(always)]
805    pub fn p11(&self) -> P11_R {
806        P11_R::new(((self.bits >> 11) & 1) != 0)
807    }
808    #[doc = "Bit 12 - Output level for pin 12."]
809    #[inline(always)]
810    pub fn p12(&self) -> P12_R {
811        P12_R::new(((self.bits >> 12) & 1) != 0)
812    }
813    #[doc = "Bit 13 - Output level for pin 13."]
814    #[inline(always)]
815    pub fn p13(&self) -> P13_R {
816        P13_R::new(((self.bits >> 13) & 1) != 0)
817    }
818}
819impl W {
820    #[doc = "Bit 0 - Output level for pin 0."]
821    #[inline(always)]
822    #[must_use]
823    pub fn p0(&mut self) -> P0_W<OUT_SPEC, 0> {
824        P0_W::new(self)
825    }
826    #[doc = "Bit 1 - Output level for pin 1."]
827    #[inline(always)]
828    #[must_use]
829    pub fn p1(&mut self) -> P1_W<OUT_SPEC, 1> {
830        P1_W::new(self)
831    }
832    #[doc = "Bit 2 - Output level for pin 2."]
833    #[inline(always)]
834    #[must_use]
835    pub fn p2(&mut self) -> P2_W<OUT_SPEC, 2> {
836        P2_W::new(self)
837    }
838    #[doc = "Bit 3 - Output level for pin 3."]
839    #[inline(always)]
840    #[must_use]
841    pub fn p3(&mut self) -> P3_W<OUT_SPEC, 3> {
842        P3_W::new(self)
843    }
844    #[doc = "Bit 4 - Output level for pin 4."]
845    #[inline(always)]
846    #[must_use]
847    pub fn p4(&mut self) -> P4_W<OUT_SPEC, 4> {
848        P4_W::new(self)
849    }
850    #[doc = "Bit 5 - Output level for pin 5."]
851    #[inline(always)]
852    #[must_use]
853    pub fn p5(&mut self) -> P5_W<OUT_SPEC, 5> {
854        P5_W::new(self)
855    }
856    #[doc = "Bit 6 - Output level for pin 6."]
857    #[inline(always)]
858    #[must_use]
859    pub fn p6(&mut self) -> P6_W<OUT_SPEC, 6> {
860        P6_W::new(self)
861    }
862    #[doc = "Bit 7 - Output level for pin 7."]
863    #[inline(always)]
864    #[must_use]
865    pub fn p7(&mut self) -> P7_W<OUT_SPEC, 7> {
866        P7_W::new(self)
867    }
868    #[doc = "Bit 8 - Output level for pin 8."]
869    #[inline(always)]
870    #[must_use]
871    pub fn p8(&mut self) -> P8_W<OUT_SPEC, 8> {
872        P8_W::new(self)
873    }
874    #[doc = "Bit 9 - Output level for pin 9."]
875    #[inline(always)]
876    #[must_use]
877    pub fn p9(&mut self) -> P9_W<OUT_SPEC, 9> {
878        P9_W::new(self)
879    }
880    #[doc = "Bit 10 - Output level for pin 10."]
881    #[inline(always)]
882    #[must_use]
883    pub fn p10(&mut self) -> P10_W<OUT_SPEC, 10> {
884        P10_W::new(self)
885    }
886    #[doc = "Bit 11 - Output level for pin 11."]
887    #[inline(always)]
888    #[must_use]
889    pub fn p11(&mut self) -> P11_W<OUT_SPEC, 11> {
890        P11_W::new(self)
891    }
892    #[doc = "Bit 12 - Output level for pin 12."]
893    #[inline(always)]
894    #[must_use]
895    pub fn p12(&mut self) -> P12_W<OUT_SPEC, 12> {
896        P12_W::new(self)
897    }
898    #[doc = "Bit 13 - Output level for pin 13."]
899    #[inline(always)]
900    #[must_use]
901    pub fn p13(&mut self) -> P13_W<OUT_SPEC, 13> {
902        P13_W::new(self)
903    }
904    #[doc = r" Writes raw bits to the register."]
905    #[doc = r""]
906    #[doc = r" # Safety"]
907    #[doc = r""]
908    #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
909    #[inline(always)]
910    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
911        self.bits = bits;
912        self
913    }
914}
915#[doc = "Output Level.\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`out::R`](R).  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`out::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
916pub struct OUT_SPEC;
917impl crate::RegisterSpec for OUT_SPEC {
918    type Ux = u32;
919}
920#[doc = "`read()` method returns [`out::R`](R) reader structure"]
921impl crate::Readable for OUT_SPEC {}
922#[doc = "`write(|w| ..)` method takes [`out::W`](W) writer structure"]
923impl crate::Writable for OUT_SPEC {
924    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
925    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
926}
927#[doc = "`reset()` method sets OUT to value 0"]
928impl crate::Resettable for OUT_SPEC {
929    const RESET_VALUE: Self::Ux = 0;
930}