efm32pg1b200_pac/timer0/
dtfc.rs

1#[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}
66impl From<DTPRS0FSEL_A> for u8 {
67    #[inline(always)]
68    fn from(variant: DTPRS0FSEL_A) -> Self {
69        variant as _
70    }
71}
72#[doc = "Field `DTPRS0FSEL` reader - DTI PRS Fault Source 0 Select"]
73pub type DTPRS0FSEL_R = crate::FieldReader<u8, DTPRS0FSEL_A>;
74impl DTPRS0FSEL_R {
75    #[doc = "Get enumerated values variant"]
76    #[inline(always)]
77    pub fn variant(&self) -> Option<DTPRS0FSEL_A> {
78        match self.bits {
79            0 => Some(DTPRS0FSEL_A::PRSCH0),
80            1 => Some(DTPRS0FSEL_A::PRSCH1),
81            2 => Some(DTPRS0FSEL_A::PRSCH2),
82            3 => Some(DTPRS0FSEL_A::PRSCH3),
83            4 => Some(DTPRS0FSEL_A::PRSCH4),
84            5 => Some(DTPRS0FSEL_A::PRSCH5),
85            6 => Some(DTPRS0FSEL_A::PRSCH6),
86            7 => Some(DTPRS0FSEL_A::PRSCH7),
87            8 => Some(DTPRS0FSEL_A::PRSCH8),
88            9 => Some(DTPRS0FSEL_A::PRSCH9),
89            10 => Some(DTPRS0FSEL_A::PRSCH10),
90            11 => Some(DTPRS0FSEL_A::PRSCH11),
91            _ => None,
92        }
93    }
94    #[doc = "Checks if the value of the field is `PRSCH0`"]
95    #[inline(always)]
96    pub fn is_prsch0(&self) -> bool {
97        *self == DTPRS0FSEL_A::PRSCH0
98    }
99    #[doc = "Checks if the value of the field is `PRSCH1`"]
100    #[inline(always)]
101    pub fn is_prsch1(&self) -> bool {
102        *self == DTPRS0FSEL_A::PRSCH1
103    }
104    #[doc = "Checks if the value of the field is `PRSCH2`"]
105    #[inline(always)]
106    pub fn is_prsch2(&self) -> bool {
107        *self == DTPRS0FSEL_A::PRSCH2
108    }
109    #[doc = "Checks if the value of the field is `PRSCH3`"]
110    #[inline(always)]
111    pub fn is_prsch3(&self) -> bool {
112        *self == DTPRS0FSEL_A::PRSCH3
113    }
114    #[doc = "Checks if the value of the field is `PRSCH4`"]
115    #[inline(always)]
116    pub fn is_prsch4(&self) -> bool {
117        *self == DTPRS0FSEL_A::PRSCH4
118    }
119    #[doc = "Checks if the value of the field is `PRSCH5`"]
120    #[inline(always)]
121    pub fn is_prsch5(&self) -> bool {
122        *self == DTPRS0FSEL_A::PRSCH5
123    }
124    #[doc = "Checks if the value of the field is `PRSCH6`"]
125    #[inline(always)]
126    pub fn is_prsch6(&self) -> bool {
127        *self == DTPRS0FSEL_A::PRSCH6
128    }
129    #[doc = "Checks if the value of the field is `PRSCH7`"]
130    #[inline(always)]
131    pub fn is_prsch7(&self) -> bool {
132        *self == DTPRS0FSEL_A::PRSCH7
133    }
134    #[doc = "Checks if the value of the field is `PRSCH8`"]
135    #[inline(always)]
136    pub fn is_prsch8(&self) -> bool {
137        *self == DTPRS0FSEL_A::PRSCH8
138    }
139    #[doc = "Checks if the value of the field is `PRSCH9`"]
140    #[inline(always)]
141    pub fn is_prsch9(&self) -> bool {
142        *self == DTPRS0FSEL_A::PRSCH9
143    }
144    #[doc = "Checks if the value of the field is `PRSCH10`"]
145    #[inline(always)]
146    pub fn is_prsch10(&self) -> bool {
147        *self == DTPRS0FSEL_A::PRSCH10
148    }
149    #[doc = "Checks if the value of the field is `PRSCH11`"]
150    #[inline(always)]
151    pub fn is_prsch11(&self) -> bool {
152        *self == DTPRS0FSEL_A::PRSCH11
153    }
154}
155#[doc = "Field `DTPRS0FSEL` writer - DTI PRS Fault Source 0 Select"]
156pub type DTPRS0FSEL_W<'a> = crate::FieldWriter<'a, u32, DTFC_SPEC, u8, DTPRS0FSEL_A, 4, 0>;
157impl<'a> DTPRS0FSEL_W<'a> {
158    #[doc = "PRS Channel 0 selected as fault source 0"]
159    #[inline(always)]
160    pub fn prsch0(self) -> &'a mut W {
161        self.variant(DTPRS0FSEL_A::PRSCH0)
162    }
163    #[doc = "PRS Channel 1 selected as fault source 1"]
164    #[inline(always)]
165    pub fn prsch1(self) -> &'a mut W {
166        self.variant(DTPRS0FSEL_A::PRSCH1)
167    }
168    #[doc = "PRS Channel 2 selected as fault source 2"]
169    #[inline(always)]
170    pub fn prsch2(self) -> &'a mut W {
171        self.variant(DTPRS0FSEL_A::PRSCH2)
172    }
173    #[doc = "PRS Channel 3 selected as fault source 3"]
174    #[inline(always)]
175    pub fn prsch3(self) -> &'a mut W {
176        self.variant(DTPRS0FSEL_A::PRSCH3)
177    }
178    #[doc = "PRS Channel 4 selected as fault source 4"]
179    #[inline(always)]
180    pub fn prsch4(self) -> &'a mut W {
181        self.variant(DTPRS0FSEL_A::PRSCH4)
182    }
183    #[doc = "PRS Channel 5 selected as fault source 5"]
184    #[inline(always)]
185    pub fn prsch5(self) -> &'a mut W {
186        self.variant(DTPRS0FSEL_A::PRSCH5)
187    }
188    #[doc = "PRS Channel 6 selected as fault source 6"]
189    #[inline(always)]
190    pub fn prsch6(self) -> &'a mut W {
191        self.variant(DTPRS0FSEL_A::PRSCH6)
192    }
193    #[doc = "PRS Channel 7 selected as fault source 7"]
194    #[inline(always)]
195    pub fn prsch7(self) -> &'a mut W {
196        self.variant(DTPRS0FSEL_A::PRSCH7)
197    }
198    #[doc = "PRS Channel 8 selected as fault source 8"]
199    #[inline(always)]
200    pub fn prsch8(self) -> &'a mut W {
201        self.variant(DTPRS0FSEL_A::PRSCH8)
202    }
203    #[doc = "PRS Channel 9 selected as fault source 9"]
204    #[inline(always)]
205    pub fn prsch9(self) -> &'a mut W {
206        self.variant(DTPRS0FSEL_A::PRSCH9)
207    }
208    #[doc = "PRS Channel 10 selected as fault source 10"]
209    #[inline(always)]
210    pub fn prsch10(self) -> &'a mut W {
211        self.variant(DTPRS0FSEL_A::PRSCH10)
212    }
213    #[doc = "PRS Channel 11 selected as fault source 11"]
214    #[inline(always)]
215    pub fn prsch11(self) -> &'a mut W {
216        self.variant(DTPRS0FSEL_A::PRSCH11)
217    }
218}
219#[doc = "DTI PRS Fault Source 1 Select\n\nValue on reset: 0"]
220#[derive(Clone, Copy, Debug, PartialEq)]
221#[repr(u8)]
222pub enum DTPRS1FSEL_A {
223    #[doc = "0: PRS Channel 0 selected as fault source 1"]
224    PRSCH0 = 0,
225    #[doc = "1: PRS Channel 1 selected as fault source 1"]
226    PRSCH1 = 1,
227    #[doc = "2: PRS Channel 2 selected as fault source 1"]
228    PRSCH2 = 2,
229    #[doc = "3: PRS Channel 3 selected as fault source 1"]
230    PRSCH3 = 3,
231    #[doc = "4: PRS Channel 4 selected as fault source 1"]
232    PRSCH4 = 4,
233    #[doc = "5: PRS Channel 5 selected as fault source 1"]
234    PRSCH5 = 5,
235    #[doc = "6: PRS Channel 6 selected as fault source 1"]
236    PRSCH6 = 6,
237    #[doc = "7: PRS Channel 7 selected as fault source 1"]
238    PRSCH7 = 7,
239    #[doc = "8: PRS Channel 8 selected as fault source 1"]
240    PRSCH8 = 8,
241    #[doc = "9: PRS Channel 9 selected as fault source 1"]
242    PRSCH9 = 9,
243    #[doc = "10: PRS Channel 10 selected as fault source 1"]
244    PRSCH10 = 10,
245    #[doc = "11: PRS Channel 11 selected as fault source 1"]
246    PRSCH11 = 11,
247}
248impl From<DTPRS1FSEL_A> for u8 {
249    #[inline(always)]
250    fn from(variant: DTPRS1FSEL_A) -> Self {
251        variant as _
252    }
253}
254#[doc = "Field `DTPRS1FSEL` reader - DTI PRS Fault Source 1 Select"]
255pub type DTPRS1FSEL_R = crate::FieldReader<u8, DTPRS1FSEL_A>;
256impl DTPRS1FSEL_R {
257    #[doc = "Get enumerated values variant"]
258    #[inline(always)]
259    pub fn variant(&self) -> Option<DTPRS1FSEL_A> {
260        match self.bits {
261            0 => Some(DTPRS1FSEL_A::PRSCH0),
262            1 => Some(DTPRS1FSEL_A::PRSCH1),
263            2 => Some(DTPRS1FSEL_A::PRSCH2),
264            3 => Some(DTPRS1FSEL_A::PRSCH3),
265            4 => Some(DTPRS1FSEL_A::PRSCH4),
266            5 => Some(DTPRS1FSEL_A::PRSCH5),
267            6 => Some(DTPRS1FSEL_A::PRSCH6),
268            7 => Some(DTPRS1FSEL_A::PRSCH7),
269            8 => Some(DTPRS1FSEL_A::PRSCH8),
270            9 => Some(DTPRS1FSEL_A::PRSCH9),
271            10 => Some(DTPRS1FSEL_A::PRSCH10),
272            11 => Some(DTPRS1FSEL_A::PRSCH11),
273            _ => None,
274        }
275    }
276    #[doc = "Checks if the value of the field is `PRSCH0`"]
277    #[inline(always)]
278    pub fn is_prsch0(&self) -> bool {
279        *self == DTPRS1FSEL_A::PRSCH0
280    }
281    #[doc = "Checks if the value of the field is `PRSCH1`"]
282    #[inline(always)]
283    pub fn is_prsch1(&self) -> bool {
284        *self == DTPRS1FSEL_A::PRSCH1
285    }
286    #[doc = "Checks if the value of the field is `PRSCH2`"]
287    #[inline(always)]
288    pub fn is_prsch2(&self) -> bool {
289        *self == DTPRS1FSEL_A::PRSCH2
290    }
291    #[doc = "Checks if the value of the field is `PRSCH3`"]
292    #[inline(always)]
293    pub fn is_prsch3(&self) -> bool {
294        *self == DTPRS1FSEL_A::PRSCH3
295    }
296    #[doc = "Checks if the value of the field is `PRSCH4`"]
297    #[inline(always)]
298    pub fn is_prsch4(&self) -> bool {
299        *self == DTPRS1FSEL_A::PRSCH4
300    }
301    #[doc = "Checks if the value of the field is `PRSCH5`"]
302    #[inline(always)]
303    pub fn is_prsch5(&self) -> bool {
304        *self == DTPRS1FSEL_A::PRSCH5
305    }
306    #[doc = "Checks if the value of the field is `PRSCH6`"]
307    #[inline(always)]
308    pub fn is_prsch6(&self) -> bool {
309        *self == DTPRS1FSEL_A::PRSCH6
310    }
311    #[doc = "Checks if the value of the field is `PRSCH7`"]
312    #[inline(always)]
313    pub fn is_prsch7(&self) -> bool {
314        *self == DTPRS1FSEL_A::PRSCH7
315    }
316    #[doc = "Checks if the value of the field is `PRSCH8`"]
317    #[inline(always)]
318    pub fn is_prsch8(&self) -> bool {
319        *self == DTPRS1FSEL_A::PRSCH8
320    }
321    #[doc = "Checks if the value of the field is `PRSCH9`"]
322    #[inline(always)]
323    pub fn is_prsch9(&self) -> bool {
324        *self == DTPRS1FSEL_A::PRSCH9
325    }
326    #[doc = "Checks if the value of the field is `PRSCH10`"]
327    #[inline(always)]
328    pub fn is_prsch10(&self) -> bool {
329        *self == DTPRS1FSEL_A::PRSCH10
330    }
331    #[doc = "Checks if the value of the field is `PRSCH11`"]
332    #[inline(always)]
333    pub fn is_prsch11(&self) -> bool {
334        *self == DTPRS1FSEL_A::PRSCH11
335    }
336}
337#[doc = "Field `DTPRS1FSEL` writer - DTI PRS Fault Source 1 Select"]
338pub type DTPRS1FSEL_W<'a> = crate::FieldWriter<'a, u32, DTFC_SPEC, u8, DTPRS1FSEL_A, 4, 8>;
339impl<'a> DTPRS1FSEL_W<'a> {
340    #[doc = "PRS Channel 0 selected as fault source 1"]
341    #[inline(always)]
342    pub fn prsch0(self) -> &'a mut W {
343        self.variant(DTPRS1FSEL_A::PRSCH0)
344    }
345    #[doc = "PRS Channel 1 selected as fault source 1"]
346    #[inline(always)]
347    pub fn prsch1(self) -> &'a mut W {
348        self.variant(DTPRS1FSEL_A::PRSCH1)
349    }
350    #[doc = "PRS Channel 2 selected as fault source 1"]
351    #[inline(always)]
352    pub fn prsch2(self) -> &'a mut W {
353        self.variant(DTPRS1FSEL_A::PRSCH2)
354    }
355    #[doc = "PRS Channel 3 selected as fault source 1"]
356    #[inline(always)]
357    pub fn prsch3(self) -> &'a mut W {
358        self.variant(DTPRS1FSEL_A::PRSCH3)
359    }
360    #[doc = "PRS Channel 4 selected as fault source 1"]
361    #[inline(always)]
362    pub fn prsch4(self) -> &'a mut W {
363        self.variant(DTPRS1FSEL_A::PRSCH4)
364    }
365    #[doc = "PRS Channel 5 selected as fault source 1"]
366    #[inline(always)]
367    pub fn prsch5(self) -> &'a mut W {
368        self.variant(DTPRS1FSEL_A::PRSCH5)
369    }
370    #[doc = "PRS Channel 6 selected as fault source 1"]
371    #[inline(always)]
372    pub fn prsch6(self) -> &'a mut W {
373        self.variant(DTPRS1FSEL_A::PRSCH6)
374    }
375    #[doc = "PRS Channel 7 selected as fault source 1"]
376    #[inline(always)]
377    pub fn prsch7(self) -> &'a mut W {
378        self.variant(DTPRS1FSEL_A::PRSCH7)
379    }
380    #[doc = "PRS Channel 8 selected as fault source 1"]
381    #[inline(always)]
382    pub fn prsch8(self) -> &'a mut W {
383        self.variant(DTPRS1FSEL_A::PRSCH8)
384    }
385    #[doc = "PRS Channel 9 selected as fault source 1"]
386    #[inline(always)]
387    pub fn prsch9(self) -> &'a mut W {
388        self.variant(DTPRS1FSEL_A::PRSCH9)
389    }
390    #[doc = "PRS Channel 10 selected as fault source 1"]
391    #[inline(always)]
392    pub fn prsch10(self) -> &'a mut W {
393        self.variant(DTPRS1FSEL_A::PRSCH10)
394    }
395    #[doc = "PRS Channel 11 selected as fault source 1"]
396    #[inline(always)]
397    pub fn prsch11(self) -> &'a mut W {
398        self.variant(DTPRS1FSEL_A::PRSCH11)
399    }
400}
401#[doc = "DTI Fault Action\n\nValue on reset: 0"]
402#[derive(Clone, Copy, Debug, PartialEq)]
403#[repr(u8)]
404pub enum DTFA_A {
405    #[doc = "0: No action on fault"]
406    NONE = 0,
407    #[doc = "1: Set outputs inactive"]
408    INACTIVE = 1,
409    #[doc = "2: Clear outputs"]
410    CLEAR = 2,
411    #[doc = "3: Tristate outputs"]
412    TRISTATE = 3,
413}
414impl From<DTFA_A> for u8 {
415    #[inline(always)]
416    fn from(variant: DTFA_A) -> Self {
417        variant as _
418    }
419}
420#[doc = "Field `DTFA` reader - DTI Fault Action"]
421pub type DTFA_R = crate::FieldReader<u8, DTFA_A>;
422impl DTFA_R {
423    #[doc = "Get enumerated values variant"]
424    #[inline(always)]
425    pub fn variant(&self) -> DTFA_A {
426        match self.bits {
427            0 => DTFA_A::NONE,
428            1 => DTFA_A::INACTIVE,
429            2 => DTFA_A::CLEAR,
430            3 => DTFA_A::TRISTATE,
431            _ => unreachable!(),
432        }
433    }
434    #[doc = "Checks if the value of the field is `NONE`"]
435    #[inline(always)]
436    pub fn is_none(&self) -> bool {
437        *self == DTFA_A::NONE
438    }
439    #[doc = "Checks if the value of the field is `INACTIVE`"]
440    #[inline(always)]
441    pub fn is_inactive(&self) -> bool {
442        *self == DTFA_A::INACTIVE
443    }
444    #[doc = "Checks if the value of the field is `CLEAR`"]
445    #[inline(always)]
446    pub fn is_clear(&self) -> bool {
447        *self == DTFA_A::CLEAR
448    }
449    #[doc = "Checks if the value of the field is `TRISTATE`"]
450    #[inline(always)]
451    pub fn is_tristate(&self) -> bool {
452        *self == DTFA_A::TRISTATE
453    }
454}
455#[doc = "Field `DTFA` writer - DTI Fault Action"]
456pub type DTFA_W<'a> = crate::FieldWriterSafe<'a, u32, DTFC_SPEC, u8, DTFA_A, 2, 16>;
457impl<'a> DTFA_W<'a> {
458    #[doc = "No action on fault"]
459    #[inline(always)]
460    pub fn none(self) -> &'a mut W {
461        self.variant(DTFA_A::NONE)
462    }
463    #[doc = "Set outputs inactive"]
464    #[inline(always)]
465    pub fn inactive(self) -> &'a mut W {
466        self.variant(DTFA_A::INACTIVE)
467    }
468    #[doc = "Clear outputs"]
469    #[inline(always)]
470    pub fn clear(self) -> &'a mut W {
471        self.variant(DTFA_A::CLEAR)
472    }
473    #[doc = "Tristate outputs"]
474    #[inline(always)]
475    pub fn tristate(self) -> &'a mut W {
476        self.variant(DTFA_A::TRISTATE)
477    }
478}
479#[doc = "Field `DTPRS0FEN` reader - DTI PRS 0 Fault Enable"]
480pub type DTPRS0FEN_R = crate::BitReader<bool>;
481#[doc = "Field `DTPRS0FEN` writer - DTI PRS 0 Fault Enable"]
482pub type DTPRS0FEN_W<'a> = crate::BitWriter<'a, u32, DTFC_SPEC, bool, 24>;
483#[doc = "Field `DTPRS1FEN` reader - DTI PRS 1 Fault Enable"]
484pub type DTPRS1FEN_R = crate::BitReader<bool>;
485#[doc = "Field `DTPRS1FEN` writer - DTI PRS 1 Fault Enable"]
486pub type DTPRS1FEN_W<'a> = crate::BitWriter<'a, u32, DTFC_SPEC, bool, 25>;
487#[doc = "Field `DTDBGFEN` reader - DTI Debugger Fault Enable"]
488pub type DTDBGFEN_R = crate::BitReader<bool>;
489#[doc = "Field `DTDBGFEN` writer - DTI Debugger Fault Enable"]
490pub type DTDBGFEN_W<'a> = crate::BitWriter<'a, u32, DTFC_SPEC, bool, 26>;
491#[doc = "Field `DTLOCKUPFEN` reader - DTI Lockup Fault Enable"]
492pub type DTLOCKUPFEN_R = crate::BitReader<bool>;
493#[doc = "Field `DTLOCKUPFEN` writer - DTI Lockup Fault Enable"]
494pub type DTLOCKUPFEN_W<'a> = crate::BitWriter<'a, u32, DTFC_SPEC, bool, 27>;
495impl R {
496    #[doc = "Bits 0:3 - DTI PRS Fault Source 0 Select"]
497    #[inline(always)]
498    pub fn dtprs0fsel(&self) -> DTPRS0FSEL_R {
499        DTPRS0FSEL_R::new((self.bits & 0x0f) as u8)
500    }
501    #[doc = "Bits 8:11 - DTI PRS Fault Source 1 Select"]
502    #[inline(always)]
503    pub fn dtprs1fsel(&self) -> DTPRS1FSEL_R {
504        DTPRS1FSEL_R::new(((self.bits >> 8) & 0x0f) as u8)
505    }
506    #[doc = "Bits 16:17 - DTI Fault Action"]
507    #[inline(always)]
508    pub fn dtfa(&self) -> DTFA_R {
509        DTFA_R::new(((self.bits >> 16) & 3) as u8)
510    }
511    #[doc = "Bit 24 - DTI PRS 0 Fault Enable"]
512    #[inline(always)]
513    pub fn dtprs0fen(&self) -> DTPRS0FEN_R {
514        DTPRS0FEN_R::new(((self.bits >> 24) & 1) != 0)
515    }
516    #[doc = "Bit 25 - DTI PRS 1 Fault Enable"]
517    #[inline(always)]
518    pub fn dtprs1fen(&self) -> DTPRS1FEN_R {
519        DTPRS1FEN_R::new(((self.bits >> 25) & 1) != 0)
520    }
521    #[doc = "Bit 26 - DTI Debugger Fault Enable"]
522    #[inline(always)]
523    pub fn dtdbgfen(&self) -> DTDBGFEN_R {
524        DTDBGFEN_R::new(((self.bits >> 26) & 1) != 0)
525    }
526    #[doc = "Bit 27 - DTI Lockup Fault Enable"]
527    #[inline(always)]
528    pub fn dtlockupfen(&self) -> DTLOCKUPFEN_R {
529        DTLOCKUPFEN_R::new(((self.bits >> 27) & 1) != 0)
530    }
531}
532impl W {
533    #[doc = "Bits 0:3 - DTI PRS Fault Source 0 Select"]
534    #[inline(always)]
535    pub fn dtprs0fsel(&mut self) -> DTPRS0FSEL_W {
536        DTPRS0FSEL_W::new(self)
537    }
538    #[doc = "Bits 8:11 - DTI PRS Fault Source 1 Select"]
539    #[inline(always)]
540    pub fn dtprs1fsel(&mut self) -> DTPRS1FSEL_W {
541        DTPRS1FSEL_W::new(self)
542    }
543    #[doc = "Bits 16:17 - DTI Fault Action"]
544    #[inline(always)]
545    pub fn dtfa(&mut self) -> DTFA_W {
546        DTFA_W::new(self)
547    }
548    #[doc = "Bit 24 - DTI PRS 0 Fault Enable"]
549    #[inline(always)]
550    pub fn dtprs0fen(&mut self) -> DTPRS0FEN_W {
551        DTPRS0FEN_W::new(self)
552    }
553    #[doc = "Bit 25 - DTI PRS 1 Fault Enable"]
554    #[inline(always)]
555    pub fn dtprs1fen(&mut self) -> DTPRS1FEN_W {
556        DTPRS1FEN_W::new(self)
557    }
558    #[doc = "Bit 26 - DTI Debugger Fault Enable"]
559    #[inline(always)]
560    pub fn dtdbgfen(&mut self) -> DTDBGFEN_W {
561        DTDBGFEN_W::new(self)
562    }
563    #[doc = "Bit 27 - DTI Lockup Fault Enable"]
564    #[inline(always)]
565    pub fn dtlockupfen(&mut self) -> DTLOCKUPFEN_W {
566        DTLOCKUPFEN_W::new(self)
567    }
568    #[doc = "Writes raw bits to the register."]
569    #[inline(always)]
570    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
571        self.0.bits(bits);
572        self
573    }
574}
575#[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"]
576pub struct DTFC_SPEC;
577impl crate::RegisterSpec for DTFC_SPEC {
578    type Ux = u32;
579}
580#[doc = "`read()` method returns [dtfc::R](R) reader structure"]
581impl crate::Readable for DTFC_SPEC {
582    type Reader = R;
583}
584#[doc = "`write(|w| ..)` method takes [dtfc::W](W) writer structure"]
585impl crate::Writable for DTFC_SPEC {
586    type Writer = W;
587}
588#[doc = "`reset()` method sets DTFC to value 0"]
589impl crate::Resettable for DTFC_SPEC {
590    #[inline(always)]
591    fn reset_value() -> Self::Ux {
592        0
593    }
594}