1#[doc = "Register `PRSSEL` reader"]
2pub struct R(crate::R<PRSSEL_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<PRSSEL_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<PRSSEL_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<PRSSEL_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `PRSSEL` writer"]
17pub struct W(crate::W<PRSSEL_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<PRSSEL_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<PRSSEL_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<PRSSEL_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "PRS Start Select\n\nValue on reset: 0"]
38#[derive(Clone, Copy, Debug, PartialEq)]
39#[repr(u8)]
40pub enum PRSSTARTSEL_A {
41 #[doc = "0: PRS Channel 0 selected as input"]
42 PRSCH0 = 0,
43 #[doc = "1: PRS Channel 1 selected as input"]
44 PRSCH1 = 1,
45 #[doc = "2: PRS Channel 2 selected as input"]
46 PRSCH2 = 2,
47 #[doc = "3: PRS Channel 3 selected as input"]
48 PRSCH3 = 3,
49 #[doc = "4: PRS Channel 4 selected as input"]
50 PRSCH4 = 4,
51 #[doc = "5: PRS Channel 5 selected as input"]
52 PRSCH5 = 5,
53 #[doc = "6: PRS Channel 6 selected as input"]
54 PRSCH6 = 6,
55 #[doc = "7: PRS Channel 7 selected as input"]
56 PRSCH7 = 7,
57 #[doc = "8: PRS Channel 8 selected as input"]
58 PRSCH8 = 8,
59 #[doc = "9: PRS Channel 9 selected as input"]
60 PRSCH9 = 9,
61 #[doc = "10: PRS Channel 10 selected as input"]
62 PRSCH10 = 10,
63 #[doc = "11: PRS Channel 11 selected as input"]
64 PRSCH11 = 11,
65 #[doc = "12: PRS Channel 12 selected as input"]
66 PRSCH12 = 12,
67 #[doc = "13: PRS Channel 13 selected as input"]
68 PRSCH13 = 13,
69 #[doc = "14: PRS Channel 14 selected as input"]
70 PRSCH14 = 14,
71 #[doc = "15: PRS Channel 15 selected as input"]
72 PRSCH15 = 15,
73 #[doc = "16: PRS Channel 16 selected as input"]
74 PRSCH16 = 16,
75 #[doc = "17: PRS Channel 17 selected as input"]
76 PRSCH17 = 17,
77 #[doc = "18: PRS Channel 18 selected as input"]
78 PRSCH18 = 18,
79 #[doc = "19: PRS Channel 19 selected as input"]
80 PRSCH19 = 19,
81 #[doc = "20: PRS Channel 20 selected as input"]
82 PRSCH20 = 20,
83 #[doc = "21: PRS Channel 21 selected as input"]
84 PRSCH21 = 21,
85 #[doc = "22: PRS Channel 22 selected as input"]
86 PRSCH22 = 22,
87 #[doc = "23: PRS Channel 23 selected as input"]
88 PRSCH23 = 23,
89}
90impl From<PRSSTARTSEL_A> for u8 {
91 #[inline(always)]
92 fn from(variant: PRSSTARTSEL_A) -> Self {
93 variant as _
94 }
95}
96#[doc = "Field `PRSSTARTSEL` reader - PRS Start Select"]
97pub type PRSSTARTSEL_R = crate::FieldReader<u8, PRSSTARTSEL_A>;
98impl PRSSTARTSEL_R {
99 #[doc = "Get enumerated values variant"]
100 #[inline(always)]
101 pub fn variant(&self) -> Option<PRSSTARTSEL_A> {
102 match self.bits {
103 0 => Some(PRSSTARTSEL_A::PRSCH0),
104 1 => Some(PRSSTARTSEL_A::PRSCH1),
105 2 => Some(PRSSTARTSEL_A::PRSCH2),
106 3 => Some(PRSSTARTSEL_A::PRSCH3),
107 4 => Some(PRSSTARTSEL_A::PRSCH4),
108 5 => Some(PRSSTARTSEL_A::PRSCH5),
109 6 => Some(PRSSTARTSEL_A::PRSCH6),
110 7 => Some(PRSSTARTSEL_A::PRSCH7),
111 8 => Some(PRSSTARTSEL_A::PRSCH8),
112 9 => Some(PRSSTARTSEL_A::PRSCH9),
113 10 => Some(PRSSTARTSEL_A::PRSCH10),
114 11 => Some(PRSSTARTSEL_A::PRSCH11),
115 12 => Some(PRSSTARTSEL_A::PRSCH12),
116 13 => Some(PRSSTARTSEL_A::PRSCH13),
117 14 => Some(PRSSTARTSEL_A::PRSCH14),
118 15 => Some(PRSSTARTSEL_A::PRSCH15),
119 16 => Some(PRSSTARTSEL_A::PRSCH16),
120 17 => Some(PRSSTARTSEL_A::PRSCH17),
121 18 => Some(PRSSTARTSEL_A::PRSCH18),
122 19 => Some(PRSSTARTSEL_A::PRSCH19),
123 20 => Some(PRSSTARTSEL_A::PRSCH20),
124 21 => Some(PRSSTARTSEL_A::PRSCH21),
125 22 => Some(PRSSTARTSEL_A::PRSCH22),
126 23 => Some(PRSSTARTSEL_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 == PRSSTARTSEL_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 == PRSSTARTSEL_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 == PRSSTARTSEL_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 == PRSSTARTSEL_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 == PRSSTARTSEL_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 == PRSSTARTSEL_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 == PRSSTARTSEL_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 == PRSSTARTSEL_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 == PRSSTARTSEL_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 == PRSSTARTSEL_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 == PRSSTARTSEL_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 == PRSSTARTSEL_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 == PRSSTARTSEL_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 == PRSSTARTSEL_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 == PRSSTARTSEL_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 == PRSSTARTSEL_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 == PRSSTARTSEL_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 == PRSSTARTSEL_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 == PRSSTARTSEL_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 == PRSSTARTSEL_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 == PRSSTARTSEL_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 == PRSSTARTSEL_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 == PRSSTARTSEL_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 == PRSSTARTSEL_A::PRSCH23
249 }
250}
251#[doc = "Field `PRSSTARTSEL` writer - PRS Start Select"]
252pub type PRSSTARTSEL_W<'a> = crate::FieldWriter<'a, u32, PRSSEL_SPEC, u8, PRSSTARTSEL_A, 5, 0>;
253impl<'a> PRSSTARTSEL_W<'a> {
254 #[doc = "PRS Channel 0 selected as input"]
255 #[inline(always)]
256 pub fn prsch0(self) -> &'a mut W {
257 self.variant(PRSSTARTSEL_A::PRSCH0)
258 }
259 #[doc = "PRS Channel 1 selected as input"]
260 #[inline(always)]
261 pub fn prsch1(self) -> &'a mut W {
262 self.variant(PRSSTARTSEL_A::PRSCH1)
263 }
264 #[doc = "PRS Channel 2 selected as input"]
265 #[inline(always)]
266 pub fn prsch2(self) -> &'a mut W {
267 self.variant(PRSSTARTSEL_A::PRSCH2)
268 }
269 #[doc = "PRS Channel 3 selected as input"]
270 #[inline(always)]
271 pub fn prsch3(self) -> &'a mut W {
272 self.variant(PRSSTARTSEL_A::PRSCH3)
273 }
274 #[doc = "PRS Channel 4 selected as input"]
275 #[inline(always)]
276 pub fn prsch4(self) -> &'a mut W {
277 self.variant(PRSSTARTSEL_A::PRSCH4)
278 }
279 #[doc = "PRS Channel 5 selected as input"]
280 #[inline(always)]
281 pub fn prsch5(self) -> &'a mut W {
282 self.variant(PRSSTARTSEL_A::PRSCH5)
283 }
284 #[doc = "PRS Channel 6 selected as input"]
285 #[inline(always)]
286 pub fn prsch6(self) -> &'a mut W {
287 self.variant(PRSSTARTSEL_A::PRSCH6)
288 }
289 #[doc = "PRS Channel 7 selected as input"]
290 #[inline(always)]
291 pub fn prsch7(self) -> &'a mut W {
292 self.variant(PRSSTARTSEL_A::PRSCH7)
293 }
294 #[doc = "PRS Channel 8 selected as input"]
295 #[inline(always)]
296 pub fn prsch8(self) -> &'a mut W {
297 self.variant(PRSSTARTSEL_A::PRSCH8)
298 }
299 #[doc = "PRS Channel 9 selected as input"]
300 #[inline(always)]
301 pub fn prsch9(self) -> &'a mut W {
302 self.variant(PRSSTARTSEL_A::PRSCH9)
303 }
304 #[doc = "PRS Channel 10 selected as input"]
305 #[inline(always)]
306 pub fn prsch10(self) -> &'a mut W {
307 self.variant(PRSSTARTSEL_A::PRSCH10)
308 }
309 #[doc = "PRS Channel 11 selected as input"]
310 #[inline(always)]
311 pub fn prsch11(self) -> &'a mut W {
312 self.variant(PRSSTARTSEL_A::PRSCH11)
313 }
314 #[doc = "PRS Channel 12 selected as input"]
315 #[inline(always)]
316 pub fn prsch12(self) -> &'a mut W {
317 self.variant(PRSSTARTSEL_A::PRSCH12)
318 }
319 #[doc = "PRS Channel 13 selected as input"]
320 #[inline(always)]
321 pub fn prsch13(self) -> &'a mut W {
322 self.variant(PRSSTARTSEL_A::PRSCH13)
323 }
324 #[doc = "PRS Channel 14 selected as input"]
325 #[inline(always)]
326 pub fn prsch14(self) -> &'a mut W {
327 self.variant(PRSSTARTSEL_A::PRSCH14)
328 }
329 #[doc = "PRS Channel 15 selected as input"]
330 #[inline(always)]
331 pub fn prsch15(self) -> &'a mut W {
332 self.variant(PRSSTARTSEL_A::PRSCH15)
333 }
334 #[doc = "PRS Channel 16 selected as input"]
335 #[inline(always)]
336 pub fn prsch16(self) -> &'a mut W {
337 self.variant(PRSSTARTSEL_A::PRSCH16)
338 }
339 #[doc = "PRS Channel 17 selected as input"]
340 #[inline(always)]
341 pub fn prsch17(self) -> &'a mut W {
342 self.variant(PRSSTARTSEL_A::PRSCH17)
343 }
344 #[doc = "PRS Channel 18 selected as input"]
345 #[inline(always)]
346 pub fn prsch18(self) -> &'a mut W {
347 self.variant(PRSSTARTSEL_A::PRSCH18)
348 }
349 #[doc = "PRS Channel 19 selected as input"]
350 #[inline(always)]
351 pub fn prsch19(self) -> &'a mut W {
352 self.variant(PRSSTARTSEL_A::PRSCH19)
353 }
354 #[doc = "PRS Channel 20 selected as input"]
355 #[inline(always)]
356 pub fn prsch20(self) -> &'a mut W {
357 self.variant(PRSSTARTSEL_A::PRSCH20)
358 }
359 #[doc = "PRS Channel 21 selected as input"]
360 #[inline(always)]
361 pub fn prsch21(self) -> &'a mut W {
362 self.variant(PRSSTARTSEL_A::PRSCH21)
363 }
364 #[doc = "PRS Channel 22 selected as input"]
365 #[inline(always)]
366 pub fn prsch22(self) -> &'a mut W {
367 self.variant(PRSSTARTSEL_A::PRSCH22)
368 }
369 #[doc = "PRS Channel 23 selected as input"]
370 #[inline(always)]
371 pub fn prsch23(self) -> &'a mut W {
372 self.variant(PRSSTARTSEL_A::PRSCH23)
373 }
374}
375#[doc = "PRS Stop Select\n\nValue on reset: 0"]
376#[derive(Clone, Copy, Debug, PartialEq)]
377#[repr(u8)]
378pub enum PRSSTOPSEL_A {
379 #[doc = "0: PRS Channel 0 selected as input"]
380 PRSCH0 = 0,
381 #[doc = "1: PRS Channel 1 selected as input"]
382 PRSCH1 = 1,
383 #[doc = "2: PRS Channel 2 selected as input"]
384 PRSCH2 = 2,
385 #[doc = "3: PRS Channel 3 selected as input"]
386 PRSCH3 = 3,
387 #[doc = "4: PRS Channel 4 selected as input"]
388 PRSCH4 = 4,
389 #[doc = "5: PRS Channel 5 selected as input"]
390 PRSCH5 = 5,
391 #[doc = "6: PRS Channel 6 selected as input"]
392 PRSCH6 = 6,
393 #[doc = "7: PRS Channel 7 selected as input"]
394 PRSCH7 = 7,
395 #[doc = "8: PRS Channel 8 selected as input"]
396 PRSCH8 = 8,
397 #[doc = "9: PRS Channel 9 selected as input"]
398 PRSCH9 = 9,
399 #[doc = "10: PRS Channel 10 selected as input"]
400 PRSCH10 = 10,
401 #[doc = "11: PRS Channel 11 selected as input"]
402 PRSCH11 = 11,
403 #[doc = "12: PRS Channel 12 selected as input"]
404 PRSCH12 = 12,
405 #[doc = "13: PRS Channel 13 selected as input"]
406 PRSCH13 = 13,
407 #[doc = "14: PRS Channel 14 selected as input"]
408 PRSCH14 = 14,
409 #[doc = "15: PRS Channel 15 selected as input"]
410 PRSCH15 = 15,
411 #[doc = "16: PRS Channel 16 selected as input"]
412 PRSCH16 = 16,
413 #[doc = "17: PRS Channel 17 selected as input"]
414 PRSCH17 = 17,
415 #[doc = "18: PRS Channel 18 selected as input"]
416 PRSCH18 = 18,
417 #[doc = "19: PRS Channel 19 selected as input"]
418 PRSCH19 = 19,
419 #[doc = "20: PRS Channel 20 selected as input"]
420 PRSCH20 = 20,
421 #[doc = "21: PRS Channel 21 selected as input"]
422 PRSCH21 = 21,
423 #[doc = "22: PRS Channel 22 selected as input"]
424 PRSCH22 = 22,
425 #[doc = "23: PRS Channel 23 selected as input"]
426 PRSCH23 = 23,
427}
428impl From<PRSSTOPSEL_A> for u8 {
429 #[inline(always)]
430 fn from(variant: PRSSTOPSEL_A) -> Self {
431 variant as _
432 }
433}
434#[doc = "Field `PRSSTOPSEL` reader - PRS Stop Select"]
435pub type PRSSTOPSEL_R = crate::FieldReader<u8, PRSSTOPSEL_A>;
436impl PRSSTOPSEL_R {
437 #[doc = "Get enumerated values variant"]
438 #[inline(always)]
439 pub fn variant(&self) -> Option<PRSSTOPSEL_A> {
440 match self.bits {
441 0 => Some(PRSSTOPSEL_A::PRSCH0),
442 1 => Some(PRSSTOPSEL_A::PRSCH1),
443 2 => Some(PRSSTOPSEL_A::PRSCH2),
444 3 => Some(PRSSTOPSEL_A::PRSCH3),
445 4 => Some(PRSSTOPSEL_A::PRSCH4),
446 5 => Some(PRSSTOPSEL_A::PRSCH5),
447 6 => Some(PRSSTOPSEL_A::PRSCH6),
448 7 => Some(PRSSTOPSEL_A::PRSCH7),
449 8 => Some(PRSSTOPSEL_A::PRSCH8),
450 9 => Some(PRSSTOPSEL_A::PRSCH9),
451 10 => Some(PRSSTOPSEL_A::PRSCH10),
452 11 => Some(PRSSTOPSEL_A::PRSCH11),
453 12 => Some(PRSSTOPSEL_A::PRSCH12),
454 13 => Some(PRSSTOPSEL_A::PRSCH13),
455 14 => Some(PRSSTOPSEL_A::PRSCH14),
456 15 => Some(PRSSTOPSEL_A::PRSCH15),
457 16 => Some(PRSSTOPSEL_A::PRSCH16),
458 17 => Some(PRSSTOPSEL_A::PRSCH17),
459 18 => Some(PRSSTOPSEL_A::PRSCH18),
460 19 => Some(PRSSTOPSEL_A::PRSCH19),
461 20 => Some(PRSSTOPSEL_A::PRSCH20),
462 21 => Some(PRSSTOPSEL_A::PRSCH21),
463 22 => Some(PRSSTOPSEL_A::PRSCH22),
464 23 => Some(PRSSTOPSEL_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 == PRSSTOPSEL_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 == PRSSTOPSEL_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 == PRSSTOPSEL_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 == PRSSTOPSEL_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 == PRSSTOPSEL_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 == PRSSTOPSEL_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 == PRSSTOPSEL_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 == PRSSTOPSEL_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 == PRSSTOPSEL_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 == PRSSTOPSEL_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 == PRSSTOPSEL_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 == PRSSTOPSEL_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 == PRSSTOPSEL_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 == PRSSTOPSEL_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 == PRSSTOPSEL_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 == PRSSTOPSEL_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 == PRSSTOPSEL_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 == PRSSTOPSEL_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 == PRSSTOPSEL_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 == PRSSTOPSEL_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 == PRSSTOPSEL_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 == PRSSTOPSEL_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 == PRSSTOPSEL_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 == PRSSTOPSEL_A::PRSCH23
587 }
588}
589#[doc = "Field `PRSSTOPSEL` writer - PRS Stop Select"]
590pub type PRSSTOPSEL_W<'a> = crate::FieldWriter<'a, u32, PRSSEL_SPEC, u8, PRSSTOPSEL_A, 5, 6>;
591impl<'a> PRSSTOPSEL_W<'a> {
592 #[doc = "PRS Channel 0 selected as input"]
593 #[inline(always)]
594 pub fn prsch0(self) -> &'a mut W {
595 self.variant(PRSSTOPSEL_A::PRSCH0)
596 }
597 #[doc = "PRS Channel 1 selected as input"]
598 #[inline(always)]
599 pub fn prsch1(self) -> &'a mut W {
600 self.variant(PRSSTOPSEL_A::PRSCH1)
601 }
602 #[doc = "PRS Channel 2 selected as input"]
603 #[inline(always)]
604 pub fn prsch2(self) -> &'a mut W {
605 self.variant(PRSSTOPSEL_A::PRSCH2)
606 }
607 #[doc = "PRS Channel 3 selected as input"]
608 #[inline(always)]
609 pub fn prsch3(self) -> &'a mut W {
610 self.variant(PRSSTOPSEL_A::PRSCH3)
611 }
612 #[doc = "PRS Channel 4 selected as input"]
613 #[inline(always)]
614 pub fn prsch4(self) -> &'a mut W {
615 self.variant(PRSSTOPSEL_A::PRSCH4)
616 }
617 #[doc = "PRS Channel 5 selected as input"]
618 #[inline(always)]
619 pub fn prsch5(self) -> &'a mut W {
620 self.variant(PRSSTOPSEL_A::PRSCH5)
621 }
622 #[doc = "PRS Channel 6 selected as input"]
623 #[inline(always)]
624 pub fn prsch6(self) -> &'a mut W {
625 self.variant(PRSSTOPSEL_A::PRSCH6)
626 }
627 #[doc = "PRS Channel 7 selected as input"]
628 #[inline(always)]
629 pub fn prsch7(self) -> &'a mut W {
630 self.variant(PRSSTOPSEL_A::PRSCH7)
631 }
632 #[doc = "PRS Channel 8 selected as input"]
633 #[inline(always)]
634 pub fn prsch8(self) -> &'a mut W {
635 self.variant(PRSSTOPSEL_A::PRSCH8)
636 }
637 #[doc = "PRS Channel 9 selected as input"]
638 #[inline(always)]
639 pub fn prsch9(self) -> &'a mut W {
640 self.variant(PRSSTOPSEL_A::PRSCH9)
641 }
642 #[doc = "PRS Channel 10 selected as input"]
643 #[inline(always)]
644 pub fn prsch10(self) -> &'a mut W {
645 self.variant(PRSSTOPSEL_A::PRSCH10)
646 }
647 #[doc = "PRS Channel 11 selected as input"]
648 #[inline(always)]
649 pub fn prsch11(self) -> &'a mut W {
650 self.variant(PRSSTOPSEL_A::PRSCH11)
651 }
652 #[doc = "PRS Channel 12 selected as input"]
653 #[inline(always)]
654 pub fn prsch12(self) -> &'a mut W {
655 self.variant(PRSSTOPSEL_A::PRSCH12)
656 }
657 #[doc = "PRS Channel 13 selected as input"]
658 #[inline(always)]
659 pub fn prsch13(self) -> &'a mut W {
660 self.variant(PRSSTOPSEL_A::PRSCH13)
661 }
662 #[doc = "PRS Channel 14 selected as input"]
663 #[inline(always)]
664 pub fn prsch14(self) -> &'a mut W {
665 self.variant(PRSSTOPSEL_A::PRSCH14)
666 }
667 #[doc = "PRS Channel 15 selected as input"]
668 #[inline(always)]
669 pub fn prsch15(self) -> &'a mut W {
670 self.variant(PRSSTOPSEL_A::PRSCH15)
671 }
672 #[doc = "PRS Channel 16 selected as input"]
673 #[inline(always)]
674 pub fn prsch16(self) -> &'a mut W {
675 self.variant(PRSSTOPSEL_A::PRSCH16)
676 }
677 #[doc = "PRS Channel 17 selected as input"]
678 #[inline(always)]
679 pub fn prsch17(self) -> &'a mut W {
680 self.variant(PRSSTOPSEL_A::PRSCH17)
681 }
682 #[doc = "PRS Channel 18 selected as input"]
683 #[inline(always)]
684 pub fn prsch18(self) -> &'a mut W {
685 self.variant(PRSSTOPSEL_A::PRSCH18)
686 }
687 #[doc = "PRS Channel 19 selected as input"]
688 #[inline(always)]
689 pub fn prsch19(self) -> &'a mut W {
690 self.variant(PRSSTOPSEL_A::PRSCH19)
691 }
692 #[doc = "PRS Channel 20 selected as input"]
693 #[inline(always)]
694 pub fn prsch20(self) -> &'a mut W {
695 self.variant(PRSSTOPSEL_A::PRSCH20)
696 }
697 #[doc = "PRS Channel 21 selected as input"]
698 #[inline(always)]
699 pub fn prsch21(self) -> &'a mut W {
700 self.variant(PRSSTOPSEL_A::PRSCH21)
701 }
702 #[doc = "PRS Channel 22 selected as input"]
703 #[inline(always)]
704 pub fn prsch22(self) -> &'a mut W {
705 self.variant(PRSSTOPSEL_A::PRSCH22)
706 }
707 #[doc = "PRS Channel 23 selected as input"]
708 #[inline(always)]
709 pub fn prsch23(self) -> &'a mut W {
710 self.variant(PRSSTOPSEL_A::PRSCH23)
711 }
712}
713#[doc = "PRS Clear Select\n\nValue on reset: 0"]
714#[derive(Clone, Copy, Debug, PartialEq)]
715#[repr(u8)]
716pub enum PRSCLEARSEL_A {
717 #[doc = "0: PRS Channel 0 selected as input"]
718 PRSCH0 = 0,
719 #[doc = "1: PRS Channel 1 selected as input"]
720 PRSCH1 = 1,
721 #[doc = "2: PRS Channel 2 selected as input"]
722 PRSCH2 = 2,
723 #[doc = "3: PRS Channel 3 selected as input"]
724 PRSCH3 = 3,
725 #[doc = "4: PRS Channel 4 selected as input"]
726 PRSCH4 = 4,
727 #[doc = "5: PRS Channel 5 selected as input"]
728 PRSCH5 = 5,
729 #[doc = "6: PRS Channel 6 selected as input"]
730 PRSCH6 = 6,
731 #[doc = "7: PRS Channel 7 selected as input"]
732 PRSCH7 = 7,
733 #[doc = "8: PRS Channel 8 selected as input"]
734 PRSCH8 = 8,
735 #[doc = "9: PRS Channel 9 selected as input"]
736 PRSCH9 = 9,
737 #[doc = "10: PRS Channel 10 selected as input"]
738 PRSCH10 = 10,
739 #[doc = "11: PRS Channel 11 selected as input"]
740 PRSCH11 = 11,
741 #[doc = "12: PRS Channel 12 selected as input"]
742 PRSCH12 = 12,
743 #[doc = "13: PRS Channel 13 selected as input"]
744 PRSCH13 = 13,
745 #[doc = "14: PRS Channel 14 selected as input"]
746 PRSCH14 = 14,
747 #[doc = "15: PRS Channel 15 selected as input"]
748 PRSCH15 = 15,
749 #[doc = "16: PRS Channel 16 selected as input"]
750 PRSCH16 = 16,
751 #[doc = "17: PRS Channel 17 selected as input"]
752 PRSCH17 = 17,
753 #[doc = "18: PRS Channel 18 selected as input"]
754 PRSCH18 = 18,
755 #[doc = "19: PRS Channel 19 selected as input"]
756 PRSCH19 = 19,
757 #[doc = "20: PRS Channel 20 selected as input"]
758 PRSCH20 = 20,
759 #[doc = "21: PRS Channel 21 selected as input"]
760 PRSCH21 = 21,
761 #[doc = "22: PRS Channel 22 selected as input"]
762 PRSCH22 = 22,
763 #[doc = "23: PRS Channel 23 selected as input"]
764 PRSCH23 = 23,
765}
766impl From<PRSCLEARSEL_A> for u8 {
767 #[inline(always)]
768 fn from(variant: PRSCLEARSEL_A) -> Self {
769 variant as _
770 }
771}
772#[doc = "Field `PRSCLEARSEL` reader - PRS Clear Select"]
773pub type PRSCLEARSEL_R = crate::FieldReader<u8, PRSCLEARSEL_A>;
774impl PRSCLEARSEL_R {
775 #[doc = "Get enumerated values variant"]
776 #[inline(always)]
777 pub fn variant(&self) -> Option<PRSCLEARSEL_A> {
778 match self.bits {
779 0 => Some(PRSCLEARSEL_A::PRSCH0),
780 1 => Some(PRSCLEARSEL_A::PRSCH1),
781 2 => Some(PRSCLEARSEL_A::PRSCH2),
782 3 => Some(PRSCLEARSEL_A::PRSCH3),
783 4 => Some(PRSCLEARSEL_A::PRSCH4),
784 5 => Some(PRSCLEARSEL_A::PRSCH5),
785 6 => Some(PRSCLEARSEL_A::PRSCH6),
786 7 => Some(PRSCLEARSEL_A::PRSCH7),
787 8 => Some(PRSCLEARSEL_A::PRSCH8),
788 9 => Some(PRSCLEARSEL_A::PRSCH9),
789 10 => Some(PRSCLEARSEL_A::PRSCH10),
790 11 => Some(PRSCLEARSEL_A::PRSCH11),
791 12 => Some(PRSCLEARSEL_A::PRSCH12),
792 13 => Some(PRSCLEARSEL_A::PRSCH13),
793 14 => Some(PRSCLEARSEL_A::PRSCH14),
794 15 => Some(PRSCLEARSEL_A::PRSCH15),
795 16 => Some(PRSCLEARSEL_A::PRSCH16),
796 17 => Some(PRSCLEARSEL_A::PRSCH17),
797 18 => Some(PRSCLEARSEL_A::PRSCH18),
798 19 => Some(PRSCLEARSEL_A::PRSCH19),
799 20 => Some(PRSCLEARSEL_A::PRSCH20),
800 21 => Some(PRSCLEARSEL_A::PRSCH21),
801 22 => Some(PRSCLEARSEL_A::PRSCH22),
802 23 => Some(PRSCLEARSEL_A::PRSCH23),
803 _ => None,
804 }
805 }
806 #[doc = "Checks if the value of the field is `PRSCH0`"]
807 #[inline(always)]
808 pub fn is_prsch0(&self) -> bool {
809 *self == PRSCLEARSEL_A::PRSCH0
810 }
811 #[doc = "Checks if the value of the field is `PRSCH1`"]
812 #[inline(always)]
813 pub fn is_prsch1(&self) -> bool {
814 *self == PRSCLEARSEL_A::PRSCH1
815 }
816 #[doc = "Checks if the value of the field is `PRSCH2`"]
817 #[inline(always)]
818 pub fn is_prsch2(&self) -> bool {
819 *self == PRSCLEARSEL_A::PRSCH2
820 }
821 #[doc = "Checks if the value of the field is `PRSCH3`"]
822 #[inline(always)]
823 pub fn is_prsch3(&self) -> bool {
824 *self == PRSCLEARSEL_A::PRSCH3
825 }
826 #[doc = "Checks if the value of the field is `PRSCH4`"]
827 #[inline(always)]
828 pub fn is_prsch4(&self) -> bool {
829 *self == PRSCLEARSEL_A::PRSCH4
830 }
831 #[doc = "Checks if the value of the field is `PRSCH5`"]
832 #[inline(always)]
833 pub fn is_prsch5(&self) -> bool {
834 *self == PRSCLEARSEL_A::PRSCH5
835 }
836 #[doc = "Checks if the value of the field is `PRSCH6`"]
837 #[inline(always)]
838 pub fn is_prsch6(&self) -> bool {
839 *self == PRSCLEARSEL_A::PRSCH6
840 }
841 #[doc = "Checks if the value of the field is `PRSCH7`"]
842 #[inline(always)]
843 pub fn is_prsch7(&self) -> bool {
844 *self == PRSCLEARSEL_A::PRSCH7
845 }
846 #[doc = "Checks if the value of the field is `PRSCH8`"]
847 #[inline(always)]
848 pub fn is_prsch8(&self) -> bool {
849 *self == PRSCLEARSEL_A::PRSCH8
850 }
851 #[doc = "Checks if the value of the field is `PRSCH9`"]
852 #[inline(always)]
853 pub fn is_prsch9(&self) -> bool {
854 *self == PRSCLEARSEL_A::PRSCH9
855 }
856 #[doc = "Checks if the value of the field is `PRSCH10`"]
857 #[inline(always)]
858 pub fn is_prsch10(&self) -> bool {
859 *self == PRSCLEARSEL_A::PRSCH10
860 }
861 #[doc = "Checks if the value of the field is `PRSCH11`"]
862 #[inline(always)]
863 pub fn is_prsch11(&self) -> bool {
864 *self == PRSCLEARSEL_A::PRSCH11
865 }
866 #[doc = "Checks if the value of the field is `PRSCH12`"]
867 #[inline(always)]
868 pub fn is_prsch12(&self) -> bool {
869 *self == PRSCLEARSEL_A::PRSCH12
870 }
871 #[doc = "Checks if the value of the field is `PRSCH13`"]
872 #[inline(always)]
873 pub fn is_prsch13(&self) -> bool {
874 *self == PRSCLEARSEL_A::PRSCH13
875 }
876 #[doc = "Checks if the value of the field is `PRSCH14`"]
877 #[inline(always)]
878 pub fn is_prsch14(&self) -> bool {
879 *self == PRSCLEARSEL_A::PRSCH14
880 }
881 #[doc = "Checks if the value of the field is `PRSCH15`"]
882 #[inline(always)]
883 pub fn is_prsch15(&self) -> bool {
884 *self == PRSCLEARSEL_A::PRSCH15
885 }
886 #[doc = "Checks if the value of the field is `PRSCH16`"]
887 #[inline(always)]
888 pub fn is_prsch16(&self) -> bool {
889 *self == PRSCLEARSEL_A::PRSCH16
890 }
891 #[doc = "Checks if the value of the field is `PRSCH17`"]
892 #[inline(always)]
893 pub fn is_prsch17(&self) -> bool {
894 *self == PRSCLEARSEL_A::PRSCH17
895 }
896 #[doc = "Checks if the value of the field is `PRSCH18`"]
897 #[inline(always)]
898 pub fn is_prsch18(&self) -> bool {
899 *self == PRSCLEARSEL_A::PRSCH18
900 }
901 #[doc = "Checks if the value of the field is `PRSCH19`"]
902 #[inline(always)]
903 pub fn is_prsch19(&self) -> bool {
904 *self == PRSCLEARSEL_A::PRSCH19
905 }
906 #[doc = "Checks if the value of the field is `PRSCH20`"]
907 #[inline(always)]
908 pub fn is_prsch20(&self) -> bool {
909 *self == PRSCLEARSEL_A::PRSCH20
910 }
911 #[doc = "Checks if the value of the field is `PRSCH21`"]
912 #[inline(always)]
913 pub fn is_prsch21(&self) -> bool {
914 *self == PRSCLEARSEL_A::PRSCH21
915 }
916 #[doc = "Checks if the value of the field is `PRSCH22`"]
917 #[inline(always)]
918 pub fn is_prsch22(&self) -> bool {
919 *self == PRSCLEARSEL_A::PRSCH22
920 }
921 #[doc = "Checks if the value of the field is `PRSCH23`"]
922 #[inline(always)]
923 pub fn is_prsch23(&self) -> bool {
924 *self == PRSCLEARSEL_A::PRSCH23
925 }
926}
927#[doc = "Field `PRSCLEARSEL` writer - PRS Clear Select"]
928pub type PRSCLEARSEL_W<'a> = crate::FieldWriter<'a, u32, PRSSEL_SPEC, u8, PRSCLEARSEL_A, 5, 12>;
929impl<'a> PRSCLEARSEL_W<'a> {
930 #[doc = "PRS Channel 0 selected as input"]
931 #[inline(always)]
932 pub fn prsch0(self) -> &'a mut W {
933 self.variant(PRSCLEARSEL_A::PRSCH0)
934 }
935 #[doc = "PRS Channel 1 selected as input"]
936 #[inline(always)]
937 pub fn prsch1(self) -> &'a mut W {
938 self.variant(PRSCLEARSEL_A::PRSCH1)
939 }
940 #[doc = "PRS Channel 2 selected as input"]
941 #[inline(always)]
942 pub fn prsch2(self) -> &'a mut W {
943 self.variant(PRSCLEARSEL_A::PRSCH2)
944 }
945 #[doc = "PRS Channel 3 selected as input"]
946 #[inline(always)]
947 pub fn prsch3(self) -> &'a mut W {
948 self.variant(PRSCLEARSEL_A::PRSCH3)
949 }
950 #[doc = "PRS Channel 4 selected as input"]
951 #[inline(always)]
952 pub fn prsch4(self) -> &'a mut W {
953 self.variant(PRSCLEARSEL_A::PRSCH4)
954 }
955 #[doc = "PRS Channel 5 selected as input"]
956 #[inline(always)]
957 pub fn prsch5(self) -> &'a mut W {
958 self.variant(PRSCLEARSEL_A::PRSCH5)
959 }
960 #[doc = "PRS Channel 6 selected as input"]
961 #[inline(always)]
962 pub fn prsch6(self) -> &'a mut W {
963 self.variant(PRSCLEARSEL_A::PRSCH6)
964 }
965 #[doc = "PRS Channel 7 selected as input"]
966 #[inline(always)]
967 pub fn prsch7(self) -> &'a mut W {
968 self.variant(PRSCLEARSEL_A::PRSCH7)
969 }
970 #[doc = "PRS Channel 8 selected as input"]
971 #[inline(always)]
972 pub fn prsch8(self) -> &'a mut W {
973 self.variant(PRSCLEARSEL_A::PRSCH8)
974 }
975 #[doc = "PRS Channel 9 selected as input"]
976 #[inline(always)]
977 pub fn prsch9(self) -> &'a mut W {
978 self.variant(PRSCLEARSEL_A::PRSCH9)
979 }
980 #[doc = "PRS Channel 10 selected as input"]
981 #[inline(always)]
982 pub fn prsch10(self) -> &'a mut W {
983 self.variant(PRSCLEARSEL_A::PRSCH10)
984 }
985 #[doc = "PRS Channel 11 selected as input"]
986 #[inline(always)]
987 pub fn prsch11(self) -> &'a mut W {
988 self.variant(PRSCLEARSEL_A::PRSCH11)
989 }
990 #[doc = "PRS Channel 12 selected as input"]
991 #[inline(always)]
992 pub fn prsch12(self) -> &'a mut W {
993 self.variant(PRSCLEARSEL_A::PRSCH12)
994 }
995 #[doc = "PRS Channel 13 selected as input"]
996 #[inline(always)]
997 pub fn prsch13(self) -> &'a mut W {
998 self.variant(PRSCLEARSEL_A::PRSCH13)
999 }
1000 #[doc = "PRS Channel 14 selected as input"]
1001 #[inline(always)]
1002 pub fn prsch14(self) -> &'a mut W {
1003 self.variant(PRSCLEARSEL_A::PRSCH14)
1004 }
1005 #[doc = "PRS Channel 15 selected as input"]
1006 #[inline(always)]
1007 pub fn prsch15(self) -> &'a mut W {
1008 self.variant(PRSCLEARSEL_A::PRSCH15)
1009 }
1010 #[doc = "PRS Channel 16 selected as input"]
1011 #[inline(always)]
1012 pub fn prsch16(self) -> &'a mut W {
1013 self.variant(PRSCLEARSEL_A::PRSCH16)
1014 }
1015 #[doc = "PRS Channel 17 selected as input"]
1016 #[inline(always)]
1017 pub fn prsch17(self) -> &'a mut W {
1018 self.variant(PRSCLEARSEL_A::PRSCH17)
1019 }
1020 #[doc = "PRS Channel 18 selected as input"]
1021 #[inline(always)]
1022 pub fn prsch18(self) -> &'a mut W {
1023 self.variant(PRSCLEARSEL_A::PRSCH18)
1024 }
1025 #[doc = "PRS Channel 19 selected as input"]
1026 #[inline(always)]
1027 pub fn prsch19(self) -> &'a mut W {
1028 self.variant(PRSCLEARSEL_A::PRSCH19)
1029 }
1030 #[doc = "PRS Channel 20 selected as input"]
1031 #[inline(always)]
1032 pub fn prsch20(self) -> &'a mut W {
1033 self.variant(PRSCLEARSEL_A::PRSCH20)
1034 }
1035 #[doc = "PRS Channel 21 selected as input"]
1036 #[inline(always)]
1037 pub fn prsch21(self) -> &'a mut W {
1038 self.variant(PRSCLEARSEL_A::PRSCH21)
1039 }
1040 #[doc = "PRS Channel 22 selected as input"]
1041 #[inline(always)]
1042 pub fn prsch22(self) -> &'a mut W {
1043 self.variant(PRSCLEARSEL_A::PRSCH22)
1044 }
1045 #[doc = "PRS Channel 23 selected as input"]
1046 #[inline(always)]
1047 pub fn prsch23(self) -> &'a mut W {
1048 self.variant(PRSCLEARSEL_A::PRSCH23)
1049 }
1050}
1051#[doc = "PRS Start Mode\n\nValue on reset: 0"]
1052#[derive(Clone, Copy, Debug, PartialEq)]
1053#[repr(u8)]
1054pub enum PRSSTARTMODE_A {
1055 #[doc = "0: PRS cannot start the LETIMER"]
1056 NONE = 0,
1057 #[doc = "1: Rising edge of selected PRS input can start the LETIMER"]
1058 RISING = 1,
1059 #[doc = "2: Falling edge of selected PRS input can start the LETIMER"]
1060 FALLING = 2,
1061 #[doc = "3: Both the rising or falling edge of the selected PRS input can start the LETIMER"]
1062 BOTH = 3,
1063}
1064impl From<PRSSTARTMODE_A> for u8 {
1065 #[inline(always)]
1066 fn from(variant: PRSSTARTMODE_A) -> Self {
1067 variant as _
1068 }
1069}
1070#[doc = "Field `PRSSTARTMODE` reader - PRS Start Mode"]
1071pub type PRSSTARTMODE_R = crate::FieldReader<u8, PRSSTARTMODE_A>;
1072impl PRSSTARTMODE_R {
1073 #[doc = "Get enumerated values variant"]
1074 #[inline(always)]
1075 pub fn variant(&self) -> PRSSTARTMODE_A {
1076 match self.bits {
1077 0 => PRSSTARTMODE_A::NONE,
1078 1 => PRSSTARTMODE_A::RISING,
1079 2 => PRSSTARTMODE_A::FALLING,
1080 3 => PRSSTARTMODE_A::BOTH,
1081 _ => unreachable!(),
1082 }
1083 }
1084 #[doc = "Checks if the value of the field is `NONE`"]
1085 #[inline(always)]
1086 pub fn is_none(&self) -> bool {
1087 *self == PRSSTARTMODE_A::NONE
1088 }
1089 #[doc = "Checks if the value of the field is `RISING`"]
1090 #[inline(always)]
1091 pub fn is_rising(&self) -> bool {
1092 *self == PRSSTARTMODE_A::RISING
1093 }
1094 #[doc = "Checks if the value of the field is `FALLING`"]
1095 #[inline(always)]
1096 pub fn is_falling(&self) -> bool {
1097 *self == PRSSTARTMODE_A::FALLING
1098 }
1099 #[doc = "Checks if the value of the field is `BOTH`"]
1100 #[inline(always)]
1101 pub fn is_both(&self) -> bool {
1102 *self == PRSSTARTMODE_A::BOTH
1103 }
1104}
1105#[doc = "Field `PRSSTARTMODE` writer - PRS Start Mode"]
1106pub type PRSSTARTMODE_W<'a> =
1107 crate::FieldWriterSafe<'a, u32, PRSSEL_SPEC, u8, PRSSTARTMODE_A, 2, 18>;
1108impl<'a> PRSSTARTMODE_W<'a> {
1109 #[doc = "PRS cannot start the LETIMER"]
1110 #[inline(always)]
1111 pub fn none(self) -> &'a mut W {
1112 self.variant(PRSSTARTMODE_A::NONE)
1113 }
1114 #[doc = "Rising edge of selected PRS input can start the LETIMER"]
1115 #[inline(always)]
1116 pub fn rising(self) -> &'a mut W {
1117 self.variant(PRSSTARTMODE_A::RISING)
1118 }
1119 #[doc = "Falling edge of selected PRS input can start the LETIMER"]
1120 #[inline(always)]
1121 pub fn falling(self) -> &'a mut W {
1122 self.variant(PRSSTARTMODE_A::FALLING)
1123 }
1124 #[doc = "Both the rising or falling edge of the selected PRS input can start the LETIMER"]
1125 #[inline(always)]
1126 pub fn both(self) -> &'a mut W {
1127 self.variant(PRSSTARTMODE_A::BOTH)
1128 }
1129}
1130#[doc = "PRS Stop Mode\n\nValue on reset: 0"]
1131#[derive(Clone, Copy, Debug, PartialEq)]
1132#[repr(u8)]
1133pub enum PRSSTOPMODE_A {
1134 #[doc = "0: PRS cannot stop the LETIMER"]
1135 NONE = 0,
1136 #[doc = "1: Rising edge of selected PRS input can stop the LETIMER"]
1137 RISING = 1,
1138 #[doc = "2: Falling edge of selected PRS input can stop the LETIMER"]
1139 FALLING = 2,
1140 #[doc = "3: Both the rising or falling edge of the selected PRS input can stop the LETIMER"]
1141 BOTH = 3,
1142}
1143impl From<PRSSTOPMODE_A> for u8 {
1144 #[inline(always)]
1145 fn from(variant: PRSSTOPMODE_A) -> Self {
1146 variant as _
1147 }
1148}
1149#[doc = "Field `PRSSTOPMODE` reader - PRS Stop Mode"]
1150pub type PRSSTOPMODE_R = crate::FieldReader<u8, PRSSTOPMODE_A>;
1151impl PRSSTOPMODE_R {
1152 #[doc = "Get enumerated values variant"]
1153 #[inline(always)]
1154 pub fn variant(&self) -> PRSSTOPMODE_A {
1155 match self.bits {
1156 0 => PRSSTOPMODE_A::NONE,
1157 1 => PRSSTOPMODE_A::RISING,
1158 2 => PRSSTOPMODE_A::FALLING,
1159 3 => PRSSTOPMODE_A::BOTH,
1160 _ => unreachable!(),
1161 }
1162 }
1163 #[doc = "Checks if the value of the field is `NONE`"]
1164 #[inline(always)]
1165 pub fn is_none(&self) -> bool {
1166 *self == PRSSTOPMODE_A::NONE
1167 }
1168 #[doc = "Checks if the value of the field is `RISING`"]
1169 #[inline(always)]
1170 pub fn is_rising(&self) -> bool {
1171 *self == PRSSTOPMODE_A::RISING
1172 }
1173 #[doc = "Checks if the value of the field is `FALLING`"]
1174 #[inline(always)]
1175 pub fn is_falling(&self) -> bool {
1176 *self == PRSSTOPMODE_A::FALLING
1177 }
1178 #[doc = "Checks if the value of the field is `BOTH`"]
1179 #[inline(always)]
1180 pub fn is_both(&self) -> bool {
1181 *self == PRSSTOPMODE_A::BOTH
1182 }
1183}
1184#[doc = "Field `PRSSTOPMODE` writer - PRS Stop Mode"]
1185pub type PRSSTOPMODE_W<'a> = crate::FieldWriterSafe<'a, u32, PRSSEL_SPEC, u8, PRSSTOPMODE_A, 2, 22>;
1186impl<'a> PRSSTOPMODE_W<'a> {
1187 #[doc = "PRS cannot stop the LETIMER"]
1188 #[inline(always)]
1189 pub fn none(self) -> &'a mut W {
1190 self.variant(PRSSTOPMODE_A::NONE)
1191 }
1192 #[doc = "Rising edge of selected PRS input can stop the LETIMER"]
1193 #[inline(always)]
1194 pub fn rising(self) -> &'a mut W {
1195 self.variant(PRSSTOPMODE_A::RISING)
1196 }
1197 #[doc = "Falling edge of selected PRS input can stop the LETIMER"]
1198 #[inline(always)]
1199 pub fn falling(self) -> &'a mut W {
1200 self.variant(PRSSTOPMODE_A::FALLING)
1201 }
1202 #[doc = "Both the rising or falling edge of the selected PRS input can stop the LETIMER"]
1203 #[inline(always)]
1204 pub fn both(self) -> &'a mut W {
1205 self.variant(PRSSTOPMODE_A::BOTH)
1206 }
1207}
1208#[doc = "PRS Clear Mode\n\nValue on reset: 0"]
1209#[derive(Clone, Copy, Debug, PartialEq)]
1210#[repr(u8)]
1211pub enum PRSCLEARMODE_A {
1212 #[doc = "0: PRS cannot clear the LETIMER"]
1213 NONE = 0,
1214 #[doc = "1: Rising edge of selected PRS input can clear the LETIMER"]
1215 RISING = 1,
1216 #[doc = "2: Falling edge of selected PRS input can clear the LETIMER"]
1217 FALLING = 2,
1218 #[doc = "3: Both the rising or falling edge of the selected PRS input can clear the LETIMER"]
1219 BOTH = 3,
1220}
1221impl From<PRSCLEARMODE_A> for u8 {
1222 #[inline(always)]
1223 fn from(variant: PRSCLEARMODE_A) -> Self {
1224 variant as _
1225 }
1226}
1227#[doc = "Field `PRSCLEARMODE` reader - PRS Clear Mode"]
1228pub type PRSCLEARMODE_R = crate::FieldReader<u8, PRSCLEARMODE_A>;
1229impl PRSCLEARMODE_R {
1230 #[doc = "Get enumerated values variant"]
1231 #[inline(always)]
1232 pub fn variant(&self) -> PRSCLEARMODE_A {
1233 match self.bits {
1234 0 => PRSCLEARMODE_A::NONE,
1235 1 => PRSCLEARMODE_A::RISING,
1236 2 => PRSCLEARMODE_A::FALLING,
1237 3 => PRSCLEARMODE_A::BOTH,
1238 _ => unreachable!(),
1239 }
1240 }
1241 #[doc = "Checks if the value of the field is `NONE`"]
1242 #[inline(always)]
1243 pub fn is_none(&self) -> bool {
1244 *self == PRSCLEARMODE_A::NONE
1245 }
1246 #[doc = "Checks if the value of the field is `RISING`"]
1247 #[inline(always)]
1248 pub fn is_rising(&self) -> bool {
1249 *self == PRSCLEARMODE_A::RISING
1250 }
1251 #[doc = "Checks if the value of the field is `FALLING`"]
1252 #[inline(always)]
1253 pub fn is_falling(&self) -> bool {
1254 *self == PRSCLEARMODE_A::FALLING
1255 }
1256 #[doc = "Checks if the value of the field is `BOTH`"]
1257 #[inline(always)]
1258 pub fn is_both(&self) -> bool {
1259 *self == PRSCLEARMODE_A::BOTH
1260 }
1261}
1262#[doc = "Field `PRSCLEARMODE` writer - PRS Clear Mode"]
1263pub type PRSCLEARMODE_W<'a> =
1264 crate::FieldWriterSafe<'a, u32, PRSSEL_SPEC, u8, PRSCLEARMODE_A, 2, 26>;
1265impl<'a> PRSCLEARMODE_W<'a> {
1266 #[doc = "PRS cannot clear the LETIMER"]
1267 #[inline(always)]
1268 pub fn none(self) -> &'a mut W {
1269 self.variant(PRSCLEARMODE_A::NONE)
1270 }
1271 #[doc = "Rising edge of selected PRS input can clear the LETIMER"]
1272 #[inline(always)]
1273 pub fn rising(self) -> &'a mut W {
1274 self.variant(PRSCLEARMODE_A::RISING)
1275 }
1276 #[doc = "Falling edge of selected PRS input can clear the LETIMER"]
1277 #[inline(always)]
1278 pub fn falling(self) -> &'a mut W {
1279 self.variant(PRSCLEARMODE_A::FALLING)
1280 }
1281 #[doc = "Both the rising or falling edge of the selected PRS input can clear the LETIMER"]
1282 #[inline(always)]
1283 pub fn both(self) -> &'a mut W {
1284 self.variant(PRSCLEARMODE_A::BOTH)
1285 }
1286}
1287impl R {
1288 #[doc = "Bits 0:4 - PRS Start Select"]
1289 #[inline(always)]
1290 pub fn prsstartsel(&self) -> PRSSTARTSEL_R {
1291 PRSSTARTSEL_R::new((self.bits & 0x1f) as u8)
1292 }
1293 #[doc = "Bits 6:10 - PRS Stop Select"]
1294 #[inline(always)]
1295 pub fn prsstopsel(&self) -> PRSSTOPSEL_R {
1296 PRSSTOPSEL_R::new(((self.bits >> 6) & 0x1f) as u8)
1297 }
1298 #[doc = "Bits 12:16 - PRS Clear Select"]
1299 #[inline(always)]
1300 pub fn prsclearsel(&self) -> PRSCLEARSEL_R {
1301 PRSCLEARSEL_R::new(((self.bits >> 12) & 0x1f) as u8)
1302 }
1303 #[doc = "Bits 18:19 - PRS Start Mode"]
1304 #[inline(always)]
1305 pub fn prsstartmode(&self) -> PRSSTARTMODE_R {
1306 PRSSTARTMODE_R::new(((self.bits >> 18) & 3) as u8)
1307 }
1308 #[doc = "Bits 22:23 - PRS Stop Mode"]
1309 #[inline(always)]
1310 pub fn prsstopmode(&self) -> PRSSTOPMODE_R {
1311 PRSSTOPMODE_R::new(((self.bits >> 22) & 3) as u8)
1312 }
1313 #[doc = "Bits 26:27 - PRS Clear Mode"]
1314 #[inline(always)]
1315 pub fn prsclearmode(&self) -> PRSCLEARMODE_R {
1316 PRSCLEARMODE_R::new(((self.bits >> 26) & 3) as u8)
1317 }
1318}
1319impl W {
1320 #[doc = "Bits 0:4 - PRS Start Select"]
1321 #[inline(always)]
1322 pub fn prsstartsel(&mut self) -> PRSSTARTSEL_W {
1323 PRSSTARTSEL_W::new(self)
1324 }
1325 #[doc = "Bits 6:10 - PRS Stop Select"]
1326 #[inline(always)]
1327 pub fn prsstopsel(&mut self) -> PRSSTOPSEL_W {
1328 PRSSTOPSEL_W::new(self)
1329 }
1330 #[doc = "Bits 12:16 - PRS Clear Select"]
1331 #[inline(always)]
1332 pub fn prsclearsel(&mut self) -> PRSCLEARSEL_W {
1333 PRSCLEARSEL_W::new(self)
1334 }
1335 #[doc = "Bits 18:19 - PRS Start Mode"]
1336 #[inline(always)]
1337 pub fn prsstartmode(&mut self) -> PRSSTARTMODE_W {
1338 PRSSTARTMODE_W::new(self)
1339 }
1340 #[doc = "Bits 22:23 - PRS Stop Mode"]
1341 #[inline(always)]
1342 pub fn prsstopmode(&mut self) -> PRSSTOPMODE_W {
1343 PRSSTOPMODE_W::new(self)
1344 }
1345 #[doc = "Bits 26:27 - PRS Clear Mode"]
1346 #[inline(always)]
1347 pub fn prsclearmode(&mut self) -> PRSCLEARMODE_W {
1348 PRSCLEARMODE_W::new(self)
1349 }
1350 #[doc = "Writes raw bits to the register."]
1351 #[inline(always)]
1352 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1353 self.0.bits(bits);
1354 self
1355 }
1356}
1357#[doc = "PRS Input Select 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 [prssel](index.html) module"]
1358pub struct PRSSEL_SPEC;
1359impl crate::RegisterSpec for PRSSEL_SPEC {
1360 type Ux = u32;
1361}
1362#[doc = "`read()` method returns [prssel::R](R) reader structure"]
1363impl crate::Readable for PRSSEL_SPEC {
1364 type Reader = R;
1365}
1366#[doc = "`write(|w| ..)` method takes [prssel::W](W) writer structure"]
1367impl crate::Writable for PRSSEL_SPEC {
1368 type Writer = W;
1369}
1370#[doc = "`reset()` method sets PRSSEL to value 0"]
1371impl crate::Resettable for PRSSEL_SPEC {
1372 #[inline(always)]
1373 fn reset_value() -> Self::Ux {
1374 0
1375 }
1376}