bl602_pac/rf/
ten_dc.rs

1#[doc = "Register `ten_dc` reader"]
2pub struct R(crate::R<TEN_DC_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<TEN_DC_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<TEN_DC_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<TEN_DC_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `ten_dc` writer"]
17pub struct W(crate::W<TEN_DC_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<TEN_DC_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<TEN_DC_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<TEN_DC_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `tmux` reader - "]
38pub type TMUX_R = crate::FieldReader<u8, u8>;
39#[doc = "Field `tmux` writer - "]
40pub type TMUX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TEN_DC_SPEC, u8, u8, 3, O>;
41#[doc = "Field `dc_tp_en` reader - "]
42pub type DC_TP_EN_R = crate::BitReader<bool>;
43#[doc = "Field `dc_tp_en` writer - "]
44pub type DC_TP_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>;
45#[doc = "Field `dc_tp_clkpll_en` reader - "]
46pub type DC_TP_CLKPLL_EN_R = crate::BitReader<bool>;
47#[doc = "Field `dc_tp_clkpll_en` writer - "]
48pub type DC_TP_CLKPLL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>;
49#[doc = "Field `ten_clkpll` reader - "]
50pub type TEN_CLKPLL_R = crate::BitReader<bool>;
51#[doc = "Field `ten_clkpll` writer - "]
52pub type TEN_CLKPLL_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>;
53#[doc = "Field `ten_clkpll_sfreg` reader - "]
54pub type TEN_CLKPLL_SFREG_R = crate::BitReader<bool>;
55#[doc = "Field `ten_clkpll_sfreg` writer - "]
56pub type TEN_CLKPLL_SFREG_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>;
57#[doc = "Field `ten_rrf_0` reader - "]
58pub type TEN_RRF_0_R = crate::BitReader<bool>;
59#[doc = "Field `ten_rrf_0` writer - "]
60pub type TEN_RRF_0_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>;
61#[doc = "Field `ten_rrf_1` reader - "]
62pub type TEN_RRF_1_R = crate::BitReader<bool>;
63#[doc = "Field `ten_rrf_1` writer - "]
64pub type TEN_RRF_1_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>;
65#[doc = "Field `ten_pa` reader - "]
66pub type TEN_PA_R = crate::BitReader<bool>;
67#[doc = "Field `ten_pa` writer - "]
68pub type TEN_PA_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>;
69#[doc = "Field `ten_tmx` reader - "]
70pub type TEN_TMX_R = crate::BitReader<bool>;
71#[doc = "Field `ten_tmx` writer - "]
72pub type TEN_TMX_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>;
73#[doc = "Field `ten_tia` reader - "]
74pub type TEN_TIA_R = crate::BitReader<bool>;
75#[doc = "Field `ten_tia` writer - "]
76pub type TEN_TIA_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>;
77#[doc = "Field `ten_bq` reader - "]
78pub type TEN_BQ_R = crate::BitReader<bool>;
79#[doc = "Field `ten_bq` writer - "]
80pub type TEN_BQ_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>;
81#[doc = "Field `ten_atest` reader - "]
82pub type TEN_ATEST_R = crate::BitReader<bool>;
83#[doc = "Field `ten_atest` writer - "]
84pub type TEN_ATEST_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>;
85#[doc = "Field `ten_tbb` reader - "]
86pub type TEN_TBB_R = crate::BitReader<bool>;
87#[doc = "Field `ten_tbb` writer - "]
88pub type TEN_TBB_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>;
89#[doc = "Field `ten_adc` reader - "]
90pub type TEN_ADC_R = crate::BitReader<bool>;
91#[doc = "Field `ten_adc` writer - "]
92pub type TEN_ADC_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>;
93#[doc = "Field `ten_dac_i` reader - "]
94pub type TEN_DAC_I_R = crate::BitReader<bool>;
95#[doc = "Field `ten_dac_i` writer - "]
96pub type TEN_DAC_I_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>;
97#[doc = "Field `ten_dac_q` reader - "]
98pub type TEN_DAC_Q_R = crate::BitReader<bool>;
99#[doc = "Field `ten_dac_q` writer - "]
100pub type TEN_DAC_Q_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>;
101#[doc = "Field `ten_vco` reader - "]
102pub type TEN_VCO_R = crate::BitReader<bool>;
103#[doc = "Field `ten_vco` writer - "]
104pub type TEN_VCO_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>;
105#[doc = "Field `ten_pfdcp` reader - "]
106pub type TEN_PFDCP_R = crate::BitReader<bool>;
107#[doc = "Field `ten_pfdcp` writer - "]
108pub type TEN_PFDCP_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>;
109#[doc = "Field `ten_lf` reader - "]
110pub type TEN_LF_R = crate::BitReader<bool>;
111#[doc = "Field `ten_lf` writer - "]
112pub type TEN_LF_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>;
113#[doc = "Field `ten_lodist` reader - "]
114pub type TEN_LODIST_R = crate::BitReader<bool>;
115#[doc = "Field `ten_lodist` writer - "]
116pub type TEN_LODIST_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>;
117impl R {
118    #[doc = "Bits 0:2"]
119    #[inline(always)]
120    pub fn tmux(&self) -> TMUX_R {
121        TMUX_R::new((self.bits & 7) as u8)
122    }
123    #[doc = "Bit 3"]
124    #[inline(always)]
125    pub fn dc_tp_en(&self) -> DC_TP_EN_R {
126        DC_TP_EN_R::new(((self.bits >> 3) & 1) != 0)
127    }
128    #[doc = "Bit 4"]
129    #[inline(always)]
130    pub fn dc_tp_clkpll_en(&self) -> DC_TP_CLKPLL_EN_R {
131        DC_TP_CLKPLL_EN_R::new(((self.bits >> 4) & 1) != 0)
132    }
133    #[doc = "Bit 8"]
134    #[inline(always)]
135    pub fn ten_clkpll(&self) -> TEN_CLKPLL_R {
136        TEN_CLKPLL_R::new(((self.bits >> 8) & 1) != 0)
137    }
138    #[doc = "Bit 9"]
139    #[inline(always)]
140    pub fn ten_clkpll_sfreg(&self) -> TEN_CLKPLL_SFREG_R {
141        TEN_CLKPLL_SFREG_R::new(((self.bits >> 9) & 1) != 0)
142    }
143    #[doc = "Bit 12"]
144    #[inline(always)]
145    pub fn ten_rrf_0(&self) -> TEN_RRF_0_R {
146        TEN_RRF_0_R::new(((self.bits >> 12) & 1) != 0)
147    }
148    #[doc = "Bit 13"]
149    #[inline(always)]
150    pub fn ten_rrf_1(&self) -> TEN_RRF_1_R {
151        TEN_RRF_1_R::new(((self.bits >> 13) & 1) != 0)
152    }
153    #[doc = "Bit 14"]
154    #[inline(always)]
155    pub fn ten_pa(&self) -> TEN_PA_R {
156        TEN_PA_R::new(((self.bits >> 14) & 1) != 0)
157    }
158    #[doc = "Bit 15"]
159    #[inline(always)]
160    pub fn ten_tmx(&self) -> TEN_TMX_R {
161        TEN_TMX_R::new(((self.bits >> 15) & 1) != 0)
162    }
163    #[doc = "Bit 16"]
164    #[inline(always)]
165    pub fn ten_tia(&self) -> TEN_TIA_R {
166        TEN_TIA_R::new(((self.bits >> 16) & 1) != 0)
167    }
168    #[doc = "Bit 17"]
169    #[inline(always)]
170    pub fn ten_bq(&self) -> TEN_BQ_R {
171        TEN_BQ_R::new(((self.bits >> 17) & 1) != 0)
172    }
173    #[doc = "Bit 18"]
174    #[inline(always)]
175    pub fn ten_atest(&self) -> TEN_ATEST_R {
176        TEN_ATEST_R::new(((self.bits >> 18) & 1) != 0)
177    }
178    #[doc = "Bit 19"]
179    #[inline(always)]
180    pub fn ten_tbb(&self) -> TEN_TBB_R {
181        TEN_TBB_R::new(((self.bits >> 19) & 1) != 0)
182    }
183    #[doc = "Bit 20"]
184    #[inline(always)]
185    pub fn ten_adc(&self) -> TEN_ADC_R {
186        TEN_ADC_R::new(((self.bits >> 20) & 1) != 0)
187    }
188    #[doc = "Bit 21"]
189    #[inline(always)]
190    pub fn ten_dac_i(&self) -> TEN_DAC_I_R {
191        TEN_DAC_I_R::new(((self.bits >> 21) & 1) != 0)
192    }
193    #[doc = "Bit 22"]
194    #[inline(always)]
195    pub fn ten_dac_q(&self) -> TEN_DAC_Q_R {
196        TEN_DAC_Q_R::new(((self.bits >> 22) & 1) != 0)
197    }
198    #[doc = "Bit 24"]
199    #[inline(always)]
200    pub fn ten_vco(&self) -> TEN_VCO_R {
201        TEN_VCO_R::new(((self.bits >> 24) & 1) != 0)
202    }
203    #[doc = "Bit 25"]
204    #[inline(always)]
205    pub fn ten_pfdcp(&self) -> TEN_PFDCP_R {
206        TEN_PFDCP_R::new(((self.bits >> 25) & 1) != 0)
207    }
208    #[doc = "Bit 26"]
209    #[inline(always)]
210    pub fn ten_lf(&self) -> TEN_LF_R {
211        TEN_LF_R::new(((self.bits >> 26) & 1) != 0)
212    }
213    #[doc = "Bit 27"]
214    #[inline(always)]
215    pub fn ten_lodist(&self) -> TEN_LODIST_R {
216        TEN_LODIST_R::new(((self.bits >> 27) & 1) != 0)
217    }
218}
219impl W {
220    #[doc = "Bits 0:2"]
221    #[inline(always)]
222    #[must_use]
223    pub fn tmux(&mut self) -> TMUX_W<0> {
224        TMUX_W::new(self)
225    }
226    #[doc = "Bit 3"]
227    #[inline(always)]
228    #[must_use]
229    pub fn dc_tp_en(&mut self) -> DC_TP_EN_W<3> {
230        DC_TP_EN_W::new(self)
231    }
232    #[doc = "Bit 4"]
233    #[inline(always)]
234    #[must_use]
235    pub fn dc_tp_clkpll_en(&mut self) -> DC_TP_CLKPLL_EN_W<4> {
236        DC_TP_CLKPLL_EN_W::new(self)
237    }
238    #[doc = "Bit 8"]
239    #[inline(always)]
240    #[must_use]
241    pub fn ten_clkpll(&mut self) -> TEN_CLKPLL_W<8> {
242        TEN_CLKPLL_W::new(self)
243    }
244    #[doc = "Bit 9"]
245    #[inline(always)]
246    #[must_use]
247    pub fn ten_clkpll_sfreg(&mut self) -> TEN_CLKPLL_SFREG_W<9> {
248        TEN_CLKPLL_SFREG_W::new(self)
249    }
250    #[doc = "Bit 12"]
251    #[inline(always)]
252    #[must_use]
253    pub fn ten_rrf_0(&mut self) -> TEN_RRF_0_W<12> {
254        TEN_RRF_0_W::new(self)
255    }
256    #[doc = "Bit 13"]
257    #[inline(always)]
258    #[must_use]
259    pub fn ten_rrf_1(&mut self) -> TEN_RRF_1_W<13> {
260        TEN_RRF_1_W::new(self)
261    }
262    #[doc = "Bit 14"]
263    #[inline(always)]
264    #[must_use]
265    pub fn ten_pa(&mut self) -> TEN_PA_W<14> {
266        TEN_PA_W::new(self)
267    }
268    #[doc = "Bit 15"]
269    #[inline(always)]
270    #[must_use]
271    pub fn ten_tmx(&mut self) -> TEN_TMX_W<15> {
272        TEN_TMX_W::new(self)
273    }
274    #[doc = "Bit 16"]
275    #[inline(always)]
276    #[must_use]
277    pub fn ten_tia(&mut self) -> TEN_TIA_W<16> {
278        TEN_TIA_W::new(self)
279    }
280    #[doc = "Bit 17"]
281    #[inline(always)]
282    #[must_use]
283    pub fn ten_bq(&mut self) -> TEN_BQ_W<17> {
284        TEN_BQ_W::new(self)
285    }
286    #[doc = "Bit 18"]
287    #[inline(always)]
288    #[must_use]
289    pub fn ten_atest(&mut self) -> TEN_ATEST_W<18> {
290        TEN_ATEST_W::new(self)
291    }
292    #[doc = "Bit 19"]
293    #[inline(always)]
294    #[must_use]
295    pub fn ten_tbb(&mut self) -> TEN_TBB_W<19> {
296        TEN_TBB_W::new(self)
297    }
298    #[doc = "Bit 20"]
299    #[inline(always)]
300    #[must_use]
301    pub fn ten_adc(&mut self) -> TEN_ADC_W<20> {
302        TEN_ADC_W::new(self)
303    }
304    #[doc = "Bit 21"]
305    #[inline(always)]
306    #[must_use]
307    pub fn ten_dac_i(&mut self) -> TEN_DAC_I_W<21> {
308        TEN_DAC_I_W::new(self)
309    }
310    #[doc = "Bit 22"]
311    #[inline(always)]
312    #[must_use]
313    pub fn ten_dac_q(&mut self) -> TEN_DAC_Q_W<22> {
314        TEN_DAC_Q_W::new(self)
315    }
316    #[doc = "Bit 24"]
317    #[inline(always)]
318    #[must_use]
319    pub fn ten_vco(&mut self) -> TEN_VCO_W<24> {
320        TEN_VCO_W::new(self)
321    }
322    #[doc = "Bit 25"]
323    #[inline(always)]
324    #[must_use]
325    pub fn ten_pfdcp(&mut self) -> TEN_PFDCP_W<25> {
326        TEN_PFDCP_W::new(self)
327    }
328    #[doc = "Bit 26"]
329    #[inline(always)]
330    #[must_use]
331    pub fn ten_lf(&mut self) -> TEN_LF_W<26> {
332        TEN_LF_W::new(self)
333    }
334    #[doc = "Bit 27"]
335    #[inline(always)]
336    #[must_use]
337    pub fn ten_lodist(&mut self) -> TEN_LODIST_W<27> {
338        TEN_LODIST_W::new(self)
339    }
340    #[doc = "Writes raw bits to the register."]
341    #[inline(always)]
342    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
343        self.0.bits(bits);
344        self
345    }
346}
347#[doc = "dc test 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 [ten_dc](index.html) module"]
348pub struct TEN_DC_SPEC;
349impl crate::RegisterSpec for TEN_DC_SPEC {
350    type Ux = u32;
351}
352#[doc = "`read()` method returns [ten_dc::R](R) reader structure"]
353impl crate::Readable for TEN_DC_SPEC {
354    type Reader = R;
355}
356#[doc = "`write(|w| ..)` method takes [ten_dc::W](W) writer structure"]
357impl crate::Writable for TEN_DC_SPEC {
358    type Writer = W;
359    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
360    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
361}
362#[doc = "`reset()` method sets ten_dc to value 0"]
363impl crate::Resettable for TEN_DC_SPEC {
364    const RESET_VALUE: Self::Ux = 0;
365}