1#[doc = "Register `PPUFS` reader"]
2pub struct R(crate::R<PPUFS_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<PPUFS_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<PPUFS_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<PPUFS_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "\n\nValue on reset: 0"]
17#[derive(Clone, Copy, Debug, PartialEq)]
18#[repr(u8)]
19pub enum PERIPHID_A {
20 #[doc = "0: Analog Comparator 0"]
21 ACMP0 = 0,
22 #[doc = "1: Analog Comparator 1"]
23 ACMP1 = 1,
24 #[doc = "2: Analog Comparator 1"]
25 ACMP2 = 2,
26 #[doc = "3: Analog Comparator 3"]
27 ACMP3 = 3,
28 #[doc = "4: Analog to Digital Converter 0"]
29 ADC0 = 4,
30 #[doc = "5: Analog to Digital Converter 0"]
31 ADC1 = 5,
32 #[doc = "6: CAN 0"]
33 CAN0 = 6,
34 #[doc = "7: CAN 1"]
35 CAN1 = 7,
36 #[doc = "8: Clock Management Unit"]
37 CMU = 8,
38 #[doc = "9: CRYOTIMER"]
39 CRYOTIMER = 9,
40 #[doc = "10: Advanced Encryption Standard Accelerator"]
41 CRYPTO0 = 10,
42 #[doc = "11: Capacitive touch sense module"]
43 CSEN = 11,
44 #[doc = "12: Digital to Analog Converter 0"]
45 VDAC0 = 12,
46 #[doc = "13: Peripheral Reflex System"]
47 PRS = 13,
48 #[doc = "14: External Bus Interface"]
49 EBI = 14,
50 #[doc = "15: Energy Management Unit"]
51 EMU = 15,
52 #[doc = "17: FPU Exception Handler"]
53 FPUEH = 17,
54 #[doc = "18: General Purpose CRC"]
55 GPCRC = 18,
56 #[doc = "19: General purpose Input/Output"]
57 GPIO = 19,
58 #[doc = "20: I2C 0"]
59 I2C0 = 20,
60 #[doc = "21: I2C 1"]
61 I2C1 = 21,
62 #[doc = "22: I2C 2"]
63 I2C2 = 22,
64 #[doc = "23: Current Digital to Analog Converter 0"]
65 IDAC0 = 23,
66 #[doc = "24: Memory System Controller"]
67 MSC = 24,
68 #[doc = "25: Liquid Crystal Display Controller"]
69 LCD = 25,
70 #[doc = "26: Linked Direct Memory Access Controller"]
71 LDMA = 26,
72 #[doc = "27: Low Energy Sensor Interface"]
73 LESENSE = 27,
74 #[doc = "28: Low Energy Timer 0"]
75 LETIMER0 = 28,
76 #[doc = "29: Low Energy Timer 1"]
77 LETIMER1 = 29,
78 #[doc = "30: Low Energy UART 0"]
79 LEUART0 = 30,
80 #[doc = "31: Low Energy UART 1"]
81 LEUART1 = 31,
82 #[doc = "32: Pulse Counter 0"]
83 PCNT0 = 32,
84 #[doc = "33: Pulse Counter 1"]
85 PCNT1 = 33,
86 #[doc = "34: Pulse Counter 2"]
87 PCNT2 = 34,
88 #[doc = "36: Reset Management Unit"]
89 RMU = 36,
90 #[doc = "37: Real-Time Counter"]
91 RTC = 37,
92 #[doc = "38: Real-Time Counter and Calendar"]
93 RTCC = 38,
94 #[doc = "40: Security Management Unit"]
95 SMU = 40,
96 #[doc = "41: Timer 0"]
97 TIMER0 = 41,
98 #[doc = "42: Timer 1"]
99 TIMER1 = 42,
100 #[doc = "43: Timer 2"]
101 TIMER2 = 43,
102 #[doc = "44: Timer 3"]
103 TIMER3 = 44,
104 #[doc = "45: Timer 4"]
105 TIMER4 = 45,
106 #[doc = "46: Timer 5"]
107 TIMER5 = 46,
108 #[doc = "47: Timer 6"]
109 TIMER6 = 47,
110 #[doc = "48: True Random Number Generator 0"]
111 TRNG0 = 48,
112 #[doc = "49: Universal Asynchronous Receiver/Transmitter 0"]
113 UART0 = 49,
114 #[doc = "50: Universal Asynchronous Receiver/Transmitter 1"]
115 UART1 = 50,
116 #[doc = "51: Universal Synchronous/Asynchronous Receiver/Transmitter 0"]
117 USART0 = 51,
118 #[doc = "52: Universal Synchronous/Asynchronous Receiver/Transmitter 1"]
119 USART1 = 52,
120 #[doc = "53: Universal Synchronous/Asynchronous Receiver/Transmitter 2"]
121 USART2 = 53,
122 #[doc = "54: Universal Synchronous/Asynchronous Receiver/Transmitter 3"]
123 USART3 = 54,
124 #[doc = "55: Universal Synchronous/Asynchronous Receiver/Transmitter 4"]
125 USART4 = 55,
126 #[doc = "56: Universal Synchronous/Asynchronous Receiver/Transmitter 5"]
127 USART5 = 56,
128 #[doc = "58: Watchdog"]
129 WDOG0 = 58,
130 #[doc = "59: Watchdog"]
131 WDOG1 = 59,
132 #[doc = "60: Wide Timer 0"]
133 WTIMER0 = 60,
134 #[doc = "61: Wide Timer 0"]
135 WTIMER1 = 61,
136 #[doc = "62: Wide Timer 2"]
137 WTIMER2 = 62,
138 #[doc = "63: Wide Timer 3"]
139 WTIMER3 = 63,
140}
141impl From<PERIPHID_A> for u8 {
142 #[inline(always)]
143 fn from(variant: PERIPHID_A) -> Self {
144 variant as _
145 }
146}
147#[doc = "Field `PERIPHID` reader - "]
148pub type PERIPHID_R = crate::FieldReader<u8, PERIPHID_A>;
149impl PERIPHID_R {
150 #[doc = "Get enumerated values variant"]
151 #[inline(always)]
152 pub fn variant(&self) -> Option<PERIPHID_A> {
153 match self.bits {
154 0 => Some(PERIPHID_A::ACMP0),
155 1 => Some(PERIPHID_A::ACMP1),
156 2 => Some(PERIPHID_A::ACMP2),
157 3 => Some(PERIPHID_A::ACMP3),
158 4 => Some(PERIPHID_A::ADC0),
159 5 => Some(PERIPHID_A::ADC1),
160 6 => Some(PERIPHID_A::CAN0),
161 7 => Some(PERIPHID_A::CAN1),
162 8 => Some(PERIPHID_A::CMU),
163 9 => Some(PERIPHID_A::CRYOTIMER),
164 10 => Some(PERIPHID_A::CRYPTO0),
165 11 => Some(PERIPHID_A::CSEN),
166 12 => Some(PERIPHID_A::VDAC0),
167 13 => Some(PERIPHID_A::PRS),
168 14 => Some(PERIPHID_A::EBI),
169 15 => Some(PERIPHID_A::EMU),
170 17 => Some(PERIPHID_A::FPUEH),
171 18 => Some(PERIPHID_A::GPCRC),
172 19 => Some(PERIPHID_A::GPIO),
173 20 => Some(PERIPHID_A::I2C0),
174 21 => Some(PERIPHID_A::I2C1),
175 22 => Some(PERIPHID_A::I2C2),
176 23 => Some(PERIPHID_A::IDAC0),
177 24 => Some(PERIPHID_A::MSC),
178 25 => Some(PERIPHID_A::LCD),
179 26 => Some(PERIPHID_A::LDMA),
180 27 => Some(PERIPHID_A::LESENSE),
181 28 => Some(PERIPHID_A::LETIMER0),
182 29 => Some(PERIPHID_A::LETIMER1),
183 30 => Some(PERIPHID_A::LEUART0),
184 31 => Some(PERIPHID_A::LEUART1),
185 32 => Some(PERIPHID_A::PCNT0),
186 33 => Some(PERIPHID_A::PCNT1),
187 34 => Some(PERIPHID_A::PCNT2),
188 36 => Some(PERIPHID_A::RMU),
189 37 => Some(PERIPHID_A::RTC),
190 38 => Some(PERIPHID_A::RTCC),
191 40 => Some(PERIPHID_A::SMU),
192 41 => Some(PERIPHID_A::TIMER0),
193 42 => Some(PERIPHID_A::TIMER1),
194 43 => Some(PERIPHID_A::TIMER2),
195 44 => Some(PERIPHID_A::TIMER3),
196 45 => Some(PERIPHID_A::TIMER4),
197 46 => Some(PERIPHID_A::TIMER5),
198 47 => Some(PERIPHID_A::TIMER6),
199 48 => Some(PERIPHID_A::TRNG0),
200 49 => Some(PERIPHID_A::UART0),
201 50 => Some(PERIPHID_A::UART1),
202 51 => Some(PERIPHID_A::USART0),
203 52 => Some(PERIPHID_A::USART1),
204 53 => Some(PERIPHID_A::USART2),
205 54 => Some(PERIPHID_A::USART3),
206 55 => Some(PERIPHID_A::USART4),
207 56 => Some(PERIPHID_A::USART5),
208 58 => Some(PERIPHID_A::WDOG0),
209 59 => Some(PERIPHID_A::WDOG1),
210 60 => Some(PERIPHID_A::WTIMER0),
211 61 => Some(PERIPHID_A::WTIMER1),
212 62 => Some(PERIPHID_A::WTIMER2),
213 63 => Some(PERIPHID_A::WTIMER3),
214 _ => None,
215 }
216 }
217 #[doc = "Checks if the value of the field is `ACMP0`"]
218 #[inline(always)]
219 pub fn is_acmp0(&self) -> bool {
220 *self == PERIPHID_A::ACMP0
221 }
222 #[doc = "Checks if the value of the field is `ACMP1`"]
223 #[inline(always)]
224 pub fn is_acmp1(&self) -> bool {
225 *self == PERIPHID_A::ACMP1
226 }
227 #[doc = "Checks if the value of the field is `ACMP2`"]
228 #[inline(always)]
229 pub fn is_acmp2(&self) -> bool {
230 *self == PERIPHID_A::ACMP2
231 }
232 #[doc = "Checks if the value of the field is `ACMP3`"]
233 #[inline(always)]
234 pub fn is_acmp3(&self) -> bool {
235 *self == PERIPHID_A::ACMP3
236 }
237 #[doc = "Checks if the value of the field is `ADC0`"]
238 #[inline(always)]
239 pub fn is_adc0(&self) -> bool {
240 *self == PERIPHID_A::ADC0
241 }
242 #[doc = "Checks if the value of the field is `ADC1`"]
243 #[inline(always)]
244 pub fn is_adc1(&self) -> bool {
245 *self == PERIPHID_A::ADC1
246 }
247 #[doc = "Checks if the value of the field is `CAN0`"]
248 #[inline(always)]
249 pub fn is_can0(&self) -> bool {
250 *self == PERIPHID_A::CAN0
251 }
252 #[doc = "Checks if the value of the field is `CAN1`"]
253 #[inline(always)]
254 pub fn is_can1(&self) -> bool {
255 *self == PERIPHID_A::CAN1
256 }
257 #[doc = "Checks if the value of the field is `CMU`"]
258 #[inline(always)]
259 pub fn is_cmu(&self) -> bool {
260 *self == PERIPHID_A::CMU
261 }
262 #[doc = "Checks if the value of the field is `CRYOTIMER`"]
263 #[inline(always)]
264 pub fn is_cryotimer(&self) -> bool {
265 *self == PERIPHID_A::CRYOTIMER
266 }
267 #[doc = "Checks if the value of the field is `CRYPTO0`"]
268 #[inline(always)]
269 pub fn is_crypto0(&self) -> bool {
270 *self == PERIPHID_A::CRYPTO0
271 }
272 #[doc = "Checks if the value of the field is `CSEN`"]
273 #[inline(always)]
274 pub fn is_csen(&self) -> bool {
275 *self == PERIPHID_A::CSEN
276 }
277 #[doc = "Checks if the value of the field is `VDAC0`"]
278 #[inline(always)]
279 pub fn is_vdac0(&self) -> bool {
280 *self == PERIPHID_A::VDAC0
281 }
282 #[doc = "Checks if the value of the field is `PRS`"]
283 #[inline(always)]
284 pub fn is_prs(&self) -> bool {
285 *self == PERIPHID_A::PRS
286 }
287 #[doc = "Checks if the value of the field is `EBI`"]
288 #[inline(always)]
289 pub fn is_ebi(&self) -> bool {
290 *self == PERIPHID_A::EBI
291 }
292 #[doc = "Checks if the value of the field is `EMU`"]
293 #[inline(always)]
294 pub fn is_emu(&self) -> bool {
295 *self == PERIPHID_A::EMU
296 }
297 #[doc = "Checks if the value of the field is `FPUEH`"]
298 #[inline(always)]
299 pub fn is_fpueh(&self) -> bool {
300 *self == PERIPHID_A::FPUEH
301 }
302 #[doc = "Checks if the value of the field is `GPCRC`"]
303 #[inline(always)]
304 pub fn is_gpcrc(&self) -> bool {
305 *self == PERIPHID_A::GPCRC
306 }
307 #[doc = "Checks if the value of the field is `GPIO`"]
308 #[inline(always)]
309 pub fn is_gpio(&self) -> bool {
310 *self == PERIPHID_A::GPIO
311 }
312 #[doc = "Checks if the value of the field is `I2C0`"]
313 #[inline(always)]
314 pub fn is_i2c0(&self) -> bool {
315 *self == PERIPHID_A::I2C0
316 }
317 #[doc = "Checks if the value of the field is `I2C1`"]
318 #[inline(always)]
319 pub fn is_i2c1(&self) -> bool {
320 *self == PERIPHID_A::I2C1
321 }
322 #[doc = "Checks if the value of the field is `I2C2`"]
323 #[inline(always)]
324 pub fn is_i2c2(&self) -> bool {
325 *self == PERIPHID_A::I2C2
326 }
327 #[doc = "Checks if the value of the field is `IDAC0`"]
328 #[inline(always)]
329 pub fn is_idac0(&self) -> bool {
330 *self == PERIPHID_A::IDAC0
331 }
332 #[doc = "Checks if the value of the field is `MSC`"]
333 #[inline(always)]
334 pub fn is_msc(&self) -> bool {
335 *self == PERIPHID_A::MSC
336 }
337 #[doc = "Checks if the value of the field is `LCD`"]
338 #[inline(always)]
339 pub fn is_lcd(&self) -> bool {
340 *self == PERIPHID_A::LCD
341 }
342 #[doc = "Checks if the value of the field is `LDMA`"]
343 #[inline(always)]
344 pub fn is_ldma(&self) -> bool {
345 *self == PERIPHID_A::LDMA
346 }
347 #[doc = "Checks if the value of the field is `LESENSE`"]
348 #[inline(always)]
349 pub fn is_lesense(&self) -> bool {
350 *self == PERIPHID_A::LESENSE
351 }
352 #[doc = "Checks if the value of the field is `LETIMER0`"]
353 #[inline(always)]
354 pub fn is_letimer0(&self) -> bool {
355 *self == PERIPHID_A::LETIMER0
356 }
357 #[doc = "Checks if the value of the field is `LETIMER1`"]
358 #[inline(always)]
359 pub fn is_letimer1(&self) -> bool {
360 *self == PERIPHID_A::LETIMER1
361 }
362 #[doc = "Checks if the value of the field is `LEUART0`"]
363 #[inline(always)]
364 pub fn is_leuart0(&self) -> bool {
365 *self == PERIPHID_A::LEUART0
366 }
367 #[doc = "Checks if the value of the field is `LEUART1`"]
368 #[inline(always)]
369 pub fn is_leuart1(&self) -> bool {
370 *self == PERIPHID_A::LEUART1
371 }
372 #[doc = "Checks if the value of the field is `PCNT0`"]
373 #[inline(always)]
374 pub fn is_pcnt0(&self) -> bool {
375 *self == PERIPHID_A::PCNT0
376 }
377 #[doc = "Checks if the value of the field is `PCNT1`"]
378 #[inline(always)]
379 pub fn is_pcnt1(&self) -> bool {
380 *self == PERIPHID_A::PCNT1
381 }
382 #[doc = "Checks if the value of the field is `PCNT2`"]
383 #[inline(always)]
384 pub fn is_pcnt2(&self) -> bool {
385 *self == PERIPHID_A::PCNT2
386 }
387 #[doc = "Checks if the value of the field is `RMU`"]
388 #[inline(always)]
389 pub fn is_rmu(&self) -> bool {
390 *self == PERIPHID_A::RMU
391 }
392 #[doc = "Checks if the value of the field is `RTC`"]
393 #[inline(always)]
394 pub fn is_rtc(&self) -> bool {
395 *self == PERIPHID_A::RTC
396 }
397 #[doc = "Checks if the value of the field is `RTCC`"]
398 #[inline(always)]
399 pub fn is_rtcc(&self) -> bool {
400 *self == PERIPHID_A::RTCC
401 }
402 #[doc = "Checks if the value of the field is `SMU`"]
403 #[inline(always)]
404 pub fn is_smu(&self) -> bool {
405 *self == PERIPHID_A::SMU
406 }
407 #[doc = "Checks if the value of the field is `TIMER0`"]
408 #[inline(always)]
409 pub fn is_timer0(&self) -> bool {
410 *self == PERIPHID_A::TIMER0
411 }
412 #[doc = "Checks if the value of the field is `TIMER1`"]
413 #[inline(always)]
414 pub fn is_timer1(&self) -> bool {
415 *self == PERIPHID_A::TIMER1
416 }
417 #[doc = "Checks if the value of the field is `TIMER2`"]
418 #[inline(always)]
419 pub fn is_timer2(&self) -> bool {
420 *self == PERIPHID_A::TIMER2
421 }
422 #[doc = "Checks if the value of the field is `TIMER3`"]
423 #[inline(always)]
424 pub fn is_timer3(&self) -> bool {
425 *self == PERIPHID_A::TIMER3
426 }
427 #[doc = "Checks if the value of the field is `TIMER4`"]
428 #[inline(always)]
429 pub fn is_timer4(&self) -> bool {
430 *self == PERIPHID_A::TIMER4
431 }
432 #[doc = "Checks if the value of the field is `TIMER5`"]
433 #[inline(always)]
434 pub fn is_timer5(&self) -> bool {
435 *self == PERIPHID_A::TIMER5
436 }
437 #[doc = "Checks if the value of the field is `TIMER6`"]
438 #[inline(always)]
439 pub fn is_timer6(&self) -> bool {
440 *self == PERIPHID_A::TIMER6
441 }
442 #[doc = "Checks if the value of the field is `TRNG0`"]
443 #[inline(always)]
444 pub fn is_trng0(&self) -> bool {
445 *self == PERIPHID_A::TRNG0
446 }
447 #[doc = "Checks if the value of the field is `UART0`"]
448 #[inline(always)]
449 pub fn is_uart0(&self) -> bool {
450 *self == PERIPHID_A::UART0
451 }
452 #[doc = "Checks if the value of the field is `UART1`"]
453 #[inline(always)]
454 pub fn is_uart1(&self) -> bool {
455 *self == PERIPHID_A::UART1
456 }
457 #[doc = "Checks if the value of the field is `USART0`"]
458 #[inline(always)]
459 pub fn is_usart0(&self) -> bool {
460 *self == PERIPHID_A::USART0
461 }
462 #[doc = "Checks if the value of the field is `USART1`"]
463 #[inline(always)]
464 pub fn is_usart1(&self) -> bool {
465 *self == PERIPHID_A::USART1
466 }
467 #[doc = "Checks if the value of the field is `USART2`"]
468 #[inline(always)]
469 pub fn is_usart2(&self) -> bool {
470 *self == PERIPHID_A::USART2
471 }
472 #[doc = "Checks if the value of the field is `USART3`"]
473 #[inline(always)]
474 pub fn is_usart3(&self) -> bool {
475 *self == PERIPHID_A::USART3
476 }
477 #[doc = "Checks if the value of the field is `USART4`"]
478 #[inline(always)]
479 pub fn is_usart4(&self) -> bool {
480 *self == PERIPHID_A::USART4
481 }
482 #[doc = "Checks if the value of the field is `USART5`"]
483 #[inline(always)]
484 pub fn is_usart5(&self) -> bool {
485 *self == PERIPHID_A::USART5
486 }
487 #[doc = "Checks if the value of the field is `WDOG0`"]
488 #[inline(always)]
489 pub fn is_wdog0(&self) -> bool {
490 *self == PERIPHID_A::WDOG0
491 }
492 #[doc = "Checks if the value of the field is `WDOG1`"]
493 #[inline(always)]
494 pub fn is_wdog1(&self) -> bool {
495 *self == PERIPHID_A::WDOG1
496 }
497 #[doc = "Checks if the value of the field is `WTIMER0`"]
498 #[inline(always)]
499 pub fn is_wtimer0(&self) -> bool {
500 *self == PERIPHID_A::WTIMER0
501 }
502 #[doc = "Checks if the value of the field is `WTIMER1`"]
503 #[inline(always)]
504 pub fn is_wtimer1(&self) -> bool {
505 *self == PERIPHID_A::WTIMER1
506 }
507 #[doc = "Checks if the value of the field is `WTIMER2`"]
508 #[inline(always)]
509 pub fn is_wtimer2(&self) -> bool {
510 *self == PERIPHID_A::WTIMER2
511 }
512 #[doc = "Checks if the value of the field is `WTIMER3`"]
513 #[inline(always)]
514 pub fn is_wtimer3(&self) -> bool {
515 *self == PERIPHID_A::WTIMER3
516 }
517}
518impl R {
519 #[doc = "Bits 0:6"]
520 #[inline(always)]
521 pub fn periphid(&self) -> PERIPHID_R {
522 PERIPHID_R::new((self.bits & 0x7f) as u8)
523 }
524}
525#[doc = "PPU Fault Status\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ppufs](index.html) module"]
526pub struct PPUFS_SPEC;
527impl crate::RegisterSpec for PPUFS_SPEC {
528 type Ux = u32;
529}
530#[doc = "`read()` method returns [ppufs::R](R) reader structure"]
531impl crate::Readable for PPUFS_SPEC {
532 type Reader = R;
533}
534#[doc = "`reset()` method sets PPUFS to value 0"]
535impl crate::Resettable for PPUFS_SPEC {
536 #[inline(always)]
537 fn reset_value() -> Self::Ux {
538 0
539 }
540}