xmc4100/scu_trap/
trapraw.rs1#[doc = "Register `TRAPRAW` reader"]
2pub type R = crate::R<TRAPRAW_SPEC>;
3#[doc = "System OSC WDT Trap Raw Status\n\nValue on reset: 0"]
4#[derive(Clone, Copy, Debug, PartialEq, Eq)]
5pub enum SOSCWDGT_A {
6 #[doc = "0: No pending trap request"]
7 VALUE1 = 0,
8 #[doc = "1: Pending trap request"]
9 VALUE2 = 1,
10}
11impl From<SOSCWDGT_A> for bool {
12 #[inline(always)]
13 fn from(variant: SOSCWDGT_A) -> Self {
14 variant as u8 != 0
15 }
16}
17#[doc = "Field `SOSCWDGT` reader - System OSC WDT Trap Raw Status"]
18pub type SOSCWDGT_R = crate::BitReader<SOSCWDGT_A>;
19impl SOSCWDGT_R {
20 #[doc = "Get enumerated values variant"]
21 #[inline(always)]
22 pub const fn variant(&self) -> SOSCWDGT_A {
23 match self.bits {
24 false => SOSCWDGT_A::VALUE1,
25 true => SOSCWDGT_A::VALUE2,
26 }
27 }
28 #[doc = "No pending trap request"]
29 #[inline(always)]
30 pub fn is_value1(&self) -> bool {
31 *self == SOSCWDGT_A::VALUE1
32 }
33 #[doc = "Pending trap request"]
34 #[inline(always)]
35 pub fn is_value2(&self) -> bool {
36 *self == SOSCWDGT_A::VALUE2
37 }
38}
39#[doc = "System VCO Lock Trap Raw Status\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41pub enum SVCOLCKT_A {
42 #[doc = "0: No pending trap request"]
43 VALUE1 = 0,
44 #[doc = "1: Pending trap request"]
45 VALUE2 = 1,
46}
47impl From<SVCOLCKT_A> for bool {
48 #[inline(always)]
49 fn from(variant: SVCOLCKT_A) -> Self {
50 variant as u8 != 0
51 }
52}
53#[doc = "Field `SVCOLCKT` reader - System VCO Lock Trap Raw Status"]
54pub type SVCOLCKT_R = crate::BitReader<SVCOLCKT_A>;
55impl SVCOLCKT_R {
56 #[doc = "Get enumerated values variant"]
57 #[inline(always)]
58 pub const fn variant(&self) -> SVCOLCKT_A {
59 match self.bits {
60 false => SVCOLCKT_A::VALUE1,
61 true => SVCOLCKT_A::VALUE2,
62 }
63 }
64 #[doc = "No pending trap request"]
65 #[inline(always)]
66 pub fn is_value1(&self) -> bool {
67 *self == SVCOLCKT_A::VALUE1
68 }
69 #[doc = "Pending trap request"]
70 #[inline(always)]
71 pub fn is_value2(&self) -> bool {
72 *self == SVCOLCKT_A::VALUE2
73 }
74}
75#[doc = "USB VCO Lock Trap Raw Status\n\nValue on reset: 0"]
76#[derive(Clone, Copy, Debug, PartialEq, Eq)]
77pub enum UVCOLCKT_A {
78 #[doc = "0: No pending trap request"]
79 VALUE1 = 0,
80 #[doc = "1: Pending trap request"]
81 VALUE2 = 1,
82}
83impl From<UVCOLCKT_A> for bool {
84 #[inline(always)]
85 fn from(variant: UVCOLCKT_A) -> Self {
86 variant as u8 != 0
87 }
88}
89#[doc = "Field `UVCOLCKT` reader - USB VCO Lock Trap Raw Status"]
90pub type UVCOLCKT_R = crate::BitReader<UVCOLCKT_A>;
91impl UVCOLCKT_R {
92 #[doc = "Get enumerated values variant"]
93 #[inline(always)]
94 pub const fn variant(&self) -> UVCOLCKT_A {
95 match self.bits {
96 false => UVCOLCKT_A::VALUE1,
97 true => UVCOLCKT_A::VALUE2,
98 }
99 }
100 #[doc = "No pending trap request"]
101 #[inline(always)]
102 pub fn is_value1(&self) -> bool {
103 *self == UVCOLCKT_A::VALUE1
104 }
105 #[doc = "Pending trap request"]
106 #[inline(always)]
107 pub fn is_value2(&self) -> bool {
108 *self == UVCOLCKT_A::VALUE2
109 }
110}
111#[doc = "Parity Error Trap Raw Status\n\nValue on reset: 0"]
112#[derive(Clone, Copy, Debug, PartialEq, Eq)]
113pub enum PET_A {
114 #[doc = "0: No pending trap request"]
115 VALUE1 = 0,
116 #[doc = "1: Pending trap request"]
117 VALUE2 = 1,
118}
119impl From<PET_A> for bool {
120 #[inline(always)]
121 fn from(variant: PET_A) -> Self {
122 variant as u8 != 0
123 }
124}
125#[doc = "Field `PET` reader - Parity Error Trap Raw Status"]
126pub type PET_R = crate::BitReader<PET_A>;
127impl PET_R {
128 #[doc = "Get enumerated values variant"]
129 #[inline(always)]
130 pub const fn variant(&self) -> PET_A {
131 match self.bits {
132 false => PET_A::VALUE1,
133 true => PET_A::VALUE2,
134 }
135 }
136 #[doc = "No pending trap request"]
137 #[inline(always)]
138 pub fn is_value1(&self) -> bool {
139 *self == PET_A::VALUE1
140 }
141 #[doc = "Pending trap request"]
142 #[inline(always)]
143 pub fn is_value2(&self) -> bool {
144 *self == PET_A::VALUE2
145 }
146}
147#[doc = "Brown Out Trap Raw Status\n\nValue on reset: 0"]
148#[derive(Clone, Copy, Debug, PartialEq, Eq)]
149pub enum BRWNT_A {
150 #[doc = "0: No pending trap request"]
151 VALUE1 = 0,
152 #[doc = "1: Pending trap request"]
153 VALUE2 = 1,
154}
155impl From<BRWNT_A> for bool {
156 #[inline(always)]
157 fn from(variant: BRWNT_A) -> Self {
158 variant as u8 != 0
159 }
160}
161#[doc = "Field `BRWNT` reader - Brown Out Trap Raw Status"]
162pub type BRWNT_R = crate::BitReader<BRWNT_A>;
163impl BRWNT_R {
164 #[doc = "Get enumerated values variant"]
165 #[inline(always)]
166 pub const fn variant(&self) -> BRWNT_A {
167 match self.bits {
168 false => BRWNT_A::VALUE1,
169 true => BRWNT_A::VALUE2,
170 }
171 }
172 #[doc = "No pending trap request"]
173 #[inline(always)]
174 pub fn is_value1(&self) -> bool {
175 *self == BRWNT_A::VALUE1
176 }
177 #[doc = "Pending trap request"]
178 #[inline(always)]
179 pub fn is_value2(&self) -> bool {
180 *self == BRWNT_A::VALUE2
181 }
182}
183#[doc = "OSC_ULP WDG Trap RAW Status\n\nValue on reset: 0"]
184#[derive(Clone, Copy, Debug, PartialEq, Eq)]
185pub enum ULPWDGT_A {
186 #[doc = "0: No pending trap request"]
187 VALUE1 = 0,
188 #[doc = "1: Pending trap request"]
189 VALUE2 = 1,
190}
191impl From<ULPWDGT_A> for bool {
192 #[inline(always)]
193 fn from(variant: ULPWDGT_A) -> Self {
194 variant as u8 != 0
195 }
196}
197#[doc = "Field `ULPWDGT` reader - OSC_ULP WDG Trap RAW Status"]
198pub type ULPWDGT_R = crate::BitReader<ULPWDGT_A>;
199impl ULPWDGT_R {
200 #[doc = "Get enumerated values variant"]
201 #[inline(always)]
202 pub const fn variant(&self) -> ULPWDGT_A {
203 match self.bits {
204 false => ULPWDGT_A::VALUE1,
205 true => ULPWDGT_A::VALUE2,
206 }
207 }
208 #[doc = "No pending trap request"]
209 #[inline(always)]
210 pub fn is_value1(&self) -> bool {
211 *self == ULPWDGT_A::VALUE1
212 }
213 #[doc = "Pending trap request"]
214 #[inline(always)]
215 pub fn is_value2(&self) -> bool {
216 *self == ULPWDGT_A::VALUE2
217 }
218}
219#[doc = "Peripheral Bridge 0 Trap Raw Status\n\nValue on reset: 0"]
220#[derive(Clone, Copy, Debug, PartialEq, Eq)]
221pub enum BWERR0T_A {
222 #[doc = "0: No pending trap request"]
223 VALUE1 = 0,
224 #[doc = "1: Pending trap request"]
225 VALUE2 = 1,
226}
227impl From<BWERR0T_A> for bool {
228 #[inline(always)]
229 fn from(variant: BWERR0T_A) -> Self {
230 variant as u8 != 0
231 }
232}
233#[doc = "Field `BWERR0T` reader - Peripheral Bridge 0 Trap Raw Status"]
234pub type BWERR0T_R = crate::BitReader<BWERR0T_A>;
235impl BWERR0T_R {
236 #[doc = "Get enumerated values variant"]
237 #[inline(always)]
238 pub const fn variant(&self) -> BWERR0T_A {
239 match self.bits {
240 false => BWERR0T_A::VALUE1,
241 true => BWERR0T_A::VALUE2,
242 }
243 }
244 #[doc = "No pending trap request"]
245 #[inline(always)]
246 pub fn is_value1(&self) -> bool {
247 *self == BWERR0T_A::VALUE1
248 }
249 #[doc = "Pending trap request"]
250 #[inline(always)]
251 pub fn is_value2(&self) -> bool {
252 *self == BWERR0T_A::VALUE2
253 }
254}
255#[doc = "Peripheral Bridge 1 Trap Raw Status\n\nValue on reset: 0"]
256#[derive(Clone, Copy, Debug, PartialEq, Eq)]
257pub enum BWERR1T_A {
258 #[doc = "0: No pending trap request"]
259 VALUE1 = 0,
260 #[doc = "1: Pending trap request"]
261 VALUE2 = 1,
262}
263impl From<BWERR1T_A> for bool {
264 #[inline(always)]
265 fn from(variant: BWERR1T_A) -> Self {
266 variant as u8 != 0
267 }
268}
269#[doc = "Field `BWERR1T` reader - Peripheral Bridge 1 Trap Raw Status"]
270pub type BWERR1T_R = crate::BitReader<BWERR1T_A>;
271impl BWERR1T_R {
272 #[doc = "Get enumerated values variant"]
273 #[inline(always)]
274 pub const fn variant(&self) -> BWERR1T_A {
275 match self.bits {
276 false => BWERR1T_A::VALUE1,
277 true => BWERR1T_A::VALUE2,
278 }
279 }
280 #[doc = "No pending trap request"]
281 #[inline(always)]
282 pub fn is_value1(&self) -> bool {
283 *self == BWERR1T_A::VALUE1
284 }
285 #[doc = "Pending trap request"]
286 #[inline(always)]
287 pub fn is_value2(&self) -> bool {
288 *self == BWERR1T_A::VALUE2
289 }
290}
291#[doc = "Die Temperature Too High Trap Raw Status\n\nValue on reset: 0"]
292#[derive(Clone, Copy, Debug, PartialEq, Eq)]
293pub enum TEMPHIT_A {
294 #[doc = "0: No pending trap request"]
295 VALUE1 = 0,
296 #[doc = "1: Pending trap request"]
297 VALUE2 = 1,
298}
299impl From<TEMPHIT_A> for bool {
300 #[inline(always)]
301 fn from(variant: TEMPHIT_A) -> Self {
302 variant as u8 != 0
303 }
304}
305#[doc = "Field `TEMPHIT` reader - Die Temperature Too High Trap Raw Status"]
306pub type TEMPHIT_R = crate::BitReader<TEMPHIT_A>;
307impl TEMPHIT_R {
308 #[doc = "Get enumerated values variant"]
309 #[inline(always)]
310 pub const fn variant(&self) -> TEMPHIT_A {
311 match self.bits {
312 false => TEMPHIT_A::VALUE1,
313 true => TEMPHIT_A::VALUE2,
314 }
315 }
316 #[doc = "No pending trap request"]
317 #[inline(always)]
318 pub fn is_value1(&self) -> bool {
319 *self == TEMPHIT_A::VALUE1
320 }
321 #[doc = "Pending trap request"]
322 #[inline(always)]
323 pub fn is_value2(&self) -> bool {
324 *self == TEMPHIT_A::VALUE2
325 }
326}
327#[doc = "Die Temperature Too Low Trap Raw Status\n\nValue on reset: 0"]
328#[derive(Clone, Copy, Debug, PartialEq, Eq)]
329pub enum TEMPLOT_A {
330 #[doc = "0: No pending trap request"]
331 VALUE1 = 0,
332 #[doc = "1: Pending trap request"]
333 VALUE2 = 1,
334}
335impl From<TEMPLOT_A> for bool {
336 #[inline(always)]
337 fn from(variant: TEMPLOT_A) -> Self {
338 variant as u8 != 0
339 }
340}
341#[doc = "Field `TEMPLOT` reader - Die Temperature Too Low Trap Raw Status"]
342pub type TEMPLOT_R = crate::BitReader<TEMPLOT_A>;
343impl TEMPLOT_R {
344 #[doc = "Get enumerated values variant"]
345 #[inline(always)]
346 pub const fn variant(&self) -> TEMPLOT_A {
347 match self.bits {
348 false => TEMPLOT_A::VALUE1,
349 true => TEMPLOT_A::VALUE2,
350 }
351 }
352 #[doc = "No pending trap request"]
353 #[inline(always)]
354 pub fn is_value1(&self) -> bool {
355 *self == TEMPLOT_A::VALUE1
356 }
357 #[doc = "Pending trap request"]
358 #[inline(always)]
359 pub fn is_value2(&self) -> bool {
360 *self == TEMPLOT_A::VALUE2
361 }
362}
363impl R {
364 #[doc = "Bit 0 - System OSC WDT Trap Raw Status"]
365 #[inline(always)]
366 pub fn soscwdgt(&self) -> SOSCWDGT_R {
367 SOSCWDGT_R::new((self.bits & 1) != 0)
368 }
369 #[doc = "Bit 2 - System VCO Lock Trap Raw Status"]
370 #[inline(always)]
371 pub fn svcolckt(&self) -> SVCOLCKT_R {
372 SVCOLCKT_R::new(((self.bits >> 2) & 1) != 0)
373 }
374 #[doc = "Bit 3 - USB VCO Lock Trap Raw Status"]
375 #[inline(always)]
376 pub fn uvcolckt(&self) -> UVCOLCKT_R {
377 UVCOLCKT_R::new(((self.bits >> 3) & 1) != 0)
378 }
379 #[doc = "Bit 4 - Parity Error Trap Raw Status"]
380 #[inline(always)]
381 pub fn pet(&self) -> PET_R {
382 PET_R::new(((self.bits >> 4) & 1) != 0)
383 }
384 #[doc = "Bit 5 - Brown Out Trap Raw Status"]
385 #[inline(always)]
386 pub fn brwnt(&self) -> BRWNT_R {
387 BRWNT_R::new(((self.bits >> 5) & 1) != 0)
388 }
389 #[doc = "Bit 6 - OSC_ULP WDG Trap RAW Status"]
390 #[inline(always)]
391 pub fn ulpwdgt(&self) -> ULPWDGT_R {
392 ULPWDGT_R::new(((self.bits >> 6) & 1) != 0)
393 }
394 #[doc = "Bit 7 - Peripheral Bridge 0 Trap Raw Status"]
395 #[inline(always)]
396 pub fn bwerr0t(&self) -> BWERR0T_R {
397 BWERR0T_R::new(((self.bits >> 7) & 1) != 0)
398 }
399 #[doc = "Bit 8 - Peripheral Bridge 1 Trap Raw Status"]
400 #[inline(always)]
401 pub fn bwerr1t(&self) -> BWERR1T_R {
402 BWERR1T_R::new(((self.bits >> 8) & 1) != 0)
403 }
404 #[doc = "Bit 12 - Die Temperature Too High Trap Raw Status"]
405 #[inline(always)]
406 pub fn temphit(&self) -> TEMPHIT_R {
407 TEMPHIT_R::new(((self.bits >> 12) & 1) != 0)
408 }
409 #[doc = "Bit 13 - Die Temperature Too Low Trap Raw Status"]
410 #[inline(always)]
411 pub fn templot(&self) -> TEMPLOT_R {
412 TEMPLOT_R::new(((self.bits >> 13) & 1) != 0)
413 }
414}
415#[doc = "Trap Raw Status Register\n\nYou can [`read`](crate::Reg::read) this register and get [`trapraw::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
416pub struct TRAPRAW_SPEC;
417impl crate::RegisterSpec for TRAPRAW_SPEC {
418 type Ux = u32;
419}
420#[doc = "`read()` method returns [`trapraw::R`](R) reader structure"]
421impl crate::Readable for TRAPRAW_SPEC {}
422#[doc = "`reset()` method sets TRAPRAW to value 0"]
423impl crate::Resettable for TRAPRAW_SPEC {
424 const RESET_VALUE: u32 = 0;
425}