efm32pg12_pac/gpio/
pb_modeh.rs

1#[doc = "Reader of register PB_MODEH"]
2pub type R = crate::R<u32, super::PB_MODEH>;
3#[doc = "Writer for register PB_MODEH"]
4pub type W = crate::W<u32, super::PB_MODEH>;
5#[doc = "Register PB_MODEH `reset()`'s with value 0"]
6impl crate::ResetValue for super::PB_MODEH {
7    type Type = u32;
8    #[inline(always)]
9    fn reset_value() -> Self::Type {
10        0
11    }
12}
13#[doc = "Pin 8 Mode\n\nValue on reset: 0"]
14#[derive(Clone, Copy, Debug, PartialEq)]
15#[repr(u8)]
16pub enum MODE8_A {
17    #[doc = "0: Input disabled. Pullup if DOUT is set."]
18    DISABLED = 0,
19    #[doc = "1: Input enabled. Filter if DOUT is set"]
20    INPUT = 1,
21    #[doc = "2: Input enabled. DOUT determines pull direction"]
22    INPUTPULL = 2,
23    #[doc = "3: Input enabled with filter. DOUT determines pull direction"]
24    INPUTPULLFILTER = 3,
25    #[doc = "4: Push-pull output"]
26    PUSHPULL = 4,
27    #[doc = "5: Push-pull using alternate control"]
28    PUSHPULLALT = 5,
29    #[doc = "6: Wired-or output"]
30    WIREDOR = 6,
31    #[doc = "7: Wired-or output with pull-down"]
32    WIREDORPULLDOWN = 7,
33    #[doc = "8: Open-drain output"]
34    WIREDAND = 8,
35    #[doc = "9: Open-drain output with filter"]
36    WIREDANDFILTER = 9,
37    #[doc = "10: Open-drain output with pullup"]
38    WIREDANDPULLUP = 10,
39    #[doc = "11: Open-drain output with filter and pullup"]
40    WIREDANDPULLUPFILTER = 11,
41    #[doc = "12: Open-drain output using alternate control"]
42    WIREDANDALT = 12,
43    #[doc = "13: Open-drain output using alternate control with filter"]
44    WIREDANDALTFILTER = 13,
45    #[doc = "14: Open-drain output using alternate control with pullup"]
46    WIREDANDALTPULLUP = 14,
47    #[doc = "15: Open-drain output using alternate control with filter and pullup"]
48    WIREDANDALTPULLUPFILTER = 15,
49}
50impl From<MODE8_A> for u8 {
51    #[inline(always)]
52    fn from(variant: MODE8_A) -> Self {
53        variant as _
54    }
55}
56#[doc = "Reader of field `MODE8`"]
57pub type MODE8_R = crate::R<u8, MODE8_A>;
58impl MODE8_R {
59    #[doc = r"Get enumerated values variant"]
60    #[inline(always)]
61    pub fn variant(&self) -> MODE8_A {
62        match self.bits {
63            0 => MODE8_A::DISABLED,
64            1 => MODE8_A::INPUT,
65            2 => MODE8_A::INPUTPULL,
66            3 => MODE8_A::INPUTPULLFILTER,
67            4 => MODE8_A::PUSHPULL,
68            5 => MODE8_A::PUSHPULLALT,
69            6 => MODE8_A::WIREDOR,
70            7 => MODE8_A::WIREDORPULLDOWN,
71            8 => MODE8_A::WIREDAND,
72            9 => MODE8_A::WIREDANDFILTER,
73            10 => MODE8_A::WIREDANDPULLUP,
74            11 => MODE8_A::WIREDANDPULLUPFILTER,
75            12 => MODE8_A::WIREDANDALT,
76            13 => MODE8_A::WIREDANDALTFILTER,
77            14 => MODE8_A::WIREDANDALTPULLUP,
78            15 => MODE8_A::WIREDANDALTPULLUPFILTER,
79            _ => unreachable!(),
80        }
81    }
82    #[doc = "Checks if the value of the field is `DISABLED`"]
83    #[inline(always)]
84    pub fn is_disabled(&self) -> bool {
85        *self == MODE8_A::DISABLED
86    }
87    #[doc = "Checks if the value of the field is `INPUT`"]
88    #[inline(always)]
89    pub fn is_input(&self) -> bool {
90        *self == MODE8_A::INPUT
91    }
92    #[doc = "Checks if the value of the field is `INPUTPULL`"]
93    #[inline(always)]
94    pub fn is_inputpull(&self) -> bool {
95        *self == MODE8_A::INPUTPULL
96    }
97    #[doc = "Checks if the value of the field is `INPUTPULLFILTER`"]
98    #[inline(always)]
99    pub fn is_inputpullfilter(&self) -> bool {
100        *self == MODE8_A::INPUTPULLFILTER
101    }
102    #[doc = "Checks if the value of the field is `PUSHPULL`"]
103    #[inline(always)]
104    pub fn is_pushpull(&self) -> bool {
105        *self == MODE8_A::PUSHPULL
106    }
107    #[doc = "Checks if the value of the field is `PUSHPULLALT`"]
108    #[inline(always)]
109    pub fn is_pushpullalt(&self) -> bool {
110        *self == MODE8_A::PUSHPULLALT
111    }
112    #[doc = "Checks if the value of the field is `WIREDOR`"]
113    #[inline(always)]
114    pub fn is_wiredor(&self) -> bool {
115        *self == MODE8_A::WIREDOR
116    }
117    #[doc = "Checks if the value of the field is `WIREDORPULLDOWN`"]
118    #[inline(always)]
119    pub fn is_wiredorpulldown(&self) -> bool {
120        *self == MODE8_A::WIREDORPULLDOWN
121    }
122    #[doc = "Checks if the value of the field is `WIREDAND`"]
123    #[inline(always)]
124    pub fn is_wiredand(&self) -> bool {
125        *self == MODE8_A::WIREDAND
126    }
127    #[doc = "Checks if the value of the field is `WIREDANDFILTER`"]
128    #[inline(always)]
129    pub fn is_wiredandfilter(&self) -> bool {
130        *self == MODE8_A::WIREDANDFILTER
131    }
132    #[doc = "Checks if the value of the field is `WIREDANDPULLUP`"]
133    #[inline(always)]
134    pub fn is_wiredandpullup(&self) -> bool {
135        *self == MODE8_A::WIREDANDPULLUP
136    }
137    #[doc = "Checks if the value of the field is `WIREDANDPULLUPFILTER`"]
138    #[inline(always)]
139    pub fn is_wiredandpullupfilter(&self) -> bool {
140        *self == MODE8_A::WIREDANDPULLUPFILTER
141    }
142    #[doc = "Checks if the value of the field is `WIREDANDALT`"]
143    #[inline(always)]
144    pub fn is_wiredandalt(&self) -> bool {
145        *self == MODE8_A::WIREDANDALT
146    }
147    #[doc = "Checks if the value of the field is `WIREDANDALTFILTER`"]
148    #[inline(always)]
149    pub fn is_wiredandaltfilter(&self) -> bool {
150        *self == MODE8_A::WIREDANDALTFILTER
151    }
152    #[doc = "Checks if the value of the field is `WIREDANDALTPULLUP`"]
153    #[inline(always)]
154    pub fn is_wiredandaltpullup(&self) -> bool {
155        *self == MODE8_A::WIREDANDALTPULLUP
156    }
157    #[doc = "Checks if the value of the field is `WIREDANDALTPULLUPFILTER`"]
158    #[inline(always)]
159    pub fn is_wiredandaltpullupfilter(&self) -> bool {
160        *self == MODE8_A::WIREDANDALTPULLUPFILTER
161    }
162}
163#[doc = "Write proxy for field `MODE8`"]
164pub struct MODE8_W<'a> {
165    w: &'a mut W,
166}
167impl<'a> MODE8_W<'a> {
168    #[doc = r"Writes `variant` to the field"]
169    #[inline(always)]
170    pub fn variant(self, variant: MODE8_A) -> &'a mut W {
171        {
172            self.bits(variant.into())
173        }
174    }
175    #[doc = "Input disabled. Pullup if DOUT is set."]
176    #[inline(always)]
177    pub fn disabled(self) -> &'a mut W {
178        self.variant(MODE8_A::DISABLED)
179    }
180    #[doc = "Input enabled. Filter if DOUT is set"]
181    #[inline(always)]
182    pub fn input(self) -> &'a mut W {
183        self.variant(MODE8_A::INPUT)
184    }
185    #[doc = "Input enabled. DOUT determines pull direction"]
186    #[inline(always)]
187    pub fn inputpull(self) -> &'a mut W {
188        self.variant(MODE8_A::INPUTPULL)
189    }
190    #[doc = "Input enabled with filter. DOUT determines pull direction"]
191    #[inline(always)]
192    pub fn inputpullfilter(self) -> &'a mut W {
193        self.variant(MODE8_A::INPUTPULLFILTER)
194    }
195    #[doc = "Push-pull output"]
196    #[inline(always)]
197    pub fn pushpull(self) -> &'a mut W {
198        self.variant(MODE8_A::PUSHPULL)
199    }
200    #[doc = "Push-pull using alternate control"]
201    #[inline(always)]
202    pub fn pushpullalt(self) -> &'a mut W {
203        self.variant(MODE8_A::PUSHPULLALT)
204    }
205    #[doc = "Wired-or output"]
206    #[inline(always)]
207    pub fn wiredor(self) -> &'a mut W {
208        self.variant(MODE8_A::WIREDOR)
209    }
210    #[doc = "Wired-or output with pull-down"]
211    #[inline(always)]
212    pub fn wiredorpulldown(self) -> &'a mut W {
213        self.variant(MODE8_A::WIREDORPULLDOWN)
214    }
215    #[doc = "Open-drain output"]
216    #[inline(always)]
217    pub fn wiredand(self) -> &'a mut W {
218        self.variant(MODE8_A::WIREDAND)
219    }
220    #[doc = "Open-drain output with filter"]
221    #[inline(always)]
222    pub fn wiredandfilter(self) -> &'a mut W {
223        self.variant(MODE8_A::WIREDANDFILTER)
224    }
225    #[doc = "Open-drain output with pullup"]
226    #[inline(always)]
227    pub fn wiredandpullup(self) -> &'a mut W {
228        self.variant(MODE8_A::WIREDANDPULLUP)
229    }
230    #[doc = "Open-drain output with filter and pullup"]
231    #[inline(always)]
232    pub fn wiredandpullupfilter(self) -> &'a mut W {
233        self.variant(MODE8_A::WIREDANDPULLUPFILTER)
234    }
235    #[doc = "Open-drain output using alternate control"]
236    #[inline(always)]
237    pub fn wiredandalt(self) -> &'a mut W {
238        self.variant(MODE8_A::WIREDANDALT)
239    }
240    #[doc = "Open-drain output using alternate control with filter"]
241    #[inline(always)]
242    pub fn wiredandaltfilter(self) -> &'a mut W {
243        self.variant(MODE8_A::WIREDANDALTFILTER)
244    }
245    #[doc = "Open-drain output using alternate control with pullup"]
246    #[inline(always)]
247    pub fn wiredandaltpullup(self) -> &'a mut W {
248        self.variant(MODE8_A::WIREDANDALTPULLUP)
249    }
250    #[doc = "Open-drain output using alternate control with filter and pullup"]
251    #[inline(always)]
252    pub fn wiredandaltpullupfilter(self) -> &'a mut W {
253        self.variant(MODE8_A::WIREDANDALTPULLUPFILTER)
254    }
255    #[doc = r"Writes raw bits to the field"]
256    #[inline(always)]
257    pub fn bits(self, value: u8) -> &'a mut W {
258        self.w.bits = (self.w.bits & !0x0f) | ((value as u32) & 0x0f);
259        self.w
260    }
261}
262#[doc = "Pin 9 Mode\n\nValue on reset: 0"]
263#[derive(Clone, Copy, Debug, PartialEq)]
264#[repr(u8)]
265pub enum MODE9_A {
266    #[doc = "0: Input disabled. Pullup if DOUT is set."]
267    DISABLED = 0,
268    #[doc = "1: Input enabled. Filter if DOUT is set"]
269    INPUT = 1,
270    #[doc = "2: Input enabled. DOUT determines pull direction"]
271    INPUTPULL = 2,
272    #[doc = "3: Input enabled with filter. DOUT determines pull direction"]
273    INPUTPULLFILTER = 3,
274    #[doc = "4: Push-pull output"]
275    PUSHPULL = 4,
276    #[doc = "5: Push-pull using alternate control"]
277    PUSHPULLALT = 5,
278    #[doc = "6: Wired-or output"]
279    WIREDOR = 6,
280    #[doc = "7: Wired-or output with pull-down"]
281    WIREDORPULLDOWN = 7,
282    #[doc = "8: Open-drain output"]
283    WIREDAND = 8,
284    #[doc = "9: Open-drain output with filter"]
285    WIREDANDFILTER = 9,
286    #[doc = "10: Open-drain output with pullup"]
287    WIREDANDPULLUP = 10,
288    #[doc = "11: Open-drain output with filter and pullup"]
289    WIREDANDPULLUPFILTER = 11,
290    #[doc = "12: Open-drain output using alternate control"]
291    WIREDANDALT = 12,
292    #[doc = "13: Open-drain output using alternate control with filter"]
293    WIREDANDALTFILTER = 13,
294    #[doc = "14: Open-drain output using alternate control with pullup"]
295    WIREDANDALTPULLUP = 14,
296    #[doc = "15: Open-drain output using alternate control with filter and pullup"]
297    WIREDANDALTPULLUPFILTER = 15,
298}
299impl From<MODE9_A> for u8 {
300    #[inline(always)]
301    fn from(variant: MODE9_A) -> Self {
302        variant as _
303    }
304}
305#[doc = "Reader of field `MODE9`"]
306pub type MODE9_R = crate::R<u8, MODE9_A>;
307impl MODE9_R {
308    #[doc = r"Get enumerated values variant"]
309    #[inline(always)]
310    pub fn variant(&self) -> MODE9_A {
311        match self.bits {
312            0 => MODE9_A::DISABLED,
313            1 => MODE9_A::INPUT,
314            2 => MODE9_A::INPUTPULL,
315            3 => MODE9_A::INPUTPULLFILTER,
316            4 => MODE9_A::PUSHPULL,
317            5 => MODE9_A::PUSHPULLALT,
318            6 => MODE9_A::WIREDOR,
319            7 => MODE9_A::WIREDORPULLDOWN,
320            8 => MODE9_A::WIREDAND,
321            9 => MODE9_A::WIREDANDFILTER,
322            10 => MODE9_A::WIREDANDPULLUP,
323            11 => MODE9_A::WIREDANDPULLUPFILTER,
324            12 => MODE9_A::WIREDANDALT,
325            13 => MODE9_A::WIREDANDALTFILTER,
326            14 => MODE9_A::WIREDANDALTPULLUP,
327            15 => MODE9_A::WIREDANDALTPULLUPFILTER,
328            _ => unreachable!(),
329        }
330    }
331    #[doc = "Checks if the value of the field is `DISABLED`"]
332    #[inline(always)]
333    pub fn is_disabled(&self) -> bool {
334        *self == MODE9_A::DISABLED
335    }
336    #[doc = "Checks if the value of the field is `INPUT`"]
337    #[inline(always)]
338    pub fn is_input(&self) -> bool {
339        *self == MODE9_A::INPUT
340    }
341    #[doc = "Checks if the value of the field is `INPUTPULL`"]
342    #[inline(always)]
343    pub fn is_inputpull(&self) -> bool {
344        *self == MODE9_A::INPUTPULL
345    }
346    #[doc = "Checks if the value of the field is `INPUTPULLFILTER`"]
347    #[inline(always)]
348    pub fn is_inputpullfilter(&self) -> bool {
349        *self == MODE9_A::INPUTPULLFILTER
350    }
351    #[doc = "Checks if the value of the field is `PUSHPULL`"]
352    #[inline(always)]
353    pub fn is_pushpull(&self) -> bool {
354        *self == MODE9_A::PUSHPULL
355    }
356    #[doc = "Checks if the value of the field is `PUSHPULLALT`"]
357    #[inline(always)]
358    pub fn is_pushpullalt(&self) -> bool {
359        *self == MODE9_A::PUSHPULLALT
360    }
361    #[doc = "Checks if the value of the field is `WIREDOR`"]
362    #[inline(always)]
363    pub fn is_wiredor(&self) -> bool {
364        *self == MODE9_A::WIREDOR
365    }
366    #[doc = "Checks if the value of the field is `WIREDORPULLDOWN`"]
367    #[inline(always)]
368    pub fn is_wiredorpulldown(&self) -> bool {
369        *self == MODE9_A::WIREDORPULLDOWN
370    }
371    #[doc = "Checks if the value of the field is `WIREDAND`"]
372    #[inline(always)]
373    pub fn is_wiredand(&self) -> bool {
374        *self == MODE9_A::WIREDAND
375    }
376    #[doc = "Checks if the value of the field is `WIREDANDFILTER`"]
377    #[inline(always)]
378    pub fn is_wiredandfilter(&self) -> bool {
379        *self == MODE9_A::WIREDANDFILTER
380    }
381    #[doc = "Checks if the value of the field is `WIREDANDPULLUP`"]
382    #[inline(always)]
383    pub fn is_wiredandpullup(&self) -> bool {
384        *self == MODE9_A::WIREDANDPULLUP
385    }
386    #[doc = "Checks if the value of the field is `WIREDANDPULLUPFILTER`"]
387    #[inline(always)]
388    pub fn is_wiredandpullupfilter(&self) -> bool {
389        *self == MODE9_A::WIREDANDPULLUPFILTER
390    }
391    #[doc = "Checks if the value of the field is `WIREDANDALT`"]
392    #[inline(always)]
393    pub fn is_wiredandalt(&self) -> bool {
394        *self == MODE9_A::WIREDANDALT
395    }
396    #[doc = "Checks if the value of the field is `WIREDANDALTFILTER`"]
397    #[inline(always)]
398    pub fn is_wiredandaltfilter(&self) -> bool {
399        *self == MODE9_A::WIREDANDALTFILTER
400    }
401    #[doc = "Checks if the value of the field is `WIREDANDALTPULLUP`"]
402    #[inline(always)]
403    pub fn is_wiredandaltpullup(&self) -> bool {
404        *self == MODE9_A::WIREDANDALTPULLUP
405    }
406    #[doc = "Checks if the value of the field is `WIREDANDALTPULLUPFILTER`"]
407    #[inline(always)]
408    pub fn is_wiredandaltpullupfilter(&self) -> bool {
409        *self == MODE9_A::WIREDANDALTPULLUPFILTER
410    }
411}
412#[doc = "Write proxy for field `MODE9`"]
413pub struct MODE9_W<'a> {
414    w: &'a mut W,
415}
416impl<'a> MODE9_W<'a> {
417    #[doc = r"Writes `variant` to the field"]
418    #[inline(always)]
419    pub fn variant(self, variant: MODE9_A) -> &'a mut W {
420        {
421            self.bits(variant.into())
422        }
423    }
424    #[doc = "Input disabled. Pullup if DOUT is set."]
425    #[inline(always)]
426    pub fn disabled(self) -> &'a mut W {
427        self.variant(MODE9_A::DISABLED)
428    }
429    #[doc = "Input enabled. Filter if DOUT is set"]
430    #[inline(always)]
431    pub fn input(self) -> &'a mut W {
432        self.variant(MODE9_A::INPUT)
433    }
434    #[doc = "Input enabled. DOUT determines pull direction"]
435    #[inline(always)]
436    pub fn inputpull(self) -> &'a mut W {
437        self.variant(MODE9_A::INPUTPULL)
438    }
439    #[doc = "Input enabled with filter. DOUT determines pull direction"]
440    #[inline(always)]
441    pub fn inputpullfilter(self) -> &'a mut W {
442        self.variant(MODE9_A::INPUTPULLFILTER)
443    }
444    #[doc = "Push-pull output"]
445    #[inline(always)]
446    pub fn pushpull(self) -> &'a mut W {
447        self.variant(MODE9_A::PUSHPULL)
448    }
449    #[doc = "Push-pull using alternate control"]
450    #[inline(always)]
451    pub fn pushpullalt(self) -> &'a mut W {
452        self.variant(MODE9_A::PUSHPULLALT)
453    }
454    #[doc = "Wired-or output"]
455    #[inline(always)]
456    pub fn wiredor(self) -> &'a mut W {
457        self.variant(MODE9_A::WIREDOR)
458    }
459    #[doc = "Wired-or output with pull-down"]
460    #[inline(always)]
461    pub fn wiredorpulldown(self) -> &'a mut W {
462        self.variant(MODE9_A::WIREDORPULLDOWN)
463    }
464    #[doc = "Open-drain output"]
465    #[inline(always)]
466    pub fn wiredand(self) -> &'a mut W {
467        self.variant(MODE9_A::WIREDAND)
468    }
469    #[doc = "Open-drain output with filter"]
470    #[inline(always)]
471    pub fn wiredandfilter(self) -> &'a mut W {
472        self.variant(MODE9_A::WIREDANDFILTER)
473    }
474    #[doc = "Open-drain output with pullup"]
475    #[inline(always)]
476    pub fn wiredandpullup(self) -> &'a mut W {
477        self.variant(MODE9_A::WIREDANDPULLUP)
478    }
479    #[doc = "Open-drain output with filter and pullup"]
480    #[inline(always)]
481    pub fn wiredandpullupfilter(self) -> &'a mut W {
482        self.variant(MODE9_A::WIREDANDPULLUPFILTER)
483    }
484    #[doc = "Open-drain output using alternate control"]
485    #[inline(always)]
486    pub fn wiredandalt(self) -> &'a mut W {
487        self.variant(MODE9_A::WIREDANDALT)
488    }
489    #[doc = "Open-drain output using alternate control with filter"]
490    #[inline(always)]
491    pub fn wiredandaltfilter(self) -> &'a mut W {
492        self.variant(MODE9_A::WIREDANDALTFILTER)
493    }
494    #[doc = "Open-drain output using alternate control with pullup"]
495    #[inline(always)]
496    pub fn wiredandaltpullup(self) -> &'a mut W {
497        self.variant(MODE9_A::WIREDANDALTPULLUP)
498    }
499    #[doc = "Open-drain output using alternate control with filter and pullup"]
500    #[inline(always)]
501    pub fn wiredandaltpullupfilter(self) -> &'a mut W {
502        self.variant(MODE9_A::WIREDANDALTPULLUPFILTER)
503    }
504    #[doc = r"Writes raw bits to the field"]
505    #[inline(always)]
506    pub fn bits(self, value: u8) -> &'a mut W {
507        self.w.bits = (self.w.bits & !(0x0f << 4)) | (((value as u32) & 0x0f) << 4);
508        self.w
509    }
510}
511#[doc = "Pin 10 Mode\n\nValue on reset: 0"]
512#[derive(Clone, Copy, Debug, PartialEq)]
513#[repr(u8)]
514pub enum MODE10_A {
515    #[doc = "0: Input disabled. Pullup if DOUT is set."]
516    DISABLED = 0,
517    #[doc = "1: Input enabled. Filter if DOUT is set"]
518    INPUT = 1,
519    #[doc = "2: Input enabled. DOUT determines pull direction"]
520    INPUTPULL = 2,
521    #[doc = "3: Input enabled with filter. DOUT determines pull direction"]
522    INPUTPULLFILTER = 3,
523    #[doc = "4: Push-pull output"]
524    PUSHPULL = 4,
525    #[doc = "5: Push-pull using alternate control"]
526    PUSHPULLALT = 5,
527    #[doc = "6: Wired-or output"]
528    WIREDOR = 6,
529    #[doc = "7: Wired-or output with pull-down"]
530    WIREDORPULLDOWN = 7,
531    #[doc = "8: Open-drain output"]
532    WIREDAND = 8,
533    #[doc = "9: Open-drain output with filter"]
534    WIREDANDFILTER = 9,
535    #[doc = "10: Open-drain output with pullup"]
536    WIREDANDPULLUP = 10,
537    #[doc = "11: Open-drain output with filter and pullup"]
538    WIREDANDPULLUPFILTER = 11,
539    #[doc = "12: Open-drain output using alternate control"]
540    WIREDANDALT = 12,
541    #[doc = "13: Open-drain output using alternate control with filter"]
542    WIREDANDALTFILTER = 13,
543    #[doc = "14: Open-drain output using alternate control with pullup"]
544    WIREDANDALTPULLUP = 14,
545    #[doc = "15: Open-drain output using alternate control with filter and pullup"]
546    WIREDANDALTPULLUPFILTER = 15,
547}
548impl From<MODE10_A> for u8 {
549    #[inline(always)]
550    fn from(variant: MODE10_A) -> Self {
551        variant as _
552    }
553}
554#[doc = "Reader of field `MODE10`"]
555pub type MODE10_R = crate::R<u8, MODE10_A>;
556impl MODE10_R {
557    #[doc = r"Get enumerated values variant"]
558    #[inline(always)]
559    pub fn variant(&self) -> MODE10_A {
560        match self.bits {
561            0 => MODE10_A::DISABLED,
562            1 => MODE10_A::INPUT,
563            2 => MODE10_A::INPUTPULL,
564            3 => MODE10_A::INPUTPULLFILTER,
565            4 => MODE10_A::PUSHPULL,
566            5 => MODE10_A::PUSHPULLALT,
567            6 => MODE10_A::WIREDOR,
568            7 => MODE10_A::WIREDORPULLDOWN,
569            8 => MODE10_A::WIREDAND,
570            9 => MODE10_A::WIREDANDFILTER,
571            10 => MODE10_A::WIREDANDPULLUP,
572            11 => MODE10_A::WIREDANDPULLUPFILTER,
573            12 => MODE10_A::WIREDANDALT,
574            13 => MODE10_A::WIREDANDALTFILTER,
575            14 => MODE10_A::WIREDANDALTPULLUP,
576            15 => MODE10_A::WIREDANDALTPULLUPFILTER,
577            _ => unreachable!(),
578        }
579    }
580    #[doc = "Checks if the value of the field is `DISABLED`"]
581    #[inline(always)]
582    pub fn is_disabled(&self) -> bool {
583        *self == MODE10_A::DISABLED
584    }
585    #[doc = "Checks if the value of the field is `INPUT`"]
586    #[inline(always)]
587    pub fn is_input(&self) -> bool {
588        *self == MODE10_A::INPUT
589    }
590    #[doc = "Checks if the value of the field is `INPUTPULL`"]
591    #[inline(always)]
592    pub fn is_inputpull(&self) -> bool {
593        *self == MODE10_A::INPUTPULL
594    }
595    #[doc = "Checks if the value of the field is `INPUTPULLFILTER`"]
596    #[inline(always)]
597    pub fn is_inputpullfilter(&self) -> bool {
598        *self == MODE10_A::INPUTPULLFILTER
599    }
600    #[doc = "Checks if the value of the field is `PUSHPULL`"]
601    #[inline(always)]
602    pub fn is_pushpull(&self) -> bool {
603        *self == MODE10_A::PUSHPULL
604    }
605    #[doc = "Checks if the value of the field is `PUSHPULLALT`"]
606    #[inline(always)]
607    pub fn is_pushpullalt(&self) -> bool {
608        *self == MODE10_A::PUSHPULLALT
609    }
610    #[doc = "Checks if the value of the field is `WIREDOR`"]
611    #[inline(always)]
612    pub fn is_wiredor(&self) -> bool {
613        *self == MODE10_A::WIREDOR
614    }
615    #[doc = "Checks if the value of the field is `WIREDORPULLDOWN`"]
616    #[inline(always)]
617    pub fn is_wiredorpulldown(&self) -> bool {
618        *self == MODE10_A::WIREDORPULLDOWN
619    }
620    #[doc = "Checks if the value of the field is `WIREDAND`"]
621    #[inline(always)]
622    pub fn is_wiredand(&self) -> bool {
623        *self == MODE10_A::WIREDAND
624    }
625    #[doc = "Checks if the value of the field is `WIREDANDFILTER`"]
626    #[inline(always)]
627    pub fn is_wiredandfilter(&self) -> bool {
628        *self == MODE10_A::WIREDANDFILTER
629    }
630    #[doc = "Checks if the value of the field is `WIREDANDPULLUP`"]
631    #[inline(always)]
632    pub fn is_wiredandpullup(&self) -> bool {
633        *self == MODE10_A::WIREDANDPULLUP
634    }
635    #[doc = "Checks if the value of the field is `WIREDANDPULLUPFILTER`"]
636    #[inline(always)]
637    pub fn is_wiredandpullupfilter(&self) -> bool {
638        *self == MODE10_A::WIREDANDPULLUPFILTER
639    }
640    #[doc = "Checks if the value of the field is `WIREDANDALT`"]
641    #[inline(always)]
642    pub fn is_wiredandalt(&self) -> bool {
643        *self == MODE10_A::WIREDANDALT
644    }
645    #[doc = "Checks if the value of the field is `WIREDANDALTFILTER`"]
646    #[inline(always)]
647    pub fn is_wiredandaltfilter(&self) -> bool {
648        *self == MODE10_A::WIREDANDALTFILTER
649    }
650    #[doc = "Checks if the value of the field is `WIREDANDALTPULLUP`"]
651    #[inline(always)]
652    pub fn is_wiredandaltpullup(&self) -> bool {
653        *self == MODE10_A::WIREDANDALTPULLUP
654    }
655    #[doc = "Checks if the value of the field is `WIREDANDALTPULLUPFILTER`"]
656    #[inline(always)]
657    pub fn is_wiredandaltpullupfilter(&self) -> bool {
658        *self == MODE10_A::WIREDANDALTPULLUPFILTER
659    }
660}
661#[doc = "Write proxy for field `MODE10`"]
662pub struct MODE10_W<'a> {
663    w: &'a mut W,
664}
665impl<'a> MODE10_W<'a> {
666    #[doc = r"Writes `variant` to the field"]
667    #[inline(always)]
668    pub fn variant(self, variant: MODE10_A) -> &'a mut W {
669        {
670            self.bits(variant.into())
671        }
672    }
673    #[doc = "Input disabled. Pullup if DOUT is set."]
674    #[inline(always)]
675    pub fn disabled(self) -> &'a mut W {
676        self.variant(MODE10_A::DISABLED)
677    }
678    #[doc = "Input enabled. Filter if DOUT is set"]
679    #[inline(always)]
680    pub fn input(self) -> &'a mut W {
681        self.variant(MODE10_A::INPUT)
682    }
683    #[doc = "Input enabled. DOUT determines pull direction"]
684    #[inline(always)]
685    pub fn inputpull(self) -> &'a mut W {
686        self.variant(MODE10_A::INPUTPULL)
687    }
688    #[doc = "Input enabled with filter. DOUT determines pull direction"]
689    #[inline(always)]
690    pub fn inputpullfilter(self) -> &'a mut W {
691        self.variant(MODE10_A::INPUTPULLFILTER)
692    }
693    #[doc = "Push-pull output"]
694    #[inline(always)]
695    pub fn pushpull(self) -> &'a mut W {
696        self.variant(MODE10_A::PUSHPULL)
697    }
698    #[doc = "Push-pull using alternate control"]
699    #[inline(always)]
700    pub fn pushpullalt(self) -> &'a mut W {
701        self.variant(MODE10_A::PUSHPULLALT)
702    }
703    #[doc = "Wired-or output"]
704    #[inline(always)]
705    pub fn wiredor(self) -> &'a mut W {
706        self.variant(MODE10_A::WIREDOR)
707    }
708    #[doc = "Wired-or output with pull-down"]
709    #[inline(always)]
710    pub fn wiredorpulldown(self) -> &'a mut W {
711        self.variant(MODE10_A::WIREDORPULLDOWN)
712    }
713    #[doc = "Open-drain output"]
714    #[inline(always)]
715    pub fn wiredand(self) -> &'a mut W {
716        self.variant(MODE10_A::WIREDAND)
717    }
718    #[doc = "Open-drain output with filter"]
719    #[inline(always)]
720    pub fn wiredandfilter(self) -> &'a mut W {
721        self.variant(MODE10_A::WIREDANDFILTER)
722    }
723    #[doc = "Open-drain output with pullup"]
724    #[inline(always)]
725    pub fn wiredandpullup(self) -> &'a mut W {
726        self.variant(MODE10_A::WIREDANDPULLUP)
727    }
728    #[doc = "Open-drain output with filter and pullup"]
729    #[inline(always)]
730    pub fn wiredandpullupfilter(self) -> &'a mut W {
731        self.variant(MODE10_A::WIREDANDPULLUPFILTER)
732    }
733    #[doc = "Open-drain output using alternate control"]
734    #[inline(always)]
735    pub fn wiredandalt(self) -> &'a mut W {
736        self.variant(MODE10_A::WIREDANDALT)
737    }
738    #[doc = "Open-drain output using alternate control with filter"]
739    #[inline(always)]
740    pub fn wiredandaltfilter(self) -> &'a mut W {
741        self.variant(MODE10_A::WIREDANDALTFILTER)
742    }
743    #[doc = "Open-drain output using alternate control with pullup"]
744    #[inline(always)]
745    pub fn wiredandaltpullup(self) -> &'a mut W {
746        self.variant(MODE10_A::WIREDANDALTPULLUP)
747    }
748    #[doc = "Open-drain output using alternate control with filter and pullup"]
749    #[inline(always)]
750    pub fn wiredandaltpullupfilter(self) -> &'a mut W {
751        self.variant(MODE10_A::WIREDANDALTPULLUPFILTER)
752    }
753    #[doc = r"Writes raw bits to the field"]
754    #[inline(always)]
755    pub fn bits(self, value: u8) -> &'a mut W {
756        self.w.bits = (self.w.bits & !(0x0f << 8)) | (((value as u32) & 0x0f) << 8);
757        self.w
758    }
759}
760#[doc = "Pin 11 Mode\n\nValue on reset: 0"]
761#[derive(Clone, Copy, Debug, PartialEq)]
762#[repr(u8)]
763pub enum MODE11_A {
764    #[doc = "0: Input disabled. Pullup if DOUT is set."]
765    DISABLED = 0,
766    #[doc = "1: Input enabled. Filter if DOUT is set"]
767    INPUT = 1,
768    #[doc = "2: Input enabled. DOUT determines pull direction"]
769    INPUTPULL = 2,
770    #[doc = "3: Input enabled with filter. DOUT determines pull direction"]
771    INPUTPULLFILTER = 3,
772    #[doc = "4: Push-pull output"]
773    PUSHPULL = 4,
774    #[doc = "5: Push-pull using alternate control"]
775    PUSHPULLALT = 5,
776    #[doc = "6: Wired-or output"]
777    WIREDOR = 6,
778    #[doc = "7: Wired-or output with pull-down"]
779    WIREDORPULLDOWN = 7,
780    #[doc = "8: Open-drain output"]
781    WIREDAND = 8,
782    #[doc = "9: Open-drain output with filter"]
783    WIREDANDFILTER = 9,
784    #[doc = "10: Open-drain output with pullup"]
785    WIREDANDPULLUP = 10,
786    #[doc = "11: Open-drain output with filter and pullup"]
787    WIREDANDPULLUPFILTER = 11,
788    #[doc = "12: Open-drain output using alternate control"]
789    WIREDANDALT = 12,
790    #[doc = "13: Open-drain output using alternate control with filter"]
791    WIREDANDALTFILTER = 13,
792    #[doc = "14: Open-drain output using alternate control with pullup"]
793    WIREDANDALTPULLUP = 14,
794    #[doc = "15: Open-drain output using alternate control with filter and pullup"]
795    WIREDANDALTPULLUPFILTER = 15,
796}
797impl From<MODE11_A> for u8 {
798    #[inline(always)]
799    fn from(variant: MODE11_A) -> Self {
800        variant as _
801    }
802}
803#[doc = "Reader of field `MODE11`"]
804pub type MODE11_R = crate::R<u8, MODE11_A>;
805impl MODE11_R {
806    #[doc = r"Get enumerated values variant"]
807    #[inline(always)]
808    pub fn variant(&self) -> MODE11_A {
809        match self.bits {
810            0 => MODE11_A::DISABLED,
811            1 => MODE11_A::INPUT,
812            2 => MODE11_A::INPUTPULL,
813            3 => MODE11_A::INPUTPULLFILTER,
814            4 => MODE11_A::PUSHPULL,
815            5 => MODE11_A::PUSHPULLALT,
816            6 => MODE11_A::WIREDOR,
817            7 => MODE11_A::WIREDORPULLDOWN,
818            8 => MODE11_A::WIREDAND,
819            9 => MODE11_A::WIREDANDFILTER,
820            10 => MODE11_A::WIREDANDPULLUP,
821            11 => MODE11_A::WIREDANDPULLUPFILTER,
822            12 => MODE11_A::WIREDANDALT,
823            13 => MODE11_A::WIREDANDALTFILTER,
824            14 => MODE11_A::WIREDANDALTPULLUP,
825            15 => MODE11_A::WIREDANDALTPULLUPFILTER,
826            _ => unreachable!(),
827        }
828    }
829    #[doc = "Checks if the value of the field is `DISABLED`"]
830    #[inline(always)]
831    pub fn is_disabled(&self) -> bool {
832        *self == MODE11_A::DISABLED
833    }
834    #[doc = "Checks if the value of the field is `INPUT`"]
835    #[inline(always)]
836    pub fn is_input(&self) -> bool {
837        *self == MODE11_A::INPUT
838    }
839    #[doc = "Checks if the value of the field is `INPUTPULL`"]
840    #[inline(always)]
841    pub fn is_inputpull(&self) -> bool {
842        *self == MODE11_A::INPUTPULL
843    }
844    #[doc = "Checks if the value of the field is `INPUTPULLFILTER`"]
845    #[inline(always)]
846    pub fn is_inputpullfilter(&self) -> bool {
847        *self == MODE11_A::INPUTPULLFILTER
848    }
849    #[doc = "Checks if the value of the field is `PUSHPULL`"]
850    #[inline(always)]
851    pub fn is_pushpull(&self) -> bool {
852        *self == MODE11_A::PUSHPULL
853    }
854    #[doc = "Checks if the value of the field is `PUSHPULLALT`"]
855    #[inline(always)]
856    pub fn is_pushpullalt(&self) -> bool {
857        *self == MODE11_A::PUSHPULLALT
858    }
859    #[doc = "Checks if the value of the field is `WIREDOR`"]
860    #[inline(always)]
861    pub fn is_wiredor(&self) -> bool {
862        *self == MODE11_A::WIREDOR
863    }
864    #[doc = "Checks if the value of the field is `WIREDORPULLDOWN`"]
865    #[inline(always)]
866    pub fn is_wiredorpulldown(&self) -> bool {
867        *self == MODE11_A::WIREDORPULLDOWN
868    }
869    #[doc = "Checks if the value of the field is `WIREDAND`"]
870    #[inline(always)]
871    pub fn is_wiredand(&self) -> bool {
872        *self == MODE11_A::WIREDAND
873    }
874    #[doc = "Checks if the value of the field is `WIREDANDFILTER`"]
875    #[inline(always)]
876    pub fn is_wiredandfilter(&self) -> bool {
877        *self == MODE11_A::WIREDANDFILTER
878    }
879    #[doc = "Checks if the value of the field is `WIREDANDPULLUP`"]
880    #[inline(always)]
881    pub fn is_wiredandpullup(&self) -> bool {
882        *self == MODE11_A::WIREDANDPULLUP
883    }
884    #[doc = "Checks if the value of the field is `WIREDANDPULLUPFILTER`"]
885    #[inline(always)]
886    pub fn is_wiredandpullupfilter(&self) -> bool {
887        *self == MODE11_A::WIREDANDPULLUPFILTER
888    }
889    #[doc = "Checks if the value of the field is `WIREDANDALT`"]
890    #[inline(always)]
891    pub fn is_wiredandalt(&self) -> bool {
892        *self == MODE11_A::WIREDANDALT
893    }
894    #[doc = "Checks if the value of the field is `WIREDANDALTFILTER`"]
895    #[inline(always)]
896    pub fn is_wiredandaltfilter(&self) -> bool {
897        *self == MODE11_A::WIREDANDALTFILTER
898    }
899    #[doc = "Checks if the value of the field is `WIREDANDALTPULLUP`"]
900    #[inline(always)]
901    pub fn is_wiredandaltpullup(&self) -> bool {
902        *self == MODE11_A::WIREDANDALTPULLUP
903    }
904    #[doc = "Checks if the value of the field is `WIREDANDALTPULLUPFILTER`"]
905    #[inline(always)]
906    pub fn is_wiredandaltpullupfilter(&self) -> bool {
907        *self == MODE11_A::WIREDANDALTPULLUPFILTER
908    }
909}
910#[doc = "Write proxy for field `MODE11`"]
911pub struct MODE11_W<'a> {
912    w: &'a mut W,
913}
914impl<'a> MODE11_W<'a> {
915    #[doc = r"Writes `variant` to the field"]
916    #[inline(always)]
917    pub fn variant(self, variant: MODE11_A) -> &'a mut W {
918        {
919            self.bits(variant.into())
920        }
921    }
922    #[doc = "Input disabled. Pullup if DOUT is set."]
923    #[inline(always)]
924    pub fn disabled(self) -> &'a mut W {
925        self.variant(MODE11_A::DISABLED)
926    }
927    #[doc = "Input enabled. Filter if DOUT is set"]
928    #[inline(always)]
929    pub fn input(self) -> &'a mut W {
930        self.variant(MODE11_A::INPUT)
931    }
932    #[doc = "Input enabled. DOUT determines pull direction"]
933    #[inline(always)]
934    pub fn inputpull(self) -> &'a mut W {
935        self.variant(MODE11_A::INPUTPULL)
936    }
937    #[doc = "Input enabled with filter. DOUT determines pull direction"]
938    #[inline(always)]
939    pub fn inputpullfilter(self) -> &'a mut W {
940        self.variant(MODE11_A::INPUTPULLFILTER)
941    }
942    #[doc = "Push-pull output"]
943    #[inline(always)]
944    pub fn pushpull(self) -> &'a mut W {
945        self.variant(MODE11_A::PUSHPULL)
946    }
947    #[doc = "Push-pull using alternate control"]
948    #[inline(always)]
949    pub fn pushpullalt(self) -> &'a mut W {
950        self.variant(MODE11_A::PUSHPULLALT)
951    }
952    #[doc = "Wired-or output"]
953    #[inline(always)]
954    pub fn wiredor(self) -> &'a mut W {
955        self.variant(MODE11_A::WIREDOR)
956    }
957    #[doc = "Wired-or output with pull-down"]
958    #[inline(always)]
959    pub fn wiredorpulldown(self) -> &'a mut W {
960        self.variant(MODE11_A::WIREDORPULLDOWN)
961    }
962    #[doc = "Open-drain output"]
963    #[inline(always)]
964    pub fn wiredand(self) -> &'a mut W {
965        self.variant(MODE11_A::WIREDAND)
966    }
967    #[doc = "Open-drain output with filter"]
968    #[inline(always)]
969    pub fn wiredandfilter(self) -> &'a mut W {
970        self.variant(MODE11_A::WIREDANDFILTER)
971    }
972    #[doc = "Open-drain output with pullup"]
973    #[inline(always)]
974    pub fn wiredandpullup(self) -> &'a mut W {
975        self.variant(MODE11_A::WIREDANDPULLUP)
976    }
977    #[doc = "Open-drain output with filter and pullup"]
978    #[inline(always)]
979    pub fn wiredandpullupfilter(self) -> &'a mut W {
980        self.variant(MODE11_A::WIREDANDPULLUPFILTER)
981    }
982    #[doc = "Open-drain output using alternate control"]
983    #[inline(always)]
984    pub fn wiredandalt(self) -> &'a mut W {
985        self.variant(MODE11_A::WIREDANDALT)
986    }
987    #[doc = "Open-drain output using alternate control with filter"]
988    #[inline(always)]
989    pub fn wiredandaltfilter(self) -> &'a mut W {
990        self.variant(MODE11_A::WIREDANDALTFILTER)
991    }
992    #[doc = "Open-drain output using alternate control with pullup"]
993    #[inline(always)]
994    pub fn wiredandaltpullup(self) -> &'a mut W {
995        self.variant(MODE11_A::WIREDANDALTPULLUP)
996    }
997    #[doc = "Open-drain output using alternate control with filter and pullup"]
998    #[inline(always)]
999    pub fn wiredandaltpullupfilter(self) -> &'a mut W {
1000        self.variant(MODE11_A::WIREDANDALTPULLUPFILTER)
1001    }
1002    #[doc = r"Writes raw bits to the field"]
1003    #[inline(always)]
1004    pub fn bits(self, value: u8) -> &'a mut W {
1005        self.w.bits = (self.w.bits & !(0x0f << 12)) | (((value as u32) & 0x0f) << 12);
1006        self.w
1007    }
1008}
1009#[doc = "Pin 12 Mode\n\nValue on reset: 0"]
1010#[derive(Clone, Copy, Debug, PartialEq)]
1011#[repr(u8)]
1012pub enum MODE12_A {
1013    #[doc = "0: Input disabled. Pullup if DOUT is set."]
1014    DISABLED = 0,
1015    #[doc = "1: Input enabled. Filter if DOUT is set"]
1016    INPUT = 1,
1017    #[doc = "2: Input enabled. DOUT determines pull direction"]
1018    INPUTPULL = 2,
1019    #[doc = "3: Input enabled with filter. DOUT determines pull direction"]
1020    INPUTPULLFILTER = 3,
1021    #[doc = "4: Push-pull output"]
1022    PUSHPULL = 4,
1023    #[doc = "5: Push-pull using alternate control"]
1024    PUSHPULLALT = 5,
1025    #[doc = "6: Wired-or output"]
1026    WIREDOR = 6,
1027    #[doc = "7: Wired-or output with pull-down"]
1028    WIREDORPULLDOWN = 7,
1029    #[doc = "8: Open-drain output"]
1030    WIREDAND = 8,
1031    #[doc = "9: Open-drain output with filter"]
1032    WIREDANDFILTER = 9,
1033    #[doc = "10: Open-drain output with pullup"]
1034    WIREDANDPULLUP = 10,
1035    #[doc = "11: Open-drain output with filter and pullup"]
1036    WIREDANDPULLUPFILTER = 11,
1037    #[doc = "12: Open-drain output using alternate control"]
1038    WIREDANDALT = 12,
1039    #[doc = "13: Open-drain output using alternate control with filter"]
1040    WIREDANDALTFILTER = 13,
1041    #[doc = "14: Open-drain output using alternate control with pullup"]
1042    WIREDANDALTPULLUP = 14,
1043    #[doc = "15: Open-drain output using alternate control with filter and pullup"]
1044    WIREDANDALTPULLUPFILTER = 15,
1045}
1046impl From<MODE12_A> for u8 {
1047    #[inline(always)]
1048    fn from(variant: MODE12_A) -> Self {
1049        variant as _
1050    }
1051}
1052#[doc = "Reader of field `MODE12`"]
1053pub type MODE12_R = crate::R<u8, MODE12_A>;
1054impl MODE12_R {
1055    #[doc = r"Get enumerated values variant"]
1056    #[inline(always)]
1057    pub fn variant(&self) -> MODE12_A {
1058        match self.bits {
1059            0 => MODE12_A::DISABLED,
1060            1 => MODE12_A::INPUT,
1061            2 => MODE12_A::INPUTPULL,
1062            3 => MODE12_A::INPUTPULLFILTER,
1063            4 => MODE12_A::PUSHPULL,
1064            5 => MODE12_A::PUSHPULLALT,
1065            6 => MODE12_A::WIREDOR,
1066            7 => MODE12_A::WIREDORPULLDOWN,
1067            8 => MODE12_A::WIREDAND,
1068            9 => MODE12_A::WIREDANDFILTER,
1069            10 => MODE12_A::WIREDANDPULLUP,
1070            11 => MODE12_A::WIREDANDPULLUPFILTER,
1071            12 => MODE12_A::WIREDANDALT,
1072            13 => MODE12_A::WIREDANDALTFILTER,
1073            14 => MODE12_A::WIREDANDALTPULLUP,
1074            15 => MODE12_A::WIREDANDALTPULLUPFILTER,
1075            _ => unreachable!(),
1076        }
1077    }
1078    #[doc = "Checks if the value of the field is `DISABLED`"]
1079    #[inline(always)]
1080    pub fn is_disabled(&self) -> bool {
1081        *self == MODE12_A::DISABLED
1082    }
1083    #[doc = "Checks if the value of the field is `INPUT`"]
1084    #[inline(always)]
1085    pub fn is_input(&self) -> bool {
1086        *self == MODE12_A::INPUT
1087    }
1088    #[doc = "Checks if the value of the field is `INPUTPULL`"]
1089    #[inline(always)]
1090    pub fn is_inputpull(&self) -> bool {
1091        *self == MODE12_A::INPUTPULL
1092    }
1093    #[doc = "Checks if the value of the field is `INPUTPULLFILTER`"]
1094    #[inline(always)]
1095    pub fn is_inputpullfilter(&self) -> bool {
1096        *self == MODE12_A::INPUTPULLFILTER
1097    }
1098    #[doc = "Checks if the value of the field is `PUSHPULL`"]
1099    #[inline(always)]
1100    pub fn is_pushpull(&self) -> bool {
1101        *self == MODE12_A::PUSHPULL
1102    }
1103    #[doc = "Checks if the value of the field is `PUSHPULLALT`"]
1104    #[inline(always)]
1105    pub fn is_pushpullalt(&self) -> bool {
1106        *self == MODE12_A::PUSHPULLALT
1107    }
1108    #[doc = "Checks if the value of the field is `WIREDOR`"]
1109    #[inline(always)]
1110    pub fn is_wiredor(&self) -> bool {
1111        *self == MODE12_A::WIREDOR
1112    }
1113    #[doc = "Checks if the value of the field is `WIREDORPULLDOWN`"]
1114    #[inline(always)]
1115    pub fn is_wiredorpulldown(&self) -> bool {
1116        *self == MODE12_A::WIREDORPULLDOWN
1117    }
1118    #[doc = "Checks if the value of the field is `WIREDAND`"]
1119    #[inline(always)]
1120    pub fn is_wiredand(&self) -> bool {
1121        *self == MODE12_A::WIREDAND
1122    }
1123    #[doc = "Checks if the value of the field is `WIREDANDFILTER`"]
1124    #[inline(always)]
1125    pub fn is_wiredandfilter(&self) -> bool {
1126        *self == MODE12_A::WIREDANDFILTER
1127    }
1128    #[doc = "Checks if the value of the field is `WIREDANDPULLUP`"]
1129    #[inline(always)]
1130    pub fn is_wiredandpullup(&self) -> bool {
1131        *self == MODE12_A::WIREDANDPULLUP
1132    }
1133    #[doc = "Checks if the value of the field is `WIREDANDPULLUPFILTER`"]
1134    #[inline(always)]
1135    pub fn is_wiredandpullupfilter(&self) -> bool {
1136        *self == MODE12_A::WIREDANDPULLUPFILTER
1137    }
1138    #[doc = "Checks if the value of the field is `WIREDANDALT`"]
1139    #[inline(always)]
1140    pub fn is_wiredandalt(&self) -> bool {
1141        *self == MODE12_A::WIREDANDALT
1142    }
1143    #[doc = "Checks if the value of the field is `WIREDANDALTFILTER`"]
1144    #[inline(always)]
1145    pub fn is_wiredandaltfilter(&self) -> bool {
1146        *self == MODE12_A::WIREDANDALTFILTER
1147    }
1148    #[doc = "Checks if the value of the field is `WIREDANDALTPULLUP`"]
1149    #[inline(always)]
1150    pub fn is_wiredandaltpullup(&self) -> bool {
1151        *self == MODE12_A::WIREDANDALTPULLUP
1152    }
1153    #[doc = "Checks if the value of the field is `WIREDANDALTPULLUPFILTER`"]
1154    #[inline(always)]
1155    pub fn is_wiredandaltpullupfilter(&self) -> bool {
1156        *self == MODE12_A::WIREDANDALTPULLUPFILTER
1157    }
1158}
1159#[doc = "Write proxy for field `MODE12`"]
1160pub struct MODE12_W<'a> {
1161    w: &'a mut W,
1162}
1163impl<'a> MODE12_W<'a> {
1164    #[doc = r"Writes `variant` to the field"]
1165    #[inline(always)]
1166    pub fn variant(self, variant: MODE12_A) -> &'a mut W {
1167        {
1168            self.bits(variant.into())
1169        }
1170    }
1171    #[doc = "Input disabled. Pullup if DOUT is set."]
1172    #[inline(always)]
1173    pub fn disabled(self) -> &'a mut W {
1174        self.variant(MODE12_A::DISABLED)
1175    }
1176    #[doc = "Input enabled. Filter if DOUT is set"]
1177    #[inline(always)]
1178    pub fn input(self) -> &'a mut W {
1179        self.variant(MODE12_A::INPUT)
1180    }
1181    #[doc = "Input enabled. DOUT determines pull direction"]
1182    #[inline(always)]
1183    pub fn inputpull(self) -> &'a mut W {
1184        self.variant(MODE12_A::INPUTPULL)
1185    }
1186    #[doc = "Input enabled with filter. DOUT determines pull direction"]
1187    #[inline(always)]
1188    pub fn inputpullfilter(self) -> &'a mut W {
1189        self.variant(MODE12_A::INPUTPULLFILTER)
1190    }
1191    #[doc = "Push-pull output"]
1192    #[inline(always)]
1193    pub fn pushpull(self) -> &'a mut W {
1194        self.variant(MODE12_A::PUSHPULL)
1195    }
1196    #[doc = "Push-pull using alternate control"]
1197    #[inline(always)]
1198    pub fn pushpullalt(self) -> &'a mut W {
1199        self.variant(MODE12_A::PUSHPULLALT)
1200    }
1201    #[doc = "Wired-or output"]
1202    #[inline(always)]
1203    pub fn wiredor(self) -> &'a mut W {
1204        self.variant(MODE12_A::WIREDOR)
1205    }
1206    #[doc = "Wired-or output with pull-down"]
1207    #[inline(always)]
1208    pub fn wiredorpulldown(self) -> &'a mut W {
1209        self.variant(MODE12_A::WIREDORPULLDOWN)
1210    }
1211    #[doc = "Open-drain output"]
1212    #[inline(always)]
1213    pub fn wiredand(self) -> &'a mut W {
1214        self.variant(MODE12_A::WIREDAND)
1215    }
1216    #[doc = "Open-drain output with filter"]
1217    #[inline(always)]
1218    pub fn wiredandfilter(self) -> &'a mut W {
1219        self.variant(MODE12_A::WIREDANDFILTER)
1220    }
1221    #[doc = "Open-drain output with pullup"]
1222    #[inline(always)]
1223    pub fn wiredandpullup(self) -> &'a mut W {
1224        self.variant(MODE12_A::WIREDANDPULLUP)
1225    }
1226    #[doc = "Open-drain output with filter and pullup"]
1227    #[inline(always)]
1228    pub fn wiredandpullupfilter(self) -> &'a mut W {
1229        self.variant(MODE12_A::WIREDANDPULLUPFILTER)
1230    }
1231    #[doc = "Open-drain output using alternate control"]
1232    #[inline(always)]
1233    pub fn wiredandalt(self) -> &'a mut W {
1234        self.variant(MODE12_A::WIREDANDALT)
1235    }
1236    #[doc = "Open-drain output using alternate control with filter"]
1237    #[inline(always)]
1238    pub fn wiredandaltfilter(self) -> &'a mut W {
1239        self.variant(MODE12_A::WIREDANDALTFILTER)
1240    }
1241    #[doc = "Open-drain output using alternate control with pullup"]
1242    #[inline(always)]
1243    pub fn wiredandaltpullup(self) -> &'a mut W {
1244        self.variant(MODE12_A::WIREDANDALTPULLUP)
1245    }
1246    #[doc = "Open-drain output using alternate control with filter and pullup"]
1247    #[inline(always)]
1248    pub fn wiredandaltpullupfilter(self) -> &'a mut W {
1249        self.variant(MODE12_A::WIREDANDALTPULLUPFILTER)
1250    }
1251    #[doc = r"Writes raw bits to the field"]
1252    #[inline(always)]
1253    pub fn bits(self, value: u8) -> &'a mut W {
1254        self.w.bits = (self.w.bits & !(0x0f << 16)) | (((value as u32) & 0x0f) << 16);
1255        self.w
1256    }
1257}
1258#[doc = "Pin 13 Mode\n\nValue on reset: 0"]
1259#[derive(Clone, Copy, Debug, PartialEq)]
1260#[repr(u8)]
1261pub enum MODE13_A {
1262    #[doc = "0: Input disabled. Pullup if DOUT is set."]
1263    DISABLED = 0,
1264    #[doc = "1: Input enabled. Filter if DOUT is set"]
1265    INPUT = 1,
1266    #[doc = "2: Input enabled. DOUT determines pull direction"]
1267    INPUTPULL = 2,
1268    #[doc = "3: Input enabled with filter. DOUT determines pull direction"]
1269    INPUTPULLFILTER = 3,
1270    #[doc = "4: Push-pull output"]
1271    PUSHPULL = 4,
1272    #[doc = "5: Push-pull using alternate control"]
1273    PUSHPULLALT = 5,
1274    #[doc = "6: Wired-or output"]
1275    WIREDOR = 6,
1276    #[doc = "7: Wired-or output with pull-down"]
1277    WIREDORPULLDOWN = 7,
1278    #[doc = "8: Open-drain output"]
1279    WIREDAND = 8,
1280    #[doc = "9: Open-drain output with filter"]
1281    WIREDANDFILTER = 9,
1282    #[doc = "10: Open-drain output with pullup"]
1283    WIREDANDPULLUP = 10,
1284    #[doc = "11: Open-drain output with filter and pullup"]
1285    WIREDANDPULLUPFILTER = 11,
1286    #[doc = "12: Open-drain output using alternate control"]
1287    WIREDANDALT = 12,
1288    #[doc = "13: Open-drain output using alternate control with filter"]
1289    WIREDANDALTFILTER = 13,
1290    #[doc = "14: Open-drain output using alternate control with pullup"]
1291    WIREDANDALTPULLUP = 14,
1292    #[doc = "15: Open-drain output using alternate control with filter and pullup"]
1293    WIREDANDALTPULLUPFILTER = 15,
1294}
1295impl From<MODE13_A> for u8 {
1296    #[inline(always)]
1297    fn from(variant: MODE13_A) -> Self {
1298        variant as _
1299    }
1300}
1301#[doc = "Reader of field `MODE13`"]
1302pub type MODE13_R = crate::R<u8, MODE13_A>;
1303impl MODE13_R {
1304    #[doc = r"Get enumerated values variant"]
1305    #[inline(always)]
1306    pub fn variant(&self) -> MODE13_A {
1307        match self.bits {
1308            0 => MODE13_A::DISABLED,
1309            1 => MODE13_A::INPUT,
1310            2 => MODE13_A::INPUTPULL,
1311            3 => MODE13_A::INPUTPULLFILTER,
1312            4 => MODE13_A::PUSHPULL,
1313            5 => MODE13_A::PUSHPULLALT,
1314            6 => MODE13_A::WIREDOR,
1315            7 => MODE13_A::WIREDORPULLDOWN,
1316            8 => MODE13_A::WIREDAND,
1317            9 => MODE13_A::WIREDANDFILTER,
1318            10 => MODE13_A::WIREDANDPULLUP,
1319            11 => MODE13_A::WIREDANDPULLUPFILTER,
1320            12 => MODE13_A::WIREDANDALT,
1321            13 => MODE13_A::WIREDANDALTFILTER,
1322            14 => MODE13_A::WIREDANDALTPULLUP,
1323            15 => MODE13_A::WIREDANDALTPULLUPFILTER,
1324            _ => unreachable!(),
1325        }
1326    }
1327    #[doc = "Checks if the value of the field is `DISABLED`"]
1328    #[inline(always)]
1329    pub fn is_disabled(&self) -> bool {
1330        *self == MODE13_A::DISABLED
1331    }
1332    #[doc = "Checks if the value of the field is `INPUT`"]
1333    #[inline(always)]
1334    pub fn is_input(&self) -> bool {
1335        *self == MODE13_A::INPUT
1336    }
1337    #[doc = "Checks if the value of the field is `INPUTPULL`"]
1338    #[inline(always)]
1339    pub fn is_inputpull(&self) -> bool {
1340        *self == MODE13_A::INPUTPULL
1341    }
1342    #[doc = "Checks if the value of the field is `INPUTPULLFILTER`"]
1343    #[inline(always)]
1344    pub fn is_inputpullfilter(&self) -> bool {
1345        *self == MODE13_A::INPUTPULLFILTER
1346    }
1347    #[doc = "Checks if the value of the field is `PUSHPULL`"]
1348    #[inline(always)]
1349    pub fn is_pushpull(&self) -> bool {
1350        *self == MODE13_A::PUSHPULL
1351    }
1352    #[doc = "Checks if the value of the field is `PUSHPULLALT`"]
1353    #[inline(always)]
1354    pub fn is_pushpullalt(&self) -> bool {
1355        *self == MODE13_A::PUSHPULLALT
1356    }
1357    #[doc = "Checks if the value of the field is `WIREDOR`"]
1358    #[inline(always)]
1359    pub fn is_wiredor(&self) -> bool {
1360        *self == MODE13_A::WIREDOR
1361    }
1362    #[doc = "Checks if the value of the field is `WIREDORPULLDOWN`"]
1363    #[inline(always)]
1364    pub fn is_wiredorpulldown(&self) -> bool {
1365        *self == MODE13_A::WIREDORPULLDOWN
1366    }
1367    #[doc = "Checks if the value of the field is `WIREDAND`"]
1368    #[inline(always)]
1369    pub fn is_wiredand(&self) -> bool {
1370        *self == MODE13_A::WIREDAND
1371    }
1372    #[doc = "Checks if the value of the field is `WIREDANDFILTER`"]
1373    #[inline(always)]
1374    pub fn is_wiredandfilter(&self) -> bool {
1375        *self == MODE13_A::WIREDANDFILTER
1376    }
1377    #[doc = "Checks if the value of the field is `WIREDANDPULLUP`"]
1378    #[inline(always)]
1379    pub fn is_wiredandpullup(&self) -> bool {
1380        *self == MODE13_A::WIREDANDPULLUP
1381    }
1382    #[doc = "Checks if the value of the field is `WIREDANDPULLUPFILTER`"]
1383    #[inline(always)]
1384    pub fn is_wiredandpullupfilter(&self) -> bool {
1385        *self == MODE13_A::WIREDANDPULLUPFILTER
1386    }
1387    #[doc = "Checks if the value of the field is `WIREDANDALT`"]
1388    #[inline(always)]
1389    pub fn is_wiredandalt(&self) -> bool {
1390        *self == MODE13_A::WIREDANDALT
1391    }
1392    #[doc = "Checks if the value of the field is `WIREDANDALTFILTER`"]
1393    #[inline(always)]
1394    pub fn is_wiredandaltfilter(&self) -> bool {
1395        *self == MODE13_A::WIREDANDALTFILTER
1396    }
1397    #[doc = "Checks if the value of the field is `WIREDANDALTPULLUP`"]
1398    #[inline(always)]
1399    pub fn is_wiredandaltpullup(&self) -> bool {
1400        *self == MODE13_A::WIREDANDALTPULLUP
1401    }
1402    #[doc = "Checks if the value of the field is `WIREDANDALTPULLUPFILTER`"]
1403    #[inline(always)]
1404    pub fn is_wiredandaltpullupfilter(&self) -> bool {
1405        *self == MODE13_A::WIREDANDALTPULLUPFILTER
1406    }
1407}
1408#[doc = "Write proxy for field `MODE13`"]
1409pub struct MODE13_W<'a> {
1410    w: &'a mut W,
1411}
1412impl<'a> MODE13_W<'a> {
1413    #[doc = r"Writes `variant` to the field"]
1414    #[inline(always)]
1415    pub fn variant(self, variant: MODE13_A) -> &'a mut W {
1416        {
1417            self.bits(variant.into())
1418        }
1419    }
1420    #[doc = "Input disabled. Pullup if DOUT is set."]
1421    #[inline(always)]
1422    pub fn disabled(self) -> &'a mut W {
1423        self.variant(MODE13_A::DISABLED)
1424    }
1425    #[doc = "Input enabled. Filter if DOUT is set"]
1426    #[inline(always)]
1427    pub fn input(self) -> &'a mut W {
1428        self.variant(MODE13_A::INPUT)
1429    }
1430    #[doc = "Input enabled. DOUT determines pull direction"]
1431    #[inline(always)]
1432    pub fn inputpull(self) -> &'a mut W {
1433        self.variant(MODE13_A::INPUTPULL)
1434    }
1435    #[doc = "Input enabled with filter. DOUT determines pull direction"]
1436    #[inline(always)]
1437    pub fn inputpullfilter(self) -> &'a mut W {
1438        self.variant(MODE13_A::INPUTPULLFILTER)
1439    }
1440    #[doc = "Push-pull output"]
1441    #[inline(always)]
1442    pub fn pushpull(self) -> &'a mut W {
1443        self.variant(MODE13_A::PUSHPULL)
1444    }
1445    #[doc = "Push-pull using alternate control"]
1446    #[inline(always)]
1447    pub fn pushpullalt(self) -> &'a mut W {
1448        self.variant(MODE13_A::PUSHPULLALT)
1449    }
1450    #[doc = "Wired-or output"]
1451    #[inline(always)]
1452    pub fn wiredor(self) -> &'a mut W {
1453        self.variant(MODE13_A::WIREDOR)
1454    }
1455    #[doc = "Wired-or output with pull-down"]
1456    #[inline(always)]
1457    pub fn wiredorpulldown(self) -> &'a mut W {
1458        self.variant(MODE13_A::WIREDORPULLDOWN)
1459    }
1460    #[doc = "Open-drain output"]
1461    #[inline(always)]
1462    pub fn wiredand(self) -> &'a mut W {
1463        self.variant(MODE13_A::WIREDAND)
1464    }
1465    #[doc = "Open-drain output with filter"]
1466    #[inline(always)]
1467    pub fn wiredandfilter(self) -> &'a mut W {
1468        self.variant(MODE13_A::WIREDANDFILTER)
1469    }
1470    #[doc = "Open-drain output with pullup"]
1471    #[inline(always)]
1472    pub fn wiredandpullup(self) -> &'a mut W {
1473        self.variant(MODE13_A::WIREDANDPULLUP)
1474    }
1475    #[doc = "Open-drain output with filter and pullup"]
1476    #[inline(always)]
1477    pub fn wiredandpullupfilter(self) -> &'a mut W {
1478        self.variant(MODE13_A::WIREDANDPULLUPFILTER)
1479    }
1480    #[doc = "Open-drain output using alternate control"]
1481    #[inline(always)]
1482    pub fn wiredandalt(self) -> &'a mut W {
1483        self.variant(MODE13_A::WIREDANDALT)
1484    }
1485    #[doc = "Open-drain output using alternate control with filter"]
1486    #[inline(always)]
1487    pub fn wiredandaltfilter(self) -> &'a mut W {
1488        self.variant(MODE13_A::WIREDANDALTFILTER)
1489    }
1490    #[doc = "Open-drain output using alternate control with pullup"]
1491    #[inline(always)]
1492    pub fn wiredandaltpullup(self) -> &'a mut W {
1493        self.variant(MODE13_A::WIREDANDALTPULLUP)
1494    }
1495    #[doc = "Open-drain output using alternate control with filter and pullup"]
1496    #[inline(always)]
1497    pub fn wiredandaltpullupfilter(self) -> &'a mut W {
1498        self.variant(MODE13_A::WIREDANDALTPULLUPFILTER)
1499    }
1500    #[doc = r"Writes raw bits to the field"]
1501    #[inline(always)]
1502    pub fn bits(self, value: u8) -> &'a mut W {
1503        self.w.bits = (self.w.bits & !(0x0f << 20)) | (((value as u32) & 0x0f) << 20);
1504        self.w
1505    }
1506}
1507#[doc = "Pin 14 Mode\n\nValue on reset: 0"]
1508#[derive(Clone, Copy, Debug, PartialEq)]
1509#[repr(u8)]
1510pub enum MODE14_A {
1511    #[doc = "0: Input disabled. Pullup if DOUT is set."]
1512    DISABLED = 0,
1513    #[doc = "1: Input enabled. Filter if DOUT is set"]
1514    INPUT = 1,
1515    #[doc = "2: Input enabled. DOUT determines pull direction"]
1516    INPUTPULL = 2,
1517    #[doc = "3: Input enabled with filter. DOUT determines pull direction"]
1518    INPUTPULLFILTER = 3,
1519    #[doc = "4: Push-pull output"]
1520    PUSHPULL = 4,
1521    #[doc = "5: Push-pull using alternate control"]
1522    PUSHPULLALT = 5,
1523    #[doc = "6: Wired-or output"]
1524    WIREDOR = 6,
1525    #[doc = "7: Wired-or output with pull-down"]
1526    WIREDORPULLDOWN = 7,
1527    #[doc = "8: Open-drain output"]
1528    WIREDAND = 8,
1529    #[doc = "9: Open-drain output with filter"]
1530    WIREDANDFILTER = 9,
1531    #[doc = "10: Open-drain output with pullup"]
1532    WIREDANDPULLUP = 10,
1533    #[doc = "11: Open-drain output with filter and pullup"]
1534    WIREDANDPULLUPFILTER = 11,
1535    #[doc = "12: Open-drain output using alternate control"]
1536    WIREDANDALT = 12,
1537    #[doc = "13: Open-drain output using alternate control with filter"]
1538    WIREDANDALTFILTER = 13,
1539    #[doc = "14: Open-drain output using alternate control with pullup"]
1540    WIREDANDALTPULLUP = 14,
1541    #[doc = "15: Open-drain output using alternate control with filter and pullup"]
1542    WIREDANDALTPULLUPFILTER = 15,
1543}
1544impl From<MODE14_A> for u8 {
1545    #[inline(always)]
1546    fn from(variant: MODE14_A) -> Self {
1547        variant as _
1548    }
1549}
1550#[doc = "Reader of field `MODE14`"]
1551pub type MODE14_R = crate::R<u8, MODE14_A>;
1552impl MODE14_R {
1553    #[doc = r"Get enumerated values variant"]
1554    #[inline(always)]
1555    pub fn variant(&self) -> MODE14_A {
1556        match self.bits {
1557            0 => MODE14_A::DISABLED,
1558            1 => MODE14_A::INPUT,
1559            2 => MODE14_A::INPUTPULL,
1560            3 => MODE14_A::INPUTPULLFILTER,
1561            4 => MODE14_A::PUSHPULL,
1562            5 => MODE14_A::PUSHPULLALT,
1563            6 => MODE14_A::WIREDOR,
1564            7 => MODE14_A::WIREDORPULLDOWN,
1565            8 => MODE14_A::WIREDAND,
1566            9 => MODE14_A::WIREDANDFILTER,
1567            10 => MODE14_A::WIREDANDPULLUP,
1568            11 => MODE14_A::WIREDANDPULLUPFILTER,
1569            12 => MODE14_A::WIREDANDALT,
1570            13 => MODE14_A::WIREDANDALTFILTER,
1571            14 => MODE14_A::WIREDANDALTPULLUP,
1572            15 => MODE14_A::WIREDANDALTPULLUPFILTER,
1573            _ => unreachable!(),
1574        }
1575    }
1576    #[doc = "Checks if the value of the field is `DISABLED`"]
1577    #[inline(always)]
1578    pub fn is_disabled(&self) -> bool {
1579        *self == MODE14_A::DISABLED
1580    }
1581    #[doc = "Checks if the value of the field is `INPUT`"]
1582    #[inline(always)]
1583    pub fn is_input(&self) -> bool {
1584        *self == MODE14_A::INPUT
1585    }
1586    #[doc = "Checks if the value of the field is `INPUTPULL`"]
1587    #[inline(always)]
1588    pub fn is_inputpull(&self) -> bool {
1589        *self == MODE14_A::INPUTPULL
1590    }
1591    #[doc = "Checks if the value of the field is `INPUTPULLFILTER`"]
1592    #[inline(always)]
1593    pub fn is_inputpullfilter(&self) -> bool {
1594        *self == MODE14_A::INPUTPULLFILTER
1595    }
1596    #[doc = "Checks if the value of the field is `PUSHPULL`"]
1597    #[inline(always)]
1598    pub fn is_pushpull(&self) -> bool {
1599        *self == MODE14_A::PUSHPULL
1600    }
1601    #[doc = "Checks if the value of the field is `PUSHPULLALT`"]
1602    #[inline(always)]
1603    pub fn is_pushpullalt(&self) -> bool {
1604        *self == MODE14_A::PUSHPULLALT
1605    }
1606    #[doc = "Checks if the value of the field is `WIREDOR`"]
1607    #[inline(always)]
1608    pub fn is_wiredor(&self) -> bool {
1609        *self == MODE14_A::WIREDOR
1610    }
1611    #[doc = "Checks if the value of the field is `WIREDORPULLDOWN`"]
1612    #[inline(always)]
1613    pub fn is_wiredorpulldown(&self) -> bool {
1614        *self == MODE14_A::WIREDORPULLDOWN
1615    }
1616    #[doc = "Checks if the value of the field is `WIREDAND`"]
1617    #[inline(always)]
1618    pub fn is_wiredand(&self) -> bool {
1619        *self == MODE14_A::WIREDAND
1620    }
1621    #[doc = "Checks if the value of the field is `WIREDANDFILTER`"]
1622    #[inline(always)]
1623    pub fn is_wiredandfilter(&self) -> bool {
1624        *self == MODE14_A::WIREDANDFILTER
1625    }
1626    #[doc = "Checks if the value of the field is `WIREDANDPULLUP`"]
1627    #[inline(always)]
1628    pub fn is_wiredandpullup(&self) -> bool {
1629        *self == MODE14_A::WIREDANDPULLUP
1630    }
1631    #[doc = "Checks if the value of the field is `WIREDANDPULLUPFILTER`"]
1632    #[inline(always)]
1633    pub fn is_wiredandpullupfilter(&self) -> bool {
1634        *self == MODE14_A::WIREDANDPULLUPFILTER
1635    }
1636    #[doc = "Checks if the value of the field is `WIREDANDALT`"]
1637    #[inline(always)]
1638    pub fn is_wiredandalt(&self) -> bool {
1639        *self == MODE14_A::WIREDANDALT
1640    }
1641    #[doc = "Checks if the value of the field is `WIREDANDALTFILTER`"]
1642    #[inline(always)]
1643    pub fn is_wiredandaltfilter(&self) -> bool {
1644        *self == MODE14_A::WIREDANDALTFILTER
1645    }
1646    #[doc = "Checks if the value of the field is `WIREDANDALTPULLUP`"]
1647    #[inline(always)]
1648    pub fn is_wiredandaltpullup(&self) -> bool {
1649        *self == MODE14_A::WIREDANDALTPULLUP
1650    }
1651    #[doc = "Checks if the value of the field is `WIREDANDALTPULLUPFILTER`"]
1652    #[inline(always)]
1653    pub fn is_wiredandaltpullupfilter(&self) -> bool {
1654        *self == MODE14_A::WIREDANDALTPULLUPFILTER
1655    }
1656}
1657#[doc = "Write proxy for field `MODE14`"]
1658pub struct MODE14_W<'a> {
1659    w: &'a mut W,
1660}
1661impl<'a> MODE14_W<'a> {
1662    #[doc = r"Writes `variant` to the field"]
1663    #[inline(always)]
1664    pub fn variant(self, variant: MODE14_A) -> &'a mut W {
1665        {
1666            self.bits(variant.into())
1667        }
1668    }
1669    #[doc = "Input disabled. Pullup if DOUT is set."]
1670    #[inline(always)]
1671    pub fn disabled(self) -> &'a mut W {
1672        self.variant(MODE14_A::DISABLED)
1673    }
1674    #[doc = "Input enabled. Filter if DOUT is set"]
1675    #[inline(always)]
1676    pub fn input(self) -> &'a mut W {
1677        self.variant(MODE14_A::INPUT)
1678    }
1679    #[doc = "Input enabled. DOUT determines pull direction"]
1680    #[inline(always)]
1681    pub fn inputpull(self) -> &'a mut W {
1682        self.variant(MODE14_A::INPUTPULL)
1683    }
1684    #[doc = "Input enabled with filter. DOUT determines pull direction"]
1685    #[inline(always)]
1686    pub fn inputpullfilter(self) -> &'a mut W {
1687        self.variant(MODE14_A::INPUTPULLFILTER)
1688    }
1689    #[doc = "Push-pull output"]
1690    #[inline(always)]
1691    pub fn pushpull(self) -> &'a mut W {
1692        self.variant(MODE14_A::PUSHPULL)
1693    }
1694    #[doc = "Push-pull using alternate control"]
1695    #[inline(always)]
1696    pub fn pushpullalt(self) -> &'a mut W {
1697        self.variant(MODE14_A::PUSHPULLALT)
1698    }
1699    #[doc = "Wired-or output"]
1700    #[inline(always)]
1701    pub fn wiredor(self) -> &'a mut W {
1702        self.variant(MODE14_A::WIREDOR)
1703    }
1704    #[doc = "Wired-or output with pull-down"]
1705    #[inline(always)]
1706    pub fn wiredorpulldown(self) -> &'a mut W {
1707        self.variant(MODE14_A::WIREDORPULLDOWN)
1708    }
1709    #[doc = "Open-drain output"]
1710    #[inline(always)]
1711    pub fn wiredand(self) -> &'a mut W {
1712        self.variant(MODE14_A::WIREDAND)
1713    }
1714    #[doc = "Open-drain output with filter"]
1715    #[inline(always)]
1716    pub fn wiredandfilter(self) -> &'a mut W {
1717        self.variant(MODE14_A::WIREDANDFILTER)
1718    }
1719    #[doc = "Open-drain output with pullup"]
1720    #[inline(always)]
1721    pub fn wiredandpullup(self) -> &'a mut W {
1722        self.variant(MODE14_A::WIREDANDPULLUP)
1723    }
1724    #[doc = "Open-drain output with filter and pullup"]
1725    #[inline(always)]
1726    pub fn wiredandpullupfilter(self) -> &'a mut W {
1727        self.variant(MODE14_A::WIREDANDPULLUPFILTER)
1728    }
1729    #[doc = "Open-drain output using alternate control"]
1730    #[inline(always)]
1731    pub fn wiredandalt(self) -> &'a mut W {
1732        self.variant(MODE14_A::WIREDANDALT)
1733    }
1734    #[doc = "Open-drain output using alternate control with filter"]
1735    #[inline(always)]
1736    pub fn wiredandaltfilter(self) -> &'a mut W {
1737        self.variant(MODE14_A::WIREDANDALTFILTER)
1738    }
1739    #[doc = "Open-drain output using alternate control with pullup"]
1740    #[inline(always)]
1741    pub fn wiredandaltpullup(self) -> &'a mut W {
1742        self.variant(MODE14_A::WIREDANDALTPULLUP)
1743    }
1744    #[doc = "Open-drain output using alternate control with filter and pullup"]
1745    #[inline(always)]
1746    pub fn wiredandaltpullupfilter(self) -> &'a mut W {
1747        self.variant(MODE14_A::WIREDANDALTPULLUPFILTER)
1748    }
1749    #[doc = r"Writes raw bits to the field"]
1750    #[inline(always)]
1751    pub fn bits(self, value: u8) -> &'a mut W {
1752        self.w.bits = (self.w.bits & !(0x0f << 24)) | (((value as u32) & 0x0f) << 24);
1753        self.w
1754    }
1755}
1756#[doc = "Pin 15 Mode\n\nValue on reset: 0"]
1757#[derive(Clone, Copy, Debug, PartialEq)]
1758#[repr(u8)]
1759pub enum MODE15_A {
1760    #[doc = "0: Input disabled. Pullup if DOUT is set."]
1761    DISABLED = 0,
1762    #[doc = "1: Input enabled. Filter if DOUT is set"]
1763    INPUT = 1,
1764    #[doc = "2: Input enabled. DOUT determines pull direction"]
1765    INPUTPULL = 2,
1766    #[doc = "3: Input enabled with filter. DOUT determines pull direction"]
1767    INPUTPULLFILTER = 3,
1768    #[doc = "4: Push-pull output"]
1769    PUSHPULL = 4,
1770    #[doc = "5: Push-pull using alternate control"]
1771    PUSHPULLALT = 5,
1772    #[doc = "6: Wired-or output"]
1773    WIREDOR = 6,
1774    #[doc = "7: Wired-or output with pull-down"]
1775    WIREDORPULLDOWN = 7,
1776    #[doc = "8: Open-drain output"]
1777    WIREDAND = 8,
1778    #[doc = "9: Open-drain output with filter"]
1779    WIREDANDFILTER = 9,
1780    #[doc = "10: Open-drain output with pullup"]
1781    WIREDANDPULLUP = 10,
1782    #[doc = "11: Open-drain output with filter and pullup"]
1783    WIREDANDPULLUPFILTER = 11,
1784    #[doc = "12: Open-drain output using alternate control"]
1785    WIREDANDALT = 12,
1786    #[doc = "13: Open-drain output using alternate control with filter"]
1787    WIREDANDALTFILTER = 13,
1788    #[doc = "14: Open-drain output using alternate control with pullup"]
1789    WIREDANDALTPULLUP = 14,
1790    #[doc = "15: Open-drain output using alternate control with filter and pullup"]
1791    WIREDANDALTPULLUPFILTER = 15,
1792}
1793impl From<MODE15_A> for u8 {
1794    #[inline(always)]
1795    fn from(variant: MODE15_A) -> Self {
1796        variant as _
1797    }
1798}
1799#[doc = "Reader of field `MODE15`"]
1800pub type MODE15_R = crate::R<u8, MODE15_A>;
1801impl MODE15_R {
1802    #[doc = r"Get enumerated values variant"]
1803    #[inline(always)]
1804    pub fn variant(&self) -> MODE15_A {
1805        match self.bits {
1806            0 => MODE15_A::DISABLED,
1807            1 => MODE15_A::INPUT,
1808            2 => MODE15_A::INPUTPULL,
1809            3 => MODE15_A::INPUTPULLFILTER,
1810            4 => MODE15_A::PUSHPULL,
1811            5 => MODE15_A::PUSHPULLALT,
1812            6 => MODE15_A::WIREDOR,
1813            7 => MODE15_A::WIREDORPULLDOWN,
1814            8 => MODE15_A::WIREDAND,
1815            9 => MODE15_A::WIREDANDFILTER,
1816            10 => MODE15_A::WIREDANDPULLUP,
1817            11 => MODE15_A::WIREDANDPULLUPFILTER,
1818            12 => MODE15_A::WIREDANDALT,
1819            13 => MODE15_A::WIREDANDALTFILTER,
1820            14 => MODE15_A::WIREDANDALTPULLUP,
1821            15 => MODE15_A::WIREDANDALTPULLUPFILTER,
1822            _ => unreachable!(),
1823        }
1824    }
1825    #[doc = "Checks if the value of the field is `DISABLED`"]
1826    #[inline(always)]
1827    pub fn is_disabled(&self) -> bool {
1828        *self == MODE15_A::DISABLED
1829    }
1830    #[doc = "Checks if the value of the field is `INPUT`"]
1831    #[inline(always)]
1832    pub fn is_input(&self) -> bool {
1833        *self == MODE15_A::INPUT
1834    }
1835    #[doc = "Checks if the value of the field is `INPUTPULL`"]
1836    #[inline(always)]
1837    pub fn is_inputpull(&self) -> bool {
1838        *self == MODE15_A::INPUTPULL
1839    }
1840    #[doc = "Checks if the value of the field is `INPUTPULLFILTER`"]
1841    #[inline(always)]
1842    pub fn is_inputpullfilter(&self) -> bool {
1843        *self == MODE15_A::INPUTPULLFILTER
1844    }
1845    #[doc = "Checks if the value of the field is `PUSHPULL`"]
1846    #[inline(always)]
1847    pub fn is_pushpull(&self) -> bool {
1848        *self == MODE15_A::PUSHPULL
1849    }
1850    #[doc = "Checks if the value of the field is `PUSHPULLALT`"]
1851    #[inline(always)]
1852    pub fn is_pushpullalt(&self) -> bool {
1853        *self == MODE15_A::PUSHPULLALT
1854    }
1855    #[doc = "Checks if the value of the field is `WIREDOR`"]
1856    #[inline(always)]
1857    pub fn is_wiredor(&self) -> bool {
1858        *self == MODE15_A::WIREDOR
1859    }
1860    #[doc = "Checks if the value of the field is `WIREDORPULLDOWN`"]
1861    #[inline(always)]
1862    pub fn is_wiredorpulldown(&self) -> bool {
1863        *self == MODE15_A::WIREDORPULLDOWN
1864    }
1865    #[doc = "Checks if the value of the field is `WIREDAND`"]
1866    #[inline(always)]
1867    pub fn is_wiredand(&self) -> bool {
1868        *self == MODE15_A::WIREDAND
1869    }
1870    #[doc = "Checks if the value of the field is `WIREDANDFILTER`"]
1871    #[inline(always)]
1872    pub fn is_wiredandfilter(&self) -> bool {
1873        *self == MODE15_A::WIREDANDFILTER
1874    }
1875    #[doc = "Checks if the value of the field is `WIREDANDPULLUP`"]
1876    #[inline(always)]
1877    pub fn is_wiredandpullup(&self) -> bool {
1878        *self == MODE15_A::WIREDANDPULLUP
1879    }
1880    #[doc = "Checks if the value of the field is `WIREDANDPULLUPFILTER`"]
1881    #[inline(always)]
1882    pub fn is_wiredandpullupfilter(&self) -> bool {
1883        *self == MODE15_A::WIREDANDPULLUPFILTER
1884    }
1885    #[doc = "Checks if the value of the field is `WIREDANDALT`"]
1886    #[inline(always)]
1887    pub fn is_wiredandalt(&self) -> bool {
1888        *self == MODE15_A::WIREDANDALT
1889    }
1890    #[doc = "Checks if the value of the field is `WIREDANDALTFILTER`"]
1891    #[inline(always)]
1892    pub fn is_wiredandaltfilter(&self) -> bool {
1893        *self == MODE15_A::WIREDANDALTFILTER
1894    }
1895    #[doc = "Checks if the value of the field is `WIREDANDALTPULLUP`"]
1896    #[inline(always)]
1897    pub fn is_wiredandaltpullup(&self) -> bool {
1898        *self == MODE15_A::WIREDANDALTPULLUP
1899    }
1900    #[doc = "Checks if the value of the field is `WIREDANDALTPULLUPFILTER`"]
1901    #[inline(always)]
1902    pub fn is_wiredandaltpullupfilter(&self) -> bool {
1903        *self == MODE15_A::WIREDANDALTPULLUPFILTER
1904    }
1905}
1906#[doc = "Write proxy for field `MODE15`"]
1907pub struct MODE15_W<'a> {
1908    w: &'a mut W,
1909}
1910impl<'a> MODE15_W<'a> {
1911    #[doc = r"Writes `variant` to the field"]
1912    #[inline(always)]
1913    pub fn variant(self, variant: MODE15_A) -> &'a mut W {
1914        {
1915            self.bits(variant.into())
1916        }
1917    }
1918    #[doc = "Input disabled. Pullup if DOUT is set."]
1919    #[inline(always)]
1920    pub fn disabled(self) -> &'a mut W {
1921        self.variant(MODE15_A::DISABLED)
1922    }
1923    #[doc = "Input enabled. Filter if DOUT is set"]
1924    #[inline(always)]
1925    pub fn input(self) -> &'a mut W {
1926        self.variant(MODE15_A::INPUT)
1927    }
1928    #[doc = "Input enabled. DOUT determines pull direction"]
1929    #[inline(always)]
1930    pub fn inputpull(self) -> &'a mut W {
1931        self.variant(MODE15_A::INPUTPULL)
1932    }
1933    #[doc = "Input enabled with filter. DOUT determines pull direction"]
1934    #[inline(always)]
1935    pub fn inputpullfilter(self) -> &'a mut W {
1936        self.variant(MODE15_A::INPUTPULLFILTER)
1937    }
1938    #[doc = "Push-pull output"]
1939    #[inline(always)]
1940    pub fn pushpull(self) -> &'a mut W {
1941        self.variant(MODE15_A::PUSHPULL)
1942    }
1943    #[doc = "Push-pull using alternate control"]
1944    #[inline(always)]
1945    pub fn pushpullalt(self) -> &'a mut W {
1946        self.variant(MODE15_A::PUSHPULLALT)
1947    }
1948    #[doc = "Wired-or output"]
1949    #[inline(always)]
1950    pub fn wiredor(self) -> &'a mut W {
1951        self.variant(MODE15_A::WIREDOR)
1952    }
1953    #[doc = "Wired-or output with pull-down"]
1954    #[inline(always)]
1955    pub fn wiredorpulldown(self) -> &'a mut W {
1956        self.variant(MODE15_A::WIREDORPULLDOWN)
1957    }
1958    #[doc = "Open-drain output"]
1959    #[inline(always)]
1960    pub fn wiredand(self) -> &'a mut W {
1961        self.variant(MODE15_A::WIREDAND)
1962    }
1963    #[doc = "Open-drain output with filter"]
1964    #[inline(always)]
1965    pub fn wiredandfilter(self) -> &'a mut W {
1966        self.variant(MODE15_A::WIREDANDFILTER)
1967    }
1968    #[doc = "Open-drain output with pullup"]
1969    #[inline(always)]
1970    pub fn wiredandpullup(self) -> &'a mut W {
1971        self.variant(MODE15_A::WIREDANDPULLUP)
1972    }
1973    #[doc = "Open-drain output with filter and pullup"]
1974    #[inline(always)]
1975    pub fn wiredandpullupfilter(self) -> &'a mut W {
1976        self.variant(MODE15_A::WIREDANDPULLUPFILTER)
1977    }
1978    #[doc = "Open-drain output using alternate control"]
1979    #[inline(always)]
1980    pub fn wiredandalt(self) -> &'a mut W {
1981        self.variant(MODE15_A::WIREDANDALT)
1982    }
1983    #[doc = "Open-drain output using alternate control with filter"]
1984    #[inline(always)]
1985    pub fn wiredandaltfilter(self) -> &'a mut W {
1986        self.variant(MODE15_A::WIREDANDALTFILTER)
1987    }
1988    #[doc = "Open-drain output using alternate control with pullup"]
1989    #[inline(always)]
1990    pub fn wiredandaltpullup(self) -> &'a mut W {
1991        self.variant(MODE15_A::WIREDANDALTPULLUP)
1992    }
1993    #[doc = "Open-drain output using alternate control with filter and pullup"]
1994    #[inline(always)]
1995    pub fn wiredandaltpullupfilter(self) -> &'a mut W {
1996        self.variant(MODE15_A::WIREDANDALTPULLUPFILTER)
1997    }
1998    #[doc = r"Writes raw bits to the field"]
1999    #[inline(always)]
2000    pub fn bits(self, value: u8) -> &'a mut W {
2001        self.w.bits = (self.w.bits & !(0x0f << 28)) | (((value as u32) & 0x0f) << 28);
2002        self.w
2003    }
2004}
2005impl R {
2006    #[doc = "Bits 0:3 - Pin 8 Mode"]
2007    #[inline(always)]
2008    pub fn mode8(&self) -> MODE8_R {
2009        MODE8_R::new((self.bits & 0x0f) as u8)
2010    }
2011    #[doc = "Bits 4:7 - Pin 9 Mode"]
2012    #[inline(always)]
2013    pub fn mode9(&self) -> MODE9_R {
2014        MODE9_R::new(((self.bits >> 4) & 0x0f) as u8)
2015    }
2016    #[doc = "Bits 8:11 - Pin 10 Mode"]
2017    #[inline(always)]
2018    pub fn mode10(&self) -> MODE10_R {
2019        MODE10_R::new(((self.bits >> 8) & 0x0f) as u8)
2020    }
2021    #[doc = "Bits 12:15 - Pin 11 Mode"]
2022    #[inline(always)]
2023    pub fn mode11(&self) -> MODE11_R {
2024        MODE11_R::new(((self.bits >> 12) & 0x0f) as u8)
2025    }
2026    #[doc = "Bits 16:19 - Pin 12 Mode"]
2027    #[inline(always)]
2028    pub fn mode12(&self) -> MODE12_R {
2029        MODE12_R::new(((self.bits >> 16) & 0x0f) as u8)
2030    }
2031    #[doc = "Bits 20:23 - Pin 13 Mode"]
2032    #[inline(always)]
2033    pub fn mode13(&self) -> MODE13_R {
2034        MODE13_R::new(((self.bits >> 20) & 0x0f) as u8)
2035    }
2036    #[doc = "Bits 24:27 - Pin 14 Mode"]
2037    #[inline(always)]
2038    pub fn mode14(&self) -> MODE14_R {
2039        MODE14_R::new(((self.bits >> 24) & 0x0f) as u8)
2040    }
2041    #[doc = "Bits 28:31 - Pin 15 Mode"]
2042    #[inline(always)]
2043    pub fn mode15(&self) -> MODE15_R {
2044        MODE15_R::new(((self.bits >> 28) & 0x0f) as u8)
2045    }
2046}
2047impl W {
2048    #[doc = "Bits 0:3 - Pin 8 Mode"]
2049    #[inline(always)]
2050    pub fn mode8(&mut self) -> MODE8_W {
2051        MODE8_W { w: self }
2052    }
2053    #[doc = "Bits 4:7 - Pin 9 Mode"]
2054    #[inline(always)]
2055    pub fn mode9(&mut self) -> MODE9_W {
2056        MODE9_W { w: self }
2057    }
2058    #[doc = "Bits 8:11 - Pin 10 Mode"]
2059    #[inline(always)]
2060    pub fn mode10(&mut self) -> MODE10_W {
2061        MODE10_W { w: self }
2062    }
2063    #[doc = "Bits 12:15 - Pin 11 Mode"]
2064    #[inline(always)]
2065    pub fn mode11(&mut self) -> MODE11_W {
2066        MODE11_W { w: self }
2067    }
2068    #[doc = "Bits 16:19 - Pin 12 Mode"]
2069    #[inline(always)]
2070    pub fn mode12(&mut self) -> MODE12_W {
2071        MODE12_W { w: self }
2072    }
2073    #[doc = "Bits 20:23 - Pin 13 Mode"]
2074    #[inline(always)]
2075    pub fn mode13(&mut self) -> MODE13_W {
2076        MODE13_W { w: self }
2077    }
2078    #[doc = "Bits 24:27 - Pin 14 Mode"]
2079    #[inline(always)]
2080    pub fn mode14(&mut self) -> MODE14_W {
2081        MODE14_W { w: self }
2082    }
2083    #[doc = "Bits 28:31 - Pin 15 Mode"]
2084    #[inline(always)]
2085    pub fn mode15(&mut self) -> MODE15_W {
2086        MODE15_W { w: self }
2087    }
2088}