bl602_pac/rf/
trx_gain_hw.rs1#[doc = "Register `trx_gain_hw` reader"]
2pub struct R(crate::R<TRX_GAIN_HW_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<TRX_GAIN_HW_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<TRX_GAIN_HW_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<TRX_GAIN_HW_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `trx_gain_hw` writer"]
17pub struct W(crate::W<TRX_GAIN_HW_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<TRX_GAIN_HW_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<TRX_GAIN_HW_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<TRX_GAIN_HW_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `gc_lna_hw` reader - "]
38pub type GC_LNA_HW_R = crate::FieldReader<u8, u8>;
39#[doc = "Field `gc_lna_hw` writer - "]
40pub type GC_LNA_HW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TRX_GAIN_HW_SPEC, u8, u8, 3, O>;
41#[doc = "Field `gc_rmxgm_hw` reader - "]
42pub type GC_RMXGM_HW_R = crate::FieldReader<u8, u8>;
43#[doc = "Field `gc_rmxgm_hw` writer - "]
44pub type GC_RMXGM_HW_W<'a, const O: u8> =
45 crate::FieldWriter<'a, u32, TRX_GAIN_HW_SPEC, u8, u8, 2, O>;
46#[doc = "Field `gc_rbb1_hw` reader - "]
47pub type GC_RBB1_HW_R = crate::FieldReader<u8, u8>;
48#[doc = "Field `gc_rbb1_hw` writer - "]
49pub type GC_RBB1_HW_W<'a, const O: u8> =
50 crate::FieldWriter<'a, u32, TRX_GAIN_HW_SPEC, u8, u8, 2, O>;
51#[doc = "Field `gc_rbb2_hw` reader - "]
52pub type GC_RBB2_HW_R = crate::FieldReader<u8, u8>;
53#[doc = "Field `gc_rbb2_hw` writer - "]
54pub type GC_RBB2_HW_W<'a, const O: u8> =
55 crate::FieldWriter<'a, u32, TRX_GAIN_HW_SPEC, u8, u8, 3, O>;
56#[doc = "Field `gc_tmx_hw` reader - "]
57pub type GC_TMX_HW_R = crate::FieldReader<u8, u8>;
58#[doc = "Field `gc_tmx_hw` writer - "]
59pub type GC_TMX_HW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TRX_GAIN_HW_SPEC, u8, u8, 3, O>;
60#[doc = "Field `gc_tbb_hw` reader - "]
61pub type GC_TBB_HW_R = crate::FieldReader<u8, u8>;
62#[doc = "Field `gc_tbb_hw` writer - "]
63pub type GC_TBB_HW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TRX_GAIN_HW_SPEC, u8, u8, 5, O>;
64#[doc = "Field `gc_tbb_boost_hw` reader - "]
65pub type GC_TBB_BOOST_HW_R = crate::FieldReader<u8, u8>;
66#[doc = "Field `gc_tbb_boost_hw` writer - "]
67pub type GC_TBB_BOOST_HW_W<'a, const O: u8> =
68 crate::FieldWriter<'a, u32, TRX_GAIN_HW_SPEC, u8, u8, 2, O>;
69impl R {
70 #[doc = "Bits 0:2"]
71 #[inline(always)]
72 pub fn gc_lna_hw(&self) -> GC_LNA_HW_R {
73 GC_LNA_HW_R::new((self.bits & 7) as u8)
74 }
75 #[doc = "Bits 4:5"]
76 #[inline(always)]
77 pub fn gc_rmxgm_hw(&self) -> GC_RMXGM_HW_R {
78 GC_RMXGM_HW_R::new(((self.bits >> 4) & 3) as u8)
79 }
80 #[doc = "Bits 8:9"]
81 #[inline(always)]
82 pub fn gc_rbb1_hw(&self) -> GC_RBB1_HW_R {
83 GC_RBB1_HW_R::new(((self.bits >> 8) & 3) as u8)
84 }
85 #[doc = "Bits 12:14"]
86 #[inline(always)]
87 pub fn gc_rbb2_hw(&self) -> GC_RBB2_HW_R {
88 GC_RBB2_HW_R::new(((self.bits >> 12) & 7) as u8)
89 }
90 #[doc = "Bits 16:18"]
91 #[inline(always)]
92 pub fn gc_tmx_hw(&self) -> GC_TMX_HW_R {
93 GC_TMX_HW_R::new(((self.bits >> 16) & 7) as u8)
94 }
95 #[doc = "Bits 20:24"]
96 #[inline(always)]
97 pub fn gc_tbb_hw(&self) -> GC_TBB_HW_R {
98 GC_TBB_HW_R::new(((self.bits >> 20) & 0x1f) as u8)
99 }
100 #[doc = "Bits 28:29"]
101 #[inline(always)]
102 pub fn gc_tbb_boost_hw(&self) -> GC_TBB_BOOST_HW_R {
103 GC_TBB_BOOST_HW_R::new(((self.bits >> 28) & 3) as u8)
104 }
105}
106impl W {
107 #[doc = "Bits 0:2"]
108 #[inline(always)]
109 #[must_use]
110 pub fn gc_lna_hw(&mut self) -> GC_LNA_HW_W<0> {
111 GC_LNA_HW_W::new(self)
112 }
113 #[doc = "Bits 4:5"]
114 #[inline(always)]
115 #[must_use]
116 pub fn gc_rmxgm_hw(&mut self) -> GC_RMXGM_HW_W<4> {
117 GC_RMXGM_HW_W::new(self)
118 }
119 #[doc = "Bits 8:9"]
120 #[inline(always)]
121 #[must_use]
122 pub fn gc_rbb1_hw(&mut self) -> GC_RBB1_HW_W<8> {
123 GC_RBB1_HW_W::new(self)
124 }
125 #[doc = "Bits 12:14"]
126 #[inline(always)]
127 #[must_use]
128 pub fn gc_rbb2_hw(&mut self) -> GC_RBB2_HW_W<12> {
129 GC_RBB2_HW_W::new(self)
130 }
131 #[doc = "Bits 16:18"]
132 #[inline(always)]
133 #[must_use]
134 pub fn gc_tmx_hw(&mut self) -> GC_TMX_HW_W<16> {
135 GC_TMX_HW_W::new(self)
136 }
137 #[doc = "Bits 20:24"]
138 #[inline(always)]
139 #[must_use]
140 pub fn gc_tbb_hw(&mut self) -> GC_TBB_HW_W<20> {
141 GC_TBB_HW_W::new(self)
142 }
143 #[doc = "Bits 28:29"]
144 #[inline(always)]
145 #[must_use]
146 pub fn gc_tbb_boost_hw(&mut self) -> GC_TBB_BOOST_HW_W<28> {
147 GC_TBB_BOOST_HW_W::new(self)
148 }
149 #[doc = "Writes raw bits to the register."]
150 #[inline(always)]
151 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
152 self.0.bits(bits);
153 self
154 }
155}
156#[doc = "trx gain hardware readback\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 [trx_gain_hw](index.html) module"]
157pub struct TRX_GAIN_HW_SPEC;
158impl crate::RegisterSpec for TRX_GAIN_HW_SPEC {
159 type Ux = u32;
160}
161#[doc = "`read()` method returns [trx_gain_hw::R](R) reader structure"]
162impl crate::Readable for TRX_GAIN_HW_SPEC {
163 type Reader = R;
164}
165#[doc = "`write(|w| ..)` method takes [trx_gain_hw::W](W) writer structure"]
166impl crate::Writable for TRX_GAIN_HW_SPEC {
167 type Writer = W;
168 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
169 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
170}
171#[doc = "`reset()` method sets trx_gain_hw to value 0"]
172impl crate::Resettable for TRX_GAIN_HW_SPEC {
173 const RESET_VALUE: Self::Ux = 0;
174}