efm32g230_pac/gpio/
extipsell.rs

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