bl602_pac/rf/
lna_ctrl_hw_mux.rs1#[doc = "Register `lna_ctrl_hw_mux` reader"]
2pub struct R(crate::R<LNA_CTRL_HW_MUX_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<LNA_CTRL_HW_MUX_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<LNA_CTRL_HW_MUX_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<LNA_CTRL_HW_MUX_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `lna_ctrl_hw_mux` writer"]
17pub struct W(crate::W<LNA_CTRL_HW_MUX_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<LNA_CTRL_HW_MUX_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_CTRL_HW_MUX_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<LNA_CTRL_HW_MUX_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `lna_bm_hg` reader - "]
38pub type LNA_BM_HG_R = crate::FieldReader<u8, u8>;
39#[doc = "Field `lna_bm_hg` writer - "]
40pub type LNA_BM_HG_W<'a, const O: u8> =
41 crate::FieldWriter<'a, u32, LNA_CTRL_HW_MUX_SPEC, u8, u8, 4, O>;
42#[doc = "Field `lna_bm_lg` reader - "]
43pub type LNA_BM_LG_R = crate::FieldReader<u8, u8>;
44#[doc = "Field `lna_bm_lg` writer - "]
45pub type LNA_BM_LG_W<'a, const O: u8> =
46 crate::FieldWriter<'a, u32, LNA_CTRL_HW_MUX_SPEC, u8, u8, 4, O>;
47#[doc = "Field `lna_load_csw_hg` reader - "]
48pub type LNA_LOAD_CSW_HG_R = crate::FieldReader<u8, u8>;
49#[doc = "Field `lna_load_csw_hg` writer - "]
50pub type LNA_LOAD_CSW_HG_W<'a, const O: u8> =
51 crate::FieldWriter<'a, u32, LNA_CTRL_HW_MUX_SPEC, u8, u8, 4, O>;
52#[doc = "Field `lna_load_csw_lg` reader - "]
53pub type LNA_LOAD_CSW_LG_R = crate::FieldReader<u8, u8>;
54#[doc = "Field `lna_load_csw_lg` writer - "]
55pub type LNA_LOAD_CSW_LG_W<'a, const O: u8> =
56 crate::FieldWriter<'a, u32, LNA_CTRL_HW_MUX_SPEC, u8, u8, 4, O>;
57impl R {
58 #[doc = "Bits 0:3"]
59 #[inline(always)]
60 pub fn lna_bm_hg(&self) -> LNA_BM_HG_R {
61 LNA_BM_HG_R::new((self.bits & 0x0f) as u8)
62 }
63 #[doc = "Bits 4:7"]
64 #[inline(always)]
65 pub fn lna_bm_lg(&self) -> LNA_BM_LG_R {
66 LNA_BM_LG_R::new(((self.bits >> 4) & 0x0f) as u8)
67 }
68 #[doc = "Bits 8:11"]
69 #[inline(always)]
70 pub fn lna_load_csw_hg(&self) -> LNA_LOAD_CSW_HG_R {
71 LNA_LOAD_CSW_HG_R::new(((self.bits >> 8) & 0x0f) as u8)
72 }
73 #[doc = "Bits 12:15"]
74 #[inline(always)]
75 pub fn lna_load_csw_lg(&self) -> LNA_LOAD_CSW_LG_R {
76 LNA_LOAD_CSW_LG_R::new(((self.bits >> 12) & 0x0f) as u8)
77 }
78}
79impl W {
80 #[doc = "Bits 0:3"]
81 #[inline(always)]
82 #[must_use]
83 pub fn lna_bm_hg(&mut self) -> LNA_BM_HG_W<0> {
84 LNA_BM_HG_W::new(self)
85 }
86 #[doc = "Bits 4:7"]
87 #[inline(always)]
88 #[must_use]
89 pub fn lna_bm_lg(&mut self) -> LNA_BM_LG_W<4> {
90 LNA_BM_LG_W::new(self)
91 }
92 #[doc = "Bits 8:11"]
93 #[inline(always)]
94 #[must_use]
95 pub fn lna_load_csw_hg(&mut self) -> LNA_LOAD_CSW_HG_W<8> {
96 LNA_LOAD_CSW_HG_W::new(self)
97 }
98 #[doc = "Bits 12:15"]
99 #[inline(always)]
100 #[must_use]
101 pub fn lna_load_csw_lg(&mut self) -> LNA_LOAD_CSW_LG_W<12> {
102 LNA_LOAD_CSW_LG_W::new(self)
103 }
104 #[doc = "Writes raw bits to the register."]
105 #[inline(always)]
106 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
107 self.0.bits(bits);
108 self
109 }
110}
111#[doc = "lna_ctrl_hw_mux.\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_ctrl_hw_mux](index.html) module"]
112pub struct LNA_CTRL_HW_MUX_SPEC;
113impl crate::RegisterSpec for LNA_CTRL_HW_MUX_SPEC {
114 type Ux = u32;
115}
116#[doc = "`read()` method returns [lna_ctrl_hw_mux::R](R) reader structure"]
117impl crate::Readable for LNA_CTRL_HW_MUX_SPEC {
118 type Reader = R;
119}
120#[doc = "`write(|w| ..)` method takes [lna_ctrl_hw_mux::W](W) writer structure"]
121impl crate::Writable for LNA_CTRL_HW_MUX_SPEC {
122 type Writer = W;
123 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
124 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
125}
126#[doc = "`reset()` method sets lna_ctrl_hw_mux to value 0"]
127impl crate::Resettable for LNA_CTRL_HW_MUX_SPEC {
128 const RESET_VALUE: Self::Ux = 0;
129}