bl602_pac/rf/
rfcal_ctrlen.rs

1#[doc = "Register `rfcal_ctrlen` reader"]
2pub struct R(crate::R<RFCAL_CTRLEN_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<RFCAL_CTRLEN_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<RFCAL_CTRLEN_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<RFCAL_CTRLEN_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `rfcal_ctrlen` writer"]
17pub struct W(crate::W<RFCAL_CTRLEN_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<RFCAL_CTRLEN_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_CTRLEN_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<RFCAL_CTRLEN_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `rcal_en_resv` reader - "]
38pub type RCAL_EN_RESV_R = crate::BitReader<bool>;
39#[doc = "Field `rcal_en_resv` writer - "]
40pub type RCAL_EN_RESV_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>;
41#[doc = "Field `adc_oscal_en` reader - "]
42pub type ADC_OSCAL_EN_R = crate::BitReader<bool>;
43#[doc = "Field `adc_oscal_en` writer - "]
44pub type ADC_OSCAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>;
45#[doc = "Field `dl_rfcal_table_en` reader - "]
46pub type DL_RFCAL_TABLE_EN_R = crate::BitReader<bool>;
47#[doc = "Field `dl_rfcal_table_en` writer - "]
48pub type DL_RFCAL_TABLE_EN_W<'a, const O: u8> =
49    crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>;
50#[doc = "Field `fcal_en` reader - "]
51pub type FCAL_EN_R = crate::BitReader<bool>;
52#[doc = "Field `fcal_en` writer - "]
53pub type FCAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>;
54#[doc = "Field `acal_en` reader - "]
55pub type ACAL_EN_R = crate::BitReader<bool>;
56#[doc = "Field `acal_en` writer - "]
57pub type ACAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>;
58#[doc = "Field `fcal_inc_en` reader - "]
59pub type FCAL_INC_EN_R = crate::BitReader<bool>;
60#[doc = "Field `fcal_inc_en` writer - "]
61pub type FCAL_INC_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>;
62#[doc = "Field `acal_inc_en` reader - "]
63pub type ACAL_INC_EN_R = crate::BitReader<bool>;
64#[doc = "Field `acal_inc_en` writer - "]
65pub type ACAL_INC_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>;
66#[doc = "Field `roscal_inc_en` reader - "]
67pub type ROSCAL_INC_EN_R = crate::BitReader<bool>;
68#[doc = "Field `roscal_inc_en` writer - "]
69pub type ROSCAL_INC_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>;
70#[doc = "Field `clkpll_cal_en` reader - "]
71pub type CLKPLL_CAL_EN_R = crate::BitReader<bool>;
72#[doc = "Field `clkpll_cal_en` writer - "]
73pub type CLKPLL_CAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>;
74#[doc = "Field `roscal_en` reader - "]
75pub type ROSCAL_EN_R = crate::BitReader<bool>;
76#[doc = "Field `roscal_en` writer - "]
77pub type ROSCAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>;
78#[doc = "Field `toscal_en` reader - "]
79pub type TOSCAL_EN_R = crate::BitReader<bool>;
80#[doc = "Field `toscal_en` writer - "]
81pub type TOSCAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>;
82#[doc = "Field `rccal_en` reader - "]
83pub type RCCAL_EN_R = crate::BitReader<bool>;
84#[doc = "Field `rccal_en` writer - "]
85pub type RCCAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>;
86#[doc = "Field `lo_leakcal_en` reader - "]
87pub type LO_LEAKCAL_EN_R = crate::BitReader<bool>;
88#[doc = "Field `lo_leakcal_en` writer - "]
89pub type LO_LEAKCAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>;
90#[doc = "Field `tiqcal_en` reader - "]
91pub type TIQCAL_EN_R = crate::BitReader<bool>;
92#[doc = "Field `tiqcal_en` writer - "]
93pub type TIQCAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>;
94#[doc = "Field `riqcal_en` reader - "]
95pub type RIQCAL_EN_R = crate::BitReader<bool>;
96#[doc = "Field `riqcal_en` writer - "]
97pub type RIQCAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>;
98#[doc = "Field `pwdet_cal_en` reader - "]
99pub type PWDET_CAL_EN_R = crate::BitReader<bool>;
100#[doc = "Field `pwdet_cal_en` writer - "]
101pub type PWDET_CAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>;
102#[doc = "Field `tsencal_en` reader - "]
103pub type TSENCAL_EN_R = crate::BitReader<bool>;
104#[doc = "Field `tsencal_en` writer - "]
105pub type TSENCAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>;
106#[doc = "Field `dpd_en` reader - "]
107pub type DPD_EN_R = crate::BitReader<bool>;
108#[doc = "Field `dpd_en` writer - "]
109pub type DPD_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>;
110impl R {
111    #[doc = "Bit 0"]
112    #[inline(always)]
113    pub fn rcal_en_resv(&self) -> RCAL_EN_RESV_R {
114        RCAL_EN_RESV_R::new((self.bits & 1) != 0)
115    }
116    #[doc = "Bit 1"]
117    #[inline(always)]
118    pub fn adc_oscal_en(&self) -> ADC_OSCAL_EN_R {
119        ADC_OSCAL_EN_R::new(((self.bits >> 1) & 1) != 0)
120    }
121    #[doc = "Bit 2"]
122    #[inline(always)]
123    pub fn dl_rfcal_table_en(&self) -> DL_RFCAL_TABLE_EN_R {
124        DL_RFCAL_TABLE_EN_R::new(((self.bits >> 2) & 1) != 0)
125    }
126    #[doc = "Bit 3"]
127    #[inline(always)]
128    pub fn fcal_en(&self) -> FCAL_EN_R {
129        FCAL_EN_R::new(((self.bits >> 3) & 1) != 0)
130    }
131    #[doc = "Bit 4"]
132    #[inline(always)]
133    pub fn acal_en(&self) -> ACAL_EN_R {
134        ACAL_EN_R::new(((self.bits >> 4) & 1) != 0)
135    }
136    #[doc = "Bit 5"]
137    #[inline(always)]
138    pub fn fcal_inc_en(&self) -> FCAL_INC_EN_R {
139        FCAL_INC_EN_R::new(((self.bits >> 5) & 1) != 0)
140    }
141    #[doc = "Bit 6"]
142    #[inline(always)]
143    pub fn acal_inc_en(&self) -> ACAL_INC_EN_R {
144        ACAL_INC_EN_R::new(((self.bits >> 6) & 1) != 0)
145    }
146    #[doc = "Bit 7"]
147    #[inline(always)]
148    pub fn roscal_inc_en(&self) -> ROSCAL_INC_EN_R {
149        ROSCAL_INC_EN_R::new(((self.bits >> 7) & 1) != 0)
150    }
151    #[doc = "Bit 8"]
152    #[inline(always)]
153    pub fn clkpll_cal_en(&self) -> CLKPLL_CAL_EN_R {
154        CLKPLL_CAL_EN_R::new(((self.bits >> 8) & 1) != 0)
155    }
156    #[doc = "Bit 9"]
157    #[inline(always)]
158    pub fn roscal_en(&self) -> ROSCAL_EN_R {
159        ROSCAL_EN_R::new(((self.bits >> 9) & 1) != 0)
160    }
161    #[doc = "Bit 10"]
162    #[inline(always)]
163    pub fn toscal_en(&self) -> TOSCAL_EN_R {
164        TOSCAL_EN_R::new(((self.bits >> 10) & 1) != 0)
165    }
166    #[doc = "Bit 11"]
167    #[inline(always)]
168    pub fn rccal_en(&self) -> RCCAL_EN_R {
169        RCCAL_EN_R::new(((self.bits >> 11) & 1) != 0)
170    }
171    #[doc = "Bit 12"]
172    #[inline(always)]
173    pub fn lo_leakcal_en(&self) -> LO_LEAKCAL_EN_R {
174        LO_LEAKCAL_EN_R::new(((self.bits >> 12) & 1) != 0)
175    }
176    #[doc = "Bit 13"]
177    #[inline(always)]
178    pub fn tiqcal_en(&self) -> TIQCAL_EN_R {
179        TIQCAL_EN_R::new(((self.bits >> 13) & 1) != 0)
180    }
181    #[doc = "Bit 14"]
182    #[inline(always)]
183    pub fn riqcal_en(&self) -> RIQCAL_EN_R {
184        RIQCAL_EN_R::new(((self.bits >> 14) & 1) != 0)
185    }
186    #[doc = "Bit 15"]
187    #[inline(always)]
188    pub fn pwdet_cal_en(&self) -> PWDET_CAL_EN_R {
189        PWDET_CAL_EN_R::new(((self.bits >> 15) & 1) != 0)
190    }
191    #[doc = "Bit 16"]
192    #[inline(always)]
193    pub fn tsencal_en(&self) -> TSENCAL_EN_R {
194        TSENCAL_EN_R::new(((self.bits >> 16) & 1) != 0)
195    }
196    #[doc = "Bit 17"]
197    #[inline(always)]
198    pub fn dpd_en(&self) -> DPD_EN_R {
199        DPD_EN_R::new(((self.bits >> 17) & 1) != 0)
200    }
201}
202impl W {
203    #[doc = "Bit 0"]
204    #[inline(always)]
205    #[must_use]
206    pub fn rcal_en_resv(&mut self) -> RCAL_EN_RESV_W<0> {
207        RCAL_EN_RESV_W::new(self)
208    }
209    #[doc = "Bit 1"]
210    #[inline(always)]
211    #[must_use]
212    pub fn adc_oscal_en(&mut self) -> ADC_OSCAL_EN_W<1> {
213        ADC_OSCAL_EN_W::new(self)
214    }
215    #[doc = "Bit 2"]
216    #[inline(always)]
217    #[must_use]
218    pub fn dl_rfcal_table_en(&mut self) -> DL_RFCAL_TABLE_EN_W<2> {
219        DL_RFCAL_TABLE_EN_W::new(self)
220    }
221    #[doc = "Bit 3"]
222    #[inline(always)]
223    #[must_use]
224    pub fn fcal_en(&mut self) -> FCAL_EN_W<3> {
225        FCAL_EN_W::new(self)
226    }
227    #[doc = "Bit 4"]
228    #[inline(always)]
229    #[must_use]
230    pub fn acal_en(&mut self) -> ACAL_EN_W<4> {
231        ACAL_EN_W::new(self)
232    }
233    #[doc = "Bit 5"]
234    #[inline(always)]
235    #[must_use]
236    pub fn fcal_inc_en(&mut self) -> FCAL_INC_EN_W<5> {
237        FCAL_INC_EN_W::new(self)
238    }
239    #[doc = "Bit 6"]
240    #[inline(always)]
241    #[must_use]
242    pub fn acal_inc_en(&mut self) -> ACAL_INC_EN_W<6> {
243        ACAL_INC_EN_W::new(self)
244    }
245    #[doc = "Bit 7"]
246    #[inline(always)]
247    #[must_use]
248    pub fn roscal_inc_en(&mut self) -> ROSCAL_INC_EN_W<7> {
249        ROSCAL_INC_EN_W::new(self)
250    }
251    #[doc = "Bit 8"]
252    #[inline(always)]
253    #[must_use]
254    pub fn clkpll_cal_en(&mut self) -> CLKPLL_CAL_EN_W<8> {
255        CLKPLL_CAL_EN_W::new(self)
256    }
257    #[doc = "Bit 9"]
258    #[inline(always)]
259    #[must_use]
260    pub fn roscal_en(&mut self) -> ROSCAL_EN_W<9> {
261        ROSCAL_EN_W::new(self)
262    }
263    #[doc = "Bit 10"]
264    #[inline(always)]
265    #[must_use]
266    pub fn toscal_en(&mut self) -> TOSCAL_EN_W<10> {
267        TOSCAL_EN_W::new(self)
268    }
269    #[doc = "Bit 11"]
270    #[inline(always)]
271    #[must_use]
272    pub fn rccal_en(&mut self) -> RCCAL_EN_W<11> {
273        RCCAL_EN_W::new(self)
274    }
275    #[doc = "Bit 12"]
276    #[inline(always)]
277    #[must_use]
278    pub fn lo_leakcal_en(&mut self) -> LO_LEAKCAL_EN_W<12> {
279        LO_LEAKCAL_EN_W::new(self)
280    }
281    #[doc = "Bit 13"]
282    #[inline(always)]
283    #[must_use]
284    pub fn tiqcal_en(&mut self) -> TIQCAL_EN_W<13> {
285        TIQCAL_EN_W::new(self)
286    }
287    #[doc = "Bit 14"]
288    #[inline(always)]
289    #[must_use]
290    pub fn riqcal_en(&mut self) -> RIQCAL_EN_W<14> {
291        RIQCAL_EN_W::new(self)
292    }
293    #[doc = "Bit 15"]
294    #[inline(always)]
295    #[must_use]
296    pub fn pwdet_cal_en(&mut self) -> PWDET_CAL_EN_W<15> {
297        PWDET_CAL_EN_W::new(self)
298    }
299    #[doc = "Bit 16"]
300    #[inline(always)]
301    #[must_use]
302    pub fn tsencal_en(&mut self) -> TSENCAL_EN_W<16> {
303        TSENCAL_EN_W::new(self)
304    }
305    #[doc = "Bit 17"]
306    #[inline(always)]
307    #[must_use]
308    pub fn dpd_en(&mut self) -> DPD_EN_W<17> {
309        DPD_EN_W::new(self)
310    }
311    #[doc = "Writes raw bits to the register."]
312    #[inline(always)]
313    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
314        self.0.bits(bits);
315        self
316    }
317}
318#[doc = "Calibration mode register\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_ctrlen](index.html) module"]
319pub struct RFCAL_CTRLEN_SPEC;
320impl crate::RegisterSpec for RFCAL_CTRLEN_SPEC {
321    type Ux = u32;
322}
323#[doc = "`read()` method returns [rfcal_ctrlen::R](R) reader structure"]
324impl crate::Readable for RFCAL_CTRLEN_SPEC {
325    type Reader = R;
326}
327#[doc = "`write(|w| ..)` method takes [rfcal_ctrlen::W](W) writer structure"]
328impl crate::Writable for RFCAL_CTRLEN_SPEC {
329    type Writer = W;
330    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
331    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
332}
333#[doc = "`reset()` method sets rfcal_ctrlen to value 0"]
334impl crate::Resettable for RFCAL_CTRLEN_SPEC {
335    const RESET_VALUE: Self::Ux = 0;
336}