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 `LSREQ` reader - Reset from network soft reset detected"]
438pub type LSREQ_R = crate::BitReader<LSREQ_A>;
439#[doc = "Reset from network soft reset detected\n\nValue on reset: 0"]
440#[derive(Clone, Copy, Debug, PartialEq)]
441pub enum LSREQ_A {
442 #[doc = "0: Not detected"]
443 NOT_DETECTED = 0,
444 #[doc = "1: Detected"]
445 DETECTED = 1,
446}
447impl From<LSREQ_A> for bool {
448 #[inline(always)]
449 fn from(variant: LSREQ_A) -> Self {
450 variant as u8 != 0
451 }
452}
453impl LSREQ_R {
454 #[doc = "Get enumerated values variant"]
455 #[inline(always)]
456 pub fn variant(&self) -> LSREQ_A {
457 match self.bits {
458 false => LSREQ_A::NOT_DETECTED,
459 true => LSREQ_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 == LSREQ_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 == LSREQ_A::DETECTED
471 }
472}
473#[doc = "Field `LSREQ` writer - Reset from network soft reset detected"]
474pub type LSREQ_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, LSREQ_A, O>;
475impl<'a, const O: u8> LSREQ_W<'a, O> {
476 #[doc = "Not detected"]
477 #[inline(always)]
478 pub fn not_detected(self) -> &'a mut W {
479 self.variant(LSREQ_A::NOT_DETECTED)
480 }
481 #[doc = "Detected"]
482 #[inline(always)]
483 pub fn detected(self) -> &'a mut W {
484 self.variant(LSREQ_A::DETECTED)
485 }
486}
487#[doc = "Field `LLOCKUP` reader - Reset from network CPU lockup detected"]
488pub type LLOCKUP_R = crate::BitReader<LLOCKUP_A>;
489#[doc = "Reset from network CPU lockup detected\n\nValue on reset: 0"]
490#[derive(Clone, Copy, Debug, PartialEq)]
491pub enum LLOCKUP_A {
492 #[doc = "0: Not detected"]
493 NOT_DETECTED = 0,
494 #[doc = "1: Detected"]
495 DETECTED = 1,
496}
497impl From<LLOCKUP_A> for bool {
498 #[inline(always)]
499 fn from(variant: LLOCKUP_A) -> Self {
500 variant as u8 != 0
501 }
502}
503impl LLOCKUP_R {
504 #[doc = "Get enumerated values variant"]
505 #[inline(always)]
506 pub fn variant(&self) -> LLOCKUP_A {
507 match self.bits {
508 false => LLOCKUP_A::NOT_DETECTED,
509 true => LLOCKUP_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 == LLOCKUP_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 == LLOCKUP_A::DETECTED
521 }
522}
523#[doc = "Field `LLOCKUP` writer - Reset from network CPU lockup detected"]
524pub type LLOCKUP_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, LLOCKUP_A, O>;
525impl<'a, const O: u8> LLOCKUP_W<'a, O> {
526 #[doc = "Not detected"]
527 #[inline(always)]
528 pub fn not_detected(self) -> &'a mut W {
529 self.variant(LLOCKUP_A::NOT_DETECTED)
530 }
531 #[doc = "Detected"]
532 #[inline(always)]
533 pub fn detected(self) -> &'a mut W {
534 self.variant(LLOCKUP_A::DETECTED)
535 }
536}
537#[doc = "Field `LDOG` reader - Reset from network watchdog timer detected"]
538pub type LDOG_R = crate::BitReader<LDOG_A>;
539#[doc = "Reset from network watchdog timer detected\n\nValue on reset: 0"]
540#[derive(Clone, Copy, Debug, PartialEq)]
541pub enum LDOG_A {
542 #[doc = "0: Not detected"]
543 NOT_DETECTED = 0,
544 #[doc = "1: Detected"]
545 DETECTED = 1,
546}
547impl From<LDOG_A> for bool {
548 #[inline(always)]
549 fn from(variant: LDOG_A) -> Self {
550 variant as u8 != 0
551 }
552}
553impl LDOG_R {
554 #[doc = "Get enumerated values variant"]
555 #[inline(always)]
556 pub fn variant(&self) -> LDOG_A {
557 match self.bits {
558 false => LDOG_A::NOT_DETECTED,
559 true => LDOG_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 == LDOG_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 == LDOG_A::DETECTED
571 }
572}
573#[doc = "Field `LDOG` writer - Reset from network watchdog timer detected"]
574pub type LDOG_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, LDOG_A, O>;
575impl<'a, const O: u8> LDOG_W<'a, O> {
576 #[doc = "Not detected"]
577 #[inline(always)]
578 pub fn not_detected(self) -> &'a mut W {
579 self.variant(LDOG_A::NOT_DETECTED)
580 }
581 #[doc = "Detected"]
582 #[inline(always)]
583 pub fn detected(self) -> &'a mut W {
584 self.variant(LDOG_A::DETECTED)
585 }
586}
587#[doc = "Field `MFORCEOFF` reader - Force-OFF reset from application core detected"]
588pub type MFORCEOFF_R = crate::BitReader<MFORCEOFF_A>;
589#[doc = "Force-OFF reset from application core detected\n\nValue on reset: 0"]
590#[derive(Clone, Copy, Debug, PartialEq)]
591pub enum MFORCEOFF_A {
592 #[doc = "0: Not detected"]
593 NOT_DETECTED = 0,
594 #[doc = "1: Detected"]
595 DETECTED = 1,
596}
597impl From<MFORCEOFF_A> for bool {
598 #[inline(always)]
599 fn from(variant: MFORCEOFF_A) -> Self {
600 variant as u8 != 0
601 }
602}
603impl MFORCEOFF_R {
604 #[doc = "Get enumerated values variant"]
605 #[inline(always)]
606 pub fn variant(&self) -> MFORCEOFF_A {
607 match self.bits {
608 false => MFORCEOFF_A::NOT_DETECTED,
609 true => MFORCEOFF_A::DETECTED,
610 }
611 }
612 #[doc = "Checks if the value of the field is `NOT_DETECTED`"]
613 #[inline(always)]
614 pub fn is_not_detected(&self) -> bool {
615 *self == MFORCEOFF_A::NOT_DETECTED
616 }
617 #[doc = "Checks if the value of the field is `DETECTED`"]
618 #[inline(always)]
619 pub fn is_detected(&self) -> bool {
620 *self == MFORCEOFF_A::DETECTED
621 }
622}
623#[doc = "Field `MFORCEOFF` writer - Force-OFF reset from application core detected"]
624pub type MFORCEOFF_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, MFORCEOFF_A, O>;
625impl<'a, const O: u8> MFORCEOFF_W<'a, O> {
626 #[doc = "Not detected"]
627 #[inline(always)]
628 pub fn not_detected(self) -> &'a mut W {
629 self.variant(MFORCEOFF_A::NOT_DETECTED)
630 }
631 #[doc = "Detected"]
632 #[inline(always)]
633 pub fn detected(self) -> &'a mut W {
634 self.variant(MFORCEOFF_A::DETECTED)
635 }
636}
637#[doc = "Field `NFC` reader - Reset after wakeup from System OFF mode due to NFC field being detected"]
638pub type NFC_R = crate::BitReader<NFC_A>;
639#[doc = "Reset after wakeup from System OFF mode due to NFC field being detected\n\nValue on reset: 0"]
640#[derive(Clone, Copy, Debug, PartialEq)]
641pub enum NFC_A {
642 #[doc = "0: Not detected"]
643 NOT_DETECTED = 0,
644 #[doc = "1: Detected"]
645 DETECTED = 1,
646}
647impl From<NFC_A> for bool {
648 #[inline(always)]
649 fn from(variant: NFC_A) -> Self {
650 variant as u8 != 0
651 }
652}
653impl NFC_R {
654 #[doc = "Get enumerated values variant"]
655 #[inline(always)]
656 pub fn variant(&self) -> NFC_A {
657 match self.bits {
658 false => NFC_A::NOT_DETECTED,
659 true => NFC_A::DETECTED,
660 }
661 }
662 #[doc = "Checks if the value of the field is `NOT_DETECTED`"]
663 #[inline(always)]
664 pub fn is_not_detected(&self) -> bool {
665 *self == NFC_A::NOT_DETECTED
666 }
667 #[doc = "Checks if the value of the field is `DETECTED`"]
668 #[inline(always)]
669 pub fn is_detected(&self) -> bool {
670 *self == NFC_A::DETECTED
671 }
672}
673#[doc = "Field `NFC` writer - Reset after wakeup from System OFF mode due to NFC field being detected"]
674pub type NFC_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, NFC_A, O>;
675impl<'a, const O: u8> NFC_W<'a, O> {
676 #[doc = "Not detected"]
677 #[inline(always)]
678 pub fn not_detected(self) -> &'a mut W {
679 self.variant(NFC_A::NOT_DETECTED)
680 }
681 #[doc = "Detected"]
682 #[inline(always)]
683 pub fn detected(self) -> &'a mut W {
684 self.variant(NFC_A::DETECTED)
685 }
686}
687#[doc = "Field `DOG1` reader - Reset from application watchdog timer 1 detected"]
688pub type DOG1_R = crate::BitReader<DOG1_A>;
689#[doc = "Reset from application watchdog timer 1 detected\n\nValue on reset: 0"]
690#[derive(Clone, Copy, Debug, PartialEq)]
691pub enum DOG1_A {
692 #[doc = "0: Not detected"]
693 NOT_DETECTED = 0,
694 #[doc = "1: Detected"]
695 DETECTED = 1,
696}
697impl From<DOG1_A> for bool {
698 #[inline(always)]
699 fn from(variant: DOG1_A) -> Self {
700 variant as u8 != 0
701 }
702}
703impl DOG1_R {
704 #[doc = "Get enumerated values variant"]
705 #[inline(always)]
706 pub fn variant(&self) -> DOG1_A {
707 match self.bits {
708 false => DOG1_A::NOT_DETECTED,
709 true => DOG1_A::DETECTED,
710 }
711 }
712 #[doc = "Checks if the value of the field is `NOT_DETECTED`"]
713 #[inline(always)]
714 pub fn is_not_detected(&self) -> bool {
715 *self == DOG1_A::NOT_DETECTED
716 }
717 #[doc = "Checks if the value of the field is `DETECTED`"]
718 #[inline(always)]
719 pub fn is_detected(&self) -> bool {
720 *self == DOG1_A::DETECTED
721 }
722}
723#[doc = "Field `DOG1` writer - Reset from application watchdog timer 1 detected"]
724pub type DOG1_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, DOG1_A, O>;
725impl<'a, const O: u8> DOG1_W<'a, O> {
726 #[doc = "Not detected"]
727 #[inline(always)]
728 pub fn not_detected(self) -> &'a mut W {
729 self.variant(DOG1_A::NOT_DETECTED)
730 }
731 #[doc = "Detected"]
732 #[inline(always)]
733 pub fn detected(self) -> &'a mut W {
734 self.variant(DOG1_A::DETECTED)
735 }
736}
737#[doc = "Field `VBUS` reader - Reset after wakeup from System OFF mode due to VBUS rising into valid range"]
738pub type VBUS_R = crate::BitReader<VBUS_A>;
739#[doc = "Reset after wakeup from System OFF mode due to VBUS rising into valid range\n\nValue on reset: 0"]
740#[derive(Clone, Copy, Debug, PartialEq)]
741pub enum VBUS_A {
742 #[doc = "0: Not detected"]
743 NOT_DETECTED = 0,
744 #[doc = "1: Detected"]
745 DETECTED = 1,
746}
747impl From<VBUS_A> for bool {
748 #[inline(always)]
749 fn from(variant: VBUS_A) -> Self {
750 variant as u8 != 0
751 }
752}
753impl VBUS_R {
754 #[doc = "Get enumerated values variant"]
755 #[inline(always)]
756 pub fn variant(&self) -> VBUS_A {
757 match self.bits {
758 false => VBUS_A::NOT_DETECTED,
759 true => VBUS_A::DETECTED,
760 }
761 }
762 #[doc = "Checks if the value of the field is `NOT_DETECTED`"]
763 #[inline(always)]
764 pub fn is_not_detected(&self) -> bool {
765 *self == VBUS_A::NOT_DETECTED
766 }
767 #[doc = "Checks if the value of the field is `DETECTED`"]
768 #[inline(always)]
769 pub fn is_detected(&self) -> bool {
770 *self == VBUS_A::DETECTED
771 }
772}
773#[doc = "Field `VBUS` writer - Reset after wakeup from System OFF mode due to VBUS rising into valid range"]
774pub type VBUS_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, VBUS_A, O>;
775impl<'a, const O: u8> VBUS_W<'a, O> {
776 #[doc = "Not detected"]
777 #[inline(always)]
778 pub fn not_detected(self) -> &'a mut W {
779 self.variant(VBUS_A::NOT_DETECTED)
780 }
781 #[doc = "Detected"]
782 #[inline(always)]
783 pub fn detected(self) -> &'a mut W {
784 self.variant(VBUS_A::DETECTED)
785 }
786}
787#[doc = "Field `LCTRLAP` reader - Reset from network CTRL-AP detected"]
788pub type LCTRLAP_R = crate::BitReader<LCTRLAP_A>;
789#[doc = "Reset from network CTRL-AP detected\n\nValue on reset: 0"]
790#[derive(Clone, Copy, Debug, PartialEq)]
791pub enum LCTRLAP_A {
792 #[doc = "0: Not detected"]
793 NOT_DETECTED = 0,
794 #[doc = "1: Detected"]
795 DETECTED = 1,
796}
797impl From<LCTRLAP_A> for bool {
798 #[inline(always)]
799 fn from(variant: LCTRLAP_A) -> Self {
800 variant as u8 != 0
801 }
802}
803impl LCTRLAP_R {
804 #[doc = "Get enumerated values variant"]
805 #[inline(always)]
806 pub fn variant(&self) -> LCTRLAP_A {
807 match self.bits {
808 false => LCTRLAP_A::NOT_DETECTED,
809 true => LCTRLAP_A::DETECTED,
810 }
811 }
812 #[doc = "Checks if the value of the field is `NOT_DETECTED`"]
813 #[inline(always)]
814 pub fn is_not_detected(&self) -> bool {
815 *self == LCTRLAP_A::NOT_DETECTED
816 }
817 #[doc = "Checks if the value of the field is `DETECTED`"]
818 #[inline(always)]
819 pub fn is_detected(&self) -> bool {
820 *self == LCTRLAP_A::DETECTED
821 }
822}
823#[doc = "Field `LCTRLAP` writer - Reset from network CTRL-AP detected"]
824pub type LCTRLAP_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, LCTRLAP_A, O>;
825impl<'a, const O: u8> LCTRLAP_W<'a, O> {
826 #[doc = "Not detected"]
827 #[inline(always)]
828 pub fn not_detected(self) -> &'a mut W {
829 self.variant(LCTRLAP_A::NOT_DETECTED)
830 }
831 #[doc = "Detected"]
832 #[inline(always)]
833 pub fn detected(self) -> &'a mut W {
834 self.variant(LCTRLAP_A::DETECTED)
835 }
836}
837impl R {
838 #[doc = "Bit 0 - Reset from pin reset detected"]
839 #[inline(always)]
840 pub fn resetpin(&self) -> RESETPIN_R {
841 RESETPIN_R::new((self.bits & 1) != 0)
842 }
843 #[doc = "Bit 1 - Reset from application watchdog timer 0 detected"]
844 #[inline(always)]
845 pub fn dog0(&self) -> DOG0_R {
846 DOG0_R::new(((self.bits >> 1) & 1) != 0)
847 }
848 #[doc = "Bit 2 - Reset from application CTRL-AP detected"]
849 #[inline(always)]
850 pub fn ctrlap(&self) -> CTRLAP_R {
851 CTRLAP_R::new(((self.bits >> 2) & 1) != 0)
852 }
853 #[doc = "Bit 3 - Reset from application soft reset detected"]
854 #[inline(always)]
855 pub fn sreq(&self) -> SREQ_R {
856 SREQ_R::new(((self.bits >> 3) & 1) != 0)
857 }
858 #[doc = "Bit 4 - Reset from application CPU lockup detected"]
859 #[inline(always)]
860 pub fn lockup(&self) -> LOCKUP_R {
861 LOCKUP_R::new(((self.bits >> 4) & 1) != 0)
862 }
863 #[doc = "Bit 5 - Reset due to wakeup from System OFF mode when wakeup is triggered by DETECT signal from GPIO"]
864 #[inline(always)]
865 pub fn off(&self) -> OFF_R {
866 OFF_R::new(((self.bits >> 5) & 1) != 0)
867 }
868 #[doc = "Bit 6 - Reset due to wakeup from System OFF mode when wakeup is triggered by ANADETECT signal from LPCOMP"]
869 #[inline(always)]
870 pub fn lpcomp(&self) -> LPCOMP_R {
871 LPCOMP_R::new(((self.bits >> 6) & 1) != 0)
872 }
873 #[doc = "Bit 7 - Reset due to wakeup from System OFF mode when wakeup is triggered by entering the Debug Interface mode"]
874 #[inline(always)]
875 pub fn dif(&self) -> DIF_R {
876 DIF_R::new(((self.bits >> 7) & 1) != 0)
877 }
878 #[doc = "Bit 16 - Reset from network soft reset detected"]
879 #[inline(always)]
880 pub fn lsreq(&self) -> LSREQ_R {
881 LSREQ_R::new(((self.bits >> 16) & 1) != 0)
882 }
883 #[doc = "Bit 17 - Reset from network CPU lockup detected"]
884 #[inline(always)]
885 pub fn llockup(&self) -> LLOCKUP_R {
886 LLOCKUP_R::new(((self.bits >> 17) & 1) != 0)
887 }
888 #[doc = "Bit 18 - Reset from network watchdog timer detected"]
889 #[inline(always)]
890 pub fn ldog(&self) -> LDOG_R {
891 LDOG_R::new(((self.bits >> 18) & 1) != 0)
892 }
893 #[doc = "Bit 23 - Force-OFF reset from application core detected"]
894 #[inline(always)]
895 pub fn mforceoff(&self) -> MFORCEOFF_R {
896 MFORCEOFF_R::new(((self.bits >> 23) & 1) != 0)
897 }
898 #[doc = "Bit 24 - Reset after wakeup from System OFF mode due to NFC field being detected"]
899 #[inline(always)]
900 pub fn nfc(&self) -> NFC_R {
901 NFC_R::new(((self.bits >> 24) & 1) != 0)
902 }
903 #[doc = "Bit 25 - Reset from application watchdog timer 1 detected"]
904 #[inline(always)]
905 pub fn dog1(&self) -> DOG1_R {
906 DOG1_R::new(((self.bits >> 25) & 1) != 0)
907 }
908 #[doc = "Bit 26 - Reset after wakeup from System OFF mode due to VBUS rising into valid range"]
909 #[inline(always)]
910 pub fn vbus(&self) -> VBUS_R {
911 VBUS_R::new(((self.bits >> 26) & 1) != 0)
912 }
913 #[doc = "Bit 27 - Reset from network CTRL-AP detected"]
914 #[inline(always)]
915 pub fn lctrlap(&self) -> LCTRLAP_R {
916 LCTRLAP_R::new(((self.bits >> 27) & 1) != 0)
917 }
918}
919impl W {
920 #[doc = "Bit 0 - Reset from pin reset detected"]
921 #[inline(always)]
922 pub fn resetpin(&mut self) -> RESETPIN_W<0> {
923 RESETPIN_W::new(self)
924 }
925 #[doc = "Bit 1 - Reset from application watchdog timer 0 detected"]
926 #[inline(always)]
927 pub fn dog0(&mut self) -> DOG0_W<1> {
928 DOG0_W::new(self)
929 }
930 #[doc = "Bit 2 - Reset from application CTRL-AP detected"]
931 #[inline(always)]
932 pub fn ctrlap(&mut self) -> CTRLAP_W<2> {
933 CTRLAP_W::new(self)
934 }
935 #[doc = "Bit 3 - Reset from application soft reset detected"]
936 #[inline(always)]
937 pub fn sreq(&mut self) -> SREQ_W<3> {
938 SREQ_W::new(self)
939 }
940 #[doc = "Bit 4 - Reset from application CPU lockup detected"]
941 #[inline(always)]
942 pub fn lockup(&mut self) -> LOCKUP_W<4> {
943 LOCKUP_W::new(self)
944 }
945 #[doc = "Bit 5 - Reset due to wakeup from System OFF mode when wakeup is triggered by DETECT signal from GPIO"]
946 #[inline(always)]
947 pub fn off(&mut self) -> OFF_W<5> {
948 OFF_W::new(self)
949 }
950 #[doc = "Bit 6 - Reset due to wakeup from System OFF mode when wakeup is triggered by ANADETECT signal from LPCOMP"]
951 #[inline(always)]
952 pub fn lpcomp(&mut self) -> LPCOMP_W<6> {
953 LPCOMP_W::new(self)
954 }
955 #[doc = "Bit 7 - Reset due to wakeup from System OFF mode when wakeup is triggered by entering the Debug Interface mode"]
956 #[inline(always)]
957 pub fn dif(&mut self) -> DIF_W<7> {
958 DIF_W::new(self)
959 }
960 #[doc = "Bit 16 - Reset from network soft reset detected"]
961 #[inline(always)]
962 pub fn lsreq(&mut self) -> LSREQ_W<16> {
963 LSREQ_W::new(self)
964 }
965 #[doc = "Bit 17 - Reset from network CPU lockup detected"]
966 #[inline(always)]
967 pub fn llockup(&mut self) -> LLOCKUP_W<17> {
968 LLOCKUP_W::new(self)
969 }
970 #[doc = "Bit 18 - Reset from network watchdog timer detected"]
971 #[inline(always)]
972 pub fn ldog(&mut self) -> LDOG_W<18> {
973 LDOG_W::new(self)
974 }
975 #[doc = "Bit 23 - Force-OFF reset from application core detected"]
976 #[inline(always)]
977 pub fn mforceoff(&mut self) -> MFORCEOFF_W<23> {
978 MFORCEOFF_W::new(self)
979 }
980 #[doc = "Bit 24 - Reset after wakeup from System OFF mode due to NFC field being detected"]
981 #[inline(always)]
982 pub fn nfc(&mut self) -> NFC_W<24> {
983 NFC_W::new(self)
984 }
985 #[doc = "Bit 25 - Reset from application watchdog timer 1 detected"]
986 #[inline(always)]
987 pub fn dog1(&mut self) -> DOG1_W<25> {
988 DOG1_W::new(self)
989 }
990 #[doc = "Bit 26 - Reset after wakeup from System OFF mode due to VBUS rising into valid range"]
991 #[inline(always)]
992 pub fn vbus(&mut self) -> VBUS_W<26> {
993 VBUS_W::new(self)
994 }
995 #[doc = "Bit 27 - Reset from network CTRL-AP detected"]
996 #[inline(always)]
997 pub fn lctrlap(&mut self) -> LCTRLAP_W<27> {
998 LCTRLAP_W::new(self)
999 }
1000 #[doc = "Writes raw bits to the register."]
1001 #[inline(always)]
1002 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1003 self.0.bits(bits);
1004 self
1005 }
1006}
1007#[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"]
1008pub struct RESETREAS_SPEC;
1009impl crate::RegisterSpec for RESETREAS_SPEC {
1010 type Ux = u32;
1011}
1012#[doc = "`read()` method returns [resetreas::R](R) reader structure"]
1013impl crate::Readable for RESETREAS_SPEC {
1014 type Reader = R;
1015}
1016#[doc = "`write(|w| ..)` method takes [resetreas::W](W) writer structure"]
1017impl crate::Writable for RESETREAS_SPEC {
1018 type Writer = W;
1019}
1020#[doc = "`reset()` method sets RESETREAS to value 0"]
1021impl crate::Resettable for RESETREAS_SPEC {
1022 #[inline(always)]
1023 fn reset_value() -> Self::Ux {
1024 0
1025 }
1026}