atsam4ls2c_pac/pm/
pbamask.rs

1#[doc = "Register `PBAMASK` reader"]
2pub struct R(crate::R<PBAMASK_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<PBAMASK_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<PBAMASK_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<PBAMASK_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `PBAMASK` writer"]
17pub struct W(crate::W<PBAMASK_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<PBAMASK_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<PBAMASK_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<PBAMASK_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `IISC_` reader - IISC APB Clock Enable"]
38pub type IISC__R = crate::BitReader<bool>;
39#[doc = "Field `IISC_` writer - IISC APB Clock Enable"]
40pub type IISC__W<'a, const O: u8> = crate::BitWriter<'a, u32, PBAMASK_SPEC, bool, O>;
41#[doc = "Field `SPI_` reader - SPI APB Clock Enable"]
42pub type SPI__R = crate::BitReader<bool>;
43#[doc = "Field `SPI_` writer - SPI APB Clock Enable"]
44pub type SPI__W<'a, const O: u8> = crate::BitWriter<'a, u32, PBAMASK_SPEC, bool, O>;
45#[doc = "Field `TC0_` reader - TC0 APB Clock Enable"]
46pub type TC0__R = crate::BitReader<bool>;
47#[doc = "Field `TC0_` writer - TC0 APB Clock Enable"]
48pub type TC0__W<'a, const O: u8> = crate::BitWriter<'a, u32, PBAMASK_SPEC, bool, O>;
49#[doc = "Field `TC1_` reader - TC1 APB Clock Enable"]
50pub type TC1__R = crate::BitReader<bool>;
51#[doc = "Field `TC1_` writer - TC1 APB Clock Enable"]
52pub type TC1__W<'a, const O: u8> = crate::BitWriter<'a, u32, PBAMASK_SPEC, bool, O>;
53#[doc = "Field `TWIM0_` reader - TWIM0 APB Clock Enable"]
54pub type TWIM0__R = crate::BitReader<bool>;
55#[doc = "Field `TWIM0_` writer - TWIM0 APB Clock Enable"]
56pub type TWIM0__W<'a, const O: u8> = crate::BitWriter<'a, u32, PBAMASK_SPEC, bool, O>;
57#[doc = "Field `TWIS0_` reader - TWIS0 APB Clock Enable"]
58pub type TWIS0__R = crate::BitReader<bool>;
59#[doc = "Field `TWIS0_` writer - TWIS0 APB Clock Enable"]
60pub type TWIS0__W<'a, const O: u8> = crate::BitWriter<'a, u32, PBAMASK_SPEC, bool, O>;
61#[doc = "Field `TWIM1_` reader - TWIM1 APB Clock Enable"]
62pub type TWIM1__R = crate::BitReader<bool>;
63#[doc = "Field `TWIM1_` writer - TWIM1 APB Clock Enable"]
64pub type TWIM1__W<'a, const O: u8> = crate::BitWriter<'a, u32, PBAMASK_SPEC, bool, O>;
65#[doc = "Field `TWIS1_` reader - TWIS1 APB Clock Enable"]
66pub type TWIS1__R = crate::BitReader<bool>;
67#[doc = "Field `TWIS1_` writer - TWIS1 APB Clock Enable"]
68pub type TWIS1__W<'a, const O: u8> = crate::BitWriter<'a, u32, PBAMASK_SPEC, bool, O>;
69#[doc = "Field `USART0_` reader - USART0 APB Clock Enable"]
70pub type USART0__R = crate::BitReader<bool>;
71#[doc = "Field `USART0_` writer - USART0 APB Clock Enable"]
72pub type USART0__W<'a, const O: u8> = crate::BitWriter<'a, u32, PBAMASK_SPEC, bool, O>;
73#[doc = "Field `USART1_` reader - USART1 APB Clock Enable"]
74pub type USART1__R = crate::BitReader<bool>;
75#[doc = "Field `USART1_` writer - USART1 APB Clock Enable"]
76pub type USART1__W<'a, const O: u8> = crate::BitWriter<'a, u32, PBAMASK_SPEC, bool, O>;
77#[doc = "Field `USART2_` reader - USART2 APB Clock Enable"]
78pub type USART2__R = crate::BitReader<bool>;
79#[doc = "Field `USART2_` writer - USART2 APB Clock Enable"]
80pub type USART2__W<'a, const O: u8> = crate::BitWriter<'a, u32, PBAMASK_SPEC, bool, O>;
81#[doc = "Field `USART3_` reader - USART3 APB Clock Enable"]
82pub type USART3__R = crate::BitReader<bool>;
83#[doc = "Field `USART3_` writer - USART3 APB Clock Enable"]
84pub type USART3__W<'a, const O: u8> = crate::BitWriter<'a, u32, PBAMASK_SPEC, bool, O>;
85#[doc = "Field `ADCIFE_` reader - ADCIFE APB Clock Enable"]
86pub type ADCIFE__R = crate::BitReader<bool>;
87#[doc = "Field `ADCIFE_` writer - ADCIFE APB Clock Enable"]
88pub type ADCIFE__W<'a, const O: u8> = crate::BitWriter<'a, u32, PBAMASK_SPEC, bool, O>;
89#[doc = "Field `DACC_` reader - DACC APB Clock Enable"]
90pub type DACC__R = crate::BitReader<bool>;
91#[doc = "Field `DACC_` writer - DACC APB Clock Enable"]
92pub type DACC__W<'a, const O: u8> = crate::BitWriter<'a, u32, PBAMASK_SPEC, bool, O>;
93#[doc = "Field `ACIFC_` reader - ACIFC APB Clock Enable"]
94pub type ACIFC__R = crate::BitReader<bool>;
95#[doc = "Field `ACIFC_` writer - ACIFC APB Clock Enable"]
96pub type ACIFC__W<'a, const O: u8> = crate::BitWriter<'a, u32, PBAMASK_SPEC, bool, O>;
97#[doc = "Field `GLOC_` reader - GLOC APB Clock Enable"]
98pub type GLOC__R = crate::BitReader<bool>;
99#[doc = "Field `GLOC_` writer - GLOC APB Clock Enable"]
100pub type GLOC__W<'a, const O: u8> = crate::BitWriter<'a, u32, PBAMASK_SPEC, bool, O>;
101#[doc = "Field `ABDACB_` reader - ABDACB APB Clock Enable"]
102pub type ABDACB__R = crate::BitReader<bool>;
103#[doc = "Field `ABDACB_` writer - ABDACB APB Clock Enable"]
104pub type ABDACB__W<'a, const O: u8> = crate::BitWriter<'a, u32, PBAMASK_SPEC, bool, O>;
105#[doc = "Field `TRNG_` reader - TRNG APB Clock Enable"]
106pub type TRNG__R = crate::BitReader<bool>;
107#[doc = "Field `TRNG_` writer - TRNG APB Clock Enable"]
108pub type TRNG__W<'a, const O: u8> = crate::BitWriter<'a, u32, PBAMASK_SPEC, bool, O>;
109#[doc = "Field `PARC_` reader - PARC APB Clock Enable"]
110pub type PARC__R = crate::BitReader<bool>;
111#[doc = "Field `PARC_` writer - PARC APB Clock Enable"]
112pub type PARC__W<'a, const O: u8> = crate::BitWriter<'a, u32, PBAMASK_SPEC, bool, O>;
113#[doc = "Field `CATB_` reader - CATB APB Clock Enable"]
114pub type CATB__R = crate::BitReader<bool>;
115#[doc = "Field `CATB_` writer - CATB APB Clock Enable"]
116pub type CATB__W<'a, const O: u8> = crate::BitWriter<'a, u32, PBAMASK_SPEC, bool, O>;
117#[doc = "Field `TWIM2_` reader - TWIM2 APB Clock Enable"]
118pub type TWIM2__R = crate::BitReader<bool>;
119#[doc = "Field `TWIM2_` writer - TWIM2 APB Clock Enable"]
120pub type TWIM2__W<'a, const O: u8> = crate::BitWriter<'a, u32, PBAMASK_SPEC, bool, O>;
121#[doc = "Field `TWIM3_` reader - TWIM3 APB Clock Enable"]
122pub type TWIM3__R = crate::BitReader<bool>;
123#[doc = "Field `TWIM3_` writer - TWIM3 APB Clock Enable"]
124pub type TWIM3__W<'a, const O: u8> = crate::BitWriter<'a, u32, PBAMASK_SPEC, bool, O>;
125impl R {
126    #[doc = "Bit 0 - IISC APB Clock Enable"]
127    #[inline(always)]
128    pub fn iisc_(&self) -> IISC__R {
129        IISC__R::new((self.bits & 1) != 0)
130    }
131    #[doc = "Bit 1 - SPI APB Clock Enable"]
132    #[inline(always)]
133    pub fn spi_(&self) -> SPI__R {
134        SPI__R::new(((self.bits >> 1) & 1) != 0)
135    }
136    #[doc = "Bit 2 - TC0 APB Clock Enable"]
137    #[inline(always)]
138    pub fn tc0_(&self) -> TC0__R {
139        TC0__R::new(((self.bits >> 2) & 1) != 0)
140    }
141    #[doc = "Bit 3 - TC1 APB Clock Enable"]
142    #[inline(always)]
143    pub fn tc1_(&self) -> TC1__R {
144        TC1__R::new(((self.bits >> 3) & 1) != 0)
145    }
146    #[doc = "Bit 4 - TWIM0 APB Clock Enable"]
147    #[inline(always)]
148    pub fn twim0_(&self) -> TWIM0__R {
149        TWIM0__R::new(((self.bits >> 4) & 1) != 0)
150    }
151    #[doc = "Bit 5 - TWIS0 APB Clock Enable"]
152    #[inline(always)]
153    pub fn twis0_(&self) -> TWIS0__R {
154        TWIS0__R::new(((self.bits >> 5) & 1) != 0)
155    }
156    #[doc = "Bit 6 - TWIM1 APB Clock Enable"]
157    #[inline(always)]
158    pub fn twim1_(&self) -> TWIM1__R {
159        TWIM1__R::new(((self.bits >> 6) & 1) != 0)
160    }
161    #[doc = "Bit 7 - TWIS1 APB Clock Enable"]
162    #[inline(always)]
163    pub fn twis1_(&self) -> TWIS1__R {
164        TWIS1__R::new(((self.bits >> 7) & 1) != 0)
165    }
166    #[doc = "Bit 8 - USART0 APB Clock Enable"]
167    #[inline(always)]
168    pub fn usart0_(&self) -> USART0__R {
169        USART0__R::new(((self.bits >> 8) & 1) != 0)
170    }
171    #[doc = "Bit 9 - USART1 APB Clock Enable"]
172    #[inline(always)]
173    pub fn usart1_(&self) -> USART1__R {
174        USART1__R::new(((self.bits >> 9) & 1) != 0)
175    }
176    #[doc = "Bit 10 - USART2 APB Clock Enable"]
177    #[inline(always)]
178    pub fn usart2_(&self) -> USART2__R {
179        USART2__R::new(((self.bits >> 10) & 1) != 0)
180    }
181    #[doc = "Bit 11 - USART3 APB Clock Enable"]
182    #[inline(always)]
183    pub fn usart3_(&self) -> USART3__R {
184        USART3__R::new(((self.bits >> 11) & 1) != 0)
185    }
186    #[doc = "Bit 12 - ADCIFE APB Clock Enable"]
187    #[inline(always)]
188    pub fn adcife_(&self) -> ADCIFE__R {
189        ADCIFE__R::new(((self.bits >> 12) & 1) != 0)
190    }
191    #[doc = "Bit 13 - DACC APB Clock Enable"]
192    #[inline(always)]
193    pub fn dacc_(&self) -> DACC__R {
194        DACC__R::new(((self.bits >> 13) & 1) != 0)
195    }
196    #[doc = "Bit 14 - ACIFC APB Clock Enable"]
197    #[inline(always)]
198    pub fn acifc_(&self) -> ACIFC__R {
199        ACIFC__R::new(((self.bits >> 14) & 1) != 0)
200    }
201    #[doc = "Bit 15 - GLOC APB Clock Enable"]
202    #[inline(always)]
203    pub fn gloc_(&self) -> GLOC__R {
204        GLOC__R::new(((self.bits >> 15) & 1) != 0)
205    }
206    #[doc = "Bit 16 - ABDACB APB Clock Enable"]
207    #[inline(always)]
208    pub fn abdacb_(&self) -> ABDACB__R {
209        ABDACB__R::new(((self.bits >> 16) & 1) != 0)
210    }
211    #[doc = "Bit 17 - TRNG APB Clock Enable"]
212    #[inline(always)]
213    pub fn trng_(&self) -> TRNG__R {
214        TRNG__R::new(((self.bits >> 17) & 1) != 0)
215    }
216    #[doc = "Bit 18 - PARC APB Clock Enable"]
217    #[inline(always)]
218    pub fn parc_(&self) -> PARC__R {
219        PARC__R::new(((self.bits >> 18) & 1) != 0)
220    }
221    #[doc = "Bit 19 - CATB APB Clock Enable"]
222    #[inline(always)]
223    pub fn catb_(&self) -> CATB__R {
224        CATB__R::new(((self.bits >> 19) & 1) != 0)
225    }
226    #[doc = "Bit 21 - TWIM2 APB Clock Enable"]
227    #[inline(always)]
228    pub fn twim2_(&self) -> TWIM2__R {
229        TWIM2__R::new(((self.bits >> 21) & 1) != 0)
230    }
231    #[doc = "Bit 22 - TWIM3 APB Clock Enable"]
232    #[inline(always)]
233    pub fn twim3_(&self) -> TWIM3__R {
234        TWIM3__R::new(((self.bits >> 22) & 1) != 0)
235    }
236}
237impl W {
238    #[doc = "Bit 0 - IISC APB Clock Enable"]
239    #[inline(always)]
240    #[must_use]
241    pub fn iisc_(&mut self) -> IISC__W<0> {
242        IISC__W::new(self)
243    }
244    #[doc = "Bit 1 - SPI APB Clock Enable"]
245    #[inline(always)]
246    #[must_use]
247    pub fn spi_(&mut self) -> SPI__W<1> {
248        SPI__W::new(self)
249    }
250    #[doc = "Bit 2 - TC0 APB Clock Enable"]
251    #[inline(always)]
252    #[must_use]
253    pub fn tc0_(&mut self) -> TC0__W<2> {
254        TC0__W::new(self)
255    }
256    #[doc = "Bit 3 - TC1 APB Clock Enable"]
257    #[inline(always)]
258    #[must_use]
259    pub fn tc1_(&mut self) -> TC1__W<3> {
260        TC1__W::new(self)
261    }
262    #[doc = "Bit 4 - TWIM0 APB Clock Enable"]
263    #[inline(always)]
264    #[must_use]
265    pub fn twim0_(&mut self) -> TWIM0__W<4> {
266        TWIM0__W::new(self)
267    }
268    #[doc = "Bit 5 - TWIS0 APB Clock Enable"]
269    #[inline(always)]
270    #[must_use]
271    pub fn twis0_(&mut self) -> TWIS0__W<5> {
272        TWIS0__W::new(self)
273    }
274    #[doc = "Bit 6 - TWIM1 APB Clock Enable"]
275    #[inline(always)]
276    #[must_use]
277    pub fn twim1_(&mut self) -> TWIM1__W<6> {
278        TWIM1__W::new(self)
279    }
280    #[doc = "Bit 7 - TWIS1 APB Clock Enable"]
281    #[inline(always)]
282    #[must_use]
283    pub fn twis1_(&mut self) -> TWIS1__W<7> {
284        TWIS1__W::new(self)
285    }
286    #[doc = "Bit 8 - USART0 APB Clock Enable"]
287    #[inline(always)]
288    #[must_use]
289    pub fn usart0_(&mut self) -> USART0__W<8> {
290        USART0__W::new(self)
291    }
292    #[doc = "Bit 9 - USART1 APB Clock Enable"]
293    #[inline(always)]
294    #[must_use]
295    pub fn usart1_(&mut self) -> USART1__W<9> {
296        USART1__W::new(self)
297    }
298    #[doc = "Bit 10 - USART2 APB Clock Enable"]
299    #[inline(always)]
300    #[must_use]
301    pub fn usart2_(&mut self) -> USART2__W<10> {
302        USART2__W::new(self)
303    }
304    #[doc = "Bit 11 - USART3 APB Clock Enable"]
305    #[inline(always)]
306    #[must_use]
307    pub fn usart3_(&mut self) -> USART3__W<11> {
308        USART3__W::new(self)
309    }
310    #[doc = "Bit 12 - ADCIFE APB Clock Enable"]
311    #[inline(always)]
312    #[must_use]
313    pub fn adcife_(&mut self) -> ADCIFE__W<12> {
314        ADCIFE__W::new(self)
315    }
316    #[doc = "Bit 13 - DACC APB Clock Enable"]
317    #[inline(always)]
318    #[must_use]
319    pub fn dacc_(&mut self) -> DACC__W<13> {
320        DACC__W::new(self)
321    }
322    #[doc = "Bit 14 - ACIFC APB Clock Enable"]
323    #[inline(always)]
324    #[must_use]
325    pub fn acifc_(&mut self) -> ACIFC__W<14> {
326        ACIFC__W::new(self)
327    }
328    #[doc = "Bit 15 - GLOC APB Clock Enable"]
329    #[inline(always)]
330    #[must_use]
331    pub fn gloc_(&mut self) -> GLOC__W<15> {
332        GLOC__W::new(self)
333    }
334    #[doc = "Bit 16 - ABDACB APB Clock Enable"]
335    #[inline(always)]
336    #[must_use]
337    pub fn abdacb_(&mut self) -> ABDACB__W<16> {
338        ABDACB__W::new(self)
339    }
340    #[doc = "Bit 17 - TRNG APB Clock Enable"]
341    #[inline(always)]
342    #[must_use]
343    pub fn trng_(&mut self) -> TRNG__W<17> {
344        TRNG__W::new(self)
345    }
346    #[doc = "Bit 18 - PARC APB Clock Enable"]
347    #[inline(always)]
348    #[must_use]
349    pub fn parc_(&mut self) -> PARC__W<18> {
350        PARC__W::new(self)
351    }
352    #[doc = "Bit 19 - CATB APB Clock Enable"]
353    #[inline(always)]
354    #[must_use]
355    pub fn catb_(&mut self) -> CATB__W<19> {
356        CATB__W::new(self)
357    }
358    #[doc = "Bit 21 - TWIM2 APB Clock Enable"]
359    #[inline(always)]
360    #[must_use]
361    pub fn twim2_(&mut self) -> TWIM2__W<21> {
362        TWIM2__W::new(self)
363    }
364    #[doc = "Bit 22 - TWIM3 APB Clock Enable"]
365    #[inline(always)]
366    #[must_use]
367    pub fn twim3_(&mut self) -> TWIM3__W<22> {
368        TWIM3__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 = "PBA Mask\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 [pbamask](index.html) module"]
378pub struct PBAMASK_SPEC;
379impl crate::RegisterSpec for PBAMASK_SPEC {
380    type Ux = u32;
381}
382#[doc = "`read()` method returns [pbamask::R](R) reader structure"]
383impl crate::Readable for PBAMASK_SPEC {
384    type Reader = R;
385}
386#[doc = "`write(|w| ..)` method takes [pbamask::W](W) writer structure"]
387impl crate::Writable for PBAMASK_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 PBAMASK to value 0"]
393impl crate::Resettable for PBAMASK_SPEC {
394    const RESET_VALUE: Self::Ux = 0;
395}