efm32gg11b840_pac/gpio/
extipinsell.rs

1#[doc = "Register `EXTIPINSELL` reader"]
2pub struct R(crate::R<EXTIPINSELL_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<EXTIPINSELL_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<EXTIPINSELL_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<EXTIPINSELL_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `EXTIPINSELL` writer"]
17pub struct W(crate::W<EXTIPINSELL_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<EXTIPINSELL_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<EXTIPINSELL_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<EXTIPINSELL_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "External Interrupt 0 Pin Select\n\nValue on reset: 0"]
38#[derive(Clone, Copy, Debug, PartialEq)]
39#[repr(u8)]
40pub enum EXTIPINSEL0_A {
41    #[doc = "0: Pin 0"]
42    PIN0 = 0,
43    #[doc = "1: Pin 1"]
44    PIN1 = 1,
45    #[doc = "2: Pin 2"]
46    PIN2 = 2,
47    #[doc = "3: Pin 3"]
48    PIN3 = 3,
49}
50impl From<EXTIPINSEL0_A> for u8 {
51    #[inline(always)]
52    fn from(variant: EXTIPINSEL0_A) -> Self {
53        variant as _
54    }
55}
56#[doc = "Field `EXTIPINSEL0` reader - External Interrupt 0 Pin Select"]
57pub type EXTIPINSEL0_R = crate::FieldReader<u8, EXTIPINSEL0_A>;
58impl EXTIPINSEL0_R {
59    #[doc = "Get enumerated values variant"]
60    #[inline(always)]
61    pub fn variant(&self) -> EXTIPINSEL0_A {
62        match self.bits {
63            0 => EXTIPINSEL0_A::PIN0,
64            1 => EXTIPINSEL0_A::PIN1,
65            2 => EXTIPINSEL0_A::PIN2,
66            3 => EXTIPINSEL0_A::PIN3,
67            _ => unreachable!(),
68        }
69    }
70    #[doc = "Checks if the value of the field is `PIN0`"]
71    #[inline(always)]
72    pub fn is_pin0(&self) -> bool {
73        *self == EXTIPINSEL0_A::PIN0
74    }
75    #[doc = "Checks if the value of the field is `PIN1`"]
76    #[inline(always)]
77    pub fn is_pin1(&self) -> bool {
78        *self == EXTIPINSEL0_A::PIN1
79    }
80    #[doc = "Checks if the value of the field is `PIN2`"]
81    #[inline(always)]
82    pub fn is_pin2(&self) -> bool {
83        *self == EXTIPINSEL0_A::PIN2
84    }
85    #[doc = "Checks if the value of the field is `PIN3`"]
86    #[inline(always)]
87    pub fn is_pin3(&self) -> bool {
88        *self == EXTIPINSEL0_A::PIN3
89    }
90}
91#[doc = "Field `EXTIPINSEL0` writer - External Interrupt 0 Pin Select"]
92pub type EXTIPINSEL0_W<'a> =
93    crate::FieldWriterSafe<'a, u32, EXTIPINSELL_SPEC, u8, EXTIPINSEL0_A, 2, 0>;
94impl<'a> EXTIPINSEL0_W<'a> {
95    #[doc = "Pin 0"]
96    #[inline(always)]
97    pub fn pin0(self) -> &'a mut W {
98        self.variant(EXTIPINSEL0_A::PIN0)
99    }
100    #[doc = "Pin 1"]
101    #[inline(always)]
102    pub fn pin1(self) -> &'a mut W {
103        self.variant(EXTIPINSEL0_A::PIN1)
104    }
105    #[doc = "Pin 2"]
106    #[inline(always)]
107    pub fn pin2(self) -> &'a mut W {
108        self.variant(EXTIPINSEL0_A::PIN2)
109    }
110    #[doc = "Pin 3"]
111    #[inline(always)]
112    pub fn pin3(self) -> &'a mut W {
113        self.variant(EXTIPINSEL0_A::PIN3)
114    }
115}
116#[doc = "External Interrupt 1 Pin Select\n\nValue on reset: 1"]
117#[derive(Clone, Copy, Debug, PartialEq)]
118#[repr(u8)]
119pub enum EXTIPINSEL1_A {
120    #[doc = "0: Pin 0"]
121    PIN0 = 0,
122    #[doc = "1: Pin 1"]
123    PIN1 = 1,
124    #[doc = "2: Pin 2"]
125    PIN2 = 2,
126    #[doc = "3: Pin 3"]
127    PIN3 = 3,
128}
129impl From<EXTIPINSEL1_A> for u8 {
130    #[inline(always)]
131    fn from(variant: EXTIPINSEL1_A) -> Self {
132        variant as _
133    }
134}
135#[doc = "Field `EXTIPINSEL1` reader - External Interrupt 1 Pin Select"]
136pub type EXTIPINSEL1_R = crate::FieldReader<u8, EXTIPINSEL1_A>;
137impl EXTIPINSEL1_R {
138    #[doc = "Get enumerated values variant"]
139    #[inline(always)]
140    pub fn variant(&self) -> EXTIPINSEL1_A {
141        match self.bits {
142            0 => EXTIPINSEL1_A::PIN0,
143            1 => EXTIPINSEL1_A::PIN1,
144            2 => EXTIPINSEL1_A::PIN2,
145            3 => EXTIPINSEL1_A::PIN3,
146            _ => unreachable!(),
147        }
148    }
149    #[doc = "Checks if the value of the field is `PIN0`"]
150    #[inline(always)]
151    pub fn is_pin0(&self) -> bool {
152        *self == EXTIPINSEL1_A::PIN0
153    }
154    #[doc = "Checks if the value of the field is `PIN1`"]
155    #[inline(always)]
156    pub fn is_pin1(&self) -> bool {
157        *self == EXTIPINSEL1_A::PIN1
158    }
159    #[doc = "Checks if the value of the field is `PIN2`"]
160    #[inline(always)]
161    pub fn is_pin2(&self) -> bool {
162        *self == EXTIPINSEL1_A::PIN2
163    }
164    #[doc = "Checks if the value of the field is `PIN3`"]
165    #[inline(always)]
166    pub fn is_pin3(&self) -> bool {
167        *self == EXTIPINSEL1_A::PIN3
168    }
169}
170#[doc = "Field `EXTIPINSEL1` writer - External Interrupt 1 Pin Select"]
171pub type EXTIPINSEL1_W<'a> =
172    crate::FieldWriterSafe<'a, u32, EXTIPINSELL_SPEC, u8, EXTIPINSEL1_A, 2, 4>;
173impl<'a> EXTIPINSEL1_W<'a> {
174    #[doc = "Pin 0"]
175    #[inline(always)]
176    pub fn pin0(self) -> &'a mut W {
177        self.variant(EXTIPINSEL1_A::PIN0)
178    }
179    #[doc = "Pin 1"]
180    #[inline(always)]
181    pub fn pin1(self) -> &'a mut W {
182        self.variant(EXTIPINSEL1_A::PIN1)
183    }
184    #[doc = "Pin 2"]
185    #[inline(always)]
186    pub fn pin2(self) -> &'a mut W {
187        self.variant(EXTIPINSEL1_A::PIN2)
188    }
189    #[doc = "Pin 3"]
190    #[inline(always)]
191    pub fn pin3(self) -> &'a mut W {
192        self.variant(EXTIPINSEL1_A::PIN3)
193    }
194}
195#[doc = "External Interrupt 2 Pin Select\n\nValue on reset: 2"]
196#[derive(Clone, Copy, Debug, PartialEq)]
197#[repr(u8)]
198pub enum EXTIPINSEL2_A {
199    #[doc = "0: Pin 0"]
200    PIN0 = 0,
201    #[doc = "1: Pin 1"]
202    PIN1 = 1,
203    #[doc = "2: Pin 2"]
204    PIN2 = 2,
205    #[doc = "3: Pin 3"]
206    PIN3 = 3,
207}
208impl From<EXTIPINSEL2_A> for u8 {
209    #[inline(always)]
210    fn from(variant: EXTIPINSEL2_A) -> Self {
211        variant as _
212    }
213}
214#[doc = "Field `EXTIPINSEL2` reader - External Interrupt 2 Pin Select"]
215pub type EXTIPINSEL2_R = crate::FieldReader<u8, EXTIPINSEL2_A>;
216impl EXTIPINSEL2_R {
217    #[doc = "Get enumerated values variant"]
218    #[inline(always)]
219    pub fn variant(&self) -> EXTIPINSEL2_A {
220        match self.bits {
221            0 => EXTIPINSEL2_A::PIN0,
222            1 => EXTIPINSEL2_A::PIN1,
223            2 => EXTIPINSEL2_A::PIN2,
224            3 => EXTIPINSEL2_A::PIN3,
225            _ => unreachable!(),
226        }
227    }
228    #[doc = "Checks if the value of the field is `PIN0`"]
229    #[inline(always)]
230    pub fn is_pin0(&self) -> bool {
231        *self == EXTIPINSEL2_A::PIN0
232    }
233    #[doc = "Checks if the value of the field is `PIN1`"]
234    #[inline(always)]
235    pub fn is_pin1(&self) -> bool {
236        *self == EXTIPINSEL2_A::PIN1
237    }
238    #[doc = "Checks if the value of the field is `PIN2`"]
239    #[inline(always)]
240    pub fn is_pin2(&self) -> bool {
241        *self == EXTIPINSEL2_A::PIN2
242    }
243    #[doc = "Checks if the value of the field is `PIN3`"]
244    #[inline(always)]
245    pub fn is_pin3(&self) -> bool {
246        *self == EXTIPINSEL2_A::PIN3
247    }
248}
249#[doc = "Field `EXTIPINSEL2` writer - External Interrupt 2 Pin Select"]
250pub type EXTIPINSEL2_W<'a> =
251    crate::FieldWriterSafe<'a, u32, EXTIPINSELL_SPEC, u8, EXTIPINSEL2_A, 2, 8>;
252impl<'a> EXTIPINSEL2_W<'a> {
253    #[doc = "Pin 0"]
254    #[inline(always)]
255    pub fn pin0(self) -> &'a mut W {
256        self.variant(EXTIPINSEL2_A::PIN0)
257    }
258    #[doc = "Pin 1"]
259    #[inline(always)]
260    pub fn pin1(self) -> &'a mut W {
261        self.variant(EXTIPINSEL2_A::PIN1)
262    }
263    #[doc = "Pin 2"]
264    #[inline(always)]
265    pub fn pin2(self) -> &'a mut W {
266        self.variant(EXTIPINSEL2_A::PIN2)
267    }
268    #[doc = "Pin 3"]
269    #[inline(always)]
270    pub fn pin3(self) -> &'a mut W {
271        self.variant(EXTIPINSEL2_A::PIN3)
272    }
273}
274#[doc = "External Interrupt 3 Pin Select\n\nValue on reset: 3"]
275#[derive(Clone, Copy, Debug, PartialEq)]
276#[repr(u8)]
277pub enum EXTIPINSEL3_A {
278    #[doc = "0: Pin 0"]
279    PIN0 = 0,
280    #[doc = "1: Pin 1"]
281    PIN1 = 1,
282    #[doc = "2: Pin 2"]
283    PIN2 = 2,
284    #[doc = "3: Pin 3"]
285    PIN3 = 3,
286}
287impl From<EXTIPINSEL3_A> for u8 {
288    #[inline(always)]
289    fn from(variant: EXTIPINSEL3_A) -> Self {
290        variant as _
291    }
292}
293#[doc = "Field `EXTIPINSEL3` reader - External Interrupt 3 Pin Select"]
294pub type EXTIPINSEL3_R = crate::FieldReader<u8, EXTIPINSEL3_A>;
295impl EXTIPINSEL3_R {
296    #[doc = "Get enumerated values variant"]
297    #[inline(always)]
298    pub fn variant(&self) -> EXTIPINSEL3_A {
299        match self.bits {
300            0 => EXTIPINSEL3_A::PIN0,
301            1 => EXTIPINSEL3_A::PIN1,
302            2 => EXTIPINSEL3_A::PIN2,
303            3 => EXTIPINSEL3_A::PIN3,
304            _ => unreachable!(),
305        }
306    }
307    #[doc = "Checks if the value of the field is `PIN0`"]
308    #[inline(always)]
309    pub fn is_pin0(&self) -> bool {
310        *self == EXTIPINSEL3_A::PIN0
311    }
312    #[doc = "Checks if the value of the field is `PIN1`"]
313    #[inline(always)]
314    pub fn is_pin1(&self) -> bool {
315        *self == EXTIPINSEL3_A::PIN1
316    }
317    #[doc = "Checks if the value of the field is `PIN2`"]
318    #[inline(always)]
319    pub fn is_pin2(&self) -> bool {
320        *self == EXTIPINSEL3_A::PIN2
321    }
322    #[doc = "Checks if the value of the field is `PIN3`"]
323    #[inline(always)]
324    pub fn is_pin3(&self) -> bool {
325        *self == EXTIPINSEL3_A::PIN3
326    }
327}
328#[doc = "Field `EXTIPINSEL3` writer - External Interrupt 3 Pin Select"]
329pub type EXTIPINSEL3_W<'a> =
330    crate::FieldWriterSafe<'a, u32, EXTIPINSELL_SPEC, u8, EXTIPINSEL3_A, 2, 12>;
331impl<'a> EXTIPINSEL3_W<'a> {
332    #[doc = "Pin 0"]
333    #[inline(always)]
334    pub fn pin0(self) -> &'a mut W {
335        self.variant(EXTIPINSEL3_A::PIN0)
336    }
337    #[doc = "Pin 1"]
338    #[inline(always)]
339    pub fn pin1(self) -> &'a mut W {
340        self.variant(EXTIPINSEL3_A::PIN1)
341    }
342    #[doc = "Pin 2"]
343    #[inline(always)]
344    pub fn pin2(self) -> &'a mut W {
345        self.variant(EXTIPINSEL3_A::PIN2)
346    }
347    #[doc = "Pin 3"]
348    #[inline(always)]
349    pub fn pin3(self) -> &'a mut W {
350        self.variant(EXTIPINSEL3_A::PIN3)
351    }
352}
353#[doc = "External Interrupt 4 Pin Select\n\nValue on reset: 0"]
354#[derive(Clone, Copy, Debug, PartialEq)]
355#[repr(u8)]
356pub enum EXTIPINSEL4_A {
357    #[doc = "0: Pin 4"]
358    PIN4 = 0,
359    #[doc = "1: Pin 5"]
360    PIN5 = 1,
361    #[doc = "2: Pin 6"]
362    PIN6 = 2,
363    #[doc = "3: Pin 7"]
364    PIN7 = 3,
365}
366impl From<EXTIPINSEL4_A> for u8 {
367    #[inline(always)]
368    fn from(variant: EXTIPINSEL4_A) -> Self {
369        variant as _
370    }
371}
372#[doc = "Field `EXTIPINSEL4` reader - External Interrupt 4 Pin Select"]
373pub type EXTIPINSEL4_R = crate::FieldReader<u8, EXTIPINSEL4_A>;
374impl EXTIPINSEL4_R {
375    #[doc = "Get enumerated values variant"]
376    #[inline(always)]
377    pub fn variant(&self) -> EXTIPINSEL4_A {
378        match self.bits {
379            0 => EXTIPINSEL4_A::PIN4,
380            1 => EXTIPINSEL4_A::PIN5,
381            2 => EXTIPINSEL4_A::PIN6,
382            3 => EXTIPINSEL4_A::PIN7,
383            _ => unreachable!(),
384        }
385    }
386    #[doc = "Checks if the value of the field is `PIN4`"]
387    #[inline(always)]
388    pub fn is_pin4(&self) -> bool {
389        *self == EXTIPINSEL4_A::PIN4
390    }
391    #[doc = "Checks if the value of the field is `PIN5`"]
392    #[inline(always)]
393    pub fn is_pin5(&self) -> bool {
394        *self == EXTIPINSEL4_A::PIN5
395    }
396    #[doc = "Checks if the value of the field is `PIN6`"]
397    #[inline(always)]
398    pub fn is_pin6(&self) -> bool {
399        *self == EXTIPINSEL4_A::PIN6
400    }
401    #[doc = "Checks if the value of the field is `PIN7`"]
402    #[inline(always)]
403    pub fn is_pin7(&self) -> bool {
404        *self == EXTIPINSEL4_A::PIN7
405    }
406}
407#[doc = "Field `EXTIPINSEL4` writer - External Interrupt 4 Pin Select"]
408pub type EXTIPINSEL4_W<'a> =
409    crate::FieldWriterSafe<'a, u32, EXTIPINSELL_SPEC, u8, EXTIPINSEL4_A, 2, 16>;
410impl<'a> EXTIPINSEL4_W<'a> {
411    #[doc = "Pin 4"]
412    #[inline(always)]
413    pub fn pin4(self) -> &'a mut W {
414        self.variant(EXTIPINSEL4_A::PIN4)
415    }
416    #[doc = "Pin 5"]
417    #[inline(always)]
418    pub fn pin5(self) -> &'a mut W {
419        self.variant(EXTIPINSEL4_A::PIN5)
420    }
421    #[doc = "Pin 6"]
422    #[inline(always)]
423    pub fn pin6(self) -> &'a mut W {
424        self.variant(EXTIPINSEL4_A::PIN6)
425    }
426    #[doc = "Pin 7"]
427    #[inline(always)]
428    pub fn pin7(self) -> &'a mut W {
429        self.variant(EXTIPINSEL4_A::PIN7)
430    }
431}
432#[doc = "External Interrupt 5 Pin Select\n\nValue on reset: 1"]
433#[derive(Clone, Copy, Debug, PartialEq)]
434#[repr(u8)]
435pub enum EXTIPINSEL5_A {
436    #[doc = "0: Pin 4"]
437    PIN4 = 0,
438    #[doc = "1: Pin 5"]
439    PIN5 = 1,
440    #[doc = "2: Pin 6"]
441    PIN6 = 2,
442    #[doc = "3: Pin 7"]
443    PIN7 = 3,
444}
445impl From<EXTIPINSEL5_A> for u8 {
446    #[inline(always)]
447    fn from(variant: EXTIPINSEL5_A) -> Self {
448        variant as _
449    }
450}
451#[doc = "Field `EXTIPINSEL5` reader - External Interrupt 5 Pin Select"]
452pub type EXTIPINSEL5_R = crate::FieldReader<u8, EXTIPINSEL5_A>;
453impl EXTIPINSEL5_R {
454    #[doc = "Get enumerated values variant"]
455    #[inline(always)]
456    pub fn variant(&self) -> EXTIPINSEL5_A {
457        match self.bits {
458            0 => EXTIPINSEL5_A::PIN4,
459            1 => EXTIPINSEL5_A::PIN5,
460            2 => EXTIPINSEL5_A::PIN6,
461            3 => EXTIPINSEL5_A::PIN7,
462            _ => unreachable!(),
463        }
464    }
465    #[doc = "Checks if the value of the field is `PIN4`"]
466    #[inline(always)]
467    pub fn is_pin4(&self) -> bool {
468        *self == EXTIPINSEL5_A::PIN4
469    }
470    #[doc = "Checks if the value of the field is `PIN5`"]
471    #[inline(always)]
472    pub fn is_pin5(&self) -> bool {
473        *self == EXTIPINSEL5_A::PIN5
474    }
475    #[doc = "Checks if the value of the field is `PIN6`"]
476    #[inline(always)]
477    pub fn is_pin6(&self) -> bool {
478        *self == EXTIPINSEL5_A::PIN6
479    }
480    #[doc = "Checks if the value of the field is `PIN7`"]
481    #[inline(always)]
482    pub fn is_pin7(&self) -> bool {
483        *self == EXTIPINSEL5_A::PIN7
484    }
485}
486#[doc = "Field `EXTIPINSEL5` writer - External Interrupt 5 Pin Select"]
487pub type EXTIPINSEL5_W<'a> =
488    crate::FieldWriterSafe<'a, u32, EXTIPINSELL_SPEC, u8, EXTIPINSEL5_A, 2, 20>;
489impl<'a> EXTIPINSEL5_W<'a> {
490    #[doc = "Pin 4"]
491    #[inline(always)]
492    pub fn pin4(self) -> &'a mut W {
493        self.variant(EXTIPINSEL5_A::PIN4)
494    }
495    #[doc = "Pin 5"]
496    #[inline(always)]
497    pub fn pin5(self) -> &'a mut W {
498        self.variant(EXTIPINSEL5_A::PIN5)
499    }
500    #[doc = "Pin 6"]
501    #[inline(always)]
502    pub fn pin6(self) -> &'a mut W {
503        self.variant(EXTIPINSEL5_A::PIN6)
504    }
505    #[doc = "Pin 7"]
506    #[inline(always)]
507    pub fn pin7(self) -> &'a mut W {
508        self.variant(EXTIPINSEL5_A::PIN7)
509    }
510}
511#[doc = "External Interrupt 6 Pin Select\n\nValue on reset: 2"]
512#[derive(Clone, Copy, Debug, PartialEq)]
513#[repr(u8)]
514pub enum EXTIPINSEL6_A {
515    #[doc = "0: Pin 4"]
516    PIN4 = 0,
517    #[doc = "1: Pin 5"]
518    PIN5 = 1,
519    #[doc = "2: Pin 6"]
520    PIN6 = 2,
521    #[doc = "3: Pin 7"]
522    PIN7 = 3,
523}
524impl From<EXTIPINSEL6_A> for u8 {
525    #[inline(always)]
526    fn from(variant: EXTIPINSEL6_A) -> Self {
527        variant as _
528    }
529}
530#[doc = "Field `EXTIPINSEL6` reader - External Interrupt 6 Pin Select"]
531pub type EXTIPINSEL6_R = crate::FieldReader<u8, EXTIPINSEL6_A>;
532impl EXTIPINSEL6_R {
533    #[doc = "Get enumerated values variant"]
534    #[inline(always)]
535    pub fn variant(&self) -> EXTIPINSEL6_A {
536        match self.bits {
537            0 => EXTIPINSEL6_A::PIN4,
538            1 => EXTIPINSEL6_A::PIN5,
539            2 => EXTIPINSEL6_A::PIN6,
540            3 => EXTIPINSEL6_A::PIN7,
541            _ => unreachable!(),
542        }
543    }
544    #[doc = "Checks if the value of the field is `PIN4`"]
545    #[inline(always)]
546    pub fn is_pin4(&self) -> bool {
547        *self == EXTIPINSEL6_A::PIN4
548    }
549    #[doc = "Checks if the value of the field is `PIN5`"]
550    #[inline(always)]
551    pub fn is_pin5(&self) -> bool {
552        *self == EXTIPINSEL6_A::PIN5
553    }
554    #[doc = "Checks if the value of the field is `PIN6`"]
555    #[inline(always)]
556    pub fn is_pin6(&self) -> bool {
557        *self == EXTIPINSEL6_A::PIN6
558    }
559    #[doc = "Checks if the value of the field is `PIN7`"]
560    #[inline(always)]
561    pub fn is_pin7(&self) -> bool {
562        *self == EXTIPINSEL6_A::PIN7
563    }
564}
565#[doc = "Field `EXTIPINSEL6` writer - External Interrupt 6 Pin Select"]
566pub type EXTIPINSEL6_W<'a> =
567    crate::FieldWriterSafe<'a, u32, EXTIPINSELL_SPEC, u8, EXTIPINSEL6_A, 2, 24>;
568impl<'a> EXTIPINSEL6_W<'a> {
569    #[doc = "Pin 4"]
570    #[inline(always)]
571    pub fn pin4(self) -> &'a mut W {
572        self.variant(EXTIPINSEL6_A::PIN4)
573    }
574    #[doc = "Pin 5"]
575    #[inline(always)]
576    pub fn pin5(self) -> &'a mut W {
577        self.variant(EXTIPINSEL6_A::PIN5)
578    }
579    #[doc = "Pin 6"]
580    #[inline(always)]
581    pub fn pin6(self) -> &'a mut W {
582        self.variant(EXTIPINSEL6_A::PIN6)
583    }
584    #[doc = "Pin 7"]
585    #[inline(always)]
586    pub fn pin7(self) -> &'a mut W {
587        self.variant(EXTIPINSEL6_A::PIN7)
588    }
589}
590#[doc = "External Interrupt 7 Pin Select\n\nValue on reset: 3"]
591#[derive(Clone, Copy, Debug, PartialEq)]
592#[repr(u8)]
593pub enum EXTIPINSEL7_A {
594    #[doc = "0: Pin 4"]
595    PIN4 = 0,
596    #[doc = "1: Pin 5"]
597    PIN5 = 1,
598    #[doc = "2: Pin 6"]
599    PIN6 = 2,
600    #[doc = "3: Pin 7"]
601    PIN7 = 3,
602}
603impl From<EXTIPINSEL7_A> for u8 {
604    #[inline(always)]
605    fn from(variant: EXTIPINSEL7_A) -> Self {
606        variant as _
607    }
608}
609#[doc = "Field `EXTIPINSEL7` reader - External Interrupt 7 Pin Select"]
610pub type EXTIPINSEL7_R = crate::FieldReader<u8, EXTIPINSEL7_A>;
611impl EXTIPINSEL7_R {
612    #[doc = "Get enumerated values variant"]
613    #[inline(always)]
614    pub fn variant(&self) -> EXTIPINSEL7_A {
615        match self.bits {
616            0 => EXTIPINSEL7_A::PIN4,
617            1 => EXTIPINSEL7_A::PIN5,
618            2 => EXTIPINSEL7_A::PIN6,
619            3 => EXTIPINSEL7_A::PIN7,
620            _ => unreachable!(),
621        }
622    }
623    #[doc = "Checks if the value of the field is `PIN4`"]
624    #[inline(always)]
625    pub fn is_pin4(&self) -> bool {
626        *self == EXTIPINSEL7_A::PIN4
627    }
628    #[doc = "Checks if the value of the field is `PIN5`"]
629    #[inline(always)]
630    pub fn is_pin5(&self) -> bool {
631        *self == EXTIPINSEL7_A::PIN5
632    }
633    #[doc = "Checks if the value of the field is `PIN6`"]
634    #[inline(always)]
635    pub fn is_pin6(&self) -> bool {
636        *self == EXTIPINSEL7_A::PIN6
637    }
638    #[doc = "Checks if the value of the field is `PIN7`"]
639    #[inline(always)]
640    pub fn is_pin7(&self) -> bool {
641        *self == EXTIPINSEL7_A::PIN7
642    }
643}
644#[doc = "Field `EXTIPINSEL7` writer - External Interrupt 7 Pin Select"]
645pub type EXTIPINSEL7_W<'a> =
646    crate::FieldWriterSafe<'a, u32, EXTIPINSELL_SPEC, u8, EXTIPINSEL7_A, 2, 28>;
647impl<'a> EXTIPINSEL7_W<'a> {
648    #[doc = "Pin 4"]
649    #[inline(always)]
650    pub fn pin4(self) -> &'a mut W {
651        self.variant(EXTIPINSEL7_A::PIN4)
652    }
653    #[doc = "Pin 5"]
654    #[inline(always)]
655    pub fn pin5(self) -> &'a mut W {
656        self.variant(EXTIPINSEL7_A::PIN5)
657    }
658    #[doc = "Pin 6"]
659    #[inline(always)]
660    pub fn pin6(self) -> &'a mut W {
661        self.variant(EXTIPINSEL7_A::PIN6)
662    }
663    #[doc = "Pin 7"]
664    #[inline(always)]
665    pub fn pin7(self) -> &'a mut W {
666        self.variant(EXTIPINSEL7_A::PIN7)
667    }
668}
669impl R {
670    #[doc = "Bits 0:1 - External Interrupt 0 Pin Select"]
671    #[inline(always)]
672    pub fn extipinsel0(&self) -> EXTIPINSEL0_R {
673        EXTIPINSEL0_R::new((self.bits & 3) as u8)
674    }
675    #[doc = "Bits 4:5 - External Interrupt 1 Pin Select"]
676    #[inline(always)]
677    pub fn extipinsel1(&self) -> EXTIPINSEL1_R {
678        EXTIPINSEL1_R::new(((self.bits >> 4) & 3) as u8)
679    }
680    #[doc = "Bits 8:9 - External Interrupt 2 Pin Select"]
681    #[inline(always)]
682    pub fn extipinsel2(&self) -> EXTIPINSEL2_R {
683        EXTIPINSEL2_R::new(((self.bits >> 8) & 3) as u8)
684    }
685    #[doc = "Bits 12:13 - External Interrupt 3 Pin Select"]
686    #[inline(always)]
687    pub fn extipinsel3(&self) -> EXTIPINSEL3_R {
688        EXTIPINSEL3_R::new(((self.bits >> 12) & 3) as u8)
689    }
690    #[doc = "Bits 16:17 - External Interrupt 4 Pin Select"]
691    #[inline(always)]
692    pub fn extipinsel4(&self) -> EXTIPINSEL4_R {
693        EXTIPINSEL4_R::new(((self.bits >> 16) & 3) as u8)
694    }
695    #[doc = "Bits 20:21 - External Interrupt 5 Pin Select"]
696    #[inline(always)]
697    pub fn extipinsel5(&self) -> EXTIPINSEL5_R {
698        EXTIPINSEL5_R::new(((self.bits >> 20) & 3) as u8)
699    }
700    #[doc = "Bits 24:25 - External Interrupt 6 Pin Select"]
701    #[inline(always)]
702    pub fn extipinsel6(&self) -> EXTIPINSEL6_R {
703        EXTIPINSEL6_R::new(((self.bits >> 24) & 3) as u8)
704    }
705    #[doc = "Bits 28:29 - External Interrupt 7 Pin Select"]
706    #[inline(always)]
707    pub fn extipinsel7(&self) -> EXTIPINSEL7_R {
708        EXTIPINSEL7_R::new(((self.bits >> 28) & 3) as u8)
709    }
710}
711impl W {
712    #[doc = "Bits 0:1 - External Interrupt 0 Pin Select"]
713    #[inline(always)]
714    pub fn extipinsel0(&mut self) -> EXTIPINSEL0_W {
715        EXTIPINSEL0_W::new(self)
716    }
717    #[doc = "Bits 4:5 - External Interrupt 1 Pin Select"]
718    #[inline(always)]
719    pub fn extipinsel1(&mut self) -> EXTIPINSEL1_W {
720        EXTIPINSEL1_W::new(self)
721    }
722    #[doc = "Bits 8:9 - External Interrupt 2 Pin Select"]
723    #[inline(always)]
724    pub fn extipinsel2(&mut self) -> EXTIPINSEL2_W {
725        EXTIPINSEL2_W::new(self)
726    }
727    #[doc = "Bits 12:13 - External Interrupt 3 Pin Select"]
728    #[inline(always)]
729    pub fn extipinsel3(&mut self) -> EXTIPINSEL3_W {
730        EXTIPINSEL3_W::new(self)
731    }
732    #[doc = "Bits 16:17 - External Interrupt 4 Pin Select"]
733    #[inline(always)]
734    pub fn extipinsel4(&mut self) -> EXTIPINSEL4_W {
735        EXTIPINSEL4_W::new(self)
736    }
737    #[doc = "Bits 20:21 - External Interrupt 5 Pin Select"]
738    #[inline(always)]
739    pub fn extipinsel5(&mut self) -> EXTIPINSEL5_W {
740        EXTIPINSEL5_W::new(self)
741    }
742    #[doc = "Bits 24:25 - External Interrupt 6 Pin Select"]
743    #[inline(always)]
744    pub fn extipinsel6(&mut self) -> EXTIPINSEL6_W {
745        EXTIPINSEL6_W::new(self)
746    }
747    #[doc = "Bits 28:29 - External Interrupt 7 Pin Select"]
748    #[inline(always)]
749    pub fn extipinsel7(&mut self) -> EXTIPINSEL7_W {
750        EXTIPINSEL7_W::new(self)
751    }
752    #[doc = "Writes raw bits to the register."]
753    #[inline(always)]
754    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
755        self.0.bits(bits);
756        self
757    }
758}
759#[doc = "External Interrupt Pin Select Low 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 [extipinsell](index.html) module"]
760pub struct EXTIPINSELL_SPEC;
761impl crate::RegisterSpec for EXTIPINSELL_SPEC {
762    type Ux = u32;
763}
764#[doc = "`read()` method returns [extipinsell::R](R) reader structure"]
765impl crate::Readable for EXTIPINSELL_SPEC {
766    type Reader = R;
767}
768#[doc = "`write(|w| ..)` method takes [extipinsell::W](W) writer structure"]
769impl crate::Writable for EXTIPINSELL_SPEC {
770    type Writer = W;
771}
772#[doc = "`reset()` method sets EXTIPINSELL to value 0x3210_3210"]
773impl crate::Resettable for EXTIPINSELL_SPEC {
774    #[inline(always)]
775    fn reset_value() -> Self::Ux {
776        0x3210_3210
777    }
778}