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