efm32jg12b_pac/efm32jg12b500/letimer0/
prssel.rs

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