efm32gg_pac/efm32gg230/rmu/
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 `PORST` reader - Power On Reset"]
17pub type PORST_R = crate::BitReader<bool>;
18#[doc = "Field `BODUNREGRST` reader - Brown Out Detector Unregulated Domain Reset"]
19pub type BODUNREGRST_R = crate::BitReader<bool>;
20#[doc = "Field `BODREGRST` reader - Brown Out Detector Regulated Domain Reset"]
21pub type BODREGRST_R = crate::BitReader<bool>;
22#[doc = "Field `EXTRST` reader - External Pin Reset"]
23pub type EXTRST_R = crate::BitReader<bool>;
24#[doc = "Field `WDOGRST` reader - Watchdog Reset"]
25pub type WDOGRST_R = crate::BitReader<bool>;
26#[doc = "Field `LOCKUPRST` reader - LOCKUP Reset"]
27pub type LOCKUPRST_R = crate::BitReader<bool>;
28#[doc = "Field `SYSREQRST` reader - System Request Reset"]
29pub type SYSREQRST_R = crate::BitReader<bool>;
30#[doc = "Field `EM4RST` reader - EM4 Reset"]
31pub type EM4RST_R = crate::BitReader<bool>;
32#[doc = "Field `EM4WURST` reader - EM4 Wake-up Reset"]
33pub type EM4WURST_R = crate::BitReader<bool>;
34#[doc = "Field `BODAVDD0` reader - AVDD0 Bod Reset"]
35pub type BODAVDD0_R = crate::BitReader<bool>;
36#[doc = "Field `BODAVDD1` reader - AVDD1 Bod Reset"]
37pub type BODAVDD1_R = crate::BitReader<bool>;
38#[doc = "Field `BUBODVDDDREG` reader - Backup Brown Out Detector, VDD_DREG"]
39pub type BUBODVDDDREG_R = crate::BitReader<bool>;
40#[doc = "Field `BUBODBUVIN` reader - Backup Brown Out Detector, BU_VIN"]
41pub type BUBODBUVIN_R = crate::BitReader<bool>;
42#[doc = "Field `BUBODUNREG` reader - Backup Brown Out Detector Unregulated Domain"]
43pub type BUBODUNREG_R = crate::BitReader<bool>;
44#[doc = "Field `BUBODREG` reader - Backup Brown Out Detector Regulated Domain"]
45pub type BUBODREG_R = crate::BitReader<bool>;
46#[doc = "Field `BUMODERST` reader - Backup mode reset"]
47pub type BUMODERST_R = crate::BitReader<bool>;
48impl R {
49 #[doc = "Bit 0 - Power On Reset"]
50 #[inline(always)]
51 pub fn porst(&self) -> PORST_R {
52 PORST_R::new((self.bits & 1) != 0)
53 }
54 #[doc = "Bit 1 - Brown Out Detector Unregulated Domain Reset"]
55 #[inline(always)]
56 pub fn bodunregrst(&self) -> BODUNREGRST_R {
57 BODUNREGRST_R::new(((self.bits >> 1) & 1) != 0)
58 }
59 #[doc = "Bit 2 - Brown Out Detector Regulated Domain Reset"]
60 #[inline(always)]
61 pub fn bodregrst(&self) -> BODREGRST_R {
62 BODREGRST_R::new(((self.bits >> 2) & 1) != 0)
63 }
64 #[doc = "Bit 3 - External Pin Reset"]
65 #[inline(always)]
66 pub fn extrst(&self) -> EXTRST_R {
67 EXTRST_R::new(((self.bits >> 3) & 1) != 0)
68 }
69 #[doc = "Bit 4 - Watchdog Reset"]
70 #[inline(always)]
71 pub fn wdogrst(&self) -> WDOGRST_R {
72 WDOGRST_R::new(((self.bits >> 4) & 1) != 0)
73 }
74 #[doc = "Bit 5 - LOCKUP Reset"]
75 #[inline(always)]
76 pub fn lockuprst(&self) -> LOCKUPRST_R {
77 LOCKUPRST_R::new(((self.bits >> 5) & 1) != 0)
78 }
79 #[doc = "Bit 6 - System Request Reset"]
80 #[inline(always)]
81 pub fn sysreqrst(&self) -> SYSREQRST_R {
82 SYSREQRST_R::new(((self.bits >> 6) & 1) != 0)
83 }
84 #[doc = "Bit 7 - EM4 Reset"]
85 #[inline(always)]
86 pub fn em4rst(&self) -> EM4RST_R {
87 EM4RST_R::new(((self.bits >> 7) & 1) != 0)
88 }
89 #[doc = "Bit 8 - EM4 Wake-up Reset"]
90 #[inline(always)]
91 pub fn em4wurst(&self) -> EM4WURST_R {
92 EM4WURST_R::new(((self.bits >> 8) & 1) != 0)
93 }
94 #[doc = "Bit 9 - AVDD0 Bod Reset"]
95 #[inline(always)]
96 pub fn bodavdd0(&self) -> BODAVDD0_R {
97 BODAVDD0_R::new(((self.bits >> 9) & 1) != 0)
98 }
99 #[doc = "Bit 10 - AVDD1 Bod Reset"]
100 #[inline(always)]
101 pub fn bodavdd1(&self) -> BODAVDD1_R {
102 BODAVDD1_R::new(((self.bits >> 10) & 1) != 0)
103 }
104 #[doc = "Bit 11 - Backup Brown Out Detector, VDD_DREG"]
105 #[inline(always)]
106 pub fn bubodvdddreg(&self) -> BUBODVDDDREG_R {
107 BUBODVDDDREG_R::new(((self.bits >> 11) & 1) != 0)
108 }
109 #[doc = "Bit 12 - Backup Brown Out Detector, BU_VIN"]
110 #[inline(always)]
111 pub fn bubodbuvin(&self) -> BUBODBUVIN_R {
112 BUBODBUVIN_R::new(((self.bits >> 12) & 1) != 0)
113 }
114 #[doc = "Bit 13 - Backup Brown Out Detector Unregulated Domain"]
115 #[inline(always)]
116 pub fn bubodunreg(&self) -> BUBODUNREG_R {
117 BUBODUNREG_R::new(((self.bits >> 13) & 1) != 0)
118 }
119 #[doc = "Bit 14 - Backup Brown Out Detector Regulated Domain"]
120 #[inline(always)]
121 pub fn bubodreg(&self) -> BUBODREG_R {
122 BUBODREG_R::new(((self.bits >> 14) & 1) != 0)
123 }
124 #[doc = "Bit 15 - Backup mode reset"]
125 #[inline(always)]
126 pub fn bumoderst(&self) -> BUMODERST_R {
127 BUMODERST_R::new(((self.bits >> 15) & 1) != 0)
128 }
129}
130#[doc = "Reset Cause Register\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"]
131pub struct RSTCAUSE_SPEC;
132impl crate::RegisterSpec for RSTCAUSE_SPEC {
133 type Ux = u32;
134}
135#[doc = "`read()` method returns [rstcause::R](R) reader structure"]
136impl crate::Readable for RSTCAUSE_SPEC {
137 type Reader = R;
138}
139#[doc = "`reset()` method sets RSTCAUSE to value 0"]
140impl crate::Resettable for RSTCAUSE_SPEC {
141 const RESET_VALUE: Self::Ux = 0;
142}