efm32tg11b540_pac/smu/
ppufs.rs1#[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 to Digital Converter 0"]
25 ADC0 = 2,
26 #[doc = "3: CAN 0"]
27 CAN0 = 3,
28 #[doc = "4: Clock Management Unit"]
29 CMU = 4,
30 #[doc = "5: CRYOTIMER"]
31 CRYOTIMER = 5,
32 #[doc = "6: Advanced Encryption Standard Accelerator"]
33 CRYPTO0 = 6,
34 #[doc = "7: Capacitive touch sense module"]
35 CSEN = 7,
36 #[doc = "8: Digital to Analog Converter 0"]
37 VDAC0 = 8,
38 #[doc = "9: Peripheral Reflex System"]
39 PRS = 9,
40 #[doc = "10: Energy Management Unit"]
41 EMU = 10,
42 #[doc = "11: General Purpose CRC"]
43 GPCRC = 11,
44 #[doc = "12: General purpose Input/Output"]
45 GPIO = 12,
46 #[doc = "13: I2C 0"]
47 I2C0 = 13,
48 #[doc = "14: I2C 1"]
49 I2C1 = 14,
50 #[doc = "15: Memory System Controller"]
51 MSC = 15,
52 #[doc = "16: Liquid Crystal Display Controller"]
53 LCD = 16,
54 #[doc = "17: Linked Direct Memory Access Controller"]
55 LDMA = 17,
56 #[doc = "18: Low Energy Sensor Interface"]
57 LESENSE = 18,
58 #[doc = "19: Low Energy Timer 0"]
59 LETIMER0 = 19,
60 #[doc = "20: Low Energy UART 0"]
61 LEUART0 = 20,
62 #[doc = "21: Pulse Counter 0"]
63 PCNT0 = 21,
64 #[doc = "22: Reset Management Unit"]
65 RMU = 22,
66 #[doc = "23: Real-Time Counter and Calendar"]
67 RTCC = 23,
68 #[doc = "24: Security Management Unit"]
69 SMU = 24,
70 #[doc = "25: Timer 0"]
71 TIMER0 = 25,
72 #[doc = "26: Timer 1"]
73 TIMER1 = 26,
74 #[doc = "27: True Random Number Generator 0"]
75 TRNG0 = 27,
76 #[doc = "28: Universal Asynchronous Receiver/Transmitter 0"]
77 UART0 = 28,
78 #[doc = "29: Universal Synchronous/Asynchronous Receiver/Transmitter 0"]
79 USART0 = 29,
80 #[doc = "30: Universal Synchronous/Asynchronous Receiver/Transmitter 1"]
81 USART1 = 30,
82 #[doc = "31: Universal Synchronous/Asynchronous Receiver/Transmitter 2"]
83 USART2 = 31,
84 #[doc = "32: Universal Synchronous/Asynchronous Receiver/Transmitter 3"]
85 USART3 = 32,
86 #[doc = "33: Watchdog"]
87 WDOG0 = 33,
88 #[doc = "34: Wide Timer 0"]
89 WTIMER0 = 34,
90 #[doc = "35: Wide Timer 1"]
91 WTIMER1 = 35,
92}
93impl From<PERIPHID_A> for u8 {
94 #[inline(always)]
95 fn from(variant: PERIPHID_A) -> Self {
96 variant as _
97 }
98}
99#[doc = "Field `PERIPHID` reader - "]
100pub type PERIPHID_R = crate::FieldReader<u8, PERIPHID_A>;
101impl PERIPHID_R {
102 #[doc = "Get enumerated values variant"]
103 #[inline(always)]
104 pub fn variant(&self) -> Option<PERIPHID_A> {
105 match self.bits {
106 0 => Some(PERIPHID_A::ACMP0),
107 1 => Some(PERIPHID_A::ACMP1),
108 2 => Some(PERIPHID_A::ADC0),
109 3 => Some(PERIPHID_A::CAN0),
110 4 => Some(PERIPHID_A::CMU),
111 5 => Some(PERIPHID_A::CRYOTIMER),
112 6 => Some(PERIPHID_A::CRYPTO0),
113 7 => Some(PERIPHID_A::CSEN),
114 8 => Some(PERIPHID_A::VDAC0),
115 9 => Some(PERIPHID_A::PRS),
116 10 => Some(PERIPHID_A::EMU),
117 11 => Some(PERIPHID_A::GPCRC),
118 12 => Some(PERIPHID_A::GPIO),
119 13 => Some(PERIPHID_A::I2C0),
120 14 => Some(PERIPHID_A::I2C1),
121 15 => Some(PERIPHID_A::MSC),
122 16 => Some(PERIPHID_A::LCD),
123 17 => Some(PERIPHID_A::LDMA),
124 18 => Some(PERIPHID_A::LESENSE),
125 19 => Some(PERIPHID_A::LETIMER0),
126 20 => Some(PERIPHID_A::LEUART0),
127 21 => Some(PERIPHID_A::PCNT0),
128 22 => Some(PERIPHID_A::RMU),
129 23 => Some(PERIPHID_A::RTCC),
130 24 => Some(PERIPHID_A::SMU),
131 25 => Some(PERIPHID_A::TIMER0),
132 26 => Some(PERIPHID_A::TIMER1),
133 27 => Some(PERIPHID_A::TRNG0),
134 28 => Some(PERIPHID_A::UART0),
135 29 => Some(PERIPHID_A::USART0),
136 30 => Some(PERIPHID_A::USART1),
137 31 => Some(PERIPHID_A::USART2),
138 32 => Some(PERIPHID_A::USART3),
139 33 => Some(PERIPHID_A::WDOG0),
140 34 => Some(PERIPHID_A::WTIMER0),
141 35 => Some(PERIPHID_A::WTIMER1),
142 _ => None,
143 }
144 }
145 #[doc = "Checks if the value of the field is `ACMP0`"]
146 #[inline(always)]
147 pub fn is_acmp0(&self) -> bool {
148 *self == PERIPHID_A::ACMP0
149 }
150 #[doc = "Checks if the value of the field is `ACMP1`"]
151 #[inline(always)]
152 pub fn is_acmp1(&self) -> bool {
153 *self == PERIPHID_A::ACMP1
154 }
155 #[doc = "Checks if the value of the field is `ADC0`"]
156 #[inline(always)]
157 pub fn is_adc0(&self) -> bool {
158 *self == PERIPHID_A::ADC0
159 }
160 #[doc = "Checks if the value of the field is `CAN0`"]
161 #[inline(always)]
162 pub fn is_can0(&self) -> bool {
163 *self == PERIPHID_A::CAN0
164 }
165 #[doc = "Checks if the value of the field is `CMU`"]
166 #[inline(always)]
167 pub fn is_cmu(&self) -> bool {
168 *self == PERIPHID_A::CMU
169 }
170 #[doc = "Checks if the value of the field is `CRYOTIMER`"]
171 #[inline(always)]
172 pub fn is_cryotimer(&self) -> bool {
173 *self == PERIPHID_A::CRYOTIMER
174 }
175 #[doc = "Checks if the value of the field is `CRYPTO0`"]
176 #[inline(always)]
177 pub fn is_crypto0(&self) -> bool {
178 *self == PERIPHID_A::CRYPTO0
179 }
180 #[doc = "Checks if the value of the field is `CSEN`"]
181 #[inline(always)]
182 pub fn is_csen(&self) -> bool {
183 *self == PERIPHID_A::CSEN
184 }
185 #[doc = "Checks if the value of the field is `VDAC0`"]
186 #[inline(always)]
187 pub fn is_vdac0(&self) -> bool {
188 *self == PERIPHID_A::VDAC0
189 }
190 #[doc = "Checks if the value of the field is `PRS`"]
191 #[inline(always)]
192 pub fn is_prs(&self) -> bool {
193 *self == PERIPHID_A::PRS
194 }
195 #[doc = "Checks if the value of the field is `EMU`"]
196 #[inline(always)]
197 pub fn is_emu(&self) -> bool {
198 *self == PERIPHID_A::EMU
199 }
200 #[doc = "Checks if the value of the field is `GPCRC`"]
201 #[inline(always)]
202 pub fn is_gpcrc(&self) -> bool {
203 *self == PERIPHID_A::GPCRC
204 }
205 #[doc = "Checks if the value of the field is `GPIO`"]
206 #[inline(always)]
207 pub fn is_gpio(&self) -> bool {
208 *self == PERIPHID_A::GPIO
209 }
210 #[doc = "Checks if the value of the field is `I2C0`"]
211 #[inline(always)]
212 pub fn is_i2c0(&self) -> bool {
213 *self == PERIPHID_A::I2C0
214 }
215 #[doc = "Checks if the value of the field is `I2C1`"]
216 #[inline(always)]
217 pub fn is_i2c1(&self) -> bool {
218 *self == PERIPHID_A::I2C1
219 }
220 #[doc = "Checks if the value of the field is `MSC`"]
221 #[inline(always)]
222 pub fn is_msc(&self) -> bool {
223 *self == PERIPHID_A::MSC
224 }
225 #[doc = "Checks if the value of the field is `LCD`"]
226 #[inline(always)]
227 pub fn is_lcd(&self) -> bool {
228 *self == PERIPHID_A::LCD
229 }
230 #[doc = "Checks if the value of the field is `LDMA`"]
231 #[inline(always)]
232 pub fn is_ldma(&self) -> bool {
233 *self == PERIPHID_A::LDMA
234 }
235 #[doc = "Checks if the value of the field is `LESENSE`"]
236 #[inline(always)]
237 pub fn is_lesense(&self) -> bool {
238 *self == PERIPHID_A::LESENSE
239 }
240 #[doc = "Checks if the value of the field is `LETIMER0`"]
241 #[inline(always)]
242 pub fn is_letimer0(&self) -> bool {
243 *self == PERIPHID_A::LETIMER0
244 }
245 #[doc = "Checks if the value of the field is `LEUART0`"]
246 #[inline(always)]
247 pub fn is_leuart0(&self) -> bool {
248 *self == PERIPHID_A::LEUART0
249 }
250 #[doc = "Checks if the value of the field is `PCNT0`"]
251 #[inline(always)]
252 pub fn is_pcnt0(&self) -> bool {
253 *self == PERIPHID_A::PCNT0
254 }
255 #[doc = "Checks if the value of the field is `RMU`"]
256 #[inline(always)]
257 pub fn is_rmu(&self) -> bool {
258 *self == PERIPHID_A::RMU
259 }
260 #[doc = "Checks if the value of the field is `RTCC`"]
261 #[inline(always)]
262 pub fn is_rtcc(&self) -> bool {
263 *self == PERIPHID_A::RTCC
264 }
265 #[doc = "Checks if the value of the field is `SMU`"]
266 #[inline(always)]
267 pub fn is_smu(&self) -> bool {
268 *self == PERIPHID_A::SMU
269 }
270 #[doc = "Checks if the value of the field is `TIMER0`"]
271 #[inline(always)]
272 pub fn is_timer0(&self) -> bool {
273 *self == PERIPHID_A::TIMER0
274 }
275 #[doc = "Checks if the value of the field is `TIMER1`"]
276 #[inline(always)]
277 pub fn is_timer1(&self) -> bool {
278 *self == PERIPHID_A::TIMER1
279 }
280 #[doc = "Checks if the value of the field is `TRNG0`"]
281 #[inline(always)]
282 pub fn is_trng0(&self) -> bool {
283 *self == PERIPHID_A::TRNG0
284 }
285 #[doc = "Checks if the value of the field is `UART0`"]
286 #[inline(always)]
287 pub fn is_uart0(&self) -> bool {
288 *self == PERIPHID_A::UART0
289 }
290 #[doc = "Checks if the value of the field is `USART0`"]
291 #[inline(always)]
292 pub fn is_usart0(&self) -> bool {
293 *self == PERIPHID_A::USART0
294 }
295 #[doc = "Checks if the value of the field is `USART1`"]
296 #[inline(always)]
297 pub fn is_usart1(&self) -> bool {
298 *self == PERIPHID_A::USART1
299 }
300 #[doc = "Checks if the value of the field is `USART2`"]
301 #[inline(always)]
302 pub fn is_usart2(&self) -> bool {
303 *self == PERIPHID_A::USART2
304 }
305 #[doc = "Checks if the value of the field is `USART3`"]
306 #[inline(always)]
307 pub fn is_usart3(&self) -> bool {
308 *self == PERIPHID_A::USART3
309 }
310 #[doc = "Checks if the value of the field is `WDOG0`"]
311 #[inline(always)]
312 pub fn is_wdog0(&self) -> bool {
313 *self == PERIPHID_A::WDOG0
314 }
315 #[doc = "Checks if the value of the field is `WTIMER0`"]
316 #[inline(always)]
317 pub fn is_wtimer0(&self) -> bool {
318 *self == PERIPHID_A::WTIMER0
319 }
320 #[doc = "Checks if the value of the field is `WTIMER1`"]
321 #[inline(always)]
322 pub fn is_wtimer1(&self) -> bool {
323 *self == PERIPHID_A::WTIMER1
324 }
325}
326impl R {
327 #[doc = "Bits 0:6"]
328 #[inline(always)]
329 pub fn periphid(&self) -> PERIPHID_R {
330 PERIPHID_R::new((self.bits & 0x7f) as u8)
331 }
332}
333#[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"]
334pub struct PPUFS_SPEC;
335impl crate::RegisterSpec for PPUFS_SPEC {
336 type Ux = u32;
337}
338#[doc = "`read()` method returns [ppufs::R](R) reader structure"]
339impl crate::Readable for PPUFS_SPEC {
340 type Reader = R;
341}
342#[doc = "`reset()` method sets PPUFS to value 0"]
343impl crate::Resettable for PPUFS_SPEC {
344 #[inline(always)]
345 fn reset_value() -> Self::Ux {
346 0
347 }
348}