efm32pg12_pac/adc0/
scaninputsel.rs

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