stm32l4/stm32l4x1/rcc/
csr.rs1pub type R = crate::R<CSRrs>;
3pub type W = crate::W<CSRrs>;
5pub type LSION_R = crate::BitReader;
7pub type LSION_W<'a, REG> = crate::BitWriter<'a, REG>;
9pub type LSIRDY_R = crate::BitReader;
11pub type MSISRANGE_R = crate::FieldReader;
13pub type MSISRANGE_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
15pub type RMVF_R = crate::BitReader;
17pub type RMVF_W<'a, REG> = crate::BitWriter<'a, REG>;
19pub type FIREWALLRSTF_R = crate::BitReader;
21pub type OBLRSTF_R = crate::BitReader;
23pub type PINRSTF_R = crate::BitReader;
25pub type BORRSTF_R = crate::BitReader;
27pub type SFTRSTF_R = crate::BitReader;
29pub type IWDGRSTF_R = crate::BitReader;
31pub type WWDGRSTF_R = crate::BitReader;
33pub type LPWRSTF_R = crate::BitReader;
35impl R {
36 #[inline(always)]
38 pub fn lsion(&self) -> LSION_R {
39 LSION_R::new((self.bits & 1) != 0)
40 }
41 #[inline(always)]
43 pub fn lsirdy(&self) -> LSIRDY_R {
44 LSIRDY_R::new(((self.bits >> 1) & 1) != 0)
45 }
46 #[inline(always)]
48 pub fn msisrange(&self) -> MSISRANGE_R {
49 MSISRANGE_R::new(((self.bits >> 8) & 0x0f) as u8)
50 }
51 #[inline(always)]
53 pub fn rmvf(&self) -> RMVF_R {
54 RMVF_R::new(((self.bits >> 23) & 1) != 0)
55 }
56 #[inline(always)]
58 pub fn firewallrstf(&self) -> FIREWALLRSTF_R {
59 FIREWALLRSTF_R::new(((self.bits >> 24) & 1) != 0)
60 }
61 #[inline(always)]
63 pub fn oblrstf(&self) -> OBLRSTF_R {
64 OBLRSTF_R::new(((self.bits >> 25) & 1) != 0)
65 }
66 #[inline(always)]
68 pub fn pinrstf(&self) -> PINRSTF_R {
69 PINRSTF_R::new(((self.bits >> 26) & 1) != 0)
70 }
71 #[inline(always)]
73 pub fn borrstf(&self) -> BORRSTF_R {
74 BORRSTF_R::new(((self.bits >> 27) & 1) != 0)
75 }
76 #[inline(always)]
78 pub fn sftrstf(&self) -> SFTRSTF_R {
79 SFTRSTF_R::new(((self.bits >> 28) & 1) != 0)
80 }
81 #[inline(always)]
83 pub fn iwdgrstf(&self) -> IWDGRSTF_R {
84 IWDGRSTF_R::new(((self.bits >> 29) & 1) != 0)
85 }
86 #[inline(always)]
88 pub fn wwdgrstf(&self) -> WWDGRSTF_R {
89 WWDGRSTF_R::new(((self.bits >> 30) & 1) != 0)
90 }
91 #[inline(always)]
93 pub fn lpwrstf(&self) -> LPWRSTF_R {
94 LPWRSTF_R::new(((self.bits >> 31) & 1) != 0)
95 }
96}
97impl core::fmt::Debug for R {
98 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
99 f.debug_struct("CSR")
100 .field("lpwrstf", &self.lpwrstf())
101 .field("wwdgrstf", &self.wwdgrstf())
102 .field("iwdgrstf", &self.iwdgrstf())
103 .field("sftrstf", &self.sftrstf())
104 .field("borrstf", &self.borrstf())
105 .field("pinrstf", &self.pinrstf())
106 .field("oblrstf", &self.oblrstf())
107 .field("firewallrstf", &self.firewallrstf())
108 .field("rmvf", &self.rmvf())
109 .field("msisrange", &self.msisrange())
110 .field("lsirdy", &self.lsirdy())
111 .field("lsion", &self.lsion())
112 .finish()
113 }
114}
115impl W {
116 #[inline(always)]
118 pub fn lsion(&mut self) -> LSION_W<CSRrs> {
119 LSION_W::new(self, 0)
120 }
121 #[inline(always)]
123 pub fn msisrange(&mut self) -> MSISRANGE_W<CSRrs> {
124 MSISRANGE_W::new(self, 8)
125 }
126 #[inline(always)]
128 pub fn rmvf(&mut self) -> RMVF_W<CSRrs> {
129 RMVF_W::new(self, 23)
130 }
131}
132pub struct CSRrs;
138impl crate::RegisterSpec for CSRrs {
139 type Ux = u32;
140}
141impl crate::Readable for CSRrs {}
143impl crate::Writable for CSRrs {
145 type Safety = crate::Unsafe;
146}
147impl crate::Resettable for CSRrs {
149 const RESET_VALUE: u32 = 0x0c00_0600;
150}