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}
74impl From<PRSSTARTSEL_A> for u8 {
75 #[inline(always)]
76 fn from(variant: PRSSTARTSEL_A) -> Self {
77 variant as _
78 }
79}
80#[doc = "Field `PRSSTARTSEL` reader - PRS Start Select"]
81pub type PRSSTARTSEL_R = crate::FieldReader<u8, PRSSTARTSEL_A>;
82impl PRSSTARTSEL_R {
83 #[doc = "Get enumerated values variant"]
84 #[inline(always)]
85 pub fn variant(&self) -> PRSSTARTSEL_A {
86 match self.bits {
87 0 => PRSSTARTSEL_A::PRSCH0,
88 1 => PRSSTARTSEL_A::PRSCH1,
89 2 => PRSSTARTSEL_A::PRSCH2,
90 3 => PRSSTARTSEL_A::PRSCH3,
91 4 => PRSSTARTSEL_A::PRSCH4,
92 5 => PRSSTARTSEL_A::PRSCH5,
93 6 => PRSSTARTSEL_A::PRSCH6,
94 7 => PRSSTARTSEL_A::PRSCH7,
95 8 => PRSSTARTSEL_A::PRSCH8,
96 9 => PRSSTARTSEL_A::PRSCH9,
97 10 => PRSSTARTSEL_A::PRSCH10,
98 11 => PRSSTARTSEL_A::PRSCH11,
99 12 => PRSSTARTSEL_A::PRSCH12,
100 13 => PRSSTARTSEL_A::PRSCH13,
101 14 => PRSSTARTSEL_A::PRSCH14,
102 15 => PRSSTARTSEL_A::PRSCH15,
103 _ => unreachable!(),
104 }
105 }
106 #[doc = "Checks if the value of the field is `PRSCH0`"]
107 #[inline(always)]
108 pub fn is_prsch0(&self) -> bool {
109 *self == PRSSTARTSEL_A::PRSCH0
110 }
111 #[doc = "Checks if the value of the field is `PRSCH1`"]
112 #[inline(always)]
113 pub fn is_prsch1(&self) -> bool {
114 *self == PRSSTARTSEL_A::PRSCH1
115 }
116 #[doc = "Checks if the value of the field is `PRSCH2`"]
117 #[inline(always)]
118 pub fn is_prsch2(&self) -> bool {
119 *self == PRSSTARTSEL_A::PRSCH2
120 }
121 #[doc = "Checks if the value of the field is `PRSCH3`"]
122 #[inline(always)]
123 pub fn is_prsch3(&self) -> bool {
124 *self == PRSSTARTSEL_A::PRSCH3
125 }
126 #[doc = "Checks if the value of the field is `PRSCH4`"]
127 #[inline(always)]
128 pub fn is_prsch4(&self) -> bool {
129 *self == PRSSTARTSEL_A::PRSCH4
130 }
131 #[doc = "Checks if the value of the field is `PRSCH5`"]
132 #[inline(always)]
133 pub fn is_prsch5(&self) -> bool {
134 *self == PRSSTARTSEL_A::PRSCH5
135 }
136 #[doc = "Checks if the value of the field is `PRSCH6`"]
137 #[inline(always)]
138 pub fn is_prsch6(&self) -> bool {
139 *self == PRSSTARTSEL_A::PRSCH6
140 }
141 #[doc = "Checks if the value of the field is `PRSCH7`"]
142 #[inline(always)]
143 pub fn is_prsch7(&self) -> bool {
144 *self == PRSSTARTSEL_A::PRSCH7
145 }
146 #[doc = "Checks if the value of the field is `PRSCH8`"]
147 #[inline(always)]
148 pub fn is_prsch8(&self) -> bool {
149 *self == PRSSTARTSEL_A::PRSCH8
150 }
151 #[doc = "Checks if the value of the field is `PRSCH9`"]
152 #[inline(always)]
153 pub fn is_prsch9(&self) -> bool {
154 *self == PRSSTARTSEL_A::PRSCH9
155 }
156 #[doc = "Checks if the value of the field is `PRSCH10`"]
157 #[inline(always)]
158 pub fn is_prsch10(&self) -> bool {
159 *self == PRSSTARTSEL_A::PRSCH10
160 }
161 #[doc = "Checks if the value of the field is `PRSCH11`"]
162 #[inline(always)]
163 pub fn is_prsch11(&self) -> bool {
164 *self == PRSSTARTSEL_A::PRSCH11
165 }
166 #[doc = "Checks if the value of the field is `PRSCH12`"]
167 #[inline(always)]
168 pub fn is_prsch12(&self) -> bool {
169 *self == PRSSTARTSEL_A::PRSCH12
170 }
171 #[doc = "Checks if the value of the field is `PRSCH13`"]
172 #[inline(always)]
173 pub fn is_prsch13(&self) -> bool {
174 *self == PRSSTARTSEL_A::PRSCH13
175 }
176 #[doc = "Checks if the value of the field is `PRSCH14`"]
177 #[inline(always)]
178 pub fn is_prsch14(&self) -> bool {
179 *self == PRSSTARTSEL_A::PRSCH14
180 }
181 #[doc = "Checks if the value of the field is `PRSCH15`"]
182 #[inline(always)]
183 pub fn is_prsch15(&self) -> bool {
184 *self == PRSSTARTSEL_A::PRSCH15
185 }
186}
187#[doc = "Field `PRSSTARTSEL` writer - PRS Start Select"]
188pub type PRSSTARTSEL_W<'a> = crate::FieldWriterSafe<'a, u32, PRSSEL_SPEC, u8, PRSSTARTSEL_A, 4, 0>;
189impl<'a> PRSSTARTSEL_W<'a> {
190 #[doc = "PRS Channel 0 selected as input"]
191 #[inline(always)]
192 pub fn prsch0(self) -> &'a mut W {
193 self.variant(PRSSTARTSEL_A::PRSCH0)
194 }
195 #[doc = "PRS Channel 1 selected as input"]
196 #[inline(always)]
197 pub fn prsch1(self) -> &'a mut W {
198 self.variant(PRSSTARTSEL_A::PRSCH1)
199 }
200 #[doc = "PRS Channel 2 selected as input"]
201 #[inline(always)]
202 pub fn prsch2(self) -> &'a mut W {
203 self.variant(PRSSTARTSEL_A::PRSCH2)
204 }
205 #[doc = "PRS Channel 3 selected as input"]
206 #[inline(always)]
207 pub fn prsch3(self) -> &'a mut W {
208 self.variant(PRSSTARTSEL_A::PRSCH3)
209 }
210 #[doc = "PRS Channel 4 selected as input"]
211 #[inline(always)]
212 pub fn prsch4(self) -> &'a mut W {
213 self.variant(PRSSTARTSEL_A::PRSCH4)
214 }
215 #[doc = "PRS Channel 5 selected as input"]
216 #[inline(always)]
217 pub fn prsch5(self) -> &'a mut W {
218 self.variant(PRSSTARTSEL_A::PRSCH5)
219 }
220 #[doc = "PRS Channel 6 selected as input"]
221 #[inline(always)]
222 pub fn prsch6(self) -> &'a mut W {
223 self.variant(PRSSTARTSEL_A::PRSCH6)
224 }
225 #[doc = "PRS Channel 7 selected as input"]
226 #[inline(always)]
227 pub fn prsch7(self) -> &'a mut W {
228 self.variant(PRSSTARTSEL_A::PRSCH7)
229 }
230 #[doc = "PRS Channel 8 selected as input"]
231 #[inline(always)]
232 pub fn prsch8(self) -> &'a mut W {
233 self.variant(PRSSTARTSEL_A::PRSCH8)
234 }
235 #[doc = "PRS Channel 9 selected as input"]
236 #[inline(always)]
237 pub fn prsch9(self) -> &'a mut W {
238 self.variant(PRSSTARTSEL_A::PRSCH9)
239 }
240 #[doc = "PRS Channel 10 selected as input"]
241 #[inline(always)]
242 pub fn prsch10(self) -> &'a mut W {
243 self.variant(PRSSTARTSEL_A::PRSCH10)
244 }
245 #[doc = "PRS Channel 11 selected as input"]
246 #[inline(always)]
247 pub fn prsch11(self) -> &'a mut W {
248 self.variant(PRSSTARTSEL_A::PRSCH11)
249 }
250 #[doc = "PRS Channel 12 selected as input"]
251 #[inline(always)]
252 pub fn prsch12(self) -> &'a mut W {
253 self.variant(PRSSTARTSEL_A::PRSCH12)
254 }
255 #[doc = "PRS Channel 13 selected as input"]
256 #[inline(always)]
257 pub fn prsch13(self) -> &'a mut W {
258 self.variant(PRSSTARTSEL_A::PRSCH13)
259 }
260 #[doc = "PRS Channel 14 selected as input"]
261 #[inline(always)]
262 pub fn prsch14(self) -> &'a mut W {
263 self.variant(PRSSTARTSEL_A::PRSCH14)
264 }
265 #[doc = "PRS Channel 15 selected as input"]
266 #[inline(always)]
267 pub fn prsch15(self) -> &'a mut W {
268 self.variant(PRSSTARTSEL_A::PRSCH15)
269 }
270}
271#[doc = "PRS Stop Select\n\nValue on reset: 0"]
272#[derive(Clone, Copy, Debug, PartialEq)]
273#[repr(u8)]
274pub enum PRSSTOPSEL_A {
275 #[doc = "0: PRS Channel 0 selected as input"]
276 PRSCH0 = 0,
277 #[doc = "1: PRS Channel 1 selected as input"]
278 PRSCH1 = 1,
279 #[doc = "2: PRS Channel 2 selected as input"]
280 PRSCH2 = 2,
281 #[doc = "3: PRS Channel 3 selected as input"]
282 PRSCH3 = 3,
283 #[doc = "4: PRS Channel 4 selected as input"]
284 PRSCH4 = 4,
285 #[doc = "5: PRS Channel 5 selected as input"]
286 PRSCH5 = 5,
287 #[doc = "6: PRS Channel 6 selected as input"]
288 PRSCH6 = 6,
289 #[doc = "7: PRS Channel 7 selected as input"]
290 PRSCH7 = 7,
291 #[doc = "8: PRS Channel 8 selected as input"]
292 PRSCH8 = 8,
293 #[doc = "9: PRS Channel 9 selected as input"]
294 PRSCH9 = 9,
295 #[doc = "10: PRS Channel 10 selected as input"]
296 PRSCH10 = 10,
297 #[doc = "11: PRS Channel 11 selected as input"]
298 PRSCH11 = 11,
299 #[doc = "12: PRS Channel 12 selected as input"]
300 PRSCH12 = 12,
301 #[doc = "13: PRS Channel 13 selected as input"]
302 PRSCH13 = 13,
303 #[doc = "14: PRS Channel 14 selected as input"]
304 PRSCH14 = 14,
305 #[doc = "15: PRS Channel 15 selected as input"]
306 PRSCH15 = 15,
307}
308impl From<PRSSTOPSEL_A> for u8 {
309 #[inline(always)]
310 fn from(variant: PRSSTOPSEL_A) -> Self {
311 variant as _
312 }
313}
314#[doc = "Field `PRSSTOPSEL` reader - PRS Stop Select"]
315pub type PRSSTOPSEL_R = crate::FieldReader<u8, PRSSTOPSEL_A>;
316impl PRSSTOPSEL_R {
317 #[doc = "Get enumerated values variant"]
318 #[inline(always)]
319 pub fn variant(&self) -> PRSSTOPSEL_A {
320 match self.bits {
321 0 => PRSSTOPSEL_A::PRSCH0,
322 1 => PRSSTOPSEL_A::PRSCH1,
323 2 => PRSSTOPSEL_A::PRSCH2,
324 3 => PRSSTOPSEL_A::PRSCH3,
325 4 => PRSSTOPSEL_A::PRSCH4,
326 5 => PRSSTOPSEL_A::PRSCH5,
327 6 => PRSSTOPSEL_A::PRSCH6,
328 7 => PRSSTOPSEL_A::PRSCH7,
329 8 => PRSSTOPSEL_A::PRSCH8,
330 9 => PRSSTOPSEL_A::PRSCH9,
331 10 => PRSSTOPSEL_A::PRSCH10,
332 11 => PRSSTOPSEL_A::PRSCH11,
333 12 => PRSSTOPSEL_A::PRSCH12,
334 13 => PRSSTOPSEL_A::PRSCH13,
335 14 => PRSSTOPSEL_A::PRSCH14,
336 15 => PRSSTOPSEL_A::PRSCH15,
337 _ => unreachable!(),
338 }
339 }
340 #[doc = "Checks if the value of the field is `PRSCH0`"]
341 #[inline(always)]
342 pub fn is_prsch0(&self) -> bool {
343 *self == PRSSTOPSEL_A::PRSCH0
344 }
345 #[doc = "Checks if the value of the field is `PRSCH1`"]
346 #[inline(always)]
347 pub fn is_prsch1(&self) -> bool {
348 *self == PRSSTOPSEL_A::PRSCH1
349 }
350 #[doc = "Checks if the value of the field is `PRSCH2`"]
351 #[inline(always)]
352 pub fn is_prsch2(&self) -> bool {
353 *self == PRSSTOPSEL_A::PRSCH2
354 }
355 #[doc = "Checks if the value of the field is `PRSCH3`"]
356 #[inline(always)]
357 pub fn is_prsch3(&self) -> bool {
358 *self == PRSSTOPSEL_A::PRSCH3
359 }
360 #[doc = "Checks if the value of the field is `PRSCH4`"]
361 #[inline(always)]
362 pub fn is_prsch4(&self) -> bool {
363 *self == PRSSTOPSEL_A::PRSCH4
364 }
365 #[doc = "Checks if the value of the field is `PRSCH5`"]
366 #[inline(always)]
367 pub fn is_prsch5(&self) -> bool {
368 *self == PRSSTOPSEL_A::PRSCH5
369 }
370 #[doc = "Checks if the value of the field is `PRSCH6`"]
371 #[inline(always)]
372 pub fn is_prsch6(&self) -> bool {
373 *self == PRSSTOPSEL_A::PRSCH6
374 }
375 #[doc = "Checks if the value of the field is `PRSCH7`"]
376 #[inline(always)]
377 pub fn is_prsch7(&self) -> bool {
378 *self == PRSSTOPSEL_A::PRSCH7
379 }
380 #[doc = "Checks if the value of the field is `PRSCH8`"]
381 #[inline(always)]
382 pub fn is_prsch8(&self) -> bool {
383 *self == PRSSTOPSEL_A::PRSCH8
384 }
385 #[doc = "Checks if the value of the field is `PRSCH9`"]
386 #[inline(always)]
387 pub fn is_prsch9(&self) -> bool {
388 *self == PRSSTOPSEL_A::PRSCH9
389 }
390 #[doc = "Checks if the value of the field is `PRSCH10`"]
391 #[inline(always)]
392 pub fn is_prsch10(&self) -> bool {
393 *self == PRSSTOPSEL_A::PRSCH10
394 }
395 #[doc = "Checks if the value of the field is `PRSCH11`"]
396 #[inline(always)]
397 pub fn is_prsch11(&self) -> bool {
398 *self == PRSSTOPSEL_A::PRSCH11
399 }
400 #[doc = "Checks if the value of the field is `PRSCH12`"]
401 #[inline(always)]
402 pub fn is_prsch12(&self) -> bool {
403 *self == PRSSTOPSEL_A::PRSCH12
404 }
405 #[doc = "Checks if the value of the field is `PRSCH13`"]
406 #[inline(always)]
407 pub fn is_prsch13(&self) -> bool {
408 *self == PRSSTOPSEL_A::PRSCH13
409 }
410 #[doc = "Checks if the value of the field is `PRSCH14`"]
411 #[inline(always)]
412 pub fn is_prsch14(&self) -> bool {
413 *self == PRSSTOPSEL_A::PRSCH14
414 }
415 #[doc = "Checks if the value of the field is `PRSCH15`"]
416 #[inline(always)]
417 pub fn is_prsch15(&self) -> bool {
418 *self == PRSSTOPSEL_A::PRSCH15
419 }
420}
421#[doc = "Field `PRSSTOPSEL` writer - PRS Stop Select"]
422pub type PRSSTOPSEL_W<'a> = crate::FieldWriterSafe<'a, u32, PRSSEL_SPEC, u8, PRSSTOPSEL_A, 4, 6>;
423impl<'a> PRSSTOPSEL_W<'a> {
424 #[doc = "PRS Channel 0 selected as input"]
425 #[inline(always)]
426 pub fn prsch0(self) -> &'a mut W {
427 self.variant(PRSSTOPSEL_A::PRSCH0)
428 }
429 #[doc = "PRS Channel 1 selected as input"]
430 #[inline(always)]
431 pub fn prsch1(self) -> &'a mut W {
432 self.variant(PRSSTOPSEL_A::PRSCH1)
433 }
434 #[doc = "PRS Channel 2 selected as input"]
435 #[inline(always)]
436 pub fn prsch2(self) -> &'a mut W {
437 self.variant(PRSSTOPSEL_A::PRSCH2)
438 }
439 #[doc = "PRS Channel 3 selected as input"]
440 #[inline(always)]
441 pub fn prsch3(self) -> &'a mut W {
442 self.variant(PRSSTOPSEL_A::PRSCH3)
443 }
444 #[doc = "PRS Channel 4 selected as input"]
445 #[inline(always)]
446 pub fn prsch4(self) -> &'a mut W {
447 self.variant(PRSSTOPSEL_A::PRSCH4)
448 }
449 #[doc = "PRS Channel 5 selected as input"]
450 #[inline(always)]
451 pub fn prsch5(self) -> &'a mut W {
452 self.variant(PRSSTOPSEL_A::PRSCH5)
453 }
454 #[doc = "PRS Channel 6 selected as input"]
455 #[inline(always)]
456 pub fn prsch6(self) -> &'a mut W {
457 self.variant(PRSSTOPSEL_A::PRSCH6)
458 }
459 #[doc = "PRS Channel 7 selected as input"]
460 #[inline(always)]
461 pub fn prsch7(self) -> &'a mut W {
462 self.variant(PRSSTOPSEL_A::PRSCH7)
463 }
464 #[doc = "PRS Channel 8 selected as input"]
465 #[inline(always)]
466 pub fn prsch8(self) -> &'a mut W {
467 self.variant(PRSSTOPSEL_A::PRSCH8)
468 }
469 #[doc = "PRS Channel 9 selected as input"]
470 #[inline(always)]
471 pub fn prsch9(self) -> &'a mut W {
472 self.variant(PRSSTOPSEL_A::PRSCH9)
473 }
474 #[doc = "PRS Channel 10 selected as input"]
475 #[inline(always)]
476 pub fn prsch10(self) -> &'a mut W {
477 self.variant(PRSSTOPSEL_A::PRSCH10)
478 }
479 #[doc = "PRS Channel 11 selected as input"]
480 #[inline(always)]
481 pub fn prsch11(self) -> &'a mut W {
482 self.variant(PRSSTOPSEL_A::PRSCH11)
483 }
484 #[doc = "PRS Channel 12 selected as input"]
485 #[inline(always)]
486 pub fn prsch12(self) -> &'a mut W {
487 self.variant(PRSSTOPSEL_A::PRSCH12)
488 }
489 #[doc = "PRS Channel 13 selected as input"]
490 #[inline(always)]
491 pub fn prsch13(self) -> &'a mut W {
492 self.variant(PRSSTOPSEL_A::PRSCH13)
493 }
494 #[doc = "PRS Channel 14 selected as input"]
495 #[inline(always)]
496 pub fn prsch14(self) -> &'a mut W {
497 self.variant(PRSSTOPSEL_A::PRSCH14)
498 }
499 #[doc = "PRS Channel 15 selected as input"]
500 #[inline(always)]
501 pub fn prsch15(self) -> &'a mut W {
502 self.variant(PRSSTOPSEL_A::PRSCH15)
503 }
504}
505#[doc = "PRS Clear Select\n\nValue on reset: 0"]
506#[derive(Clone, Copy, Debug, PartialEq)]
507#[repr(u8)]
508pub enum PRSCLEARSEL_A {
509 #[doc = "0: PRS Channel 0 selected as input"]
510 PRSCH0 = 0,
511 #[doc = "1: PRS Channel 1 selected as input"]
512 PRSCH1 = 1,
513 #[doc = "2: PRS Channel 2 selected as input"]
514 PRSCH2 = 2,
515 #[doc = "3: PRS Channel 3 selected as input"]
516 PRSCH3 = 3,
517 #[doc = "4: PRS Channel 4 selected as input"]
518 PRSCH4 = 4,
519 #[doc = "5: PRS Channel 5 selected as input"]
520 PRSCH5 = 5,
521 #[doc = "6: PRS Channel 6 selected as input"]
522 PRSCH6 = 6,
523 #[doc = "7: PRS Channel 7 selected as input"]
524 PRSCH7 = 7,
525 #[doc = "8: PRS Channel 8 selected as input"]
526 PRSCH8 = 8,
527 #[doc = "9: PRS Channel 9 selected as input"]
528 PRSCH9 = 9,
529 #[doc = "10: PRS Channel 10 selected as input"]
530 PRSCH10 = 10,
531 #[doc = "11: PRS Channel 11 selected as input"]
532 PRSCH11 = 11,
533 #[doc = "12: PRS Channel 12 selected as input"]
534 PRSCH12 = 12,
535 #[doc = "13: PRS Channel 13 selected as input"]
536 PRSCH13 = 13,
537 #[doc = "14: PRS Channel 14 selected as input"]
538 PRSCH14 = 14,
539 #[doc = "15: PRS Channel 15 selected as input"]
540 PRSCH15 = 15,
541}
542impl From<PRSCLEARSEL_A> for u8 {
543 #[inline(always)]
544 fn from(variant: PRSCLEARSEL_A) -> Self {
545 variant as _
546 }
547}
548#[doc = "Field `PRSCLEARSEL` reader - PRS Clear Select"]
549pub type PRSCLEARSEL_R = crate::FieldReader<u8, PRSCLEARSEL_A>;
550impl PRSCLEARSEL_R {
551 #[doc = "Get enumerated values variant"]
552 #[inline(always)]
553 pub fn variant(&self) -> PRSCLEARSEL_A {
554 match self.bits {
555 0 => PRSCLEARSEL_A::PRSCH0,
556 1 => PRSCLEARSEL_A::PRSCH1,
557 2 => PRSCLEARSEL_A::PRSCH2,
558 3 => PRSCLEARSEL_A::PRSCH3,
559 4 => PRSCLEARSEL_A::PRSCH4,
560 5 => PRSCLEARSEL_A::PRSCH5,
561 6 => PRSCLEARSEL_A::PRSCH6,
562 7 => PRSCLEARSEL_A::PRSCH7,
563 8 => PRSCLEARSEL_A::PRSCH8,
564 9 => PRSCLEARSEL_A::PRSCH9,
565 10 => PRSCLEARSEL_A::PRSCH10,
566 11 => PRSCLEARSEL_A::PRSCH11,
567 12 => PRSCLEARSEL_A::PRSCH12,
568 13 => PRSCLEARSEL_A::PRSCH13,
569 14 => PRSCLEARSEL_A::PRSCH14,
570 15 => PRSCLEARSEL_A::PRSCH15,
571 _ => unreachable!(),
572 }
573 }
574 #[doc = "Checks if the value of the field is `PRSCH0`"]
575 #[inline(always)]
576 pub fn is_prsch0(&self) -> bool {
577 *self == PRSCLEARSEL_A::PRSCH0
578 }
579 #[doc = "Checks if the value of the field is `PRSCH1`"]
580 #[inline(always)]
581 pub fn is_prsch1(&self) -> bool {
582 *self == PRSCLEARSEL_A::PRSCH1
583 }
584 #[doc = "Checks if the value of the field is `PRSCH2`"]
585 #[inline(always)]
586 pub fn is_prsch2(&self) -> bool {
587 *self == PRSCLEARSEL_A::PRSCH2
588 }
589 #[doc = "Checks if the value of the field is `PRSCH3`"]
590 #[inline(always)]
591 pub fn is_prsch3(&self) -> bool {
592 *self == PRSCLEARSEL_A::PRSCH3
593 }
594 #[doc = "Checks if the value of the field is `PRSCH4`"]
595 #[inline(always)]
596 pub fn is_prsch4(&self) -> bool {
597 *self == PRSCLEARSEL_A::PRSCH4
598 }
599 #[doc = "Checks if the value of the field is `PRSCH5`"]
600 #[inline(always)]
601 pub fn is_prsch5(&self) -> bool {
602 *self == PRSCLEARSEL_A::PRSCH5
603 }
604 #[doc = "Checks if the value of the field is `PRSCH6`"]
605 #[inline(always)]
606 pub fn is_prsch6(&self) -> bool {
607 *self == PRSCLEARSEL_A::PRSCH6
608 }
609 #[doc = "Checks if the value of the field is `PRSCH7`"]
610 #[inline(always)]
611 pub fn is_prsch7(&self) -> bool {
612 *self == PRSCLEARSEL_A::PRSCH7
613 }
614 #[doc = "Checks if the value of the field is `PRSCH8`"]
615 #[inline(always)]
616 pub fn is_prsch8(&self) -> bool {
617 *self == PRSCLEARSEL_A::PRSCH8
618 }
619 #[doc = "Checks if the value of the field is `PRSCH9`"]
620 #[inline(always)]
621 pub fn is_prsch9(&self) -> bool {
622 *self == PRSCLEARSEL_A::PRSCH9
623 }
624 #[doc = "Checks if the value of the field is `PRSCH10`"]
625 #[inline(always)]
626 pub fn is_prsch10(&self) -> bool {
627 *self == PRSCLEARSEL_A::PRSCH10
628 }
629 #[doc = "Checks if the value of the field is `PRSCH11`"]
630 #[inline(always)]
631 pub fn is_prsch11(&self) -> bool {
632 *self == PRSCLEARSEL_A::PRSCH11
633 }
634 #[doc = "Checks if the value of the field is `PRSCH12`"]
635 #[inline(always)]
636 pub fn is_prsch12(&self) -> bool {
637 *self == PRSCLEARSEL_A::PRSCH12
638 }
639 #[doc = "Checks if the value of the field is `PRSCH13`"]
640 #[inline(always)]
641 pub fn is_prsch13(&self) -> bool {
642 *self == PRSCLEARSEL_A::PRSCH13
643 }
644 #[doc = "Checks if the value of the field is `PRSCH14`"]
645 #[inline(always)]
646 pub fn is_prsch14(&self) -> bool {
647 *self == PRSCLEARSEL_A::PRSCH14
648 }
649 #[doc = "Checks if the value of the field is `PRSCH15`"]
650 #[inline(always)]
651 pub fn is_prsch15(&self) -> bool {
652 *self == PRSCLEARSEL_A::PRSCH15
653 }
654}
655#[doc = "Field `PRSCLEARSEL` writer - PRS Clear Select"]
656pub type PRSCLEARSEL_W<'a> = crate::FieldWriterSafe<'a, u32, PRSSEL_SPEC, u8, PRSCLEARSEL_A, 4, 12>;
657impl<'a> PRSCLEARSEL_W<'a> {
658 #[doc = "PRS Channel 0 selected as input"]
659 #[inline(always)]
660 pub fn prsch0(self) -> &'a mut W {
661 self.variant(PRSCLEARSEL_A::PRSCH0)
662 }
663 #[doc = "PRS Channel 1 selected as input"]
664 #[inline(always)]
665 pub fn prsch1(self) -> &'a mut W {
666 self.variant(PRSCLEARSEL_A::PRSCH1)
667 }
668 #[doc = "PRS Channel 2 selected as input"]
669 #[inline(always)]
670 pub fn prsch2(self) -> &'a mut W {
671 self.variant(PRSCLEARSEL_A::PRSCH2)
672 }
673 #[doc = "PRS Channel 3 selected as input"]
674 #[inline(always)]
675 pub fn prsch3(self) -> &'a mut W {
676 self.variant(PRSCLEARSEL_A::PRSCH3)
677 }
678 #[doc = "PRS Channel 4 selected as input"]
679 #[inline(always)]
680 pub fn prsch4(self) -> &'a mut W {
681 self.variant(PRSCLEARSEL_A::PRSCH4)
682 }
683 #[doc = "PRS Channel 5 selected as input"]
684 #[inline(always)]
685 pub fn prsch5(self) -> &'a mut W {
686 self.variant(PRSCLEARSEL_A::PRSCH5)
687 }
688 #[doc = "PRS Channel 6 selected as input"]
689 #[inline(always)]
690 pub fn prsch6(self) -> &'a mut W {
691 self.variant(PRSCLEARSEL_A::PRSCH6)
692 }
693 #[doc = "PRS Channel 7 selected as input"]
694 #[inline(always)]
695 pub fn prsch7(self) -> &'a mut W {
696 self.variant(PRSCLEARSEL_A::PRSCH7)
697 }
698 #[doc = "PRS Channel 8 selected as input"]
699 #[inline(always)]
700 pub fn prsch8(self) -> &'a mut W {
701 self.variant(PRSCLEARSEL_A::PRSCH8)
702 }
703 #[doc = "PRS Channel 9 selected as input"]
704 #[inline(always)]
705 pub fn prsch9(self) -> &'a mut W {
706 self.variant(PRSCLEARSEL_A::PRSCH9)
707 }
708 #[doc = "PRS Channel 10 selected as input"]
709 #[inline(always)]
710 pub fn prsch10(self) -> &'a mut W {
711 self.variant(PRSCLEARSEL_A::PRSCH10)
712 }
713 #[doc = "PRS Channel 11 selected as input"]
714 #[inline(always)]
715 pub fn prsch11(self) -> &'a mut W {
716 self.variant(PRSCLEARSEL_A::PRSCH11)
717 }
718 #[doc = "PRS Channel 12 selected as input"]
719 #[inline(always)]
720 pub fn prsch12(self) -> &'a mut W {
721 self.variant(PRSCLEARSEL_A::PRSCH12)
722 }
723 #[doc = "PRS Channel 13 selected as input"]
724 #[inline(always)]
725 pub fn prsch13(self) -> &'a mut W {
726 self.variant(PRSCLEARSEL_A::PRSCH13)
727 }
728 #[doc = "PRS Channel 14 selected as input"]
729 #[inline(always)]
730 pub fn prsch14(self) -> &'a mut W {
731 self.variant(PRSCLEARSEL_A::PRSCH14)
732 }
733 #[doc = "PRS Channel 15 selected as input"]
734 #[inline(always)]
735 pub fn prsch15(self) -> &'a mut W {
736 self.variant(PRSCLEARSEL_A::PRSCH15)
737 }
738}
739#[doc = "PRS Start Mode\n\nValue on reset: 0"]
740#[derive(Clone, Copy, Debug, PartialEq)]
741#[repr(u8)]
742pub enum PRSSTARTMODE_A {
743 #[doc = "0: PRS cannot start the LETIMER"]
744 NONE = 0,
745 #[doc = "1: Rising edge of selected PRS input can start the LETIMER"]
746 RISING = 1,
747 #[doc = "2: Falling edge of selected PRS input can start the LETIMER"]
748 FALLING = 2,
749 #[doc = "3: Both the rising or falling edge of the selected PRS input can start the LETIMER"]
750 BOTH = 3,
751}
752impl From<PRSSTARTMODE_A> for u8 {
753 #[inline(always)]
754 fn from(variant: PRSSTARTMODE_A) -> Self {
755 variant as _
756 }
757}
758#[doc = "Field `PRSSTARTMODE` reader - PRS Start Mode"]
759pub type PRSSTARTMODE_R = crate::FieldReader<u8, PRSSTARTMODE_A>;
760impl PRSSTARTMODE_R {
761 #[doc = "Get enumerated values variant"]
762 #[inline(always)]
763 pub fn variant(&self) -> PRSSTARTMODE_A {
764 match self.bits {
765 0 => PRSSTARTMODE_A::NONE,
766 1 => PRSSTARTMODE_A::RISING,
767 2 => PRSSTARTMODE_A::FALLING,
768 3 => PRSSTARTMODE_A::BOTH,
769 _ => unreachable!(),
770 }
771 }
772 #[doc = "Checks if the value of the field is `NONE`"]
773 #[inline(always)]
774 pub fn is_none(&self) -> bool {
775 *self == PRSSTARTMODE_A::NONE
776 }
777 #[doc = "Checks if the value of the field is `RISING`"]
778 #[inline(always)]
779 pub fn is_rising(&self) -> bool {
780 *self == PRSSTARTMODE_A::RISING
781 }
782 #[doc = "Checks if the value of the field is `FALLING`"]
783 #[inline(always)]
784 pub fn is_falling(&self) -> bool {
785 *self == PRSSTARTMODE_A::FALLING
786 }
787 #[doc = "Checks if the value of the field is `BOTH`"]
788 #[inline(always)]
789 pub fn is_both(&self) -> bool {
790 *self == PRSSTARTMODE_A::BOTH
791 }
792}
793#[doc = "Field `PRSSTARTMODE` writer - PRS Start Mode"]
794pub type PRSSTARTMODE_W<'a> =
795 crate::FieldWriterSafe<'a, u32, PRSSEL_SPEC, u8, PRSSTARTMODE_A, 2, 18>;
796impl<'a> PRSSTARTMODE_W<'a> {
797 #[doc = "PRS cannot start the LETIMER"]
798 #[inline(always)]
799 pub fn none(self) -> &'a mut W {
800 self.variant(PRSSTARTMODE_A::NONE)
801 }
802 #[doc = "Rising edge of selected PRS input can start the LETIMER"]
803 #[inline(always)]
804 pub fn rising(self) -> &'a mut W {
805 self.variant(PRSSTARTMODE_A::RISING)
806 }
807 #[doc = "Falling edge of selected PRS input can start the LETIMER"]
808 #[inline(always)]
809 pub fn falling(self) -> &'a mut W {
810 self.variant(PRSSTARTMODE_A::FALLING)
811 }
812 #[doc = "Both the rising or falling edge of the selected PRS input can start the LETIMER"]
813 #[inline(always)]
814 pub fn both(self) -> &'a mut W {
815 self.variant(PRSSTARTMODE_A::BOTH)
816 }
817}
818#[doc = "PRS Stop Mode\n\nValue on reset: 0"]
819#[derive(Clone, Copy, Debug, PartialEq)]
820#[repr(u8)]
821pub enum PRSSTOPMODE_A {
822 #[doc = "0: PRS cannot stop the LETIMER"]
823 NONE = 0,
824 #[doc = "1: Rising edge of selected PRS input can stop the LETIMER"]
825 RISING = 1,
826 #[doc = "2: Falling edge of selected PRS input can stop the LETIMER"]
827 FALLING = 2,
828 #[doc = "3: Both the rising or falling edge of the selected PRS input can stop the LETIMER"]
829 BOTH = 3,
830}
831impl From<PRSSTOPMODE_A> for u8 {
832 #[inline(always)]
833 fn from(variant: PRSSTOPMODE_A) -> Self {
834 variant as _
835 }
836}
837#[doc = "Field `PRSSTOPMODE` reader - PRS Stop Mode"]
838pub type PRSSTOPMODE_R = crate::FieldReader<u8, PRSSTOPMODE_A>;
839impl PRSSTOPMODE_R {
840 #[doc = "Get enumerated values variant"]
841 #[inline(always)]
842 pub fn variant(&self) -> PRSSTOPMODE_A {
843 match self.bits {
844 0 => PRSSTOPMODE_A::NONE,
845 1 => PRSSTOPMODE_A::RISING,
846 2 => PRSSTOPMODE_A::FALLING,
847 3 => PRSSTOPMODE_A::BOTH,
848 _ => unreachable!(),
849 }
850 }
851 #[doc = "Checks if the value of the field is `NONE`"]
852 #[inline(always)]
853 pub fn is_none(&self) -> bool {
854 *self == PRSSTOPMODE_A::NONE
855 }
856 #[doc = "Checks if the value of the field is `RISING`"]
857 #[inline(always)]
858 pub fn is_rising(&self) -> bool {
859 *self == PRSSTOPMODE_A::RISING
860 }
861 #[doc = "Checks if the value of the field is `FALLING`"]
862 #[inline(always)]
863 pub fn is_falling(&self) -> bool {
864 *self == PRSSTOPMODE_A::FALLING
865 }
866 #[doc = "Checks if the value of the field is `BOTH`"]
867 #[inline(always)]
868 pub fn is_both(&self) -> bool {
869 *self == PRSSTOPMODE_A::BOTH
870 }
871}
872#[doc = "Field `PRSSTOPMODE` writer - PRS Stop Mode"]
873pub type PRSSTOPMODE_W<'a> = crate::FieldWriterSafe<'a, u32, PRSSEL_SPEC, u8, PRSSTOPMODE_A, 2, 22>;
874impl<'a> PRSSTOPMODE_W<'a> {
875 #[doc = "PRS cannot stop the LETIMER"]
876 #[inline(always)]
877 pub fn none(self) -> &'a mut W {
878 self.variant(PRSSTOPMODE_A::NONE)
879 }
880 #[doc = "Rising edge of selected PRS input can stop the LETIMER"]
881 #[inline(always)]
882 pub fn rising(self) -> &'a mut W {
883 self.variant(PRSSTOPMODE_A::RISING)
884 }
885 #[doc = "Falling edge of selected PRS input can stop the LETIMER"]
886 #[inline(always)]
887 pub fn falling(self) -> &'a mut W {
888 self.variant(PRSSTOPMODE_A::FALLING)
889 }
890 #[doc = "Both the rising or falling edge of the selected PRS input can stop the LETIMER"]
891 #[inline(always)]
892 pub fn both(self) -> &'a mut W {
893 self.variant(PRSSTOPMODE_A::BOTH)
894 }
895}
896#[doc = "PRS Clear Mode\n\nValue on reset: 0"]
897#[derive(Clone, Copy, Debug, PartialEq)]
898#[repr(u8)]
899pub enum PRSCLEARMODE_A {
900 #[doc = "0: PRS cannot clear the LETIMER"]
901 NONE = 0,
902 #[doc = "1: Rising edge of selected PRS input can clear the LETIMER"]
903 RISING = 1,
904 #[doc = "2: Falling edge of selected PRS input can clear the LETIMER"]
905 FALLING = 2,
906 #[doc = "3: Both the rising or falling edge of the selected PRS input can clear the LETIMER"]
907 BOTH = 3,
908}
909impl From<PRSCLEARMODE_A> for u8 {
910 #[inline(always)]
911 fn from(variant: PRSCLEARMODE_A) -> Self {
912 variant as _
913 }
914}
915#[doc = "Field `PRSCLEARMODE` reader - PRS Clear Mode"]
916pub type PRSCLEARMODE_R = crate::FieldReader<u8, PRSCLEARMODE_A>;
917impl PRSCLEARMODE_R {
918 #[doc = "Get enumerated values variant"]
919 #[inline(always)]
920 pub fn variant(&self) -> PRSCLEARMODE_A {
921 match self.bits {
922 0 => PRSCLEARMODE_A::NONE,
923 1 => PRSCLEARMODE_A::RISING,
924 2 => PRSCLEARMODE_A::FALLING,
925 3 => PRSCLEARMODE_A::BOTH,
926 _ => unreachable!(),
927 }
928 }
929 #[doc = "Checks if the value of the field is `NONE`"]
930 #[inline(always)]
931 pub fn is_none(&self) -> bool {
932 *self == PRSCLEARMODE_A::NONE
933 }
934 #[doc = "Checks if the value of the field is `RISING`"]
935 #[inline(always)]
936 pub fn is_rising(&self) -> bool {
937 *self == PRSCLEARMODE_A::RISING
938 }
939 #[doc = "Checks if the value of the field is `FALLING`"]
940 #[inline(always)]
941 pub fn is_falling(&self) -> bool {
942 *self == PRSCLEARMODE_A::FALLING
943 }
944 #[doc = "Checks if the value of the field is `BOTH`"]
945 #[inline(always)]
946 pub fn is_both(&self) -> bool {
947 *self == PRSCLEARMODE_A::BOTH
948 }
949}
950#[doc = "Field `PRSCLEARMODE` writer - PRS Clear Mode"]
951pub type PRSCLEARMODE_W<'a> =
952 crate::FieldWriterSafe<'a, u32, PRSSEL_SPEC, u8, PRSCLEARMODE_A, 2, 26>;
953impl<'a> PRSCLEARMODE_W<'a> {
954 #[doc = "PRS cannot clear the LETIMER"]
955 #[inline(always)]
956 pub fn none(self) -> &'a mut W {
957 self.variant(PRSCLEARMODE_A::NONE)
958 }
959 #[doc = "Rising edge of selected PRS input can clear the LETIMER"]
960 #[inline(always)]
961 pub fn rising(self) -> &'a mut W {
962 self.variant(PRSCLEARMODE_A::RISING)
963 }
964 #[doc = "Falling edge of selected PRS input can clear the LETIMER"]
965 #[inline(always)]
966 pub fn falling(self) -> &'a mut W {
967 self.variant(PRSCLEARMODE_A::FALLING)
968 }
969 #[doc = "Both the rising or falling edge of the selected PRS input can clear the LETIMER"]
970 #[inline(always)]
971 pub fn both(self) -> &'a mut W {
972 self.variant(PRSCLEARMODE_A::BOTH)
973 }
974}
975impl R {
976 #[doc = "Bits 0:3 - PRS Start Select"]
977 #[inline(always)]
978 pub fn prsstartsel(&self) -> PRSSTARTSEL_R {
979 PRSSTARTSEL_R::new((self.bits & 0x0f) as u8)
980 }
981 #[doc = "Bits 6:9 - PRS Stop Select"]
982 #[inline(always)]
983 pub fn prsstopsel(&self) -> PRSSTOPSEL_R {
984 PRSSTOPSEL_R::new(((self.bits >> 6) & 0x0f) as u8)
985 }
986 #[doc = "Bits 12:15 - PRS Clear Select"]
987 #[inline(always)]
988 pub fn prsclearsel(&self) -> PRSCLEARSEL_R {
989 PRSCLEARSEL_R::new(((self.bits >> 12) & 0x0f) as u8)
990 }
991 #[doc = "Bits 18:19 - PRS Start Mode"]
992 #[inline(always)]
993 pub fn prsstartmode(&self) -> PRSSTARTMODE_R {
994 PRSSTARTMODE_R::new(((self.bits >> 18) & 3) as u8)
995 }
996 #[doc = "Bits 22:23 - PRS Stop Mode"]
997 #[inline(always)]
998 pub fn prsstopmode(&self) -> PRSSTOPMODE_R {
999 PRSSTOPMODE_R::new(((self.bits >> 22) & 3) as u8)
1000 }
1001 #[doc = "Bits 26:27 - PRS Clear Mode"]
1002 #[inline(always)]
1003 pub fn prsclearmode(&self) -> PRSCLEARMODE_R {
1004 PRSCLEARMODE_R::new(((self.bits >> 26) & 3) as u8)
1005 }
1006}
1007impl W {
1008 #[doc = "Bits 0:3 - PRS Start Select"]
1009 #[inline(always)]
1010 pub fn prsstartsel(&mut self) -> PRSSTARTSEL_W {
1011 PRSSTARTSEL_W::new(self)
1012 }
1013 #[doc = "Bits 6:9 - PRS Stop Select"]
1014 #[inline(always)]
1015 pub fn prsstopsel(&mut self) -> PRSSTOPSEL_W {
1016 PRSSTOPSEL_W::new(self)
1017 }
1018 #[doc = "Bits 12:15 - PRS Clear Select"]
1019 #[inline(always)]
1020 pub fn prsclearsel(&mut self) -> PRSCLEARSEL_W {
1021 PRSCLEARSEL_W::new(self)
1022 }
1023 #[doc = "Bits 18:19 - PRS Start Mode"]
1024 #[inline(always)]
1025 pub fn prsstartmode(&mut self) -> PRSSTARTMODE_W {
1026 PRSSTARTMODE_W::new(self)
1027 }
1028 #[doc = "Bits 22:23 - PRS Stop Mode"]
1029 #[inline(always)]
1030 pub fn prsstopmode(&mut self) -> PRSSTOPMODE_W {
1031 PRSSTOPMODE_W::new(self)
1032 }
1033 #[doc = "Bits 26:27 - PRS Clear Mode"]
1034 #[inline(always)]
1035 pub fn prsclearmode(&mut self) -> PRSCLEARMODE_W {
1036 PRSCLEARMODE_W::new(self)
1037 }
1038 #[doc = "Writes raw bits to the register."]
1039 #[inline(always)]
1040 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1041 self.0.bits(bits);
1042 self
1043 }
1044}
1045#[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"]
1046pub struct PRSSEL_SPEC;
1047impl crate::RegisterSpec for PRSSEL_SPEC {
1048 type Ux = u32;
1049}
1050#[doc = "`read()` method returns [prssel::R](R) reader structure"]
1051impl crate::Readable for PRSSEL_SPEC {
1052 type Reader = R;
1053}
1054#[doc = "`write(|w| ..)` method takes [prssel::W](W) writer structure"]
1055impl crate::Writable for PRSSEL_SPEC {
1056 type Writer = W;
1057}
1058#[doc = "`reset()` method sets PRSSEL to value 0"]
1059impl crate::Resettable for PRSSEL_SPEC {
1060 #[inline(always)]
1061 fn reset_value() -> Self::Ux {
1062 0
1063 }
1064}