bl602_pac/rf/
vco4.rs

1#[doc = "Register `vco4` reader"]
2pub struct R(crate::R<VCO4_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<VCO4_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<VCO4_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<VCO4_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `vco4` writer"]
17pub struct W(crate::W<VCO4_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<VCO4_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<VCO4_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<VCO4_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `fcal_cnt_start` reader - "]
38pub type FCAL_CNT_START_R = crate::BitReader<bool>;
39#[doc = "Field `fcal_cnt_start` writer - "]
40pub type FCAL_CNT_START_W<'a, const O: u8> = crate::BitWriter<'a, u32, VCO4_SPEC, bool, O>;
41#[doc = "Field `fcal_inc_en_hw` reader - "]
42pub type FCAL_INC_EN_HW_R = crate::BitReader<bool>;
43#[doc = "Field `fcal_inc_en_hw` writer - "]
44pub type FCAL_INC_EN_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, VCO4_SPEC, bool, O>;
45#[doc = "Field `fcal_inc_large_range` reader - "]
46pub type FCAL_INC_LARGE_RANGE_R = crate::BitReader<bool>;
47#[doc = "Field `fcal_inc_large_range` writer - "]
48pub type FCAL_INC_LARGE_RANGE_W<'a, const O: u8> = crate::BitWriter<'a, u32, VCO4_SPEC, bool, O>;
49#[doc = "Field `fcal_cnt_rdy` reader - "]
50pub type FCAL_CNT_RDY_R = crate::BitReader<bool>;
51#[doc = "Field `fcal_cnt_rdy` writer - "]
52pub type FCAL_CNT_RDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, VCO4_SPEC, bool, O>;
53#[doc = "Field `fcal_inc_vctrl_ud` reader - "]
54pub type FCAL_INC_VCTRL_UD_R = crate::FieldReader<u8, u8>;
55#[doc = "Field `fcal_inc_vctrl_ud` writer - "]
56pub type FCAL_INC_VCTRL_UD_W<'a, const O: u8> =
57    crate::FieldWriter<'a, u32, VCO4_SPEC, u8, u8, 2, O>;
58impl R {
59    #[doc = "Bit 4"]
60    #[inline(always)]
61    pub fn fcal_cnt_start(&self) -> FCAL_CNT_START_R {
62        FCAL_CNT_START_R::new(((self.bits >> 4) & 1) != 0)
63    }
64    #[doc = "Bit 8"]
65    #[inline(always)]
66    pub fn fcal_inc_en_hw(&self) -> FCAL_INC_EN_HW_R {
67        FCAL_INC_EN_HW_R::new(((self.bits >> 8) & 1) != 0)
68    }
69    #[doc = "Bit 16"]
70    #[inline(always)]
71    pub fn fcal_inc_large_range(&self) -> FCAL_INC_LARGE_RANGE_R {
72        FCAL_INC_LARGE_RANGE_R::new(((self.bits >> 16) & 1) != 0)
73    }
74    #[doc = "Bit 20"]
75    #[inline(always)]
76    pub fn fcal_cnt_rdy(&self) -> FCAL_CNT_RDY_R {
77        FCAL_CNT_RDY_R::new(((self.bits >> 20) & 1) != 0)
78    }
79    #[doc = "Bits 24:25"]
80    #[inline(always)]
81    pub fn fcal_inc_vctrl_ud(&self) -> FCAL_INC_VCTRL_UD_R {
82        FCAL_INC_VCTRL_UD_R::new(((self.bits >> 24) & 3) as u8)
83    }
84}
85impl W {
86    #[doc = "Bit 4"]
87    #[inline(always)]
88    #[must_use]
89    pub fn fcal_cnt_start(&mut self) -> FCAL_CNT_START_W<4> {
90        FCAL_CNT_START_W::new(self)
91    }
92    #[doc = "Bit 8"]
93    #[inline(always)]
94    #[must_use]
95    pub fn fcal_inc_en_hw(&mut self) -> FCAL_INC_EN_HW_W<8> {
96        FCAL_INC_EN_HW_W::new(self)
97    }
98    #[doc = "Bit 16"]
99    #[inline(always)]
100    #[must_use]
101    pub fn fcal_inc_large_range(&mut self) -> FCAL_INC_LARGE_RANGE_W<16> {
102        FCAL_INC_LARGE_RANGE_W::new(self)
103    }
104    #[doc = "Bit 20"]
105    #[inline(always)]
106    #[must_use]
107    pub fn fcal_cnt_rdy(&mut self) -> FCAL_CNT_RDY_W<20> {
108        FCAL_CNT_RDY_W::new(self)
109    }
110    #[doc = "Bits 24:25"]
111    #[inline(always)]
112    #[must_use]
113    pub fn fcal_inc_vctrl_ud(&mut self) -> FCAL_INC_VCTRL_UD_W<24> {
114        FCAL_INC_VCTRL_UD_W::new(self)
115    }
116    #[doc = "Writes raw bits to the register."]
117    #[inline(always)]
118    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
119        self.0.bits(bits);
120        self
121    }
122}
123#[doc = "vco4.\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 [vco4](index.html) module"]
124pub struct VCO4_SPEC;
125impl crate::RegisterSpec for VCO4_SPEC {
126    type Ux = u32;
127}
128#[doc = "`read()` method returns [vco4::R](R) reader structure"]
129impl crate::Readable for VCO4_SPEC {
130    type Reader = R;
131}
132#[doc = "`write(|w| ..)` method takes [vco4::W](W) writer structure"]
133impl crate::Writable for VCO4_SPEC {
134    type Writer = W;
135    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
136    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
137}
138#[doc = "`reset()` method sets vco4 to value 0"]
139impl crate::Resettable for VCO4_SPEC {
140    const RESET_VALUE: Self::Ux = 0;
141}