bl61x_pac/glb/
wifi_pll_config_3.rs

1#[doc = "Register `wifi_pll_config_3` reader"]
2pub type R = crate::R<WIFI_PLL_CONFIG_3_SPEC>;
3#[doc = "Register `wifi_pll_config_3` writer"]
4pub type W = crate::W<WIFI_PLL_CONFIG_3_SPEC>;
5#[doc = "Field `wifipll_c4_en` reader - "]
6pub type WIFIPLL_C4_EN_R = crate::BitReader;
7#[doc = "Field `wifipll_c4_en` writer - "]
8pub type WIFIPLL_C4_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `wifipll_r4` reader - "]
10pub type WIFIPLL_R4_R = crate::FieldReader;
11#[doc = "Field `wifipll_r4` writer - "]
12pub type WIFIPLL_R4_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
13#[doc = "Field `wifipll_r4_short` reader - "]
14pub type WIFIPLL_R4_SHORT_R = crate::BitReader;
15#[doc = "Field `wifipll_r4_short` writer - "]
16pub type WIFIPLL_R4_SHORT_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `wifipll_c3` reader - "]
18pub type WIFIPLL_C3_R = crate::FieldReader;
19#[doc = "Field `wifipll_c3` writer - "]
20pub type WIFIPLL_C3_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
21#[doc = "Field `wifipll_cz` reader - "]
22pub type WIFIPLL_CZ_R = crate::FieldReader;
23#[doc = "Field `wifipll_cz` writer - "]
24pub type WIFIPLL_CZ_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
25#[doc = "Field `wifipll_rz` reader - "]
26pub type WIFIPLL_RZ_R = crate::FieldReader;
27#[doc = "Field `wifipll_rz` writer - "]
28pub type WIFIPLL_RZ_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
29impl R {
30    #[doc = "Bit 0"]
31    #[inline(always)]
32    pub fn wifipll_c4_en(&self) -> WIFIPLL_C4_EN_R {
33        WIFIPLL_C4_EN_R::new((self.bits & 1) != 0)
34    }
35    #[doc = "Bits 4:5"]
36    #[inline(always)]
37    pub fn wifipll_r4(&self) -> WIFIPLL_R4_R {
38        WIFIPLL_R4_R::new(((self.bits >> 4) & 3) as u8)
39    }
40    #[doc = "Bit 8"]
41    #[inline(always)]
42    pub fn wifipll_r4_short(&self) -> WIFIPLL_R4_SHORT_R {
43        WIFIPLL_R4_SHORT_R::new(((self.bits >> 8) & 1) != 0)
44    }
45    #[doc = "Bits 12:13"]
46    #[inline(always)]
47    pub fn wifipll_c3(&self) -> WIFIPLL_C3_R {
48        WIFIPLL_C3_R::new(((self.bits >> 12) & 3) as u8)
49    }
50    #[doc = "Bits 14:15"]
51    #[inline(always)]
52    pub fn wifipll_cz(&self) -> WIFIPLL_CZ_R {
53        WIFIPLL_CZ_R::new(((self.bits >> 14) & 3) as u8)
54    }
55    #[doc = "Bits 16:18"]
56    #[inline(always)]
57    pub fn wifipll_rz(&self) -> WIFIPLL_RZ_R {
58        WIFIPLL_RZ_R::new(((self.bits >> 16) & 7) as u8)
59    }
60}
61impl W {
62    #[doc = "Bit 0"]
63    #[inline(always)]
64    #[must_use]
65    pub fn wifipll_c4_en(&mut self) -> WIFIPLL_C4_EN_W<WIFI_PLL_CONFIG_3_SPEC> {
66        WIFIPLL_C4_EN_W::new(self, 0)
67    }
68    #[doc = "Bits 4:5"]
69    #[inline(always)]
70    #[must_use]
71    pub fn wifipll_r4(&mut self) -> WIFIPLL_R4_W<WIFI_PLL_CONFIG_3_SPEC> {
72        WIFIPLL_R4_W::new(self, 4)
73    }
74    #[doc = "Bit 8"]
75    #[inline(always)]
76    #[must_use]
77    pub fn wifipll_r4_short(&mut self) -> WIFIPLL_R4_SHORT_W<WIFI_PLL_CONFIG_3_SPEC> {
78        WIFIPLL_R4_SHORT_W::new(self, 8)
79    }
80    #[doc = "Bits 12:13"]
81    #[inline(always)]
82    #[must_use]
83    pub fn wifipll_c3(&mut self) -> WIFIPLL_C3_W<WIFI_PLL_CONFIG_3_SPEC> {
84        WIFIPLL_C3_W::new(self, 12)
85    }
86    #[doc = "Bits 14:15"]
87    #[inline(always)]
88    #[must_use]
89    pub fn wifipll_cz(&mut self) -> WIFIPLL_CZ_W<WIFI_PLL_CONFIG_3_SPEC> {
90        WIFIPLL_CZ_W::new(self, 14)
91    }
92    #[doc = "Bits 16:18"]
93    #[inline(always)]
94    #[must_use]
95    pub fn wifipll_rz(&mut self) -> WIFIPLL_RZ_W<WIFI_PLL_CONFIG_3_SPEC> {
96        WIFIPLL_RZ_W::new(self, 16)
97    }
98    #[doc = r" Writes raw bits to the register."]
99    #[doc = r""]
100    #[doc = r" # Safety"]
101    #[doc = r""]
102    #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
103    #[inline(always)]
104    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
105        self.bits = bits;
106        self
107    }
108}
109#[doc = "Wireless Fidelity Phase-Locked Loop configuration 3\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`wifi_pll_config_3::R`](R).  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`wifi_pll_config_3::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
110pub struct WIFI_PLL_CONFIG_3_SPEC;
111impl crate::RegisterSpec for WIFI_PLL_CONFIG_3_SPEC {
112    type Ux = u32;
113}
114#[doc = "`read()` method returns [`wifi_pll_config_3::R`](R) reader structure"]
115impl crate::Readable for WIFI_PLL_CONFIG_3_SPEC {}
116#[doc = "`write(|w| ..)` method takes [`wifi_pll_config_3::W`](W) writer structure"]
117impl crate::Writable for WIFI_PLL_CONFIG_3_SPEC {
118    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
119    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
120}
121#[doc = "`reset()` method sets wifi_pll_config_3 to value 0"]
122impl crate::Resettable for WIFI_PLL_CONFIG_3_SPEC {
123    const RESET_VALUE: Self::Ux = 0;
124}