efm32jg12b_pac/efm32jg12b500/smu/
ppupatd0.rs1#[doc = "Register `PPUPATD0` reader"]
2pub struct R(crate::R<PPUPATD0_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<PPUPATD0_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<PPUPATD0_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<PPUPATD0_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `PPUPATD0` writer"]
17pub struct W(crate::W<PPUPATD0_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<PPUPATD0_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<PPUPATD0_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<PPUPATD0_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `ACMP0` reader - Analog Comparator 0 access control bit"]
38pub type ACMP0_R = crate::BitReader<bool>;
39#[doc = "Field `ACMP0` writer - Analog Comparator 0 access control bit"]
40pub type ACMP0_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD0_SPEC, bool, O>;
41#[doc = "Field `ACMP1` reader - Analog Comparator 1 access control bit"]
42pub type ACMP1_R = crate::BitReader<bool>;
43#[doc = "Field `ACMP1` writer - Analog Comparator 1 access control bit"]
44pub type ACMP1_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD0_SPEC, bool, O>;
45#[doc = "Field `ADC0` reader - Analog to Digital Converter 0 access control bit"]
46pub type ADC0_R = crate::BitReader<bool>;
47#[doc = "Field `ADC0` writer - Analog to Digital Converter 0 access control bit"]
48pub type ADC0_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD0_SPEC, bool, O>;
49#[doc = "Field `CMU` reader - Clock Management Unit access control bit"]
50pub type CMU_R = crate::BitReader<bool>;
51#[doc = "Field `CMU` writer - Clock Management Unit access control bit"]
52pub type CMU_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD0_SPEC, bool, O>;
53#[doc = "Field `CRYOTIMER` reader - CRYOTIMER access control bit"]
54pub type CRYOTIMER_R = crate::BitReader<bool>;
55#[doc = "Field `CRYOTIMER` writer - CRYOTIMER access control bit"]
56pub type CRYOTIMER_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD0_SPEC, bool, O>;
57#[doc = "Field `CRYPTO0` reader - Advanced Encryption Standard Accelerator 0 access control bit"]
58pub type CRYPTO0_R = crate::BitReader<bool>;
59#[doc = "Field `CRYPTO0` writer - Advanced Encryption Standard Accelerator 0 access control bit"]
60pub type CRYPTO0_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD0_SPEC, bool, O>;
61#[doc = "Field `CRYPTO1` reader - Advanced Encryption Standard Accelerator 1 access control bit"]
62pub type CRYPTO1_R = crate::BitReader<bool>;
63#[doc = "Field `CRYPTO1` writer - Advanced Encryption Standard Accelerator 1 access control bit"]
64pub type CRYPTO1_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD0_SPEC, bool, O>;
65#[doc = "Field `CSEN` reader - Capacitive touch sense module access control bit"]
66pub type CSEN_R = crate::BitReader<bool>;
67#[doc = "Field `CSEN` writer - Capacitive touch sense module access control bit"]
68pub type CSEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD0_SPEC, bool, O>;
69#[doc = "Field `VDAC0` reader - Digital to Analog Converter 0 access control bit"]
70pub type VDAC0_R = crate::BitReader<bool>;
71#[doc = "Field `VDAC0` writer - Digital to Analog Converter 0 access control bit"]
72pub type VDAC0_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD0_SPEC, bool, O>;
73#[doc = "Field `PRS` reader - Peripheral Reflex System access control bit"]
74pub type PRS_R = crate::BitReader<bool>;
75#[doc = "Field `PRS` writer - Peripheral Reflex System access control bit"]
76pub type PRS_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD0_SPEC, bool, O>;
77#[doc = "Field `EMU` reader - Energy Management Unit access control bit"]
78pub type EMU_R = crate::BitReader<bool>;
79#[doc = "Field `EMU` writer - Energy Management Unit access control bit"]
80pub type EMU_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD0_SPEC, bool, O>;
81#[doc = "Field `FPUEH` reader - FPU Exception Handler access control bit"]
82pub type FPUEH_R = crate::BitReader<bool>;
83#[doc = "Field `FPUEH` writer - FPU Exception Handler access control bit"]
84pub type FPUEH_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD0_SPEC, bool, O>;
85#[doc = "Field `GPCRC` reader - General Purpose CRC access control bit"]
86pub type GPCRC_R = crate::BitReader<bool>;
87#[doc = "Field `GPCRC` writer - General Purpose CRC access control bit"]
88pub type GPCRC_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD0_SPEC, bool, O>;
89#[doc = "Field `GPIO` reader - General purpose Input/Output access control bit"]
90pub type GPIO_R = crate::BitReader<bool>;
91#[doc = "Field `GPIO` writer - General purpose Input/Output access control bit"]
92pub type GPIO_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD0_SPEC, bool, O>;
93#[doc = "Field `I2C0` reader - I2C 0 access control bit"]
94pub type I2C0_R = crate::BitReader<bool>;
95#[doc = "Field `I2C0` writer - I2C 0 access control bit"]
96pub type I2C0_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD0_SPEC, bool, O>;
97#[doc = "Field `I2C1` reader - I2C 1 access control bit"]
98pub type I2C1_R = crate::BitReader<bool>;
99#[doc = "Field `I2C1` writer - I2C 1 access control bit"]
100pub type I2C1_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD0_SPEC, bool, O>;
101#[doc = "Field `IDAC0` reader - Current Digital to Analog Converter 0 access control bit"]
102pub type IDAC0_R = crate::BitReader<bool>;
103#[doc = "Field `IDAC0` writer - Current Digital to Analog Converter 0 access control bit"]
104pub type IDAC0_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD0_SPEC, bool, O>;
105#[doc = "Field `MSC` reader - Memory System Controller access control bit"]
106pub type MSC_R = crate::BitReader<bool>;
107#[doc = "Field `MSC` writer - Memory System Controller access control bit"]
108pub type MSC_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD0_SPEC, bool, O>;
109#[doc = "Field `LDMA` reader - Linked Direct Memory Access Controller access control bit"]
110pub type LDMA_R = crate::BitReader<bool>;
111#[doc = "Field `LDMA` writer - Linked Direct Memory Access Controller access control bit"]
112pub type LDMA_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD0_SPEC, bool, O>;
113#[doc = "Field `LESENSE` reader - Low Energy Sensor Interface access control bit"]
114pub type LESENSE_R = crate::BitReader<bool>;
115#[doc = "Field `LESENSE` writer - Low Energy Sensor Interface access control bit"]
116pub type LESENSE_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD0_SPEC, bool, O>;
117#[doc = "Field `LETIMER0` reader - Low Energy Timer 0 access control bit"]
118pub type LETIMER0_R = crate::BitReader<bool>;
119#[doc = "Field `LETIMER0` writer - Low Energy Timer 0 access control bit"]
120pub type LETIMER0_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD0_SPEC, bool, O>;
121#[doc = "Field `LEUART0` reader - Low Energy UART 0 access control bit"]
122pub type LEUART0_R = crate::BitReader<bool>;
123#[doc = "Field `LEUART0` writer - Low Energy UART 0 access control bit"]
124pub type LEUART0_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD0_SPEC, bool, O>;
125#[doc = "Field `PCNT0` reader - Pulse Counter 0 access control bit"]
126pub type PCNT0_R = crate::BitReader<bool>;
127#[doc = "Field `PCNT0` writer - Pulse Counter 0 access control bit"]
128pub type PCNT0_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD0_SPEC, bool, O>;
129#[doc = "Field `PCNT1` reader - Pulse Counter 1 access control bit"]
130pub type PCNT1_R = crate::BitReader<bool>;
131#[doc = "Field `PCNT1` writer - Pulse Counter 1 access control bit"]
132pub type PCNT1_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD0_SPEC, bool, O>;
133#[doc = "Field `PCNT2` reader - Pulse Counter 2 access control bit"]
134pub type PCNT2_R = crate::BitReader<bool>;
135#[doc = "Field `PCNT2` writer - Pulse Counter 2 access control bit"]
136pub type PCNT2_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPUPATD0_SPEC, bool, O>;
137impl R {
138 #[doc = "Bit 0 - Analog Comparator 0 access control bit"]
139 #[inline(always)]
140 pub fn acmp0(&self) -> ACMP0_R {
141 ACMP0_R::new((self.bits & 1) != 0)
142 }
143 #[doc = "Bit 1 - Analog Comparator 1 access control bit"]
144 #[inline(always)]
145 pub fn acmp1(&self) -> ACMP1_R {
146 ACMP1_R::new(((self.bits >> 1) & 1) != 0)
147 }
148 #[doc = "Bit 2 - Analog to Digital Converter 0 access control bit"]
149 #[inline(always)]
150 pub fn adc0(&self) -> ADC0_R {
151 ADC0_R::new(((self.bits >> 2) & 1) != 0)
152 }
153 #[doc = "Bit 5 - Clock Management Unit access control bit"]
154 #[inline(always)]
155 pub fn cmu(&self) -> CMU_R {
156 CMU_R::new(((self.bits >> 5) & 1) != 0)
157 }
158 #[doc = "Bit 7 - CRYOTIMER access control bit"]
159 #[inline(always)]
160 pub fn cryotimer(&self) -> CRYOTIMER_R {
161 CRYOTIMER_R::new(((self.bits >> 7) & 1) != 0)
162 }
163 #[doc = "Bit 8 - Advanced Encryption Standard Accelerator 0 access control bit"]
164 #[inline(always)]
165 pub fn crypto0(&self) -> CRYPTO0_R {
166 CRYPTO0_R::new(((self.bits >> 8) & 1) != 0)
167 }
168 #[doc = "Bit 9 - Advanced Encryption Standard Accelerator 1 access control bit"]
169 #[inline(always)]
170 pub fn crypto1(&self) -> CRYPTO1_R {
171 CRYPTO1_R::new(((self.bits >> 9) & 1) != 0)
172 }
173 #[doc = "Bit 10 - Capacitive touch sense module access control bit"]
174 #[inline(always)]
175 pub fn csen(&self) -> CSEN_R {
176 CSEN_R::new(((self.bits >> 10) & 1) != 0)
177 }
178 #[doc = "Bit 11 - Digital to Analog Converter 0 access control bit"]
179 #[inline(always)]
180 pub fn vdac0(&self) -> VDAC0_R {
181 VDAC0_R::new(((self.bits >> 11) & 1) != 0)
182 }
183 #[doc = "Bit 12 - Peripheral Reflex System access control bit"]
184 #[inline(always)]
185 pub fn prs(&self) -> PRS_R {
186 PRS_R::new(((self.bits >> 12) & 1) != 0)
187 }
188 #[doc = "Bit 13 - Energy Management Unit access control bit"]
189 #[inline(always)]
190 pub fn emu(&self) -> EMU_R {
191 EMU_R::new(((self.bits >> 13) & 1) != 0)
192 }
193 #[doc = "Bit 14 - FPU Exception Handler access control bit"]
194 #[inline(always)]
195 pub fn fpueh(&self) -> FPUEH_R {
196 FPUEH_R::new(((self.bits >> 14) & 1) != 0)
197 }
198 #[doc = "Bit 16 - General Purpose CRC access control bit"]
199 #[inline(always)]
200 pub fn gpcrc(&self) -> GPCRC_R {
201 GPCRC_R::new(((self.bits >> 16) & 1) != 0)
202 }
203 #[doc = "Bit 17 - General purpose Input/Output access control bit"]
204 #[inline(always)]
205 pub fn gpio(&self) -> GPIO_R {
206 GPIO_R::new(((self.bits >> 17) & 1) != 0)
207 }
208 #[doc = "Bit 18 - I2C 0 access control bit"]
209 #[inline(always)]
210 pub fn i2c0(&self) -> I2C0_R {
211 I2C0_R::new(((self.bits >> 18) & 1) != 0)
212 }
213 #[doc = "Bit 19 - I2C 1 access control bit"]
214 #[inline(always)]
215 pub fn i2c1(&self) -> I2C1_R {
216 I2C1_R::new(((self.bits >> 19) & 1) != 0)
217 }
218 #[doc = "Bit 20 - Current Digital to Analog Converter 0 access control bit"]
219 #[inline(always)]
220 pub fn idac0(&self) -> IDAC0_R {
221 IDAC0_R::new(((self.bits >> 20) & 1) != 0)
222 }
223 #[doc = "Bit 21 - Memory System Controller access control bit"]
224 #[inline(always)]
225 pub fn msc(&self) -> MSC_R {
226 MSC_R::new(((self.bits >> 21) & 1) != 0)
227 }
228 #[doc = "Bit 22 - Linked Direct Memory Access Controller access control bit"]
229 #[inline(always)]
230 pub fn ldma(&self) -> LDMA_R {
231 LDMA_R::new(((self.bits >> 22) & 1) != 0)
232 }
233 #[doc = "Bit 23 - Low Energy Sensor Interface access control bit"]
234 #[inline(always)]
235 pub fn lesense(&self) -> LESENSE_R {
236 LESENSE_R::new(((self.bits >> 23) & 1) != 0)
237 }
238 #[doc = "Bit 24 - Low Energy Timer 0 access control bit"]
239 #[inline(always)]
240 pub fn letimer0(&self) -> LETIMER0_R {
241 LETIMER0_R::new(((self.bits >> 24) & 1) != 0)
242 }
243 #[doc = "Bit 25 - Low Energy UART 0 access control bit"]
244 #[inline(always)]
245 pub fn leuart0(&self) -> LEUART0_R {
246 LEUART0_R::new(((self.bits >> 25) & 1) != 0)
247 }
248 #[doc = "Bit 27 - Pulse Counter 0 access control bit"]
249 #[inline(always)]
250 pub fn pcnt0(&self) -> PCNT0_R {
251 PCNT0_R::new(((self.bits >> 27) & 1) != 0)
252 }
253 #[doc = "Bit 28 - Pulse Counter 1 access control bit"]
254 #[inline(always)]
255 pub fn pcnt1(&self) -> PCNT1_R {
256 PCNT1_R::new(((self.bits >> 28) & 1) != 0)
257 }
258 #[doc = "Bit 29 - Pulse Counter 2 access control bit"]
259 #[inline(always)]
260 pub fn pcnt2(&self) -> PCNT2_R {
261 PCNT2_R::new(((self.bits >> 29) & 1) != 0)
262 }
263}
264impl W {
265 #[doc = "Bit 0 - Analog Comparator 0 access control bit"]
266 #[inline(always)]
267 #[must_use]
268 pub fn acmp0(&mut self) -> ACMP0_W<0> {
269 ACMP0_W::new(self)
270 }
271 #[doc = "Bit 1 - Analog Comparator 1 access control bit"]
272 #[inline(always)]
273 #[must_use]
274 pub fn acmp1(&mut self) -> ACMP1_W<1> {
275 ACMP1_W::new(self)
276 }
277 #[doc = "Bit 2 - Analog to Digital Converter 0 access control bit"]
278 #[inline(always)]
279 #[must_use]
280 pub fn adc0(&mut self) -> ADC0_W<2> {
281 ADC0_W::new(self)
282 }
283 #[doc = "Bit 5 - Clock Management Unit access control bit"]
284 #[inline(always)]
285 #[must_use]
286 pub fn cmu(&mut self) -> CMU_W<5> {
287 CMU_W::new(self)
288 }
289 #[doc = "Bit 7 - CRYOTIMER access control bit"]
290 #[inline(always)]
291 #[must_use]
292 pub fn cryotimer(&mut self) -> CRYOTIMER_W<7> {
293 CRYOTIMER_W::new(self)
294 }
295 #[doc = "Bit 8 - Advanced Encryption Standard Accelerator 0 access control bit"]
296 #[inline(always)]
297 #[must_use]
298 pub fn crypto0(&mut self) -> CRYPTO0_W<8> {
299 CRYPTO0_W::new(self)
300 }
301 #[doc = "Bit 9 - Advanced Encryption Standard Accelerator 1 access control bit"]
302 #[inline(always)]
303 #[must_use]
304 pub fn crypto1(&mut self) -> CRYPTO1_W<9> {
305 CRYPTO1_W::new(self)
306 }
307 #[doc = "Bit 10 - Capacitive touch sense module access control bit"]
308 #[inline(always)]
309 #[must_use]
310 pub fn csen(&mut self) -> CSEN_W<10> {
311 CSEN_W::new(self)
312 }
313 #[doc = "Bit 11 - Digital to Analog Converter 0 access control bit"]
314 #[inline(always)]
315 #[must_use]
316 pub fn vdac0(&mut self) -> VDAC0_W<11> {
317 VDAC0_W::new(self)
318 }
319 #[doc = "Bit 12 - Peripheral Reflex System access control bit"]
320 #[inline(always)]
321 #[must_use]
322 pub fn prs(&mut self) -> PRS_W<12> {
323 PRS_W::new(self)
324 }
325 #[doc = "Bit 13 - Energy Management Unit access control bit"]
326 #[inline(always)]
327 #[must_use]
328 pub fn emu(&mut self) -> EMU_W<13> {
329 EMU_W::new(self)
330 }
331 #[doc = "Bit 14 - FPU Exception Handler access control bit"]
332 #[inline(always)]
333 #[must_use]
334 pub fn fpueh(&mut self) -> FPUEH_W<14> {
335 FPUEH_W::new(self)
336 }
337 #[doc = "Bit 16 - General Purpose CRC access control bit"]
338 #[inline(always)]
339 #[must_use]
340 pub fn gpcrc(&mut self) -> GPCRC_W<16> {
341 GPCRC_W::new(self)
342 }
343 #[doc = "Bit 17 - General purpose Input/Output access control bit"]
344 #[inline(always)]
345 #[must_use]
346 pub fn gpio(&mut self) -> GPIO_W<17> {
347 GPIO_W::new(self)
348 }
349 #[doc = "Bit 18 - I2C 0 access control bit"]
350 #[inline(always)]
351 #[must_use]
352 pub fn i2c0(&mut self) -> I2C0_W<18> {
353 I2C0_W::new(self)
354 }
355 #[doc = "Bit 19 - I2C 1 access control bit"]
356 #[inline(always)]
357 #[must_use]
358 pub fn i2c1(&mut self) -> I2C1_W<19> {
359 I2C1_W::new(self)
360 }
361 #[doc = "Bit 20 - Current Digital to Analog Converter 0 access control bit"]
362 #[inline(always)]
363 #[must_use]
364 pub fn idac0(&mut self) -> IDAC0_W<20> {
365 IDAC0_W::new(self)
366 }
367 #[doc = "Bit 21 - Memory System Controller access control bit"]
368 #[inline(always)]
369 #[must_use]
370 pub fn msc(&mut self) -> MSC_W<21> {
371 MSC_W::new(self)
372 }
373 #[doc = "Bit 22 - Linked Direct Memory Access Controller access control bit"]
374 #[inline(always)]
375 #[must_use]
376 pub fn ldma(&mut self) -> LDMA_W<22> {
377 LDMA_W::new(self)
378 }
379 #[doc = "Bit 23 - Low Energy Sensor Interface access control bit"]
380 #[inline(always)]
381 #[must_use]
382 pub fn lesense(&mut self) -> LESENSE_W<23> {
383 LESENSE_W::new(self)
384 }
385 #[doc = "Bit 24 - Low Energy Timer 0 access control bit"]
386 #[inline(always)]
387 #[must_use]
388 pub fn letimer0(&mut self) -> LETIMER0_W<24> {
389 LETIMER0_W::new(self)
390 }
391 #[doc = "Bit 25 - Low Energy UART 0 access control bit"]
392 #[inline(always)]
393 #[must_use]
394 pub fn leuart0(&mut self) -> LEUART0_W<25> {
395 LEUART0_W::new(self)
396 }
397 #[doc = "Bit 27 - Pulse Counter 0 access control bit"]
398 #[inline(always)]
399 #[must_use]
400 pub fn pcnt0(&mut self) -> PCNT0_W<27> {
401 PCNT0_W::new(self)
402 }
403 #[doc = "Bit 28 - Pulse Counter 1 access control bit"]
404 #[inline(always)]
405 #[must_use]
406 pub fn pcnt1(&mut self) -> PCNT1_W<28> {
407 PCNT1_W::new(self)
408 }
409 #[doc = "Bit 29 - Pulse Counter 2 access control bit"]
410 #[inline(always)]
411 #[must_use]
412 pub fn pcnt2(&mut self) -> PCNT2_W<29> {
413 PCNT2_W::new(self)
414 }
415 #[doc = "Writes raw bits to the register."]
416 #[inline(always)]
417 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
418 self.0.bits(bits);
419 self
420 }
421}
422#[doc = "PPU Privilege Access Type Descriptor 0\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 [ppupatd0](index.html) module"]
423pub struct PPUPATD0_SPEC;
424impl crate::RegisterSpec for PPUPATD0_SPEC {
425 type Ux = u32;
426}
427#[doc = "`read()` method returns [ppupatd0::R](R) reader structure"]
428impl crate::Readable for PPUPATD0_SPEC {
429 type Reader = R;
430}
431#[doc = "`write(|w| ..)` method takes [ppupatd0::W](W) writer structure"]
432impl crate::Writable for PPUPATD0_SPEC {
433 type Writer = W;
434 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
435 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
436}
437#[doc = "`reset()` method sets PPUPATD0 to value 0"]
438impl crate::Resettable for PPUPATD0_SPEC {
439 const RESET_VALUE: Self::Ux = 0;
440}