bl702_pac/rf/
lna_mx.rs

1#[doc = "Register `lna_mx` reader"]
2pub struct R(crate::R<LNA_MX_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<LNA_MX_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<LNA_MX_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<LNA_MX_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `lna_mx` writer"]
17pub struct W(crate::W<LNA_MX_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<LNA_MX_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<LNA_MX_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<LNA_MX_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `rmx_bm` reader - "]
38pub type RMX_BM_R = crate::FieldReader<u8, u8>;
39#[doc = "Field `rmx_bm` writer - "]
40pub type RMX_BM_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LNA_MX_SPEC, u8, u8, 3, O>;
41#[doc = "Field `lna_rfb_match` reader - "]
42pub type LNA_RFB_MATCH_R = crate::FieldReader<u8, u8>;
43#[doc = "Field `lna_rfb_match` writer - "]
44pub type LNA_RFB_MATCH_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LNA_MX_SPEC, u8, u8, 3, O>;
45#[doc = "Field `lna_vdd13_sel` reader - "]
46pub type LNA_VDD13_SEL_R = crate::FieldReader<u8, u8>;
47#[doc = "Field `lna_vdd13_sel` writer - "]
48pub type LNA_VDD13_SEL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LNA_MX_SPEC, u8, u8, 2, O>;
49#[doc = "Field `lna_load_csw` reader - "]
50pub type LNA_LOAD_CSW_R = crate::FieldReader<u8, u8>;
51#[doc = "Field `lna_load_csw` writer - "]
52pub type LNA_LOAD_CSW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LNA_MX_SPEC, u8, u8, 4, O>;
53#[doc = "Field `lna_lg_gsel` reader - "]
54pub type LNA_LG_GSEL_R = crate::FieldReader<u8, u8>;
55#[doc = "Field `lna_lg_gsel` writer - "]
56pub type LNA_LG_GSEL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LNA_MX_SPEC, u8, u8, 3, O>;
57#[doc = "Field `lna_cap_match` reader - "]
58pub type LNA_CAP_MATCH_R = crate::FieldReader<u8, u8>;
59#[doc = "Field `lna_cap_match` writer - "]
60pub type LNA_CAP_MATCH_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LNA_MX_SPEC, u8, u8, 3, O>;
61#[doc = "Field `lna_cap_lg` reader - "]
62pub type LNA_CAP_LG_R = crate::FieldReader<u8, u8>;
63#[doc = "Field `lna_cap_lg` writer - "]
64pub type LNA_CAP_LG_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LNA_MX_SPEC, u8, u8, 2, O>;
65#[doc = "Field `lna_bm_lg` reader - "]
66pub type LNA_BM_LG_R = crate::FieldReader<u8, u8>;
67#[doc = "Field `lna_bm_lg` writer - "]
68pub type LNA_BM_LG_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LNA_MX_SPEC, u8, u8, 4, O>;
69#[doc = "Field `lna_bm_hg` reader - "]
70pub type LNA_BM_HG_R = crate::FieldReader<u8, u8>;
71#[doc = "Field `lna_bm_hg` writer - "]
72pub type LNA_BM_HG_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LNA_MX_SPEC, u8, u8, 4, O>;
73#[doc = "Field `lna_bm_hw` reader - "]
74pub type LNA_BM_HW_R = crate::FieldReader<u8, u8>;
75#[doc = "Field `lna_bm_hw` writer - "]
76pub type LNA_BM_HW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LNA_MX_SPEC, u8, u8, 4, O>;
77impl R {
78    #[doc = "Bits 0:2"]
79    #[inline(always)]
80    pub fn rmx_bm(&self) -> RMX_BM_R {
81        RMX_BM_R::new((self.bits & 7) as u8)
82    }
83    #[doc = "Bits 3:5"]
84    #[inline(always)]
85    pub fn lna_rfb_match(&self) -> LNA_RFB_MATCH_R {
86        LNA_RFB_MATCH_R::new(((self.bits >> 3) & 7) as u8)
87    }
88    #[doc = "Bits 6:7"]
89    #[inline(always)]
90    pub fn lna_vdd13_sel(&self) -> LNA_VDD13_SEL_R {
91        LNA_VDD13_SEL_R::new(((self.bits >> 6) & 3) as u8)
92    }
93    #[doc = "Bits 8:11"]
94    #[inline(always)]
95    pub fn lna_load_csw(&self) -> LNA_LOAD_CSW_R {
96        LNA_LOAD_CSW_R::new(((self.bits >> 8) & 0x0f) as u8)
97    }
98    #[doc = "Bits 12:14"]
99    #[inline(always)]
100    pub fn lna_lg_gsel(&self) -> LNA_LG_GSEL_R {
101        LNA_LG_GSEL_R::new(((self.bits >> 12) & 7) as u8)
102    }
103    #[doc = "Bits 15:17"]
104    #[inline(always)]
105    pub fn lna_cap_match(&self) -> LNA_CAP_MATCH_R {
106        LNA_CAP_MATCH_R::new(((self.bits >> 15) & 7) as u8)
107    }
108    #[doc = "Bits 18:19"]
109    #[inline(always)]
110    pub fn lna_cap_lg(&self) -> LNA_CAP_LG_R {
111        LNA_CAP_LG_R::new(((self.bits >> 18) & 3) as u8)
112    }
113    #[doc = "Bits 20:23"]
114    #[inline(always)]
115    pub fn lna_bm_lg(&self) -> LNA_BM_LG_R {
116        LNA_BM_LG_R::new(((self.bits >> 20) & 0x0f) as u8)
117    }
118    #[doc = "Bits 24:27"]
119    #[inline(always)]
120    pub fn lna_bm_hg(&self) -> LNA_BM_HG_R {
121        LNA_BM_HG_R::new(((self.bits >> 24) & 0x0f) as u8)
122    }
123    #[doc = "Bits 28:31"]
124    #[inline(always)]
125    pub fn lna_bm_hw(&self) -> LNA_BM_HW_R {
126        LNA_BM_HW_R::new(((self.bits >> 28) & 0x0f) as u8)
127    }
128}
129impl W {
130    #[doc = "Bits 0:2"]
131    #[inline(always)]
132    #[must_use]
133    pub fn rmx_bm(&mut self) -> RMX_BM_W<0> {
134        RMX_BM_W::new(self)
135    }
136    #[doc = "Bits 3:5"]
137    #[inline(always)]
138    #[must_use]
139    pub fn lna_rfb_match(&mut self) -> LNA_RFB_MATCH_W<3> {
140        LNA_RFB_MATCH_W::new(self)
141    }
142    #[doc = "Bits 6:7"]
143    #[inline(always)]
144    #[must_use]
145    pub fn lna_vdd13_sel(&mut self) -> LNA_VDD13_SEL_W<6> {
146        LNA_VDD13_SEL_W::new(self)
147    }
148    #[doc = "Bits 8:11"]
149    #[inline(always)]
150    #[must_use]
151    pub fn lna_load_csw(&mut self) -> LNA_LOAD_CSW_W<8> {
152        LNA_LOAD_CSW_W::new(self)
153    }
154    #[doc = "Bits 12:14"]
155    #[inline(always)]
156    #[must_use]
157    pub fn lna_lg_gsel(&mut self) -> LNA_LG_GSEL_W<12> {
158        LNA_LG_GSEL_W::new(self)
159    }
160    #[doc = "Bits 15:17"]
161    #[inline(always)]
162    #[must_use]
163    pub fn lna_cap_match(&mut self) -> LNA_CAP_MATCH_W<15> {
164        LNA_CAP_MATCH_W::new(self)
165    }
166    #[doc = "Bits 18:19"]
167    #[inline(always)]
168    #[must_use]
169    pub fn lna_cap_lg(&mut self) -> LNA_CAP_LG_W<18> {
170        LNA_CAP_LG_W::new(self)
171    }
172    #[doc = "Bits 20:23"]
173    #[inline(always)]
174    #[must_use]
175    pub fn lna_bm_lg(&mut self) -> LNA_BM_LG_W<20> {
176        LNA_BM_LG_W::new(self)
177    }
178    #[doc = "Bits 24:27"]
179    #[inline(always)]
180    #[must_use]
181    pub fn lna_bm_hg(&mut self) -> LNA_BM_HG_W<24> {
182        LNA_BM_HG_W::new(self)
183    }
184    #[doc = "Bits 28:31"]
185    #[inline(always)]
186    #[must_use]
187    pub fn lna_bm_hw(&mut self) -> LNA_BM_HW_W<28> {
188        LNA_BM_HW_W::new(self)
189    }
190    #[doc = "Writes raw bits to the register."]
191    #[inline(always)]
192    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
193        self.0.bits(bits);
194        self
195    }
196}
197#[doc = "LNA mixer 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 [lna_mx](index.html) module"]
198pub struct LNA_MX_SPEC;
199impl crate::RegisterSpec for LNA_MX_SPEC {
200    type Ux = u32;
201}
202#[doc = "`read()` method returns [lna_mx::R](R) reader structure"]
203impl crate::Readable for LNA_MX_SPEC {
204    type Reader = R;
205}
206#[doc = "`write(|w| ..)` method takes [lna_mx::W](W) writer structure"]
207impl crate::Writable for LNA_MX_SPEC {
208    type Writer = W;
209    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
210    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
211}
212#[doc = "`reset()` method sets lna_mx to value 0"]
213impl crate::Resettable for LNA_MX_SPEC {
214    const RESET_VALUE: Self::Ux = 0;
215}