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