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