efm32tg11b_pac/efm32tg11b540/cmu/
calctrl.rs1#[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 = "Field `UPSEL` reader - Calibration Up-counter Select"]
38pub type UPSEL_R = crate::FieldReader<u8, UPSEL_A>;
39#[doc = "Calibration Up-counter Select\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41#[repr(u8)]
42pub enum UPSEL_A {
43 #[doc = "0: Select HFXO as up-counter"]
44 HFXO = 0,
45 #[doc = "1: Select LFXO as up-counter"]
46 LFXO = 1,
47 #[doc = "2: Select HFRCO as up-counter"]
48 HFRCO = 2,
49 #[doc = "3: Select LFRCO as up-counter"]
50 LFRCO = 3,
51 #[doc = "4: Select AUXHFRCO as up-counter"]
52 AUXHFRCO = 4,
53 #[doc = "5: Select PRS input selected by PRSUPSEL as up-counter"]
54 PRS = 5,
55}
56impl From<UPSEL_A> for u8 {
57 #[inline(always)]
58 fn from(variant: UPSEL_A) -> Self {
59 variant as _
60 }
61}
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, const O: u8> = crate::FieldWriter<'a, u32, CALCTRL_SPEC, u8, UPSEL_A, 3, O>;
109impl<'a, const O: u8> UPSEL_W<'a, O> {
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 = "Field `DOWNSEL` reader - Calibration Down-counter Select"]
142pub type DOWNSEL_R = crate::FieldReader<u8, DOWNSEL_A>;
143#[doc = "Calibration Down-counter Select\n\nValue on reset: 0"]
144#[derive(Clone, Copy, Debug, PartialEq, Eq)]
145#[repr(u8)]
146pub enum DOWNSEL_A {
147 #[doc = "0: Select HFCLK for down-counter"]
148 HFCLK = 0,
149 #[doc = "1: Select HFXO for down-counter"]
150 HFXO = 1,
151 #[doc = "2: Select LFXO for down-counter"]
152 LFXO = 2,
153 #[doc = "3: Select HFRCO for down-counter"]
154 HFRCO = 3,
155 #[doc = "4: Select LFRCO for down-counter"]
156 LFRCO = 4,
157 #[doc = "5: Select AUXHFRCO for down-counter"]
158 AUXHFRCO = 5,
159 #[doc = "6: Select PRS input selected by PRSDOWNSEL as down-counter"]
160 PRS = 6,
161}
162impl From<DOWNSEL_A> for u8 {
163 #[inline(always)]
164 fn from(variant: DOWNSEL_A) -> Self {
165 variant as _
166 }
167}
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, const O: u8> =
221 crate::FieldWriter<'a, u32, CALCTRL_SPEC, u8, DOWNSEL_A, 3, O>;
222impl<'a, const O: u8> DOWNSEL_W<'a, O> {
223 #[doc = "Select HFCLK for down-counter"]
224 #[inline(always)]
225 pub fn hfclk(self) -> &'a mut W {
226 self.variant(DOWNSEL_A::HFCLK)
227 }
228 #[doc = "Select HFXO for down-counter"]
229 #[inline(always)]
230 pub fn hfxo(self) -> &'a mut W {
231 self.variant(DOWNSEL_A::HFXO)
232 }
233 #[doc = "Select LFXO for down-counter"]
234 #[inline(always)]
235 pub fn lfxo(self) -> &'a mut W {
236 self.variant(DOWNSEL_A::LFXO)
237 }
238 #[doc = "Select HFRCO for down-counter"]
239 #[inline(always)]
240 pub fn hfrco(self) -> &'a mut W {
241 self.variant(DOWNSEL_A::HFRCO)
242 }
243 #[doc = "Select LFRCO for down-counter"]
244 #[inline(always)]
245 pub fn lfrco(self) -> &'a mut W {
246 self.variant(DOWNSEL_A::LFRCO)
247 }
248 #[doc = "Select AUXHFRCO for down-counter"]
249 #[inline(always)]
250 pub fn auxhfrco(self) -> &'a mut W {
251 self.variant(DOWNSEL_A::AUXHFRCO)
252 }
253 #[doc = "Select PRS input selected by PRSDOWNSEL as down-counter"]
254 #[inline(always)]
255 pub fn prs(self) -> &'a mut W {
256 self.variant(DOWNSEL_A::PRS)
257 }
258}
259#[doc = "Field `CONT` reader - Continuous Calibration"]
260pub type CONT_R = crate::BitReader<bool>;
261#[doc = "Field `CONT` writer - Continuous Calibration"]
262pub type CONT_W<'a, const O: u8> = crate::BitWriter<'a, u32, CALCTRL_SPEC, bool, O>;
263#[doc = "Field `PRSUPSEL` reader - PRS Select for PRS Input When Selected in UPSEL"]
264pub type PRSUPSEL_R = crate::FieldReader<u8, PRSUPSEL_A>;
265#[doc = "PRS Select for PRS Input When Selected in UPSEL\n\nValue on reset: 0"]
266#[derive(Clone, Copy, Debug, PartialEq, Eq)]
267#[repr(u8)]
268pub enum PRSUPSEL_A {
269 #[doc = "0: PRS Channel 0 selected as input"]
270 PRSCH0 = 0,
271 #[doc = "1: PRS Channel 1 selected as input"]
272 PRSCH1 = 1,
273 #[doc = "2: PRS Channel 2 selected as input"]
274 PRSCH2 = 2,
275 #[doc = "3: PRS Channel 3 selected as input"]
276 PRSCH3 = 3,
277 #[doc = "4: PRS Channel 4 selected as input"]
278 PRSCH4 = 4,
279 #[doc = "5: PRS Channel 5 selected as input"]
280 PRSCH5 = 5,
281 #[doc = "6: PRS Channel 6 selected as input"]
282 PRSCH6 = 6,
283 #[doc = "7: PRS Channel 7 selected as input"]
284 PRSCH7 = 7,
285}
286impl From<PRSUPSEL_A> for u8 {
287 #[inline(always)]
288 fn from(variant: PRSUPSEL_A) -> Self {
289 variant as _
290 }
291}
292impl PRSUPSEL_R {
293 #[doc = "Get enumerated values variant"]
294 #[inline(always)]
295 pub fn variant(&self) -> PRSUPSEL_A {
296 match self.bits {
297 0 => PRSUPSEL_A::PRSCH0,
298 1 => PRSUPSEL_A::PRSCH1,
299 2 => PRSUPSEL_A::PRSCH2,
300 3 => PRSUPSEL_A::PRSCH3,
301 4 => PRSUPSEL_A::PRSCH4,
302 5 => PRSUPSEL_A::PRSCH5,
303 6 => PRSUPSEL_A::PRSCH6,
304 7 => PRSUPSEL_A::PRSCH7,
305 _ => unreachable!(),
306 }
307 }
308 #[doc = "Checks if the value of the field is `PRSCH0`"]
309 #[inline(always)]
310 pub fn is_prsch0(&self) -> bool {
311 *self == PRSUPSEL_A::PRSCH0
312 }
313 #[doc = "Checks if the value of the field is `PRSCH1`"]
314 #[inline(always)]
315 pub fn is_prsch1(&self) -> bool {
316 *self == PRSUPSEL_A::PRSCH1
317 }
318 #[doc = "Checks if the value of the field is `PRSCH2`"]
319 #[inline(always)]
320 pub fn is_prsch2(&self) -> bool {
321 *self == PRSUPSEL_A::PRSCH2
322 }
323 #[doc = "Checks if the value of the field is `PRSCH3`"]
324 #[inline(always)]
325 pub fn is_prsch3(&self) -> bool {
326 *self == PRSUPSEL_A::PRSCH3
327 }
328 #[doc = "Checks if the value of the field is `PRSCH4`"]
329 #[inline(always)]
330 pub fn is_prsch4(&self) -> bool {
331 *self == PRSUPSEL_A::PRSCH4
332 }
333 #[doc = "Checks if the value of the field is `PRSCH5`"]
334 #[inline(always)]
335 pub fn is_prsch5(&self) -> bool {
336 *self == PRSUPSEL_A::PRSCH5
337 }
338 #[doc = "Checks if the value of the field is `PRSCH6`"]
339 #[inline(always)]
340 pub fn is_prsch6(&self) -> bool {
341 *self == PRSUPSEL_A::PRSCH6
342 }
343 #[doc = "Checks if the value of the field is `PRSCH7`"]
344 #[inline(always)]
345 pub fn is_prsch7(&self) -> bool {
346 *self == PRSUPSEL_A::PRSCH7
347 }
348}
349#[doc = "Field `PRSUPSEL` writer - PRS Select for PRS Input When Selected in UPSEL"]
350pub type PRSUPSEL_W<'a, const O: u8> =
351 crate::FieldWriterSafe<'a, u32, CALCTRL_SPEC, u8, PRSUPSEL_A, 3, O>;
352impl<'a, const O: u8> PRSUPSEL_W<'a, O> {
353 #[doc = "PRS Channel 0 selected as input"]
354 #[inline(always)]
355 pub fn prsch0(self) -> &'a mut W {
356 self.variant(PRSUPSEL_A::PRSCH0)
357 }
358 #[doc = "PRS Channel 1 selected as input"]
359 #[inline(always)]
360 pub fn prsch1(self) -> &'a mut W {
361 self.variant(PRSUPSEL_A::PRSCH1)
362 }
363 #[doc = "PRS Channel 2 selected as input"]
364 #[inline(always)]
365 pub fn prsch2(self) -> &'a mut W {
366 self.variant(PRSUPSEL_A::PRSCH2)
367 }
368 #[doc = "PRS Channel 3 selected as input"]
369 #[inline(always)]
370 pub fn prsch3(self) -> &'a mut W {
371 self.variant(PRSUPSEL_A::PRSCH3)
372 }
373 #[doc = "PRS Channel 4 selected as input"]
374 #[inline(always)]
375 pub fn prsch4(self) -> &'a mut W {
376 self.variant(PRSUPSEL_A::PRSCH4)
377 }
378 #[doc = "PRS Channel 5 selected as input"]
379 #[inline(always)]
380 pub fn prsch5(self) -> &'a mut W {
381 self.variant(PRSUPSEL_A::PRSCH5)
382 }
383 #[doc = "PRS Channel 6 selected as input"]
384 #[inline(always)]
385 pub fn prsch6(self) -> &'a mut W {
386 self.variant(PRSUPSEL_A::PRSCH6)
387 }
388 #[doc = "PRS Channel 7 selected as input"]
389 #[inline(always)]
390 pub fn prsch7(self) -> &'a mut W {
391 self.variant(PRSUPSEL_A::PRSCH7)
392 }
393}
394#[doc = "Field `PRSDOWNSEL` reader - PRS Select for PRS Input When Selected in DOWNSEL"]
395pub type PRSDOWNSEL_R = crate::FieldReader<u8, PRSDOWNSEL_A>;
396#[doc = "PRS Select for PRS Input When Selected in DOWNSEL\n\nValue on reset: 0"]
397#[derive(Clone, Copy, Debug, PartialEq, Eq)]
398#[repr(u8)]
399pub enum PRSDOWNSEL_A {
400 #[doc = "0: PRS Channel 0 selected as input"]
401 PRSCH0 = 0,
402 #[doc = "1: PRS Channel 1 selected as input"]
403 PRSCH1 = 1,
404 #[doc = "2: PRS Channel 2 selected as input"]
405 PRSCH2 = 2,
406 #[doc = "3: PRS Channel 3 selected as input"]
407 PRSCH3 = 3,
408 #[doc = "4: PRS Channel 4 selected as input"]
409 PRSCH4 = 4,
410 #[doc = "5: PRS Channel 5 selected as input"]
411 PRSCH5 = 5,
412 #[doc = "6: PRS Channel 6 selected as input"]
413 PRSCH6 = 6,
414 #[doc = "7: PRS Channel 7 selected as input"]
415 PRSCH7 = 7,
416}
417impl From<PRSDOWNSEL_A> for u8 {
418 #[inline(always)]
419 fn from(variant: PRSDOWNSEL_A) -> Self {
420 variant as _
421 }
422}
423impl PRSDOWNSEL_R {
424 #[doc = "Get enumerated values variant"]
425 #[inline(always)]
426 pub fn variant(&self) -> PRSDOWNSEL_A {
427 match self.bits {
428 0 => PRSDOWNSEL_A::PRSCH0,
429 1 => PRSDOWNSEL_A::PRSCH1,
430 2 => PRSDOWNSEL_A::PRSCH2,
431 3 => PRSDOWNSEL_A::PRSCH3,
432 4 => PRSDOWNSEL_A::PRSCH4,
433 5 => PRSDOWNSEL_A::PRSCH5,
434 6 => PRSDOWNSEL_A::PRSCH6,
435 7 => PRSDOWNSEL_A::PRSCH7,
436 _ => unreachable!(),
437 }
438 }
439 #[doc = "Checks if the value of the field is `PRSCH0`"]
440 #[inline(always)]
441 pub fn is_prsch0(&self) -> bool {
442 *self == PRSDOWNSEL_A::PRSCH0
443 }
444 #[doc = "Checks if the value of the field is `PRSCH1`"]
445 #[inline(always)]
446 pub fn is_prsch1(&self) -> bool {
447 *self == PRSDOWNSEL_A::PRSCH1
448 }
449 #[doc = "Checks if the value of the field is `PRSCH2`"]
450 #[inline(always)]
451 pub fn is_prsch2(&self) -> bool {
452 *self == PRSDOWNSEL_A::PRSCH2
453 }
454 #[doc = "Checks if the value of the field is `PRSCH3`"]
455 #[inline(always)]
456 pub fn is_prsch3(&self) -> bool {
457 *self == PRSDOWNSEL_A::PRSCH3
458 }
459 #[doc = "Checks if the value of the field is `PRSCH4`"]
460 #[inline(always)]
461 pub fn is_prsch4(&self) -> bool {
462 *self == PRSDOWNSEL_A::PRSCH4
463 }
464 #[doc = "Checks if the value of the field is `PRSCH5`"]
465 #[inline(always)]
466 pub fn is_prsch5(&self) -> bool {
467 *self == PRSDOWNSEL_A::PRSCH5
468 }
469 #[doc = "Checks if the value of the field is `PRSCH6`"]
470 #[inline(always)]
471 pub fn is_prsch6(&self) -> bool {
472 *self == PRSDOWNSEL_A::PRSCH6
473 }
474 #[doc = "Checks if the value of the field is `PRSCH7`"]
475 #[inline(always)]
476 pub fn is_prsch7(&self) -> bool {
477 *self == PRSDOWNSEL_A::PRSCH7
478 }
479}
480#[doc = "Field `PRSDOWNSEL` writer - PRS Select for PRS Input When Selected in DOWNSEL"]
481pub type PRSDOWNSEL_W<'a, const O: u8> =
482 crate::FieldWriterSafe<'a, u32, CALCTRL_SPEC, u8, PRSDOWNSEL_A, 3, O>;
483impl<'a, const O: u8> PRSDOWNSEL_W<'a, O> {
484 #[doc = "PRS Channel 0 selected as input"]
485 #[inline(always)]
486 pub fn prsch0(self) -> &'a mut W {
487 self.variant(PRSDOWNSEL_A::PRSCH0)
488 }
489 #[doc = "PRS Channel 1 selected as input"]
490 #[inline(always)]
491 pub fn prsch1(self) -> &'a mut W {
492 self.variant(PRSDOWNSEL_A::PRSCH1)
493 }
494 #[doc = "PRS Channel 2 selected as input"]
495 #[inline(always)]
496 pub fn prsch2(self) -> &'a mut W {
497 self.variant(PRSDOWNSEL_A::PRSCH2)
498 }
499 #[doc = "PRS Channel 3 selected as input"]
500 #[inline(always)]
501 pub fn prsch3(self) -> &'a mut W {
502 self.variant(PRSDOWNSEL_A::PRSCH3)
503 }
504 #[doc = "PRS Channel 4 selected as input"]
505 #[inline(always)]
506 pub fn prsch4(self) -> &'a mut W {
507 self.variant(PRSDOWNSEL_A::PRSCH4)
508 }
509 #[doc = "PRS Channel 5 selected as input"]
510 #[inline(always)]
511 pub fn prsch5(self) -> &'a mut W {
512 self.variant(PRSDOWNSEL_A::PRSCH5)
513 }
514 #[doc = "PRS Channel 6 selected as input"]
515 #[inline(always)]
516 pub fn prsch6(self) -> &'a mut W {
517 self.variant(PRSDOWNSEL_A::PRSCH6)
518 }
519 #[doc = "PRS Channel 7 selected as input"]
520 #[inline(always)]
521 pub fn prsch7(self) -> &'a mut W {
522 self.variant(PRSDOWNSEL_A::PRSCH7)
523 }
524}
525impl R {
526 #[doc = "Bits 0:2 - Calibration Up-counter Select"]
527 #[inline(always)]
528 pub fn upsel(&self) -> UPSEL_R {
529 UPSEL_R::new((self.bits & 7) as u8)
530 }
531 #[doc = "Bits 4:6 - Calibration Down-counter Select"]
532 #[inline(always)]
533 pub fn downsel(&self) -> DOWNSEL_R {
534 DOWNSEL_R::new(((self.bits >> 4) & 7) as u8)
535 }
536 #[doc = "Bit 8 - Continuous Calibration"]
537 #[inline(always)]
538 pub fn cont(&self) -> CONT_R {
539 CONT_R::new(((self.bits >> 8) & 1) != 0)
540 }
541 #[doc = "Bits 16:18 - PRS Select for PRS Input When Selected in UPSEL"]
542 #[inline(always)]
543 pub fn prsupsel(&self) -> PRSUPSEL_R {
544 PRSUPSEL_R::new(((self.bits >> 16) & 7) as u8)
545 }
546 #[doc = "Bits 24:26 - PRS Select for PRS Input When Selected in DOWNSEL"]
547 #[inline(always)]
548 pub fn prsdownsel(&self) -> PRSDOWNSEL_R {
549 PRSDOWNSEL_R::new(((self.bits >> 24) & 7) as u8)
550 }
551}
552impl W {
553 #[doc = "Bits 0:2 - Calibration Up-counter Select"]
554 #[inline(always)]
555 #[must_use]
556 pub fn upsel(&mut self) -> UPSEL_W<0> {
557 UPSEL_W::new(self)
558 }
559 #[doc = "Bits 4:6 - Calibration Down-counter Select"]
560 #[inline(always)]
561 #[must_use]
562 pub fn downsel(&mut self) -> DOWNSEL_W<4> {
563 DOWNSEL_W::new(self)
564 }
565 #[doc = "Bit 8 - Continuous Calibration"]
566 #[inline(always)]
567 #[must_use]
568 pub fn cont(&mut self) -> CONT_W<8> {
569 CONT_W::new(self)
570 }
571 #[doc = "Bits 16:18 - PRS Select for PRS Input When Selected in UPSEL"]
572 #[inline(always)]
573 #[must_use]
574 pub fn prsupsel(&mut self) -> PRSUPSEL_W<16> {
575 PRSUPSEL_W::new(self)
576 }
577 #[doc = "Bits 24:26 - PRS Select for PRS Input When Selected in DOWNSEL"]
578 #[inline(always)]
579 #[must_use]
580 pub fn prsdownsel(&mut self) -> PRSDOWNSEL_W<24> {
581 PRSDOWNSEL_W::new(self)
582 }
583 #[doc = "Writes raw bits to the register."]
584 #[inline(always)]
585 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
586 self.0.bits(bits);
587 self
588 }
589}
590#[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"]
591pub struct CALCTRL_SPEC;
592impl crate::RegisterSpec for CALCTRL_SPEC {
593 type Ux = u32;
594}
595#[doc = "`read()` method returns [calctrl::R](R) reader structure"]
596impl crate::Readable for CALCTRL_SPEC {
597 type Reader = R;
598}
599#[doc = "`write(|w| ..)` method takes [calctrl::W](W) writer structure"]
600impl crate::Writable for CALCTRL_SPEC {
601 type Writer = W;
602 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
603 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
604}
605#[doc = "`reset()` method sets CALCTRL to value 0"]
606impl crate::Resettable for CALCTRL_SPEC {
607 const RESET_VALUE: Self::Ux = 0;
608}