efm32gg11b510_pac/uart1/
input.rs

1#[doc = "Register `INPUT` reader"]
2pub struct R(crate::R<INPUT_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<INPUT_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<INPUT_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<INPUT_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `INPUT` writer"]
17pub struct W(crate::W<INPUT_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<INPUT_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<INPUT_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<INPUT_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "RX PRS Channel Select\n\nValue on reset: 0"]
38#[derive(Clone, Copy, Debug, PartialEq)]
39#[repr(u8)]
40pub enum RXPRSSEL_A {
41    #[doc = "0: PRS Channel 0 selected"]
42    PRSCH0 = 0,
43    #[doc = "1: PRS Channel 1 selected"]
44    PRSCH1 = 1,
45    #[doc = "2: PRS Channel 2 selected"]
46    PRSCH2 = 2,
47    #[doc = "3: PRS Channel 3 selected"]
48    PRSCH3 = 3,
49    #[doc = "4: PRS Channel 4 selected"]
50    PRSCH4 = 4,
51    #[doc = "5: PRS Channel 5 selected"]
52    PRSCH5 = 5,
53    #[doc = "6: PRS Channel 6 selected"]
54    PRSCH6 = 6,
55    #[doc = "7: PRS Channel 7 selected"]
56    PRSCH7 = 7,
57    #[doc = "8: PRS Channel 8 selected"]
58    PRSCH8 = 8,
59    #[doc = "9: PRS Channel 9 selected"]
60    PRSCH9 = 9,
61    #[doc = "10: PRS Channel 10 selected"]
62    PRSCH10 = 10,
63    #[doc = "11: PRS Channel 11 selected"]
64    PRSCH11 = 11,
65    #[doc = "12: PRS Channel 12 selected"]
66    PRSCH12 = 12,
67    #[doc = "13: PRS Channel 13 selected"]
68    PRSCH13 = 13,
69    #[doc = "14: PRS Channel 14 selected"]
70    PRSCH14 = 14,
71    #[doc = "15: PRS Channel 15 selected"]
72    PRSCH15 = 15,
73    #[doc = "16: PRS Channel 16 selected"]
74    PRSCH16 = 16,
75    #[doc = "17: PRS Channel 17 selected"]
76    PRSCH17 = 17,
77    #[doc = "18: PRS Channel 18 selected"]
78    PRSCH18 = 18,
79    #[doc = "19: PRS Channel 19 selected"]
80    PRSCH19 = 19,
81    #[doc = "20: PRS Channel 20 selected"]
82    PRSCH20 = 20,
83    #[doc = "21: PRS Channel 21 selected"]
84    PRSCH21 = 21,
85    #[doc = "22: PRS Channel 22 selected"]
86    PRSCH22 = 22,
87    #[doc = "23: PRS Channel 23 selected"]
88    PRSCH23 = 23,
89}
90impl From<RXPRSSEL_A> for u8 {
91    #[inline(always)]
92    fn from(variant: RXPRSSEL_A) -> Self {
93        variant as _
94    }
95}
96#[doc = "Field `RXPRSSEL` reader - RX PRS Channel Select"]
97pub type RXPRSSEL_R = crate::FieldReader<u8, RXPRSSEL_A>;
98impl RXPRSSEL_R {
99    #[doc = "Get enumerated values variant"]
100    #[inline(always)]
101    pub fn variant(&self) -> Option<RXPRSSEL_A> {
102        match self.bits {
103            0 => Some(RXPRSSEL_A::PRSCH0),
104            1 => Some(RXPRSSEL_A::PRSCH1),
105            2 => Some(RXPRSSEL_A::PRSCH2),
106            3 => Some(RXPRSSEL_A::PRSCH3),
107            4 => Some(RXPRSSEL_A::PRSCH4),
108            5 => Some(RXPRSSEL_A::PRSCH5),
109            6 => Some(RXPRSSEL_A::PRSCH6),
110            7 => Some(RXPRSSEL_A::PRSCH7),
111            8 => Some(RXPRSSEL_A::PRSCH8),
112            9 => Some(RXPRSSEL_A::PRSCH9),
113            10 => Some(RXPRSSEL_A::PRSCH10),
114            11 => Some(RXPRSSEL_A::PRSCH11),
115            12 => Some(RXPRSSEL_A::PRSCH12),
116            13 => Some(RXPRSSEL_A::PRSCH13),
117            14 => Some(RXPRSSEL_A::PRSCH14),
118            15 => Some(RXPRSSEL_A::PRSCH15),
119            16 => Some(RXPRSSEL_A::PRSCH16),
120            17 => Some(RXPRSSEL_A::PRSCH17),
121            18 => Some(RXPRSSEL_A::PRSCH18),
122            19 => Some(RXPRSSEL_A::PRSCH19),
123            20 => Some(RXPRSSEL_A::PRSCH20),
124            21 => Some(RXPRSSEL_A::PRSCH21),
125            22 => Some(RXPRSSEL_A::PRSCH22),
126            23 => Some(RXPRSSEL_A::PRSCH23),
127            _ => None,
128        }
129    }
130    #[doc = "Checks if the value of the field is `PRSCH0`"]
131    #[inline(always)]
132    pub fn is_prsch0(&self) -> bool {
133        *self == RXPRSSEL_A::PRSCH0
134    }
135    #[doc = "Checks if the value of the field is `PRSCH1`"]
136    #[inline(always)]
137    pub fn is_prsch1(&self) -> bool {
138        *self == RXPRSSEL_A::PRSCH1
139    }
140    #[doc = "Checks if the value of the field is `PRSCH2`"]
141    #[inline(always)]
142    pub fn is_prsch2(&self) -> bool {
143        *self == RXPRSSEL_A::PRSCH2
144    }
145    #[doc = "Checks if the value of the field is `PRSCH3`"]
146    #[inline(always)]
147    pub fn is_prsch3(&self) -> bool {
148        *self == RXPRSSEL_A::PRSCH3
149    }
150    #[doc = "Checks if the value of the field is `PRSCH4`"]
151    #[inline(always)]
152    pub fn is_prsch4(&self) -> bool {
153        *self == RXPRSSEL_A::PRSCH4
154    }
155    #[doc = "Checks if the value of the field is `PRSCH5`"]
156    #[inline(always)]
157    pub fn is_prsch5(&self) -> bool {
158        *self == RXPRSSEL_A::PRSCH5
159    }
160    #[doc = "Checks if the value of the field is `PRSCH6`"]
161    #[inline(always)]
162    pub fn is_prsch6(&self) -> bool {
163        *self == RXPRSSEL_A::PRSCH6
164    }
165    #[doc = "Checks if the value of the field is `PRSCH7`"]
166    #[inline(always)]
167    pub fn is_prsch7(&self) -> bool {
168        *self == RXPRSSEL_A::PRSCH7
169    }
170    #[doc = "Checks if the value of the field is `PRSCH8`"]
171    #[inline(always)]
172    pub fn is_prsch8(&self) -> bool {
173        *self == RXPRSSEL_A::PRSCH8
174    }
175    #[doc = "Checks if the value of the field is `PRSCH9`"]
176    #[inline(always)]
177    pub fn is_prsch9(&self) -> bool {
178        *self == RXPRSSEL_A::PRSCH9
179    }
180    #[doc = "Checks if the value of the field is `PRSCH10`"]
181    #[inline(always)]
182    pub fn is_prsch10(&self) -> bool {
183        *self == RXPRSSEL_A::PRSCH10
184    }
185    #[doc = "Checks if the value of the field is `PRSCH11`"]
186    #[inline(always)]
187    pub fn is_prsch11(&self) -> bool {
188        *self == RXPRSSEL_A::PRSCH11
189    }
190    #[doc = "Checks if the value of the field is `PRSCH12`"]
191    #[inline(always)]
192    pub fn is_prsch12(&self) -> bool {
193        *self == RXPRSSEL_A::PRSCH12
194    }
195    #[doc = "Checks if the value of the field is `PRSCH13`"]
196    #[inline(always)]
197    pub fn is_prsch13(&self) -> bool {
198        *self == RXPRSSEL_A::PRSCH13
199    }
200    #[doc = "Checks if the value of the field is `PRSCH14`"]
201    #[inline(always)]
202    pub fn is_prsch14(&self) -> bool {
203        *self == RXPRSSEL_A::PRSCH14
204    }
205    #[doc = "Checks if the value of the field is `PRSCH15`"]
206    #[inline(always)]
207    pub fn is_prsch15(&self) -> bool {
208        *self == RXPRSSEL_A::PRSCH15
209    }
210    #[doc = "Checks if the value of the field is `PRSCH16`"]
211    #[inline(always)]
212    pub fn is_prsch16(&self) -> bool {
213        *self == RXPRSSEL_A::PRSCH16
214    }
215    #[doc = "Checks if the value of the field is `PRSCH17`"]
216    #[inline(always)]
217    pub fn is_prsch17(&self) -> bool {
218        *self == RXPRSSEL_A::PRSCH17
219    }
220    #[doc = "Checks if the value of the field is `PRSCH18`"]
221    #[inline(always)]
222    pub fn is_prsch18(&self) -> bool {
223        *self == RXPRSSEL_A::PRSCH18
224    }
225    #[doc = "Checks if the value of the field is `PRSCH19`"]
226    #[inline(always)]
227    pub fn is_prsch19(&self) -> bool {
228        *self == RXPRSSEL_A::PRSCH19
229    }
230    #[doc = "Checks if the value of the field is `PRSCH20`"]
231    #[inline(always)]
232    pub fn is_prsch20(&self) -> bool {
233        *self == RXPRSSEL_A::PRSCH20
234    }
235    #[doc = "Checks if the value of the field is `PRSCH21`"]
236    #[inline(always)]
237    pub fn is_prsch21(&self) -> bool {
238        *self == RXPRSSEL_A::PRSCH21
239    }
240    #[doc = "Checks if the value of the field is `PRSCH22`"]
241    #[inline(always)]
242    pub fn is_prsch22(&self) -> bool {
243        *self == RXPRSSEL_A::PRSCH22
244    }
245    #[doc = "Checks if the value of the field is `PRSCH23`"]
246    #[inline(always)]
247    pub fn is_prsch23(&self) -> bool {
248        *self == RXPRSSEL_A::PRSCH23
249    }
250}
251#[doc = "Field `RXPRSSEL` writer - RX PRS Channel Select"]
252pub type RXPRSSEL_W<'a> = crate::FieldWriter<'a, u32, INPUT_SPEC, u8, RXPRSSEL_A, 5, 0>;
253impl<'a> RXPRSSEL_W<'a> {
254    #[doc = "PRS Channel 0 selected"]
255    #[inline(always)]
256    pub fn prsch0(self) -> &'a mut W {
257        self.variant(RXPRSSEL_A::PRSCH0)
258    }
259    #[doc = "PRS Channel 1 selected"]
260    #[inline(always)]
261    pub fn prsch1(self) -> &'a mut W {
262        self.variant(RXPRSSEL_A::PRSCH1)
263    }
264    #[doc = "PRS Channel 2 selected"]
265    #[inline(always)]
266    pub fn prsch2(self) -> &'a mut W {
267        self.variant(RXPRSSEL_A::PRSCH2)
268    }
269    #[doc = "PRS Channel 3 selected"]
270    #[inline(always)]
271    pub fn prsch3(self) -> &'a mut W {
272        self.variant(RXPRSSEL_A::PRSCH3)
273    }
274    #[doc = "PRS Channel 4 selected"]
275    #[inline(always)]
276    pub fn prsch4(self) -> &'a mut W {
277        self.variant(RXPRSSEL_A::PRSCH4)
278    }
279    #[doc = "PRS Channel 5 selected"]
280    #[inline(always)]
281    pub fn prsch5(self) -> &'a mut W {
282        self.variant(RXPRSSEL_A::PRSCH5)
283    }
284    #[doc = "PRS Channel 6 selected"]
285    #[inline(always)]
286    pub fn prsch6(self) -> &'a mut W {
287        self.variant(RXPRSSEL_A::PRSCH6)
288    }
289    #[doc = "PRS Channel 7 selected"]
290    #[inline(always)]
291    pub fn prsch7(self) -> &'a mut W {
292        self.variant(RXPRSSEL_A::PRSCH7)
293    }
294    #[doc = "PRS Channel 8 selected"]
295    #[inline(always)]
296    pub fn prsch8(self) -> &'a mut W {
297        self.variant(RXPRSSEL_A::PRSCH8)
298    }
299    #[doc = "PRS Channel 9 selected"]
300    #[inline(always)]
301    pub fn prsch9(self) -> &'a mut W {
302        self.variant(RXPRSSEL_A::PRSCH9)
303    }
304    #[doc = "PRS Channel 10 selected"]
305    #[inline(always)]
306    pub fn prsch10(self) -> &'a mut W {
307        self.variant(RXPRSSEL_A::PRSCH10)
308    }
309    #[doc = "PRS Channel 11 selected"]
310    #[inline(always)]
311    pub fn prsch11(self) -> &'a mut W {
312        self.variant(RXPRSSEL_A::PRSCH11)
313    }
314    #[doc = "PRS Channel 12 selected"]
315    #[inline(always)]
316    pub fn prsch12(self) -> &'a mut W {
317        self.variant(RXPRSSEL_A::PRSCH12)
318    }
319    #[doc = "PRS Channel 13 selected"]
320    #[inline(always)]
321    pub fn prsch13(self) -> &'a mut W {
322        self.variant(RXPRSSEL_A::PRSCH13)
323    }
324    #[doc = "PRS Channel 14 selected"]
325    #[inline(always)]
326    pub fn prsch14(self) -> &'a mut W {
327        self.variant(RXPRSSEL_A::PRSCH14)
328    }
329    #[doc = "PRS Channel 15 selected"]
330    #[inline(always)]
331    pub fn prsch15(self) -> &'a mut W {
332        self.variant(RXPRSSEL_A::PRSCH15)
333    }
334    #[doc = "PRS Channel 16 selected"]
335    #[inline(always)]
336    pub fn prsch16(self) -> &'a mut W {
337        self.variant(RXPRSSEL_A::PRSCH16)
338    }
339    #[doc = "PRS Channel 17 selected"]
340    #[inline(always)]
341    pub fn prsch17(self) -> &'a mut W {
342        self.variant(RXPRSSEL_A::PRSCH17)
343    }
344    #[doc = "PRS Channel 18 selected"]
345    #[inline(always)]
346    pub fn prsch18(self) -> &'a mut W {
347        self.variant(RXPRSSEL_A::PRSCH18)
348    }
349    #[doc = "PRS Channel 19 selected"]
350    #[inline(always)]
351    pub fn prsch19(self) -> &'a mut W {
352        self.variant(RXPRSSEL_A::PRSCH19)
353    }
354    #[doc = "PRS Channel 20 selected"]
355    #[inline(always)]
356    pub fn prsch20(self) -> &'a mut W {
357        self.variant(RXPRSSEL_A::PRSCH20)
358    }
359    #[doc = "PRS Channel 21 selected"]
360    #[inline(always)]
361    pub fn prsch21(self) -> &'a mut W {
362        self.variant(RXPRSSEL_A::PRSCH21)
363    }
364    #[doc = "PRS Channel 22 selected"]
365    #[inline(always)]
366    pub fn prsch22(self) -> &'a mut W {
367        self.variant(RXPRSSEL_A::PRSCH22)
368    }
369    #[doc = "PRS Channel 23 selected"]
370    #[inline(always)]
371    pub fn prsch23(self) -> &'a mut W {
372        self.variant(RXPRSSEL_A::PRSCH23)
373    }
374}
375#[doc = "Field `RXPRS` reader - PRS RX Enable"]
376pub type RXPRS_R = crate::BitReader<bool>;
377#[doc = "Field `RXPRS` writer - PRS RX Enable"]
378pub type RXPRS_W<'a> = crate::BitWriter<'a, u32, INPUT_SPEC, bool, 7>;
379#[doc = "CLK PRS Channel Select\n\nValue on reset: 0"]
380#[derive(Clone, Copy, Debug, PartialEq)]
381#[repr(u8)]
382pub enum CLKPRSSEL_A {
383    #[doc = "0: PRS Channel 0 selected"]
384    PRSCH0 = 0,
385    #[doc = "1: PRS Channel 1 selected"]
386    PRSCH1 = 1,
387    #[doc = "2: PRS Channel 2 selected"]
388    PRSCH2 = 2,
389    #[doc = "3: PRS Channel 3 selected"]
390    PRSCH3 = 3,
391    #[doc = "4: PRS Channel 4 selected"]
392    PRSCH4 = 4,
393    #[doc = "5: PRS Channel 5 selected"]
394    PRSCH5 = 5,
395    #[doc = "6: PRS Channel 6 selected"]
396    PRSCH6 = 6,
397    #[doc = "7: PRS Channel 7 selected"]
398    PRSCH7 = 7,
399    #[doc = "8: PRS Channel 8 selected"]
400    PRSCH8 = 8,
401    #[doc = "9: PRS Channel 9 selected"]
402    PRSCH9 = 9,
403    #[doc = "10: PRS Channel 10 selected"]
404    PRSCH10 = 10,
405    #[doc = "11: PRS Channel 11 selected"]
406    PRSCH11 = 11,
407    #[doc = "12: PRS Channel 12 selected"]
408    PRSCH12 = 12,
409    #[doc = "13: PRS Channel 13 selected"]
410    PRSCH13 = 13,
411    #[doc = "14: PRS Channel 14 selected"]
412    PRSCH14 = 14,
413    #[doc = "15: PRS Channel 15 selected"]
414    PRSCH15 = 15,
415    #[doc = "16: PRS Channel 16 selected"]
416    PRSCH16 = 16,
417    #[doc = "17: PRS Channel 17 selected"]
418    PRSCH17 = 17,
419    #[doc = "18: PRS Channel 18 selected"]
420    PRSCH18 = 18,
421    #[doc = "19: PRS Channel 19 selected"]
422    PRSCH19 = 19,
423    #[doc = "20: PRS Channel 20 selected"]
424    PRSCH20 = 20,
425    #[doc = "21: PRS Channel 21 selected"]
426    PRSCH21 = 21,
427    #[doc = "22: PRS Channel 22 selected"]
428    PRSCH22 = 22,
429    #[doc = "23: PRS Channel 23 selected"]
430    PRSCH23 = 23,
431}
432impl From<CLKPRSSEL_A> for u8 {
433    #[inline(always)]
434    fn from(variant: CLKPRSSEL_A) -> Self {
435        variant as _
436    }
437}
438#[doc = "Field `CLKPRSSEL` reader - CLK PRS Channel Select"]
439pub type CLKPRSSEL_R = crate::FieldReader<u8, CLKPRSSEL_A>;
440impl CLKPRSSEL_R {
441    #[doc = "Get enumerated values variant"]
442    #[inline(always)]
443    pub fn variant(&self) -> Option<CLKPRSSEL_A> {
444        match self.bits {
445            0 => Some(CLKPRSSEL_A::PRSCH0),
446            1 => Some(CLKPRSSEL_A::PRSCH1),
447            2 => Some(CLKPRSSEL_A::PRSCH2),
448            3 => Some(CLKPRSSEL_A::PRSCH3),
449            4 => Some(CLKPRSSEL_A::PRSCH4),
450            5 => Some(CLKPRSSEL_A::PRSCH5),
451            6 => Some(CLKPRSSEL_A::PRSCH6),
452            7 => Some(CLKPRSSEL_A::PRSCH7),
453            8 => Some(CLKPRSSEL_A::PRSCH8),
454            9 => Some(CLKPRSSEL_A::PRSCH9),
455            10 => Some(CLKPRSSEL_A::PRSCH10),
456            11 => Some(CLKPRSSEL_A::PRSCH11),
457            12 => Some(CLKPRSSEL_A::PRSCH12),
458            13 => Some(CLKPRSSEL_A::PRSCH13),
459            14 => Some(CLKPRSSEL_A::PRSCH14),
460            15 => Some(CLKPRSSEL_A::PRSCH15),
461            16 => Some(CLKPRSSEL_A::PRSCH16),
462            17 => Some(CLKPRSSEL_A::PRSCH17),
463            18 => Some(CLKPRSSEL_A::PRSCH18),
464            19 => Some(CLKPRSSEL_A::PRSCH19),
465            20 => Some(CLKPRSSEL_A::PRSCH20),
466            21 => Some(CLKPRSSEL_A::PRSCH21),
467            22 => Some(CLKPRSSEL_A::PRSCH22),
468            23 => Some(CLKPRSSEL_A::PRSCH23),
469            _ => None,
470        }
471    }
472    #[doc = "Checks if the value of the field is `PRSCH0`"]
473    #[inline(always)]
474    pub fn is_prsch0(&self) -> bool {
475        *self == CLKPRSSEL_A::PRSCH0
476    }
477    #[doc = "Checks if the value of the field is `PRSCH1`"]
478    #[inline(always)]
479    pub fn is_prsch1(&self) -> bool {
480        *self == CLKPRSSEL_A::PRSCH1
481    }
482    #[doc = "Checks if the value of the field is `PRSCH2`"]
483    #[inline(always)]
484    pub fn is_prsch2(&self) -> bool {
485        *self == CLKPRSSEL_A::PRSCH2
486    }
487    #[doc = "Checks if the value of the field is `PRSCH3`"]
488    #[inline(always)]
489    pub fn is_prsch3(&self) -> bool {
490        *self == CLKPRSSEL_A::PRSCH3
491    }
492    #[doc = "Checks if the value of the field is `PRSCH4`"]
493    #[inline(always)]
494    pub fn is_prsch4(&self) -> bool {
495        *self == CLKPRSSEL_A::PRSCH4
496    }
497    #[doc = "Checks if the value of the field is `PRSCH5`"]
498    #[inline(always)]
499    pub fn is_prsch5(&self) -> bool {
500        *self == CLKPRSSEL_A::PRSCH5
501    }
502    #[doc = "Checks if the value of the field is `PRSCH6`"]
503    #[inline(always)]
504    pub fn is_prsch6(&self) -> bool {
505        *self == CLKPRSSEL_A::PRSCH6
506    }
507    #[doc = "Checks if the value of the field is `PRSCH7`"]
508    #[inline(always)]
509    pub fn is_prsch7(&self) -> bool {
510        *self == CLKPRSSEL_A::PRSCH7
511    }
512    #[doc = "Checks if the value of the field is `PRSCH8`"]
513    #[inline(always)]
514    pub fn is_prsch8(&self) -> bool {
515        *self == CLKPRSSEL_A::PRSCH8
516    }
517    #[doc = "Checks if the value of the field is `PRSCH9`"]
518    #[inline(always)]
519    pub fn is_prsch9(&self) -> bool {
520        *self == CLKPRSSEL_A::PRSCH9
521    }
522    #[doc = "Checks if the value of the field is `PRSCH10`"]
523    #[inline(always)]
524    pub fn is_prsch10(&self) -> bool {
525        *self == CLKPRSSEL_A::PRSCH10
526    }
527    #[doc = "Checks if the value of the field is `PRSCH11`"]
528    #[inline(always)]
529    pub fn is_prsch11(&self) -> bool {
530        *self == CLKPRSSEL_A::PRSCH11
531    }
532    #[doc = "Checks if the value of the field is `PRSCH12`"]
533    #[inline(always)]
534    pub fn is_prsch12(&self) -> bool {
535        *self == CLKPRSSEL_A::PRSCH12
536    }
537    #[doc = "Checks if the value of the field is `PRSCH13`"]
538    #[inline(always)]
539    pub fn is_prsch13(&self) -> bool {
540        *self == CLKPRSSEL_A::PRSCH13
541    }
542    #[doc = "Checks if the value of the field is `PRSCH14`"]
543    #[inline(always)]
544    pub fn is_prsch14(&self) -> bool {
545        *self == CLKPRSSEL_A::PRSCH14
546    }
547    #[doc = "Checks if the value of the field is `PRSCH15`"]
548    #[inline(always)]
549    pub fn is_prsch15(&self) -> bool {
550        *self == CLKPRSSEL_A::PRSCH15
551    }
552    #[doc = "Checks if the value of the field is `PRSCH16`"]
553    #[inline(always)]
554    pub fn is_prsch16(&self) -> bool {
555        *self == CLKPRSSEL_A::PRSCH16
556    }
557    #[doc = "Checks if the value of the field is `PRSCH17`"]
558    #[inline(always)]
559    pub fn is_prsch17(&self) -> bool {
560        *self == CLKPRSSEL_A::PRSCH17
561    }
562    #[doc = "Checks if the value of the field is `PRSCH18`"]
563    #[inline(always)]
564    pub fn is_prsch18(&self) -> bool {
565        *self == CLKPRSSEL_A::PRSCH18
566    }
567    #[doc = "Checks if the value of the field is `PRSCH19`"]
568    #[inline(always)]
569    pub fn is_prsch19(&self) -> bool {
570        *self == CLKPRSSEL_A::PRSCH19
571    }
572    #[doc = "Checks if the value of the field is `PRSCH20`"]
573    #[inline(always)]
574    pub fn is_prsch20(&self) -> bool {
575        *self == CLKPRSSEL_A::PRSCH20
576    }
577    #[doc = "Checks if the value of the field is `PRSCH21`"]
578    #[inline(always)]
579    pub fn is_prsch21(&self) -> bool {
580        *self == CLKPRSSEL_A::PRSCH21
581    }
582    #[doc = "Checks if the value of the field is `PRSCH22`"]
583    #[inline(always)]
584    pub fn is_prsch22(&self) -> bool {
585        *self == CLKPRSSEL_A::PRSCH22
586    }
587    #[doc = "Checks if the value of the field is `PRSCH23`"]
588    #[inline(always)]
589    pub fn is_prsch23(&self) -> bool {
590        *self == CLKPRSSEL_A::PRSCH23
591    }
592}
593#[doc = "Field `CLKPRSSEL` writer - CLK PRS Channel Select"]
594pub type CLKPRSSEL_W<'a> = crate::FieldWriter<'a, u32, INPUT_SPEC, u8, CLKPRSSEL_A, 5, 8>;
595impl<'a> CLKPRSSEL_W<'a> {
596    #[doc = "PRS Channel 0 selected"]
597    #[inline(always)]
598    pub fn prsch0(self) -> &'a mut W {
599        self.variant(CLKPRSSEL_A::PRSCH0)
600    }
601    #[doc = "PRS Channel 1 selected"]
602    #[inline(always)]
603    pub fn prsch1(self) -> &'a mut W {
604        self.variant(CLKPRSSEL_A::PRSCH1)
605    }
606    #[doc = "PRS Channel 2 selected"]
607    #[inline(always)]
608    pub fn prsch2(self) -> &'a mut W {
609        self.variant(CLKPRSSEL_A::PRSCH2)
610    }
611    #[doc = "PRS Channel 3 selected"]
612    #[inline(always)]
613    pub fn prsch3(self) -> &'a mut W {
614        self.variant(CLKPRSSEL_A::PRSCH3)
615    }
616    #[doc = "PRS Channel 4 selected"]
617    #[inline(always)]
618    pub fn prsch4(self) -> &'a mut W {
619        self.variant(CLKPRSSEL_A::PRSCH4)
620    }
621    #[doc = "PRS Channel 5 selected"]
622    #[inline(always)]
623    pub fn prsch5(self) -> &'a mut W {
624        self.variant(CLKPRSSEL_A::PRSCH5)
625    }
626    #[doc = "PRS Channel 6 selected"]
627    #[inline(always)]
628    pub fn prsch6(self) -> &'a mut W {
629        self.variant(CLKPRSSEL_A::PRSCH6)
630    }
631    #[doc = "PRS Channel 7 selected"]
632    #[inline(always)]
633    pub fn prsch7(self) -> &'a mut W {
634        self.variant(CLKPRSSEL_A::PRSCH7)
635    }
636    #[doc = "PRS Channel 8 selected"]
637    #[inline(always)]
638    pub fn prsch8(self) -> &'a mut W {
639        self.variant(CLKPRSSEL_A::PRSCH8)
640    }
641    #[doc = "PRS Channel 9 selected"]
642    #[inline(always)]
643    pub fn prsch9(self) -> &'a mut W {
644        self.variant(CLKPRSSEL_A::PRSCH9)
645    }
646    #[doc = "PRS Channel 10 selected"]
647    #[inline(always)]
648    pub fn prsch10(self) -> &'a mut W {
649        self.variant(CLKPRSSEL_A::PRSCH10)
650    }
651    #[doc = "PRS Channel 11 selected"]
652    #[inline(always)]
653    pub fn prsch11(self) -> &'a mut W {
654        self.variant(CLKPRSSEL_A::PRSCH11)
655    }
656    #[doc = "PRS Channel 12 selected"]
657    #[inline(always)]
658    pub fn prsch12(self) -> &'a mut W {
659        self.variant(CLKPRSSEL_A::PRSCH12)
660    }
661    #[doc = "PRS Channel 13 selected"]
662    #[inline(always)]
663    pub fn prsch13(self) -> &'a mut W {
664        self.variant(CLKPRSSEL_A::PRSCH13)
665    }
666    #[doc = "PRS Channel 14 selected"]
667    #[inline(always)]
668    pub fn prsch14(self) -> &'a mut W {
669        self.variant(CLKPRSSEL_A::PRSCH14)
670    }
671    #[doc = "PRS Channel 15 selected"]
672    #[inline(always)]
673    pub fn prsch15(self) -> &'a mut W {
674        self.variant(CLKPRSSEL_A::PRSCH15)
675    }
676    #[doc = "PRS Channel 16 selected"]
677    #[inline(always)]
678    pub fn prsch16(self) -> &'a mut W {
679        self.variant(CLKPRSSEL_A::PRSCH16)
680    }
681    #[doc = "PRS Channel 17 selected"]
682    #[inline(always)]
683    pub fn prsch17(self) -> &'a mut W {
684        self.variant(CLKPRSSEL_A::PRSCH17)
685    }
686    #[doc = "PRS Channel 18 selected"]
687    #[inline(always)]
688    pub fn prsch18(self) -> &'a mut W {
689        self.variant(CLKPRSSEL_A::PRSCH18)
690    }
691    #[doc = "PRS Channel 19 selected"]
692    #[inline(always)]
693    pub fn prsch19(self) -> &'a mut W {
694        self.variant(CLKPRSSEL_A::PRSCH19)
695    }
696    #[doc = "PRS Channel 20 selected"]
697    #[inline(always)]
698    pub fn prsch20(self) -> &'a mut W {
699        self.variant(CLKPRSSEL_A::PRSCH20)
700    }
701    #[doc = "PRS Channel 21 selected"]
702    #[inline(always)]
703    pub fn prsch21(self) -> &'a mut W {
704        self.variant(CLKPRSSEL_A::PRSCH21)
705    }
706    #[doc = "PRS Channel 22 selected"]
707    #[inline(always)]
708    pub fn prsch22(self) -> &'a mut W {
709        self.variant(CLKPRSSEL_A::PRSCH22)
710    }
711    #[doc = "PRS Channel 23 selected"]
712    #[inline(always)]
713    pub fn prsch23(self) -> &'a mut W {
714        self.variant(CLKPRSSEL_A::PRSCH23)
715    }
716}
717#[doc = "Field `CLKPRS` reader - PRS CLK Enable"]
718pub type CLKPRS_R = crate::BitReader<bool>;
719#[doc = "Field `CLKPRS` writer - PRS CLK Enable"]
720pub type CLKPRS_W<'a> = crate::BitWriter<'a, u32, INPUT_SPEC, bool, 15>;
721impl R {
722    #[doc = "Bits 0:4 - RX PRS Channel Select"]
723    #[inline(always)]
724    pub fn rxprssel(&self) -> RXPRSSEL_R {
725        RXPRSSEL_R::new((self.bits & 0x1f) as u8)
726    }
727    #[doc = "Bit 7 - PRS RX Enable"]
728    #[inline(always)]
729    pub fn rxprs(&self) -> RXPRS_R {
730        RXPRS_R::new(((self.bits >> 7) & 1) != 0)
731    }
732    #[doc = "Bits 8:12 - CLK PRS Channel Select"]
733    #[inline(always)]
734    pub fn clkprssel(&self) -> CLKPRSSEL_R {
735        CLKPRSSEL_R::new(((self.bits >> 8) & 0x1f) as u8)
736    }
737    #[doc = "Bit 15 - PRS CLK Enable"]
738    #[inline(always)]
739    pub fn clkprs(&self) -> CLKPRS_R {
740        CLKPRS_R::new(((self.bits >> 15) & 1) != 0)
741    }
742}
743impl W {
744    #[doc = "Bits 0:4 - RX PRS Channel Select"]
745    #[inline(always)]
746    pub fn rxprssel(&mut self) -> RXPRSSEL_W {
747        RXPRSSEL_W::new(self)
748    }
749    #[doc = "Bit 7 - PRS RX Enable"]
750    #[inline(always)]
751    pub fn rxprs(&mut self) -> RXPRS_W {
752        RXPRS_W::new(self)
753    }
754    #[doc = "Bits 8:12 - CLK PRS Channel Select"]
755    #[inline(always)]
756    pub fn clkprssel(&mut self) -> CLKPRSSEL_W {
757        CLKPRSSEL_W::new(self)
758    }
759    #[doc = "Bit 15 - PRS CLK Enable"]
760    #[inline(always)]
761    pub fn clkprs(&mut self) -> CLKPRS_W {
762        CLKPRS_W::new(self)
763    }
764    #[doc = "Writes raw bits to the register."]
765    #[inline(always)]
766    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
767        self.0.bits(bits);
768        self
769    }
770}
771#[doc = "USART Input 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 [input](index.html) module"]
772pub struct INPUT_SPEC;
773impl crate::RegisterSpec for INPUT_SPEC {
774    type Ux = u32;
775}
776#[doc = "`read()` method returns [input::R](R) reader structure"]
777impl crate::Readable for INPUT_SPEC {
778    type Reader = R;
779}
780#[doc = "`write(|w| ..)` method takes [input::W](W) writer structure"]
781impl crate::Writable for INPUT_SPEC {
782    type Writer = W;
783}
784#[doc = "`reset()` method sets INPUT to value 0"]
785impl crate::Resettable for INPUT_SPEC {
786    #[inline(always)]
787    fn reset_value() -> Self::Ux {
788        0
789    }
790}