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