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