mcxa_pac/wuu0/
pe1.rs

1#[doc = "Register `PE1` reader"]
2pub type R = crate::R<Pe1Spec>;
3#[doc = "Register `PE1` writer"]
4pub type W = crate::W<Pe1Spec>;
5#[doc = "Wake-up Pin Enable for WUU_Pn\n\nValue on reset: 0"]
6#[cfg_attr(feature = "defmt", derive(defmt::Format))]
7#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8#[repr(u8)]
9pub enum Wupe0 {
10    #[doc = "0: Disable"]
11    Disable = 0,
12    #[doc = "1: Enable (detect on rising edge or high level)"]
13    EnRiseHi = 1,
14    #[doc = "2: Enable (detect on falling edge or low level)"]
15    EnFallLo = 2,
16    #[doc = "3: Enable (detect on any edge)"]
17    EnAny = 3,
18}
19impl From<Wupe0> for u8 {
20    #[inline(always)]
21    fn from(variant: Wupe0) -> Self {
22        variant as _
23    }
24}
25impl crate::FieldSpec for Wupe0 {
26    type Ux = u8;
27}
28impl crate::IsEnum for Wupe0 {}
29#[doc = "Field `WUPE0` reader - Wake-up Pin Enable for WUU_Pn"]
30pub type Wupe0R = crate::FieldReader<Wupe0>;
31impl Wupe0R {
32    #[doc = "Get enumerated values variant"]
33    #[inline(always)]
34    pub const fn variant(&self) -> Wupe0 {
35        match self.bits {
36            0 => Wupe0::Disable,
37            1 => Wupe0::EnRiseHi,
38            2 => Wupe0::EnFallLo,
39            3 => Wupe0::EnAny,
40            _ => unreachable!(),
41        }
42    }
43    #[doc = "Disable"]
44    #[inline(always)]
45    pub fn is_disable(&self) -> bool {
46        *self == Wupe0::Disable
47    }
48    #[doc = "Enable (detect on rising edge or high level)"]
49    #[inline(always)]
50    pub fn is_en_rise_hi(&self) -> bool {
51        *self == Wupe0::EnRiseHi
52    }
53    #[doc = "Enable (detect on falling edge or low level)"]
54    #[inline(always)]
55    pub fn is_en_fall_lo(&self) -> bool {
56        *self == Wupe0::EnFallLo
57    }
58    #[doc = "Enable (detect on any edge)"]
59    #[inline(always)]
60    pub fn is_en_any(&self) -> bool {
61        *self == Wupe0::EnAny
62    }
63}
64#[doc = "Field `WUPE0` writer - Wake-up Pin Enable for WUU_Pn"]
65pub type Wupe0W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe0, crate::Safe>;
66impl<'a, REG> Wupe0W<'a, REG>
67where
68    REG: crate::Writable + crate::RegisterSpec,
69    REG::Ux: From<u8>,
70{
71    #[doc = "Disable"]
72    #[inline(always)]
73    pub fn disable(self) -> &'a mut crate::W<REG> {
74        self.variant(Wupe0::Disable)
75    }
76    #[doc = "Enable (detect on rising edge or high level)"]
77    #[inline(always)]
78    pub fn en_rise_hi(self) -> &'a mut crate::W<REG> {
79        self.variant(Wupe0::EnRiseHi)
80    }
81    #[doc = "Enable (detect on falling edge or low level)"]
82    #[inline(always)]
83    pub fn en_fall_lo(self) -> &'a mut crate::W<REG> {
84        self.variant(Wupe0::EnFallLo)
85    }
86    #[doc = "Enable (detect on any edge)"]
87    #[inline(always)]
88    pub fn en_any(self) -> &'a mut crate::W<REG> {
89        self.variant(Wupe0::EnAny)
90    }
91}
92#[doc = "Wake-up Pin Enable for WUU_Pn\n\nValue on reset: 0"]
93#[cfg_attr(feature = "defmt", derive(defmt::Format))]
94#[derive(Clone, Copy, Debug, PartialEq, Eq)]
95#[repr(u8)]
96pub enum Wupe1 {
97    #[doc = "0: Disable"]
98    Disable = 0,
99    #[doc = "1: Enable (detect on rising edge or high level)"]
100    EnRiseHi = 1,
101    #[doc = "2: Enable (detect on falling edge or low level)"]
102    EnFallLo = 2,
103    #[doc = "3: Enable (detect on any edge)"]
104    EnAny = 3,
105}
106impl From<Wupe1> for u8 {
107    #[inline(always)]
108    fn from(variant: Wupe1) -> Self {
109        variant as _
110    }
111}
112impl crate::FieldSpec for Wupe1 {
113    type Ux = u8;
114}
115impl crate::IsEnum for Wupe1 {}
116#[doc = "Field `WUPE1` reader - Wake-up Pin Enable for WUU_Pn"]
117pub type Wupe1R = crate::FieldReader<Wupe1>;
118impl Wupe1R {
119    #[doc = "Get enumerated values variant"]
120    #[inline(always)]
121    pub const fn variant(&self) -> Wupe1 {
122        match self.bits {
123            0 => Wupe1::Disable,
124            1 => Wupe1::EnRiseHi,
125            2 => Wupe1::EnFallLo,
126            3 => Wupe1::EnAny,
127            _ => unreachable!(),
128        }
129    }
130    #[doc = "Disable"]
131    #[inline(always)]
132    pub fn is_disable(&self) -> bool {
133        *self == Wupe1::Disable
134    }
135    #[doc = "Enable (detect on rising edge or high level)"]
136    #[inline(always)]
137    pub fn is_en_rise_hi(&self) -> bool {
138        *self == Wupe1::EnRiseHi
139    }
140    #[doc = "Enable (detect on falling edge or low level)"]
141    #[inline(always)]
142    pub fn is_en_fall_lo(&self) -> bool {
143        *self == Wupe1::EnFallLo
144    }
145    #[doc = "Enable (detect on any edge)"]
146    #[inline(always)]
147    pub fn is_en_any(&self) -> bool {
148        *self == Wupe1::EnAny
149    }
150}
151#[doc = "Field `WUPE1` writer - Wake-up Pin Enable for WUU_Pn"]
152pub type Wupe1W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe1, crate::Safe>;
153impl<'a, REG> Wupe1W<'a, REG>
154where
155    REG: crate::Writable + crate::RegisterSpec,
156    REG::Ux: From<u8>,
157{
158    #[doc = "Disable"]
159    #[inline(always)]
160    pub fn disable(self) -> &'a mut crate::W<REG> {
161        self.variant(Wupe1::Disable)
162    }
163    #[doc = "Enable (detect on rising edge or high level)"]
164    #[inline(always)]
165    pub fn en_rise_hi(self) -> &'a mut crate::W<REG> {
166        self.variant(Wupe1::EnRiseHi)
167    }
168    #[doc = "Enable (detect on falling edge or low level)"]
169    #[inline(always)]
170    pub fn en_fall_lo(self) -> &'a mut crate::W<REG> {
171        self.variant(Wupe1::EnFallLo)
172    }
173    #[doc = "Enable (detect on any edge)"]
174    #[inline(always)]
175    pub fn en_any(self) -> &'a mut crate::W<REG> {
176        self.variant(Wupe1::EnAny)
177    }
178}
179#[doc = "Wake-up Pin Enable for WUU_Pn\n\nValue on reset: 0"]
180#[cfg_attr(feature = "defmt", derive(defmt::Format))]
181#[derive(Clone, Copy, Debug, PartialEq, Eq)]
182#[repr(u8)]
183pub enum Wupe2 {
184    #[doc = "0: Disable"]
185    Disable = 0,
186    #[doc = "1: Enable (detect on rising edge or high level)"]
187    EnRiseHi = 1,
188    #[doc = "2: Enable (detect on falling edge or low level)"]
189    EnFallLo = 2,
190    #[doc = "3: Enable (detect on any edge)"]
191    EnAny = 3,
192}
193impl From<Wupe2> for u8 {
194    #[inline(always)]
195    fn from(variant: Wupe2) -> Self {
196        variant as _
197    }
198}
199impl crate::FieldSpec for Wupe2 {
200    type Ux = u8;
201}
202impl crate::IsEnum for Wupe2 {}
203#[doc = "Field `WUPE2` reader - Wake-up Pin Enable for WUU_Pn"]
204pub type Wupe2R = crate::FieldReader<Wupe2>;
205impl Wupe2R {
206    #[doc = "Get enumerated values variant"]
207    #[inline(always)]
208    pub const fn variant(&self) -> Wupe2 {
209        match self.bits {
210            0 => Wupe2::Disable,
211            1 => Wupe2::EnRiseHi,
212            2 => Wupe2::EnFallLo,
213            3 => Wupe2::EnAny,
214            _ => unreachable!(),
215        }
216    }
217    #[doc = "Disable"]
218    #[inline(always)]
219    pub fn is_disable(&self) -> bool {
220        *self == Wupe2::Disable
221    }
222    #[doc = "Enable (detect on rising edge or high level)"]
223    #[inline(always)]
224    pub fn is_en_rise_hi(&self) -> bool {
225        *self == Wupe2::EnRiseHi
226    }
227    #[doc = "Enable (detect on falling edge or low level)"]
228    #[inline(always)]
229    pub fn is_en_fall_lo(&self) -> bool {
230        *self == Wupe2::EnFallLo
231    }
232    #[doc = "Enable (detect on any edge)"]
233    #[inline(always)]
234    pub fn is_en_any(&self) -> bool {
235        *self == Wupe2::EnAny
236    }
237}
238#[doc = "Field `WUPE2` writer - Wake-up Pin Enable for WUU_Pn"]
239pub type Wupe2W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe2, crate::Safe>;
240impl<'a, REG> Wupe2W<'a, REG>
241where
242    REG: crate::Writable + crate::RegisterSpec,
243    REG::Ux: From<u8>,
244{
245    #[doc = "Disable"]
246    #[inline(always)]
247    pub fn disable(self) -> &'a mut crate::W<REG> {
248        self.variant(Wupe2::Disable)
249    }
250    #[doc = "Enable (detect on rising edge or high level)"]
251    #[inline(always)]
252    pub fn en_rise_hi(self) -> &'a mut crate::W<REG> {
253        self.variant(Wupe2::EnRiseHi)
254    }
255    #[doc = "Enable (detect on falling edge or low level)"]
256    #[inline(always)]
257    pub fn en_fall_lo(self) -> &'a mut crate::W<REG> {
258        self.variant(Wupe2::EnFallLo)
259    }
260    #[doc = "Enable (detect on any edge)"]
261    #[inline(always)]
262    pub fn en_any(self) -> &'a mut crate::W<REG> {
263        self.variant(Wupe2::EnAny)
264    }
265}
266#[doc = "Wake-up Pin Enable for WUU_Pn\n\nValue on reset: 0"]
267#[cfg_attr(feature = "defmt", derive(defmt::Format))]
268#[derive(Clone, Copy, Debug, PartialEq, Eq)]
269#[repr(u8)]
270pub enum Wupe3 {
271    #[doc = "0: Disable"]
272    Disable = 0,
273    #[doc = "1: Enable (detect on rising edge or high level)"]
274    EnRiseHi = 1,
275    #[doc = "2: Enable (detect on falling edge or low level)"]
276    EnFallLo = 2,
277    #[doc = "3: Enable (detect on any edge)"]
278    EnAny = 3,
279}
280impl From<Wupe3> for u8 {
281    #[inline(always)]
282    fn from(variant: Wupe3) -> Self {
283        variant as _
284    }
285}
286impl crate::FieldSpec for Wupe3 {
287    type Ux = u8;
288}
289impl crate::IsEnum for Wupe3 {}
290#[doc = "Field `WUPE3` reader - Wake-up Pin Enable for WUU_Pn"]
291pub type Wupe3R = crate::FieldReader<Wupe3>;
292impl Wupe3R {
293    #[doc = "Get enumerated values variant"]
294    #[inline(always)]
295    pub const fn variant(&self) -> Wupe3 {
296        match self.bits {
297            0 => Wupe3::Disable,
298            1 => Wupe3::EnRiseHi,
299            2 => Wupe3::EnFallLo,
300            3 => Wupe3::EnAny,
301            _ => unreachable!(),
302        }
303    }
304    #[doc = "Disable"]
305    #[inline(always)]
306    pub fn is_disable(&self) -> bool {
307        *self == Wupe3::Disable
308    }
309    #[doc = "Enable (detect on rising edge or high level)"]
310    #[inline(always)]
311    pub fn is_en_rise_hi(&self) -> bool {
312        *self == Wupe3::EnRiseHi
313    }
314    #[doc = "Enable (detect on falling edge or low level)"]
315    #[inline(always)]
316    pub fn is_en_fall_lo(&self) -> bool {
317        *self == Wupe3::EnFallLo
318    }
319    #[doc = "Enable (detect on any edge)"]
320    #[inline(always)]
321    pub fn is_en_any(&self) -> bool {
322        *self == Wupe3::EnAny
323    }
324}
325#[doc = "Field `WUPE3` writer - Wake-up Pin Enable for WUU_Pn"]
326pub type Wupe3W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe3, crate::Safe>;
327impl<'a, REG> Wupe3W<'a, REG>
328where
329    REG: crate::Writable + crate::RegisterSpec,
330    REG::Ux: From<u8>,
331{
332    #[doc = "Disable"]
333    #[inline(always)]
334    pub fn disable(self) -> &'a mut crate::W<REG> {
335        self.variant(Wupe3::Disable)
336    }
337    #[doc = "Enable (detect on rising edge or high level)"]
338    #[inline(always)]
339    pub fn en_rise_hi(self) -> &'a mut crate::W<REG> {
340        self.variant(Wupe3::EnRiseHi)
341    }
342    #[doc = "Enable (detect on falling edge or low level)"]
343    #[inline(always)]
344    pub fn en_fall_lo(self) -> &'a mut crate::W<REG> {
345        self.variant(Wupe3::EnFallLo)
346    }
347    #[doc = "Enable (detect on any edge)"]
348    #[inline(always)]
349    pub fn en_any(self) -> &'a mut crate::W<REG> {
350        self.variant(Wupe3::EnAny)
351    }
352}
353#[doc = "Wake-up Pin Enable for WUU_Pn\n\nValue on reset: 0"]
354#[cfg_attr(feature = "defmt", derive(defmt::Format))]
355#[derive(Clone, Copy, Debug, PartialEq, Eq)]
356#[repr(u8)]
357pub enum Wupe4 {
358    #[doc = "0: Disable"]
359    Disable = 0,
360    #[doc = "1: Enable (detect on rising edge or high level)"]
361    EnRiseHi = 1,
362    #[doc = "2: Enable (detect on falling edge or low level)"]
363    EnFallLo = 2,
364    #[doc = "3: Enable (detect on any edge)"]
365    EnAny = 3,
366}
367impl From<Wupe4> for u8 {
368    #[inline(always)]
369    fn from(variant: Wupe4) -> Self {
370        variant as _
371    }
372}
373impl crate::FieldSpec for Wupe4 {
374    type Ux = u8;
375}
376impl crate::IsEnum for Wupe4 {}
377#[doc = "Field `WUPE4` reader - Wake-up Pin Enable for WUU_Pn"]
378pub type Wupe4R = crate::FieldReader<Wupe4>;
379impl Wupe4R {
380    #[doc = "Get enumerated values variant"]
381    #[inline(always)]
382    pub const fn variant(&self) -> Wupe4 {
383        match self.bits {
384            0 => Wupe4::Disable,
385            1 => Wupe4::EnRiseHi,
386            2 => Wupe4::EnFallLo,
387            3 => Wupe4::EnAny,
388            _ => unreachable!(),
389        }
390    }
391    #[doc = "Disable"]
392    #[inline(always)]
393    pub fn is_disable(&self) -> bool {
394        *self == Wupe4::Disable
395    }
396    #[doc = "Enable (detect on rising edge or high level)"]
397    #[inline(always)]
398    pub fn is_en_rise_hi(&self) -> bool {
399        *self == Wupe4::EnRiseHi
400    }
401    #[doc = "Enable (detect on falling edge or low level)"]
402    #[inline(always)]
403    pub fn is_en_fall_lo(&self) -> bool {
404        *self == Wupe4::EnFallLo
405    }
406    #[doc = "Enable (detect on any edge)"]
407    #[inline(always)]
408    pub fn is_en_any(&self) -> bool {
409        *self == Wupe4::EnAny
410    }
411}
412#[doc = "Field `WUPE4` writer - Wake-up Pin Enable for WUU_Pn"]
413pub type Wupe4W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe4, crate::Safe>;
414impl<'a, REG> Wupe4W<'a, REG>
415where
416    REG: crate::Writable + crate::RegisterSpec,
417    REG::Ux: From<u8>,
418{
419    #[doc = "Disable"]
420    #[inline(always)]
421    pub fn disable(self) -> &'a mut crate::W<REG> {
422        self.variant(Wupe4::Disable)
423    }
424    #[doc = "Enable (detect on rising edge or high level)"]
425    #[inline(always)]
426    pub fn en_rise_hi(self) -> &'a mut crate::W<REG> {
427        self.variant(Wupe4::EnRiseHi)
428    }
429    #[doc = "Enable (detect on falling edge or low level)"]
430    #[inline(always)]
431    pub fn en_fall_lo(self) -> &'a mut crate::W<REG> {
432        self.variant(Wupe4::EnFallLo)
433    }
434    #[doc = "Enable (detect on any edge)"]
435    #[inline(always)]
436    pub fn en_any(self) -> &'a mut crate::W<REG> {
437        self.variant(Wupe4::EnAny)
438    }
439}
440#[doc = "Wake-up Pin Enable for WUU_Pn\n\nValue on reset: 0"]
441#[cfg_attr(feature = "defmt", derive(defmt::Format))]
442#[derive(Clone, Copy, Debug, PartialEq, Eq)]
443#[repr(u8)]
444pub enum Wupe5 {
445    #[doc = "0: Disable"]
446    Disable = 0,
447    #[doc = "1: Enable (detect on rising edge or high level)"]
448    EnRiseHi = 1,
449    #[doc = "2: Enable (detect on falling edge or low level)"]
450    EnFallLo = 2,
451    #[doc = "3: Enable (detect on any edge)"]
452    EnAny = 3,
453}
454impl From<Wupe5> for u8 {
455    #[inline(always)]
456    fn from(variant: Wupe5) -> Self {
457        variant as _
458    }
459}
460impl crate::FieldSpec for Wupe5 {
461    type Ux = u8;
462}
463impl crate::IsEnum for Wupe5 {}
464#[doc = "Field `WUPE5` reader - Wake-up Pin Enable for WUU_Pn"]
465pub type Wupe5R = crate::FieldReader<Wupe5>;
466impl Wupe5R {
467    #[doc = "Get enumerated values variant"]
468    #[inline(always)]
469    pub const fn variant(&self) -> Wupe5 {
470        match self.bits {
471            0 => Wupe5::Disable,
472            1 => Wupe5::EnRiseHi,
473            2 => Wupe5::EnFallLo,
474            3 => Wupe5::EnAny,
475            _ => unreachable!(),
476        }
477    }
478    #[doc = "Disable"]
479    #[inline(always)]
480    pub fn is_disable(&self) -> bool {
481        *self == Wupe5::Disable
482    }
483    #[doc = "Enable (detect on rising edge or high level)"]
484    #[inline(always)]
485    pub fn is_en_rise_hi(&self) -> bool {
486        *self == Wupe5::EnRiseHi
487    }
488    #[doc = "Enable (detect on falling edge or low level)"]
489    #[inline(always)]
490    pub fn is_en_fall_lo(&self) -> bool {
491        *self == Wupe5::EnFallLo
492    }
493    #[doc = "Enable (detect on any edge)"]
494    #[inline(always)]
495    pub fn is_en_any(&self) -> bool {
496        *self == Wupe5::EnAny
497    }
498}
499#[doc = "Field `WUPE5` writer - Wake-up Pin Enable for WUU_Pn"]
500pub type Wupe5W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe5, crate::Safe>;
501impl<'a, REG> Wupe5W<'a, REG>
502where
503    REG: crate::Writable + crate::RegisterSpec,
504    REG::Ux: From<u8>,
505{
506    #[doc = "Disable"]
507    #[inline(always)]
508    pub fn disable(self) -> &'a mut crate::W<REG> {
509        self.variant(Wupe5::Disable)
510    }
511    #[doc = "Enable (detect on rising edge or high level)"]
512    #[inline(always)]
513    pub fn en_rise_hi(self) -> &'a mut crate::W<REG> {
514        self.variant(Wupe5::EnRiseHi)
515    }
516    #[doc = "Enable (detect on falling edge or low level)"]
517    #[inline(always)]
518    pub fn en_fall_lo(self) -> &'a mut crate::W<REG> {
519        self.variant(Wupe5::EnFallLo)
520    }
521    #[doc = "Enable (detect on any edge)"]
522    #[inline(always)]
523    pub fn en_any(self) -> &'a mut crate::W<REG> {
524        self.variant(Wupe5::EnAny)
525    }
526}
527#[doc = "Wake-up Pin Enable for WUU_Pn\n\nValue on reset: 0"]
528#[cfg_attr(feature = "defmt", derive(defmt::Format))]
529#[derive(Clone, Copy, Debug, PartialEq, Eq)]
530#[repr(u8)]
531pub enum Wupe6 {
532    #[doc = "0: Disable"]
533    Disable = 0,
534    #[doc = "1: Enable (detect on rising edge or high level)"]
535    EnRiseHi = 1,
536    #[doc = "2: Enable (detect on falling edge or low level)"]
537    EnFallLo = 2,
538    #[doc = "3: Enable (detect on any edge)"]
539    EnAny = 3,
540}
541impl From<Wupe6> for u8 {
542    #[inline(always)]
543    fn from(variant: Wupe6) -> Self {
544        variant as _
545    }
546}
547impl crate::FieldSpec for Wupe6 {
548    type Ux = u8;
549}
550impl crate::IsEnum for Wupe6 {}
551#[doc = "Field `WUPE6` reader - Wake-up Pin Enable for WUU_Pn"]
552pub type Wupe6R = crate::FieldReader<Wupe6>;
553impl Wupe6R {
554    #[doc = "Get enumerated values variant"]
555    #[inline(always)]
556    pub const fn variant(&self) -> Wupe6 {
557        match self.bits {
558            0 => Wupe6::Disable,
559            1 => Wupe6::EnRiseHi,
560            2 => Wupe6::EnFallLo,
561            3 => Wupe6::EnAny,
562            _ => unreachable!(),
563        }
564    }
565    #[doc = "Disable"]
566    #[inline(always)]
567    pub fn is_disable(&self) -> bool {
568        *self == Wupe6::Disable
569    }
570    #[doc = "Enable (detect on rising edge or high level)"]
571    #[inline(always)]
572    pub fn is_en_rise_hi(&self) -> bool {
573        *self == Wupe6::EnRiseHi
574    }
575    #[doc = "Enable (detect on falling edge or low level)"]
576    #[inline(always)]
577    pub fn is_en_fall_lo(&self) -> bool {
578        *self == Wupe6::EnFallLo
579    }
580    #[doc = "Enable (detect on any edge)"]
581    #[inline(always)]
582    pub fn is_en_any(&self) -> bool {
583        *self == Wupe6::EnAny
584    }
585}
586#[doc = "Field `WUPE6` writer - Wake-up Pin Enable for WUU_Pn"]
587pub type Wupe6W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe6, crate::Safe>;
588impl<'a, REG> Wupe6W<'a, REG>
589where
590    REG: crate::Writable + crate::RegisterSpec,
591    REG::Ux: From<u8>,
592{
593    #[doc = "Disable"]
594    #[inline(always)]
595    pub fn disable(self) -> &'a mut crate::W<REG> {
596        self.variant(Wupe6::Disable)
597    }
598    #[doc = "Enable (detect on rising edge or high level)"]
599    #[inline(always)]
600    pub fn en_rise_hi(self) -> &'a mut crate::W<REG> {
601        self.variant(Wupe6::EnRiseHi)
602    }
603    #[doc = "Enable (detect on falling edge or low level)"]
604    #[inline(always)]
605    pub fn en_fall_lo(self) -> &'a mut crate::W<REG> {
606        self.variant(Wupe6::EnFallLo)
607    }
608    #[doc = "Enable (detect on any edge)"]
609    #[inline(always)]
610    pub fn en_any(self) -> &'a mut crate::W<REG> {
611        self.variant(Wupe6::EnAny)
612    }
613}
614#[doc = "Wake-up Pin Enable for WUU_Pn\n\nValue on reset: 0"]
615#[cfg_attr(feature = "defmt", derive(defmt::Format))]
616#[derive(Clone, Copy, Debug, PartialEq, Eq)]
617#[repr(u8)]
618pub enum Wupe7 {
619    #[doc = "0: Disable"]
620    Disable = 0,
621    #[doc = "1: Enable (detect on rising edge or high level)"]
622    EnRiseHi = 1,
623    #[doc = "2: Enable (detect on falling edge or low level)"]
624    EnFallLo = 2,
625    #[doc = "3: Enable (detect on any edge)"]
626    EnAny = 3,
627}
628impl From<Wupe7> for u8 {
629    #[inline(always)]
630    fn from(variant: Wupe7) -> Self {
631        variant as _
632    }
633}
634impl crate::FieldSpec for Wupe7 {
635    type Ux = u8;
636}
637impl crate::IsEnum for Wupe7 {}
638#[doc = "Field `WUPE7` reader - Wake-up Pin Enable for WUU_Pn"]
639pub type Wupe7R = crate::FieldReader<Wupe7>;
640impl Wupe7R {
641    #[doc = "Get enumerated values variant"]
642    #[inline(always)]
643    pub const fn variant(&self) -> Wupe7 {
644        match self.bits {
645            0 => Wupe7::Disable,
646            1 => Wupe7::EnRiseHi,
647            2 => Wupe7::EnFallLo,
648            3 => Wupe7::EnAny,
649            _ => unreachable!(),
650        }
651    }
652    #[doc = "Disable"]
653    #[inline(always)]
654    pub fn is_disable(&self) -> bool {
655        *self == Wupe7::Disable
656    }
657    #[doc = "Enable (detect on rising edge or high level)"]
658    #[inline(always)]
659    pub fn is_en_rise_hi(&self) -> bool {
660        *self == Wupe7::EnRiseHi
661    }
662    #[doc = "Enable (detect on falling edge or low level)"]
663    #[inline(always)]
664    pub fn is_en_fall_lo(&self) -> bool {
665        *self == Wupe7::EnFallLo
666    }
667    #[doc = "Enable (detect on any edge)"]
668    #[inline(always)]
669    pub fn is_en_any(&self) -> bool {
670        *self == Wupe7::EnAny
671    }
672}
673#[doc = "Field `WUPE7` writer - Wake-up Pin Enable for WUU_Pn"]
674pub type Wupe7W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe7, crate::Safe>;
675impl<'a, REG> Wupe7W<'a, REG>
676where
677    REG: crate::Writable + crate::RegisterSpec,
678    REG::Ux: From<u8>,
679{
680    #[doc = "Disable"]
681    #[inline(always)]
682    pub fn disable(self) -> &'a mut crate::W<REG> {
683        self.variant(Wupe7::Disable)
684    }
685    #[doc = "Enable (detect on rising edge or high level)"]
686    #[inline(always)]
687    pub fn en_rise_hi(self) -> &'a mut crate::W<REG> {
688        self.variant(Wupe7::EnRiseHi)
689    }
690    #[doc = "Enable (detect on falling edge or low level)"]
691    #[inline(always)]
692    pub fn en_fall_lo(self) -> &'a mut crate::W<REG> {
693        self.variant(Wupe7::EnFallLo)
694    }
695    #[doc = "Enable (detect on any edge)"]
696    #[inline(always)]
697    pub fn en_any(self) -> &'a mut crate::W<REG> {
698        self.variant(Wupe7::EnAny)
699    }
700}
701#[doc = "Wake-up Pin Enable for WUU_Pn\n\nValue on reset: 0"]
702#[cfg_attr(feature = "defmt", derive(defmt::Format))]
703#[derive(Clone, Copy, Debug, PartialEq, Eq)]
704#[repr(u8)]
705pub enum Wupe8 {
706    #[doc = "0: Disable"]
707    Disable = 0,
708    #[doc = "1: Enable (detect on rising edge or high level)"]
709    EnRiseHi = 1,
710    #[doc = "2: Enable (detect on falling edge or low level)"]
711    EnFallLo = 2,
712    #[doc = "3: Enable (detect on any edge)"]
713    EnAny = 3,
714}
715impl From<Wupe8> for u8 {
716    #[inline(always)]
717    fn from(variant: Wupe8) -> Self {
718        variant as _
719    }
720}
721impl crate::FieldSpec for Wupe8 {
722    type Ux = u8;
723}
724impl crate::IsEnum for Wupe8 {}
725#[doc = "Field `WUPE8` reader - Wake-up Pin Enable for WUU_Pn"]
726pub type Wupe8R = crate::FieldReader<Wupe8>;
727impl Wupe8R {
728    #[doc = "Get enumerated values variant"]
729    #[inline(always)]
730    pub const fn variant(&self) -> Wupe8 {
731        match self.bits {
732            0 => Wupe8::Disable,
733            1 => Wupe8::EnRiseHi,
734            2 => Wupe8::EnFallLo,
735            3 => Wupe8::EnAny,
736            _ => unreachable!(),
737        }
738    }
739    #[doc = "Disable"]
740    #[inline(always)]
741    pub fn is_disable(&self) -> bool {
742        *self == Wupe8::Disable
743    }
744    #[doc = "Enable (detect on rising edge or high level)"]
745    #[inline(always)]
746    pub fn is_en_rise_hi(&self) -> bool {
747        *self == Wupe8::EnRiseHi
748    }
749    #[doc = "Enable (detect on falling edge or low level)"]
750    #[inline(always)]
751    pub fn is_en_fall_lo(&self) -> bool {
752        *self == Wupe8::EnFallLo
753    }
754    #[doc = "Enable (detect on any edge)"]
755    #[inline(always)]
756    pub fn is_en_any(&self) -> bool {
757        *self == Wupe8::EnAny
758    }
759}
760#[doc = "Field `WUPE8` writer - Wake-up Pin Enable for WUU_Pn"]
761pub type Wupe8W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe8, crate::Safe>;
762impl<'a, REG> Wupe8W<'a, REG>
763where
764    REG: crate::Writable + crate::RegisterSpec,
765    REG::Ux: From<u8>,
766{
767    #[doc = "Disable"]
768    #[inline(always)]
769    pub fn disable(self) -> &'a mut crate::W<REG> {
770        self.variant(Wupe8::Disable)
771    }
772    #[doc = "Enable (detect on rising edge or high level)"]
773    #[inline(always)]
774    pub fn en_rise_hi(self) -> &'a mut crate::W<REG> {
775        self.variant(Wupe8::EnRiseHi)
776    }
777    #[doc = "Enable (detect on falling edge or low level)"]
778    #[inline(always)]
779    pub fn en_fall_lo(self) -> &'a mut crate::W<REG> {
780        self.variant(Wupe8::EnFallLo)
781    }
782    #[doc = "Enable (detect on any edge)"]
783    #[inline(always)]
784    pub fn en_any(self) -> &'a mut crate::W<REG> {
785        self.variant(Wupe8::EnAny)
786    }
787}
788#[doc = "Wake-up Pin Enable for WUU_Pn\n\nValue on reset: 0"]
789#[cfg_attr(feature = "defmt", derive(defmt::Format))]
790#[derive(Clone, Copy, Debug, PartialEq, Eq)]
791#[repr(u8)]
792pub enum Wupe9 {
793    #[doc = "0: Disable"]
794    Disable = 0,
795    #[doc = "1: Enable (detect on rising edge or high level)"]
796    EnRiseHi = 1,
797    #[doc = "2: Enable (detect on falling edge or low level)"]
798    EnFallLo = 2,
799    #[doc = "3: Enable (detect on any edge)"]
800    EnAny = 3,
801}
802impl From<Wupe9> for u8 {
803    #[inline(always)]
804    fn from(variant: Wupe9) -> Self {
805        variant as _
806    }
807}
808impl crate::FieldSpec for Wupe9 {
809    type Ux = u8;
810}
811impl crate::IsEnum for Wupe9 {}
812#[doc = "Field `WUPE9` reader - Wake-up Pin Enable for WUU_Pn"]
813pub type Wupe9R = crate::FieldReader<Wupe9>;
814impl Wupe9R {
815    #[doc = "Get enumerated values variant"]
816    #[inline(always)]
817    pub const fn variant(&self) -> Wupe9 {
818        match self.bits {
819            0 => Wupe9::Disable,
820            1 => Wupe9::EnRiseHi,
821            2 => Wupe9::EnFallLo,
822            3 => Wupe9::EnAny,
823            _ => unreachable!(),
824        }
825    }
826    #[doc = "Disable"]
827    #[inline(always)]
828    pub fn is_disable(&self) -> bool {
829        *self == Wupe9::Disable
830    }
831    #[doc = "Enable (detect on rising edge or high level)"]
832    #[inline(always)]
833    pub fn is_en_rise_hi(&self) -> bool {
834        *self == Wupe9::EnRiseHi
835    }
836    #[doc = "Enable (detect on falling edge or low level)"]
837    #[inline(always)]
838    pub fn is_en_fall_lo(&self) -> bool {
839        *self == Wupe9::EnFallLo
840    }
841    #[doc = "Enable (detect on any edge)"]
842    #[inline(always)]
843    pub fn is_en_any(&self) -> bool {
844        *self == Wupe9::EnAny
845    }
846}
847#[doc = "Field `WUPE9` writer - Wake-up Pin Enable for WUU_Pn"]
848pub type Wupe9W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe9, crate::Safe>;
849impl<'a, REG> Wupe9W<'a, REG>
850where
851    REG: crate::Writable + crate::RegisterSpec,
852    REG::Ux: From<u8>,
853{
854    #[doc = "Disable"]
855    #[inline(always)]
856    pub fn disable(self) -> &'a mut crate::W<REG> {
857        self.variant(Wupe9::Disable)
858    }
859    #[doc = "Enable (detect on rising edge or high level)"]
860    #[inline(always)]
861    pub fn en_rise_hi(self) -> &'a mut crate::W<REG> {
862        self.variant(Wupe9::EnRiseHi)
863    }
864    #[doc = "Enable (detect on falling edge or low level)"]
865    #[inline(always)]
866    pub fn en_fall_lo(self) -> &'a mut crate::W<REG> {
867        self.variant(Wupe9::EnFallLo)
868    }
869    #[doc = "Enable (detect on any edge)"]
870    #[inline(always)]
871    pub fn en_any(self) -> &'a mut crate::W<REG> {
872        self.variant(Wupe9::EnAny)
873    }
874}
875#[doc = "Wake-up Pin Enable for WUU_Pn\n\nValue on reset: 0"]
876#[cfg_attr(feature = "defmt", derive(defmt::Format))]
877#[derive(Clone, Copy, Debug, PartialEq, Eq)]
878#[repr(u8)]
879pub enum Wupe10 {
880    #[doc = "0: Disable"]
881    Disable = 0,
882    #[doc = "1: Enable (detect on rising edge or high level)"]
883    EnRiseHi = 1,
884    #[doc = "2: Enable (detect on falling edge or low level)"]
885    EnFallLo = 2,
886    #[doc = "3: Enable (detect on any edge)"]
887    EnAny = 3,
888}
889impl From<Wupe10> for u8 {
890    #[inline(always)]
891    fn from(variant: Wupe10) -> Self {
892        variant as _
893    }
894}
895impl crate::FieldSpec for Wupe10 {
896    type Ux = u8;
897}
898impl crate::IsEnum for Wupe10 {}
899#[doc = "Field `WUPE10` reader - Wake-up Pin Enable for WUU_Pn"]
900pub type Wupe10R = crate::FieldReader<Wupe10>;
901impl Wupe10R {
902    #[doc = "Get enumerated values variant"]
903    #[inline(always)]
904    pub const fn variant(&self) -> Wupe10 {
905        match self.bits {
906            0 => Wupe10::Disable,
907            1 => Wupe10::EnRiseHi,
908            2 => Wupe10::EnFallLo,
909            3 => Wupe10::EnAny,
910            _ => unreachable!(),
911        }
912    }
913    #[doc = "Disable"]
914    #[inline(always)]
915    pub fn is_disable(&self) -> bool {
916        *self == Wupe10::Disable
917    }
918    #[doc = "Enable (detect on rising edge or high level)"]
919    #[inline(always)]
920    pub fn is_en_rise_hi(&self) -> bool {
921        *self == Wupe10::EnRiseHi
922    }
923    #[doc = "Enable (detect on falling edge or low level)"]
924    #[inline(always)]
925    pub fn is_en_fall_lo(&self) -> bool {
926        *self == Wupe10::EnFallLo
927    }
928    #[doc = "Enable (detect on any edge)"]
929    #[inline(always)]
930    pub fn is_en_any(&self) -> bool {
931        *self == Wupe10::EnAny
932    }
933}
934#[doc = "Field `WUPE10` writer - Wake-up Pin Enable for WUU_Pn"]
935pub type Wupe10W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe10, crate::Safe>;
936impl<'a, REG> Wupe10W<'a, REG>
937where
938    REG: crate::Writable + crate::RegisterSpec,
939    REG::Ux: From<u8>,
940{
941    #[doc = "Disable"]
942    #[inline(always)]
943    pub fn disable(self) -> &'a mut crate::W<REG> {
944        self.variant(Wupe10::Disable)
945    }
946    #[doc = "Enable (detect on rising edge or high level)"]
947    #[inline(always)]
948    pub fn en_rise_hi(self) -> &'a mut crate::W<REG> {
949        self.variant(Wupe10::EnRiseHi)
950    }
951    #[doc = "Enable (detect on falling edge or low level)"]
952    #[inline(always)]
953    pub fn en_fall_lo(self) -> &'a mut crate::W<REG> {
954        self.variant(Wupe10::EnFallLo)
955    }
956    #[doc = "Enable (detect on any edge)"]
957    #[inline(always)]
958    pub fn en_any(self) -> &'a mut crate::W<REG> {
959        self.variant(Wupe10::EnAny)
960    }
961}
962#[doc = "Wake-up Pin Enable for WUU_Pn\n\nValue on reset: 0"]
963#[cfg_attr(feature = "defmt", derive(defmt::Format))]
964#[derive(Clone, Copy, Debug, PartialEq, Eq)]
965#[repr(u8)]
966pub enum Wupe11 {
967    #[doc = "0: Disable"]
968    Disable = 0,
969    #[doc = "1: Enable (detect on rising edge or high level)"]
970    EnRiseHi = 1,
971    #[doc = "2: Enable (detect on falling edge or low level)"]
972    EnFallLo = 2,
973    #[doc = "3: Enable (detect on any edge)"]
974    EnAny = 3,
975}
976impl From<Wupe11> for u8 {
977    #[inline(always)]
978    fn from(variant: Wupe11) -> Self {
979        variant as _
980    }
981}
982impl crate::FieldSpec for Wupe11 {
983    type Ux = u8;
984}
985impl crate::IsEnum for Wupe11 {}
986#[doc = "Field `WUPE11` reader - Wake-up Pin Enable for WUU_Pn"]
987pub type Wupe11R = crate::FieldReader<Wupe11>;
988impl Wupe11R {
989    #[doc = "Get enumerated values variant"]
990    #[inline(always)]
991    pub const fn variant(&self) -> Wupe11 {
992        match self.bits {
993            0 => Wupe11::Disable,
994            1 => Wupe11::EnRiseHi,
995            2 => Wupe11::EnFallLo,
996            3 => Wupe11::EnAny,
997            _ => unreachable!(),
998        }
999    }
1000    #[doc = "Disable"]
1001    #[inline(always)]
1002    pub fn is_disable(&self) -> bool {
1003        *self == Wupe11::Disable
1004    }
1005    #[doc = "Enable (detect on rising edge or high level)"]
1006    #[inline(always)]
1007    pub fn is_en_rise_hi(&self) -> bool {
1008        *self == Wupe11::EnRiseHi
1009    }
1010    #[doc = "Enable (detect on falling edge or low level)"]
1011    #[inline(always)]
1012    pub fn is_en_fall_lo(&self) -> bool {
1013        *self == Wupe11::EnFallLo
1014    }
1015    #[doc = "Enable (detect on any edge)"]
1016    #[inline(always)]
1017    pub fn is_en_any(&self) -> bool {
1018        *self == Wupe11::EnAny
1019    }
1020}
1021#[doc = "Field `WUPE11` writer - Wake-up Pin Enable for WUU_Pn"]
1022pub type Wupe11W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe11, crate::Safe>;
1023impl<'a, REG> Wupe11W<'a, REG>
1024where
1025    REG: crate::Writable + crate::RegisterSpec,
1026    REG::Ux: From<u8>,
1027{
1028    #[doc = "Disable"]
1029    #[inline(always)]
1030    pub fn disable(self) -> &'a mut crate::W<REG> {
1031        self.variant(Wupe11::Disable)
1032    }
1033    #[doc = "Enable (detect on rising edge or high level)"]
1034    #[inline(always)]
1035    pub fn en_rise_hi(self) -> &'a mut crate::W<REG> {
1036        self.variant(Wupe11::EnRiseHi)
1037    }
1038    #[doc = "Enable (detect on falling edge or low level)"]
1039    #[inline(always)]
1040    pub fn en_fall_lo(self) -> &'a mut crate::W<REG> {
1041        self.variant(Wupe11::EnFallLo)
1042    }
1043    #[doc = "Enable (detect on any edge)"]
1044    #[inline(always)]
1045    pub fn en_any(self) -> &'a mut crate::W<REG> {
1046        self.variant(Wupe11::EnAny)
1047    }
1048}
1049#[doc = "Wake-up Pin Enable for WUU_Pn\n\nValue on reset: 0"]
1050#[cfg_attr(feature = "defmt", derive(defmt::Format))]
1051#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1052#[repr(u8)]
1053pub enum Wupe12 {
1054    #[doc = "0: Disable"]
1055    Disable = 0,
1056    #[doc = "1: Enable (detect on rising edge or high level)"]
1057    EnRiseHi = 1,
1058    #[doc = "2: Enable (detect on falling edge or low level)"]
1059    EnFallLo = 2,
1060    #[doc = "3: Enable (detect on any edge)"]
1061    EnAny = 3,
1062}
1063impl From<Wupe12> for u8 {
1064    #[inline(always)]
1065    fn from(variant: Wupe12) -> Self {
1066        variant as _
1067    }
1068}
1069impl crate::FieldSpec for Wupe12 {
1070    type Ux = u8;
1071}
1072impl crate::IsEnum for Wupe12 {}
1073#[doc = "Field `WUPE12` reader - Wake-up Pin Enable for WUU_Pn"]
1074pub type Wupe12R = crate::FieldReader<Wupe12>;
1075impl Wupe12R {
1076    #[doc = "Get enumerated values variant"]
1077    #[inline(always)]
1078    pub const fn variant(&self) -> Wupe12 {
1079        match self.bits {
1080            0 => Wupe12::Disable,
1081            1 => Wupe12::EnRiseHi,
1082            2 => Wupe12::EnFallLo,
1083            3 => Wupe12::EnAny,
1084            _ => unreachable!(),
1085        }
1086    }
1087    #[doc = "Disable"]
1088    #[inline(always)]
1089    pub fn is_disable(&self) -> bool {
1090        *self == Wupe12::Disable
1091    }
1092    #[doc = "Enable (detect on rising edge or high level)"]
1093    #[inline(always)]
1094    pub fn is_en_rise_hi(&self) -> bool {
1095        *self == Wupe12::EnRiseHi
1096    }
1097    #[doc = "Enable (detect on falling edge or low level)"]
1098    #[inline(always)]
1099    pub fn is_en_fall_lo(&self) -> bool {
1100        *self == Wupe12::EnFallLo
1101    }
1102    #[doc = "Enable (detect on any edge)"]
1103    #[inline(always)]
1104    pub fn is_en_any(&self) -> bool {
1105        *self == Wupe12::EnAny
1106    }
1107}
1108#[doc = "Field `WUPE12` writer - Wake-up Pin Enable for WUU_Pn"]
1109pub type Wupe12W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe12, crate::Safe>;
1110impl<'a, REG> Wupe12W<'a, REG>
1111where
1112    REG: crate::Writable + crate::RegisterSpec,
1113    REG::Ux: From<u8>,
1114{
1115    #[doc = "Disable"]
1116    #[inline(always)]
1117    pub fn disable(self) -> &'a mut crate::W<REG> {
1118        self.variant(Wupe12::Disable)
1119    }
1120    #[doc = "Enable (detect on rising edge or high level)"]
1121    #[inline(always)]
1122    pub fn en_rise_hi(self) -> &'a mut crate::W<REG> {
1123        self.variant(Wupe12::EnRiseHi)
1124    }
1125    #[doc = "Enable (detect on falling edge or low level)"]
1126    #[inline(always)]
1127    pub fn en_fall_lo(self) -> &'a mut crate::W<REG> {
1128        self.variant(Wupe12::EnFallLo)
1129    }
1130    #[doc = "Enable (detect on any edge)"]
1131    #[inline(always)]
1132    pub fn en_any(self) -> &'a mut crate::W<REG> {
1133        self.variant(Wupe12::EnAny)
1134    }
1135}
1136#[doc = "Wake-up Pin Enable for WUU_Pn\n\nValue on reset: 0"]
1137#[cfg_attr(feature = "defmt", derive(defmt::Format))]
1138#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1139#[repr(u8)]
1140pub enum Wupe13 {
1141    #[doc = "0: Disable"]
1142    Disable = 0,
1143    #[doc = "1: Enable (detect on rising edge or high level)"]
1144    EnRiseHi = 1,
1145    #[doc = "2: Enable (detect on falling edge or low level)"]
1146    EnFallLo = 2,
1147    #[doc = "3: Enable (detect on any edge)"]
1148    EnAny = 3,
1149}
1150impl From<Wupe13> for u8 {
1151    #[inline(always)]
1152    fn from(variant: Wupe13) -> Self {
1153        variant as _
1154    }
1155}
1156impl crate::FieldSpec for Wupe13 {
1157    type Ux = u8;
1158}
1159impl crate::IsEnum for Wupe13 {}
1160#[doc = "Field `WUPE13` reader - Wake-up Pin Enable for WUU_Pn"]
1161pub type Wupe13R = crate::FieldReader<Wupe13>;
1162impl Wupe13R {
1163    #[doc = "Get enumerated values variant"]
1164    #[inline(always)]
1165    pub const fn variant(&self) -> Wupe13 {
1166        match self.bits {
1167            0 => Wupe13::Disable,
1168            1 => Wupe13::EnRiseHi,
1169            2 => Wupe13::EnFallLo,
1170            3 => Wupe13::EnAny,
1171            _ => unreachable!(),
1172        }
1173    }
1174    #[doc = "Disable"]
1175    #[inline(always)]
1176    pub fn is_disable(&self) -> bool {
1177        *self == Wupe13::Disable
1178    }
1179    #[doc = "Enable (detect on rising edge or high level)"]
1180    #[inline(always)]
1181    pub fn is_en_rise_hi(&self) -> bool {
1182        *self == Wupe13::EnRiseHi
1183    }
1184    #[doc = "Enable (detect on falling edge or low level)"]
1185    #[inline(always)]
1186    pub fn is_en_fall_lo(&self) -> bool {
1187        *self == Wupe13::EnFallLo
1188    }
1189    #[doc = "Enable (detect on any edge)"]
1190    #[inline(always)]
1191    pub fn is_en_any(&self) -> bool {
1192        *self == Wupe13::EnAny
1193    }
1194}
1195#[doc = "Field `WUPE13` writer - Wake-up Pin Enable for WUU_Pn"]
1196pub type Wupe13W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe13, crate::Safe>;
1197impl<'a, REG> Wupe13W<'a, REG>
1198where
1199    REG: crate::Writable + crate::RegisterSpec,
1200    REG::Ux: From<u8>,
1201{
1202    #[doc = "Disable"]
1203    #[inline(always)]
1204    pub fn disable(self) -> &'a mut crate::W<REG> {
1205        self.variant(Wupe13::Disable)
1206    }
1207    #[doc = "Enable (detect on rising edge or high level)"]
1208    #[inline(always)]
1209    pub fn en_rise_hi(self) -> &'a mut crate::W<REG> {
1210        self.variant(Wupe13::EnRiseHi)
1211    }
1212    #[doc = "Enable (detect on falling edge or low level)"]
1213    #[inline(always)]
1214    pub fn en_fall_lo(self) -> &'a mut crate::W<REG> {
1215        self.variant(Wupe13::EnFallLo)
1216    }
1217    #[doc = "Enable (detect on any edge)"]
1218    #[inline(always)]
1219    pub fn en_any(self) -> &'a mut crate::W<REG> {
1220        self.variant(Wupe13::EnAny)
1221    }
1222}
1223#[doc = "Wake-up Pin Enable for WUU_Pn\n\nValue on reset: 0"]
1224#[cfg_attr(feature = "defmt", derive(defmt::Format))]
1225#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1226#[repr(u8)]
1227pub enum Wupe14 {
1228    #[doc = "0: Disable"]
1229    Disable = 0,
1230    #[doc = "1: Enable (detect on rising edge or high level)"]
1231    EnRiseHi = 1,
1232    #[doc = "2: Enable (detect on falling edge or low level)"]
1233    EnFallLo = 2,
1234    #[doc = "3: Enable (detect on any edge)"]
1235    EnAny = 3,
1236}
1237impl From<Wupe14> for u8 {
1238    #[inline(always)]
1239    fn from(variant: Wupe14) -> Self {
1240        variant as _
1241    }
1242}
1243impl crate::FieldSpec for Wupe14 {
1244    type Ux = u8;
1245}
1246impl crate::IsEnum for Wupe14 {}
1247#[doc = "Field `WUPE14` reader - Wake-up Pin Enable for WUU_Pn"]
1248pub type Wupe14R = crate::FieldReader<Wupe14>;
1249impl Wupe14R {
1250    #[doc = "Get enumerated values variant"]
1251    #[inline(always)]
1252    pub const fn variant(&self) -> Wupe14 {
1253        match self.bits {
1254            0 => Wupe14::Disable,
1255            1 => Wupe14::EnRiseHi,
1256            2 => Wupe14::EnFallLo,
1257            3 => Wupe14::EnAny,
1258            _ => unreachable!(),
1259        }
1260    }
1261    #[doc = "Disable"]
1262    #[inline(always)]
1263    pub fn is_disable(&self) -> bool {
1264        *self == Wupe14::Disable
1265    }
1266    #[doc = "Enable (detect on rising edge or high level)"]
1267    #[inline(always)]
1268    pub fn is_en_rise_hi(&self) -> bool {
1269        *self == Wupe14::EnRiseHi
1270    }
1271    #[doc = "Enable (detect on falling edge or low level)"]
1272    #[inline(always)]
1273    pub fn is_en_fall_lo(&self) -> bool {
1274        *self == Wupe14::EnFallLo
1275    }
1276    #[doc = "Enable (detect on any edge)"]
1277    #[inline(always)]
1278    pub fn is_en_any(&self) -> bool {
1279        *self == Wupe14::EnAny
1280    }
1281}
1282#[doc = "Field `WUPE14` writer - Wake-up Pin Enable for WUU_Pn"]
1283pub type Wupe14W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe14, crate::Safe>;
1284impl<'a, REG> Wupe14W<'a, REG>
1285where
1286    REG: crate::Writable + crate::RegisterSpec,
1287    REG::Ux: From<u8>,
1288{
1289    #[doc = "Disable"]
1290    #[inline(always)]
1291    pub fn disable(self) -> &'a mut crate::W<REG> {
1292        self.variant(Wupe14::Disable)
1293    }
1294    #[doc = "Enable (detect on rising edge or high level)"]
1295    #[inline(always)]
1296    pub fn en_rise_hi(self) -> &'a mut crate::W<REG> {
1297        self.variant(Wupe14::EnRiseHi)
1298    }
1299    #[doc = "Enable (detect on falling edge or low level)"]
1300    #[inline(always)]
1301    pub fn en_fall_lo(self) -> &'a mut crate::W<REG> {
1302        self.variant(Wupe14::EnFallLo)
1303    }
1304    #[doc = "Enable (detect on any edge)"]
1305    #[inline(always)]
1306    pub fn en_any(self) -> &'a mut crate::W<REG> {
1307        self.variant(Wupe14::EnAny)
1308    }
1309}
1310#[doc = "Wake-up Pin Enable for WUU_Pn\n\nValue on reset: 0"]
1311#[cfg_attr(feature = "defmt", derive(defmt::Format))]
1312#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1313#[repr(u8)]
1314pub enum Wupe15 {
1315    #[doc = "0: Disable"]
1316    Disable = 0,
1317    #[doc = "1: Enable (detect on rising edge or high level)"]
1318    EnRiseHi = 1,
1319    #[doc = "2: Enable (detect on falling edge or low level)"]
1320    EnFallLo = 2,
1321    #[doc = "3: Enable (detect on any edge)"]
1322    EnAny = 3,
1323}
1324impl From<Wupe15> for u8 {
1325    #[inline(always)]
1326    fn from(variant: Wupe15) -> Self {
1327        variant as _
1328    }
1329}
1330impl crate::FieldSpec for Wupe15 {
1331    type Ux = u8;
1332}
1333impl crate::IsEnum for Wupe15 {}
1334#[doc = "Field `WUPE15` reader - Wake-up Pin Enable for WUU_Pn"]
1335pub type Wupe15R = crate::FieldReader<Wupe15>;
1336impl Wupe15R {
1337    #[doc = "Get enumerated values variant"]
1338    #[inline(always)]
1339    pub const fn variant(&self) -> Wupe15 {
1340        match self.bits {
1341            0 => Wupe15::Disable,
1342            1 => Wupe15::EnRiseHi,
1343            2 => Wupe15::EnFallLo,
1344            3 => Wupe15::EnAny,
1345            _ => unreachable!(),
1346        }
1347    }
1348    #[doc = "Disable"]
1349    #[inline(always)]
1350    pub fn is_disable(&self) -> bool {
1351        *self == Wupe15::Disable
1352    }
1353    #[doc = "Enable (detect on rising edge or high level)"]
1354    #[inline(always)]
1355    pub fn is_en_rise_hi(&self) -> bool {
1356        *self == Wupe15::EnRiseHi
1357    }
1358    #[doc = "Enable (detect on falling edge or low level)"]
1359    #[inline(always)]
1360    pub fn is_en_fall_lo(&self) -> bool {
1361        *self == Wupe15::EnFallLo
1362    }
1363    #[doc = "Enable (detect on any edge)"]
1364    #[inline(always)]
1365    pub fn is_en_any(&self) -> bool {
1366        *self == Wupe15::EnAny
1367    }
1368}
1369#[doc = "Field `WUPE15` writer - Wake-up Pin Enable for WUU_Pn"]
1370pub type Wupe15W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe15, crate::Safe>;
1371impl<'a, REG> Wupe15W<'a, REG>
1372where
1373    REG: crate::Writable + crate::RegisterSpec,
1374    REG::Ux: From<u8>,
1375{
1376    #[doc = "Disable"]
1377    #[inline(always)]
1378    pub fn disable(self) -> &'a mut crate::W<REG> {
1379        self.variant(Wupe15::Disable)
1380    }
1381    #[doc = "Enable (detect on rising edge or high level)"]
1382    #[inline(always)]
1383    pub fn en_rise_hi(self) -> &'a mut crate::W<REG> {
1384        self.variant(Wupe15::EnRiseHi)
1385    }
1386    #[doc = "Enable (detect on falling edge or low level)"]
1387    #[inline(always)]
1388    pub fn en_fall_lo(self) -> &'a mut crate::W<REG> {
1389        self.variant(Wupe15::EnFallLo)
1390    }
1391    #[doc = "Enable (detect on any edge)"]
1392    #[inline(always)]
1393    pub fn en_any(self) -> &'a mut crate::W<REG> {
1394        self.variant(Wupe15::EnAny)
1395    }
1396}
1397impl R {
1398    #[doc = "Bits 0:1 - Wake-up Pin Enable for WUU_Pn"]
1399    #[inline(always)]
1400    pub fn wupe0(&self) -> Wupe0R {
1401        Wupe0R::new((self.bits & 3) as u8)
1402    }
1403    #[doc = "Bits 2:3 - Wake-up Pin Enable for WUU_Pn"]
1404    #[inline(always)]
1405    pub fn wupe1(&self) -> Wupe1R {
1406        Wupe1R::new(((self.bits >> 2) & 3) as u8)
1407    }
1408    #[doc = "Bits 4:5 - Wake-up Pin Enable for WUU_Pn"]
1409    #[inline(always)]
1410    pub fn wupe2(&self) -> Wupe2R {
1411        Wupe2R::new(((self.bits >> 4) & 3) as u8)
1412    }
1413    #[doc = "Bits 6:7 - Wake-up Pin Enable for WUU_Pn"]
1414    #[inline(always)]
1415    pub fn wupe3(&self) -> Wupe3R {
1416        Wupe3R::new(((self.bits >> 6) & 3) as u8)
1417    }
1418    #[doc = "Bits 8:9 - Wake-up Pin Enable for WUU_Pn"]
1419    #[inline(always)]
1420    pub fn wupe4(&self) -> Wupe4R {
1421        Wupe4R::new(((self.bits >> 8) & 3) as u8)
1422    }
1423    #[doc = "Bits 10:11 - Wake-up Pin Enable for WUU_Pn"]
1424    #[inline(always)]
1425    pub fn wupe5(&self) -> Wupe5R {
1426        Wupe5R::new(((self.bits >> 10) & 3) as u8)
1427    }
1428    #[doc = "Bits 12:13 - Wake-up Pin Enable for WUU_Pn"]
1429    #[inline(always)]
1430    pub fn wupe6(&self) -> Wupe6R {
1431        Wupe6R::new(((self.bits >> 12) & 3) as u8)
1432    }
1433    #[doc = "Bits 14:15 - Wake-up Pin Enable for WUU_Pn"]
1434    #[inline(always)]
1435    pub fn wupe7(&self) -> Wupe7R {
1436        Wupe7R::new(((self.bits >> 14) & 3) as u8)
1437    }
1438    #[doc = "Bits 16:17 - Wake-up Pin Enable for WUU_Pn"]
1439    #[inline(always)]
1440    pub fn wupe8(&self) -> Wupe8R {
1441        Wupe8R::new(((self.bits >> 16) & 3) as u8)
1442    }
1443    #[doc = "Bits 18:19 - Wake-up Pin Enable for WUU_Pn"]
1444    #[inline(always)]
1445    pub fn wupe9(&self) -> Wupe9R {
1446        Wupe9R::new(((self.bits >> 18) & 3) as u8)
1447    }
1448    #[doc = "Bits 20:21 - Wake-up Pin Enable for WUU_Pn"]
1449    #[inline(always)]
1450    pub fn wupe10(&self) -> Wupe10R {
1451        Wupe10R::new(((self.bits >> 20) & 3) as u8)
1452    }
1453    #[doc = "Bits 22:23 - Wake-up Pin Enable for WUU_Pn"]
1454    #[inline(always)]
1455    pub fn wupe11(&self) -> Wupe11R {
1456        Wupe11R::new(((self.bits >> 22) & 3) as u8)
1457    }
1458    #[doc = "Bits 24:25 - Wake-up Pin Enable for WUU_Pn"]
1459    #[inline(always)]
1460    pub fn wupe12(&self) -> Wupe12R {
1461        Wupe12R::new(((self.bits >> 24) & 3) as u8)
1462    }
1463    #[doc = "Bits 26:27 - Wake-up Pin Enable for WUU_Pn"]
1464    #[inline(always)]
1465    pub fn wupe13(&self) -> Wupe13R {
1466        Wupe13R::new(((self.bits >> 26) & 3) as u8)
1467    }
1468    #[doc = "Bits 28:29 - Wake-up Pin Enable for WUU_Pn"]
1469    #[inline(always)]
1470    pub fn wupe14(&self) -> Wupe14R {
1471        Wupe14R::new(((self.bits >> 28) & 3) as u8)
1472    }
1473    #[doc = "Bits 30:31 - Wake-up Pin Enable for WUU_Pn"]
1474    #[inline(always)]
1475    pub fn wupe15(&self) -> Wupe15R {
1476        Wupe15R::new(((self.bits >> 30) & 3) as u8)
1477    }
1478}
1479#[cfg(feature = "debug")]
1480impl core::fmt::Debug for R {
1481    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1482        f.debug_struct("PE1")
1483            .field("wupe0", &self.wupe0())
1484            .field("wupe1", &self.wupe1())
1485            .field("wupe2", &self.wupe2())
1486            .field("wupe3", &self.wupe3())
1487            .field("wupe4", &self.wupe4())
1488            .field("wupe5", &self.wupe5())
1489            .field("wupe6", &self.wupe6())
1490            .field("wupe7", &self.wupe7())
1491            .field("wupe8", &self.wupe8())
1492            .field("wupe9", &self.wupe9())
1493            .field("wupe10", &self.wupe10())
1494            .field("wupe11", &self.wupe11())
1495            .field("wupe12", &self.wupe12())
1496            .field("wupe13", &self.wupe13())
1497            .field("wupe14", &self.wupe14())
1498            .field("wupe15", &self.wupe15())
1499            .finish()
1500    }
1501}
1502impl W {
1503    #[doc = "Bits 0:1 - Wake-up Pin Enable for WUU_Pn"]
1504    #[inline(always)]
1505    pub fn wupe0(&mut self) -> Wupe0W<'_, Pe1Spec> {
1506        Wupe0W::new(self, 0)
1507    }
1508    #[doc = "Bits 2:3 - Wake-up Pin Enable for WUU_Pn"]
1509    #[inline(always)]
1510    pub fn wupe1(&mut self) -> Wupe1W<'_, Pe1Spec> {
1511        Wupe1W::new(self, 2)
1512    }
1513    #[doc = "Bits 4:5 - Wake-up Pin Enable for WUU_Pn"]
1514    #[inline(always)]
1515    pub fn wupe2(&mut self) -> Wupe2W<'_, Pe1Spec> {
1516        Wupe2W::new(self, 4)
1517    }
1518    #[doc = "Bits 6:7 - Wake-up Pin Enable for WUU_Pn"]
1519    #[inline(always)]
1520    pub fn wupe3(&mut self) -> Wupe3W<'_, Pe1Spec> {
1521        Wupe3W::new(self, 6)
1522    }
1523    #[doc = "Bits 8:9 - Wake-up Pin Enable for WUU_Pn"]
1524    #[inline(always)]
1525    pub fn wupe4(&mut self) -> Wupe4W<'_, Pe1Spec> {
1526        Wupe4W::new(self, 8)
1527    }
1528    #[doc = "Bits 10:11 - Wake-up Pin Enable for WUU_Pn"]
1529    #[inline(always)]
1530    pub fn wupe5(&mut self) -> Wupe5W<'_, Pe1Spec> {
1531        Wupe5W::new(self, 10)
1532    }
1533    #[doc = "Bits 12:13 - Wake-up Pin Enable for WUU_Pn"]
1534    #[inline(always)]
1535    pub fn wupe6(&mut self) -> Wupe6W<'_, Pe1Spec> {
1536        Wupe6W::new(self, 12)
1537    }
1538    #[doc = "Bits 14:15 - Wake-up Pin Enable for WUU_Pn"]
1539    #[inline(always)]
1540    pub fn wupe7(&mut self) -> Wupe7W<'_, Pe1Spec> {
1541        Wupe7W::new(self, 14)
1542    }
1543    #[doc = "Bits 16:17 - Wake-up Pin Enable for WUU_Pn"]
1544    #[inline(always)]
1545    pub fn wupe8(&mut self) -> Wupe8W<'_, Pe1Spec> {
1546        Wupe8W::new(self, 16)
1547    }
1548    #[doc = "Bits 18:19 - Wake-up Pin Enable for WUU_Pn"]
1549    #[inline(always)]
1550    pub fn wupe9(&mut self) -> Wupe9W<'_, Pe1Spec> {
1551        Wupe9W::new(self, 18)
1552    }
1553    #[doc = "Bits 20:21 - Wake-up Pin Enable for WUU_Pn"]
1554    #[inline(always)]
1555    pub fn wupe10(&mut self) -> Wupe10W<'_, Pe1Spec> {
1556        Wupe10W::new(self, 20)
1557    }
1558    #[doc = "Bits 22:23 - Wake-up Pin Enable for WUU_Pn"]
1559    #[inline(always)]
1560    pub fn wupe11(&mut self) -> Wupe11W<'_, Pe1Spec> {
1561        Wupe11W::new(self, 22)
1562    }
1563    #[doc = "Bits 24:25 - Wake-up Pin Enable for WUU_Pn"]
1564    #[inline(always)]
1565    pub fn wupe12(&mut self) -> Wupe12W<'_, Pe1Spec> {
1566        Wupe12W::new(self, 24)
1567    }
1568    #[doc = "Bits 26:27 - Wake-up Pin Enable for WUU_Pn"]
1569    #[inline(always)]
1570    pub fn wupe13(&mut self) -> Wupe13W<'_, Pe1Spec> {
1571        Wupe13W::new(self, 26)
1572    }
1573    #[doc = "Bits 28:29 - Wake-up Pin Enable for WUU_Pn"]
1574    #[inline(always)]
1575    pub fn wupe14(&mut self) -> Wupe14W<'_, Pe1Spec> {
1576        Wupe14W::new(self, 28)
1577    }
1578    #[doc = "Bits 30:31 - Wake-up Pin Enable for WUU_Pn"]
1579    #[inline(always)]
1580    pub fn wupe15(&mut self) -> Wupe15W<'_, Pe1Spec> {
1581        Wupe15W::new(self, 30)
1582    }
1583}
1584#[doc = "Pin Enable 1\n\nYou can [`read`](crate::Reg::read) this register and get [`pe1::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pe1::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
1585pub struct Pe1Spec;
1586impl crate::RegisterSpec for Pe1Spec {
1587    type Ux = u32;
1588}
1589#[doc = "`read()` method returns [`pe1::R`](R) reader structure"]
1590impl crate::Readable for Pe1Spec {}
1591#[doc = "`write(|w| ..)` method takes [`pe1::W`](W) writer structure"]
1592impl crate::Writable for Pe1Spec {
1593    type Safety = crate::Unsafe;
1594}
1595#[doc = "`reset()` method sets PE1 to value 0"]
1596impl crate::Resettable for Pe1Spec {}