nrf52840_pac/power/
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 `DOG` reader - Reset from watchdog detected"]
88pub type DOG_R = crate::BitReader<DOG_A>;
89#[doc = "Reset from watchdog detected\n\nValue on reset: 0"]
90#[derive(Clone, Copy, Debug, PartialEq)]
91pub enum DOG_A {
92    #[doc = "0: Not detected"]
93    NOT_DETECTED = 0,
94    #[doc = "1: Detected"]
95    DETECTED = 1,
96}
97impl From<DOG_A> for bool {
98    #[inline(always)]
99    fn from(variant: DOG_A) -> Self {
100        variant as u8 != 0
101    }
102}
103impl DOG_R {
104    #[doc = "Get enumerated values variant"]
105    #[inline(always)]
106    pub fn variant(&self) -> DOG_A {
107        match self.bits {
108            false => DOG_A::NOT_DETECTED,
109            true => DOG_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 == DOG_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 == DOG_A::DETECTED
121    }
122}
123#[doc = "Field `DOG` writer - Reset from watchdog detected"]
124pub type DOG_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, DOG_A, O>;
125impl<'a, const O: u8> DOG_W<'a, O> {
126    #[doc = "Not detected"]
127    #[inline(always)]
128    pub fn not_detected(self) -> &'a mut W {
129        self.variant(DOG_A::NOT_DETECTED)
130    }
131    #[doc = "Detected"]
132    #[inline(always)]
133    pub fn detected(self) -> &'a mut W {
134        self.variant(DOG_A::DETECTED)
135    }
136}
137#[doc = "Field `SREQ` reader - Reset from soft reset detected"]
138pub type SREQ_R = crate::BitReader<SREQ_A>;
139#[doc = "Reset from soft reset detected\n\nValue on reset: 0"]
140#[derive(Clone, Copy, Debug, PartialEq)]
141pub enum SREQ_A {
142    #[doc = "0: Not detected"]
143    NOT_DETECTED = 0,
144    #[doc = "1: Detected"]
145    DETECTED = 1,
146}
147impl From<SREQ_A> for bool {
148    #[inline(always)]
149    fn from(variant: SREQ_A) -> Self {
150        variant as u8 != 0
151    }
152}
153impl SREQ_R {
154    #[doc = "Get enumerated values variant"]
155    #[inline(always)]
156    pub fn variant(&self) -> SREQ_A {
157        match self.bits {
158            false => SREQ_A::NOT_DETECTED,
159            true => SREQ_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 == SREQ_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 == SREQ_A::DETECTED
171    }
172}
173#[doc = "Field `SREQ` writer - Reset from soft reset detected"]
174pub type SREQ_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, SREQ_A, O>;
175impl<'a, const O: u8> SREQ_W<'a, O> {
176    #[doc = "Not detected"]
177    #[inline(always)]
178    pub fn not_detected(self) -> &'a mut W {
179        self.variant(SREQ_A::NOT_DETECTED)
180    }
181    #[doc = "Detected"]
182    #[inline(always)]
183    pub fn detected(self) -> &'a mut W {
184        self.variant(SREQ_A::DETECTED)
185    }
186}
187#[doc = "Field `LOCKUP` reader - Reset from CPU lock-up detected"]
188pub type LOCKUP_R = crate::BitReader<LOCKUP_A>;
189#[doc = "Reset from CPU lock-up detected\n\nValue on reset: 0"]
190#[derive(Clone, Copy, Debug, PartialEq)]
191pub enum LOCKUP_A {
192    #[doc = "0: Not detected"]
193    NOT_DETECTED = 0,
194    #[doc = "1: Detected"]
195    DETECTED = 1,
196}
197impl From<LOCKUP_A> for bool {
198    #[inline(always)]
199    fn from(variant: LOCKUP_A) -> Self {
200        variant as u8 != 0
201    }
202}
203impl LOCKUP_R {
204    #[doc = "Get enumerated values variant"]
205    #[inline(always)]
206    pub fn variant(&self) -> LOCKUP_A {
207        match self.bits {
208            false => LOCKUP_A::NOT_DETECTED,
209            true => LOCKUP_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 == LOCKUP_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 == LOCKUP_A::DETECTED
221    }
222}
223#[doc = "Field `LOCKUP` writer - Reset from CPU lock-up detected"]
224pub type LOCKUP_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, LOCKUP_A, O>;
225impl<'a, const O: u8> LOCKUP_W<'a, O> {
226    #[doc = "Not detected"]
227    #[inline(always)]
228    pub fn not_detected(self) -> &'a mut W {
229        self.variant(LOCKUP_A::NOT_DETECTED)
230    }
231    #[doc = "Detected"]
232    #[inline(always)]
233    pub fn detected(self) -> &'a mut W {
234        self.variant(LOCKUP_A::DETECTED)
235    }
236}
237#[doc = "Field `OFF` reader - Reset due to wake up from System OFF mode when wakeup is triggered from DETECT signal from GPIO"]
238pub type OFF_R = crate::BitReader<OFF_A>;
239#[doc = "Reset due to wake up from System OFF mode when wakeup is triggered from DETECT signal from GPIO\n\nValue on reset: 0"]
240#[derive(Clone, Copy, Debug, PartialEq)]
241pub enum OFF_A {
242    #[doc = "0: Not detected"]
243    NOT_DETECTED = 0,
244    #[doc = "1: Detected"]
245    DETECTED = 1,
246}
247impl From<OFF_A> for bool {
248    #[inline(always)]
249    fn from(variant: OFF_A) -> Self {
250        variant as u8 != 0
251    }
252}
253impl OFF_R {
254    #[doc = "Get enumerated values variant"]
255    #[inline(always)]
256    pub fn variant(&self) -> OFF_A {
257        match self.bits {
258            false => OFF_A::NOT_DETECTED,
259            true => OFF_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 == OFF_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 == OFF_A::DETECTED
271    }
272}
273#[doc = "Field `OFF` writer - Reset due to wake up from System OFF mode when wakeup is triggered from DETECT signal from GPIO"]
274pub type OFF_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, OFF_A, O>;
275impl<'a, const O: u8> OFF_W<'a, O> {
276    #[doc = "Not detected"]
277    #[inline(always)]
278    pub fn not_detected(self) -> &'a mut W {
279        self.variant(OFF_A::NOT_DETECTED)
280    }
281    #[doc = "Detected"]
282    #[inline(always)]
283    pub fn detected(self) -> &'a mut W {
284        self.variant(OFF_A::DETECTED)
285    }
286}
287#[doc = "Field `LPCOMP` reader - Reset due to wake up from System OFF mode when wakeup is triggered from ANADETECT signal from LPCOMP"]
288pub type LPCOMP_R = crate::BitReader<LPCOMP_A>;
289#[doc = "Reset due to wake up from System OFF mode when wakeup is triggered from ANADETECT signal from LPCOMP\n\nValue on reset: 0"]
290#[derive(Clone, Copy, Debug, PartialEq)]
291pub enum LPCOMP_A {
292    #[doc = "0: Not detected"]
293    NOT_DETECTED = 0,
294    #[doc = "1: Detected"]
295    DETECTED = 1,
296}
297impl From<LPCOMP_A> for bool {
298    #[inline(always)]
299    fn from(variant: LPCOMP_A) -> Self {
300        variant as u8 != 0
301    }
302}
303impl LPCOMP_R {
304    #[doc = "Get enumerated values variant"]
305    #[inline(always)]
306    pub fn variant(&self) -> LPCOMP_A {
307        match self.bits {
308            false => LPCOMP_A::NOT_DETECTED,
309            true => LPCOMP_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 == LPCOMP_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 == LPCOMP_A::DETECTED
321    }
322}
323#[doc = "Field `LPCOMP` writer - Reset due to wake up from System OFF mode when wakeup is triggered from ANADETECT signal from LPCOMP"]
324pub type LPCOMP_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, LPCOMP_A, O>;
325impl<'a, const O: u8> LPCOMP_W<'a, O> {
326    #[doc = "Not detected"]
327    #[inline(always)]
328    pub fn not_detected(self) -> &'a mut W {
329        self.variant(LPCOMP_A::NOT_DETECTED)
330    }
331    #[doc = "Detected"]
332    #[inline(always)]
333    pub fn detected(self) -> &'a mut W {
334        self.variant(LPCOMP_A::DETECTED)
335    }
336}
337#[doc = "Field `DIF` reader - Reset due to wake up from System OFF mode when wakeup is triggered from entering into debug interface mode"]
338pub type DIF_R = crate::BitReader<DIF_A>;
339#[doc = "Reset due to wake up from System OFF mode when wakeup is triggered from entering into debug interface mode\n\nValue on reset: 0"]
340#[derive(Clone, Copy, Debug, PartialEq)]
341pub enum DIF_A {
342    #[doc = "0: Not detected"]
343    NOT_DETECTED = 0,
344    #[doc = "1: Detected"]
345    DETECTED = 1,
346}
347impl From<DIF_A> for bool {
348    #[inline(always)]
349    fn from(variant: DIF_A) -> Self {
350        variant as u8 != 0
351    }
352}
353impl DIF_R {
354    #[doc = "Get enumerated values variant"]
355    #[inline(always)]
356    pub fn variant(&self) -> DIF_A {
357        match self.bits {
358            false => DIF_A::NOT_DETECTED,
359            true => DIF_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 == DIF_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 == DIF_A::DETECTED
371    }
372}
373#[doc = "Field `DIF` writer - Reset due to wake up from System OFF mode when wakeup is triggered from entering into debug interface mode"]
374pub type DIF_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, DIF_A, O>;
375impl<'a, const O: u8> DIF_W<'a, O> {
376    #[doc = "Not detected"]
377    #[inline(always)]
378    pub fn not_detected(self) -> &'a mut W {
379        self.variant(DIF_A::NOT_DETECTED)
380    }
381    #[doc = "Detected"]
382    #[inline(always)]
383    pub fn detected(self) -> &'a mut W {
384        self.variant(DIF_A::DETECTED)
385    }
386}
387#[doc = "Field `NFC` reader - Reset due to wake up from System OFF mode by NFC field detect"]
388pub type NFC_R = crate::BitReader<NFC_A>;
389#[doc = "Reset due to wake up from System OFF mode by NFC field detect\n\nValue on reset: 0"]
390#[derive(Clone, Copy, Debug, PartialEq)]
391pub enum NFC_A {
392    #[doc = "0: Not detected"]
393    NOT_DETECTED = 0,
394    #[doc = "1: Detected"]
395    DETECTED = 1,
396}
397impl From<NFC_A> for bool {
398    #[inline(always)]
399    fn from(variant: NFC_A) -> Self {
400        variant as u8 != 0
401    }
402}
403impl NFC_R {
404    #[doc = "Get enumerated values variant"]
405    #[inline(always)]
406    pub fn variant(&self) -> NFC_A {
407        match self.bits {
408            false => NFC_A::NOT_DETECTED,
409            true => NFC_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 == NFC_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 == NFC_A::DETECTED
421    }
422}
423#[doc = "Field `NFC` writer - Reset due to wake up from System OFF mode by NFC field detect"]
424pub type NFC_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, NFC_A, O>;
425impl<'a, const O: u8> NFC_W<'a, O> {
426    #[doc = "Not detected"]
427    #[inline(always)]
428    pub fn not_detected(self) -> &'a mut W {
429        self.variant(NFC_A::NOT_DETECTED)
430    }
431    #[doc = "Detected"]
432    #[inline(always)]
433    pub fn detected(self) -> &'a mut W {
434        self.variant(NFC_A::DETECTED)
435    }
436}
437#[doc = "Field `VBUS` reader - Reset due to wake up from System OFF mode by VBUS rising into valid range"]
438pub type VBUS_R = crate::BitReader<VBUS_A>;
439#[doc = "Reset due to wake up from System OFF mode by VBUS rising into valid range\n\nValue on reset: 0"]
440#[derive(Clone, Copy, Debug, PartialEq)]
441pub enum VBUS_A {
442    #[doc = "0: Not detected"]
443    NOT_DETECTED = 0,
444    #[doc = "1: Detected"]
445    DETECTED = 1,
446}
447impl From<VBUS_A> for bool {
448    #[inline(always)]
449    fn from(variant: VBUS_A) -> Self {
450        variant as u8 != 0
451    }
452}
453impl VBUS_R {
454    #[doc = "Get enumerated values variant"]
455    #[inline(always)]
456    pub fn variant(&self) -> VBUS_A {
457        match self.bits {
458            false => VBUS_A::NOT_DETECTED,
459            true => VBUS_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 == VBUS_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 == VBUS_A::DETECTED
471    }
472}
473#[doc = "Field `VBUS` writer - Reset due to wake up from System OFF mode by VBUS rising into valid range"]
474pub type VBUS_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, VBUS_A, O>;
475impl<'a, const O: u8> VBUS_W<'a, O> {
476    #[doc = "Not detected"]
477    #[inline(always)]
478    pub fn not_detected(self) -> &'a mut W {
479        self.variant(VBUS_A::NOT_DETECTED)
480    }
481    #[doc = "Detected"]
482    #[inline(always)]
483    pub fn detected(self) -> &'a mut W {
484        self.variant(VBUS_A::DETECTED)
485    }
486}
487impl R {
488    #[doc = "Bit 0 - Reset from pin-reset detected"]
489    #[inline(always)]
490    pub fn resetpin(&self) -> RESETPIN_R {
491        RESETPIN_R::new((self.bits & 1) != 0)
492    }
493    #[doc = "Bit 1 - Reset from watchdog detected"]
494    #[inline(always)]
495    pub fn dog(&self) -> DOG_R {
496        DOG_R::new(((self.bits >> 1) & 1) != 0)
497    }
498    #[doc = "Bit 2 - Reset from soft reset detected"]
499    #[inline(always)]
500    pub fn sreq(&self) -> SREQ_R {
501        SREQ_R::new(((self.bits >> 2) & 1) != 0)
502    }
503    #[doc = "Bit 3 - Reset from CPU lock-up detected"]
504    #[inline(always)]
505    pub fn lockup(&self) -> LOCKUP_R {
506        LOCKUP_R::new(((self.bits >> 3) & 1) != 0)
507    }
508    #[doc = "Bit 16 - Reset due to wake up from System OFF mode when wakeup is triggered from DETECT signal from GPIO"]
509    #[inline(always)]
510    pub fn off(&self) -> OFF_R {
511        OFF_R::new(((self.bits >> 16) & 1) != 0)
512    }
513    #[doc = "Bit 17 - Reset due to wake up from System OFF mode when wakeup is triggered from ANADETECT signal from LPCOMP"]
514    #[inline(always)]
515    pub fn lpcomp(&self) -> LPCOMP_R {
516        LPCOMP_R::new(((self.bits >> 17) & 1) != 0)
517    }
518    #[doc = "Bit 18 - Reset due to wake up from System OFF mode when wakeup is triggered from entering into debug interface mode"]
519    #[inline(always)]
520    pub fn dif(&self) -> DIF_R {
521        DIF_R::new(((self.bits >> 18) & 1) != 0)
522    }
523    #[doc = "Bit 19 - Reset due to wake up from System OFF mode by NFC field detect"]
524    #[inline(always)]
525    pub fn nfc(&self) -> NFC_R {
526        NFC_R::new(((self.bits >> 19) & 1) != 0)
527    }
528    #[doc = "Bit 20 - Reset due to wake up from System OFF mode by VBUS rising into valid range"]
529    #[inline(always)]
530    pub fn vbus(&self) -> VBUS_R {
531        VBUS_R::new(((self.bits >> 20) & 1) != 0)
532    }
533}
534impl W {
535    #[doc = "Bit 0 - Reset from pin-reset detected"]
536    #[inline(always)]
537    pub fn resetpin(&mut self) -> RESETPIN_W<0> {
538        RESETPIN_W::new(self)
539    }
540    #[doc = "Bit 1 - Reset from watchdog detected"]
541    #[inline(always)]
542    pub fn dog(&mut self) -> DOG_W<1> {
543        DOG_W::new(self)
544    }
545    #[doc = "Bit 2 - Reset from soft reset detected"]
546    #[inline(always)]
547    pub fn sreq(&mut self) -> SREQ_W<2> {
548        SREQ_W::new(self)
549    }
550    #[doc = "Bit 3 - Reset from CPU lock-up detected"]
551    #[inline(always)]
552    pub fn lockup(&mut self) -> LOCKUP_W<3> {
553        LOCKUP_W::new(self)
554    }
555    #[doc = "Bit 16 - Reset due to wake up from System OFF mode when wakeup is triggered from DETECT signal from GPIO"]
556    #[inline(always)]
557    pub fn off(&mut self) -> OFF_W<16> {
558        OFF_W::new(self)
559    }
560    #[doc = "Bit 17 - Reset due to wake up from System OFF mode when wakeup is triggered from ANADETECT signal from LPCOMP"]
561    #[inline(always)]
562    pub fn lpcomp(&mut self) -> LPCOMP_W<17> {
563        LPCOMP_W::new(self)
564    }
565    #[doc = "Bit 18 - Reset due to wake up from System OFF mode when wakeup is triggered from entering into debug interface mode"]
566    #[inline(always)]
567    pub fn dif(&mut self) -> DIF_W<18> {
568        DIF_W::new(self)
569    }
570    #[doc = "Bit 19 - Reset due to wake up from System OFF mode by NFC field detect"]
571    #[inline(always)]
572    pub fn nfc(&mut self) -> NFC_W<19> {
573        NFC_W::new(self)
574    }
575    #[doc = "Bit 20 - Reset due to wake up from System OFF mode by VBUS rising into valid range"]
576    #[inline(always)]
577    pub fn vbus(&mut self) -> VBUS_W<20> {
578        VBUS_W::new(self)
579    }
580    #[doc = "Writes raw bits to the register."]
581    #[inline(always)]
582    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
583        self.0.bits(bits);
584        self
585    }
586}
587#[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"]
588pub struct RESETREAS_SPEC;
589impl crate::RegisterSpec for RESETREAS_SPEC {
590    type Ux = u32;
591}
592#[doc = "`read()` method returns [resetreas::R](R) reader structure"]
593impl crate::Readable for RESETREAS_SPEC {
594    type Reader = R;
595}
596#[doc = "`write(|w| ..)` method takes [resetreas::W](W) writer structure"]
597impl crate::Writable for RESETREAS_SPEC {
598    type Writer = W;
599}
600#[doc = "`reset()` method sets RESETREAS to value 0"]
601impl crate::Resettable for RESETREAS_SPEC {
602    #[inline(always)]
603    fn reset_value() -> Self::Ux {
604        0
605    }
606}