1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
#[doc = "Register `CTL` reader"]
pub type R = crate::R<CtlSpec>;
#[doc = "Register `CTL` writer"]
pub type W = crate::W<CtlSpec>;
#[doc = "DAC0 enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Den0 {
    #[doc = "0: DAC channel disabled"]
    Disabled = 0,
    #[doc = "1: DAC channel enabled"]
    Enabled = 1,
}
impl From<Den0> for bool {
    #[inline(always)]
    fn from(variant: Den0) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `DEN0` reader - DAC0 enable"]
pub type Den0R = crate::BitReader<Den0>;
impl Den0R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Den0 {
        match self.bits {
            false => Den0::Disabled,
            true => Den0::Enabled,
        }
    }
    #[doc = "DAC channel disabled"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        *self == Den0::Disabled
    }
    #[doc = "DAC channel enabled"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        *self == Den0::Enabled
    }
}
#[doc = "Field `DEN0` writer - DAC0 enable"]
pub type Den0W<'a, REG> = crate::BitWriter<'a, REG, Den0>;
impl<'a, REG> Den0W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "DAC channel disabled"]
    #[inline(always)]
    pub fn disabled(self) -> &'a mut crate::W<REG> {
        self.variant(Den0::Disabled)
    }
    #[doc = "DAC channel enabled"]
    #[inline(always)]
    pub fn enabled(self) -> &'a mut crate::W<REG> {
        self.variant(Den0::Enabled)
    }
}
#[doc = "DAC0 output buffer turn off\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Dboff0 {
    #[doc = "0: DAC X output buffer enabled"]
    Enabled = 0,
    #[doc = "1: DAC X output buffer disabled"]
    Disabled = 1,
}
impl From<Dboff0> for bool {
    #[inline(always)]
    fn from(variant: Dboff0) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `DBOFF0` reader - DAC0 output buffer turn off"]
pub type Dboff0R = crate::BitReader<Dboff0>;
impl Dboff0R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Dboff0 {
        match self.bits {
            false => Dboff0::Enabled,
            true => Dboff0::Disabled,
        }
    }
    #[doc = "DAC X output buffer enabled"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        *self == Dboff0::Enabled
    }
    #[doc = "DAC X output buffer disabled"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        *self == Dboff0::Disabled
    }
}
#[doc = "Field `DBOFF0` writer - DAC0 output buffer turn off"]
pub type Dboff0W<'a, REG> = crate::BitWriter<'a, REG, Dboff0>;
impl<'a, REG> Dboff0W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "DAC X output buffer enabled"]
    #[inline(always)]
    pub fn enabled(self) -> &'a mut crate::W<REG> {
        self.variant(Dboff0::Enabled)
    }
    #[doc = "DAC X output buffer disabled"]
    #[inline(always)]
    pub fn disabled(self) -> &'a mut crate::W<REG> {
        self.variant(Dboff0::Disabled)
    }
}
#[doc = "DAC0 trigger enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Dten0 {
    #[doc = "0: DAC trigger disabled"]
    Disabled = 0,
    #[doc = "1: DAC trigger enabled"]
    Enabled = 1,
}
impl From<Dten0> for bool {
    #[inline(always)]
    fn from(variant: Dten0) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `DTEN0` reader - DAC0 trigger enable"]
pub type Dten0R = crate::BitReader<Dten0>;
impl Dten0R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Dten0 {
        match self.bits {
            false => Dten0::Disabled,
            true => Dten0::Enabled,
        }
    }
    #[doc = "DAC trigger disabled"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        *self == Dten0::Disabled
    }
    #[doc = "DAC trigger enabled"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        *self == Dten0::Enabled
    }
}
#[doc = "Field `DTEN0` writer - DAC0 trigger enable"]
pub type Dten0W<'a, REG> = crate::BitWriter<'a, REG, Dten0>;
impl<'a, REG> Dten0W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "DAC trigger disabled"]
    #[inline(always)]
    pub fn disabled(self) -> &'a mut crate::W<REG> {
        self.variant(Dten0::Disabled)
    }
    #[doc = "DAC trigger enabled"]
    #[inline(always)]
    pub fn enabled(self) -> &'a mut crate::W<REG> {
        self.variant(Dten0::Enabled)
    }
}
#[doc = "DAC0 trigger selection\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Dtsel0 {
    #[doc = "0: Timer 5 TRGO event"]
    Timer5Trgo = 0,
    #[doc = "1: Timer 2 TRGO event"]
    Timer2Trgo = 1,
    #[doc = "3: Timer 14 TRGO event"]
    Timer14Trgo = 3,
    #[doc = "4: Timer 1 TRGO event"]
    Timer1Trgo = 4,
    #[doc = "6: External line9"]
    External9 = 6,
    #[doc = "7: Software trigger"]
    Software = 7,
}
impl From<Dtsel0> for u8 {
    #[inline(always)]
    fn from(variant: Dtsel0) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Dtsel0 {
    type Ux = u8;
}
#[doc = "Field `DTSEL0` reader - DAC0 trigger selection"]
pub type Dtsel0R = crate::FieldReader<Dtsel0>;
impl Dtsel0R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<Dtsel0> {
        match self.bits {
            0 => Some(Dtsel0::Timer5Trgo),
            1 => Some(Dtsel0::Timer2Trgo),
            3 => Some(Dtsel0::Timer14Trgo),
            4 => Some(Dtsel0::Timer1Trgo),
            6 => Some(Dtsel0::External9),
            7 => Some(Dtsel0::Software),
            _ => None,
        }
    }
    #[doc = "Timer 5 TRGO event"]
    #[inline(always)]
    pub fn is_timer5_trgo(&self) -> bool {
        *self == Dtsel0::Timer5Trgo
    }
    #[doc = "Timer 2 TRGO event"]
    #[inline(always)]
    pub fn is_timer2_trgo(&self) -> bool {
        *self == Dtsel0::Timer2Trgo
    }
    #[doc = "Timer 14 TRGO event"]
    #[inline(always)]
    pub fn is_timer14_trgo(&self) -> bool {
        *self == Dtsel0::Timer14Trgo
    }
    #[doc = "Timer 1 TRGO event"]
    #[inline(always)]
    pub fn is_timer1_trgo(&self) -> bool {
        *self == Dtsel0::Timer1Trgo
    }
    #[doc = "External line9"]
    #[inline(always)]
    pub fn is_external9(&self) -> bool {
        *self == Dtsel0::External9
    }
    #[doc = "Software trigger"]
    #[inline(always)]
    pub fn is_software(&self) -> bool {
        *self == Dtsel0::Software
    }
}
#[doc = "Field `DTSEL0` writer - DAC0 trigger selection"]
pub type Dtsel0W<'a, REG> = crate::FieldWriter<'a, REG, 3, Dtsel0>;
impl<'a, REG> Dtsel0W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "Timer 5 TRGO event"]
    #[inline(always)]
    pub fn timer5_trgo(self) -> &'a mut crate::W<REG> {
        self.variant(Dtsel0::Timer5Trgo)
    }
    #[doc = "Timer 2 TRGO event"]
    #[inline(always)]
    pub fn timer2_trgo(self) -> &'a mut crate::W<REG> {
        self.variant(Dtsel0::Timer2Trgo)
    }
    #[doc = "Timer 14 TRGO event"]
    #[inline(always)]
    pub fn timer14_trgo(self) -> &'a mut crate::W<REG> {
        self.variant(Dtsel0::Timer14Trgo)
    }
    #[doc = "Timer 1 TRGO event"]
    #[inline(always)]
    pub fn timer1_trgo(self) -> &'a mut crate::W<REG> {
        self.variant(Dtsel0::Timer1Trgo)
    }
    #[doc = "External line9"]
    #[inline(always)]
    pub fn external9(self) -> &'a mut crate::W<REG> {
        self.variant(Dtsel0::External9)
    }
    #[doc = "Software trigger"]
    #[inline(always)]
    pub fn software(self) -> &'a mut crate::W<REG> {
        self.variant(Dtsel0::Software)
    }
}
#[doc = "DAC0 noise wave mode\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Dwm0 {
    #[doc = "0: Wave disabled"]
    WaveDisabled = 0,
    #[doc = "1: LFSR noise mode"]
    Lfsr = 1,
    #[doc = "2: Triangle noise mode"]
    Triangle = 2,
}
impl From<Dwm0> for u8 {
    #[inline(always)]
    fn from(variant: Dwm0) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Dwm0 {
    type Ux = u8;
}
#[doc = "Field `DWM0` reader - DAC0 noise wave mode"]
pub type Dwm0R = crate::FieldReader<Dwm0>;
impl Dwm0R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<Dwm0> {
        match self.bits {
            0 => Some(Dwm0::WaveDisabled),
            1 => Some(Dwm0::Lfsr),
            2 => Some(Dwm0::Triangle),
            _ => None,
        }
    }
    #[doc = "Wave disabled"]
    #[inline(always)]
    pub fn is_wave_disabled(&self) -> bool {
        *self == Dwm0::WaveDisabled
    }
    #[doc = "LFSR noise mode"]
    #[inline(always)]
    pub fn is_lfsr(&self) -> bool {
        *self == Dwm0::Lfsr
    }
    #[doc = "Triangle noise mode"]
    #[inline(always)]
    pub fn is_triangle(&self) -> bool {
        *self == Dwm0::Triangle
    }
}
#[doc = "Field `DWM0` writer - DAC0 noise wave mode"]
pub type Dwm0W<'a, REG> = crate::FieldWriter<'a, REG, 2, Dwm0>;
impl<'a, REG> Dwm0W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "Wave disabled"]
    #[inline(always)]
    pub fn wave_disabled(self) -> &'a mut crate::W<REG> {
        self.variant(Dwm0::WaveDisabled)
    }
    #[doc = "LFSR noise mode"]
    #[inline(always)]
    pub fn lfsr(self) -> &'a mut crate::W<REG> {
        self.variant(Dwm0::Lfsr)
    }
    #[doc = "Triangle noise mode"]
    #[inline(always)]
    pub fn triangle(self) -> &'a mut crate::W<REG> {
        self.variant(Dwm0::Triangle)
    }
}
#[doc = "DAC0 noise wave bit width\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Dwbw0 {
    #[doc = "0: The bit width of the wave signal is 1"]
    BitWidth1 = 0,
    #[doc = "1: The bit width of the wave signal is 2"]
    BitWidth2 = 1,
    #[doc = "2: The bit width of the wave signal is 3"]
    BitWidth3 = 2,
    #[doc = "3: The bit width of the wave signal is 4"]
    BitWidth4 = 3,
    #[doc = "4: The bit width of the wave signal is 5"]
    BitWidth5 = 4,
    #[doc = "5: The bit width of the wave signal is 6"]
    BitWidth6 = 5,
    #[doc = "6: The bit width of the wave signal is 7"]
    BitWidth7 = 6,
    #[doc = "7: The bit width of the wave signal is 8"]
    BitWidth8 = 7,
    #[doc = "8: The bit width of the wave signal is 9"]
    BitWidth9 = 8,
    #[doc = "9: The bit width of the wave signal is 10"]
    BitWidth10 = 9,
    #[doc = "10: The bit width of the wave signal is 11"]
    BitWidth11 = 10,
    #[doc = "11: The bit width of the wave signal is 12"]
    BitWidth12 = 11,
}
impl From<Dwbw0> for u8 {
    #[inline(always)]
    fn from(variant: Dwbw0) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Dwbw0 {
    type Ux = u8;
}
#[doc = "Field `DWBW0` reader - DAC0 noise wave bit width"]
pub type Dwbw0R = crate::FieldReader<Dwbw0>;
impl Dwbw0R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<Dwbw0> {
        match self.bits {
            0 => Some(Dwbw0::BitWidth1),
            1 => Some(Dwbw0::BitWidth2),
            2 => Some(Dwbw0::BitWidth3),
            3 => Some(Dwbw0::BitWidth4),
            4 => Some(Dwbw0::BitWidth5),
            5 => Some(Dwbw0::BitWidth6),
            6 => Some(Dwbw0::BitWidth7),
            7 => Some(Dwbw0::BitWidth8),
            8 => Some(Dwbw0::BitWidth9),
            9 => Some(Dwbw0::BitWidth10),
            10 => Some(Dwbw0::BitWidth11),
            11 => Some(Dwbw0::BitWidth12),
            _ => None,
        }
    }
    #[doc = "The bit width of the wave signal is 1"]
    #[inline(always)]
    pub fn is_bit_width1(&self) -> bool {
        *self == Dwbw0::BitWidth1
    }
    #[doc = "The bit width of the wave signal is 2"]
    #[inline(always)]
    pub fn is_bit_width2(&self) -> bool {
        *self == Dwbw0::BitWidth2
    }
    #[doc = "The bit width of the wave signal is 3"]
    #[inline(always)]
    pub fn is_bit_width3(&self) -> bool {
        *self == Dwbw0::BitWidth3
    }
    #[doc = "The bit width of the wave signal is 4"]
    #[inline(always)]
    pub fn is_bit_width4(&self) -> bool {
        *self == Dwbw0::BitWidth4
    }
    #[doc = "The bit width of the wave signal is 5"]
    #[inline(always)]
    pub fn is_bit_width5(&self) -> bool {
        *self == Dwbw0::BitWidth5
    }
    #[doc = "The bit width of the wave signal is 6"]
    #[inline(always)]
    pub fn is_bit_width6(&self) -> bool {
        *self == Dwbw0::BitWidth6
    }
    #[doc = "The bit width of the wave signal is 7"]
    #[inline(always)]
    pub fn is_bit_width7(&self) -> bool {
        *self == Dwbw0::BitWidth7
    }
    #[doc = "The bit width of the wave signal is 8"]
    #[inline(always)]
    pub fn is_bit_width8(&self) -> bool {
        *self == Dwbw0::BitWidth8
    }
    #[doc = "The bit width of the wave signal is 9"]
    #[inline(always)]
    pub fn is_bit_width9(&self) -> bool {
        *self == Dwbw0::BitWidth9
    }
    #[doc = "The bit width of the wave signal is 10"]
    #[inline(always)]
    pub fn is_bit_width10(&self) -> bool {
        *self == Dwbw0::BitWidth10
    }
    #[doc = "The bit width of the wave signal is 11"]
    #[inline(always)]
    pub fn is_bit_width11(&self) -> bool {
        *self == Dwbw0::BitWidth11
    }
    #[doc = "The bit width of the wave signal is 12"]
    #[inline(always)]
    pub fn is_bit_width12(&self) -> bool {
        *self == Dwbw0::BitWidth12
    }
}
#[doc = "Field `DWBW0` writer - DAC0 noise wave bit width"]
pub type Dwbw0W<'a, REG> = crate::FieldWriter<'a, REG, 4, Dwbw0>;
impl<'a, REG> Dwbw0W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "The bit width of the wave signal is 1"]
    #[inline(always)]
    pub fn bit_width1(self) -> &'a mut crate::W<REG> {
        self.variant(Dwbw0::BitWidth1)
    }
    #[doc = "The bit width of the wave signal is 2"]
    #[inline(always)]
    pub fn bit_width2(self) -> &'a mut crate::W<REG> {
        self.variant(Dwbw0::BitWidth2)
    }
    #[doc = "The bit width of the wave signal is 3"]
    #[inline(always)]
    pub fn bit_width3(self) -> &'a mut crate::W<REG> {
        self.variant(Dwbw0::BitWidth3)
    }
    #[doc = "The bit width of the wave signal is 4"]
    #[inline(always)]
    pub fn bit_width4(self) -> &'a mut crate::W<REG> {
        self.variant(Dwbw0::BitWidth4)
    }
    #[doc = "The bit width of the wave signal is 5"]
    #[inline(always)]
    pub fn bit_width5(self) -> &'a mut crate::W<REG> {
        self.variant(Dwbw0::BitWidth5)
    }
    #[doc = "The bit width of the wave signal is 6"]
    #[inline(always)]
    pub fn bit_width6(self) -> &'a mut crate::W<REG> {
        self.variant(Dwbw0::BitWidth6)
    }
    #[doc = "The bit width of the wave signal is 7"]
    #[inline(always)]
    pub fn bit_width7(self) -> &'a mut crate::W<REG> {
        self.variant(Dwbw0::BitWidth7)
    }
    #[doc = "The bit width of the wave signal is 8"]
    #[inline(always)]
    pub fn bit_width8(self) -> &'a mut crate::W<REG> {
        self.variant(Dwbw0::BitWidth8)
    }
    #[doc = "The bit width of the wave signal is 9"]
    #[inline(always)]
    pub fn bit_width9(self) -> &'a mut crate::W<REG> {
        self.variant(Dwbw0::BitWidth9)
    }
    #[doc = "The bit width of the wave signal is 10"]
    #[inline(always)]
    pub fn bit_width10(self) -> &'a mut crate::W<REG> {
        self.variant(Dwbw0::BitWidth10)
    }
    #[doc = "The bit width of the wave signal is 11"]
    #[inline(always)]
    pub fn bit_width11(self) -> &'a mut crate::W<REG> {
        self.variant(Dwbw0::BitWidth11)
    }
    #[doc = "The bit width of the wave signal is 12"]
    #[inline(always)]
    pub fn bit_width12(self) -> &'a mut crate::W<REG> {
        self.variant(Dwbw0::BitWidth12)
    }
}
#[doc = "DAC0 DMA enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Ddmaen0 {
    #[doc = "0: DAC DMA mode disabled"]
    Disabled = 0,
    #[doc = "1: DAC DMA mode enabled"]
    Enabled = 1,
}
impl From<Ddmaen0> for bool {
    #[inline(always)]
    fn from(variant: Ddmaen0) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `DDMAEN0` reader - DAC0 DMA enable"]
pub type Ddmaen0R = crate::BitReader<Ddmaen0>;
impl Ddmaen0R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Ddmaen0 {
        match self.bits {
            false => Ddmaen0::Disabled,
            true => Ddmaen0::Enabled,
        }
    }
    #[doc = "DAC DMA mode disabled"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        *self == Ddmaen0::Disabled
    }
    #[doc = "DAC DMA mode enabled"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        *self == Ddmaen0::Enabled
    }
}
#[doc = "Field `DDMAEN0` writer - DAC0 DMA enable"]
pub type Ddmaen0W<'a, REG> = crate::BitWriter<'a, REG, Ddmaen0>;
impl<'a, REG> Ddmaen0W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "DAC DMA mode disabled"]
    #[inline(always)]
    pub fn disabled(self) -> &'a mut crate::W<REG> {
        self.variant(Ddmaen0::Disabled)
    }
    #[doc = "DAC DMA mode enabled"]
    #[inline(always)]
    pub fn enabled(self) -> &'a mut crate::W<REG> {
        self.variant(Ddmaen0::Enabled)
    }
}
#[doc = "Field `DBOFF1` reader - DAC1 output buffer turn off"]
pub use Dboff0R as Dboff1R;
#[doc = "Field `DBOFF1` writer - DAC1 output buffer turn off"]
pub use Dboff0W as Dboff1W;
#[doc = "Field `DDMAEN1` reader - DAC1 DMA enable"]
pub use Ddmaen0R as Ddmaen1R;
#[doc = "Field `DDMAEN1` writer - DAC1 DMA enable"]
pub use Ddmaen0W as Ddmaen1W;
#[doc = "Field `DEN1` reader - DAC1 enable"]
pub use Den0R as Den1R;
#[doc = "Field `DEN1` writer - DAC1 enable"]
pub use Den0W as Den1W;
#[doc = "Field `DTEN1` reader - DAC1 trigger enable"]
pub use Dten0R as Dten1R;
#[doc = "Field `DTEN1` writer - DAC1 trigger enable"]
pub use Dten0W as Dten1W;
#[doc = "Field `DTSEL1` reader - DAC1 trigger selection"]
pub use Dtsel0R as Dtsel1R;
#[doc = "Field `DTSEL1` writer - DAC1 trigger selection"]
pub use Dtsel0W as Dtsel1W;
#[doc = "Field `DWBW1` reader - DAC1 noise wave bit width"]
pub use Dwbw0R as Dwbw1R;
#[doc = "Field `DWBW1` writer - DAC1 noise wave bit width"]
pub use Dwbw0W as Dwbw1W;
#[doc = "Field `DWM1` reader - DAC1 noise wave mode"]
pub use Dwm0R as Dwm1R;
#[doc = "Field `DWM1` writer - DAC1 noise wave mode"]
pub use Dwm0W as Dwm1W;
impl R {
    #[doc = "Bit 0 - DAC0 enable"]
    #[inline(always)]
    pub fn den0(&self) -> Den0R {
        Den0R::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - DAC0 output buffer turn off"]
    #[inline(always)]
    pub fn dboff0(&self) -> Dboff0R {
        Dboff0R::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - DAC0 trigger enable"]
    #[inline(always)]
    pub fn dten0(&self) -> Dten0R {
        Dten0R::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bits 3:5 - DAC0 trigger selection"]
    #[inline(always)]
    pub fn dtsel0(&self) -> Dtsel0R {
        Dtsel0R::new(((self.bits >> 3) & 7) as u8)
    }
    #[doc = "Bits 6:7 - DAC0 noise wave mode"]
    #[inline(always)]
    pub fn dwm0(&self) -> Dwm0R {
        Dwm0R::new(((self.bits >> 6) & 3) as u8)
    }
    #[doc = "Bits 8:11 - DAC0 noise wave bit width"]
    #[inline(always)]
    pub fn dwbw0(&self) -> Dwbw0R {
        Dwbw0R::new(((self.bits >> 8) & 0x0f) as u8)
    }
    #[doc = "Bit 12 - DAC0 DMA enable"]
    #[inline(always)]
    pub fn ddmaen0(&self) -> Ddmaen0R {
        Ddmaen0R::new(((self.bits >> 12) & 1) != 0)
    }
    #[doc = "Bit 16 - DAC1 enable"]
    #[inline(always)]
    pub fn den1(&self) -> Den1R {
        Den1R::new(((self.bits >> 16) & 1) != 0)
    }
    #[doc = "Bit 17 - DAC1 output buffer turn off"]
    #[inline(always)]
    pub fn dboff1(&self) -> Dboff1R {
        Dboff1R::new(((self.bits >> 17) & 1) != 0)
    }
    #[doc = "Bit 18 - DAC1 trigger enable"]
    #[inline(always)]
    pub fn dten1(&self) -> Dten1R {
        Dten1R::new(((self.bits >> 18) & 1) != 0)
    }
    #[doc = "Bits 19:21 - DAC1 trigger selection"]
    #[inline(always)]
    pub fn dtsel1(&self) -> Dtsel1R {
        Dtsel1R::new(((self.bits >> 19) & 7) as u8)
    }
    #[doc = "Bits 22:23 - DAC1 noise wave mode"]
    #[inline(always)]
    pub fn dwm1(&self) -> Dwm1R {
        Dwm1R::new(((self.bits >> 22) & 3) as u8)
    }
    #[doc = "Bits 24:27 - DAC1 noise wave bit width"]
    #[inline(always)]
    pub fn dwbw1(&self) -> Dwbw1R {
        Dwbw1R::new(((self.bits >> 24) & 0x0f) as u8)
    }
    #[doc = "Bit 28 - DAC1 DMA enable"]
    #[inline(always)]
    pub fn ddmaen1(&self) -> Ddmaen1R {
        Ddmaen1R::new(((self.bits >> 28) & 1) != 0)
    }
}
impl W {
    #[doc = "Bit 0 - DAC0 enable"]
    #[inline(always)]
    #[must_use]
    pub fn den0(&mut self) -> Den0W<CtlSpec> {
        Den0W::new(self, 0)
    }
    #[doc = "Bit 1 - DAC0 output buffer turn off"]
    #[inline(always)]
    #[must_use]
    pub fn dboff0(&mut self) -> Dboff0W<CtlSpec> {
        Dboff0W::new(self, 1)
    }
    #[doc = "Bit 2 - DAC0 trigger enable"]
    #[inline(always)]
    #[must_use]
    pub fn dten0(&mut self) -> Dten0W<CtlSpec> {
        Dten0W::new(self, 2)
    }
    #[doc = "Bits 3:5 - DAC0 trigger selection"]
    #[inline(always)]
    #[must_use]
    pub fn dtsel0(&mut self) -> Dtsel0W<CtlSpec> {
        Dtsel0W::new(self, 3)
    }
    #[doc = "Bits 6:7 - DAC0 noise wave mode"]
    #[inline(always)]
    #[must_use]
    pub fn dwm0(&mut self) -> Dwm0W<CtlSpec> {
        Dwm0W::new(self, 6)
    }
    #[doc = "Bits 8:11 - DAC0 noise wave bit width"]
    #[inline(always)]
    #[must_use]
    pub fn dwbw0(&mut self) -> Dwbw0W<CtlSpec> {
        Dwbw0W::new(self, 8)
    }
    #[doc = "Bit 12 - DAC0 DMA enable"]
    #[inline(always)]
    #[must_use]
    pub fn ddmaen0(&mut self) -> Ddmaen0W<CtlSpec> {
        Ddmaen0W::new(self, 12)
    }
    #[doc = "Bit 16 - DAC1 enable"]
    #[inline(always)]
    #[must_use]
    pub fn den1(&mut self) -> Den1W<CtlSpec> {
        Den1W::new(self, 16)
    }
    #[doc = "Bit 17 - DAC1 output buffer turn off"]
    #[inline(always)]
    #[must_use]
    pub fn dboff1(&mut self) -> Dboff1W<CtlSpec> {
        Dboff1W::new(self, 17)
    }
    #[doc = "Bit 18 - DAC1 trigger enable"]
    #[inline(always)]
    #[must_use]
    pub fn dten1(&mut self) -> Dten1W<CtlSpec> {
        Dten1W::new(self, 18)
    }
    #[doc = "Bits 19:21 - DAC1 trigger selection"]
    #[inline(always)]
    #[must_use]
    pub fn dtsel1(&mut self) -> Dtsel1W<CtlSpec> {
        Dtsel1W::new(self, 19)
    }
    #[doc = "Bits 22:23 - DAC1 noise wave mode"]
    #[inline(always)]
    #[must_use]
    pub fn dwm1(&mut self) -> Dwm1W<CtlSpec> {
        Dwm1W::new(self, 22)
    }
    #[doc = "Bits 24:27 - DAC1 noise wave bit width"]
    #[inline(always)]
    #[must_use]
    pub fn dwbw1(&mut self) -> Dwbw1W<CtlSpec> {
        Dwbw1W::new(self, 24)
    }
    #[doc = "Bit 28 - DAC1 DMA enable"]
    #[inline(always)]
    #[must_use]
    pub fn ddmaen1(&mut self) -> Ddmaen1W<CtlSpec> {
        Ddmaen1W::new(self, 28)
    }
}
#[doc = "control register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`ctl::R`](R).  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`ctl::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct CtlSpec;
impl crate::RegisterSpec for CtlSpec {
    type Ux = u32;
}
#[doc = "`read()` method returns [`ctl::R`](R) reader structure"]
impl crate::Readable for CtlSpec {}
#[doc = "`write(|w| ..)` method takes [`ctl::W`](W) writer structure"]
impl crate::Writable for CtlSpec {
    type Safety = crate::Unsafe;
    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
}
#[doc = "`reset()` method sets CTL to value 0"]
impl crate::Resettable for CtlSpec {
    const RESET_VALUE: u32 = 0;
}