1#[doc = "Reader of register IDLECONF"]
2pub type R = crate::R<u32, super::IDLECONF>;
3#[doc = "Writer for register IDLECONF"]
4pub type W = crate::W<u32, super::IDLECONF>;
5#[doc = "Register IDLECONF `reset()`'s with value 0"]
6impl crate::ResetValue for super::IDLECONF {
7 type Type = u32;
8 #[inline(always)]
9 fn reset_value() -> Self::Type {
10 0
11 }
12}
13#[doc = "Channel 0 Idle Phase Configuration\n\nValue on reset: 0"]
14#[derive(Clone, Copy, Debug, PartialEq)]
15#[repr(u8)]
16pub enum CH0_A {
17 #[doc = "0: CH0 output is disabled in idle phase"]
18 DISABLE = 0,
19 #[doc = "1: CH0 output is high in idle phase"]
20 HIGH = 1,
21 #[doc = "2: CH0 output is low in idle phase"]
22 LOW = 2,
23 #[doc = "3: CH0 output is connected to VDAC output in idle phase. Note that this mode is only available on channels "]
24 DAC = 3,
25}
26impl From<CH0_A> for u8 {
27 #[inline(always)]
28 fn from(variant: CH0_A) -> Self {
29 variant as _
30 }
31}
32#[doc = "Reader of field `CH0`"]
33pub type CH0_R = crate::R<u8, CH0_A>;
34impl CH0_R {
35 #[doc = r"Get enumerated values variant"]
36 #[inline(always)]
37 pub fn variant(&self) -> CH0_A {
38 match self.bits {
39 0 => CH0_A::DISABLE,
40 1 => CH0_A::HIGH,
41 2 => CH0_A::LOW,
42 3 => CH0_A::DAC,
43 _ => unreachable!(),
44 }
45 }
46 #[doc = "Checks if the value of the field is `DISABLE`"]
47 #[inline(always)]
48 pub fn is_disable(&self) -> bool {
49 *self == CH0_A::DISABLE
50 }
51 #[doc = "Checks if the value of the field is `HIGH`"]
52 #[inline(always)]
53 pub fn is_high(&self) -> bool {
54 *self == CH0_A::HIGH
55 }
56 #[doc = "Checks if the value of the field is `LOW`"]
57 #[inline(always)]
58 pub fn is_low(&self) -> bool {
59 *self == CH0_A::LOW
60 }
61 #[doc = "Checks if the value of the field is `DAC`"]
62 #[inline(always)]
63 pub fn is_dac(&self) -> bool {
64 *self == CH0_A::DAC
65 }
66}
67#[doc = "Write proxy for field `CH0`"]
68pub struct CH0_W<'a> {
69 w: &'a mut W,
70}
71impl<'a> CH0_W<'a> {
72 #[doc = r"Writes `variant` to the field"]
73 #[inline(always)]
74 pub fn variant(self, variant: CH0_A) -> &'a mut W {
75 {
76 self.bits(variant.into())
77 }
78 }
79 #[doc = "CH0 output is disabled in idle phase"]
80 #[inline(always)]
81 pub fn disable(self) -> &'a mut W {
82 self.variant(CH0_A::DISABLE)
83 }
84 #[doc = "CH0 output is high in idle phase"]
85 #[inline(always)]
86 pub fn high(self) -> &'a mut W {
87 self.variant(CH0_A::HIGH)
88 }
89 #[doc = "CH0 output is low in idle phase"]
90 #[inline(always)]
91 pub fn low(self) -> &'a mut W {
92 self.variant(CH0_A::LOW)
93 }
94 #[doc = "CH0 output is connected to VDAC output in idle phase. Note that this mode is only available on channels"]
95 #[inline(always)]
96 pub fn dac(self) -> &'a mut W {
97 self.variant(CH0_A::DAC)
98 }
99 #[doc = r"Writes raw bits to the field"]
100 #[inline(always)]
101 pub fn bits(self, value: u8) -> &'a mut W {
102 self.w.bits = (self.w.bits & !0x03) | ((value as u32) & 0x03);
103 self.w
104 }
105}
106#[doc = "Channel 1 Idle Phase Configuration\n\nValue on reset: 0"]
107#[derive(Clone, Copy, Debug, PartialEq)]
108#[repr(u8)]
109pub enum CH1_A {
110 #[doc = "0: CH1 output is disabled in idle phase"]
111 DISABLE = 0,
112 #[doc = "1: CH1 output is high in idle phase"]
113 HIGH = 1,
114 #[doc = "2: CH1 output is low in idle phase"]
115 LOW = 2,
116 #[doc = "3: CH1 output is connected to VDAC output in idle phase. Note that this mode is only available on channels "]
117 DAC = 3,
118}
119impl From<CH1_A> for u8 {
120 #[inline(always)]
121 fn from(variant: CH1_A) -> Self {
122 variant as _
123 }
124}
125#[doc = "Reader of field `CH1`"]
126pub type CH1_R = crate::R<u8, CH1_A>;
127impl CH1_R {
128 #[doc = r"Get enumerated values variant"]
129 #[inline(always)]
130 pub fn variant(&self) -> CH1_A {
131 match self.bits {
132 0 => CH1_A::DISABLE,
133 1 => CH1_A::HIGH,
134 2 => CH1_A::LOW,
135 3 => CH1_A::DAC,
136 _ => unreachable!(),
137 }
138 }
139 #[doc = "Checks if the value of the field is `DISABLE`"]
140 #[inline(always)]
141 pub fn is_disable(&self) -> bool {
142 *self == CH1_A::DISABLE
143 }
144 #[doc = "Checks if the value of the field is `HIGH`"]
145 #[inline(always)]
146 pub fn is_high(&self) -> bool {
147 *self == CH1_A::HIGH
148 }
149 #[doc = "Checks if the value of the field is `LOW`"]
150 #[inline(always)]
151 pub fn is_low(&self) -> bool {
152 *self == CH1_A::LOW
153 }
154 #[doc = "Checks if the value of the field is `DAC`"]
155 #[inline(always)]
156 pub fn is_dac(&self) -> bool {
157 *self == CH1_A::DAC
158 }
159}
160#[doc = "Write proxy for field `CH1`"]
161pub struct CH1_W<'a> {
162 w: &'a mut W,
163}
164impl<'a> CH1_W<'a> {
165 #[doc = r"Writes `variant` to the field"]
166 #[inline(always)]
167 pub fn variant(self, variant: CH1_A) -> &'a mut W {
168 {
169 self.bits(variant.into())
170 }
171 }
172 #[doc = "CH1 output is disabled in idle phase"]
173 #[inline(always)]
174 pub fn disable(self) -> &'a mut W {
175 self.variant(CH1_A::DISABLE)
176 }
177 #[doc = "CH1 output is high in idle phase"]
178 #[inline(always)]
179 pub fn high(self) -> &'a mut W {
180 self.variant(CH1_A::HIGH)
181 }
182 #[doc = "CH1 output is low in idle phase"]
183 #[inline(always)]
184 pub fn low(self) -> &'a mut W {
185 self.variant(CH1_A::LOW)
186 }
187 #[doc = "CH1 output is connected to VDAC output in idle phase. Note that this mode is only available on channels"]
188 #[inline(always)]
189 pub fn dac(self) -> &'a mut W {
190 self.variant(CH1_A::DAC)
191 }
192 #[doc = r"Writes raw bits to the field"]
193 #[inline(always)]
194 pub fn bits(self, value: u8) -> &'a mut W {
195 self.w.bits = (self.w.bits & !(0x03 << 2)) | (((value as u32) & 0x03) << 2);
196 self.w
197 }
198}
199#[doc = "Channel 2 Idle Phase Configuration\n\nValue on reset: 0"]
200#[derive(Clone, Copy, Debug, PartialEq)]
201#[repr(u8)]
202pub enum CH2_A {
203 #[doc = "0: CH2 output is disabled in idle phase"]
204 DISABLE = 0,
205 #[doc = "1: CH2 output is high in idle phase"]
206 HIGH = 1,
207 #[doc = "2: CH2 output is low in idle phase"]
208 LOW = 2,
209 #[doc = "3: CH2 output is connected to VDAC output in idle phase. Note that this mode is only available on channels "]
210 DAC = 3,
211}
212impl From<CH2_A> for u8 {
213 #[inline(always)]
214 fn from(variant: CH2_A) -> Self {
215 variant as _
216 }
217}
218#[doc = "Reader of field `CH2`"]
219pub type CH2_R = crate::R<u8, CH2_A>;
220impl CH2_R {
221 #[doc = r"Get enumerated values variant"]
222 #[inline(always)]
223 pub fn variant(&self) -> CH2_A {
224 match self.bits {
225 0 => CH2_A::DISABLE,
226 1 => CH2_A::HIGH,
227 2 => CH2_A::LOW,
228 3 => CH2_A::DAC,
229 _ => unreachable!(),
230 }
231 }
232 #[doc = "Checks if the value of the field is `DISABLE`"]
233 #[inline(always)]
234 pub fn is_disable(&self) -> bool {
235 *self == CH2_A::DISABLE
236 }
237 #[doc = "Checks if the value of the field is `HIGH`"]
238 #[inline(always)]
239 pub fn is_high(&self) -> bool {
240 *self == CH2_A::HIGH
241 }
242 #[doc = "Checks if the value of the field is `LOW`"]
243 #[inline(always)]
244 pub fn is_low(&self) -> bool {
245 *self == CH2_A::LOW
246 }
247 #[doc = "Checks if the value of the field is `DAC`"]
248 #[inline(always)]
249 pub fn is_dac(&self) -> bool {
250 *self == CH2_A::DAC
251 }
252}
253#[doc = "Write proxy for field `CH2`"]
254pub struct CH2_W<'a> {
255 w: &'a mut W,
256}
257impl<'a> CH2_W<'a> {
258 #[doc = r"Writes `variant` to the field"]
259 #[inline(always)]
260 pub fn variant(self, variant: CH2_A) -> &'a mut W {
261 {
262 self.bits(variant.into())
263 }
264 }
265 #[doc = "CH2 output is disabled in idle phase"]
266 #[inline(always)]
267 pub fn disable(self) -> &'a mut W {
268 self.variant(CH2_A::DISABLE)
269 }
270 #[doc = "CH2 output is high in idle phase"]
271 #[inline(always)]
272 pub fn high(self) -> &'a mut W {
273 self.variant(CH2_A::HIGH)
274 }
275 #[doc = "CH2 output is low in idle phase"]
276 #[inline(always)]
277 pub fn low(self) -> &'a mut W {
278 self.variant(CH2_A::LOW)
279 }
280 #[doc = "CH2 output is connected to VDAC output in idle phase. Note that this mode is only available on channels"]
281 #[inline(always)]
282 pub fn dac(self) -> &'a mut W {
283 self.variant(CH2_A::DAC)
284 }
285 #[doc = r"Writes raw bits to the field"]
286 #[inline(always)]
287 pub fn bits(self, value: u8) -> &'a mut W {
288 self.w.bits = (self.w.bits & !(0x03 << 4)) | (((value as u32) & 0x03) << 4);
289 self.w
290 }
291}
292#[doc = "Channel 3 Idle Phase Configuration\n\nValue on reset: 0"]
293#[derive(Clone, Copy, Debug, PartialEq)]
294#[repr(u8)]
295pub enum CH3_A {
296 #[doc = "0: CH3 output is disabled in idle phase"]
297 DISABLE = 0,
298 #[doc = "1: CH3 output is high in idle phase"]
299 HIGH = 1,
300 #[doc = "2: CH3 output is low in idle phase"]
301 LOW = 2,
302 #[doc = "3: CH3 output is connected to VDAC output in idle phase. Note that this mode is only available on channels "]
303 DAC = 3,
304}
305impl From<CH3_A> for u8 {
306 #[inline(always)]
307 fn from(variant: CH3_A) -> Self {
308 variant as _
309 }
310}
311#[doc = "Reader of field `CH3`"]
312pub type CH3_R = crate::R<u8, CH3_A>;
313impl CH3_R {
314 #[doc = r"Get enumerated values variant"]
315 #[inline(always)]
316 pub fn variant(&self) -> CH3_A {
317 match self.bits {
318 0 => CH3_A::DISABLE,
319 1 => CH3_A::HIGH,
320 2 => CH3_A::LOW,
321 3 => CH3_A::DAC,
322 _ => unreachable!(),
323 }
324 }
325 #[doc = "Checks if the value of the field is `DISABLE`"]
326 #[inline(always)]
327 pub fn is_disable(&self) -> bool {
328 *self == CH3_A::DISABLE
329 }
330 #[doc = "Checks if the value of the field is `HIGH`"]
331 #[inline(always)]
332 pub fn is_high(&self) -> bool {
333 *self == CH3_A::HIGH
334 }
335 #[doc = "Checks if the value of the field is `LOW`"]
336 #[inline(always)]
337 pub fn is_low(&self) -> bool {
338 *self == CH3_A::LOW
339 }
340 #[doc = "Checks if the value of the field is `DAC`"]
341 #[inline(always)]
342 pub fn is_dac(&self) -> bool {
343 *self == CH3_A::DAC
344 }
345}
346#[doc = "Write proxy for field `CH3`"]
347pub struct CH3_W<'a> {
348 w: &'a mut W,
349}
350impl<'a> CH3_W<'a> {
351 #[doc = r"Writes `variant` to the field"]
352 #[inline(always)]
353 pub fn variant(self, variant: CH3_A) -> &'a mut W {
354 {
355 self.bits(variant.into())
356 }
357 }
358 #[doc = "CH3 output is disabled in idle phase"]
359 #[inline(always)]
360 pub fn disable(self) -> &'a mut W {
361 self.variant(CH3_A::DISABLE)
362 }
363 #[doc = "CH3 output is high in idle phase"]
364 #[inline(always)]
365 pub fn high(self) -> &'a mut W {
366 self.variant(CH3_A::HIGH)
367 }
368 #[doc = "CH3 output is low in idle phase"]
369 #[inline(always)]
370 pub fn low(self) -> &'a mut W {
371 self.variant(CH3_A::LOW)
372 }
373 #[doc = "CH3 output is connected to VDAC output in idle phase. Note that this mode is only available on channels"]
374 #[inline(always)]
375 pub fn dac(self) -> &'a mut W {
376 self.variant(CH3_A::DAC)
377 }
378 #[doc = r"Writes raw bits to the field"]
379 #[inline(always)]
380 pub fn bits(self, value: u8) -> &'a mut W {
381 self.w.bits = (self.w.bits & !(0x03 << 6)) | (((value as u32) & 0x03) << 6);
382 self.w
383 }
384}
385#[doc = "Channel 4 Idle Phase Configuration\n\nValue on reset: 0"]
386#[derive(Clone, Copy, Debug, PartialEq)]
387#[repr(u8)]
388pub enum CH4_A {
389 #[doc = "0: CH4 output is disabled in idle phase"]
390 DISABLE = 0,
391 #[doc = "1: CH4 output is high in idle phase"]
392 HIGH = 1,
393 #[doc = "2: CH4 output is low in idle phase"]
394 LOW = 2,
395 #[doc = "3: CH4 output is connected to VDAC output in idle phase. Note that this mode is only available on channels "]
396 DAC = 3,
397}
398impl From<CH4_A> for u8 {
399 #[inline(always)]
400 fn from(variant: CH4_A) -> Self {
401 variant as _
402 }
403}
404#[doc = "Reader of field `CH4`"]
405pub type CH4_R = crate::R<u8, CH4_A>;
406impl CH4_R {
407 #[doc = r"Get enumerated values variant"]
408 #[inline(always)]
409 pub fn variant(&self) -> CH4_A {
410 match self.bits {
411 0 => CH4_A::DISABLE,
412 1 => CH4_A::HIGH,
413 2 => CH4_A::LOW,
414 3 => CH4_A::DAC,
415 _ => unreachable!(),
416 }
417 }
418 #[doc = "Checks if the value of the field is `DISABLE`"]
419 #[inline(always)]
420 pub fn is_disable(&self) -> bool {
421 *self == CH4_A::DISABLE
422 }
423 #[doc = "Checks if the value of the field is `HIGH`"]
424 #[inline(always)]
425 pub fn is_high(&self) -> bool {
426 *self == CH4_A::HIGH
427 }
428 #[doc = "Checks if the value of the field is `LOW`"]
429 #[inline(always)]
430 pub fn is_low(&self) -> bool {
431 *self == CH4_A::LOW
432 }
433 #[doc = "Checks if the value of the field is `DAC`"]
434 #[inline(always)]
435 pub fn is_dac(&self) -> bool {
436 *self == CH4_A::DAC
437 }
438}
439#[doc = "Write proxy for field `CH4`"]
440pub struct CH4_W<'a> {
441 w: &'a mut W,
442}
443impl<'a> CH4_W<'a> {
444 #[doc = r"Writes `variant` to the field"]
445 #[inline(always)]
446 pub fn variant(self, variant: CH4_A) -> &'a mut W {
447 {
448 self.bits(variant.into())
449 }
450 }
451 #[doc = "CH4 output is disabled in idle phase"]
452 #[inline(always)]
453 pub fn disable(self) -> &'a mut W {
454 self.variant(CH4_A::DISABLE)
455 }
456 #[doc = "CH4 output is high in idle phase"]
457 #[inline(always)]
458 pub fn high(self) -> &'a mut W {
459 self.variant(CH4_A::HIGH)
460 }
461 #[doc = "CH4 output is low in idle phase"]
462 #[inline(always)]
463 pub fn low(self) -> &'a mut W {
464 self.variant(CH4_A::LOW)
465 }
466 #[doc = "CH4 output is connected to VDAC output in idle phase. Note that this mode is only available on channels"]
467 #[inline(always)]
468 pub fn dac(self) -> &'a mut W {
469 self.variant(CH4_A::DAC)
470 }
471 #[doc = r"Writes raw bits to the field"]
472 #[inline(always)]
473 pub fn bits(self, value: u8) -> &'a mut W {
474 self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u32) & 0x03) << 8);
475 self.w
476 }
477}
478#[doc = "Channel 5 Idle Phase Configuration\n\nValue on reset: 0"]
479#[derive(Clone, Copy, Debug, PartialEq)]
480#[repr(u8)]
481pub enum CH5_A {
482 #[doc = "0: CH5 output is disabled in idle phase"]
483 DISABLE = 0,
484 #[doc = "1: CH5 output is high in idle phase"]
485 HIGH = 1,
486 #[doc = "2: CH5 output is low in idle phase"]
487 LOW = 2,
488 #[doc = "3: CH5 output is connected to VDAC output in idle phase. Note that this mode is only available on channels "]
489 DAC = 3,
490}
491impl From<CH5_A> for u8 {
492 #[inline(always)]
493 fn from(variant: CH5_A) -> Self {
494 variant as _
495 }
496}
497#[doc = "Reader of field `CH5`"]
498pub type CH5_R = crate::R<u8, CH5_A>;
499impl CH5_R {
500 #[doc = r"Get enumerated values variant"]
501 #[inline(always)]
502 pub fn variant(&self) -> CH5_A {
503 match self.bits {
504 0 => CH5_A::DISABLE,
505 1 => CH5_A::HIGH,
506 2 => CH5_A::LOW,
507 3 => CH5_A::DAC,
508 _ => unreachable!(),
509 }
510 }
511 #[doc = "Checks if the value of the field is `DISABLE`"]
512 #[inline(always)]
513 pub fn is_disable(&self) -> bool {
514 *self == CH5_A::DISABLE
515 }
516 #[doc = "Checks if the value of the field is `HIGH`"]
517 #[inline(always)]
518 pub fn is_high(&self) -> bool {
519 *self == CH5_A::HIGH
520 }
521 #[doc = "Checks if the value of the field is `LOW`"]
522 #[inline(always)]
523 pub fn is_low(&self) -> bool {
524 *self == CH5_A::LOW
525 }
526 #[doc = "Checks if the value of the field is `DAC`"]
527 #[inline(always)]
528 pub fn is_dac(&self) -> bool {
529 *self == CH5_A::DAC
530 }
531}
532#[doc = "Write proxy for field `CH5`"]
533pub struct CH5_W<'a> {
534 w: &'a mut W,
535}
536impl<'a> CH5_W<'a> {
537 #[doc = r"Writes `variant` to the field"]
538 #[inline(always)]
539 pub fn variant(self, variant: CH5_A) -> &'a mut W {
540 {
541 self.bits(variant.into())
542 }
543 }
544 #[doc = "CH5 output is disabled in idle phase"]
545 #[inline(always)]
546 pub fn disable(self) -> &'a mut W {
547 self.variant(CH5_A::DISABLE)
548 }
549 #[doc = "CH5 output is high in idle phase"]
550 #[inline(always)]
551 pub fn high(self) -> &'a mut W {
552 self.variant(CH5_A::HIGH)
553 }
554 #[doc = "CH5 output is low in idle phase"]
555 #[inline(always)]
556 pub fn low(self) -> &'a mut W {
557 self.variant(CH5_A::LOW)
558 }
559 #[doc = "CH5 output is connected to VDAC output in idle phase. Note that this mode is only available on channels"]
560 #[inline(always)]
561 pub fn dac(self) -> &'a mut W {
562 self.variant(CH5_A::DAC)
563 }
564 #[doc = r"Writes raw bits to the field"]
565 #[inline(always)]
566 pub fn bits(self, value: u8) -> &'a mut W {
567 self.w.bits = (self.w.bits & !(0x03 << 10)) | (((value as u32) & 0x03) << 10);
568 self.w
569 }
570}
571#[doc = "Channel 6 Idle Phase Configuration\n\nValue on reset: 0"]
572#[derive(Clone, Copy, Debug, PartialEq)]
573#[repr(u8)]
574pub enum CH6_A {
575 #[doc = "0: CH6 output is disabled in idle phase"]
576 DISABLE = 0,
577 #[doc = "1: CH6 output is high in idle phase"]
578 HIGH = 1,
579 #[doc = "2: CH6 output is low in idle phase"]
580 LOW = 2,
581 #[doc = "3: CH6 output is connected to VDAC output in idle phase. Note that this mode is only available on channels "]
582 DAC = 3,
583}
584impl From<CH6_A> for u8 {
585 #[inline(always)]
586 fn from(variant: CH6_A) -> Self {
587 variant as _
588 }
589}
590#[doc = "Reader of field `CH6`"]
591pub type CH6_R = crate::R<u8, CH6_A>;
592impl CH6_R {
593 #[doc = r"Get enumerated values variant"]
594 #[inline(always)]
595 pub fn variant(&self) -> CH6_A {
596 match self.bits {
597 0 => CH6_A::DISABLE,
598 1 => CH6_A::HIGH,
599 2 => CH6_A::LOW,
600 3 => CH6_A::DAC,
601 _ => unreachable!(),
602 }
603 }
604 #[doc = "Checks if the value of the field is `DISABLE`"]
605 #[inline(always)]
606 pub fn is_disable(&self) -> bool {
607 *self == CH6_A::DISABLE
608 }
609 #[doc = "Checks if the value of the field is `HIGH`"]
610 #[inline(always)]
611 pub fn is_high(&self) -> bool {
612 *self == CH6_A::HIGH
613 }
614 #[doc = "Checks if the value of the field is `LOW`"]
615 #[inline(always)]
616 pub fn is_low(&self) -> bool {
617 *self == CH6_A::LOW
618 }
619 #[doc = "Checks if the value of the field is `DAC`"]
620 #[inline(always)]
621 pub fn is_dac(&self) -> bool {
622 *self == CH6_A::DAC
623 }
624}
625#[doc = "Write proxy for field `CH6`"]
626pub struct CH6_W<'a> {
627 w: &'a mut W,
628}
629impl<'a> CH6_W<'a> {
630 #[doc = r"Writes `variant` to the field"]
631 #[inline(always)]
632 pub fn variant(self, variant: CH6_A) -> &'a mut W {
633 {
634 self.bits(variant.into())
635 }
636 }
637 #[doc = "CH6 output is disabled in idle phase"]
638 #[inline(always)]
639 pub fn disable(self) -> &'a mut W {
640 self.variant(CH6_A::DISABLE)
641 }
642 #[doc = "CH6 output is high in idle phase"]
643 #[inline(always)]
644 pub fn high(self) -> &'a mut W {
645 self.variant(CH6_A::HIGH)
646 }
647 #[doc = "CH6 output is low in idle phase"]
648 #[inline(always)]
649 pub fn low(self) -> &'a mut W {
650 self.variant(CH6_A::LOW)
651 }
652 #[doc = "CH6 output is connected to VDAC output in idle phase. Note that this mode is only available on channels"]
653 #[inline(always)]
654 pub fn dac(self) -> &'a mut W {
655 self.variant(CH6_A::DAC)
656 }
657 #[doc = r"Writes raw bits to the field"]
658 #[inline(always)]
659 pub fn bits(self, value: u8) -> &'a mut W {
660 self.w.bits = (self.w.bits & !(0x03 << 12)) | (((value as u32) & 0x03) << 12);
661 self.w
662 }
663}
664#[doc = "Channel 7 Idle Phase Configuration\n\nValue on reset: 0"]
665#[derive(Clone, Copy, Debug, PartialEq)]
666#[repr(u8)]
667pub enum CH7_A {
668 #[doc = "0: CH7 output is disabled in idle phase"]
669 DISABLE = 0,
670 #[doc = "1: CH7 output is high in idle phase"]
671 HIGH = 1,
672 #[doc = "2: CH7 output is low in idle phase"]
673 LOW = 2,
674 #[doc = "3: CH7 output is connected to VDAC output in idle phase. Note that this mode is only available on channels "]
675 DAC = 3,
676}
677impl From<CH7_A> for u8 {
678 #[inline(always)]
679 fn from(variant: CH7_A) -> Self {
680 variant as _
681 }
682}
683#[doc = "Reader of field `CH7`"]
684pub type CH7_R = crate::R<u8, CH7_A>;
685impl CH7_R {
686 #[doc = r"Get enumerated values variant"]
687 #[inline(always)]
688 pub fn variant(&self) -> CH7_A {
689 match self.bits {
690 0 => CH7_A::DISABLE,
691 1 => CH7_A::HIGH,
692 2 => CH7_A::LOW,
693 3 => CH7_A::DAC,
694 _ => unreachable!(),
695 }
696 }
697 #[doc = "Checks if the value of the field is `DISABLE`"]
698 #[inline(always)]
699 pub fn is_disable(&self) -> bool {
700 *self == CH7_A::DISABLE
701 }
702 #[doc = "Checks if the value of the field is `HIGH`"]
703 #[inline(always)]
704 pub fn is_high(&self) -> bool {
705 *self == CH7_A::HIGH
706 }
707 #[doc = "Checks if the value of the field is `LOW`"]
708 #[inline(always)]
709 pub fn is_low(&self) -> bool {
710 *self == CH7_A::LOW
711 }
712 #[doc = "Checks if the value of the field is `DAC`"]
713 #[inline(always)]
714 pub fn is_dac(&self) -> bool {
715 *self == CH7_A::DAC
716 }
717}
718#[doc = "Write proxy for field `CH7`"]
719pub struct CH7_W<'a> {
720 w: &'a mut W,
721}
722impl<'a> CH7_W<'a> {
723 #[doc = r"Writes `variant` to the field"]
724 #[inline(always)]
725 pub fn variant(self, variant: CH7_A) -> &'a mut W {
726 {
727 self.bits(variant.into())
728 }
729 }
730 #[doc = "CH7 output is disabled in idle phase"]
731 #[inline(always)]
732 pub fn disable(self) -> &'a mut W {
733 self.variant(CH7_A::DISABLE)
734 }
735 #[doc = "CH7 output is high in idle phase"]
736 #[inline(always)]
737 pub fn high(self) -> &'a mut W {
738 self.variant(CH7_A::HIGH)
739 }
740 #[doc = "CH7 output is low in idle phase"]
741 #[inline(always)]
742 pub fn low(self) -> &'a mut W {
743 self.variant(CH7_A::LOW)
744 }
745 #[doc = "CH7 output is connected to VDAC output in idle phase. Note that this mode is only available on channels"]
746 #[inline(always)]
747 pub fn dac(self) -> &'a mut W {
748 self.variant(CH7_A::DAC)
749 }
750 #[doc = r"Writes raw bits to the field"]
751 #[inline(always)]
752 pub fn bits(self, value: u8) -> &'a mut W {
753 self.w.bits = (self.w.bits & !(0x03 << 14)) | (((value as u32) & 0x03) << 14);
754 self.w
755 }
756}
757#[doc = "Channel 8 Idle Phase Configuration\n\nValue on reset: 0"]
758#[derive(Clone, Copy, Debug, PartialEq)]
759#[repr(u8)]
760pub enum CH8_A {
761 #[doc = "0: CH8 output is disabled in idle phase"]
762 DISABLE = 0,
763 #[doc = "1: CH8 output is high in idle phase"]
764 HIGH = 1,
765 #[doc = "2: CH8 output is low in idle phase"]
766 LOW = 2,
767 #[doc = "3: CH8 output is connected to VDAC output in idle phase. Note that this mode is only available on channels "]
768 DAC = 3,
769}
770impl From<CH8_A> for u8 {
771 #[inline(always)]
772 fn from(variant: CH8_A) -> Self {
773 variant as _
774 }
775}
776#[doc = "Reader of field `CH8`"]
777pub type CH8_R = crate::R<u8, CH8_A>;
778impl CH8_R {
779 #[doc = r"Get enumerated values variant"]
780 #[inline(always)]
781 pub fn variant(&self) -> CH8_A {
782 match self.bits {
783 0 => CH8_A::DISABLE,
784 1 => CH8_A::HIGH,
785 2 => CH8_A::LOW,
786 3 => CH8_A::DAC,
787 _ => unreachable!(),
788 }
789 }
790 #[doc = "Checks if the value of the field is `DISABLE`"]
791 #[inline(always)]
792 pub fn is_disable(&self) -> bool {
793 *self == CH8_A::DISABLE
794 }
795 #[doc = "Checks if the value of the field is `HIGH`"]
796 #[inline(always)]
797 pub fn is_high(&self) -> bool {
798 *self == CH8_A::HIGH
799 }
800 #[doc = "Checks if the value of the field is `LOW`"]
801 #[inline(always)]
802 pub fn is_low(&self) -> bool {
803 *self == CH8_A::LOW
804 }
805 #[doc = "Checks if the value of the field is `DAC`"]
806 #[inline(always)]
807 pub fn is_dac(&self) -> bool {
808 *self == CH8_A::DAC
809 }
810}
811#[doc = "Write proxy for field `CH8`"]
812pub struct CH8_W<'a> {
813 w: &'a mut W,
814}
815impl<'a> CH8_W<'a> {
816 #[doc = r"Writes `variant` to the field"]
817 #[inline(always)]
818 pub fn variant(self, variant: CH8_A) -> &'a mut W {
819 {
820 self.bits(variant.into())
821 }
822 }
823 #[doc = "CH8 output is disabled in idle phase"]
824 #[inline(always)]
825 pub fn disable(self) -> &'a mut W {
826 self.variant(CH8_A::DISABLE)
827 }
828 #[doc = "CH8 output is high in idle phase"]
829 #[inline(always)]
830 pub fn high(self) -> &'a mut W {
831 self.variant(CH8_A::HIGH)
832 }
833 #[doc = "CH8 output is low in idle phase"]
834 #[inline(always)]
835 pub fn low(self) -> &'a mut W {
836 self.variant(CH8_A::LOW)
837 }
838 #[doc = "CH8 output is connected to VDAC output in idle phase. Note that this mode is only available on channels"]
839 #[inline(always)]
840 pub fn dac(self) -> &'a mut W {
841 self.variant(CH8_A::DAC)
842 }
843 #[doc = r"Writes raw bits to the field"]
844 #[inline(always)]
845 pub fn bits(self, value: u8) -> &'a mut W {
846 self.w.bits = (self.w.bits & !(0x03 << 16)) | (((value as u32) & 0x03) << 16);
847 self.w
848 }
849}
850#[doc = "Channel 9 Idle Phase Configuration\n\nValue on reset: 0"]
851#[derive(Clone, Copy, Debug, PartialEq)]
852#[repr(u8)]
853pub enum CH9_A {
854 #[doc = "0: CH9 output is disabled in idle phase"]
855 DISABLE = 0,
856 #[doc = "1: CH9 output is high in idle phase"]
857 HIGH = 1,
858 #[doc = "2: CH9 output is low in idle phase"]
859 LOW = 2,
860 #[doc = "3: CH9 output is connected to VDAC output in idle phase. Note that this mode is only available on channels "]
861 DAC = 3,
862}
863impl From<CH9_A> for u8 {
864 #[inline(always)]
865 fn from(variant: CH9_A) -> Self {
866 variant as _
867 }
868}
869#[doc = "Reader of field `CH9`"]
870pub type CH9_R = crate::R<u8, CH9_A>;
871impl CH9_R {
872 #[doc = r"Get enumerated values variant"]
873 #[inline(always)]
874 pub fn variant(&self) -> CH9_A {
875 match self.bits {
876 0 => CH9_A::DISABLE,
877 1 => CH9_A::HIGH,
878 2 => CH9_A::LOW,
879 3 => CH9_A::DAC,
880 _ => unreachable!(),
881 }
882 }
883 #[doc = "Checks if the value of the field is `DISABLE`"]
884 #[inline(always)]
885 pub fn is_disable(&self) -> bool {
886 *self == CH9_A::DISABLE
887 }
888 #[doc = "Checks if the value of the field is `HIGH`"]
889 #[inline(always)]
890 pub fn is_high(&self) -> bool {
891 *self == CH9_A::HIGH
892 }
893 #[doc = "Checks if the value of the field is `LOW`"]
894 #[inline(always)]
895 pub fn is_low(&self) -> bool {
896 *self == CH9_A::LOW
897 }
898 #[doc = "Checks if the value of the field is `DAC`"]
899 #[inline(always)]
900 pub fn is_dac(&self) -> bool {
901 *self == CH9_A::DAC
902 }
903}
904#[doc = "Write proxy for field `CH9`"]
905pub struct CH9_W<'a> {
906 w: &'a mut W,
907}
908impl<'a> CH9_W<'a> {
909 #[doc = r"Writes `variant` to the field"]
910 #[inline(always)]
911 pub fn variant(self, variant: CH9_A) -> &'a mut W {
912 {
913 self.bits(variant.into())
914 }
915 }
916 #[doc = "CH9 output is disabled in idle phase"]
917 #[inline(always)]
918 pub fn disable(self) -> &'a mut W {
919 self.variant(CH9_A::DISABLE)
920 }
921 #[doc = "CH9 output is high in idle phase"]
922 #[inline(always)]
923 pub fn high(self) -> &'a mut W {
924 self.variant(CH9_A::HIGH)
925 }
926 #[doc = "CH9 output is low in idle phase"]
927 #[inline(always)]
928 pub fn low(self) -> &'a mut W {
929 self.variant(CH9_A::LOW)
930 }
931 #[doc = "CH9 output is connected to VDAC output in idle phase. Note that this mode is only available on channels"]
932 #[inline(always)]
933 pub fn dac(self) -> &'a mut W {
934 self.variant(CH9_A::DAC)
935 }
936 #[doc = r"Writes raw bits to the field"]
937 #[inline(always)]
938 pub fn bits(self, value: u8) -> &'a mut W {
939 self.w.bits = (self.w.bits & !(0x03 << 18)) | (((value as u32) & 0x03) << 18);
940 self.w
941 }
942}
943#[doc = "Channel 10 Idle Phase Configuration\n\nValue on reset: 0"]
944#[derive(Clone, Copy, Debug, PartialEq)]
945#[repr(u8)]
946pub enum CH10_A {
947 #[doc = "0: CH10 output is disabled in idle phase"]
948 DISABLE = 0,
949 #[doc = "1: CH10 output is high in idle phase"]
950 HIGH = 1,
951 #[doc = "2: CH10 output is low in idle phase"]
952 LOW = 2,
953 #[doc = "3: CH10 output is connected to VDAC output in idle phase. Note that this mode is only available on channels "]
954 DAC = 3,
955}
956impl From<CH10_A> for u8 {
957 #[inline(always)]
958 fn from(variant: CH10_A) -> Self {
959 variant as _
960 }
961}
962#[doc = "Reader of field `CH10`"]
963pub type CH10_R = crate::R<u8, CH10_A>;
964impl CH10_R {
965 #[doc = r"Get enumerated values variant"]
966 #[inline(always)]
967 pub fn variant(&self) -> CH10_A {
968 match self.bits {
969 0 => CH10_A::DISABLE,
970 1 => CH10_A::HIGH,
971 2 => CH10_A::LOW,
972 3 => CH10_A::DAC,
973 _ => unreachable!(),
974 }
975 }
976 #[doc = "Checks if the value of the field is `DISABLE`"]
977 #[inline(always)]
978 pub fn is_disable(&self) -> bool {
979 *self == CH10_A::DISABLE
980 }
981 #[doc = "Checks if the value of the field is `HIGH`"]
982 #[inline(always)]
983 pub fn is_high(&self) -> bool {
984 *self == CH10_A::HIGH
985 }
986 #[doc = "Checks if the value of the field is `LOW`"]
987 #[inline(always)]
988 pub fn is_low(&self) -> bool {
989 *self == CH10_A::LOW
990 }
991 #[doc = "Checks if the value of the field is `DAC`"]
992 #[inline(always)]
993 pub fn is_dac(&self) -> bool {
994 *self == CH10_A::DAC
995 }
996}
997#[doc = "Write proxy for field `CH10`"]
998pub struct CH10_W<'a> {
999 w: &'a mut W,
1000}
1001impl<'a> CH10_W<'a> {
1002 #[doc = r"Writes `variant` to the field"]
1003 #[inline(always)]
1004 pub fn variant(self, variant: CH10_A) -> &'a mut W {
1005 {
1006 self.bits(variant.into())
1007 }
1008 }
1009 #[doc = "CH10 output is disabled in idle phase"]
1010 #[inline(always)]
1011 pub fn disable(self) -> &'a mut W {
1012 self.variant(CH10_A::DISABLE)
1013 }
1014 #[doc = "CH10 output is high in idle phase"]
1015 #[inline(always)]
1016 pub fn high(self) -> &'a mut W {
1017 self.variant(CH10_A::HIGH)
1018 }
1019 #[doc = "CH10 output is low in idle phase"]
1020 #[inline(always)]
1021 pub fn low(self) -> &'a mut W {
1022 self.variant(CH10_A::LOW)
1023 }
1024 #[doc = "CH10 output is connected to VDAC output in idle phase. Note that this mode is only available on channels"]
1025 #[inline(always)]
1026 pub fn dac(self) -> &'a mut W {
1027 self.variant(CH10_A::DAC)
1028 }
1029 #[doc = r"Writes raw bits to the field"]
1030 #[inline(always)]
1031 pub fn bits(self, value: u8) -> &'a mut W {
1032 self.w.bits = (self.w.bits & !(0x03 << 20)) | (((value as u32) & 0x03) << 20);
1033 self.w
1034 }
1035}
1036#[doc = "Channel 11 Idle Phase Configuration\n\nValue on reset: 0"]
1037#[derive(Clone, Copy, Debug, PartialEq)]
1038#[repr(u8)]
1039pub enum CH11_A {
1040 #[doc = "0: CH11 output is disabled in idle phase"]
1041 DISABLE = 0,
1042 #[doc = "1: CH11 output is high in idle phase"]
1043 HIGH = 1,
1044 #[doc = "2: CH11 output is low in idle phase"]
1045 LOW = 2,
1046 #[doc = "3: CH11 output is connected to VDAC output in idle phase. Note that this mode is only available on channels "]
1047 DAC = 3,
1048}
1049impl From<CH11_A> for u8 {
1050 #[inline(always)]
1051 fn from(variant: CH11_A) -> Self {
1052 variant as _
1053 }
1054}
1055#[doc = "Reader of field `CH11`"]
1056pub type CH11_R = crate::R<u8, CH11_A>;
1057impl CH11_R {
1058 #[doc = r"Get enumerated values variant"]
1059 #[inline(always)]
1060 pub fn variant(&self) -> CH11_A {
1061 match self.bits {
1062 0 => CH11_A::DISABLE,
1063 1 => CH11_A::HIGH,
1064 2 => CH11_A::LOW,
1065 3 => CH11_A::DAC,
1066 _ => unreachable!(),
1067 }
1068 }
1069 #[doc = "Checks if the value of the field is `DISABLE`"]
1070 #[inline(always)]
1071 pub fn is_disable(&self) -> bool {
1072 *self == CH11_A::DISABLE
1073 }
1074 #[doc = "Checks if the value of the field is `HIGH`"]
1075 #[inline(always)]
1076 pub fn is_high(&self) -> bool {
1077 *self == CH11_A::HIGH
1078 }
1079 #[doc = "Checks if the value of the field is `LOW`"]
1080 #[inline(always)]
1081 pub fn is_low(&self) -> bool {
1082 *self == CH11_A::LOW
1083 }
1084 #[doc = "Checks if the value of the field is `DAC`"]
1085 #[inline(always)]
1086 pub fn is_dac(&self) -> bool {
1087 *self == CH11_A::DAC
1088 }
1089}
1090#[doc = "Write proxy for field `CH11`"]
1091pub struct CH11_W<'a> {
1092 w: &'a mut W,
1093}
1094impl<'a> CH11_W<'a> {
1095 #[doc = r"Writes `variant` to the field"]
1096 #[inline(always)]
1097 pub fn variant(self, variant: CH11_A) -> &'a mut W {
1098 {
1099 self.bits(variant.into())
1100 }
1101 }
1102 #[doc = "CH11 output is disabled in idle phase"]
1103 #[inline(always)]
1104 pub fn disable(self) -> &'a mut W {
1105 self.variant(CH11_A::DISABLE)
1106 }
1107 #[doc = "CH11 output is high in idle phase"]
1108 #[inline(always)]
1109 pub fn high(self) -> &'a mut W {
1110 self.variant(CH11_A::HIGH)
1111 }
1112 #[doc = "CH11 output is low in idle phase"]
1113 #[inline(always)]
1114 pub fn low(self) -> &'a mut W {
1115 self.variant(CH11_A::LOW)
1116 }
1117 #[doc = "CH11 output is connected to VDAC output in idle phase. Note that this mode is only available on channels"]
1118 #[inline(always)]
1119 pub fn dac(self) -> &'a mut W {
1120 self.variant(CH11_A::DAC)
1121 }
1122 #[doc = r"Writes raw bits to the field"]
1123 #[inline(always)]
1124 pub fn bits(self, value: u8) -> &'a mut W {
1125 self.w.bits = (self.w.bits & !(0x03 << 22)) | (((value as u32) & 0x03) << 22);
1126 self.w
1127 }
1128}
1129#[doc = "Channel 12 Idle Phase Configuration\n\nValue on reset: 0"]
1130#[derive(Clone, Copy, Debug, PartialEq)]
1131#[repr(u8)]
1132pub enum CH12_A {
1133 #[doc = "0: CH12 output is disabled in idle phase"]
1134 DISABLE = 0,
1135 #[doc = "1: CH12 output is high in idle phase"]
1136 HIGH = 1,
1137 #[doc = "2: CH12 output is low in idle phase"]
1138 LOW = 2,
1139 #[doc = "3: CH12 output is connected to VDAC output in idle phase. Note that this mode is only available on channels "]
1140 DAC = 3,
1141}
1142impl From<CH12_A> for u8 {
1143 #[inline(always)]
1144 fn from(variant: CH12_A) -> Self {
1145 variant as _
1146 }
1147}
1148#[doc = "Reader of field `CH12`"]
1149pub type CH12_R = crate::R<u8, CH12_A>;
1150impl CH12_R {
1151 #[doc = r"Get enumerated values variant"]
1152 #[inline(always)]
1153 pub fn variant(&self) -> CH12_A {
1154 match self.bits {
1155 0 => CH12_A::DISABLE,
1156 1 => CH12_A::HIGH,
1157 2 => CH12_A::LOW,
1158 3 => CH12_A::DAC,
1159 _ => unreachable!(),
1160 }
1161 }
1162 #[doc = "Checks if the value of the field is `DISABLE`"]
1163 #[inline(always)]
1164 pub fn is_disable(&self) -> bool {
1165 *self == CH12_A::DISABLE
1166 }
1167 #[doc = "Checks if the value of the field is `HIGH`"]
1168 #[inline(always)]
1169 pub fn is_high(&self) -> bool {
1170 *self == CH12_A::HIGH
1171 }
1172 #[doc = "Checks if the value of the field is `LOW`"]
1173 #[inline(always)]
1174 pub fn is_low(&self) -> bool {
1175 *self == CH12_A::LOW
1176 }
1177 #[doc = "Checks if the value of the field is `DAC`"]
1178 #[inline(always)]
1179 pub fn is_dac(&self) -> bool {
1180 *self == CH12_A::DAC
1181 }
1182}
1183#[doc = "Write proxy for field `CH12`"]
1184pub struct CH12_W<'a> {
1185 w: &'a mut W,
1186}
1187impl<'a> CH12_W<'a> {
1188 #[doc = r"Writes `variant` to the field"]
1189 #[inline(always)]
1190 pub fn variant(self, variant: CH12_A) -> &'a mut W {
1191 {
1192 self.bits(variant.into())
1193 }
1194 }
1195 #[doc = "CH12 output is disabled in idle phase"]
1196 #[inline(always)]
1197 pub fn disable(self) -> &'a mut W {
1198 self.variant(CH12_A::DISABLE)
1199 }
1200 #[doc = "CH12 output is high in idle phase"]
1201 #[inline(always)]
1202 pub fn high(self) -> &'a mut W {
1203 self.variant(CH12_A::HIGH)
1204 }
1205 #[doc = "CH12 output is low in idle phase"]
1206 #[inline(always)]
1207 pub fn low(self) -> &'a mut W {
1208 self.variant(CH12_A::LOW)
1209 }
1210 #[doc = "CH12 output is connected to VDAC output in idle phase. Note that this mode is only available on channels"]
1211 #[inline(always)]
1212 pub fn dac(self) -> &'a mut W {
1213 self.variant(CH12_A::DAC)
1214 }
1215 #[doc = r"Writes raw bits to the field"]
1216 #[inline(always)]
1217 pub fn bits(self, value: u8) -> &'a mut W {
1218 self.w.bits = (self.w.bits & !(0x03 << 24)) | (((value as u32) & 0x03) << 24);
1219 self.w
1220 }
1221}
1222#[doc = "Channel 13 Idle Phase Configuration\n\nValue on reset: 0"]
1223#[derive(Clone, Copy, Debug, PartialEq)]
1224#[repr(u8)]
1225pub enum CH13_A {
1226 #[doc = "0: CH13 output is disabled in idle phase"]
1227 DISABLE = 0,
1228 #[doc = "1: CH13 output is high in idle phase"]
1229 HIGH = 1,
1230 #[doc = "2: CH13 output is low in idle phase"]
1231 LOW = 2,
1232 #[doc = "3: CH13 output is connected to VDAC output in idle phase. Note that this mode is only available on channels "]
1233 DAC = 3,
1234}
1235impl From<CH13_A> for u8 {
1236 #[inline(always)]
1237 fn from(variant: CH13_A) -> Self {
1238 variant as _
1239 }
1240}
1241#[doc = "Reader of field `CH13`"]
1242pub type CH13_R = crate::R<u8, CH13_A>;
1243impl CH13_R {
1244 #[doc = r"Get enumerated values variant"]
1245 #[inline(always)]
1246 pub fn variant(&self) -> CH13_A {
1247 match self.bits {
1248 0 => CH13_A::DISABLE,
1249 1 => CH13_A::HIGH,
1250 2 => CH13_A::LOW,
1251 3 => CH13_A::DAC,
1252 _ => unreachable!(),
1253 }
1254 }
1255 #[doc = "Checks if the value of the field is `DISABLE`"]
1256 #[inline(always)]
1257 pub fn is_disable(&self) -> bool {
1258 *self == CH13_A::DISABLE
1259 }
1260 #[doc = "Checks if the value of the field is `HIGH`"]
1261 #[inline(always)]
1262 pub fn is_high(&self) -> bool {
1263 *self == CH13_A::HIGH
1264 }
1265 #[doc = "Checks if the value of the field is `LOW`"]
1266 #[inline(always)]
1267 pub fn is_low(&self) -> bool {
1268 *self == CH13_A::LOW
1269 }
1270 #[doc = "Checks if the value of the field is `DAC`"]
1271 #[inline(always)]
1272 pub fn is_dac(&self) -> bool {
1273 *self == CH13_A::DAC
1274 }
1275}
1276#[doc = "Write proxy for field `CH13`"]
1277pub struct CH13_W<'a> {
1278 w: &'a mut W,
1279}
1280impl<'a> CH13_W<'a> {
1281 #[doc = r"Writes `variant` to the field"]
1282 #[inline(always)]
1283 pub fn variant(self, variant: CH13_A) -> &'a mut W {
1284 {
1285 self.bits(variant.into())
1286 }
1287 }
1288 #[doc = "CH13 output is disabled in idle phase"]
1289 #[inline(always)]
1290 pub fn disable(self) -> &'a mut W {
1291 self.variant(CH13_A::DISABLE)
1292 }
1293 #[doc = "CH13 output is high in idle phase"]
1294 #[inline(always)]
1295 pub fn high(self) -> &'a mut W {
1296 self.variant(CH13_A::HIGH)
1297 }
1298 #[doc = "CH13 output is low in idle phase"]
1299 #[inline(always)]
1300 pub fn low(self) -> &'a mut W {
1301 self.variant(CH13_A::LOW)
1302 }
1303 #[doc = "CH13 output is connected to VDAC output in idle phase. Note that this mode is only available on channels"]
1304 #[inline(always)]
1305 pub fn dac(self) -> &'a mut W {
1306 self.variant(CH13_A::DAC)
1307 }
1308 #[doc = r"Writes raw bits to the field"]
1309 #[inline(always)]
1310 pub fn bits(self, value: u8) -> &'a mut W {
1311 self.w.bits = (self.w.bits & !(0x03 << 26)) | (((value as u32) & 0x03) << 26);
1312 self.w
1313 }
1314}
1315#[doc = "Channel 14 Idle Phase Configuration\n\nValue on reset: 0"]
1316#[derive(Clone, Copy, Debug, PartialEq)]
1317#[repr(u8)]
1318pub enum CH14_A {
1319 #[doc = "0: CH14 output is disabled in idle phase"]
1320 DISABLE = 0,
1321 #[doc = "1: CH14 output is high in idle phase"]
1322 HIGH = 1,
1323 #[doc = "2: CH14 output is low in idle phase"]
1324 LOW = 2,
1325 #[doc = "3: CH14 output is connected to VDAC output in idle phase. Note that this mode is only available on channels "]
1326 DAC = 3,
1327}
1328impl From<CH14_A> for u8 {
1329 #[inline(always)]
1330 fn from(variant: CH14_A) -> Self {
1331 variant as _
1332 }
1333}
1334#[doc = "Reader of field `CH14`"]
1335pub type CH14_R = crate::R<u8, CH14_A>;
1336impl CH14_R {
1337 #[doc = r"Get enumerated values variant"]
1338 #[inline(always)]
1339 pub fn variant(&self) -> CH14_A {
1340 match self.bits {
1341 0 => CH14_A::DISABLE,
1342 1 => CH14_A::HIGH,
1343 2 => CH14_A::LOW,
1344 3 => CH14_A::DAC,
1345 _ => unreachable!(),
1346 }
1347 }
1348 #[doc = "Checks if the value of the field is `DISABLE`"]
1349 #[inline(always)]
1350 pub fn is_disable(&self) -> bool {
1351 *self == CH14_A::DISABLE
1352 }
1353 #[doc = "Checks if the value of the field is `HIGH`"]
1354 #[inline(always)]
1355 pub fn is_high(&self) -> bool {
1356 *self == CH14_A::HIGH
1357 }
1358 #[doc = "Checks if the value of the field is `LOW`"]
1359 #[inline(always)]
1360 pub fn is_low(&self) -> bool {
1361 *self == CH14_A::LOW
1362 }
1363 #[doc = "Checks if the value of the field is `DAC`"]
1364 #[inline(always)]
1365 pub fn is_dac(&self) -> bool {
1366 *self == CH14_A::DAC
1367 }
1368}
1369#[doc = "Write proxy for field `CH14`"]
1370pub struct CH14_W<'a> {
1371 w: &'a mut W,
1372}
1373impl<'a> CH14_W<'a> {
1374 #[doc = r"Writes `variant` to the field"]
1375 #[inline(always)]
1376 pub fn variant(self, variant: CH14_A) -> &'a mut W {
1377 {
1378 self.bits(variant.into())
1379 }
1380 }
1381 #[doc = "CH14 output is disabled in idle phase"]
1382 #[inline(always)]
1383 pub fn disable(self) -> &'a mut W {
1384 self.variant(CH14_A::DISABLE)
1385 }
1386 #[doc = "CH14 output is high in idle phase"]
1387 #[inline(always)]
1388 pub fn high(self) -> &'a mut W {
1389 self.variant(CH14_A::HIGH)
1390 }
1391 #[doc = "CH14 output is low in idle phase"]
1392 #[inline(always)]
1393 pub fn low(self) -> &'a mut W {
1394 self.variant(CH14_A::LOW)
1395 }
1396 #[doc = "CH14 output is connected to VDAC output in idle phase. Note that this mode is only available on channels"]
1397 #[inline(always)]
1398 pub fn dac(self) -> &'a mut W {
1399 self.variant(CH14_A::DAC)
1400 }
1401 #[doc = r"Writes raw bits to the field"]
1402 #[inline(always)]
1403 pub fn bits(self, value: u8) -> &'a mut W {
1404 self.w.bits = (self.w.bits & !(0x03 << 28)) | (((value as u32) & 0x03) << 28);
1405 self.w
1406 }
1407}
1408#[doc = "Channel 15 Idle Phase Configuration\n\nValue on reset: 0"]
1409#[derive(Clone, Copy, Debug, PartialEq)]
1410#[repr(u8)]
1411pub enum CH15_A {
1412 #[doc = "0: CH15 output is disabled in idle phase"]
1413 DISABLE = 0,
1414 #[doc = "1: CH15 output is high in idle phase"]
1415 HIGH = 1,
1416 #[doc = "2: CH15 output is low in idle phase"]
1417 LOW = 2,
1418 #[doc = "3: CH15 output is connected to VDAC output in idle phase. Note that this mode is only available on channels "]
1419 DAC = 3,
1420}
1421impl From<CH15_A> for u8 {
1422 #[inline(always)]
1423 fn from(variant: CH15_A) -> Self {
1424 variant as _
1425 }
1426}
1427#[doc = "Reader of field `CH15`"]
1428pub type CH15_R = crate::R<u8, CH15_A>;
1429impl CH15_R {
1430 #[doc = r"Get enumerated values variant"]
1431 #[inline(always)]
1432 pub fn variant(&self) -> CH15_A {
1433 match self.bits {
1434 0 => CH15_A::DISABLE,
1435 1 => CH15_A::HIGH,
1436 2 => CH15_A::LOW,
1437 3 => CH15_A::DAC,
1438 _ => unreachable!(),
1439 }
1440 }
1441 #[doc = "Checks if the value of the field is `DISABLE`"]
1442 #[inline(always)]
1443 pub fn is_disable(&self) -> bool {
1444 *self == CH15_A::DISABLE
1445 }
1446 #[doc = "Checks if the value of the field is `HIGH`"]
1447 #[inline(always)]
1448 pub fn is_high(&self) -> bool {
1449 *self == CH15_A::HIGH
1450 }
1451 #[doc = "Checks if the value of the field is `LOW`"]
1452 #[inline(always)]
1453 pub fn is_low(&self) -> bool {
1454 *self == CH15_A::LOW
1455 }
1456 #[doc = "Checks if the value of the field is `DAC`"]
1457 #[inline(always)]
1458 pub fn is_dac(&self) -> bool {
1459 *self == CH15_A::DAC
1460 }
1461}
1462#[doc = "Write proxy for field `CH15`"]
1463pub struct CH15_W<'a> {
1464 w: &'a mut W,
1465}
1466impl<'a> CH15_W<'a> {
1467 #[doc = r"Writes `variant` to the field"]
1468 #[inline(always)]
1469 pub fn variant(self, variant: CH15_A) -> &'a mut W {
1470 {
1471 self.bits(variant.into())
1472 }
1473 }
1474 #[doc = "CH15 output is disabled in idle phase"]
1475 #[inline(always)]
1476 pub fn disable(self) -> &'a mut W {
1477 self.variant(CH15_A::DISABLE)
1478 }
1479 #[doc = "CH15 output is high in idle phase"]
1480 #[inline(always)]
1481 pub fn high(self) -> &'a mut W {
1482 self.variant(CH15_A::HIGH)
1483 }
1484 #[doc = "CH15 output is low in idle phase"]
1485 #[inline(always)]
1486 pub fn low(self) -> &'a mut W {
1487 self.variant(CH15_A::LOW)
1488 }
1489 #[doc = "CH15 output is connected to VDAC output in idle phase. Note that this mode is only available on channels"]
1490 #[inline(always)]
1491 pub fn dac(self) -> &'a mut W {
1492 self.variant(CH15_A::DAC)
1493 }
1494 #[doc = r"Writes raw bits to the field"]
1495 #[inline(always)]
1496 pub fn bits(self, value: u8) -> &'a mut W {
1497 self.w.bits = (self.w.bits & !(0x03 << 30)) | (((value as u32) & 0x03) << 30);
1498 self.w
1499 }
1500}
1501impl R {
1502 #[doc = "Bits 0:1 - Channel 0 Idle Phase Configuration"]
1503 #[inline(always)]
1504 pub fn ch0(&self) -> CH0_R {
1505 CH0_R::new((self.bits & 0x03) as u8)
1506 }
1507 #[doc = "Bits 2:3 - Channel 1 Idle Phase Configuration"]
1508 #[inline(always)]
1509 pub fn ch1(&self) -> CH1_R {
1510 CH1_R::new(((self.bits >> 2) & 0x03) as u8)
1511 }
1512 #[doc = "Bits 4:5 - Channel 2 Idle Phase Configuration"]
1513 #[inline(always)]
1514 pub fn ch2(&self) -> CH2_R {
1515 CH2_R::new(((self.bits >> 4) & 0x03) as u8)
1516 }
1517 #[doc = "Bits 6:7 - Channel 3 Idle Phase Configuration"]
1518 #[inline(always)]
1519 pub fn ch3(&self) -> CH3_R {
1520 CH3_R::new(((self.bits >> 6) & 0x03) as u8)
1521 }
1522 #[doc = "Bits 8:9 - Channel 4 Idle Phase Configuration"]
1523 #[inline(always)]
1524 pub fn ch4(&self) -> CH4_R {
1525 CH4_R::new(((self.bits >> 8) & 0x03) as u8)
1526 }
1527 #[doc = "Bits 10:11 - Channel 5 Idle Phase Configuration"]
1528 #[inline(always)]
1529 pub fn ch5(&self) -> CH5_R {
1530 CH5_R::new(((self.bits >> 10) & 0x03) as u8)
1531 }
1532 #[doc = "Bits 12:13 - Channel 6 Idle Phase Configuration"]
1533 #[inline(always)]
1534 pub fn ch6(&self) -> CH6_R {
1535 CH6_R::new(((self.bits >> 12) & 0x03) as u8)
1536 }
1537 #[doc = "Bits 14:15 - Channel 7 Idle Phase Configuration"]
1538 #[inline(always)]
1539 pub fn ch7(&self) -> CH7_R {
1540 CH7_R::new(((self.bits >> 14) & 0x03) as u8)
1541 }
1542 #[doc = "Bits 16:17 - Channel 8 Idle Phase Configuration"]
1543 #[inline(always)]
1544 pub fn ch8(&self) -> CH8_R {
1545 CH8_R::new(((self.bits >> 16) & 0x03) as u8)
1546 }
1547 #[doc = "Bits 18:19 - Channel 9 Idle Phase Configuration"]
1548 #[inline(always)]
1549 pub fn ch9(&self) -> CH9_R {
1550 CH9_R::new(((self.bits >> 18) & 0x03) as u8)
1551 }
1552 #[doc = "Bits 20:21 - Channel 10 Idle Phase Configuration"]
1553 #[inline(always)]
1554 pub fn ch10(&self) -> CH10_R {
1555 CH10_R::new(((self.bits >> 20) & 0x03) as u8)
1556 }
1557 #[doc = "Bits 22:23 - Channel 11 Idle Phase Configuration"]
1558 #[inline(always)]
1559 pub fn ch11(&self) -> CH11_R {
1560 CH11_R::new(((self.bits >> 22) & 0x03) as u8)
1561 }
1562 #[doc = "Bits 24:25 - Channel 12 Idle Phase Configuration"]
1563 #[inline(always)]
1564 pub fn ch12(&self) -> CH12_R {
1565 CH12_R::new(((self.bits >> 24) & 0x03) as u8)
1566 }
1567 #[doc = "Bits 26:27 - Channel 13 Idle Phase Configuration"]
1568 #[inline(always)]
1569 pub fn ch13(&self) -> CH13_R {
1570 CH13_R::new(((self.bits >> 26) & 0x03) as u8)
1571 }
1572 #[doc = "Bits 28:29 - Channel 14 Idle Phase Configuration"]
1573 #[inline(always)]
1574 pub fn ch14(&self) -> CH14_R {
1575 CH14_R::new(((self.bits >> 28) & 0x03) as u8)
1576 }
1577 #[doc = "Bits 30:31 - Channel 15 Idle Phase Configuration"]
1578 #[inline(always)]
1579 pub fn ch15(&self) -> CH15_R {
1580 CH15_R::new(((self.bits >> 30) & 0x03) as u8)
1581 }
1582}
1583impl W {
1584 #[doc = "Bits 0:1 - Channel 0 Idle Phase Configuration"]
1585 #[inline(always)]
1586 pub fn ch0(&mut self) -> CH0_W {
1587 CH0_W { w: self }
1588 }
1589 #[doc = "Bits 2:3 - Channel 1 Idle Phase Configuration"]
1590 #[inline(always)]
1591 pub fn ch1(&mut self) -> CH1_W {
1592 CH1_W { w: self }
1593 }
1594 #[doc = "Bits 4:5 - Channel 2 Idle Phase Configuration"]
1595 #[inline(always)]
1596 pub fn ch2(&mut self) -> CH2_W {
1597 CH2_W { w: self }
1598 }
1599 #[doc = "Bits 6:7 - Channel 3 Idle Phase Configuration"]
1600 #[inline(always)]
1601 pub fn ch3(&mut self) -> CH3_W {
1602 CH3_W { w: self }
1603 }
1604 #[doc = "Bits 8:9 - Channel 4 Idle Phase Configuration"]
1605 #[inline(always)]
1606 pub fn ch4(&mut self) -> CH4_W {
1607 CH4_W { w: self }
1608 }
1609 #[doc = "Bits 10:11 - Channel 5 Idle Phase Configuration"]
1610 #[inline(always)]
1611 pub fn ch5(&mut self) -> CH5_W {
1612 CH5_W { w: self }
1613 }
1614 #[doc = "Bits 12:13 - Channel 6 Idle Phase Configuration"]
1615 #[inline(always)]
1616 pub fn ch6(&mut self) -> CH6_W {
1617 CH6_W { w: self }
1618 }
1619 #[doc = "Bits 14:15 - Channel 7 Idle Phase Configuration"]
1620 #[inline(always)]
1621 pub fn ch7(&mut self) -> CH7_W {
1622 CH7_W { w: self }
1623 }
1624 #[doc = "Bits 16:17 - Channel 8 Idle Phase Configuration"]
1625 #[inline(always)]
1626 pub fn ch8(&mut self) -> CH8_W {
1627 CH8_W { w: self }
1628 }
1629 #[doc = "Bits 18:19 - Channel 9 Idle Phase Configuration"]
1630 #[inline(always)]
1631 pub fn ch9(&mut self) -> CH9_W {
1632 CH9_W { w: self }
1633 }
1634 #[doc = "Bits 20:21 - Channel 10 Idle Phase Configuration"]
1635 #[inline(always)]
1636 pub fn ch10(&mut self) -> CH10_W {
1637 CH10_W { w: self }
1638 }
1639 #[doc = "Bits 22:23 - Channel 11 Idle Phase Configuration"]
1640 #[inline(always)]
1641 pub fn ch11(&mut self) -> CH11_W {
1642 CH11_W { w: self }
1643 }
1644 #[doc = "Bits 24:25 - Channel 12 Idle Phase Configuration"]
1645 #[inline(always)]
1646 pub fn ch12(&mut self) -> CH12_W {
1647 CH12_W { w: self }
1648 }
1649 #[doc = "Bits 26:27 - Channel 13 Idle Phase Configuration"]
1650 #[inline(always)]
1651 pub fn ch13(&mut self) -> CH13_W {
1652 CH13_W { w: self }
1653 }
1654 #[doc = "Bits 28:29 - Channel 14 Idle Phase Configuration"]
1655 #[inline(always)]
1656 pub fn ch14(&mut self) -> CH14_W {
1657 CH14_W { w: self }
1658 }
1659 #[doc = "Bits 30:31 - Channel 15 Idle Phase Configuration"]
1660 #[inline(always)]
1661 pub fn ch15(&mut self) -> CH15_W {
1662 CH15_W { w: self }
1663 }
1664}