stm32l4x6/rcc/
cr.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::CR {
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 PLLSAI2RDYR {
47    bits: bool,
48}
49impl PLLSAI2RDYR {
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 PLLSAI2ONR {
68    bits: bool,
69}
70impl PLLSAI2ONR {
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 PLLSAI1RDYR {
89    bits: bool,
90}
91impl PLLSAI1RDYR {
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 PLLSAI1ONR {
110    bits: bool,
111}
112impl PLLSAI1ONR {
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 PLLRDYR {
131    bits: bool,
132}
133impl PLLRDYR {
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 PLLONR {
152    bits: bool,
153}
154impl PLLONR {
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 HSEBYPR {
173    bits: bool,
174}
175impl HSEBYPR {
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 HSERDYR {
194    bits: bool,
195}
196impl HSERDYR {
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 HSEONR {
215    bits: bool,
216}
217impl HSEONR {
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 HSIASFSR {
236    bits: bool,
237}
238impl HSIASFSR {
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 HSIRDYR {
257    bits: bool,
258}
259impl HSIRDYR {
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 HSIKERONR {
278    bits: bool,
279}
280impl HSIKERONR {
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 HSIONR {
299    bits: bool,
300}
301impl HSIONR {
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 MSIRANGER {
320    bits: u8,
321}
322impl MSIRANGER {
323    #[doc = r" Value of the field as raw bits"]
324    #[inline]
325    pub fn bits(&self) -> u8 {
326        self.bits
327    }
328}
329#[doc = r" Value of the field"]
330pub struct MSIPLLENR {
331    bits: bool,
332}
333impl MSIPLLENR {
334    #[doc = r" Value of the field as raw bits"]
335    #[inline]
336    pub fn bit(&self) -> bool {
337        self.bits
338    }
339    #[doc = r" Returns `true` if the bit is clear (0)"]
340    #[inline]
341    pub fn bit_is_clear(&self) -> bool {
342        !self.bit()
343    }
344    #[doc = r" Returns `true` if the bit is set (1)"]
345    #[inline]
346    pub fn bit_is_set(&self) -> bool {
347        self.bit()
348    }
349}
350#[doc = r" Value of the field"]
351pub struct MSIRDYR {
352    bits: bool,
353}
354impl MSIRDYR {
355    #[doc = r" Value of the field as raw bits"]
356    #[inline]
357    pub fn bit(&self) -> bool {
358        self.bits
359    }
360    #[doc = r" Returns `true` if the bit is clear (0)"]
361    #[inline]
362    pub fn bit_is_clear(&self) -> bool {
363        !self.bit()
364    }
365    #[doc = r" Returns `true` if the bit is set (1)"]
366    #[inline]
367    pub fn bit_is_set(&self) -> bool {
368        self.bit()
369    }
370}
371#[doc = r" Value of the field"]
372pub struct MSIONR {
373    bits: bool,
374}
375impl MSIONR {
376    #[doc = r" Value of the field as raw bits"]
377    #[inline]
378    pub fn bit(&self) -> bool {
379        self.bits
380    }
381    #[doc = r" Returns `true` if the bit is clear (0)"]
382    #[inline]
383    pub fn bit_is_clear(&self) -> bool {
384        !self.bit()
385    }
386    #[doc = r" Returns `true` if the bit is set (1)"]
387    #[inline]
388    pub fn bit_is_set(&self) -> bool {
389        self.bit()
390    }
391}
392#[doc = r" Proxy"]
393pub struct _PLLSAI2ONW<'a> {
394    w: &'a mut W,
395}
396impl<'a> _PLLSAI2ONW<'a> {
397    #[doc = r" Sets the field bit"]
398    pub fn set_bit(self) -> &'a mut W {
399        self.bit(true)
400    }
401    #[doc = r" Clears the field bit"]
402    pub fn clear_bit(self) -> &'a mut W {
403        self.bit(false)
404    }
405    #[doc = r" Writes raw bits to the field"]
406    #[inline]
407    pub fn bit(self, value: bool) -> &'a mut W {
408        const MASK: bool = true;
409        const OFFSET: u8 = 28;
410        self.w.bits &= !((MASK as u32) << OFFSET);
411        self.w.bits |= ((value & MASK) as u32) << OFFSET;
412        self.w
413    }
414}
415#[doc = r" Proxy"]
416pub struct _PLLSAI1ONW<'a> {
417    w: &'a mut W,
418}
419impl<'a> _PLLSAI1ONW<'a> {
420    #[doc = r" Sets the field bit"]
421    pub fn set_bit(self) -> &'a mut W {
422        self.bit(true)
423    }
424    #[doc = r" Clears the field bit"]
425    pub fn clear_bit(self) -> &'a mut W {
426        self.bit(false)
427    }
428    #[doc = r" Writes raw bits to the field"]
429    #[inline]
430    pub fn bit(self, value: bool) -> &'a mut W {
431        const MASK: bool = true;
432        const OFFSET: u8 = 26;
433        self.w.bits &= !((MASK as u32) << OFFSET);
434        self.w.bits |= ((value & MASK) as u32) << OFFSET;
435        self.w
436    }
437}
438#[doc = r" Proxy"]
439pub struct _PLLONW<'a> {
440    w: &'a mut W,
441}
442impl<'a> _PLLONW<'a> {
443    #[doc = r" Sets the field bit"]
444    pub fn set_bit(self) -> &'a mut W {
445        self.bit(true)
446    }
447    #[doc = r" Clears the field bit"]
448    pub fn clear_bit(self) -> &'a mut W {
449        self.bit(false)
450    }
451    #[doc = r" Writes raw bits to the field"]
452    #[inline]
453    pub fn bit(self, value: bool) -> &'a mut W {
454        const MASK: bool = true;
455        const OFFSET: u8 = 24;
456        self.w.bits &= !((MASK as u32) << OFFSET);
457        self.w.bits |= ((value & MASK) as u32) << OFFSET;
458        self.w
459    }
460}
461#[doc = r" Proxy"]
462pub struct _CSSONW<'a> {
463    w: &'a mut W,
464}
465impl<'a> _CSSONW<'a> {
466    #[doc = r" Sets the field bit"]
467    pub fn set_bit(self) -> &'a mut W {
468        self.bit(true)
469    }
470    #[doc = r" Clears the field bit"]
471    pub fn clear_bit(self) -> &'a mut W {
472        self.bit(false)
473    }
474    #[doc = r" Writes raw bits to the field"]
475    #[inline]
476    pub fn bit(self, value: bool) -> &'a mut W {
477        const MASK: bool = true;
478        const OFFSET: u8 = 19;
479        self.w.bits &= !((MASK as u32) << OFFSET);
480        self.w.bits |= ((value & MASK) as u32) << OFFSET;
481        self.w
482    }
483}
484#[doc = r" Proxy"]
485pub struct _HSEBYPW<'a> {
486    w: &'a mut W,
487}
488impl<'a> _HSEBYPW<'a> {
489    #[doc = r" Sets the field bit"]
490    pub fn set_bit(self) -> &'a mut W {
491        self.bit(true)
492    }
493    #[doc = r" Clears the field bit"]
494    pub fn clear_bit(self) -> &'a mut W {
495        self.bit(false)
496    }
497    #[doc = r" Writes raw bits to the field"]
498    #[inline]
499    pub fn bit(self, value: bool) -> &'a mut W {
500        const MASK: bool = true;
501        const OFFSET: u8 = 18;
502        self.w.bits &= !((MASK as u32) << OFFSET);
503        self.w.bits |= ((value & MASK) as u32) << OFFSET;
504        self.w
505    }
506}
507#[doc = r" Proxy"]
508pub struct _HSEONW<'a> {
509    w: &'a mut W,
510}
511impl<'a> _HSEONW<'a> {
512    #[doc = r" Sets the field bit"]
513    pub fn set_bit(self) -> &'a mut W {
514        self.bit(true)
515    }
516    #[doc = r" Clears the field bit"]
517    pub fn clear_bit(self) -> &'a mut W {
518        self.bit(false)
519    }
520    #[doc = r" Writes raw bits to the field"]
521    #[inline]
522    pub fn bit(self, value: bool) -> &'a mut W {
523        const MASK: bool = true;
524        const OFFSET: u8 = 16;
525        self.w.bits &= !((MASK as u32) << OFFSET);
526        self.w.bits |= ((value & MASK) as u32) << OFFSET;
527        self.w
528    }
529}
530#[doc = r" Proxy"]
531pub struct _HSIASFSW<'a> {
532    w: &'a mut W,
533}
534impl<'a> _HSIASFSW<'a> {
535    #[doc = r" Sets the field bit"]
536    pub fn set_bit(self) -> &'a mut W {
537        self.bit(true)
538    }
539    #[doc = r" Clears the field bit"]
540    pub fn clear_bit(self) -> &'a mut W {
541        self.bit(false)
542    }
543    #[doc = r" Writes raw bits to the field"]
544    #[inline]
545    pub fn bit(self, value: bool) -> &'a mut W {
546        const MASK: bool = true;
547        const OFFSET: u8 = 11;
548        self.w.bits &= !((MASK as u32) << OFFSET);
549        self.w.bits |= ((value & MASK) as u32) << OFFSET;
550        self.w
551    }
552}
553#[doc = r" Proxy"]
554pub struct _HSIKERONW<'a> {
555    w: &'a mut W,
556}
557impl<'a> _HSIKERONW<'a> {
558    #[doc = r" Sets the field bit"]
559    pub fn set_bit(self) -> &'a mut W {
560        self.bit(true)
561    }
562    #[doc = r" Clears the field bit"]
563    pub fn clear_bit(self) -> &'a mut W {
564        self.bit(false)
565    }
566    #[doc = r" Writes raw bits to the field"]
567    #[inline]
568    pub fn bit(self, value: bool) -> &'a mut W {
569        const MASK: bool = true;
570        const OFFSET: u8 = 9;
571        self.w.bits &= !((MASK as u32) << OFFSET);
572        self.w.bits |= ((value & MASK) as u32) << OFFSET;
573        self.w
574    }
575}
576#[doc = r" Proxy"]
577pub struct _HSIONW<'a> {
578    w: &'a mut W,
579}
580impl<'a> _HSIONW<'a> {
581    #[doc = r" Sets the field bit"]
582    pub fn set_bit(self) -> &'a mut W {
583        self.bit(true)
584    }
585    #[doc = r" Clears the field bit"]
586    pub fn clear_bit(self) -> &'a mut W {
587        self.bit(false)
588    }
589    #[doc = r" Writes raw bits to the field"]
590    #[inline]
591    pub fn bit(self, value: bool) -> &'a mut W {
592        const MASK: bool = true;
593        const OFFSET: u8 = 8;
594        self.w.bits &= !((MASK as u32) << OFFSET);
595        self.w.bits |= ((value & MASK) as u32) << OFFSET;
596        self.w
597    }
598}
599#[doc = r" Proxy"]
600pub struct _MSIRANGEW<'a> {
601    w: &'a mut W,
602}
603impl<'a> _MSIRANGEW<'a> {
604    #[doc = r" Writes raw bits to the field"]
605    #[inline]
606    pub unsafe fn bits(self, value: u8) -> &'a mut W {
607        const MASK: u8 = 15;
608        const OFFSET: u8 = 4;
609        self.w.bits &= !((MASK as u32) << OFFSET);
610        self.w.bits |= ((value & MASK) as u32) << OFFSET;
611        self.w
612    }
613}
614#[doc = r" Proxy"]
615pub struct _MSIRGSELW<'a> {
616    w: &'a mut W,
617}
618impl<'a> _MSIRGSELW<'a> {
619    #[doc = r" Sets the field bit"]
620    pub fn set_bit(self) -> &'a mut W {
621        self.bit(true)
622    }
623    #[doc = r" Clears the field bit"]
624    pub fn clear_bit(self) -> &'a mut W {
625        self.bit(false)
626    }
627    #[doc = r" Writes raw bits to the field"]
628    #[inline]
629    pub fn bit(self, value: bool) -> &'a mut W {
630        const MASK: bool = true;
631        const OFFSET: u8 = 3;
632        self.w.bits &= !((MASK as u32) << OFFSET);
633        self.w.bits |= ((value & MASK) as u32) << OFFSET;
634        self.w
635    }
636}
637#[doc = r" Proxy"]
638pub struct _MSIPLLENW<'a> {
639    w: &'a mut W,
640}
641impl<'a> _MSIPLLENW<'a> {
642    #[doc = r" Sets the field bit"]
643    pub fn set_bit(self) -> &'a mut W {
644        self.bit(true)
645    }
646    #[doc = r" Clears the field bit"]
647    pub fn clear_bit(self) -> &'a mut W {
648        self.bit(false)
649    }
650    #[doc = r" Writes raw bits to the field"]
651    #[inline]
652    pub fn bit(self, value: bool) -> &'a mut W {
653        const MASK: bool = true;
654        const OFFSET: u8 = 2;
655        self.w.bits &= !((MASK as u32) << OFFSET);
656        self.w.bits |= ((value & MASK) as u32) << OFFSET;
657        self.w
658    }
659}
660#[doc = r" Proxy"]
661pub struct _MSIONW<'a> {
662    w: &'a mut W,
663}
664impl<'a> _MSIONW<'a> {
665    #[doc = r" Sets the field bit"]
666    pub fn set_bit(self) -> &'a mut W {
667        self.bit(true)
668    }
669    #[doc = r" Clears the field bit"]
670    pub fn clear_bit(self) -> &'a mut W {
671        self.bit(false)
672    }
673    #[doc = r" Writes raw bits to the field"]
674    #[inline]
675    pub fn bit(self, value: bool) -> &'a mut W {
676        const MASK: bool = true;
677        const OFFSET: u8 = 0;
678        self.w.bits &= !((MASK as u32) << OFFSET);
679        self.w.bits |= ((value & MASK) as u32) << OFFSET;
680        self.w
681    }
682}
683impl R {
684    #[doc = r" Value of the register as raw bits"]
685    #[inline]
686    pub fn bits(&self) -> u32 {
687        self.bits
688    }
689    #[doc = "Bit 29 - SAI2 PLL clock ready flag"]
690    #[inline]
691    pub fn pllsai2rdy(&self) -> PLLSAI2RDYR {
692        let bits = {
693            const MASK: bool = true;
694            const OFFSET: u8 = 29;
695            ((self.bits >> OFFSET) & MASK as u32) != 0
696        };
697        PLLSAI2RDYR { bits }
698    }
699    #[doc = "Bit 28 - SAI2 PLL enable"]
700    #[inline]
701    pub fn pllsai2on(&self) -> PLLSAI2ONR {
702        let bits = {
703            const MASK: bool = true;
704            const OFFSET: u8 = 28;
705            ((self.bits >> OFFSET) & MASK as u32) != 0
706        };
707        PLLSAI2ONR { bits }
708    }
709    #[doc = "Bit 27 - SAI1 PLL clock ready flag"]
710    #[inline]
711    pub fn pllsai1rdy(&self) -> PLLSAI1RDYR {
712        let bits = {
713            const MASK: bool = true;
714            const OFFSET: u8 = 27;
715            ((self.bits >> OFFSET) & MASK as u32) != 0
716        };
717        PLLSAI1RDYR { bits }
718    }
719    #[doc = "Bit 26 - SAI1 PLL enable"]
720    #[inline]
721    pub fn pllsai1on(&self) -> PLLSAI1ONR {
722        let bits = {
723            const MASK: bool = true;
724            const OFFSET: u8 = 26;
725            ((self.bits >> OFFSET) & MASK as u32) != 0
726        };
727        PLLSAI1ONR { bits }
728    }
729    #[doc = "Bit 25 - Main PLL clock ready flag"]
730    #[inline]
731    pub fn pllrdy(&self) -> PLLRDYR {
732        let bits = {
733            const MASK: bool = true;
734            const OFFSET: u8 = 25;
735            ((self.bits >> OFFSET) & MASK as u32) != 0
736        };
737        PLLRDYR { bits }
738    }
739    #[doc = "Bit 24 - Main PLL enable"]
740    #[inline]
741    pub fn pllon(&self) -> PLLONR {
742        let bits = {
743            const MASK: bool = true;
744            const OFFSET: u8 = 24;
745            ((self.bits >> OFFSET) & MASK as u32) != 0
746        };
747        PLLONR { bits }
748    }
749    #[doc = "Bit 18 - HSE crystal oscillator bypass"]
750    #[inline]
751    pub fn hsebyp(&self) -> HSEBYPR {
752        let bits = {
753            const MASK: bool = true;
754            const OFFSET: u8 = 18;
755            ((self.bits >> OFFSET) & MASK as u32) != 0
756        };
757        HSEBYPR { bits }
758    }
759    #[doc = "Bit 17 - HSE clock ready flag"]
760    #[inline]
761    pub fn hserdy(&self) -> HSERDYR {
762        let bits = {
763            const MASK: bool = true;
764            const OFFSET: u8 = 17;
765            ((self.bits >> OFFSET) & MASK as u32) != 0
766        };
767        HSERDYR { bits }
768    }
769    #[doc = "Bit 16 - HSE clock enable"]
770    #[inline]
771    pub fn hseon(&self) -> HSEONR {
772        let bits = {
773            const MASK: bool = true;
774            const OFFSET: u8 = 16;
775            ((self.bits >> OFFSET) & MASK as u32) != 0
776        };
777        HSEONR { bits }
778    }
779    #[doc = "Bit 11 - HSI automatic start from Stop"]
780    #[inline]
781    pub fn hsiasfs(&self) -> HSIASFSR {
782        let bits = {
783            const MASK: bool = true;
784            const OFFSET: u8 = 11;
785            ((self.bits >> OFFSET) & MASK as u32) != 0
786        };
787        HSIASFSR { bits }
788    }
789    #[doc = "Bit 10 - HSI clock ready flag"]
790    #[inline]
791    pub fn hsirdy(&self) -> HSIRDYR {
792        let bits = {
793            const MASK: bool = true;
794            const OFFSET: u8 = 10;
795            ((self.bits >> OFFSET) & MASK as u32) != 0
796        };
797        HSIRDYR { bits }
798    }
799    #[doc = "Bit 9 - HSI always enable for peripheral kernels"]
800    #[inline]
801    pub fn hsikeron(&self) -> HSIKERONR {
802        let bits = {
803            const MASK: bool = true;
804            const OFFSET: u8 = 9;
805            ((self.bits >> OFFSET) & MASK as u32) != 0
806        };
807        HSIKERONR { bits }
808    }
809    #[doc = "Bit 8 - HSI clock enable"]
810    #[inline]
811    pub fn hsion(&self) -> HSIONR {
812        let bits = {
813            const MASK: bool = true;
814            const OFFSET: u8 = 8;
815            ((self.bits >> OFFSET) & MASK as u32) != 0
816        };
817        HSIONR { bits }
818    }
819    #[doc = "Bits 4:7 - MSI clock ranges"]
820    #[inline]
821    pub fn msirange(&self) -> MSIRANGER {
822        let bits = {
823            const MASK: u8 = 15;
824            const OFFSET: u8 = 4;
825            ((self.bits >> OFFSET) & MASK as u32) as u8
826        };
827        MSIRANGER { bits }
828    }
829    #[doc = "Bit 2 - MSI clock PLL enable"]
830    #[inline]
831    pub fn msipllen(&self) -> MSIPLLENR {
832        let bits = {
833            const MASK: bool = true;
834            const OFFSET: u8 = 2;
835            ((self.bits >> OFFSET) & MASK as u32) != 0
836        };
837        MSIPLLENR { bits }
838    }
839    #[doc = "Bit 1 - MSI clock ready flag"]
840    #[inline]
841    pub fn msirdy(&self) -> MSIRDYR {
842        let bits = {
843            const MASK: bool = true;
844            const OFFSET: u8 = 1;
845            ((self.bits >> OFFSET) & MASK as u32) != 0
846        };
847        MSIRDYR { bits }
848    }
849    #[doc = "Bit 0 - MSI clock enable"]
850    #[inline]
851    pub fn msion(&self) -> MSIONR {
852        let bits = {
853            const MASK: bool = true;
854            const OFFSET: u8 = 0;
855            ((self.bits >> OFFSET) & MASK as u32) != 0
856        };
857        MSIONR { bits }
858    }
859}
860impl W {
861    #[doc = r" Reset value of the register"]
862    #[inline]
863    pub fn reset_value() -> W {
864        W { bits: 99 }
865    }
866    #[doc = r" Writes raw bits to the register"]
867    #[inline]
868    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
869        self.bits = bits;
870        self
871    }
872    #[doc = "Bit 28 - SAI2 PLL enable"]
873    #[inline]
874    pub fn pllsai2on(&mut self) -> _PLLSAI2ONW {
875        _PLLSAI2ONW { w: self }
876    }
877    #[doc = "Bit 26 - SAI1 PLL enable"]
878    #[inline]
879    pub fn pllsai1on(&mut self) -> _PLLSAI1ONW {
880        _PLLSAI1ONW { w: self }
881    }
882    #[doc = "Bit 24 - Main PLL enable"]
883    #[inline]
884    pub fn pllon(&mut self) -> _PLLONW {
885        _PLLONW { w: self }
886    }
887    #[doc = "Bit 19 - Clock security system enable"]
888    #[inline]
889    pub fn csson(&mut self) -> _CSSONW {
890        _CSSONW { w: self }
891    }
892    #[doc = "Bit 18 - HSE crystal oscillator bypass"]
893    #[inline]
894    pub fn hsebyp(&mut self) -> _HSEBYPW {
895        _HSEBYPW { w: self }
896    }
897    #[doc = "Bit 16 - HSE clock enable"]
898    #[inline]
899    pub fn hseon(&mut self) -> _HSEONW {
900        _HSEONW { w: self }
901    }
902    #[doc = "Bit 11 - HSI automatic start from Stop"]
903    #[inline]
904    pub fn hsiasfs(&mut self) -> _HSIASFSW {
905        _HSIASFSW { w: self }
906    }
907    #[doc = "Bit 9 - HSI always enable for peripheral kernels"]
908    #[inline]
909    pub fn hsikeron(&mut self) -> _HSIKERONW {
910        _HSIKERONW { w: self }
911    }
912    #[doc = "Bit 8 - HSI clock enable"]
913    #[inline]
914    pub fn hsion(&mut self) -> _HSIONW {
915        _HSIONW { w: self }
916    }
917    #[doc = "Bits 4:7 - MSI clock ranges"]
918    #[inline]
919    pub fn msirange(&mut self) -> _MSIRANGEW {
920        _MSIRANGEW { w: self }
921    }
922    #[doc = "Bit 3 - MSI clock range selection"]
923    #[inline]
924    pub fn msirgsel(&mut self) -> _MSIRGSELW {
925        _MSIRGSELW { w: self }
926    }
927    #[doc = "Bit 2 - MSI clock PLL enable"]
928    #[inline]
929    pub fn msipllen(&mut self) -> _MSIPLLENW {
930        _MSIPLLENW { w: self }
931    }
932    #[doc = "Bit 0 - MSI clock enable"]
933    #[inline]
934    pub fn msion(&mut self) -> _MSIONW {
935        _MSIONW { w: self }
936    }
937}