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