atsam4e16e_pac/supc/
sr.rs

1#[doc = "Register `SR` reader"]
2pub struct R(crate::R<SR_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<SR_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<SR_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<SR_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `FWUPS` reader - FWUP Wake-up Status"]
17pub type FWUPS_R = crate::BitReader<FWUPS_A>;
18#[doc = "FWUP Wake-up Status\n\nValue on reset: 0"]
19#[derive(Clone, Copy, Debug, PartialEq, Eq)]
20pub enum FWUPS_A {
21    #[doc = "0: No wake-up due to the assertion of the FWUP pin has occurred since the last read of SUPC_SR."]
22    NO = 0,
23    #[doc = "1: At least one wake-up due to the assertion of the FWUP pin has occurred since the last read of SUPC_SR."]
24    PRESENT = 1,
25}
26impl From<FWUPS_A> for bool {
27    #[inline(always)]
28    fn from(variant: FWUPS_A) -> Self {
29        variant as u8 != 0
30    }
31}
32impl FWUPS_R {
33    #[doc = "Get enumerated values variant"]
34    #[inline(always)]
35    pub fn variant(&self) -> FWUPS_A {
36        match self.bits {
37            false => FWUPS_A::NO,
38            true => FWUPS_A::PRESENT,
39        }
40    }
41    #[doc = "Checks if the value of the field is `NO`"]
42    #[inline(always)]
43    pub fn is_no(&self) -> bool {
44        *self == FWUPS_A::NO
45    }
46    #[doc = "Checks if the value of the field is `PRESENT`"]
47    #[inline(always)]
48    pub fn is_present(&self) -> bool {
49        *self == FWUPS_A::PRESENT
50    }
51}
52#[doc = "Field `WKUPS` reader - WKUP Wake-up Status"]
53pub type WKUPS_R = crate::BitReader<WKUPS_A>;
54#[doc = "WKUP Wake-up Status\n\nValue on reset: 0"]
55#[derive(Clone, Copy, Debug, PartialEq, Eq)]
56pub enum WKUPS_A {
57    #[doc = "0: No wake-up due to the assertion of the WKUP pins has occurred since the last read of SUPC_SR."]
58    NO = 0,
59    #[doc = "1: At least one wake-up due to the assertion of the WKUP pins has occurred since the last read of SUPC_SR."]
60    PRESENT = 1,
61}
62impl From<WKUPS_A> for bool {
63    #[inline(always)]
64    fn from(variant: WKUPS_A) -> Self {
65        variant as u8 != 0
66    }
67}
68impl WKUPS_R {
69    #[doc = "Get enumerated values variant"]
70    #[inline(always)]
71    pub fn variant(&self) -> WKUPS_A {
72        match self.bits {
73            false => WKUPS_A::NO,
74            true => WKUPS_A::PRESENT,
75        }
76    }
77    #[doc = "Checks if the value of the field is `NO`"]
78    #[inline(always)]
79    pub fn is_no(&self) -> bool {
80        *self == WKUPS_A::NO
81    }
82    #[doc = "Checks if the value of the field is `PRESENT`"]
83    #[inline(always)]
84    pub fn is_present(&self) -> bool {
85        *self == WKUPS_A::PRESENT
86    }
87}
88#[doc = "Field `SMWS` reader - Supply Monitor Detection Wake-up Status"]
89pub type SMWS_R = crate::BitReader<SMWS_A>;
90#[doc = "Supply Monitor Detection Wake-up Status\n\nValue on reset: 0"]
91#[derive(Clone, Copy, Debug, PartialEq, Eq)]
92pub enum SMWS_A {
93    #[doc = "0: No wake-up due to a supply monitor detection has occurred since the last read of SUPC_SR."]
94    NO = 0,
95    #[doc = "1: At least one wake-up due to a supply monitor detection has occurred since the last read of SUPC_SR."]
96    PRESENT = 1,
97}
98impl From<SMWS_A> for bool {
99    #[inline(always)]
100    fn from(variant: SMWS_A) -> Self {
101        variant as u8 != 0
102    }
103}
104impl SMWS_R {
105    #[doc = "Get enumerated values variant"]
106    #[inline(always)]
107    pub fn variant(&self) -> SMWS_A {
108        match self.bits {
109            false => SMWS_A::NO,
110            true => SMWS_A::PRESENT,
111        }
112    }
113    #[doc = "Checks if the value of the field is `NO`"]
114    #[inline(always)]
115    pub fn is_no(&self) -> bool {
116        *self == SMWS_A::NO
117    }
118    #[doc = "Checks if the value of the field is `PRESENT`"]
119    #[inline(always)]
120    pub fn is_present(&self) -> bool {
121        *self == SMWS_A::PRESENT
122    }
123}
124#[doc = "Field `BODRSTS` reader - Brownout Detector Reset Status"]
125pub type BODRSTS_R = crate::BitReader<BODRSTS_A>;
126#[doc = "Brownout Detector Reset Status\n\nValue on reset: 0"]
127#[derive(Clone, Copy, Debug, PartialEq, Eq)]
128pub enum BODRSTS_A {
129    #[doc = "0: No core brownout rising edge event has been detected since the last read of the SUPC_SR."]
130    NO = 0,
131    #[doc = "1: At least one brownout output rising edge event has been detected since the last read of the SUPC_SR."]
132    PRESENT = 1,
133}
134impl From<BODRSTS_A> for bool {
135    #[inline(always)]
136    fn from(variant: BODRSTS_A) -> Self {
137        variant as u8 != 0
138    }
139}
140impl BODRSTS_R {
141    #[doc = "Get enumerated values variant"]
142    #[inline(always)]
143    pub fn variant(&self) -> BODRSTS_A {
144        match self.bits {
145            false => BODRSTS_A::NO,
146            true => BODRSTS_A::PRESENT,
147        }
148    }
149    #[doc = "Checks if the value of the field is `NO`"]
150    #[inline(always)]
151    pub fn is_no(&self) -> bool {
152        *self == BODRSTS_A::NO
153    }
154    #[doc = "Checks if the value of the field is `PRESENT`"]
155    #[inline(always)]
156    pub fn is_present(&self) -> bool {
157        *self == BODRSTS_A::PRESENT
158    }
159}
160#[doc = "Field `SMRSTS` reader - Supply Monitor Reset Status"]
161pub type SMRSTS_R = crate::BitReader<SMRSTS_A>;
162#[doc = "Supply Monitor Reset Status\n\nValue on reset: 0"]
163#[derive(Clone, Copy, Debug, PartialEq, Eq)]
164pub enum SMRSTS_A {
165    #[doc = "0: No supply monitor detection has generated a core reset since the last read of the SUPC_SR."]
166    NO = 0,
167    #[doc = "1: At least one supply monitor detection has generated a core reset since the last read of the SUPC_SR."]
168    PRESENT = 1,
169}
170impl From<SMRSTS_A> for bool {
171    #[inline(always)]
172    fn from(variant: SMRSTS_A) -> Self {
173        variant as u8 != 0
174    }
175}
176impl SMRSTS_R {
177    #[doc = "Get enumerated values variant"]
178    #[inline(always)]
179    pub fn variant(&self) -> SMRSTS_A {
180        match self.bits {
181            false => SMRSTS_A::NO,
182            true => SMRSTS_A::PRESENT,
183        }
184    }
185    #[doc = "Checks if the value of the field is `NO`"]
186    #[inline(always)]
187    pub fn is_no(&self) -> bool {
188        *self == SMRSTS_A::NO
189    }
190    #[doc = "Checks if the value of the field is `PRESENT`"]
191    #[inline(always)]
192    pub fn is_present(&self) -> bool {
193        *self == SMRSTS_A::PRESENT
194    }
195}
196#[doc = "Field `SMS` reader - Supply Monitor Status"]
197pub type SMS_R = crate::BitReader<SMS_A>;
198#[doc = "Supply Monitor Status\n\nValue on reset: 0"]
199#[derive(Clone, Copy, Debug, PartialEq, Eq)]
200pub enum SMS_A {
201    #[doc = "0: No supply monitor detection since the last read of SUPC_SR."]
202    NO = 0,
203    #[doc = "1: At least one supply monitor detection since the last read of SUPC_SR."]
204    PRESENT = 1,
205}
206impl From<SMS_A> for bool {
207    #[inline(always)]
208    fn from(variant: SMS_A) -> Self {
209        variant as u8 != 0
210    }
211}
212impl SMS_R {
213    #[doc = "Get enumerated values variant"]
214    #[inline(always)]
215    pub fn variant(&self) -> SMS_A {
216        match self.bits {
217            false => SMS_A::NO,
218            true => SMS_A::PRESENT,
219        }
220    }
221    #[doc = "Checks if the value of the field is `NO`"]
222    #[inline(always)]
223    pub fn is_no(&self) -> bool {
224        *self == SMS_A::NO
225    }
226    #[doc = "Checks if the value of the field is `PRESENT`"]
227    #[inline(always)]
228    pub fn is_present(&self) -> bool {
229        *self == SMS_A::PRESENT
230    }
231}
232#[doc = "Field `SMOS` reader - Supply Monitor Output Status"]
233pub type SMOS_R = crate::BitReader<SMOS_A>;
234#[doc = "Supply Monitor Output Status\n\nValue on reset: 0"]
235#[derive(Clone, Copy, Debug, PartialEq, Eq)]
236pub enum SMOS_A {
237    #[doc = "0: The supply monitor detected VDDIO higher than its threshold at its last measurement."]
238    HIGH = 0,
239    #[doc = "1: The supply monitor detected VDDIO lower than its threshold at its last measurement."]
240    LOW = 1,
241}
242impl From<SMOS_A> for bool {
243    #[inline(always)]
244    fn from(variant: SMOS_A) -> Self {
245        variant as u8 != 0
246    }
247}
248impl SMOS_R {
249    #[doc = "Get enumerated values variant"]
250    #[inline(always)]
251    pub fn variant(&self) -> SMOS_A {
252        match self.bits {
253            false => SMOS_A::HIGH,
254            true => SMOS_A::LOW,
255        }
256    }
257    #[doc = "Checks if the value of the field is `HIGH`"]
258    #[inline(always)]
259    pub fn is_high(&self) -> bool {
260        *self == SMOS_A::HIGH
261    }
262    #[doc = "Checks if the value of the field is `LOW`"]
263    #[inline(always)]
264    pub fn is_low(&self) -> bool {
265        *self == SMOS_A::LOW
266    }
267}
268#[doc = "Field `OSCSEL` reader - 32-kHz Oscillator Selection Status"]
269pub type OSCSEL_R = crate::BitReader<OSCSEL_A>;
270#[doc = "32-kHz Oscillator Selection Status\n\nValue on reset: 0"]
271#[derive(Clone, Copy, Debug, PartialEq, Eq)]
272pub enum OSCSEL_A {
273    #[doc = "0: The slow clock, SLCK is generated by the embedded 32 kHz RC oscillator."]
274    RC = 0,
275    #[doc = "1: The slow clock, SLCK is generated by the 32 kHz crystal oscillator."]
276    CRYST = 1,
277}
278impl From<OSCSEL_A> for bool {
279    #[inline(always)]
280    fn from(variant: OSCSEL_A) -> Self {
281        variant as u8 != 0
282    }
283}
284impl OSCSEL_R {
285    #[doc = "Get enumerated values variant"]
286    #[inline(always)]
287    pub fn variant(&self) -> OSCSEL_A {
288        match self.bits {
289            false => OSCSEL_A::RC,
290            true => OSCSEL_A::CRYST,
291        }
292    }
293    #[doc = "Checks if the value of the field is `RC`"]
294    #[inline(always)]
295    pub fn is_rc(&self) -> bool {
296        *self == OSCSEL_A::RC
297    }
298    #[doc = "Checks if the value of the field is `CRYST`"]
299    #[inline(always)]
300    pub fn is_cryst(&self) -> bool {
301        *self == OSCSEL_A::CRYST
302    }
303}
304#[doc = "Field `FWUPIS` reader - FWUP Input Status"]
305pub type FWUPIS_R = crate::BitReader<FWUPIS_A>;
306#[doc = "FWUP Input Status\n\nValue on reset: 0"]
307#[derive(Clone, Copy, Debug, PartialEq, Eq)]
308pub enum FWUPIS_A {
309    #[doc = "0: FWUP input is tied low."]
310    LOW = 0,
311    #[doc = "1: FWUP input is tied high."]
312    HIGH = 1,
313}
314impl From<FWUPIS_A> for bool {
315    #[inline(always)]
316    fn from(variant: FWUPIS_A) -> Self {
317        variant as u8 != 0
318    }
319}
320impl FWUPIS_R {
321    #[doc = "Get enumerated values variant"]
322    #[inline(always)]
323    pub fn variant(&self) -> FWUPIS_A {
324        match self.bits {
325            false => FWUPIS_A::LOW,
326            true => FWUPIS_A::HIGH,
327        }
328    }
329    #[doc = "Checks if the value of the field is `LOW`"]
330    #[inline(always)]
331    pub fn is_low(&self) -> bool {
332        *self == FWUPIS_A::LOW
333    }
334    #[doc = "Checks if the value of the field is `HIGH`"]
335    #[inline(always)]
336    pub fn is_high(&self) -> bool {
337        *self == FWUPIS_A::HIGH
338    }
339}
340#[doc = "Field `LPDBCS0` reader - Low-power Debouncer Wake-up Status on WKUP0"]
341pub type LPDBCS0_R = crate::BitReader<LPDBCS0_A>;
342#[doc = "Low-power Debouncer Wake-up Status on WKUP0\n\nValue on reset: 0"]
343#[derive(Clone, Copy, Debug, PartialEq, Eq)]
344pub enum LPDBCS0_A {
345    #[doc = "0: No wake-up due to the assertion of the WKUP0 pin has occurred since the last read of SUPC_SR."]
346    NO = 0,
347    #[doc = "1: At least one wake-up due to the assertion of the WKUP0 pin has occurred since the last read of SUPC_SR."]
348    PRESENT = 1,
349}
350impl From<LPDBCS0_A> for bool {
351    #[inline(always)]
352    fn from(variant: LPDBCS0_A) -> Self {
353        variant as u8 != 0
354    }
355}
356impl LPDBCS0_R {
357    #[doc = "Get enumerated values variant"]
358    #[inline(always)]
359    pub fn variant(&self) -> LPDBCS0_A {
360        match self.bits {
361            false => LPDBCS0_A::NO,
362            true => LPDBCS0_A::PRESENT,
363        }
364    }
365    #[doc = "Checks if the value of the field is `NO`"]
366    #[inline(always)]
367    pub fn is_no(&self) -> bool {
368        *self == LPDBCS0_A::NO
369    }
370    #[doc = "Checks if the value of the field is `PRESENT`"]
371    #[inline(always)]
372    pub fn is_present(&self) -> bool {
373        *self == LPDBCS0_A::PRESENT
374    }
375}
376#[doc = "Field `LPDBCS1` reader - Low-power Debouncer Wake-up Status on WKUP1"]
377pub type LPDBCS1_R = crate::BitReader<LPDBCS1_A>;
378#[doc = "Low-power Debouncer Wake-up Status on WKUP1\n\nValue on reset: 0"]
379#[derive(Clone, Copy, Debug, PartialEq, Eq)]
380pub enum LPDBCS1_A {
381    #[doc = "0: No wake-up due to the assertion of the WKUP1 pin has occurred since the last read of SUPC_SR."]
382    NO = 0,
383    #[doc = "1: At least one wake-up due to the assertion of the WKUP1 pin has occurred since the last read of SUPC_SR."]
384    PRESENT = 1,
385}
386impl From<LPDBCS1_A> for bool {
387    #[inline(always)]
388    fn from(variant: LPDBCS1_A) -> Self {
389        variant as u8 != 0
390    }
391}
392impl LPDBCS1_R {
393    #[doc = "Get enumerated values variant"]
394    #[inline(always)]
395    pub fn variant(&self) -> LPDBCS1_A {
396        match self.bits {
397            false => LPDBCS1_A::NO,
398            true => LPDBCS1_A::PRESENT,
399        }
400    }
401    #[doc = "Checks if the value of the field is `NO`"]
402    #[inline(always)]
403    pub fn is_no(&self) -> bool {
404        *self == LPDBCS1_A::NO
405    }
406    #[doc = "Checks if the value of the field is `PRESENT`"]
407    #[inline(always)]
408    pub fn is_present(&self) -> bool {
409        *self == LPDBCS1_A::PRESENT
410    }
411}
412#[doc = "Field `WKUPIS0` reader - WKUP Input Status 0"]
413pub type WKUPIS0_R = crate::BitReader<WKUPIS0_A>;
414#[doc = "WKUP Input Status 0\n\nValue on reset: 0"]
415#[derive(Clone, Copy, Debug, PartialEq, Eq)]
416pub enum WKUPIS0_A {
417    #[doc = "0: The corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
418    DIS = 0,
419    #[doc = "1: The corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
420    EN = 1,
421}
422impl From<WKUPIS0_A> for bool {
423    #[inline(always)]
424    fn from(variant: WKUPIS0_A) -> Self {
425        variant as u8 != 0
426    }
427}
428impl WKUPIS0_R {
429    #[doc = "Get enumerated values variant"]
430    #[inline(always)]
431    pub fn variant(&self) -> WKUPIS0_A {
432        match self.bits {
433            false => WKUPIS0_A::DIS,
434            true => WKUPIS0_A::EN,
435        }
436    }
437    #[doc = "Checks if the value of the field is `DIS`"]
438    #[inline(always)]
439    pub fn is_dis(&self) -> bool {
440        *self == WKUPIS0_A::DIS
441    }
442    #[doc = "Checks if the value of the field is `EN`"]
443    #[inline(always)]
444    pub fn is_en(&self) -> bool {
445        *self == WKUPIS0_A::EN
446    }
447}
448#[doc = "Field `WKUPIS1` reader - WKUP Input Status 1"]
449pub type WKUPIS1_R = crate::BitReader<WKUPIS1_A>;
450#[doc = "WKUP Input Status 1\n\nValue on reset: 0"]
451#[derive(Clone, Copy, Debug, PartialEq, Eq)]
452pub enum WKUPIS1_A {
453    #[doc = "0: The corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
454    DIS = 0,
455    #[doc = "1: The corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
456    EN = 1,
457}
458impl From<WKUPIS1_A> for bool {
459    #[inline(always)]
460    fn from(variant: WKUPIS1_A) -> Self {
461        variant as u8 != 0
462    }
463}
464impl WKUPIS1_R {
465    #[doc = "Get enumerated values variant"]
466    #[inline(always)]
467    pub fn variant(&self) -> WKUPIS1_A {
468        match self.bits {
469            false => WKUPIS1_A::DIS,
470            true => WKUPIS1_A::EN,
471        }
472    }
473    #[doc = "Checks if the value of the field is `DIS`"]
474    #[inline(always)]
475    pub fn is_dis(&self) -> bool {
476        *self == WKUPIS1_A::DIS
477    }
478    #[doc = "Checks if the value of the field is `EN`"]
479    #[inline(always)]
480    pub fn is_en(&self) -> bool {
481        *self == WKUPIS1_A::EN
482    }
483}
484#[doc = "Field `WKUPIS2` reader - WKUP Input Status 2"]
485pub type WKUPIS2_R = crate::BitReader<WKUPIS2_A>;
486#[doc = "WKUP Input Status 2\n\nValue on reset: 0"]
487#[derive(Clone, Copy, Debug, PartialEq, Eq)]
488pub enum WKUPIS2_A {
489    #[doc = "0: The corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
490    DIS = 0,
491    #[doc = "1: The corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
492    EN = 1,
493}
494impl From<WKUPIS2_A> for bool {
495    #[inline(always)]
496    fn from(variant: WKUPIS2_A) -> Self {
497        variant as u8 != 0
498    }
499}
500impl WKUPIS2_R {
501    #[doc = "Get enumerated values variant"]
502    #[inline(always)]
503    pub fn variant(&self) -> WKUPIS2_A {
504        match self.bits {
505            false => WKUPIS2_A::DIS,
506            true => WKUPIS2_A::EN,
507        }
508    }
509    #[doc = "Checks if the value of the field is `DIS`"]
510    #[inline(always)]
511    pub fn is_dis(&self) -> bool {
512        *self == WKUPIS2_A::DIS
513    }
514    #[doc = "Checks if the value of the field is `EN`"]
515    #[inline(always)]
516    pub fn is_en(&self) -> bool {
517        *self == WKUPIS2_A::EN
518    }
519}
520#[doc = "Field `WKUPIS3` reader - WKUP Input Status 3"]
521pub type WKUPIS3_R = crate::BitReader<WKUPIS3_A>;
522#[doc = "WKUP Input Status 3\n\nValue on reset: 0"]
523#[derive(Clone, Copy, Debug, PartialEq, Eq)]
524pub enum WKUPIS3_A {
525    #[doc = "0: The corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
526    DIS = 0,
527    #[doc = "1: The corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
528    EN = 1,
529}
530impl From<WKUPIS3_A> for bool {
531    #[inline(always)]
532    fn from(variant: WKUPIS3_A) -> Self {
533        variant as u8 != 0
534    }
535}
536impl WKUPIS3_R {
537    #[doc = "Get enumerated values variant"]
538    #[inline(always)]
539    pub fn variant(&self) -> WKUPIS3_A {
540        match self.bits {
541            false => WKUPIS3_A::DIS,
542            true => WKUPIS3_A::EN,
543        }
544    }
545    #[doc = "Checks if the value of the field is `DIS`"]
546    #[inline(always)]
547    pub fn is_dis(&self) -> bool {
548        *self == WKUPIS3_A::DIS
549    }
550    #[doc = "Checks if the value of the field is `EN`"]
551    #[inline(always)]
552    pub fn is_en(&self) -> bool {
553        *self == WKUPIS3_A::EN
554    }
555}
556#[doc = "Field `WKUPIS4` reader - WKUP Input Status 4"]
557pub type WKUPIS4_R = crate::BitReader<WKUPIS4_A>;
558#[doc = "WKUP Input Status 4\n\nValue on reset: 0"]
559#[derive(Clone, Copy, Debug, PartialEq, Eq)]
560pub enum WKUPIS4_A {
561    #[doc = "0: The corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
562    DIS = 0,
563    #[doc = "1: The corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
564    EN = 1,
565}
566impl From<WKUPIS4_A> for bool {
567    #[inline(always)]
568    fn from(variant: WKUPIS4_A) -> Self {
569        variant as u8 != 0
570    }
571}
572impl WKUPIS4_R {
573    #[doc = "Get enumerated values variant"]
574    #[inline(always)]
575    pub fn variant(&self) -> WKUPIS4_A {
576        match self.bits {
577            false => WKUPIS4_A::DIS,
578            true => WKUPIS4_A::EN,
579        }
580    }
581    #[doc = "Checks if the value of the field is `DIS`"]
582    #[inline(always)]
583    pub fn is_dis(&self) -> bool {
584        *self == WKUPIS4_A::DIS
585    }
586    #[doc = "Checks if the value of the field is `EN`"]
587    #[inline(always)]
588    pub fn is_en(&self) -> bool {
589        *self == WKUPIS4_A::EN
590    }
591}
592#[doc = "Field `WKUPIS5` reader - WKUP Input Status 5"]
593pub type WKUPIS5_R = crate::BitReader<WKUPIS5_A>;
594#[doc = "WKUP Input Status 5\n\nValue on reset: 0"]
595#[derive(Clone, Copy, Debug, PartialEq, Eq)]
596pub enum WKUPIS5_A {
597    #[doc = "0: The corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
598    DIS = 0,
599    #[doc = "1: The corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
600    EN = 1,
601}
602impl From<WKUPIS5_A> for bool {
603    #[inline(always)]
604    fn from(variant: WKUPIS5_A) -> Self {
605        variant as u8 != 0
606    }
607}
608impl WKUPIS5_R {
609    #[doc = "Get enumerated values variant"]
610    #[inline(always)]
611    pub fn variant(&self) -> WKUPIS5_A {
612        match self.bits {
613            false => WKUPIS5_A::DIS,
614            true => WKUPIS5_A::EN,
615        }
616    }
617    #[doc = "Checks if the value of the field is `DIS`"]
618    #[inline(always)]
619    pub fn is_dis(&self) -> bool {
620        *self == WKUPIS5_A::DIS
621    }
622    #[doc = "Checks if the value of the field is `EN`"]
623    #[inline(always)]
624    pub fn is_en(&self) -> bool {
625        *self == WKUPIS5_A::EN
626    }
627}
628#[doc = "Field `WKUPIS6` reader - WKUP Input Status 6"]
629pub type WKUPIS6_R = crate::BitReader<WKUPIS6_A>;
630#[doc = "WKUP Input Status 6\n\nValue on reset: 0"]
631#[derive(Clone, Copy, Debug, PartialEq, Eq)]
632pub enum WKUPIS6_A {
633    #[doc = "0: The corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
634    DIS = 0,
635    #[doc = "1: The corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
636    EN = 1,
637}
638impl From<WKUPIS6_A> for bool {
639    #[inline(always)]
640    fn from(variant: WKUPIS6_A) -> Self {
641        variant as u8 != 0
642    }
643}
644impl WKUPIS6_R {
645    #[doc = "Get enumerated values variant"]
646    #[inline(always)]
647    pub fn variant(&self) -> WKUPIS6_A {
648        match self.bits {
649            false => WKUPIS6_A::DIS,
650            true => WKUPIS6_A::EN,
651        }
652    }
653    #[doc = "Checks if the value of the field is `DIS`"]
654    #[inline(always)]
655    pub fn is_dis(&self) -> bool {
656        *self == WKUPIS6_A::DIS
657    }
658    #[doc = "Checks if the value of the field is `EN`"]
659    #[inline(always)]
660    pub fn is_en(&self) -> bool {
661        *self == WKUPIS6_A::EN
662    }
663}
664#[doc = "Field `WKUPIS7` reader - WKUP Input Status 7"]
665pub type WKUPIS7_R = crate::BitReader<WKUPIS7_A>;
666#[doc = "WKUP Input Status 7\n\nValue on reset: 0"]
667#[derive(Clone, Copy, Debug, PartialEq, Eq)]
668pub enum WKUPIS7_A {
669    #[doc = "0: The corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
670    DIS = 0,
671    #[doc = "1: The corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
672    EN = 1,
673}
674impl From<WKUPIS7_A> for bool {
675    #[inline(always)]
676    fn from(variant: WKUPIS7_A) -> Self {
677        variant as u8 != 0
678    }
679}
680impl WKUPIS7_R {
681    #[doc = "Get enumerated values variant"]
682    #[inline(always)]
683    pub fn variant(&self) -> WKUPIS7_A {
684        match self.bits {
685            false => WKUPIS7_A::DIS,
686            true => WKUPIS7_A::EN,
687        }
688    }
689    #[doc = "Checks if the value of the field is `DIS`"]
690    #[inline(always)]
691    pub fn is_dis(&self) -> bool {
692        *self == WKUPIS7_A::DIS
693    }
694    #[doc = "Checks if the value of the field is `EN`"]
695    #[inline(always)]
696    pub fn is_en(&self) -> bool {
697        *self == WKUPIS7_A::EN
698    }
699}
700#[doc = "Field `WKUPIS8` reader - WKUP Input Status 8"]
701pub type WKUPIS8_R = crate::BitReader<WKUPIS8_A>;
702#[doc = "WKUP Input Status 8\n\nValue on reset: 0"]
703#[derive(Clone, Copy, Debug, PartialEq, Eq)]
704pub enum WKUPIS8_A {
705    #[doc = "0: The corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
706    DIS = 0,
707    #[doc = "1: The corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
708    EN = 1,
709}
710impl From<WKUPIS8_A> for bool {
711    #[inline(always)]
712    fn from(variant: WKUPIS8_A) -> Self {
713        variant as u8 != 0
714    }
715}
716impl WKUPIS8_R {
717    #[doc = "Get enumerated values variant"]
718    #[inline(always)]
719    pub fn variant(&self) -> WKUPIS8_A {
720        match self.bits {
721            false => WKUPIS8_A::DIS,
722            true => WKUPIS8_A::EN,
723        }
724    }
725    #[doc = "Checks if the value of the field is `DIS`"]
726    #[inline(always)]
727    pub fn is_dis(&self) -> bool {
728        *self == WKUPIS8_A::DIS
729    }
730    #[doc = "Checks if the value of the field is `EN`"]
731    #[inline(always)]
732    pub fn is_en(&self) -> bool {
733        *self == WKUPIS8_A::EN
734    }
735}
736#[doc = "Field `WKUPIS9` reader - WKUP Input Status 9"]
737pub type WKUPIS9_R = crate::BitReader<WKUPIS9_A>;
738#[doc = "WKUP Input Status 9\n\nValue on reset: 0"]
739#[derive(Clone, Copy, Debug, PartialEq, Eq)]
740pub enum WKUPIS9_A {
741    #[doc = "0: The corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
742    DIS = 0,
743    #[doc = "1: The corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
744    EN = 1,
745}
746impl From<WKUPIS9_A> for bool {
747    #[inline(always)]
748    fn from(variant: WKUPIS9_A) -> Self {
749        variant as u8 != 0
750    }
751}
752impl WKUPIS9_R {
753    #[doc = "Get enumerated values variant"]
754    #[inline(always)]
755    pub fn variant(&self) -> WKUPIS9_A {
756        match self.bits {
757            false => WKUPIS9_A::DIS,
758            true => WKUPIS9_A::EN,
759        }
760    }
761    #[doc = "Checks if the value of the field is `DIS`"]
762    #[inline(always)]
763    pub fn is_dis(&self) -> bool {
764        *self == WKUPIS9_A::DIS
765    }
766    #[doc = "Checks if the value of the field is `EN`"]
767    #[inline(always)]
768    pub fn is_en(&self) -> bool {
769        *self == WKUPIS9_A::EN
770    }
771}
772#[doc = "Field `WKUPIS10` reader - WKUP Input Status 10"]
773pub type WKUPIS10_R = crate::BitReader<WKUPIS10_A>;
774#[doc = "WKUP Input Status 10\n\nValue on reset: 0"]
775#[derive(Clone, Copy, Debug, PartialEq, Eq)]
776pub enum WKUPIS10_A {
777    #[doc = "0: The corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
778    DIS = 0,
779    #[doc = "1: The corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
780    EN = 1,
781}
782impl From<WKUPIS10_A> for bool {
783    #[inline(always)]
784    fn from(variant: WKUPIS10_A) -> Self {
785        variant as u8 != 0
786    }
787}
788impl WKUPIS10_R {
789    #[doc = "Get enumerated values variant"]
790    #[inline(always)]
791    pub fn variant(&self) -> WKUPIS10_A {
792        match self.bits {
793            false => WKUPIS10_A::DIS,
794            true => WKUPIS10_A::EN,
795        }
796    }
797    #[doc = "Checks if the value of the field is `DIS`"]
798    #[inline(always)]
799    pub fn is_dis(&self) -> bool {
800        *self == WKUPIS10_A::DIS
801    }
802    #[doc = "Checks if the value of the field is `EN`"]
803    #[inline(always)]
804    pub fn is_en(&self) -> bool {
805        *self == WKUPIS10_A::EN
806    }
807}
808#[doc = "Field `WKUPIS11` reader - WKUP Input Status 11"]
809pub type WKUPIS11_R = crate::BitReader<WKUPIS11_A>;
810#[doc = "WKUP Input Status 11\n\nValue on reset: 0"]
811#[derive(Clone, Copy, Debug, PartialEq, Eq)]
812pub enum WKUPIS11_A {
813    #[doc = "0: The corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
814    DIS = 0,
815    #[doc = "1: The corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
816    EN = 1,
817}
818impl From<WKUPIS11_A> for bool {
819    #[inline(always)]
820    fn from(variant: WKUPIS11_A) -> Self {
821        variant as u8 != 0
822    }
823}
824impl WKUPIS11_R {
825    #[doc = "Get enumerated values variant"]
826    #[inline(always)]
827    pub fn variant(&self) -> WKUPIS11_A {
828        match self.bits {
829            false => WKUPIS11_A::DIS,
830            true => WKUPIS11_A::EN,
831        }
832    }
833    #[doc = "Checks if the value of the field is `DIS`"]
834    #[inline(always)]
835    pub fn is_dis(&self) -> bool {
836        *self == WKUPIS11_A::DIS
837    }
838    #[doc = "Checks if the value of the field is `EN`"]
839    #[inline(always)]
840    pub fn is_en(&self) -> bool {
841        *self == WKUPIS11_A::EN
842    }
843}
844#[doc = "Field `WKUPIS12` reader - WKUP Input Status 12"]
845pub type WKUPIS12_R = crate::BitReader<WKUPIS12_A>;
846#[doc = "WKUP Input Status 12\n\nValue on reset: 0"]
847#[derive(Clone, Copy, Debug, PartialEq, Eq)]
848pub enum WKUPIS12_A {
849    #[doc = "0: The corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
850    DIS = 0,
851    #[doc = "1: The corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
852    EN = 1,
853}
854impl From<WKUPIS12_A> for bool {
855    #[inline(always)]
856    fn from(variant: WKUPIS12_A) -> Self {
857        variant as u8 != 0
858    }
859}
860impl WKUPIS12_R {
861    #[doc = "Get enumerated values variant"]
862    #[inline(always)]
863    pub fn variant(&self) -> WKUPIS12_A {
864        match self.bits {
865            false => WKUPIS12_A::DIS,
866            true => WKUPIS12_A::EN,
867        }
868    }
869    #[doc = "Checks if the value of the field is `DIS`"]
870    #[inline(always)]
871    pub fn is_dis(&self) -> bool {
872        *self == WKUPIS12_A::DIS
873    }
874    #[doc = "Checks if the value of the field is `EN`"]
875    #[inline(always)]
876    pub fn is_en(&self) -> bool {
877        *self == WKUPIS12_A::EN
878    }
879}
880#[doc = "Field `WKUPIS13` reader - WKUP Input Status 13"]
881pub type WKUPIS13_R = crate::BitReader<WKUPIS13_A>;
882#[doc = "WKUP Input Status 13\n\nValue on reset: 0"]
883#[derive(Clone, Copy, Debug, PartialEq, Eq)]
884pub enum WKUPIS13_A {
885    #[doc = "0: The corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
886    DIS = 0,
887    #[doc = "1: The corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
888    EN = 1,
889}
890impl From<WKUPIS13_A> for bool {
891    #[inline(always)]
892    fn from(variant: WKUPIS13_A) -> Self {
893        variant as u8 != 0
894    }
895}
896impl WKUPIS13_R {
897    #[doc = "Get enumerated values variant"]
898    #[inline(always)]
899    pub fn variant(&self) -> WKUPIS13_A {
900        match self.bits {
901            false => WKUPIS13_A::DIS,
902            true => WKUPIS13_A::EN,
903        }
904    }
905    #[doc = "Checks if the value of the field is `DIS`"]
906    #[inline(always)]
907    pub fn is_dis(&self) -> bool {
908        *self == WKUPIS13_A::DIS
909    }
910    #[doc = "Checks if the value of the field is `EN`"]
911    #[inline(always)]
912    pub fn is_en(&self) -> bool {
913        *self == WKUPIS13_A::EN
914    }
915}
916#[doc = "Field `WKUPIS14` reader - WKUP Input Status 14"]
917pub type WKUPIS14_R = crate::BitReader<WKUPIS14_A>;
918#[doc = "WKUP Input Status 14\n\nValue on reset: 0"]
919#[derive(Clone, Copy, Debug, PartialEq, Eq)]
920pub enum WKUPIS14_A {
921    #[doc = "0: The corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
922    DIS = 0,
923    #[doc = "1: The corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
924    EN = 1,
925}
926impl From<WKUPIS14_A> for bool {
927    #[inline(always)]
928    fn from(variant: WKUPIS14_A) -> Self {
929        variant as u8 != 0
930    }
931}
932impl WKUPIS14_R {
933    #[doc = "Get enumerated values variant"]
934    #[inline(always)]
935    pub fn variant(&self) -> WKUPIS14_A {
936        match self.bits {
937            false => WKUPIS14_A::DIS,
938            true => WKUPIS14_A::EN,
939        }
940    }
941    #[doc = "Checks if the value of the field is `DIS`"]
942    #[inline(always)]
943    pub fn is_dis(&self) -> bool {
944        *self == WKUPIS14_A::DIS
945    }
946    #[doc = "Checks if the value of the field is `EN`"]
947    #[inline(always)]
948    pub fn is_en(&self) -> bool {
949        *self == WKUPIS14_A::EN
950    }
951}
952#[doc = "Field `WKUPIS15` reader - WKUP Input Status 15"]
953pub type WKUPIS15_R = crate::BitReader<WKUPIS15_A>;
954#[doc = "WKUP Input Status 15\n\nValue on reset: 0"]
955#[derive(Clone, Copy, Debug, PartialEq, Eq)]
956pub enum WKUPIS15_A {
957    #[doc = "0: The corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake-up event."]
958    DIS = 0,
959    #[doc = "1: The corresponding wake-up input was active at the time the debouncer triggered a wake-up event."]
960    EN = 1,
961}
962impl From<WKUPIS15_A> for bool {
963    #[inline(always)]
964    fn from(variant: WKUPIS15_A) -> Self {
965        variant as u8 != 0
966    }
967}
968impl WKUPIS15_R {
969    #[doc = "Get enumerated values variant"]
970    #[inline(always)]
971    pub fn variant(&self) -> WKUPIS15_A {
972        match self.bits {
973            false => WKUPIS15_A::DIS,
974            true => WKUPIS15_A::EN,
975        }
976    }
977    #[doc = "Checks if the value of the field is `DIS`"]
978    #[inline(always)]
979    pub fn is_dis(&self) -> bool {
980        *self == WKUPIS15_A::DIS
981    }
982    #[doc = "Checks if the value of the field is `EN`"]
983    #[inline(always)]
984    pub fn is_en(&self) -> bool {
985        *self == WKUPIS15_A::EN
986    }
987}
988impl R {
989    #[doc = "Bit 0 - FWUP Wake-up Status"]
990    #[inline(always)]
991    pub fn fwups(&self) -> FWUPS_R {
992        FWUPS_R::new((self.bits & 1) != 0)
993    }
994    #[doc = "Bit 1 - WKUP Wake-up Status"]
995    #[inline(always)]
996    pub fn wkups(&self) -> WKUPS_R {
997        WKUPS_R::new(((self.bits >> 1) & 1) != 0)
998    }
999    #[doc = "Bit 2 - Supply Monitor Detection Wake-up Status"]
1000    #[inline(always)]
1001    pub fn smws(&self) -> SMWS_R {
1002        SMWS_R::new(((self.bits >> 2) & 1) != 0)
1003    }
1004    #[doc = "Bit 3 - Brownout Detector Reset Status"]
1005    #[inline(always)]
1006    pub fn bodrsts(&self) -> BODRSTS_R {
1007        BODRSTS_R::new(((self.bits >> 3) & 1) != 0)
1008    }
1009    #[doc = "Bit 4 - Supply Monitor Reset Status"]
1010    #[inline(always)]
1011    pub fn smrsts(&self) -> SMRSTS_R {
1012        SMRSTS_R::new(((self.bits >> 4) & 1) != 0)
1013    }
1014    #[doc = "Bit 5 - Supply Monitor Status"]
1015    #[inline(always)]
1016    pub fn sms(&self) -> SMS_R {
1017        SMS_R::new(((self.bits >> 5) & 1) != 0)
1018    }
1019    #[doc = "Bit 6 - Supply Monitor Output Status"]
1020    #[inline(always)]
1021    pub fn smos(&self) -> SMOS_R {
1022        SMOS_R::new(((self.bits >> 6) & 1) != 0)
1023    }
1024    #[doc = "Bit 7 - 32-kHz Oscillator Selection Status"]
1025    #[inline(always)]
1026    pub fn oscsel(&self) -> OSCSEL_R {
1027        OSCSEL_R::new(((self.bits >> 7) & 1) != 0)
1028    }
1029    #[doc = "Bit 12 - FWUP Input Status"]
1030    #[inline(always)]
1031    pub fn fwupis(&self) -> FWUPIS_R {
1032        FWUPIS_R::new(((self.bits >> 12) & 1) != 0)
1033    }
1034    #[doc = "Bit 13 - Low-power Debouncer Wake-up Status on WKUP0"]
1035    #[inline(always)]
1036    pub fn lpdbcs0(&self) -> LPDBCS0_R {
1037        LPDBCS0_R::new(((self.bits >> 13) & 1) != 0)
1038    }
1039    #[doc = "Bit 14 - Low-power Debouncer Wake-up Status on WKUP1"]
1040    #[inline(always)]
1041    pub fn lpdbcs1(&self) -> LPDBCS1_R {
1042        LPDBCS1_R::new(((self.bits >> 14) & 1) != 0)
1043    }
1044    #[doc = "Bit 16 - WKUP Input Status 0"]
1045    #[inline(always)]
1046    pub fn wkupis0(&self) -> WKUPIS0_R {
1047        WKUPIS0_R::new(((self.bits >> 16) & 1) != 0)
1048    }
1049    #[doc = "Bit 17 - WKUP Input Status 1"]
1050    #[inline(always)]
1051    pub fn wkupis1(&self) -> WKUPIS1_R {
1052        WKUPIS1_R::new(((self.bits >> 17) & 1) != 0)
1053    }
1054    #[doc = "Bit 18 - WKUP Input Status 2"]
1055    #[inline(always)]
1056    pub fn wkupis2(&self) -> WKUPIS2_R {
1057        WKUPIS2_R::new(((self.bits >> 18) & 1) != 0)
1058    }
1059    #[doc = "Bit 19 - WKUP Input Status 3"]
1060    #[inline(always)]
1061    pub fn wkupis3(&self) -> WKUPIS3_R {
1062        WKUPIS3_R::new(((self.bits >> 19) & 1) != 0)
1063    }
1064    #[doc = "Bit 20 - WKUP Input Status 4"]
1065    #[inline(always)]
1066    pub fn wkupis4(&self) -> WKUPIS4_R {
1067        WKUPIS4_R::new(((self.bits >> 20) & 1) != 0)
1068    }
1069    #[doc = "Bit 21 - WKUP Input Status 5"]
1070    #[inline(always)]
1071    pub fn wkupis5(&self) -> WKUPIS5_R {
1072        WKUPIS5_R::new(((self.bits >> 21) & 1) != 0)
1073    }
1074    #[doc = "Bit 22 - WKUP Input Status 6"]
1075    #[inline(always)]
1076    pub fn wkupis6(&self) -> WKUPIS6_R {
1077        WKUPIS6_R::new(((self.bits >> 22) & 1) != 0)
1078    }
1079    #[doc = "Bit 23 - WKUP Input Status 7"]
1080    #[inline(always)]
1081    pub fn wkupis7(&self) -> WKUPIS7_R {
1082        WKUPIS7_R::new(((self.bits >> 23) & 1) != 0)
1083    }
1084    #[doc = "Bit 24 - WKUP Input Status 8"]
1085    #[inline(always)]
1086    pub fn wkupis8(&self) -> WKUPIS8_R {
1087        WKUPIS8_R::new(((self.bits >> 24) & 1) != 0)
1088    }
1089    #[doc = "Bit 25 - WKUP Input Status 9"]
1090    #[inline(always)]
1091    pub fn wkupis9(&self) -> WKUPIS9_R {
1092        WKUPIS9_R::new(((self.bits >> 25) & 1) != 0)
1093    }
1094    #[doc = "Bit 26 - WKUP Input Status 10"]
1095    #[inline(always)]
1096    pub fn wkupis10(&self) -> WKUPIS10_R {
1097        WKUPIS10_R::new(((self.bits >> 26) & 1) != 0)
1098    }
1099    #[doc = "Bit 27 - WKUP Input Status 11"]
1100    #[inline(always)]
1101    pub fn wkupis11(&self) -> WKUPIS11_R {
1102        WKUPIS11_R::new(((self.bits >> 27) & 1) != 0)
1103    }
1104    #[doc = "Bit 28 - WKUP Input Status 12"]
1105    #[inline(always)]
1106    pub fn wkupis12(&self) -> WKUPIS12_R {
1107        WKUPIS12_R::new(((self.bits >> 28) & 1) != 0)
1108    }
1109    #[doc = "Bit 29 - WKUP Input Status 13"]
1110    #[inline(always)]
1111    pub fn wkupis13(&self) -> WKUPIS13_R {
1112        WKUPIS13_R::new(((self.bits >> 29) & 1) != 0)
1113    }
1114    #[doc = "Bit 30 - WKUP Input Status 14"]
1115    #[inline(always)]
1116    pub fn wkupis14(&self) -> WKUPIS14_R {
1117        WKUPIS14_R::new(((self.bits >> 30) & 1) != 0)
1118    }
1119    #[doc = "Bit 31 - WKUP Input Status 15"]
1120    #[inline(always)]
1121    pub fn wkupis15(&self) -> WKUPIS15_R {
1122        WKUPIS15_R::new(((self.bits >> 31) & 1) != 0)
1123    }
1124}
1125#[doc = "Supply Controller Status Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [sr](index.html) module"]
1126pub struct SR_SPEC;
1127impl crate::RegisterSpec for SR_SPEC {
1128    type Ux = u32;
1129}
1130#[doc = "`read()` method returns [sr::R](R) reader structure"]
1131impl crate::Readable for SR_SPEC {
1132    type Reader = R;
1133}
1134#[doc = "`reset()` method sets SR to value 0"]
1135impl crate::Resettable for SR_SPEC {
1136    const RESET_VALUE: Self::Ux = 0;
1137}