atsamd11d/pm/
ahbmask.rs

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