efm32pg22_pac/efm32pg22c200/devinfo/
hfrcodpllcal12.rs1#[doc = "Register `HFRCODPLLCAL12` reader"]
2pub struct R(crate::R<HFRCODPLLCAL12_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<HFRCODPLLCAL12_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<HFRCODPLLCAL12_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<HFRCODPLLCAL12_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `TUNING` reader - No Description"]
17pub type TUNING_R = crate::FieldReader<u8, u8>;
18#[doc = "Field `FINETUNING` reader - No Description"]
19pub type FINETUNING_R = crate::FieldReader<u8, u8>;
20#[doc = "Field `LDOHP` reader - No Description"]
21pub type LDOHP_R = crate::BitReader<bool>;
22#[doc = "Field `FREQRANGE` reader - No Description"]
23pub type FREQRANGE_R = crate::FieldReader<u8, u8>;
24#[doc = "Field `CMPBIAS` reader - No Description"]
25pub type CMPBIAS_R = crate::FieldReader<u8, u8>;
26#[doc = "Field `CLKDIV` reader - No Description"]
27pub type CLKDIV_R = crate::FieldReader<u8, u8>;
28#[doc = "Field `CMPSEL` reader - No Description"]
29pub type CMPSEL_R = crate::FieldReader<u8, u8>;
30#[doc = "Field `IREFTC` reader - No Description"]
31pub type IREFTC_R = crate::FieldReader<u8, u8>;
32impl R {
33 #[doc = "Bits 0:6 - No Description"]
34 #[inline(always)]
35 pub fn tuning(&self) -> TUNING_R {
36 TUNING_R::new((self.bits & 0x7f) as u8)
37 }
38 #[doc = "Bits 8:13 - No Description"]
39 #[inline(always)]
40 pub fn finetuning(&self) -> FINETUNING_R {
41 FINETUNING_R::new(((self.bits >> 8) & 0x3f) as u8)
42 }
43 #[doc = "Bit 15 - No Description"]
44 #[inline(always)]
45 pub fn ldohp(&self) -> LDOHP_R {
46 LDOHP_R::new(((self.bits >> 15) & 1) != 0)
47 }
48 #[doc = "Bits 16:20 - No Description"]
49 #[inline(always)]
50 pub fn freqrange(&self) -> FREQRANGE_R {
51 FREQRANGE_R::new(((self.bits >> 16) & 0x1f) as u8)
52 }
53 #[doc = "Bits 21:23 - No Description"]
54 #[inline(always)]
55 pub fn cmpbias(&self) -> CMPBIAS_R {
56 CMPBIAS_R::new(((self.bits >> 21) & 7) as u8)
57 }
58 #[doc = "Bits 24:25 - No Description"]
59 #[inline(always)]
60 pub fn clkdiv(&self) -> CLKDIV_R {
61 CLKDIV_R::new(((self.bits >> 24) & 3) as u8)
62 }
63 #[doc = "Bits 26:27 - No Description"]
64 #[inline(always)]
65 pub fn cmpsel(&self) -> CMPSEL_R {
66 CMPSEL_R::new(((self.bits >> 26) & 3) as u8)
67 }
68 #[doc = "Bits 28:31 - No Description"]
69 #[inline(always)]
70 pub fn ireftc(&self) -> IREFTC_R {
71 IREFTC_R::new(((self.bits >> 28) & 0x0f) as u8)
72 }
73}
74#[doc = "HFRCODPLL Calibration\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [hfrcodpllcal12](index.html) module"]
75pub struct HFRCODPLLCAL12_SPEC;
76impl crate::RegisterSpec for HFRCODPLLCAL12_SPEC {
77 type Ux = u32;
78}
79#[doc = "`read()` method returns [hfrcodpllcal12::R](R) reader structure"]
80impl crate::Readable for HFRCODPLLCAL12_SPEC {
81 type Reader = R;
82}
83#[doc = "`reset()` method sets HFRCODPLLCAL12 to value 0"]
84impl crate::Resettable for HFRCODPLLCAL12_SPEC {
85 const RESET_VALUE: Self::Ux = 0;
86}