atsam4sp32a_pac/dacc/
mr.rs

1#[doc = "Register `MR` reader"]
2pub struct R(crate::R<MR_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<MR_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<MR_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<MR_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `MR` writer"]
17pub struct W(crate::W<MR_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<MR_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<MR_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<MR_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `TRGEN` reader - Trigger Enable"]
38pub type TRGEN_R = crate::BitReader<TRGEN_A>;
39#[doc = "Trigger Enable\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41pub enum TRGEN_A {
42    #[doc = "0: External trigger mode disabled. DACC in free running mode."]
43    DIS = 0,
44    #[doc = "1: External trigger mode enabled."]
45    EN = 1,
46}
47impl From<TRGEN_A> for bool {
48    #[inline(always)]
49    fn from(variant: TRGEN_A) -> Self {
50        variant as u8 != 0
51    }
52}
53impl TRGEN_R {
54    #[doc = "Get enumerated values variant"]
55    #[inline(always)]
56    pub fn variant(&self) -> TRGEN_A {
57        match self.bits {
58            false => TRGEN_A::DIS,
59            true => TRGEN_A::EN,
60        }
61    }
62    #[doc = "Checks if the value of the field is `DIS`"]
63    #[inline(always)]
64    pub fn is_dis(&self) -> bool {
65        *self == TRGEN_A::DIS
66    }
67    #[doc = "Checks if the value of the field is `EN`"]
68    #[inline(always)]
69    pub fn is_en(&self) -> bool {
70        *self == TRGEN_A::EN
71    }
72}
73#[doc = "Field `TRGEN` writer - Trigger Enable"]
74pub type TRGEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, MR_SPEC, TRGEN_A, O>;
75impl<'a, const O: u8> TRGEN_W<'a, O> {
76    #[doc = "External trigger mode disabled. DACC in free running mode."]
77    #[inline(always)]
78    pub fn dis(self) -> &'a mut W {
79        self.variant(TRGEN_A::DIS)
80    }
81    #[doc = "External trigger mode enabled."]
82    #[inline(always)]
83    pub fn en(self) -> &'a mut W {
84        self.variant(TRGEN_A::EN)
85    }
86}
87#[doc = "Field `TRGSEL` reader - Trigger Selection"]
88pub type TRGSEL_R = crate::FieldReader<u8, u8>;
89#[doc = "Field `TRGSEL` writer - Trigger Selection"]
90pub type TRGSEL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MR_SPEC, u8, u8, 3, O>;
91#[doc = "Field `WORD` reader - Word Transfer"]
92pub type WORD_R = crate::BitReader<WORD_A>;
93#[doc = "Word Transfer\n\nValue on reset: 0"]
94#[derive(Clone, Copy, Debug, PartialEq, Eq)]
95pub enum WORD_A {
96    #[doc = "0: Half-Word transfer"]
97    HALF = 0,
98    #[doc = "1: Word Transfer"]
99    WORD = 1,
100}
101impl From<WORD_A> for bool {
102    #[inline(always)]
103    fn from(variant: WORD_A) -> Self {
104        variant as u8 != 0
105    }
106}
107impl WORD_R {
108    #[doc = "Get enumerated values variant"]
109    #[inline(always)]
110    pub fn variant(&self) -> WORD_A {
111        match self.bits {
112            false => WORD_A::HALF,
113            true => WORD_A::WORD,
114        }
115    }
116    #[doc = "Checks if the value of the field is `HALF`"]
117    #[inline(always)]
118    pub fn is_half(&self) -> bool {
119        *self == WORD_A::HALF
120    }
121    #[doc = "Checks if the value of the field is `WORD`"]
122    #[inline(always)]
123    pub fn is_word(&self) -> bool {
124        *self == WORD_A::WORD
125    }
126}
127#[doc = "Field `WORD` writer - Word Transfer"]
128pub type WORD_W<'a, const O: u8> = crate::BitWriter<'a, u32, MR_SPEC, WORD_A, O>;
129impl<'a, const O: u8> WORD_W<'a, O> {
130    #[doc = "Half-Word transfer"]
131    #[inline(always)]
132    pub fn half(self) -> &'a mut W {
133        self.variant(WORD_A::HALF)
134    }
135    #[doc = "Word Transfer"]
136    #[inline(always)]
137    pub fn word(self) -> &'a mut W {
138        self.variant(WORD_A::WORD)
139    }
140}
141#[doc = "Field `SLEEP` reader - Sleep Mode"]
142pub type SLEEP_R = crate::BitReader<bool>;
143#[doc = "Field `SLEEP` writer - Sleep Mode"]
144pub type SLEEP_W<'a, const O: u8> = crate::BitWriter<'a, u32, MR_SPEC, bool, O>;
145#[doc = "Field `FASTWKUP` reader - Fast Wake up Mode"]
146pub type FASTWKUP_R = crate::BitReader<bool>;
147#[doc = "Field `FASTWKUP` writer - Fast Wake up Mode"]
148pub type FASTWKUP_W<'a, const O: u8> = crate::BitWriter<'a, u32, MR_SPEC, bool, O>;
149#[doc = "Field `REFRESH` reader - Refresh Period"]
150pub type REFRESH_R = crate::FieldReader<u8, u8>;
151#[doc = "Field `REFRESH` writer - Refresh Period"]
152pub type REFRESH_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MR_SPEC, u8, u8, 8, O>;
153#[doc = "Field `USER_SEL` reader - User Channel Selection"]
154pub type USER_SEL_R = crate::FieldReader<u8, USER_SEL_A>;
155#[doc = "User Channel Selection\n\nValue on reset: 0"]
156#[derive(Clone, Copy, Debug, PartialEq, Eq)]
157#[repr(u8)]
158pub enum USER_SEL_A {
159    #[doc = "0: Channel 0"]
160    CHANNEL0 = 0,
161    #[doc = "1: Channel 1"]
162    CHANNEL1 = 1,
163}
164impl From<USER_SEL_A> for u8 {
165    #[inline(always)]
166    fn from(variant: USER_SEL_A) -> Self {
167        variant as _
168    }
169}
170impl USER_SEL_R {
171    #[doc = "Get enumerated values variant"]
172    #[inline(always)]
173    pub fn variant(&self) -> Option<USER_SEL_A> {
174        match self.bits {
175            0 => Some(USER_SEL_A::CHANNEL0),
176            1 => Some(USER_SEL_A::CHANNEL1),
177            _ => None,
178        }
179    }
180    #[doc = "Checks if the value of the field is `CHANNEL0`"]
181    #[inline(always)]
182    pub fn is_channel0(&self) -> bool {
183        *self == USER_SEL_A::CHANNEL0
184    }
185    #[doc = "Checks if the value of the field is `CHANNEL1`"]
186    #[inline(always)]
187    pub fn is_channel1(&self) -> bool {
188        *self == USER_SEL_A::CHANNEL1
189    }
190}
191#[doc = "Field `USER_SEL` writer - User Channel Selection"]
192pub type USER_SEL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MR_SPEC, u8, USER_SEL_A, 2, O>;
193impl<'a, const O: u8> USER_SEL_W<'a, O> {
194    #[doc = "Channel 0"]
195    #[inline(always)]
196    pub fn channel0(self) -> &'a mut W {
197        self.variant(USER_SEL_A::CHANNEL0)
198    }
199    #[doc = "Channel 1"]
200    #[inline(always)]
201    pub fn channel1(self) -> &'a mut W {
202        self.variant(USER_SEL_A::CHANNEL1)
203    }
204}
205#[doc = "Field `TAG` reader - Tag Selection Mode"]
206pub type TAG_R = crate::BitReader<TAG_A>;
207#[doc = "Tag Selection Mode\n\nValue on reset: 0"]
208#[derive(Clone, Copy, Debug, PartialEq, Eq)]
209pub enum TAG_A {
210    #[doc = "0: Tag selection mode disabled. Using USER_SEL to select the channel for the conversion."]
211    DIS = 0,
212    #[doc = "1: Tag selection mode enabled"]
213    EN = 1,
214}
215impl From<TAG_A> for bool {
216    #[inline(always)]
217    fn from(variant: TAG_A) -> Self {
218        variant as u8 != 0
219    }
220}
221impl TAG_R {
222    #[doc = "Get enumerated values variant"]
223    #[inline(always)]
224    pub fn variant(&self) -> TAG_A {
225        match self.bits {
226            false => TAG_A::DIS,
227            true => TAG_A::EN,
228        }
229    }
230    #[doc = "Checks if the value of the field is `DIS`"]
231    #[inline(always)]
232    pub fn is_dis(&self) -> bool {
233        *self == TAG_A::DIS
234    }
235    #[doc = "Checks if the value of the field is `EN`"]
236    #[inline(always)]
237    pub fn is_en(&self) -> bool {
238        *self == TAG_A::EN
239    }
240}
241#[doc = "Field `TAG` writer - Tag Selection Mode"]
242pub type TAG_W<'a, const O: u8> = crate::BitWriter<'a, u32, MR_SPEC, TAG_A, O>;
243impl<'a, const O: u8> TAG_W<'a, O> {
244    #[doc = "Tag selection mode disabled. Using USER_SEL to select the channel for the conversion."]
245    #[inline(always)]
246    pub fn dis(self) -> &'a mut W {
247        self.variant(TAG_A::DIS)
248    }
249    #[doc = "Tag selection mode enabled"]
250    #[inline(always)]
251    pub fn en(self) -> &'a mut W {
252        self.variant(TAG_A::EN)
253    }
254}
255#[doc = "Field `MAXS` reader - Max Speed Mode"]
256pub type MAXS_R = crate::BitReader<MAXS_A>;
257#[doc = "Max Speed Mode\n\nValue on reset: 0"]
258#[derive(Clone, Copy, Debug, PartialEq, Eq)]
259pub enum MAXS_A {
260    #[doc = "0: Normal Mode"]
261    NORMAL = 0,
262    #[doc = "1: Max Speed Mode enabled"]
263    MAXIMUM = 1,
264}
265impl From<MAXS_A> for bool {
266    #[inline(always)]
267    fn from(variant: MAXS_A) -> Self {
268        variant as u8 != 0
269    }
270}
271impl MAXS_R {
272    #[doc = "Get enumerated values variant"]
273    #[inline(always)]
274    pub fn variant(&self) -> MAXS_A {
275        match self.bits {
276            false => MAXS_A::NORMAL,
277            true => MAXS_A::MAXIMUM,
278        }
279    }
280    #[doc = "Checks if the value of the field is `NORMAL`"]
281    #[inline(always)]
282    pub fn is_normal(&self) -> bool {
283        *self == MAXS_A::NORMAL
284    }
285    #[doc = "Checks if the value of the field is `MAXIMUM`"]
286    #[inline(always)]
287    pub fn is_maximum(&self) -> bool {
288        *self == MAXS_A::MAXIMUM
289    }
290}
291#[doc = "Field `MAXS` writer - Max Speed Mode"]
292pub type MAXS_W<'a, const O: u8> = crate::BitWriter<'a, u32, MR_SPEC, MAXS_A, O>;
293impl<'a, const O: u8> MAXS_W<'a, O> {
294    #[doc = "Normal Mode"]
295    #[inline(always)]
296    pub fn normal(self) -> &'a mut W {
297        self.variant(MAXS_A::NORMAL)
298    }
299    #[doc = "Max Speed Mode enabled"]
300    #[inline(always)]
301    pub fn maximum(self) -> &'a mut W {
302        self.variant(MAXS_A::MAXIMUM)
303    }
304}
305#[doc = "Field `STARTUP` reader - Startup Time Selection"]
306pub type STARTUP_R = crate::FieldReader<u8, STARTUP_A>;
307#[doc = "Startup Time Selection\n\nValue on reset: 0"]
308#[derive(Clone, Copy, Debug, PartialEq, Eq)]
309#[repr(u8)]
310pub enum STARTUP_A {
311    #[doc = "0: 0 periods of DACClock"]
312    _0 = 0,
313    #[doc = "1: 8 periods of DACClock"]
314    _8 = 1,
315    #[doc = "2: 16 periods of DACClock"]
316    _16 = 2,
317    #[doc = "3: 24 periods of DACClock"]
318    _24 = 3,
319    #[doc = "4: 64 periods of DACClock"]
320    _64 = 4,
321    #[doc = "5: 80 periods of DACClock"]
322    _80 = 5,
323    #[doc = "6: 96 periods of DACClock"]
324    _96 = 6,
325    #[doc = "7: 112 periods of DACClock"]
326    _112 = 7,
327    #[doc = "8: 512 periods of DACClock"]
328    _512 = 8,
329    #[doc = "9: 576 periods of DACClock"]
330    _576 = 9,
331    #[doc = "10: 640 periods of DACClock"]
332    _640 = 10,
333    #[doc = "11: 704 periods of DACClock"]
334    _704 = 11,
335    #[doc = "12: 768 periods of DACClock"]
336    _768 = 12,
337    #[doc = "13: 832 periods of DACClock"]
338    _832 = 13,
339    #[doc = "14: 896 periods of DACClock"]
340    _896 = 14,
341    #[doc = "15: 960 periods of DACClock"]
342    _960 = 15,
343    #[doc = "16: 1024 periods of DACClock"]
344    _1024 = 16,
345    #[doc = "17: 1088 periods of DACClock"]
346    _1088 = 17,
347    #[doc = "18: 1152 periods of DACClock"]
348    _1152 = 18,
349    #[doc = "19: 1216 periods of DACClock"]
350    _1216 = 19,
351    #[doc = "20: 1280 periods of DACClock"]
352    _1280 = 20,
353    #[doc = "21: 1344 periods of DACClock"]
354    _1344 = 21,
355    #[doc = "22: 1408 periods of DACClock"]
356    _1408 = 22,
357    #[doc = "23: 1472 periods of DACClock"]
358    _1472 = 23,
359    #[doc = "24: 1536 periods of DACClock"]
360    _1536 = 24,
361    #[doc = "25: 1600 periods of DACClock"]
362    _1600 = 25,
363    #[doc = "26: 1664 periods of DACClock"]
364    _1664 = 26,
365    #[doc = "27: 1728 periods of DACClock"]
366    _1728 = 27,
367    #[doc = "28: 1792 periods of DACClock"]
368    _1792 = 28,
369    #[doc = "29: 1856 periods of DACClock"]
370    _1856 = 29,
371    #[doc = "30: 1920 periods of DACClock"]
372    _1920 = 30,
373    #[doc = "31: 1984 periods of DACClock"]
374    _1984 = 31,
375}
376impl From<STARTUP_A> for u8 {
377    #[inline(always)]
378    fn from(variant: STARTUP_A) -> Self {
379        variant as _
380    }
381}
382impl STARTUP_R {
383    #[doc = "Get enumerated values variant"]
384    #[inline(always)]
385    pub fn variant(&self) -> Option<STARTUP_A> {
386        match self.bits {
387            0 => Some(STARTUP_A::_0),
388            1 => Some(STARTUP_A::_8),
389            2 => Some(STARTUP_A::_16),
390            3 => Some(STARTUP_A::_24),
391            4 => Some(STARTUP_A::_64),
392            5 => Some(STARTUP_A::_80),
393            6 => Some(STARTUP_A::_96),
394            7 => Some(STARTUP_A::_112),
395            8 => Some(STARTUP_A::_512),
396            9 => Some(STARTUP_A::_576),
397            10 => Some(STARTUP_A::_640),
398            11 => Some(STARTUP_A::_704),
399            12 => Some(STARTUP_A::_768),
400            13 => Some(STARTUP_A::_832),
401            14 => Some(STARTUP_A::_896),
402            15 => Some(STARTUP_A::_960),
403            16 => Some(STARTUP_A::_1024),
404            17 => Some(STARTUP_A::_1088),
405            18 => Some(STARTUP_A::_1152),
406            19 => Some(STARTUP_A::_1216),
407            20 => Some(STARTUP_A::_1280),
408            21 => Some(STARTUP_A::_1344),
409            22 => Some(STARTUP_A::_1408),
410            23 => Some(STARTUP_A::_1472),
411            24 => Some(STARTUP_A::_1536),
412            25 => Some(STARTUP_A::_1600),
413            26 => Some(STARTUP_A::_1664),
414            27 => Some(STARTUP_A::_1728),
415            28 => Some(STARTUP_A::_1792),
416            29 => Some(STARTUP_A::_1856),
417            30 => Some(STARTUP_A::_1920),
418            31 => Some(STARTUP_A::_1984),
419            _ => None,
420        }
421    }
422    #[doc = "Checks if the value of the field is `_0`"]
423    #[inline(always)]
424    pub fn is_0(&self) -> bool {
425        *self == STARTUP_A::_0
426    }
427    #[doc = "Checks if the value of the field is `_8`"]
428    #[inline(always)]
429    pub fn is_8(&self) -> bool {
430        *self == STARTUP_A::_8
431    }
432    #[doc = "Checks if the value of the field is `_16`"]
433    #[inline(always)]
434    pub fn is_16(&self) -> bool {
435        *self == STARTUP_A::_16
436    }
437    #[doc = "Checks if the value of the field is `_24`"]
438    #[inline(always)]
439    pub fn is_24(&self) -> bool {
440        *self == STARTUP_A::_24
441    }
442    #[doc = "Checks if the value of the field is `_64`"]
443    #[inline(always)]
444    pub fn is_64(&self) -> bool {
445        *self == STARTUP_A::_64
446    }
447    #[doc = "Checks if the value of the field is `_80`"]
448    #[inline(always)]
449    pub fn is_80(&self) -> bool {
450        *self == STARTUP_A::_80
451    }
452    #[doc = "Checks if the value of the field is `_96`"]
453    #[inline(always)]
454    pub fn is_96(&self) -> bool {
455        *self == STARTUP_A::_96
456    }
457    #[doc = "Checks if the value of the field is `_112`"]
458    #[inline(always)]
459    pub fn is_112(&self) -> bool {
460        *self == STARTUP_A::_112
461    }
462    #[doc = "Checks if the value of the field is `_512`"]
463    #[inline(always)]
464    pub fn is_512(&self) -> bool {
465        *self == STARTUP_A::_512
466    }
467    #[doc = "Checks if the value of the field is `_576`"]
468    #[inline(always)]
469    pub fn is_576(&self) -> bool {
470        *self == STARTUP_A::_576
471    }
472    #[doc = "Checks if the value of the field is `_640`"]
473    #[inline(always)]
474    pub fn is_640(&self) -> bool {
475        *self == STARTUP_A::_640
476    }
477    #[doc = "Checks if the value of the field is `_704`"]
478    #[inline(always)]
479    pub fn is_704(&self) -> bool {
480        *self == STARTUP_A::_704
481    }
482    #[doc = "Checks if the value of the field is `_768`"]
483    #[inline(always)]
484    pub fn is_768(&self) -> bool {
485        *self == STARTUP_A::_768
486    }
487    #[doc = "Checks if the value of the field is `_832`"]
488    #[inline(always)]
489    pub fn is_832(&self) -> bool {
490        *self == STARTUP_A::_832
491    }
492    #[doc = "Checks if the value of the field is `_896`"]
493    #[inline(always)]
494    pub fn is_896(&self) -> bool {
495        *self == STARTUP_A::_896
496    }
497    #[doc = "Checks if the value of the field is `_960`"]
498    #[inline(always)]
499    pub fn is_960(&self) -> bool {
500        *self == STARTUP_A::_960
501    }
502    #[doc = "Checks if the value of the field is `_1024`"]
503    #[inline(always)]
504    pub fn is_1024(&self) -> bool {
505        *self == STARTUP_A::_1024
506    }
507    #[doc = "Checks if the value of the field is `_1088`"]
508    #[inline(always)]
509    pub fn is_1088(&self) -> bool {
510        *self == STARTUP_A::_1088
511    }
512    #[doc = "Checks if the value of the field is `_1152`"]
513    #[inline(always)]
514    pub fn is_1152(&self) -> bool {
515        *self == STARTUP_A::_1152
516    }
517    #[doc = "Checks if the value of the field is `_1216`"]
518    #[inline(always)]
519    pub fn is_1216(&self) -> bool {
520        *self == STARTUP_A::_1216
521    }
522    #[doc = "Checks if the value of the field is `_1280`"]
523    #[inline(always)]
524    pub fn is_1280(&self) -> bool {
525        *self == STARTUP_A::_1280
526    }
527    #[doc = "Checks if the value of the field is `_1344`"]
528    #[inline(always)]
529    pub fn is_1344(&self) -> bool {
530        *self == STARTUP_A::_1344
531    }
532    #[doc = "Checks if the value of the field is `_1408`"]
533    #[inline(always)]
534    pub fn is_1408(&self) -> bool {
535        *self == STARTUP_A::_1408
536    }
537    #[doc = "Checks if the value of the field is `_1472`"]
538    #[inline(always)]
539    pub fn is_1472(&self) -> bool {
540        *self == STARTUP_A::_1472
541    }
542    #[doc = "Checks if the value of the field is `_1536`"]
543    #[inline(always)]
544    pub fn is_1536(&self) -> bool {
545        *self == STARTUP_A::_1536
546    }
547    #[doc = "Checks if the value of the field is `_1600`"]
548    #[inline(always)]
549    pub fn is_1600(&self) -> bool {
550        *self == STARTUP_A::_1600
551    }
552    #[doc = "Checks if the value of the field is `_1664`"]
553    #[inline(always)]
554    pub fn is_1664(&self) -> bool {
555        *self == STARTUP_A::_1664
556    }
557    #[doc = "Checks if the value of the field is `_1728`"]
558    #[inline(always)]
559    pub fn is_1728(&self) -> bool {
560        *self == STARTUP_A::_1728
561    }
562    #[doc = "Checks if the value of the field is `_1792`"]
563    #[inline(always)]
564    pub fn is_1792(&self) -> bool {
565        *self == STARTUP_A::_1792
566    }
567    #[doc = "Checks if the value of the field is `_1856`"]
568    #[inline(always)]
569    pub fn is_1856(&self) -> bool {
570        *self == STARTUP_A::_1856
571    }
572    #[doc = "Checks if the value of the field is `_1920`"]
573    #[inline(always)]
574    pub fn is_1920(&self) -> bool {
575        *self == STARTUP_A::_1920
576    }
577    #[doc = "Checks if the value of the field is `_1984`"]
578    #[inline(always)]
579    pub fn is_1984(&self) -> bool {
580        *self == STARTUP_A::_1984
581    }
582}
583#[doc = "Field `STARTUP` writer - Startup Time Selection"]
584pub type STARTUP_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MR_SPEC, u8, STARTUP_A, 6, O>;
585impl<'a, const O: u8> STARTUP_W<'a, O> {
586    #[doc = "0 periods of DACClock"]
587    #[inline(always)]
588    pub fn _0(self) -> &'a mut W {
589        self.variant(STARTUP_A::_0)
590    }
591    #[doc = "8 periods of DACClock"]
592    #[inline(always)]
593    pub fn _8(self) -> &'a mut W {
594        self.variant(STARTUP_A::_8)
595    }
596    #[doc = "16 periods of DACClock"]
597    #[inline(always)]
598    pub fn _16(self) -> &'a mut W {
599        self.variant(STARTUP_A::_16)
600    }
601    #[doc = "24 periods of DACClock"]
602    #[inline(always)]
603    pub fn _24(self) -> &'a mut W {
604        self.variant(STARTUP_A::_24)
605    }
606    #[doc = "64 periods of DACClock"]
607    #[inline(always)]
608    pub fn _64(self) -> &'a mut W {
609        self.variant(STARTUP_A::_64)
610    }
611    #[doc = "80 periods of DACClock"]
612    #[inline(always)]
613    pub fn _80(self) -> &'a mut W {
614        self.variant(STARTUP_A::_80)
615    }
616    #[doc = "96 periods of DACClock"]
617    #[inline(always)]
618    pub fn _96(self) -> &'a mut W {
619        self.variant(STARTUP_A::_96)
620    }
621    #[doc = "112 periods of DACClock"]
622    #[inline(always)]
623    pub fn _112(self) -> &'a mut W {
624        self.variant(STARTUP_A::_112)
625    }
626    #[doc = "512 periods of DACClock"]
627    #[inline(always)]
628    pub fn _512(self) -> &'a mut W {
629        self.variant(STARTUP_A::_512)
630    }
631    #[doc = "576 periods of DACClock"]
632    #[inline(always)]
633    pub fn _576(self) -> &'a mut W {
634        self.variant(STARTUP_A::_576)
635    }
636    #[doc = "640 periods of DACClock"]
637    #[inline(always)]
638    pub fn _640(self) -> &'a mut W {
639        self.variant(STARTUP_A::_640)
640    }
641    #[doc = "704 periods of DACClock"]
642    #[inline(always)]
643    pub fn _704(self) -> &'a mut W {
644        self.variant(STARTUP_A::_704)
645    }
646    #[doc = "768 periods of DACClock"]
647    #[inline(always)]
648    pub fn _768(self) -> &'a mut W {
649        self.variant(STARTUP_A::_768)
650    }
651    #[doc = "832 periods of DACClock"]
652    #[inline(always)]
653    pub fn _832(self) -> &'a mut W {
654        self.variant(STARTUP_A::_832)
655    }
656    #[doc = "896 periods of DACClock"]
657    #[inline(always)]
658    pub fn _896(self) -> &'a mut W {
659        self.variant(STARTUP_A::_896)
660    }
661    #[doc = "960 periods of DACClock"]
662    #[inline(always)]
663    pub fn _960(self) -> &'a mut W {
664        self.variant(STARTUP_A::_960)
665    }
666    #[doc = "1024 periods of DACClock"]
667    #[inline(always)]
668    pub fn _1024(self) -> &'a mut W {
669        self.variant(STARTUP_A::_1024)
670    }
671    #[doc = "1088 periods of DACClock"]
672    #[inline(always)]
673    pub fn _1088(self) -> &'a mut W {
674        self.variant(STARTUP_A::_1088)
675    }
676    #[doc = "1152 periods of DACClock"]
677    #[inline(always)]
678    pub fn _1152(self) -> &'a mut W {
679        self.variant(STARTUP_A::_1152)
680    }
681    #[doc = "1216 periods of DACClock"]
682    #[inline(always)]
683    pub fn _1216(self) -> &'a mut W {
684        self.variant(STARTUP_A::_1216)
685    }
686    #[doc = "1280 periods of DACClock"]
687    #[inline(always)]
688    pub fn _1280(self) -> &'a mut W {
689        self.variant(STARTUP_A::_1280)
690    }
691    #[doc = "1344 periods of DACClock"]
692    #[inline(always)]
693    pub fn _1344(self) -> &'a mut W {
694        self.variant(STARTUP_A::_1344)
695    }
696    #[doc = "1408 periods of DACClock"]
697    #[inline(always)]
698    pub fn _1408(self) -> &'a mut W {
699        self.variant(STARTUP_A::_1408)
700    }
701    #[doc = "1472 periods of DACClock"]
702    #[inline(always)]
703    pub fn _1472(self) -> &'a mut W {
704        self.variant(STARTUP_A::_1472)
705    }
706    #[doc = "1536 periods of DACClock"]
707    #[inline(always)]
708    pub fn _1536(self) -> &'a mut W {
709        self.variant(STARTUP_A::_1536)
710    }
711    #[doc = "1600 periods of DACClock"]
712    #[inline(always)]
713    pub fn _1600(self) -> &'a mut W {
714        self.variant(STARTUP_A::_1600)
715    }
716    #[doc = "1664 periods of DACClock"]
717    #[inline(always)]
718    pub fn _1664(self) -> &'a mut W {
719        self.variant(STARTUP_A::_1664)
720    }
721    #[doc = "1728 periods of DACClock"]
722    #[inline(always)]
723    pub fn _1728(self) -> &'a mut W {
724        self.variant(STARTUP_A::_1728)
725    }
726    #[doc = "1792 periods of DACClock"]
727    #[inline(always)]
728    pub fn _1792(self) -> &'a mut W {
729        self.variant(STARTUP_A::_1792)
730    }
731    #[doc = "1856 periods of DACClock"]
732    #[inline(always)]
733    pub fn _1856(self) -> &'a mut W {
734        self.variant(STARTUP_A::_1856)
735    }
736    #[doc = "1920 periods of DACClock"]
737    #[inline(always)]
738    pub fn _1920(self) -> &'a mut W {
739        self.variant(STARTUP_A::_1920)
740    }
741    #[doc = "1984 periods of DACClock"]
742    #[inline(always)]
743    pub fn _1984(self) -> &'a mut W {
744        self.variant(STARTUP_A::_1984)
745    }
746}
747impl R {
748    #[doc = "Bit 0 - Trigger Enable"]
749    #[inline(always)]
750    pub fn trgen(&self) -> TRGEN_R {
751        TRGEN_R::new((self.bits & 1) != 0)
752    }
753    #[doc = "Bits 1:3 - Trigger Selection"]
754    #[inline(always)]
755    pub fn trgsel(&self) -> TRGSEL_R {
756        TRGSEL_R::new(((self.bits >> 1) & 7) as u8)
757    }
758    #[doc = "Bit 4 - Word Transfer"]
759    #[inline(always)]
760    pub fn word(&self) -> WORD_R {
761        WORD_R::new(((self.bits >> 4) & 1) != 0)
762    }
763    #[doc = "Bit 5 - Sleep Mode"]
764    #[inline(always)]
765    pub fn sleep(&self) -> SLEEP_R {
766        SLEEP_R::new(((self.bits >> 5) & 1) != 0)
767    }
768    #[doc = "Bit 6 - Fast Wake up Mode"]
769    #[inline(always)]
770    pub fn fastwkup(&self) -> FASTWKUP_R {
771        FASTWKUP_R::new(((self.bits >> 6) & 1) != 0)
772    }
773    #[doc = "Bits 8:15 - Refresh Period"]
774    #[inline(always)]
775    pub fn refresh(&self) -> REFRESH_R {
776        REFRESH_R::new(((self.bits >> 8) & 0xff) as u8)
777    }
778    #[doc = "Bits 16:17 - User Channel Selection"]
779    #[inline(always)]
780    pub fn user_sel(&self) -> USER_SEL_R {
781        USER_SEL_R::new(((self.bits >> 16) & 3) as u8)
782    }
783    #[doc = "Bit 20 - Tag Selection Mode"]
784    #[inline(always)]
785    pub fn tag(&self) -> TAG_R {
786        TAG_R::new(((self.bits >> 20) & 1) != 0)
787    }
788    #[doc = "Bit 21 - Max Speed Mode"]
789    #[inline(always)]
790    pub fn maxs(&self) -> MAXS_R {
791        MAXS_R::new(((self.bits >> 21) & 1) != 0)
792    }
793    #[doc = "Bits 24:29 - Startup Time Selection"]
794    #[inline(always)]
795    pub fn startup(&self) -> STARTUP_R {
796        STARTUP_R::new(((self.bits >> 24) & 0x3f) as u8)
797    }
798}
799impl W {
800    #[doc = "Bit 0 - Trigger Enable"]
801    #[inline(always)]
802    #[must_use]
803    pub fn trgen(&mut self) -> TRGEN_W<0> {
804        TRGEN_W::new(self)
805    }
806    #[doc = "Bits 1:3 - Trigger Selection"]
807    #[inline(always)]
808    #[must_use]
809    pub fn trgsel(&mut self) -> TRGSEL_W<1> {
810        TRGSEL_W::new(self)
811    }
812    #[doc = "Bit 4 - Word Transfer"]
813    #[inline(always)]
814    #[must_use]
815    pub fn word(&mut self) -> WORD_W<4> {
816        WORD_W::new(self)
817    }
818    #[doc = "Bit 5 - Sleep Mode"]
819    #[inline(always)]
820    #[must_use]
821    pub fn sleep(&mut self) -> SLEEP_W<5> {
822        SLEEP_W::new(self)
823    }
824    #[doc = "Bit 6 - Fast Wake up Mode"]
825    #[inline(always)]
826    #[must_use]
827    pub fn fastwkup(&mut self) -> FASTWKUP_W<6> {
828        FASTWKUP_W::new(self)
829    }
830    #[doc = "Bits 8:15 - Refresh Period"]
831    #[inline(always)]
832    #[must_use]
833    pub fn refresh(&mut self) -> REFRESH_W<8> {
834        REFRESH_W::new(self)
835    }
836    #[doc = "Bits 16:17 - User Channel Selection"]
837    #[inline(always)]
838    #[must_use]
839    pub fn user_sel(&mut self) -> USER_SEL_W<16> {
840        USER_SEL_W::new(self)
841    }
842    #[doc = "Bit 20 - Tag Selection Mode"]
843    #[inline(always)]
844    #[must_use]
845    pub fn tag(&mut self) -> TAG_W<20> {
846        TAG_W::new(self)
847    }
848    #[doc = "Bit 21 - Max Speed Mode"]
849    #[inline(always)]
850    #[must_use]
851    pub fn maxs(&mut self) -> MAXS_W<21> {
852        MAXS_W::new(self)
853    }
854    #[doc = "Bits 24:29 - Startup Time Selection"]
855    #[inline(always)]
856    #[must_use]
857    pub fn startup(&mut self) -> STARTUP_W<24> {
858        STARTUP_W::new(self)
859    }
860    #[doc = "Writes raw bits to the register."]
861    #[inline(always)]
862    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
863        self.0.bits(bits);
864        self
865    }
866}
867#[doc = "Mode 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 [mr](index.html) module"]
868pub struct MR_SPEC;
869impl crate::RegisterSpec for MR_SPEC {
870    type Ux = u32;
871}
872#[doc = "`read()` method returns [mr::R](R) reader structure"]
873impl crate::Readable for MR_SPEC {
874    type Reader = R;
875}
876#[doc = "`write(|w| ..)` method takes [mr::W](W) writer structure"]
877impl crate::Writable for MR_SPEC {
878    type Writer = W;
879    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
880    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
881}
882#[doc = "`reset()` method sets MR to value 0"]
883impl crate::Resettable for MR_SPEC {
884    const RESET_VALUE: Self::Ux = 0;
885}