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