stm32wb_pac/syscfg/
cfgr1.rs1#[doc = "Reader of register CFGR1"]
2pub type R = crate::R<u32, super::CFGR1>;
3#[doc = "Writer for register CFGR1"]
4pub type W = crate::W<u32, super::CFGR1>;
5#[doc = "Register CFGR1 `reset()`'s with value 0x7c00_0001"]
6impl crate::ResetValue for super::CFGR1 {
7 type Type = u32;
8 #[inline(always)]
9 fn reset_value() -> Self::Type {
10 0x7c00_0001
11 }
12}
13#[doc = "Reader of field `FPU_IE`"]
14pub type FPU_IE_R = crate::R<u8, u8>;
15#[doc = "Write proxy for field `FPU_IE`"]
16pub struct FPU_IE_W<'a> {
17 w: &'a mut W,
18}
19impl<'a> FPU_IE_W<'a> {
20 #[doc = r"Writes raw bits to the field"]
21 #[inline(always)]
22 pub unsafe fn bits(self, value: u8) -> &'a mut W {
23 self.w.bits = (self.w.bits & !(0x3f << 26)) | (((value as u32) & 0x3f) << 26);
24 self.w
25 }
26}
27#[doc = "Reader of field `I2C3_FMP`"]
28pub type I2C3_FMP_R = crate::R<bool, bool>;
29#[doc = "Write proxy for field `I2C3_FMP`"]
30pub struct I2C3_FMP_W<'a> {
31 w: &'a mut W,
32}
33impl<'a> I2C3_FMP_W<'a> {
34 #[doc = r"Sets the field bit"]
35 #[inline(always)]
36 pub fn set_bit(self) -> &'a mut W {
37 self.bit(true)
38 }
39 #[doc = r"Clears the field bit"]
40 #[inline(always)]
41 pub fn clear_bit(self) -> &'a mut W {
42 self.bit(false)
43 }
44 #[doc = r"Writes raw bits to the field"]
45 #[inline(always)]
46 pub fn bit(self, value: bool) -> &'a mut W {
47 self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22);
48 self.w
49 }
50}
51#[doc = "Reader of field `I2C1_FMP`"]
52pub type I2C1_FMP_R = crate::R<bool, bool>;
53#[doc = "Write proxy for field `I2C1_FMP`"]
54pub struct I2C1_FMP_W<'a> {
55 w: &'a mut W,
56}
57impl<'a> I2C1_FMP_W<'a> {
58 #[doc = r"Sets the field bit"]
59 #[inline(always)]
60 pub fn set_bit(self) -> &'a mut W {
61 self.bit(true)
62 }
63 #[doc = r"Clears the field bit"]
64 #[inline(always)]
65 pub fn clear_bit(self) -> &'a mut W {
66 self.bit(false)
67 }
68 #[doc = r"Writes raw bits to the field"]
69 #[inline(always)]
70 pub fn bit(self, value: bool) -> &'a mut W {
71 self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20);
72 self.w
73 }
74}
75#[doc = "Reader of field `I2C_PB9_FMP`"]
76pub type I2C_PB9_FMP_R = crate::R<bool, bool>;
77#[doc = "Write proxy for field `I2C_PB9_FMP`"]
78pub struct I2C_PB9_FMP_W<'a> {
79 w: &'a mut W,
80}
81impl<'a> I2C_PB9_FMP_W<'a> {
82 #[doc = r"Sets the field bit"]
83 #[inline(always)]
84 pub fn set_bit(self) -> &'a mut W {
85 self.bit(true)
86 }
87 #[doc = r"Clears the field bit"]
88 #[inline(always)]
89 pub fn clear_bit(self) -> &'a mut W {
90 self.bit(false)
91 }
92 #[doc = r"Writes raw bits to the field"]
93 #[inline(always)]
94 pub fn bit(self, value: bool) -> &'a mut W {
95 self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19);
96 self.w
97 }
98}
99#[doc = "Reader of field `I2C_PB8_FMP`"]
100pub type I2C_PB8_FMP_R = crate::R<bool, bool>;
101#[doc = "Write proxy for field `I2C_PB8_FMP`"]
102pub struct I2C_PB8_FMP_W<'a> {
103 w: &'a mut W,
104}
105impl<'a> I2C_PB8_FMP_W<'a> {
106 #[doc = r"Sets the field bit"]
107 #[inline(always)]
108 pub fn set_bit(self) -> &'a mut W {
109 self.bit(true)
110 }
111 #[doc = r"Clears the field bit"]
112 #[inline(always)]
113 pub fn clear_bit(self) -> &'a mut W {
114 self.bit(false)
115 }
116 #[doc = r"Writes raw bits to the field"]
117 #[inline(always)]
118 pub fn bit(self, value: bool) -> &'a mut W {
119 self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18);
120 self.w
121 }
122}
123#[doc = "Reader of field `I2C_PB7_FMP`"]
124pub type I2C_PB7_FMP_R = crate::R<bool, bool>;
125#[doc = "Write proxy for field `I2C_PB7_FMP`"]
126pub struct I2C_PB7_FMP_W<'a> {
127 w: &'a mut W,
128}
129impl<'a> I2C_PB7_FMP_W<'a> {
130 #[doc = r"Sets the field bit"]
131 #[inline(always)]
132 pub fn set_bit(self) -> &'a mut W {
133 self.bit(true)
134 }
135 #[doc = r"Clears the field bit"]
136 #[inline(always)]
137 pub fn clear_bit(self) -> &'a mut W {
138 self.bit(false)
139 }
140 #[doc = r"Writes raw bits to the field"]
141 #[inline(always)]
142 pub fn bit(self, value: bool) -> &'a mut W {
143 self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17);
144 self.w
145 }
146}
147#[doc = "Reader of field `I2C_PB6_FMP`"]
148pub type I2C_PB6_FMP_R = crate::R<bool, bool>;
149#[doc = "Write proxy for field `I2C_PB6_FMP`"]
150pub struct I2C_PB6_FMP_W<'a> {
151 w: &'a mut W,
152}
153impl<'a> I2C_PB6_FMP_W<'a> {
154 #[doc = r"Sets the field bit"]
155 #[inline(always)]
156 pub fn set_bit(self) -> &'a mut W {
157 self.bit(true)
158 }
159 #[doc = r"Clears the field bit"]
160 #[inline(always)]
161 pub fn clear_bit(self) -> &'a mut W {
162 self.bit(false)
163 }
164 #[doc = r"Writes raw bits to the field"]
165 #[inline(always)]
166 pub fn bit(self, value: bool) -> &'a mut W {
167 self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16);
168 self.w
169 }
170}
171#[doc = "Reader of field `BOOSTEN`"]
172pub type BOOSTEN_R = crate::R<bool, bool>;
173#[doc = "Write proxy for field `BOOSTEN`"]
174pub struct BOOSTEN_W<'a> {
175 w: &'a mut W,
176}
177impl<'a> BOOSTEN_W<'a> {
178 #[doc = r"Sets the field bit"]
179 #[inline(always)]
180 pub fn set_bit(self) -> &'a mut W {
181 self.bit(true)
182 }
183 #[doc = r"Clears the field bit"]
184 #[inline(always)]
185 pub fn clear_bit(self) -> &'a mut W {
186 self.bit(false)
187 }
188 #[doc = r"Writes raw bits to the field"]
189 #[inline(always)]
190 pub fn bit(self, value: bool) -> &'a mut W {
191 self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8);
192 self.w
193 }
194}
195impl R {
196 #[doc = "Bits 26:31 - Floating Point Unit interrupts enable bits"]
197 #[inline(always)]
198 pub fn fpu_ie(&self) -> FPU_IE_R {
199 FPU_IE_R::new(((self.bits >> 26) & 0x3f) as u8)
200 }
201 #[doc = "Bit 22 - I2C3 Fast-mode Plus driving capability activation"]
202 #[inline(always)]
203 pub fn i2c3_fmp(&self) -> I2C3_FMP_R {
204 I2C3_FMP_R::new(((self.bits >> 22) & 0x01) != 0)
205 }
206 #[doc = "Bit 20 - I2C1 Fast-mode Plus driving capability activation"]
207 #[inline(always)]
208 pub fn i2c1_fmp(&self) -> I2C1_FMP_R {
209 I2C1_FMP_R::new(((self.bits >> 20) & 0x01) != 0)
210 }
211 #[doc = "Bit 19 - Fast-mode Plus (Fm+) driving capability activation on PB9"]
212 #[inline(always)]
213 pub fn i2c_pb9_fmp(&self) -> I2C_PB9_FMP_R {
214 I2C_PB9_FMP_R::new(((self.bits >> 19) & 0x01) != 0)
215 }
216 #[doc = "Bit 18 - Fast-mode Plus (Fm+) driving capability activation on PB8"]
217 #[inline(always)]
218 pub fn i2c_pb8_fmp(&self) -> I2C_PB8_FMP_R {
219 I2C_PB8_FMP_R::new(((self.bits >> 18) & 0x01) != 0)
220 }
221 #[doc = "Bit 17 - Fast-mode Plus (Fm+) driving capability activation on PB7"]
222 #[inline(always)]
223 pub fn i2c_pb7_fmp(&self) -> I2C_PB7_FMP_R {
224 I2C_PB7_FMP_R::new(((self.bits >> 17) & 0x01) != 0)
225 }
226 #[doc = "Bit 16 - Fast-mode Plus (Fm+) driving capability activation on PB6"]
227 #[inline(always)]
228 pub fn i2c_pb6_fmp(&self) -> I2C_PB6_FMP_R {
229 I2C_PB6_FMP_R::new(((self.bits >> 16) & 0x01) != 0)
230 }
231 #[doc = "Bit 8 - I/O analog switch voltage booster enable"]
232 #[inline(always)]
233 pub fn boosten(&self) -> BOOSTEN_R {
234 BOOSTEN_R::new(((self.bits >> 8) & 0x01) != 0)
235 }
236}
237impl W {
238 #[doc = "Bits 26:31 - Floating Point Unit interrupts enable bits"]
239 #[inline(always)]
240 pub fn fpu_ie(&mut self) -> FPU_IE_W {
241 FPU_IE_W { w: self }
242 }
243 #[doc = "Bit 22 - I2C3 Fast-mode Plus driving capability activation"]
244 #[inline(always)]
245 pub fn i2c3_fmp(&mut self) -> I2C3_FMP_W {
246 I2C3_FMP_W { w: self }
247 }
248 #[doc = "Bit 20 - I2C1 Fast-mode Plus driving capability activation"]
249 #[inline(always)]
250 pub fn i2c1_fmp(&mut self) -> I2C1_FMP_W {
251 I2C1_FMP_W { w: self }
252 }
253 #[doc = "Bit 19 - Fast-mode Plus (Fm+) driving capability activation on PB9"]
254 #[inline(always)]
255 pub fn i2c_pb9_fmp(&mut self) -> I2C_PB9_FMP_W {
256 I2C_PB9_FMP_W { w: self }
257 }
258 #[doc = "Bit 18 - Fast-mode Plus (Fm+) driving capability activation on PB8"]
259 #[inline(always)]
260 pub fn i2c_pb8_fmp(&mut self) -> I2C_PB8_FMP_W {
261 I2C_PB8_FMP_W { w: self }
262 }
263 #[doc = "Bit 17 - Fast-mode Plus (Fm+) driving capability activation on PB7"]
264 #[inline(always)]
265 pub fn i2c_pb7_fmp(&mut self) -> I2C_PB7_FMP_W {
266 I2C_PB7_FMP_W { w: self }
267 }
268 #[doc = "Bit 16 - Fast-mode Plus (Fm+) driving capability activation on PB6"]
269 #[inline(always)]
270 pub fn i2c_pb6_fmp(&mut self) -> I2C_PB6_FMP_W {
271 I2C_PB6_FMP_W { w: self }
272 }
273 #[doc = "Bit 8 - I/O analog switch voltage booster enable"]
274 #[inline(always)]
275 pub fn boosten(&mut self) -> BOOSTEN_W {
276 BOOSTEN_W { w: self }
277 }
278}