atsamd11d/pm/
apbbmask.rs

1#[doc = "Register `APBBMASK` reader"]
2pub type R = crate::R<ApbbmaskSpec>;
3#[doc = "Register `APBBMASK` writer"]
4pub type W = crate::W<ApbbmaskSpec>;
5#[doc = "Field `PAC1_` reader - PAC1 APB Clock Enable"]
6pub type Pac1_R = crate::BitReader;
7#[doc = "Field `PAC1_` writer - PAC1 APB Clock Enable"]
8pub type Pac1_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `DSU_` reader - DSU APB Clock Enable"]
10pub type Dsu_R = crate::BitReader;
11#[doc = "Field `DSU_` writer - DSU APB Clock Enable"]
12pub type Dsu_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `NVMCTRL_` reader - NVMCTRL APB Clock Enable"]
14pub type Nvmctrl_R = crate::BitReader;
15#[doc = "Field `NVMCTRL_` writer - NVMCTRL APB Clock Enable"]
16pub type Nvmctrl_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `PORT_` reader - PORT APB Clock Enable"]
18pub type Port_R = crate::BitReader;
19#[doc = "Field `PORT_` writer - PORT APB Clock Enable"]
20pub type Port_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `DMAC_` reader - DMAC APB Clock Enable"]
22pub type Dmac_R = crate::BitReader;
23#[doc = "Field `DMAC_` writer - DMAC APB Clock Enable"]
24pub type Dmac_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `USB_` reader - USB APB Clock Enable"]
26pub type Usb_R = crate::BitReader;
27#[doc = "Field `USB_` writer - USB APB Clock Enable"]
28pub type Usb_W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `HMATRIX_` reader - HMATRIX APB Clock Enable"]
30pub type Hmatrix_R = crate::BitReader;
31#[doc = "Field `HMATRIX_` writer - HMATRIX APB Clock Enable"]
32pub type Hmatrix_W<'a, REG> = crate::BitWriter<'a, REG>;
33impl R {
34    #[doc = "Bit 0 - PAC1 APB Clock Enable"]
35    #[inline(always)]
36    pub fn pac1_(&self) -> Pac1_R {
37        Pac1_R::new((self.bits & 1) != 0)
38    }
39    #[doc = "Bit 1 - DSU APB Clock Enable"]
40    #[inline(always)]
41    pub fn dsu_(&self) -> Dsu_R {
42        Dsu_R::new(((self.bits >> 1) & 1) != 0)
43    }
44    #[doc = "Bit 2 - NVMCTRL APB Clock Enable"]
45    #[inline(always)]
46    pub fn nvmctrl_(&self) -> Nvmctrl_R {
47        Nvmctrl_R::new(((self.bits >> 2) & 1) != 0)
48    }
49    #[doc = "Bit 3 - PORT APB Clock Enable"]
50    #[inline(always)]
51    pub fn port_(&self) -> Port_R {
52        Port_R::new(((self.bits >> 3) & 1) != 0)
53    }
54    #[doc = "Bit 4 - DMAC APB Clock Enable"]
55    #[inline(always)]
56    pub fn dmac_(&self) -> Dmac_R {
57        Dmac_R::new(((self.bits >> 4) & 1) != 0)
58    }
59    #[doc = "Bit 5 - USB APB Clock Enable"]
60    #[inline(always)]
61    pub fn usb_(&self) -> Usb_R {
62        Usb_R::new(((self.bits >> 5) & 1) != 0)
63    }
64    #[doc = "Bit 6 - HMATRIX APB Clock Enable"]
65    #[inline(always)]
66    pub fn hmatrix_(&self) -> Hmatrix_R {
67        Hmatrix_R::new(((self.bits >> 6) & 1) != 0)
68    }
69}
70impl W {
71    #[doc = "Bit 0 - PAC1 APB Clock Enable"]
72    #[inline(always)]
73    #[must_use]
74    pub fn pac1_(&mut self) -> Pac1_W<ApbbmaskSpec> {
75        Pac1_W::new(self, 0)
76    }
77    #[doc = "Bit 1 - DSU APB Clock Enable"]
78    #[inline(always)]
79    #[must_use]
80    pub fn dsu_(&mut self) -> Dsu_W<ApbbmaskSpec> {
81        Dsu_W::new(self, 1)
82    }
83    #[doc = "Bit 2 - NVMCTRL APB Clock Enable"]
84    #[inline(always)]
85    #[must_use]
86    pub fn nvmctrl_(&mut self) -> Nvmctrl_W<ApbbmaskSpec> {
87        Nvmctrl_W::new(self, 2)
88    }
89    #[doc = "Bit 3 - PORT APB Clock Enable"]
90    #[inline(always)]
91    #[must_use]
92    pub fn port_(&mut self) -> Port_W<ApbbmaskSpec> {
93        Port_W::new(self, 3)
94    }
95    #[doc = "Bit 4 - DMAC APB Clock Enable"]
96    #[inline(always)]
97    #[must_use]
98    pub fn dmac_(&mut self) -> Dmac_W<ApbbmaskSpec> {
99        Dmac_W::new(self, 4)
100    }
101    #[doc = "Bit 5 - USB APB Clock Enable"]
102    #[inline(always)]
103    #[must_use]
104    pub fn usb_(&mut self) -> Usb_W<ApbbmaskSpec> {
105        Usb_W::new(self, 5)
106    }
107    #[doc = "Bit 6 - HMATRIX APB Clock Enable"]
108    #[inline(always)]
109    #[must_use]
110    pub fn hmatrix_(&mut self) -> Hmatrix_W<ApbbmaskSpec> {
111        Hmatrix_W::new(self, 6)
112    }
113}
114#[doc = "APBB Mask\n\nYou can [`read`](crate::Reg::read) this register and get [`apbbmask::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`apbbmask::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
115pub struct ApbbmaskSpec;
116impl crate::RegisterSpec for ApbbmaskSpec {
117    type Ux = u32;
118}
119#[doc = "`read()` method returns [`apbbmask::R`](R) reader structure"]
120impl crate::Readable for ApbbmaskSpec {}
121#[doc = "`write(|w| ..)` method takes [`apbbmask::W`](W) writer structure"]
122impl crate::Writable for ApbbmaskSpec {
123    type Safety = crate::Unsafe;
124    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
125    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
126}
127#[doc = "`reset()` method sets APBBMASK to value 0x7f"]
128impl crate::Resettable for ApbbmaskSpec {
129    const RESET_VALUE: u32 = 0x7f;
130}