atsams70n21/supc/
supc_wuir.rs

1#[doc = "Register `SUPC_WUIR` reader"]
2pub struct R(crate::R<SUPC_WUIR_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<SUPC_WUIR_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<SUPC_WUIR_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<SUPC_WUIR_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `SUPC_WUIR` writer"]
17pub struct W(crate::W<SUPC_WUIR_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<SUPC_WUIR_SPEC>;
20    #[inline(always)]
21    fn deref(&self) -> &Self::Target {
22        &self.0
23    }
24}
25impl core::ops::DerefMut for W {
26    #[inline(always)]
27    fn deref_mut(&mut self) -> &mut Self::Target {
28        &mut self.0
29    }
30}
31impl From<crate::W<SUPC_WUIR_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<SUPC_WUIR_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Wake-up Input Enable 0 to 0\n\nValue on reset: 0"]
38#[derive(Clone, Copy, Debug, PartialEq)]
39pub enum WKUPEN0_A {
40    #[doc = "0: The corresponding wake-up input has no wake-up effect."]
41    DISABLE = 0,
42    #[doc = "1: The corresponding wake-up input is enabled for a wake-up of the core power supply."]
43    ENABLE = 1,
44}
45impl From<WKUPEN0_A> for bool {
46    #[inline(always)]
47    fn from(variant: WKUPEN0_A) -> Self {
48        variant as u8 != 0
49    }
50}
51#[doc = "Field `WKUPEN0` reader - Wake-up Input Enable 0 to 0"]
52pub struct WKUPEN0_R(crate::FieldReader<bool, WKUPEN0_A>);
53impl WKUPEN0_R {
54    #[inline(always)]
55    pub(crate) fn new(bits: bool) -> Self {
56        WKUPEN0_R(crate::FieldReader::new(bits))
57    }
58    #[doc = r"Get enumerated values variant"]
59    #[inline(always)]
60    pub fn variant(&self) -> WKUPEN0_A {
61        match self.bits {
62            false => WKUPEN0_A::DISABLE,
63            true => WKUPEN0_A::ENABLE,
64        }
65    }
66    #[doc = "Checks if the value of the field is `DISABLE`"]
67    #[inline(always)]
68    pub fn is_disable(&self) -> bool {
69        **self == WKUPEN0_A::DISABLE
70    }
71    #[doc = "Checks if the value of the field is `ENABLE`"]
72    #[inline(always)]
73    pub fn is_enable(&self) -> bool {
74        **self == WKUPEN0_A::ENABLE
75    }
76}
77impl core::ops::Deref for WKUPEN0_R {
78    type Target = crate::FieldReader<bool, WKUPEN0_A>;
79    #[inline(always)]
80    fn deref(&self) -> &Self::Target {
81        &self.0
82    }
83}
84#[doc = "Field `WKUPEN0` writer - Wake-up Input Enable 0 to 0"]
85pub struct WKUPEN0_W<'a> {
86    w: &'a mut W,
87}
88impl<'a> WKUPEN0_W<'a> {
89    #[doc = r"Writes `variant` to the field"]
90    #[inline(always)]
91    pub fn variant(self, variant: WKUPEN0_A) -> &'a mut W {
92        self.bit(variant.into())
93    }
94    #[doc = "The corresponding wake-up input has no wake-up effect."]
95    #[inline(always)]
96    pub fn disable(self) -> &'a mut W {
97        self.variant(WKUPEN0_A::DISABLE)
98    }
99    #[doc = "The corresponding wake-up input is enabled for a wake-up of the core power supply."]
100    #[inline(always)]
101    pub fn enable(self) -> &'a mut W {
102        self.variant(WKUPEN0_A::ENABLE)
103    }
104    #[doc = r"Sets the field bit"]
105    #[inline(always)]
106    pub fn set_bit(self) -> &'a mut W {
107        self.bit(true)
108    }
109    #[doc = r"Clears the field bit"]
110    #[inline(always)]
111    pub fn clear_bit(self) -> &'a mut W {
112        self.bit(false)
113    }
114    #[doc = r"Writes raw bits to the field"]
115    #[inline(always)]
116    pub fn bit(self, value: bool) -> &'a mut W {
117        self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
118        self.w
119    }
120}
121#[doc = "Wake-up Input Enable 0 to 1\n\nValue on reset: 0"]
122#[derive(Clone, Copy, Debug, PartialEq)]
123pub enum WKUPEN1_A {
124    #[doc = "0: The corresponding wake-up input has no wake-up effect."]
125    DISABLE = 0,
126    #[doc = "1: The corresponding wake-up input is enabled for a wake-up of the core power supply."]
127    ENABLE = 1,
128}
129impl From<WKUPEN1_A> for bool {
130    #[inline(always)]
131    fn from(variant: WKUPEN1_A) -> Self {
132        variant as u8 != 0
133    }
134}
135#[doc = "Field `WKUPEN1` reader - Wake-up Input Enable 0 to 1"]
136pub struct WKUPEN1_R(crate::FieldReader<bool, WKUPEN1_A>);
137impl WKUPEN1_R {
138    #[inline(always)]
139    pub(crate) fn new(bits: bool) -> Self {
140        WKUPEN1_R(crate::FieldReader::new(bits))
141    }
142    #[doc = r"Get enumerated values variant"]
143    #[inline(always)]
144    pub fn variant(&self) -> WKUPEN1_A {
145        match self.bits {
146            false => WKUPEN1_A::DISABLE,
147            true => WKUPEN1_A::ENABLE,
148        }
149    }
150    #[doc = "Checks if the value of the field is `DISABLE`"]
151    #[inline(always)]
152    pub fn is_disable(&self) -> bool {
153        **self == WKUPEN1_A::DISABLE
154    }
155    #[doc = "Checks if the value of the field is `ENABLE`"]
156    #[inline(always)]
157    pub fn is_enable(&self) -> bool {
158        **self == WKUPEN1_A::ENABLE
159    }
160}
161impl core::ops::Deref for WKUPEN1_R {
162    type Target = crate::FieldReader<bool, WKUPEN1_A>;
163    #[inline(always)]
164    fn deref(&self) -> &Self::Target {
165        &self.0
166    }
167}
168#[doc = "Field `WKUPEN1` writer - Wake-up Input Enable 0 to 1"]
169pub struct WKUPEN1_W<'a> {
170    w: &'a mut W,
171}
172impl<'a> WKUPEN1_W<'a> {
173    #[doc = r"Writes `variant` to the field"]
174    #[inline(always)]
175    pub fn variant(self, variant: WKUPEN1_A) -> &'a mut W {
176        self.bit(variant.into())
177    }
178    #[doc = "The corresponding wake-up input has no wake-up effect."]
179    #[inline(always)]
180    pub fn disable(self) -> &'a mut W {
181        self.variant(WKUPEN1_A::DISABLE)
182    }
183    #[doc = "The corresponding wake-up input is enabled for a wake-up of the core power supply."]
184    #[inline(always)]
185    pub fn enable(self) -> &'a mut W {
186        self.variant(WKUPEN1_A::ENABLE)
187    }
188    #[doc = r"Sets the field bit"]
189    #[inline(always)]
190    pub fn set_bit(self) -> &'a mut W {
191        self.bit(true)
192    }
193    #[doc = r"Clears the field bit"]
194    #[inline(always)]
195    pub fn clear_bit(self) -> &'a mut W {
196        self.bit(false)
197    }
198    #[doc = r"Writes raw bits to the field"]
199    #[inline(always)]
200    pub fn bit(self, value: bool) -> &'a mut W {
201        self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
202        self.w
203    }
204}
205#[doc = "Wake-up Input Enable 0 to 2\n\nValue on reset: 0"]
206#[derive(Clone, Copy, Debug, PartialEq)]
207pub enum WKUPEN2_A {
208    #[doc = "0: The corresponding wake-up input has no wake-up effect."]
209    DISABLE = 0,
210    #[doc = "1: The corresponding wake-up input is enabled for a wake-up of the core power supply."]
211    ENABLE = 1,
212}
213impl From<WKUPEN2_A> for bool {
214    #[inline(always)]
215    fn from(variant: WKUPEN2_A) -> Self {
216        variant as u8 != 0
217    }
218}
219#[doc = "Field `WKUPEN2` reader - Wake-up Input Enable 0 to 2"]
220pub struct WKUPEN2_R(crate::FieldReader<bool, WKUPEN2_A>);
221impl WKUPEN2_R {
222    #[inline(always)]
223    pub(crate) fn new(bits: bool) -> Self {
224        WKUPEN2_R(crate::FieldReader::new(bits))
225    }
226    #[doc = r"Get enumerated values variant"]
227    #[inline(always)]
228    pub fn variant(&self) -> WKUPEN2_A {
229        match self.bits {
230            false => WKUPEN2_A::DISABLE,
231            true => WKUPEN2_A::ENABLE,
232        }
233    }
234    #[doc = "Checks if the value of the field is `DISABLE`"]
235    #[inline(always)]
236    pub fn is_disable(&self) -> bool {
237        **self == WKUPEN2_A::DISABLE
238    }
239    #[doc = "Checks if the value of the field is `ENABLE`"]
240    #[inline(always)]
241    pub fn is_enable(&self) -> bool {
242        **self == WKUPEN2_A::ENABLE
243    }
244}
245impl core::ops::Deref for WKUPEN2_R {
246    type Target = crate::FieldReader<bool, WKUPEN2_A>;
247    #[inline(always)]
248    fn deref(&self) -> &Self::Target {
249        &self.0
250    }
251}
252#[doc = "Field `WKUPEN2` writer - Wake-up Input Enable 0 to 2"]
253pub struct WKUPEN2_W<'a> {
254    w: &'a mut W,
255}
256impl<'a> WKUPEN2_W<'a> {
257    #[doc = r"Writes `variant` to the field"]
258    #[inline(always)]
259    pub fn variant(self, variant: WKUPEN2_A) -> &'a mut W {
260        self.bit(variant.into())
261    }
262    #[doc = "The corresponding wake-up input has no wake-up effect."]
263    #[inline(always)]
264    pub fn disable(self) -> &'a mut W {
265        self.variant(WKUPEN2_A::DISABLE)
266    }
267    #[doc = "The corresponding wake-up input is enabled for a wake-up of the core power supply."]
268    #[inline(always)]
269    pub fn enable(self) -> &'a mut W {
270        self.variant(WKUPEN2_A::ENABLE)
271    }
272    #[doc = r"Sets the field bit"]
273    #[inline(always)]
274    pub fn set_bit(self) -> &'a mut W {
275        self.bit(true)
276    }
277    #[doc = r"Clears the field bit"]
278    #[inline(always)]
279    pub fn clear_bit(self) -> &'a mut W {
280        self.bit(false)
281    }
282    #[doc = r"Writes raw bits to the field"]
283    #[inline(always)]
284    pub fn bit(self, value: bool) -> &'a mut W {
285        self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2);
286        self.w
287    }
288}
289#[doc = "Wake-up Input Enable 0 to 3\n\nValue on reset: 0"]
290#[derive(Clone, Copy, Debug, PartialEq)]
291pub enum WKUPEN3_A {
292    #[doc = "0: The corresponding wake-up input has no wake-up effect."]
293    DISABLE = 0,
294    #[doc = "1: The corresponding wake-up input is enabled for a wake-up of the core power supply."]
295    ENABLE = 1,
296}
297impl From<WKUPEN3_A> for bool {
298    #[inline(always)]
299    fn from(variant: WKUPEN3_A) -> Self {
300        variant as u8 != 0
301    }
302}
303#[doc = "Field `WKUPEN3` reader - Wake-up Input Enable 0 to 3"]
304pub struct WKUPEN3_R(crate::FieldReader<bool, WKUPEN3_A>);
305impl WKUPEN3_R {
306    #[inline(always)]
307    pub(crate) fn new(bits: bool) -> Self {
308        WKUPEN3_R(crate::FieldReader::new(bits))
309    }
310    #[doc = r"Get enumerated values variant"]
311    #[inline(always)]
312    pub fn variant(&self) -> WKUPEN3_A {
313        match self.bits {
314            false => WKUPEN3_A::DISABLE,
315            true => WKUPEN3_A::ENABLE,
316        }
317    }
318    #[doc = "Checks if the value of the field is `DISABLE`"]
319    #[inline(always)]
320    pub fn is_disable(&self) -> bool {
321        **self == WKUPEN3_A::DISABLE
322    }
323    #[doc = "Checks if the value of the field is `ENABLE`"]
324    #[inline(always)]
325    pub fn is_enable(&self) -> bool {
326        **self == WKUPEN3_A::ENABLE
327    }
328}
329impl core::ops::Deref for WKUPEN3_R {
330    type Target = crate::FieldReader<bool, WKUPEN3_A>;
331    #[inline(always)]
332    fn deref(&self) -> &Self::Target {
333        &self.0
334    }
335}
336#[doc = "Field `WKUPEN3` writer - Wake-up Input Enable 0 to 3"]
337pub struct WKUPEN3_W<'a> {
338    w: &'a mut W,
339}
340impl<'a> WKUPEN3_W<'a> {
341    #[doc = r"Writes `variant` to the field"]
342    #[inline(always)]
343    pub fn variant(self, variant: WKUPEN3_A) -> &'a mut W {
344        self.bit(variant.into())
345    }
346    #[doc = "The corresponding wake-up input has no wake-up effect."]
347    #[inline(always)]
348    pub fn disable(self) -> &'a mut W {
349        self.variant(WKUPEN3_A::DISABLE)
350    }
351    #[doc = "The corresponding wake-up input is enabled for a wake-up of the core power supply."]
352    #[inline(always)]
353    pub fn enable(self) -> &'a mut W {
354        self.variant(WKUPEN3_A::ENABLE)
355    }
356    #[doc = r"Sets the field bit"]
357    #[inline(always)]
358    pub fn set_bit(self) -> &'a mut W {
359        self.bit(true)
360    }
361    #[doc = r"Clears the field bit"]
362    #[inline(always)]
363    pub fn clear_bit(self) -> &'a mut W {
364        self.bit(false)
365    }
366    #[doc = r"Writes raw bits to the field"]
367    #[inline(always)]
368    pub fn bit(self, value: bool) -> &'a mut W {
369        self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3);
370        self.w
371    }
372}
373#[doc = "Wake-up Input Enable 0 to 4\n\nValue on reset: 0"]
374#[derive(Clone, Copy, Debug, PartialEq)]
375pub enum WKUPEN4_A {
376    #[doc = "0: The corresponding wake-up input has no wake-up effect."]
377    DISABLE = 0,
378    #[doc = "1: The corresponding wake-up input is enabled for a wake-up of the core power supply."]
379    ENABLE = 1,
380}
381impl From<WKUPEN4_A> for bool {
382    #[inline(always)]
383    fn from(variant: WKUPEN4_A) -> Self {
384        variant as u8 != 0
385    }
386}
387#[doc = "Field `WKUPEN4` reader - Wake-up Input Enable 0 to 4"]
388pub struct WKUPEN4_R(crate::FieldReader<bool, WKUPEN4_A>);
389impl WKUPEN4_R {
390    #[inline(always)]
391    pub(crate) fn new(bits: bool) -> Self {
392        WKUPEN4_R(crate::FieldReader::new(bits))
393    }
394    #[doc = r"Get enumerated values variant"]
395    #[inline(always)]
396    pub fn variant(&self) -> WKUPEN4_A {
397        match self.bits {
398            false => WKUPEN4_A::DISABLE,
399            true => WKUPEN4_A::ENABLE,
400        }
401    }
402    #[doc = "Checks if the value of the field is `DISABLE`"]
403    #[inline(always)]
404    pub fn is_disable(&self) -> bool {
405        **self == WKUPEN4_A::DISABLE
406    }
407    #[doc = "Checks if the value of the field is `ENABLE`"]
408    #[inline(always)]
409    pub fn is_enable(&self) -> bool {
410        **self == WKUPEN4_A::ENABLE
411    }
412}
413impl core::ops::Deref for WKUPEN4_R {
414    type Target = crate::FieldReader<bool, WKUPEN4_A>;
415    #[inline(always)]
416    fn deref(&self) -> &Self::Target {
417        &self.0
418    }
419}
420#[doc = "Field `WKUPEN4` writer - Wake-up Input Enable 0 to 4"]
421pub struct WKUPEN4_W<'a> {
422    w: &'a mut W,
423}
424impl<'a> WKUPEN4_W<'a> {
425    #[doc = r"Writes `variant` to the field"]
426    #[inline(always)]
427    pub fn variant(self, variant: WKUPEN4_A) -> &'a mut W {
428        self.bit(variant.into())
429    }
430    #[doc = "The corresponding wake-up input has no wake-up effect."]
431    #[inline(always)]
432    pub fn disable(self) -> &'a mut W {
433        self.variant(WKUPEN4_A::DISABLE)
434    }
435    #[doc = "The corresponding wake-up input is enabled for a wake-up of the core power supply."]
436    #[inline(always)]
437    pub fn enable(self) -> &'a mut W {
438        self.variant(WKUPEN4_A::ENABLE)
439    }
440    #[doc = r"Sets the field bit"]
441    #[inline(always)]
442    pub fn set_bit(self) -> &'a mut W {
443        self.bit(true)
444    }
445    #[doc = r"Clears the field bit"]
446    #[inline(always)]
447    pub fn clear_bit(self) -> &'a mut W {
448        self.bit(false)
449    }
450    #[doc = r"Writes raw bits to the field"]
451    #[inline(always)]
452    pub fn bit(self, value: bool) -> &'a mut W {
453        self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4);
454        self.w
455    }
456}
457#[doc = "Wake-up Input Enable 0 to 5\n\nValue on reset: 0"]
458#[derive(Clone, Copy, Debug, PartialEq)]
459pub enum WKUPEN5_A {
460    #[doc = "0: The corresponding wake-up input has no wake-up effect."]
461    DISABLE = 0,
462    #[doc = "1: The corresponding wake-up input is enabled for a wake-up of the core power supply."]
463    ENABLE = 1,
464}
465impl From<WKUPEN5_A> for bool {
466    #[inline(always)]
467    fn from(variant: WKUPEN5_A) -> Self {
468        variant as u8 != 0
469    }
470}
471#[doc = "Field `WKUPEN5` reader - Wake-up Input Enable 0 to 5"]
472pub struct WKUPEN5_R(crate::FieldReader<bool, WKUPEN5_A>);
473impl WKUPEN5_R {
474    #[inline(always)]
475    pub(crate) fn new(bits: bool) -> Self {
476        WKUPEN5_R(crate::FieldReader::new(bits))
477    }
478    #[doc = r"Get enumerated values variant"]
479    #[inline(always)]
480    pub fn variant(&self) -> WKUPEN5_A {
481        match self.bits {
482            false => WKUPEN5_A::DISABLE,
483            true => WKUPEN5_A::ENABLE,
484        }
485    }
486    #[doc = "Checks if the value of the field is `DISABLE`"]
487    #[inline(always)]
488    pub fn is_disable(&self) -> bool {
489        **self == WKUPEN5_A::DISABLE
490    }
491    #[doc = "Checks if the value of the field is `ENABLE`"]
492    #[inline(always)]
493    pub fn is_enable(&self) -> bool {
494        **self == WKUPEN5_A::ENABLE
495    }
496}
497impl core::ops::Deref for WKUPEN5_R {
498    type Target = crate::FieldReader<bool, WKUPEN5_A>;
499    #[inline(always)]
500    fn deref(&self) -> &Self::Target {
501        &self.0
502    }
503}
504#[doc = "Field `WKUPEN5` writer - Wake-up Input Enable 0 to 5"]
505pub struct WKUPEN5_W<'a> {
506    w: &'a mut W,
507}
508impl<'a> WKUPEN5_W<'a> {
509    #[doc = r"Writes `variant` to the field"]
510    #[inline(always)]
511    pub fn variant(self, variant: WKUPEN5_A) -> &'a mut W {
512        self.bit(variant.into())
513    }
514    #[doc = "The corresponding wake-up input has no wake-up effect."]
515    #[inline(always)]
516    pub fn disable(self) -> &'a mut W {
517        self.variant(WKUPEN5_A::DISABLE)
518    }
519    #[doc = "The corresponding wake-up input is enabled for a wake-up of the core power supply."]
520    #[inline(always)]
521    pub fn enable(self) -> &'a mut W {
522        self.variant(WKUPEN5_A::ENABLE)
523    }
524    #[doc = r"Sets the field bit"]
525    #[inline(always)]
526    pub fn set_bit(self) -> &'a mut W {
527        self.bit(true)
528    }
529    #[doc = r"Clears the field bit"]
530    #[inline(always)]
531    pub fn clear_bit(self) -> &'a mut W {
532        self.bit(false)
533    }
534    #[doc = r"Writes raw bits to the field"]
535    #[inline(always)]
536    pub fn bit(self, value: bool) -> &'a mut W {
537        self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5);
538        self.w
539    }
540}
541#[doc = "Wake-up Input Enable 0 to 6\n\nValue on reset: 0"]
542#[derive(Clone, Copy, Debug, PartialEq)]
543pub enum WKUPEN6_A {
544    #[doc = "0: The corresponding wake-up input has no wake-up effect."]
545    DISABLE = 0,
546    #[doc = "1: The corresponding wake-up input is enabled for a wake-up of the core power supply."]
547    ENABLE = 1,
548}
549impl From<WKUPEN6_A> for bool {
550    #[inline(always)]
551    fn from(variant: WKUPEN6_A) -> Self {
552        variant as u8 != 0
553    }
554}
555#[doc = "Field `WKUPEN6` reader - Wake-up Input Enable 0 to 6"]
556pub struct WKUPEN6_R(crate::FieldReader<bool, WKUPEN6_A>);
557impl WKUPEN6_R {
558    #[inline(always)]
559    pub(crate) fn new(bits: bool) -> Self {
560        WKUPEN6_R(crate::FieldReader::new(bits))
561    }
562    #[doc = r"Get enumerated values variant"]
563    #[inline(always)]
564    pub fn variant(&self) -> WKUPEN6_A {
565        match self.bits {
566            false => WKUPEN6_A::DISABLE,
567            true => WKUPEN6_A::ENABLE,
568        }
569    }
570    #[doc = "Checks if the value of the field is `DISABLE`"]
571    #[inline(always)]
572    pub fn is_disable(&self) -> bool {
573        **self == WKUPEN6_A::DISABLE
574    }
575    #[doc = "Checks if the value of the field is `ENABLE`"]
576    #[inline(always)]
577    pub fn is_enable(&self) -> bool {
578        **self == WKUPEN6_A::ENABLE
579    }
580}
581impl core::ops::Deref for WKUPEN6_R {
582    type Target = crate::FieldReader<bool, WKUPEN6_A>;
583    #[inline(always)]
584    fn deref(&self) -> &Self::Target {
585        &self.0
586    }
587}
588#[doc = "Field `WKUPEN6` writer - Wake-up Input Enable 0 to 6"]
589pub struct WKUPEN6_W<'a> {
590    w: &'a mut W,
591}
592impl<'a> WKUPEN6_W<'a> {
593    #[doc = r"Writes `variant` to the field"]
594    #[inline(always)]
595    pub fn variant(self, variant: WKUPEN6_A) -> &'a mut W {
596        self.bit(variant.into())
597    }
598    #[doc = "The corresponding wake-up input has no wake-up effect."]
599    #[inline(always)]
600    pub fn disable(self) -> &'a mut W {
601        self.variant(WKUPEN6_A::DISABLE)
602    }
603    #[doc = "The corresponding wake-up input is enabled for a wake-up of the core power supply."]
604    #[inline(always)]
605    pub fn enable(self) -> &'a mut W {
606        self.variant(WKUPEN6_A::ENABLE)
607    }
608    #[doc = r"Sets the field bit"]
609    #[inline(always)]
610    pub fn set_bit(self) -> &'a mut W {
611        self.bit(true)
612    }
613    #[doc = r"Clears the field bit"]
614    #[inline(always)]
615    pub fn clear_bit(self) -> &'a mut W {
616        self.bit(false)
617    }
618    #[doc = r"Writes raw bits to the field"]
619    #[inline(always)]
620    pub fn bit(self, value: bool) -> &'a mut W {
621        self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6);
622        self.w
623    }
624}
625#[doc = "Wake-up Input Enable 0 to 7\n\nValue on reset: 0"]
626#[derive(Clone, Copy, Debug, PartialEq)]
627pub enum WKUPEN7_A {
628    #[doc = "0: The corresponding wake-up input has no wake-up effect."]
629    DISABLE = 0,
630    #[doc = "1: The corresponding wake-up input is enabled for a wake-up of the core power supply."]
631    ENABLE = 1,
632}
633impl From<WKUPEN7_A> for bool {
634    #[inline(always)]
635    fn from(variant: WKUPEN7_A) -> Self {
636        variant as u8 != 0
637    }
638}
639#[doc = "Field `WKUPEN7` reader - Wake-up Input Enable 0 to 7"]
640pub struct WKUPEN7_R(crate::FieldReader<bool, WKUPEN7_A>);
641impl WKUPEN7_R {
642    #[inline(always)]
643    pub(crate) fn new(bits: bool) -> Self {
644        WKUPEN7_R(crate::FieldReader::new(bits))
645    }
646    #[doc = r"Get enumerated values variant"]
647    #[inline(always)]
648    pub fn variant(&self) -> WKUPEN7_A {
649        match self.bits {
650            false => WKUPEN7_A::DISABLE,
651            true => WKUPEN7_A::ENABLE,
652        }
653    }
654    #[doc = "Checks if the value of the field is `DISABLE`"]
655    #[inline(always)]
656    pub fn is_disable(&self) -> bool {
657        **self == WKUPEN7_A::DISABLE
658    }
659    #[doc = "Checks if the value of the field is `ENABLE`"]
660    #[inline(always)]
661    pub fn is_enable(&self) -> bool {
662        **self == WKUPEN7_A::ENABLE
663    }
664}
665impl core::ops::Deref for WKUPEN7_R {
666    type Target = crate::FieldReader<bool, WKUPEN7_A>;
667    #[inline(always)]
668    fn deref(&self) -> &Self::Target {
669        &self.0
670    }
671}
672#[doc = "Field `WKUPEN7` writer - Wake-up Input Enable 0 to 7"]
673pub struct WKUPEN7_W<'a> {
674    w: &'a mut W,
675}
676impl<'a> WKUPEN7_W<'a> {
677    #[doc = r"Writes `variant` to the field"]
678    #[inline(always)]
679    pub fn variant(self, variant: WKUPEN7_A) -> &'a mut W {
680        self.bit(variant.into())
681    }
682    #[doc = "The corresponding wake-up input has no wake-up effect."]
683    #[inline(always)]
684    pub fn disable(self) -> &'a mut W {
685        self.variant(WKUPEN7_A::DISABLE)
686    }
687    #[doc = "The corresponding wake-up input is enabled for a wake-up of the core power supply."]
688    #[inline(always)]
689    pub fn enable(self) -> &'a mut W {
690        self.variant(WKUPEN7_A::ENABLE)
691    }
692    #[doc = r"Sets the field bit"]
693    #[inline(always)]
694    pub fn set_bit(self) -> &'a mut W {
695        self.bit(true)
696    }
697    #[doc = r"Clears the field bit"]
698    #[inline(always)]
699    pub fn clear_bit(self) -> &'a mut W {
700        self.bit(false)
701    }
702    #[doc = r"Writes raw bits to the field"]
703    #[inline(always)]
704    pub fn bit(self, value: bool) -> &'a mut W {
705        self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7);
706        self.w
707    }
708}
709#[doc = "Wake-up Input Enable 0 to 8\n\nValue on reset: 0"]
710#[derive(Clone, Copy, Debug, PartialEq)]
711pub enum WKUPEN8_A {
712    #[doc = "0: The corresponding wake-up input has no wake-up effect."]
713    DISABLE = 0,
714    #[doc = "1: The corresponding wake-up input is enabled for a wake-up of the core power supply."]
715    ENABLE = 1,
716}
717impl From<WKUPEN8_A> for bool {
718    #[inline(always)]
719    fn from(variant: WKUPEN8_A) -> Self {
720        variant as u8 != 0
721    }
722}
723#[doc = "Field `WKUPEN8` reader - Wake-up Input Enable 0 to 8"]
724pub struct WKUPEN8_R(crate::FieldReader<bool, WKUPEN8_A>);
725impl WKUPEN8_R {
726    #[inline(always)]
727    pub(crate) fn new(bits: bool) -> Self {
728        WKUPEN8_R(crate::FieldReader::new(bits))
729    }
730    #[doc = r"Get enumerated values variant"]
731    #[inline(always)]
732    pub fn variant(&self) -> WKUPEN8_A {
733        match self.bits {
734            false => WKUPEN8_A::DISABLE,
735            true => WKUPEN8_A::ENABLE,
736        }
737    }
738    #[doc = "Checks if the value of the field is `DISABLE`"]
739    #[inline(always)]
740    pub fn is_disable(&self) -> bool {
741        **self == WKUPEN8_A::DISABLE
742    }
743    #[doc = "Checks if the value of the field is `ENABLE`"]
744    #[inline(always)]
745    pub fn is_enable(&self) -> bool {
746        **self == WKUPEN8_A::ENABLE
747    }
748}
749impl core::ops::Deref for WKUPEN8_R {
750    type Target = crate::FieldReader<bool, WKUPEN8_A>;
751    #[inline(always)]
752    fn deref(&self) -> &Self::Target {
753        &self.0
754    }
755}
756#[doc = "Field `WKUPEN8` writer - Wake-up Input Enable 0 to 8"]
757pub struct WKUPEN8_W<'a> {
758    w: &'a mut W,
759}
760impl<'a> WKUPEN8_W<'a> {
761    #[doc = r"Writes `variant` to the field"]
762    #[inline(always)]
763    pub fn variant(self, variant: WKUPEN8_A) -> &'a mut W {
764        self.bit(variant.into())
765    }
766    #[doc = "The corresponding wake-up input has no wake-up effect."]
767    #[inline(always)]
768    pub fn disable(self) -> &'a mut W {
769        self.variant(WKUPEN8_A::DISABLE)
770    }
771    #[doc = "The corresponding wake-up input is enabled for a wake-up of the core power supply."]
772    #[inline(always)]
773    pub fn enable(self) -> &'a mut W {
774        self.variant(WKUPEN8_A::ENABLE)
775    }
776    #[doc = r"Sets the field bit"]
777    #[inline(always)]
778    pub fn set_bit(self) -> &'a mut W {
779        self.bit(true)
780    }
781    #[doc = r"Clears the field bit"]
782    #[inline(always)]
783    pub fn clear_bit(self) -> &'a mut W {
784        self.bit(false)
785    }
786    #[doc = r"Writes raw bits to the field"]
787    #[inline(always)]
788    pub fn bit(self, value: bool) -> &'a mut W {
789        self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8);
790        self.w
791    }
792}
793#[doc = "Wake-up Input Enable 0 to 9\n\nValue on reset: 0"]
794#[derive(Clone, Copy, Debug, PartialEq)]
795pub enum WKUPEN9_A {
796    #[doc = "0: The corresponding wake-up input has no wake-up effect."]
797    DISABLE = 0,
798    #[doc = "1: The corresponding wake-up input is enabled for a wake-up of the core power supply."]
799    ENABLE = 1,
800}
801impl From<WKUPEN9_A> for bool {
802    #[inline(always)]
803    fn from(variant: WKUPEN9_A) -> Self {
804        variant as u8 != 0
805    }
806}
807#[doc = "Field `WKUPEN9` reader - Wake-up Input Enable 0 to 9"]
808pub struct WKUPEN9_R(crate::FieldReader<bool, WKUPEN9_A>);
809impl WKUPEN9_R {
810    #[inline(always)]
811    pub(crate) fn new(bits: bool) -> Self {
812        WKUPEN9_R(crate::FieldReader::new(bits))
813    }
814    #[doc = r"Get enumerated values variant"]
815    #[inline(always)]
816    pub fn variant(&self) -> WKUPEN9_A {
817        match self.bits {
818            false => WKUPEN9_A::DISABLE,
819            true => WKUPEN9_A::ENABLE,
820        }
821    }
822    #[doc = "Checks if the value of the field is `DISABLE`"]
823    #[inline(always)]
824    pub fn is_disable(&self) -> bool {
825        **self == WKUPEN9_A::DISABLE
826    }
827    #[doc = "Checks if the value of the field is `ENABLE`"]
828    #[inline(always)]
829    pub fn is_enable(&self) -> bool {
830        **self == WKUPEN9_A::ENABLE
831    }
832}
833impl core::ops::Deref for WKUPEN9_R {
834    type Target = crate::FieldReader<bool, WKUPEN9_A>;
835    #[inline(always)]
836    fn deref(&self) -> &Self::Target {
837        &self.0
838    }
839}
840#[doc = "Field `WKUPEN9` writer - Wake-up Input Enable 0 to 9"]
841pub struct WKUPEN9_W<'a> {
842    w: &'a mut W,
843}
844impl<'a> WKUPEN9_W<'a> {
845    #[doc = r"Writes `variant` to the field"]
846    #[inline(always)]
847    pub fn variant(self, variant: WKUPEN9_A) -> &'a mut W {
848        self.bit(variant.into())
849    }
850    #[doc = "The corresponding wake-up input has no wake-up effect."]
851    #[inline(always)]
852    pub fn disable(self) -> &'a mut W {
853        self.variant(WKUPEN9_A::DISABLE)
854    }
855    #[doc = "The corresponding wake-up input is enabled for a wake-up of the core power supply."]
856    #[inline(always)]
857    pub fn enable(self) -> &'a mut W {
858        self.variant(WKUPEN9_A::ENABLE)
859    }
860    #[doc = r"Sets the field bit"]
861    #[inline(always)]
862    pub fn set_bit(self) -> &'a mut W {
863        self.bit(true)
864    }
865    #[doc = r"Clears the field bit"]
866    #[inline(always)]
867    pub fn clear_bit(self) -> &'a mut W {
868        self.bit(false)
869    }
870    #[doc = r"Writes raw bits to the field"]
871    #[inline(always)]
872    pub fn bit(self, value: bool) -> &'a mut W {
873        self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9);
874        self.w
875    }
876}
877#[doc = "Wake-up Input Enable 0 to 10\n\nValue on reset: 0"]
878#[derive(Clone, Copy, Debug, PartialEq)]
879pub enum WKUPEN10_A {
880    #[doc = "0: The corresponding wake-up input has no wake-up effect."]
881    DISABLE = 0,
882    #[doc = "1: The corresponding wake-up input is enabled for a wake-up of the core power supply."]
883    ENABLE = 1,
884}
885impl From<WKUPEN10_A> for bool {
886    #[inline(always)]
887    fn from(variant: WKUPEN10_A) -> Self {
888        variant as u8 != 0
889    }
890}
891#[doc = "Field `WKUPEN10` reader - Wake-up Input Enable 0 to 10"]
892pub struct WKUPEN10_R(crate::FieldReader<bool, WKUPEN10_A>);
893impl WKUPEN10_R {
894    #[inline(always)]
895    pub(crate) fn new(bits: bool) -> Self {
896        WKUPEN10_R(crate::FieldReader::new(bits))
897    }
898    #[doc = r"Get enumerated values variant"]
899    #[inline(always)]
900    pub fn variant(&self) -> WKUPEN10_A {
901        match self.bits {
902            false => WKUPEN10_A::DISABLE,
903            true => WKUPEN10_A::ENABLE,
904        }
905    }
906    #[doc = "Checks if the value of the field is `DISABLE`"]
907    #[inline(always)]
908    pub fn is_disable(&self) -> bool {
909        **self == WKUPEN10_A::DISABLE
910    }
911    #[doc = "Checks if the value of the field is `ENABLE`"]
912    #[inline(always)]
913    pub fn is_enable(&self) -> bool {
914        **self == WKUPEN10_A::ENABLE
915    }
916}
917impl core::ops::Deref for WKUPEN10_R {
918    type Target = crate::FieldReader<bool, WKUPEN10_A>;
919    #[inline(always)]
920    fn deref(&self) -> &Self::Target {
921        &self.0
922    }
923}
924#[doc = "Field `WKUPEN10` writer - Wake-up Input Enable 0 to 10"]
925pub struct WKUPEN10_W<'a> {
926    w: &'a mut W,
927}
928impl<'a> WKUPEN10_W<'a> {
929    #[doc = r"Writes `variant` to the field"]
930    #[inline(always)]
931    pub fn variant(self, variant: WKUPEN10_A) -> &'a mut W {
932        self.bit(variant.into())
933    }
934    #[doc = "The corresponding wake-up input has no wake-up effect."]
935    #[inline(always)]
936    pub fn disable(self) -> &'a mut W {
937        self.variant(WKUPEN10_A::DISABLE)
938    }
939    #[doc = "The corresponding wake-up input is enabled for a wake-up of the core power supply."]
940    #[inline(always)]
941    pub fn enable(self) -> &'a mut W {
942        self.variant(WKUPEN10_A::ENABLE)
943    }
944    #[doc = r"Sets the field bit"]
945    #[inline(always)]
946    pub fn set_bit(self) -> &'a mut W {
947        self.bit(true)
948    }
949    #[doc = r"Clears the field bit"]
950    #[inline(always)]
951    pub fn clear_bit(self) -> &'a mut W {
952        self.bit(false)
953    }
954    #[doc = r"Writes raw bits to the field"]
955    #[inline(always)]
956    pub fn bit(self, value: bool) -> &'a mut W {
957        self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10);
958        self.w
959    }
960}
961#[doc = "Wake-up Input Enable 0 to 11\n\nValue on reset: 0"]
962#[derive(Clone, Copy, Debug, PartialEq)]
963pub enum WKUPEN11_A {
964    #[doc = "0: The corresponding wake-up input has no wake-up effect."]
965    DISABLE = 0,
966    #[doc = "1: The corresponding wake-up input is enabled for a wake-up of the core power supply."]
967    ENABLE = 1,
968}
969impl From<WKUPEN11_A> for bool {
970    #[inline(always)]
971    fn from(variant: WKUPEN11_A) -> Self {
972        variant as u8 != 0
973    }
974}
975#[doc = "Field `WKUPEN11` reader - Wake-up Input Enable 0 to 11"]
976pub struct WKUPEN11_R(crate::FieldReader<bool, WKUPEN11_A>);
977impl WKUPEN11_R {
978    #[inline(always)]
979    pub(crate) fn new(bits: bool) -> Self {
980        WKUPEN11_R(crate::FieldReader::new(bits))
981    }
982    #[doc = r"Get enumerated values variant"]
983    #[inline(always)]
984    pub fn variant(&self) -> WKUPEN11_A {
985        match self.bits {
986            false => WKUPEN11_A::DISABLE,
987            true => WKUPEN11_A::ENABLE,
988        }
989    }
990    #[doc = "Checks if the value of the field is `DISABLE`"]
991    #[inline(always)]
992    pub fn is_disable(&self) -> bool {
993        **self == WKUPEN11_A::DISABLE
994    }
995    #[doc = "Checks if the value of the field is `ENABLE`"]
996    #[inline(always)]
997    pub fn is_enable(&self) -> bool {
998        **self == WKUPEN11_A::ENABLE
999    }
1000}
1001impl core::ops::Deref for WKUPEN11_R {
1002    type Target = crate::FieldReader<bool, WKUPEN11_A>;
1003    #[inline(always)]
1004    fn deref(&self) -> &Self::Target {
1005        &self.0
1006    }
1007}
1008#[doc = "Field `WKUPEN11` writer - Wake-up Input Enable 0 to 11"]
1009pub struct WKUPEN11_W<'a> {
1010    w: &'a mut W,
1011}
1012impl<'a> WKUPEN11_W<'a> {
1013    #[doc = r"Writes `variant` to the field"]
1014    #[inline(always)]
1015    pub fn variant(self, variant: WKUPEN11_A) -> &'a mut W {
1016        self.bit(variant.into())
1017    }
1018    #[doc = "The corresponding wake-up input has no wake-up effect."]
1019    #[inline(always)]
1020    pub fn disable(self) -> &'a mut W {
1021        self.variant(WKUPEN11_A::DISABLE)
1022    }
1023    #[doc = "The corresponding wake-up input is enabled for a wake-up of the core power supply."]
1024    #[inline(always)]
1025    pub fn enable(self) -> &'a mut W {
1026        self.variant(WKUPEN11_A::ENABLE)
1027    }
1028    #[doc = r"Sets the field bit"]
1029    #[inline(always)]
1030    pub fn set_bit(self) -> &'a mut W {
1031        self.bit(true)
1032    }
1033    #[doc = r"Clears the field bit"]
1034    #[inline(always)]
1035    pub fn clear_bit(self) -> &'a mut W {
1036        self.bit(false)
1037    }
1038    #[doc = r"Writes raw bits to the field"]
1039    #[inline(always)]
1040    pub fn bit(self, value: bool) -> &'a mut W {
1041        self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11);
1042        self.w
1043    }
1044}
1045#[doc = "Wake-up Input Enable 0 to 12\n\nValue on reset: 0"]
1046#[derive(Clone, Copy, Debug, PartialEq)]
1047pub enum WKUPEN12_A {
1048    #[doc = "0: The corresponding wake-up input has no wake-up effect."]
1049    DISABLE = 0,
1050    #[doc = "1: The corresponding wake-up input is enabled for a wake-up of the core power supply."]
1051    ENABLE = 1,
1052}
1053impl From<WKUPEN12_A> for bool {
1054    #[inline(always)]
1055    fn from(variant: WKUPEN12_A) -> Self {
1056        variant as u8 != 0
1057    }
1058}
1059#[doc = "Field `WKUPEN12` reader - Wake-up Input Enable 0 to 12"]
1060pub struct WKUPEN12_R(crate::FieldReader<bool, WKUPEN12_A>);
1061impl WKUPEN12_R {
1062    #[inline(always)]
1063    pub(crate) fn new(bits: bool) -> Self {
1064        WKUPEN12_R(crate::FieldReader::new(bits))
1065    }
1066    #[doc = r"Get enumerated values variant"]
1067    #[inline(always)]
1068    pub fn variant(&self) -> WKUPEN12_A {
1069        match self.bits {
1070            false => WKUPEN12_A::DISABLE,
1071            true => WKUPEN12_A::ENABLE,
1072        }
1073    }
1074    #[doc = "Checks if the value of the field is `DISABLE`"]
1075    #[inline(always)]
1076    pub fn is_disable(&self) -> bool {
1077        **self == WKUPEN12_A::DISABLE
1078    }
1079    #[doc = "Checks if the value of the field is `ENABLE`"]
1080    #[inline(always)]
1081    pub fn is_enable(&self) -> bool {
1082        **self == WKUPEN12_A::ENABLE
1083    }
1084}
1085impl core::ops::Deref for WKUPEN12_R {
1086    type Target = crate::FieldReader<bool, WKUPEN12_A>;
1087    #[inline(always)]
1088    fn deref(&self) -> &Self::Target {
1089        &self.0
1090    }
1091}
1092#[doc = "Field `WKUPEN12` writer - Wake-up Input Enable 0 to 12"]
1093pub struct WKUPEN12_W<'a> {
1094    w: &'a mut W,
1095}
1096impl<'a> WKUPEN12_W<'a> {
1097    #[doc = r"Writes `variant` to the field"]
1098    #[inline(always)]
1099    pub fn variant(self, variant: WKUPEN12_A) -> &'a mut W {
1100        self.bit(variant.into())
1101    }
1102    #[doc = "The corresponding wake-up input has no wake-up effect."]
1103    #[inline(always)]
1104    pub fn disable(self) -> &'a mut W {
1105        self.variant(WKUPEN12_A::DISABLE)
1106    }
1107    #[doc = "The corresponding wake-up input is enabled for a wake-up of the core power supply."]
1108    #[inline(always)]
1109    pub fn enable(self) -> &'a mut W {
1110        self.variant(WKUPEN12_A::ENABLE)
1111    }
1112    #[doc = r"Sets the field bit"]
1113    #[inline(always)]
1114    pub fn set_bit(self) -> &'a mut W {
1115        self.bit(true)
1116    }
1117    #[doc = r"Clears the field bit"]
1118    #[inline(always)]
1119    pub fn clear_bit(self) -> &'a mut W {
1120        self.bit(false)
1121    }
1122    #[doc = r"Writes raw bits to the field"]
1123    #[inline(always)]
1124    pub fn bit(self, value: bool) -> &'a mut W {
1125        self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12);
1126        self.w
1127    }
1128}
1129#[doc = "Wake-up Input Enable 0 to 13\n\nValue on reset: 0"]
1130#[derive(Clone, Copy, Debug, PartialEq)]
1131pub enum WKUPEN13_A {
1132    #[doc = "0: The corresponding wake-up input has no wake-up effect."]
1133    DISABLE = 0,
1134    #[doc = "1: The corresponding wake-up input is enabled for a wake-up of the core power supply."]
1135    ENABLE = 1,
1136}
1137impl From<WKUPEN13_A> for bool {
1138    #[inline(always)]
1139    fn from(variant: WKUPEN13_A) -> Self {
1140        variant as u8 != 0
1141    }
1142}
1143#[doc = "Field `WKUPEN13` reader - Wake-up Input Enable 0 to 13"]
1144pub struct WKUPEN13_R(crate::FieldReader<bool, WKUPEN13_A>);
1145impl WKUPEN13_R {
1146    #[inline(always)]
1147    pub(crate) fn new(bits: bool) -> Self {
1148        WKUPEN13_R(crate::FieldReader::new(bits))
1149    }
1150    #[doc = r"Get enumerated values variant"]
1151    #[inline(always)]
1152    pub fn variant(&self) -> WKUPEN13_A {
1153        match self.bits {
1154            false => WKUPEN13_A::DISABLE,
1155            true => WKUPEN13_A::ENABLE,
1156        }
1157    }
1158    #[doc = "Checks if the value of the field is `DISABLE`"]
1159    #[inline(always)]
1160    pub fn is_disable(&self) -> bool {
1161        **self == WKUPEN13_A::DISABLE
1162    }
1163    #[doc = "Checks if the value of the field is `ENABLE`"]
1164    #[inline(always)]
1165    pub fn is_enable(&self) -> bool {
1166        **self == WKUPEN13_A::ENABLE
1167    }
1168}
1169impl core::ops::Deref for WKUPEN13_R {
1170    type Target = crate::FieldReader<bool, WKUPEN13_A>;
1171    #[inline(always)]
1172    fn deref(&self) -> &Self::Target {
1173        &self.0
1174    }
1175}
1176#[doc = "Field `WKUPEN13` writer - Wake-up Input Enable 0 to 13"]
1177pub struct WKUPEN13_W<'a> {
1178    w: &'a mut W,
1179}
1180impl<'a> WKUPEN13_W<'a> {
1181    #[doc = r"Writes `variant` to the field"]
1182    #[inline(always)]
1183    pub fn variant(self, variant: WKUPEN13_A) -> &'a mut W {
1184        self.bit(variant.into())
1185    }
1186    #[doc = "The corresponding wake-up input has no wake-up effect."]
1187    #[inline(always)]
1188    pub fn disable(self) -> &'a mut W {
1189        self.variant(WKUPEN13_A::DISABLE)
1190    }
1191    #[doc = "The corresponding wake-up input is enabled for a wake-up of the core power supply."]
1192    #[inline(always)]
1193    pub fn enable(self) -> &'a mut W {
1194        self.variant(WKUPEN13_A::ENABLE)
1195    }
1196    #[doc = r"Sets the field bit"]
1197    #[inline(always)]
1198    pub fn set_bit(self) -> &'a mut W {
1199        self.bit(true)
1200    }
1201    #[doc = r"Clears the field bit"]
1202    #[inline(always)]
1203    pub fn clear_bit(self) -> &'a mut W {
1204        self.bit(false)
1205    }
1206    #[doc = r"Writes raw bits to the field"]
1207    #[inline(always)]
1208    pub fn bit(self, value: bool) -> &'a mut W {
1209        self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13);
1210        self.w
1211    }
1212}
1213#[doc = "Wake-up Input Type 0 to 0\n\nValue on reset: 0"]
1214#[derive(Clone, Copy, Debug, PartialEq)]
1215pub enum WKUPT0_A {
1216    #[doc = "0: A falling edge followed by a low level for a period defined by WKUPDBC on the corre-sponding wake-up input forces the wake-up of the core power supply."]
1217    LOW = 0,
1218    #[doc = "1: A rising edge followed by a high level for a period defined by WKUPDBC on the cor-responding wake-up input forces the wake-up of the core power supply."]
1219    HIGH = 1,
1220}
1221impl From<WKUPT0_A> for bool {
1222    #[inline(always)]
1223    fn from(variant: WKUPT0_A) -> Self {
1224        variant as u8 != 0
1225    }
1226}
1227#[doc = "Field `WKUPT0` reader - Wake-up Input Type 0 to 0"]
1228pub struct WKUPT0_R(crate::FieldReader<bool, WKUPT0_A>);
1229impl WKUPT0_R {
1230    #[inline(always)]
1231    pub(crate) fn new(bits: bool) -> Self {
1232        WKUPT0_R(crate::FieldReader::new(bits))
1233    }
1234    #[doc = r"Get enumerated values variant"]
1235    #[inline(always)]
1236    pub fn variant(&self) -> WKUPT0_A {
1237        match self.bits {
1238            false => WKUPT0_A::LOW,
1239            true => WKUPT0_A::HIGH,
1240        }
1241    }
1242    #[doc = "Checks if the value of the field is `LOW`"]
1243    #[inline(always)]
1244    pub fn is_low(&self) -> bool {
1245        **self == WKUPT0_A::LOW
1246    }
1247    #[doc = "Checks if the value of the field is `HIGH`"]
1248    #[inline(always)]
1249    pub fn is_high(&self) -> bool {
1250        **self == WKUPT0_A::HIGH
1251    }
1252}
1253impl core::ops::Deref for WKUPT0_R {
1254    type Target = crate::FieldReader<bool, WKUPT0_A>;
1255    #[inline(always)]
1256    fn deref(&self) -> &Self::Target {
1257        &self.0
1258    }
1259}
1260#[doc = "Field `WKUPT0` writer - Wake-up Input Type 0 to 0"]
1261pub struct WKUPT0_W<'a> {
1262    w: &'a mut W,
1263}
1264impl<'a> WKUPT0_W<'a> {
1265    #[doc = r"Writes `variant` to the field"]
1266    #[inline(always)]
1267    pub fn variant(self, variant: WKUPT0_A) -> &'a mut W {
1268        self.bit(variant.into())
1269    }
1270    #[doc = "A falling edge followed by a low level for a period defined by WKUPDBC on the corre-sponding wake-up input forces the wake-up of the core power supply."]
1271    #[inline(always)]
1272    pub fn low(self) -> &'a mut W {
1273        self.variant(WKUPT0_A::LOW)
1274    }
1275    #[doc = "A rising edge followed by a high level for a period defined by WKUPDBC on the cor-responding wake-up input forces the wake-up of the core power supply."]
1276    #[inline(always)]
1277    pub fn high(self) -> &'a mut W {
1278        self.variant(WKUPT0_A::HIGH)
1279    }
1280    #[doc = r"Sets the field bit"]
1281    #[inline(always)]
1282    pub fn set_bit(self) -> &'a mut W {
1283        self.bit(true)
1284    }
1285    #[doc = r"Clears the field bit"]
1286    #[inline(always)]
1287    pub fn clear_bit(self) -> &'a mut W {
1288        self.bit(false)
1289    }
1290    #[doc = r"Writes raw bits to the field"]
1291    #[inline(always)]
1292    pub fn bit(self, value: bool) -> &'a mut W {
1293        self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16);
1294        self.w
1295    }
1296}
1297#[doc = "Wake-up Input Type 0 to 1\n\nValue on reset: 0"]
1298#[derive(Clone, Copy, Debug, PartialEq)]
1299pub enum WKUPT1_A {
1300    #[doc = "0: A falling edge followed by a low level for a period defined by WKUPDBC on the corre-sponding wake-up input forces the wake-up of the core power supply."]
1301    LOW = 0,
1302    #[doc = "1: A rising edge followed by a high level for a period defined by WKUPDBC on the cor-responding wake-up input forces the wake-up of the core power supply."]
1303    HIGH = 1,
1304}
1305impl From<WKUPT1_A> for bool {
1306    #[inline(always)]
1307    fn from(variant: WKUPT1_A) -> Self {
1308        variant as u8 != 0
1309    }
1310}
1311#[doc = "Field `WKUPT1` reader - Wake-up Input Type 0 to 1"]
1312pub struct WKUPT1_R(crate::FieldReader<bool, WKUPT1_A>);
1313impl WKUPT1_R {
1314    #[inline(always)]
1315    pub(crate) fn new(bits: bool) -> Self {
1316        WKUPT1_R(crate::FieldReader::new(bits))
1317    }
1318    #[doc = r"Get enumerated values variant"]
1319    #[inline(always)]
1320    pub fn variant(&self) -> WKUPT1_A {
1321        match self.bits {
1322            false => WKUPT1_A::LOW,
1323            true => WKUPT1_A::HIGH,
1324        }
1325    }
1326    #[doc = "Checks if the value of the field is `LOW`"]
1327    #[inline(always)]
1328    pub fn is_low(&self) -> bool {
1329        **self == WKUPT1_A::LOW
1330    }
1331    #[doc = "Checks if the value of the field is `HIGH`"]
1332    #[inline(always)]
1333    pub fn is_high(&self) -> bool {
1334        **self == WKUPT1_A::HIGH
1335    }
1336}
1337impl core::ops::Deref for WKUPT1_R {
1338    type Target = crate::FieldReader<bool, WKUPT1_A>;
1339    #[inline(always)]
1340    fn deref(&self) -> &Self::Target {
1341        &self.0
1342    }
1343}
1344#[doc = "Field `WKUPT1` writer - Wake-up Input Type 0 to 1"]
1345pub struct WKUPT1_W<'a> {
1346    w: &'a mut W,
1347}
1348impl<'a> WKUPT1_W<'a> {
1349    #[doc = r"Writes `variant` to the field"]
1350    #[inline(always)]
1351    pub fn variant(self, variant: WKUPT1_A) -> &'a mut W {
1352        self.bit(variant.into())
1353    }
1354    #[doc = "A falling edge followed by a low level for a period defined by WKUPDBC on the corre-sponding wake-up input forces the wake-up of the core power supply."]
1355    #[inline(always)]
1356    pub fn low(self) -> &'a mut W {
1357        self.variant(WKUPT1_A::LOW)
1358    }
1359    #[doc = "A rising edge followed by a high level for a period defined by WKUPDBC on the cor-responding wake-up input forces the wake-up of the core power supply."]
1360    #[inline(always)]
1361    pub fn high(self) -> &'a mut W {
1362        self.variant(WKUPT1_A::HIGH)
1363    }
1364    #[doc = r"Sets the field bit"]
1365    #[inline(always)]
1366    pub fn set_bit(self) -> &'a mut W {
1367        self.bit(true)
1368    }
1369    #[doc = r"Clears the field bit"]
1370    #[inline(always)]
1371    pub fn clear_bit(self) -> &'a mut W {
1372        self.bit(false)
1373    }
1374    #[doc = r"Writes raw bits to the field"]
1375    #[inline(always)]
1376    pub fn bit(self, value: bool) -> &'a mut W {
1377        self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17);
1378        self.w
1379    }
1380}
1381#[doc = "Wake-up Input Type 0 to 2\n\nValue on reset: 0"]
1382#[derive(Clone, Copy, Debug, PartialEq)]
1383pub enum WKUPT2_A {
1384    #[doc = "0: A falling edge followed by a low level for a period defined by WKUPDBC on the corre-sponding wake-up input forces the wake-up of the core power supply."]
1385    LOW = 0,
1386    #[doc = "1: A rising edge followed by a high level for a period defined by WKUPDBC on the cor-responding wake-up input forces the wake-up of the core power supply."]
1387    HIGH = 1,
1388}
1389impl From<WKUPT2_A> for bool {
1390    #[inline(always)]
1391    fn from(variant: WKUPT2_A) -> Self {
1392        variant as u8 != 0
1393    }
1394}
1395#[doc = "Field `WKUPT2` reader - Wake-up Input Type 0 to 2"]
1396pub struct WKUPT2_R(crate::FieldReader<bool, WKUPT2_A>);
1397impl WKUPT2_R {
1398    #[inline(always)]
1399    pub(crate) fn new(bits: bool) -> Self {
1400        WKUPT2_R(crate::FieldReader::new(bits))
1401    }
1402    #[doc = r"Get enumerated values variant"]
1403    #[inline(always)]
1404    pub fn variant(&self) -> WKUPT2_A {
1405        match self.bits {
1406            false => WKUPT2_A::LOW,
1407            true => WKUPT2_A::HIGH,
1408        }
1409    }
1410    #[doc = "Checks if the value of the field is `LOW`"]
1411    #[inline(always)]
1412    pub fn is_low(&self) -> bool {
1413        **self == WKUPT2_A::LOW
1414    }
1415    #[doc = "Checks if the value of the field is `HIGH`"]
1416    #[inline(always)]
1417    pub fn is_high(&self) -> bool {
1418        **self == WKUPT2_A::HIGH
1419    }
1420}
1421impl core::ops::Deref for WKUPT2_R {
1422    type Target = crate::FieldReader<bool, WKUPT2_A>;
1423    #[inline(always)]
1424    fn deref(&self) -> &Self::Target {
1425        &self.0
1426    }
1427}
1428#[doc = "Field `WKUPT2` writer - Wake-up Input Type 0 to 2"]
1429pub struct WKUPT2_W<'a> {
1430    w: &'a mut W,
1431}
1432impl<'a> WKUPT2_W<'a> {
1433    #[doc = r"Writes `variant` to the field"]
1434    #[inline(always)]
1435    pub fn variant(self, variant: WKUPT2_A) -> &'a mut W {
1436        self.bit(variant.into())
1437    }
1438    #[doc = "A falling edge followed by a low level for a period defined by WKUPDBC on the corre-sponding wake-up input forces the wake-up of the core power supply."]
1439    #[inline(always)]
1440    pub fn low(self) -> &'a mut W {
1441        self.variant(WKUPT2_A::LOW)
1442    }
1443    #[doc = "A rising edge followed by a high level for a period defined by WKUPDBC on the cor-responding wake-up input forces the wake-up of the core power supply."]
1444    #[inline(always)]
1445    pub fn high(self) -> &'a mut W {
1446        self.variant(WKUPT2_A::HIGH)
1447    }
1448    #[doc = r"Sets the field bit"]
1449    #[inline(always)]
1450    pub fn set_bit(self) -> &'a mut W {
1451        self.bit(true)
1452    }
1453    #[doc = r"Clears the field bit"]
1454    #[inline(always)]
1455    pub fn clear_bit(self) -> &'a mut W {
1456        self.bit(false)
1457    }
1458    #[doc = r"Writes raw bits to the field"]
1459    #[inline(always)]
1460    pub fn bit(self, value: bool) -> &'a mut W {
1461        self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18);
1462        self.w
1463    }
1464}
1465#[doc = "Wake-up Input Type 0 to 3\n\nValue on reset: 0"]
1466#[derive(Clone, Copy, Debug, PartialEq)]
1467pub enum WKUPT3_A {
1468    #[doc = "0: A falling edge followed by a low level for a period defined by WKUPDBC on the corre-sponding wake-up input forces the wake-up of the core power supply."]
1469    LOW = 0,
1470    #[doc = "1: A rising edge followed by a high level for a period defined by WKUPDBC on the cor-responding wake-up input forces the wake-up of the core power supply."]
1471    HIGH = 1,
1472}
1473impl From<WKUPT3_A> for bool {
1474    #[inline(always)]
1475    fn from(variant: WKUPT3_A) -> Self {
1476        variant as u8 != 0
1477    }
1478}
1479#[doc = "Field `WKUPT3` reader - Wake-up Input Type 0 to 3"]
1480pub struct WKUPT3_R(crate::FieldReader<bool, WKUPT3_A>);
1481impl WKUPT3_R {
1482    #[inline(always)]
1483    pub(crate) fn new(bits: bool) -> Self {
1484        WKUPT3_R(crate::FieldReader::new(bits))
1485    }
1486    #[doc = r"Get enumerated values variant"]
1487    #[inline(always)]
1488    pub fn variant(&self) -> WKUPT3_A {
1489        match self.bits {
1490            false => WKUPT3_A::LOW,
1491            true => WKUPT3_A::HIGH,
1492        }
1493    }
1494    #[doc = "Checks if the value of the field is `LOW`"]
1495    #[inline(always)]
1496    pub fn is_low(&self) -> bool {
1497        **self == WKUPT3_A::LOW
1498    }
1499    #[doc = "Checks if the value of the field is `HIGH`"]
1500    #[inline(always)]
1501    pub fn is_high(&self) -> bool {
1502        **self == WKUPT3_A::HIGH
1503    }
1504}
1505impl core::ops::Deref for WKUPT3_R {
1506    type Target = crate::FieldReader<bool, WKUPT3_A>;
1507    #[inline(always)]
1508    fn deref(&self) -> &Self::Target {
1509        &self.0
1510    }
1511}
1512#[doc = "Field `WKUPT3` writer - Wake-up Input Type 0 to 3"]
1513pub struct WKUPT3_W<'a> {
1514    w: &'a mut W,
1515}
1516impl<'a> WKUPT3_W<'a> {
1517    #[doc = r"Writes `variant` to the field"]
1518    #[inline(always)]
1519    pub fn variant(self, variant: WKUPT3_A) -> &'a mut W {
1520        self.bit(variant.into())
1521    }
1522    #[doc = "A falling edge followed by a low level for a period defined by WKUPDBC on the corre-sponding wake-up input forces the wake-up of the core power supply."]
1523    #[inline(always)]
1524    pub fn low(self) -> &'a mut W {
1525        self.variant(WKUPT3_A::LOW)
1526    }
1527    #[doc = "A rising edge followed by a high level for a period defined by WKUPDBC on the cor-responding wake-up input forces the wake-up of the core power supply."]
1528    #[inline(always)]
1529    pub fn high(self) -> &'a mut W {
1530        self.variant(WKUPT3_A::HIGH)
1531    }
1532    #[doc = r"Sets the field bit"]
1533    #[inline(always)]
1534    pub fn set_bit(self) -> &'a mut W {
1535        self.bit(true)
1536    }
1537    #[doc = r"Clears the field bit"]
1538    #[inline(always)]
1539    pub fn clear_bit(self) -> &'a mut W {
1540        self.bit(false)
1541    }
1542    #[doc = r"Writes raw bits to the field"]
1543    #[inline(always)]
1544    pub fn bit(self, value: bool) -> &'a mut W {
1545        self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19);
1546        self.w
1547    }
1548}
1549#[doc = "Wake-up Input Type 0 to 4\n\nValue on reset: 0"]
1550#[derive(Clone, Copy, Debug, PartialEq)]
1551pub enum WKUPT4_A {
1552    #[doc = "0: A falling edge followed by a low level for a period defined by WKUPDBC on the corre-sponding wake-up input forces the wake-up of the core power supply."]
1553    LOW = 0,
1554    #[doc = "1: A rising edge followed by a high level for a period defined by WKUPDBC on the cor-responding wake-up input forces the wake-up of the core power supply."]
1555    HIGH = 1,
1556}
1557impl From<WKUPT4_A> for bool {
1558    #[inline(always)]
1559    fn from(variant: WKUPT4_A) -> Self {
1560        variant as u8 != 0
1561    }
1562}
1563#[doc = "Field `WKUPT4` reader - Wake-up Input Type 0 to 4"]
1564pub struct WKUPT4_R(crate::FieldReader<bool, WKUPT4_A>);
1565impl WKUPT4_R {
1566    #[inline(always)]
1567    pub(crate) fn new(bits: bool) -> Self {
1568        WKUPT4_R(crate::FieldReader::new(bits))
1569    }
1570    #[doc = r"Get enumerated values variant"]
1571    #[inline(always)]
1572    pub fn variant(&self) -> WKUPT4_A {
1573        match self.bits {
1574            false => WKUPT4_A::LOW,
1575            true => WKUPT4_A::HIGH,
1576        }
1577    }
1578    #[doc = "Checks if the value of the field is `LOW`"]
1579    #[inline(always)]
1580    pub fn is_low(&self) -> bool {
1581        **self == WKUPT4_A::LOW
1582    }
1583    #[doc = "Checks if the value of the field is `HIGH`"]
1584    #[inline(always)]
1585    pub fn is_high(&self) -> bool {
1586        **self == WKUPT4_A::HIGH
1587    }
1588}
1589impl core::ops::Deref for WKUPT4_R {
1590    type Target = crate::FieldReader<bool, WKUPT4_A>;
1591    #[inline(always)]
1592    fn deref(&self) -> &Self::Target {
1593        &self.0
1594    }
1595}
1596#[doc = "Field `WKUPT4` writer - Wake-up Input Type 0 to 4"]
1597pub struct WKUPT4_W<'a> {
1598    w: &'a mut W,
1599}
1600impl<'a> WKUPT4_W<'a> {
1601    #[doc = r"Writes `variant` to the field"]
1602    #[inline(always)]
1603    pub fn variant(self, variant: WKUPT4_A) -> &'a mut W {
1604        self.bit(variant.into())
1605    }
1606    #[doc = "A falling edge followed by a low level for a period defined by WKUPDBC on the corre-sponding wake-up input forces the wake-up of the core power supply."]
1607    #[inline(always)]
1608    pub fn low(self) -> &'a mut W {
1609        self.variant(WKUPT4_A::LOW)
1610    }
1611    #[doc = "A rising edge followed by a high level for a period defined by WKUPDBC on the cor-responding wake-up input forces the wake-up of the core power supply."]
1612    #[inline(always)]
1613    pub fn high(self) -> &'a mut W {
1614        self.variant(WKUPT4_A::HIGH)
1615    }
1616    #[doc = r"Sets the field bit"]
1617    #[inline(always)]
1618    pub fn set_bit(self) -> &'a mut W {
1619        self.bit(true)
1620    }
1621    #[doc = r"Clears the field bit"]
1622    #[inline(always)]
1623    pub fn clear_bit(self) -> &'a mut W {
1624        self.bit(false)
1625    }
1626    #[doc = r"Writes raw bits to the field"]
1627    #[inline(always)]
1628    pub fn bit(self, value: bool) -> &'a mut W {
1629        self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20);
1630        self.w
1631    }
1632}
1633#[doc = "Wake-up Input Type 0 to 5\n\nValue on reset: 0"]
1634#[derive(Clone, Copy, Debug, PartialEq)]
1635pub enum WKUPT5_A {
1636    #[doc = "0: A falling edge followed by a low level for a period defined by WKUPDBC on the corre-sponding wake-up input forces the wake-up of the core power supply."]
1637    LOW = 0,
1638    #[doc = "1: A rising edge followed by a high level for a period defined by WKUPDBC on the cor-responding wake-up input forces the wake-up of the core power supply."]
1639    HIGH = 1,
1640}
1641impl From<WKUPT5_A> for bool {
1642    #[inline(always)]
1643    fn from(variant: WKUPT5_A) -> Self {
1644        variant as u8 != 0
1645    }
1646}
1647#[doc = "Field `WKUPT5` reader - Wake-up Input Type 0 to 5"]
1648pub struct WKUPT5_R(crate::FieldReader<bool, WKUPT5_A>);
1649impl WKUPT5_R {
1650    #[inline(always)]
1651    pub(crate) fn new(bits: bool) -> Self {
1652        WKUPT5_R(crate::FieldReader::new(bits))
1653    }
1654    #[doc = r"Get enumerated values variant"]
1655    #[inline(always)]
1656    pub fn variant(&self) -> WKUPT5_A {
1657        match self.bits {
1658            false => WKUPT5_A::LOW,
1659            true => WKUPT5_A::HIGH,
1660        }
1661    }
1662    #[doc = "Checks if the value of the field is `LOW`"]
1663    #[inline(always)]
1664    pub fn is_low(&self) -> bool {
1665        **self == WKUPT5_A::LOW
1666    }
1667    #[doc = "Checks if the value of the field is `HIGH`"]
1668    #[inline(always)]
1669    pub fn is_high(&self) -> bool {
1670        **self == WKUPT5_A::HIGH
1671    }
1672}
1673impl core::ops::Deref for WKUPT5_R {
1674    type Target = crate::FieldReader<bool, WKUPT5_A>;
1675    #[inline(always)]
1676    fn deref(&self) -> &Self::Target {
1677        &self.0
1678    }
1679}
1680#[doc = "Field `WKUPT5` writer - Wake-up Input Type 0 to 5"]
1681pub struct WKUPT5_W<'a> {
1682    w: &'a mut W,
1683}
1684impl<'a> WKUPT5_W<'a> {
1685    #[doc = r"Writes `variant` to the field"]
1686    #[inline(always)]
1687    pub fn variant(self, variant: WKUPT5_A) -> &'a mut W {
1688        self.bit(variant.into())
1689    }
1690    #[doc = "A falling edge followed by a low level for a period defined by WKUPDBC on the corre-sponding wake-up input forces the wake-up of the core power supply."]
1691    #[inline(always)]
1692    pub fn low(self) -> &'a mut W {
1693        self.variant(WKUPT5_A::LOW)
1694    }
1695    #[doc = "A rising edge followed by a high level for a period defined by WKUPDBC on the cor-responding wake-up input forces the wake-up of the core power supply."]
1696    #[inline(always)]
1697    pub fn high(self) -> &'a mut W {
1698        self.variant(WKUPT5_A::HIGH)
1699    }
1700    #[doc = r"Sets the field bit"]
1701    #[inline(always)]
1702    pub fn set_bit(self) -> &'a mut W {
1703        self.bit(true)
1704    }
1705    #[doc = r"Clears the field bit"]
1706    #[inline(always)]
1707    pub fn clear_bit(self) -> &'a mut W {
1708        self.bit(false)
1709    }
1710    #[doc = r"Writes raw bits to the field"]
1711    #[inline(always)]
1712    pub fn bit(self, value: bool) -> &'a mut W {
1713        self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21);
1714        self.w
1715    }
1716}
1717#[doc = "Wake-up Input Type 0 to 6\n\nValue on reset: 0"]
1718#[derive(Clone, Copy, Debug, PartialEq)]
1719pub enum WKUPT6_A {
1720    #[doc = "0: A falling edge followed by a low level for a period defined by WKUPDBC on the corre-sponding wake-up input forces the wake-up of the core power supply."]
1721    LOW = 0,
1722    #[doc = "1: A rising edge followed by a high level for a period defined by WKUPDBC on the cor-responding wake-up input forces the wake-up of the core power supply."]
1723    HIGH = 1,
1724}
1725impl From<WKUPT6_A> for bool {
1726    #[inline(always)]
1727    fn from(variant: WKUPT6_A) -> Self {
1728        variant as u8 != 0
1729    }
1730}
1731#[doc = "Field `WKUPT6` reader - Wake-up Input Type 0 to 6"]
1732pub struct WKUPT6_R(crate::FieldReader<bool, WKUPT6_A>);
1733impl WKUPT6_R {
1734    #[inline(always)]
1735    pub(crate) fn new(bits: bool) -> Self {
1736        WKUPT6_R(crate::FieldReader::new(bits))
1737    }
1738    #[doc = r"Get enumerated values variant"]
1739    #[inline(always)]
1740    pub fn variant(&self) -> WKUPT6_A {
1741        match self.bits {
1742            false => WKUPT6_A::LOW,
1743            true => WKUPT6_A::HIGH,
1744        }
1745    }
1746    #[doc = "Checks if the value of the field is `LOW`"]
1747    #[inline(always)]
1748    pub fn is_low(&self) -> bool {
1749        **self == WKUPT6_A::LOW
1750    }
1751    #[doc = "Checks if the value of the field is `HIGH`"]
1752    #[inline(always)]
1753    pub fn is_high(&self) -> bool {
1754        **self == WKUPT6_A::HIGH
1755    }
1756}
1757impl core::ops::Deref for WKUPT6_R {
1758    type Target = crate::FieldReader<bool, WKUPT6_A>;
1759    #[inline(always)]
1760    fn deref(&self) -> &Self::Target {
1761        &self.0
1762    }
1763}
1764#[doc = "Field `WKUPT6` writer - Wake-up Input Type 0 to 6"]
1765pub struct WKUPT6_W<'a> {
1766    w: &'a mut W,
1767}
1768impl<'a> WKUPT6_W<'a> {
1769    #[doc = r"Writes `variant` to the field"]
1770    #[inline(always)]
1771    pub fn variant(self, variant: WKUPT6_A) -> &'a mut W {
1772        self.bit(variant.into())
1773    }
1774    #[doc = "A falling edge followed by a low level for a period defined by WKUPDBC on the corre-sponding wake-up input forces the wake-up of the core power supply."]
1775    #[inline(always)]
1776    pub fn low(self) -> &'a mut W {
1777        self.variant(WKUPT6_A::LOW)
1778    }
1779    #[doc = "A rising edge followed by a high level for a period defined by WKUPDBC on the cor-responding wake-up input forces the wake-up of the core power supply."]
1780    #[inline(always)]
1781    pub fn high(self) -> &'a mut W {
1782        self.variant(WKUPT6_A::HIGH)
1783    }
1784    #[doc = r"Sets the field bit"]
1785    #[inline(always)]
1786    pub fn set_bit(self) -> &'a mut W {
1787        self.bit(true)
1788    }
1789    #[doc = r"Clears the field bit"]
1790    #[inline(always)]
1791    pub fn clear_bit(self) -> &'a mut W {
1792        self.bit(false)
1793    }
1794    #[doc = r"Writes raw bits to the field"]
1795    #[inline(always)]
1796    pub fn bit(self, value: bool) -> &'a mut W {
1797        self.w.bits = (self.w.bits & !(0x01 << 22)) | ((value as u32 & 0x01) << 22);
1798        self.w
1799    }
1800}
1801#[doc = "Wake-up Input Type 0 to 7\n\nValue on reset: 0"]
1802#[derive(Clone, Copy, Debug, PartialEq)]
1803pub enum WKUPT7_A {
1804    #[doc = "0: A falling edge followed by a low level for a period defined by WKUPDBC on the corre-sponding wake-up input forces the wake-up of the core power supply."]
1805    LOW = 0,
1806    #[doc = "1: A rising edge followed by a high level for a period defined by WKUPDBC on the cor-responding wake-up input forces the wake-up of the core power supply."]
1807    HIGH = 1,
1808}
1809impl From<WKUPT7_A> for bool {
1810    #[inline(always)]
1811    fn from(variant: WKUPT7_A) -> Self {
1812        variant as u8 != 0
1813    }
1814}
1815#[doc = "Field `WKUPT7` reader - Wake-up Input Type 0 to 7"]
1816pub struct WKUPT7_R(crate::FieldReader<bool, WKUPT7_A>);
1817impl WKUPT7_R {
1818    #[inline(always)]
1819    pub(crate) fn new(bits: bool) -> Self {
1820        WKUPT7_R(crate::FieldReader::new(bits))
1821    }
1822    #[doc = r"Get enumerated values variant"]
1823    #[inline(always)]
1824    pub fn variant(&self) -> WKUPT7_A {
1825        match self.bits {
1826            false => WKUPT7_A::LOW,
1827            true => WKUPT7_A::HIGH,
1828        }
1829    }
1830    #[doc = "Checks if the value of the field is `LOW`"]
1831    #[inline(always)]
1832    pub fn is_low(&self) -> bool {
1833        **self == WKUPT7_A::LOW
1834    }
1835    #[doc = "Checks if the value of the field is `HIGH`"]
1836    #[inline(always)]
1837    pub fn is_high(&self) -> bool {
1838        **self == WKUPT7_A::HIGH
1839    }
1840}
1841impl core::ops::Deref for WKUPT7_R {
1842    type Target = crate::FieldReader<bool, WKUPT7_A>;
1843    #[inline(always)]
1844    fn deref(&self) -> &Self::Target {
1845        &self.0
1846    }
1847}
1848#[doc = "Field `WKUPT7` writer - Wake-up Input Type 0 to 7"]
1849pub struct WKUPT7_W<'a> {
1850    w: &'a mut W,
1851}
1852impl<'a> WKUPT7_W<'a> {
1853    #[doc = r"Writes `variant` to the field"]
1854    #[inline(always)]
1855    pub fn variant(self, variant: WKUPT7_A) -> &'a mut W {
1856        self.bit(variant.into())
1857    }
1858    #[doc = "A falling edge followed by a low level for a period defined by WKUPDBC on the corre-sponding wake-up input forces the wake-up of the core power supply."]
1859    #[inline(always)]
1860    pub fn low(self) -> &'a mut W {
1861        self.variant(WKUPT7_A::LOW)
1862    }
1863    #[doc = "A rising edge followed by a high level for a period defined by WKUPDBC on the cor-responding wake-up input forces the wake-up of the core power supply."]
1864    #[inline(always)]
1865    pub fn high(self) -> &'a mut W {
1866        self.variant(WKUPT7_A::HIGH)
1867    }
1868    #[doc = r"Sets the field bit"]
1869    #[inline(always)]
1870    pub fn set_bit(self) -> &'a mut W {
1871        self.bit(true)
1872    }
1873    #[doc = r"Clears the field bit"]
1874    #[inline(always)]
1875    pub fn clear_bit(self) -> &'a mut W {
1876        self.bit(false)
1877    }
1878    #[doc = r"Writes raw bits to the field"]
1879    #[inline(always)]
1880    pub fn bit(self, value: bool) -> &'a mut W {
1881        self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23);
1882        self.w
1883    }
1884}
1885#[doc = "Wake-up Input Type 0 to 8\n\nValue on reset: 0"]
1886#[derive(Clone, Copy, Debug, PartialEq)]
1887pub enum WKUPT8_A {
1888    #[doc = "0: A falling edge followed by a low level for a period defined by WKUPDBC on the corre-sponding wake-up input forces the wake-up of the core power supply."]
1889    LOW = 0,
1890    #[doc = "1: A rising edge followed by a high level for a period defined by WKUPDBC on the cor-responding wake-up input forces the wake-up of the core power supply."]
1891    HIGH = 1,
1892}
1893impl From<WKUPT8_A> for bool {
1894    #[inline(always)]
1895    fn from(variant: WKUPT8_A) -> Self {
1896        variant as u8 != 0
1897    }
1898}
1899#[doc = "Field `WKUPT8` reader - Wake-up Input Type 0 to 8"]
1900pub struct WKUPT8_R(crate::FieldReader<bool, WKUPT8_A>);
1901impl WKUPT8_R {
1902    #[inline(always)]
1903    pub(crate) fn new(bits: bool) -> Self {
1904        WKUPT8_R(crate::FieldReader::new(bits))
1905    }
1906    #[doc = r"Get enumerated values variant"]
1907    #[inline(always)]
1908    pub fn variant(&self) -> WKUPT8_A {
1909        match self.bits {
1910            false => WKUPT8_A::LOW,
1911            true => WKUPT8_A::HIGH,
1912        }
1913    }
1914    #[doc = "Checks if the value of the field is `LOW`"]
1915    #[inline(always)]
1916    pub fn is_low(&self) -> bool {
1917        **self == WKUPT8_A::LOW
1918    }
1919    #[doc = "Checks if the value of the field is `HIGH`"]
1920    #[inline(always)]
1921    pub fn is_high(&self) -> bool {
1922        **self == WKUPT8_A::HIGH
1923    }
1924}
1925impl core::ops::Deref for WKUPT8_R {
1926    type Target = crate::FieldReader<bool, WKUPT8_A>;
1927    #[inline(always)]
1928    fn deref(&self) -> &Self::Target {
1929        &self.0
1930    }
1931}
1932#[doc = "Field `WKUPT8` writer - Wake-up Input Type 0 to 8"]
1933pub struct WKUPT8_W<'a> {
1934    w: &'a mut W,
1935}
1936impl<'a> WKUPT8_W<'a> {
1937    #[doc = r"Writes `variant` to the field"]
1938    #[inline(always)]
1939    pub fn variant(self, variant: WKUPT8_A) -> &'a mut W {
1940        self.bit(variant.into())
1941    }
1942    #[doc = "A falling edge followed by a low level for a period defined by WKUPDBC on the corre-sponding wake-up input forces the wake-up of the core power supply."]
1943    #[inline(always)]
1944    pub fn low(self) -> &'a mut W {
1945        self.variant(WKUPT8_A::LOW)
1946    }
1947    #[doc = "A rising edge followed by a high level for a period defined by WKUPDBC on the cor-responding wake-up input forces the wake-up of the core power supply."]
1948    #[inline(always)]
1949    pub fn high(self) -> &'a mut W {
1950        self.variant(WKUPT8_A::HIGH)
1951    }
1952    #[doc = r"Sets the field bit"]
1953    #[inline(always)]
1954    pub fn set_bit(self) -> &'a mut W {
1955        self.bit(true)
1956    }
1957    #[doc = r"Clears the field bit"]
1958    #[inline(always)]
1959    pub fn clear_bit(self) -> &'a mut W {
1960        self.bit(false)
1961    }
1962    #[doc = r"Writes raw bits to the field"]
1963    #[inline(always)]
1964    pub fn bit(self, value: bool) -> &'a mut W {
1965        self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24);
1966        self.w
1967    }
1968}
1969#[doc = "Wake-up Input Type 0 to 9\n\nValue on reset: 0"]
1970#[derive(Clone, Copy, Debug, PartialEq)]
1971pub enum WKUPT9_A {
1972    #[doc = "0: A falling edge followed by a low level for a period defined by WKUPDBC on the corre-sponding wake-up input forces the wake-up of the core power supply."]
1973    LOW = 0,
1974    #[doc = "1: A rising edge followed by a high level for a period defined by WKUPDBC on the cor-responding wake-up input forces the wake-up of the core power supply."]
1975    HIGH = 1,
1976}
1977impl From<WKUPT9_A> for bool {
1978    #[inline(always)]
1979    fn from(variant: WKUPT9_A) -> Self {
1980        variant as u8 != 0
1981    }
1982}
1983#[doc = "Field `WKUPT9` reader - Wake-up Input Type 0 to 9"]
1984pub struct WKUPT9_R(crate::FieldReader<bool, WKUPT9_A>);
1985impl WKUPT9_R {
1986    #[inline(always)]
1987    pub(crate) fn new(bits: bool) -> Self {
1988        WKUPT9_R(crate::FieldReader::new(bits))
1989    }
1990    #[doc = r"Get enumerated values variant"]
1991    #[inline(always)]
1992    pub fn variant(&self) -> WKUPT9_A {
1993        match self.bits {
1994            false => WKUPT9_A::LOW,
1995            true => WKUPT9_A::HIGH,
1996        }
1997    }
1998    #[doc = "Checks if the value of the field is `LOW`"]
1999    #[inline(always)]
2000    pub fn is_low(&self) -> bool {
2001        **self == WKUPT9_A::LOW
2002    }
2003    #[doc = "Checks if the value of the field is `HIGH`"]
2004    #[inline(always)]
2005    pub fn is_high(&self) -> bool {
2006        **self == WKUPT9_A::HIGH
2007    }
2008}
2009impl core::ops::Deref for WKUPT9_R {
2010    type Target = crate::FieldReader<bool, WKUPT9_A>;
2011    #[inline(always)]
2012    fn deref(&self) -> &Self::Target {
2013        &self.0
2014    }
2015}
2016#[doc = "Field `WKUPT9` writer - Wake-up Input Type 0 to 9"]
2017pub struct WKUPT9_W<'a> {
2018    w: &'a mut W,
2019}
2020impl<'a> WKUPT9_W<'a> {
2021    #[doc = r"Writes `variant` to the field"]
2022    #[inline(always)]
2023    pub fn variant(self, variant: WKUPT9_A) -> &'a mut W {
2024        self.bit(variant.into())
2025    }
2026    #[doc = "A falling edge followed by a low level for a period defined by WKUPDBC on the corre-sponding wake-up input forces the wake-up of the core power supply."]
2027    #[inline(always)]
2028    pub fn low(self) -> &'a mut W {
2029        self.variant(WKUPT9_A::LOW)
2030    }
2031    #[doc = "A rising edge followed by a high level for a period defined by WKUPDBC on the cor-responding wake-up input forces the wake-up of the core power supply."]
2032    #[inline(always)]
2033    pub fn high(self) -> &'a mut W {
2034        self.variant(WKUPT9_A::HIGH)
2035    }
2036    #[doc = r"Sets the field bit"]
2037    #[inline(always)]
2038    pub fn set_bit(self) -> &'a mut W {
2039        self.bit(true)
2040    }
2041    #[doc = r"Clears the field bit"]
2042    #[inline(always)]
2043    pub fn clear_bit(self) -> &'a mut W {
2044        self.bit(false)
2045    }
2046    #[doc = r"Writes raw bits to the field"]
2047    #[inline(always)]
2048    pub fn bit(self, value: bool) -> &'a mut W {
2049        self.w.bits = (self.w.bits & !(0x01 << 25)) | ((value as u32 & 0x01) << 25);
2050        self.w
2051    }
2052}
2053#[doc = "Wake-up Input Type 0 to 10\n\nValue on reset: 0"]
2054#[derive(Clone, Copy, Debug, PartialEq)]
2055pub enum WKUPT10_A {
2056    #[doc = "0: A falling edge followed by a low level for a period defined by WKUPDBC on the corre-sponding wake-up input forces the wake-up of the core power supply."]
2057    LOW = 0,
2058    #[doc = "1: A rising edge followed by a high level for a period defined by WKUPDBC on the cor-responding wake-up input forces the wake-up of the core power supply."]
2059    HIGH = 1,
2060}
2061impl From<WKUPT10_A> for bool {
2062    #[inline(always)]
2063    fn from(variant: WKUPT10_A) -> Self {
2064        variant as u8 != 0
2065    }
2066}
2067#[doc = "Field `WKUPT10` reader - Wake-up Input Type 0 to 10"]
2068pub struct WKUPT10_R(crate::FieldReader<bool, WKUPT10_A>);
2069impl WKUPT10_R {
2070    #[inline(always)]
2071    pub(crate) fn new(bits: bool) -> Self {
2072        WKUPT10_R(crate::FieldReader::new(bits))
2073    }
2074    #[doc = r"Get enumerated values variant"]
2075    #[inline(always)]
2076    pub fn variant(&self) -> WKUPT10_A {
2077        match self.bits {
2078            false => WKUPT10_A::LOW,
2079            true => WKUPT10_A::HIGH,
2080        }
2081    }
2082    #[doc = "Checks if the value of the field is `LOW`"]
2083    #[inline(always)]
2084    pub fn is_low(&self) -> bool {
2085        **self == WKUPT10_A::LOW
2086    }
2087    #[doc = "Checks if the value of the field is `HIGH`"]
2088    #[inline(always)]
2089    pub fn is_high(&self) -> bool {
2090        **self == WKUPT10_A::HIGH
2091    }
2092}
2093impl core::ops::Deref for WKUPT10_R {
2094    type Target = crate::FieldReader<bool, WKUPT10_A>;
2095    #[inline(always)]
2096    fn deref(&self) -> &Self::Target {
2097        &self.0
2098    }
2099}
2100#[doc = "Field `WKUPT10` writer - Wake-up Input Type 0 to 10"]
2101pub struct WKUPT10_W<'a> {
2102    w: &'a mut W,
2103}
2104impl<'a> WKUPT10_W<'a> {
2105    #[doc = r"Writes `variant` to the field"]
2106    #[inline(always)]
2107    pub fn variant(self, variant: WKUPT10_A) -> &'a mut W {
2108        self.bit(variant.into())
2109    }
2110    #[doc = "A falling edge followed by a low level for a period defined by WKUPDBC on the corre-sponding wake-up input forces the wake-up of the core power supply."]
2111    #[inline(always)]
2112    pub fn low(self) -> &'a mut W {
2113        self.variant(WKUPT10_A::LOW)
2114    }
2115    #[doc = "A rising edge followed by a high level for a period defined by WKUPDBC on the cor-responding wake-up input forces the wake-up of the core power supply."]
2116    #[inline(always)]
2117    pub fn high(self) -> &'a mut W {
2118        self.variant(WKUPT10_A::HIGH)
2119    }
2120    #[doc = r"Sets the field bit"]
2121    #[inline(always)]
2122    pub fn set_bit(self) -> &'a mut W {
2123        self.bit(true)
2124    }
2125    #[doc = r"Clears the field bit"]
2126    #[inline(always)]
2127    pub fn clear_bit(self) -> &'a mut W {
2128        self.bit(false)
2129    }
2130    #[doc = r"Writes raw bits to the field"]
2131    #[inline(always)]
2132    pub fn bit(self, value: bool) -> &'a mut W {
2133        self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26);
2134        self.w
2135    }
2136}
2137#[doc = "Wake-up Input Type 0 to 11\n\nValue on reset: 0"]
2138#[derive(Clone, Copy, Debug, PartialEq)]
2139pub enum WKUPT11_A {
2140    #[doc = "0: A falling edge followed by a low level for a period defined by WKUPDBC on the corre-sponding wake-up input forces the wake-up of the core power supply."]
2141    LOW = 0,
2142    #[doc = "1: A rising edge followed by a high level for a period defined by WKUPDBC on the cor-responding wake-up input forces the wake-up of the core power supply."]
2143    HIGH = 1,
2144}
2145impl From<WKUPT11_A> for bool {
2146    #[inline(always)]
2147    fn from(variant: WKUPT11_A) -> Self {
2148        variant as u8 != 0
2149    }
2150}
2151#[doc = "Field `WKUPT11` reader - Wake-up Input Type 0 to 11"]
2152pub struct WKUPT11_R(crate::FieldReader<bool, WKUPT11_A>);
2153impl WKUPT11_R {
2154    #[inline(always)]
2155    pub(crate) fn new(bits: bool) -> Self {
2156        WKUPT11_R(crate::FieldReader::new(bits))
2157    }
2158    #[doc = r"Get enumerated values variant"]
2159    #[inline(always)]
2160    pub fn variant(&self) -> WKUPT11_A {
2161        match self.bits {
2162            false => WKUPT11_A::LOW,
2163            true => WKUPT11_A::HIGH,
2164        }
2165    }
2166    #[doc = "Checks if the value of the field is `LOW`"]
2167    #[inline(always)]
2168    pub fn is_low(&self) -> bool {
2169        **self == WKUPT11_A::LOW
2170    }
2171    #[doc = "Checks if the value of the field is `HIGH`"]
2172    #[inline(always)]
2173    pub fn is_high(&self) -> bool {
2174        **self == WKUPT11_A::HIGH
2175    }
2176}
2177impl core::ops::Deref for WKUPT11_R {
2178    type Target = crate::FieldReader<bool, WKUPT11_A>;
2179    #[inline(always)]
2180    fn deref(&self) -> &Self::Target {
2181        &self.0
2182    }
2183}
2184#[doc = "Field `WKUPT11` writer - Wake-up Input Type 0 to 11"]
2185pub struct WKUPT11_W<'a> {
2186    w: &'a mut W,
2187}
2188impl<'a> WKUPT11_W<'a> {
2189    #[doc = r"Writes `variant` to the field"]
2190    #[inline(always)]
2191    pub fn variant(self, variant: WKUPT11_A) -> &'a mut W {
2192        self.bit(variant.into())
2193    }
2194    #[doc = "A falling edge followed by a low level for a period defined by WKUPDBC on the corre-sponding wake-up input forces the wake-up of the core power supply."]
2195    #[inline(always)]
2196    pub fn low(self) -> &'a mut W {
2197        self.variant(WKUPT11_A::LOW)
2198    }
2199    #[doc = "A rising edge followed by a high level for a period defined by WKUPDBC on the cor-responding wake-up input forces the wake-up of the core power supply."]
2200    #[inline(always)]
2201    pub fn high(self) -> &'a mut W {
2202        self.variant(WKUPT11_A::HIGH)
2203    }
2204    #[doc = r"Sets the field bit"]
2205    #[inline(always)]
2206    pub fn set_bit(self) -> &'a mut W {
2207        self.bit(true)
2208    }
2209    #[doc = r"Clears the field bit"]
2210    #[inline(always)]
2211    pub fn clear_bit(self) -> &'a mut W {
2212        self.bit(false)
2213    }
2214    #[doc = r"Writes raw bits to the field"]
2215    #[inline(always)]
2216    pub fn bit(self, value: bool) -> &'a mut W {
2217        self.w.bits = (self.w.bits & !(0x01 << 27)) | ((value as u32 & 0x01) << 27);
2218        self.w
2219    }
2220}
2221#[doc = "Wake-up Input Type 0 to 12\n\nValue on reset: 0"]
2222#[derive(Clone, Copy, Debug, PartialEq)]
2223pub enum WKUPT12_A {
2224    #[doc = "0: A falling edge followed by a low level for a period defined by WKUPDBC on the corre-sponding wake-up input forces the wake-up of the core power supply."]
2225    LOW = 0,
2226    #[doc = "1: A rising edge followed by a high level for a period defined by WKUPDBC on the cor-responding wake-up input forces the wake-up of the core power supply."]
2227    HIGH = 1,
2228}
2229impl From<WKUPT12_A> for bool {
2230    #[inline(always)]
2231    fn from(variant: WKUPT12_A) -> Self {
2232        variant as u8 != 0
2233    }
2234}
2235#[doc = "Field `WKUPT12` reader - Wake-up Input Type 0 to 12"]
2236pub struct WKUPT12_R(crate::FieldReader<bool, WKUPT12_A>);
2237impl WKUPT12_R {
2238    #[inline(always)]
2239    pub(crate) fn new(bits: bool) -> Self {
2240        WKUPT12_R(crate::FieldReader::new(bits))
2241    }
2242    #[doc = r"Get enumerated values variant"]
2243    #[inline(always)]
2244    pub fn variant(&self) -> WKUPT12_A {
2245        match self.bits {
2246            false => WKUPT12_A::LOW,
2247            true => WKUPT12_A::HIGH,
2248        }
2249    }
2250    #[doc = "Checks if the value of the field is `LOW`"]
2251    #[inline(always)]
2252    pub fn is_low(&self) -> bool {
2253        **self == WKUPT12_A::LOW
2254    }
2255    #[doc = "Checks if the value of the field is `HIGH`"]
2256    #[inline(always)]
2257    pub fn is_high(&self) -> bool {
2258        **self == WKUPT12_A::HIGH
2259    }
2260}
2261impl core::ops::Deref for WKUPT12_R {
2262    type Target = crate::FieldReader<bool, WKUPT12_A>;
2263    #[inline(always)]
2264    fn deref(&self) -> &Self::Target {
2265        &self.0
2266    }
2267}
2268#[doc = "Field `WKUPT12` writer - Wake-up Input Type 0 to 12"]
2269pub struct WKUPT12_W<'a> {
2270    w: &'a mut W,
2271}
2272impl<'a> WKUPT12_W<'a> {
2273    #[doc = r"Writes `variant` to the field"]
2274    #[inline(always)]
2275    pub fn variant(self, variant: WKUPT12_A) -> &'a mut W {
2276        self.bit(variant.into())
2277    }
2278    #[doc = "A falling edge followed by a low level for a period defined by WKUPDBC on the corre-sponding wake-up input forces the wake-up of the core power supply."]
2279    #[inline(always)]
2280    pub fn low(self) -> &'a mut W {
2281        self.variant(WKUPT12_A::LOW)
2282    }
2283    #[doc = "A rising edge followed by a high level for a period defined by WKUPDBC on the cor-responding wake-up input forces the wake-up of the core power supply."]
2284    #[inline(always)]
2285    pub fn high(self) -> &'a mut W {
2286        self.variant(WKUPT12_A::HIGH)
2287    }
2288    #[doc = r"Sets the field bit"]
2289    #[inline(always)]
2290    pub fn set_bit(self) -> &'a mut W {
2291        self.bit(true)
2292    }
2293    #[doc = r"Clears the field bit"]
2294    #[inline(always)]
2295    pub fn clear_bit(self) -> &'a mut W {
2296        self.bit(false)
2297    }
2298    #[doc = r"Writes raw bits to the field"]
2299    #[inline(always)]
2300    pub fn bit(self, value: bool) -> &'a mut W {
2301        self.w.bits = (self.w.bits & !(0x01 << 28)) | ((value as u32 & 0x01) << 28);
2302        self.w
2303    }
2304}
2305#[doc = "Wake-up Input Type 0 to 13\n\nValue on reset: 0"]
2306#[derive(Clone, Copy, Debug, PartialEq)]
2307pub enum WKUPT13_A {
2308    #[doc = "0: A falling edge followed by a low level for a period defined by WKUPDBC on the corre-sponding wake-up input forces the wake-up of the core power supply."]
2309    LOW = 0,
2310    #[doc = "1: A rising edge followed by a high level for a period defined by WKUPDBC on the cor-responding wake-up input forces the wake-up of the core power supply."]
2311    HIGH = 1,
2312}
2313impl From<WKUPT13_A> for bool {
2314    #[inline(always)]
2315    fn from(variant: WKUPT13_A) -> Self {
2316        variant as u8 != 0
2317    }
2318}
2319#[doc = "Field `WKUPT13` reader - Wake-up Input Type 0 to 13"]
2320pub struct WKUPT13_R(crate::FieldReader<bool, WKUPT13_A>);
2321impl WKUPT13_R {
2322    #[inline(always)]
2323    pub(crate) fn new(bits: bool) -> Self {
2324        WKUPT13_R(crate::FieldReader::new(bits))
2325    }
2326    #[doc = r"Get enumerated values variant"]
2327    #[inline(always)]
2328    pub fn variant(&self) -> WKUPT13_A {
2329        match self.bits {
2330            false => WKUPT13_A::LOW,
2331            true => WKUPT13_A::HIGH,
2332        }
2333    }
2334    #[doc = "Checks if the value of the field is `LOW`"]
2335    #[inline(always)]
2336    pub fn is_low(&self) -> bool {
2337        **self == WKUPT13_A::LOW
2338    }
2339    #[doc = "Checks if the value of the field is `HIGH`"]
2340    #[inline(always)]
2341    pub fn is_high(&self) -> bool {
2342        **self == WKUPT13_A::HIGH
2343    }
2344}
2345impl core::ops::Deref for WKUPT13_R {
2346    type Target = crate::FieldReader<bool, WKUPT13_A>;
2347    #[inline(always)]
2348    fn deref(&self) -> &Self::Target {
2349        &self.0
2350    }
2351}
2352#[doc = "Field `WKUPT13` writer - Wake-up Input Type 0 to 13"]
2353pub struct WKUPT13_W<'a> {
2354    w: &'a mut W,
2355}
2356impl<'a> WKUPT13_W<'a> {
2357    #[doc = r"Writes `variant` to the field"]
2358    #[inline(always)]
2359    pub fn variant(self, variant: WKUPT13_A) -> &'a mut W {
2360        self.bit(variant.into())
2361    }
2362    #[doc = "A falling edge followed by a low level for a period defined by WKUPDBC on the corre-sponding wake-up input forces the wake-up of the core power supply."]
2363    #[inline(always)]
2364    pub fn low(self) -> &'a mut W {
2365        self.variant(WKUPT13_A::LOW)
2366    }
2367    #[doc = "A rising edge followed by a high level for a period defined by WKUPDBC on the cor-responding wake-up input forces the wake-up of the core power supply."]
2368    #[inline(always)]
2369    pub fn high(self) -> &'a mut W {
2370        self.variant(WKUPT13_A::HIGH)
2371    }
2372    #[doc = r"Sets the field bit"]
2373    #[inline(always)]
2374    pub fn set_bit(self) -> &'a mut W {
2375        self.bit(true)
2376    }
2377    #[doc = r"Clears the field bit"]
2378    #[inline(always)]
2379    pub fn clear_bit(self) -> &'a mut W {
2380        self.bit(false)
2381    }
2382    #[doc = r"Writes raw bits to the field"]
2383    #[inline(always)]
2384    pub fn bit(self, value: bool) -> &'a mut W {
2385        self.w.bits = (self.w.bits & !(0x01 << 29)) | ((value as u32 & 0x01) << 29);
2386        self.w
2387    }
2388}
2389impl R {
2390    #[doc = "Bit 0 - Wake-up Input Enable 0 to 0"]
2391    #[inline(always)]
2392    pub fn wkupen0(&self) -> WKUPEN0_R {
2393        WKUPEN0_R::new((self.bits & 0x01) != 0)
2394    }
2395    #[doc = "Bit 1 - Wake-up Input Enable 0 to 1"]
2396    #[inline(always)]
2397    pub fn wkupen1(&self) -> WKUPEN1_R {
2398        WKUPEN1_R::new(((self.bits >> 1) & 0x01) != 0)
2399    }
2400    #[doc = "Bit 2 - Wake-up Input Enable 0 to 2"]
2401    #[inline(always)]
2402    pub fn wkupen2(&self) -> WKUPEN2_R {
2403        WKUPEN2_R::new(((self.bits >> 2) & 0x01) != 0)
2404    }
2405    #[doc = "Bit 3 - Wake-up Input Enable 0 to 3"]
2406    #[inline(always)]
2407    pub fn wkupen3(&self) -> WKUPEN3_R {
2408        WKUPEN3_R::new(((self.bits >> 3) & 0x01) != 0)
2409    }
2410    #[doc = "Bit 4 - Wake-up Input Enable 0 to 4"]
2411    #[inline(always)]
2412    pub fn wkupen4(&self) -> WKUPEN4_R {
2413        WKUPEN4_R::new(((self.bits >> 4) & 0x01) != 0)
2414    }
2415    #[doc = "Bit 5 - Wake-up Input Enable 0 to 5"]
2416    #[inline(always)]
2417    pub fn wkupen5(&self) -> WKUPEN5_R {
2418        WKUPEN5_R::new(((self.bits >> 5) & 0x01) != 0)
2419    }
2420    #[doc = "Bit 6 - Wake-up Input Enable 0 to 6"]
2421    #[inline(always)]
2422    pub fn wkupen6(&self) -> WKUPEN6_R {
2423        WKUPEN6_R::new(((self.bits >> 6) & 0x01) != 0)
2424    }
2425    #[doc = "Bit 7 - Wake-up Input Enable 0 to 7"]
2426    #[inline(always)]
2427    pub fn wkupen7(&self) -> WKUPEN7_R {
2428        WKUPEN7_R::new(((self.bits >> 7) & 0x01) != 0)
2429    }
2430    #[doc = "Bit 8 - Wake-up Input Enable 0 to 8"]
2431    #[inline(always)]
2432    pub fn wkupen8(&self) -> WKUPEN8_R {
2433        WKUPEN8_R::new(((self.bits >> 8) & 0x01) != 0)
2434    }
2435    #[doc = "Bit 9 - Wake-up Input Enable 0 to 9"]
2436    #[inline(always)]
2437    pub fn wkupen9(&self) -> WKUPEN9_R {
2438        WKUPEN9_R::new(((self.bits >> 9) & 0x01) != 0)
2439    }
2440    #[doc = "Bit 10 - Wake-up Input Enable 0 to 10"]
2441    #[inline(always)]
2442    pub fn wkupen10(&self) -> WKUPEN10_R {
2443        WKUPEN10_R::new(((self.bits >> 10) & 0x01) != 0)
2444    }
2445    #[doc = "Bit 11 - Wake-up Input Enable 0 to 11"]
2446    #[inline(always)]
2447    pub fn wkupen11(&self) -> WKUPEN11_R {
2448        WKUPEN11_R::new(((self.bits >> 11) & 0x01) != 0)
2449    }
2450    #[doc = "Bit 12 - Wake-up Input Enable 0 to 12"]
2451    #[inline(always)]
2452    pub fn wkupen12(&self) -> WKUPEN12_R {
2453        WKUPEN12_R::new(((self.bits >> 12) & 0x01) != 0)
2454    }
2455    #[doc = "Bit 13 - Wake-up Input Enable 0 to 13"]
2456    #[inline(always)]
2457    pub fn wkupen13(&self) -> WKUPEN13_R {
2458        WKUPEN13_R::new(((self.bits >> 13) & 0x01) != 0)
2459    }
2460    #[doc = "Bit 16 - Wake-up Input Type 0 to 0"]
2461    #[inline(always)]
2462    pub fn wkupt0(&self) -> WKUPT0_R {
2463        WKUPT0_R::new(((self.bits >> 16) & 0x01) != 0)
2464    }
2465    #[doc = "Bit 17 - Wake-up Input Type 0 to 1"]
2466    #[inline(always)]
2467    pub fn wkupt1(&self) -> WKUPT1_R {
2468        WKUPT1_R::new(((self.bits >> 17) & 0x01) != 0)
2469    }
2470    #[doc = "Bit 18 - Wake-up Input Type 0 to 2"]
2471    #[inline(always)]
2472    pub fn wkupt2(&self) -> WKUPT2_R {
2473        WKUPT2_R::new(((self.bits >> 18) & 0x01) != 0)
2474    }
2475    #[doc = "Bit 19 - Wake-up Input Type 0 to 3"]
2476    #[inline(always)]
2477    pub fn wkupt3(&self) -> WKUPT3_R {
2478        WKUPT3_R::new(((self.bits >> 19) & 0x01) != 0)
2479    }
2480    #[doc = "Bit 20 - Wake-up Input Type 0 to 4"]
2481    #[inline(always)]
2482    pub fn wkupt4(&self) -> WKUPT4_R {
2483        WKUPT4_R::new(((self.bits >> 20) & 0x01) != 0)
2484    }
2485    #[doc = "Bit 21 - Wake-up Input Type 0 to 5"]
2486    #[inline(always)]
2487    pub fn wkupt5(&self) -> WKUPT5_R {
2488        WKUPT5_R::new(((self.bits >> 21) & 0x01) != 0)
2489    }
2490    #[doc = "Bit 22 - Wake-up Input Type 0 to 6"]
2491    #[inline(always)]
2492    pub fn wkupt6(&self) -> WKUPT6_R {
2493        WKUPT6_R::new(((self.bits >> 22) & 0x01) != 0)
2494    }
2495    #[doc = "Bit 23 - Wake-up Input Type 0 to 7"]
2496    #[inline(always)]
2497    pub fn wkupt7(&self) -> WKUPT7_R {
2498        WKUPT7_R::new(((self.bits >> 23) & 0x01) != 0)
2499    }
2500    #[doc = "Bit 24 - Wake-up Input Type 0 to 8"]
2501    #[inline(always)]
2502    pub fn wkupt8(&self) -> WKUPT8_R {
2503        WKUPT8_R::new(((self.bits >> 24) & 0x01) != 0)
2504    }
2505    #[doc = "Bit 25 - Wake-up Input Type 0 to 9"]
2506    #[inline(always)]
2507    pub fn wkupt9(&self) -> WKUPT9_R {
2508        WKUPT9_R::new(((self.bits >> 25) & 0x01) != 0)
2509    }
2510    #[doc = "Bit 26 - Wake-up Input Type 0 to 10"]
2511    #[inline(always)]
2512    pub fn wkupt10(&self) -> WKUPT10_R {
2513        WKUPT10_R::new(((self.bits >> 26) & 0x01) != 0)
2514    }
2515    #[doc = "Bit 27 - Wake-up Input Type 0 to 11"]
2516    #[inline(always)]
2517    pub fn wkupt11(&self) -> WKUPT11_R {
2518        WKUPT11_R::new(((self.bits >> 27) & 0x01) != 0)
2519    }
2520    #[doc = "Bit 28 - Wake-up Input Type 0 to 12"]
2521    #[inline(always)]
2522    pub fn wkupt12(&self) -> WKUPT12_R {
2523        WKUPT12_R::new(((self.bits >> 28) & 0x01) != 0)
2524    }
2525    #[doc = "Bit 29 - Wake-up Input Type 0 to 13"]
2526    #[inline(always)]
2527    pub fn wkupt13(&self) -> WKUPT13_R {
2528        WKUPT13_R::new(((self.bits >> 29) & 0x01) != 0)
2529    }
2530}
2531impl W {
2532    #[doc = "Bit 0 - Wake-up Input Enable 0 to 0"]
2533    #[inline(always)]
2534    pub fn wkupen0(&mut self) -> WKUPEN0_W {
2535        WKUPEN0_W { w: self }
2536    }
2537    #[doc = "Bit 1 - Wake-up Input Enable 0 to 1"]
2538    #[inline(always)]
2539    pub fn wkupen1(&mut self) -> WKUPEN1_W {
2540        WKUPEN1_W { w: self }
2541    }
2542    #[doc = "Bit 2 - Wake-up Input Enable 0 to 2"]
2543    #[inline(always)]
2544    pub fn wkupen2(&mut self) -> WKUPEN2_W {
2545        WKUPEN2_W { w: self }
2546    }
2547    #[doc = "Bit 3 - Wake-up Input Enable 0 to 3"]
2548    #[inline(always)]
2549    pub fn wkupen3(&mut self) -> WKUPEN3_W {
2550        WKUPEN3_W { w: self }
2551    }
2552    #[doc = "Bit 4 - Wake-up Input Enable 0 to 4"]
2553    #[inline(always)]
2554    pub fn wkupen4(&mut self) -> WKUPEN4_W {
2555        WKUPEN4_W { w: self }
2556    }
2557    #[doc = "Bit 5 - Wake-up Input Enable 0 to 5"]
2558    #[inline(always)]
2559    pub fn wkupen5(&mut self) -> WKUPEN5_W {
2560        WKUPEN5_W { w: self }
2561    }
2562    #[doc = "Bit 6 - Wake-up Input Enable 0 to 6"]
2563    #[inline(always)]
2564    pub fn wkupen6(&mut self) -> WKUPEN6_W {
2565        WKUPEN6_W { w: self }
2566    }
2567    #[doc = "Bit 7 - Wake-up Input Enable 0 to 7"]
2568    #[inline(always)]
2569    pub fn wkupen7(&mut self) -> WKUPEN7_W {
2570        WKUPEN7_W { w: self }
2571    }
2572    #[doc = "Bit 8 - Wake-up Input Enable 0 to 8"]
2573    #[inline(always)]
2574    pub fn wkupen8(&mut self) -> WKUPEN8_W {
2575        WKUPEN8_W { w: self }
2576    }
2577    #[doc = "Bit 9 - Wake-up Input Enable 0 to 9"]
2578    #[inline(always)]
2579    pub fn wkupen9(&mut self) -> WKUPEN9_W {
2580        WKUPEN9_W { w: self }
2581    }
2582    #[doc = "Bit 10 - Wake-up Input Enable 0 to 10"]
2583    #[inline(always)]
2584    pub fn wkupen10(&mut self) -> WKUPEN10_W {
2585        WKUPEN10_W { w: self }
2586    }
2587    #[doc = "Bit 11 - Wake-up Input Enable 0 to 11"]
2588    #[inline(always)]
2589    pub fn wkupen11(&mut self) -> WKUPEN11_W {
2590        WKUPEN11_W { w: self }
2591    }
2592    #[doc = "Bit 12 - Wake-up Input Enable 0 to 12"]
2593    #[inline(always)]
2594    pub fn wkupen12(&mut self) -> WKUPEN12_W {
2595        WKUPEN12_W { w: self }
2596    }
2597    #[doc = "Bit 13 - Wake-up Input Enable 0 to 13"]
2598    #[inline(always)]
2599    pub fn wkupen13(&mut self) -> WKUPEN13_W {
2600        WKUPEN13_W { w: self }
2601    }
2602    #[doc = "Bit 16 - Wake-up Input Type 0 to 0"]
2603    #[inline(always)]
2604    pub fn wkupt0(&mut self) -> WKUPT0_W {
2605        WKUPT0_W { w: self }
2606    }
2607    #[doc = "Bit 17 - Wake-up Input Type 0 to 1"]
2608    #[inline(always)]
2609    pub fn wkupt1(&mut self) -> WKUPT1_W {
2610        WKUPT1_W { w: self }
2611    }
2612    #[doc = "Bit 18 - Wake-up Input Type 0 to 2"]
2613    #[inline(always)]
2614    pub fn wkupt2(&mut self) -> WKUPT2_W {
2615        WKUPT2_W { w: self }
2616    }
2617    #[doc = "Bit 19 - Wake-up Input Type 0 to 3"]
2618    #[inline(always)]
2619    pub fn wkupt3(&mut self) -> WKUPT3_W {
2620        WKUPT3_W { w: self }
2621    }
2622    #[doc = "Bit 20 - Wake-up Input Type 0 to 4"]
2623    #[inline(always)]
2624    pub fn wkupt4(&mut self) -> WKUPT4_W {
2625        WKUPT4_W { w: self }
2626    }
2627    #[doc = "Bit 21 - Wake-up Input Type 0 to 5"]
2628    #[inline(always)]
2629    pub fn wkupt5(&mut self) -> WKUPT5_W {
2630        WKUPT5_W { w: self }
2631    }
2632    #[doc = "Bit 22 - Wake-up Input Type 0 to 6"]
2633    #[inline(always)]
2634    pub fn wkupt6(&mut self) -> WKUPT6_W {
2635        WKUPT6_W { w: self }
2636    }
2637    #[doc = "Bit 23 - Wake-up Input Type 0 to 7"]
2638    #[inline(always)]
2639    pub fn wkupt7(&mut self) -> WKUPT7_W {
2640        WKUPT7_W { w: self }
2641    }
2642    #[doc = "Bit 24 - Wake-up Input Type 0 to 8"]
2643    #[inline(always)]
2644    pub fn wkupt8(&mut self) -> WKUPT8_W {
2645        WKUPT8_W { w: self }
2646    }
2647    #[doc = "Bit 25 - Wake-up Input Type 0 to 9"]
2648    #[inline(always)]
2649    pub fn wkupt9(&mut self) -> WKUPT9_W {
2650        WKUPT9_W { w: self }
2651    }
2652    #[doc = "Bit 26 - Wake-up Input Type 0 to 10"]
2653    #[inline(always)]
2654    pub fn wkupt10(&mut self) -> WKUPT10_W {
2655        WKUPT10_W { w: self }
2656    }
2657    #[doc = "Bit 27 - Wake-up Input Type 0 to 11"]
2658    #[inline(always)]
2659    pub fn wkupt11(&mut self) -> WKUPT11_W {
2660        WKUPT11_W { w: self }
2661    }
2662    #[doc = "Bit 28 - Wake-up Input Type 0 to 12"]
2663    #[inline(always)]
2664    pub fn wkupt12(&mut self) -> WKUPT12_W {
2665        WKUPT12_W { w: self }
2666    }
2667    #[doc = "Bit 29 - Wake-up Input Type 0 to 13"]
2668    #[inline(always)]
2669    pub fn wkupt13(&mut self) -> WKUPT13_W {
2670        WKUPT13_W { w: self }
2671    }
2672    #[doc = "Writes raw bits to the register."]
2673    #[inline(always)]
2674    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
2675        self.0.bits(bits);
2676        self
2677    }
2678}
2679#[doc = "Supply Controller Wake-up Inputs Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [supc_wuir](index.html) module"]
2680pub struct SUPC_WUIR_SPEC;
2681impl crate::RegisterSpec for SUPC_WUIR_SPEC {
2682    type Ux = u32;
2683}
2684#[doc = "`read()` method returns [supc_wuir::R](R) reader structure"]
2685impl crate::Readable for SUPC_WUIR_SPEC {
2686    type Reader = R;
2687}
2688#[doc = "`write(|w| ..)` method takes [supc_wuir::W](W) writer structure"]
2689impl crate::Writable for SUPC_WUIR_SPEC {
2690    type Writer = W;
2691}
2692#[doc = "`reset()` method sets SUPC_WUIR to value 0"]
2693impl crate::Resettable for SUPC_WUIR_SPEC {
2694    #[inline(always)]
2695    fn reset_value() -> Self::Ux {
2696        0
2697    }
2698}