efm32pg22_pac/efm32pg22c200/emu_s/
rstcause.rs1#[doc = "Register `RSTCAUSE` reader"]
2pub struct R(crate::R<RSTCAUSE_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<RSTCAUSE_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<RSTCAUSE_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<RSTCAUSE_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `POR` reader - Power On Reset"]
17pub type POR_R = crate::BitReader<bool>;
18#[doc = "Field `PIN` reader - Pin Reset"]
19pub type PIN_R = crate::BitReader<bool>;
20#[doc = "Field `EM4` reader - EM4 Wakeup Reset"]
21pub type EM4_R = crate::BitReader<bool>;
22#[doc = "Field `WDOG0` reader - Watchdog 0 Reset"]
23pub type WDOG0_R = crate::BitReader<bool>;
24#[doc = "Field `LOCKUP` reader - M33 Core Lockup Reset"]
25pub type LOCKUP_R = crate::BitReader<bool>;
26#[doc = "Field `SYSREQ` reader - M33 Core Sys Reset"]
27pub type SYSREQ_R = crate::BitReader<bool>;
28#[doc = "Field `DVDDBOD` reader - HVBOD Reset"]
29pub type DVDDBOD_R = crate::BitReader<bool>;
30#[doc = "Field `DVDDLEBOD` reader - LEBOD Reset"]
31pub type DVDDLEBOD_R = crate::BitReader<bool>;
32#[doc = "Field `DECBOD` reader - LVBOD Reset"]
33pub type DECBOD_R = crate::BitReader<bool>;
34#[doc = "Field `AVDDBOD` reader - LEBOD1 Reset"]
35pub type AVDDBOD_R = crate::BitReader<bool>;
36#[doc = "Field `IOVDD0BOD` reader - LEBOD2 Reset"]
37pub type IOVDD0BOD_R = crate::BitReader<bool>;
38#[doc = "Field `DCI` reader - DCI reset"]
39pub type DCI_R = crate::BitReader<bool>;
40#[doc = "Field `VREGIN` reader - DCDC VREGIN comparator"]
41pub type VREGIN_R = crate::BitReader<bool>;
42impl R {
43 #[doc = "Bit 0 - Power On Reset"]
44 #[inline(always)]
45 pub fn por(&self) -> POR_R {
46 POR_R::new((self.bits & 1) != 0)
47 }
48 #[doc = "Bit 1 - Pin Reset"]
49 #[inline(always)]
50 pub fn pin(&self) -> PIN_R {
51 PIN_R::new(((self.bits >> 1) & 1) != 0)
52 }
53 #[doc = "Bit 2 - EM4 Wakeup Reset"]
54 #[inline(always)]
55 pub fn em4(&self) -> EM4_R {
56 EM4_R::new(((self.bits >> 2) & 1) != 0)
57 }
58 #[doc = "Bit 3 - Watchdog 0 Reset"]
59 #[inline(always)]
60 pub fn wdog0(&self) -> WDOG0_R {
61 WDOG0_R::new(((self.bits >> 3) & 1) != 0)
62 }
63 #[doc = "Bit 5 - M33 Core Lockup Reset"]
64 #[inline(always)]
65 pub fn lockup(&self) -> LOCKUP_R {
66 LOCKUP_R::new(((self.bits >> 5) & 1) != 0)
67 }
68 #[doc = "Bit 6 - M33 Core Sys Reset"]
69 #[inline(always)]
70 pub fn sysreq(&self) -> SYSREQ_R {
71 SYSREQ_R::new(((self.bits >> 6) & 1) != 0)
72 }
73 #[doc = "Bit 7 - HVBOD Reset"]
74 #[inline(always)]
75 pub fn dvddbod(&self) -> DVDDBOD_R {
76 DVDDBOD_R::new(((self.bits >> 7) & 1) != 0)
77 }
78 #[doc = "Bit 8 - LEBOD Reset"]
79 #[inline(always)]
80 pub fn dvddlebod(&self) -> DVDDLEBOD_R {
81 DVDDLEBOD_R::new(((self.bits >> 8) & 1) != 0)
82 }
83 #[doc = "Bit 9 - LVBOD Reset"]
84 #[inline(always)]
85 pub fn decbod(&self) -> DECBOD_R {
86 DECBOD_R::new(((self.bits >> 9) & 1) != 0)
87 }
88 #[doc = "Bit 10 - LEBOD1 Reset"]
89 #[inline(always)]
90 pub fn avddbod(&self) -> AVDDBOD_R {
91 AVDDBOD_R::new(((self.bits >> 10) & 1) != 0)
92 }
93 #[doc = "Bit 11 - LEBOD2 Reset"]
94 #[inline(always)]
95 pub fn iovdd0bod(&self) -> IOVDD0BOD_R {
96 IOVDD0BOD_R::new(((self.bits >> 11) & 1) != 0)
97 }
98 #[doc = "Bit 16 - DCI reset"]
99 #[inline(always)]
100 pub fn dci(&self) -> DCI_R {
101 DCI_R::new(((self.bits >> 16) & 1) != 0)
102 }
103 #[doc = "Bit 31 - DCDC VREGIN comparator"]
104 #[inline(always)]
105 pub fn vregin(&self) -> VREGIN_R {
106 VREGIN_R::new(((self.bits >> 31) & 1) != 0)
107 }
108}
109#[doc = "No Description\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rstcause](index.html) module"]
110pub struct RSTCAUSE_SPEC;
111impl crate::RegisterSpec for RSTCAUSE_SPEC {
112 type Ux = u32;
113}
114#[doc = "`read()` method returns [rstcause::R](R) reader structure"]
115impl crate::Readable for RSTCAUSE_SPEC {
116 type Reader = R;
117}
118#[doc = "`reset()` method sets RSTCAUSE to value 0"]
119impl crate::Resettable for RSTCAUSE_SPEC {
120 const RESET_VALUE: Self::Ux = 0;
121}