efm32tg_pac/efm32tg108/gpio/
pf_modeh.rs

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