Skip to main content

mcxa_pac/wuu0/
pe2.rs

1#[doc = "Register `PE2` reader"]
2pub type R = crate::R<Pe2Spec>;
3#[doc = "Register `PE2` writer"]
4pub type W = crate::W<Pe2Spec>;
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 Wupe16 {
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<Wupe16> for u8 {
20    #[inline(always)]
21    fn from(variant: Wupe16) -> Self {
22        variant as _
23    }
24}
25impl crate::FieldSpec for Wupe16 {
26    type Ux = u8;
27}
28impl crate::IsEnum for Wupe16 {}
29#[doc = "Field `WUPE16` reader - Wake-up Pin Enable for WUU_Pn"]
30pub type Wupe16R = crate::FieldReader<Wupe16>;
31impl Wupe16R {
32    #[doc = "Get enumerated values variant"]
33    #[inline(always)]
34    pub const fn variant(&self) -> Wupe16 {
35        match self.bits {
36            0 => Wupe16::Disable,
37            1 => Wupe16::EnRiseHi,
38            2 => Wupe16::EnFallLo,
39            3 => Wupe16::EnAny,
40            _ => unreachable!(),
41        }
42    }
43    #[doc = "Disable"]
44    #[inline(always)]
45    pub fn is_disable(&self) -> bool {
46        *self == Wupe16::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 == Wupe16::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 == Wupe16::EnFallLo
57    }
58    #[doc = "Enable (detect on any edge)"]
59    #[inline(always)]
60    pub fn is_en_any(&self) -> bool {
61        *self == Wupe16::EnAny
62    }
63}
64#[doc = "Field `WUPE16` writer - Wake-up Pin Enable for WUU_Pn"]
65pub type Wupe16W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe16, crate::Safe>;
66impl<'a, REG> Wupe16W<'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(Wupe16::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(Wupe16::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(Wupe16::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(Wupe16::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 Wupe17 {
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<Wupe17> for u8 {
107    #[inline(always)]
108    fn from(variant: Wupe17) -> Self {
109        variant as _
110    }
111}
112impl crate::FieldSpec for Wupe17 {
113    type Ux = u8;
114}
115impl crate::IsEnum for Wupe17 {}
116#[doc = "Field `WUPE17` reader - Wake-up Pin Enable for WUU_Pn"]
117pub type Wupe17R = crate::FieldReader<Wupe17>;
118impl Wupe17R {
119    #[doc = "Get enumerated values variant"]
120    #[inline(always)]
121    pub const fn variant(&self) -> Wupe17 {
122        match self.bits {
123            0 => Wupe17::Disable,
124            1 => Wupe17::EnRiseHi,
125            2 => Wupe17::EnFallLo,
126            3 => Wupe17::EnAny,
127            _ => unreachable!(),
128        }
129    }
130    #[doc = "Disable"]
131    #[inline(always)]
132    pub fn is_disable(&self) -> bool {
133        *self == Wupe17::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 == Wupe17::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 == Wupe17::EnFallLo
144    }
145    #[doc = "Enable (detect on any edge)"]
146    #[inline(always)]
147    pub fn is_en_any(&self) -> bool {
148        *self == Wupe17::EnAny
149    }
150}
151#[doc = "Field `WUPE17` writer - Wake-up Pin Enable for WUU_Pn"]
152pub type Wupe17W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe17, crate::Safe>;
153impl<'a, REG> Wupe17W<'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(Wupe17::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(Wupe17::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(Wupe17::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(Wupe17::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 Wupe18 {
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<Wupe18> for u8 {
194    #[inline(always)]
195    fn from(variant: Wupe18) -> Self {
196        variant as _
197    }
198}
199impl crate::FieldSpec for Wupe18 {
200    type Ux = u8;
201}
202impl crate::IsEnum for Wupe18 {}
203#[doc = "Field `WUPE18` reader - Wake-up Pin Enable for WUU_Pn"]
204pub type Wupe18R = crate::FieldReader<Wupe18>;
205impl Wupe18R {
206    #[doc = "Get enumerated values variant"]
207    #[inline(always)]
208    pub const fn variant(&self) -> Wupe18 {
209        match self.bits {
210            0 => Wupe18::Disable,
211            1 => Wupe18::EnRiseHi,
212            2 => Wupe18::EnFallLo,
213            3 => Wupe18::EnAny,
214            _ => unreachable!(),
215        }
216    }
217    #[doc = "Disable"]
218    #[inline(always)]
219    pub fn is_disable(&self) -> bool {
220        *self == Wupe18::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 == Wupe18::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 == Wupe18::EnFallLo
231    }
232    #[doc = "Enable (detect on any edge)"]
233    #[inline(always)]
234    pub fn is_en_any(&self) -> bool {
235        *self == Wupe18::EnAny
236    }
237}
238#[doc = "Field `WUPE18` writer - Wake-up Pin Enable for WUU_Pn"]
239pub type Wupe18W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe18, crate::Safe>;
240impl<'a, REG> Wupe18W<'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(Wupe18::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(Wupe18::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(Wupe18::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(Wupe18::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 Wupe19 {
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<Wupe19> for u8 {
281    #[inline(always)]
282    fn from(variant: Wupe19) -> Self {
283        variant as _
284    }
285}
286impl crate::FieldSpec for Wupe19 {
287    type Ux = u8;
288}
289impl crate::IsEnum for Wupe19 {}
290#[doc = "Field `WUPE19` reader - Wake-up Pin Enable for WUU_Pn"]
291pub type Wupe19R = crate::FieldReader<Wupe19>;
292impl Wupe19R {
293    #[doc = "Get enumerated values variant"]
294    #[inline(always)]
295    pub const fn variant(&self) -> Wupe19 {
296        match self.bits {
297            0 => Wupe19::Disable,
298            1 => Wupe19::EnRiseHi,
299            2 => Wupe19::EnFallLo,
300            3 => Wupe19::EnAny,
301            _ => unreachable!(),
302        }
303    }
304    #[doc = "Disable"]
305    #[inline(always)]
306    pub fn is_disable(&self) -> bool {
307        *self == Wupe19::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 == Wupe19::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 == Wupe19::EnFallLo
318    }
319    #[doc = "Enable (detect on any edge)"]
320    #[inline(always)]
321    pub fn is_en_any(&self) -> bool {
322        *self == Wupe19::EnAny
323    }
324}
325#[doc = "Field `WUPE19` writer - Wake-up Pin Enable for WUU_Pn"]
326pub type Wupe19W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe19, crate::Safe>;
327impl<'a, REG> Wupe19W<'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(Wupe19::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(Wupe19::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(Wupe19::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(Wupe19::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 Wupe20 {
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<Wupe20> for u8 {
368    #[inline(always)]
369    fn from(variant: Wupe20) -> Self {
370        variant as _
371    }
372}
373impl crate::FieldSpec for Wupe20 {
374    type Ux = u8;
375}
376impl crate::IsEnum for Wupe20 {}
377#[doc = "Field `WUPE20` reader - Wake-up Pin Enable for WUU_Pn"]
378pub type Wupe20R = crate::FieldReader<Wupe20>;
379impl Wupe20R {
380    #[doc = "Get enumerated values variant"]
381    #[inline(always)]
382    pub const fn variant(&self) -> Wupe20 {
383        match self.bits {
384            0 => Wupe20::Disable,
385            1 => Wupe20::EnRiseHi,
386            2 => Wupe20::EnFallLo,
387            3 => Wupe20::EnAny,
388            _ => unreachable!(),
389        }
390    }
391    #[doc = "Disable"]
392    #[inline(always)]
393    pub fn is_disable(&self) -> bool {
394        *self == Wupe20::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 == Wupe20::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 == Wupe20::EnFallLo
405    }
406    #[doc = "Enable (detect on any edge)"]
407    #[inline(always)]
408    pub fn is_en_any(&self) -> bool {
409        *self == Wupe20::EnAny
410    }
411}
412#[doc = "Field `WUPE20` writer - Wake-up Pin Enable for WUU_Pn"]
413pub type Wupe20W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe20, crate::Safe>;
414impl<'a, REG> Wupe20W<'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(Wupe20::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(Wupe20::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(Wupe20::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(Wupe20::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 Wupe21 {
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<Wupe21> for u8 {
455    #[inline(always)]
456    fn from(variant: Wupe21) -> Self {
457        variant as _
458    }
459}
460impl crate::FieldSpec for Wupe21 {
461    type Ux = u8;
462}
463impl crate::IsEnum for Wupe21 {}
464#[doc = "Field `WUPE21` reader - Wake-up Pin Enable for WUU_Pn"]
465pub type Wupe21R = crate::FieldReader<Wupe21>;
466impl Wupe21R {
467    #[doc = "Get enumerated values variant"]
468    #[inline(always)]
469    pub const fn variant(&self) -> Wupe21 {
470        match self.bits {
471            0 => Wupe21::Disable,
472            1 => Wupe21::EnRiseHi,
473            2 => Wupe21::EnFallLo,
474            3 => Wupe21::EnAny,
475            _ => unreachable!(),
476        }
477    }
478    #[doc = "Disable"]
479    #[inline(always)]
480    pub fn is_disable(&self) -> bool {
481        *self == Wupe21::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 == Wupe21::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 == Wupe21::EnFallLo
492    }
493    #[doc = "Enable (detect on any edge)"]
494    #[inline(always)]
495    pub fn is_en_any(&self) -> bool {
496        *self == Wupe21::EnAny
497    }
498}
499#[doc = "Field `WUPE21` writer - Wake-up Pin Enable for WUU_Pn"]
500pub type Wupe21W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe21, crate::Safe>;
501impl<'a, REG> Wupe21W<'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(Wupe21::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(Wupe21::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(Wupe21::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(Wupe21::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 Wupe22 {
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<Wupe22> for u8 {
542    #[inline(always)]
543    fn from(variant: Wupe22) -> Self {
544        variant as _
545    }
546}
547impl crate::FieldSpec for Wupe22 {
548    type Ux = u8;
549}
550impl crate::IsEnum for Wupe22 {}
551#[doc = "Field `WUPE22` reader - Wake-up Pin Enable for WUU_Pn"]
552pub type Wupe22R = crate::FieldReader<Wupe22>;
553impl Wupe22R {
554    #[doc = "Get enumerated values variant"]
555    #[inline(always)]
556    pub const fn variant(&self) -> Wupe22 {
557        match self.bits {
558            0 => Wupe22::Disable,
559            1 => Wupe22::EnRiseHi,
560            2 => Wupe22::EnFallLo,
561            3 => Wupe22::EnAny,
562            _ => unreachable!(),
563        }
564    }
565    #[doc = "Disable"]
566    #[inline(always)]
567    pub fn is_disable(&self) -> bool {
568        *self == Wupe22::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 == Wupe22::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 == Wupe22::EnFallLo
579    }
580    #[doc = "Enable (detect on any edge)"]
581    #[inline(always)]
582    pub fn is_en_any(&self) -> bool {
583        *self == Wupe22::EnAny
584    }
585}
586#[doc = "Field `WUPE22` writer - Wake-up Pin Enable for WUU_Pn"]
587pub type Wupe22W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe22, crate::Safe>;
588impl<'a, REG> Wupe22W<'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(Wupe22::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(Wupe22::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(Wupe22::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(Wupe22::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 Wupe23 {
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<Wupe23> for u8 {
629    #[inline(always)]
630    fn from(variant: Wupe23) -> Self {
631        variant as _
632    }
633}
634impl crate::FieldSpec for Wupe23 {
635    type Ux = u8;
636}
637impl crate::IsEnum for Wupe23 {}
638#[doc = "Field `WUPE23` reader - Wake-up Pin Enable for WUU_Pn"]
639pub type Wupe23R = crate::FieldReader<Wupe23>;
640impl Wupe23R {
641    #[doc = "Get enumerated values variant"]
642    #[inline(always)]
643    pub const fn variant(&self) -> Wupe23 {
644        match self.bits {
645            0 => Wupe23::Disable,
646            1 => Wupe23::EnRiseHi,
647            2 => Wupe23::EnFallLo,
648            3 => Wupe23::EnAny,
649            _ => unreachable!(),
650        }
651    }
652    #[doc = "Disable"]
653    #[inline(always)]
654    pub fn is_disable(&self) -> bool {
655        *self == Wupe23::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 == Wupe23::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 == Wupe23::EnFallLo
666    }
667    #[doc = "Enable (detect on any edge)"]
668    #[inline(always)]
669    pub fn is_en_any(&self) -> bool {
670        *self == Wupe23::EnAny
671    }
672}
673#[doc = "Field `WUPE23` writer - Wake-up Pin Enable for WUU_Pn"]
674pub type Wupe23W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe23, crate::Safe>;
675impl<'a, REG> Wupe23W<'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(Wupe23::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(Wupe23::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(Wupe23::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(Wupe23::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 Wupe24 {
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<Wupe24> for u8 {
716    #[inline(always)]
717    fn from(variant: Wupe24) -> Self {
718        variant as _
719    }
720}
721impl crate::FieldSpec for Wupe24 {
722    type Ux = u8;
723}
724impl crate::IsEnum for Wupe24 {}
725#[doc = "Field `WUPE24` reader - Wake-up Pin Enable for WUU_Pn"]
726pub type Wupe24R = crate::FieldReader<Wupe24>;
727impl Wupe24R {
728    #[doc = "Get enumerated values variant"]
729    #[inline(always)]
730    pub const fn variant(&self) -> Wupe24 {
731        match self.bits {
732            0 => Wupe24::Disable,
733            1 => Wupe24::EnRiseHi,
734            2 => Wupe24::EnFallLo,
735            3 => Wupe24::EnAny,
736            _ => unreachable!(),
737        }
738    }
739    #[doc = "Disable"]
740    #[inline(always)]
741    pub fn is_disable(&self) -> bool {
742        *self == Wupe24::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 == Wupe24::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 == Wupe24::EnFallLo
753    }
754    #[doc = "Enable (detect on any edge)"]
755    #[inline(always)]
756    pub fn is_en_any(&self) -> bool {
757        *self == Wupe24::EnAny
758    }
759}
760#[doc = "Field `WUPE24` writer - Wake-up Pin Enable for WUU_Pn"]
761pub type Wupe24W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe24, crate::Safe>;
762impl<'a, REG> Wupe24W<'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(Wupe24::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(Wupe24::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(Wupe24::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(Wupe24::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 Wupe25 {
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<Wupe25> for u8 {
803    #[inline(always)]
804    fn from(variant: Wupe25) -> Self {
805        variant as _
806    }
807}
808impl crate::FieldSpec for Wupe25 {
809    type Ux = u8;
810}
811impl crate::IsEnum for Wupe25 {}
812#[doc = "Field `WUPE25` reader - Wake-up Pin Enable for WUU_Pn"]
813pub type Wupe25R = crate::FieldReader<Wupe25>;
814impl Wupe25R {
815    #[doc = "Get enumerated values variant"]
816    #[inline(always)]
817    pub const fn variant(&self) -> Wupe25 {
818        match self.bits {
819            0 => Wupe25::Disable,
820            1 => Wupe25::EnRiseHi,
821            2 => Wupe25::EnFallLo,
822            3 => Wupe25::EnAny,
823            _ => unreachable!(),
824        }
825    }
826    #[doc = "Disable"]
827    #[inline(always)]
828    pub fn is_disable(&self) -> bool {
829        *self == Wupe25::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 == Wupe25::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 == Wupe25::EnFallLo
840    }
841    #[doc = "Enable (detect on any edge)"]
842    #[inline(always)]
843    pub fn is_en_any(&self) -> bool {
844        *self == Wupe25::EnAny
845    }
846}
847#[doc = "Field `WUPE25` writer - Wake-up Pin Enable for WUU_Pn"]
848pub type Wupe25W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe25, crate::Safe>;
849impl<'a, REG> Wupe25W<'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(Wupe25::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(Wupe25::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(Wupe25::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(Wupe25::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 Wupe26 {
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<Wupe26> for u8 {
890    #[inline(always)]
891    fn from(variant: Wupe26) -> Self {
892        variant as _
893    }
894}
895impl crate::FieldSpec for Wupe26 {
896    type Ux = u8;
897}
898impl crate::IsEnum for Wupe26 {}
899#[doc = "Field `WUPE26` reader - Wake-up Pin Enable for WUU_Pn"]
900pub type Wupe26R = crate::FieldReader<Wupe26>;
901impl Wupe26R {
902    #[doc = "Get enumerated values variant"]
903    #[inline(always)]
904    pub const fn variant(&self) -> Wupe26 {
905        match self.bits {
906            0 => Wupe26::Disable,
907            1 => Wupe26::EnRiseHi,
908            2 => Wupe26::EnFallLo,
909            3 => Wupe26::EnAny,
910            _ => unreachable!(),
911        }
912    }
913    #[doc = "Disable"]
914    #[inline(always)]
915    pub fn is_disable(&self) -> bool {
916        *self == Wupe26::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 == Wupe26::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 == Wupe26::EnFallLo
927    }
928    #[doc = "Enable (detect on any edge)"]
929    #[inline(always)]
930    pub fn is_en_any(&self) -> bool {
931        *self == Wupe26::EnAny
932    }
933}
934#[doc = "Field `WUPE26` writer - Wake-up Pin Enable for WUU_Pn"]
935pub type Wupe26W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe26, crate::Safe>;
936impl<'a, REG> Wupe26W<'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(Wupe26::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(Wupe26::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(Wupe26::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(Wupe26::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 Wupe27 {
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<Wupe27> for u8 {
977    #[inline(always)]
978    fn from(variant: Wupe27) -> Self {
979        variant as _
980    }
981}
982impl crate::FieldSpec for Wupe27 {
983    type Ux = u8;
984}
985impl crate::IsEnum for Wupe27 {}
986#[doc = "Field `WUPE27` reader - Wake-up Pin Enable for WUU_Pn"]
987pub type Wupe27R = crate::FieldReader<Wupe27>;
988impl Wupe27R {
989    #[doc = "Get enumerated values variant"]
990    #[inline(always)]
991    pub const fn variant(&self) -> Wupe27 {
992        match self.bits {
993            0 => Wupe27::Disable,
994            1 => Wupe27::EnRiseHi,
995            2 => Wupe27::EnFallLo,
996            3 => Wupe27::EnAny,
997            _ => unreachable!(),
998        }
999    }
1000    #[doc = "Disable"]
1001    #[inline(always)]
1002    pub fn is_disable(&self) -> bool {
1003        *self == Wupe27::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 == Wupe27::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 == Wupe27::EnFallLo
1014    }
1015    #[doc = "Enable (detect on any edge)"]
1016    #[inline(always)]
1017    pub fn is_en_any(&self) -> bool {
1018        *self == Wupe27::EnAny
1019    }
1020}
1021#[doc = "Field `WUPE27` writer - Wake-up Pin Enable for WUU_Pn"]
1022pub type Wupe27W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe27, crate::Safe>;
1023impl<'a, REG> Wupe27W<'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(Wupe27::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(Wupe27::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(Wupe27::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(Wupe27::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 Wupe28 {
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<Wupe28> for u8 {
1064    #[inline(always)]
1065    fn from(variant: Wupe28) -> Self {
1066        variant as _
1067    }
1068}
1069impl crate::FieldSpec for Wupe28 {
1070    type Ux = u8;
1071}
1072impl crate::IsEnum for Wupe28 {}
1073#[doc = "Field `WUPE28` reader - Wake-up Pin Enable for WUU_Pn"]
1074pub type Wupe28R = crate::FieldReader<Wupe28>;
1075impl Wupe28R {
1076    #[doc = "Get enumerated values variant"]
1077    #[inline(always)]
1078    pub const fn variant(&self) -> Wupe28 {
1079        match self.bits {
1080            0 => Wupe28::Disable,
1081            1 => Wupe28::EnRiseHi,
1082            2 => Wupe28::EnFallLo,
1083            3 => Wupe28::EnAny,
1084            _ => unreachable!(),
1085        }
1086    }
1087    #[doc = "Disable"]
1088    #[inline(always)]
1089    pub fn is_disable(&self) -> bool {
1090        *self == Wupe28::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 == Wupe28::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 == Wupe28::EnFallLo
1101    }
1102    #[doc = "Enable (detect on any edge)"]
1103    #[inline(always)]
1104    pub fn is_en_any(&self) -> bool {
1105        *self == Wupe28::EnAny
1106    }
1107}
1108#[doc = "Field `WUPE28` writer - Wake-up Pin Enable for WUU_Pn"]
1109pub type Wupe28W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe28, crate::Safe>;
1110impl<'a, REG> Wupe28W<'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(Wupe28::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(Wupe28::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(Wupe28::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(Wupe28::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 Wupe29 {
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<Wupe29> for u8 {
1151    #[inline(always)]
1152    fn from(variant: Wupe29) -> Self {
1153        variant as _
1154    }
1155}
1156impl crate::FieldSpec for Wupe29 {
1157    type Ux = u8;
1158}
1159impl crate::IsEnum for Wupe29 {}
1160#[doc = "Field `WUPE29` reader - Wake-up Pin Enable for WUU_Pn"]
1161pub type Wupe29R = crate::FieldReader<Wupe29>;
1162impl Wupe29R {
1163    #[doc = "Get enumerated values variant"]
1164    #[inline(always)]
1165    pub const fn variant(&self) -> Wupe29 {
1166        match self.bits {
1167            0 => Wupe29::Disable,
1168            1 => Wupe29::EnRiseHi,
1169            2 => Wupe29::EnFallLo,
1170            3 => Wupe29::EnAny,
1171            _ => unreachable!(),
1172        }
1173    }
1174    #[doc = "Disable"]
1175    #[inline(always)]
1176    pub fn is_disable(&self) -> bool {
1177        *self == Wupe29::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 == Wupe29::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 == Wupe29::EnFallLo
1188    }
1189    #[doc = "Enable (detect on any edge)"]
1190    #[inline(always)]
1191    pub fn is_en_any(&self) -> bool {
1192        *self == Wupe29::EnAny
1193    }
1194}
1195#[doc = "Field `WUPE29` writer - Wake-up Pin Enable for WUU_Pn"]
1196pub type Wupe29W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe29, crate::Safe>;
1197impl<'a, REG> Wupe29W<'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(Wupe29::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(Wupe29::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(Wupe29::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(Wupe29::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 Wupe30 {
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<Wupe30> for u8 {
1238    #[inline(always)]
1239    fn from(variant: Wupe30) -> Self {
1240        variant as _
1241    }
1242}
1243impl crate::FieldSpec for Wupe30 {
1244    type Ux = u8;
1245}
1246impl crate::IsEnum for Wupe30 {}
1247#[doc = "Field `WUPE30` reader - Wake-up Pin Enable for WUU_Pn"]
1248pub type Wupe30R = crate::FieldReader<Wupe30>;
1249impl Wupe30R {
1250    #[doc = "Get enumerated values variant"]
1251    #[inline(always)]
1252    pub const fn variant(&self) -> Wupe30 {
1253        match self.bits {
1254            0 => Wupe30::Disable,
1255            1 => Wupe30::EnRiseHi,
1256            2 => Wupe30::EnFallLo,
1257            3 => Wupe30::EnAny,
1258            _ => unreachable!(),
1259        }
1260    }
1261    #[doc = "Disable"]
1262    #[inline(always)]
1263    pub fn is_disable(&self) -> bool {
1264        *self == Wupe30::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 == Wupe30::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 == Wupe30::EnFallLo
1275    }
1276    #[doc = "Enable (detect on any edge)"]
1277    #[inline(always)]
1278    pub fn is_en_any(&self) -> bool {
1279        *self == Wupe30::EnAny
1280    }
1281}
1282#[doc = "Field `WUPE30` writer - Wake-up Pin Enable for WUU_Pn"]
1283pub type Wupe30W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe30, crate::Safe>;
1284impl<'a, REG> Wupe30W<'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(Wupe30::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(Wupe30::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(Wupe30::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(Wupe30::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 Wupe31 {
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<Wupe31> for u8 {
1325    #[inline(always)]
1326    fn from(variant: Wupe31) -> Self {
1327        variant as _
1328    }
1329}
1330impl crate::FieldSpec for Wupe31 {
1331    type Ux = u8;
1332}
1333impl crate::IsEnum for Wupe31 {}
1334#[doc = "Field `WUPE31` reader - Wake-up Pin Enable for WUU_Pn"]
1335pub type Wupe31R = crate::FieldReader<Wupe31>;
1336impl Wupe31R {
1337    #[doc = "Get enumerated values variant"]
1338    #[inline(always)]
1339    pub const fn variant(&self) -> Wupe31 {
1340        match self.bits {
1341            0 => Wupe31::Disable,
1342            1 => Wupe31::EnRiseHi,
1343            2 => Wupe31::EnFallLo,
1344            3 => Wupe31::EnAny,
1345            _ => unreachable!(),
1346        }
1347    }
1348    #[doc = "Disable"]
1349    #[inline(always)]
1350    pub fn is_disable(&self) -> bool {
1351        *self == Wupe31::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 == Wupe31::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 == Wupe31::EnFallLo
1362    }
1363    #[doc = "Enable (detect on any edge)"]
1364    #[inline(always)]
1365    pub fn is_en_any(&self) -> bool {
1366        *self == Wupe31::EnAny
1367    }
1368}
1369#[doc = "Field `WUPE31` writer - Wake-up Pin Enable for WUU_Pn"]
1370pub type Wupe31W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupe31, crate::Safe>;
1371impl<'a, REG> Wupe31W<'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(Wupe31::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(Wupe31::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(Wupe31::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(Wupe31::EnAny)
1395    }
1396}
1397impl R {
1398    #[doc = "Bits 0:1 - Wake-up Pin Enable for WUU_Pn"]
1399    #[inline(always)]
1400    pub fn wupe16(&self) -> Wupe16R {
1401        Wupe16R::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 wupe17(&self) -> Wupe17R {
1406        Wupe17R::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 wupe18(&self) -> Wupe18R {
1411        Wupe18R::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 wupe19(&self) -> Wupe19R {
1416        Wupe19R::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 wupe20(&self) -> Wupe20R {
1421        Wupe20R::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 wupe21(&self) -> Wupe21R {
1426        Wupe21R::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 wupe22(&self) -> Wupe22R {
1431        Wupe22R::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 wupe23(&self) -> Wupe23R {
1436        Wupe23R::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 wupe24(&self) -> Wupe24R {
1441        Wupe24R::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 wupe25(&self) -> Wupe25R {
1446        Wupe25R::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 wupe26(&self) -> Wupe26R {
1451        Wupe26R::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 wupe27(&self) -> Wupe27R {
1456        Wupe27R::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 wupe28(&self) -> Wupe28R {
1461        Wupe28R::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 wupe29(&self) -> Wupe29R {
1466        Wupe29R::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 wupe30(&self) -> Wupe30R {
1471        Wupe30R::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 wupe31(&self) -> Wupe31R {
1476        Wupe31R::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("PE2")
1483            .field("wupe16", &self.wupe16())
1484            .field("wupe17", &self.wupe17())
1485            .field("wupe18", &self.wupe18())
1486            .field("wupe19", &self.wupe19())
1487            .field("wupe20", &self.wupe20())
1488            .field("wupe21", &self.wupe21())
1489            .field("wupe22", &self.wupe22())
1490            .field("wupe23", &self.wupe23())
1491            .field("wupe24", &self.wupe24())
1492            .field("wupe25", &self.wupe25())
1493            .field("wupe26", &self.wupe26())
1494            .field("wupe27", &self.wupe27())
1495            .field("wupe28", &self.wupe28())
1496            .field("wupe29", &self.wupe29())
1497            .field("wupe30", &self.wupe30())
1498            .field("wupe31", &self.wupe31())
1499            .finish()
1500    }
1501}
1502impl W {
1503    #[doc = "Bits 0:1 - Wake-up Pin Enable for WUU_Pn"]
1504    #[inline(always)]
1505    pub fn wupe16(&mut self) -> Wupe16W<'_, Pe2Spec> {
1506        Wupe16W::new(self, 0)
1507    }
1508    #[doc = "Bits 2:3 - Wake-up Pin Enable for WUU_Pn"]
1509    #[inline(always)]
1510    pub fn wupe17(&mut self) -> Wupe17W<'_, Pe2Spec> {
1511        Wupe17W::new(self, 2)
1512    }
1513    #[doc = "Bits 4:5 - Wake-up Pin Enable for WUU_Pn"]
1514    #[inline(always)]
1515    pub fn wupe18(&mut self) -> Wupe18W<'_, Pe2Spec> {
1516        Wupe18W::new(self, 4)
1517    }
1518    #[doc = "Bits 6:7 - Wake-up Pin Enable for WUU_Pn"]
1519    #[inline(always)]
1520    pub fn wupe19(&mut self) -> Wupe19W<'_, Pe2Spec> {
1521        Wupe19W::new(self, 6)
1522    }
1523    #[doc = "Bits 8:9 - Wake-up Pin Enable for WUU_Pn"]
1524    #[inline(always)]
1525    pub fn wupe20(&mut self) -> Wupe20W<'_, Pe2Spec> {
1526        Wupe20W::new(self, 8)
1527    }
1528    #[doc = "Bits 10:11 - Wake-up Pin Enable for WUU_Pn"]
1529    #[inline(always)]
1530    pub fn wupe21(&mut self) -> Wupe21W<'_, Pe2Spec> {
1531        Wupe21W::new(self, 10)
1532    }
1533    #[doc = "Bits 12:13 - Wake-up Pin Enable for WUU_Pn"]
1534    #[inline(always)]
1535    pub fn wupe22(&mut self) -> Wupe22W<'_, Pe2Spec> {
1536        Wupe22W::new(self, 12)
1537    }
1538    #[doc = "Bits 14:15 - Wake-up Pin Enable for WUU_Pn"]
1539    #[inline(always)]
1540    pub fn wupe23(&mut self) -> Wupe23W<'_, Pe2Spec> {
1541        Wupe23W::new(self, 14)
1542    }
1543    #[doc = "Bits 16:17 - Wake-up Pin Enable for WUU_Pn"]
1544    #[inline(always)]
1545    pub fn wupe24(&mut self) -> Wupe24W<'_, Pe2Spec> {
1546        Wupe24W::new(self, 16)
1547    }
1548    #[doc = "Bits 18:19 - Wake-up Pin Enable for WUU_Pn"]
1549    #[inline(always)]
1550    pub fn wupe25(&mut self) -> Wupe25W<'_, Pe2Spec> {
1551        Wupe25W::new(self, 18)
1552    }
1553    #[doc = "Bits 20:21 - Wake-up Pin Enable for WUU_Pn"]
1554    #[inline(always)]
1555    pub fn wupe26(&mut self) -> Wupe26W<'_, Pe2Spec> {
1556        Wupe26W::new(self, 20)
1557    }
1558    #[doc = "Bits 22:23 - Wake-up Pin Enable for WUU_Pn"]
1559    #[inline(always)]
1560    pub fn wupe27(&mut self) -> Wupe27W<'_, Pe2Spec> {
1561        Wupe27W::new(self, 22)
1562    }
1563    #[doc = "Bits 24:25 - Wake-up Pin Enable for WUU_Pn"]
1564    #[inline(always)]
1565    pub fn wupe28(&mut self) -> Wupe28W<'_, Pe2Spec> {
1566        Wupe28W::new(self, 24)
1567    }
1568    #[doc = "Bits 26:27 - Wake-up Pin Enable for WUU_Pn"]
1569    #[inline(always)]
1570    pub fn wupe29(&mut self) -> Wupe29W<'_, Pe2Spec> {
1571        Wupe29W::new(self, 26)
1572    }
1573    #[doc = "Bits 28:29 - Wake-up Pin Enable for WUU_Pn"]
1574    #[inline(always)]
1575    pub fn wupe30(&mut self) -> Wupe30W<'_, Pe2Spec> {
1576        Wupe30W::new(self, 28)
1577    }
1578    #[doc = "Bits 30:31 - Wake-up Pin Enable for WUU_Pn"]
1579    #[inline(always)]
1580    pub fn wupe31(&mut self) -> Wupe31W<'_, Pe2Spec> {
1581        Wupe31W::new(self, 30)
1582    }
1583}
1584#[doc = "Pin Enable 2\n\nYou can [`read`](crate::Reg::read) this register and get [`pe2::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pe2::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
1585pub struct Pe2Spec;
1586impl crate::RegisterSpec for Pe2Spec {
1587    type Ux = u32;
1588}
1589#[doc = "`read()` method returns [`pe2::R`](R) reader structure"]
1590impl crate::Readable for Pe2Spec {}
1591#[doc = "`write(|w| ..)` method takes [`pe2::W`](W) writer structure"]
1592impl crate::Writable for Pe2Spec {
1593    type Safety = crate::Unsafe;
1594}
1595#[doc = "`reset()` method sets PE2 to value 0"]
1596impl crate::Resettable for Pe2Spec {}