atsamd21j/pm/
apbcmask.rs

1#[doc = "Register `APBCMASK` reader"]
2pub type R = crate::R<ApbcmaskSpec>;
3#[doc = "Register `APBCMASK` writer"]
4pub type W = crate::W<ApbcmaskSpec>;
5#[doc = "Field `PAC2_` reader - PAC2 APB Clock Enable"]
6pub type Pac2_R = crate::BitReader;
7#[doc = "Field `PAC2_` writer - PAC2 APB Clock Enable"]
8pub type Pac2_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `EVSYS_` reader - EVSYS APB Clock Enable"]
10pub type Evsys_R = crate::BitReader;
11#[doc = "Field `EVSYS_` writer - EVSYS APB Clock Enable"]
12pub type Evsys_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `SERCOM0_` reader - SERCOM0 APB Clock Enable"]
14pub type Sercom0_R = crate::BitReader;
15#[doc = "Field `SERCOM0_` writer - SERCOM0 APB Clock Enable"]
16pub type Sercom0_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `SERCOM1_` reader - SERCOM1 APB Clock Enable"]
18pub type Sercom1_R = crate::BitReader;
19#[doc = "Field `SERCOM1_` writer - SERCOM1 APB Clock Enable"]
20pub type Sercom1_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `SERCOM2_` reader - SERCOM2 APB Clock Enable"]
22pub type Sercom2_R = crate::BitReader;
23#[doc = "Field `SERCOM2_` writer - SERCOM2 APB Clock Enable"]
24pub type Sercom2_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `SERCOM3_` reader - SERCOM3 APB Clock Enable"]
26pub type Sercom3_R = crate::BitReader;
27#[doc = "Field `SERCOM3_` writer - SERCOM3 APB Clock Enable"]
28pub type Sercom3_W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `SERCOM4_` reader - SERCOM4 APB Clock Enable"]
30pub type Sercom4_R = crate::BitReader;
31#[doc = "Field `SERCOM4_` writer - SERCOM4 APB Clock Enable"]
32pub type Sercom4_W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `SERCOM5_` reader - SERCOM5 APB Clock Enable"]
34pub type Sercom5_R = crate::BitReader;
35#[doc = "Field `SERCOM5_` writer - SERCOM5 APB Clock Enable"]
36pub type Sercom5_W<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `TCC0_` reader - TCC0 APB Clock Enable"]
38pub type Tcc0_R = crate::BitReader;
39#[doc = "Field `TCC0_` writer - TCC0 APB Clock Enable"]
40pub type Tcc0_W<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `TCC1_` reader - TCC1 APB Clock Enable"]
42pub type Tcc1_R = crate::BitReader;
43#[doc = "Field `TCC1_` writer - TCC1 APB Clock Enable"]
44pub type Tcc1_W<'a, REG> = crate::BitWriter<'a, REG>;
45#[doc = "Field `TCC2_` reader - TCC2 APB Clock Enable"]
46pub type Tcc2_R = crate::BitReader;
47#[doc = "Field `TCC2_` writer - TCC2 APB Clock Enable"]
48pub type Tcc2_W<'a, REG> = crate::BitWriter<'a, REG>;
49#[doc = "Field `TC3_` reader - TC3 APB Clock Enable"]
50pub type Tc3_R = crate::BitReader;
51#[doc = "Field `TC3_` writer - TC3 APB Clock Enable"]
52pub type Tc3_W<'a, REG> = crate::BitWriter<'a, REG>;
53#[doc = "Field `TC4_` reader - TC4 APB Clock Enable"]
54pub type Tc4_R = crate::BitReader;
55#[doc = "Field `TC4_` writer - TC4 APB Clock Enable"]
56pub type Tc4_W<'a, REG> = crate::BitWriter<'a, REG>;
57#[doc = "Field `TC5_` reader - TC5 APB Clock Enable"]
58pub type Tc5_R = crate::BitReader;
59#[doc = "Field `TC5_` writer - TC5 APB Clock Enable"]
60pub type Tc5_W<'a, REG> = crate::BitWriter<'a, REG>;
61#[doc = "Field `TC6_` reader - TC6 APB Clock Enable"]
62pub type Tc6_R = crate::BitReader;
63#[doc = "Field `TC6_` writer - TC6 APB Clock Enable"]
64pub type Tc6_W<'a, REG> = crate::BitWriter<'a, REG>;
65#[doc = "Field `TC7_` reader - TC7 APB Clock Enable"]
66pub type Tc7_R = crate::BitReader;
67#[doc = "Field `TC7_` writer - TC7 APB Clock Enable"]
68pub type Tc7_W<'a, REG> = crate::BitWriter<'a, REG>;
69#[doc = "Field `ADC_` reader - ADC APB Clock Enable"]
70pub type Adc_R = crate::BitReader;
71#[doc = "Field `ADC_` writer - ADC APB Clock Enable"]
72pub type Adc_W<'a, REG> = crate::BitWriter<'a, REG>;
73#[doc = "Field `AC_` reader - AC APB Clock Enable"]
74pub type Ac_R = crate::BitReader;
75#[doc = "Field `AC_` writer - AC APB Clock Enable"]
76pub type Ac_W<'a, REG> = crate::BitWriter<'a, REG>;
77#[doc = "Field `DAC_` reader - DAC APB Clock Enable"]
78pub type Dac_R = crate::BitReader;
79#[doc = "Field `DAC_` writer - DAC APB Clock Enable"]
80pub type Dac_W<'a, REG> = crate::BitWriter<'a, REG>;
81#[doc = "Field `PTC_` reader - PTC APB Clock Enable"]
82pub type Ptc_R = crate::BitReader;
83#[doc = "Field `PTC_` writer - PTC APB Clock Enable"]
84pub type Ptc_W<'a, REG> = crate::BitWriter<'a, REG>;
85#[doc = "Field `I2S_` reader - I2S APB Clock Enable"]
86pub type I2s_R = crate::BitReader;
87#[doc = "Field `I2S_` writer - I2S APB Clock Enable"]
88pub type I2s_W<'a, REG> = crate::BitWriter<'a, REG>;
89impl R {
90    #[doc = "Bit 0 - PAC2 APB Clock Enable"]
91    #[inline(always)]
92    pub fn pac2_(&self) -> Pac2_R {
93        Pac2_R::new((self.bits & 1) != 0)
94    }
95    #[doc = "Bit 1 - EVSYS APB Clock Enable"]
96    #[inline(always)]
97    pub fn evsys_(&self) -> Evsys_R {
98        Evsys_R::new(((self.bits >> 1) & 1) != 0)
99    }
100    #[doc = "Bit 2 - SERCOM0 APB Clock Enable"]
101    #[inline(always)]
102    pub fn sercom0_(&self) -> Sercom0_R {
103        Sercom0_R::new(((self.bits >> 2) & 1) != 0)
104    }
105    #[doc = "Bit 3 - SERCOM1 APB Clock Enable"]
106    #[inline(always)]
107    pub fn sercom1_(&self) -> Sercom1_R {
108        Sercom1_R::new(((self.bits >> 3) & 1) != 0)
109    }
110    #[doc = "Bit 4 - SERCOM2 APB Clock Enable"]
111    #[inline(always)]
112    pub fn sercom2_(&self) -> Sercom2_R {
113        Sercom2_R::new(((self.bits >> 4) & 1) != 0)
114    }
115    #[doc = "Bit 5 - SERCOM3 APB Clock Enable"]
116    #[inline(always)]
117    pub fn sercom3_(&self) -> Sercom3_R {
118        Sercom3_R::new(((self.bits >> 5) & 1) != 0)
119    }
120    #[doc = "Bit 6 - SERCOM4 APB Clock Enable"]
121    #[inline(always)]
122    pub fn sercom4_(&self) -> Sercom4_R {
123        Sercom4_R::new(((self.bits >> 6) & 1) != 0)
124    }
125    #[doc = "Bit 7 - SERCOM5 APB Clock Enable"]
126    #[inline(always)]
127    pub fn sercom5_(&self) -> Sercom5_R {
128        Sercom5_R::new(((self.bits >> 7) & 1) != 0)
129    }
130    #[doc = "Bit 8 - TCC0 APB Clock Enable"]
131    #[inline(always)]
132    pub fn tcc0_(&self) -> Tcc0_R {
133        Tcc0_R::new(((self.bits >> 8) & 1) != 0)
134    }
135    #[doc = "Bit 9 - TCC1 APB Clock Enable"]
136    #[inline(always)]
137    pub fn tcc1_(&self) -> Tcc1_R {
138        Tcc1_R::new(((self.bits >> 9) & 1) != 0)
139    }
140    #[doc = "Bit 10 - TCC2 APB Clock Enable"]
141    #[inline(always)]
142    pub fn tcc2_(&self) -> Tcc2_R {
143        Tcc2_R::new(((self.bits >> 10) & 1) != 0)
144    }
145    #[doc = "Bit 11 - TC3 APB Clock Enable"]
146    #[inline(always)]
147    pub fn tc3_(&self) -> Tc3_R {
148        Tc3_R::new(((self.bits >> 11) & 1) != 0)
149    }
150    #[doc = "Bit 12 - TC4 APB Clock Enable"]
151    #[inline(always)]
152    pub fn tc4_(&self) -> Tc4_R {
153        Tc4_R::new(((self.bits >> 12) & 1) != 0)
154    }
155    #[doc = "Bit 13 - TC5 APB Clock Enable"]
156    #[inline(always)]
157    pub fn tc5_(&self) -> Tc5_R {
158        Tc5_R::new(((self.bits >> 13) & 1) != 0)
159    }
160    #[doc = "Bit 14 - TC6 APB Clock Enable"]
161    #[inline(always)]
162    pub fn tc6_(&self) -> Tc6_R {
163        Tc6_R::new(((self.bits >> 14) & 1) != 0)
164    }
165    #[doc = "Bit 15 - TC7 APB Clock Enable"]
166    #[inline(always)]
167    pub fn tc7_(&self) -> Tc7_R {
168        Tc7_R::new(((self.bits >> 15) & 1) != 0)
169    }
170    #[doc = "Bit 16 - ADC APB Clock Enable"]
171    #[inline(always)]
172    pub fn adc_(&self) -> Adc_R {
173        Adc_R::new(((self.bits >> 16) & 1) != 0)
174    }
175    #[doc = "Bit 17 - AC APB Clock Enable"]
176    #[inline(always)]
177    pub fn ac_(&self) -> Ac_R {
178        Ac_R::new(((self.bits >> 17) & 1) != 0)
179    }
180    #[doc = "Bit 18 - DAC APB Clock Enable"]
181    #[inline(always)]
182    pub fn dac_(&self) -> Dac_R {
183        Dac_R::new(((self.bits >> 18) & 1) != 0)
184    }
185    #[doc = "Bit 19 - PTC APB Clock Enable"]
186    #[inline(always)]
187    pub fn ptc_(&self) -> Ptc_R {
188        Ptc_R::new(((self.bits >> 19) & 1) != 0)
189    }
190    #[doc = "Bit 20 - I2S APB Clock Enable"]
191    #[inline(always)]
192    pub fn i2s_(&self) -> I2s_R {
193        I2s_R::new(((self.bits >> 20) & 1) != 0)
194    }
195}
196impl W {
197    #[doc = "Bit 0 - PAC2 APB Clock Enable"]
198    #[inline(always)]
199    #[must_use]
200    pub fn pac2_(&mut self) -> Pac2_W<ApbcmaskSpec> {
201        Pac2_W::new(self, 0)
202    }
203    #[doc = "Bit 1 - EVSYS APB Clock Enable"]
204    #[inline(always)]
205    #[must_use]
206    pub fn evsys_(&mut self) -> Evsys_W<ApbcmaskSpec> {
207        Evsys_W::new(self, 1)
208    }
209    #[doc = "Bit 2 - SERCOM0 APB Clock Enable"]
210    #[inline(always)]
211    #[must_use]
212    pub fn sercom0_(&mut self) -> Sercom0_W<ApbcmaskSpec> {
213        Sercom0_W::new(self, 2)
214    }
215    #[doc = "Bit 3 - SERCOM1 APB Clock Enable"]
216    #[inline(always)]
217    #[must_use]
218    pub fn sercom1_(&mut self) -> Sercom1_W<ApbcmaskSpec> {
219        Sercom1_W::new(self, 3)
220    }
221    #[doc = "Bit 4 - SERCOM2 APB Clock Enable"]
222    #[inline(always)]
223    #[must_use]
224    pub fn sercom2_(&mut self) -> Sercom2_W<ApbcmaskSpec> {
225        Sercom2_W::new(self, 4)
226    }
227    #[doc = "Bit 5 - SERCOM3 APB Clock Enable"]
228    #[inline(always)]
229    #[must_use]
230    pub fn sercom3_(&mut self) -> Sercom3_W<ApbcmaskSpec> {
231        Sercom3_W::new(self, 5)
232    }
233    #[doc = "Bit 6 - SERCOM4 APB Clock Enable"]
234    #[inline(always)]
235    #[must_use]
236    pub fn sercom4_(&mut self) -> Sercom4_W<ApbcmaskSpec> {
237        Sercom4_W::new(self, 6)
238    }
239    #[doc = "Bit 7 - SERCOM5 APB Clock Enable"]
240    #[inline(always)]
241    #[must_use]
242    pub fn sercom5_(&mut self) -> Sercom5_W<ApbcmaskSpec> {
243        Sercom5_W::new(self, 7)
244    }
245    #[doc = "Bit 8 - TCC0 APB Clock Enable"]
246    #[inline(always)]
247    #[must_use]
248    pub fn tcc0_(&mut self) -> Tcc0_W<ApbcmaskSpec> {
249        Tcc0_W::new(self, 8)
250    }
251    #[doc = "Bit 9 - TCC1 APB Clock Enable"]
252    #[inline(always)]
253    #[must_use]
254    pub fn tcc1_(&mut self) -> Tcc1_W<ApbcmaskSpec> {
255        Tcc1_W::new(self, 9)
256    }
257    #[doc = "Bit 10 - TCC2 APB Clock Enable"]
258    #[inline(always)]
259    #[must_use]
260    pub fn tcc2_(&mut self) -> Tcc2_W<ApbcmaskSpec> {
261        Tcc2_W::new(self, 10)
262    }
263    #[doc = "Bit 11 - TC3 APB Clock Enable"]
264    #[inline(always)]
265    #[must_use]
266    pub fn tc3_(&mut self) -> Tc3_W<ApbcmaskSpec> {
267        Tc3_W::new(self, 11)
268    }
269    #[doc = "Bit 12 - TC4 APB Clock Enable"]
270    #[inline(always)]
271    #[must_use]
272    pub fn tc4_(&mut self) -> Tc4_W<ApbcmaskSpec> {
273        Tc4_W::new(self, 12)
274    }
275    #[doc = "Bit 13 - TC5 APB Clock Enable"]
276    #[inline(always)]
277    #[must_use]
278    pub fn tc5_(&mut self) -> Tc5_W<ApbcmaskSpec> {
279        Tc5_W::new(self, 13)
280    }
281    #[doc = "Bit 14 - TC6 APB Clock Enable"]
282    #[inline(always)]
283    #[must_use]
284    pub fn tc6_(&mut self) -> Tc6_W<ApbcmaskSpec> {
285        Tc6_W::new(self, 14)
286    }
287    #[doc = "Bit 15 - TC7 APB Clock Enable"]
288    #[inline(always)]
289    #[must_use]
290    pub fn tc7_(&mut self) -> Tc7_W<ApbcmaskSpec> {
291        Tc7_W::new(self, 15)
292    }
293    #[doc = "Bit 16 - ADC APB Clock Enable"]
294    #[inline(always)]
295    #[must_use]
296    pub fn adc_(&mut self) -> Adc_W<ApbcmaskSpec> {
297        Adc_W::new(self, 16)
298    }
299    #[doc = "Bit 17 - AC APB Clock Enable"]
300    #[inline(always)]
301    #[must_use]
302    pub fn ac_(&mut self) -> Ac_W<ApbcmaskSpec> {
303        Ac_W::new(self, 17)
304    }
305    #[doc = "Bit 18 - DAC APB Clock Enable"]
306    #[inline(always)]
307    #[must_use]
308    pub fn dac_(&mut self) -> Dac_W<ApbcmaskSpec> {
309        Dac_W::new(self, 18)
310    }
311    #[doc = "Bit 19 - PTC APB Clock Enable"]
312    #[inline(always)]
313    #[must_use]
314    pub fn ptc_(&mut self) -> Ptc_W<ApbcmaskSpec> {
315        Ptc_W::new(self, 19)
316    }
317    #[doc = "Bit 20 - I2S APB Clock Enable"]
318    #[inline(always)]
319    #[must_use]
320    pub fn i2s_(&mut self) -> I2s_W<ApbcmaskSpec> {
321        I2s_W::new(self, 20)
322    }
323}
324#[doc = "APBC Mask\n\nYou can [`read`](crate::Reg::read) this register and get [`apbcmask::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`apbcmask::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
325pub struct ApbcmaskSpec;
326impl crate::RegisterSpec for ApbcmaskSpec {
327    type Ux = u32;
328}
329#[doc = "`read()` method returns [`apbcmask::R`](R) reader structure"]
330impl crate::Readable for ApbcmaskSpec {}
331#[doc = "`write(|w| ..)` method takes [`apbcmask::W`](W) writer structure"]
332impl crate::Writable for ApbcmaskSpec {
333    type Safety = crate::Unsafe;
334    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
335    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
336}
337#[doc = "`reset()` method sets APBCMASK to value 0x0001_0000"]
338impl crate::Resettable for ApbcmaskSpec {
339    const RESET_VALUE: u32 = 0x0001_0000;
340}