stm32wb_pac/dmamux1/
cfr.rs1#[doc = "Writer for register CFR"]
2pub type W = crate::W<u32, super::CFR>;
3#[doc = "Register CFR `reset()`'s with value 0"]
4impl crate::ResetValue for super::CFR {
5 type Type = u32;
6 #[inline(always)]
7 fn reset_value() -> Self::Type {
8 0
9 }
10}
11#[doc = "Write proxy for field `CSOF0`"]
12pub struct CSOF0_W<'a> {
13 w: &'a mut W,
14}
15impl<'a> CSOF0_W<'a> {
16 #[doc = r"Sets the field bit"]
17 #[inline(always)]
18 pub fn set_bit(self) -> &'a mut W {
19 self.bit(true)
20 }
21 #[doc = r"Clears the field bit"]
22 #[inline(always)]
23 pub fn clear_bit(self) -> &'a mut W {
24 self.bit(false)
25 }
26 #[doc = r"Writes raw bits to the field"]
27 #[inline(always)]
28 pub fn bit(self, value: bool) -> &'a mut W {
29 self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
30 self.w
31 }
32}
33#[doc = "Write proxy for field `CSOF1`"]
34pub struct CSOF1_W<'a> {
35 w: &'a mut W,
36}
37impl<'a> CSOF1_W<'a> {
38 #[doc = r"Sets the field bit"]
39 #[inline(always)]
40 pub fn set_bit(self) -> &'a mut W {
41 self.bit(true)
42 }
43 #[doc = r"Clears the field bit"]
44 #[inline(always)]
45 pub fn clear_bit(self) -> &'a mut W {
46 self.bit(false)
47 }
48 #[doc = r"Writes raw bits to the field"]
49 #[inline(always)]
50 pub fn bit(self, value: bool) -> &'a mut W {
51 self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1);
52 self.w
53 }
54}
55#[doc = "Write proxy for field `CSOF2`"]
56pub struct CSOF2_W<'a> {
57 w: &'a mut W,
58}
59impl<'a> CSOF2_W<'a> {
60 #[doc = r"Sets the field bit"]
61 #[inline(always)]
62 pub fn set_bit(self) -> &'a mut W {
63 self.bit(true)
64 }
65 #[doc = r"Clears the field bit"]
66 #[inline(always)]
67 pub fn clear_bit(self) -> &'a mut W {
68 self.bit(false)
69 }
70 #[doc = r"Writes raw bits to the field"]
71 #[inline(always)]
72 pub fn bit(self, value: bool) -> &'a mut W {
73 self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
74 self.w
75 }
76}
77#[doc = "Write proxy for field `CSOF3`"]
78pub struct CSOF3_W<'a> {
79 w: &'a mut W,
80}
81impl<'a> CSOF3_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 << 3)) | (((value as u32) & 0x01) << 3);
96 self.w
97 }
98}
99#[doc = "Write proxy for field `CSOF4`"]
100pub struct CSOF4_W<'a> {
101 w: &'a mut W,
102}
103impl<'a> CSOF4_W<'a> {
104 #[doc = r"Sets the field bit"]
105 #[inline(always)]
106 pub fn set_bit(self) -> &'a mut W {
107 self.bit(true)
108 }
109 #[doc = r"Clears the field bit"]
110 #[inline(always)]
111 pub fn clear_bit(self) -> &'a mut W {
112 self.bit(false)
113 }
114 #[doc = r"Writes raw bits to the field"]
115 #[inline(always)]
116 pub fn bit(self, value: bool) -> &'a mut W {
117 self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
118 self.w
119 }
120}
121#[doc = "Write proxy for field `CSOF5`"]
122pub struct CSOF5_W<'a> {
123 w: &'a mut W,
124}
125impl<'a> CSOF5_W<'a> {
126 #[doc = r"Sets the field bit"]
127 #[inline(always)]
128 pub fn set_bit(self) -> &'a mut W {
129 self.bit(true)
130 }
131 #[doc = r"Clears the field bit"]
132 #[inline(always)]
133 pub fn clear_bit(self) -> &'a mut W {
134 self.bit(false)
135 }
136 #[doc = r"Writes raw bits to the field"]
137 #[inline(always)]
138 pub fn bit(self, value: bool) -> &'a mut W {
139 self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5);
140 self.w
141 }
142}
143#[doc = "Write proxy for field `CSOF6`"]
144pub struct CSOF6_W<'a> {
145 w: &'a mut W,
146}
147impl<'a> CSOF6_W<'a> {
148 #[doc = r"Sets the field bit"]
149 #[inline(always)]
150 pub fn set_bit(self) -> &'a mut W {
151 self.bit(true)
152 }
153 #[doc = r"Clears the field bit"]
154 #[inline(always)]
155 pub fn clear_bit(self) -> &'a mut W {
156 self.bit(false)
157 }
158 #[doc = r"Writes raw bits to the field"]
159 #[inline(always)]
160 pub fn bit(self, value: bool) -> &'a mut W {
161 self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6);
162 self.w
163 }
164}
165#[doc = "Write proxy for field `CSOF7`"]
166pub struct CSOF7_W<'a> {
167 w: &'a mut W,
168}
169impl<'a> CSOF7_W<'a> {
170 #[doc = r"Sets the field bit"]
171 #[inline(always)]
172 pub fn set_bit(self) -> &'a mut W {
173 self.bit(true)
174 }
175 #[doc = r"Clears the field bit"]
176 #[inline(always)]
177 pub fn clear_bit(self) -> &'a mut W {
178 self.bit(false)
179 }
180 #[doc = r"Writes raw bits to the field"]
181 #[inline(always)]
182 pub fn bit(self, value: bool) -> &'a mut W {
183 self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7);
184 self.w
185 }
186}
187#[doc = "Write proxy for field `CSOF8`"]
188pub struct CSOF8_W<'a> {
189 w: &'a mut W,
190}
191impl<'a> CSOF8_W<'a> {
192 #[doc = r"Sets the field bit"]
193 #[inline(always)]
194 pub fn set_bit(self) -> &'a mut W {
195 self.bit(true)
196 }
197 #[doc = r"Clears the field bit"]
198 #[inline(always)]
199 pub fn clear_bit(self) -> &'a mut W {
200 self.bit(false)
201 }
202 #[doc = r"Writes raw bits to the field"]
203 #[inline(always)]
204 pub fn bit(self, value: bool) -> &'a mut W {
205 self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8);
206 self.w
207 }
208}
209#[doc = "Write proxy for field `CSOF9`"]
210pub struct CSOF9_W<'a> {
211 w: &'a mut W,
212}
213impl<'a> CSOF9_W<'a> {
214 #[doc = r"Sets the field bit"]
215 #[inline(always)]
216 pub fn set_bit(self) -> &'a mut W {
217 self.bit(true)
218 }
219 #[doc = r"Clears the field bit"]
220 #[inline(always)]
221 pub fn clear_bit(self) -> &'a mut W {
222 self.bit(false)
223 }
224 #[doc = r"Writes raw bits to the field"]
225 #[inline(always)]
226 pub fn bit(self, value: bool) -> &'a mut W {
227 self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9);
228 self.w
229 }
230}
231#[doc = "Write proxy for field `CSOF10`"]
232pub struct CSOF10_W<'a> {
233 w: &'a mut W,
234}
235impl<'a> CSOF10_W<'a> {
236 #[doc = r"Sets the field bit"]
237 #[inline(always)]
238 pub fn set_bit(self) -> &'a mut W {
239 self.bit(true)
240 }
241 #[doc = r"Clears the field bit"]
242 #[inline(always)]
243 pub fn clear_bit(self) -> &'a mut W {
244 self.bit(false)
245 }
246 #[doc = r"Writes raw bits to the field"]
247 #[inline(always)]
248 pub fn bit(self, value: bool) -> &'a mut W {
249 self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10);
250 self.w
251 }
252}
253#[doc = "Write proxy for field `CSOF11`"]
254pub struct CSOF11_W<'a> {
255 w: &'a mut W,
256}
257impl<'a> CSOF11_W<'a> {
258 #[doc = r"Sets the field bit"]
259 #[inline(always)]
260 pub fn set_bit(self) -> &'a mut W {
261 self.bit(true)
262 }
263 #[doc = r"Clears the field bit"]
264 #[inline(always)]
265 pub fn clear_bit(self) -> &'a mut W {
266 self.bit(false)
267 }
268 #[doc = r"Writes raw bits to the field"]
269 #[inline(always)]
270 pub fn bit(self, value: bool) -> &'a mut W {
271 self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11);
272 self.w
273 }
274}
275#[doc = "Write proxy for field `CSOF12`"]
276pub struct CSOF12_W<'a> {
277 w: &'a mut W,
278}
279impl<'a> CSOF12_W<'a> {
280 #[doc = r"Sets the field bit"]
281 #[inline(always)]
282 pub fn set_bit(self) -> &'a mut W {
283 self.bit(true)
284 }
285 #[doc = r"Clears the field bit"]
286 #[inline(always)]
287 pub fn clear_bit(self) -> &'a mut W {
288 self.bit(false)
289 }
290 #[doc = r"Writes raw bits to the field"]
291 #[inline(always)]
292 pub fn bit(self, value: bool) -> &'a mut W {
293 self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12);
294 self.w
295 }
296}
297#[doc = "Write proxy for field `CSOF13`"]
298pub struct CSOF13_W<'a> {
299 w: &'a mut W,
300}
301impl<'a> CSOF13_W<'a> {
302 #[doc = r"Sets the field bit"]
303 #[inline(always)]
304 pub fn set_bit(self) -> &'a mut W {
305 self.bit(true)
306 }
307 #[doc = r"Clears the field bit"]
308 #[inline(always)]
309 pub fn clear_bit(self) -> &'a mut W {
310 self.bit(false)
311 }
312 #[doc = r"Writes raw bits to the field"]
313 #[inline(always)]
314 pub fn bit(self, value: bool) -> &'a mut W {
315 self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13);
316 self.w
317 }
318}
319impl W {
320 #[doc = "Bit 0 - Synchronization Clear Overrun Flag 0"]
321 #[inline(always)]
322 pub fn csof0(&mut self) -> CSOF0_W {
323 CSOF0_W { w: self }
324 }
325 #[doc = "Bit 1 - Synchronization Clear Overrun Flag 1"]
326 #[inline(always)]
327 pub fn csof1(&mut self) -> CSOF1_W {
328 CSOF1_W { w: self }
329 }
330 #[doc = "Bit 2 - Synchronization Clear Overrun Flag 2"]
331 #[inline(always)]
332 pub fn csof2(&mut self) -> CSOF2_W {
333 CSOF2_W { w: self }
334 }
335 #[doc = "Bit 3 - Synchronization Clear Overrun Flag 3"]
336 #[inline(always)]
337 pub fn csof3(&mut self) -> CSOF3_W {
338 CSOF3_W { w: self }
339 }
340 #[doc = "Bit 4 - Synchronization Clear Overrun Flag 4"]
341 #[inline(always)]
342 pub fn csof4(&mut self) -> CSOF4_W {
343 CSOF4_W { w: self }
344 }
345 #[doc = "Bit 5 - Synchronization Clear Overrun Flag 5"]
346 #[inline(always)]
347 pub fn csof5(&mut self) -> CSOF5_W {
348 CSOF5_W { w: self }
349 }
350 #[doc = "Bit 6 - Synchronization Clear Overrun Flag 6"]
351 #[inline(always)]
352 pub fn csof6(&mut self) -> CSOF6_W {
353 CSOF6_W { w: self }
354 }
355 #[doc = "Bit 7 - Synchronization Clear Overrun Flag 7"]
356 #[inline(always)]
357 pub fn csof7(&mut self) -> CSOF7_W {
358 CSOF7_W { w: self }
359 }
360 #[doc = "Bit 8 - Synchronization Clear Overrun Flag 8"]
361 #[inline(always)]
362 pub fn csof8(&mut self) -> CSOF8_W {
363 CSOF8_W { w: self }
364 }
365 #[doc = "Bit 9 - Synchronization Clear Overrun Flag 9"]
366 #[inline(always)]
367 pub fn csof9(&mut self) -> CSOF9_W {
368 CSOF9_W { w: self }
369 }
370 #[doc = "Bit 10 - Synchronization Clear Overrun Flag 10"]
371 #[inline(always)]
372 pub fn csof10(&mut self) -> CSOF10_W {
373 CSOF10_W { w: self }
374 }
375 #[doc = "Bit 11 - Synchronization Clear Overrun Flag 11"]
376 #[inline(always)]
377 pub fn csof11(&mut self) -> CSOF11_W {
378 CSOF11_W { w: self }
379 }
380 #[doc = "Bit 12 - Synchronization Clear Overrun Flag 12"]
381 #[inline(always)]
382 pub fn csof12(&mut self) -> CSOF12_W {
383 CSOF12_W { w: self }
384 }
385 #[doc = "Bit 13 - Synchronization Clear Overrun Flag 13"]
386 #[inline(always)]
387 pub fn csof13(&mut self) -> CSOF13_W {
388 CSOF13_W { w: self }
389 }
390}