atsamd51n/pac/
statusa.rs

1#[doc = "Register `STATUSA` reader"]
2pub type R = crate::R<StatusaSpec>;
3#[doc = "Field `PAC_` reader - PAC APB Protect Enable"]
4pub type Pac_R = crate::BitReader;
5#[doc = "Field `PM_` reader - PM APB Protect Enable"]
6pub type Pm_R = crate::BitReader;
7#[doc = "Field `MCLK_` reader - MCLK APB Protect Enable"]
8pub type Mclk_R = crate::BitReader;
9#[doc = "Field `RSTC_` reader - RSTC APB Protect Enable"]
10pub type Rstc_R = crate::BitReader;
11#[doc = "Field `OSCCTRL_` reader - OSCCTRL APB Protect Enable"]
12pub type Oscctrl_R = crate::BitReader;
13#[doc = "Field `OSC32KCTRL_` reader - OSC32KCTRL APB Protect Enable"]
14pub type Osc32kctrl_R = crate::BitReader;
15#[doc = "Field `SUPC_` reader - SUPC APB Protect Enable"]
16pub type Supc_R = crate::BitReader;
17#[doc = "Field `GCLK_` reader - GCLK APB Protect Enable"]
18pub type Gclk_R = crate::BitReader;
19#[doc = "Field `WDT_` reader - WDT APB Protect Enable"]
20pub type Wdt_R = crate::BitReader;
21#[doc = "Field `RTC_` reader - RTC APB Protect Enable"]
22pub type Rtc_R = crate::BitReader;
23#[doc = "Field `EIC_` reader - EIC APB Protect Enable"]
24pub type Eic_R = crate::BitReader;
25#[doc = "Field `FREQM_` reader - FREQM APB Protect Enable"]
26pub type Freqm_R = crate::BitReader;
27#[doc = "Field `SERCOM0_` reader - SERCOM0 APB Protect Enable"]
28pub type Sercom0_R = crate::BitReader;
29#[doc = "Field `SERCOM1_` reader - SERCOM1 APB Protect Enable"]
30pub type Sercom1_R = crate::BitReader;
31#[doc = "Field `TC0_` reader - TC0 APB Protect Enable"]
32pub type Tc0_R = crate::BitReader;
33#[doc = "Field `TC1_` reader - TC1 APB Protect Enable"]
34pub type Tc1_R = crate::BitReader;
35impl R {
36    #[doc = "Bit 0 - PAC APB Protect Enable"]
37    #[inline(always)]
38    pub fn pac_(&self) -> Pac_R {
39        Pac_R::new((self.bits & 1) != 0)
40    }
41    #[doc = "Bit 1 - PM APB Protect Enable"]
42    #[inline(always)]
43    pub fn pm_(&self) -> Pm_R {
44        Pm_R::new(((self.bits >> 1) & 1) != 0)
45    }
46    #[doc = "Bit 2 - MCLK APB Protect Enable"]
47    #[inline(always)]
48    pub fn mclk_(&self) -> Mclk_R {
49        Mclk_R::new(((self.bits >> 2) & 1) != 0)
50    }
51    #[doc = "Bit 3 - RSTC APB Protect Enable"]
52    #[inline(always)]
53    pub fn rstc_(&self) -> Rstc_R {
54        Rstc_R::new(((self.bits >> 3) & 1) != 0)
55    }
56    #[doc = "Bit 4 - OSCCTRL APB Protect Enable"]
57    #[inline(always)]
58    pub fn oscctrl_(&self) -> Oscctrl_R {
59        Oscctrl_R::new(((self.bits >> 4) & 1) != 0)
60    }
61    #[doc = "Bit 5 - OSC32KCTRL APB Protect Enable"]
62    #[inline(always)]
63    pub fn osc32kctrl_(&self) -> Osc32kctrl_R {
64        Osc32kctrl_R::new(((self.bits >> 5) & 1) != 0)
65    }
66    #[doc = "Bit 6 - SUPC APB Protect Enable"]
67    #[inline(always)]
68    pub fn supc_(&self) -> Supc_R {
69        Supc_R::new(((self.bits >> 6) & 1) != 0)
70    }
71    #[doc = "Bit 7 - GCLK APB Protect Enable"]
72    #[inline(always)]
73    pub fn gclk_(&self) -> Gclk_R {
74        Gclk_R::new(((self.bits >> 7) & 1) != 0)
75    }
76    #[doc = "Bit 8 - WDT APB Protect Enable"]
77    #[inline(always)]
78    pub fn wdt_(&self) -> Wdt_R {
79        Wdt_R::new(((self.bits >> 8) & 1) != 0)
80    }
81    #[doc = "Bit 9 - RTC APB Protect Enable"]
82    #[inline(always)]
83    pub fn rtc_(&self) -> Rtc_R {
84        Rtc_R::new(((self.bits >> 9) & 1) != 0)
85    }
86    #[doc = "Bit 10 - EIC APB Protect Enable"]
87    #[inline(always)]
88    pub fn eic_(&self) -> Eic_R {
89        Eic_R::new(((self.bits >> 10) & 1) != 0)
90    }
91    #[doc = "Bit 11 - FREQM APB Protect Enable"]
92    #[inline(always)]
93    pub fn freqm_(&self) -> Freqm_R {
94        Freqm_R::new(((self.bits >> 11) & 1) != 0)
95    }
96    #[doc = "Bit 12 - SERCOM0 APB Protect Enable"]
97    #[inline(always)]
98    pub fn sercom0_(&self) -> Sercom0_R {
99        Sercom0_R::new(((self.bits >> 12) & 1) != 0)
100    }
101    #[doc = "Bit 13 - SERCOM1 APB Protect Enable"]
102    #[inline(always)]
103    pub fn sercom1_(&self) -> Sercom1_R {
104        Sercom1_R::new(((self.bits >> 13) & 1) != 0)
105    }
106    #[doc = "Bit 14 - TC0 APB Protect Enable"]
107    #[inline(always)]
108    pub fn tc0_(&self) -> Tc0_R {
109        Tc0_R::new(((self.bits >> 14) & 1) != 0)
110    }
111    #[doc = "Bit 15 - TC1 APB Protect Enable"]
112    #[inline(always)]
113    pub fn tc1_(&self) -> Tc1_R {
114        Tc1_R::new(((self.bits >> 15) & 1) != 0)
115    }
116}
117#[doc = "Peripheral write protection status - Bridge A\n\nYou can [`read`](crate::Reg::read) this register and get [`statusa::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
118pub struct StatusaSpec;
119impl crate::RegisterSpec for StatusaSpec {
120    type Ux = u32;
121}
122#[doc = "`read()` method returns [`statusa::R`](R) reader structure"]
123impl crate::Readable for StatusaSpec {}
124#[doc = "`reset()` method sets STATUSA to value 0x0001_0000"]
125impl crate::Resettable for StatusaSpec {
126    const RESET_VALUE: u32 = 0x0001_0000;
127}