bl602_pac/rf/
rfcal_stateen.rs

1#[doc = "Register `rfcal_stateen` reader"]
2pub struct R(crate::R<RFCAL_STATEEN_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<RFCAL_STATEEN_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<RFCAL_STATEEN_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<RFCAL_STATEEN_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `rfcal_stateen` writer"]
17pub struct W(crate::W<RFCAL_STATEEN_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<RFCAL_STATEEN_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<RFCAL_STATEEN_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<RFCAL_STATEEN_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `rcal_sten_resv` reader - "]
38pub type RCAL_STEN_RESV_R = crate::BitReader<bool>;
39#[doc = "Field `rcal_sten_resv` writer - "]
40pub type RCAL_STEN_RESV_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>;
41#[doc = "Field `adc_oscal_sten` reader - "]
42pub type ADC_OSCAL_STEN_R = crate::BitReader<bool>;
43#[doc = "Field `adc_oscal_sten` writer - "]
44pub type ADC_OSCAL_STEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>;
45#[doc = "Field `dl_rfcal_table_sten` reader - "]
46pub type DL_RFCAL_TABLE_STEN_R = crate::BitReader<bool>;
47#[doc = "Field `dl_rfcal_table_sten` writer - "]
48pub type DL_RFCAL_TABLE_STEN_W<'a, const O: u8> =
49    crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>;
50#[doc = "Field `fcal_sten` reader - "]
51pub type FCAL_STEN_R = crate::BitReader<bool>;
52#[doc = "Field `fcal_sten` writer - "]
53pub type FCAL_STEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>;
54#[doc = "Field `acal_sten` reader - "]
55pub type ACAL_STEN_R = crate::BitReader<bool>;
56#[doc = "Field `acal_sten` writer - "]
57pub type ACAL_STEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>;
58#[doc = "Field `inc_fcal_sten` reader - "]
59pub type INC_FCAL_STEN_R = crate::BitReader<bool>;
60#[doc = "Field `inc_fcal_sten` writer - "]
61pub type INC_FCAL_STEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>;
62#[doc = "Field `inc_acal_sten` reader - "]
63pub type INC_ACAL_STEN_R = crate::BitReader<bool>;
64#[doc = "Field `inc_acal_sten` writer - "]
65pub type INC_ACAL_STEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>;
66#[doc = "Field `clkpll_cal_sten` reader - "]
67pub type CLKPLL_CAL_STEN_R = crate::BitReader<bool>;
68#[doc = "Field `clkpll_cal_sten` writer - "]
69pub type CLKPLL_CAL_STEN_W<'a, const O: u8> =
70    crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>;
71#[doc = "Field `roscal_sten` reader - "]
72pub type ROSCAL_STEN_R = crate::BitReader<bool>;
73#[doc = "Field `roscal_sten` writer - "]
74pub type ROSCAL_STEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>;
75#[doc = "Field `toscal_sten_resv` reader - "]
76pub type TOSCAL_STEN_RESV_R = crate::BitReader<bool>;
77#[doc = "Field `toscal_sten_resv` writer - "]
78pub type TOSCAL_STEN_RESV_W<'a, const O: u8> =
79    crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>;
80#[doc = "Field `rccal_sten` reader - "]
81pub type RCCAL_STEN_R = crate::BitReader<bool>;
82#[doc = "Field `rccal_sten` writer - "]
83pub type RCCAL_STEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>;
84#[doc = "Field `lo_leakcal_sten` reader - "]
85pub type LO_LEAKCAL_STEN_R = crate::BitReader<bool>;
86#[doc = "Field `lo_leakcal_sten` writer - "]
87pub type LO_LEAKCAL_STEN_W<'a, const O: u8> =
88    crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>;
89#[doc = "Field `tiqcal_sten` reader - "]
90pub type TIQCAL_STEN_R = crate::BitReader<bool>;
91#[doc = "Field `tiqcal_sten` writer - "]
92pub type TIQCAL_STEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>;
93#[doc = "Field `riqcal_sten` reader - "]
94pub type RIQCAL_STEN_R = crate::BitReader<bool>;
95#[doc = "Field `riqcal_sten` writer - "]
96pub type RIQCAL_STEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>;
97#[doc = "Field `pwdet_cal_sten` reader - "]
98pub type PWDET_CAL_STEN_R = crate::BitReader<bool>;
99#[doc = "Field `pwdet_cal_sten` writer - "]
100pub type PWDET_CAL_STEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>;
101#[doc = "Field `tsencal_sten` reader - "]
102pub type TSENCAL_STEN_R = crate::BitReader<bool>;
103#[doc = "Field `tsencal_sten` writer - "]
104pub type TSENCAL_STEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>;
105#[doc = "Field `dpd_sten` reader - "]
106pub type DPD_STEN_R = crate::BitReader<bool>;
107#[doc = "Field `dpd_sten` writer - "]
108pub type DPD_STEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>;
109#[doc = "Field `rfcal_level` reader - "]
110pub type RFCAL_LEVEL_R = crate::FieldReader<u8, u8>;
111#[doc = "Field `rfcal_level` writer - "]
112pub type RFCAL_LEVEL_W<'a, const O: u8> =
113    crate::FieldWriter<'a, u32, RFCAL_STATEEN_SPEC, u8, u8, 2, O>;
114impl R {
115    #[doc = "Bit 0"]
116    #[inline(always)]
117    pub fn rcal_sten_resv(&self) -> RCAL_STEN_RESV_R {
118        RCAL_STEN_RESV_R::new((self.bits & 1) != 0)
119    }
120    #[doc = "Bit 1"]
121    #[inline(always)]
122    pub fn adc_oscal_sten(&self) -> ADC_OSCAL_STEN_R {
123        ADC_OSCAL_STEN_R::new(((self.bits >> 1) & 1) != 0)
124    }
125    #[doc = "Bit 2"]
126    #[inline(always)]
127    pub fn dl_rfcal_table_sten(&self) -> DL_RFCAL_TABLE_STEN_R {
128        DL_RFCAL_TABLE_STEN_R::new(((self.bits >> 2) & 1) != 0)
129    }
130    #[doc = "Bit 3"]
131    #[inline(always)]
132    pub fn fcal_sten(&self) -> FCAL_STEN_R {
133        FCAL_STEN_R::new(((self.bits >> 3) & 1) != 0)
134    }
135    #[doc = "Bit 4"]
136    #[inline(always)]
137    pub fn acal_sten(&self) -> ACAL_STEN_R {
138        ACAL_STEN_R::new(((self.bits >> 4) & 1) != 0)
139    }
140    #[doc = "Bit 5"]
141    #[inline(always)]
142    pub fn inc_fcal_sten(&self) -> INC_FCAL_STEN_R {
143        INC_FCAL_STEN_R::new(((self.bits >> 5) & 1) != 0)
144    }
145    #[doc = "Bit 6"]
146    #[inline(always)]
147    pub fn inc_acal_sten(&self) -> INC_ACAL_STEN_R {
148        INC_ACAL_STEN_R::new(((self.bits >> 6) & 1) != 0)
149    }
150    #[doc = "Bit 7"]
151    #[inline(always)]
152    pub fn clkpll_cal_sten(&self) -> CLKPLL_CAL_STEN_R {
153        CLKPLL_CAL_STEN_R::new(((self.bits >> 7) & 1) != 0)
154    }
155    #[doc = "Bit 8"]
156    #[inline(always)]
157    pub fn roscal_sten(&self) -> ROSCAL_STEN_R {
158        ROSCAL_STEN_R::new(((self.bits >> 8) & 1) != 0)
159    }
160    #[doc = "Bit 9"]
161    #[inline(always)]
162    pub fn toscal_sten_resv(&self) -> TOSCAL_STEN_RESV_R {
163        TOSCAL_STEN_RESV_R::new(((self.bits >> 9) & 1) != 0)
164    }
165    #[doc = "Bit 10"]
166    #[inline(always)]
167    pub fn rccal_sten(&self) -> RCCAL_STEN_R {
168        RCCAL_STEN_R::new(((self.bits >> 10) & 1) != 0)
169    }
170    #[doc = "Bit 11"]
171    #[inline(always)]
172    pub fn lo_leakcal_sten(&self) -> LO_LEAKCAL_STEN_R {
173        LO_LEAKCAL_STEN_R::new(((self.bits >> 11) & 1) != 0)
174    }
175    #[doc = "Bit 12"]
176    #[inline(always)]
177    pub fn tiqcal_sten(&self) -> TIQCAL_STEN_R {
178        TIQCAL_STEN_R::new(((self.bits >> 12) & 1) != 0)
179    }
180    #[doc = "Bit 13"]
181    #[inline(always)]
182    pub fn riqcal_sten(&self) -> RIQCAL_STEN_R {
183        RIQCAL_STEN_R::new(((self.bits >> 13) & 1) != 0)
184    }
185    #[doc = "Bit 14"]
186    #[inline(always)]
187    pub fn pwdet_cal_sten(&self) -> PWDET_CAL_STEN_R {
188        PWDET_CAL_STEN_R::new(((self.bits >> 14) & 1) != 0)
189    }
190    #[doc = "Bit 15"]
191    #[inline(always)]
192    pub fn tsencal_sten(&self) -> TSENCAL_STEN_R {
193        TSENCAL_STEN_R::new(((self.bits >> 15) & 1) != 0)
194    }
195    #[doc = "Bit 16"]
196    #[inline(always)]
197    pub fn dpd_sten(&self) -> DPD_STEN_R {
198        DPD_STEN_R::new(((self.bits >> 16) & 1) != 0)
199    }
200    #[doc = "Bits 30:31"]
201    #[inline(always)]
202    pub fn rfcal_level(&self) -> RFCAL_LEVEL_R {
203        RFCAL_LEVEL_R::new(((self.bits >> 30) & 3) as u8)
204    }
205}
206impl W {
207    #[doc = "Bit 0"]
208    #[inline(always)]
209    #[must_use]
210    pub fn rcal_sten_resv(&mut self) -> RCAL_STEN_RESV_W<0> {
211        RCAL_STEN_RESV_W::new(self)
212    }
213    #[doc = "Bit 1"]
214    #[inline(always)]
215    #[must_use]
216    pub fn adc_oscal_sten(&mut self) -> ADC_OSCAL_STEN_W<1> {
217        ADC_OSCAL_STEN_W::new(self)
218    }
219    #[doc = "Bit 2"]
220    #[inline(always)]
221    #[must_use]
222    pub fn dl_rfcal_table_sten(&mut self) -> DL_RFCAL_TABLE_STEN_W<2> {
223        DL_RFCAL_TABLE_STEN_W::new(self)
224    }
225    #[doc = "Bit 3"]
226    #[inline(always)]
227    #[must_use]
228    pub fn fcal_sten(&mut self) -> FCAL_STEN_W<3> {
229        FCAL_STEN_W::new(self)
230    }
231    #[doc = "Bit 4"]
232    #[inline(always)]
233    #[must_use]
234    pub fn acal_sten(&mut self) -> ACAL_STEN_W<4> {
235        ACAL_STEN_W::new(self)
236    }
237    #[doc = "Bit 5"]
238    #[inline(always)]
239    #[must_use]
240    pub fn inc_fcal_sten(&mut self) -> INC_FCAL_STEN_W<5> {
241        INC_FCAL_STEN_W::new(self)
242    }
243    #[doc = "Bit 6"]
244    #[inline(always)]
245    #[must_use]
246    pub fn inc_acal_sten(&mut self) -> INC_ACAL_STEN_W<6> {
247        INC_ACAL_STEN_W::new(self)
248    }
249    #[doc = "Bit 7"]
250    #[inline(always)]
251    #[must_use]
252    pub fn clkpll_cal_sten(&mut self) -> CLKPLL_CAL_STEN_W<7> {
253        CLKPLL_CAL_STEN_W::new(self)
254    }
255    #[doc = "Bit 8"]
256    #[inline(always)]
257    #[must_use]
258    pub fn roscal_sten(&mut self) -> ROSCAL_STEN_W<8> {
259        ROSCAL_STEN_W::new(self)
260    }
261    #[doc = "Bit 9"]
262    #[inline(always)]
263    #[must_use]
264    pub fn toscal_sten_resv(&mut self) -> TOSCAL_STEN_RESV_W<9> {
265        TOSCAL_STEN_RESV_W::new(self)
266    }
267    #[doc = "Bit 10"]
268    #[inline(always)]
269    #[must_use]
270    pub fn rccal_sten(&mut self) -> RCCAL_STEN_W<10> {
271        RCCAL_STEN_W::new(self)
272    }
273    #[doc = "Bit 11"]
274    #[inline(always)]
275    #[must_use]
276    pub fn lo_leakcal_sten(&mut self) -> LO_LEAKCAL_STEN_W<11> {
277        LO_LEAKCAL_STEN_W::new(self)
278    }
279    #[doc = "Bit 12"]
280    #[inline(always)]
281    #[must_use]
282    pub fn tiqcal_sten(&mut self) -> TIQCAL_STEN_W<12> {
283        TIQCAL_STEN_W::new(self)
284    }
285    #[doc = "Bit 13"]
286    #[inline(always)]
287    #[must_use]
288    pub fn riqcal_sten(&mut self) -> RIQCAL_STEN_W<13> {
289        RIQCAL_STEN_W::new(self)
290    }
291    #[doc = "Bit 14"]
292    #[inline(always)]
293    #[must_use]
294    pub fn pwdet_cal_sten(&mut self) -> PWDET_CAL_STEN_W<14> {
295        PWDET_CAL_STEN_W::new(self)
296    }
297    #[doc = "Bit 15"]
298    #[inline(always)]
299    #[must_use]
300    pub fn tsencal_sten(&mut self) -> TSENCAL_STEN_W<15> {
301        TSENCAL_STEN_W::new(self)
302    }
303    #[doc = "Bit 16"]
304    #[inline(always)]
305    #[must_use]
306    pub fn dpd_sten(&mut self) -> DPD_STEN_W<16> {
307        DPD_STEN_W::new(self)
308    }
309    #[doc = "Bits 30:31"]
310    #[inline(always)]
311    #[must_use]
312    pub fn rfcal_level(&mut self) -> RFCAL_LEVEL_W<30> {
313        RFCAL_LEVEL_W::new(self)
314    }
315    #[doc = "Writes raw bits to the register."]
316    #[inline(always)]
317    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
318        self.0.bits(bits);
319        self
320    }
321}
322#[doc = "rf calibration state enabl in full cal list\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 [rfcal_stateen](index.html) module"]
323pub struct RFCAL_STATEEN_SPEC;
324impl crate::RegisterSpec for RFCAL_STATEEN_SPEC {
325    type Ux = u32;
326}
327#[doc = "`read()` method returns [rfcal_stateen::R](R) reader structure"]
328impl crate::Readable for RFCAL_STATEEN_SPEC {
329    type Reader = R;
330}
331#[doc = "`write(|w| ..)` method takes [rfcal_stateen::W](W) writer structure"]
332impl crate::Writable for RFCAL_STATEEN_SPEC {
333    type Writer = W;
334    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
335    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
336}
337#[doc = "`reset()` method sets rfcal_stateen to value 0"]
338impl crate::Resettable for RFCAL_STATEEN_SPEC {
339    const RESET_VALUE: Self::Ux = 0;
340}