1#[doc = "Register `CALCTRL` reader"]
2pub struct R(crate::R<CALCTRL_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<CALCTRL_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<CALCTRL_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<CALCTRL_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `CALCTRL` writer"]
17pub struct W(crate::W<CALCTRL_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<CALCTRL_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<CALCTRL_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<CALCTRL_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Calibration Up-counter Select\n\nValue on reset: 0"]
38#[derive(Clone, Copy, Debug, PartialEq)]
39#[repr(u8)]
40pub enum UPSEL_A {
41 #[doc = "0: Select HFXO as up-counter"]
42 HFXO = 0,
43 #[doc = "1: Select LFXO as up-counter"]
44 LFXO = 1,
45 #[doc = "2: Select HFRCO as up-counter"]
46 HFRCO = 2,
47 #[doc = "3: Select LFRCO as up-counter"]
48 LFRCO = 3,
49 #[doc = "4: Select AUXHFRCO as up-counter"]
50 AUXHFRCO = 4,
51 #[doc = "5: Select PRS input selected by PRSUPSEL as up-counter"]
52 PRS = 5,
53 #[doc = "7: Select USHFRCO as up-counter"]
54 USHFRCO = 7,
55}
56impl From<UPSEL_A> for u8 {
57 #[inline(always)]
58 fn from(variant: UPSEL_A) -> Self {
59 variant as _
60 }
61}
62#[doc = "Field `UPSEL` reader - Calibration Up-counter Select"]
63pub type UPSEL_R = crate::FieldReader<u8, UPSEL_A>;
64impl UPSEL_R {
65 #[doc = "Get enumerated values variant"]
66 #[inline(always)]
67 pub fn variant(&self) -> Option<UPSEL_A> {
68 match self.bits {
69 0 => Some(UPSEL_A::HFXO),
70 1 => Some(UPSEL_A::LFXO),
71 2 => Some(UPSEL_A::HFRCO),
72 3 => Some(UPSEL_A::LFRCO),
73 4 => Some(UPSEL_A::AUXHFRCO),
74 5 => Some(UPSEL_A::PRS),
75 7 => Some(UPSEL_A::USHFRCO),
76 _ => None,
77 }
78 }
79 #[doc = "Checks if the value of the field is `HFXO`"]
80 #[inline(always)]
81 pub fn is_hfxo(&self) -> bool {
82 *self == UPSEL_A::HFXO
83 }
84 #[doc = "Checks if the value of the field is `LFXO`"]
85 #[inline(always)]
86 pub fn is_lfxo(&self) -> bool {
87 *self == UPSEL_A::LFXO
88 }
89 #[doc = "Checks if the value of the field is `HFRCO`"]
90 #[inline(always)]
91 pub fn is_hfrco(&self) -> bool {
92 *self == UPSEL_A::HFRCO
93 }
94 #[doc = "Checks if the value of the field is `LFRCO`"]
95 #[inline(always)]
96 pub fn is_lfrco(&self) -> bool {
97 *self == UPSEL_A::LFRCO
98 }
99 #[doc = "Checks if the value of the field is `AUXHFRCO`"]
100 #[inline(always)]
101 pub fn is_auxhfrco(&self) -> bool {
102 *self == UPSEL_A::AUXHFRCO
103 }
104 #[doc = "Checks if the value of the field is `PRS`"]
105 #[inline(always)]
106 pub fn is_prs(&self) -> bool {
107 *self == UPSEL_A::PRS
108 }
109 #[doc = "Checks if the value of the field is `USHFRCO`"]
110 #[inline(always)]
111 pub fn is_ushfrco(&self) -> bool {
112 *self == UPSEL_A::USHFRCO
113 }
114}
115#[doc = "Field `UPSEL` writer - Calibration Up-counter Select"]
116pub type UPSEL_W<'a> = crate::FieldWriter<'a, u32, CALCTRL_SPEC, u8, UPSEL_A, 3, 0>;
117impl<'a> UPSEL_W<'a> {
118 #[doc = "Select HFXO as up-counter"]
119 #[inline(always)]
120 pub fn hfxo(self) -> &'a mut W {
121 self.variant(UPSEL_A::HFXO)
122 }
123 #[doc = "Select LFXO as up-counter"]
124 #[inline(always)]
125 pub fn lfxo(self) -> &'a mut W {
126 self.variant(UPSEL_A::LFXO)
127 }
128 #[doc = "Select HFRCO as up-counter"]
129 #[inline(always)]
130 pub fn hfrco(self) -> &'a mut W {
131 self.variant(UPSEL_A::HFRCO)
132 }
133 #[doc = "Select LFRCO as up-counter"]
134 #[inline(always)]
135 pub fn lfrco(self) -> &'a mut W {
136 self.variant(UPSEL_A::LFRCO)
137 }
138 #[doc = "Select AUXHFRCO as up-counter"]
139 #[inline(always)]
140 pub fn auxhfrco(self) -> &'a mut W {
141 self.variant(UPSEL_A::AUXHFRCO)
142 }
143 #[doc = "Select PRS input selected by PRSUPSEL as up-counter"]
144 #[inline(always)]
145 pub fn prs(self) -> &'a mut W {
146 self.variant(UPSEL_A::PRS)
147 }
148 #[doc = "Select USHFRCO as up-counter"]
149 #[inline(always)]
150 pub fn ushfrco(self) -> &'a mut W {
151 self.variant(UPSEL_A::USHFRCO)
152 }
153}
154#[doc = "Calibration Down-counter Select\n\nValue on reset: 0"]
155#[derive(Clone, Copy, Debug, PartialEq)]
156#[repr(u8)]
157pub enum DOWNSEL_A {
158 #[doc = "0: Select HFCLK for down-counter"]
159 HFCLK = 0,
160 #[doc = "1: Select HFXO for down-counter"]
161 HFXO = 1,
162 #[doc = "2: Select LFXO for down-counter"]
163 LFXO = 2,
164 #[doc = "3: Select HFRCO for down-counter"]
165 HFRCO = 3,
166 #[doc = "4: Select LFRCO for down-counter"]
167 LFRCO = 4,
168 #[doc = "5: Select AUXHFRCO for down-counter"]
169 AUXHFRCO = 5,
170 #[doc = "6: Select PRS input selected by PRSDOWNSEL as down-counter"]
171 PRS = 6,
172 #[doc = "8: Select USHFRCO for down-counter"]
173 USHFRCO = 8,
174}
175impl From<DOWNSEL_A> for u8 {
176 #[inline(always)]
177 fn from(variant: DOWNSEL_A) -> Self {
178 variant as _
179 }
180}
181#[doc = "Field `DOWNSEL` reader - Calibration Down-counter Select"]
182pub type DOWNSEL_R = crate::FieldReader<u8, DOWNSEL_A>;
183impl DOWNSEL_R {
184 #[doc = "Get enumerated values variant"]
185 #[inline(always)]
186 pub fn variant(&self) -> Option<DOWNSEL_A> {
187 match self.bits {
188 0 => Some(DOWNSEL_A::HFCLK),
189 1 => Some(DOWNSEL_A::HFXO),
190 2 => Some(DOWNSEL_A::LFXO),
191 3 => Some(DOWNSEL_A::HFRCO),
192 4 => Some(DOWNSEL_A::LFRCO),
193 5 => Some(DOWNSEL_A::AUXHFRCO),
194 6 => Some(DOWNSEL_A::PRS),
195 8 => Some(DOWNSEL_A::USHFRCO),
196 _ => None,
197 }
198 }
199 #[doc = "Checks if the value of the field is `HFCLK`"]
200 #[inline(always)]
201 pub fn is_hfclk(&self) -> bool {
202 *self == DOWNSEL_A::HFCLK
203 }
204 #[doc = "Checks if the value of the field is `HFXO`"]
205 #[inline(always)]
206 pub fn is_hfxo(&self) -> bool {
207 *self == DOWNSEL_A::HFXO
208 }
209 #[doc = "Checks if the value of the field is `LFXO`"]
210 #[inline(always)]
211 pub fn is_lfxo(&self) -> bool {
212 *self == DOWNSEL_A::LFXO
213 }
214 #[doc = "Checks if the value of the field is `HFRCO`"]
215 #[inline(always)]
216 pub fn is_hfrco(&self) -> bool {
217 *self == DOWNSEL_A::HFRCO
218 }
219 #[doc = "Checks if the value of the field is `LFRCO`"]
220 #[inline(always)]
221 pub fn is_lfrco(&self) -> bool {
222 *self == DOWNSEL_A::LFRCO
223 }
224 #[doc = "Checks if the value of the field is `AUXHFRCO`"]
225 #[inline(always)]
226 pub fn is_auxhfrco(&self) -> bool {
227 *self == DOWNSEL_A::AUXHFRCO
228 }
229 #[doc = "Checks if the value of the field is `PRS`"]
230 #[inline(always)]
231 pub fn is_prs(&self) -> bool {
232 *self == DOWNSEL_A::PRS
233 }
234 #[doc = "Checks if the value of the field is `USHFRCO`"]
235 #[inline(always)]
236 pub fn is_ushfrco(&self) -> bool {
237 *self == DOWNSEL_A::USHFRCO
238 }
239}
240#[doc = "Field `DOWNSEL` writer - Calibration Down-counter Select"]
241pub type DOWNSEL_W<'a> = crate::FieldWriter<'a, u32, CALCTRL_SPEC, u8, DOWNSEL_A, 4, 4>;
242impl<'a> DOWNSEL_W<'a> {
243 #[doc = "Select HFCLK for down-counter"]
244 #[inline(always)]
245 pub fn hfclk(self) -> &'a mut W {
246 self.variant(DOWNSEL_A::HFCLK)
247 }
248 #[doc = "Select HFXO for down-counter"]
249 #[inline(always)]
250 pub fn hfxo(self) -> &'a mut W {
251 self.variant(DOWNSEL_A::HFXO)
252 }
253 #[doc = "Select LFXO for down-counter"]
254 #[inline(always)]
255 pub fn lfxo(self) -> &'a mut W {
256 self.variant(DOWNSEL_A::LFXO)
257 }
258 #[doc = "Select HFRCO for down-counter"]
259 #[inline(always)]
260 pub fn hfrco(self) -> &'a mut W {
261 self.variant(DOWNSEL_A::HFRCO)
262 }
263 #[doc = "Select LFRCO for down-counter"]
264 #[inline(always)]
265 pub fn lfrco(self) -> &'a mut W {
266 self.variant(DOWNSEL_A::LFRCO)
267 }
268 #[doc = "Select AUXHFRCO for down-counter"]
269 #[inline(always)]
270 pub fn auxhfrco(self) -> &'a mut W {
271 self.variant(DOWNSEL_A::AUXHFRCO)
272 }
273 #[doc = "Select PRS input selected by PRSDOWNSEL as down-counter"]
274 #[inline(always)]
275 pub fn prs(self) -> &'a mut W {
276 self.variant(DOWNSEL_A::PRS)
277 }
278 #[doc = "Select USHFRCO for down-counter"]
279 #[inline(always)]
280 pub fn ushfrco(self) -> &'a mut W {
281 self.variant(DOWNSEL_A::USHFRCO)
282 }
283}
284#[doc = "Field `CONT` reader - Continuous Calibration"]
285pub type CONT_R = crate::BitReader<bool>;
286#[doc = "Field `CONT` writer - Continuous Calibration"]
287pub type CONT_W<'a> = crate::BitWriter<'a, u32, CALCTRL_SPEC, bool, 8>;
288#[doc = "PRS Select for PRS Input When Selected in UPSEL\n\nValue on reset: 0"]
289#[derive(Clone, Copy, Debug, PartialEq)]
290#[repr(u8)]
291pub enum PRSUPSEL_A {
292 #[doc = "0: PRS Channel 0 selected as input"]
293 PRSCH0 = 0,
294 #[doc = "1: PRS Channel 1 selected as input"]
295 PRSCH1 = 1,
296 #[doc = "2: PRS Channel 2 selected as input"]
297 PRSCH2 = 2,
298 #[doc = "3: PRS Channel 3 selected as input"]
299 PRSCH3 = 3,
300 #[doc = "4: PRS Channel 4 selected as input"]
301 PRSCH4 = 4,
302 #[doc = "5: PRS Channel 5 selected as input"]
303 PRSCH5 = 5,
304 #[doc = "6: PRS Channel 6 selected as input"]
305 PRSCH6 = 6,
306 #[doc = "7: PRS Channel 7 selected as input"]
307 PRSCH7 = 7,
308 #[doc = "8: PRS Channel 8 selected as input"]
309 PRSCH8 = 8,
310 #[doc = "9: PRS Channel 9 selected as input"]
311 PRSCH9 = 9,
312 #[doc = "10: PRS Channel 10 selected as input"]
313 PRSCH10 = 10,
314 #[doc = "11: PRS Channel 11 selected as input"]
315 PRSCH11 = 11,
316 #[doc = "12: PRS Channel 12 selected as input"]
317 PRSCH12 = 12,
318 #[doc = "13: PRS Channel 13 selected as input"]
319 PRSCH13 = 13,
320 #[doc = "14: PRS Channel 14 selected as input"]
321 PRSCH14 = 14,
322 #[doc = "15: PRS Channel 15 selected as input"]
323 PRSCH15 = 15,
324 #[doc = "16: PRS Channel 16 selected as input"]
325 PRSCH16 = 16,
326 #[doc = "17: PRS Channel 17 selected as input"]
327 PRSCH17 = 17,
328 #[doc = "18: PRS Channel 18 selected as input"]
329 PRSCH18 = 18,
330 #[doc = "19: PRS Channel 19 selected as input"]
331 PRSCH19 = 19,
332 #[doc = "20: PRS Channel 20 selected as input"]
333 PRSCH20 = 20,
334 #[doc = "21: PRS Channel 21 selected as input"]
335 PRSCH21 = 21,
336 #[doc = "22: PRS Channel 22 selected as input"]
337 PRSCH22 = 22,
338 #[doc = "23: PRS Channel 23 selected as input"]
339 PRSCH23 = 23,
340}
341impl From<PRSUPSEL_A> for u8 {
342 #[inline(always)]
343 fn from(variant: PRSUPSEL_A) -> Self {
344 variant as _
345 }
346}
347#[doc = "Field `PRSUPSEL` reader - PRS Select for PRS Input When Selected in UPSEL"]
348pub type PRSUPSEL_R = crate::FieldReader<u8, PRSUPSEL_A>;
349impl PRSUPSEL_R {
350 #[doc = "Get enumerated values variant"]
351 #[inline(always)]
352 pub fn variant(&self) -> Option<PRSUPSEL_A> {
353 match self.bits {
354 0 => Some(PRSUPSEL_A::PRSCH0),
355 1 => Some(PRSUPSEL_A::PRSCH1),
356 2 => Some(PRSUPSEL_A::PRSCH2),
357 3 => Some(PRSUPSEL_A::PRSCH3),
358 4 => Some(PRSUPSEL_A::PRSCH4),
359 5 => Some(PRSUPSEL_A::PRSCH5),
360 6 => Some(PRSUPSEL_A::PRSCH6),
361 7 => Some(PRSUPSEL_A::PRSCH7),
362 8 => Some(PRSUPSEL_A::PRSCH8),
363 9 => Some(PRSUPSEL_A::PRSCH9),
364 10 => Some(PRSUPSEL_A::PRSCH10),
365 11 => Some(PRSUPSEL_A::PRSCH11),
366 12 => Some(PRSUPSEL_A::PRSCH12),
367 13 => Some(PRSUPSEL_A::PRSCH13),
368 14 => Some(PRSUPSEL_A::PRSCH14),
369 15 => Some(PRSUPSEL_A::PRSCH15),
370 16 => Some(PRSUPSEL_A::PRSCH16),
371 17 => Some(PRSUPSEL_A::PRSCH17),
372 18 => Some(PRSUPSEL_A::PRSCH18),
373 19 => Some(PRSUPSEL_A::PRSCH19),
374 20 => Some(PRSUPSEL_A::PRSCH20),
375 21 => Some(PRSUPSEL_A::PRSCH21),
376 22 => Some(PRSUPSEL_A::PRSCH22),
377 23 => Some(PRSUPSEL_A::PRSCH23),
378 _ => None,
379 }
380 }
381 #[doc = "Checks if the value of the field is `PRSCH0`"]
382 #[inline(always)]
383 pub fn is_prsch0(&self) -> bool {
384 *self == PRSUPSEL_A::PRSCH0
385 }
386 #[doc = "Checks if the value of the field is `PRSCH1`"]
387 #[inline(always)]
388 pub fn is_prsch1(&self) -> bool {
389 *self == PRSUPSEL_A::PRSCH1
390 }
391 #[doc = "Checks if the value of the field is `PRSCH2`"]
392 #[inline(always)]
393 pub fn is_prsch2(&self) -> bool {
394 *self == PRSUPSEL_A::PRSCH2
395 }
396 #[doc = "Checks if the value of the field is `PRSCH3`"]
397 #[inline(always)]
398 pub fn is_prsch3(&self) -> bool {
399 *self == PRSUPSEL_A::PRSCH3
400 }
401 #[doc = "Checks if the value of the field is `PRSCH4`"]
402 #[inline(always)]
403 pub fn is_prsch4(&self) -> bool {
404 *self == PRSUPSEL_A::PRSCH4
405 }
406 #[doc = "Checks if the value of the field is `PRSCH5`"]
407 #[inline(always)]
408 pub fn is_prsch5(&self) -> bool {
409 *self == PRSUPSEL_A::PRSCH5
410 }
411 #[doc = "Checks if the value of the field is `PRSCH6`"]
412 #[inline(always)]
413 pub fn is_prsch6(&self) -> bool {
414 *self == PRSUPSEL_A::PRSCH6
415 }
416 #[doc = "Checks if the value of the field is `PRSCH7`"]
417 #[inline(always)]
418 pub fn is_prsch7(&self) -> bool {
419 *self == PRSUPSEL_A::PRSCH7
420 }
421 #[doc = "Checks if the value of the field is `PRSCH8`"]
422 #[inline(always)]
423 pub fn is_prsch8(&self) -> bool {
424 *self == PRSUPSEL_A::PRSCH8
425 }
426 #[doc = "Checks if the value of the field is `PRSCH9`"]
427 #[inline(always)]
428 pub fn is_prsch9(&self) -> bool {
429 *self == PRSUPSEL_A::PRSCH9
430 }
431 #[doc = "Checks if the value of the field is `PRSCH10`"]
432 #[inline(always)]
433 pub fn is_prsch10(&self) -> bool {
434 *self == PRSUPSEL_A::PRSCH10
435 }
436 #[doc = "Checks if the value of the field is `PRSCH11`"]
437 #[inline(always)]
438 pub fn is_prsch11(&self) -> bool {
439 *self == PRSUPSEL_A::PRSCH11
440 }
441 #[doc = "Checks if the value of the field is `PRSCH12`"]
442 #[inline(always)]
443 pub fn is_prsch12(&self) -> bool {
444 *self == PRSUPSEL_A::PRSCH12
445 }
446 #[doc = "Checks if the value of the field is `PRSCH13`"]
447 #[inline(always)]
448 pub fn is_prsch13(&self) -> bool {
449 *self == PRSUPSEL_A::PRSCH13
450 }
451 #[doc = "Checks if the value of the field is `PRSCH14`"]
452 #[inline(always)]
453 pub fn is_prsch14(&self) -> bool {
454 *self == PRSUPSEL_A::PRSCH14
455 }
456 #[doc = "Checks if the value of the field is `PRSCH15`"]
457 #[inline(always)]
458 pub fn is_prsch15(&self) -> bool {
459 *self == PRSUPSEL_A::PRSCH15
460 }
461 #[doc = "Checks if the value of the field is `PRSCH16`"]
462 #[inline(always)]
463 pub fn is_prsch16(&self) -> bool {
464 *self == PRSUPSEL_A::PRSCH16
465 }
466 #[doc = "Checks if the value of the field is `PRSCH17`"]
467 #[inline(always)]
468 pub fn is_prsch17(&self) -> bool {
469 *self == PRSUPSEL_A::PRSCH17
470 }
471 #[doc = "Checks if the value of the field is `PRSCH18`"]
472 #[inline(always)]
473 pub fn is_prsch18(&self) -> bool {
474 *self == PRSUPSEL_A::PRSCH18
475 }
476 #[doc = "Checks if the value of the field is `PRSCH19`"]
477 #[inline(always)]
478 pub fn is_prsch19(&self) -> bool {
479 *self == PRSUPSEL_A::PRSCH19
480 }
481 #[doc = "Checks if the value of the field is `PRSCH20`"]
482 #[inline(always)]
483 pub fn is_prsch20(&self) -> bool {
484 *self == PRSUPSEL_A::PRSCH20
485 }
486 #[doc = "Checks if the value of the field is `PRSCH21`"]
487 #[inline(always)]
488 pub fn is_prsch21(&self) -> bool {
489 *self == PRSUPSEL_A::PRSCH21
490 }
491 #[doc = "Checks if the value of the field is `PRSCH22`"]
492 #[inline(always)]
493 pub fn is_prsch22(&self) -> bool {
494 *self == PRSUPSEL_A::PRSCH22
495 }
496 #[doc = "Checks if the value of the field is `PRSCH23`"]
497 #[inline(always)]
498 pub fn is_prsch23(&self) -> bool {
499 *self == PRSUPSEL_A::PRSCH23
500 }
501}
502#[doc = "Field `PRSUPSEL` writer - PRS Select for PRS Input When Selected in UPSEL"]
503pub type PRSUPSEL_W<'a> = crate::FieldWriter<'a, u32, CALCTRL_SPEC, u8, PRSUPSEL_A, 5, 16>;
504impl<'a> PRSUPSEL_W<'a> {
505 #[doc = "PRS Channel 0 selected as input"]
506 #[inline(always)]
507 pub fn prsch0(self) -> &'a mut W {
508 self.variant(PRSUPSEL_A::PRSCH0)
509 }
510 #[doc = "PRS Channel 1 selected as input"]
511 #[inline(always)]
512 pub fn prsch1(self) -> &'a mut W {
513 self.variant(PRSUPSEL_A::PRSCH1)
514 }
515 #[doc = "PRS Channel 2 selected as input"]
516 #[inline(always)]
517 pub fn prsch2(self) -> &'a mut W {
518 self.variant(PRSUPSEL_A::PRSCH2)
519 }
520 #[doc = "PRS Channel 3 selected as input"]
521 #[inline(always)]
522 pub fn prsch3(self) -> &'a mut W {
523 self.variant(PRSUPSEL_A::PRSCH3)
524 }
525 #[doc = "PRS Channel 4 selected as input"]
526 #[inline(always)]
527 pub fn prsch4(self) -> &'a mut W {
528 self.variant(PRSUPSEL_A::PRSCH4)
529 }
530 #[doc = "PRS Channel 5 selected as input"]
531 #[inline(always)]
532 pub fn prsch5(self) -> &'a mut W {
533 self.variant(PRSUPSEL_A::PRSCH5)
534 }
535 #[doc = "PRS Channel 6 selected as input"]
536 #[inline(always)]
537 pub fn prsch6(self) -> &'a mut W {
538 self.variant(PRSUPSEL_A::PRSCH6)
539 }
540 #[doc = "PRS Channel 7 selected as input"]
541 #[inline(always)]
542 pub fn prsch7(self) -> &'a mut W {
543 self.variant(PRSUPSEL_A::PRSCH7)
544 }
545 #[doc = "PRS Channel 8 selected as input"]
546 #[inline(always)]
547 pub fn prsch8(self) -> &'a mut W {
548 self.variant(PRSUPSEL_A::PRSCH8)
549 }
550 #[doc = "PRS Channel 9 selected as input"]
551 #[inline(always)]
552 pub fn prsch9(self) -> &'a mut W {
553 self.variant(PRSUPSEL_A::PRSCH9)
554 }
555 #[doc = "PRS Channel 10 selected as input"]
556 #[inline(always)]
557 pub fn prsch10(self) -> &'a mut W {
558 self.variant(PRSUPSEL_A::PRSCH10)
559 }
560 #[doc = "PRS Channel 11 selected as input"]
561 #[inline(always)]
562 pub fn prsch11(self) -> &'a mut W {
563 self.variant(PRSUPSEL_A::PRSCH11)
564 }
565 #[doc = "PRS Channel 12 selected as input"]
566 #[inline(always)]
567 pub fn prsch12(self) -> &'a mut W {
568 self.variant(PRSUPSEL_A::PRSCH12)
569 }
570 #[doc = "PRS Channel 13 selected as input"]
571 #[inline(always)]
572 pub fn prsch13(self) -> &'a mut W {
573 self.variant(PRSUPSEL_A::PRSCH13)
574 }
575 #[doc = "PRS Channel 14 selected as input"]
576 #[inline(always)]
577 pub fn prsch14(self) -> &'a mut W {
578 self.variant(PRSUPSEL_A::PRSCH14)
579 }
580 #[doc = "PRS Channel 15 selected as input"]
581 #[inline(always)]
582 pub fn prsch15(self) -> &'a mut W {
583 self.variant(PRSUPSEL_A::PRSCH15)
584 }
585 #[doc = "PRS Channel 16 selected as input"]
586 #[inline(always)]
587 pub fn prsch16(self) -> &'a mut W {
588 self.variant(PRSUPSEL_A::PRSCH16)
589 }
590 #[doc = "PRS Channel 17 selected as input"]
591 #[inline(always)]
592 pub fn prsch17(self) -> &'a mut W {
593 self.variant(PRSUPSEL_A::PRSCH17)
594 }
595 #[doc = "PRS Channel 18 selected as input"]
596 #[inline(always)]
597 pub fn prsch18(self) -> &'a mut W {
598 self.variant(PRSUPSEL_A::PRSCH18)
599 }
600 #[doc = "PRS Channel 19 selected as input"]
601 #[inline(always)]
602 pub fn prsch19(self) -> &'a mut W {
603 self.variant(PRSUPSEL_A::PRSCH19)
604 }
605 #[doc = "PRS Channel 20 selected as input"]
606 #[inline(always)]
607 pub fn prsch20(self) -> &'a mut W {
608 self.variant(PRSUPSEL_A::PRSCH20)
609 }
610 #[doc = "PRS Channel 21 selected as input"]
611 #[inline(always)]
612 pub fn prsch21(self) -> &'a mut W {
613 self.variant(PRSUPSEL_A::PRSCH21)
614 }
615 #[doc = "PRS Channel 22 selected as input"]
616 #[inline(always)]
617 pub fn prsch22(self) -> &'a mut W {
618 self.variant(PRSUPSEL_A::PRSCH22)
619 }
620 #[doc = "PRS Channel 23 selected as input"]
621 #[inline(always)]
622 pub fn prsch23(self) -> &'a mut W {
623 self.variant(PRSUPSEL_A::PRSCH23)
624 }
625}
626#[doc = "PRS Select for PRS Input When Selected in DOWNSEL\n\nValue on reset: 0"]
627#[derive(Clone, Copy, Debug, PartialEq)]
628#[repr(u8)]
629pub enum PRSDOWNSEL_A {
630 #[doc = "0: PRS Channel 0 selected as input"]
631 PRSCH0 = 0,
632 #[doc = "1: PRS Channel 1 selected as input"]
633 PRSCH1 = 1,
634 #[doc = "2: PRS Channel 2 selected as input"]
635 PRSCH2 = 2,
636 #[doc = "3: PRS Channel 3 selected as input"]
637 PRSCH3 = 3,
638 #[doc = "4: PRS Channel 4 selected as input"]
639 PRSCH4 = 4,
640 #[doc = "5: PRS Channel 5 selected as input"]
641 PRSCH5 = 5,
642 #[doc = "6: PRS Channel 6 selected as input"]
643 PRSCH6 = 6,
644 #[doc = "7: PRS Channel 7 selected as input"]
645 PRSCH7 = 7,
646 #[doc = "8: PRS Channel 8 selected as input"]
647 PRSCH8 = 8,
648 #[doc = "9: PRS Channel 9 selected as input"]
649 PRSCH9 = 9,
650 #[doc = "10: PRS Channel 10 selected as input"]
651 PRSCH10 = 10,
652 #[doc = "11: PRS Channel 11 selected as input"]
653 PRSCH11 = 11,
654 #[doc = "12: PRS Channel 12 selected as input"]
655 PRSCH12 = 12,
656 #[doc = "13: PRS Channel 13 selected as input"]
657 PRSCH13 = 13,
658 #[doc = "14: PRS Channel 14 selected as input"]
659 PRSCH14 = 14,
660 #[doc = "15: PRS Channel 15 selected as input"]
661 PRSCH15 = 15,
662 #[doc = "16: PRS Channel 16 selected as input"]
663 PRSCH16 = 16,
664 #[doc = "17: PRS Channel 17 selected as input"]
665 PRSCH17 = 17,
666 #[doc = "18: PRS Channel 18 selected as input"]
667 PRSCH18 = 18,
668 #[doc = "19: PRS Channel 19 selected as input"]
669 PRSCH19 = 19,
670 #[doc = "20: PRS Channel 20 selected as input"]
671 PRSCH20 = 20,
672 #[doc = "21: PRS Channel 21 selected as input"]
673 PRSCH21 = 21,
674 #[doc = "22: PRS Channel 22 selected as input"]
675 PRSCH22 = 22,
676 #[doc = "23: PRS Channel 23 selected as input"]
677 PRSCH23 = 23,
678}
679impl From<PRSDOWNSEL_A> for u8 {
680 #[inline(always)]
681 fn from(variant: PRSDOWNSEL_A) -> Self {
682 variant as _
683 }
684}
685#[doc = "Field `PRSDOWNSEL` reader - PRS Select for PRS Input When Selected in DOWNSEL"]
686pub type PRSDOWNSEL_R = crate::FieldReader<u8, PRSDOWNSEL_A>;
687impl PRSDOWNSEL_R {
688 #[doc = "Get enumerated values variant"]
689 #[inline(always)]
690 pub fn variant(&self) -> Option<PRSDOWNSEL_A> {
691 match self.bits {
692 0 => Some(PRSDOWNSEL_A::PRSCH0),
693 1 => Some(PRSDOWNSEL_A::PRSCH1),
694 2 => Some(PRSDOWNSEL_A::PRSCH2),
695 3 => Some(PRSDOWNSEL_A::PRSCH3),
696 4 => Some(PRSDOWNSEL_A::PRSCH4),
697 5 => Some(PRSDOWNSEL_A::PRSCH5),
698 6 => Some(PRSDOWNSEL_A::PRSCH6),
699 7 => Some(PRSDOWNSEL_A::PRSCH7),
700 8 => Some(PRSDOWNSEL_A::PRSCH8),
701 9 => Some(PRSDOWNSEL_A::PRSCH9),
702 10 => Some(PRSDOWNSEL_A::PRSCH10),
703 11 => Some(PRSDOWNSEL_A::PRSCH11),
704 12 => Some(PRSDOWNSEL_A::PRSCH12),
705 13 => Some(PRSDOWNSEL_A::PRSCH13),
706 14 => Some(PRSDOWNSEL_A::PRSCH14),
707 15 => Some(PRSDOWNSEL_A::PRSCH15),
708 16 => Some(PRSDOWNSEL_A::PRSCH16),
709 17 => Some(PRSDOWNSEL_A::PRSCH17),
710 18 => Some(PRSDOWNSEL_A::PRSCH18),
711 19 => Some(PRSDOWNSEL_A::PRSCH19),
712 20 => Some(PRSDOWNSEL_A::PRSCH20),
713 21 => Some(PRSDOWNSEL_A::PRSCH21),
714 22 => Some(PRSDOWNSEL_A::PRSCH22),
715 23 => Some(PRSDOWNSEL_A::PRSCH23),
716 _ => None,
717 }
718 }
719 #[doc = "Checks if the value of the field is `PRSCH0`"]
720 #[inline(always)]
721 pub fn is_prsch0(&self) -> bool {
722 *self == PRSDOWNSEL_A::PRSCH0
723 }
724 #[doc = "Checks if the value of the field is `PRSCH1`"]
725 #[inline(always)]
726 pub fn is_prsch1(&self) -> bool {
727 *self == PRSDOWNSEL_A::PRSCH1
728 }
729 #[doc = "Checks if the value of the field is `PRSCH2`"]
730 #[inline(always)]
731 pub fn is_prsch2(&self) -> bool {
732 *self == PRSDOWNSEL_A::PRSCH2
733 }
734 #[doc = "Checks if the value of the field is `PRSCH3`"]
735 #[inline(always)]
736 pub fn is_prsch3(&self) -> bool {
737 *self == PRSDOWNSEL_A::PRSCH3
738 }
739 #[doc = "Checks if the value of the field is `PRSCH4`"]
740 #[inline(always)]
741 pub fn is_prsch4(&self) -> bool {
742 *self == PRSDOWNSEL_A::PRSCH4
743 }
744 #[doc = "Checks if the value of the field is `PRSCH5`"]
745 #[inline(always)]
746 pub fn is_prsch5(&self) -> bool {
747 *self == PRSDOWNSEL_A::PRSCH5
748 }
749 #[doc = "Checks if the value of the field is `PRSCH6`"]
750 #[inline(always)]
751 pub fn is_prsch6(&self) -> bool {
752 *self == PRSDOWNSEL_A::PRSCH6
753 }
754 #[doc = "Checks if the value of the field is `PRSCH7`"]
755 #[inline(always)]
756 pub fn is_prsch7(&self) -> bool {
757 *self == PRSDOWNSEL_A::PRSCH7
758 }
759 #[doc = "Checks if the value of the field is `PRSCH8`"]
760 #[inline(always)]
761 pub fn is_prsch8(&self) -> bool {
762 *self == PRSDOWNSEL_A::PRSCH8
763 }
764 #[doc = "Checks if the value of the field is `PRSCH9`"]
765 #[inline(always)]
766 pub fn is_prsch9(&self) -> bool {
767 *self == PRSDOWNSEL_A::PRSCH9
768 }
769 #[doc = "Checks if the value of the field is `PRSCH10`"]
770 #[inline(always)]
771 pub fn is_prsch10(&self) -> bool {
772 *self == PRSDOWNSEL_A::PRSCH10
773 }
774 #[doc = "Checks if the value of the field is `PRSCH11`"]
775 #[inline(always)]
776 pub fn is_prsch11(&self) -> bool {
777 *self == PRSDOWNSEL_A::PRSCH11
778 }
779 #[doc = "Checks if the value of the field is `PRSCH12`"]
780 #[inline(always)]
781 pub fn is_prsch12(&self) -> bool {
782 *self == PRSDOWNSEL_A::PRSCH12
783 }
784 #[doc = "Checks if the value of the field is `PRSCH13`"]
785 #[inline(always)]
786 pub fn is_prsch13(&self) -> bool {
787 *self == PRSDOWNSEL_A::PRSCH13
788 }
789 #[doc = "Checks if the value of the field is `PRSCH14`"]
790 #[inline(always)]
791 pub fn is_prsch14(&self) -> bool {
792 *self == PRSDOWNSEL_A::PRSCH14
793 }
794 #[doc = "Checks if the value of the field is `PRSCH15`"]
795 #[inline(always)]
796 pub fn is_prsch15(&self) -> bool {
797 *self == PRSDOWNSEL_A::PRSCH15
798 }
799 #[doc = "Checks if the value of the field is `PRSCH16`"]
800 #[inline(always)]
801 pub fn is_prsch16(&self) -> bool {
802 *self == PRSDOWNSEL_A::PRSCH16
803 }
804 #[doc = "Checks if the value of the field is `PRSCH17`"]
805 #[inline(always)]
806 pub fn is_prsch17(&self) -> bool {
807 *self == PRSDOWNSEL_A::PRSCH17
808 }
809 #[doc = "Checks if the value of the field is `PRSCH18`"]
810 #[inline(always)]
811 pub fn is_prsch18(&self) -> bool {
812 *self == PRSDOWNSEL_A::PRSCH18
813 }
814 #[doc = "Checks if the value of the field is `PRSCH19`"]
815 #[inline(always)]
816 pub fn is_prsch19(&self) -> bool {
817 *self == PRSDOWNSEL_A::PRSCH19
818 }
819 #[doc = "Checks if the value of the field is `PRSCH20`"]
820 #[inline(always)]
821 pub fn is_prsch20(&self) -> bool {
822 *self == PRSDOWNSEL_A::PRSCH20
823 }
824 #[doc = "Checks if the value of the field is `PRSCH21`"]
825 #[inline(always)]
826 pub fn is_prsch21(&self) -> bool {
827 *self == PRSDOWNSEL_A::PRSCH21
828 }
829 #[doc = "Checks if the value of the field is `PRSCH22`"]
830 #[inline(always)]
831 pub fn is_prsch22(&self) -> bool {
832 *self == PRSDOWNSEL_A::PRSCH22
833 }
834 #[doc = "Checks if the value of the field is `PRSCH23`"]
835 #[inline(always)]
836 pub fn is_prsch23(&self) -> bool {
837 *self == PRSDOWNSEL_A::PRSCH23
838 }
839}
840#[doc = "Field `PRSDOWNSEL` writer - PRS Select for PRS Input When Selected in DOWNSEL"]
841pub type PRSDOWNSEL_W<'a> = crate::FieldWriter<'a, u32, CALCTRL_SPEC, u8, PRSDOWNSEL_A, 5, 24>;
842impl<'a> PRSDOWNSEL_W<'a> {
843 #[doc = "PRS Channel 0 selected as input"]
844 #[inline(always)]
845 pub fn prsch0(self) -> &'a mut W {
846 self.variant(PRSDOWNSEL_A::PRSCH0)
847 }
848 #[doc = "PRS Channel 1 selected as input"]
849 #[inline(always)]
850 pub fn prsch1(self) -> &'a mut W {
851 self.variant(PRSDOWNSEL_A::PRSCH1)
852 }
853 #[doc = "PRS Channel 2 selected as input"]
854 #[inline(always)]
855 pub fn prsch2(self) -> &'a mut W {
856 self.variant(PRSDOWNSEL_A::PRSCH2)
857 }
858 #[doc = "PRS Channel 3 selected as input"]
859 #[inline(always)]
860 pub fn prsch3(self) -> &'a mut W {
861 self.variant(PRSDOWNSEL_A::PRSCH3)
862 }
863 #[doc = "PRS Channel 4 selected as input"]
864 #[inline(always)]
865 pub fn prsch4(self) -> &'a mut W {
866 self.variant(PRSDOWNSEL_A::PRSCH4)
867 }
868 #[doc = "PRS Channel 5 selected as input"]
869 #[inline(always)]
870 pub fn prsch5(self) -> &'a mut W {
871 self.variant(PRSDOWNSEL_A::PRSCH5)
872 }
873 #[doc = "PRS Channel 6 selected as input"]
874 #[inline(always)]
875 pub fn prsch6(self) -> &'a mut W {
876 self.variant(PRSDOWNSEL_A::PRSCH6)
877 }
878 #[doc = "PRS Channel 7 selected as input"]
879 #[inline(always)]
880 pub fn prsch7(self) -> &'a mut W {
881 self.variant(PRSDOWNSEL_A::PRSCH7)
882 }
883 #[doc = "PRS Channel 8 selected as input"]
884 #[inline(always)]
885 pub fn prsch8(self) -> &'a mut W {
886 self.variant(PRSDOWNSEL_A::PRSCH8)
887 }
888 #[doc = "PRS Channel 9 selected as input"]
889 #[inline(always)]
890 pub fn prsch9(self) -> &'a mut W {
891 self.variant(PRSDOWNSEL_A::PRSCH9)
892 }
893 #[doc = "PRS Channel 10 selected as input"]
894 #[inline(always)]
895 pub fn prsch10(self) -> &'a mut W {
896 self.variant(PRSDOWNSEL_A::PRSCH10)
897 }
898 #[doc = "PRS Channel 11 selected as input"]
899 #[inline(always)]
900 pub fn prsch11(self) -> &'a mut W {
901 self.variant(PRSDOWNSEL_A::PRSCH11)
902 }
903 #[doc = "PRS Channel 12 selected as input"]
904 #[inline(always)]
905 pub fn prsch12(self) -> &'a mut W {
906 self.variant(PRSDOWNSEL_A::PRSCH12)
907 }
908 #[doc = "PRS Channel 13 selected as input"]
909 #[inline(always)]
910 pub fn prsch13(self) -> &'a mut W {
911 self.variant(PRSDOWNSEL_A::PRSCH13)
912 }
913 #[doc = "PRS Channel 14 selected as input"]
914 #[inline(always)]
915 pub fn prsch14(self) -> &'a mut W {
916 self.variant(PRSDOWNSEL_A::PRSCH14)
917 }
918 #[doc = "PRS Channel 15 selected as input"]
919 #[inline(always)]
920 pub fn prsch15(self) -> &'a mut W {
921 self.variant(PRSDOWNSEL_A::PRSCH15)
922 }
923 #[doc = "PRS Channel 16 selected as input"]
924 #[inline(always)]
925 pub fn prsch16(self) -> &'a mut W {
926 self.variant(PRSDOWNSEL_A::PRSCH16)
927 }
928 #[doc = "PRS Channel 17 selected as input"]
929 #[inline(always)]
930 pub fn prsch17(self) -> &'a mut W {
931 self.variant(PRSDOWNSEL_A::PRSCH17)
932 }
933 #[doc = "PRS Channel 18 selected as input"]
934 #[inline(always)]
935 pub fn prsch18(self) -> &'a mut W {
936 self.variant(PRSDOWNSEL_A::PRSCH18)
937 }
938 #[doc = "PRS Channel 19 selected as input"]
939 #[inline(always)]
940 pub fn prsch19(self) -> &'a mut W {
941 self.variant(PRSDOWNSEL_A::PRSCH19)
942 }
943 #[doc = "PRS Channel 20 selected as input"]
944 #[inline(always)]
945 pub fn prsch20(self) -> &'a mut W {
946 self.variant(PRSDOWNSEL_A::PRSCH20)
947 }
948 #[doc = "PRS Channel 21 selected as input"]
949 #[inline(always)]
950 pub fn prsch21(self) -> &'a mut W {
951 self.variant(PRSDOWNSEL_A::PRSCH21)
952 }
953 #[doc = "PRS Channel 22 selected as input"]
954 #[inline(always)]
955 pub fn prsch22(self) -> &'a mut W {
956 self.variant(PRSDOWNSEL_A::PRSCH22)
957 }
958 #[doc = "PRS Channel 23 selected as input"]
959 #[inline(always)]
960 pub fn prsch23(self) -> &'a mut W {
961 self.variant(PRSDOWNSEL_A::PRSCH23)
962 }
963}
964impl R {
965 #[doc = "Bits 0:2 - Calibration Up-counter Select"]
966 #[inline(always)]
967 pub fn upsel(&self) -> UPSEL_R {
968 UPSEL_R::new((self.bits & 7) as u8)
969 }
970 #[doc = "Bits 4:7 - Calibration Down-counter Select"]
971 #[inline(always)]
972 pub fn downsel(&self) -> DOWNSEL_R {
973 DOWNSEL_R::new(((self.bits >> 4) & 0x0f) as u8)
974 }
975 #[doc = "Bit 8 - Continuous Calibration"]
976 #[inline(always)]
977 pub fn cont(&self) -> CONT_R {
978 CONT_R::new(((self.bits >> 8) & 1) != 0)
979 }
980 #[doc = "Bits 16:20 - PRS Select for PRS Input When Selected in UPSEL"]
981 #[inline(always)]
982 pub fn prsupsel(&self) -> PRSUPSEL_R {
983 PRSUPSEL_R::new(((self.bits >> 16) & 0x1f) as u8)
984 }
985 #[doc = "Bits 24:28 - PRS Select for PRS Input When Selected in DOWNSEL"]
986 #[inline(always)]
987 pub fn prsdownsel(&self) -> PRSDOWNSEL_R {
988 PRSDOWNSEL_R::new(((self.bits >> 24) & 0x1f) as u8)
989 }
990}
991impl W {
992 #[doc = "Bits 0:2 - Calibration Up-counter Select"]
993 #[inline(always)]
994 pub fn upsel(&mut self) -> UPSEL_W {
995 UPSEL_W::new(self)
996 }
997 #[doc = "Bits 4:7 - Calibration Down-counter Select"]
998 #[inline(always)]
999 pub fn downsel(&mut self) -> DOWNSEL_W {
1000 DOWNSEL_W::new(self)
1001 }
1002 #[doc = "Bit 8 - Continuous Calibration"]
1003 #[inline(always)]
1004 pub fn cont(&mut self) -> CONT_W {
1005 CONT_W::new(self)
1006 }
1007 #[doc = "Bits 16:20 - PRS Select for PRS Input When Selected in UPSEL"]
1008 #[inline(always)]
1009 pub fn prsupsel(&mut self) -> PRSUPSEL_W {
1010 PRSUPSEL_W::new(self)
1011 }
1012 #[doc = "Bits 24:28 - PRS Select for PRS Input When Selected in DOWNSEL"]
1013 #[inline(always)]
1014 pub fn prsdownsel(&mut self) -> PRSDOWNSEL_W {
1015 PRSDOWNSEL_W::new(self)
1016 }
1017 #[doc = "Writes raw bits to the register."]
1018 #[inline(always)]
1019 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1020 self.0.bits(bits);
1021 self
1022 }
1023}
1024#[doc = "Calibration 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 [calctrl](index.html) module"]
1025pub struct CALCTRL_SPEC;
1026impl crate::RegisterSpec for CALCTRL_SPEC {
1027 type Ux = u32;
1028}
1029#[doc = "`read()` method returns [calctrl::R](R) reader structure"]
1030impl crate::Readable for CALCTRL_SPEC {
1031 type Reader = R;
1032}
1033#[doc = "`write(|w| ..)` method takes [calctrl::W](W) writer structure"]
1034impl crate::Writable for CALCTRL_SPEC {
1035 type Writer = W;
1036}
1037#[doc = "`reset()` method sets CALCTRL to value 0"]
1038impl crate::Resettable for CALCTRL_SPEC {
1039 #[inline(always)]
1040 fn reset_value() -> Self::Ux {
1041 0
1042 }
1043}