bl602_pac/rf/
pucr1_hw.rs

1#[doc = "Register `pucr1_hw` reader"]
2pub struct R(crate::R<PUCR1_HW_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<PUCR1_HW_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<PUCR1_HW_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<PUCR1_HW_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `pucr1_hw` writer"]
17pub struct W(crate::W<PUCR1_HW_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<PUCR1_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<PUCR1_HW_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<PUCR1_HW_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `pu_sfreg_hw` reader - "]
38pub type PU_SFREG_HW_R = crate::BitReader<bool>;
39#[doc = "Field `pu_sfreg_hw` writer - "]
40pub type PU_SFREG_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>;
41#[doc = "Field `pu_lna_hw` reader - "]
42pub type PU_LNA_HW_R = crate::BitReader<bool>;
43#[doc = "Field `pu_lna_hw` writer - "]
44pub type PU_LNA_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>;
45#[doc = "Field `pu_rmxgm_hw` reader - "]
46pub type PU_RMXGM_HW_R = crate::BitReader<bool>;
47#[doc = "Field `pu_rmxgm_hw` writer - "]
48pub type PU_RMXGM_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>;
49#[doc = "Field `pu_rmx_hw` reader - "]
50pub type PU_RMX_HW_R = crate::BitReader<bool>;
51#[doc = "Field `pu_rmx_hw` writer - "]
52pub type PU_RMX_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>;
53#[doc = "Field `pu_rbb_hw` reader - "]
54pub type PU_RBB_HW_R = crate::BitReader<bool>;
55#[doc = "Field `pu_rbb_hw` writer - "]
56pub type PU_RBB_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>;
57#[doc = "Field `pu_adda_ldo_hw` reader - "]
58pub type PU_ADDA_LDO_HW_R = crate::BitReader<bool>;
59#[doc = "Field `pu_adda_ldo_hw` writer - "]
60pub type PU_ADDA_LDO_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>;
61#[doc = "Field `adc_clk_en_hw` reader - "]
62pub type ADC_CLK_EN_HW_R = crate::BitReader<bool>;
63#[doc = "Field `adc_clk_en_hw` writer - "]
64pub type ADC_CLK_EN_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>;
65#[doc = "Field `pu_adc_hw` reader - "]
66pub type PU_ADC_HW_R = crate::BitReader<bool>;
67#[doc = "Field `pu_adc_hw` writer - "]
68pub type PU_ADC_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>;
69#[doc = "Field `pu_pa_hw` reader - "]
70pub type PU_PA_HW_R = crate::BitReader<bool>;
71#[doc = "Field `pu_pa_hw` writer - "]
72pub type PU_PA_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>;
73#[doc = "Field `pu_tmx_hw` reader - "]
74pub type PU_TMX_HW_R = crate::BitReader<bool>;
75#[doc = "Field `pu_tmx_hw` writer - "]
76pub type PU_TMX_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>;
77#[doc = "Field `pu_tbb_hw` reader - "]
78pub type PU_TBB_HW_R = crate::BitReader<bool>;
79#[doc = "Field `pu_tbb_hw` writer - "]
80pub type PU_TBB_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>;
81#[doc = "Field `pu_dac_hw` reader - "]
82pub type PU_DAC_HW_R = crate::BitReader<bool>;
83#[doc = "Field `pu_dac_hw` writer - "]
84pub type PU_DAC_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>;
85#[doc = "Field `pu_vco_hw` reader - "]
86pub type PU_VCO_HW_R = crate::BitReader<bool>;
87#[doc = "Field `pu_vco_hw` writer - "]
88pub type PU_VCO_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>;
89#[doc = "Field `pu_fbdv_hw` reader - "]
90pub type PU_FBDV_HW_R = crate::BitReader<bool>;
91#[doc = "Field `pu_fbdv_hw` writer - "]
92pub type PU_FBDV_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>;
93#[doc = "Field `pu_pfd_hw` reader - "]
94pub type PU_PFD_HW_R = crate::BitReader<bool>;
95#[doc = "Field `pu_pfd_hw` writer - "]
96pub type PU_PFD_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>;
97#[doc = "Field `pu_osmx_hw` reader - "]
98pub type PU_OSMX_HW_R = crate::BitReader<bool>;
99#[doc = "Field `pu_osmx_hw` writer - "]
100pub type PU_OSMX_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>;
101#[doc = "Field `pu_rxbuf_hw` reader - "]
102pub type PU_RXBUF_HW_R = crate::BitReader<bool>;
103#[doc = "Field `pu_rxbuf_hw` writer - "]
104pub type PU_RXBUF_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>;
105#[doc = "Field `pu_txbuf_hw` reader - "]
106pub type PU_TXBUF_HW_R = crate::BitReader<bool>;
107#[doc = "Field `pu_txbuf_hw` writer - "]
108pub type PU_TXBUF_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>;
109#[doc = "Field `trsw_en_hw` reader - "]
110pub type TRSW_EN_HW_R = crate::BitReader<bool>;
111#[doc = "Field `trsw_en_hw` writer - "]
112pub type TRSW_EN_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>;
113#[doc = "Field `pu_pkdet_hw` reader - "]
114pub type PU_PKDET_HW_R = crate::BitReader<bool>;
115#[doc = "Field `pu_pkdet_hw` writer - "]
116pub type PU_PKDET_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>;
117#[doc = "Field `pu_rosdac_hw` reader - "]
118pub type PU_ROSDAC_HW_R = crate::BitReader<bool>;
119#[doc = "Field `pu_rosdac_hw` writer - "]
120pub type PU_ROSDAC_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>;
121#[doc = "Field `pu_tosdac_hw` reader - "]
122pub type PU_TOSDAC_HW_R = crate::BitReader<bool>;
123#[doc = "Field `pu_tosdac_hw` writer - "]
124pub type PU_TOSDAC_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>;
125impl R {
126    #[doc = "Bit 0"]
127    #[inline(always)]
128    pub fn pu_sfreg_hw(&self) -> PU_SFREG_HW_R {
129        PU_SFREG_HW_R::new((self.bits & 1) != 0)
130    }
131    #[doc = "Bit 8"]
132    #[inline(always)]
133    pub fn pu_lna_hw(&self) -> PU_LNA_HW_R {
134        PU_LNA_HW_R::new(((self.bits >> 8) & 1) != 0)
135    }
136    #[doc = "Bit 9"]
137    #[inline(always)]
138    pub fn pu_rmxgm_hw(&self) -> PU_RMXGM_HW_R {
139        PU_RMXGM_HW_R::new(((self.bits >> 9) & 1) != 0)
140    }
141    #[doc = "Bit 10"]
142    #[inline(always)]
143    pub fn pu_rmx_hw(&self) -> PU_RMX_HW_R {
144        PU_RMX_HW_R::new(((self.bits >> 10) & 1) != 0)
145    }
146    #[doc = "Bit 11"]
147    #[inline(always)]
148    pub fn pu_rbb_hw(&self) -> PU_RBB_HW_R {
149        PU_RBB_HW_R::new(((self.bits >> 11) & 1) != 0)
150    }
151    #[doc = "Bit 12"]
152    #[inline(always)]
153    pub fn pu_adda_ldo_hw(&self) -> PU_ADDA_LDO_HW_R {
154        PU_ADDA_LDO_HW_R::new(((self.bits >> 12) & 1) != 0)
155    }
156    #[doc = "Bit 13"]
157    #[inline(always)]
158    pub fn adc_clk_en_hw(&self) -> ADC_CLK_EN_HW_R {
159        ADC_CLK_EN_HW_R::new(((self.bits >> 13) & 1) != 0)
160    }
161    #[doc = "Bit 14"]
162    #[inline(always)]
163    pub fn pu_adc_hw(&self) -> PU_ADC_HW_R {
164        PU_ADC_HW_R::new(((self.bits >> 14) & 1) != 0)
165    }
166    #[doc = "Bit 16"]
167    #[inline(always)]
168    pub fn pu_pa_hw(&self) -> PU_PA_HW_R {
169        PU_PA_HW_R::new(((self.bits >> 16) & 1) != 0)
170    }
171    #[doc = "Bit 17"]
172    #[inline(always)]
173    pub fn pu_tmx_hw(&self) -> PU_TMX_HW_R {
174        PU_TMX_HW_R::new(((self.bits >> 17) & 1) != 0)
175    }
176    #[doc = "Bit 18"]
177    #[inline(always)]
178    pub fn pu_tbb_hw(&self) -> PU_TBB_HW_R {
179        PU_TBB_HW_R::new(((self.bits >> 18) & 1) != 0)
180    }
181    #[doc = "Bit 19"]
182    #[inline(always)]
183    pub fn pu_dac_hw(&self) -> PU_DAC_HW_R {
184        PU_DAC_HW_R::new(((self.bits >> 19) & 1) != 0)
185    }
186    #[doc = "Bit 20"]
187    #[inline(always)]
188    pub fn pu_vco_hw(&self) -> PU_VCO_HW_R {
189        PU_VCO_HW_R::new(((self.bits >> 20) & 1) != 0)
190    }
191    #[doc = "Bit 21"]
192    #[inline(always)]
193    pub fn pu_fbdv_hw(&self) -> PU_FBDV_HW_R {
194        PU_FBDV_HW_R::new(((self.bits >> 21) & 1) != 0)
195    }
196    #[doc = "Bit 22"]
197    #[inline(always)]
198    pub fn pu_pfd_hw(&self) -> PU_PFD_HW_R {
199        PU_PFD_HW_R::new(((self.bits >> 22) & 1) != 0)
200    }
201    #[doc = "Bit 23"]
202    #[inline(always)]
203    pub fn pu_osmx_hw(&self) -> PU_OSMX_HW_R {
204        PU_OSMX_HW_R::new(((self.bits >> 23) & 1) != 0)
205    }
206    #[doc = "Bit 24"]
207    #[inline(always)]
208    pub fn pu_rxbuf_hw(&self) -> PU_RXBUF_HW_R {
209        PU_RXBUF_HW_R::new(((self.bits >> 24) & 1) != 0)
210    }
211    #[doc = "Bit 25"]
212    #[inline(always)]
213    pub fn pu_txbuf_hw(&self) -> PU_TXBUF_HW_R {
214        PU_TXBUF_HW_R::new(((self.bits >> 25) & 1) != 0)
215    }
216    #[doc = "Bit 26"]
217    #[inline(always)]
218    pub fn trsw_en_hw(&self) -> TRSW_EN_HW_R {
219        TRSW_EN_HW_R::new(((self.bits >> 26) & 1) != 0)
220    }
221    #[doc = "Bit 28"]
222    #[inline(always)]
223    pub fn pu_pkdet_hw(&self) -> PU_PKDET_HW_R {
224        PU_PKDET_HW_R::new(((self.bits >> 28) & 1) != 0)
225    }
226    #[doc = "Bit 29"]
227    #[inline(always)]
228    pub fn pu_rosdac_hw(&self) -> PU_ROSDAC_HW_R {
229        PU_ROSDAC_HW_R::new(((self.bits >> 29) & 1) != 0)
230    }
231    #[doc = "Bit 31"]
232    #[inline(always)]
233    pub fn pu_tosdac_hw(&self) -> PU_TOSDAC_HW_R {
234        PU_TOSDAC_HW_R::new(((self.bits >> 31) & 1) != 0)
235    }
236}
237impl W {
238    #[doc = "Bit 0"]
239    #[inline(always)]
240    #[must_use]
241    pub fn pu_sfreg_hw(&mut self) -> PU_SFREG_HW_W<0> {
242        PU_SFREG_HW_W::new(self)
243    }
244    #[doc = "Bit 8"]
245    #[inline(always)]
246    #[must_use]
247    pub fn pu_lna_hw(&mut self) -> PU_LNA_HW_W<8> {
248        PU_LNA_HW_W::new(self)
249    }
250    #[doc = "Bit 9"]
251    #[inline(always)]
252    #[must_use]
253    pub fn pu_rmxgm_hw(&mut self) -> PU_RMXGM_HW_W<9> {
254        PU_RMXGM_HW_W::new(self)
255    }
256    #[doc = "Bit 10"]
257    #[inline(always)]
258    #[must_use]
259    pub fn pu_rmx_hw(&mut self) -> PU_RMX_HW_W<10> {
260        PU_RMX_HW_W::new(self)
261    }
262    #[doc = "Bit 11"]
263    #[inline(always)]
264    #[must_use]
265    pub fn pu_rbb_hw(&mut self) -> PU_RBB_HW_W<11> {
266        PU_RBB_HW_W::new(self)
267    }
268    #[doc = "Bit 12"]
269    #[inline(always)]
270    #[must_use]
271    pub fn pu_adda_ldo_hw(&mut self) -> PU_ADDA_LDO_HW_W<12> {
272        PU_ADDA_LDO_HW_W::new(self)
273    }
274    #[doc = "Bit 13"]
275    #[inline(always)]
276    #[must_use]
277    pub fn adc_clk_en_hw(&mut self) -> ADC_CLK_EN_HW_W<13> {
278        ADC_CLK_EN_HW_W::new(self)
279    }
280    #[doc = "Bit 14"]
281    #[inline(always)]
282    #[must_use]
283    pub fn pu_adc_hw(&mut self) -> PU_ADC_HW_W<14> {
284        PU_ADC_HW_W::new(self)
285    }
286    #[doc = "Bit 16"]
287    #[inline(always)]
288    #[must_use]
289    pub fn pu_pa_hw(&mut self) -> PU_PA_HW_W<16> {
290        PU_PA_HW_W::new(self)
291    }
292    #[doc = "Bit 17"]
293    #[inline(always)]
294    #[must_use]
295    pub fn pu_tmx_hw(&mut self) -> PU_TMX_HW_W<17> {
296        PU_TMX_HW_W::new(self)
297    }
298    #[doc = "Bit 18"]
299    #[inline(always)]
300    #[must_use]
301    pub fn pu_tbb_hw(&mut self) -> PU_TBB_HW_W<18> {
302        PU_TBB_HW_W::new(self)
303    }
304    #[doc = "Bit 19"]
305    #[inline(always)]
306    #[must_use]
307    pub fn pu_dac_hw(&mut self) -> PU_DAC_HW_W<19> {
308        PU_DAC_HW_W::new(self)
309    }
310    #[doc = "Bit 20"]
311    #[inline(always)]
312    #[must_use]
313    pub fn pu_vco_hw(&mut self) -> PU_VCO_HW_W<20> {
314        PU_VCO_HW_W::new(self)
315    }
316    #[doc = "Bit 21"]
317    #[inline(always)]
318    #[must_use]
319    pub fn pu_fbdv_hw(&mut self) -> PU_FBDV_HW_W<21> {
320        PU_FBDV_HW_W::new(self)
321    }
322    #[doc = "Bit 22"]
323    #[inline(always)]
324    #[must_use]
325    pub fn pu_pfd_hw(&mut self) -> PU_PFD_HW_W<22> {
326        PU_PFD_HW_W::new(self)
327    }
328    #[doc = "Bit 23"]
329    #[inline(always)]
330    #[must_use]
331    pub fn pu_osmx_hw(&mut self) -> PU_OSMX_HW_W<23> {
332        PU_OSMX_HW_W::new(self)
333    }
334    #[doc = "Bit 24"]
335    #[inline(always)]
336    #[must_use]
337    pub fn pu_rxbuf_hw(&mut self) -> PU_RXBUF_HW_W<24> {
338        PU_RXBUF_HW_W::new(self)
339    }
340    #[doc = "Bit 25"]
341    #[inline(always)]
342    #[must_use]
343    pub fn pu_txbuf_hw(&mut self) -> PU_TXBUF_HW_W<25> {
344        PU_TXBUF_HW_W::new(self)
345    }
346    #[doc = "Bit 26"]
347    #[inline(always)]
348    #[must_use]
349    pub fn trsw_en_hw(&mut self) -> TRSW_EN_HW_W<26> {
350        TRSW_EN_HW_W::new(self)
351    }
352    #[doc = "Bit 28"]
353    #[inline(always)]
354    #[must_use]
355    pub fn pu_pkdet_hw(&mut self) -> PU_PKDET_HW_W<28> {
356        PU_PKDET_HW_W::new(self)
357    }
358    #[doc = "Bit 29"]
359    #[inline(always)]
360    #[must_use]
361    pub fn pu_rosdac_hw(&mut self) -> PU_ROSDAC_HW_W<29> {
362        PU_ROSDAC_HW_W::new(self)
363    }
364    #[doc = "Bit 31"]
365    #[inline(always)]
366    #[must_use]
367    pub fn pu_tosdac_hw(&mut self) -> PU_TOSDAC_HW_W<31> {
368        PU_TOSDAC_HW_W::new(self)
369    }
370    #[doc = "Writes raw bits to the register."]
371    #[inline(always)]
372    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
373        self.0.bits(bits);
374        self
375    }
376}
377#[doc = "read only from hardware logic\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 [pucr1_hw](index.html) module"]
378pub struct PUCR1_HW_SPEC;
379impl crate::RegisterSpec for PUCR1_HW_SPEC {
380    type Ux = u32;
381}
382#[doc = "`read()` method returns [pucr1_hw::R](R) reader structure"]
383impl crate::Readable for PUCR1_HW_SPEC {
384    type Reader = R;
385}
386#[doc = "`write(|w| ..)` method takes [pucr1_hw::W](W) writer structure"]
387impl crate::Writable for PUCR1_HW_SPEC {
388    type Writer = W;
389    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
390    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
391}
392#[doc = "`reset()` method sets pucr1_hw to value 0"]
393impl crate::Resettable for PUCR1_HW_SPEC {
394    const RESET_VALUE: Self::Ux = 0;
395}