Skip to main content

mcxa_pac/cmc/
srs.rs

1#[doc = "Register `SRS` reader"]
2pub type R = crate::R<SrsSpec>;
3#[doc = "Wake-up Reset\n\nValue on reset: 0"]
4#[cfg_attr(feature = "defmt", derive(defmt::Format))]
5#[derive(Clone, Copy, Debug, PartialEq, Eq)]
6pub enum Wakeup {
7    #[doc = "0: Reset not generated"]
8    Disabled = 0,
9    #[doc = "1: Reset generated"]
10    Enabled = 1,
11}
12impl From<Wakeup> for bool {
13    #[inline(always)]
14    fn from(variant: Wakeup) -> Self {
15        variant as u8 != 0
16    }
17}
18#[doc = "Field `WAKEUP` reader - Wake-up Reset"]
19pub type WakeupR = crate::BitReader<Wakeup>;
20impl WakeupR {
21    #[doc = "Get enumerated values variant"]
22    #[inline(always)]
23    pub const fn variant(&self) -> Wakeup {
24        match self.bits {
25            false => Wakeup::Disabled,
26            true => Wakeup::Enabled,
27        }
28    }
29    #[doc = "Reset not generated"]
30    #[inline(always)]
31    pub fn is_disabled(&self) -> bool {
32        *self == Wakeup::Disabled
33    }
34    #[doc = "Reset generated"]
35    #[inline(always)]
36    pub fn is_enabled(&self) -> bool {
37        *self == Wakeup::Enabled
38    }
39}
40#[doc = "Power-on Reset\n\nValue on reset: 0"]
41#[cfg_attr(feature = "defmt", derive(defmt::Format))]
42#[derive(Clone, Copy, Debug, PartialEq, Eq)]
43pub enum Por {
44    #[doc = "0: Reset not generated"]
45    Disabled = 0,
46    #[doc = "1: Reset generated"]
47    Enabled = 1,
48}
49impl From<Por> for bool {
50    #[inline(always)]
51    fn from(variant: Por) -> Self {
52        variant as u8 != 0
53    }
54}
55#[doc = "Field `POR` reader - Power-on Reset"]
56pub type PorR = crate::BitReader<Por>;
57impl PorR {
58    #[doc = "Get enumerated values variant"]
59    #[inline(always)]
60    pub const fn variant(&self) -> Por {
61        match self.bits {
62            false => Por::Disabled,
63            true => Por::Enabled,
64        }
65    }
66    #[doc = "Reset not generated"]
67    #[inline(always)]
68    pub fn is_disabled(&self) -> bool {
69        *self == Por::Disabled
70    }
71    #[doc = "Reset generated"]
72    #[inline(always)]
73    pub fn is_enabled(&self) -> bool {
74        *self == Por::Enabled
75    }
76}
77#[doc = "Voltage Detect Reset\n\nValue on reset: 0"]
78#[cfg_attr(feature = "defmt", derive(defmt::Format))]
79#[derive(Clone, Copy, Debug, PartialEq, Eq)]
80pub enum Vd {
81    #[doc = "0: Reset not generated"]
82    Disabled = 0,
83    #[doc = "1: Reset generated"]
84    Enabled = 1,
85}
86impl From<Vd> for bool {
87    #[inline(always)]
88    fn from(variant: Vd) -> Self {
89        variant as u8 != 0
90    }
91}
92#[doc = "Field `VD` reader - Voltage Detect Reset"]
93pub type VdR = crate::BitReader<Vd>;
94impl VdR {
95    #[doc = "Get enumerated values variant"]
96    #[inline(always)]
97    pub const fn variant(&self) -> Vd {
98        match self.bits {
99            false => Vd::Disabled,
100            true => Vd::Enabled,
101        }
102    }
103    #[doc = "Reset not generated"]
104    #[inline(always)]
105    pub fn is_disabled(&self) -> bool {
106        *self == Vd::Disabled
107    }
108    #[doc = "Reset generated"]
109    #[inline(always)]
110    pub fn is_enabled(&self) -> bool {
111        *self == Vd::Enabled
112    }
113}
114#[doc = "Warm Reset\n\nValue on reset: 0"]
115#[cfg_attr(feature = "defmt", derive(defmt::Format))]
116#[derive(Clone, Copy, Debug, PartialEq, Eq)]
117pub enum Warm {
118    #[doc = "0: Reset not generated"]
119    Disabled = 0,
120    #[doc = "1: Reset generated"]
121    Enabled = 1,
122}
123impl From<Warm> for bool {
124    #[inline(always)]
125    fn from(variant: Warm) -> Self {
126        variant as u8 != 0
127    }
128}
129#[doc = "Field `WARM` reader - Warm Reset"]
130pub type WarmR = crate::BitReader<Warm>;
131impl WarmR {
132    #[doc = "Get enumerated values variant"]
133    #[inline(always)]
134    pub const fn variant(&self) -> Warm {
135        match self.bits {
136            false => Warm::Disabled,
137            true => Warm::Enabled,
138        }
139    }
140    #[doc = "Reset not generated"]
141    #[inline(always)]
142    pub fn is_disabled(&self) -> bool {
143        *self == Warm::Disabled
144    }
145    #[doc = "Reset generated"]
146    #[inline(always)]
147    pub fn is_enabled(&self) -> bool {
148        *self == Warm::Enabled
149    }
150}
151#[doc = "Fatal Reset\n\nValue on reset: 0"]
152#[cfg_attr(feature = "defmt", derive(defmt::Format))]
153#[derive(Clone, Copy, Debug, PartialEq, Eq)]
154pub enum Fatal {
155    #[doc = "0: Reset was not generated"]
156    Disabled = 0,
157    #[doc = "1: Reset was generated"]
158    Enabled = 1,
159}
160impl From<Fatal> for bool {
161    #[inline(always)]
162    fn from(variant: Fatal) -> Self {
163        variant as u8 != 0
164    }
165}
166#[doc = "Field `FATAL` reader - Fatal Reset"]
167pub type FatalR = crate::BitReader<Fatal>;
168impl FatalR {
169    #[doc = "Get enumerated values variant"]
170    #[inline(always)]
171    pub const fn variant(&self) -> Fatal {
172        match self.bits {
173            false => Fatal::Disabled,
174            true => Fatal::Enabled,
175        }
176    }
177    #[doc = "Reset was not generated"]
178    #[inline(always)]
179    pub fn is_disabled(&self) -> bool {
180        *self == Fatal::Disabled
181    }
182    #[doc = "Reset was generated"]
183    #[inline(always)]
184    pub fn is_enabled(&self) -> bool {
185        *self == Fatal::Enabled
186    }
187}
188#[doc = "Pin Reset\n\nValue on reset: 0"]
189#[cfg_attr(feature = "defmt", derive(defmt::Format))]
190#[derive(Clone, Copy, Debug, PartialEq, Eq)]
191pub enum Pin {
192    #[doc = "0: Reset was not generated"]
193    Disabled = 0,
194    #[doc = "1: Reset was generated"]
195    Enabled = 1,
196}
197impl From<Pin> for bool {
198    #[inline(always)]
199    fn from(variant: Pin) -> Self {
200        variant as u8 != 0
201    }
202}
203#[doc = "Field `PIN` reader - Pin Reset"]
204pub type PinR = crate::BitReader<Pin>;
205impl PinR {
206    #[doc = "Get enumerated values variant"]
207    #[inline(always)]
208    pub const fn variant(&self) -> Pin {
209        match self.bits {
210            false => Pin::Disabled,
211            true => Pin::Enabled,
212        }
213    }
214    #[doc = "Reset was not generated"]
215    #[inline(always)]
216    pub fn is_disabled(&self) -> bool {
217        *self == Pin::Disabled
218    }
219    #[doc = "Reset was generated"]
220    #[inline(always)]
221    pub fn is_enabled(&self) -> bool {
222        *self == Pin::Enabled
223    }
224}
225#[doc = "Debug Access Port Reset\n\nValue on reset: 0"]
226#[cfg_attr(feature = "defmt", derive(defmt::Format))]
227#[derive(Clone, Copy, Debug, PartialEq, Eq)]
228pub enum Dap {
229    #[doc = "0: Reset was not generated"]
230    Disabled = 0,
231    #[doc = "1: Reset was generated"]
232    Enabled = 1,
233}
234impl From<Dap> for bool {
235    #[inline(always)]
236    fn from(variant: Dap) -> Self {
237        variant as u8 != 0
238    }
239}
240#[doc = "Field `DAP` reader - Debug Access Port Reset"]
241pub type DapR = crate::BitReader<Dap>;
242impl DapR {
243    #[doc = "Get enumerated values variant"]
244    #[inline(always)]
245    pub const fn variant(&self) -> Dap {
246        match self.bits {
247            false => Dap::Disabled,
248            true => Dap::Enabled,
249        }
250    }
251    #[doc = "Reset was not generated"]
252    #[inline(always)]
253    pub fn is_disabled(&self) -> bool {
254        *self == Dap::Disabled
255    }
256    #[doc = "Reset was generated"]
257    #[inline(always)]
258    pub fn is_enabled(&self) -> bool {
259        *self == Dap::Enabled
260    }
261}
262#[doc = "Reset Timeout\n\nValue on reset: 0"]
263#[cfg_attr(feature = "defmt", derive(defmt::Format))]
264#[derive(Clone, Copy, Debug, PartialEq, Eq)]
265pub enum Rstack {
266    #[doc = "0: Reset not generated"]
267    Disabled = 0,
268    #[doc = "1: Reset generated"]
269    Enabled = 1,
270}
271impl From<Rstack> for bool {
272    #[inline(always)]
273    fn from(variant: Rstack) -> Self {
274        variant as u8 != 0
275    }
276}
277#[doc = "Field `RSTACK` reader - Reset Timeout"]
278pub type RstackR = crate::BitReader<Rstack>;
279impl RstackR {
280    #[doc = "Get enumerated values variant"]
281    #[inline(always)]
282    pub const fn variant(&self) -> Rstack {
283        match self.bits {
284            false => Rstack::Disabled,
285            true => Rstack::Enabled,
286        }
287    }
288    #[doc = "Reset not generated"]
289    #[inline(always)]
290    pub fn is_disabled(&self) -> bool {
291        *self == Rstack::Disabled
292    }
293    #[doc = "Reset generated"]
294    #[inline(always)]
295    pub fn is_enabled(&self) -> bool {
296        *self == Rstack::Enabled
297    }
298}
299#[doc = "Low Power Acknowledge Timeout Reset\n\nValue on reset: 0"]
300#[cfg_attr(feature = "defmt", derive(defmt::Format))]
301#[derive(Clone, Copy, Debug, PartialEq, Eq)]
302pub enum Lpack {
303    #[doc = "0: Reset not generated"]
304    Disabled = 0,
305    #[doc = "1: Reset generated"]
306    Enabled = 1,
307}
308impl From<Lpack> for bool {
309    #[inline(always)]
310    fn from(variant: Lpack) -> Self {
311        variant as u8 != 0
312    }
313}
314#[doc = "Field `LPACK` reader - Low Power Acknowledge Timeout Reset"]
315pub type LpackR = crate::BitReader<Lpack>;
316impl LpackR {
317    #[doc = "Get enumerated values variant"]
318    #[inline(always)]
319    pub const fn variant(&self) -> Lpack {
320        match self.bits {
321            false => Lpack::Disabled,
322            true => Lpack::Enabled,
323        }
324    }
325    #[doc = "Reset not generated"]
326    #[inline(always)]
327    pub fn is_disabled(&self) -> bool {
328        *self == Lpack::Disabled
329    }
330    #[doc = "Reset generated"]
331    #[inline(always)]
332    pub fn is_enabled(&self) -> bool {
333        *self == Lpack::Enabled
334    }
335}
336#[doc = "System Clock Generation Reset\n\nValue on reset: 0"]
337#[cfg_attr(feature = "defmt", derive(defmt::Format))]
338#[derive(Clone, Copy, Debug, PartialEq, Eq)]
339pub enum Scg {
340    #[doc = "0: Reset is not generated"]
341    Disabled = 0,
342    #[doc = "1: Reset is generated"]
343    Enabled = 1,
344}
345impl From<Scg> for bool {
346    #[inline(always)]
347    fn from(variant: Scg) -> Self {
348        variant as u8 != 0
349    }
350}
351#[doc = "Field `SCG` reader - System Clock Generation Reset"]
352pub type ScgR = crate::BitReader<Scg>;
353impl ScgR {
354    #[doc = "Get enumerated values variant"]
355    #[inline(always)]
356    pub const fn variant(&self) -> Scg {
357        match self.bits {
358            false => Scg::Disabled,
359            true => Scg::Enabled,
360        }
361    }
362    #[doc = "Reset is not generated"]
363    #[inline(always)]
364    pub fn is_disabled(&self) -> bool {
365        *self == Scg::Disabled
366    }
367    #[doc = "Reset is generated"]
368    #[inline(always)]
369    pub fn is_enabled(&self) -> bool {
370        *self == Scg::Enabled
371    }
372}
373#[doc = "Windowed Watchdog 0 Reset\n\nValue on reset: 0"]
374#[cfg_attr(feature = "defmt", derive(defmt::Format))]
375#[derive(Clone, Copy, Debug, PartialEq, Eq)]
376pub enum Wwdt0 {
377    #[doc = "0: Reset is not generated"]
378    Disabled = 0,
379    #[doc = "1: Reset is generated"]
380    Enabled = 1,
381}
382impl From<Wwdt0> for bool {
383    #[inline(always)]
384    fn from(variant: Wwdt0) -> Self {
385        variant as u8 != 0
386    }
387}
388#[doc = "Field `WWDT0` reader - Windowed Watchdog 0 Reset"]
389pub type Wwdt0R = crate::BitReader<Wwdt0>;
390impl Wwdt0R {
391    #[doc = "Get enumerated values variant"]
392    #[inline(always)]
393    pub const fn variant(&self) -> Wwdt0 {
394        match self.bits {
395            false => Wwdt0::Disabled,
396            true => Wwdt0::Enabled,
397        }
398    }
399    #[doc = "Reset is not generated"]
400    #[inline(always)]
401    pub fn is_disabled(&self) -> bool {
402        *self == Wwdt0::Disabled
403    }
404    #[doc = "Reset is generated"]
405    #[inline(always)]
406    pub fn is_enabled(&self) -> bool {
407        *self == Wwdt0::Enabled
408    }
409}
410#[doc = "Software Reset\n\nValue on reset: 0"]
411#[cfg_attr(feature = "defmt", derive(defmt::Format))]
412#[derive(Clone, Copy, Debug, PartialEq, Eq)]
413pub enum Sw {
414    #[doc = "0: Reset not generated"]
415    Disabled = 0,
416    #[doc = "1: Reset generated"]
417    Enabled = 1,
418}
419impl From<Sw> for bool {
420    #[inline(always)]
421    fn from(variant: Sw) -> Self {
422        variant as u8 != 0
423    }
424}
425#[doc = "Field `SW` reader - Software Reset"]
426pub type SwR = crate::BitReader<Sw>;
427impl SwR {
428    #[doc = "Get enumerated values variant"]
429    #[inline(always)]
430    pub const fn variant(&self) -> Sw {
431        match self.bits {
432            false => Sw::Disabled,
433            true => Sw::Enabled,
434        }
435    }
436    #[doc = "Reset not generated"]
437    #[inline(always)]
438    pub fn is_disabled(&self) -> bool {
439        *self == Sw::Disabled
440    }
441    #[doc = "Reset generated"]
442    #[inline(always)]
443    pub fn is_enabled(&self) -> bool {
444        *self == Sw::Enabled
445    }
446}
447#[doc = "Lockup Reset\n\nValue on reset: 0"]
448#[cfg_attr(feature = "defmt", derive(defmt::Format))]
449#[derive(Clone, Copy, Debug, PartialEq, Eq)]
450pub enum Lockup {
451    #[doc = "0: Reset not generated"]
452    Disabled = 0,
453    #[doc = "1: Reset generated"]
454    Enabled = 1,
455}
456impl From<Lockup> for bool {
457    #[inline(always)]
458    fn from(variant: Lockup) -> Self {
459        variant as u8 != 0
460    }
461}
462#[doc = "Field `LOCKUP` reader - Lockup Reset"]
463pub type LockupR = crate::BitReader<Lockup>;
464impl LockupR {
465    #[doc = "Get enumerated values variant"]
466    #[inline(always)]
467    pub const fn variant(&self) -> Lockup {
468        match self.bits {
469            false => Lockup::Disabled,
470            true => Lockup::Enabled,
471        }
472    }
473    #[doc = "Reset not generated"]
474    #[inline(always)]
475    pub fn is_disabled(&self) -> bool {
476        *self == Lockup::Disabled
477    }
478    #[doc = "Reset generated"]
479    #[inline(always)]
480    pub fn is_enabled(&self) -> bool {
481        *self == Lockup::Enabled
482    }
483}
484#[doc = "Code Watchdog 0 Reset\n\nValue on reset: 0"]
485#[cfg_attr(feature = "defmt", derive(defmt::Format))]
486#[derive(Clone, Copy, Debug, PartialEq, Eq)]
487pub enum Cdog0 {
488    #[doc = "0: Reset is not generated"]
489    Disabled = 0,
490    #[doc = "1: Reset is generated"]
491    Enabled = 1,
492}
493impl From<Cdog0> for bool {
494    #[inline(always)]
495    fn from(variant: Cdog0) -> Self {
496        variant as u8 != 0
497    }
498}
499#[doc = "Field `CDOG0` reader - Code Watchdog 0 Reset"]
500pub type Cdog0R = crate::BitReader<Cdog0>;
501impl Cdog0R {
502    #[doc = "Get enumerated values variant"]
503    #[inline(always)]
504    pub const fn variant(&self) -> Cdog0 {
505        match self.bits {
506            false => Cdog0::Disabled,
507            true => Cdog0::Enabled,
508        }
509    }
510    #[doc = "Reset is not generated"]
511    #[inline(always)]
512    pub fn is_disabled(&self) -> bool {
513        *self == Cdog0::Disabled
514    }
515    #[doc = "Reset is generated"]
516    #[inline(always)]
517    pub fn is_enabled(&self) -> bool {
518        *self == Cdog0::Enabled
519    }
520}
521#[doc = "Code Watchdog 1 Reset\n\nValue on reset: 0"]
522#[cfg_attr(feature = "defmt", derive(defmt::Format))]
523#[derive(Clone, Copy, Debug, PartialEq, Eq)]
524pub enum Cdog1 {
525    #[doc = "0: Reset is not generated"]
526    Disabled = 0,
527    #[doc = "1: Reset is generated"]
528    Enabled = 1,
529}
530impl From<Cdog1> for bool {
531    #[inline(always)]
532    fn from(variant: Cdog1) -> Self {
533        variant as u8 != 0
534    }
535}
536#[doc = "Field `CDOG1` reader - Code Watchdog 1 Reset"]
537pub type Cdog1R = crate::BitReader<Cdog1>;
538impl Cdog1R {
539    #[doc = "Get enumerated values variant"]
540    #[inline(always)]
541    pub const fn variant(&self) -> Cdog1 {
542        match self.bits {
543            false => Cdog1::Disabled,
544            true => Cdog1::Enabled,
545        }
546    }
547    #[doc = "Reset is not generated"]
548    #[inline(always)]
549    pub fn is_disabled(&self) -> bool {
550        *self == Cdog1::Disabled
551    }
552    #[doc = "Reset is generated"]
553    #[inline(always)]
554    pub fn is_enabled(&self) -> bool {
555        *self == Cdog1::Enabled
556    }
557}
558#[doc = "JTAG System Reset\n\nValue on reset: 0"]
559#[cfg_attr(feature = "defmt", derive(defmt::Format))]
560#[derive(Clone, Copy, Debug, PartialEq, Eq)]
561pub enum Jtag {
562    #[doc = "0: Reset not generated"]
563    Disabled = 0,
564    #[doc = "1: Reset generated"]
565    Enabled = 1,
566}
567impl From<Jtag> for bool {
568    #[inline(always)]
569    fn from(variant: Jtag) -> Self {
570        variant as u8 != 0
571    }
572}
573#[doc = "Field `JTAG` reader - JTAG System Reset"]
574pub type JtagR = crate::BitReader<Jtag>;
575impl JtagR {
576    #[doc = "Get enumerated values variant"]
577    #[inline(always)]
578    pub const fn variant(&self) -> Jtag {
579        match self.bits {
580            false => Jtag::Disabled,
581            true => Jtag::Enabled,
582        }
583    }
584    #[doc = "Reset not generated"]
585    #[inline(always)]
586    pub fn is_disabled(&self) -> bool {
587        *self == Jtag::Disabled
588    }
589    #[doc = "Reset generated"]
590    #[inline(always)]
591    pub fn is_enabled(&self) -> bool {
592        *self == Jtag::Enabled
593    }
594}
595#[doc = "Tamper Reset\n\nValue on reset: 0"]
596#[cfg_attr(feature = "defmt", derive(defmt::Format))]
597#[derive(Clone, Copy, Debug, PartialEq, Eq)]
598pub enum Tamper {
599    #[doc = "0: Reset not generated"]
600    Disabled = 0,
601    #[doc = "1: Reset generated"]
602    Enabled = 1,
603}
604impl From<Tamper> for bool {
605    #[inline(always)]
606    fn from(variant: Tamper) -> Self {
607        variant as u8 != 0
608    }
609}
610#[doc = "Field `TAMPER` reader - Tamper Reset"]
611pub type TamperR = crate::BitReader<Tamper>;
612impl TamperR {
613    #[doc = "Get enumerated values variant"]
614    #[inline(always)]
615    pub const fn variant(&self) -> Tamper {
616        match self.bits {
617            false => Tamper::Disabled,
618            true => Tamper::Enabled,
619        }
620    }
621    #[doc = "Reset not generated"]
622    #[inline(always)]
623    pub fn is_disabled(&self) -> bool {
624        *self == Tamper::Disabled
625    }
626    #[doc = "Reset generated"]
627    #[inline(always)]
628    pub fn is_enabled(&self) -> bool {
629        *self == Tamper::Enabled
630    }
631}
632impl R {
633    #[doc = "Bit 0 - Wake-up Reset"]
634    #[inline(always)]
635    pub fn wakeup(&self) -> WakeupR {
636        WakeupR::new((self.bits & 1) != 0)
637    }
638    #[doc = "Bit 1 - Power-on Reset"]
639    #[inline(always)]
640    pub fn por(&self) -> PorR {
641        PorR::new(((self.bits >> 1) & 1) != 0)
642    }
643    #[doc = "Bit 2 - Voltage Detect Reset"]
644    #[inline(always)]
645    pub fn vd(&self) -> VdR {
646        VdR::new(((self.bits >> 2) & 1) != 0)
647    }
648    #[doc = "Bit 4 - Warm Reset"]
649    #[inline(always)]
650    pub fn warm(&self) -> WarmR {
651        WarmR::new(((self.bits >> 4) & 1) != 0)
652    }
653    #[doc = "Bit 5 - Fatal Reset"]
654    #[inline(always)]
655    pub fn fatal(&self) -> FatalR {
656        FatalR::new(((self.bits >> 5) & 1) != 0)
657    }
658    #[doc = "Bit 8 - Pin Reset"]
659    #[inline(always)]
660    pub fn pin(&self) -> PinR {
661        PinR::new(((self.bits >> 8) & 1) != 0)
662    }
663    #[doc = "Bit 9 - Debug Access Port Reset"]
664    #[inline(always)]
665    pub fn dap(&self) -> DapR {
666        DapR::new(((self.bits >> 9) & 1) != 0)
667    }
668    #[doc = "Bit 10 - Reset Timeout"]
669    #[inline(always)]
670    pub fn rstack(&self) -> RstackR {
671        RstackR::new(((self.bits >> 10) & 1) != 0)
672    }
673    #[doc = "Bit 11 - Low Power Acknowledge Timeout Reset"]
674    #[inline(always)]
675    pub fn lpack(&self) -> LpackR {
676        LpackR::new(((self.bits >> 11) & 1) != 0)
677    }
678    #[doc = "Bit 12 - System Clock Generation Reset"]
679    #[inline(always)]
680    pub fn scg(&self) -> ScgR {
681        ScgR::new(((self.bits >> 12) & 1) != 0)
682    }
683    #[doc = "Bit 13 - Windowed Watchdog 0 Reset"]
684    #[inline(always)]
685    pub fn wwdt0(&self) -> Wwdt0R {
686        Wwdt0R::new(((self.bits >> 13) & 1) != 0)
687    }
688    #[doc = "Bit 14 - Software Reset"]
689    #[inline(always)]
690    pub fn sw(&self) -> SwR {
691        SwR::new(((self.bits >> 14) & 1) != 0)
692    }
693    #[doc = "Bit 15 - Lockup Reset"]
694    #[inline(always)]
695    pub fn lockup(&self) -> LockupR {
696        LockupR::new(((self.bits >> 15) & 1) != 0)
697    }
698    #[doc = "Bit 26 - Code Watchdog 0 Reset"]
699    #[inline(always)]
700    pub fn cdog0(&self) -> Cdog0R {
701        Cdog0R::new(((self.bits >> 26) & 1) != 0)
702    }
703    #[doc = "Bit 27 - Code Watchdog 1 Reset"]
704    #[inline(always)]
705    pub fn cdog1(&self) -> Cdog1R {
706        Cdog1R::new(((self.bits >> 27) & 1) != 0)
707    }
708    #[doc = "Bit 28 - JTAG System Reset"]
709    #[inline(always)]
710    pub fn jtag(&self) -> JtagR {
711        JtagR::new(((self.bits >> 28) & 1) != 0)
712    }
713    #[doc = "Bit 31 - Tamper Reset"]
714    #[inline(always)]
715    pub fn tamper(&self) -> TamperR {
716        TamperR::new(((self.bits >> 31) & 1) != 0)
717    }
718}
719#[cfg(feature = "debug")]
720impl core::fmt::Debug for R {
721    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
722        f.debug_struct("SRS")
723            .field("wakeup", &self.wakeup())
724            .field("por", &self.por())
725            .field("vd", &self.vd())
726            .field("warm", &self.warm())
727            .field("fatal", &self.fatal())
728            .field("pin", &self.pin())
729            .field("dap", &self.dap())
730            .field("rstack", &self.rstack())
731            .field("lpack", &self.lpack())
732            .field("scg", &self.scg())
733            .field("wwdt0", &self.wwdt0())
734            .field("sw", &self.sw())
735            .field("lockup", &self.lockup())
736            .field("cdog0", &self.cdog0())
737            .field("cdog1", &self.cdog1())
738            .field("jtag", &self.jtag())
739            .field("tamper", &self.tamper())
740            .finish()
741    }
742}
743#[doc = "System Reset Status\n\nYou can [`read`](crate::Reg::read) this register and get [`srs::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
744pub struct SrsSpec;
745impl crate::RegisterSpec for SrsSpec {
746    type Ux = u32;
747}
748#[doc = "`read()` method returns [`srs::R`](R) reader structure"]
749impl crate::Readable for SrsSpec {}
750#[doc = "`reset()` method sets SRS to value 0"]
751impl crate::Resettable for SrsSpec {}