efm32pg12_pac/csen/
scaninputsel1.rs

1#[doc = "Reader of register SCANINPUTSEL1"]
2pub type R = crate::R<u32, super::SCANINPUTSEL1>;
3#[doc = "Writer for register SCANINPUTSEL1"]
4pub type W = crate::W<u32, super::SCANINPUTSEL1>;
5#[doc = "Register SCANINPUTSEL1 `reset()`'s with value 0"]
6impl crate::ResetValue for super::SCANINPUTSEL1 {
7    type Type = u32;
8    #[inline(always)]
9    fn reset_value() -> Self::Type {
10        0
11    }
12}
13#[doc = "CSEN_INPUT32-39 Select\n\nValue on reset: 0"]
14#[derive(Clone, Copy, Debug, PartialEq)]
15#[repr(u8)]
16pub enum INPUT32TO39SEL_A {
17    #[doc = "4: `100`"]
18    APORT1CH0TO7 = 4,
19    #[doc = "5: `101`"]
20    APORT1CH8TO15 = 5,
21    #[doc = "6: `110`"]
22    APORT1CH16TO23 = 6,
23    #[doc = "7: `111`"]
24    APORT1CH24TO31 = 7,
25    #[doc = "12: `1100`"]
26    APORT3CH0TO7 = 12,
27    #[doc = "13: `1101`"]
28    APORT3CH8TO15 = 13,
29    #[doc = "14: `1110`"]
30    APORT3CH16TO23 = 14,
31    #[doc = "15: `1111`"]
32    APORT3CH24TO31 = 15,
33}
34impl From<INPUT32TO39SEL_A> for u8 {
35    #[inline(always)]
36    fn from(variant: INPUT32TO39SEL_A) -> Self {
37        variant as _
38    }
39}
40#[doc = "Reader of field `INPUT32TO39SEL`"]
41pub type INPUT32TO39SEL_R = crate::R<u8, INPUT32TO39SEL_A>;
42impl INPUT32TO39SEL_R {
43    #[doc = r"Get enumerated values variant"]
44    #[inline(always)]
45    pub fn variant(&self) -> crate::Variant<u8, INPUT32TO39SEL_A> {
46        use crate::Variant::*;
47        match self.bits {
48            4 => Val(INPUT32TO39SEL_A::APORT1CH0TO7),
49            5 => Val(INPUT32TO39SEL_A::APORT1CH8TO15),
50            6 => Val(INPUT32TO39SEL_A::APORT1CH16TO23),
51            7 => Val(INPUT32TO39SEL_A::APORT1CH24TO31),
52            12 => Val(INPUT32TO39SEL_A::APORT3CH0TO7),
53            13 => Val(INPUT32TO39SEL_A::APORT3CH8TO15),
54            14 => Val(INPUT32TO39SEL_A::APORT3CH16TO23),
55            15 => Val(INPUT32TO39SEL_A::APORT3CH24TO31),
56            i => Res(i),
57        }
58    }
59    #[doc = "Checks if the value of the field is `APORT1CH0TO7`"]
60    #[inline(always)]
61    pub fn is_aport1ch0to7(&self) -> bool {
62        *self == INPUT32TO39SEL_A::APORT1CH0TO7
63    }
64    #[doc = "Checks if the value of the field is `APORT1CH8TO15`"]
65    #[inline(always)]
66    pub fn is_aport1ch8to15(&self) -> bool {
67        *self == INPUT32TO39SEL_A::APORT1CH8TO15
68    }
69    #[doc = "Checks if the value of the field is `APORT1CH16TO23`"]
70    #[inline(always)]
71    pub fn is_aport1ch16to23(&self) -> bool {
72        *self == INPUT32TO39SEL_A::APORT1CH16TO23
73    }
74    #[doc = "Checks if the value of the field is `APORT1CH24TO31`"]
75    #[inline(always)]
76    pub fn is_aport1ch24to31(&self) -> bool {
77        *self == INPUT32TO39SEL_A::APORT1CH24TO31
78    }
79    #[doc = "Checks if the value of the field is `APORT3CH0TO7`"]
80    #[inline(always)]
81    pub fn is_aport3ch0to7(&self) -> bool {
82        *self == INPUT32TO39SEL_A::APORT3CH0TO7
83    }
84    #[doc = "Checks if the value of the field is `APORT3CH8TO15`"]
85    #[inline(always)]
86    pub fn is_aport3ch8to15(&self) -> bool {
87        *self == INPUT32TO39SEL_A::APORT3CH8TO15
88    }
89    #[doc = "Checks if the value of the field is `APORT3CH16TO23`"]
90    #[inline(always)]
91    pub fn is_aport3ch16to23(&self) -> bool {
92        *self == INPUT32TO39SEL_A::APORT3CH16TO23
93    }
94    #[doc = "Checks if the value of the field is `APORT3CH24TO31`"]
95    #[inline(always)]
96    pub fn is_aport3ch24to31(&self) -> bool {
97        *self == INPUT32TO39SEL_A::APORT3CH24TO31
98    }
99}
100#[doc = "Write proxy for field `INPUT32TO39SEL`"]
101pub struct INPUT32TO39SEL_W<'a> {
102    w: &'a mut W,
103}
104impl<'a> INPUT32TO39SEL_W<'a> {
105    #[doc = r"Writes `variant` to the field"]
106    #[inline(always)]
107    pub fn variant(self, variant: INPUT32TO39SEL_A) -> &'a mut W {
108        unsafe { self.bits(variant.into()) }
109    }
110    #[doc = "`100`"]
111    #[inline(always)]
112    pub fn aport1ch0to7(self) -> &'a mut W {
113        self.variant(INPUT32TO39SEL_A::APORT1CH0TO7)
114    }
115    #[doc = "`101`"]
116    #[inline(always)]
117    pub fn aport1ch8to15(self) -> &'a mut W {
118        self.variant(INPUT32TO39SEL_A::APORT1CH8TO15)
119    }
120    #[doc = "`110`"]
121    #[inline(always)]
122    pub fn aport1ch16to23(self) -> &'a mut W {
123        self.variant(INPUT32TO39SEL_A::APORT1CH16TO23)
124    }
125    #[doc = "`111`"]
126    #[inline(always)]
127    pub fn aport1ch24to31(self) -> &'a mut W {
128        self.variant(INPUT32TO39SEL_A::APORT1CH24TO31)
129    }
130    #[doc = "`1100`"]
131    #[inline(always)]
132    pub fn aport3ch0to7(self) -> &'a mut W {
133        self.variant(INPUT32TO39SEL_A::APORT3CH0TO7)
134    }
135    #[doc = "`1101`"]
136    #[inline(always)]
137    pub fn aport3ch8to15(self) -> &'a mut W {
138        self.variant(INPUT32TO39SEL_A::APORT3CH8TO15)
139    }
140    #[doc = "`1110`"]
141    #[inline(always)]
142    pub fn aport3ch16to23(self) -> &'a mut W {
143        self.variant(INPUT32TO39SEL_A::APORT3CH16TO23)
144    }
145    #[doc = "`1111`"]
146    #[inline(always)]
147    pub fn aport3ch24to31(self) -> &'a mut W {
148        self.variant(INPUT32TO39SEL_A::APORT3CH24TO31)
149    }
150    #[doc = r"Writes raw bits to the field"]
151    #[inline(always)]
152    pub unsafe fn bits(self, value: u8) -> &'a mut W {
153        self.w.bits = (self.w.bits & !0x0f) | ((value as u32) & 0x0f);
154        self.w
155    }
156}
157#[doc = "CSEN_INPUT40-47 Select\n\nValue on reset: 0"]
158#[derive(Clone, Copy, Debug, PartialEq)]
159#[repr(u8)]
160pub enum INPUT40TO47SEL_A {
161    #[doc = "4: `100`"]
162    APORT1CH0TO7 = 4,
163    #[doc = "5: `101`"]
164    APORT1CH8TO15 = 5,
165    #[doc = "6: `110`"]
166    APORT1CH16TO23 = 6,
167    #[doc = "7: `111`"]
168    APORT1CH24TO31 = 7,
169    #[doc = "12: `1100`"]
170    APORT3CH0TO7 = 12,
171    #[doc = "13: `1101`"]
172    APORT3CH8TO15 = 13,
173    #[doc = "14: `1110`"]
174    APORT3CH16TO23 = 14,
175    #[doc = "15: `1111`"]
176    APORT3CH24TO31 = 15,
177}
178impl From<INPUT40TO47SEL_A> for u8 {
179    #[inline(always)]
180    fn from(variant: INPUT40TO47SEL_A) -> Self {
181        variant as _
182    }
183}
184#[doc = "Reader of field `INPUT40TO47SEL`"]
185pub type INPUT40TO47SEL_R = crate::R<u8, INPUT40TO47SEL_A>;
186impl INPUT40TO47SEL_R {
187    #[doc = r"Get enumerated values variant"]
188    #[inline(always)]
189    pub fn variant(&self) -> crate::Variant<u8, INPUT40TO47SEL_A> {
190        use crate::Variant::*;
191        match self.bits {
192            4 => Val(INPUT40TO47SEL_A::APORT1CH0TO7),
193            5 => Val(INPUT40TO47SEL_A::APORT1CH8TO15),
194            6 => Val(INPUT40TO47SEL_A::APORT1CH16TO23),
195            7 => Val(INPUT40TO47SEL_A::APORT1CH24TO31),
196            12 => Val(INPUT40TO47SEL_A::APORT3CH0TO7),
197            13 => Val(INPUT40TO47SEL_A::APORT3CH8TO15),
198            14 => Val(INPUT40TO47SEL_A::APORT3CH16TO23),
199            15 => Val(INPUT40TO47SEL_A::APORT3CH24TO31),
200            i => Res(i),
201        }
202    }
203    #[doc = "Checks if the value of the field is `APORT1CH0TO7`"]
204    #[inline(always)]
205    pub fn is_aport1ch0to7(&self) -> bool {
206        *self == INPUT40TO47SEL_A::APORT1CH0TO7
207    }
208    #[doc = "Checks if the value of the field is `APORT1CH8TO15`"]
209    #[inline(always)]
210    pub fn is_aport1ch8to15(&self) -> bool {
211        *self == INPUT40TO47SEL_A::APORT1CH8TO15
212    }
213    #[doc = "Checks if the value of the field is `APORT1CH16TO23`"]
214    #[inline(always)]
215    pub fn is_aport1ch16to23(&self) -> bool {
216        *self == INPUT40TO47SEL_A::APORT1CH16TO23
217    }
218    #[doc = "Checks if the value of the field is `APORT1CH24TO31`"]
219    #[inline(always)]
220    pub fn is_aport1ch24to31(&self) -> bool {
221        *self == INPUT40TO47SEL_A::APORT1CH24TO31
222    }
223    #[doc = "Checks if the value of the field is `APORT3CH0TO7`"]
224    #[inline(always)]
225    pub fn is_aport3ch0to7(&self) -> bool {
226        *self == INPUT40TO47SEL_A::APORT3CH0TO7
227    }
228    #[doc = "Checks if the value of the field is `APORT3CH8TO15`"]
229    #[inline(always)]
230    pub fn is_aport3ch8to15(&self) -> bool {
231        *self == INPUT40TO47SEL_A::APORT3CH8TO15
232    }
233    #[doc = "Checks if the value of the field is `APORT3CH16TO23`"]
234    #[inline(always)]
235    pub fn is_aport3ch16to23(&self) -> bool {
236        *self == INPUT40TO47SEL_A::APORT3CH16TO23
237    }
238    #[doc = "Checks if the value of the field is `APORT3CH24TO31`"]
239    #[inline(always)]
240    pub fn is_aport3ch24to31(&self) -> bool {
241        *self == INPUT40TO47SEL_A::APORT3CH24TO31
242    }
243}
244#[doc = "Write proxy for field `INPUT40TO47SEL`"]
245pub struct INPUT40TO47SEL_W<'a> {
246    w: &'a mut W,
247}
248impl<'a> INPUT40TO47SEL_W<'a> {
249    #[doc = r"Writes `variant` to the field"]
250    #[inline(always)]
251    pub fn variant(self, variant: INPUT40TO47SEL_A) -> &'a mut W {
252        unsafe { self.bits(variant.into()) }
253    }
254    #[doc = "`100`"]
255    #[inline(always)]
256    pub fn aport1ch0to7(self) -> &'a mut W {
257        self.variant(INPUT40TO47SEL_A::APORT1CH0TO7)
258    }
259    #[doc = "`101`"]
260    #[inline(always)]
261    pub fn aport1ch8to15(self) -> &'a mut W {
262        self.variant(INPUT40TO47SEL_A::APORT1CH8TO15)
263    }
264    #[doc = "`110`"]
265    #[inline(always)]
266    pub fn aport1ch16to23(self) -> &'a mut W {
267        self.variant(INPUT40TO47SEL_A::APORT1CH16TO23)
268    }
269    #[doc = "`111`"]
270    #[inline(always)]
271    pub fn aport1ch24to31(self) -> &'a mut W {
272        self.variant(INPUT40TO47SEL_A::APORT1CH24TO31)
273    }
274    #[doc = "`1100`"]
275    #[inline(always)]
276    pub fn aport3ch0to7(self) -> &'a mut W {
277        self.variant(INPUT40TO47SEL_A::APORT3CH0TO7)
278    }
279    #[doc = "`1101`"]
280    #[inline(always)]
281    pub fn aport3ch8to15(self) -> &'a mut W {
282        self.variant(INPUT40TO47SEL_A::APORT3CH8TO15)
283    }
284    #[doc = "`1110`"]
285    #[inline(always)]
286    pub fn aport3ch16to23(self) -> &'a mut W {
287        self.variant(INPUT40TO47SEL_A::APORT3CH16TO23)
288    }
289    #[doc = "`1111`"]
290    #[inline(always)]
291    pub fn aport3ch24to31(self) -> &'a mut W {
292        self.variant(INPUT40TO47SEL_A::APORT3CH24TO31)
293    }
294    #[doc = r"Writes raw bits to the field"]
295    #[inline(always)]
296    pub unsafe fn bits(self, value: u8) -> &'a mut W {
297        self.w.bits = (self.w.bits & !(0x0f << 8)) | (((value as u32) & 0x0f) << 8);
298        self.w
299    }
300}
301#[doc = "CSEN_INPUT48-55 Select\n\nValue on reset: 0"]
302#[derive(Clone, Copy, Debug, PartialEq)]
303#[repr(u8)]
304pub enum INPUT48TO55SEL_A {
305    #[doc = "4: `100`"]
306    APORT1CH0TO7 = 4,
307    #[doc = "5: `101`"]
308    APORT1CH8TO15 = 5,
309    #[doc = "6: `110`"]
310    APORT1CH16TO23 = 6,
311    #[doc = "7: `111`"]
312    APORT1CH24TO31 = 7,
313    #[doc = "12: `1100`"]
314    APORT3CH0TO7 = 12,
315    #[doc = "13: `1101`"]
316    APORT3CH8TO15 = 13,
317    #[doc = "14: `1110`"]
318    APORT3CH16TO23 = 14,
319    #[doc = "15: `1111`"]
320    APORT3CH24TO31 = 15,
321}
322impl From<INPUT48TO55SEL_A> for u8 {
323    #[inline(always)]
324    fn from(variant: INPUT48TO55SEL_A) -> Self {
325        variant as _
326    }
327}
328#[doc = "Reader of field `INPUT48TO55SEL`"]
329pub type INPUT48TO55SEL_R = crate::R<u8, INPUT48TO55SEL_A>;
330impl INPUT48TO55SEL_R {
331    #[doc = r"Get enumerated values variant"]
332    #[inline(always)]
333    pub fn variant(&self) -> crate::Variant<u8, INPUT48TO55SEL_A> {
334        use crate::Variant::*;
335        match self.bits {
336            4 => Val(INPUT48TO55SEL_A::APORT1CH0TO7),
337            5 => Val(INPUT48TO55SEL_A::APORT1CH8TO15),
338            6 => Val(INPUT48TO55SEL_A::APORT1CH16TO23),
339            7 => Val(INPUT48TO55SEL_A::APORT1CH24TO31),
340            12 => Val(INPUT48TO55SEL_A::APORT3CH0TO7),
341            13 => Val(INPUT48TO55SEL_A::APORT3CH8TO15),
342            14 => Val(INPUT48TO55SEL_A::APORT3CH16TO23),
343            15 => Val(INPUT48TO55SEL_A::APORT3CH24TO31),
344            i => Res(i),
345        }
346    }
347    #[doc = "Checks if the value of the field is `APORT1CH0TO7`"]
348    #[inline(always)]
349    pub fn is_aport1ch0to7(&self) -> bool {
350        *self == INPUT48TO55SEL_A::APORT1CH0TO7
351    }
352    #[doc = "Checks if the value of the field is `APORT1CH8TO15`"]
353    #[inline(always)]
354    pub fn is_aport1ch8to15(&self) -> bool {
355        *self == INPUT48TO55SEL_A::APORT1CH8TO15
356    }
357    #[doc = "Checks if the value of the field is `APORT1CH16TO23`"]
358    #[inline(always)]
359    pub fn is_aport1ch16to23(&self) -> bool {
360        *self == INPUT48TO55SEL_A::APORT1CH16TO23
361    }
362    #[doc = "Checks if the value of the field is `APORT1CH24TO31`"]
363    #[inline(always)]
364    pub fn is_aport1ch24to31(&self) -> bool {
365        *self == INPUT48TO55SEL_A::APORT1CH24TO31
366    }
367    #[doc = "Checks if the value of the field is `APORT3CH0TO7`"]
368    #[inline(always)]
369    pub fn is_aport3ch0to7(&self) -> bool {
370        *self == INPUT48TO55SEL_A::APORT3CH0TO7
371    }
372    #[doc = "Checks if the value of the field is `APORT3CH8TO15`"]
373    #[inline(always)]
374    pub fn is_aport3ch8to15(&self) -> bool {
375        *self == INPUT48TO55SEL_A::APORT3CH8TO15
376    }
377    #[doc = "Checks if the value of the field is `APORT3CH16TO23`"]
378    #[inline(always)]
379    pub fn is_aport3ch16to23(&self) -> bool {
380        *self == INPUT48TO55SEL_A::APORT3CH16TO23
381    }
382    #[doc = "Checks if the value of the field is `APORT3CH24TO31`"]
383    #[inline(always)]
384    pub fn is_aport3ch24to31(&self) -> bool {
385        *self == INPUT48TO55SEL_A::APORT3CH24TO31
386    }
387}
388#[doc = "Write proxy for field `INPUT48TO55SEL`"]
389pub struct INPUT48TO55SEL_W<'a> {
390    w: &'a mut W,
391}
392impl<'a> INPUT48TO55SEL_W<'a> {
393    #[doc = r"Writes `variant` to the field"]
394    #[inline(always)]
395    pub fn variant(self, variant: INPUT48TO55SEL_A) -> &'a mut W {
396        unsafe { self.bits(variant.into()) }
397    }
398    #[doc = "`100`"]
399    #[inline(always)]
400    pub fn aport1ch0to7(self) -> &'a mut W {
401        self.variant(INPUT48TO55SEL_A::APORT1CH0TO7)
402    }
403    #[doc = "`101`"]
404    #[inline(always)]
405    pub fn aport1ch8to15(self) -> &'a mut W {
406        self.variant(INPUT48TO55SEL_A::APORT1CH8TO15)
407    }
408    #[doc = "`110`"]
409    #[inline(always)]
410    pub fn aport1ch16to23(self) -> &'a mut W {
411        self.variant(INPUT48TO55SEL_A::APORT1CH16TO23)
412    }
413    #[doc = "`111`"]
414    #[inline(always)]
415    pub fn aport1ch24to31(self) -> &'a mut W {
416        self.variant(INPUT48TO55SEL_A::APORT1CH24TO31)
417    }
418    #[doc = "`1100`"]
419    #[inline(always)]
420    pub fn aport3ch0to7(self) -> &'a mut W {
421        self.variant(INPUT48TO55SEL_A::APORT3CH0TO7)
422    }
423    #[doc = "`1101`"]
424    #[inline(always)]
425    pub fn aport3ch8to15(self) -> &'a mut W {
426        self.variant(INPUT48TO55SEL_A::APORT3CH8TO15)
427    }
428    #[doc = "`1110`"]
429    #[inline(always)]
430    pub fn aport3ch16to23(self) -> &'a mut W {
431        self.variant(INPUT48TO55SEL_A::APORT3CH16TO23)
432    }
433    #[doc = "`1111`"]
434    #[inline(always)]
435    pub fn aport3ch24to31(self) -> &'a mut W {
436        self.variant(INPUT48TO55SEL_A::APORT3CH24TO31)
437    }
438    #[doc = r"Writes raw bits to the field"]
439    #[inline(always)]
440    pub unsafe fn bits(self, value: u8) -> &'a mut W {
441        self.w.bits = (self.w.bits & !(0x0f << 16)) | (((value as u32) & 0x0f) << 16);
442        self.w
443    }
444}
445#[doc = "CSEN_INPUT56-63 Select\n\nValue on reset: 0"]
446#[derive(Clone, Copy, Debug, PartialEq)]
447#[repr(u8)]
448pub enum INPUT56TO63SEL_A {
449    #[doc = "4: `100`"]
450    APORT1CH0TO7 = 4,
451    #[doc = "5: `101`"]
452    APORT1CH8TO15 = 5,
453    #[doc = "6: `110`"]
454    APORT1CH16TO23 = 6,
455    #[doc = "7: `111`"]
456    APORT1CH24TO31 = 7,
457    #[doc = "12: `1100`"]
458    APORT3CH0TO7 = 12,
459    #[doc = "13: `1101`"]
460    APORT3CH8TO15 = 13,
461    #[doc = "14: `1110`"]
462    APORT3CH16TO23 = 14,
463    #[doc = "15: `1111`"]
464    APORT3CH24TO31 = 15,
465}
466impl From<INPUT56TO63SEL_A> for u8 {
467    #[inline(always)]
468    fn from(variant: INPUT56TO63SEL_A) -> Self {
469        variant as _
470    }
471}
472#[doc = "Reader of field `INPUT56TO63SEL`"]
473pub type INPUT56TO63SEL_R = crate::R<u8, INPUT56TO63SEL_A>;
474impl INPUT56TO63SEL_R {
475    #[doc = r"Get enumerated values variant"]
476    #[inline(always)]
477    pub fn variant(&self) -> crate::Variant<u8, INPUT56TO63SEL_A> {
478        use crate::Variant::*;
479        match self.bits {
480            4 => Val(INPUT56TO63SEL_A::APORT1CH0TO7),
481            5 => Val(INPUT56TO63SEL_A::APORT1CH8TO15),
482            6 => Val(INPUT56TO63SEL_A::APORT1CH16TO23),
483            7 => Val(INPUT56TO63SEL_A::APORT1CH24TO31),
484            12 => Val(INPUT56TO63SEL_A::APORT3CH0TO7),
485            13 => Val(INPUT56TO63SEL_A::APORT3CH8TO15),
486            14 => Val(INPUT56TO63SEL_A::APORT3CH16TO23),
487            15 => Val(INPUT56TO63SEL_A::APORT3CH24TO31),
488            i => Res(i),
489        }
490    }
491    #[doc = "Checks if the value of the field is `APORT1CH0TO7`"]
492    #[inline(always)]
493    pub fn is_aport1ch0to7(&self) -> bool {
494        *self == INPUT56TO63SEL_A::APORT1CH0TO7
495    }
496    #[doc = "Checks if the value of the field is `APORT1CH8TO15`"]
497    #[inline(always)]
498    pub fn is_aport1ch8to15(&self) -> bool {
499        *self == INPUT56TO63SEL_A::APORT1CH8TO15
500    }
501    #[doc = "Checks if the value of the field is `APORT1CH16TO23`"]
502    #[inline(always)]
503    pub fn is_aport1ch16to23(&self) -> bool {
504        *self == INPUT56TO63SEL_A::APORT1CH16TO23
505    }
506    #[doc = "Checks if the value of the field is `APORT1CH24TO31`"]
507    #[inline(always)]
508    pub fn is_aport1ch24to31(&self) -> bool {
509        *self == INPUT56TO63SEL_A::APORT1CH24TO31
510    }
511    #[doc = "Checks if the value of the field is `APORT3CH0TO7`"]
512    #[inline(always)]
513    pub fn is_aport3ch0to7(&self) -> bool {
514        *self == INPUT56TO63SEL_A::APORT3CH0TO7
515    }
516    #[doc = "Checks if the value of the field is `APORT3CH8TO15`"]
517    #[inline(always)]
518    pub fn is_aport3ch8to15(&self) -> bool {
519        *self == INPUT56TO63SEL_A::APORT3CH8TO15
520    }
521    #[doc = "Checks if the value of the field is `APORT3CH16TO23`"]
522    #[inline(always)]
523    pub fn is_aport3ch16to23(&self) -> bool {
524        *self == INPUT56TO63SEL_A::APORT3CH16TO23
525    }
526    #[doc = "Checks if the value of the field is `APORT3CH24TO31`"]
527    #[inline(always)]
528    pub fn is_aport3ch24to31(&self) -> bool {
529        *self == INPUT56TO63SEL_A::APORT3CH24TO31
530    }
531}
532#[doc = "Write proxy for field `INPUT56TO63SEL`"]
533pub struct INPUT56TO63SEL_W<'a> {
534    w: &'a mut W,
535}
536impl<'a> INPUT56TO63SEL_W<'a> {
537    #[doc = r"Writes `variant` to the field"]
538    #[inline(always)]
539    pub fn variant(self, variant: INPUT56TO63SEL_A) -> &'a mut W {
540        unsafe { self.bits(variant.into()) }
541    }
542    #[doc = "`100`"]
543    #[inline(always)]
544    pub fn aport1ch0to7(self) -> &'a mut W {
545        self.variant(INPUT56TO63SEL_A::APORT1CH0TO7)
546    }
547    #[doc = "`101`"]
548    #[inline(always)]
549    pub fn aport1ch8to15(self) -> &'a mut W {
550        self.variant(INPUT56TO63SEL_A::APORT1CH8TO15)
551    }
552    #[doc = "`110`"]
553    #[inline(always)]
554    pub fn aport1ch16to23(self) -> &'a mut W {
555        self.variant(INPUT56TO63SEL_A::APORT1CH16TO23)
556    }
557    #[doc = "`111`"]
558    #[inline(always)]
559    pub fn aport1ch24to31(self) -> &'a mut W {
560        self.variant(INPUT56TO63SEL_A::APORT1CH24TO31)
561    }
562    #[doc = "`1100`"]
563    #[inline(always)]
564    pub fn aport3ch0to7(self) -> &'a mut W {
565        self.variant(INPUT56TO63SEL_A::APORT3CH0TO7)
566    }
567    #[doc = "`1101`"]
568    #[inline(always)]
569    pub fn aport3ch8to15(self) -> &'a mut W {
570        self.variant(INPUT56TO63SEL_A::APORT3CH8TO15)
571    }
572    #[doc = "`1110`"]
573    #[inline(always)]
574    pub fn aport3ch16to23(self) -> &'a mut W {
575        self.variant(INPUT56TO63SEL_A::APORT3CH16TO23)
576    }
577    #[doc = "`1111`"]
578    #[inline(always)]
579    pub fn aport3ch24to31(self) -> &'a mut W {
580        self.variant(INPUT56TO63SEL_A::APORT3CH24TO31)
581    }
582    #[doc = r"Writes raw bits to the field"]
583    #[inline(always)]
584    pub unsafe fn bits(self, value: u8) -> &'a mut W {
585        self.w.bits = (self.w.bits & !(0x0f << 24)) | (((value as u32) & 0x0f) << 24);
586        self.w
587    }
588}
589impl R {
590    #[doc = "Bits 0:3 - CSEN_INPUT32-39 Select"]
591    #[inline(always)]
592    pub fn input32to39sel(&self) -> INPUT32TO39SEL_R {
593        INPUT32TO39SEL_R::new((self.bits & 0x0f) as u8)
594    }
595    #[doc = "Bits 8:11 - CSEN_INPUT40-47 Select"]
596    #[inline(always)]
597    pub fn input40to47sel(&self) -> INPUT40TO47SEL_R {
598        INPUT40TO47SEL_R::new(((self.bits >> 8) & 0x0f) as u8)
599    }
600    #[doc = "Bits 16:19 - CSEN_INPUT48-55 Select"]
601    #[inline(always)]
602    pub fn input48to55sel(&self) -> INPUT48TO55SEL_R {
603        INPUT48TO55SEL_R::new(((self.bits >> 16) & 0x0f) as u8)
604    }
605    #[doc = "Bits 24:27 - CSEN_INPUT56-63 Select"]
606    #[inline(always)]
607    pub fn input56to63sel(&self) -> INPUT56TO63SEL_R {
608        INPUT56TO63SEL_R::new(((self.bits >> 24) & 0x0f) as u8)
609    }
610}
611impl W {
612    #[doc = "Bits 0:3 - CSEN_INPUT32-39 Select"]
613    #[inline(always)]
614    pub fn input32to39sel(&mut self) -> INPUT32TO39SEL_W {
615        INPUT32TO39SEL_W { w: self }
616    }
617    #[doc = "Bits 8:11 - CSEN_INPUT40-47 Select"]
618    #[inline(always)]
619    pub fn input40to47sel(&mut self) -> INPUT40TO47SEL_W {
620        INPUT40TO47SEL_W { w: self }
621    }
622    #[doc = "Bits 16:19 - CSEN_INPUT48-55 Select"]
623    #[inline(always)]
624    pub fn input48to55sel(&mut self) -> INPUT48TO55SEL_W {
625        INPUT48TO55SEL_W { w: self }
626    }
627    #[doc = "Bits 24:27 - CSEN_INPUT56-63 Select"]
628    #[inline(always)]
629    pub fn input56to63sel(&mut self) -> INPUT56TO63SEL_W {
630        INPUT56TO63SEL_W { w: self }
631    }
632}