stm32wb_pac/syscfg/
swpr.rs

1#[doc = "Writer for register SWPR"]
2pub type W = crate::W<u32, super::SWPR>;
3#[doc = "Register SWPR `reset()`'s with value 0"]
4impl crate::ResetValue for super::SWPR {
5    type Type = u32;
6    #[inline(always)]
7    fn reset_value() -> Self::Type {
8        0
9    }
10}
11#[doc = "Write proxy for field `P31WP`"]
12pub struct P31WP_W<'a> {
13    w: &'a mut W,
14}
15impl<'a> P31WP_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 << 31)) | (((value as u32) & 0x01) << 31);
30        self.w
31    }
32}
33#[doc = "Write proxy for field `P30WP`"]
34pub struct P30WP_W<'a> {
35    w: &'a mut W,
36}
37impl<'a> P30WP_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 << 30)) | (((value as u32) & 0x01) << 30);
52        self.w
53    }
54}
55#[doc = "Write proxy for field `P29WP`"]
56pub struct P29WP_W<'a> {
57    w: &'a mut W,
58}
59impl<'a> P29WP_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 << 29)) | (((value as u32) & 0x01) << 29);
74        self.w
75    }
76}
77#[doc = "Write proxy for field `P28WP`"]
78pub struct P28WP_W<'a> {
79    w: &'a mut W,
80}
81impl<'a> P28WP_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 << 28)) | (((value as u32) & 0x01) << 28);
96        self.w
97    }
98}
99#[doc = "Write proxy for field `P27WP`"]
100pub struct P27WP_W<'a> {
101    w: &'a mut W,
102}
103impl<'a> P27WP_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 << 27)) | (((value as u32) & 0x01) << 27);
118        self.w
119    }
120}
121#[doc = "Write proxy for field `P26WP`"]
122pub struct P26WP_W<'a> {
123    w: &'a mut W,
124}
125impl<'a> P26WP_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 << 26)) | (((value as u32) & 0x01) << 26);
140        self.w
141    }
142}
143#[doc = "Write proxy for field `P25WP`"]
144pub struct P25WP_W<'a> {
145    w: &'a mut W,
146}
147impl<'a> P25WP_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 << 25)) | (((value as u32) & 0x01) << 25);
162        self.w
163    }
164}
165#[doc = "Write proxy for field `P24WP`"]
166pub struct P24WP_W<'a> {
167    w: &'a mut W,
168}
169impl<'a> P24WP_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 << 24)) | (((value as u32) & 0x01) << 24);
184        self.w
185    }
186}
187#[doc = "Write proxy for field `P23WP`"]
188pub struct P23WP_W<'a> {
189    w: &'a mut W,
190}
191impl<'a> P23WP_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 << 23)) | (((value as u32) & 0x01) << 23);
206        self.w
207    }
208}
209#[doc = "Write proxy for field `P22WP`"]
210pub struct P22WP_W<'a> {
211    w: &'a mut W,
212}
213impl<'a> P22WP_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 << 22)) | (((value as u32) & 0x01) << 22);
228        self.w
229    }
230}
231#[doc = "Write proxy for field `P21WP`"]
232pub struct P21WP_W<'a> {
233    w: &'a mut W,
234}
235impl<'a> P21WP_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 << 21)) | (((value as u32) & 0x01) << 21);
250        self.w
251    }
252}
253#[doc = "Write proxy for field `P20WP`"]
254pub struct P20WP_W<'a> {
255    w: &'a mut W,
256}
257impl<'a> P20WP_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 << 20)) | (((value as u32) & 0x01) << 20);
272        self.w
273    }
274}
275#[doc = "Write proxy for field `P19WP`"]
276pub struct P19WP_W<'a> {
277    w: &'a mut W,
278}
279impl<'a> P19WP_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 << 19)) | (((value as u32) & 0x01) << 19);
294        self.w
295    }
296}
297#[doc = "Write proxy for field `P18WP`"]
298pub struct P18WP_W<'a> {
299    w: &'a mut W,
300}
301impl<'a> P18WP_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 << 18)) | (((value as u32) & 0x01) << 18);
316        self.w
317    }
318}
319#[doc = "Write proxy for field `P17WP`"]
320pub struct P17WP_W<'a> {
321    w: &'a mut W,
322}
323impl<'a> P17WP_W<'a> {
324    #[doc = r"Sets the field bit"]
325    #[inline(always)]
326    pub fn set_bit(self) -> &'a mut W {
327        self.bit(true)
328    }
329    #[doc = r"Clears the field bit"]
330    #[inline(always)]
331    pub fn clear_bit(self) -> &'a mut W {
332        self.bit(false)
333    }
334    #[doc = r"Writes raw bits to the field"]
335    #[inline(always)]
336    pub fn bit(self, value: bool) -> &'a mut W {
337        self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17);
338        self.w
339    }
340}
341#[doc = "Write proxy for field `P16WP`"]
342pub struct P16WP_W<'a> {
343    w: &'a mut W,
344}
345impl<'a> P16WP_W<'a> {
346    #[doc = r"Sets the field bit"]
347    #[inline(always)]
348    pub fn set_bit(self) -> &'a mut W {
349        self.bit(true)
350    }
351    #[doc = r"Clears the field bit"]
352    #[inline(always)]
353    pub fn clear_bit(self) -> &'a mut W {
354        self.bit(false)
355    }
356    #[doc = r"Writes raw bits to the field"]
357    #[inline(always)]
358    pub fn bit(self, value: bool) -> &'a mut W {
359        self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16);
360        self.w
361    }
362}
363#[doc = "Write proxy for field `P15WP`"]
364pub struct P15WP_W<'a> {
365    w: &'a mut W,
366}
367impl<'a> P15WP_W<'a> {
368    #[doc = r"Sets the field bit"]
369    #[inline(always)]
370    pub fn set_bit(self) -> &'a mut W {
371        self.bit(true)
372    }
373    #[doc = r"Clears the field bit"]
374    #[inline(always)]
375    pub fn clear_bit(self) -> &'a mut W {
376        self.bit(false)
377    }
378    #[doc = r"Writes raw bits to the field"]
379    #[inline(always)]
380    pub fn bit(self, value: bool) -> &'a mut W {
381        self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15);
382        self.w
383    }
384}
385#[doc = "Write proxy for field `P14WP`"]
386pub struct P14WP_W<'a> {
387    w: &'a mut W,
388}
389impl<'a> P14WP_W<'a> {
390    #[doc = r"Sets the field bit"]
391    #[inline(always)]
392    pub fn set_bit(self) -> &'a mut W {
393        self.bit(true)
394    }
395    #[doc = r"Clears the field bit"]
396    #[inline(always)]
397    pub fn clear_bit(self) -> &'a mut W {
398        self.bit(false)
399    }
400    #[doc = r"Writes raw bits to the field"]
401    #[inline(always)]
402    pub fn bit(self, value: bool) -> &'a mut W {
403        self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14);
404        self.w
405    }
406}
407#[doc = "Write proxy for field `P13WP`"]
408pub struct P13WP_W<'a> {
409    w: &'a mut W,
410}
411impl<'a> P13WP_W<'a> {
412    #[doc = r"Sets the field bit"]
413    #[inline(always)]
414    pub fn set_bit(self) -> &'a mut W {
415        self.bit(true)
416    }
417    #[doc = r"Clears the field bit"]
418    #[inline(always)]
419    pub fn clear_bit(self) -> &'a mut W {
420        self.bit(false)
421    }
422    #[doc = r"Writes raw bits to the field"]
423    #[inline(always)]
424    pub fn bit(self, value: bool) -> &'a mut W {
425        self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13);
426        self.w
427    }
428}
429#[doc = "Write proxy for field `P12WP`"]
430pub struct P12WP_W<'a> {
431    w: &'a mut W,
432}
433impl<'a> P12WP_W<'a> {
434    #[doc = r"Sets the field bit"]
435    #[inline(always)]
436    pub fn set_bit(self) -> &'a mut W {
437        self.bit(true)
438    }
439    #[doc = r"Clears the field bit"]
440    #[inline(always)]
441    pub fn clear_bit(self) -> &'a mut W {
442        self.bit(false)
443    }
444    #[doc = r"Writes raw bits to the field"]
445    #[inline(always)]
446    pub fn bit(self, value: bool) -> &'a mut W {
447        self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12);
448        self.w
449    }
450}
451#[doc = "Write proxy for field `P11WP`"]
452pub struct P11WP_W<'a> {
453    w: &'a mut W,
454}
455impl<'a> P11WP_W<'a> {
456    #[doc = r"Sets the field bit"]
457    #[inline(always)]
458    pub fn set_bit(self) -> &'a mut W {
459        self.bit(true)
460    }
461    #[doc = r"Clears the field bit"]
462    #[inline(always)]
463    pub fn clear_bit(self) -> &'a mut W {
464        self.bit(false)
465    }
466    #[doc = r"Writes raw bits to the field"]
467    #[inline(always)]
468    pub fn bit(self, value: bool) -> &'a mut W {
469        self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11);
470        self.w
471    }
472}
473#[doc = "Write proxy for field `P10WP`"]
474pub struct P10WP_W<'a> {
475    w: &'a mut W,
476}
477impl<'a> P10WP_W<'a> {
478    #[doc = r"Sets the field bit"]
479    #[inline(always)]
480    pub fn set_bit(self) -> &'a mut W {
481        self.bit(true)
482    }
483    #[doc = r"Clears the field bit"]
484    #[inline(always)]
485    pub fn clear_bit(self) -> &'a mut W {
486        self.bit(false)
487    }
488    #[doc = r"Writes raw bits to the field"]
489    #[inline(always)]
490    pub fn bit(self, value: bool) -> &'a mut W {
491        self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10);
492        self.w
493    }
494}
495#[doc = "Write proxy for field `P9WP`"]
496pub struct P9WP_W<'a> {
497    w: &'a mut W,
498}
499impl<'a> P9WP_W<'a> {
500    #[doc = r"Sets the field bit"]
501    #[inline(always)]
502    pub fn set_bit(self) -> &'a mut W {
503        self.bit(true)
504    }
505    #[doc = r"Clears the field bit"]
506    #[inline(always)]
507    pub fn clear_bit(self) -> &'a mut W {
508        self.bit(false)
509    }
510    #[doc = r"Writes raw bits to the field"]
511    #[inline(always)]
512    pub fn bit(self, value: bool) -> &'a mut W {
513        self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9);
514        self.w
515    }
516}
517#[doc = "Write proxy for field `P8WP`"]
518pub struct P8WP_W<'a> {
519    w: &'a mut W,
520}
521impl<'a> P8WP_W<'a> {
522    #[doc = r"Sets the field bit"]
523    #[inline(always)]
524    pub fn set_bit(self) -> &'a mut W {
525        self.bit(true)
526    }
527    #[doc = r"Clears the field bit"]
528    #[inline(always)]
529    pub fn clear_bit(self) -> &'a mut W {
530        self.bit(false)
531    }
532    #[doc = r"Writes raw bits to the field"]
533    #[inline(always)]
534    pub fn bit(self, value: bool) -> &'a mut W {
535        self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8);
536        self.w
537    }
538}
539#[doc = "Write proxy for field `P7WP`"]
540pub struct P7WP_W<'a> {
541    w: &'a mut W,
542}
543impl<'a> P7WP_W<'a> {
544    #[doc = r"Sets the field bit"]
545    #[inline(always)]
546    pub fn set_bit(self) -> &'a mut W {
547        self.bit(true)
548    }
549    #[doc = r"Clears the field bit"]
550    #[inline(always)]
551    pub fn clear_bit(self) -> &'a mut W {
552        self.bit(false)
553    }
554    #[doc = r"Writes raw bits to the field"]
555    #[inline(always)]
556    pub fn bit(self, value: bool) -> &'a mut W {
557        self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7);
558        self.w
559    }
560}
561#[doc = "Write proxy for field `P6WP`"]
562pub struct P6WP_W<'a> {
563    w: &'a mut W,
564}
565impl<'a> P6WP_W<'a> {
566    #[doc = r"Sets the field bit"]
567    #[inline(always)]
568    pub fn set_bit(self) -> &'a mut W {
569        self.bit(true)
570    }
571    #[doc = r"Clears the field bit"]
572    #[inline(always)]
573    pub fn clear_bit(self) -> &'a mut W {
574        self.bit(false)
575    }
576    #[doc = r"Writes raw bits to the field"]
577    #[inline(always)]
578    pub fn bit(self, value: bool) -> &'a mut W {
579        self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6);
580        self.w
581    }
582}
583#[doc = "Write proxy for field `P5WP`"]
584pub struct P5WP_W<'a> {
585    w: &'a mut W,
586}
587impl<'a> P5WP_W<'a> {
588    #[doc = r"Sets the field bit"]
589    #[inline(always)]
590    pub fn set_bit(self) -> &'a mut W {
591        self.bit(true)
592    }
593    #[doc = r"Clears the field bit"]
594    #[inline(always)]
595    pub fn clear_bit(self) -> &'a mut W {
596        self.bit(false)
597    }
598    #[doc = r"Writes raw bits to the field"]
599    #[inline(always)]
600    pub fn bit(self, value: bool) -> &'a mut W {
601        self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5);
602        self.w
603    }
604}
605#[doc = "Write proxy for field `P4WP`"]
606pub struct P4WP_W<'a> {
607    w: &'a mut W,
608}
609impl<'a> P4WP_W<'a> {
610    #[doc = r"Sets the field bit"]
611    #[inline(always)]
612    pub fn set_bit(self) -> &'a mut W {
613        self.bit(true)
614    }
615    #[doc = r"Clears the field bit"]
616    #[inline(always)]
617    pub fn clear_bit(self) -> &'a mut W {
618        self.bit(false)
619    }
620    #[doc = r"Writes raw bits to the field"]
621    #[inline(always)]
622    pub fn bit(self, value: bool) -> &'a mut W {
623        self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
624        self.w
625    }
626}
627#[doc = "Write proxy for field `P3WP`"]
628pub struct P3WP_W<'a> {
629    w: &'a mut W,
630}
631impl<'a> P3WP_W<'a> {
632    #[doc = r"Sets the field bit"]
633    #[inline(always)]
634    pub fn set_bit(self) -> &'a mut W {
635        self.bit(true)
636    }
637    #[doc = r"Clears the field bit"]
638    #[inline(always)]
639    pub fn clear_bit(self) -> &'a mut W {
640        self.bit(false)
641    }
642    #[doc = r"Writes raw bits to the field"]
643    #[inline(always)]
644    pub fn bit(self, value: bool) -> &'a mut W {
645        self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3);
646        self.w
647    }
648}
649#[doc = "Write proxy for field `P2WP`"]
650pub struct P2WP_W<'a> {
651    w: &'a mut W,
652}
653impl<'a> P2WP_W<'a> {
654    #[doc = r"Sets the field bit"]
655    #[inline(always)]
656    pub fn set_bit(self) -> &'a mut W {
657        self.bit(true)
658    }
659    #[doc = r"Clears the field bit"]
660    #[inline(always)]
661    pub fn clear_bit(self) -> &'a mut W {
662        self.bit(false)
663    }
664    #[doc = r"Writes raw bits to the field"]
665    #[inline(always)]
666    pub fn bit(self, value: bool) -> &'a mut W {
667        self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
668        self.w
669    }
670}
671#[doc = "Write proxy for field `P1WP`"]
672pub struct P1WP_W<'a> {
673    w: &'a mut W,
674}
675impl<'a> P1WP_W<'a> {
676    #[doc = r"Sets the field bit"]
677    #[inline(always)]
678    pub fn set_bit(self) -> &'a mut W {
679        self.bit(true)
680    }
681    #[doc = r"Clears the field bit"]
682    #[inline(always)]
683    pub fn clear_bit(self) -> &'a mut W {
684        self.bit(false)
685    }
686    #[doc = r"Writes raw bits to the field"]
687    #[inline(always)]
688    pub fn bit(self, value: bool) -> &'a mut W {
689        self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1);
690        self.w
691    }
692}
693#[doc = "Write proxy for field `P0WP`"]
694pub struct P0WP_W<'a> {
695    w: &'a mut W,
696}
697impl<'a> P0WP_W<'a> {
698    #[doc = r"Sets the field bit"]
699    #[inline(always)]
700    pub fn set_bit(self) -> &'a mut W {
701        self.bit(true)
702    }
703    #[doc = r"Clears the field bit"]
704    #[inline(always)]
705    pub fn clear_bit(self) -> &'a mut W {
706        self.bit(false)
707    }
708    #[doc = r"Writes raw bits to the field"]
709    #[inline(always)]
710    pub fn bit(self, value: bool) -> &'a mut W {
711        self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
712        self.w
713    }
714}
715impl W {
716    #[doc = "Bit 31 - SRAM2 page 31 write protection"]
717    #[inline(always)]
718    pub fn p31wp(&mut self) -> P31WP_W {
719        P31WP_W { w: self }
720    }
721    #[doc = "Bit 30 - P30WP"]
722    #[inline(always)]
723    pub fn p30wp(&mut self) -> P30WP_W {
724        P30WP_W { w: self }
725    }
726    #[doc = "Bit 29 - P29WP"]
727    #[inline(always)]
728    pub fn p29wp(&mut self) -> P29WP_W {
729        P29WP_W { w: self }
730    }
731    #[doc = "Bit 28 - P28WP"]
732    #[inline(always)]
733    pub fn p28wp(&mut self) -> P28WP_W {
734        P28WP_W { w: self }
735    }
736    #[doc = "Bit 27 - P27WP"]
737    #[inline(always)]
738    pub fn p27wp(&mut self) -> P27WP_W {
739        P27WP_W { w: self }
740    }
741    #[doc = "Bit 26 - P26WP"]
742    #[inline(always)]
743    pub fn p26wp(&mut self) -> P26WP_W {
744        P26WP_W { w: self }
745    }
746    #[doc = "Bit 25 - P25WP"]
747    #[inline(always)]
748    pub fn p25wp(&mut self) -> P25WP_W {
749        P25WP_W { w: self }
750    }
751    #[doc = "Bit 24 - P24WP"]
752    #[inline(always)]
753    pub fn p24wp(&mut self) -> P24WP_W {
754        P24WP_W { w: self }
755    }
756    #[doc = "Bit 23 - P23WP"]
757    #[inline(always)]
758    pub fn p23wp(&mut self) -> P23WP_W {
759        P23WP_W { w: self }
760    }
761    #[doc = "Bit 22 - P22WP"]
762    #[inline(always)]
763    pub fn p22wp(&mut self) -> P22WP_W {
764        P22WP_W { w: self }
765    }
766    #[doc = "Bit 21 - P21WP"]
767    #[inline(always)]
768    pub fn p21wp(&mut self) -> P21WP_W {
769        P21WP_W { w: self }
770    }
771    #[doc = "Bit 20 - P20WP"]
772    #[inline(always)]
773    pub fn p20wp(&mut self) -> P20WP_W {
774        P20WP_W { w: self }
775    }
776    #[doc = "Bit 19 - P19WP"]
777    #[inline(always)]
778    pub fn p19wp(&mut self) -> P19WP_W {
779        P19WP_W { w: self }
780    }
781    #[doc = "Bit 18 - P18WP"]
782    #[inline(always)]
783    pub fn p18wp(&mut self) -> P18WP_W {
784        P18WP_W { w: self }
785    }
786    #[doc = "Bit 17 - P17WP"]
787    #[inline(always)]
788    pub fn p17wp(&mut self) -> P17WP_W {
789        P17WP_W { w: self }
790    }
791    #[doc = "Bit 16 - P16WP"]
792    #[inline(always)]
793    pub fn p16wp(&mut self) -> P16WP_W {
794        P16WP_W { w: self }
795    }
796    #[doc = "Bit 15 - P15WP"]
797    #[inline(always)]
798    pub fn p15wp(&mut self) -> P15WP_W {
799        P15WP_W { w: self }
800    }
801    #[doc = "Bit 14 - P14WP"]
802    #[inline(always)]
803    pub fn p14wp(&mut self) -> P14WP_W {
804        P14WP_W { w: self }
805    }
806    #[doc = "Bit 13 - P13WP"]
807    #[inline(always)]
808    pub fn p13wp(&mut self) -> P13WP_W {
809        P13WP_W { w: self }
810    }
811    #[doc = "Bit 12 - P12WP"]
812    #[inline(always)]
813    pub fn p12wp(&mut self) -> P12WP_W {
814        P12WP_W { w: self }
815    }
816    #[doc = "Bit 11 - P11WP"]
817    #[inline(always)]
818    pub fn p11wp(&mut self) -> P11WP_W {
819        P11WP_W { w: self }
820    }
821    #[doc = "Bit 10 - P10WP"]
822    #[inline(always)]
823    pub fn p10wp(&mut self) -> P10WP_W {
824        P10WP_W { w: self }
825    }
826    #[doc = "Bit 9 - P9WP"]
827    #[inline(always)]
828    pub fn p9wp(&mut self) -> P9WP_W {
829        P9WP_W { w: self }
830    }
831    #[doc = "Bit 8 - P8WP"]
832    #[inline(always)]
833    pub fn p8wp(&mut self) -> P8WP_W {
834        P8WP_W { w: self }
835    }
836    #[doc = "Bit 7 - P7WP"]
837    #[inline(always)]
838    pub fn p7wp(&mut self) -> P7WP_W {
839        P7WP_W { w: self }
840    }
841    #[doc = "Bit 6 - P6WP"]
842    #[inline(always)]
843    pub fn p6wp(&mut self) -> P6WP_W {
844        P6WP_W { w: self }
845    }
846    #[doc = "Bit 5 - P5WP"]
847    #[inline(always)]
848    pub fn p5wp(&mut self) -> P5WP_W {
849        P5WP_W { w: self }
850    }
851    #[doc = "Bit 4 - P4WP"]
852    #[inline(always)]
853    pub fn p4wp(&mut self) -> P4WP_W {
854        P4WP_W { w: self }
855    }
856    #[doc = "Bit 3 - P3WP"]
857    #[inline(always)]
858    pub fn p3wp(&mut self) -> P3WP_W {
859        P3WP_W { w: self }
860    }
861    #[doc = "Bit 2 - P2WP"]
862    #[inline(always)]
863    pub fn p2wp(&mut self) -> P2WP_W {
864        P2WP_W { w: self }
865    }
866    #[doc = "Bit 1 - P1WP"]
867    #[inline(always)]
868    pub fn p1wp(&mut self) -> P1WP_W {
869        P1WP_W { w: self }
870    }
871    #[doc = "Bit 0 - P0WP"]
872    #[inline(always)]
873    pub fn p0wp(&mut self) -> P0WP_W {
874        P0WP_W { w: self }
875    }
876}