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