atsam4e16e_pac/acc/
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 `SELMINUS` reader - Selection for Minus Comparator Input"]
38pub type SELMINUS_R = crate::FieldReader<u8, SELMINUS_A>;
39#[doc = "Selection for Minus Comparator Input\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41#[repr(u8)]
42pub enum SELMINUS_A {
43    #[doc = "0: Select TS"]
44    TS = 0,
45    #[doc = "1: Select ADVREF"]
46    ADVREF = 1,
47    #[doc = "2: Select DAC0"]
48    DAC0 = 2,
49    #[doc = "3: Select DAC1"]
50    DAC1 = 3,
51    #[doc = "4: Select AD0"]
52    AD0 = 4,
53    #[doc = "5: Select AD1"]
54    AD1 = 5,
55    #[doc = "6: Select AD2"]
56    AD2 = 6,
57    #[doc = "7: Select AD3"]
58    AD3 = 7,
59}
60impl From<SELMINUS_A> for u8 {
61    #[inline(always)]
62    fn from(variant: SELMINUS_A) -> Self {
63        variant as _
64    }
65}
66impl SELMINUS_R {
67    #[doc = "Get enumerated values variant"]
68    #[inline(always)]
69    pub fn variant(&self) -> SELMINUS_A {
70        match self.bits {
71            0 => SELMINUS_A::TS,
72            1 => SELMINUS_A::ADVREF,
73            2 => SELMINUS_A::DAC0,
74            3 => SELMINUS_A::DAC1,
75            4 => SELMINUS_A::AD0,
76            5 => SELMINUS_A::AD1,
77            6 => SELMINUS_A::AD2,
78            7 => SELMINUS_A::AD3,
79            _ => unreachable!(),
80        }
81    }
82    #[doc = "Checks if the value of the field is `TS`"]
83    #[inline(always)]
84    pub fn is_ts(&self) -> bool {
85        *self == SELMINUS_A::TS
86    }
87    #[doc = "Checks if the value of the field is `ADVREF`"]
88    #[inline(always)]
89    pub fn is_advref(&self) -> bool {
90        *self == SELMINUS_A::ADVREF
91    }
92    #[doc = "Checks if the value of the field is `DAC0`"]
93    #[inline(always)]
94    pub fn is_dac0(&self) -> bool {
95        *self == SELMINUS_A::DAC0
96    }
97    #[doc = "Checks if the value of the field is `DAC1`"]
98    #[inline(always)]
99    pub fn is_dac1(&self) -> bool {
100        *self == SELMINUS_A::DAC1
101    }
102    #[doc = "Checks if the value of the field is `AD0`"]
103    #[inline(always)]
104    pub fn is_ad0(&self) -> bool {
105        *self == SELMINUS_A::AD0
106    }
107    #[doc = "Checks if the value of the field is `AD1`"]
108    #[inline(always)]
109    pub fn is_ad1(&self) -> bool {
110        *self == SELMINUS_A::AD1
111    }
112    #[doc = "Checks if the value of the field is `AD2`"]
113    #[inline(always)]
114    pub fn is_ad2(&self) -> bool {
115        *self == SELMINUS_A::AD2
116    }
117    #[doc = "Checks if the value of the field is `AD3`"]
118    #[inline(always)]
119    pub fn is_ad3(&self) -> bool {
120        *self == SELMINUS_A::AD3
121    }
122}
123#[doc = "Field `SELMINUS` writer - Selection for Minus Comparator Input"]
124pub type SELMINUS_W<'a, const O: u8> =
125    crate::FieldWriterSafe<'a, u32, MR_SPEC, u8, SELMINUS_A, 3, O>;
126impl<'a, const O: u8> SELMINUS_W<'a, O> {
127    #[doc = "Select TS"]
128    #[inline(always)]
129    pub fn ts(self) -> &'a mut W {
130        self.variant(SELMINUS_A::TS)
131    }
132    #[doc = "Select ADVREF"]
133    #[inline(always)]
134    pub fn advref(self) -> &'a mut W {
135        self.variant(SELMINUS_A::ADVREF)
136    }
137    #[doc = "Select DAC0"]
138    #[inline(always)]
139    pub fn dac0(self) -> &'a mut W {
140        self.variant(SELMINUS_A::DAC0)
141    }
142    #[doc = "Select DAC1"]
143    #[inline(always)]
144    pub fn dac1(self) -> &'a mut W {
145        self.variant(SELMINUS_A::DAC1)
146    }
147    #[doc = "Select AD0"]
148    #[inline(always)]
149    pub fn ad0(self) -> &'a mut W {
150        self.variant(SELMINUS_A::AD0)
151    }
152    #[doc = "Select AD1"]
153    #[inline(always)]
154    pub fn ad1(self) -> &'a mut W {
155        self.variant(SELMINUS_A::AD1)
156    }
157    #[doc = "Select AD2"]
158    #[inline(always)]
159    pub fn ad2(self) -> &'a mut W {
160        self.variant(SELMINUS_A::AD2)
161    }
162    #[doc = "Select AD3"]
163    #[inline(always)]
164    pub fn ad3(self) -> &'a mut W {
165        self.variant(SELMINUS_A::AD3)
166    }
167}
168#[doc = "Field `SELPLUS` reader - Selection For Plus Comparator Input"]
169pub type SELPLUS_R = crate::FieldReader<u8, SELPLUS_A>;
170#[doc = "Selection For Plus Comparator Input\n\nValue on reset: 0"]
171#[derive(Clone, Copy, Debug, PartialEq, Eq)]
172#[repr(u8)]
173pub enum SELPLUS_A {
174    #[doc = "0: Select AD0"]
175    AD0 = 0,
176    #[doc = "1: Select AD1"]
177    AD1 = 1,
178    #[doc = "2: Select AD2"]
179    AD2 = 2,
180    #[doc = "3: Select AD3"]
181    AD3 = 3,
182    #[doc = "4: Select AD4"]
183    AD4 = 4,
184    #[doc = "5: Select AD5"]
185    AD5 = 5,
186    #[doc = "6: Select AD6"]
187    AD6 = 6,
188    #[doc = "7: Select AD7"]
189    AD7 = 7,
190}
191impl From<SELPLUS_A> for u8 {
192    #[inline(always)]
193    fn from(variant: SELPLUS_A) -> Self {
194        variant as _
195    }
196}
197impl SELPLUS_R {
198    #[doc = "Get enumerated values variant"]
199    #[inline(always)]
200    pub fn variant(&self) -> SELPLUS_A {
201        match self.bits {
202            0 => SELPLUS_A::AD0,
203            1 => SELPLUS_A::AD1,
204            2 => SELPLUS_A::AD2,
205            3 => SELPLUS_A::AD3,
206            4 => SELPLUS_A::AD4,
207            5 => SELPLUS_A::AD5,
208            6 => SELPLUS_A::AD6,
209            7 => SELPLUS_A::AD7,
210            _ => unreachable!(),
211        }
212    }
213    #[doc = "Checks if the value of the field is `AD0`"]
214    #[inline(always)]
215    pub fn is_ad0(&self) -> bool {
216        *self == SELPLUS_A::AD0
217    }
218    #[doc = "Checks if the value of the field is `AD1`"]
219    #[inline(always)]
220    pub fn is_ad1(&self) -> bool {
221        *self == SELPLUS_A::AD1
222    }
223    #[doc = "Checks if the value of the field is `AD2`"]
224    #[inline(always)]
225    pub fn is_ad2(&self) -> bool {
226        *self == SELPLUS_A::AD2
227    }
228    #[doc = "Checks if the value of the field is `AD3`"]
229    #[inline(always)]
230    pub fn is_ad3(&self) -> bool {
231        *self == SELPLUS_A::AD3
232    }
233    #[doc = "Checks if the value of the field is `AD4`"]
234    #[inline(always)]
235    pub fn is_ad4(&self) -> bool {
236        *self == SELPLUS_A::AD4
237    }
238    #[doc = "Checks if the value of the field is `AD5`"]
239    #[inline(always)]
240    pub fn is_ad5(&self) -> bool {
241        *self == SELPLUS_A::AD5
242    }
243    #[doc = "Checks if the value of the field is `AD6`"]
244    #[inline(always)]
245    pub fn is_ad6(&self) -> bool {
246        *self == SELPLUS_A::AD6
247    }
248    #[doc = "Checks if the value of the field is `AD7`"]
249    #[inline(always)]
250    pub fn is_ad7(&self) -> bool {
251        *self == SELPLUS_A::AD7
252    }
253}
254#[doc = "Field `SELPLUS` writer - Selection For Plus Comparator Input"]
255pub type SELPLUS_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, MR_SPEC, u8, SELPLUS_A, 3, O>;
256impl<'a, const O: u8> SELPLUS_W<'a, O> {
257    #[doc = "Select AD0"]
258    #[inline(always)]
259    pub fn ad0(self) -> &'a mut W {
260        self.variant(SELPLUS_A::AD0)
261    }
262    #[doc = "Select AD1"]
263    #[inline(always)]
264    pub fn ad1(self) -> &'a mut W {
265        self.variant(SELPLUS_A::AD1)
266    }
267    #[doc = "Select AD2"]
268    #[inline(always)]
269    pub fn ad2(self) -> &'a mut W {
270        self.variant(SELPLUS_A::AD2)
271    }
272    #[doc = "Select AD3"]
273    #[inline(always)]
274    pub fn ad3(self) -> &'a mut W {
275        self.variant(SELPLUS_A::AD3)
276    }
277    #[doc = "Select AD4"]
278    #[inline(always)]
279    pub fn ad4(self) -> &'a mut W {
280        self.variant(SELPLUS_A::AD4)
281    }
282    #[doc = "Select AD5"]
283    #[inline(always)]
284    pub fn ad5(self) -> &'a mut W {
285        self.variant(SELPLUS_A::AD5)
286    }
287    #[doc = "Select AD6"]
288    #[inline(always)]
289    pub fn ad6(self) -> &'a mut W {
290        self.variant(SELPLUS_A::AD6)
291    }
292    #[doc = "Select AD7"]
293    #[inline(always)]
294    pub fn ad7(self) -> &'a mut W {
295        self.variant(SELPLUS_A::AD7)
296    }
297}
298#[doc = "Field `ACEN` reader - Analog Comparator Enable"]
299pub type ACEN_R = crate::BitReader<ACEN_A>;
300#[doc = "Analog Comparator Enable\n\nValue on reset: 0"]
301#[derive(Clone, Copy, Debug, PartialEq, Eq)]
302pub enum ACEN_A {
303    #[doc = "0: Analog comparator disabled."]
304    DIS = 0,
305    #[doc = "1: Analog comparator enabled."]
306    EN = 1,
307}
308impl From<ACEN_A> for bool {
309    #[inline(always)]
310    fn from(variant: ACEN_A) -> Self {
311        variant as u8 != 0
312    }
313}
314impl ACEN_R {
315    #[doc = "Get enumerated values variant"]
316    #[inline(always)]
317    pub fn variant(&self) -> ACEN_A {
318        match self.bits {
319            false => ACEN_A::DIS,
320            true => ACEN_A::EN,
321        }
322    }
323    #[doc = "Checks if the value of the field is `DIS`"]
324    #[inline(always)]
325    pub fn is_dis(&self) -> bool {
326        *self == ACEN_A::DIS
327    }
328    #[doc = "Checks if the value of the field is `EN`"]
329    #[inline(always)]
330    pub fn is_en(&self) -> bool {
331        *self == ACEN_A::EN
332    }
333}
334#[doc = "Field `ACEN` writer - Analog Comparator Enable"]
335pub type ACEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, MR_SPEC, ACEN_A, O>;
336impl<'a, const O: u8> ACEN_W<'a, O> {
337    #[doc = "Analog comparator disabled."]
338    #[inline(always)]
339    pub fn dis(self) -> &'a mut W {
340        self.variant(ACEN_A::DIS)
341    }
342    #[doc = "Analog comparator enabled."]
343    #[inline(always)]
344    pub fn en(self) -> &'a mut W {
345        self.variant(ACEN_A::EN)
346    }
347}
348#[doc = "Field `EDGETYP` reader - Edge Type"]
349pub type EDGETYP_R = crate::FieldReader<u8, EDGETYP_A>;
350#[doc = "Edge Type\n\nValue on reset: 0"]
351#[derive(Clone, Copy, Debug, PartialEq, Eq)]
352#[repr(u8)]
353pub enum EDGETYP_A {
354    #[doc = "0: Only rising edge of comparator output"]
355    RISING = 0,
356    #[doc = "1: Falling edge of comparator output"]
357    FALLING = 1,
358    #[doc = "2: Any edge of comparator output"]
359    ANY = 2,
360}
361impl From<EDGETYP_A> for u8 {
362    #[inline(always)]
363    fn from(variant: EDGETYP_A) -> Self {
364        variant as _
365    }
366}
367impl EDGETYP_R {
368    #[doc = "Get enumerated values variant"]
369    #[inline(always)]
370    pub fn variant(&self) -> Option<EDGETYP_A> {
371        match self.bits {
372            0 => Some(EDGETYP_A::RISING),
373            1 => Some(EDGETYP_A::FALLING),
374            2 => Some(EDGETYP_A::ANY),
375            _ => None,
376        }
377    }
378    #[doc = "Checks if the value of the field is `RISING`"]
379    #[inline(always)]
380    pub fn is_rising(&self) -> bool {
381        *self == EDGETYP_A::RISING
382    }
383    #[doc = "Checks if the value of the field is `FALLING`"]
384    #[inline(always)]
385    pub fn is_falling(&self) -> bool {
386        *self == EDGETYP_A::FALLING
387    }
388    #[doc = "Checks if the value of the field is `ANY`"]
389    #[inline(always)]
390    pub fn is_any(&self) -> bool {
391        *self == EDGETYP_A::ANY
392    }
393}
394#[doc = "Field `EDGETYP` writer - Edge Type"]
395pub type EDGETYP_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MR_SPEC, u8, EDGETYP_A, 2, O>;
396impl<'a, const O: u8> EDGETYP_W<'a, O> {
397    #[doc = "Only rising edge of comparator output"]
398    #[inline(always)]
399    pub fn rising(self) -> &'a mut W {
400        self.variant(EDGETYP_A::RISING)
401    }
402    #[doc = "Falling edge of comparator output"]
403    #[inline(always)]
404    pub fn falling(self) -> &'a mut W {
405        self.variant(EDGETYP_A::FALLING)
406    }
407    #[doc = "Any edge of comparator output"]
408    #[inline(always)]
409    pub fn any(self) -> &'a mut W {
410        self.variant(EDGETYP_A::ANY)
411    }
412}
413#[doc = "Field `INV` reader - Invert Comparator Output"]
414pub type INV_R = crate::BitReader<INV_A>;
415#[doc = "Invert Comparator Output\n\nValue on reset: 0"]
416#[derive(Clone, Copy, Debug, PartialEq, Eq)]
417pub enum INV_A {
418    #[doc = "0: Analog comparator output is directly processed."]
419    DIS = 0,
420    #[doc = "1: Analog comparator output is inverted prior to being processed."]
421    EN = 1,
422}
423impl From<INV_A> for bool {
424    #[inline(always)]
425    fn from(variant: INV_A) -> Self {
426        variant as u8 != 0
427    }
428}
429impl INV_R {
430    #[doc = "Get enumerated values variant"]
431    #[inline(always)]
432    pub fn variant(&self) -> INV_A {
433        match self.bits {
434            false => INV_A::DIS,
435            true => INV_A::EN,
436        }
437    }
438    #[doc = "Checks if the value of the field is `DIS`"]
439    #[inline(always)]
440    pub fn is_dis(&self) -> bool {
441        *self == INV_A::DIS
442    }
443    #[doc = "Checks if the value of the field is `EN`"]
444    #[inline(always)]
445    pub fn is_en(&self) -> bool {
446        *self == INV_A::EN
447    }
448}
449#[doc = "Field `INV` writer - Invert Comparator Output"]
450pub type INV_W<'a, const O: u8> = crate::BitWriter<'a, u32, MR_SPEC, INV_A, O>;
451impl<'a, const O: u8> INV_W<'a, O> {
452    #[doc = "Analog comparator output is directly processed."]
453    #[inline(always)]
454    pub fn dis(self) -> &'a mut W {
455        self.variant(INV_A::DIS)
456    }
457    #[doc = "Analog comparator output is inverted prior to being processed."]
458    #[inline(always)]
459    pub fn en(self) -> &'a mut W {
460        self.variant(INV_A::EN)
461    }
462}
463#[doc = "Field `SELFS` reader - Selection Of Fault Source"]
464pub type SELFS_R = crate::BitReader<SELFS_A>;
465#[doc = "Selection Of Fault Source\n\nValue on reset: 0"]
466#[derive(Clone, Copy, Debug, PartialEq, Eq)]
467pub enum SELFS_A {
468    #[doc = "0: The CF flag is used to drive the FAULT output."]
469    CF = 0,
470    #[doc = "1: The output of the analog comparator flag is used to drive the FAULT output."]
471    OUTPUT = 1,
472}
473impl From<SELFS_A> for bool {
474    #[inline(always)]
475    fn from(variant: SELFS_A) -> Self {
476        variant as u8 != 0
477    }
478}
479impl SELFS_R {
480    #[doc = "Get enumerated values variant"]
481    #[inline(always)]
482    pub fn variant(&self) -> SELFS_A {
483        match self.bits {
484            false => SELFS_A::CF,
485            true => SELFS_A::OUTPUT,
486        }
487    }
488    #[doc = "Checks if the value of the field is `CF`"]
489    #[inline(always)]
490    pub fn is_cf(&self) -> bool {
491        *self == SELFS_A::CF
492    }
493    #[doc = "Checks if the value of the field is `OUTPUT`"]
494    #[inline(always)]
495    pub fn is_output(&self) -> bool {
496        *self == SELFS_A::OUTPUT
497    }
498}
499#[doc = "Field `SELFS` writer - Selection Of Fault Source"]
500pub type SELFS_W<'a, const O: u8> = crate::BitWriter<'a, u32, MR_SPEC, SELFS_A, O>;
501impl<'a, const O: u8> SELFS_W<'a, O> {
502    #[doc = "The CF flag is used to drive the FAULT output."]
503    #[inline(always)]
504    pub fn cf(self) -> &'a mut W {
505        self.variant(SELFS_A::CF)
506    }
507    #[doc = "The output of the analog comparator flag is used to drive the FAULT output."]
508    #[inline(always)]
509    pub fn output(self) -> &'a mut W {
510        self.variant(SELFS_A::OUTPUT)
511    }
512}
513#[doc = "Field `FE` reader - Fault Enable"]
514pub type FE_R = crate::BitReader<FE_A>;
515#[doc = "Fault Enable\n\nValue on reset: 0"]
516#[derive(Clone, Copy, Debug, PartialEq, Eq)]
517pub enum FE_A {
518    #[doc = "0: The FAULT output is tied to 0."]
519    DIS = 0,
520    #[doc = "1: The FAULT output is driven by the signal defined by SELFS."]
521    EN = 1,
522}
523impl From<FE_A> for bool {
524    #[inline(always)]
525    fn from(variant: FE_A) -> Self {
526        variant as u8 != 0
527    }
528}
529impl FE_R {
530    #[doc = "Get enumerated values variant"]
531    #[inline(always)]
532    pub fn variant(&self) -> FE_A {
533        match self.bits {
534            false => FE_A::DIS,
535            true => FE_A::EN,
536        }
537    }
538    #[doc = "Checks if the value of the field is `DIS`"]
539    #[inline(always)]
540    pub fn is_dis(&self) -> bool {
541        *self == FE_A::DIS
542    }
543    #[doc = "Checks if the value of the field is `EN`"]
544    #[inline(always)]
545    pub fn is_en(&self) -> bool {
546        *self == FE_A::EN
547    }
548}
549#[doc = "Field `FE` writer - Fault Enable"]
550pub type FE_W<'a, const O: u8> = crate::BitWriter<'a, u32, MR_SPEC, FE_A, O>;
551impl<'a, const O: u8> FE_W<'a, O> {
552    #[doc = "The FAULT output is tied to 0."]
553    #[inline(always)]
554    pub fn dis(self) -> &'a mut W {
555        self.variant(FE_A::DIS)
556    }
557    #[doc = "The FAULT output is driven by the signal defined by SELFS."]
558    #[inline(always)]
559    pub fn en(self) -> &'a mut W {
560        self.variant(FE_A::EN)
561    }
562}
563impl R {
564    #[doc = "Bits 0:2 - Selection for Minus Comparator Input"]
565    #[inline(always)]
566    pub fn selminus(&self) -> SELMINUS_R {
567        SELMINUS_R::new((self.bits & 7) as u8)
568    }
569    #[doc = "Bits 4:6 - Selection For Plus Comparator Input"]
570    #[inline(always)]
571    pub fn selplus(&self) -> SELPLUS_R {
572        SELPLUS_R::new(((self.bits >> 4) & 7) as u8)
573    }
574    #[doc = "Bit 8 - Analog Comparator Enable"]
575    #[inline(always)]
576    pub fn acen(&self) -> ACEN_R {
577        ACEN_R::new(((self.bits >> 8) & 1) != 0)
578    }
579    #[doc = "Bits 9:10 - Edge Type"]
580    #[inline(always)]
581    pub fn edgetyp(&self) -> EDGETYP_R {
582        EDGETYP_R::new(((self.bits >> 9) & 3) as u8)
583    }
584    #[doc = "Bit 12 - Invert Comparator Output"]
585    #[inline(always)]
586    pub fn inv(&self) -> INV_R {
587        INV_R::new(((self.bits >> 12) & 1) != 0)
588    }
589    #[doc = "Bit 13 - Selection Of Fault Source"]
590    #[inline(always)]
591    pub fn selfs(&self) -> SELFS_R {
592        SELFS_R::new(((self.bits >> 13) & 1) != 0)
593    }
594    #[doc = "Bit 14 - Fault Enable"]
595    #[inline(always)]
596    pub fn fe(&self) -> FE_R {
597        FE_R::new(((self.bits >> 14) & 1) != 0)
598    }
599}
600impl W {
601    #[doc = "Bits 0:2 - Selection for Minus Comparator Input"]
602    #[inline(always)]
603    #[must_use]
604    pub fn selminus(&mut self) -> SELMINUS_W<0> {
605        SELMINUS_W::new(self)
606    }
607    #[doc = "Bits 4:6 - Selection For Plus Comparator Input"]
608    #[inline(always)]
609    #[must_use]
610    pub fn selplus(&mut self) -> SELPLUS_W<4> {
611        SELPLUS_W::new(self)
612    }
613    #[doc = "Bit 8 - Analog Comparator Enable"]
614    #[inline(always)]
615    #[must_use]
616    pub fn acen(&mut self) -> ACEN_W<8> {
617        ACEN_W::new(self)
618    }
619    #[doc = "Bits 9:10 - Edge Type"]
620    #[inline(always)]
621    #[must_use]
622    pub fn edgetyp(&mut self) -> EDGETYP_W<9> {
623        EDGETYP_W::new(self)
624    }
625    #[doc = "Bit 12 - Invert Comparator Output"]
626    #[inline(always)]
627    #[must_use]
628    pub fn inv(&mut self) -> INV_W<12> {
629        INV_W::new(self)
630    }
631    #[doc = "Bit 13 - Selection Of Fault Source"]
632    #[inline(always)]
633    #[must_use]
634    pub fn selfs(&mut self) -> SELFS_W<13> {
635        SELFS_W::new(self)
636    }
637    #[doc = "Bit 14 - Fault Enable"]
638    #[inline(always)]
639    #[must_use]
640    pub fn fe(&mut self) -> FE_W<14> {
641        FE_W::new(self)
642    }
643    #[doc = "Writes raw bits to the register."]
644    #[inline(always)]
645    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
646        self.0.bits(bits);
647        self
648    }
649}
650#[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"]
651pub struct MR_SPEC;
652impl crate::RegisterSpec for MR_SPEC {
653    type Ux = u32;
654}
655#[doc = "`read()` method returns [mr::R](R) reader structure"]
656impl crate::Readable for MR_SPEC {
657    type Reader = R;
658}
659#[doc = "`write(|w| ..)` method takes [mr::W](W) writer structure"]
660impl crate::Writable for MR_SPEC {
661    type Writer = W;
662    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
663    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
664}
665#[doc = "`reset()` method sets MR to value 0"]
666impl crate::Resettable for MR_SPEC {
667    const RESET_VALUE: Self::Ux = 0;
668}