nrf5340_app_pac/reset_ns/
resetreas.rs

1#[doc = "Register `RESETREAS` reader"]
2pub struct R(crate::R<RESETREAS_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<RESETREAS_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<RESETREAS_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<RESETREAS_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `RESETREAS` writer"]
17pub struct W(crate::W<RESETREAS_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<RESETREAS_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<RESETREAS_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<RESETREAS_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `RESETPIN` reader - Reset from pin reset detected"]
38pub type RESETPIN_R = crate::BitReader<RESETPIN_A>;
39#[doc = "Reset from pin reset detected\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq)]
41pub enum RESETPIN_A {
42    #[doc = "0: Not detected"]
43    NOT_DETECTED = 0,
44    #[doc = "1: Detected"]
45    DETECTED = 1,
46}
47impl From<RESETPIN_A> for bool {
48    #[inline(always)]
49    fn from(variant: RESETPIN_A) -> Self {
50        variant as u8 != 0
51    }
52}
53impl RESETPIN_R {
54    #[doc = "Get enumerated values variant"]
55    #[inline(always)]
56    pub fn variant(&self) -> RESETPIN_A {
57        match self.bits {
58            false => RESETPIN_A::NOT_DETECTED,
59            true => RESETPIN_A::DETECTED,
60        }
61    }
62    #[doc = "Checks if the value of the field is `NOT_DETECTED`"]
63    #[inline(always)]
64    pub fn is_not_detected(&self) -> bool {
65        *self == RESETPIN_A::NOT_DETECTED
66    }
67    #[doc = "Checks if the value of the field is `DETECTED`"]
68    #[inline(always)]
69    pub fn is_detected(&self) -> bool {
70        *self == RESETPIN_A::DETECTED
71    }
72}
73#[doc = "Field `RESETPIN` writer - Reset from pin reset detected"]
74pub type RESETPIN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, RESETPIN_A, O>;
75impl<'a, const O: u8> RESETPIN_W<'a, O> {
76    #[doc = "Not detected"]
77    #[inline(always)]
78    pub fn not_detected(self) -> &'a mut W {
79        self.variant(RESETPIN_A::NOT_DETECTED)
80    }
81    #[doc = "Detected"]
82    #[inline(always)]
83    pub fn detected(self) -> &'a mut W {
84        self.variant(RESETPIN_A::DETECTED)
85    }
86}
87#[doc = "Field `DOG0` reader - Reset from application watchdog timer 0 detected"]
88pub type DOG0_R = crate::BitReader<DOG0_A>;
89#[doc = "Reset from application watchdog timer 0 detected\n\nValue on reset: 0"]
90#[derive(Clone, Copy, Debug, PartialEq)]
91pub enum DOG0_A {
92    #[doc = "0: Not detected"]
93    NOT_DETECTED = 0,
94    #[doc = "1: Detected"]
95    DETECTED = 1,
96}
97impl From<DOG0_A> for bool {
98    #[inline(always)]
99    fn from(variant: DOG0_A) -> Self {
100        variant as u8 != 0
101    }
102}
103impl DOG0_R {
104    #[doc = "Get enumerated values variant"]
105    #[inline(always)]
106    pub fn variant(&self) -> DOG0_A {
107        match self.bits {
108            false => DOG0_A::NOT_DETECTED,
109            true => DOG0_A::DETECTED,
110        }
111    }
112    #[doc = "Checks if the value of the field is `NOT_DETECTED`"]
113    #[inline(always)]
114    pub fn is_not_detected(&self) -> bool {
115        *self == DOG0_A::NOT_DETECTED
116    }
117    #[doc = "Checks if the value of the field is `DETECTED`"]
118    #[inline(always)]
119    pub fn is_detected(&self) -> bool {
120        *self == DOG0_A::DETECTED
121    }
122}
123#[doc = "Field `DOG0` writer - Reset from application watchdog timer 0 detected"]
124pub type DOG0_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, DOG0_A, O>;
125impl<'a, const O: u8> DOG0_W<'a, O> {
126    #[doc = "Not detected"]
127    #[inline(always)]
128    pub fn not_detected(self) -> &'a mut W {
129        self.variant(DOG0_A::NOT_DETECTED)
130    }
131    #[doc = "Detected"]
132    #[inline(always)]
133    pub fn detected(self) -> &'a mut W {
134        self.variant(DOG0_A::DETECTED)
135    }
136}
137#[doc = "Field `CTRLAP` reader - Reset from application CTRL-AP detected"]
138pub type CTRLAP_R = crate::BitReader<CTRLAP_A>;
139#[doc = "Reset from application CTRL-AP detected\n\nValue on reset: 0"]
140#[derive(Clone, Copy, Debug, PartialEq)]
141pub enum CTRLAP_A {
142    #[doc = "0: Not detected"]
143    NOT_DETECTED = 0,
144    #[doc = "1: Detected"]
145    DETECTED = 1,
146}
147impl From<CTRLAP_A> for bool {
148    #[inline(always)]
149    fn from(variant: CTRLAP_A) -> Self {
150        variant as u8 != 0
151    }
152}
153impl CTRLAP_R {
154    #[doc = "Get enumerated values variant"]
155    #[inline(always)]
156    pub fn variant(&self) -> CTRLAP_A {
157        match self.bits {
158            false => CTRLAP_A::NOT_DETECTED,
159            true => CTRLAP_A::DETECTED,
160        }
161    }
162    #[doc = "Checks if the value of the field is `NOT_DETECTED`"]
163    #[inline(always)]
164    pub fn is_not_detected(&self) -> bool {
165        *self == CTRLAP_A::NOT_DETECTED
166    }
167    #[doc = "Checks if the value of the field is `DETECTED`"]
168    #[inline(always)]
169    pub fn is_detected(&self) -> bool {
170        *self == CTRLAP_A::DETECTED
171    }
172}
173#[doc = "Field `CTRLAP` writer - Reset from application CTRL-AP detected"]
174pub type CTRLAP_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, CTRLAP_A, O>;
175impl<'a, const O: u8> CTRLAP_W<'a, O> {
176    #[doc = "Not detected"]
177    #[inline(always)]
178    pub fn not_detected(self) -> &'a mut W {
179        self.variant(CTRLAP_A::NOT_DETECTED)
180    }
181    #[doc = "Detected"]
182    #[inline(always)]
183    pub fn detected(self) -> &'a mut W {
184        self.variant(CTRLAP_A::DETECTED)
185    }
186}
187#[doc = "Field `SREQ` reader - Reset from application soft reset detected"]
188pub type SREQ_R = crate::BitReader<SREQ_A>;
189#[doc = "Reset from application soft reset detected\n\nValue on reset: 0"]
190#[derive(Clone, Copy, Debug, PartialEq)]
191pub enum SREQ_A {
192    #[doc = "0: Not detected"]
193    NOT_DETECTED = 0,
194    #[doc = "1: Detected"]
195    DETECTED = 1,
196}
197impl From<SREQ_A> for bool {
198    #[inline(always)]
199    fn from(variant: SREQ_A) -> Self {
200        variant as u8 != 0
201    }
202}
203impl SREQ_R {
204    #[doc = "Get enumerated values variant"]
205    #[inline(always)]
206    pub fn variant(&self) -> SREQ_A {
207        match self.bits {
208            false => SREQ_A::NOT_DETECTED,
209            true => SREQ_A::DETECTED,
210        }
211    }
212    #[doc = "Checks if the value of the field is `NOT_DETECTED`"]
213    #[inline(always)]
214    pub fn is_not_detected(&self) -> bool {
215        *self == SREQ_A::NOT_DETECTED
216    }
217    #[doc = "Checks if the value of the field is `DETECTED`"]
218    #[inline(always)]
219    pub fn is_detected(&self) -> bool {
220        *self == SREQ_A::DETECTED
221    }
222}
223#[doc = "Field `SREQ` writer - Reset from application soft reset detected"]
224pub type SREQ_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, SREQ_A, O>;
225impl<'a, const O: u8> SREQ_W<'a, O> {
226    #[doc = "Not detected"]
227    #[inline(always)]
228    pub fn not_detected(self) -> &'a mut W {
229        self.variant(SREQ_A::NOT_DETECTED)
230    }
231    #[doc = "Detected"]
232    #[inline(always)]
233    pub fn detected(self) -> &'a mut W {
234        self.variant(SREQ_A::DETECTED)
235    }
236}
237#[doc = "Field `LOCKUP` reader - Reset from application CPU lockup detected"]
238pub type LOCKUP_R = crate::BitReader<LOCKUP_A>;
239#[doc = "Reset from application CPU lockup detected\n\nValue on reset: 0"]
240#[derive(Clone, Copy, Debug, PartialEq)]
241pub enum LOCKUP_A {
242    #[doc = "0: Not detected"]
243    NOT_DETECTED = 0,
244    #[doc = "1: Detected"]
245    DETECTED = 1,
246}
247impl From<LOCKUP_A> for bool {
248    #[inline(always)]
249    fn from(variant: LOCKUP_A) -> Self {
250        variant as u8 != 0
251    }
252}
253impl LOCKUP_R {
254    #[doc = "Get enumerated values variant"]
255    #[inline(always)]
256    pub fn variant(&self) -> LOCKUP_A {
257        match self.bits {
258            false => LOCKUP_A::NOT_DETECTED,
259            true => LOCKUP_A::DETECTED,
260        }
261    }
262    #[doc = "Checks if the value of the field is `NOT_DETECTED`"]
263    #[inline(always)]
264    pub fn is_not_detected(&self) -> bool {
265        *self == LOCKUP_A::NOT_DETECTED
266    }
267    #[doc = "Checks if the value of the field is `DETECTED`"]
268    #[inline(always)]
269    pub fn is_detected(&self) -> bool {
270        *self == LOCKUP_A::DETECTED
271    }
272}
273#[doc = "Field `LOCKUP` writer - Reset from application CPU lockup detected"]
274pub type LOCKUP_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, LOCKUP_A, O>;
275impl<'a, const O: u8> LOCKUP_W<'a, O> {
276    #[doc = "Not detected"]
277    #[inline(always)]
278    pub fn not_detected(self) -> &'a mut W {
279        self.variant(LOCKUP_A::NOT_DETECTED)
280    }
281    #[doc = "Detected"]
282    #[inline(always)]
283    pub fn detected(self) -> &'a mut W {
284        self.variant(LOCKUP_A::DETECTED)
285    }
286}
287#[doc = "Field `OFF` reader - Reset due to wakeup from System OFF mode when wakeup is triggered by DETECT signal from GPIO"]
288pub type OFF_R = crate::BitReader<OFF_A>;
289#[doc = "Reset due to wakeup from System OFF mode when wakeup is triggered by DETECT signal from GPIO\n\nValue on reset: 0"]
290#[derive(Clone, Copy, Debug, PartialEq)]
291pub enum OFF_A {
292    #[doc = "0: Not detected"]
293    NOT_DETECTED = 0,
294    #[doc = "1: Detected"]
295    DETECTED = 1,
296}
297impl From<OFF_A> for bool {
298    #[inline(always)]
299    fn from(variant: OFF_A) -> Self {
300        variant as u8 != 0
301    }
302}
303impl OFF_R {
304    #[doc = "Get enumerated values variant"]
305    #[inline(always)]
306    pub fn variant(&self) -> OFF_A {
307        match self.bits {
308            false => OFF_A::NOT_DETECTED,
309            true => OFF_A::DETECTED,
310        }
311    }
312    #[doc = "Checks if the value of the field is `NOT_DETECTED`"]
313    #[inline(always)]
314    pub fn is_not_detected(&self) -> bool {
315        *self == OFF_A::NOT_DETECTED
316    }
317    #[doc = "Checks if the value of the field is `DETECTED`"]
318    #[inline(always)]
319    pub fn is_detected(&self) -> bool {
320        *self == OFF_A::DETECTED
321    }
322}
323#[doc = "Field `OFF` writer - Reset due to wakeup from System OFF mode when wakeup is triggered by DETECT signal from GPIO"]
324pub type OFF_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, OFF_A, O>;
325impl<'a, const O: u8> OFF_W<'a, O> {
326    #[doc = "Not detected"]
327    #[inline(always)]
328    pub fn not_detected(self) -> &'a mut W {
329        self.variant(OFF_A::NOT_DETECTED)
330    }
331    #[doc = "Detected"]
332    #[inline(always)]
333    pub fn detected(self) -> &'a mut W {
334        self.variant(OFF_A::DETECTED)
335    }
336}
337#[doc = "Field `LPCOMP` reader - Reset due to wakeup from System OFF mode when wakeup is triggered by ANADETECT signal from LPCOMP"]
338pub type LPCOMP_R = crate::BitReader<LPCOMP_A>;
339#[doc = "Reset due to wakeup from System OFF mode when wakeup is triggered by ANADETECT signal from LPCOMP\n\nValue on reset: 0"]
340#[derive(Clone, Copy, Debug, PartialEq)]
341pub enum LPCOMP_A {
342    #[doc = "0: Not detected"]
343    NOT_DETECTED = 0,
344    #[doc = "1: Detected"]
345    DETECTED = 1,
346}
347impl From<LPCOMP_A> for bool {
348    #[inline(always)]
349    fn from(variant: LPCOMP_A) -> Self {
350        variant as u8 != 0
351    }
352}
353impl LPCOMP_R {
354    #[doc = "Get enumerated values variant"]
355    #[inline(always)]
356    pub fn variant(&self) -> LPCOMP_A {
357        match self.bits {
358            false => LPCOMP_A::NOT_DETECTED,
359            true => LPCOMP_A::DETECTED,
360        }
361    }
362    #[doc = "Checks if the value of the field is `NOT_DETECTED`"]
363    #[inline(always)]
364    pub fn is_not_detected(&self) -> bool {
365        *self == LPCOMP_A::NOT_DETECTED
366    }
367    #[doc = "Checks if the value of the field is `DETECTED`"]
368    #[inline(always)]
369    pub fn is_detected(&self) -> bool {
370        *self == LPCOMP_A::DETECTED
371    }
372}
373#[doc = "Field `LPCOMP` writer - Reset due to wakeup from System OFF mode when wakeup is triggered by ANADETECT signal from LPCOMP"]
374pub type LPCOMP_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, LPCOMP_A, O>;
375impl<'a, const O: u8> LPCOMP_W<'a, O> {
376    #[doc = "Not detected"]
377    #[inline(always)]
378    pub fn not_detected(self) -> &'a mut W {
379        self.variant(LPCOMP_A::NOT_DETECTED)
380    }
381    #[doc = "Detected"]
382    #[inline(always)]
383    pub fn detected(self) -> &'a mut W {
384        self.variant(LPCOMP_A::DETECTED)
385    }
386}
387#[doc = "Field `DIF` reader - Reset due to wakeup from System OFF mode when wakeup is triggered by entering the Debug Interface mode"]
388pub type DIF_R = crate::BitReader<DIF_A>;
389#[doc = "Reset due to wakeup from System OFF mode when wakeup is triggered by entering the Debug Interface mode\n\nValue on reset: 0"]
390#[derive(Clone, Copy, Debug, PartialEq)]
391pub enum DIF_A {
392    #[doc = "0: Not detected"]
393    NOT_DETECTED = 0,
394    #[doc = "1: Detected"]
395    DETECTED = 1,
396}
397impl From<DIF_A> for bool {
398    #[inline(always)]
399    fn from(variant: DIF_A) -> Self {
400        variant as u8 != 0
401    }
402}
403impl DIF_R {
404    #[doc = "Get enumerated values variant"]
405    #[inline(always)]
406    pub fn variant(&self) -> DIF_A {
407        match self.bits {
408            false => DIF_A::NOT_DETECTED,
409            true => DIF_A::DETECTED,
410        }
411    }
412    #[doc = "Checks if the value of the field is `NOT_DETECTED`"]
413    #[inline(always)]
414    pub fn is_not_detected(&self) -> bool {
415        *self == DIF_A::NOT_DETECTED
416    }
417    #[doc = "Checks if the value of the field is `DETECTED`"]
418    #[inline(always)]
419    pub fn is_detected(&self) -> bool {
420        *self == DIF_A::DETECTED
421    }
422}
423#[doc = "Field `DIF` writer - Reset due to wakeup from System OFF mode when wakeup is triggered by entering the Debug Interface mode"]
424pub type DIF_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, DIF_A, O>;
425impl<'a, const O: u8> DIF_W<'a, O> {
426    #[doc = "Not detected"]
427    #[inline(always)]
428    pub fn not_detected(self) -> &'a mut W {
429        self.variant(DIF_A::NOT_DETECTED)
430    }
431    #[doc = "Detected"]
432    #[inline(always)]
433    pub fn detected(self) -> &'a mut W {
434        self.variant(DIF_A::DETECTED)
435    }
436}
437#[doc = "Field `NFC` reader - Reset after wakeup from System OFF mode due to NFC field being detected"]
438pub type NFC_R = crate::BitReader<NFC_A>;
439#[doc = "Reset after wakeup from System OFF mode due to NFC field being detected\n\nValue on reset: 0"]
440#[derive(Clone, Copy, Debug, PartialEq)]
441pub enum NFC_A {
442    #[doc = "0: Not detected"]
443    NOT_DETECTED = 0,
444    #[doc = "1: Detected"]
445    DETECTED = 1,
446}
447impl From<NFC_A> for bool {
448    #[inline(always)]
449    fn from(variant: NFC_A) -> Self {
450        variant as u8 != 0
451    }
452}
453impl NFC_R {
454    #[doc = "Get enumerated values variant"]
455    #[inline(always)]
456    pub fn variant(&self) -> NFC_A {
457        match self.bits {
458            false => NFC_A::NOT_DETECTED,
459            true => NFC_A::DETECTED,
460        }
461    }
462    #[doc = "Checks if the value of the field is `NOT_DETECTED`"]
463    #[inline(always)]
464    pub fn is_not_detected(&self) -> bool {
465        *self == NFC_A::NOT_DETECTED
466    }
467    #[doc = "Checks if the value of the field is `DETECTED`"]
468    #[inline(always)]
469    pub fn is_detected(&self) -> bool {
470        *self == NFC_A::DETECTED
471    }
472}
473#[doc = "Field `NFC` writer - Reset after wakeup from System OFF mode due to NFC field being detected"]
474pub type NFC_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, NFC_A, O>;
475impl<'a, const O: u8> NFC_W<'a, O> {
476    #[doc = "Not detected"]
477    #[inline(always)]
478    pub fn not_detected(self) -> &'a mut W {
479        self.variant(NFC_A::NOT_DETECTED)
480    }
481    #[doc = "Detected"]
482    #[inline(always)]
483    pub fn detected(self) -> &'a mut W {
484        self.variant(NFC_A::DETECTED)
485    }
486}
487#[doc = "Field `DOG1` reader - Reset from application watchdog timer 1 detected"]
488pub type DOG1_R = crate::BitReader<DOG1_A>;
489#[doc = "Reset from application watchdog timer 1 detected\n\nValue on reset: 0"]
490#[derive(Clone, Copy, Debug, PartialEq)]
491pub enum DOG1_A {
492    #[doc = "0: Not detected"]
493    NOT_DETECTED = 0,
494    #[doc = "1: Detected"]
495    DETECTED = 1,
496}
497impl From<DOG1_A> for bool {
498    #[inline(always)]
499    fn from(variant: DOG1_A) -> Self {
500        variant as u8 != 0
501    }
502}
503impl DOG1_R {
504    #[doc = "Get enumerated values variant"]
505    #[inline(always)]
506    pub fn variant(&self) -> DOG1_A {
507        match self.bits {
508            false => DOG1_A::NOT_DETECTED,
509            true => DOG1_A::DETECTED,
510        }
511    }
512    #[doc = "Checks if the value of the field is `NOT_DETECTED`"]
513    #[inline(always)]
514    pub fn is_not_detected(&self) -> bool {
515        *self == DOG1_A::NOT_DETECTED
516    }
517    #[doc = "Checks if the value of the field is `DETECTED`"]
518    #[inline(always)]
519    pub fn is_detected(&self) -> bool {
520        *self == DOG1_A::DETECTED
521    }
522}
523#[doc = "Field `DOG1` writer - Reset from application watchdog timer 1 detected"]
524pub type DOG1_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, DOG1_A, O>;
525impl<'a, const O: u8> DOG1_W<'a, O> {
526    #[doc = "Not detected"]
527    #[inline(always)]
528    pub fn not_detected(self) -> &'a mut W {
529        self.variant(DOG1_A::NOT_DETECTED)
530    }
531    #[doc = "Detected"]
532    #[inline(always)]
533    pub fn detected(self) -> &'a mut W {
534        self.variant(DOG1_A::DETECTED)
535    }
536}
537#[doc = "Field `VBUS` reader - Reset after wakeup from System OFF mode due to VBUS rising into valid range"]
538pub type VBUS_R = crate::BitReader<VBUS_A>;
539#[doc = "Reset after wakeup from System OFF mode due to VBUS rising into valid range\n\nValue on reset: 0"]
540#[derive(Clone, Copy, Debug, PartialEq)]
541pub enum VBUS_A {
542    #[doc = "0: Not detected"]
543    NOT_DETECTED = 0,
544    #[doc = "1: Detected"]
545    DETECTED = 1,
546}
547impl From<VBUS_A> for bool {
548    #[inline(always)]
549    fn from(variant: VBUS_A) -> Self {
550        variant as u8 != 0
551    }
552}
553impl VBUS_R {
554    #[doc = "Get enumerated values variant"]
555    #[inline(always)]
556    pub fn variant(&self) -> VBUS_A {
557        match self.bits {
558            false => VBUS_A::NOT_DETECTED,
559            true => VBUS_A::DETECTED,
560        }
561    }
562    #[doc = "Checks if the value of the field is `NOT_DETECTED`"]
563    #[inline(always)]
564    pub fn is_not_detected(&self) -> bool {
565        *self == VBUS_A::NOT_DETECTED
566    }
567    #[doc = "Checks if the value of the field is `DETECTED`"]
568    #[inline(always)]
569    pub fn is_detected(&self) -> bool {
570        *self == VBUS_A::DETECTED
571    }
572}
573#[doc = "Field `VBUS` writer - Reset after wakeup from System OFF mode due to VBUS rising into valid range"]
574pub type VBUS_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, VBUS_A, O>;
575impl<'a, const O: u8> VBUS_W<'a, O> {
576    #[doc = "Not detected"]
577    #[inline(always)]
578    pub fn not_detected(self) -> &'a mut W {
579        self.variant(VBUS_A::NOT_DETECTED)
580    }
581    #[doc = "Detected"]
582    #[inline(always)]
583    pub fn detected(self) -> &'a mut W {
584        self.variant(VBUS_A::DETECTED)
585    }
586}
587impl R {
588    #[doc = "Bit 0 - Reset from pin reset detected"]
589    #[inline(always)]
590    pub fn resetpin(&self) -> RESETPIN_R {
591        RESETPIN_R::new((self.bits & 1) != 0)
592    }
593    #[doc = "Bit 1 - Reset from application watchdog timer 0 detected"]
594    #[inline(always)]
595    pub fn dog0(&self) -> DOG0_R {
596        DOG0_R::new(((self.bits >> 1) & 1) != 0)
597    }
598    #[doc = "Bit 2 - Reset from application CTRL-AP detected"]
599    #[inline(always)]
600    pub fn ctrlap(&self) -> CTRLAP_R {
601        CTRLAP_R::new(((self.bits >> 2) & 1) != 0)
602    }
603    #[doc = "Bit 3 - Reset from application soft reset detected"]
604    #[inline(always)]
605    pub fn sreq(&self) -> SREQ_R {
606        SREQ_R::new(((self.bits >> 3) & 1) != 0)
607    }
608    #[doc = "Bit 4 - Reset from application CPU lockup detected"]
609    #[inline(always)]
610    pub fn lockup(&self) -> LOCKUP_R {
611        LOCKUP_R::new(((self.bits >> 4) & 1) != 0)
612    }
613    #[doc = "Bit 5 - Reset due to wakeup from System OFF mode when wakeup is triggered by DETECT signal from GPIO"]
614    #[inline(always)]
615    pub fn off(&self) -> OFF_R {
616        OFF_R::new(((self.bits >> 5) & 1) != 0)
617    }
618    #[doc = "Bit 6 - Reset due to wakeup from System OFF mode when wakeup is triggered by ANADETECT signal from LPCOMP"]
619    #[inline(always)]
620    pub fn lpcomp(&self) -> LPCOMP_R {
621        LPCOMP_R::new(((self.bits >> 6) & 1) != 0)
622    }
623    #[doc = "Bit 7 - Reset due to wakeup from System OFF mode when wakeup is triggered by entering the Debug Interface mode"]
624    #[inline(always)]
625    pub fn dif(&self) -> DIF_R {
626        DIF_R::new(((self.bits >> 7) & 1) != 0)
627    }
628    #[doc = "Bit 24 - Reset after wakeup from System OFF mode due to NFC field being detected"]
629    #[inline(always)]
630    pub fn nfc(&self) -> NFC_R {
631        NFC_R::new(((self.bits >> 24) & 1) != 0)
632    }
633    #[doc = "Bit 25 - Reset from application watchdog timer 1 detected"]
634    #[inline(always)]
635    pub fn dog1(&self) -> DOG1_R {
636        DOG1_R::new(((self.bits >> 25) & 1) != 0)
637    }
638    #[doc = "Bit 26 - Reset after wakeup from System OFF mode due to VBUS rising into valid range"]
639    #[inline(always)]
640    pub fn vbus(&self) -> VBUS_R {
641        VBUS_R::new(((self.bits >> 26) & 1) != 0)
642    }
643}
644impl W {
645    #[doc = "Bit 0 - Reset from pin reset detected"]
646    #[inline(always)]
647    pub fn resetpin(&mut self) -> RESETPIN_W<0> {
648        RESETPIN_W::new(self)
649    }
650    #[doc = "Bit 1 - Reset from application watchdog timer 0 detected"]
651    #[inline(always)]
652    pub fn dog0(&mut self) -> DOG0_W<1> {
653        DOG0_W::new(self)
654    }
655    #[doc = "Bit 2 - Reset from application CTRL-AP detected"]
656    #[inline(always)]
657    pub fn ctrlap(&mut self) -> CTRLAP_W<2> {
658        CTRLAP_W::new(self)
659    }
660    #[doc = "Bit 3 - Reset from application soft reset detected"]
661    #[inline(always)]
662    pub fn sreq(&mut self) -> SREQ_W<3> {
663        SREQ_W::new(self)
664    }
665    #[doc = "Bit 4 - Reset from application CPU lockup detected"]
666    #[inline(always)]
667    pub fn lockup(&mut self) -> LOCKUP_W<4> {
668        LOCKUP_W::new(self)
669    }
670    #[doc = "Bit 5 - Reset due to wakeup from System OFF mode when wakeup is triggered by DETECT signal from GPIO"]
671    #[inline(always)]
672    pub fn off(&mut self) -> OFF_W<5> {
673        OFF_W::new(self)
674    }
675    #[doc = "Bit 6 - Reset due to wakeup from System OFF mode when wakeup is triggered by ANADETECT signal from LPCOMP"]
676    #[inline(always)]
677    pub fn lpcomp(&mut self) -> LPCOMP_W<6> {
678        LPCOMP_W::new(self)
679    }
680    #[doc = "Bit 7 - Reset due to wakeup from System OFF mode when wakeup is triggered by entering the Debug Interface mode"]
681    #[inline(always)]
682    pub fn dif(&mut self) -> DIF_W<7> {
683        DIF_W::new(self)
684    }
685    #[doc = "Bit 24 - Reset after wakeup from System OFF mode due to NFC field being detected"]
686    #[inline(always)]
687    pub fn nfc(&mut self) -> NFC_W<24> {
688        NFC_W::new(self)
689    }
690    #[doc = "Bit 25 - Reset from application watchdog timer 1 detected"]
691    #[inline(always)]
692    pub fn dog1(&mut self) -> DOG1_W<25> {
693        DOG1_W::new(self)
694    }
695    #[doc = "Bit 26 - Reset after wakeup from System OFF mode due to VBUS rising into valid range"]
696    #[inline(always)]
697    pub fn vbus(&mut self) -> VBUS_W<26> {
698        VBUS_W::new(self)
699    }
700    #[doc = "Writes raw bits to the register."]
701    #[inline(always)]
702    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
703        self.0.bits(bits);
704        self
705    }
706}
707#[doc = "Reset reason\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 [resetreas](index.html) module"]
708pub struct RESETREAS_SPEC;
709impl crate::RegisterSpec for RESETREAS_SPEC {
710    type Ux = u32;
711}
712#[doc = "`read()` method returns [resetreas::R](R) reader structure"]
713impl crate::Readable for RESETREAS_SPEC {
714    type Reader = R;
715}
716#[doc = "`write(|w| ..)` method takes [resetreas::W](W) writer structure"]
717impl crate::Writable for RESETREAS_SPEC {
718    type Writer = W;
719}
720#[doc = "`reset()` method sets RESETREAS to value 0"]
721impl crate::Resettable for RESETREAS_SPEC {
722    #[inline(always)]
723    fn reset_value() -> Self::Ux {
724        0
725    }
726}