efm32gg12b530_pac/lesense/
decctrl.rs

1#[doc = "Register `DECCTRL` reader"]
2pub struct R(crate::R<DECCTRL_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<DECCTRL_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<DECCTRL_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<DECCTRL_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `DECCTRL` writer"]
17pub struct W(crate::W<DECCTRL_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<DECCTRL_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<DECCTRL_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<DECCTRL_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `DISABLE` reader - Disable the Decoder"]
38pub type DISABLE_R = crate::BitReader<bool>;
39#[doc = "Field `DISABLE` writer - Disable the Decoder"]
40pub type DISABLE_W<'a> = crate::BitWriter<'a, u32, DECCTRL_SPEC, bool, 0>;
41#[doc = "Field `ERRCHK` reader - Enable Check of Current State"]
42pub type ERRCHK_R = crate::BitReader<bool>;
43#[doc = "Field `ERRCHK` writer - Enable Check of Current State"]
44pub type ERRCHK_W<'a> = crate::BitWriter<'a, u32, DECCTRL_SPEC, bool, 1>;
45#[doc = "Field `INTMAP` reader - Enable Decoder to Channel Interrupt Mapping"]
46pub type INTMAP_R = crate::BitReader<bool>;
47#[doc = "Field `INTMAP` writer - Enable Decoder to Channel Interrupt Mapping"]
48pub type INTMAP_W<'a> = crate::BitWriter<'a, u32, DECCTRL_SPEC, bool, 2>;
49#[doc = "Field `HYSTPRS0` reader - Enable Decoder Hysteresis on PRS0 Output"]
50pub type HYSTPRS0_R = crate::BitReader<bool>;
51#[doc = "Field `HYSTPRS0` writer - Enable Decoder Hysteresis on PRS0 Output"]
52pub type HYSTPRS0_W<'a> = crate::BitWriter<'a, u32, DECCTRL_SPEC, bool, 3>;
53#[doc = "Field `HYSTPRS1` reader - Enable Decoder Hysteresis on PRS1 Output"]
54pub type HYSTPRS1_R = crate::BitReader<bool>;
55#[doc = "Field `HYSTPRS1` writer - Enable Decoder Hysteresis on PRS1 Output"]
56pub type HYSTPRS1_W<'a> = crate::BitWriter<'a, u32, DECCTRL_SPEC, bool, 4>;
57#[doc = "Field `HYSTPRS2` reader - Enable Decoder Hysteresis on PRS2 Output"]
58pub type HYSTPRS2_R = crate::BitReader<bool>;
59#[doc = "Field `HYSTPRS2` writer - Enable Decoder Hysteresis on PRS2 Output"]
60pub type HYSTPRS2_W<'a> = crate::BitWriter<'a, u32, DECCTRL_SPEC, bool, 5>;
61#[doc = "Field `HYSTIRQ` reader - Enable Decoder Hysteresis on Interrupt Requests"]
62pub type HYSTIRQ_R = crate::BitReader<bool>;
63#[doc = "Field `HYSTIRQ` writer - Enable Decoder Hysteresis on Interrupt Requests"]
64pub type HYSTIRQ_W<'a> = crate::BitWriter<'a, u32, DECCTRL_SPEC, bool, 6>;
65#[doc = "Field `PRSCNT` reader - Enable Count Mode on Decoder PRS Channels 0 and 1"]
66pub type PRSCNT_R = crate::BitReader<bool>;
67#[doc = "Field `PRSCNT` writer - Enable Count Mode on Decoder PRS Channels 0 and 1"]
68pub type PRSCNT_W<'a> = crate::BitWriter<'a, u32, DECCTRL_SPEC, bool, 7>;
69#[doc = "Field `INPUT` reader - LESENSE Decoder Input Configuration"]
70pub type INPUT_R = crate::BitReader<bool>;
71#[doc = "Field `INPUT` writer - LESENSE Decoder Input Configuration"]
72pub type INPUT_W<'a> = crate::BitWriter<'a, u32, DECCTRL_SPEC, bool, 8>;
73#[doc = "LESENSE Decoder PRS Input 0 Configuration\n\nValue on reset: 0"]
74#[derive(Clone, Copy, Debug, PartialEq)]
75#[repr(u8)]
76pub enum PRSSEL0_A {
77    #[doc = "0: PRS Channel 0 selected as input"]
78    PRSCH0 = 0,
79    #[doc = "1: PRS Channel 1 selected as input"]
80    PRSCH1 = 1,
81    #[doc = "2: PRS Channel 2 selected as input"]
82    PRSCH2 = 2,
83    #[doc = "3: PRS Channel 3 selected as input"]
84    PRSCH3 = 3,
85    #[doc = "4: PRS Channel 4 selected as input"]
86    PRSCH4 = 4,
87    #[doc = "5: PRS Channel 5 selected as input"]
88    PRSCH5 = 5,
89    #[doc = "6: PRS Channel 6 selected as input"]
90    PRSCH6 = 6,
91    #[doc = "7: PRS Channel 7 selected as input"]
92    PRSCH7 = 7,
93    #[doc = "8: PRS Channel 8 selected as input"]
94    PRSCH8 = 8,
95    #[doc = "9: PRS Channel 9 selected as input"]
96    PRSCH9 = 9,
97    #[doc = "10: PRS Channel 10 selected as input"]
98    PRSCH10 = 10,
99    #[doc = "11: PRS Channel 11 selected as input"]
100    PRSCH11 = 11,
101    #[doc = "12: PRS Channel 12 selected as input"]
102    PRSCH12 = 12,
103    #[doc = "13: PRS Channel 13 selected as input"]
104    PRSCH13 = 13,
105    #[doc = "14: PRS Channel 14 selected as input"]
106    PRSCH14 = 14,
107    #[doc = "15: PRS Channel 15 selected as input"]
108    PRSCH15 = 15,
109}
110impl From<PRSSEL0_A> for u8 {
111    #[inline(always)]
112    fn from(variant: PRSSEL0_A) -> Self {
113        variant as _
114    }
115}
116#[doc = "Field `PRSSEL0` reader - LESENSE Decoder PRS Input 0 Configuration"]
117pub type PRSSEL0_R = crate::FieldReader<u8, PRSSEL0_A>;
118impl PRSSEL0_R {
119    #[doc = "Get enumerated values variant"]
120    #[inline(always)]
121    pub fn variant(&self) -> PRSSEL0_A {
122        match self.bits {
123            0 => PRSSEL0_A::PRSCH0,
124            1 => PRSSEL0_A::PRSCH1,
125            2 => PRSSEL0_A::PRSCH2,
126            3 => PRSSEL0_A::PRSCH3,
127            4 => PRSSEL0_A::PRSCH4,
128            5 => PRSSEL0_A::PRSCH5,
129            6 => PRSSEL0_A::PRSCH6,
130            7 => PRSSEL0_A::PRSCH7,
131            8 => PRSSEL0_A::PRSCH8,
132            9 => PRSSEL0_A::PRSCH9,
133            10 => PRSSEL0_A::PRSCH10,
134            11 => PRSSEL0_A::PRSCH11,
135            12 => PRSSEL0_A::PRSCH12,
136            13 => PRSSEL0_A::PRSCH13,
137            14 => PRSSEL0_A::PRSCH14,
138            15 => PRSSEL0_A::PRSCH15,
139            _ => unreachable!(),
140        }
141    }
142    #[doc = "Checks if the value of the field is `PRSCH0`"]
143    #[inline(always)]
144    pub fn is_prsch0(&self) -> bool {
145        *self == PRSSEL0_A::PRSCH0
146    }
147    #[doc = "Checks if the value of the field is `PRSCH1`"]
148    #[inline(always)]
149    pub fn is_prsch1(&self) -> bool {
150        *self == PRSSEL0_A::PRSCH1
151    }
152    #[doc = "Checks if the value of the field is `PRSCH2`"]
153    #[inline(always)]
154    pub fn is_prsch2(&self) -> bool {
155        *self == PRSSEL0_A::PRSCH2
156    }
157    #[doc = "Checks if the value of the field is `PRSCH3`"]
158    #[inline(always)]
159    pub fn is_prsch3(&self) -> bool {
160        *self == PRSSEL0_A::PRSCH3
161    }
162    #[doc = "Checks if the value of the field is `PRSCH4`"]
163    #[inline(always)]
164    pub fn is_prsch4(&self) -> bool {
165        *self == PRSSEL0_A::PRSCH4
166    }
167    #[doc = "Checks if the value of the field is `PRSCH5`"]
168    #[inline(always)]
169    pub fn is_prsch5(&self) -> bool {
170        *self == PRSSEL0_A::PRSCH5
171    }
172    #[doc = "Checks if the value of the field is `PRSCH6`"]
173    #[inline(always)]
174    pub fn is_prsch6(&self) -> bool {
175        *self == PRSSEL0_A::PRSCH6
176    }
177    #[doc = "Checks if the value of the field is `PRSCH7`"]
178    #[inline(always)]
179    pub fn is_prsch7(&self) -> bool {
180        *self == PRSSEL0_A::PRSCH7
181    }
182    #[doc = "Checks if the value of the field is `PRSCH8`"]
183    #[inline(always)]
184    pub fn is_prsch8(&self) -> bool {
185        *self == PRSSEL0_A::PRSCH8
186    }
187    #[doc = "Checks if the value of the field is `PRSCH9`"]
188    #[inline(always)]
189    pub fn is_prsch9(&self) -> bool {
190        *self == PRSSEL0_A::PRSCH9
191    }
192    #[doc = "Checks if the value of the field is `PRSCH10`"]
193    #[inline(always)]
194    pub fn is_prsch10(&self) -> bool {
195        *self == PRSSEL0_A::PRSCH10
196    }
197    #[doc = "Checks if the value of the field is `PRSCH11`"]
198    #[inline(always)]
199    pub fn is_prsch11(&self) -> bool {
200        *self == PRSSEL0_A::PRSCH11
201    }
202    #[doc = "Checks if the value of the field is `PRSCH12`"]
203    #[inline(always)]
204    pub fn is_prsch12(&self) -> bool {
205        *self == PRSSEL0_A::PRSCH12
206    }
207    #[doc = "Checks if the value of the field is `PRSCH13`"]
208    #[inline(always)]
209    pub fn is_prsch13(&self) -> bool {
210        *self == PRSSEL0_A::PRSCH13
211    }
212    #[doc = "Checks if the value of the field is `PRSCH14`"]
213    #[inline(always)]
214    pub fn is_prsch14(&self) -> bool {
215        *self == PRSSEL0_A::PRSCH14
216    }
217    #[doc = "Checks if the value of the field is `PRSCH15`"]
218    #[inline(always)]
219    pub fn is_prsch15(&self) -> bool {
220        *self == PRSSEL0_A::PRSCH15
221    }
222}
223#[doc = "Field `PRSSEL0` writer - LESENSE Decoder PRS Input 0 Configuration"]
224pub type PRSSEL0_W<'a> = crate::FieldWriterSafe<'a, u32, DECCTRL_SPEC, u8, PRSSEL0_A, 4, 10>;
225impl<'a> PRSSEL0_W<'a> {
226    #[doc = "PRS Channel 0 selected as input"]
227    #[inline(always)]
228    pub fn prsch0(self) -> &'a mut W {
229        self.variant(PRSSEL0_A::PRSCH0)
230    }
231    #[doc = "PRS Channel 1 selected as input"]
232    #[inline(always)]
233    pub fn prsch1(self) -> &'a mut W {
234        self.variant(PRSSEL0_A::PRSCH1)
235    }
236    #[doc = "PRS Channel 2 selected as input"]
237    #[inline(always)]
238    pub fn prsch2(self) -> &'a mut W {
239        self.variant(PRSSEL0_A::PRSCH2)
240    }
241    #[doc = "PRS Channel 3 selected as input"]
242    #[inline(always)]
243    pub fn prsch3(self) -> &'a mut W {
244        self.variant(PRSSEL0_A::PRSCH3)
245    }
246    #[doc = "PRS Channel 4 selected as input"]
247    #[inline(always)]
248    pub fn prsch4(self) -> &'a mut W {
249        self.variant(PRSSEL0_A::PRSCH4)
250    }
251    #[doc = "PRS Channel 5 selected as input"]
252    #[inline(always)]
253    pub fn prsch5(self) -> &'a mut W {
254        self.variant(PRSSEL0_A::PRSCH5)
255    }
256    #[doc = "PRS Channel 6 selected as input"]
257    #[inline(always)]
258    pub fn prsch6(self) -> &'a mut W {
259        self.variant(PRSSEL0_A::PRSCH6)
260    }
261    #[doc = "PRS Channel 7 selected as input"]
262    #[inline(always)]
263    pub fn prsch7(self) -> &'a mut W {
264        self.variant(PRSSEL0_A::PRSCH7)
265    }
266    #[doc = "PRS Channel 8 selected as input"]
267    #[inline(always)]
268    pub fn prsch8(self) -> &'a mut W {
269        self.variant(PRSSEL0_A::PRSCH8)
270    }
271    #[doc = "PRS Channel 9 selected as input"]
272    #[inline(always)]
273    pub fn prsch9(self) -> &'a mut W {
274        self.variant(PRSSEL0_A::PRSCH9)
275    }
276    #[doc = "PRS Channel 10 selected as input"]
277    #[inline(always)]
278    pub fn prsch10(self) -> &'a mut W {
279        self.variant(PRSSEL0_A::PRSCH10)
280    }
281    #[doc = "PRS Channel 11 selected as input"]
282    #[inline(always)]
283    pub fn prsch11(self) -> &'a mut W {
284        self.variant(PRSSEL0_A::PRSCH11)
285    }
286    #[doc = "PRS Channel 12 selected as input"]
287    #[inline(always)]
288    pub fn prsch12(self) -> &'a mut W {
289        self.variant(PRSSEL0_A::PRSCH12)
290    }
291    #[doc = "PRS Channel 13 selected as input"]
292    #[inline(always)]
293    pub fn prsch13(self) -> &'a mut W {
294        self.variant(PRSSEL0_A::PRSCH13)
295    }
296    #[doc = "PRS Channel 14 selected as input"]
297    #[inline(always)]
298    pub fn prsch14(self) -> &'a mut W {
299        self.variant(PRSSEL0_A::PRSCH14)
300    }
301    #[doc = "PRS Channel 15 selected as input"]
302    #[inline(always)]
303    pub fn prsch15(self) -> &'a mut W {
304        self.variant(PRSSEL0_A::PRSCH15)
305    }
306}
307#[doc = "LESENSE Decoder PRS Input 1 Configuration\n\nValue on reset: 0"]
308#[derive(Clone, Copy, Debug, PartialEq)]
309#[repr(u8)]
310pub enum PRSSEL1_A {
311    #[doc = "0: PRS Channel 0 selected as input"]
312    PRSCH0 = 0,
313    #[doc = "1: PRS Channel 1 selected as input"]
314    PRSCH1 = 1,
315    #[doc = "2: PRS Channel 2 selected as input"]
316    PRSCH2 = 2,
317    #[doc = "3: PRS Channel 3 selected as input"]
318    PRSCH3 = 3,
319    #[doc = "4: PRS Channel 4 selected as input"]
320    PRSCH4 = 4,
321    #[doc = "5: PRS Channel 5 selected as input"]
322    PRSCH5 = 5,
323    #[doc = "6: PRS Channel 6 selected as input"]
324    PRSCH6 = 6,
325    #[doc = "7: PRS Channel 7 selected as input"]
326    PRSCH7 = 7,
327    #[doc = "8: PRS Channel 8 selected as input"]
328    PRSCH8 = 8,
329    #[doc = "9: PRS Channel 9 selected as input"]
330    PRSCH9 = 9,
331    #[doc = "10: PRS Channel 10 selected as input"]
332    PRSCH10 = 10,
333    #[doc = "11: PRS Channel 11 selected as input"]
334    PRSCH11 = 11,
335    #[doc = "12: PRS Channel 12 selected as input"]
336    PRSCH12 = 12,
337    #[doc = "13: PRS Channel 13 selected as input"]
338    PRSCH13 = 13,
339    #[doc = "14: PRS Channel 14 selected as input"]
340    PRSCH14 = 14,
341    #[doc = "15: PRS Channel 15 selected as input"]
342    PRSCH15 = 15,
343}
344impl From<PRSSEL1_A> for u8 {
345    #[inline(always)]
346    fn from(variant: PRSSEL1_A) -> Self {
347        variant as _
348    }
349}
350#[doc = "Field `PRSSEL1` reader - LESENSE Decoder PRS Input 1 Configuration"]
351pub type PRSSEL1_R = crate::FieldReader<u8, PRSSEL1_A>;
352impl PRSSEL1_R {
353    #[doc = "Get enumerated values variant"]
354    #[inline(always)]
355    pub fn variant(&self) -> PRSSEL1_A {
356        match self.bits {
357            0 => PRSSEL1_A::PRSCH0,
358            1 => PRSSEL1_A::PRSCH1,
359            2 => PRSSEL1_A::PRSCH2,
360            3 => PRSSEL1_A::PRSCH3,
361            4 => PRSSEL1_A::PRSCH4,
362            5 => PRSSEL1_A::PRSCH5,
363            6 => PRSSEL1_A::PRSCH6,
364            7 => PRSSEL1_A::PRSCH7,
365            8 => PRSSEL1_A::PRSCH8,
366            9 => PRSSEL1_A::PRSCH9,
367            10 => PRSSEL1_A::PRSCH10,
368            11 => PRSSEL1_A::PRSCH11,
369            12 => PRSSEL1_A::PRSCH12,
370            13 => PRSSEL1_A::PRSCH13,
371            14 => PRSSEL1_A::PRSCH14,
372            15 => PRSSEL1_A::PRSCH15,
373            _ => unreachable!(),
374        }
375    }
376    #[doc = "Checks if the value of the field is `PRSCH0`"]
377    #[inline(always)]
378    pub fn is_prsch0(&self) -> bool {
379        *self == PRSSEL1_A::PRSCH0
380    }
381    #[doc = "Checks if the value of the field is `PRSCH1`"]
382    #[inline(always)]
383    pub fn is_prsch1(&self) -> bool {
384        *self == PRSSEL1_A::PRSCH1
385    }
386    #[doc = "Checks if the value of the field is `PRSCH2`"]
387    #[inline(always)]
388    pub fn is_prsch2(&self) -> bool {
389        *self == PRSSEL1_A::PRSCH2
390    }
391    #[doc = "Checks if the value of the field is `PRSCH3`"]
392    #[inline(always)]
393    pub fn is_prsch3(&self) -> bool {
394        *self == PRSSEL1_A::PRSCH3
395    }
396    #[doc = "Checks if the value of the field is `PRSCH4`"]
397    #[inline(always)]
398    pub fn is_prsch4(&self) -> bool {
399        *self == PRSSEL1_A::PRSCH4
400    }
401    #[doc = "Checks if the value of the field is `PRSCH5`"]
402    #[inline(always)]
403    pub fn is_prsch5(&self) -> bool {
404        *self == PRSSEL1_A::PRSCH5
405    }
406    #[doc = "Checks if the value of the field is `PRSCH6`"]
407    #[inline(always)]
408    pub fn is_prsch6(&self) -> bool {
409        *self == PRSSEL1_A::PRSCH6
410    }
411    #[doc = "Checks if the value of the field is `PRSCH7`"]
412    #[inline(always)]
413    pub fn is_prsch7(&self) -> bool {
414        *self == PRSSEL1_A::PRSCH7
415    }
416    #[doc = "Checks if the value of the field is `PRSCH8`"]
417    #[inline(always)]
418    pub fn is_prsch8(&self) -> bool {
419        *self == PRSSEL1_A::PRSCH8
420    }
421    #[doc = "Checks if the value of the field is `PRSCH9`"]
422    #[inline(always)]
423    pub fn is_prsch9(&self) -> bool {
424        *self == PRSSEL1_A::PRSCH9
425    }
426    #[doc = "Checks if the value of the field is `PRSCH10`"]
427    #[inline(always)]
428    pub fn is_prsch10(&self) -> bool {
429        *self == PRSSEL1_A::PRSCH10
430    }
431    #[doc = "Checks if the value of the field is `PRSCH11`"]
432    #[inline(always)]
433    pub fn is_prsch11(&self) -> bool {
434        *self == PRSSEL1_A::PRSCH11
435    }
436    #[doc = "Checks if the value of the field is `PRSCH12`"]
437    #[inline(always)]
438    pub fn is_prsch12(&self) -> bool {
439        *self == PRSSEL1_A::PRSCH12
440    }
441    #[doc = "Checks if the value of the field is `PRSCH13`"]
442    #[inline(always)]
443    pub fn is_prsch13(&self) -> bool {
444        *self == PRSSEL1_A::PRSCH13
445    }
446    #[doc = "Checks if the value of the field is `PRSCH14`"]
447    #[inline(always)]
448    pub fn is_prsch14(&self) -> bool {
449        *self == PRSSEL1_A::PRSCH14
450    }
451    #[doc = "Checks if the value of the field is `PRSCH15`"]
452    #[inline(always)]
453    pub fn is_prsch15(&self) -> bool {
454        *self == PRSSEL1_A::PRSCH15
455    }
456}
457#[doc = "Field `PRSSEL1` writer - LESENSE Decoder PRS Input 1 Configuration"]
458pub type PRSSEL1_W<'a> = crate::FieldWriterSafe<'a, u32, DECCTRL_SPEC, u8, PRSSEL1_A, 4, 15>;
459impl<'a> PRSSEL1_W<'a> {
460    #[doc = "PRS Channel 0 selected as input"]
461    #[inline(always)]
462    pub fn prsch0(self) -> &'a mut W {
463        self.variant(PRSSEL1_A::PRSCH0)
464    }
465    #[doc = "PRS Channel 1 selected as input"]
466    #[inline(always)]
467    pub fn prsch1(self) -> &'a mut W {
468        self.variant(PRSSEL1_A::PRSCH1)
469    }
470    #[doc = "PRS Channel 2 selected as input"]
471    #[inline(always)]
472    pub fn prsch2(self) -> &'a mut W {
473        self.variant(PRSSEL1_A::PRSCH2)
474    }
475    #[doc = "PRS Channel 3 selected as input"]
476    #[inline(always)]
477    pub fn prsch3(self) -> &'a mut W {
478        self.variant(PRSSEL1_A::PRSCH3)
479    }
480    #[doc = "PRS Channel 4 selected as input"]
481    #[inline(always)]
482    pub fn prsch4(self) -> &'a mut W {
483        self.variant(PRSSEL1_A::PRSCH4)
484    }
485    #[doc = "PRS Channel 5 selected as input"]
486    #[inline(always)]
487    pub fn prsch5(self) -> &'a mut W {
488        self.variant(PRSSEL1_A::PRSCH5)
489    }
490    #[doc = "PRS Channel 6 selected as input"]
491    #[inline(always)]
492    pub fn prsch6(self) -> &'a mut W {
493        self.variant(PRSSEL1_A::PRSCH6)
494    }
495    #[doc = "PRS Channel 7 selected as input"]
496    #[inline(always)]
497    pub fn prsch7(self) -> &'a mut W {
498        self.variant(PRSSEL1_A::PRSCH7)
499    }
500    #[doc = "PRS Channel 8 selected as input"]
501    #[inline(always)]
502    pub fn prsch8(self) -> &'a mut W {
503        self.variant(PRSSEL1_A::PRSCH8)
504    }
505    #[doc = "PRS Channel 9 selected as input"]
506    #[inline(always)]
507    pub fn prsch9(self) -> &'a mut W {
508        self.variant(PRSSEL1_A::PRSCH9)
509    }
510    #[doc = "PRS Channel 10 selected as input"]
511    #[inline(always)]
512    pub fn prsch10(self) -> &'a mut W {
513        self.variant(PRSSEL1_A::PRSCH10)
514    }
515    #[doc = "PRS Channel 11 selected as input"]
516    #[inline(always)]
517    pub fn prsch11(self) -> &'a mut W {
518        self.variant(PRSSEL1_A::PRSCH11)
519    }
520    #[doc = "PRS Channel 12 selected as input"]
521    #[inline(always)]
522    pub fn prsch12(self) -> &'a mut W {
523        self.variant(PRSSEL1_A::PRSCH12)
524    }
525    #[doc = "PRS Channel 13 selected as input"]
526    #[inline(always)]
527    pub fn prsch13(self) -> &'a mut W {
528        self.variant(PRSSEL1_A::PRSCH13)
529    }
530    #[doc = "PRS Channel 14 selected as input"]
531    #[inline(always)]
532    pub fn prsch14(self) -> &'a mut W {
533        self.variant(PRSSEL1_A::PRSCH14)
534    }
535    #[doc = "PRS Channel 15 selected as input"]
536    #[inline(always)]
537    pub fn prsch15(self) -> &'a mut W {
538        self.variant(PRSSEL1_A::PRSCH15)
539    }
540}
541#[doc = "LESENSE Decoder PRS Input 2 Configuration\n\nValue on reset: 0"]
542#[derive(Clone, Copy, Debug, PartialEq)]
543#[repr(u8)]
544pub enum PRSSEL2_A {
545    #[doc = "0: PRS Channel 0 selected as input"]
546    PRSCH0 = 0,
547    #[doc = "1: PRS Channel 1 selected as input"]
548    PRSCH1 = 1,
549    #[doc = "2: PRS Channel 2 selected as input"]
550    PRSCH2 = 2,
551    #[doc = "3: PRS Channel 3 selected as input"]
552    PRSCH3 = 3,
553    #[doc = "4: PRS Channel 4 selected as input"]
554    PRSCH4 = 4,
555    #[doc = "5: PRS Channel 5 selected as input"]
556    PRSCH5 = 5,
557    #[doc = "6: PRS Channel 6 selected as input"]
558    PRSCH6 = 6,
559    #[doc = "7: PRS Channel 7 selected as input"]
560    PRSCH7 = 7,
561    #[doc = "8: PRS Channel 8 selected as input"]
562    PRSCH8 = 8,
563    #[doc = "9: PRS Channel 9 selected as input"]
564    PRSCH9 = 9,
565    #[doc = "10: PRS Channel 10 selected as input"]
566    PRSCH10 = 10,
567    #[doc = "11: PRS Channel 11 selected as input"]
568    PRSCH11 = 11,
569    #[doc = "12: PRS Channel 12 selected as input"]
570    PRSCH12 = 12,
571    #[doc = "13: PRS Channel 13 selected as input"]
572    PRSCH13 = 13,
573    #[doc = "14: PRS Channel 14 selected as input"]
574    PRSCH14 = 14,
575    #[doc = "15: PRS Channel 15 selected as input"]
576    PRSCH15 = 15,
577}
578impl From<PRSSEL2_A> for u8 {
579    #[inline(always)]
580    fn from(variant: PRSSEL2_A) -> Self {
581        variant as _
582    }
583}
584#[doc = "Field `PRSSEL2` reader - LESENSE Decoder PRS Input 2 Configuration"]
585pub type PRSSEL2_R = crate::FieldReader<u8, PRSSEL2_A>;
586impl PRSSEL2_R {
587    #[doc = "Get enumerated values variant"]
588    #[inline(always)]
589    pub fn variant(&self) -> PRSSEL2_A {
590        match self.bits {
591            0 => PRSSEL2_A::PRSCH0,
592            1 => PRSSEL2_A::PRSCH1,
593            2 => PRSSEL2_A::PRSCH2,
594            3 => PRSSEL2_A::PRSCH3,
595            4 => PRSSEL2_A::PRSCH4,
596            5 => PRSSEL2_A::PRSCH5,
597            6 => PRSSEL2_A::PRSCH6,
598            7 => PRSSEL2_A::PRSCH7,
599            8 => PRSSEL2_A::PRSCH8,
600            9 => PRSSEL2_A::PRSCH9,
601            10 => PRSSEL2_A::PRSCH10,
602            11 => PRSSEL2_A::PRSCH11,
603            12 => PRSSEL2_A::PRSCH12,
604            13 => PRSSEL2_A::PRSCH13,
605            14 => PRSSEL2_A::PRSCH14,
606            15 => PRSSEL2_A::PRSCH15,
607            _ => unreachable!(),
608        }
609    }
610    #[doc = "Checks if the value of the field is `PRSCH0`"]
611    #[inline(always)]
612    pub fn is_prsch0(&self) -> bool {
613        *self == PRSSEL2_A::PRSCH0
614    }
615    #[doc = "Checks if the value of the field is `PRSCH1`"]
616    #[inline(always)]
617    pub fn is_prsch1(&self) -> bool {
618        *self == PRSSEL2_A::PRSCH1
619    }
620    #[doc = "Checks if the value of the field is `PRSCH2`"]
621    #[inline(always)]
622    pub fn is_prsch2(&self) -> bool {
623        *self == PRSSEL2_A::PRSCH2
624    }
625    #[doc = "Checks if the value of the field is `PRSCH3`"]
626    #[inline(always)]
627    pub fn is_prsch3(&self) -> bool {
628        *self == PRSSEL2_A::PRSCH3
629    }
630    #[doc = "Checks if the value of the field is `PRSCH4`"]
631    #[inline(always)]
632    pub fn is_prsch4(&self) -> bool {
633        *self == PRSSEL2_A::PRSCH4
634    }
635    #[doc = "Checks if the value of the field is `PRSCH5`"]
636    #[inline(always)]
637    pub fn is_prsch5(&self) -> bool {
638        *self == PRSSEL2_A::PRSCH5
639    }
640    #[doc = "Checks if the value of the field is `PRSCH6`"]
641    #[inline(always)]
642    pub fn is_prsch6(&self) -> bool {
643        *self == PRSSEL2_A::PRSCH6
644    }
645    #[doc = "Checks if the value of the field is `PRSCH7`"]
646    #[inline(always)]
647    pub fn is_prsch7(&self) -> bool {
648        *self == PRSSEL2_A::PRSCH7
649    }
650    #[doc = "Checks if the value of the field is `PRSCH8`"]
651    #[inline(always)]
652    pub fn is_prsch8(&self) -> bool {
653        *self == PRSSEL2_A::PRSCH8
654    }
655    #[doc = "Checks if the value of the field is `PRSCH9`"]
656    #[inline(always)]
657    pub fn is_prsch9(&self) -> bool {
658        *self == PRSSEL2_A::PRSCH9
659    }
660    #[doc = "Checks if the value of the field is `PRSCH10`"]
661    #[inline(always)]
662    pub fn is_prsch10(&self) -> bool {
663        *self == PRSSEL2_A::PRSCH10
664    }
665    #[doc = "Checks if the value of the field is `PRSCH11`"]
666    #[inline(always)]
667    pub fn is_prsch11(&self) -> bool {
668        *self == PRSSEL2_A::PRSCH11
669    }
670    #[doc = "Checks if the value of the field is `PRSCH12`"]
671    #[inline(always)]
672    pub fn is_prsch12(&self) -> bool {
673        *self == PRSSEL2_A::PRSCH12
674    }
675    #[doc = "Checks if the value of the field is `PRSCH13`"]
676    #[inline(always)]
677    pub fn is_prsch13(&self) -> bool {
678        *self == PRSSEL2_A::PRSCH13
679    }
680    #[doc = "Checks if the value of the field is `PRSCH14`"]
681    #[inline(always)]
682    pub fn is_prsch14(&self) -> bool {
683        *self == PRSSEL2_A::PRSCH14
684    }
685    #[doc = "Checks if the value of the field is `PRSCH15`"]
686    #[inline(always)]
687    pub fn is_prsch15(&self) -> bool {
688        *self == PRSSEL2_A::PRSCH15
689    }
690}
691#[doc = "Field `PRSSEL2` writer - LESENSE Decoder PRS Input 2 Configuration"]
692pub type PRSSEL2_W<'a> = crate::FieldWriterSafe<'a, u32, DECCTRL_SPEC, u8, PRSSEL2_A, 4, 20>;
693impl<'a> PRSSEL2_W<'a> {
694    #[doc = "PRS Channel 0 selected as input"]
695    #[inline(always)]
696    pub fn prsch0(self) -> &'a mut W {
697        self.variant(PRSSEL2_A::PRSCH0)
698    }
699    #[doc = "PRS Channel 1 selected as input"]
700    #[inline(always)]
701    pub fn prsch1(self) -> &'a mut W {
702        self.variant(PRSSEL2_A::PRSCH1)
703    }
704    #[doc = "PRS Channel 2 selected as input"]
705    #[inline(always)]
706    pub fn prsch2(self) -> &'a mut W {
707        self.variant(PRSSEL2_A::PRSCH2)
708    }
709    #[doc = "PRS Channel 3 selected as input"]
710    #[inline(always)]
711    pub fn prsch3(self) -> &'a mut W {
712        self.variant(PRSSEL2_A::PRSCH3)
713    }
714    #[doc = "PRS Channel 4 selected as input"]
715    #[inline(always)]
716    pub fn prsch4(self) -> &'a mut W {
717        self.variant(PRSSEL2_A::PRSCH4)
718    }
719    #[doc = "PRS Channel 5 selected as input"]
720    #[inline(always)]
721    pub fn prsch5(self) -> &'a mut W {
722        self.variant(PRSSEL2_A::PRSCH5)
723    }
724    #[doc = "PRS Channel 6 selected as input"]
725    #[inline(always)]
726    pub fn prsch6(self) -> &'a mut W {
727        self.variant(PRSSEL2_A::PRSCH6)
728    }
729    #[doc = "PRS Channel 7 selected as input"]
730    #[inline(always)]
731    pub fn prsch7(self) -> &'a mut W {
732        self.variant(PRSSEL2_A::PRSCH7)
733    }
734    #[doc = "PRS Channel 8 selected as input"]
735    #[inline(always)]
736    pub fn prsch8(self) -> &'a mut W {
737        self.variant(PRSSEL2_A::PRSCH8)
738    }
739    #[doc = "PRS Channel 9 selected as input"]
740    #[inline(always)]
741    pub fn prsch9(self) -> &'a mut W {
742        self.variant(PRSSEL2_A::PRSCH9)
743    }
744    #[doc = "PRS Channel 10 selected as input"]
745    #[inline(always)]
746    pub fn prsch10(self) -> &'a mut W {
747        self.variant(PRSSEL2_A::PRSCH10)
748    }
749    #[doc = "PRS Channel 11 selected as input"]
750    #[inline(always)]
751    pub fn prsch11(self) -> &'a mut W {
752        self.variant(PRSSEL2_A::PRSCH11)
753    }
754    #[doc = "PRS Channel 12 selected as input"]
755    #[inline(always)]
756    pub fn prsch12(self) -> &'a mut W {
757        self.variant(PRSSEL2_A::PRSCH12)
758    }
759    #[doc = "PRS Channel 13 selected as input"]
760    #[inline(always)]
761    pub fn prsch13(self) -> &'a mut W {
762        self.variant(PRSSEL2_A::PRSCH13)
763    }
764    #[doc = "PRS Channel 14 selected as input"]
765    #[inline(always)]
766    pub fn prsch14(self) -> &'a mut W {
767        self.variant(PRSSEL2_A::PRSCH14)
768    }
769    #[doc = "PRS Channel 15 selected as input"]
770    #[inline(always)]
771    pub fn prsch15(self) -> &'a mut W {
772        self.variant(PRSSEL2_A::PRSCH15)
773    }
774}
775#[doc = "LESENSE Decoder PRS Input 3 Configuration\n\nValue on reset: 0"]
776#[derive(Clone, Copy, Debug, PartialEq)]
777#[repr(u8)]
778pub enum PRSSEL3_A {
779    #[doc = "0: PRS Channel 0 selected as input"]
780    PRSCH0 = 0,
781    #[doc = "1: PRS Channel 1 selected as input"]
782    PRSCH1 = 1,
783    #[doc = "2: PRS Channel 2 selected as input"]
784    PRSCH2 = 2,
785    #[doc = "3: PRS Channel 3 selected as input"]
786    PRSCH3 = 3,
787    #[doc = "4: PRS Channel 4 selected as input"]
788    PRSCH4 = 4,
789    #[doc = "5: PRS Channel 5 selected as input"]
790    PRSCH5 = 5,
791    #[doc = "6: PRS Channel 6 selected as input"]
792    PRSCH6 = 6,
793    #[doc = "7: PRS Channel 7 selected as input"]
794    PRSCH7 = 7,
795    #[doc = "8: PRS Channel 8 selected as input"]
796    PRSCH8 = 8,
797    #[doc = "9: PRS Channel 9 selected as input"]
798    PRSCH9 = 9,
799    #[doc = "10: PRS Channel 10 selected as input"]
800    PRSCH10 = 10,
801    #[doc = "11: PRS Channel 11 selected as input"]
802    PRSCH11 = 11,
803    #[doc = "12: PRS Channel 12 selected as input"]
804    PRSCH12 = 12,
805    #[doc = "13: PRS Channel 13 selected as input"]
806    PRSCH13 = 13,
807    #[doc = "14: PRS Channel 14 selected as input"]
808    PRSCH14 = 14,
809    #[doc = "15: PRS Channel 15 selected as input"]
810    PRSCH15 = 15,
811}
812impl From<PRSSEL3_A> for u8 {
813    #[inline(always)]
814    fn from(variant: PRSSEL3_A) -> Self {
815        variant as _
816    }
817}
818#[doc = "Field `PRSSEL3` reader - LESENSE Decoder PRS Input 3 Configuration"]
819pub type PRSSEL3_R = crate::FieldReader<u8, PRSSEL3_A>;
820impl PRSSEL3_R {
821    #[doc = "Get enumerated values variant"]
822    #[inline(always)]
823    pub fn variant(&self) -> PRSSEL3_A {
824        match self.bits {
825            0 => PRSSEL3_A::PRSCH0,
826            1 => PRSSEL3_A::PRSCH1,
827            2 => PRSSEL3_A::PRSCH2,
828            3 => PRSSEL3_A::PRSCH3,
829            4 => PRSSEL3_A::PRSCH4,
830            5 => PRSSEL3_A::PRSCH5,
831            6 => PRSSEL3_A::PRSCH6,
832            7 => PRSSEL3_A::PRSCH7,
833            8 => PRSSEL3_A::PRSCH8,
834            9 => PRSSEL3_A::PRSCH9,
835            10 => PRSSEL3_A::PRSCH10,
836            11 => PRSSEL3_A::PRSCH11,
837            12 => PRSSEL3_A::PRSCH12,
838            13 => PRSSEL3_A::PRSCH13,
839            14 => PRSSEL3_A::PRSCH14,
840            15 => PRSSEL3_A::PRSCH15,
841            _ => unreachable!(),
842        }
843    }
844    #[doc = "Checks if the value of the field is `PRSCH0`"]
845    #[inline(always)]
846    pub fn is_prsch0(&self) -> bool {
847        *self == PRSSEL3_A::PRSCH0
848    }
849    #[doc = "Checks if the value of the field is `PRSCH1`"]
850    #[inline(always)]
851    pub fn is_prsch1(&self) -> bool {
852        *self == PRSSEL3_A::PRSCH1
853    }
854    #[doc = "Checks if the value of the field is `PRSCH2`"]
855    #[inline(always)]
856    pub fn is_prsch2(&self) -> bool {
857        *self == PRSSEL3_A::PRSCH2
858    }
859    #[doc = "Checks if the value of the field is `PRSCH3`"]
860    #[inline(always)]
861    pub fn is_prsch3(&self) -> bool {
862        *self == PRSSEL3_A::PRSCH3
863    }
864    #[doc = "Checks if the value of the field is `PRSCH4`"]
865    #[inline(always)]
866    pub fn is_prsch4(&self) -> bool {
867        *self == PRSSEL3_A::PRSCH4
868    }
869    #[doc = "Checks if the value of the field is `PRSCH5`"]
870    #[inline(always)]
871    pub fn is_prsch5(&self) -> bool {
872        *self == PRSSEL3_A::PRSCH5
873    }
874    #[doc = "Checks if the value of the field is `PRSCH6`"]
875    #[inline(always)]
876    pub fn is_prsch6(&self) -> bool {
877        *self == PRSSEL3_A::PRSCH6
878    }
879    #[doc = "Checks if the value of the field is `PRSCH7`"]
880    #[inline(always)]
881    pub fn is_prsch7(&self) -> bool {
882        *self == PRSSEL3_A::PRSCH7
883    }
884    #[doc = "Checks if the value of the field is `PRSCH8`"]
885    #[inline(always)]
886    pub fn is_prsch8(&self) -> bool {
887        *self == PRSSEL3_A::PRSCH8
888    }
889    #[doc = "Checks if the value of the field is `PRSCH9`"]
890    #[inline(always)]
891    pub fn is_prsch9(&self) -> bool {
892        *self == PRSSEL3_A::PRSCH9
893    }
894    #[doc = "Checks if the value of the field is `PRSCH10`"]
895    #[inline(always)]
896    pub fn is_prsch10(&self) -> bool {
897        *self == PRSSEL3_A::PRSCH10
898    }
899    #[doc = "Checks if the value of the field is `PRSCH11`"]
900    #[inline(always)]
901    pub fn is_prsch11(&self) -> bool {
902        *self == PRSSEL3_A::PRSCH11
903    }
904    #[doc = "Checks if the value of the field is `PRSCH12`"]
905    #[inline(always)]
906    pub fn is_prsch12(&self) -> bool {
907        *self == PRSSEL3_A::PRSCH12
908    }
909    #[doc = "Checks if the value of the field is `PRSCH13`"]
910    #[inline(always)]
911    pub fn is_prsch13(&self) -> bool {
912        *self == PRSSEL3_A::PRSCH13
913    }
914    #[doc = "Checks if the value of the field is `PRSCH14`"]
915    #[inline(always)]
916    pub fn is_prsch14(&self) -> bool {
917        *self == PRSSEL3_A::PRSCH14
918    }
919    #[doc = "Checks if the value of the field is `PRSCH15`"]
920    #[inline(always)]
921    pub fn is_prsch15(&self) -> bool {
922        *self == PRSSEL3_A::PRSCH15
923    }
924}
925#[doc = "Field `PRSSEL3` writer - LESENSE Decoder PRS Input 3 Configuration"]
926pub type PRSSEL3_W<'a> = crate::FieldWriterSafe<'a, u32, DECCTRL_SPEC, u8, PRSSEL3_A, 4, 25>;
927impl<'a> PRSSEL3_W<'a> {
928    #[doc = "PRS Channel 0 selected as input"]
929    #[inline(always)]
930    pub fn prsch0(self) -> &'a mut W {
931        self.variant(PRSSEL3_A::PRSCH0)
932    }
933    #[doc = "PRS Channel 1 selected as input"]
934    #[inline(always)]
935    pub fn prsch1(self) -> &'a mut W {
936        self.variant(PRSSEL3_A::PRSCH1)
937    }
938    #[doc = "PRS Channel 2 selected as input"]
939    #[inline(always)]
940    pub fn prsch2(self) -> &'a mut W {
941        self.variant(PRSSEL3_A::PRSCH2)
942    }
943    #[doc = "PRS Channel 3 selected as input"]
944    #[inline(always)]
945    pub fn prsch3(self) -> &'a mut W {
946        self.variant(PRSSEL3_A::PRSCH3)
947    }
948    #[doc = "PRS Channel 4 selected as input"]
949    #[inline(always)]
950    pub fn prsch4(self) -> &'a mut W {
951        self.variant(PRSSEL3_A::PRSCH4)
952    }
953    #[doc = "PRS Channel 5 selected as input"]
954    #[inline(always)]
955    pub fn prsch5(self) -> &'a mut W {
956        self.variant(PRSSEL3_A::PRSCH5)
957    }
958    #[doc = "PRS Channel 6 selected as input"]
959    #[inline(always)]
960    pub fn prsch6(self) -> &'a mut W {
961        self.variant(PRSSEL3_A::PRSCH6)
962    }
963    #[doc = "PRS Channel 7 selected as input"]
964    #[inline(always)]
965    pub fn prsch7(self) -> &'a mut W {
966        self.variant(PRSSEL3_A::PRSCH7)
967    }
968    #[doc = "PRS Channel 8 selected as input"]
969    #[inline(always)]
970    pub fn prsch8(self) -> &'a mut W {
971        self.variant(PRSSEL3_A::PRSCH8)
972    }
973    #[doc = "PRS Channel 9 selected as input"]
974    #[inline(always)]
975    pub fn prsch9(self) -> &'a mut W {
976        self.variant(PRSSEL3_A::PRSCH9)
977    }
978    #[doc = "PRS Channel 10 selected as input"]
979    #[inline(always)]
980    pub fn prsch10(self) -> &'a mut W {
981        self.variant(PRSSEL3_A::PRSCH10)
982    }
983    #[doc = "PRS Channel 11 selected as input"]
984    #[inline(always)]
985    pub fn prsch11(self) -> &'a mut W {
986        self.variant(PRSSEL3_A::PRSCH11)
987    }
988    #[doc = "PRS Channel 12 selected as input"]
989    #[inline(always)]
990    pub fn prsch12(self) -> &'a mut W {
991        self.variant(PRSSEL3_A::PRSCH12)
992    }
993    #[doc = "PRS Channel 13 selected as input"]
994    #[inline(always)]
995    pub fn prsch13(self) -> &'a mut W {
996        self.variant(PRSSEL3_A::PRSCH13)
997    }
998    #[doc = "PRS Channel 14 selected as input"]
999    #[inline(always)]
1000    pub fn prsch14(self) -> &'a mut W {
1001        self.variant(PRSSEL3_A::PRSCH14)
1002    }
1003    #[doc = "PRS Channel 15 selected as input"]
1004    #[inline(always)]
1005    pub fn prsch15(self) -> &'a mut W {
1006        self.variant(PRSSEL3_A::PRSCH15)
1007    }
1008}
1009impl R {
1010    #[doc = "Bit 0 - Disable the Decoder"]
1011    #[inline(always)]
1012    pub fn disable(&self) -> DISABLE_R {
1013        DISABLE_R::new((self.bits & 1) != 0)
1014    }
1015    #[doc = "Bit 1 - Enable Check of Current State"]
1016    #[inline(always)]
1017    pub fn errchk(&self) -> ERRCHK_R {
1018        ERRCHK_R::new(((self.bits >> 1) & 1) != 0)
1019    }
1020    #[doc = "Bit 2 - Enable Decoder to Channel Interrupt Mapping"]
1021    #[inline(always)]
1022    pub fn intmap(&self) -> INTMAP_R {
1023        INTMAP_R::new(((self.bits >> 2) & 1) != 0)
1024    }
1025    #[doc = "Bit 3 - Enable Decoder Hysteresis on PRS0 Output"]
1026    #[inline(always)]
1027    pub fn hystprs0(&self) -> HYSTPRS0_R {
1028        HYSTPRS0_R::new(((self.bits >> 3) & 1) != 0)
1029    }
1030    #[doc = "Bit 4 - Enable Decoder Hysteresis on PRS1 Output"]
1031    #[inline(always)]
1032    pub fn hystprs1(&self) -> HYSTPRS1_R {
1033        HYSTPRS1_R::new(((self.bits >> 4) & 1) != 0)
1034    }
1035    #[doc = "Bit 5 - Enable Decoder Hysteresis on PRS2 Output"]
1036    #[inline(always)]
1037    pub fn hystprs2(&self) -> HYSTPRS2_R {
1038        HYSTPRS2_R::new(((self.bits >> 5) & 1) != 0)
1039    }
1040    #[doc = "Bit 6 - Enable Decoder Hysteresis on Interrupt Requests"]
1041    #[inline(always)]
1042    pub fn hystirq(&self) -> HYSTIRQ_R {
1043        HYSTIRQ_R::new(((self.bits >> 6) & 1) != 0)
1044    }
1045    #[doc = "Bit 7 - Enable Count Mode on Decoder PRS Channels 0 and 1"]
1046    #[inline(always)]
1047    pub fn prscnt(&self) -> PRSCNT_R {
1048        PRSCNT_R::new(((self.bits >> 7) & 1) != 0)
1049    }
1050    #[doc = "Bit 8 - LESENSE Decoder Input Configuration"]
1051    #[inline(always)]
1052    pub fn input(&self) -> INPUT_R {
1053        INPUT_R::new(((self.bits >> 8) & 1) != 0)
1054    }
1055    #[doc = "Bits 10:13 - LESENSE Decoder PRS Input 0 Configuration"]
1056    #[inline(always)]
1057    pub fn prssel0(&self) -> PRSSEL0_R {
1058        PRSSEL0_R::new(((self.bits >> 10) & 0x0f) as u8)
1059    }
1060    #[doc = "Bits 15:18 - LESENSE Decoder PRS Input 1 Configuration"]
1061    #[inline(always)]
1062    pub fn prssel1(&self) -> PRSSEL1_R {
1063        PRSSEL1_R::new(((self.bits >> 15) & 0x0f) as u8)
1064    }
1065    #[doc = "Bits 20:23 - LESENSE Decoder PRS Input 2 Configuration"]
1066    #[inline(always)]
1067    pub fn prssel2(&self) -> PRSSEL2_R {
1068        PRSSEL2_R::new(((self.bits >> 20) & 0x0f) as u8)
1069    }
1070    #[doc = "Bits 25:28 - LESENSE Decoder PRS Input 3 Configuration"]
1071    #[inline(always)]
1072    pub fn prssel3(&self) -> PRSSEL3_R {
1073        PRSSEL3_R::new(((self.bits >> 25) & 0x0f) as u8)
1074    }
1075}
1076impl W {
1077    #[doc = "Bit 0 - Disable the Decoder"]
1078    #[inline(always)]
1079    pub fn disable(&mut self) -> DISABLE_W {
1080        DISABLE_W::new(self)
1081    }
1082    #[doc = "Bit 1 - Enable Check of Current State"]
1083    #[inline(always)]
1084    pub fn errchk(&mut self) -> ERRCHK_W {
1085        ERRCHK_W::new(self)
1086    }
1087    #[doc = "Bit 2 - Enable Decoder to Channel Interrupt Mapping"]
1088    #[inline(always)]
1089    pub fn intmap(&mut self) -> INTMAP_W {
1090        INTMAP_W::new(self)
1091    }
1092    #[doc = "Bit 3 - Enable Decoder Hysteresis on PRS0 Output"]
1093    #[inline(always)]
1094    pub fn hystprs0(&mut self) -> HYSTPRS0_W {
1095        HYSTPRS0_W::new(self)
1096    }
1097    #[doc = "Bit 4 - Enable Decoder Hysteresis on PRS1 Output"]
1098    #[inline(always)]
1099    pub fn hystprs1(&mut self) -> HYSTPRS1_W {
1100        HYSTPRS1_W::new(self)
1101    }
1102    #[doc = "Bit 5 - Enable Decoder Hysteresis on PRS2 Output"]
1103    #[inline(always)]
1104    pub fn hystprs2(&mut self) -> HYSTPRS2_W {
1105        HYSTPRS2_W::new(self)
1106    }
1107    #[doc = "Bit 6 - Enable Decoder Hysteresis on Interrupt Requests"]
1108    #[inline(always)]
1109    pub fn hystirq(&mut self) -> HYSTIRQ_W {
1110        HYSTIRQ_W::new(self)
1111    }
1112    #[doc = "Bit 7 - Enable Count Mode on Decoder PRS Channels 0 and 1"]
1113    #[inline(always)]
1114    pub fn prscnt(&mut self) -> PRSCNT_W {
1115        PRSCNT_W::new(self)
1116    }
1117    #[doc = "Bit 8 - LESENSE Decoder Input Configuration"]
1118    #[inline(always)]
1119    pub fn input(&mut self) -> INPUT_W {
1120        INPUT_W::new(self)
1121    }
1122    #[doc = "Bits 10:13 - LESENSE Decoder PRS Input 0 Configuration"]
1123    #[inline(always)]
1124    pub fn prssel0(&mut self) -> PRSSEL0_W {
1125        PRSSEL0_W::new(self)
1126    }
1127    #[doc = "Bits 15:18 - LESENSE Decoder PRS Input 1 Configuration"]
1128    #[inline(always)]
1129    pub fn prssel1(&mut self) -> PRSSEL1_W {
1130        PRSSEL1_W::new(self)
1131    }
1132    #[doc = "Bits 20:23 - LESENSE Decoder PRS Input 2 Configuration"]
1133    #[inline(always)]
1134    pub fn prssel2(&mut self) -> PRSSEL2_W {
1135        PRSSEL2_W::new(self)
1136    }
1137    #[doc = "Bits 25:28 - LESENSE Decoder PRS Input 3 Configuration"]
1138    #[inline(always)]
1139    pub fn prssel3(&mut self) -> PRSSEL3_W {
1140        PRSSEL3_W::new(self)
1141    }
1142    #[doc = "Writes raw bits to the register."]
1143    #[inline(always)]
1144    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1145        self.0.bits(bits);
1146        self
1147    }
1148}
1149#[doc = "Decoder Control 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 [decctrl](index.html) module"]
1150pub struct DECCTRL_SPEC;
1151impl crate::RegisterSpec for DECCTRL_SPEC {
1152    type Ux = u32;
1153}
1154#[doc = "`read()` method returns [decctrl::R](R) reader structure"]
1155impl crate::Readable for DECCTRL_SPEC {
1156    type Reader = R;
1157}
1158#[doc = "`write(|w| ..)` method takes [decctrl::W](W) writer structure"]
1159impl crate::Writable for DECCTRL_SPEC {
1160    type Writer = W;
1161}
1162#[doc = "`reset()` method sets DECCTRL to value 0"]
1163impl crate::Resettable for DECCTRL_SPEC {
1164    #[inline(always)]
1165    fn reset_value() -> Self::Ux {
1166        0
1167    }
1168}