1#[doc = "Register `rf_top` reader"]
2pub struct R(crate::R<RF_TOP_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<RF_TOP_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<RF_TOP_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<RF_TOP_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `rf_top` writer"]
17pub struct W(crate::W<RF_TOP_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<RF_TOP_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<RF_TOP_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<RF_TOP_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `rfckg_afifo_adpll_inv` reader - "]
38pub type RFCKG_AFIFO_ADPLL_INV_R = crate::BitReader<bool>;
39#[doc = "Field `rfckg_afifo_adpll_inv` writer - "]
40pub type RFCKG_AFIFO_ADPLL_INV_W<'a, const O: u8> = crate::BitWriter<'a, u32, RF_TOP_SPEC, bool, O>;
41#[doc = "Field `rfckg_afifo_rxadc_inv` reader - "]
42pub type RFCKG_AFIFO_RXADC_INV_R = crate::BitReader<bool>;
43#[doc = "Field `rfckg_afifo_rxadc_inv` writer - "]
44pub type RFCKG_AFIFO_RXADC_INV_W<'a, const O: u8> = crate::BitWriter<'a, u32, RF_TOP_SPEC, bool, O>;
45#[doc = "Field `rfckg_afifo_tx_inv` reader - "]
46pub type RFCKG_AFIFO_TX_INV_R = crate::BitReader<bool>;
47#[doc = "Field `rfckg_afifo_tx_inv` writer - "]
48pub type RFCKG_AFIFO_TX_INV_W<'a, const O: u8> = crate::BitWriter<'a, u32, RF_TOP_SPEC, bool, O>;
49#[doc = "Field `rf_mac_lo_time_offset` reader - "]
50pub type RF_MAC_LO_TIME_OFFSET_R = crate::FieldReader<u8, u8>;
51#[doc = "Field `rf_mac_lo_time_offset` writer - "]
52pub type RF_MAC_LO_TIME_OFFSET_W<'a, const O: u8> =
53 crate::FieldWriter<'a, u32, RF_TOP_SPEC, u8, u8, 6, O>;
54#[doc = "Field `rf_rx_mode_hw` reader - "]
55pub type RF_RX_MODE_HW_R = crate::FieldReader<u8, u8>;
56#[doc = "Field `rf_rx_mode_hw` writer - "]
57pub type RF_RX_MODE_HW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RF_TOP_SPEC, u8, u8, 2, O>;
58#[doc = "Field `rf_rx_mode_4s` reader - "]
59pub type RF_RX_MODE_4S_R = crate::FieldReader<u8, u8>;
60#[doc = "Field `rf_rx_mode_4s` writer - "]
61pub type RF_RX_MODE_4S_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RF_TOP_SPEC, u8, u8, 2, O>;
62#[doc = "Field `rf_rx_mode_4s_en` reader - "]
63pub type RF_RX_MODE_4S_EN_R = crate::BitReader<bool>;
64#[doc = "Field `rf_rx_mode_4s_en` writer - "]
65pub type RF_RX_MODE_4S_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RF_TOP_SPEC, bool, O>;
66#[doc = "Field `rf_rx_en_4s` reader - "]
67pub type RF_RX_EN_4S_R = crate::BitReader<bool>;
68#[doc = "Field `rf_rx_en_4s` writer - "]
69pub type RF_RX_EN_4S_W<'a, const O: u8> = crate::BitWriter<'a, u32, RF_TOP_SPEC, bool, O>;
70#[doc = "Field `rf_rx_en_src` reader - "]
71pub type RF_RX_EN_SRC_R = crate::BitReader<bool>;
72#[doc = "Field `rf_rx_en_src` writer - "]
73pub type RF_RX_EN_SRC_W<'a, const O: u8> = crate::BitWriter<'a, u32, RF_TOP_SPEC, bool, O>;
74#[doc = "Field `rf_tx_en_4s` reader - "]
75pub type RF_TX_EN_4S_R = crate::BitReader<bool>;
76#[doc = "Field `rf_tx_en_4s` writer - "]
77pub type RF_TX_EN_4S_W<'a, const O: u8> = crate::BitWriter<'a, u32, RF_TOP_SPEC, bool, O>;
78#[doc = "Field `rf_tx_en_src` reader - "]
79pub type RF_TX_EN_SRC_R = crate::BitReader<bool>;
80#[doc = "Field `rf_tx_en_src` writer - "]
81pub type RF_TX_EN_SRC_W<'a, const O: u8> = crate::BitWriter<'a, u32, RF_TOP_SPEC, bool, O>;
82impl R {
83 #[doc = "Bit 0"]
84 #[inline(always)]
85 pub fn rfckg_afifo_adpll_inv(&self) -> RFCKG_AFIFO_ADPLL_INV_R {
86 RFCKG_AFIFO_ADPLL_INV_R::new((self.bits & 1) != 0)
87 }
88 #[doc = "Bit 1"]
89 #[inline(always)]
90 pub fn rfckg_afifo_rxadc_inv(&self) -> RFCKG_AFIFO_RXADC_INV_R {
91 RFCKG_AFIFO_RXADC_INV_R::new(((self.bits >> 1) & 1) != 0)
92 }
93 #[doc = "Bit 2"]
94 #[inline(always)]
95 pub fn rfckg_afifo_tx_inv(&self) -> RFCKG_AFIFO_TX_INV_R {
96 RFCKG_AFIFO_TX_INV_R::new(((self.bits >> 2) & 1) != 0)
97 }
98 #[doc = "Bits 16:21"]
99 #[inline(always)]
100 pub fn rf_mac_lo_time_offset(&self) -> RF_MAC_LO_TIME_OFFSET_R {
101 RF_MAC_LO_TIME_OFFSET_R::new(((self.bits >> 16) & 0x3f) as u8)
102 }
103 #[doc = "Bits 22:23"]
104 #[inline(always)]
105 pub fn rf_rx_mode_hw(&self) -> RF_RX_MODE_HW_R {
106 RF_RX_MODE_HW_R::new(((self.bits >> 22) & 3) as u8)
107 }
108 #[doc = "Bits 24:25"]
109 #[inline(always)]
110 pub fn rf_rx_mode_4s(&self) -> RF_RX_MODE_4S_R {
111 RF_RX_MODE_4S_R::new(((self.bits >> 24) & 3) as u8)
112 }
113 #[doc = "Bit 26"]
114 #[inline(always)]
115 pub fn rf_rx_mode_4s_en(&self) -> RF_RX_MODE_4S_EN_R {
116 RF_RX_MODE_4S_EN_R::new(((self.bits >> 26) & 1) != 0)
117 }
118 #[doc = "Bit 28"]
119 #[inline(always)]
120 pub fn rf_rx_en_4s(&self) -> RF_RX_EN_4S_R {
121 RF_RX_EN_4S_R::new(((self.bits >> 28) & 1) != 0)
122 }
123 #[doc = "Bit 29"]
124 #[inline(always)]
125 pub fn rf_rx_en_src(&self) -> RF_RX_EN_SRC_R {
126 RF_RX_EN_SRC_R::new(((self.bits >> 29) & 1) != 0)
127 }
128 #[doc = "Bit 30"]
129 #[inline(always)]
130 pub fn rf_tx_en_4s(&self) -> RF_TX_EN_4S_R {
131 RF_TX_EN_4S_R::new(((self.bits >> 30) & 1) != 0)
132 }
133 #[doc = "Bit 31"]
134 #[inline(always)]
135 pub fn rf_tx_en_src(&self) -> RF_TX_EN_SRC_R {
136 RF_TX_EN_SRC_R::new(((self.bits >> 31) & 1) != 0)
137 }
138}
139impl W {
140 #[doc = "Bit 0"]
141 #[inline(always)]
142 #[must_use]
143 pub fn rfckg_afifo_adpll_inv(&mut self) -> RFCKG_AFIFO_ADPLL_INV_W<0> {
144 RFCKG_AFIFO_ADPLL_INV_W::new(self)
145 }
146 #[doc = "Bit 1"]
147 #[inline(always)]
148 #[must_use]
149 pub fn rfckg_afifo_rxadc_inv(&mut self) -> RFCKG_AFIFO_RXADC_INV_W<1> {
150 RFCKG_AFIFO_RXADC_INV_W::new(self)
151 }
152 #[doc = "Bit 2"]
153 #[inline(always)]
154 #[must_use]
155 pub fn rfckg_afifo_tx_inv(&mut self) -> RFCKG_AFIFO_TX_INV_W<2> {
156 RFCKG_AFIFO_TX_INV_W::new(self)
157 }
158 #[doc = "Bits 16:21"]
159 #[inline(always)]
160 #[must_use]
161 pub fn rf_mac_lo_time_offset(&mut self) -> RF_MAC_LO_TIME_OFFSET_W<16> {
162 RF_MAC_LO_TIME_OFFSET_W::new(self)
163 }
164 #[doc = "Bits 22:23"]
165 #[inline(always)]
166 #[must_use]
167 pub fn rf_rx_mode_hw(&mut self) -> RF_RX_MODE_HW_W<22> {
168 RF_RX_MODE_HW_W::new(self)
169 }
170 #[doc = "Bits 24:25"]
171 #[inline(always)]
172 #[must_use]
173 pub fn rf_rx_mode_4s(&mut self) -> RF_RX_MODE_4S_W<24> {
174 RF_RX_MODE_4S_W::new(self)
175 }
176 #[doc = "Bit 26"]
177 #[inline(always)]
178 #[must_use]
179 pub fn rf_rx_mode_4s_en(&mut self) -> RF_RX_MODE_4S_EN_W<26> {
180 RF_RX_MODE_4S_EN_W::new(self)
181 }
182 #[doc = "Bit 28"]
183 #[inline(always)]
184 #[must_use]
185 pub fn rf_rx_en_4s(&mut self) -> RF_RX_EN_4S_W<28> {
186 RF_RX_EN_4S_W::new(self)
187 }
188 #[doc = "Bit 29"]
189 #[inline(always)]
190 #[must_use]
191 pub fn rf_rx_en_src(&mut self) -> RF_RX_EN_SRC_W<29> {
192 RF_RX_EN_SRC_W::new(self)
193 }
194 #[doc = "Bit 30"]
195 #[inline(always)]
196 #[must_use]
197 pub fn rf_tx_en_4s(&mut self) -> RF_TX_EN_4S_W<30> {
198 RF_TX_EN_4S_W::new(self)
199 }
200 #[doc = "Bit 31"]
201 #[inline(always)]
202 #[must_use]
203 pub fn rf_tx_en_src(&mut self) -> RF_TX_EN_SRC_W<31> {
204 RF_TX_EN_SRC_W::new(self)
205 }
206 #[doc = "Writes raw bits to the register."]
207 #[inline(always)]
208 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
209 self.0.bits(bits);
210 self
211 }
212}
213#[doc = "rf_top.\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 [rf_top](index.html) module"]
214pub struct RF_TOP_SPEC;
215impl crate::RegisterSpec for RF_TOP_SPEC {
216 type Ux = u32;
217}
218#[doc = "`read()` method returns [rf_top::R](R) reader structure"]
219impl crate::Readable for RF_TOP_SPEC {
220 type Reader = R;
221}
222#[doc = "`write(|w| ..)` method takes [rf_top::W](W) writer structure"]
223impl crate::Writable for RF_TOP_SPEC {
224 type Writer = W;
225 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
226 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
227}
228#[doc = "`reset()` method sets rf_top to value 0"]
229impl crate::Resettable for RF_TOP_SPEC {
230 const RESET_VALUE: Self::Ux = 0;
231}