efm32tg108_pac/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>;
38impl R {
39 #[doc = "Bit 0 - Power On Reset"]
40 #[inline(always)]
41 pub fn porst(&self) -> PORST_R {
42 PORST_R::new((self.bits & 1) != 0)
43 }
44 #[doc = "Bit 1 - Brown Out Detector Unregulated Domain Reset"]
45 #[inline(always)]
46 pub fn bodunregrst(&self) -> BODUNREGRST_R {
47 BODUNREGRST_R::new(((self.bits >> 1) & 1) != 0)
48 }
49 #[doc = "Bit 2 - Brown Out Detector Regulated Domain Reset"]
50 #[inline(always)]
51 pub fn bodregrst(&self) -> BODREGRST_R {
52 BODREGRST_R::new(((self.bits >> 2) & 1) != 0)
53 }
54 #[doc = "Bit 3 - External Pin Reset"]
55 #[inline(always)]
56 pub fn extrst(&self) -> EXTRST_R {
57 EXTRST_R::new(((self.bits >> 3) & 1) != 0)
58 }
59 #[doc = "Bit 4 - Watchdog Reset"]
60 #[inline(always)]
61 pub fn wdogrst(&self) -> WDOGRST_R {
62 WDOGRST_R::new(((self.bits >> 4) & 1) != 0)
63 }
64 #[doc = "Bit 5 - LOCKUP Reset"]
65 #[inline(always)]
66 pub fn lockuprst(&self) -> LOCKUPRST_R {
67 LOCKUPRST_R::new(((self.bits >> 5) & 1) != 0)
68 }
69 #[doc = "Bit 6 - System Request Reset"]
70 #[inline(always)]
71 pub fn sysreqrst(&self) -> SYSREQRST_R {
72 SYSREQRST_R::new(((self.bits >> 6) & 1) != 0)
73 }
74 #[doc = "Bit 7 - EM4 Reset"]
75 #[inline(always)]
76 pub fn em4rst(&self) -> EM4RST_R {
77 EM4RST_R::new(((self.bits >> 7) & 1) != 0)
78 }
79 #[doc = "Bit 8 - EM4 Wake-up Reset"]
80 #[inline(always)]
81 pub fn em4wurst(&self) -> EM4WURST_R {
82 EM4WURST_R::new(((self.bits >> 8) & 1) != 0)
83 }
84 #[doc = "Bit 9 - AVDD0 Bod Reset"]
85 #[inline(always)]
86 pub fn bodavdd0(&self) -> BODAVDD0_R {
87 BODAVDD0_R::new(((self.bits >> 9) & 1) != 0)
88 }
89 #[doc = "Bit 10 - AVDD1 Bod Reset"]
90 #[inline(always)]
91 pub fn bodavdd1(&self) -> BODAVDD1_R {
92 BODAVDD1_R::new(((self.bits >> 10) & 1) != 0)
93 }
94}
95#[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"]
96pub struct RSTCAUSE_SPEC;
97impl crate::RegisterSpec for RSTCAUSE_SPEC {
98 type Ux = u32;
99}
100#[doc = "`read()` method returns [rstcause::R](R) reader structure"]
101impl crate::Readable for RSTCAUSE_SPEC {
102 type Reader = R;
103}
104#[doc = "`reset()` method sets RSTCAUSE to value 0"]
105impl crate::Resettable for RSTCAUSE_SPEC {
106 #[inline(always)]
107 fn reset_value() -> Self::Ux {
108 0
109 }
110}