1#![allow(clippy::identity_op)]
21#![allow(clippy::module_inception)]
22#![allow(clippy::derivable_impls)]
23#[allow(unused_imports)]
24use crate::common::sealed;
25#[allow(unused_imports)]
26use crate::common::*;
27#[doc = r"Clock Frequency Accuracy Measurement Circuit"]
28unsafe impl ::core::marker::Send for super::Cac {}
29unsafe impl ::core::marker::Sync for super::Cac {}
30impl super::Cac {
31 #[allow(unused)]
32 #[inline(always)]
33 pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34 self.ptr
35 }
36
37 #[doc = "CAC Control Register 0"]
38 #[inline(always)]
39 pub const fn cacr0(&self) -> &'static crate::common::Reg<self::Cacr0_SPEC, crate::common::RW> {
40 unsafe {
41 crate::common::Reg::<self::Cacr0_SPEC, crate::common::RW>::from_ptr(
42 self._svd2pac_as_ptr().add(0usize),
43 )
44 }
45 }
46
47 #[doc = "CAC Control Register 1"]
48 #[inline(always)]
49 pub const fn cacr1(&self) -> &'static crate::common::Reg<self::Cacr1_SPEC, crate::common::RW> {
50 unsafe {
51 crate::common::Reg::<self::Cacr1_SPEC, crate::common::RW>::from_ptr(
52 self._svd2pac_as_ptr().add(1usize),
53 )
54 }
55 }
56
57 #[doc = "CAC Control Register 2"]
58 #[inline(always)]
59 pub const fn cacr2(&self) -> &'static crate::common::Reg<self::Cacr2_SPEC, crate::common::RW> {
60 unsafe {
61 crate::common::Reg::<self::Cacr2_SPEC, crate::common::RW>::from_ptr(
62 self._svd2pac_as_ptr().add(2usize),
63 )
64 }
65 }
66
67 #[doc = "CAC Interrupt Control Register"]
68 #[inline(always)]
69 pub const fn caicr(&self) -> &'static crate::common::Reg<self::Caicr_SPEC, crate::common::RW> {
70 unsafe {
71 crate::common::Reg::<self::Caicr_SPEC, crate::common::RW>::from_ptr(
72 self._svd2pac_as_ptr().add(3usize),
73 )
74 }
75 }
76
77 #[doc = "CAC Status Register"]
78 #[inline(always)]
79 pub const fn castr(&self) -> &'static crate::common::Reg<self::Castr_SPEC, crate::common::R> {
80 unsafe {
81 crate::common::Reg::<self::Castr_SPEC, crate::common::R>::from_ptr(
82 self._svd2pac_as_ptr().add(4usize),
83 )
84 }
85 }
86
87 #[doc = "CAC Upper-Limit Value Setting Register"]
88 #[inline(always)]
89 pub const fn caulvr(
90 &self,
91 ) -> &'static crate::common::Reg<self::Caulvr_SPEC, crate::common::RW> {
92 unsafe {
93 crate::common::Reg::<self::Caulvr_SPEC, crate::common::RW>::from_ptr(
94 self._svd2pac_as_ptr().add(6usize),
95 )
96 }
97 }
98
99 #[doc = "CAC Lower-Limit Value Setting Register"]
100 #[inline(always)]
101 pub const fn callvr(
102 &self,
103 ) -> &'static crate::common::Reg<self::Callvr_SPEC, crate::common::RW> {
104 unsafe {
105 crate::common::Reg::<self::Callvr_SPEC, crate::common::RW>::from_ptr(
106 self._svd2pac_as_ptr().add(8usize),
107 )
108 }
109 }
110
111 #[doc = "CAC Counter Buffer Register"]
112 #[inline(always)]
113 pub const fn cacntbr(
114 &self,
115 ) -> &'static crate::common::Reg<self::Cacntbr_SPEC, crate::common::R> {
116 unsafe {
117 crate::common::Reg::<self::Cacntbr_SPEC, crate::common::R>::from_ptr(
118 self._svd2pac_as_ptr().add(10usize),
119 )
120 }
121 }
122}
123#[doc(hidden)]
124#[derive(Copy, Clone, Eq, PartialEq)]
125pub struct Cacr0_SPEC;
126impl crate::sealed::RegSpec for Cacr0_SPEC {
127 type DataType = u8;
128}
129
130#[doc = "CAC Control Register 0"]
131pub type Cacr0 = crate::RegValueT<Cacr0_SPEC>;
132
133impl Cacr0 {
134 #[doc = "Clock Frequency Measurement Enable."]
135 #[inline(always)]
136 pub fn cfme(
137 self,
138 ) -> crate::common::RegisterField<
139 0,
140 0x1,
141 1,
142 0,
143 cacr0::Cfme,
144 cacr0::Cfme,
145 Cacr0_SPEC,
146 crate::common::RW,
147 > {
148 crate::common::RegisterField::<
149 0,
150 0x1,
151 1,
152 0,
153 cacr0::Cfme,
154 cacr0::Cfme,
155 Cacr0_SPEC,
156 crate::common::RW,
157 >::from_register(self, 0)
158 }
159}
160impl ::core::default::Default for Cacr0 {
161 #[inline(always)]
162 fn default() -> Cacr0 {
163 <crate::RegValueT<Cacr0_SPEC> as RegisterValue<_>>::new(0)
164 }
165}
166pub mod cacr0 {
167
168 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
169 pub struct Cfme_SPEC;
170 pub type Cfme = crate::EnumBitfieldStruct<u8, Cfme_SPEC>;
171 impl Cfme {
172 #[doc = "Disable"]
173 pub const _0: Self = Self::new(0);
174
175 #[doc = "Enable"]
176 pub const _1: Self = Self::new(1);
177 }
178}
179#[doc(hidden)]
180#[derive(Copy, Clone, Eq, PartialEq)]
181pub struct Cacr1_SPEC;
182impl crate::sealed::RegSpec for Cacr1_SPEC {
183 type DataType = u8;
184}
185
186#[doc = "CAC Control Register 1"]
187pub type Cacr1 = crate::RegValueT<Cacr1_SPEC>;
188
189impl Cacr1 {
190 #[doc = "Valid Edge Select"]
191 #[inline(always)]
192 pub fn edges(
193 self,
194 ) -> crate::common::RegisterField<
195 6,
196 0x3,
197 1,
198 0,
199 cacr1::Edges,
200 cacr1::Edges,
201 Cacr1_SPEC,
202 crate::common::RW,
203 > {
204 crate::common::RegisterField::<
205 6,
206 0x3,
207 1,
208 0,
209 cacr1::Edges,
210 cacr1::Edges,
211 Cacr1_SPEC,
212 crate::common::RW,
213 >::from_register(self, 0)
214 }
215
216 #[doc = "Measurement Target Clock Frequency Division Ratio Select"]
217 #[inline(always)]
218 pub fn tcss(
219 self,
220 ) -> crate::common::RegisterField<
221 4,
222 0x3,
223 1,
224 0,
225 cacr1::Tcss,
226 cacr1::Tcss,
227 Cacr1_SPEC,
228 crate::common::RW,
229 > {
230 crate::common::RegisterField::<
231 4,
232 0x3,
233 1,
234 0,
235 cacr1::Tcss,
236 cacr1::Tcss,
237 Cacr1_SPEC,
238 crate::common::RW,
239 >::from_register(self, 0)
240 }
241
242 #[doc = "Measurement Target Clock Select"]
243 #[inline(always)]
244 pub fn fmcs(
245 self,
246 ) -> crate::common::RegisterField<
247 1,
248 0x7,
249 1,
250 0,
251 cacr1::Fmcs,
252 cacr1::Fmcs,
253 Cacr1_SPEC,
254 crate::common::RW,
255 > {
256 crate::common::RegisterField::<
257 1,
258 0x7,
259 1,
260 0,
261 cacr1::Fmcs,
262 cacr1::Fmcs,
263 Cacr1_SPEC,
264 crate::common::RW,
265 >::from_register(self, 0)
266 }
267
268 #[doc = "CACREF Pin Input Enable"]
269 #[inline(always)]
270 pub fn cacrefe(
271 self,
272 ) -> crate::common::RegisterField<
273 0,
274 0x1,
275 1,
276 0,
277 cacr1::Cacrefe,
278 cacr1::Cacrefe,
279 Cacr1_SPEC,
280 crate::common::RW,
281 > {
282 crate::common::RegisterField::<
283 0,
284 0x1,
285 1,
286 0,
287 cacr1::Cacrefe,
288 cacr1::Cacrefe,
289 Cacr1_SPEC,
290 crate::common::RW,
291 >::from_register(self, 0)
292 }
293}
294impl ::core::default::Default for Cacr1 {
295 #[inline(always)]
296 fn default() -> Cacr1 {
297 <crate::RegValueT<Cacr1_SPEC> as RegisterValue<_>>::new(0)
298 }
299}
300pub mod cacr1 {
301
302 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
303 pub struct Edges_SPEC;
304 pub type Edges = crate::EnumBitfieldStruct<u8, Edges_SPEC>;
305 impl Edges {
306 #[doc = "Rising edge"]
307 pub const _00: Self = Self::new(0);
308
309 #[doc = "Falling edge"]
310 pub const _01: Self = Self::new(1);
311
312 #[doc = "Both rising and falling edges"]
313 pub const _10: Self = Self::new(2);
314
315 #[doc = "Setting prohibited"]
316 pub const _11: Self = Self::new(3);
317 }
318 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
319 pub struct Tcss_SPEC;
320 pub type Tcss = crate::EnumBitfieldStruct<u8, Tcss_SPEC>;
321 impl Tcss {
322 #[doc = "No division"]
323 pub const _00: Self = Self::new(0);
324
325 #[doc = "x 1/4 clock"]
326 pub const _01: Self = Self::new(1);
327
328 #[doc = "x 1/8 clock"]
329 pub const _10: Self = Self::new(2);
330
331 #[doc = "x 1/32 clock"]
332 pub const _11: Self = Self::new(3);
333 }
334 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
335 pub struct Fmcs_SPEC;
336 pub type Fmcs = crate::EnumBitfieldStruct<u8, Fmcs_SPEC>;
337 impl Fmcs {
338 #[doc = "Main clock"]
339 pub const _000: Self = Self::new(0);
340
341 #[doc = "Sub-clock"]
342 pub const _001: Self = Self::new(1);
343
344 #[doc = "HOCO clock"]
345 pub const _010: Self = Self::new(2);
346
347 #[doc = "MOCO clock"]
348 pub const _011: Self = Self::new(3);
349
350 #[doc = "LOCO clock"]
351 pub const _100: Self = Self::new(4);
352
353 #[doc = "Peripheral module clock(PCLKB)"]
354 pub const _101: Self = Self::new(5);
355
356 #[doc = "IWDTCLK clock"]
357 pub const _110: Self = Self::new(6);
358
359 #[doc = "Setting prohibited"]
360 pub const _111: Self = Self::new(7);
361 }
362 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
363 pub struct Cacrefe_SPEC;
364 pub type Cacrefe = crate::EnumBitfieldStruct<u8, Cacrefe_SPEC>;
365 impl Cacrefe {
366 #[doc = "Disable"]
367 pub const _0: Self = Self::new(0);
368
369 #[doc = "Enable"]
370 pub const _1: Self = Self::new(1);
371 }
372}
373#[doc(hidden)]
374#[derive(Copy, Clone, Eq, PartialEq)]
375pub struct Cacr2_SPEC;
376impl crate::sealed::RegSpec for Cacr2_SPEC {
377 type DataType = u8;
378}
379
380#[doc = "CAC Control Register 2"]
381pub type Cacr2 = crate::RegValueT<Cacr2_SPEC>;
382
383impl Cacr2 {
384 #[doc = "Digital Filter Selection"]
385 #[inline(always)]
386 pub fn dfs(
387 self,
388 ) -> crate::common::RegisterField<
389 6,
390 0x3,
391 1,
392 0,
393 cacr2::Dfs,
394 cacr2::Dfs,
395 Cacr2_SPEC,
396 crate::common::RW,
397 > {
398 crate::common::RegisterField::<
399 6,
400 0x3,
401 1,
402 0,
403 cacr2::Dfs,
404 cacr2::Dfs,
405 Cacr2_SPEC,
406 crate::common::RW,
407 >::from_register(self, 0)
408 }
409
410 #[doc = "Measurement Reference Clock Frequency Division Ratio Select"]
411 #[inline(always)]
412 pub fn rcds(
413 self,
414 ) -> crate::common::RegisterField<
415 4,
416 0x3,
417 1,
418 0,
419 cacr2::Rcds,
420 cacr2::Rcds,
421 Cacr2_SPEC,
422 crate::common::RW,
423 > {
424 crate::common::RegisterField::<
425 4,
426 0x3,
427 1,
428 0,
429 cacr2::Rcds,
430 cacr2::Rcds,
431 Cacr2_SPEC,
432 crate::common::RW,
433 >::from_register(self, 0)
434 }
435
436 #[doc = "Measurement Reference Clock Select"]
437 #[inline(always)]
438 pub fn rscs(
439 self,
440 ) -> crate::common::RegisterField<
441 1,
442 0x7,
443 1,
444 0,
445 cacr2::Rscs,
446 cacr2::Rscs,
447 Cacr2_SPEC,
448 crate::common::RW,
449 > {
450 crate::common::RegisterField::<
451 1,
452 0x7,
453 1,
454 0,
455 cacr2::Rscs,
456 cacr2::Rscs,
457 Cacr2_SPEC,
458 crate::common::RW,
459 >::from_register(self, 0)
460 }
461
462 #[doc = "Reference Signal Select"]
463 #[inline(always)]
464 pub fn rps(
465 self,
466 ) -> crate::common::RegisterField<
467 0,
468 0x1,
469 1,
470 0,
471 cacr2::Rps,
472 cacr2::Rps,
473 Cacr2_SPEC,
474 crate::common::RW,
475 > {
476 crate::common::RegisterField::<
477 0,
478 0x1,
479 1,
480 0,
481 cacr2::Rps,
482 cacr2::Rps,
483 Cacr2_SPEC,
484 crate::common::RW,
485 >::from_register(self, 0)
486 }
487}
488impl ::core::default::Default for Cacr2 {
489 #[inline(always)]
490 fn default() -> Cacr2 {
491 <crate::RegValueT<Cacr2_SPEC> as RegisterValue<_>>::new(0)
492 }
493}
494pub mod cacr2 {
495
496 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
497 pub struct Dfs_SPEC;
498 pub type Dfs = crate::EnumBitfieldStruct<u8, Dfs_SPEC>;
499 impl Dfs {
500 #[doc = "Digital filtering is disabled."]
501 pub const _00: Self = Self::new(0);
502
503 #[doc = "The sampling clock for the digital filter is the frequency measuring clock."]
504 pub const _01: Self = Self::new(1);
505
506 #[doc = "The sampling clock for the digital filter is the frequency measuring clock divided by 4."]
507 pub const _10: Self = Self::new(2);
508
509 #[doc = "The sampling clock for the digital filter is the frequency measuring clock divided by 16."]
510 pub const _11: Self = Self::new(3);
511 }
512 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
513 pub struct Rcds_SPEC;
514 pub type Rcds = crate::EnumBitfieldStruct<u8, Rcds_SPEC>;
515 impl Rcds {
516 #[doc = "1/32 clock"]
517 pub const _00: Self = Self::new(0);
518
519 #[doc = "1/128 clock"]
520 pub const _01: Self = Self::new(1);
521
522 #[doc = "1/1024 clock"]
523 pub const _10: Self = Self::new(2);
524
525 #[doc = "1/8192 clock"]
526 pub const _11: Self = Self::new(3);
527 }
528 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
529 pub struct Rscs_SPEC;
530 pub type Rscs = crate::EnumBitfieldStruct<u8, Rscs_SPEC>;
531 impl Rscs {
532 #[doc = "Main clock"]
533 pub const _000: Self = Self::new(0);
534
535 #[doc = "Sub-clock"]
536 pub const _001: Self = Self::new(1);
537
538 #[doc = "HOCO clock"]
539 pub const _010: Self = Self::new(2);
540
541 #[doc = "MOCO clock"]
542 pub const _011: Self = Self::new(3);
543
544 #[doc = "LOCO clock"]
545 pub const _100: Self = Self::new(4);
546
547 #[doc = "Peripheral module clock(PCLKB)"]
548 pub const _101: Self = Self::new(5);
549
550 #[doc = "IWDTCLK clock"]
551 pub const _110: Self = Self::new(6);
552
553 #[doc = "Setting prohibited"]
554 pub const _111: Self = Self::new(7);
555 }
556 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
557 pub struct Rps_SPEC;
558 pub type Rps = crate::EnumBitfieldStruct<u8, Rps_SPEC>;
559 impl Rps {
560 #[doc = "CACREF pin input"]
561 pub const _0: Self = Self::new(0);
562
563 #[doc = "Internal clock (internally generated signal)"]
564 pub const _1: Self = Self::new(1);
565 }
566}
567#[doc(hidden)]
568#[derive(Copy, Clone, Eq, PartialEq)]
569pub struct Caicr_SPEC;
570impl crate::sealed::RegSpec for Caicr_SPEC {
571 type DataType = u8;
572}
573
574#[doc = "CAC Interrupt Control Register"]
575pub type Caicr = crate::RegValueT<Caicr_SPEC>;
576
577impl Caicr {
578 #[doc = "OVFF Clear"]
579 #[inline(always)]
580 pub fn ovffcl(
581 self,
582 ) -> crate::common::RegisterField<
583 6,
584 0x1,
585 1,
586 0,
587 caicr::Ovffcl,
588 caicr::Ovffcl,
589 Caicr_SPEC,
590 crate::common::W,
591 > {
592 crate::common::RegisterField::<
593 6,
594 0x1,
595 1,
596 0,
597 caicr::Ovffcl,
598 caicr::Ovffcl,
599 Caicr_SPEC,
600 crate::common::W,
601 >::from_register(self, 0)
602 }
603
604 #[doc = "MENDF Clear"]
605 #[inline(always)]
606 pub fn mendfcl(
607 self,
608 ) -> crate::common::RegisterField<
609 5,
610 0x1,
611 1,
612 0,
613 caicr::Mendfcl,
614 caicr::Mendfcl,
615 Caicr_SPEC,
616 crate::common::W,
617 > {
618 crate::common::RegisterField::<
619 5,
620 0x1,
621 1,
622 0,
623 caicr::Mendfcl,
624 caicr::Mendfcl,
625 Caicr_SPEC,
626 crate::common::W,
627 >::from_register(self, 0)
628 }
629
630 #[doc = "FERRF Clear"]
631 #[inline(always)]
632 pub fn ferrfcl(
633 self,
634 ) -> crate::common::RegisterField<
635 4,
636 0x1,
637 1,
638 0,
639 caicr::Ferrfcl,
640 caicr::Ferrfcl,
641 Caicr_SPEC,
642 crate::common::W,
643 > {
644 crate::common::RegisterField::<
645 4,
646 0x1,
647 1,
648 0,
649 caicr::Ferrfcl,
650 caicr::Ferrfcl,
651 Caicr_SPEC,
652 crate::common::W,
653 >::from_register(self, 0)
654 }
655
656 #[doc = "Overflow Interrupt Request Enable"]
657 #[inline(always)]
658 pub fn ovfie(
659 self,
660 ) -> crate::common::RegisterField<
661 2,
662 0x1,
663 1,
664 0,
665 caicr::Ovfie,
666 caicr::Ovfie,
667 Caicr_SPEC,
668 crate::common::RW,
669 > {
670 crate::common::RegisterField::<
671 2,
672 0x1,
673 1,
674 0,
675 caicr::Ovfie,
676 caicr::Ovfie,
677 Caicr_SPEC,
678 crate::common::RW,
679 >::from_register(self, 0)
680 }
681
682 #[doc = "Measurement End Interrupt Request Enable"]
683 #[inline(always)]
684 pub fn mendie(
685 self,
686 ) -> crate::common::RegisterField<
687 1,
688 0x1,
689 1,
690 0,
691 caicr::Mendie,
692 caicr::Mendie,
693 Caicr_SPEC,
694 crate::common::RW,
695 > {
696 crate::common::RegisterField::<
697 1,
698 0x1,
699 1,
700 0,
701 caicr::Mendie,
702 caicr::Mendie,
703 Caicr_SPEC,
704 crate::common::RW,
705 >::from_register(self, 0)
706 }
707
708 #[doc = "Frequency Error Interrupt Request Enable"]
709 #[inline(always)]
710 pub fn ferrie(
711 self,
712 ) -> crate::common::RegisterField<
713 0,
714 0x1,
715 1,
716 0,
717 caicr::Ferrie,
718 caicr::Ferrie,
719 Caicr_SPEC,
720 crate::common::RW,
721 > {
722 crate::common::RegisterField::<
723 0,
724 0x1,
725 1,
726 0,
727 caicr::Ferrie,
728 caicr::Ferrie,
729 Caicr_SPEC,
730 crate::common::RW,
731 >::from_register(self, 0)
732 }
733}
734impl ::core::default::Default for Caicr {
735 #[inline(always)]
736 fn default() -> Caicr {
737 <crate::RegValueT<Caicr_SPEC> as RegisterValue<_>>::new(0)
738 }
739}
740pub mod caicr {
741
742 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
743 pub struct Ovffcl_SPEC;
744 pub type Ovffcl = crate::EnumBitfieldStruct<u8, Ovffcl_SPEC>;
745 impl Ovffcl {
746 #[doc = "No effect on operations"]
747 pub const _0: Self = Self::new(0);
748
749 #[doc = "Clears the OVFF flag"]
750 pub const _1: Self = Self::new(1);
751 }
752 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
753 pub struct Mendfcl_SPEC;
754 pub type Mendfcl = crate::EnumBitfieldStruct<u8, Mendfcl_SPEC>;
755 impl Mendfcl {
756 #[doc = "No effect on operations"]
757 pub const _0: Self = Self::new(0);
758
759 #[doc = "Clears the MENDF flag"]
760 pub const _1: Self = Self::new(1);
761 }
762 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
763 pub struct Ferrfcl_SPEC;
764 pub type Ferrfcl = crate::EnumBitfieldStruct<u8, Ferrfcl_SPEC>;
765 impl Ferrfcl {
766 #[doc = "No effect on operations"]
767 pub const _0: Self = Self::new(0);
768
769 #[doc = "Clears the FERRF flag"]
770 pub const _1: Self = Self::new(1);
771 }
772 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
773 pub struct Ovfie_SPEC;
774 pub type Ovfie = crate::EnumBitfieldStruct<u8, Ovfie_SPEC>;
775 impl Ovfie {
776 #[doc = "Disable"]
777 pub const _0: Self = Self::new(0);
778
779 #[doc = "Enable"]
780 pub const _1: Self = Self::new(1);
781 }
782 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
783 pub struct Mendie_SPEC;
784 pub type Mendie = crate::EnumBitfieldStruct<u8, Mendie_SPEC>;
785 impl Mendie {
786 #[doc = "Disable"]
787 pub const _0: Self = Self::new(0);
788
789 #[doc = "Enable"]
790 pub const _1: Self = Self::new(1);
791 }
792 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
793 pub struct Ferrie_SPEC;
794 pub type Ferrie = crate::EnumBitfieldStruct<u8, Ferrie_SPEC>;
795 impl Ferrie {
796 #[doc = "Disable"]
797 pub const _0: Self = Self::new(0);
798
799 #[doc = "Enable"]
800 pub const _1: Self = Self::new(1);
801 }
802}
803#[doc(hidden)]
804#[derive(Copy, Clone, Eq, PartialEq)]
805pub struct Castr_SPEC;
806impl crate::sealed::RegSpec for Castr_SPEC {
807 type DataType = u8;
808}
809
810#[doc = "CAC Status Register"]
811pub type Castr = crate::RegValueT<Castr_SPEC>;
812
813impl Castr {
814 #[doc = "Counter Overflow Flag"]
815 #[inline(always)]
816 pub fn ovff(
817 self,
818 ) -> crate::common::RegisterField<
819 2,
820 0x1,
821 1,
822 0,
823 castr::Ovff,
824 castr::Ovff,
825 Castr_SPEC,
826 crate::common::R,
827 > {
828 crate::common::RegisterField::<
829 2,
830 0x1,
831 1,
832 0,
833 castr::Ovff,
834 castr::Ovff,
835 Castr_SPEC,
836 crate::common::R,
837 >::from_register(self, 0)
838 }
839
840 #[doc = "Measurement End Flag"]
841 #[inline(always)]
842 pub fn mendf(
843 self,
844 ) -> crate::common::RegisterField<
845 1,
846 0x1,
847 1,
848 0,
849 castr::Mendf,
850 castr::Mendf,
851 Castr_SPEC,
852 crate::common::R,
853 > {
854 crate::common::RegisterField::<
855 1,
856 0x1,
857 1,
858 0,
859 castr::Mendf,
860 castr::Mendf,
861 Castr_SPEC,
862 crate::common::R,
863 >::from_register(self, 0)
864 }
865
866 #[doc = "Frequency Error Flag"]
867 #[inline(always)]
868 pub fn ferrf(
869 self,
870 ) -> crate::common::RegisterField<
871 0,
872 0x1,
873 1,
874 0,
875 castr::Ferrf,
876 castr::Ferrf,
877 Castr_SPEC,
878 crate::common::R,
879 > {
880 crate::common::RegisterField::<
881 0,
882 0x1,
883 1,
884 0,
885 castr::Ferrf,
886 castr::Ferrf,
887 Castr_SPEC,
888 crate::common::R,
889 >::from_register(self, 0)
890 }
891}
892impl ::core::default::Default for Castr {
893 #[inline(always)]
894 fn default() -> Castr {
895 <crate::RegValueT<Castr_SPEC> as RegisterValue<_>>::new(0)
896 }
897}
898pub mod castr {
899
900 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
901 pub struct Ovff_SPEC;
902 pub type Ovff = crate::EnumBitfieldStruct<u8, Ovff_SPEC>;
903 impl Ovff {
904 #[doc = "The counter has not overflowed."]
905 pub const _0: Self = Self::new(0);
906
907 #[doc = "The counter has overflowed."]
908 pub const _1: Self = Self::new(1);
909 }
910 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
911 pub struct Mendf_SPEC;
912 pub type Mendf = crate::EnumBitfieldStruct<u8, Mendf_SPEC>;
913 impl Mendf {
914 #[doc = "Measurement is in progress."]
915 pub const _0: Self = Self::new(0);
916
917 #[doc = "Measurement has ended."]
918 pub const _1: Self = Self::new(1);
919 }
920 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
921 pub struct Ferrf_SPEC;
922 pub type Ferrf = crate::EnumBitfieldStruct<u8, Ferrf_SPEC>;
923 impl Ferrf {
924 #[doc = "The clock frequency is within the range corresponding to the settings."]
925 pub const _0: Self = Self::new(0);
926
927 #[doc = "The clock frequency has deviated beyond the range corresponding to the settings (frequency error)."]
928 pub const _1: Self = Self::new(1);
929 }
930}
931#[doc(hidden)]
932#[derive(Copy, Clone, Eq, PartialEq)]
933pub struct Caulvr_SPEC;
934impl crate::sealed::RegSpec for Caulvr_SPEC {
935 type DataType = u16;
936}
937
938#[doc = "CAC Upper-Limit Value Setting Register"]
939pub type Caulvr = crate::RegValueT<Caulvr_SPEC>;
940
941impl Caulvr {
942 #[doc = "CAULVR is a 16-bit readable/writable register that stores the upper-limit value of the frequency."]
943 #[inline(always)]
944 pub fn caulvr(
945 self,
946 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Caulvr_SPEC, crate::common::RW>
947 {
948 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Caulvr_SPEC,crate::common::RW>::from_register(self,0)
949 }
950}
951impl ::core::default::Default for Caulvr {
952 #[inline(always)]
953 fn default() -> Caulvr {
954 <crate::RegValueT<Caulvr_SPEC> as RegisterValue<_>>::new(0)
955 }
956}
957
958#[doc(hidden)]
959#[derive(Copy, Clone, Eq, PartialEq)]
960pub struct Callvr_SPEC;
961impl crate::sealed::RegSpec for Callvr_SPEC {
962 type DataType = u16;
963}
964
965#[doc = "CAC Lower-Limit Value Setting Register"]
966pub type Callvr = crate::RegValueT<Callvr_SPEC>;
967
968impl Callvr {
969 #[doc = "CALLVR is a 16-bit readable/writable register that stores the lower-limit value of the frequency."]
970 #[inline(always)]
971 pub fn callvr(
972 self,
973 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Callvr_SPEC, crate::common::RW>
974 {
975 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Callvr_SPEC,crate::common::RW>::from_register(self,0)
976 }
977}
978impl ::core::default::Default for Callvr {
979 #[inline(always)]
980 fn default() -> Callvr {
981 <crate::RegValueT<Callvr_SPEC> as RegisterValue<_>>::new(0)
982 }
983}
984
985#[doc(hidden)]
986#[derive(Copy, Clone, Eq, PartialEq)]
987pub struct Cacntbr_SPEC;
988impl crate::sealed::RegSpec for Cacntbr_SPEC {
989 type DataType = u16;
990}
991
992#[doc = "CAC Counter Buffer Register"]
993pub type Cacntbr = crate::RegValueT<Cacntbr_SPEC>;
994
995impl Cacntbr {
996 #[doc = "CACNTBR is a 16-bit read-only register that retains the counter value at the time a valid reference signal edge is input"]
997 #[inline(always)]
998 pub fn cacntbr(
999 self,
1000 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Cacntbr_SPEC, crate::common::R>
1001 {
1002 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Cacntbr_SPEC,crate::common::R>::from_register(self,0)
1003 }
1004}
1005impl ::core::default::Default for Cacntbr {
1006 #[inline(always)]
1007 fn default() -> Cacntbr {
1008 <crate::RegValueT<Cacntbr_SPEC> as RegisterValue<_>>::new(0)
1009 }
1010}