efm32pg22_pac/efm32pg22c200/smu_s/
ppupatd1.rs1#[doc = "Register `PPUPATD1` reader"]
2pub struct R(crate::R<PPUPATD1_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<PPUPATD1_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<PPUPATD1_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<PPUPATD1_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `PPUPATD1` writer"]
17pub struct W(crate::W<PPUPATD1_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<PPUPATD1_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<PPUPATD1_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<PPUPATD1_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `DCDC` reader - DCDC Privileged Access"]
38pub type DCDC_R = crate::BitReader<bool>;
39#[doc = "Field `DCDC` writer - DCDC Privileged Access"]
40pub type DCDC_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD1_SPEC, bool, O>;
41#[doc = "Field `PDM` reader - PDM Privileged Access"]
42pub type PDM_R = crate::BitReader<bool>;
43#[doc = "Field `PDM` writer - PDM Privileged Access"]
44pub type PDM_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD1_SPEC, bool, O>;
45#[doc = "Field `SMU` reader - SMU Privileged Access"]
46pub type SMU_R = crate::BitReader<bool>;
47#[doc = "Field `SMU` writer - SMU Privileged Access"]
48pub type SMU_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD1_SPEC, bool, O>;
49#[doc = "Field `SMUCFGNS` reader - SMUCFGNS Privileged Access"]
50pub type SMUCFGNS_R = crate::BitReader<bool>;
51#[doc = "Field `SMUCFGNS` writer - SMUCFGNS Privileged Access"]
52pub type SMUCFGNS_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD1_SPEC, bool, O>;
53#[doc = "Field `RTCC` reader - RTCC Privileged Access"]
54pub type RTCC_R = crate::BitReader<bool>;
55#[doc = "Field `RTCC` writer - RTCC Privileged Access"]
56pub type RTCC_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD1_SPEC, bool, O>;
57#[doc = "Field `LETIMER0` reader - LETIMER0 Privileged Access"]
58pub type LETIMER0_R = crate::BitReader<bool>;
59#[doc = "Field `LETIMER0` writer - LETIMER0 Privileged Access"]
60pub type LETIMER0_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD1_SPEC, bool, O>;
61#[doc = "Field `IADC0` reader - IADC0 Privileged Access"]
62pub type IADC0_R = crate::BitReader<bool>;
63#[doc = "Field `IADC0` writer - IADC0 Privileged Access"]
64pub type IADC0_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD1_SPEC, bool, O>;
65#[doc = "Field `I2C0` reader - I2C0 Privileged Access"]
66pub type I2C0_R = crate::BitReader<bool>;
67#[doc = "Field `I2C0` writer - I2C0 Privileged Access"]
68pub type I2C0_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD1_SPEC, bool, O>;
69#[doc = "Field `WDOG0` reader - WDOG0 Privileged Access"]
70pub type WDOG0_R = crate::BitReader<bool>;
71#[doc = "Field `WDOG0` writer - WDOG0 Privileged Access"]
72pub type WDOG0_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD1_SPEC, bool, O>;
73#[doc = "Field `AMUXCP0` reader - AMUXCP0 Privileged Access"]
74pub type AMUXCP0_R = crate::BitReader<bool>;
75#[doc = "Field `AMUXCP0` writer - AMUXCP0 Privileged Access"]
76pub type AMUXCP0_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD1_SPEC, bool, O>;
77#[doc = "Field `EUART0` reader - EUART0 Privileged Access"]
78pub type EUART0_R = crate::BitReader<bool>;
79#[doc = "Field `EUART0` writer - EUART0 Privileged Access"]
80pub type EUART0_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD1_SPEC, bool, O>;
81#[doc = "Field `CRYPTOACC` reader - CRYPTOACC Privileged Access"]
82pub type CRYPTOACC_R = crate::BitReader<bool>;
83#[doc = "Field `CRYPTOACC` writer - CRYPTOACC Privileged Access"]
84pub type CRYPTOACC_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD1_SPEC, bool, O>;
85impl R {
86 #[doc = "Bit 1 - DCDC Privileged Access"]
87 #[inline(always)]
88 pub fn dcdc(&self) -> DCDC_R {
89 DCDC_R::new(((self.bits >> 1) & 1) != 0)
90 }
91 #[doc = "Bit 2 - PDM Privileged Access"]
92 #[inline(always)]
93 pub fn pdm(&self) -> PDM_R {
94 PDM_R::new(((self.bits >> 2) & 1) != 0)
95 }
96 #[doc = "Bit 5 - SMU Privileged Access"]
97 #[inline(always)]
98 pub fn smu(&self) -> SMU_R {
99 SMU_R::new(((self.bits >> 5) & 1) != 0)
100 }
101 #[doc = "Bit 6 - SMUCFGNS Privileged Access"]
102 #[inline(always)]
103 pub fn smucfgns(&self) -> SMUCFGNS_R {
104 SMUCFGNS_R::new(((self.bits >> 6) & 1) != 0)
105 }
106 #[doc = "Bit 7 - RTCC Privileged Access"]
107 #[inline(always)]
108 pub fn rtcc(&self) -> RTCC_R {
109 RTCC_R::new(((self.bits >> 7) & 1) != 0)
110 }
111 #[doc = "Bit 8 - LETIMER0 Privileged Access"]
112 #[inline(always)]
113 pub fn letimer0(&self) -> LETIMER0_R {
114 LETIMER0_R::new(((self.bits >> 8) & 1) != 0)
115 }
116 #[doc = "Bit 9 - IADC0 Privileged Access"]
117 #[inline(always)]
118 pub fn iadc0(&self) -> IADC0_R {
119 IADC0_R::new(((self.bits >> 9) & 1) != 0)
120 }
121 #[doc = "Bit 10 - I2C0 Privileged Access"]
122 #[inline(always)]
123 pub fn i2c0(&self) -> I2C0_R {
124 I2C0_R::new(((self.bits >> 10) & 1) != 0)
125 }
126 #[doc = "Bit 11 - WDOG0 Privileged Access"]
127 #[inline(always)]
128 pub fn wdog0(&self) -> WDOG0_R {
129 WDOG0_R::new(((self.bits >> 11) & 1) != 0)
130 }
131 #[doc = "Bit 12 - AMUXCP0 Privileged Access"]
132 #[inline(always)]
133 pub fn amuxcp0(&self) -> AMUXCP0_R {
134 AMUXCP0_R::new(((self.bits >> 12) & 1) != 0)
135 }
136 #[doc = "Bit 13 - EUART0 Privileged Access"]
137 #[inline(always)]
138 pub fn euart0(&self) -> EUART0_R {
139 EUART0_R::new(((self.bits >> 13) & 1) != 0)
140 }
141 #[doc = "Bit 14 - CRYPTOACC Privileged Access"]
142 #[inline(always)]
143 pub fn cryptoacc(&self) -> CRYPTOACC_R {
144 CRYPTOACC_R::new(((self.bits >> 14) & 1) != 0)
145 }
146}
147impl W {
148 #[doc = "Bit 1 - DCDC Privileged Access"]
149 #[inline(always)]
150 #[must_use]
151 pub fn dcdc(&mut self) -> DCDC_W<1> {
152 DCDC_W::new(self)
153 }
154 #[doc = "Bit 2 - PDM Privileged Access"]
155 #[inline(always)]
156 #[must_use]
157 pub fn pdm(&mut self) -> PDM_W<2> {
158 PDM_W::new(self)
159 }
160 #[doc = "Bit 5 - SMU Privileged Access"]
161 #[inline(always)]
162 #[must_use]
163 pub fn smu(&mut self) -> SMU_W<5> {
164 SMU_W::new(self)
165 }
166 #[doc = "Bit 6 - SMUCFGNS Privileged Access"]
167 #[inline(always)]
168 #[must_use]
169 pub fn smucfgns(&mut self) -> SMUCFGNS_W<6> {
170 SMUCFGNS_W::new(self)
171 }
172 #[doc = "Bit 7 - RTCC Privileged Access"]
173 #[inline(always)]
174 #[must_use]
175 pub fn rtcc(&mut self) -> RTCC_W<7> {
176 RTCC_W::new(self)
177 }
178 #[doc = "Bit 8 - LETIMER0 Privileged Access"]
179 #[inline(always)]
180 #[must_use]
181 pub fn letimer0(&mut self) -> LETIMER0_W<8> {
182 LETIMER0_W::new(self)
183 }
184 #[doc = "Bit 9 - IADC0 Privileged Access"]
185 #[inline(always)]
186 #[must_use]
187 pub fn iadc0(&mut self) -> IADC0_W<9> {
188 IADC0_W::new(self)
189 }
190 #[doc = "Bit 10 - I2C0 Privileged Access"]
191 #[inline(always)]
192 #[must_use]
193 pub fn i2c0(&mut self) -> I2C0_W<10> {
194 I2C0_W::new(self)
195 }
196 #[doc = "Bit 11 - WDOG0 Privileged Access"]
197 #[inline(always)]
198 #[must_use]
199 pub fn wdog0(&mut self) -> WDOG0_W<11> {
200 WDOG0_W::new(self)
201 }
202 #[doc = "Bit 12 - AMUXCP0 Privileged Access"]
203 #[inline(always)]
204 #[must_use]
205 pub fn amuxcp0(&mut self) -> AMUXCP0_W<12> {
206 AMUXCP0_W::new(self)
207 }
208 #[doc = "Bit 13 - EUART0 Privileged Access"]
209 #[inline(always)]
210 #[must_use]
211 pub fn euart0(&mut self) -> EUART0_W<13> {
212 EUART0_W::new(self)
213 }
214 #[doc = "Bit 14 - CRYPTOACC Privileged Access"]
215 #[inline(always)]
216 #[must_use]
217 pub fn cryptoacc(&mut self) -> CRYPTOACC_W<14> {
218 CRYPTOACC_W::new(self)
219 }
220 #[doc = "Writes raw bits to the register."]
221 #[inline(always)]
222 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
223 self.0.bits(bits);
224 self
225 }
226}
227#[doc = "Set peripheral bits to 1 to mark as privileged access only.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ppupatd1](index.html) module"]
228pub struct PPUPATD1_SPEC;
229impl crate::RegisterSpec for PPUPATD1_SPEC {
230 type Ux = u32;
231}
232#[doc = "`read()` method returns [ppupatd1::R](R) reader structure"]
233impl crate::Readable for PPUPATD1_SPEC {
234 type Reader = R;
235}
236#[doc = "`write(|w| ..)` method takes [ppupatd1::W](W) writer structure"]
237impl crate::Writable for PPUPATD1_SPEC {
238 type Writer = W;
239 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
240 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
241}
242#[doc = "`reset()` method sets PPUPATD1 to value 0xffff"]
243impl crate::Resettable for PPUPATD1_SPEC {
244 const RESET_VALUE: Self::Ux = 0xffff;
245}