atsamd11d/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 `TCC0_` reader - TCC0 APB Clock Enable"]
26pub type Tcc0_R = crate::BitReader;
27#[doc = "Field `TCC0_` writer - TCC0 APB Clock Enable"]
28pub type Tcc0_W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `TC1_` reader - TC1 APB Clock Enable"]
30pub type Tc1_R = crate::BitReader;
31#[doc = "Field `TC1_` writer - TC1 APB Clock Enable"]
32pub type Tc1_W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `TC2_` reader - TC2 APB Clock Enable"]
34pub type Tc2_R = crate::BitReader;
35#[doc = "Field `TC2_` writer - TC2 APB Clock Enable"]
36pub type Tc2_W<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `ADC_` reader - ADC APB Clock Enable"]
38pub type Adc_R = crate::BitReader;
39#[doc = "Field `ADC_` writer - ADC APB Clock Enable"]
40pub type Adc_W<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `AC_` reader - AC APB Clock Enable"]
42pub type Ac_R = crate::BitReader;
43#[doc = "Field `AC_` writer - AC APB Clock Enable"]
44pub type Ac_W<'a, REG> = crate::BitWriter<'a, REG>;
45#[doc = "Field `DAC_` reader - DAC APB Clock Enable"]
46pub type Dac_R = crate::BitReader;
47#[doc = "Field `DAC_` writer - DAC APB Clock Enable"]
48pub type Dac_W<'a, REG> = crate::BitWriter<'a, REG>;
49#[doc = "Field `PTC_` reader - PTC APB Clock Enable"]
50pub type Ptc_R = crate::BitReader;
51#[doc = "Field `PTC_` writer - PTC APB Clock Enable"]
52pub type Ptc_W<'a, REG> = crate::BitWriter<'a, REG>;
53impl R {
54    #[doc = "Bit 0 - PAC2 APB Clock Enable"]
55    #[inline(always)]
56    pub fn pac2_(&self) -> Pac2_R {
57        Pac2_R::new((self.bits & 1) != 0)
58    }
59    #[doc = "Bit 1 - EVSYS APB Clock Enable"]
60    #[inline(always)]
61    pub fn evsys_(&self) -> Evsys_R {
62        Evsys_R::new(((self.bits >> 1) & 1) != 0)
63    }
64    #[doc = "Bit 2 - SERCOM0 APB Clock Enable"]
65    #[inline(always)]
66    pub fn sercom0_(&self) -> Sercom0_R {
67        Sercom0_R::new(((self.bits >> 2) & 1) != 0)
68    }
69    #[doc = "Bit 3 - SERCOM1 APB Clock Enable"]
70    #[inline(always)]
71    pub fn sercom1_(&self) -> Sercom1_R {
72        Sercom1_R::new(((self.bits >> 3) & 1) != 0)
73    }
74    #[doc = "Bit 4 - SERCOM2 APB Clock Enable"]
75    #[inline(always)]
76    pub fn sercom2_(&self) -> Sercom2_R {
77        Sercom2_R::new(((self.bits >> 4) & 1) != 0)
78    }
79    #[doc = "Bit 5 - TCC0 APB Clock Enable"]
80    #[inline(always)]
81    pub fn tcc0_(&self) -> Tcc0_R {
82        Tcc0_R::new(((self.bits >> 5) & 1) != 0)
83    }
84    #[doc = "Bit 6 - TC1 APB Clock Enable"]
85    #[inline(always)]
86    pub fn tc1_(&self) -> Tc1_R {
87        Tc1_R::new(((self.bits >> 6) & 1) != 0)
88    }
89    #[doc = "Bit 7 - TC2 APB Clock Enable"]
90    #[inline(always)]
91    pub fn tc2_(&self) -> Tc2_R {
92        Tc2_R::new(((self.bits >> 7) & 1) != 0)
93    }
94    #[doc = "Bit 8 - ADC APB Clock Enable"]
95    #[inline(always)]
96    pub fn adc_(&self) -> Adc_R {
97        Adc_R::new(((self.bits >> 8) & 1) != 0)
98    }
99    #[doc = "Bit 9 - AC APB Clock Enable"]
100    #[inline(always)]
101    pub fn ac_(&self) -> Ac_R {
102        Ac_R::new(((self.bits >> 9) & 1) != 0)
103    }
104    #[doc = "Bit 10 - DAC APB Clock Enable"]
105    #[inline(always)]
106    pub fn dac_(&self) -> Dac_R {
107        Dac_R::new(((self.bits >> 10) & 1) != 0)
108    }
109    #[doc = "Bit 11 - PTC APB Clock Enable"]
110    #[inline(always)]
111    pub fn ptc_(&self) -> Ptc_R {
112        Ptc_R::new(((self.bits >> 11) & 1) != 0)
113    }
114}
115impl W {
116    #[doc = "Bit 0 - PAC2 APB Clock Enable"]
117    #[inline(always)]
118    #[must_use]
119    pub fn pac2_(&mut self) -> Pac2_W<ApbcmaskSpec> {
120        Pac2_W::new(self, 0)
121    }
122    #[doc = "Bit 1 - EVSYS APB Clock Enable"]
123    #[inline(always)]
124    #[must_use]
125    pub fn evsys_(&mut self) -> Evsys_W<ApbcmaskSpec> {
126        Evsys_W::new(self, 1)
127    }
128    #[doc = "Bit 2 - SERCOM0 APB Clock Enable"]
129    #[inline(always)]
130    #[must_use]
131    pub fn sercom0_(&mut self) -> Sercom0_W<ApbcmaskSpec> {
132        Sercom0_W::new(self, 2)
133    }
134    #[doc = "Bit 3 - SERCOM1 APB Clock Enable"]
135    #[inline(always)]
136    #[must_use]
137    pub fn sercom1_(&mut self) -> Sercom1_W<ApbcmaskSpec> {
138        Sercom1_W::new(self, 3)
139    }
140    #[doc = "Bit 4 - SERCOM2 APB Clock Enable"]
141    #[inline(always)]
142    #[must_use]
143    pub fn sercom2_(&mut self) -> Sercom2_W<ApbcmaskSpec> {
144        Sercom2_W::new(self, 4)
145    }
146    #[doc = "Bit 5 - TCC0 APB Clock Enable"]
147    #[inline(always)]
148    #[must_use]
149    pub fn tcc0_(&mut self) -> Tcc0_W<ApbcmaskSpec> {
150        Tcc0_W::new(self, 5)
151    }
152    #[doc = "Bit 6 - TC1 APB Clock Enable"]
153    #[inline(always)]
154    #[must_use]
155    pub fn tc1_(&mut self) -> Tc1_W<ApbcmaskSpec> {
156        Tc1_W::new(self, 6)
157    }
158    #[doc = "Bit 7 - TC2 APB Clock Enable"]
159    #[inline(always)]
160    #[must_use]
161    pub fn tc2_(&mut self) -> Tc2_W<ApbcmaskSpec> {
162        Tc2_W::new(self, 7)
163    }
164    #[doc = "Bit 8 - ADC APB Clock Enable"]
165    #[inline(always)]
166    #[must_use]
167    pub fn adc_(&mut self) -> Adc_W<ApbcmaskSpec> {
168        Adc_W::new(self, 8)
169    }
170    #[doc = "Bit 9 - AC APB Clock Enable"]
171    #[inline(always)]
172    #[must_use]
173    pub fn ac_(&mut self) -> Ac_W<ApbcmaskSpec> {
174        Ac_W::new(self, 9)
175    }
176    #[doc = "Bit 10 - DAC APB Clock Enable"]
177    #[inline(always)]
178    #[must_use]
179    pub fn dac_(&mut self) -> Dac_W<ApbcmaskSpec> {
180        Dac_W::new(self, 10)
181    }
182    #[doc = "Bit 11 - PTC APB Clock Enable"]
183    #[inline(always)]
184    #[must_use]
185    pub fn ptc_(&mut self) -> Ptc_W<ApbcmaskSpec> {
186        Ptc_W::new(self, 11)
187    }
188}
189#[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)."]
190pub struct ApbcmaskSpec;
191impl crate::RegisterSpec for ApbcmaskSpec {
192    type Ux = u32;
193}
194#[doc = "`read()` method returns [`apbcmask::R`](R) reader structure"]
195impl crate::Readable for ApbcmaskSpec {}
196#[doc = "`write(|w| ..)` method takes [`apbcmask::W`](W) writer structure"]
197impl crate::Writable for ApbcmaskSpec {
198    type Safety = crate::Unsafe;
199    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
200    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
201}
202#[doc = "`reset()` method sets APBCMASK to value 0x0100"]
203impl crate::Resettable for ApbcmaskSpec {
204    const RESET_VALUE: u32 = 0x0100;
205}