efm32tg11b_pac/efm32tg11b120/cmu/
ctrl.rs

1#[doc = "Register `CTRL` reader"]
2pub struct R(crate::R<CTRL_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<CTRL_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<CTRL_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<CTRL_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `CTRL` writer"]
17pub struct W(crate::W<CTRL_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<CTRL_SPEC>;
20    #[inline(always)]
21    fn deref(&self) -> &Self::Target {
22        &self.0
23    }
24}
25impl core::ops::DerefMut for W {
26    #[inline(always)]
27    fn deref_mut(&mut self) -> &mut Self::Target {
28        &mut self.0
29    }
30}
31impl From<crate::W<CTRL_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<CTRL_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `CLKOUTSEL0` reader - Clock Output Select 0"]
38pub type CLKOUTSEL0_R = crate::FieldReader<u8, CLKOUTSEL0_A>;
39#[doc = "Clock Output Select 0\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41#[repr(u8)]
42pub enum CLKOUTSEL0_A {
43    #[doc = "0: Disabled"]
44    DISABLED = 0,
45    #[doc = "1: ULFRCO (directly from oscillator)"]
46    ULFRCO = 1,
47    #[doc = "2: LFRCO (directly from oscillator)"]
48    LFRCO = 2,
49    #[doc = "3: LFXO (directly from oscillator)"]
50    LFXO = 3,
51    #[doc = "6: HFXO (directly from oscillator)"]
52    HFXO = 6,
53    #[doc = "7: HFEXPCLK"]
54    HFEXPCLK = 7,
55    #[doc = "9: ULFRCO (qualified)"]
56    ULFRCOQ = 9,
57    #[doc = "10: LFRCO (qualified)"]
58    LFRCOQ = 10,
59    #[doc = "11: LFXO (qualified)"]
60    LFXOQ = 11,
61    #[doc = "12: HFRCO (qualified)"]
62    HFRCOQ = 12,
63    #[doc = "13: AUXHFRCO (qualified)"]
64    AUXHFRCOQ = 13,
65    #[doc = "14: HFXO (qualified)"]
66    HFXOQ = 14,
67    #[doc = "15: HFSRCCLK"]
68    HFSRCCLK = 15,
69}
70impl From<CLKOUTSEL0_A> for u8 {
71    #[inline(always)]
72    fn from(variant: CLKOUTSEL0_A) -> Self {
73        variant as _
74    }
75}
76impl CLKOUTSEL0_R {
77    #[doc = "Get enumerated values variant"]
78    #[inline(always)]
79    pub fn variant(&self) -> Option<CLKOUTSEL0_A> {
80        match self.bits {
81            0 => Some(CLKOUTSEL0_A::DISABLED),
82            1 => Some(CLKOUTSEL0_A::ULFRCO),
83            2 => Some(CLKOUTSEL0_A::LFRCO),
84            3 => Some(CLKOUTSEL0_A::LFXO),
85            6 => Some(CLKOUTSEL0_A::HFXO),
86            7 => Some(CLKOUTSEL0_A::HFEXPCLK),
87            9 => Some(CLKOUTSEL0_A::ULFRCOQ),
88            10 => Some(CLKOUTSEL0_A::LFRCOQ),
89            11 => Some(CLKOUTSEL0_A::LFXOQ),
90            12 => Some(CLKOUTSEL0_A::HFRCOQ),
91            13 => Some(CLKOUTSEL0_A::AUXHFRCOQ),
92            14 => Some(CLKOUTSEL0_A::HFXOQ),
93            15 => Some(CLKOUTSEL0_A::HFSRCCLK),
94            _ => None,
95        }
96    }
97    #[doc = "Checks if the value of the field is `DISABLED`"]
98    #[inline(always)]
99    pub fn is_disabled(&self) -> bool {
100        *self == CLKOUTSEL0_A::DISABLED
101    }
102    #[doc = "Checks if the value of the field is `ULFRCO`"]
103    #[inline(always)]
104    pub fn is_ulfrco(&self) -> bool {
105        *self == CLKOUTSEL0_A::ULFRCO
106    }
107    #[doc = "Checks if the value of the field is `LFRCO`"]
108    #[inline(always)]
109    pub fn is_lfrco(&self) -> bool {
110        *self == CLKOUTSEL0_A::LFRCO
111    }
112    #[doc = "Checks if the value of the field is `LFXO`"]
113    #[inline(always)]
114    pub fn is_lfxo(&self) -> bool {
115        *self == CLKOUTSEL0_A::LFXO
116    }
117    #[doc = "Checks if the value of the field is `HFXO`"]
118    #[inline(always)]
119    pub fn is_hfxo(&self) -> bool {
120        *self == CLKOUTSEL0_A::HFXO
121    }
122    #[doc = "Checks if the value of the field is `HFEXPCLK`"]
123    #[inline(always)]
124    pub fn is_hfexpclk(&self) -> bool {
125        *self == CLKOUTSEL0_A::HFEXPCLK
126    }
127    #[doc = "Checks if the value of the field is `ULFRCOQ`"]
128    #[inline(always)]
129    pub fn is_ulfrcoq(&self) -> bool {
130        *self == CLKOUTSEL0_A::ULFRCOQ
131    }
132    #[doc = "Checks if the value of the field is `LFRCOQ`"]
133    #[inline(always)]
134    pub fn is_lfrcoq(&self) -> bool {
135        *self == CLKOUTSEL0_A::LFRCOQ
136    }
137    #[doc = "Checks if the value of the field is `LFXOQ`"]
138    #[inline(always)]
139    pub fn is_lfxoq(&self) -> bool {
140        *self == CLKOUTSEL0_A::LFXOQ
141    }
142    #[doc = "Checks if the value of the field is `HFRCOQ`"]
143    #[inline(always)]
144    pub fn is_hfrcoq(&self) -> bool {
145        *self == CLKOUTSEL0_A::HFRCOQ
146    }
147    #[doc = "Checks if the value of the field is `AUXHFRCOQ`"]
148    #[inline(always)]
149    pub fn is_auxhfrcoq(&self) -> bool {
150        *self == CLKOUTSEL0_A::AUXHFRCOQ
151    }
152    #[doc = "Checks if the value of the field is `HFXOQ`"]
153    #[inline(always)]
154    pub fn is_hfxoq(&self) -> bool {
155        *self == CLKOUTSEL0_A::HFXOQ
156    }
157    #[doc = "Checks if the value of the field is `HFSRCCLK`"]
158    #[inline(always)]
159    pub fn is_hfsrcclk(&self) -> bool {
160        *self == CLKOUTSEL0_A::HFSRCCLK
161    }
162}
163#[doc = "Field `CLKOUTSEL0` writer - Clock Output Select 0"]
164pub type CLKOUTSEL0_W<'a, const O: u8> =
165    crate::FieldWriter<'a, u32, CTRL_SPEC, u8, CLKOUTSEL0_A, 4, O>;
166impl<'a, const O: u8> CLKOUTSEL0_W<'a, O> {
167    #[doc = "Disabled"]
168    #[inline(always)]
169    pub fn disabled(self) -> &'a mut W {
170        self.variant(CLKOUTSEL0_A::DISABLED)
171    }
172    #[doc = "ULFRCO (directly from oscillator)"]
173    #[inline(always)]
174    pub fn ulfrco(self) -> &'a mut W {
175        self.variant(CLKOUTSEL0_A::ULFRCO)
176    }
177    #[doc = "LFRCO (directly from oscillator)"]
178    #[inline(always)]
179    pub fn lfrco(self) -> &'a mut W {
180        self.variant(CLKOUTSEL0_A::LFRCO)
181    }
182    #[doc = "LFXO (directly from oscillator)"]
183    #[inline(always)]
184    pub fn lfxo(self) -> &'a mut W {
185        self.variant(CLKOUTSEL0_A::LFXO)
186    }
187    #[doc = "HFXO (directly from oscillator)"]
188    #[inline(always)]
189    pub fn hfxo(self) -> &'a mut W {
190        self.variant(CLKOUTSEL0_A::HFXO)
191    }
192    #[doc = "HFEXPCLK"]
193    #[inline(always)]
194    pub fn hfexpclk(self) -> &'a mut W {
195        self.variant(CLKOUTSEL0_A::HFEXPCLK)
196    }
197    #[doc = "ULFRCO (qualified)"]
198    #[inline(always)]
199    pub fn ulfrcoq(self) -> &'a mut W {
200        self.variant(CLKOUTSEL0_A::ULFRCOQ)
201    }
202    #[doc = "LFRCO (qualified)"]
203    #[inline(always)]
204    pub fn lfrcoq(self) -> &'a mut W {
205        self.variant(CLKOUTSEL0_A::LFRCOQ)
206    }
207    #[doc = "LFXO (qualified)"]
208    #[inline(always)]
209    pub fn lfxoq(self) -> &'a mut W {
210        self.variant(CLKOUTSEL0_A::LFXOQ)
211    }
212    #[doc = "HFRCO (qualified)"]
213    #[inline(always)]
214    pub fn hfrcoq(self) -> &'a mut W {
215        self.variant(CLKOUTSEL0_A::HFRCOQ)
216    }
217    #[doc = "AUXHFRCO (qualified)"]
218    #[inline(always)]
219    pub fn auxhfrcoq(self) -> &'a mut W {
220        self.variant(CLKOUTSEL0_A::AUXHFRCOQ)
221    }
222    #[doc = "HFXO (qualified)"]
223    #[inline(always)]
224    pub fn hfxoq(self) -> &'a mut W {
225        self.variant(CLKOUTSEL0_A::HFXOQ)
226    }
227    #[doc = "HFSRCCLK"]
228    #[inline(always)]
229    pub fn hfsrcclk(self) -> &'a mut W {
230        self.variant(CLKOUTSEL0_A::HFSRCCLK)
231    }
232}
233#[doc = "Field `CLKOUTSEL1` reader - Clock Output Select 1"]
234pub type CLKOUTSEL1_R = crate::FieldReader<u8, CLKOUTSEL1_A>;
235#[doc = "Clock Output Select 1\n\nValue on reset: 0"]
236#[derive(Clone, Copy, Debug, PartialEq, Eq)]
237#[repr(u8)]
238pub enum CLKOUTSEL1_A {
239    #[doc = "0: Disabled"]
240    DISABLED = 0,
241    #[doc = "1: ULFRCO (directly from oscillator)"]
242    ULFRCO = 1,
243    #[doc = "2: LFRCO (directly from oscillator)"]
244    LFRCO = 2,
245    #[doc = "3: LFXO (directly from oscillator)"]
246    LFXO = 3,
247    #[doc = "6: HFXO (directly from oscillator)"]
248    HFXO = 6,
249    #[doc = "7: HFEXPCLK"]
250    HFEXPCLK = 7,
251    #[doc = "9: ULFRCO (qualified)"]
252    ULFRCOQ = 9,
253    #[doc = "10: LFRCO (qualified)"]
254    LFRCOQ = 10,
255    #[doc = "11: LFXO (qualified)"]
256    LFXOQ = 11,
257    #[doc = "12: HFRCO (qualified)"]
258    HFRCOQ = 12,
259    #[doc = "13: AUXHFRCO (qualified)"]
260    AUXHFRCOQ = 13,
261    #[doc = "14: HFXO (qualified)"]
262    HFXOQ = 14,
263    #[doc = "15: HFSRCCLK"]
264    HFSRCCLK = 15,
265}
266impl From<CLKOUTSEL1_A> for u8 {
267    #[inline(always)]
268    fn from(variant: CLKOUTSEL1_A) -> Self {
269        variant as _
270    }
271}
272impl CLKOUTSEL1_R {
273    #[doc = "Get enumerated values variant"]
274    #[inline(always)]
275    pub fn variant(&self) -> Option<CLKOUTSEL1_A> {
276        match self.bits {
277            0 => Some(CLKOUTSEL1_A::DISABLED),
278            1 => Some(CLKOUTSEL1_A::ULFRCO),
279            2 => Some(CLKOUTSEL1_A::LFRCO),
280            3 => Some(CLKOUTSEL1_A::LFXO),
281            6 => Some(CLKOUTSEL1_A::HFXO),
282            7 => Some(CLKOUTSEL1_A::HFEXPCLK),
283            9 => Some(CLKOUTSEL1_A::ULFRCOQ),
284            10 => Some(CLKOUTSEL1_A::LFRCOQ),
285            11 => Some(CLKOUTSEL1_A::LFXOQ),
286            12 => Some(CLKOUTSEL1_A::HFRCOQ),
287            13 => Some(CLKOUTSEL1_A::AUXHFRCOQ),
288            14 => Some(CLKOUTSEL1_A::HFXOQ),
289            15 => Some(CLKOUTSEL1_A::HFSRCCLK),
290            _ => None,
291        }
292    }
293    #[doc = "Checks if the value of the field is `DISABLED`"]
294    #[inline(always)]
295    pub fn is_disabled(&self) -> bool {
296        *self == CLKOUTSEL1_A::DISABLED
297    }
298    #[doc = "Checks if the value of the field is `ULFRCO`"]
299    #[inline(always)]
300    pub fn is_ulfrco(&self) -> bool {
301        *self == CLKOUTSEL1_A::ULFRCO
302    }
303    #[doc = "Checks if the value of the field is `LFRCO`"]
304    #[inline(always)]
305    pub fn is_lfrco(&self) -> bool {
306        *self == CLKOUTSEL1_A::LFRCO
307    }
308    #[doc = "Checks if the value of the field is `LFXO`"]
309    #[inline(always)]
310    pub fn is_lfxo(&self) -> bool {
311        *self == CLKOUTSEL1_A::LFXO
312    }
313    #[doc = "Checks if the value of the field is `HFXO`"]
314    #[inline(always)]
315    pub fn is_hfxo(&self) -> bool {
316        *self == CLKOUTSEL1_A::HFXO
317    }
318    #[doc = "Checks if the value of the field is `HFEXPCLK`"]
319    #[inline(always)]
320    pub fn is_hfexpclk(&self) -> bool {
321        *self == CLKOUTSEL1_A::HFEXPCLK
322    }
323    #[doc = "Checks if the value of the field is `ULFRCOQ`"]
324    #[inline(always)]
325    pub fn is_ulfrcoq(&self) -> bool {
326        *self == CLKOUTSEL1_A::ULFRCOQ
327    }
328    #[doc = "Checks if the value of the field is `LFRCOQ`"]
329    #[inline(always)]
330    pub fn is_lfrcoq(&self) -> bool {
331        *self == CLKOUTSEL1_A::LFRCOQ
332    }
333    #[doc = "Checks if the value of the field is `LFXOQ`"]
334    #[inline(always)]
335    pub fn is_lfxoq(&self) -> bool {
336        *self == CLKOUTSEL1_A::LFXOQ
337    }
338    #[doc = "Checks if the value of the field is `HFRCOQ`"]
339    #[inline(always)]
340    pub fn is_hfrcoq(&self) -> bool {
341        *self == CLKOUTSEL1_A::HFRCOQ
342    }
343    #[doc = "Checks if the value of the field is `AUXHFRCOQ`"]
344    #[inline(always)]
345    pub fn is_auxhfrcoq(&self) -> bool {
346        *self == CLKOUTSEL1_A::AUXHFRCOQ
347    }
348    #[doc = "Checks if the value of the field is `HFXOQ`"]
349    #[inline(always)]
350    pub fn is_hfxoq(&self) -> bool {
351        *self == CLKOUTSEL1_A::HFXOQ
352    }
353    #[doc = "Checks if the value of the field is `HFSRCCLK`"]
354    #[inline(always)]
355    pub fn is_hfsrcclk(&self) -> bool {
356        *self == CLKOUTSEL1_A::HFSRCCLK
357    }
358}
359#[doc = "Field `CLKOUTSEL1` writer - Clock Output Select 1"]
360pub type CLKOUTSEL1_W<'a, const O: u8> =
361    crate::FieldWriter<'a, u32, CTRL_SPEC, u8, CLKOUTSEL1_A, 4, O>;
362impl<'a, const O: u8> CLKOUTSEL1_W<'a, O> {
363    #[doc = "Disabled"]
364    #[inline(always)]
365    pub fn disabled(self) -> &'a mut W {
366        self.variant(CLKOUTSEL1_A::DISABLED)
367    }
368    #[doc = "ULFRCO (directly from oscillator)"]
369    #[inline(always)]
370    pub fn ulfrco(self) -> &'a mut W {
371        self.variant(CLKOUTSEL1_A::ULFRCO)
372    }
373    #[doc = "LFRCO (directly from oscillator)"]
374    #[inline(always)]
375    pub fn lfrco(self) -> &'a mut W {
376        self.variant(CLKOUTSEL1_A::LFRCO)
377    }
378    #[doc = "LFXO (directly from oscillator)"]
379    #[inline(always)]
380    pub fn lfxo(self) -> &'a mut W {
381        self.variant(CLKOUTSEL1_A::LFXO)
382    }
383    #[doc = "HFXO (directly from oscillator)"]
384    #[inline(always)]
385    pub fn hfxo(self) -> &'a mut W {
386        self.variant(CLKOUTSEL1_A::HFXO)
387    }
388    #[doc = "HFEXPCLK"]
389    #[inline(always)]
390    pub fn hfexpclk(self) -> &'a mut W {
391        self.variant(CLKOUTSEL1_A::HFEXPCLK)
392    }
393    #[doc = "ULFRCO (qualified)"]
394    #[inline(always)]
395    pub fn ulfrcoq(self) -> &'a mut W {
396        self.variant(CLKOUTSEL1_A::ULFRCOQ)
397    }
398    #[doc = "LFRCO (qualified)"]
399    #[inline(always)]
400    pub fn lfrcoq(self) -> &'a mut W {
401        self.variant(CLKOUTSEL1_A::LFRCOQ)
402    }
403    #[doc = "LFXO (qualified)"]
404    #[inline(always)]
405    pub fn lfxoq(self) -> &'a mut W {
406        self.variant(CLKOUTSEL1_A::LFXOQ)
407    }
408    #[doc = "HFRCO (qualified)"]
409    #[inline(always)]
410    pub fn hfrcoq(self) -> &'a mut W {
411        self.variant(CLKOUTSEL1_A::HFRCOQ)
412    }
413    #[doc = "AUXHFRCO (qualified)"]
414    #[inline(always)]
415    pub fn auxhfrcoq(self) -> &'a mut W {
416        self.variant(CLKOUTSEL1_A::AUXHFRCOQ)
417    }
418    #[doc = "HFXO (qualified)"]
419    #[inline(always)]
420    pub fn hfxoq(self) -> &'a mut W {
421        self.variant(CLKOUTSEL1_A::HFXOQ)
422    }
423    #[doc = "HFSRCCLK"]
424    #[inline(always)]
425    pub fn hfsrcclk(self) -> &'a mut W {
426        self.variant(CLKOUTSEL1_A::HFSRCCLK)
427    }
428}
429#[doc = "Field `CLKOUTSEL2` reader - Clock Output Select 2"]
430pub type CLKOUTSEL2_R = crate::FieldReader<u8, CLKOUTSEL2_A>;
431#[doc = "Clock Output Select 2\n\nValue on reset: 0"]
432#[derive(Clone, Copy, Debug, PartialEq, Eq)]
433#[repr(u8)]
434pub enum CLKOUTSEL2_A {
435    #[doc = "0: Disabled"]
436    DISABLED = 0,
437    #[doc = "1: ULFRCO (directly from oscillator)"]
438    ULFRCO = 1,
439    #[doc = "2: LFRCO (directly from oscillator)"]
440    LFRCO = 2,
441    #[doc = "3: LFXO (directly from oscillator)"]
442    LFXO = 3,
443    #[doc = "5: HFXO divided by two (qualified)"]
444    HFXODIV2Q = 5,
445    #[doc = "6: HFXO (directly from oscillator)"]
446    HFXO = 6,
447    #[doc = "7: HFEXPCLK"]
448    HFEXPCLK = 7,
449    #[doc = "9: ULFRCO (qualified)"]
450    ULFRCOQ = 9,
451    #[doc = "10: LFRCO (qualified)"]
452    LFRCOQ = 10,
453    #[doc = "11: LFXO (qualified)"]
454    LFXOQ = 11,
455    #[doc = "12: HFRCO (qualified)"]
456    HFRCOQ = 12,
457    #[doc = "13: AUXHFRCO (qualified)"]
458    AUXHFRCOQ = 13,
459    #[doc = "14: HFXO (qualified)"]
460    HFXOQ = 14,
461    #[doc = "15: HFSRCCLK"]
462    HFSRCCLK = 15,
463}
464impl From<CLKOUTSEL2_A> for u8 {
465    #[inline(always)]
466    fn from(variant: CLKOUTSEL2_A) -> Self {
467        variant as _
468    }
469}
470impl CLKOUTSEL2_R {
471    #[doc = "Get enumerated values variant"]
472    #[inline(always)]
473    pub fn variant(&self) -> Option<CLKOUTSEL2_A> {
474        match self.bits {
475            0 => Some(CLKOUTSEL2_A::DISABLED),
476            1 => Some(CLKOUTSEL2_A::ULFRCO),
477            2 => Some(CLKOUTSEL2_A::LFRCO),
478            3 => Some(CLKOUTSEL2_A::LFXO),
479            5 => Some(CLKOUTSEL2_A::HFXODIV2Q),
480            6 => Some(CLKOUTSEL2_A::HFXO),
481            7 => Some(CLKOUTSEL2_A::HFEXPCLK),
482            9 => Some(CLKOUTSEL2_A::ULFRCOQ),
483            10 => Some(CLKOUTSEL2_A::LFRCOQ),
484            11 => Some(CLKOUTSEL2_A::LFXOQ),
485            12 => Some(CLKOUTSEL2_A::HFRCOQ),
486            13 => Some(CLKOUTSEL2_A::AUXHFRCOQ),
487            14 => Some(CLKOUTSEL2_A::HFXOQ),
488            15 => Some(CLKOUTSEL2_A::HFSRCCLK),
489            _ => None,
490        }
491    }
492    #[doc = "Checks if the value of the field is `DISABLED`"]
493    #[inline(always)]
494    pub fn is_disabled(&self) -> bool {
495        *self == CLKOUTSEL2_A::DISABLED
496    }
497    #[doc = "Checks if the value of the field is `ULFRCO`"]
498    #[inline(always)]
499    pub fn is_ulfrco(&self) -> bool {
500        *self == CLKOUTSEL2_A::ULFRCO
501    }
502    #[doc = "Checks if the value of the field is `LFRCO`"]
503    #[inline(always)]
504    pub fn is_lfrco(&self) -> bool {
505        *self == CLKOUTSEL2_A::LFRCO
506    }
507    #[doc = "Checks if the value of the field is `LFXO`"]
508    #[inline(always)]
509    pub fn is_lfxo(&self) -> bool {
510        *self == CLKOUTSEL2_A::LFXO
511    }
512    #[doc = "Checks if the value of the field is `HFXODIV2Q`"]
513    #[inline(always)]
514    pub fn is_hfxodiv2q(&self) -> bool {
515        *self == CLKOUTSEL2_A::HFXODIV2Q
516    }
517    #[doc = "Checks if the value of the field is `HFXO`"]
518    #[inline(always)]
519    pub fn is_hfxo(&self) -> bool {
520        *self == CLKOUTSEL2_A::HFXO
521    }
522    #[doc = "Checks if the value of the field is `HFEXPCLK`"]
523    #[inline(always)]
524    pub fn is_hfexpclk(&self) -> bool {
525        *self == CLKOUTSEL2_A::HFEXPCLK
526    }
527    #[doc = "Checks if the value of the field is `ULFRCOQ`"]
528    #[inline(always)]
529    pub fn is_ulfrcoq(&self) -> bool {
530        *self == CLKOUTSEL2_A::ULFRCOQ
531    }
532    #[doc = "Checks if the value of the field is `LFRCOQ`"]
533    #[inline(always)]
534    pub fn is_lfrcoq(&self) -> bool {
535        *self == CLKOUTSEL2_A::LFRCOQ
536    }
537    #[doc = "Checks if the value of the field is `LFXOQ`"]
538    #[inline(always)]
539    pub fn is_lfxoq(&self) -> bool {
540        *self == CLKOUTSEL2_A::LFXOQ
541    }
542    #[doc = "Checks if the value of the field is `HFRCOQ`"]
543    #[inline(always)]
544    pub fn is_hfrcoq(&self) -> bool {
545        *self == CLKOUTSEL2_A::HFRCOQ
546    }
547    #[doc = "Checks if the value of the field is `AUXHFRCOQ`"]
548    #[inline(always)]
549    pub fn is_auxhfrcoq(&self) -> bool {
550        *self == CLKOUTSEL2_A::AUXHFRCOQ
551    }
552    #[doc = "Checks if the value of the field is `HFXOQ`"]
553    #[inline(always)]
554    pub fn is_hfxoq(&self) -> bool {
555        *self == CLKOUTSEL2_A::HFXOQ
556    }
557    #[doc = "Checks if the value of the field is `HFSRCCLK`"]
558    #[inline(always)]
559    pub fn is_hfsrcclk(&self) -> bool {
560        *self == CLKOUTSEL2_A::HFSRCCLK
561    }
562}
563#[doc = "Field `CLKOUTSEL2` writer - Clock Output Select 2"]
564pub type CLKOUTSEL2_W<'a, const O: u8> =
565    crate::FieldWriter<'a, u32, CTRL_SPEC, u8, CLKOUTSEL2_A, 4, O>;
566impl<'a, const O: u8> CLKOUTSEL2_W<'a, O> {
567    #[doc = "Disabled"]
568    #[inline(always)]
569    pub fn disabled(self) -> &'a mut W {
570        self.variant(CLKOUTSEL2_A::DISABLED)
571    }
572    #[doc = "ULFRCO (directly from oscillator)"]
573    #[inline(always)]
574    pub fn ulfrco(self) -> &'a mut W {
575        self.variant(CLKOUTSEL2_A::ULFRCO)
576    }
577    #[doc = "LFRCO (directly from oscillator)"]
578    #[inline(always)]
579    pub fn lfrco(self) -> &'a mut W {
580        self.variant(CLKOUTSEL2_A::LFRCO)
581    }
582    #[doc = "LFXO (directly from oscillator)"]
583    #[inline(always)]
584    pub fn lfxo(self) -> &'a mut W {
585        self.variant(CLKOUTSEL2_A::LFXO)
586    }
587    #[doc = "HFXO divided by two (qualified)"]
588    #[inline(always)]
589    pub fn hfxodiv2q(self) -> &'a mut W {
590        self.variant(CLKOUTSEL2_A::HFXODIV2Q)
591    }
592    #[doc = "HFXO (directly from oscillator)"]
593    #[inline(always)]
594    pub fn hfxo(self) -> &'a mut W {
595        self.variant(CLKOUTSEL2_A::HFXO)
596    }
597    #[doc = "HFEXPCLK"]
598    #[inline(always)]
599    pub fn hfexpclk(self) -> &'a mut W {
600        self.variant(CLKOUTSEL2_A::HFEXPCLK)
601    }
602    #[doc = "ULFRCO (qualified)"]
603    #[inline(always)]
604    pub fn ulfrcoq(self) -> &'a mut W {
605        self.variant(CLKOUTSEL2_A::ULFRCOQ)
606    }
607    #[doc = "LFRCO (qualified)"]
608    #[inline(always)]
609    pub fn lfrcoq(self) -> &'a mut W {
610        self.variant(CLKOUTSEL2_A::LFRCOQ)
611    }
612    #[doc = "LFXO (qualified)"]
613    #[inline(always)]
614    pub fn lfxoq(self) -> &'a mut W {
615        self.variant(CLKOUTSEL2_A::LFXOQ)
616    }
617    #[doc = "HFRCO (qualified)"]
618    #[inline(always)]
619    pub fn hfrcoq(self) -> &'a mut W {
620        self.variant(CLKOUTSEL2_A::HFRCOQ)
621    }
622    #[doc = "AUXHFRCO (qualified)"]
623    #[inline(always)]
624    pub fn auxhfrcoq(self) -> &'a mut W {
625        self.variant(CLKOUTSEL2_A::AUXHFRCOQ)
626    }
627    #[doc = "HFXO (qualified)"]
628    #[inline(always)]
629    pub fn hfxoq(self) -> &'a mut W {
630        self.variant(CLKOUTSEL2_A::HFXOQ)
631    }
632    #[doc = "HFSRCCLK"]
633    #[inline(always)]
634    pub fn hfsrcclk(self) -> &'a mut W {
635        self.variant(CLKOUTSEL2_A::HFSRCCLK)
636    }
637}
638#[doc = "Field `WSHFLE` reader - Wait State for High-Frequency LE Interface"]
639pub type WSHFLE_R = crate::BitReader<bool>;
640#[doc = "Field `WSHFLE` writer - Wait State for High-Frequency LE Interface"]
641pub type WSHFLE_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, O>;
642#[doc = "Field `HFPERCLKEN` reader - HFPERCLK Enable"]
643pub type HFPERCLKEN_R = crate::BitReader<bool>;
644#[doc = "Field `HFPERCLKEN` writer - HFPERCLK Enable"]
645pub type HFPERCLKEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, O>;
646impl R {
647    #[doc = "Bits 0:3 - Clock Output Select 0"]
648    #[inline(always)]
649    pub fn clkoutsel0(&self) -> CLKOUTSEL0_R {
650        CLKOUTSEL0_R::new((self.bits & 0x0f) as u8)
651    }
652    #[doc = "Bits 5:8 - Clock Output Select 1"]
653    #[inline(always)]
654    pub fn clkoutsel1(&self) -> CLKOUTSEL1_R {
655        CLKOUTSEL1_R::new(((self.bits >> 5) & 0x0f) as u8)
656    }
657    #[doc = "Bits 10:13 - Clock Output Select 2"]
658    #[inline(always)]
659    pub fn clkoutsel2(&self) -> CLKOUTSEL2_R {
660        CLKOUTSEL2_R::new(((self.bits >> 10) & 0x0f) as u8)
661    }
662    #[doc = "Bit 16 - Wait State for High-Frequency LE Interface"]
663    #[inline(always)]
664    pub fn wshfle(&self) -> WSHFLE_R {
665        WSHFLE_R::new(((self.bits >> 16) & 1) != 0)
666    }
667    #[doc = "Bit 20 - HFPERCLK Enable"]
668    #[inline(always)]
669    pub fn hfperclken(&self) -> HFPERCLKEN_R {
670        HFPERCLKEN_R::new(((self.bits >> 20) & 1) != 0)
671    }
672}
673impl W {
674    #[doc = "Bits 0:3 - Clock Output Select 0"]
675    #[inline(always)]
676    #[must_use]
677    pub fn clkoutsel0(&mut self) -> CLKOUTSEL0_W<0> {
678        CLKOUTSEL0_W::new(self)
679    }
680    #[doc = "Bits 5:8 - Clock Output Select 1"]
681    #[inline(always)]
682    #[must_use]
683    pub fn clkoutsel1(&mut self) -> CLKOUTSEL1_W<5> {
684        CLKOUTSEL1_W::new(self)
685    }
686    #[doc = "Bits 10:13 - Clock Output Select 2"]
687    #[inline(always)]
688    #[must_use]
689    pub fn clkoutsel2(&mut self) -> CLKOUTSEL2_W<10> {
690        CLKOUTSEL2_W::new(self)
691    }
692    #[doc = "Bit 16 - Wait State for High-Frequency LE Interface"]
693    #[inline(always)]
694    #[must_use]
695    pub fn wshfle(&mut self) -> WSHFLE_W<16> {
696        WSHFLE_W::new(self)
697    }
698    #[doc = "Bit 20 - HFPERCLK Enable"]
699    #[inline(always)]
700    #[must_use]
701    pub fn hfperclken(&mut self) -> HFPERCLKEN_W<20> {
702        HFPERCLKEN_W::new(self)
703    }
704    #[doc = "Writes raw bits to the register."]
705    #[inline(always)]
706    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
707        self.0.bits(bits);
708        self
709    }
710}
711#[doc = "CMU Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ctrl](index.html) module"]
712pub struct CTRL_SPEC;
713impl crate::RegisterSpec for CTRL_SPEC {
714    type Ux = u32;
715}
716#[doc = "`read()` method returns [ctrl::R](R) reader structure"]
717impl crate::Readable for CTRL_SPEC {
718    type Reader = R;
719}
720#[doc = "`write(|w| ..)` method takes [ctrl::W](W) writer structure"]
721impl crate::Writable for CTRL_SPEC {
722    type Writer = W;
723    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
724    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
725}
726#[doc = "`reset()` method sets CTRL to value 0x0010_0000"]
727impl crate::Resettable for CTRL_SPEC {
728    const RESET_VALUE: Self::Ux = 0x0010_0000;
729}