atsamd51g/pac/
statusb.rs

1#[doc = "Register `STATUSB` reader"]
2pub type R = crate::R<StatusbSpec>;
3#[doc = "Field `USB_` reader - USB APB Protect Enable"]
4pub type Usb_R = crate::BitReader;
5#[doc = "Field `DSU_` reader - DSU APB Protect Enable"]
6pub type Dsu_R = crate::BitReader;
7#[doc = "Field `NVMCTRL_` reader - NVMCTRL APB Protect Enable"]
8pub type Nvmctrl_R = crate::BitReader;
9#[doc = "Field `CMCC_` reader - CMCC APB Protect Enable"]
10pub type Cmcc_R = crate::BitReader;
11#[doc = "Field `PORT_` reader - PORT APB Protect Enable"]
12pub type Port_R = crate::BitReader;
13#[doc = "Field `DMAC_` reader - DMAC APB Protect Enable"]
14pub type Dmac_R = crate::BitReader;
15#[doc = "Field `EVSYS_` reader - EVSYS APB Protect Enable"]
16pub type Evsys_R = crate::BitReader;
17#[doc = "Field `SERCOM2_` reader - SERCOM2 APB Protect Enable"]
18pub type Sercom2_R = crate::BitReader;
19#[doc = "Field `SERCOM3_` reader - SERCOM3 APB Protect Enable"]
20pub type Sercom3_R = crate::BitReader;
21#[doc = "Field `TCC0_` reader - TCC0 APB Protect Enable"]
22pub type Tcc0_R = crate::BitReader;
23#[doc = "Field `TCC1_` reader - TCC1 APB Protect Enable"]
24pub type Tcc1_R = crate::BitReader;
25#[doc = "Field `TC2_` reader - TC2 APB Protect Enable"]
26pub type Tc2_R = crate::BitReader;
27#[doc = "Field `TC3_` reader - TC3 APB Protect Enable"]
28pub type Tc3_R = crate::BitReader;
29#[doc = "Field `RAMECC_` reader - RAMECC APB Protect Enable"]
30pub type Ramecc_R = crate::BitReader;
31impl R {
32    #[doc = "Bit 0 - USB APB Protect Enable"]
33    #[inline(always)]
34    pub fn usb_(&self) -> Usb_R {
35        Usb_R::new((self.bits & 1) != 0)
36    }
37    #[doc = "Bit 1 - DSU APB Protect Enable"]
38    #[inline(always)]
39    pub fn dsu_(&self) -> Dsu_R {
40        Dsu_R::new(((self.bits >> 1) & 1) != 0)
41    }
42    #[doc = "Bit 2 - NVMCTRL APB Protect Enable"]
43    #[inline(always)]
44    pub fn nvmctrl_(&self) -> Nvmctrl_R {
45        Nvmctrl_R::new(((self.bits >> 2) & 1) != 0)
46    }
47    #[doc = "Bit 3 - CMCC APB Protect Enable"]
48    #[inline(always)]
49    pub fn cmcc_(&self) -> Cmcc_R {
50        Cmcc_R::new(((self.bits >> 3) & 1) != 0)
51    }
52    #[doc = "Bit 4 - PORT APB Protect Enable"]
53    #[inline(always)]
54    pub fn port_(&self) -> Port_R {
55        Port_R::new(((self.bits >> 4) & 1) != 0)
56    }
57    #[doc = "Bit 5 - DMAC APB Protect Enable"]
58    #[inline(always)]
59    pub fn dmac_(&self) -> Dmac_R {
60        Dmac_R::new(((self.bits >> 5) & 1) != 0)
61    }
62    #[doc = "Bit 7 - EVSYS APB Protect Enable"]
63    #[inline(always)]
64    pub fn evsys_(&self) -> Evsys_R {
65        Evsys_R::new(((self.bits >> 7) & 1) != 0)
66    }
67    #[doc = "Bit 9 - SERCOM2 APB Protect Enable"]
68    #[inline(always)]
69    pub fn sercom2_(&self) -> Sercom2_R {
70        Sercom2_R::new(((self.bits >> 9) & 1) != 0)
71    }
72    #[doc = "Bit 10 - SERCOM3 APB Protect Enable"]
73    #[inline(always)]
74    pub fn sercom3_(&self) -> Sercom3_R {
75        Sercom3_R::new(((self.bits >> 10) & 1) != 0)
76    }
77    #[doc = "Bit 11 - TCC0 APB Protect Enable"]
78    #[inline(always)]
79    pub fn tcc0_(&self) -> Tcc0_R {
80        Tcc0_R::new(((self.bits >> 11) & 1) != 0)
81    }
82    #[doc = "Bit 12 - TCC1 APB Protect Enable"]
83    #[inline(always)]
84    pub fn tcc1_(&self) -> Tcc1_R {
85        Tcc1_R::new(((self.bits >> 12) & 1) != 0)
86    }
87    #[doc = "Bit 13 - TC2 APB Protect Enable"]
88    #[inline(always)]
89    pub fn tc2_(&self) -> Tc2_R {
90        Tc2_R::new(((self.bits >> 13) & 1) != 0)
91    }
92    #[doc = "Bit 14 - TC3 APB Protect Enable"]
93    #[inline(always)]
94    pub fn tc3_(&self) -> Tc3_R {
95        Tc3_R::new(((self.bits >> 14) & 1) != 0)
96    }
97    #[doc = "Bit 16 - RAMECC APB Protect Enable"]
98    #[inline(always)]
99    pub fn ramecc_(&self) -> Ramecc_R {
100        Ramecc_R::new(((self.bits >> 16) & 1) != 0)
101    }
102}
103#[doc = "Peripheral write protection status - Bridge B\n\nYou can [`read`](crate::Reg::read) this register and get [`statusb::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
104pub struct StatusbSpec;
105impl crate::RegisterSpec for StatusbSpec {
106    type Ux = u32;
107}
108#[doc = "`read()` method returns [`statusb::R`](R) reader structure"]
109impl crate::Readable for StatusbSpec {}
110#[doc = "`reset()` method sets STATUSB to value 0x02"]
111impl crate::Resettable for StatusbSpec {
112    const RESET_VALUE: u32 = 0x02;
113}