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