stm32l4x2_pac/rcc/
apb1rstr1.rs

1#[doc = r" Value read from the register"]
2pub struct R {
3    bits: u32,
4}
5#[doc = r" Value to write to the register"]
6pub struct W {
7    bits: u32,
8}
9impl super::APB1RSTR1 {
10    #[doc = r" Modifies the contents of the register"]
11    #[inline]
12    pub fn modify<F>(&self, f: F)
13    where
14        for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
15    {
16        let bits = self.register.get();
17        let r = R { bits: bits };
18        let mut w = W { bits: bits };
19        f(&r, &mut w);
20        self.register.set(w.bits);
21    }
22    #[doc = r" Reads the contents of the register"]
23    #[inline]
24    pub fn read(&self) -> R {
25        R {
26            bits: self.register.get(),
27        }
28    }
29    #[doc = r" Writes to the register"]
30    #[inline]
31    pub fn write<F>(&self, f: F)
32    where
33        F: FnOnce(&mut W) -> &mut W,
34    {
35        let mut w = W::reset_value();
36        f(&mut w);
37        self.register.set(w.bits);
38    }
39    #[doc = r" Writes the reset value to the register"]
40    #[inline]
41    pub fn reset(&self) {
42        self.write(|w| w)
43    }
44}
45#[doc = r" Value of the field"]
46pub struct LPTIM1RSTR {
47    bits: bool,
48}
49impl LPTIM1RSTR {
50    #[doc = r" Value of the field as raw bits"]
51    #[inline]
52    pub fn bit(&self) -> bool {
53        self.bits
54    }
55    #[doc = r" Returns `true` if the bit is clear (0)"]
56    #[inline]
57    pub fn bit_is_clear(&self) -> bool {
58        !self.bit()
59    }
60    #[doc = r" Returns `true` if the bit is set (1)"]
61    #[inline]
62    pub fn bit_is_set(&self) -> bool {
63        self.bit()
64    }
65}
66#[doc = r" Value of the field"]
67pub struct OPAMPRSTR {
68    bits: bool,
69}
70impl OPAMPRSTR {
71    #[doc = r" Value of the field as raw bits"]
72    #[inline]
73    pub fn bit(&self) -> bool {
74        self.bits
75    }
76    #[doc = r" Returns `true` if the bit is clear (0)"]
77    #[inline]
78    pub fn bit_is_clear(&self) -> bool {
79        !self.bit()
80    }
81    #[doc = r" Returns `true` if the bit is set (1)"]
82    #[inline]
83    pub fn bit_is_set(&self) -> bool {
84        self.bit()
85    }
86}
87#[doc = r" Value of the field"]
88pub struct DAC1RSTR {
89    bits: bool,
90}
91impl DAC1RSTR {
92    #[doc = r" Value of the field as raw bits"]
93    #[inline]
94    pub fn bit(&self) -> bool {
95        self.bits
96    }
97    #[doc = r" Returns `true` if the bit is clear (0)"]
98    #[inline]
99    pub fn bit_is_clear(&self) -> bool {
100        !self.bit()
101    }
102    #[doc = r" Returns `true` if the bit is set (1)"]
103    #[inline]
104    pub fn bit_is_set(&self) -> bool {
105        self.bit()
106    }
107}
108#[doc = r" Value of the field"]
109pub struct PWRRSTR {
110    bits: bool,
111}
112impl PWRRSTR {
113    #[doc = r" Value of the field as raw bits"]
114    #[inline]
115    pub fn bit(&self) -> bool {
116        self.bits
117    }
118    #[doc = r" Returns `true` if the bit is clear (0)"]
119    #[inline]
120    pub fn bit_is_clear(&self) -> bool {
121        !self.bit()
122    }
123    #[doc = r" Returns `true` if the bit is set (1)"]
124    #[inline]
125    pub fn bit_is_set(&self) -> bool {
126        self.bit()
127    }
128}
129#[doc = r" Value of the field"]
130pub struct CAN1RSTR {
131    bits: bool,
132}
133impl CAN1RSTR {
134    #[doc = r" Value of the field as raw bits"]
135    #[inline]
136    pub fn bit(&self) -> bool {
137        self.bits
138    }
139    #[doc = r" Returns `true` if the bit is clear (0)"]
140    #[inline]
141    pub fn bit_is_clear(&self) -> bool {
142        !self.bit()
143    }
144    #[doc = r" Returns `true` if the bit is set (1)"]
145    #[inline]
146    pub fn bit_is_set(&self) -> bool {
147        self.bit()
148    }
149}
150#[doc = r" Value of the field"]
151pub struct I2C3RSTR {
152    bits: bool,
153}
154impl I2C3RSTR {
155    #[doc = r" Value of the field as raw bits"]
156    #[inline]
157    pub fn bit(&self) -> bool {
158        self.bits
159    }
160    #[doc = r" Returns `true` if the bit is clear (0)"]
161    #[inline]
162    pub fn bit_is_clear(&self) -> bool {
163        !self.bit()
164    }
165    #[doc = r" Returns `true` if the bit is set (1)"]
166    #[inline]
167    pub fn bit_is_set(&self) -> bool {
168        self.bit()
169    }
170}
171#[doc = r" Value of the field"]
172pub struct I2C1RSTR {
173    bits: bool,
174}
175impl I2C1RSTR {
176    #[doc = r" Value of the field as raw bits"]
177    #[inline]
178    pub fn bit(&self) -> bool {
179        self.bits
180    }
181    #[doc = r" Returns `true` if the bit is clear (0)"]
182    #[inline]
183    pub fn bit_is_clear(&self) -> bool {
184        !self.bit()
185    }
186    #[doc = r" Returns `true` if the bit is set (1)"]
187    #[inline]
188    pub fn bit_is_set(&self) -> bool {
189        self.bit()
190    }
191}
192#[doc = r" Value of the field"]
193pub struct USART1RSTR {
194    bits: bool,
195}
196impl USART1RSTR {
197    #[doc = r" Value of the field as raw bits"]
198    #[inline]
199    pub fn bit(&self) -> bool {
200        self.bits
201    }
202    #[doc = r" Returns `true` if the bit is clear (0)"]
203    #[inline]
204    pub fn bit_is_clear(&self) -> bool {
205        !self.bit()
206    }
207    #[doc = r" Returns `true` if the bit is set (1)"]
208    #[inline]
209    pub fn bit_is_set(&self) -> bool {
210        self.bit()
211    }
212}
213#[doc = r" Value of the field"]
214pub struct USART2RSTR {
215    bits: bool,
216}
217impl USART2RSTR {
218    #[doc = r" Value of the field as raw bits"]
219    #[inline]
220    pub fn bit(&self) -> bool {
221        self.bits
222    }
223    #[doc = r" Returns `true` if the bit is clear (0)"]
224    #[inline]
225    pub fn bit_is_clear(&self) -> bool {
226        !self.bit()
227    }
228    #[doc = r" Returns `true` if the bit is set (1)"]
229    #[inline]
230    pub fn bit_is_set(&self) -> bool {
231        self.bit()
232    }
233}
234#[doc = r" Value of the field"]
235pub struct SPI3RSTR {
236    bits: bool,
237}
238impl SPI3RSTR {
239    #[doc = r" Value of the field as raw bits"]
240    #[inline]
241    pub fn bit(&self) -> bool {
242        self.bits
243    }
244    #[doc = r" Returns `true` if the bit is clear (0)"]
245    #[inline]
246    pub fn bit_is_clear(&self) -> bool {
247        !self.bit()
248    }
249    #[doc = r" Returns `true` if the bit is set (1)"]
250    #[inline]
251    pub fn bit_is_set(&self) -> bool {
252        self.bit()
253    }
254}
255#[doc = r" Value of the field"]
256pub struct SPI2RSTR {
257    bits: bool,
258}
259impl SPI2RSTR {
260    #[doc = r" Value of the field as raw bits"]
261    #[inline]
262    pub fn bit(&self) -> bool {
263        self.bits
264    }
265    #[doc = r" Returns `true` if the bit is clear (0)"]
266    #[inline]
267    pub fn bit_is_clear(&self) -> bool {
268        !self.bit()
269    }
270    #[doc = r" Returns `true` if the bit is set (1)"]
271    #[inline]
272    pub fn bit_is_set(&self) -> bool {
273        self.bit()
274    }
275}
276#[doc = r" Value of the field"]
277pub struct LCDRSTR {
278    bits: bool,
279}
280impl LCDRSTR {
281    #[doc = r" Value of the field as raw bits"]
282    #[inline]
283    pub fn bit(&self) -> bool {
284        self.bits
285    }
286    #[doc = r" Returns `true` if the bit is clear (0)"]
287    #[inline]
288    pub fn bit_is_clear(&self) -> bool {
289        !self.bit()
290    }
291    #[doc = r" Returns `true` if the bit is set (1)"]
292    #[inline]
293    pub fn bit_is_set(&self) -> bool {
294        self.bit()
295    }
296}
297#[doc = r" Value of the field"]
298pub struct TIM7RSTR {
299    bits: bool,
300}
301impl TIM7RSTR {
302    #[doc = r" Value of the field as raw bits"]
303    #[inline]
304    pub fn bit(&self) -> bool {
305        self.bits
306    }
307    #[doc = r" Returns `true` if the bit is clear (0)"]
308    #[inline]
309    pub fn bit_is_clear(&self) -> bool {
310        !self.bit()
311    }
312    #[doc = r" Returns `true` if the bit is set (1)"]
313    #[inline]
314    pub fn bit_is_set(&self) -> bool {
315        self.bit()
316    }
317}
318#[doc = r" Value of the field"]
319pub struct TIM6RSTR {
320    bits: bool,
321}
322impl TIM6RSTR {
323    #[doc = r" Value of the field as raw bits"]
324    #[inline]
325    pub fn bit(&self) -> bool {
326        self.bits
327    }
328    #[doc = r" Returns `true` if the bit is clear (0)"]
329    #[inline]
330    pub fn bit_is_clear(&self) -> bool {
331        !self.bit()
332    }
333    #[doc = r" Returns `true` if the bit is set (1)"]
334    #[inline]
335    pub fn bit_is_set(&self) -> bool {
336        self.bit()
337    }
338}
339#[doc = r" Value of the field"]
340pub struct TIM2RSTR {
341    bits: bool,
342}
343impl TIM2RSTR {
344    #[doc = r" Value of the field as raw bits"]
345    #[inline]
346    pub fn bit(&self) -> bool {
347        self.bits
348    }
349    #[doc = r" Returns `true` if the bit is clear (0)"]
350    #[inline]
351    pub fn bit_is_clear(&self) -> bool {
352        !self.bit()
353    }
354    #[doc = r" Returns `true` if the bit is set (1)"]
355    #[inline]
356    pub fn bit_is_set(&self) -> bool {
357        self.bit()
358    }
359}
360#[doc = r" Value of the field"]
361pub struct USART4RSTR {
362    bits: bool,
363}
364impl USART4RSTR {
365    #[doc = r" Value of the field as raw bits"]
366    #[inline]
367    pub fn bit(&self) -> bool {
368        self.bits
369    }
370    #[doc = r" Returns `true` if the bit is clear (0)"]
371    #[inline]
372    pub fn bit_is_clear(&self) -> bool {
373        !self.bit()
374    }
375    #[doc = r" Returns `true` if the bit is set (1)"]
376    #[inline]
377    pub fn bit_is_set(&self) -> bool {
378        self.bit()
379    }
380}
381#[doc = r" Value of the field"]
382pub struct I2C2RSTR {
383    bits: bool,
384}
385impl I2C2RSTR {
386    #[doc = r" Value of the field as raw bits"]
387    #[inline]
388    pub fn bit(&self) -> bool {
389        self.bits
390    }
391    #[doc = r" Returns `true` if the bit is clear (0)"]
392    #[inline]
393    pub fn bit_is_clear(&self) -> bool {
394        !self.bit()
395    }
396    #[doc = r" Returns `true` if the bit is set (1)"]
397    #[inline]
398    pub fn bit_is_set(&self) -> bool {
399        self.bit()
400    }
401}
402#[doc = r" Value of the field"]
403pub struct CRSRSTR {
404    bits: bool,
405}
406impl CRSRSTR {
407    #[doc = r" Value of the field as raw bits"]
408    #[inline]
409    pub fn bit(&self) -> bool {
410        self.bits
411    }
412    #[doc = r" Returns `true` if the bit is clear (0)"]
413    #[inline]
414    pub fn bit_is_clear(&self) -> bool {
415        !self.bit()
416    }
417    #[doc = r" Returns `true` if the bit is set (1)"]
418    #[inline]
419    pub fn bit_is_set(&self) -> bool {
420        self.bit()
421    }
422}
423#[doc = r" Value of the field"]
424pub struct USBFSRSTR {
425    bits: bool,
426}
427impl USBFSRSTR {
428    #[doc = r" Value of the field as raw bits"]
429    #[inline]
430    pub fn bit(&self) -> bool {
431        self.bits
432    }
433    #[doc = r" Returns `true` if the bit is clear (0)"]
434    #[inline]
435    pub fn bit_is_clear(&self) -> bool {
436        !self.bit()
437    }
438    #[doc = r" Returns `true` if the bit is set (1)"]
439    #[inline]
440    pub fn bit_is_set(&self) -> bool {
441        self.bit()
442    }
443}
444#[doc = r" Proxy"]
445pub struct _LPTIM1RSTW<'a> {
446    w: &'a mut W,
447}
448impl<'a> _LPTIM1RSTW<'a> {
449    #[doc = r" Sets the field bit"]
450    pub fn set_bit(self) -> &'a mut W {
451        self.bit(true)
452    }
453    #[doc = r" Clears the field bit"]
454    pub fn clear_bit(self) -> &'a mut W {
455        self.bit(false)
456    }
457    #[doc = r" Writes raw bits to the field"]
458    #[inline]
459    pub fn bit(self, value: bool) -> &'a mut W {
460        const MASK: bool = true;
461        const OFFSET: u8 = 31;
462        self.w.bits &= !((MASK as u32) << OFFSET);
463        self.w.bits |= ((value & MASK) as u32) << OFFSET;
464        self.w
465    }
466}
467#[doc = r" Proxy"]
468pub struct _OPAMPRSTW<'a> {
469    w: &'a mut W,
470}
471impl<'a> _OPAMPRSTW<'a> {
472    #[doc = r" Sets the field bit"]
473    pub fn set_bit(self) -> &'a mut W {
474        self.bit(true)
475    }
476    #[doc = r" Clears the field bit"]
477    pub fn clear_bit(self) -> &'a mut W {
478        self.bit(false)
479    }
480    #[doc = r" Writes raw bits to the field"]
481    #[inline]
482    pub fn bit(self, value: bool) -> &'a mut W {
483        const MASK: bool = true;
484        const OFFSET: u8 = 30;
485        self.w.bits &= !((MASK as u32) << OFFSET);
486        self.w.bits |= ((value & MASK) as u32) << OFFSET;
487        self.w
488    }
489}
490#[doc = r" Proxy"]
491pub struct _DAC1RSTW<'a> {
492    w: &'a mut W,
493}
494impl<'a> _DAC1RSTW<'a> {
495    #[doc = r" Sets the field bit"]
496    pub fn set_bit(self) -> &'a mut W {
497        self.bit(true)
498    }
499    #[doc = r" Clears the field bit"]
500    pub fn clear_bit(self) -> &'a mut W {
501        self.bit(false)
502    }
503    #[doc = r" Writes raw bits to the field"]
504    #[inline]
505    pub fn bit(self, value: bool) -> &'a mut W {
506        const MASK: bool = true;
507        const OFFSET: u8 = 29;
508        self.w.bits &= !((MASK as u32) << OFFSET);
509        self.w.bits |= ((value & MASK) as u32) << OFFSET;
510        self.w
511    }
512}
513#[doc = r" Proxy"]
514pub struct _PWRRSTW<'a> {
515    w: &'a mut W,
516}
517impl<'a> _PWRRSTW<'a> {
518    #[doc = r" Sets the field bit"]
519    pub fn set_bit(self) -> &'a mut W {
520        self.bit(true)
521    }
522    #[doc = r" Clears the field bit"]
523    pub fn clear_bit(self) -> &'a mut W {
524        self.bit(false)
525    }
526    #[doc = r" Writes raw bits to the field"]
527    #[inline]
528    pub fn bit(self, value: bool) -> &'a mut W {
529        const MASK: bool = true;
530        const OFFSET: u8 = 28;
531        self.w.bits &= !((MASK as u32) << OFFSET);
532        self.w.bits |= ((value & MASK) as u32) << OFFSET;
533        self.w
534    }
535}
536#[doc = r" Proxy"]
537pub struct _CAN1RSTW<'a> {
538    w: &'a mut W,
539}
540impl<'a> _CAN1RSTW<'a> {
541    #[doc = r" Sets the field bit"]
542    pub fn set_bit(self) -> &'a mut W {
543        self.bit(true)
544    }
545    #[doc = r" Clears the field bit"]
546    pub fn clear_bit(self) -> &'a mut W {
547        self.bit(false)
548    }
549    #[doc = r" Writes raw bits to the field"]
550    #[inline]
551    pub fn bit(self, value: bool) -> &'a mut W {
552        const MASK: bool = true;
553        const OFFSET: u8 = 25;
554        self.w.bits &= !((MASK as u32) << OFFSET);
555        self.w.bits |= ((value & MASK) as u32) << OFFSET;
556        self.w
557    }
558}
559#[doc = r" Proxy"]
560pub struct _I2C3RSTW<'a> {
561    w: &'a mut W,
562}
563impl<'a> _I2C3RSTW<'a> {
564    #[doc = r" Sets the field bit"]
565    pub fn set_bit(self) -> &'a mut W {
566        self.bit(true)
567    }
568    #[doc = r" Clears the field bit"]
569    pub fn clear_bit(self) -> &'a mut W {
570        self.bit(false)
571    }
572    #[doc = r" Writes raw bits to the field"]
573    #[inline]
574    pub fn bit(self, value: bool) -> &'a mut W {
575        const MASK: bool = true;
576        const OFFSET: u8 = 23;
577        self.w.bits &= !((MASK as u32) << OFFSET);
578        self.w.bits |= ((value & MASK) as u32) << OFFSET;
579        self.w
580    }
581}
582#[doc = r" Proxy"]
583pub struct _I2C1RSTW<'a> {
584    w: &'a mut W,
585}
586impl<'a> _I2C1RSTW<'a> {
587    #[doc = r" Sets the field bit"]
588    pub fn set_bit(self) -> &'a mut W {
589        self.bit(true)
590    }
591    #[doc = r" Clears the field bit"]
592    pub fn clear_bit(self) -> &'a mut W {
593        self.bit(false)
594    }
595    #[doc = r" Writes raw bits to the field"]
596    #[inline]
597    pub fn bit(self, value: bool) -> &'a mut W {
598        const MASK: bool = true;
599        const OFFSET: u8 = 21;
600        self.w.bits &= !((MASK as u32) << OFFSET);
601        self.w.bits |= ((value & MASK) as u32) << OFFSET;
602        self.w
603    }
604}
605#[doc = r" Proxy"]
606pub struct _USART1RSTW<'a> {
607    w: &'a mut W,
608}
609impl<'a> _USART1RSTW<'a> {
610    #[doc = r" Sets the field bit"]
611    pub fn set_bit(self) -> &'a mut W {
612        self.bit(true)
613    }
614    #[doc = r" Clears the field bit"]
615    pub fn clear_bit(self) -> &'a mut W {
616        self.bit(false)
617    }
618    #[doc = r" Writes raw bits to the field"]
619    #[inline]
620    pub fn bit(self, value: bool) -> &'a mut W {
621        const MASK: bool = true;
622        const OFFSET: u8 = 18;
623        self.w.bits &= !((MASK as u32) << OFFSET);
624        self.w.bits |= ((value & MASK) as u32) << OFFSET;
625        self.w
626    }
627}
628#[doc = r" Proxy"]
629pub struct _USART2RSTW<'a> {
630    w: &'a mut W,
631}
632impl<'a> _USART2RSTW<'a> {
633    #[doc = r" Sets the field bit"]
634    pub fn set_bit(self) -> &'a mut W {
635        self.bit(true)
636    }
637    #[doc = r" Clears the field bit"]
638    pub fn clear_bit(self) -> &'a mut W {
639        self.bit(false)
640    }
641    #[doc = r" Writes raw bits to the field"]
642    #[inline]
643    pub fn bit(self, value: bool) -> &'a mut W {
644        const MASK: bool = true;
645        const OFFSET: u8 = 17;
646        self.w.bits &= !((MASK as u32) << OFFSET);
647        self.w.bits |= ((value & MASK) as u32) << OFFSET;
648        self.w
649    }
650}
651#[doc = r" Proxy"]
652pub struct _SPI3RSTW<'a> {
653    w: &'a mut W,
654}
655impl<'a> _SPI3RSTW<'a> {
656    #[doc = r" Sets the field bit"]
657    pub fn set_bit(self) -> &'a mut W {
658        self.bit(true)
659    }
660    #[doc = r" Clears the field bit"]
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]
666    pub fn bit(self, value: bool) -> &'a mut W {
667        const MASK: bool = true;
668        const OFFSET: u8 = 15;
669        self.w.bits &= !((MASK as u32) << OFFSET);
670        self.w.bits |= ((value & MASK) as u32) << OFFSET;
671        self.w
672    }
673}
674#[doc = r" Proxy"]
675pub struct _SPI2RSTW<'a> {
676    w: &'a mut W,
677}
678impl<'a> _SPI2RSTW<'a> {
679    #[doc = r" Sets the field bit"]
680    pub fn set_bit(self) -> &'a mut W {
681        self.bit(true)
682    }
683    #[doc = r" Clears the field bit"]
684    pub fn clear_bit(self) -> &'a mut W {
685        self.bit(false)
686    }
687    #[doc = r" Writes raw bits to the field"]
688    #[inline]
689    pub fn bit(self, value: bool) -> &'a mut W {
690        const MASK: bool = true;
691        const OFFSET: u8 = 14;
692        self.w.bits &= !((MASK as u32) << OFFSET);
693        self.w.bits |= ((value & MASK) as u32) << OFFSET;
694        self.w
695    }
696}
697#[doc = r" Proxy"]
698pub struct _LCDRSTW<'a> {
699    w: &'a mut W,
700}
701impl<'a> _LCDRSTW<'a> {
702    #[doc = r" Sets the field bit"]
703    pub fn set_bit(self) -> &'a mut W {
704        self.bit(true)
705    }
706    #[doc = r" Clears the field bit"]
707    pub fn clear_bit(self) -> &'a mut W {
708        self.bit(false)
709    }
710    #[doc = r" Writes raw bits to the field"]
711    #[inline]
712    pub fn bit(self, value: bool) -> &'a mut W {
713        const MASK: bool = true;
714        const OFFSET: u8 = 9;
715        self.w.bits &= !((MASK as u32) << OFFSET);
716        self.w.bits |= ((value & MASK) as u32) << OFFSET;
717        self.w
718    }
719}
720#[doc = r" Proxy"]
721pub struct _TIM7RSTW<'a> {
722    w: &'a mut W,
723}
724impl<'a> _TIM7RSTW<'a> {
725    #[doc = r" Sets the field bit"]
726    pub fn set_bit(self) -> &'a mut W {
727        self.bit(true)
728    }
729    #[doc = r" Clears the field bit"]
730    pub fn clear_bit(self) -> &'a mut W {
731        self.bit(false)
732    }
733    #[doc = r" Writes raw bits to the field"]
734    #[inline]
735    pub fn bit(self, value: bool) -> &'a mut W {
736        const MASK: bool = true;
737        const OFFSET: u8 = 5;
738        self.w.bits &= !((MASK as u32) << OFFSET);
739        self.w.bits |= ((value & MASK) as u32) << OFFSET;
740        self.w
741    }
742}
743#[doc = r" Proxy"]
744pub struct _TIM6RSTW<'a> {
745    w: &'a mut W,
746}
747impl<'a> _TIM6RSTW<'a> {
748    #[doc = r" Sets the field bit"]
749    pub fn set_bit(self) -> &'a mut W {
750        self.bit(true)
751    }
752    #[doc = r" Clears the field bit"]
753    pub fn clear_bit(self) -> &'a mut W {
754        self.bit(false)
755    }
756    #[doc = r" Writes raw bits to the field"]
757    #[inline]
758    pub fn bit(self, value: bool) -> &'a mut W {
759        const MASK: bool = true;
760        const OFFSET: u8 = 4;
761        self.w.bits &= !((MASK as u32) << OFFSET);
762        self.w.bits |= ((value & MASK) as u32) << OFFSET;
763        self.w
764    }
765}
766#[doc = r" Proxy"]
767pub struct _TIM2RSTW<'a> {
768    w: &'a mut W,
769}
770impl<'a> _TIM2RSTW<'a> {
771    #[doc = r" Sets the field bit"]
772    pub fn set_bit(self) -> &'a mut W {
773        self.bit(true)
774    }
775    #[doc = r" Clears the field bit"]
776    pub fn clear_bit(self) -> &'a mut W {
777        self.bit(false)
778    }
779    #[doc = r" Writes raw bits to the field"]
780    #[inline]
781    pub fn bit(self, value: bool) -> &'a mut W {
782        const MASK: bool = true;
783        const OFFSET: u8 = 0;
784        self.w.bits &= !((MASK as u32) << OFFSET);
785        self.w.bits |= ((value & MASK) as u32) << OFFSET;
786        self.w
787    }
788}
789#[doc = r" Proxy"]
790pub struct _USART4RSTW<'a> {
791    w: &'a mut W,
792}
793impl<'a> _USART4RSTW<'a> {
794    #[doc = r" Sets the field bit"]
795    pub fn set_bit(self) -> &'a mut W {
796        self.bit(true)
797    }
798    #[doc = r" Clears the field bit"]
799    pub fn clear_bit(self) -> &'a mut W {
800        self.bit(false)
801    }
802    #[doc = r" Writes raw bits to the field"]
803    #[inline]
804    pub fn bit(self, value: bool) -> &'a mut W {
805        const MASK: bool = true;
806        const OFFSET: u8 = 19;
807        self.w.bits &= !((MASK as u32) << OFFSET);
808        self.w.bits |= ((value & MASK) as u32) << OFFSET;
809        self.w
810    }
811}
812#[doc = r" Proxy"]
813pub struct _I2C2RSTW<'a> {
814    w: &'a mut W,
815}
816impl<'a> _I2C2RSTW<'a> {
817    #[doc = r" Sets the field bit"]
818    pub fn set_bit(self) -> &'a mut W {
819        self.bit(true)
820    }
821    #[doc = r" Clears the field bit"]
822    pub fn clear_bit(self) -> &'a mut W {
823        self.bit(false)
824    }
825    #[doc = r" Writes raw bits to the field"]
826    #[inline]
827    pub fn bit(self, value: bool) -> &'a mut W {
828        const MASK: bool = true;
829        const OFFSET: u8 = 22;
830        self.w.bits &= !((MASK as u32) << OFFSET);
831        self.w.bits |= ((value & MASK) as u32) << OFFSET;
832        self.w
833    }
834}
835#[doc = r" Proxy"]
836pub struct _CRSRSTW<'a> {
837    w: &'a mut W,
838}
839impl<'a> _CRSRSTW<'a> {
840    #[doc = r" Sets the field bit"]
841    pub fn set_bit(self) -> &'a mut W {
842        self.bit(true)
843    }
844    #[doc = r" Clears the field bit"]
845    pub fn clear_bit(self) -> &'a mut W {
846        self.bit(false)
847    }
848    #[doc = r" Writes raw bits to the field"]
849    #[inline]
850    pub fn bit(self, value: bool) -> &'a mut W {
851        const MASK: bool = true;
852        const OFFSET: u8 = 24;
853        self.w.bits &= !((MASK as u32) << OFFSET);
854        self.w.bits |= ((value & MASK) as u32) << OFFSET;
855        self.w
856    }
857}
858#[doc = r" Proxy"]
859pub struct _USBFSRSTW<'a> {
860    w: &'a mut W,
861}
862impl<'a> _USBFSRSTW<'a> {
863    #[doc = r" Sets the field bit"]
864    pub fn set_bit(self) -> &'a mut W {
865        self.bit(true)
866    }
867    #[doc = r" Clears the field bit"]
868    pub fn clear_bit(self) -> &'a mut W {
869        self.bit(false)
870    }
871    #[doc = r" Writes raw bits to the field"]
872    #[inline]
873    pub fn bit(self, value: bool) -> &'a mut W {
874        const MASK: bool = true;
875        const OFFSET: u8 = 26;
876        self.w.bits &= !((MASK as u32) << OFFSET);
877        self.w.bits |= ((value & MASK) as u32) << OFFSET;
878        self.w
879    }
880}
881impl R {
882    #[doc = r" Value of the register as raw bits"]
883    #[inline]
884    pub fn bits(&self) -> u32 {
885        self.bits
886    }
887    #[doc = "Bit 31 - Low Power Timer 1 reset"]
888    #[inline]
889    pub fn lptim1rst(&self) -> LPTIM1RSTR {
890        let bits = {
891            const MASK: bool = true;
892            const OFFSET: u8 = 31;
893            ((self.bits >> OFFSET) & MASK as u32) != 0
894        };
895        LPTIM1RSTR { bits }
896    }
897    #[doc = "Bit 30 - OPAMP interface reset"]
898    #[inline]
899    pub fn opamprst(&self) -> OPAMPRSTR {
900        let bits = {
901            const MASK: bool = true;
902            const OFFSET: u8 = 30;
903            ((self.bits >> OFFSET) & MASK as u32) != 0
904        };
905        OPAMPRSTR { bits }
906    }
907    #[doc = "Bit 29 - DAC1 interface reset"]
908    #[inline]
909    pub fn dac1rst(&self) -> DAC1RSTR {
910        let bits = {
911            const MASK: bool = true;
912            const OFFSET: u8 = 29;
913            ((self.bits >> OFFSET) & MASK as u32) != 0
914        };
915        DAC1RSTR { bits }
916    }
917    #[doc = "Bit 28 - Power interface reset"]
918    #[inline]
919    pub fn pwrrst(&self) -> PWRRSTR {
920        let bits = {
921            const MASK: bool = true;
922            const OFFSET: u8 = 28;
923            ((self.bits >> OFFSET) & MASK as u32) != 0
924        };
925        PWRRSTR { bits }
926    }
927    #[doc = "Bit 25 - CAN1 reset"]
928    #[inline]
929    pub fn can1rst(&self) -> CAN1RSTR {
930        let bits = {
931            const MASK: bool = true;
932            const OFFSET: u8 = 25;
933            ((self.bits >> OFFSET) & MASK as u32) != 0
934        };
935        CAN1RSTR { bits }
936    }
937    #[doc = "Bit 23 - I2C3 reset"]
938    #[inline]
939    pub fn i2c3rst(&self) -> I2C3RSTR {
940        let bits = {
941            const MASK: bool = true;
942            const OFFSET: u8 = 23;
943            ((self.bits >> OFFSET) & MASK as u32) != 0
944        };
945        I2C3RSTR { bits }
946    }
947    #[doc = "Bit 21 - I2C1 reset"]
948    #[inline]
949    pub fn i2c1rst(&self) -> I2C1RSTR {
950        let bits = {
951            const MASK: bool = true;
952            const OFFSET: u8 = 21;
953            ((self.bits >> OFFSET) & MASK as u32) != 0
954        };
955        I2C1RSTR { bits }
956    }
957    #[doc = "Bit 18 - USART1 reset"]
958    #[inline]
959    pub fn usart1rst(&self) -> USART1RSTR {
960        let bits = {
961            const MASK: bool = true;
962            const OFFSET: u8 = 18;
963            ((self.bits >> OFFSET) & MASK as u32) != 0
964        };
965        USART1RSTR { bits }
966    }
967    #[doc = "Bit 17 - USART2 reset"]
968    #[inline]
969    pub fn usart2rst(&self) -> USART2RSTR {
970        let bits = {
971            const MASK: bool = true;
972            const OFFSET: u8 = 17;
973            ((self.bits >> OFFSET) & MASK as u32) != 0
974        };
975        USART2RSTR { bits }
976    }
977    #[doc = "Bit 15 - SPI3 reset"]
978    #[inline]
979    pub fn spi3rst(&self) -> SPI3RSTR {
980        let bits = {
981            const MASK: bool = true;
982            const OFFSET: u8 = 15;
983            ((self.bits >> OFFSET) & MASK as u32) != 0
984        };
985        SPI3RSTR { bits }
986    }
987    #[doc = "Bit 14 - SPI2 reset"]
988    #[inline]
989    pub fn spi2rst(&self) -> SPI2RSTR {
990        let bits = {
991            const MASK: bool = true;
992            const OFFSET: u8 = 14;
993            ((self.bits >> OFFSET) & MASK as u32) != 0
994        };
995        SPI2RSTR { bits }
996    }
997    #[doc = "Bit 9 - LCD interface reset"]
998    #[inline]
999    pub fn lcdrst(&self) -> LCDRSTR {
1000        let bits = {
1001            const MASK: bool = true;
1002            const OFFSET: u8 = 9;
1003            ((self.bits >> OFFSET) & MASK as u32) != 0
1004        };
1005        LCDRSTR { bits }
1006    }
1007    #[doc = "Bit 5 - TIM7 timer reset"]
1008    #[inline]
1009    pub fn tim7rst(&self) -> TIM7RSTR {
1010        let bits = {
1011            const MASK: bool = true;
1012            const OFFSET: u8 = 5;
1013            ((self.bits >> OFFSET) & MASK as u32) != 0
1014        };
1015        TIM7RSTR { bits }
1016    }
1017    #[doc = "Bit 4 - TIM6 timer reset"]
1018    #[inline]
1019    pub fn tim6rst(&self) -> TIM6RSTR {
1020        let bits = {
1021            const MASK: bool = true;
1022            const OFFSET: u8 = 4;
1023            ((self.bits >> OFFSET) & MASK as u32) != 0
1024        };
1025        TIM6RSTR { bits }
1026    }
1027    #[doc = "Bit 0 - TIM2 timer reset"]
1028    #[inline]
1029    pub fn tim2rst(&self) -> TIM2RSTR {
1030        let bits = {
1031            const MASK: bool = true;
1032            const OFFSET: u8 = 0;
1033            ((self.bits >> OFFSET) & MASK as u32) != 0
1034        };
1035        TIM2RSTR { bits }
1036    }
1037    #[doc = "Bit 19 - USART4 reset."]
1038    #[inline]
1039    pub fn usart4rst(&self) -> USART4RSTR {
1040        let bits = {
1041            const MASK: bool = true;
1042            const OFFSET: u8 = 19;
1043            ((self.bits >> OFFSET) & MASK as u32) != 0
1044        };
1045        USART4RSTR { bits }
1046    }
1047    #[doc = "Bit 22 - I2C2 reset"]
1048    #[inline]
1049    pub fn i2c2rst(&self) -> I2C2RSTR {
1050        let bits = {
1051            const MASK: bool = true;
1052            const OFFSET: u8 = 22;
1053            ((self.bits >> OFFSET) & MASK as u32) != 0
1054        };
1055        I2C2RSTR { bits }
1056    }
1057    #[doc = "Bit 24 - CRS reset"]
1058    #[inline]
1059    pub fn crsrst(&self) -> CRSRSTR {
1060        let bits = {
1061            const MASK: bool = true;
1062            const OFFSET: u8 = 24;
1063            ((self.bits >> OFFSET) & MASK as u32) != 0
1064        };
1065        CRSRSTR { bits }
1066    }
1067    #[doc = "Bit 26 - USB FS reset"]
1068    #[inline]
1069    pub fn usbfsrst(&self) -> USBFSRSTR {
1070        let bits = {
1071            const MASK: bool = true;
1072            const OFFSET: u8 = 26;
1073            ((self.bits >> OFFSET) & MASK as u32) != 0
1074        };
1075        USBFSRSTR { bits }
1076    }
1077}
1078impl W {
1079    #[doc = r" Reset value of the register"]
1080    #[inline]
1081    pub fn reset_value() -> W {
1082        W { bits: 0 }
1083    }
1084    #[doc = r" Writes raw bits to the register"]
1085    #[inline]
1086    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1087        self.bits = bits;
1088        self
1089    }
1090    #[doc = "Bit 31 - Low Power Timer 1 reset"]
1091    #[inline]
1092    pub fn lptim1rst(&mut self) -> _LPTIM1RSTW {
1093        _LPTIM1RSTW { w: self }
1094    }
1095    #[doc = "Bit 30 - OPAMP interface reset"]
1096    #[inline]
1097    pub fn opamprst(&mut self) -> _OPAMPRSTW {
1098        _OPAMPRSTW { w: self }
1099    }
1100    #[doc = "Bit 29 - DAC1 interface reset"]
1101    #[inline]
1102    pub fn dac1rst(&mut self) -> _DAC1RSTW {
1103        _DAC1RSTW { w: self }
1104    }
1105    #[doc = "Bit 28 - Power interface reset"]
1106    #[inline]
1107    pub fn pwrrst(&mut self) -> _PWRRSTW {
1108        _PWRRSTW { w: self }
1109    }
1110    #[doc = "Bit 25 - CAN1 reset"]
1111    #[inline]
1112    pub fn can1rst(&mut self) -> _CAN1RSTW {
1113        _CAN1RSTW { w: self }
1114    }
1115    #[doc = "Bit 23 - I2C3 reset"]
1116    #[inline]
1117    pub fn i2c3rst(&mut self) -> _I2C3RSTW {
1118        _I2C3RSTW { w: self }
1119    }
1120    #[doc = "Bit 21 - I2C1 reset"]
1121    #[inline]
1122    pub fn i2c1rst(&mut self) -> _I2C1RSTW {
1123        _I2C1RSTW { w: self }
1124    }
1125    #[doc = "Bit 18 - USART1 reset"]
1126    #[inline]
1127    pub fn usart1rst(&mut self) -> _USART1RSTW {
1128        _USART1RSTW { w: self }
1129    }
1130    #[doc = "Bit 17 - USART2 reset"]
1131    #[inline]
1132    pub fn usart2rst(&mut self) -> _USART2RSTW {
1133        _USART2RSTW { w: self }
1134    }
1135    #[doc = "Bit 15 - SPI3 reset"]
1136    #[inline]
1137    pub fn spi3rst(&mut self) -> _SPI3RSTW {
1138        _SPI3RSTW { w: self }
1139    }
1140    #[doc = "Bit 14 - SPI2 reset"]
1141    #[inline]
1142    pub fn spi2rst(&mut self) -> _SPI2RSTW {
1143        _SPI2RSTW { w: self }
1144    }
1145    #[doc = "Bit 9 - LCD interface reset"]
1146    #[inline]
1147    pub fn lcdrst(&mut self) -> _LCDRSTW {
1148        _LCDRSTW { w: self }
1149    }
1150    #[doc = "Bit 5 - TIM7 timer reset"]
1151    #[inline]
1152    pub fn tim7rst(&mut self) -> _TIM7RSTW {
1153        _TIM7RSTW { w: self }
1154    }
1155    #[doc = "Bit 4 - TIM6 timer reset"]
1156    #[inline]
1157    pub fn tim6rst(&mut self) -> _TIM6RSTW {
1158        _TIM6RSTW { w: self }
1159    }
1160    #[doc = "Bit 0 - TIM2 timer reset"]
1161    #[inline]
1162    pub fn tim2rst(&mut self) -> _TIM2RSTW {
1163        _TIM2RSTW { w: self }
1164    }
1165    #[doc = "Bit 19 - USART4 reset."]
1166    #[inline]
1167    pub fn usart4rst(&mut self) -> _USART4RSTW {
1168        _USART4RSTW { w: self }
1169    }
1170    #[doc = "Bit 22 - I2C2 reset"]
1171    #[inline]
1172    pub fn i2c2rst(&mut self) -> _I2C2RSTW {
1173        _I2C2RSTW { w: self }
1174    }
1175    #[doc = "Bit 24 - CRS reset"]
1176    #[inline]
1177    pub fn crsrst(&mut self) -> _CRSRSTW {
1178        _CRSRSTW { w: self }
1179    }
1180    #[doc = "Bit 26 - USB FS reset"]
1181    #[inline]
1182    pub fn usbfsrst(&mut self) -> _USBFSRSTW {
1183        _USBFSRSTW { w: self }
1184    }
1185}