efm32gg11b110_pac/wtimer3/
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 #[doc = "16: PRS Channel 16 selected as fault source 16"]
74 PRSCH16 = 16,
75 #[doc = "17: PRS Channel 17 selected as fault source 17"]
76 PRSCH17 = 17,
77 #[doc = "18: PRS Channel 18 selected as fault source 18"]
78 PRSCH18 = 18,
79 #[doc = "19: PRS Channel 19 selected as fault source 19"]
80 PRSCH19 = 19,
81 #[doc = "20: PRS Channel 20 selected as fault source 20"]
82 PRSCH20 = 20,
83 #[doc = "21: PRS Channel 21 selected as fault source 21"]
84 PRSCH21 = 21,
85 #[doc = "22: PRS Channel 22 selected as fault source 22"]
86 PRSCH22 = 22,
87 #[doc = "23: PRS Channel 23 selected as fault source 23"]
88 PRSCH23 = 23,
89}
90impl From<DTPRS0FSEL_A> for u8 {
91 #[inline(always)]
92 fn from(variant: DTPRS0FSEL_A) -> Self {
93 variant as _
94 }
95}
96#[doc = "Field `DTPRS0FSEL` reader - DTI PRS Fault Source 0 Select"]
97pub type DTPRS0FSEL_R = crate::FieldReader<u8, DTPRS0FSEL_A>;
98impl DTPRS0FSEL_R {
99 #[doc = "Get enumerated values variant"]
100 #[inline(always)]
101 pub fn variant(&self) -> Option<DTPRS0FSEL_A> {
102 match self.bits {
103 0 => Some(DTPRS0FSEL_A::PRSCH0),
104 1 => Some(DTPRS0FSEL_A::PRSCH1),
105 2 => Some(DTPRS0FSEL_A::PRSCH2),
106 3 => Some(DTPRS0FSEL_A::PRSCH3),
107 4 => Some(DTPRS0FSEL_A::PRSCH4),
108 5 => Some(DTPRS0FSEL_A::PRSCH5),
109 6 => Some(DTPRS0FSEL_A::PRSCH6),
110 7 => Some(DTPRS0FSEL_A::PRSCH7),
111 8 => Some(DTPRS0FSEL_A::PRSCH8),
112 9 => Some(DTPRS0FSEL_A::PRSCH9),
113 10 => Some(DTPRS0FSEL_A::PRSCH10),
114 11 => Some(DTPRS0FSEL_A::PRSCH11),
115 12 => Some(DTPRS0FSEL_A::PRSCH12),
116 13 => Some(DTPRS0FSEL_A::PRSCH13),
117 14 => Some(DTPRS0FSEL_A::PRSCH14),
118 15 => Some(DTPRS0FSEL_A::PRSCH15),
119 16 => Some(DTPRS0FSEL_A::PRSCH16),
120 17 => Some(DTPRS0FSEL_A::PRSCH17),
121 18 => Some(DTPRS0FSEL_A::PRSCH18),
122 19 => Some(DTPRS0FSEL_A::PRSCH19),
123 20 => Some(DTPRS0FSEL_A::PRSCH20),
124 21 => Some(DTPRS0FSEL_A::PRSCH21),
125 22 => Some(DTPRS0FSEL_A::PRSCH22),
126 23 => Some(DTPRS0FSEL_A::PRSCH23),
127 _ => None,
128 }
129 }
130 #[doc = "Checks if the value of the field is `PRSCH0`"]
131 #[inline(always)]
132 pub fn is_prsch0(&self) -> bool {
133 *self == DTPRS0FSEL_A::PRSCH0
134 }
135 #[doc = "Checks if the value of the field is `PRSCH1`"]
136 #[inline(always)]
137 pub fn is_prsch1(&self) -> bool {
138 *self == DTPRS0FSEL_A::PRSCH1
139 }
140 #[doc = "Checks if the value of the field is `PRSCH2`"]
141 #[inline(always)]
142 pub fn is_prsch2(&self) -> bool {
143 *self == DTPRS0FSEL_A::PRSCH2
144 }
145 #[doc = "Checks if the value of the field is `PRSCH3`"]
146 #[inline(always)]
147 pub fn is_prsch3(&self) -> bool {
148 *self == DTPRS0FSEL_A::PRSCH3
149 }
150 #[doc = "Checks if the value of the field is `PRSCH4`"]
151 #[inline(always)]
152 pub fn is_prsch4(&self) -> bool {
153 *self == DTPRS0FSEL_A::PRSCH4
154 }
155 #[doc = "Checks if the value of the field is `PRSCH5`"]
156 #[inline(always)]
157 pub fn is_prsch5(&self) -> bool {
158 *self == DTPRS0FSEL_A::PRSCH5
159 }
160 #[doc = "Checks if the value of the field is `PRSCH6`"]
161 #[inline(always)]
162 pub fn is_prsch6(&self) -> bool {
163 *self == DTPRS0FSEL_A::PRSCH6
164 }
165 #[doc = "Checks if the value of the field is `PRSCH7`"]
166 #[inline(always)]
167 pub fn is_prsch7(&self) -> bool {
168 *self == DTPRS0FSEL_A::PRSCH7
169 }
170 #[doc = "Checks if the value of the field is `PRSCH8`"]
171 #[inline(always)]
172 pub fn is_prsch8(&self) -> bool {
173 *self == DTPRS0FSEL_A::PRSCH8
174 }
175 #[doc = "Checks if the value of the field is `PRSCH9`"]
176 #[inline(always)]
177 pub fn is_prsch9(&self) -> bool {
178 *self == DTPRS0FSEL_A::PRSCH9
179 }
180 #[doc = "Checks if the value of the field is `PRSCH10`"]
181 #[inline(always)]
182 pub fn is_prsch10(&self) -> bool {
183 *self == DTPRS0FSEL_A::PRSCH10
184 }
185 #[doc = "Checks if the value of the field is `PRSCH11`"]
186 #[inline(always)]
187 pub fn is_prsch11(&self) -> bool {
188 *self == DTPRS0FSEL_A::PRSCH11
189 }
190 #[doc = "Checks if the value of the field is `PRSCH12`"]
191 #[inline(always)]
192 pub fn is_prsch12(&self) -> bool {
193 *self == DTPRS0FSEL_A::PRSCH12
194 }
195 #[doc = "Checks if the value of the field is `PRSCH13`"]
196 #[inline(always)]
197 pub fn is_prsch13(&self) -> bool {
198 *self == DTPRS0FSEL_A::PRSCH13
199 }
200 #[doc = "Checks if the value of the field is `PRSCH14`"]
201 #[inline(always)]
202 pub fn is_prsch14(&self) -> bool {
203 *self == DTPRS0FSEL_A::PRSCH14
204 }
205 #[doc = "Checks if the value of the field is `PRSCH15`"]
206 #[inline(always)]
207 pub fn is_prsch15(&self) -> bool {
208 *self == DTPRS0FSEL_A::PRSCH15
209 }
210 #[doc = "Checks if the value of the field is `PRSCH16`"]
211 #[inline(always)]
212 pub fn is_prsch16(&self) -> bool {
213 *self == DTPRS0FSEL_A::PRSCH16
214 }
215 #[doc = "Checks if the value of the field is `PRSCH17`"]
216 #[inline(always)]
217 pub fn is_prsch17(&self) -> bool {
218 *self == DTPRS0FSEL_A::PRSCH17
219 }
220 #[doc = "Checks if the value of the field is `PRSCH18`"]
221 #[inline(always)]
222 pub fn is_prsch18(&self) -> bool {
223 *self == DTPRS0FSEL_A::PRSCH18
224 }
225 #[doc = "Checks if the value of the field is `PRSCH19`"]
226 #[inline(always)]
227 pub fn is_prsch19(&self) -> bool {
228 *self == DTPRS0FSEL_A::PRSCH19
229 }
230 #[doc = "Checks if the value of the field is `PRSCH20`"]
231 #[inline(always)]
232 pub fn is_prsch20(&self) -> bool {
233 *self == DTPRS0FSEL_A::PRSCH20
234 }
235 #[doc = "Checks if the value of the field is `PRSCH21`"]
236 #[inline(always)]
237 pub fn is_prsch21(&self) -> bool {
238 *self == DTPRS0FSEL_A::PRSCH21
239 }
240 #[doc = "Checks if the value of the field is `PRSCH22`"]
241 #[inline(always)]
242 pub fn is_prsch22(&self) -> bool {
243 *self == DTPRS0FSEL_A::PRSCH22
244 }
245 #[doc = "Checks if the value of the field is `PRSCH23`"]
246 #[inline(always)]
247 pub fn is_prsch23(&self) -> bool {
248 *self == DTPRS0FSEL_A::PRSCH23
249 }
250}
251#[doc = "Field `DTPRS0FSEL` writer - DTI PRS Fault Source 0 Select"]
252pub type DTPRS0FSEL_W<'a> = crate::FieldWriter<'a, u32, DTFC_SPEC, u8, DTPRS0FSEL_A, 5, 0>;
253impl<'a> DTPRS0FSEL_W<'a> {
254 #[doc = "PRS Channel 0 selected as fault source 0"]
255 #[inline(always)]
256 pub fn prsch0(self) -> &'a mut W {
257 self.variant(DTPRS0FSEL_A::PRSCH0)
258 }
259 #[doc = "PRS Channel 1 selected as fault source 1"]
260 #[inline(always)]
261 pub fn prsch1(self) -> &'a mut W {
262 self.variant(DTPRS0FSEL_A::PRSCH1)
263 }
264 #[doc = "PRS Channel 2 selected as fault source 2"]
265 #[inline(always)]
266 pub fn prsch2(self) -> &'a mut W {
267 self.variant(DTPRS0FSEL_A::PRSCH2)
268 }
269 #[doc = "PRS Channel 3 selected as fault source 3"]
270 #[inline(always)]
271 pub fn prsch3(self) -> &'a mut W {
272 self.variant(DTPRS0FSEL_A::PRSCH3)
273 }
274 #[doc = "PRS Channel 4 selected as fault source 4"]
275 #[inline(always)]
276 pub fn prsch4(self) -> &'a mut W {
277 self.variant(DTPRS0FSEL_A::PRSCH4)
278 }
279 #[doc = "PRS Channel 5 selected as fault source 5"]
280 #[inline(always)]
281 pub fn prsch5(self) -> &'a mut W {
282 self.variant(DTPRS0FSEL_A::PRSCH5)
283 }
284 #[doc = "PRS Channel 6 selected as fault source 6"]
285 #[inline(always)]
286 pub fn prsch6(self) -> &'a mut W {
287 self.variant(DTPRS0FSEL_A::PRSCH6)
288 }
289 #[doc = "PRS Channel 7 selected as fault source 7"]
290 #[inline(always)]
291 pub fn prsch7(self) -> &'a mut W {
292 self.variant(DTPRS0FSEL_A::PRSCH7)
293 }
294 #[doc = "PRS Channel 8 selected as fault source 8"]
295 #[inline(always)]
296 pub fn prsch8(self) -> &'a mut W {
297 self.variant(DTPRS0FSEL_A::PRSCH8)
298 }
299 #[doc = "PRS Channel 9 selected as fault source 9"]
300 #[inline(always)]
301 pub fn prsch9(self) -> &'a mut W {
302 self.variant(DTPRS0FSEL_A::PRSCH9)
303 }
304 #[doc = "PRS Channel 10 selected as fault source 10"]
305 #[inline(always)]
306 pub fn prsch10(self) -> &'a mut W {
307 self.variant(DTPRS0FSEL_A::PRSCH10)
308 }
309 #[doc = "PRS Channel 11 selected as fault source 11"]
310 #[inline(always)]
311 pub fn prsch11(self) -> &'a mut W {
312 self.variant(DTPRS0FSEL_A::PRSCH11)
313 }
314 #[doc = "PRS Channel 12 selected as fault source 12"]
315 #[inline(always)]
316 pub fn prsch12(self) -> &'a mut W {
317 self.variant(DTPRS0FSEL_A::PRSCH12)
318 }
319 #[doc = "PRS Channel 13 selected as fault source 13"]
320 #[inline(always)]
321 pub fn prsch13(self) -> &'a mut W {
322 self.variant(DTPRS0FSEL_A::PRSCH13)
323 }
324 #[doc = "PRS Channel 14 selected as fault source 14"]
325 #[inline(always)]
326 pub fn prsch14(self) -> &'a mut W {
327 self.variant(DTPRS0FSEL_A::PRSCH14)
328 }
329 #[doc = "PRS Channel 15 selected as fault source 15"]
330 #[inline(always)]
331 pub fn prsch15(self) -> &'a mut W {
332 self.variant(DTPRS0FSEL_A::PRSCH15)
333 }
334 #[doc = "PRS Channel 16 selected as fault source 16"]
335 #[inline(always)]
336 pub fn prsch16(self) -> &'a mut W {
337 self.variant(DTPRS0FSEL_A::PRSCH16)
338 }
339 #[doc = "PRS Channel 17 selected as fault source 17"]
340 #[inline(always)]
341 pub fn prsch17(self) -> &'a mut W {
342 self.variant(DTPRS0FSEL_A::PRSCH17)
343 }
344 #[doc = "PRS Channel 18 selected as fault source 18"]
345 #[inline(always)]
346 pub fn prsch18(self) -> &'a mut W {
347 self.variant(DTPRS0FSEL_A::PRSCH18)
348 }
349 #[doc = "PRS Channel 19 selected as fault source 19"]
350 #[inline(always)]
351 pub fn prsch19(self) -> &'a mut W {
352 self.variant(DTPRS0FSEL_A::PRSCH19)
353 }
354 #[doc = "PRS Channel 20 selected as fault source 20"]
355 #[inline(always)]
356 pub fn prsch20(self) -> &'a mut W {
357 self.variant(DTPRS0FSEL_A::PRSCH20)
358 }
359 #[doc = "PRS Channel 21 selected as fault source 21"]
360 #[inline(always)]
361 pub fn prsch21(self) -> &'a mut W {
362 self.variant(DTPRS0FSEL_A::PRSCH21)
363 }
364 #[doc = "PRS Channel 22 selected as fault source 22"]
365 #[inline(always)]
366 pub fn prsch22(self) -> &'a mut W {
367 self.variant(DTPRS0FSEL_A::PRSCH22)
368 }
369 #[doc = "PRS Channel 23 selected as fault source 23"]
370 #[inline(always)]
371 pub fn prsch23(self) -> &'a mut W {
372 self.variant(DTPRS0FSEL_A::PRSCH23)
373 }
374}
375#[doc = "DTI PRS Fault Source 1 Select\n\nValue on reset: 0"]
376#[derive(Clone, Copy, Debug, PartialEq)]
377#[repr(u8)]
378pub enum DTPRS1FSEL_A {
379 #[doc = "0: PRS Channel 0 selected as fault source 1"]
380 PRSCH0 = 0,
381 #[doc = "1: PRS Channel 1 selected as fault source 1"]
382 PRSCH1 = 1,
383 #[doc = "2: PRS Channel 2 selected as fault source 1"]
384 PRSCH2 = 2,
385 #[doc = "3: PRS Channel 3 selected as fault source 1"]
386 PRSCH3 = 3,
387 #[doc = "4: PRS Channel 4 selected as fault source 1"]
388 PRSCH4 = 4,
389 #[doc = "5: PRS Channel 5 selected as fault source 1"]
390 PRSCH5 = 5,
391 #[doc = "6: PRS Channel 6 selected as fault source 1"]
392 PRSCH6 = 6,
393 #[doc = "7: PRS Channel 7 selected as fault source 1"]
394 PRSCH7 = 7,
395 #[doc = "8: PRS Channel 8 selected as fault source 1"]
396 PRSCH8 = 8,
397 #[doc = "9: PRS Channel 9 selected as fault source 1"]
398 PRSCH9 = 9,
399 #[doc = "10: PRS Channel 10 selected as fault source 1"]
400 PRSCH10 = 10,
401 #[doc = "11: PRS Channel 11 selected as fault source 1"]
402 PRSCH11 = 11,
403 #[doc = "12: PRS Channel 12 selected as fault source 1"]
404 PRSCH12 = 12,
405 #[doc = "13: PRS Channel 13 selected as fault source 1"]
406 PRSCH13 = 13,
407 #[doc = "14: PRS Channel 14 selected as fault source 1"]
408 PRSCH14 = 14,
409 #[doc = "15: PRS Channel 15 selected as fault source 1"]
410 PRSCH15 = 15,
411 #[doc = "16: PRS Channel 16 selected as fault source 1"]
412 PRSCH16 = 16,
413 #[doc = "17: PRS Channel 17 selected as fault source 1"]
414 PRSCH17 = 17,
415 #[doc = "18: PRS Channel 18 selected as fault source 1"]
416 PRSCH18 = 18,
417 #[doc = "19: PRS Channel 19 selected as fault source 1"]
418 PRSCH19 = 19,
419 #[doc = "20: PRS Channel 20 selected as fault source 1"]
420 PRSCH20 = 20,
421 #[doc = "21: PRS Channel 21 selected as fault source 1"]
422 PRSCH21 = 21,
423 #[doc = "22: PRS Channel 22 selected as fault source 1"]
424 PRSCH22 = 22,
425 #[doc = "23: PRS Channel 23 selected as fault source 1"]
426 PRSCH23 = 23,
427}
428impl From<DTPRS1FSEL_A> for u8 {
429 #[inline(always)]
430 fn from(variant: DTPRS1FSEL_A) -> Self {
431 variant as _
432 }
433}
434#[doc = "Field `DTPRS1FSEL` reader - DTI PRS Fault Source 1 Select"]
435pub type DTPRS1FSEL_R = crate::FieldReader<u8, DTPRS1FSEL_A>;
436impl DTPRS1FSEL_R {
437 #[doc = "Get enumerated values variant"]
438 #[inline(always)]
439 pub fn variant(&self) -> Option<DTPRS1FSEL_A> {
440 match self.bits {
441 0 => Some(DTPRS1FSEL_A::PRSCH0),
442 1 => Some(DTPRS1FSEL_A::PRSCH1),
443 2 => Some(DTPRS1FSEL_A::PRSCH2),
444 3 => Some(DTPRS1FSEL_A::PRSCH3),
445 4 => Some(DTPRS1FSEL_A::PRSCH4),
446 5 => Some(DTPRS1FSEL_A::PRSCH5),
447 6 => Some(DTPRS1FSEL_A::PRSCH6),
448 7 => Some(DTPRS1FSEL_A::PRSCH7),
449 8 => Some(DTPRS1FSEL_A::PRSCH8),
450 9 => Some(DTPRS1FSEL_A::PRSCH9),
451 10 => Some(DTPRS1FSEL_A::PRSCH10),
452 11 => Some(DTPRS1FSEL_A::PRSCH11),
453 12 => Some(DTPRS1FSEL_A::PRSCH12),
454 13 => Some(DTPRS1FSEL_A::PRSCH13),
455 14 => Some(DTPRS1FSEL_A::PRSCH14),
456 15 => Some(DTPRS1FSEL_A::PRSCH15),
457 16 => Some(DTPRS1FSEL_A::PRSCH16),
458 17 => Some(DTPRS1FSEL_A::PRSCH17),
459 18 => Some(DTPRS1FSEL_A::PRSCH18),
460 19 => Some(DTPRS1FSEL_A::PRSCH19),
461 20 => Some(DTPRS1FSEL_A::PRSCH20),
462 21 => Some(DTPRS1FSEL_A::PRSCH21),
463 22 => Some(DTPRS1FSEL_A::PRSCH22),
464 23 => Some(DTPRS1FSEL_A::PRSCH23),
465 _ => None,
466 }
467 }
468 #[doc = "Checks if the value of the field is `PRSCH0`"]
469 #[inline(always)]
470 pub fn is_prsch0(&self) -> bool {
471 *self == DTPRS1FSEL_A::PRSCH0
472 }
473 #[doc = "Checks if the value of the field is `PRSCH1`"]
474 #[inline(always)]
475 pub fn is_prsch1(&self) -> bool {
476 *self == DTPRS1FSEL_A::PRSCH1
477 }
478 #[doc = "Checks if the value of the field is `PRSCH2`"]
479 #[inline(always)]
480 pub fn is_prsch2(&self) -> bool {
481 *self == DTPRS1FSEL_A::PRSCH2
482 }
483 #[doc = "Checks if the value of the field is `PRSCH3`"]
484 #[inline(always)]
485 pub fn is_prsch3(&self) -> bool {
486 *self == DTPRS1FSEL_A::PRSCH3
487 }
488 #[doc = "Checks if the value of the field is `PRSCH4`"]
489 #[inline(always)]
490 pub fn is_prsch4(&self) -> bool {
491 *self == DTPRS1FSEL_A::PRSCH4
492 }
493 #[doc = "Checks if the value of the field is `PRSCH5`"]
494 #[inline(always)]
495 pub fn is_prsch5(&self) -> bool {
496 *self == DTPRS1FSEL_A::PRSCH5
497 }
498 #[doc = "Checks if the value of the field is `PRSCH6`"]
499 #[inline(always)]
500 pub fn is_prsch6(&self) -> bool {
501 *self == DTPRS1FSEL_A::PRSCH6
502 }
503 #[doc = "Checks if the value of the field is `PRSCH7`"]
504 #[inline(always)]
505 pub fn is_prsch7(&self) -> bool {
506 *self == DTPRS1FSEL_A::PRSCH7
507 }
508 #[doc = "Checks if the value of the field is `PRSCH8`"]
509 #[inline(always)]
510 pub fn is_prsch8(&self) -> bool {
511 *self == DTPRS1FSEL_A::PRSCH8
512 }
513 #[doc = "Checks if the value of the field is `PRSCH9`"]
514 #[inline(always)]
515 pub fn is_prsch9(&self) -> bool {
516 *self == DTPRS1FSEL_A::PRSCH9
517 }
518 #[doc = "Checks if the value of the field is `PRSCH10`"]
519 #[inline(always)]
520 pub fn is_prsch10(&self) -> bool {
521 *self == DTPRS1FSEL_A::PRSCH10
522 }
523 #[doc = "Checks if the value of the field is `PRSCH11`"]
524 #[inline(always)]
525 pub fn is_prsch11(&self) -> bool {
526 *self == DTPRS1FSEL_A::PRSCH11
527 }
528 #[doc = "Checks if the value of the field is `PRSCH12`"]
529 #[inline(always)]
530 pub fn is_prsch12(&self) -> bool {
531 *self == DTPRS1FSEL_A::PRSCH12
532 }
533 #[doc = "Checks if the value of the field is `PRSCH13`"]
534 #[inline(always)]
535 pub fn is_prsch13(&self) -> bool {
536 *self == DTPRS1FSEL_A::PRSCH13
537 }
538 #[doc = "Checks if the value of the field is `PRSCH14`"]
539 #[inline(always)]
540 pub fn is_prsch14(&self) -> bool {
541 *self == DTPRS1FSEL_A::PRSCH14
542 }
543 #[doc = "Checks if the value of the field is `PRSCH15`"]
544 #[inline(always)]
545 pub fn is_prsch15(&self) -> bool {
546 *self == DTPRS1FSEL_A::PRSCH15
547 }
548 #[doc = "Checks if the value of the field is `PRSCH16`"]
549 #[inline(always)]
550 pub fn is_prsch16(&self) -> bool {
551 *self == DTPRS1FSEL_A::PRSCH16
552 }
553 #[doc = "Checks if the value of the field is `PRSCH17`"]
554 #[inline(always)]
555 pub fn is_prsch17(&self) -> bool {
556 *self == DTPRS1FSEL_A::PRSCH17
557 }
558 #[doc = "Checks if the value of the field is `PRSCH18`"]
559 #[inline(always)]
560 pub fn is_prsch18(&self) -> bool {
561 *self == DTPRS1FSEL_A::PRSCH18
562 }
563 #[doc = "Checks if the value of the field is `PRSCH19`"]
564 #[inline(always)]
565 pub fn is_prsch19(&self) -> bool {
566 *self == DTPRS1FSEL_A::PRSCH19
567 }
568 #[doc = "Checks if the value of the field is `PRSCH20`"]
569 #[inline(always)]
570 pub fn is_prsch20(&self) -> bool {
571 *self == DTPRS1FSEL_A::PRSCH20
572 }
573 #[doc = "Checks if the value of the field is `PRSCH21`"]
574 #[inline(always)]
575 pub fn is_prsch21(&self) -> bool {
576 *self == DTPRS1FSEL_A::PRSCH21
577 }
578 #[doc = "Checks if the value of the field is `PRSCH22`"]
579 #[inline(always)]
580 pub fn is_prsch22(&self) -> bool {
581 *self == DTPRS1FSEL_A::PRSCH22
582 }
583 #[doc = "Checks if the value of the field is `PRSCH23`"]
584 #[inline(always)]
585 pub fn is_prsch23(&self) -> bool {
586 *self == DTPRS1FSEL_A::PRSCH23
587 }
588}
589#[doc = "Field `DTPRS1FSEL` writer - DTI PRS Fault Source 1 Select"]
590pub type DTPRS1FSEL_W<'a> = crate::FieldWriter<'a, u32, DTFC_SPEC, u8, DTPRS1FSEL_A, 5, 8>;
591impl<'a> DTPRS1FSEL_W<'a> {
592 #[doc = "PRS Channel 0 selected as fault source 1"]
593 #[inline(always)]
594 pub fn prsch0(self) -> &'a mut W {
595 self.variant(DTPRS1FSEL_A::PRSCH0)
596 }
597 #[doc = "PRS Channel 1 selected as fault source 1"]
598 #[inline(always)]
599 pub fn prsch1(self) -> &'a mut W {
600 self.variant(DTPRS1FSEL_A::PRSCH1)
601 }
602 #[doc = "PRS Channel 2 selected as fault source 1"]
603 #[inline(always)]
604 pub fn prsch2(self) -> &'a mut W {
605 self.variant(DTPRS1FSEL_A::PRSCH2)
606 }
607 #[doc = "PRS Channel 3 selected as fault source 1"]
608 #[inline(always)]
609 pub fn prsch3(self) -> &'a mut W {
610 self.variant(DTPRS1FSEL_A::PRSCH3)
611 }
612 #[doc = "PRS Channel 4 selected as fault source 1"]
613 #[inline(always)]
614 pub fn prsch4(self) -> &'a mut W {
615 self.variant(DTPRS1FSEL_A::PRSCH4)
616 }
617 #[doc = "PRS Channel 5 selected as fault source 1"]
618 #[inline(always)]
619 pub fn prsch5(self) -> &'a mut W {
620 self.variant(DTPRS1FSEL_A::PRSCH5)
621 }
622 #[doc = "PRS Channel 6 selected as fault source 1"]
623 #[inline(always)]
624 pub fn prsch6(self) -> &'a mut W {
625 self.variant(DTPRS1FSEL_A::PRSCH6)
626 }
627 #[doc = "PRS Channel 7 selected as fault source 1"]
628 #[inline(always)]
629 pub fn prsch7(self) -> &'a mut W {
630 self.variant(DTPRS1FSEL_A::PRSCH7)
631 }
632 #[doc = "PRS Channel 8 selected as fault source 1"]
633 #[inline(always)]
634 pub fn prsch8(self) -> &'a mut W {
635 self.variant(DTPRS1FSEL_A::PRSCH8)
636 }
637 #[doc = "PRS Channel 9 selected as fault source 1"]
638 #[inline(always)]
639 pub fn prsch9(self) -> &'a mut W {
640 self.variant(DTPRS1FSEL_A::PRSCH9)
641 }
642 #[doc = "PRS Channel 10 selected as fault source 1"]
643 #[inline(always)]
644 pub fn prsch10(self) -> &'a mut W {
645 self.variant(DTPRS1FSEL_A::PRSCH10)
646 }
647 #[doc = "PRS Channel 11 selected as fault source 1"]
648 #[inline(always)]
649 pub fn prsch11(self) -> &'a mut W {
650 self.variant(DTPRS1FSEL_A::PRSCH11)
651 }
652 #[doc = "PRS Channel 12 selected as fault source 1"]
653 #[inline(always)]
654 pub fn prsch12(self) -> &'a mut W {
655 self.variant(DTPRS1FSEL_A::PRSCH12)
656 }
657 #[doc = "PRS Channel 13 selected as fault source 1"]
658 #[inline(always)]
659 pub fn prsch13(self) -> &'a mut W {
660 self.variant(DTPRS1FSEL_A::PRSCH13)
661 }
662 #[doc = "PRS Channel 14 selected as fault source 1"]
663 #[inline(always)]
664 pub fn prsch14(self) -> &'a mut W {
665 self.variant(DTPRS1FSEL_A::PRSCH14)
666 }
667 #[doc = "PRS Channel 15 selected as fault source 1"]
668 #[inline(always)]
669 pub fn prsch15(self) -> &'a mut W {
670 self.variant(DTPRS1FSEL_A::PRSCH15)
671 }
672 #[doc = "PRS Channel 16 selected as fault source 1"]
673 #[inline(always)]
674 pub fn prsch16(self) -> &'a mut W {
675 self.variant(DTPRS1FSEL_A::PRSCH16)
676 }
677 #[doc = "PRS Channel 17 selected as fault source 1"]
678 #[inline(always)]
679 pub fn prsch17(self) -> &'a mut W {
680 self.variant(DTPRS1FSEL_A::PRSCH17)
681 }
682 #[doc = "PRS Channel 18 selected as fault source 1"]
683 #[inline(always)]
684 pub fn prsch18(self) -> &'a mut W {
685 self.variant(DTPRS1FSEL_A::PRSCH18)
686 }
687 #[doc = "PRS Channel 19 selected as fault source 1"]
688 #[inline(always)]
689 pub fn prsch19(self) -> &'a mut W {
690 self.variant(DTPRS1FSEL_A::PRSCH19)
691 }
692 #[doc = "PRS Channel 20 selected as fault source 1"]
693 #[inline(always)]
694 pub fn prsch20(self) -> &'a mut W {
695 self.variant(DTPRS1FSEL_A::PRSCH20)
696 }
697 #[doc = "PRS Channel 21 selected as fault source 1"]
698 #[inline(always)]
699 pub fn prsch21(self) -> &'a mut W {
700 self.variant(DTPRS1FSEL_A::PRSCH21)
701 }
702 #[doc = "PRS Channel 22 selected as fault source 1"]
703 #[inline(always)]
704 pub fn prsch22(self) -> &'a mut W {
705 self.variant(DTPRS1FSEL_A::PRSCH22)
706 }
707 #[doc = "PRS Channel 23 selected as fault source 1"]
708 #[inline(always)]
709 pub fn prsch23(self) -> &'a mut W {
710 self.variant(DTPRS1FSEL_A::PRSCH23)
711 }
712}
713#[doc = "DTI Fault Action\n\nValue on reset: 0"]
714#[derive(Clone, Copy, Debug, PartialEq)]
715#[repr(u8)]
716pub enum DTFA_A {
717 #[doc = "0: No action on fault"]
718 NONE = 0,
719 #[doc = "1: Set outputs inactive"]
720 INACTIVE = 1,
721 #[doc = "2: Clear outputs"]
722 CLEAR = 2,
723 #[doc = "3: Tristate outputs"]
724 TRISTATE = 3,
725}
726impl From<DTFA_A> for u8 {
727 #[inline(always)]
728 fn from(variant: DTFA_A) -> Self {
729 variant as _
730 }
731}
732#[doc = "Field `DTFA` reader - DTI Fault Action"]
733pub type DTFA_R = crate::FieldReader<u8, DTFA_A>;
734impl DTFA_R {
735 #[doc = "Get enumerated values variant"]
736 #[inline(always)]
737 pub fn variant(&self) -> DTFA_A {
738 match self.bits {
739 0 => DTFA_A::NONE,
740 1 => DTFA_A::INACTIVE,
741 2 => DTFA_A::CLEAR,
742 3 => DTFA_A::TRISTATE,
743 _ => unreachable!(),
744 }
745 }
746 #[doc = "Checks if the value of the field is `NONE`"]
747 #[inline(always)]
748 pub fn is_none(&self) -> bool {
749 *self == DTFA_A::NONE
750 }
751 #[doc = "Checks if the value of the field is `INACTIVE`"]
752 #[inline(always)]
753 pub fn is_inactive(&self) -> bool {
754 *self == DTFA_A::INACTIVE
755 }
756 #[doc = "Checks if the value of the field is `CLEAR`"]
757 #[inline(always)]
758 pub fn is_clear(&self) -> bool {
759 *self == DTFA_A::CLEAR
760 }
761 #[doc = "Checks if the value of the field is `TRISTATE`"]
762 #[inline(always)]
763 pub fn is_tristate(&self) -> bool {
764 *self == DTFA_A::TRISTATE
765 }
766}
767#[doc = "Field `DTFA` writer - DTI Fault Action"]
768pub type DTFA_W<'a> = crate::FieldWriterSafe<'a, u32, DTFC_SPEC, u8, DTFA_A, 2, 16>;
769impl<'a> DTFA_W<'a> {
770 #[doc = "No action on fault"]
771 #[inline(always)]
772 pub fn none(self) -> &'a mut W {
773 self.variant(DTFA_A::NONE)
774 }
775 #[doc = "Set outputs inactive"]
776 #[inline(always)]
777 pub fn inactive(self) -> &'a mut W {
778 self.variant(DTFA_A::INACTIVE)
779 }
780 #[doc = "Clear outputs"]
781 #[inline(always)]
782 pub fn clear(self) -> &'a mut W {
783 self.variant(DTFA_A::CLEAR)
784 }
785 #[doc = "Tristate outputs"]
786 #[inline(always)]
787 pub fn tristate(self) -> &'a mut W {
788 self.variant(DTFA_A::TRISTATE)
789 }
790}
791#[doc = "Field `DTPRS0FEN` reader - DTI PRS 0 Fault Enable"]
792pub type DTPRS0FEN_R = crate::BitReader<bool>;
793#[doc = "Field `DTPRS0FEN` writer - DTI PRS 0 Fault Enable"]
794pub type DTPRS0FEN_W<'a> = crate::BitWriter<'a, u32, DTFC_SPEC, bool, 24>;
795#[doc = "Field `DTPRS1FEN` reader - DTI PRS 1 Fault Enable"]
796pub type DTPRS1FEN_R = crate::BitReader<bool>;
797#[doc = "Field `DTPRS1FEN` writer - DTI PRS 1 Fault Enable"]
798pub type DTPRS1FEN_W<'a> = crate::BitWriter<'a, u32, DTFC_SPEC, bool, 25>;
799#[doc = "Field `DTDBGFEN` reader - DTI Debugger Fault Enable"]
800pub type DTDBGFEN_R = crate::BitReader<bool>;
801#[doc = "Field `DTDBGFEN` writer - DTI Debugger Fault Enable"]
802pub type DTDBGFEN_W<'a> = crate::BitWriter<'a, u32, DTFC_SPEC, bool, 26>;
803#[doc = "Field `DTLOCKUPFEN` reader - DTI Lockup Fault Enable"]
804pub type DTLOCKUPFEN_R = crate::BitReader<bool>;
805#[doc = "Field `DTLOCKUPFEN` writer - DTI Lockup Fault Enable"]
806pub type DTLOCKUPFEN_W<'a> = crate::BitWriter<'a, u32, DTFC_SPEC, bool, 27>;
807impl R {
808 #[doc = "Bits 0:4 - DTI PRS Fault Source 0 Select"]
809 #[inline(always)]
810 pub fn dtprs0fsel(&self) -> DTPRS0FSEL_R {
811 DTPRS0FSEL_R::new((self.bits & 0x1f) as u8)
812 }
813 #[doc = "Bits 8:12 - DTI PRS Fault Source 1 Select"]
814 #[inline(always)]
815 pub fn dtprs1fsel(&self) -> DTPRS1FSEL_R {
816 DTPRS1FSEL_R::new(((self.bits >> 8) & 0x1f) as u8)
817 }
818 #[doc = "Bits 16:17 - DTI Fault Action"]
819 #[inline(always)]
820 pub fn dtfa(&self) -> DTFA_R {
821 DTFA_R::new(((self.bits >> 16) & 3) as u8)
822 }
823 #[doc = "Bit 24 - DTI PRS 0 Fault Enable"]
824 #[inline(always)]
825 pub fn dtprs0fen(&self) -> DTPRS0FEN_R {
826 DTPRS0FEN_R::new(((self.bits >> 24) & 1) != 0)
827 }
828 #[doc = "Bit 25 - DTI PRS 1 Fault Enable"]
829 #[inline(always)]
830 pub fn dtprs1fen(&self) -> DTPRS1FEN_R {
831 DTPRS1FEN_R::new(((self.bits >> 25) & 1) != 0)
832 }
833 #[doc = "Bit 26 - DTI Debugger Fault Enable"]
834 #[inline(always)]
835 pub fn dtdbgfen(&self) -> DTDBGFEN_R {
836 DTDBGFEN_R::new(((self.bits >> 26) & 1) != 0)
837 }
838 #[doc = "Bit 27 - DTI Lockup Fault Enable"]
839 #[inline(always)]
840 pub fn dtlockupfen(&self) -> DTLOCKUPFEN_R {
841 DTLOCKUPFEN_R::new(((self.bits >> 27) & 1) != 0)
842 }
843}
844impl W {
845 #[doc = "Bits 0:4 - DTI PRS Fault Source 0 Select"]
846 #[inline(always)]
847 pub fn dtprs0fsel(&mut self) -> DTPRS0FSEL_W {
848 DTPRS0FSEL_W::new(self)
849 }
850 #[doc = "Bits 8:12 - DTI PRS Fault Source 1 Select"]
851 #[inline(always)]
852 pub fn dtprs1fsel(&mut self) -> DTPRS1FSEL_W {
853 DTPRS1FSEL_W::new(self)
854 }
855 #[doc = "Bits 16:17 - DTI Fault Action"]
856 #[inline(always)]
857 pub fn dtfa(&mut self) -> DTFA_W {
858 DTFA_W::new(self)
859 }
860 #[doc = "Bit 24 - DTI PRS 0 Fault Enable"]
861 #[inline(always)]
862 pub fn dtprs0fen(&mut self) -> DTPRS0FEN_W {
863 DTPRS0FEN_W::new(self)
864 }
865 #[doc = "Bit 25 - DTI PRS 1 Fault Enable"]
866 #[inline(always)]
867 pub fn dtprs1fen(&mut self) -> DTPRS1FEN_W {
868 DTPRS1FEN_W::new(self)
869 }
870 #[doc = "Bit 26 - DTI Debugger Fault Enable"]
871 #[inline(always)]
872 pub fn dtdbgfen(&mut self) -> DTDBGFEN_W {
873 DTDBGFEN_W::new(self)
874 }
875 #[doc = "Bit 27 - DTI Lockup Fault Enable"]
876 #[inline(always)]
877 pub fn dtlockupfen(&mut self) -> DTLOCKUPFEN_W {
878 DTLOCKUPFEN_W::new(self)
879 }
880 #[doc = "Writes raw bits to the register."]
881 #[inline(always)]
882 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
883 self.0.bits(bits);
884 self
885 }
886}
887#[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"]
888pub struct DTFC_SPEC;
889impl crate::RegisterSpec for DTFC_SPEC {
890 type Ux = u32;
891}
892#[doc = "`read()` method returns [dtfc::R](R) reader structure"]
893impl crate::Readable for DTFC_SPEC {
894 type Reader = R;
895}
896#[doc = "`write(|w| ..)` method takes [dtfc::W](W) writer structure"]
897impl crate::Writable for DTFC_SPEC {
898 type Writer = W;
899}
900#[doc = "`reset()` method sets DTFC to value 0"]
901impl crate::Resettable for DTFC_SPEC {
902 #[inline(always)]
903 fn reset_value() -> Self::Ux {
904 0
905 }
906}