efm32pg1b200_pac/cmu/
calctrl.rs

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}
54impl From<UPSEL_A> for u8 {
55    #[inline(always)]
56    fn from(variant: UPSEL_A) -> Self {
57        variant as _
58    }
59}
60#[doc = "Field `UPSEL` reader - Calibration Up-counter Select"]
61pub type UPSEL_R = crate::FieldReader<u8, UPSEL_A>;
62impl UPSEL_R {
63    #[doc = "Get enumerated values variant"]
64    #[inline(always)]
65    pub fn variant(&self) -> Option<UPSEL_A> {
66        match self.bits {
67            0 => Some(UPSEL_A::HFXO),
68            1 => Some(UPSEL_A::LFXO),
69            2 => Some(UPSEL_A::HFRCO),
70            3 => Some(UPSEL_A::LFRCO),
71            4 => Some(UPSEL_A::AUXHFRCO),
72            5 => Some(UPSEL_A::PRS),
73            _ => None,
74        }
75    }
76    #[doc = "Checks if the value of the field is `HFXO`"]
77    #[inline(always)]
78    pub fn is_hfxo(&self) -> bool {
79        *self == UPSEL_A::HFXO
80    }
81    #[doc = "Checks if the value of the field is `LFXO`"]
82    #[inline(always)]
83    pub fn is_lfxo(&self) -> bool {
84        *self == UPSEL_A::LFXO
85    }
86    #[doc = "Checks if the value of the field is `HFRCO`"]
87    #[inline(always)]
88    pub fn is_hfrco(&self) -> bool {
89        *self == UPSEL_A::HFRCO
90    }
91    #[doc = "Checks if the value of the field is `LFRCO`"]
92    #[inline(always)]
93    pub fn is_lfrco(&self) -> bool {
94        *self == UPSEL_A::LFRCO
95    }
96    #[doc = "Checks if the value of the field is `AUXHFRCO`"]
97    #[inline(always)]
98    pub fn is_auxhfrco(&self) -> bool {
99        *self == UPSEL_A::AUXHFRCO
100    }
101    #[doc = "Checks if the value of the field is `PRS`"]
102    #[inline(always)]
103    pub fn is_prs(&self) -> bool {
104        *self == UPSEL_A::PRS
105    }
106}
107#[doc = "Field `UPSEL` writer - Calibration Up-counter Select"]
108pub type UPSEL_W<'a> = crate::FieldWriter<'a, u32, CALCTRL_SPEC, u8, UPSEL_A, 3, 0>;
109impl<'a> UPSEL_W<'a> {
110    #[doc = "Select HFXO as up-counter"]
111    #[inline(always)]
112    pub fn hfxo(self) -> &'a mut W {
113        self.variant(UPSEL_A::HFXO)
114    }
115    #[doc = "Select LFXO as up-counter"]
116    #[inline(always)]
117    pub fn lfxo(self) -> &'a mut W {
118        self.variant(UPSEL_A::LFXO)
119    }
120    #[doc = "Select HFRCO as up-counter"]
121    #[inline(always)]
122    pub fn hfrco(self) -> &'a mut W {
123        self.variant(UPSEL_A::HFRCO)
124    }
125    #[doc = "Select LFRCO as up-counter"]
126    #[inline(always)]
127    pub fn lfrco(self) -> &'a mut W {
128        self.variant(UPSEL_A::LFRCO)
129    }
130    #[doc = "Select AUXHFRCO as up-counter"]
131    #[inline(always)]
132    pub fn auxhfrco(self) -> &'a mut W {
133        self.variant(UPSEL_A::AUXHFRCO)
134    }
135    #[doc = "Select PRS input selected by PRSUPSEL as up-counter"]
136    #[inline(always)]
137    pub fn prs(self) -> &'a mut W {
138        self.variant(UPSEL_A::PRS)
139    }
140}
141#[doc = "Calibration Down-counter Select\n\nValue on reset: 0"]
142#[derive(Clone, Copy, Debug, PartialEq)]
143#[repr(u8)]
144pub enum DOWNSEL_A {
145    #[doc = "0: Select HFCLK for down-counter"]
146    HFCLK = 0,
147    #[doc = "1: Select HFXO for down-counter"]
148    HFXO = 1,
149    #[doc = "2: Select LFXO for down-counter"]
150    LFXO = 2,
151    #[doc = "3: Select HFRCO for down-counter"]
152    HFRCO = 3,
153    #[doc = "4: Select LFRCO for down-counter"]
154    LFRCO = 4,
155    #[doc = "5: Select AUXHFRCO for down-counter"]
156    AUXHFRCO = 5,
157    #[doc = "6: Select PRS input selected by PRSDOWNSEL as down-counter"]
158    PRS = 6,
159}
160impl From<DOWNSEL_A> for u8 {
161    #[inline(always)]
162    fn from(variant: DOWNSEL_A) -> Self {
163        variant as _
164    }
165}
166#[doc = "Field `DOWNSEL` reader - Calibration Down-counter Select"]
167pub type DOWNSEL_R = crate::FieldReader<u8, DOWNSEL_A>;
168impl DOWNSEL_R {
169    #[doc = "Get enumerated values variant"]
170    #[inline(always)]
171    pub fn variant(&self) -> Option<DOWNSEL_A> {
172        match self.bits {
173            0 => Some(DOWNSEL_A::HFCLK),
174            1 => Some(DOWNSEL_A::HFXO),
175            2 => Some(DOWNSEL_A::LFXO),
176            3 => Some(DOWNSEL_A::HFRCO),
177            4 => Some(DOWNSEL_A::LFRCO),
178            5 => Some(DOWNSEL_A::AUXHFRCO),
179            6 => Some(DOWNSEL_A::PRS),
180            _ => None,
181        }
182    }
183    #[doc = "Checks if the value of the field is `HFCLK`"]
184    #[inline(always)]
185    pub fn is_hfclk(&self) -> bool {
186        *self == DOWNSEL_A::HFCLK
187    }
188    #[doc = "Checks if the value of the field is `HFXO`"]
189    #[inline(always)]
190    pub fn is_hfxo(&self) -> bool {
191        *self == DOWNSEL_A::HFXO
192    }
193    #[doc = "Checks if the value of the field is `LFXO`"]
194    #[inline(always)]
195    pub fn is_lfxo(&self) -> bool {
196        *self == DOWNSEL_A::LFXO
197    }
198    #[doc = "Checks if the value of the field is `HFRCO`"]
199    #[inline(always)]
200    pub fn is_hfrco(&self) -> bool {
201        *self == DOWNSEL_A::HFRCO
202    }
203    #[doc = "Checks if the value of the field is `LFRCO`"]
204    #[inline(always)]
205    pub fn is_lfrco(&self) -> bool {
206        *self == DOWNSEL_A::LFRCO
207    }
208    #[doc = "Checks if the value of the field is `AUXHFRCO`"]
209    #[inline(always)]
210    pub fn is_auxhfrco(&self) -> bool {
211        *self == DOWNSEL_A::AUXHFRCO
212    }
213    #[doc = "Checks if the value of the field is `PRS`"]
214    #[inline(always)]
215    pub fn is_prs(&self) -> bool {
216        *self == DOWNSEL_A::PRS
217    }
218}
219#[doc = "Field `DOWNSEL` writer - Calibration Down-counter Select"]
220pub type DOWNSEL_W<'a> = crate::FieldWriter<'a, u32, CALCTRL_SPEC, u8, DOWNSEL_A, 3, 4>;
221impl<'a> DOWNSEL_W<'a> {
222    #[doc = "Select HFCLK for down-counter"]
223    #[inline(always)]
224    pub fn hfclk(self) -> &'a mut W {
225        self.variant(DOWNSEL_A::HFCLK)
226    }
227    #[doc = "Select HFXO for down-counter"]
228    #[inline(always)]
229    pub fn hfxo(self) -> &'a mut W {
230        self.variant(DOWNSEL_A::HFXO)
231    }
232    #[doc = "Select LFXO for down-counter"]
233    #[inline(always)]
234    pub fn lfxo(self) -> &'a mut W {
235        self.variant(DOWNSEL_A::LFXO)
236    }
237    #[doc = "Select HFRCO for down-counter"]
238    #[inline(always)]
239    pub fn hfrco(self) -> &'a mut W {
240        self.variant(DOWNSEL_A::HFRCO)
241    }
242    #[doc = "Select LFRCO for down-counter"]
243    #[inline(always)]
244    pub fn lfrco(self) -> &'a mut W {
245        self.variant(DOWNSEL_A::LFRCO)
246    }
247    #[doc = "Select AUXHFRCO for down-counter"]
248    #[inline(always)]
249    pub fn auxhfrco(self) -> &'a mut W {
250        self.variant(DOWNSEL_A::AUXHFRCO)
251    }
252    #[doc = "Select PRS input selected by PRSDOWNSEL as down-counter"]
253    #[inline(always)]
254    pub fn prs(self) -> &'a mut W {
255        self.variant(DOWNSEL_A::PRS)
256    }
257}
258#[doc = "Field `CONT` reader - Continuous Calibration"]
259pub type CONT_R = crate::BitReader<bool>;
260#[doc = "Field `CONT` writer - Continuous Calibration"]
261pub type CONT_W<'a> = crate::BitWriter<'a, u32, CALCTRL_SPEC, bool, 8>;
262#[doc = "PRS Select for PRS Input When Selected in UPSEL\n\nValue on reset: 0"]
263#[derive(Clone, Copy, Debug, PartialEq)]
264#[repr(u8)]
265pub enum PRSUPSEL_A {
266    #[doc = "0: PRS Channel 0 selected as input"]
267    PRSCH0 = 0,
268    #[doc = "1: PRS Channel 1 selected as input"]
269    PRSCH1 = 1,
270    #[doc = "2: PRS Channel 2 selected as input"]
271    PRSCH2 = 2,
272    #[doc = "3: PRS Channel 3 selected as input"]
273    PRSCH3 = 3,
274    #[doc = "4: PRS Channel 4 selected as input"]
275    PRSCH4 = 4,
276    #[doc = "5: PRS Channel 5 selected as input"]
277    PRSCH5 = 5,
278    #[doc = "6: PRS Channel 6 selected as input"]
279    PRSCH6 = 6,
280    #[doc = "7: PRS Channel 7 selected as input"]
281    PRSCH7 = 7,
282    #[doc = "8: PRS Channel 8 selected as input"]
283    PRSCH8 = 8,
284    #[doc = "9: PRS Channel 9 selected as input"]
285    PRSCH9 = 9,
286    #[doc = "10: PRS Channel 10 selected as input"]
287    PRSCH10 = 10,
288    #[doc = "11: PRS Channel 11 selected as input"]
289    PRSCH11 = 11,
290}
291impl From<PRSUPSEL_A> for u8 {
292    #[inline(always)]
293    fn from(variant: PRSUPSEL_A) -> Self {
294        variant as _
295    }
296}
297#[doc = "Field `PRSUPSEL` reader - PRS Select for PRS Input When Selected in UPSEL"]
298pub type PRSUPSEL_R = crate::FieldReader<u8, PRSUPSEL_A>;
299impl PRSUPSEL_R {
300    #[doc = "Get enumerated values variant"]
301    #[inline(always)]
302    pub fn variant(&self) -> Option<PRSUPSEL_A> {
303        match self.bits {
304            0 => Some(PRSUPSEL_A::PRSCH0),
305            1 => Some(PRSUPSEL_A::PRSCH1),
306            2 => Some(PRSUPSEL_A::PRSCH2),
307            3 => Some(PRSUPSEL_A::PRSCH3),
308            4 => Some(PRSUPSEL_A::PRSCH4),
309            5 => Some(PRSUPSEL_A::PRSCH5),
310            6 => Some(PRSUPSEL_A::PRSCH6),
311            7 => Some(PRSUPSEL_A::PRSCH7),
312            8 => Some(PRSUPSEL_A::PRSCH8),
313            9 => Some(PRSUPSEL_A::PRSCH9),
314            10 => Some(PRSUPSEL_A::PRSCH10),
315            11 => Some(PRSUPSEL_A::PRSCH11),
316            _ => None,
317        }
318    }
319    #[doc = "Checks if the value of the field is `PRSCH0`"]
320    #[inline(always)]
321    pub fn is_prsch0(&self) -> bool {
322        *self == PRSUPSEL_A::PRSCH0
323    }
324    #[doc = "Checks if the value of the field is `PRSCH1`"]
325    #[inline(always)]
326    pub fn is_prsch1(&self) -> bool {
327        *self == PRSUPSEL_A::PRSCH1
328    }
329    #[doc = "Checks if the value of the field is `PRSCH2`"]
330    #[inline(always)]
331    pub fn is_prsch2(&self) -> bool {
332        *self == PRSUPSEL_A::PRSCH2
333    }
334    #[doc = "Checks if the value of the field is `PRSCH3`"]
335    #[inline(always)]
336    pub fn is_prsch3(&self) -> bool {
337        *self == PRSUPSEL_A::PRSCH3
338    }
339    #[doc = "Checks if the value of the field is `PRSCH4`"]
340    #[inline(always)]
341    pub fn is_prsch4(&self) -> bool {
342        *self == PRSUPSEL_A::PRSCH4
343    }
344    #[doc = "Checks if the value of the field is `PRSCH5`"]
345    #[inline(always)]
346    pub fn is_prsch5(&self) -> bool {
347        *self == PRSUPSEL_A::PRSCH5
348    }
349    #[doc = "Checks if the value of the field is `PRSCH6`"]
350    #[inline(always)]
351    pub fn is_prsch6(&self) -> bool {
352        *self == PRSUPSEL_A::PRSCH6
353    }
354    #[doc = "Checks if the value of the field is `PRSCH7`"]
355    #[inline(always)]
356    pub fn is_prsch7(&self) -> bool {
357        *self == PRSUPSEL_A::PRSCH7
358    }
359    #[doc = "Checks if the value of the field is `PRSCH8`"]
360    #[inline(always)]
361    pub fn is_prsch8(&self) -> bool {
362        *self == PRSUPSEL_A::PRSCH8
363    }
364    #[doc = "Checks if the value of the field is `PRSCH9`"]
365    #[inline(always)]
366    pub fn is_prsch9(&self) -> bool {
367        *self == PRSUPSEL_A::PRSCH9
368    }
369    #[doc = "Checks if the value of the field is `PRSCH10`"]
370    #[inline(always)]
371    pub fn is_prsch10(&self) -> bool {
372        *self == PRSUPSEL_A::PRSCH10
373    }
374    #[doc = "Checks if the value of the field is `PRSCH11`"]
375    #[inline(always)]
376    pub fn is_prsch11(&self) -> bool {
377        *self == PRSUPSEL_A::PRSCH11
378    }
379}
380#[doc = "Field `PRSUPSEL` writer - PRS Select for PRS Input When Selected in UPSEL"]
381pub type PRSUPSEL_W<'a> = crate::FieldWriter<'a, u32, CALCTRL_SPEC, u8, PRSUPSEL_A, 4, 16>;
382impl<'a> PRSUPSEL_W<'a> {
383    #[doc = "PRS Channel 0 selected as input"]
384    #[inline(always)]
385    pub fn prsch0(self) -> &'a mut W {
386        self.variant(PRSUPSEL_A::PRSCH0)
387    }
388    #[doc = "PRS Channel 1 selected as input"]
389    #[inline(always)]
390    pub fn prsch1(self) -> &'a mut W {
391        self.variant(PRSUPSEL_A::PRSCH1)
392    }
393    #[doc = "PRS Channel 2 selected as input"]
394    #[inline(always)]
395    pub fn prsch2(self) -> &'a mut W {
396        self.variant(PRSUPSEL_A::PRSCH2)
397    }
398    #[doc = "PRS Channel 3 selected as input"]
399    #[inline(always)]
400    pub fn prsch3(self) -> &'a mut W {
401        self.variant(PRSUPSEL_A::PRSCH3)
402    }
403    #[doc = "PRS Channel 4 selected as input"]
404    #[inline(always)]
405    pub fn prsch4(self) -> &'a mut W {
406        self.variant(PRSUPSEL_A::PRSCH4)
407    }
408    #[doc = "PRS Channel 5 selected as input"]
409    #[inline(always)]
410    pub fn prsch5(self) -> &'a mut W {
411        self.variant(PRSUPSEL_A::PRSCH5)
412    }
413    #[doc = "PRS Channel 6 selected as input"]
414    #[inline(always)]
415    pub fn prsch6(self) -> &'a mut W {
416        self.variant(PRSUPSEL_A::PRSCH6)
417    }
418    #[doc = "PRS Channel 7 selected as input"]
419    #[inline(always)]
420    pub fn prsch7(self) -> &'a mut W {
421        self.variant(PRSUPSEL_A::PRSCH7)
422    }
423    #[doc = "PRS Channel 8 selected as input"]
424    #[inline(always)]
425    pub fn prsch8(self) -> &'a mut W {
426        self.variant(PRSUPSEL_A::PRSCH8)
427    }
428    #[doc = "PRS Channel 9 selected as input"]
429    #[inline(always)]
430    pub fn prsch9(self) -> &'a mut W {
431        self.variant(PRSUPSEL_A::PRSCH9)
432    }
433    #[doc = "PRS Channel 10 selected as input"]
434    #[inline(always)]
435    pub fn prsch10(self) -> &'a mut W {
436        self.variant(PRSUPSEL_A::PRSCH10)
437    }
438    #[doc = "PRS Channel 11 selected as input"]
439    #[inline(always)]
440    pub fn prsch11(self) -> &'a mut W {
441        self.variant(PRSUPSEL_A::PRSCH11)
442    }
443}
444#[doc = "PRS Select for PRS Input When Selected in DOWNSEL\n\nValue on reset: 0"]
445#[derive(Clone, Copy, Debug, PartialEq)]
446#[repr(u8)]
447pub enum PRSDOWNSEL_A {
448    #[doc = "0: PRS Channel 0 selected as input"]
449    PRSCH0 = 0,
450    #[doc = "1: PRS Channel 1 selected as input"]
451    PRSCH1 = 1,
452    #[doc = "2: PRS Channel 2 selected as input"]
453    PRSCH2 = 2,
454    #[doc = "3: PRS Channel 3 selected as input"]
455    PRSCH3 = 3,
456    #[doc = "4: PRS Channel 4 selected as input"]
457    PRSCH4 = 4,
458    #[doc = "5: PRS Channel 5 selected as input"]
459    PRSCH5 = 5,
460    #[doc = "6: PRS Channel 6 selected as input"]
461    PRSCH6 = 6,
462    #[doc = "7: PRS Channel 7 selected as input"]
463    PRSCH7 = 7,
464    #[doc = "8: PRS Channel 8 selected as input"]
465    PRSCH8 = 8,
466    #[doc = "9: PRS Channel 9 selected as input"]
467    PRSCH9 = 9,
468    #[doc = "10: PRS Channel 10 selected as input"]
469    PRSCH10 = 10,
470    #[doc = "11: PRS Channel 11 selected as input"]
471    PRSCH11 = 11,
472}
473impl From<PRSDOWNSEL_A> for u8 {
474    #[inline(always)]
475    fn from(variant: PRSDOWNSEL_A) -> Self {
476        variant as _
477    }
478}
479#[doc = "Field `PRSDOWNSEL` reader - PRS Select for PRS Input When Selected in DOWNSEL"]
480pub type PRSDOWNSEL_R = crate::FieldReader<u8, PRSDOWNSEL_A>;
481impl PRSDOWNSEL_R {
482    #[doc = "Get enumerated values variant"]
483    #[inline(always)]
484    pub fn variant(&self) -> Option<PRSDOWNSEL_A> {
485        match self.bits {
486            0 => Some(PRSDOWNSEL_A::PRSCH0),
487            1 => Some(PRSDOWNSEL_A::PRSCH1),
488            2 => Some(PRSDOWNSEL_A::PRSCH2),
489            3 => Some(PRSDOWNSEL_A::PRSCH3),
490            4 => Some(PRSDOWNSEL_A::PRSCH4),
491            5 => Some(PRSDOWNSEL_A::PRSCH5),
492            6 => Some(PRSDOWNSEL_A::PRSCH6),
493            7 => Some(PRSDOWNSEL_A::PRSCH7),
494            8 => Some(PRSDOWNSEL_A::PRSCH8),
495            9 => Some(PRSDOWNSEL_A::PRSCH9),
496            10 => Some(PRSDOWNSEL_A::PRSCH10),
497            11 => Some(PRSDOWNSEL_A::PRSCH11),
498            _ => None,
499        }
500    }
501    #[doc = "Checks if the value of the field is `PRSCH0`"]
502    #[inline(always)]
503    pub fn is_prsch0(&self) -> bool {
504        *self == PRSDOWNSEL_A::PRSCH0
505    }
506    #[doc = "Checks if the value of the field is `PRSCH1`"]
507    #[inline(always)]
508    pub fn is_prsch1(&self) -> bool {
509        *self == PRSDOWNSEL_A::PRSCH1
510    }
511    #[doc = "Checks if the value of the field is `PRSCH2`"]
512    #[inline(always)]
513    pub fn is_prsch2(&self) -> bool {
514        *self == PRSDOWNSEL_A::PRSCH2
515    }
516    #[doc = "Checks if the value of the field is `PRSCH3`"]
517    #[inline(always)]
518    pub fn is_prsch3(&self) -> bool {
519        *self == PRSDOWNSEL_A::PRSCH3
520    }
521    #[doc = "Checks if the value of the field is `PRSCH4`"]
522    #[inline(always)]
523    pub fn is_prsch4(&self) -> bool {
524        *self == PRSDOWNSEL_A::PRSCH4
525    }
526    #[doc = "Checks if the value of the field is `PRSCH5`"]
527    #[inline(always)]
528    pub fn is_prsch5(&self) -> bool {
529        *self == PRSDOWNSEL_A::PRSCH5
530    }
531    #[doc = "Checks if the value of the field is `PRSCH6`"]
532    #[inline(always)]
533    pub fn is_prsch6(&self) -> bool {
534        *self == PRSDOWNSEL_A::PRSCH6
535    }
536    #[doc = "Checks if the value of the field is `PRSCH7`"]
537    #[inline(always)]
538    pub fn is_prsch7(&self) -> bool {
539        *self == PRSDOWNSEL_A::PRSCH7
540    }
541    #[doc = "Checks if the value of the field is `PRSCH8`"]
542    #[inline(always)]
543    pub fn is_prsch8(&self) -> bool {
544        *self == PRSDOWNSEL_A::PRSCH8
545    }
546    #[doc = "Checks if the value of the field is `PRSCH9`"]
547    #[inline(always)]
548    pub fn is_prsch9(&self) -> bool {
549        *self == PRSDOWNSEL_A::PRSCH9
550    }
551    #[doc = "Checks if the value of the field is `PRSCH10`"]
552    #[inline(always)]
553    pub fn is_prsch10(&self) -> bool {
554        *self == PRSDOWNSEL_A::PRSCH10
555    }
556    #[doc = "Checks if the value of the field is `PRSCH11`"]
557    #[inline(always)]
558    pub fn is_prsch11(&self) -> bool {
559        *self == PRSDOWNSEL_A::PRSCH11
560    }
561}
562#[doc = "Field `PRSDOWNSEL` writer - PRS Select for PRS Input When Selected in DOWNSEL"]
563pub type PRSDOWNSEL_W<'a> = crate::FieldWriter<'a, u32, CALCTRL_SPEC, u8, PRSDOWNSEL_A, 4, 24>;
564impl<'a> PRSDOWNSEL_W<'a> {
565    #[doc = "PRS Channel 0 selected as input"]
566    #[inline(always)]
567    pub fn prsch0(self) -> &'a mut W {
568        self.variant(PRSDOWNSEL_A::PRSCH0)
569    }
570    #[doc = "PRS Channel 1 selected as input"]
571    #[inline(always)]
572    pub fn prsch1(self) -> &'a mut W {
573        self.variant(PRSDOWNSEL_A::PRSCH1)
574    }
575    #[doc = "PRS Channel 2 selected as input"]
576    #[inline(always)]
577    pub fn prsch2(self) -> &'a mut W {
578        self.variant(PRSDOWNSEL_A::PRSCH2)
579    }
580    #[doc = "PRS Channel 3 selected as input"]
581    #[inline(always)]
582    pub fn prsch3(self) -> &'a mut W {
583        self.variant(PRSDOWNSEL_A::PRSCH3)
584    }
585    #[doc = "PRS Channel 4 selected as input"]
586    #[inline(always)]
587    pub fn prsch4(self) -> &'a mut W {
588        self.variant(PRSDOWNSEL_A::PRSCH4)
589    }
590    #[doc = "PRS Channel 5 selected as input"]
591    #[inline(always)]
592    pub fn prsch5(self) -> &'a mut W {
593        self.variant(PRSDOWNSEL_A::PRSCH5)
594    }
595    #[doc = "PRS Channel 6 selected as input"]
596    #[inline(always)]
597    pub fn prsch6(self) -> &'a mut W {
598        self.variant(PRSDOWNSEL_A::PRSCH6)
599    }
600    #[doc = "PRS Channel 7 selected as input"]
601    #[inline(always)]
602    pub fn prsch7(self) -> &'a mut W {
603        self.variant(PRSDOWNSEL_A::PRSCH7)
604    }
605    #[doc = "PRS Channel 8 selected as input"]
606    #[inline(always)]
607    pub fn prsch8(self) -> &'a mut W {
608        self.variant(PRSDOWNSEL_A::PRSCH8)
609    }
610    #[doc = "PRS Channel 9 selected as input"]
611    #[inline(always)]
612    pub fn prsch9(self) -> &'a mut W {
613        self.variant(PRSDOWNSEL_A::PRSCH9)
614    }
615    #[doc = "PRS Channel 10 selected as input"]
616    #[inline(always)]
617    pub fn prsch10(self) -> &'a mut W {
618        self.variant(PRSDOWNSEL_A::PRSCH10)
619    }
620    #[doc = "PRS Channel 11 selected as input"]
621    #[inline(always)]
622    pub fn prsch11(self) -> &'a mut W {
623        self.variant(PRSDOWNSEL_A::PRSCH11)
624    }
625}
626impl R {
627    #[doc = "Bits 0:2 - Calibration Up-counter Select"]
628    #[inline(always)]
629    pub fn upsel(&self) -> UPSEL_R {
630        UPSEL_R::new((self.bits & 7) as u8)
631    }
632    #[doc = "Bits 4:6 - Calibration Down-counter Select"]
633    #[inline(always)]
634    pub fn downsel(&self) -> DOWNSEL_R {
635        DOWNSEL_R::new(((self.bits >> 4) & 7) as u8)
636    }
637    #[doc = "Bit 8 - Continuous Calibration"]
638    #[inline(always)]
639    pub fn cont(&self) -> CONT_R {
640        CONT_R::new(((self.bits >> 8) & 1) != 0)
641    }
642    #[doc = "Bits 16:19 - PRS Select for PRS Input When Selected in UPSEL"]
643    #[inline(always)]
644    pub fn prsupsel(&self) -> PRSUPSEL_R {
645        PRSUPSEL_R::new(((self.bits >> 16) & 0x0f) as u8)
646    }
647    #[doc = "Bits 24:27 - PRS Select for PRS Input When Selected in DOWNSEL"]
648    #[inline(always)]
649    pub fn prsdownsel(&self) -> PRSDOWNSEL_R {
650        PRSDOWNSEL_R::new(((self.bits >> 24) & 0x0f) as u8)
651    }
652}
653impl W {
654    #[doc = "Bits 0:2 - Calibration Up-counter Select"]
655    #[inline(always)]
656    pub fn upsel(&mut self) -> UPSEL_W {
657        UPSEL_W::new(self)
658    }
659    #[doc = "Bits 4:6 - Calibration Down-counter Select"]
660    #[inline(always)]
661    pub fn downsel(&mut self) -> DOWNSEL_W {
662        DOWNSEL_W::new(self)
663    }
664    #[doc = "Bit 8 - Continuous Calibration"]
665    #[inline(always)]
666    pub fn cont(&mut self) -> CONT_W {
667        CONT_W::new(self)
668    }
669    #[doc = "Bits 16:19 - PRS Select for PRS Input When Selected in UPSEL"]
670    #[inline(always)]
671    pub fn prsupsel(&mut self) -> PRSUPSEL_W {
672        PRSUPSEL_W::new(self)
673    }
674    #[doc = "Bits 24:27 - PRS Select for PRS Input When Selected in DOWNSEL"]
675    #[inline(always)]
676    pub fn prsdownsel(&mut self) -> PRSDOWNSEL_W {
677        PRSDOWNSEL_W::new(self)
678    }
679    #[doc = "Writes raw bits to the register."]
680    #[inline(always)]
681    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
682        self.0.bits(bits);
683        self
684    }
685}
686#[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"]
687pub struct CALCTRL_SPEC;
688impl crate::RegisterSpec for CALCTRL_SPEC {
689    type Ux = u32;
690}
691#[doc = "`read()` method returns [calctrl::R](R) reader structure"]
692impl crate::Readable for CALCTRL_SPEC {
693    type Reader = R;
694}
695#[doc = "`write(|w| ..)` method takes [calctrl::W](W) writer structure"]
696impl crate::Writable for CALCTRL_SPEC {
697    type Writer = W;
698}
699#[doc = "`reset()` method sets CALCTRL to value 0"]
700impl crate::Resettable for CALCTRL_SPEC {
701    #[inline(always)]
702    fn reset_value() -> Self::Ux {
703        0
704    }
705}