atsamd51g/mclk/
apbdmask.rs

1#[doc = "Register `APBDMASK` reader"]
2pub type R = crate::R<ApbdmaskSpec>;
3#[doc = "Register `APBDMASK` writer"]
4pub type W = crate::W<ApbdmaskSpec>;
5#[doc = "Field `SERCOM4_` reader - SERCOM4 APB Clock Enable"]
6pub type Sercom4_R = crate::BitReader;
7#[doc = "Field `SERCOM4_` writer - SERCOM4 APB Clock Enable"]
8pub type Sercom4_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `SERCOM5_` reader - SERCOM5 APB Clock Enable"]
10pub type Sercom5_R = crate::BitReader;
11#[doc = "Field `SERCOM5_` writer - SERCOM5 APB Clock Enable"]
12pub type Sercom5_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `ADC0_` reader - ADC0 APB Clock Enable"]
14pub type Adc0_R = crate::BitReader;
15#[doc = "Field `ADC0_` writer - ADC0 APB Clock Enable"]
16pub type Adc0_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `ADC1_` reader - ADC1 APB Clock Enable"]
18pub type Adc1_R = crate::BitReader;
19#[doc = "Field `ADC1_` writer - ADC1 APB Clock Enable"]
20pub type Adc1_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `DAC_` reader - DAC APB Clock Enable"]
22pub type Dac_R = crate::BitReader;
23#[doc = "Field `DAC_` writer - DAC APB Clock Enable"]
24pub type Dac_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `PCC_` reader - PCC APB Clock Enable"]
26pub type Pcc_R = crate::BitReader;
27#[doc = "Field `PCC_` writer - PCC APB Clock Enable"]
28pub type Pcc_W<'a, REG> = crate::BitWriter<'a, REG>;
29impl R {
30    #[doc = "Bit 0 - SERCOM4 APB Clock Enable"]
31    #[inline(always)]
32    pub fn sercom4_(&self) -> Sercom4_R {
33        Sercom4_R::new((self.bits & 1) != 0)
34    }
35    #[doc = "Bit 1 - SERCOM5 APB Clock Enable"]
36    #[inline(always)]
37    pub fn sercom5_(&self) -> Sercom5_R {
38        Sercom5_R::new(((self.bits >> 1) & 1) != 0)
39    }
40    #[doc = "Bit 7 - ADC0 APB Clock Enable"]
41    #[inline(always)]
42    pub fn adc0_(&self) -> Adc0_R {
43        Adc0_R::new(((self.bits >> 7) & 1) != 0)
44    }
45    #[doc = "Bit 8 - ADC1 APB Clock Enable"]
46    #[inline(always)]
47    pub fn adc1_(&self) -> Adc1_R {
48        Adc1_R::new(((self.bits >> 8) & 1) != 0)
49    }
50    #[doc = "Bit 9 - DAC APB Clock Enable"]
51    #[inline(always)]
52    pub fn dac_(&self) -> Dac_R {
53        Dac_R::new(((self.bits >> 9) & 1) != 0)
54    }
55    #[doc = "Bit 11 - PCC APB Clock Enable"]
56    #[inline(always)]
57    pub fn pcc_(&self) -> Pcc_R {
58        Pcc_R::new(((self.bits >> 11) & 1) != 0)
59    }
60}
61impl W {
62    #[doc = "Bit 0 - SERCOM4 APB Clock Enable"]
63    #[inline(always)]
64    #[must_use]
65    pub fn sercom4_(&mut self) -> Sercom4_W<ApbdmaskSpec> {
66        Sercom4_W::new(self, 0)
67    }
68    #[doc = "Bit 1 - SERCOM5 APB Clock Enable"]
69    #[inline(always)]
70    #[must_use]
71    pub fn sercom5_(&mut self) -> Sercom5_W<ApbdmaskSpec> {
72        Sercom5_W::new(self, 1)
73    }
74    #[doc = "Bit 7 - ADC0 APB Clock Enable"]
75    #[inline(always)]
76    #[must_use]
77    pub fn adc0_(&mut self) -> Adc0_W<ApbdmaskSpec> {
78        Adc0_W::new(self, 7)
79    }
80    #[doc = "Bit 8 - ADC1 APB Clock Enable"]
81    #[inline(always)]
82    #[must_use]
83    pub fn adc1_(&mut self) -> Adc1_W<ApbdmaskSpec> {
84        Adc1_W::new(self, 8)
85    }
86    #[doc = "Bit 9 - DAC APB Clock Enable"]
87    #[inline(always)]
88    #[must_use]
89    pub fn dac_(&mut self) -> Dac_W<ApbdmaskSpec> {
90        Dac_W::new(self, 9)
91    }
92    #[doc = "Bit 11 - PCC APB Clock Enable"]
93    #[inline(always)]
94    #[must_use]
95    pub fn pcc_(&mut self) -> Pcc_W<ApbdmaskSpec> {
96        Pcc_W::new(self, 11)
97    }
98}
99#[doc = "APBD Mask\n\nYou can [`read`](crate::Reg::read) this register and get [`apbdmask::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`apbdmask::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
100pub struct ApbdmaskSpec;
101impl crate::RegisterSpec for ApbdmaskSpec {
102    type Ux = u32;
103}
104#[doc = "`read()` method returns [`apbdmask::R`](R) reader structure"]
105impl crate::Readable for ApbdmaskSpec {}
106#[doc = "`write(|w| ..)` method takes [`apbdmask::W`](W) writer structure"]
107impl crate::Writable for ApbdmaskSpec {
108    type Safety = crate::Unsafe;
109    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
110    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
111}
112#[doc = "`reset()` method sets APBDMASK to value 0"]
113impl crate::Resettable for ApbdmaskSpec {
114    const RESET_VALUE: u32 = 0;
115}