efm32wg230_pac/dac0/
opa1mux.rs

1#[doc = "Register `OPA1MUX` reader"]
2pub struct R(crate::R<OPA1MUX_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<OPA1MUX_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<OPA1MUX_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<OPA1MUX_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `OPA1MUX` writer"]
17pub struct W(crate::W<OPA1MUX_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<OPA1MUX_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<OPA1MUX_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<OPA1MUX_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "OPA1 non-inverting Input Mux\n\nValue on reset: 0"]
38#[derive(Clone, Copy, Debug, PartialEq)]
39#[repr(u8)]
40pub enum POSSEL_A {
41    #[doc = "0: Input disabled"]
42    DISABLE = 0,
43    #[doc = "1: DAC as input"]
44    DAC = 1,
45    #[doc = "2: POS PAD as input"]
46    POSPAD = 2,
47    #[doc = "3: OPA0 as input"]
48    OPA0INP = 3,
49    #[doc = "4: OPA 1 Resistor ladder as input"]
50    OPATAP = 4,
51}
52impl From<POSSEL_A> for u8 {
53    #[inline(always)]
54    fn from(variant: POSSEL_A) -> Self {
55        variant as _
56    }
57}
58#[doc = "Field `POSSEL` reader - OPA1 non-inverting Input Mux"]
59pub type POSSEL_R = crate::FieldReader<u8, POSSEL_A>;
60impl POSSEL_R {
61    #[doc = "Get enumerated values variant"]
62    #[inline(always)]
63    pub fn variant(&self) -> Option<POSSEL_A> {
64        match self.bits {
65            0 => Some(POSSEL_A::DISABLE),
66            1 => Some(POSSEL_A::DAC),
67            2 => Some(POSSEL_A::POSPAD),
68            3 => Some(POSSEL_A::OPA0INP),
69            4 => Some(POSSEL_A::OPATAP),
70            _ => None,
71        }
72    }
73    #[doc = "Checks if the value of the field is `DISABLE`"]
74    #[inline(always)]
75    pub fn is_disable(&self) -> bool {
76        *self == POSSEL_A::DISABLE
77    }
78    #[doc = "Checks if the value of the field is `DAC`"]
79    #[inline(always)]
80    pub fn is_dac(&self) -> bool {
81        *self == POSSEL_A::DAC
82    }
83    #[doc = "Checks if the value of the field is `POSPAD`"]
84    #[inline(always)]
85    pub fn is_pospad(&self) -> bool {
86        *self == POSSEL_A::POSPAD
87    }
88    #[doc = "Checks if the value of the field is `OPA0INP`"]
89    #[inline(always)]
90    pub fn is_opa0inp(&self) -> bool {
91        *self == POSSEL_A::OPA0INP
92    }
93    #[doc = "Checks if the value of the field is `OPATAP`"]
94    #[inline(always)]
95    pub fn is_opatap(&self) -> bool {
96        *self == POSSEL_A::OPATAP
97    }
98}
99#[doc = "Field `POSSEL` writer - OPA1 non-inverting Input Mux"]
100pub type POSSEL_W<'a> = crate::FieldWriter<'a, u32, OPA1MUX_SPEC, u8, POSSEL_A, 3, 0>;
101impl<'a> POSSEL_W<'a> {
102    #[doc = "Input disabled"]
103    #[inline(always)]
104    pub fn disable(self) -> &'a mut W {
105        self.variant(POSSEL_A::DISABLE)
106    }
107    #[doc = "DAC as input"]
108    #[inline(always)]
109    pub fn dac(self) -> &'a mut W {
110        self.variant(POSSEL_A::DAC)
111    }
112    #[doc = "POS PAD as input"]
113    #[inline(always)]
114    pub fn pospad(self) -> &'a mut W {
115        self.variant(POSSEL_A::POSPAD)
116    }
117    #[doc = "OPA0 as input"]
118    #[inline(always)]
119    pub fn opa0inp(self) -> &'a mut W {
120        self.variant(POSSEL_A::OPA0INP)
121    }
122    #[doc = "OPA 1 Resistor ladder as input"]
123    #[inline(always)]
124    pub fn opatap(self) -> &'a mut W {
125        self.variant(POSSEL_A::OPATAP)
126    }
127}
128#[doc = "OPA1 inverting Input Mux\n\nValue on reset: 0"]
129#[derive(Clone, Copy, Debug, PartialEq)]
130#[repr(u8)]
131pub enum NEGSEL_A {
132    #[doc = "0: Input disabled"]
133    DISABLE = 0,
134    #[doc = "1: Unity Gain feedback path"]
135    UG = 1,
136    #[doc = "2: OPA1 Resistor ladder as input"]
137    OPATAP = 2,
138    #[doc = "3: Input from NEG PAD"]
139    NEGPAD = 3,
140}
141impl From<NEGSEL_A> for u8 {
142    #[inline(always)]
143    fn from(variant: NEGSEL_A) -> Self {
144        variant as _
145    }
146}
147#[doc = "Field `NEGSEL` reader - OPA1 inverting Input Mux"]
148pub type NEGSEL_R = crate::FieldReader<u8, NEGSEL_A>;
149impl NEGSEL_R {
150    #[doc = "Get enumerated values variant"]
151    #[inline(always)]
152    pub fn variant(&self) -> NEGSEL_A {
153        match self.bits {
154            0 => NEGSEL_A::DISABLE,
155            1 => NEGSEL_A::UG,
156            2 => NEGSEL_A::OPATAP,
157            3 => NEGSEL_A::NEGPAD,
158            _ => unreachable!(),
159        }
160    }
161    #[doc = "Checks if the value of the field is `DISABLE`"]
162    #[inline(always)]
163    pub fn is_disable(&self) -> bool {
164        *self == NEGSEL_A::DISABLE
165    }
166    #[doc = "Checks if the value of the field is `UG`"]
167    #[inline(always)]
168    pub fn is_ug(&self) -> bool {
169        *self == NEGSEL_A::UG
170    }
171    #[doc = "Checks if the value of the field is `OPATAP`"]
172    #[inline(always)]
173    pub fn is_opatap(&self) -> bool {
174        *self == NEGSEL_A::OPATAP
175    }
176    #[doc = "Checks if the value of the field is `NEGPAD`"]
177    #[inline(always)]
178    pub fn is_negpad(&self) -> bool {
179        *self == NEGSEL_A::NEGPAD
180    }
181}
182#[doc = "Field `NEGSEL` writer - OPA1 inverting Input Mux"]
183pub type NEGSEL_W<'a> = crate::FieldWriterSafe<'a, u32, OPA1MUX_SPEC, u8, NEGSEL_A, 2, 4>;
184impl<'a> NEGSEL_W<'a> {
185    #[doc = "Input disabled"]
186    #[inline(always)]
187    pub fn disable(self) -> &'a mut W {
188        self.variant(NEGSEL_A::DISABLE)
189    }
190    #[doc = "Unity Gain feedback path"]
191    #[inline(always)]
192    pub fn ug(self) -> &'a mut W {
193        self.variant(NEGSEL_A::UG)
194    }
195    #[doc = "OPA1 Resistor ladder as input"]
196    #[inline(always)]
197    pub fn opatap(self) -> &'a mut W {
198        self.variant(NEGSEL_A::OPATAP)
199    }
200    #[doc = "Input from NEG PAD"]
201    #[inline(always)]
202    pub fn negpad(self) -> &'a mut W {
203        self.variant(NEGSEL_A::NEGPAD)
204    }
205}
206#[doc = "OPA1 Resistor Ladder Input Mux\n\nValue on reset: 0"]
207#[derive(Clone, Copy, Debug, PartialEq)]
208#[repr(u8)]
209pub enum RESINMUX_A {
210    #[doc = "0: Set for Unity Gain"]
211    DISABLE = 0,
212    #[doc = "1: Set for OPA0 input"]
213    OPA0INP = 1,
214    #[doc = "2: NEG PAD connected"]
215    NEGPAD = 2,
216    #[doc = "3: POS PAD connected"]
217    POSPAD = 3,
218    #[doc = "4: VSS connected"]
219    VSS = 4,
220}
221impl From<RESINMUX_A> for u8 {
222    #[inline(always)]
223    fn from(variant: RESINMUX_A) -> Self {
224        variant as _
225    }
226}
227#[doc = "Field `RESINMUX` reader - OPA1 Resistor Ladder Input Mux"]
228pub type RESINMUX_R = crate::FieldReader<u8, RESINMUX_A>;
229impl RESINMUX_R {
230    #[doc = "Get enumerated values variant"]
231    #[inline(always)]
232    pub fn variant(&self) -> Option<RESINMUX_A> {
233        match self.bits {
234            0 => Some(RESINMUX_A::DISABLE),
235            1 => Some(RESINMUX_A::OPA0INP),
236            2 => Some(RESINMUX_A::NEGPAD),
237            3 => Some(RESINMUX_A::POSPAD),
238            4 => Some(RESINMUX_A::VSS),
239            _ => None,
240        }
241    }
242    #[doc = "Checks if the value of the field is `DISABLE`"]
243    #[inline(always)]
244    pub fn is_disable(&self) -> bool {
245        *self == RESINMUX_A::DISABLE
246    }
247    #[doc = "Checks if the value of the field is `OPA0INP`"]
248    #[inline(always)]
249    pub fn is_opa0inp(&self) -> bool {
250        *self == RESINMUX_A::OPA0INP
251    }
252    #[doc = "Checks if the value of the field is `NEGPAD`"]
253    #[inline(always)]
254    pub fn is_negpad(&self) -> bool {
255        *self == RESINMUX_A::NEGPAD
256    }
257    #[doc = "Checks if the value of the field is `POSPAD`"]
258    #[inline(always)]
259    pub fn is_pospad(&self) -> bool {
260        *self == RESINMUX_A::POSPAD
261    }
262    #[doc = "Checks if the value of the field is `VSS`"]
263    #[inline(always)]
264    pub fn is_vss(&self) -> bool {
265        *self == RESINMUX_A::VSS
266    }
267}
268#[doc = "Field `RESINMUX` writer - OPA1 Resistor Ladder Input Mux"]
269pub type RESINMUX_W<'a> = crate::FieldWriter<'a, u32, OPA1MUX_SPEC, u8, RESINMUX_A, 3, 8>;
270impl<'a> RESINMUX_W<'a> {
271    #[doc = "Set for Unity Gain"]
272    #[inline(always)]
273    pub fn disable(self) -> &'a mut W {
274        self.variant(RESINMUX_A::DISABLE)
275    }
276    #[doc = "Set for OPA0 input"]
277    #[inline(always)]
278    pub fn opa0inp(self) -> &'a mut W {
279        self.variant(RESINMUX_A::OPA0INP)
280    }
281    #[doc = "NEG PAD connected"]
282    #[inline(always)]
283    pub fn negpad(self) -> &'a mut W {
284        self.variant(RESINMUX_A::NEGPAD)
285    }
286    #[doc = "POS PAD connected"]
287    #[inline(always)]
288    pub fn pospad(self) -> &'a mut W {
289        self.variant(RESINMUX_A::POSPAD)
290    }
291    #[doc = "VSS connected"]
292    #[inline(always)]
293    pub fn vss(self) -> &'a mut W {
294        self.variant(RESINMUX_A::VSS)
295    }
296}
297#[doc = "Field `PPEN` reader - OPA1 Positive Pad Input Enable"]
298pub type PPEN_R = crate::BitReader<bool>;
299#[doc = "Field `PPEN` writer - OPA1 Positive Pad Input Enable"]
300pub type PPEN_W<'a> = crate::BitWriter<'a, u32, OPA1MUX_SPEC, bool, 12>;
301#[doc = "Field `NPEN` reader - OPA1 Negative Pad Input Enable"]
302pub type NPEN_R = crate::BitReader<bool>;
303#[doc = "Field `NPEN` writer - OPA1 Negative Pad Input Enable"]
304pub type NPEN_W<'a> = crate::BitWriter<'a, u32, OPA1MUX_SPEC, bool, 13>;
305#[doc = "OPA1 Output Enable Value\n\nValue on reset: 0"]
306#[derive(Clone, Copy, Debug, PartialEq)]
307#[repr(u8)]
308pub enum OUTPEN_A {
309    #[doc = "1: Alternate Output 0"]
310    OUT0 = 1,
311    #[doc = "2: Alternate Output 1"]
312    OUT1 = 2,
313    #[doc = "4: Alternate Output 2"]
314    OUT2 = 4,
315    #[doc = "8: Alternate Output 3"]
316    OUT3 = 8,
317    #[doc = "16: Alternate Output 4"]
318    OUT4 = 16,
319}
320impl From<OUTPEN_A> for u8 {
321    #[inline(always)]
322    fn from(variant: OUTPEN_A) -> Self {
323        variant as _
324    }
325}
326#[doc = "Field `OUTPEN` reader - OPA1 Output Enable Value"]
327pub type OUTPEN_R = crate::FieldReader<u8, OUTPEN_A>;
328impl OUTPEN_R {
329    #[doc = "Get enumerated values variant"]
330    #[inline(always)]
331    pub fn variant(&self) -> Option<OUTPEN_A> {
332        match self.bits {
333            1 => Some(OUTPEN_A::OUT0),
334            2 => Some(OUTPEN_A::OUT1),
335            4 => Some(OUTPEN_A::OUT2),
336            8 => Some(OUTPEN_A::OUT3),
337            16 => Some(OUTPEN_A::OUT4),
338            _ => None,
339        }
340    }
341    #[doc = "Checks if the value of the field is `OUT0`"]
342    #[inline(always)]
343    pub fn is_out0(&self) -> bool {
344        *self == OUTPEN_A::OUT0
345    }
346    #[doc = "Checks if the value of the field is `OUT1`"]
347    #[inline(always)]
348    pub fn is_out1(&self) -> bool {
349        *self == OUTPEN_A::OUT1
350    }
351    #[doc = "Checks if the value of the field is `OUT2`"]
352    #[inline(always)]
353    pub fn is_out2(&self) -> bool {
354        *self == OUTPEN_A::OUT2
355    }
356    #[doc = "Checks if the value of the field is `OUT3`"]
357    #[inline(always)]
358    pub fn is_out3(&self) -> bool {
359        *self == OUTPEN_A::OUT3
360    }
361    #[doc = "Checks if the value of the field is `OUT4`"]
362    #[inline(always)]
363    pub fn is_out4(&self) -> bool {
364        *self == OUTPEN_A::OUT4
365    }
366}
367#[doc = "Field `OUTPEN` writer - OPA1 Output Enable Value"]
368pub type OUTPEN_W<'a> = crate::FieldWriter<'a, u32, OPA1MUX_SPEC, u8, OUTPEN_A, 5, 14>;
369impl<'a> OUTPEN_W<'a> {
370    #[doc = "Alternate Output 0"]
371    #[inline(always)]
372    pub fn out0(self) -> &'a mut W {
373        self.variant(OUTPEN_A::OUT0)
374    }
375    #[doc = "Alternate Output 1"]
376    #[inline(always)]
377    pub fn out1(self) -> &'a mut W {
378        self.variant(OUTPEN_A::OUT1)
379    }
380    #[doc = "Alternate Output 2"]
381    #[inline(always)]
382    pub fn out2(self) -> &'a mut W {
383        self.variant(OUTPEN_A::OUT2)
384    }
385    #[doc = "Alternate Output 3"]
386    #[inline(always)]
387    pub fn out3(self) -> &'a mut W {
388        self.variant(OUTPEN_A::OUT3)
389    }
390    #[doc = "Alternate Output 4"]
391    #[inline(always)]
392    pub fn out4(self) -> &'a mut W {
393        self.variant(OUTPEN_A::OUT4)
394    }
395}
396#[doc = "Output Select\n\nValue on reset: 0"]
397#[derive(Clone, Copy, Debug, PartialEq)]
398#[repr(u8)]
399pub enum OUTMODE_A {
400    #[doc = "0: OPA0 output is disabled"]
401    DISABLE = 0,
402    #[doc = "1: Main OPA1 output to pin enabled"]
403    MAIN = 1,
404    #[doc = "2: OPA1 alternative output enabled."]
405    ALT = 2,
406    #[doc = "3: Main OPA1 output drives both main and alternative outputs."]
407    ALL = 3,
408}
409impl From<OUTMODE_A> for u8 {
410    #[inline(always)]
411    fn from(variant: OUTMODE_A) -> Self {
412        variant as _
413    }
414}
415#[doc = "Field `OUTMODE` reader - Output Select"]
416pub type OUTMODE_R = crate::FieldReader<u8, OUTMODE_A>;
417impl OUTMODE_R {
418    #[doc = "Get enumerated values variant"]
419    #[inline(always)]
420    pub fn variant(&self) -> OUTMODE_A {
421        match self.bits {
422            0 => OUTMODE_A::DISABLE,
423            1 => OUTMODE_A::MAIN,
424            2 => OUTMODE_A::ALT,
425            3 => OUTMODE_A::ALL,
426            _ => unreachable!(),
427        }
428    }
429    #[doc = "Checks if the value of the field is `DISABLE`"]
430    #[inline(always)]
431    pub fn is_disable(&self) -> bool {
432        *self == OUTMODE_A::DISABLE
433    }
434    #[doc = "Checks if the value of the field is `MAIN`"]
435    #[inline(always)]
436    pub fn is_main(&self) -> bool {
437        *self == OUTMODE_A::MAIN
438    }
439    #[doc = "Checks if the value of the field is `ALT`"]
440    #[inline(always)]
441    pub fn is_alt(&self) -> bool {
442        *self == OUTMODE_A::ALT
443    }
444    #[doc = "Checks if the value of the field is `ALL`"]
445    #[inline(always)]
446    pub fn is_all(&self) -> bool {
447        *self == OUTMODE_A::ALL
448    }
449}
450#[doc = "Field `OUTMODE` writer - Output Select"]
451pub type OUTMODE_W<'a> = crate::FieldWriterSafe<'a, u32, OPA1MUX_SPEC, u8, OUTMODE_A, 2, 22>;
452impl<'a> OUTMODE_W<'a> {
453    #[doc = "OPA0 output is disabled"]
454    #[inline(always)]
455    pub fn disable(self) -> &'a mut W {
456        self.variant(OUTMODE_A::DISABLE)
457    }
458    #[doc = "Main OPA1 output to pin enabled"]
459    #[inline(always)]
460    pub fn main(self) -> &'a mut W {
461        self.variant(OUTMODE_A::MAIN)
462    }
463    #[doc = "OPA1 alternative output enabled."]
464    #[inline(always)]
465    pub fn alt(self) -> &'a mut W {
466        self.variant(OUTMODE_A::ALT)
467    }
468    #[doc = "Main OPA1 output drives both main and alternative outputs."]
469    #[inline(always)]
470    pub fn all(self) -> &'a mut W {
471        self.variant(OUTMODE_A::ALL)
472    }
473}
474#[doc = "Field `NEXTOUT` reader - OPA1 Next Enable"]
475pub type NEXTOUT_R = crate::BitReader<bool>;
476#[doc = "Field `NEXTOUT` writer - OPA1 Next Enable"]
477pub type NEXTOUT_W<'a> = crate::BitWriter<'a, u32, OPA1MUX_SPEC, bool, 26>;
478#[doc = "OPA1 Resistor Ladder Select\n\nValue on reset: 0"]
479#[derive(Clone, Copy, Debug, PartialEq)]
480#[repr(u8)]
481pub enum RESSEL_A {
482    #[doc = "0: Gain of 1/3"]
483    RES0 = 0,
484    #[doc = "1: Gain of 1"]
485    RES1 = 1,
486    #[doc = "2: Gain of 1 2/3"]
487    RES2 = 2,
488    #[doc = "3: Gain of 2"]
489    RES3 = 3,
490    #[doc = "4: Gain of 3"]
491    RES4 = 4,
492    #[doc = "5: Gain of 4 1/3"]
493    RES5 = 5,
494    #[doc = "6: Gain of 7"]
495    RES6 = 6,
496    #[doc = "7: Gain of 15"]
497    RES7 = 7,
498}
499impl From<RESSEL_A> for u8 {
500    #[inline(always)]
501    fn from(variant: RESSEL_A) -> Self {
502        variant as _
503    }
504}
505#[doc = "Field `RESSEL` reader - OPA1 Resistor Ladder Select"]
506pub type RESSEL_R = crate::FieldReader<u8, RESSEL_A>;
507impl RESSEL_R {
508    #[doc = "Get enumerated values variant"]
509    #[inline(always)]
510    pub fn variant(&self) -> RESSEL_A {
511        match self.bits {
512            0 => RESSEL_A::RES0,
513            1 => RESSEL_A::RES1,
514            2 => RESSEL_A::RES2,
515            3 => RESSEL_A::RES3,
516            4 => RESSEL_A::RES4,
517            5 => RESSEL_A::RES5,
518            6 => RESSEL_A::RES6,
519            7 => RESSEL_A::RES7,
520            _ => unreachable!(),
521        }
522    }
523    #[doc = "Checks if the value of the field is `RES0`"]
524    #[inline(always)]
525    pub fn is_res0(&self) -> bool {
526        *self == RESSEL_A::RES0
527    }
528    #[doc = "Checks if the value of the field is `RES1`"]
529    #[inline(always)]
530    pub fn is_res1(&self) -> bool {
531        *self == RESSEL_A::RES1
532    }
533    #[doc = "Checks if the value of the field is `RES2`"]
534    #[inline(always)]
535    pub fn is_res2(&self) -> bool {
536        *self == RESSEL_A::RES2
537    }
538    #[doc = "Checks if the value of the field is `RES3`"]
539    #[inline(always)]
540    pub fn is_res3(&self) -> bool {
541        *self == RESSEL_A::RES3
542    }
543    #[doc = "Checks if the value of the field is `RES4`"]
544    #[inline(always)]
545    pub fn is_res4(&self) -> bool {
546        *self == RESSEL_A::RES4
547    }
548    #[doc = "Checks if the value of the field is `RES5`"]
549    #[inline(always)]
550    pub fn is_res5(&self) -> bool {
551        *self == RESSEL_A::RES5
552    }
553    #[doc = "Checks if the value of the field is `RES6`"]
554    #[inline(always)]
555    pub fn is_res6(&self) -> bool {
556        *self == RESSEL_A::RES6
557    }
558    #[doc = "Checks if the value of the field is `RES7`"]
559    #[inline(always)]
560    pub fn is_res7(&self) -> bool {
561        *self == RESSEL_A::RES7
562    }
563}
564#[doc = "Field `RESSEL` writer - OPA1 Resistor Ladder Select"]
565pub type RESSEL_W<'a> = crate::FieldWriterSafe<'a, u32, OPA1MUX_SPEC, u8, RESSEL_A, 3, 28>;
566impl<'a> RESSEL_W<'a> {
567    #[doc = "Gain of 1/3"]
568    #[inline(always)]
569    pub fn res0(self) -> &'a mut W {
570        self.variant(RESSEL_A::RES0)
571    }
572    #[doc = "Gain of 1"]
573    #[inline(always)]
574    pub fn res1(self) -> &'a mut W {
575        self.variant(RESSEL_A::RES1)
576    }
577    #[doc = "Gain of 1 2/3"]
578    #[inline(always)]
579    pub fn res2(self) -> &'a mut W {
580        self.variant(RESSEL_A::RES2)
581    }
582    #[doc = "Gain of 2"]
583    #[inline(always)]
584    pub fn res3(self) -> &'a mut W {
585        self.variant(RESSEL_A::RES3)
586    }
587    #[doc = "Gain of 3"]
588    #[inline(always)]
589    pub fn res4(self) -> &'a mut W {
590        self.variant(RESSEL_A::RES4)
591    }
592    #[doc = "Gain of 4 1/3"]
593    #[inline(always)]
594    pub fn res5(self) -> &'a mut W {
595        self.variant(RESSEL_A::RES5)
596    }
597    #[doc = "Gain of 7"]
598    #[inline(always)]
599    pub fn res6(self) -> &'a mut W {
600        self.variant(RESSEL_A::RES6)
601    }
602    #[doc = "Gain of 15"]
603    #[inline(always)]
604    pub fn res7(self) -> &'a mut W {
605        self.variant(RESSEL_A::RES7)
606    }
607}
608impl R {
609    #[doc = "Bits 0:2 - OPA1 non-inverting Input Mux"]
610    #[inline(always)]
611    pub fn possel(&self) -> POSSEL_R {
612        POSSEL_R::new((self.bits & 7) as u8)
613    }
614    #[doc = "Bits 4:5 - OPA1 inverting Input Mux"]
615    #[inline(always)]
616    pub fn negsel(&self) -> NEGSEL_R {
617        NEGSEL_R::new(((self.bits >> 4) & 3) as u8)
618    }
619    #[doc = "Bits 8:10 - OPA1 Resistor Ladder Input Mux"]
620    #[inline(always)]
621    pub fn resinmux(&self) -> RESINMUX_R {
622        RESINMUX_R::new(((self.bits >> 8) & 7) as u8)
623    }
624    #[doc = "Bit 12 - OPA1 Positive Pad Input Enable"]
625    #[inline(always)]
626    pub fn ppen(&self) -> PPEN_R {
627        PPEN_R::new(((self.bits >> 12) & 1) != 0)
628    }
629    #[doc = "Bit 13 - OPA1 Negative Pad Input Enable"]
630    #[inline(always)]
631    pub fn npen(&self) -> NPEN_R {
632        NPEN_R::new(((self.bits >> 13) & 1) != 0)
633    }
634    #[doc = "Bits 14:18 - OPA1 Output Enable Value"]
635    #[inline(always)]
636    pub fn outpen(&self) -> OUTPEN_R {
637        OUTPEN_R::new(((self.bits >> 14) & 0x1f) as u8)
638    }
639    #[doc = "Bits 22:23 - Output Select"]
640    #[inline(always)]
641    pub fn outmode(&self) -> OUTMODE_R {
642        OUTMODE_R::new(((self.bits >> 22) & 3) as u8)
643    }
644    #[doc = "Bit 26 - OPA1 Next Enable"]
645    #[inline(always)]
646    pub fn nextout(&self) -> NEXTOUT_R {
647        NEXTOUT_R::new(((self.bits >> 26) & 1) != 0)
648    }
649    #[doc = "Bits 28:30 - OPA1 Resistor Ladder Select"]
650    #[inline(always)]
651    pub fn ressel(&self) -> RESSEL_R {
652        RESSEL_R::new(((self.bits >> 28) & 7) as u8)
653    }
654}
655impl W {
656    #[doc = "Bits 0:2 - OPA1 non-inverting Input Mux"]
657    #[inline(always)]
658    pub fn possel(&mut self) -> POSSEL_W {
659        POSSEL_W::new(self)
660    }
661    #[doc = "Bits 4:5 - OPA1 inverting Input Mux"]
662    #[inline(always)]
663    pub fn negsel(&mut self) -> NEGSEL_W {
664        NEGSEL_W::new(self)
665    }
666    #[doc = "Bits 8:10 - OPA1 Resistor Ladder Input Mux"]
667    #[inline(always)]
668    pub fn resinmux(&mut self) -> RESINMUX_W {
669        RESINMUX_W::new(self)
670    }
671    #[doc = "Bit 12 - OPA1 Positive Pad Input Enable"]
672    #[inline(always)]
673    pub fn ppen(&mut self) -> PPEN_W {
674        PPEN_W::new(self)
675    }
676    #[doc = "Bit 13 - OPA1 Negative Pad Input Enable"]
677    #[inline(always)]
678    pub fn npen(&mut self) -> NPEN_W {
679        NPEN_W::new(self)
680    }
681    #[doc = "Bits 14:18 - OPA1 Output Enable Value"]
682    #[inline(always)]
683    pub fn outpen(&mut self) -> OUTPEN_W {
684        OUTPEN_W::new(self)
685    }
686    #[doc = "Bits 22:23 - Output Select"]
687    #[inline(always)]
688    pub fn outmode(&mut self) -> OUTMODE_W {
689        OUTMODE_W::new(self)
690    }
691    #[doc = "Bit 26 - OPA1 Next Enable"]
692    #[inline(always)]
693    pub fn nextout(&mut self) -> NEXTOUT_W {
694        NEXTOUT_W::new(self)
695    }
696    #[doc = "Bits 28:30 - OPA1 Resistor Ladder Select"]
697    #[inline(always)]
698    pub fn ressel(&mut self) -> RESSEL_W {
699        RESSEL_W::new(self)
700    }
701    #[doc = "Writes raw bits to the register."]
702    #[inline(always)]
703    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
704        self.0.bits(bits);
705        self
706    }
707}
708#[doc = "Operational Amplifier Mux Configuration Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [opa1mux](index.html) module"]
709pub struct OPA1MUX_SPEC;
710impl crate::RegisterSpec for OPA1MUX_SPEC {
711    type Ux = u32;
712}
713#[doc = "`read()` method returns [opa1mux::R](R) reader structure"]
714impl crate::Readable for OPA1MUX_SPEC {
715    type Reader = R;
716}
717#[doc = "`write(|w| ..)` method takes [opa1mux::W](W) writer structure"]
718impl crate::Writable for OPA1MUX_SPEC {
719    type Writer = W;
720}
721#[doc = "`reset()` method sets OPA1MUX to value 0"]
722impl crate::Resettable for OPA1MUX_SPEC {
723    #[inline(always)]
724    fn reset_value() -> Self::Ux {
725        0
726    }
727}