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