efm32gg12b530_pac/timer1/
dtfc.rs1#[doc = "Register `DTFC` reader"]
2pub struct R(crate::R<DTFC_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<DTFC_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<DTFC_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<DTFC_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `DTFC` writer"]
17pub struct W(crate::W<DTFC_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<DTFC_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<DTFC_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<DTFC_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "DTI PRS Fault Source 0 Select\n\nValue on reset: 0"]
38#[derive(Clone, Copy, Debug, PartialEq)]
39#[repr(u8)]
40pub enum DTPRS0FSEL_A {
41 #[doc = "0: PRS Channel 0 selected as fault source 0"]
42 PRSCH0 = 0,
43 #[doc = "1: PRS Channel 1 selected as fault source 1"]
44 PRSCH1 = 1,
45 #[doc = "2: PRS Channel 2 selected as fault source 2"]
46 PRSCH2 = 2,
47 #[doc = "3: PRS Channel 3 selected as fault source 3"]
48 PRSCH3 = 3,
49 #[doc = "4: PRS Channel 4 selected as fault source 4"]
50 PRSCH4 = 4,
51 #[doc = "5: PRS Channel 5 selected as fault source 5"]
52 PRSCH5 = 5,
53 #[doc = "6: PRS Channel 6 selected as fault source 6"]
54 PRSCH6 = 6,
55 #[doc = "7: PRS Channel 7 selected as fault source 7"]
56 PRSCH7 = 7,
57 #[doc = "8: PRS Channel 8 selected as fault source 8"]
58 PRSCH8 = 8,
59 #[doc = "9: PRS Channel 9 selected as fault source 9"]
60 PRSCH9 = 9,
61 #[doc = "10: PRS Channel 10 selected as fault source 10"]
62 PRSCH10 = 10,
63 #[doc = "11: PRS Channel 11 selected as fault source 11"]
64 PRSCH11 = 11,
65 #[doc = "12: PRS Channel 12 selected as fault source 12"]
66 PRSCH12 = 12,
67 #[doc = "13: PRS Channel 13 selected as fault source 13"]
68 PRSCH13 = 13,
69 #[doc = "14: PRS Channel 14 selected as fault source 14"]
70 PRSCH14 = 14,
71 #[doc = "15: PRS Channel 15 selected as fault source 15"]
72 PRSCH15 = 15,
73}
74impl From<DTPRS0FSEL_A> for u8 {
75 #[inline(always)]
76 fn from(variant: DTPRS0FSEL_A) -> Self {
77 variant as _
78 }
79}
80#[doc = "Field `DTPRS0FSEL` reader - DTI PRS Fault Source 0 Select"]
81pub type DTPRS0FSEL_R = crate::FieldReader<u8, DTPRS0FSEL_A>;
82impl DTPRS0FSEL_R {
83 #[doc = "Get enumerated values variant"]
84 #[inline(always)]
85 pub fn variant(&self) -> DTPRS0FSEL_A {
86 match self.bits {
87 0 => DTPRS0FSEL_A::PRSCH0,
88 1 => DTPRS0FSEL_A::PRSCH1,
89 2 => DTPRS0FSEL_A::PRSCH2,
90 3 => DTPRS0FSEL_A::PRSCH3,
91 4 => DTPRS0FSEL_A::PRSCH4,
92 5 => DTPRS0FSEL_A::PRSCH5,
93 6 => DTPRS0FSEL_A::PRSCH6,
94 7 => DTPRS0FSEL_A::PRSCH7,
95 8 => DTPRS0FSEL_A::PRSCH8,
96 9 => DTPRS0FSEL_A::PRSCH9,
97 10 => DTPRS0FSEL_A::PRSCH10,
98 11 => DTPRS0FSEL_A::PRSCH11,
99 12 => DTPRS0FSEL_A::PRSCH12,
100 13 => DTPRS0FSEL_A::PRSCH13,
101 14 => DTPRS0FSEL_A::PRSCH14,
102 15 => DTPRS0FSEL_A::PRSCH15,
103 _ => unreachable!(),
104 }
105 }
106 #[doc = "Checks if the value of the field is `PRSCH0`"]
107 #[inline(always)]
108 pub fn is_prsch0(&self) -> bool {
109 *self == DTPRS0FSEL_A::PRSCH0
110 }
111 #[doc = "Checks if the value of the field is `PRSCH1`"]
112 #[inline(always)]
113 pub fn is_prsch1(&self) -> bool {
114 *self == DTPRS0FSEL_A::PRSCH1
115 }
116 #[doc = "Checks if the value of the field is `PRSCH2`"]
117 #[inline(always)]
118 pub fn is_prsch2(&self) -> bool {
119 *self == DTPRS0FSEL_A::PRSCH2
120 }
121 #[doc = "Checks if the value of the field is `PRSCH3`"]
122 #[inline(always)]
123 pub fn is_prsch3(&self) -> bool {
124 *self == DTPRS0FSEL_A::PRSCH3
125 }
126 #[doc = "Checks if the value of the field is `PRSCH4`"]
127 #[inline(always)]
128 pub fn is_prsch4(&self) -> bool {
129 *self == DTPRS0FSEL_A::PRSCH4
130 }
131 #[doc = "Checks if the value of the field is `PRSCH5`"]
132 #[inline(always)]
133 pub fn is_prsch5(&self) -> bool {
134 *self == DTPRS0FSEL_A::PRSCH5
135 }
136 #[doc = "Checks if the value of the field is `PRSCH6`"]
137 #[inline(always)]
138 pub fn is_prsch6(&self) -> bool {
139 *self == DTPRS0FSEL_A::PRSCH6
140 }
141 #[doc = "Checks if the value of the field is `PRSCH7`"]
142 #[inline(always)]
143 pub fn is_prsch7(&self) -> bool {
144 *self == DTPRS0FSEL_A::PRSCH7
145 }
146 #[doc = "Checks if the value of the field is `PRSCH8`"]
147 #[inline(always)]
148 pub fn is_prsch8(&self) -> bool {
149 *self == DTPRS0FSEL_A::PRSCH8
150 }
151 #[doc = "Checks if the value of the field is `PRSCH9`"]
152 #[inline(always)]
153 pub fn is_prsch9(&self) -> bool {
154 *self == DTPRS0FSEL_A::PRSCH9
155 }
156 #[doc = "Checks if the value of the field is `PRSCH10`"]
157 #[inline(always)]
158 pub fn is_prsch10(&self) -> bool {
159 *self == DTPRS0FSEL_A::PRSCH10
160 }
161 #[doc = "Checks if the value of the field is `PRSCH11`"]
162 #[inline(always)]
163 pub fn is_prsch11(&self) -> bool {
164 *self == DTPRS0FSEL_A::PRSCH11
165 }
166 #[doc = "Checks if the value of the field is `PRSCH12`"]
167 #[inline(always)]
168 pub fn is_prsch12(&self) -> bool {
169 *self == DTPRS0FSEL_A::PRSCH12
170 }
171 #[doc = "Checks if the value of the field is `PRSCH13`"]
172 #[inline(always)]
173 pub fn is_prsch13(&self) -> bool {
174 *self == DTPRS0FSEL_A::PRSCH13
175 }
176 #[doc = "Checks if the value of the field is `PRSCH14`"]
177 #[inline(always)]
178 pub fn is_prsch14(&self) -> bool {
179 *self == DTPRS0FSEL_A::PRSCH14
180 }
181 #[doc = "Checks if the value of the field is `PRSCH15`"]
182 #[inline(always)]
183 pub fn is_prsch15(&self) -> bool {
184 *self == DTPRS0FSEL_A::PRSCH15
185 }
186}
187#[doc = "Field `DTPRS0FSEL` writer - DTI PRS Fault Source 0 Select"]
188pub type DTPRS0FSEL_W<'a> = crate::FieldWriterSafe<'a, u32, DTFC_SPEC, u8, DTPRS0FSEL_A, 4, 0>;
189impl<'a> DTPRS0FSEL_W<'a> {
190 #[doc = "PRS Channel 0 selected as fault source 0"]
191 #[inline(always)]
192 pub fn prsch0(self) -> &'a mut W {
193 self.variant(DTPRS0FSEL_A::PRSCH0)
194 }
195 #[doc = "PRS Channel 1 selected as fault source 1"]
196 #[inline(always)]
197 pub fn prsch1(self) -> &'a mut W {
198 self.variant(DTPRS0FSEL_A::PRSCH1)
199 }
200 #[doc = "PRS Channel 2 selected as fault source 2"]
201 #[inline(always)]
202 pub fn prsch2(self) -> &'a mut W {
203 self.variant(DTPRS0FSEL_A::PRSCH2)
204 }
205 #[doc = "PRS Channel 3 selected as fault source 3"]
206 #[inline(always)]
207 pub fn prsch3(self) -> &'a mut W {
208 self.variant(DTPRS0FSEL_A::PRSCH3)
209 }
210 #[doc = "PRS Channel 4 selected as fault source 4"]
211 #[inline(always)]
212 pub fn prsch4(self) -> &'a mut W {
213 self.variant(DTPRS0FSEL_A::PRSCH4)
214 }
215 #[doc = "PRS Channel 5 selected as fault source 5"]
216 #[inline(always)]
217 pub fn prsch5(self) -> &'a mut W {
218 self.variant(DTPRS0FSEL_A::PRSCH5)
219 }
220 #[doc = "PRS Channel 6 selected as fault source 6"]
221 #[inline(always)]
222 pub fn prsch6(self) -> &'a mut W {
223 self.variant(DTPRS0FSEL_A::PRSCH6)
224 }
225 #[doc = "PRS Channel 7 selected as fault source 7"]
226 #[inline(always)]
227 pub fn prsch7(self) -> &'a mut W {
228 self.variant(DTPRS0FSEL_A::PRSCH7)
229 }
230 #[doc = "PRS Channel 8 selected as fault source 8"]
231 #[inline(always)]
232 pub fn prsch8(self) -> &'a mut W {
233 self.variant(DTPRS0FSEL_A::PRSCH8)
234 }
235 #[doc = "PRS Channel 9 selected as fault source 9"]
236 #[inline(always)]
237 pub fn prsch9(self) -> &'a mut W {
238 self.variant(DTPRS0FSEL_A::PRSCH9)
239 }
240 #[doc = "PRS Channel 10 selected as fault source 10"]
241 #[inline(always)]
242 pub fn prsch10(self) -> &'a mut W {
243 self.variant(DTPRS0FSEL_A::PRSCH10)
244 }
245 #[doc = "PRS Channel 11 selected as fault source 11"]
246 #[inline(always)]
247 pub fn prsch11(self) -> &'a mut W {
248 self.variant(DTPRS0FSEL_A::PRSCH11)
249 }
250 #[doc = "PRS Channel 12 selected as fault source 12"]
251 #[inline(always)]
252 pub fn prsch12(self) -> &'a mut W {
253 self.variant(DTPRS0FSEL_A::PRSCH12)
254 }
255 #[doc = "PRS Channel 13 selected as fault source 13"]
256 #[inline(always)]
257 pub fn prsch13(self) -> &'a mut W {
258 self.variant(DTPRS0FSEL_A::PRSCH13)
259 }
260 #[doc = "PRS Channel 14 selected as fault source 14"]
261 #[inline(always)]
262 pub fn prsch14(self) -> &'a mut W {
263 self.variant(DTPRS0FSEL_A::PRSCH14)
264 }
265 #[doc = "PRS Channel 15 selected as fault source 15"]
266 #[inline(always)]
267 pub fn prsch15(self) -> &'a mut W {
268 self.variant(DTPRS0FSEL_A::PRSCH15)
269 }
270}
271#[doc = "DTI PRS Fault Source 1 Select\n\nValue on reset: 0"]
272#[derive(Clone, Copy, Debug, PartialEq)]
273#[repr(u8)]
274pub enum DTPRS1FSEL_A {
275 #[doc = "0: PRS Channel 0 selected as fault source 1"]
276 PRSCH0 = 0,
277 #[doc = "1: PRS Channel 1 selected as fault source 1"]
278 PRSCH1 = 1,
279 #[doc = "2: PRS Channel 2 selected as fault source 1"]
280 PRSCH2 = 2,
281 #[doc = "3: PRS Channel 3 selected as fault source 1"]
282 PRSCH3 = 3,
283 #[doc = "4: PRS Channel 4 selected as fault source 1"]
284 PRSCH4 = 4,
285 #[doc = "5: PRS Channel 5 selected as fault source 1"]
286 PRSCH5 = 5,
287 #[doc = "6: PRS Channel 6 selected as fault source 1"]
288 PRSCH6 = 6,
289 #[doc = "7: PRS Channel 7 selected as fault source 1"]
290 PRSCH7 = 7,
291 #[doc = "8: PRS Channel 8 selected as fault source 1"]
292 PRSCH8 = 8,
293 #[doc = "9: PRS Channel 9 selected as fault source 1"]
294 PRSCH9 = 9,
295 #[doc = "10: PRS Channel 10 selected as fault source 1"]
296 PRSCH10 = 10,
297 #[doc = "11: PRS Channel 11 selected as fault source 1"]
298 PRSCH11 = 11,
299 #[doc = "12: PRS Channel 12 selected as fault source 1"]
300 PRSCH12 = 12,
301 #[doc = "13: PRS Channel 13 selected as fault source 1"]
302 PRSCH13 = 13,
303 #[doc = "14: PRS Channel 14 selected as fault source 1"]
304 PRSCH14 = 14,
305 #[doc = "15: PRS Channel 15 selected as fault source 1"]
306 PRSCH15 = 15,
307}
308impl From<DTPRS1FSEL_A> for u8 {
309 #[inline(always)]
310 fn from(variant: DTPRS1FSEL_A) -> Self {
311 variant as _
312 }
313}
314#[doc = "Field `DTPRS1FSEL` reader - DTI PRS Fault Source 1 Select"]
315pub type DTPRS1FSEL_R = crate::FieldReader<u8, DTPRS1FSEL_A>;
316impl DTPRS1FSEL_R {
317 #[doc = "Get enumerated values variant"]
318 #[inline(always)]
319 pub fn variant(&self) -> DTPRS1FSEL_A {
320 match self.bits {
321 0 => DTPRS1FSEL_A::PRSCH0,
322 1 => DTPRS1FSEL_A::PRSCH1,
323 2 => DTPRS1FSEL_A::PRSCH2,
324 3 => DTPRS1FSEL_A::PRSCH3,
325 4 => DTPRS1FSEL_A::PRSCH4,
326 5 => DTPRS1FSEL_A::PRSCH5,
327 6 => DTPRS1FSEL_A::PRSCH6,
328 7 => DTPRS1FSEL_A::PRSCH7,
329 8 => DTPRS1FSEL_A::PRSCH8,
330 9 => DTPRS1FSEL_A::PRSCH9,
331 10 => DTPRS1FSEL_A::PRSCH10,
332 11 => DTPRS1FSEL_A::PRSCH11,
333 12 => DTPRS1FSEL_A::PRSCH12,
334 13 => DTPRS1FSEL_A::PRSCH13,
335 14 => DTPRS1FSEL_A::PRSCH14,
336 15 => DTPRS1FSEL_A::PRSCH15,
337 _ => unreachable!(),
338 }
339 }
340 #[doc = "Checks if the value of the field is `PRSCH0`"]
341 #[inline(always)]
342 pub fn is_prsch0(&self) -> bool {
343 *self == DTPRS1FSEL_A::PRSCH0
344 }
345 #[doc = "Checks if the value of the field is `PRSCH1`"]
346 #[inline(always)]
347 pub fn is_prsch1(&self) -> bool {
348 *self == DTPRS1FSEL_A::PRSCH1
349 }
350 #[doc = "Checks if the value of the field is `PRSCH2`"]
351 #[inline(always)]
352 pub fn is_prsch2(&self) -> bool {
353 *self == DTPRS1FSEL_A::PRSCH2
354 }
355 #[doc = "Checks if the value of the field is `PRSCH3`"]
356 #[inline(always)]
357 pub fn is_prsch3(&self) -> bool {
358 *self == DTPRS1FSEL_A::PRSCH3
359 }
360 #[doc = "Checks if the value of the field is `PRSCH4`"]
361 #[inline(always)]
362 pub fn is_prsch4(&self) -> bool {
363 *self == DTPRS1FSEL_A::PRSCH4
364 }
365 #[doc = "Checks if the value of the field is `PRSCH5`"]
366 #[inline(always)]
367 pub fn is_prsch5(&self) -> bool {
368 *self == DTPRS1FSEL_A::PRSCH5
369 }
370 #[doc = "Checks if the value of the field is `PRSCH6`"]
371 #[inline(always)]
372 pub fn is_prsch6(&self) -> bool {
373 *self == DTPRS1FSEL_A::PRSCH6
374 }
375 #[doc = "Checks if the value of the field is `PRSCH7`"]
376 #[inline(always)]
377 pub fn is_prsch7(&self) -> bool {
378 *self == DTPRS1FSEL_A::PRSCH7
379 }
380 #[doc = "Checks if the value of the field is `PRSCH8`"]
381 #[inline(always)]
382 pub fn is_prsch8(&self) -> bool {
383 *self == DTPRS1FSEL_A::PRSCH8
384 }
385 #[doc = "Checks if the value of the field is `PRSCH9`"]
386 #[inline(always)]
387 pub fn is_prsch9(&self) -> bool {
388 *self == DTPRS1FSEL_A::PRSCH9
389 }
390 #[doc = "Checks if the value of the field is `PRSCH10`"]
391 #[inline(always)]
392 pub fn is_prsch10(&self) -> bool {
393 *self == DTPRS1FSEL_A::PRSCH10
394 }
395 #[doc = "Checks if the value of the field is `PRSCH11`"]
396 #[inline(always)]
397 pub fn is_prsch11(&self) -> bool {
398 *self == DTPRS1FSEL_A::PRSCH11
399 }
400 #[doc = "Checks if the value of the field is `PRSCH12`"]
401 #[inline(always)]
402 pub fn is_prsch12(&self) -> bool {
403 *self == DTPRS1FSEL_A::PRSCH12
404 }
405 #[doc = "Checks if the value of the field is `PRSCH13`"]
406 #[inline(always)]
407 pub fn is_prsch13(&self) -> bool {
408 *self == DTPRS1FSEL_A::PRSCH13
409 }
410 #[doc = "Checks if the value of the field is `PRSCH14`"]
411 #[inline(always)]
412 pub fn is_prsch14(&self) -> bool {
413 *self == DTPRS1FSEL_A::PRSCH14
414 }
415 #[doc = "Checks if the value of the field is `PRSCH15`"]
416 #[inline(always)]
417 pub fn is_prsch15(&self) -> bool {
418 *self == DTPRS1FSEL_A::PRSCH15
419 }
420}
421#[doc = "Field `DTPRS1FSEL` writer - DTI PRS Fault Source 1 Select"]
422pub type DTPRS1FSEL_W<'a> = crate::FieldWriterSafe<'a, u32, DTFC_SPEC, u8, DTPRS1FSEL_A, 4, 8>;
423impl<'a> DTPRS1FSEL_W<'a> {
424 #[doc = "PRS Channel 0 selected as fault source 1"]
425 #[inline(always)]
426 pub fn prsch0(self) -> &'a mut W {
427 self.variant(DTPRS1FSEL_A::PRSCH0)
428 }
429 #[doc = "PRS Channel 1 selected as fault source 1"]
430 #[inline(always)]
431 pub fn prsch1(self) -> &'a mut W {
432 self.variant(DTPRS1FSEL_A::PRSCH1)
433 }
434 #[doc = "PRS Channel 2 selected as fault source 1"]
435 #[inline(always)]
436 pub fn prsch2(self) -> &'a mut W {
437 self.variant(DTPRS1FSEL_A::PRSCH2)
438 }
439 #[doc = "PRS Channel 3 selected as fault source 1"]
440 #[inline(always)]
441 pub fn prsch3(self) -> &'a mut W {
442 self.variant(DTPRS1FSEL_A::PRSCH3)
443 }
444 #[doc = "PRS Channel 4 selected as fault source 1"]
445 #[inline(always)]
446 pub fn prsch4(self) -> &'a mut W {
447 self.variant(DTPRS1FSEL_A::PRSCH4)
448 }
449 #[doc = "PRS Channel 5 selected as fault source 1"]
450 #[inline(always)]
451 pub fn prsch5(self) -> &'a mut W {
452 self.variant(DTPRS1FSEL_A::PRSCH5)
453 }
454 #[doc = "PRS Channel 6 selected as fault source 1"]
455 #[inline(always)]
456 pub fn prsch6(self) -> &'a mut W {
457 self.variant(DTPRS1FSEL_A::PRSCH6)
458 }
459 #[doc = "PRS Channel 7 selected as fault source 1"]
460 #[inline(always)]
461 pub fn prsch7(self) -> &'a mut W {
462 self.variant(DTPRS1FSEL_A::PRSCH7)
463 }
464 #[doc = "PRS Channel 8 selected as fault source 1"]
465 #[inline(always)]
466 pub fn prsch8(self) -> &'a mut W {
467 self.variant(DTPRS1FSEL_A::PRSCH8)
468 }
469 #[doc = "PRS Channel 9 selected as fault source 1"]
470 #[inline(always)]
471 pub fn prsch9(self) -> &'a mut W {
472 self.variant(DTPRS1FSEL_A::PRSCH9)
473 }
474 #[doc = "PRS Channel 10 selected as fault source 1"]
475 #[inline(always)]
476 pub fn prsch10(self) -> &'a mut W {
477 self.variant(DTPRS1FSEL_A::PRSCH10)
478 }
479 #[doc = "PRS Channel 11 selected as fault source 1"]
480 #[inline(always)]
481 pub fn prsch11(self) -> &'a mut W {
482 self.variant(DTPRS1FSEL_A::PRSCH11)
483 }
484 #[doc = "PRS Channel 12 selected as fault source 1"]
485 #[inline(always)]
486 pub fn prsch12(self) -> &'a mut W {
487 self.variant(DTPRS1FSEL_A::PRSCH12)
488 }
489 #[doc = "PRS Channel 13 selected as fault source 1"]
490 #[inline(always)]
491 pub fn prsch13(self) -> &'a mut W {
492 self.variant(DTPRS1FSEL_A::PRSCH13)
493 }
494 #[doc = "PRS Channel 14 selected as fault source 1"]
495 #[inline(always)]
496 pub fn prsch14(self) -> &'a mut W {
497 self.variant(DTPRS1FSEL_A::PRSCH14)
498 }
499 #[doc = "PRS Channel 15 selected as fault source 1"]
500 #[inline(always)]
501 pub fn prsch15(self) -> &'a mut W {
502 self.variant(DTPRS1FSEL_A::PRSCH15)
503 }
504}
505#[doc = "DTI Fault Action\n\nValue on reset: 0"]
506#[derive(Clone, Copy, Debug, PartialEq)]
507#[repr(u8)]
508pub enum DTFA_A {
509 #[doc = "0: No action on fault"]
510 NONE = 0,
511 #[doc = "1: Set outputs inactive"]
512 INACTIVE = 1,
513 #[doc = "2: Clear outputs"]
514 CLEAR = 2,
515 #[doc = "3: Tristate outputs"]
516 TRISTATE = 3,
517}
518impl From<DTFA_A> for u8 {
519 #[inline(always)]
520 fn from(variant: DTFA_A) -> Self {
521 variant as _
522 }
523}
524#[doc = "Field `DTFA` reader - DTI Fault Action"]
525pub type DTFA_R = crate::FieldReader<u8, DTFA_A>;
526impl DTFA_R {
527 #[doc = "Get enumerated values variant"]
528 #[inline(always)]
529 pub fn variant(&self) -> DTFA_A {
530 match self.bits {
531 0 => DTFA_A::NONE,
532 1 => DTFA_A::INACTIVE,
533 2 => DTFA_A::CLEAR,
534 3 => DTFA_A::TRISTATE,
535 _ => unreachable!(),
536 }
537 }
538 #[doc = "Checks if the value of the field is `NONE`"]
539 #[inline(always)]
540 pub fn is_none(&self) -> bool {
541 *self == DTFA_A::NONE
542 }
543 #[doc = "Checks if the value of the field is `INACTIVE`"]
544 #[inline(always)]
545 pub fn is_inactive(&self) -> bool {
546 *self == DTFA_A::INACTIVE
547 }
548 #[doc = "Checks if the value of the field is `CLEAR`"]
549 #[inline(always)]
550 pub fn is_clear(&self) -> bool {
551 *self == DTFA_A::CLEAR
552 }
553 #[doc = "Checks if the value of the field is `TRISTATE`"]
554 #[inline(always)]
555 pub fn is_tristate(&self) -> bool {
556 *self == DTFA_A::TRISTATE
557 }
558}
559#[doc = "Field `DTFA` writer - DTI Fault Action"]
560pub type DTFA_W<'a> = crate::FieldWriterSafe<'a, u32, DTFC_SPEC, u8, DTFA_A, 2, 16>;
561impl<'a> DTFA_W<'a> {
562 #[doc = "No action on fault"]
563 #[inline(always)]
564 pub fn none(self) -> &'a mut W {
565 self.variant(DTFA_A::NONE)
566 }
567 #[doc = "Set outputs inactive"]
568 #[inline(always)]
569 pub fn inactive(self) -> &'a mut W {
570 self.variant(DTFA_A::INACTIVE)
571 }
572 #[doc = "Clear outputs"]
573 #[inline(always)]
574 pub fn clear(self) -> &'a mut W {
575 self.variant(DTFA_A::CLEAR)
576 }
577 #[doc = "Tristate outputs"]
578 #[inline(always)]
579 pub fn tristate(self) -> &'a mut W {
580 self.variant(DTFA_A::TRISTATE)
581 }
582}
583#[doc = "Field `DTPRS0FEN` reader - DTI PRS 0 Fault Enable"]
584pub type DTPRS0FEN_R = crate::BitReader<bool>;
585#[doc = "Field `DTPRS0FEN` writer - DTI PRS 0 Fault Enable"]
586pub type DTPRS0FEN_W<'a> = crate::BitWriter<'a, u32, DTFC_SPEC, bool, 24>;
587#[doc = "Field `DTPRS1FEN` reader - DTI PRS 1 Fault Enable"]
588pub type DTPRS1FEN_R = crate::BitReader<bool>;
589#[doc = "Field `DTPRS1FEN` writer - DTI PRS 1 Fault Enable"]
590pub type DTPRS1FEN_W<'a> = crate::BitWriter<'a, u32, DTFC_SPEC, bool, 25>;
591#[doc = "Field `DTDBGFEN` reader - DTI Debugger Fault Enable"]
592pub type DTDBGFEN_R = crate::BitReader<bool>;
593#[doc = "Field `DTDBGFEN` writer - DTI Debugger Fault Enable"]
594pub type DTDBGFEN_W<'a> = crate::BitWriter<'a, u32, DTFC_SPEC, bool, 26>;
595#[doc = "Field `DTLOCKUPFEN` reader - DTI Lockup Fault Enable"]
596pub type DTLOCKUPFEN_R = crate::BitReader<bool>;
597#[doc = "Field `DTLOCKUPFEN` writer - DTI Lockup Fault Enable"]
598pub type DTLOCKUPFEN_W<'a> = crate::BitWriter<'a, u32, DTFC_SPEC, bool, 27>;
599impl R {
600 #[doc = "Bits 0:3 - DTI PRS Fault Source 0 Select"]
601 #[inline(always)]
602 pub fn dtprs0fsel(&self) -> DTPRS0FSEL_R {
603 DTPRS0FSEL_R::new((self.bits & 0x0f) as u8)
604 }
605 #[doc = "Bits 8:11 - DTI PRS Fault Source 1 Select"]
606 #[inline(always)]
607 pub fn dtprs1fsel(&self) -> DTPRS1FSEL_R {
608 DTPRS1FSEL_R::new(((self.bits >> 8) & 0x0f) as u8)
609 }
610 #[doc = "Bits 16:17 - DTI Fault Action"]
611 #[inline(always)]
612 pub fn dtfa(&self) -> DTFA_R {
613 DTFA_R::new(((self.bits >> 16) & 3) as u8)
614 }
615 #[doc = "Bit 24 - DTI PRS 0 Fault Enable"]
616 #[inline(always)]
617 pub fn dtprs0fen(&self) -> DTPRS0FEN_R {
618 DTPRS0FEN_R::new(((self.bits >> 24) & 1) != 0)
619 }
620 #[doc = "Bit 25 - DTI PRS 1 Fault Enable"]
621 #[inline(always)]
622 pub fn dtprs1fen(&self) -> DTPRS1FEN_R {
623 DTPRS1FEN_R::new(((self.bits >> 25) & 1) != 0)
624 }
625 #[doc = "Bit 26 - DTI Debugger Fault Enable"]
626 #[inline(always)]
627 pub fn dtdbgfen(&self) -> DTDBGFEN_R {
628 DTDBGFEN_R::new(((self.bits >> 26) & 1) != 0)
629 }
630 #[doc = "Bit 27 - DTI Lockup Fault Enable"]
631 #[inline(always)]
632 pub fn dtlockupfen(&self) -> DTLOCKUPFEN_R {
633 DTLOCKUPFEN_R::new(((self.bits >> 27) & 1) != 0)
634 }
635}
636impl W {
637 #[doc = "Bits 0:3 - DTI PRS Fault Source 0 Select"]
638 #[inline(always)]
639 pub fn dtprs0fsel(&mut self) -> DTPRS0FSEL_W {
640 DTPRS0FSEL_W::new(self)
641 }
642 #[doc = "Bits 8:11 - DTI PRS Fault Source 1 Select"]
643 #[inline(always)]
644 pub fn dtprs1fsel(&mut self) -> DTPRS1FSEL_W {
645 DTPRS1FSEL_W::new(self)
646 }
647 #[doc = "Bits 16:17 - DTI Fault Action"]
648 #[inline(always)]
649 pub fn dtfa(&mut self) -> DTFA_W {
650 DTFA_W::new(self)
651 }
652 #[doc = "Bit 24 - DTI PRS 0 Fault Enable"]
653 #[inline(always)]
654 pub fn dtprs0fen(&mut self) -> DTPRS0FEN_W {
655 DTPRS0FEN_W::new(self)
656 }
657 #[doc = "Bit 25 - DTI PRS 1 Fault Enable"]
658 #[inline(always)]
659 pub fn dtprs1fen(&mut self) -> DTPRS1FEN_W {
660 DTPRS1FEN_W::new(self)
661 }
662 #[doc = "Bit 26 - DTI Debugger Fault Enable"]
663 #[inline(always)]
664 pub fn dtdbgfen(&mut self) -> DTDBGFEN_W {
665 DTDBGFEN_W::new(self)
666 }
667 #[doc = "Bit 27 - DTI Lockup Fault Enable"]
668 #[inline(always)]
669 pub fn dtlockupfen(&mut self) -> DTLOCKUPFEN_W {
670 DTLOCKUPFEN_W::new(self)
671 }
672 #[doc = "Writes raw bits to the register."]
673 #[inline(always)]
674 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
675 self.0.bits(bits);
676 self
677 }
678}
679#[doc = "DTI Fault Configuration Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dtfc](index.html) module"]
680pub struct DTFC_SPEC;
681impl crate::RegisterSpec for DTFC_SPEC {
682 type Ux = u32;
683}
684#[doc = "`read()` method returns [dtfc::R](R) reader structure"]
685impl crate::Readable for DTFC_SPEC {
686 type Reader = R;
687}
688#[doc = "`write(|w| ..)` method takes [dtfc::W](W) writer structure"]
689impl crate::Writable for DTFC_SPEC {
690 type Writer = W;
691}
692#[doc = "`reset()` method sets DTFC to value 0"]
693impl crate::Resettable for DTFC_SPEC {
694 #[inline(always)]
695 fn reset_value() -> Self::Ux {
696 0
697 }
698}