atsams70n21/afec0/
afec_emr.rs

1#[doc = "Register `AFEC_EMR` reader"]
2pub struct R(crate::R<AFEC_EMR_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<AFEC_EMR_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<AFEC_EMR_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<AFEC_EMR_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `AFEC_EMR` writer"]
17pub struct W(crate::W<AFEC_EMR_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<AFEC_EMR_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<AFEC_EMR_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<AFEC_EMR_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Comparison Mode\n\nValue on reset: 0"]
38#[derive(Clone, Copy, Debug, PartialEq)]
39#[repr(u8)]
40pub enum CMPMODE_A {
41    #[doc = "0: Generates an event when the converted data is lower than the low threshold of the window."]
42    LOW = 0,
43    #[doc = "1: Generates an event when the converted data is higher than the high threshold of the window."]
44    HIGH = 1,
45    #[doc = "2: Generates an event when the converted data is in the comparison window."]
46    IN = 2,
47    #[doc = "3: Generates an event when the converted data is out of the comparison window."]
48    OUT = 3,
49}
50impl From<CMPMODE_A> for u8 {
51    #[inline(always)]
52    fn from(variant: CMPMODE_A) -> Self {
53        variant as _
54    }
55}
56#[doc = "Field `CMPMODE` reader - Comparison Mode"]
57pub struct CMPMODE_R(crate::FieldReader<u8, CMPMODE_A>);
58impl CMPMODE_R {
59    #[inline(always)]
60    pub(crate) fn new(bits: u8) -> Self {
61        CMPMODE_R(crate::FieldReader::new(bits))
62    }
63    #[doc = r"Get enumerated values variant"]
64    #[inline(always)]
65    pub fn variant(&self) -> CMPMODE_A {
66        match self.bits {
67            0 => CMPMODE_A::LOW,
68            1 => CMPMODE_A::HIGH,
69            2 => CMPMODE_A::IN,
70            3 => CMPMODE_A::OUT,
71            _ => unreachable!(),
72        }
73    }
74    #[doc = "Checks if the value of the field is `LOW`"]
75    #[inline(always)]
76    pub fn is_low(&self) -> bool {
77        **self == CMPMODE_A::LOW
78    }
79    #[doc = "Checks if the value of the field is `HIGH`"]
80    #[inline(always)]
81    pub fn is_high(&self) -> bool {
82        **self == CMPMODE_A::HIGH
83    }
84    #[doc = "Checks if the value of the field is `IN`"]
85    #[inline(always)]
86    pub fn is_in(&self) -> bool {
87        **self == CMPMODE_A::IN
88    }
89    #[doc = "Checks if the value of the field is `OUT`"]
90    #[inline(always)]
91    pub fn is_out(&self) -> bool {
92        **self == CMPMODE_A::OUT
93    }
94}
95impl core::ops::Deref for CMPMODE_R {
96    type Target = crate::FieldReader<u8, CMPMODE_A>;
97    #[inline(always)]
98    fn deref(&self) -> &Self::Target {
99        &self.0
100    }
101}
102#[doc = "Field `CMPMODE` writer - Comparison Mode"]
103pub struct CMPMODE_W<'a> {
104    w: &'a mut W,
105}
106impl<'a> CMPMODE_W<'a> {
107    #[doc = r"Writes `variant` to the field"]
108    #[inline(always)]
109    pub fn variant(self, variant: CMPMODE_A) -> &'a mut W {
110        self.bits(variant.into())
111    }
112    #[doc = "Generates an event when the converted data is lower than the low threshold of the window."]
113    #[inline(always)]
114    pub fn low(self) -> &'a mut W {
115        self.variant(CMPMODE_A::LOW)
116    }
117    #[doc = "Generates an event when the converted data is higher than the high threshold of the window."]
118    #[inline(always)]
119    pub fn high(self) -> &'a mut W {
120        self.variant(CMPMODE_A::HIGH)
121    }
122    #[doc = "Generates an event when the converted data is in the comparison window."]
123    #[inline(always)]
124    pub fn in_(self) -> &'a mut W {
125        self.variant(CMPMODE_A::IN)
126    }
127    #[doc = "Generates an event when the converted data is out of the comparison window."]
128    #[inline(always)]
129    pub fn out(self) -> &'a mut W {
130        self.variant(CMPMODE_A::OUT)
131    }
132    #[doc = r"Writes raw bits to the field"]
133    #[inline(always)]
134    pub fn bits(self, value: u8) -> &'a mut W {
135        self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03);
136        self.w
137    }
138}
139#[doc = "Field `CMPSEL` reader - Comparison Selected Channel"]
140pub struct CMPSEL_R(crate::FieldReader<u8, u8>);
141impl CMPSEL_R {
142    #[inline(always)]
143    pub(crate) fn new(bits: u8) -> Self {
144        CMPSEL_R(crate::FieldReader::new(bits))
145    }
146}
147impl core::ops::Deref for CMPSEL_R {
148    type Target = crate::FieldReader<u8, u8>;
149    #[inline(always)]
150    fn deref(&self) -> &Self::Target {
151        &self.0
152    }
153}
154#[doc = "Field `CMPSEL` writer - Comparison Selected Channel"]
155pub struct CMPSEL_W<'a> {
156    w: &'a mut W,
157}
158impl<'a> CMPSEL_W<'a> {
159    #[doc = r"Writes raw bits to the field"]
160    #[inline(always)]
161    pub unsafe fn bits(self, value: u8) -> &'a mut W {
162        self.w.bits = (self.w.bits & !(0x1f << 3)) | ((value as u32 & 0x1f) << 3);
163        self.w
164    }
165}
166#[doc = "Field `CMPALL` reader - Compare All Channels"]
167pub struct CMPALL_R(crate::FieldReader<bool, bool>);
168impl CMPALL_R {
169    #[inline(always)]
170    pub(crate) fn new(bits: bool) -> Self {
171        CMPALL_R(crate::FieldReader::new(bits))
172    }
173}
174impl core::ops::Deref for CMPALL_R {
175    type Target = crate::FieldReader<bool, bool>;
176    #[inline(always)]
177    fn deref(&self) -> &Self::Target {
178        &self.0
179    }
180}
181#[doc = "Field `CMPALL` writer - Compare All Channels"]
182pub struct CMPALL_W<'a> {
183    w: &'a mut W,
184}
185impl<'a> CMPALL_W<'a> {
186    #[doc = r"Sets the field bit"]
187    #[inline(always)]
188    pub fn set_bit(self) -> &'a mut W {
189        self.bit(true)
190    }
191    #[doc = r"Clears the field bit"]
192    #[inline(always)]
193    pub fn clear_bit(self) -> &'a mut W {
194        self.bit(false)
195    }
196    #[doc = r"Writes raw bits to the field"]
197    #[inline(always)]
198    pub fn bit(self, value: bool) -> &'a mut W {
199        self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9);
200        self.w
201    }
202}
203#[doc = "Field `CMPFILTER` reader - Compare Event Filtering"]
204pub struct CMPFILTER_R(crate::FieldReader<u8, u8>);
205impl CMPFILTER_R {
206    #[inline(always)]
207    pub(crate) fn new(bits: u8) -> Self {
208        CMPFILTER_R(crate::FieldReader::new(bits))
209    }
210}
211impl core::ops::Deref for CMPFILTER_R {
212    type Target = crate::FieldReader<u8, u8>;
213    #[inline(always)]
214    fn deref(&self) -> &Self::Target {
215        &self.0
216    }
217}
218#[doc = "Field `CMPFILTER` writer - Compare Event Filtering"]
219pub struct CMPFILTER_W<'a> {
220    w: &'a mut W,
221}
222impl<'a> CMPFILTER_W<'a> {
223    #[doc = r"Writes raw bits to the field"]
224    #[inline(always)]
225    pub unsafe fn bits(self, value: u8) -> &'a mut W {
226        self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12);
227        self.w
228    }
229}
230#[doc = "Resolution\n\nValue on reset: 0"]
231#[derive(Clone, Copy, Debug, PartialEq)]
232#[repr(u8)]
233pub enum RES_A {
234    #[doc = "0: 12-bit resolution, AFE sample rate is maximum (no averaging)."]
235    NO_AVERAGE = 0,
236    #[doc = "2: 13-bit resolution, AFE sample rate divided by 4 (averaging)."]
237    OSR4 = 2,
238    #[doc = "3: 14-bit resolution, AFE sample rate divided by 16 (averaging)."]
239    OSR16 = 3,
240    #[doc = "4: 15-bit resolution, AFE sample rate divided by 64 (averaging)."]
241    OSR64 = 4,
242    #[doc = "5: 16-bit resolution, AFE sample rate divided by 256 (averaging)."]
243    OSR256 = 5,
244}
245impl From<RES_A> for u8 {
246    #[inline(always)]
247    fn from(variant: RES_A) -> Self {
248        variant as _
249    }
250}
251#[doc = "Field `RES` reader - Resolution"]
252pub struct RES_R(crate::FieldReader<u8, RES_A>);
253impl RES_R {
254    #[inline(always)]
255    pub(crate) fn new(bits: u8) -> Self {
256        RES_R(crate::FieldReader::new(bits))
257    }
258    #[doc = r"Get enumerated values variant"]
259    #[inline(always)]
260    pub fn variant(&self) -> Option<RES_A> {
261        match self.bits {
262            0 => Some(RES_A::NO_AVERAGE),
263            2 => Some(RES_A::OSR4),
264            3 => Some(RES_A::OSR16),
265            4 => Some(RES_A::OSR64),
266            5 => Some(RES_A::OSR256),
267            _ => None,
268        }
269    }
270    #[doc = "Checks if the value of the field is `NO_AVERAGE`"]
271    #[inline(always)]
272    pub fn is_no_average(&self) -> bool {
273        **self == RES_A::NO_AVERAGE
274    }
275    #[doc = "Checks if the value of the field is `OSR4`"]
276    #[inline(always)]
277    pub fn is_osr4(&self) -> bool {
278        **self == RES_A::OSR4
279    }
280    #[doc = "Checks if the value of the field is `OSR16`"]
281    #[inline(always)]
282    pub fn is_osr16(&self) -> bool {
283        **self == RES_A::OSR16
284    }
285    #[doc = "Checks if the value of the field is `OSR64`"]
286    #[inline(always)]
287    pub fn is_osr64(&self) -> bool {
288        **self == RES_A::OSR64
289    }
290    #[doc = "Checks if the value of the field is `OSR256`"]
291    #[inline(always)]
292    pub fn is_osr256(&self) -> bool {
293        **self == RES_A::OSR256
294    }
295}
296impl core::ops::Deref for RES_R {
297    type Target = crate::FieldReader<u8, RES_A>;
298    #[inline(always)]
299    fn deref(&self) -> &Self::Target {
300        &self.0
301    }
302}
303#[doc = "Field `RES` writer - Resolution"]
304pub struct RES_W<'a> {
305    w: &'a mut W,
306}
307impl<'a> RES_W<'a> {
308    #[doc = r"Writes `variant` to the field"]
309    #[inline(always)]
310    pub fn variant(self, variant: RES_A) -> &'a mut W {
311        unsafe { self.bits(variant.into()) }
312    }
313    #[doc = "12-bit resolution, AFE sample rate is maximum (no averaging)."]
314    #[inline(always)]
315    pub fn no_average(self) -> &'a mut W {
316        self.variant(RES_A::NO_AVERAGE)
317    }
318    #[doc = "13-bit resolution, AFE sample rate divided by 4 (averaging)."]
319    #[inline(always)]
320    pub fn osr4(self) -> &'a mut W {
321        self.variant(RES_A::OSR4)
322    }
323    #[doc = "14-bit resolution, AFE sample rate divided by 16 (averaging)."]
324    #[inline(always)]
325    pub fn osr16(self) -> &'a mut W {
326        self.variant(RES_A::OSR16)
327    }
328    #[doc = "15-bit resolution, AFE sample rate divided by 64 (averaging)."]
329    #[inline(always)]
330    pub fn osr64(self) -> &'a mut W {
331        self.variant(RES_A::OSR64)
332    }
333    #[doc = "16-bit resolution, AFE sample rate divided by 256 (averaging)."]
334    #[inline(always)]
335    pub fn osr256(self) -> &'a mut W {
336        self.variant(RES_A::OSR256)
337    }
338    #[doc = r"Writes raw bits to the field"]
339    #[inline(always)]
340    pub unsafe fn bits(self, value: u8) -> &'a mut W {
341        self.w.bits = (self.w.bits & !(0x07 << 16)) | ((value as u32 & 0x07) << 16);
342        self.w
343    }
344}
345#[doc = "Field `TAG` reader - TAG of the AFEC_LDCR"]
346pub struct TAG_R(crate::FieldReader<bool, bool>);
347impl TAG_R {
348    #[inline(always)]
349    pub(crate) fn new(bits: bool) -> Self {
350        TAG_R(crate::FieldReader::new(bits))
351    }
352}
353impl core::ops::Deref for TAG_R {
354    type Target = crate::FieldReader<bool, bool>;
355    #[inline(always)]
356    fn deref(&self) -> &Self::Target {
357        &self.0
358    }
359}
360#[doc = "Field `TAG` writer - TAG of the AFEC_LDCR"]
361pub struct TAG_W<'a> {
362    w: &'a mut W,
363}
364impl<'a> TAG_W<'a> {
365    #[doc = r"Sets the field bit"]
366    #[inline(always)]
367    pub fn set_bit(self) -> &'a mut W {
368        self.bit(true)
369    }
370    #[doc = r"Clears the field bit"]
371    #[inline(always)]
372    pub fn clear_bit(self) -> &'a mut W {
373        self.bit(false)
374    }
375    #[doc = r"Writes raw bits to the field"]
376    #[inline(always)]
377    pub fn bit(self, value: bool) -> &'a mut W {
378        self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24);
379        self.w
380    }
381}
382#[doc = "Field `STM` reader - Single Trigger Mode"]
383pub struct STM_R(crate::FieldReader<bool, bool>);
384impl STM_R {
385    #[inline(always)]
386    pub(crate) fn new(bits: bool) -> Self {
387        STM_R(crate::FieldReader::new(bits))
388    }
389}
390impl core::ops::Deref for STM_R {
391    type Target = crate::FieldReader<bool, bool>;
392    #[inline(always)]
393    fn deref(&self) -> &Self::Target {
394        &self.0
395    }
396}
397#[doc = "Field `STM` writer - Single Trigger Mode"]
398pub struct STM_W<'a> {
399    w: &'a mut W,
400}
401impl<'a> STM_W<'a> {
402    #[doc = r"Sets the field bit"]
403    #[inline(always)]
404    pub fn set_bit(self) -> &'a mut W {
405        self.bit(true)
406    }
407    #[doc = r"Clears the field bit"]
408    #[inline(always)]
409    pub fn clear_bit(self) -> &'a mut W {
410        self.bit(false)
411    }
412    #[doc = r"Writes raw bits to the field"]
413    #[inline(always)]
414    pub fn bit(self, value: bool) -> &'a mut W {
415        self.w.bits = (self.w.bits & !(0x01 << 25)) | ((value as u32 & 0x01) << 25);
416        self.w
417    }
418}
419#[doc = "Sign Mode\n\nValue on reset: 0"]
420#[derive(Clone, Copy, Debug, PartialEq)]
421#[repr(u8)]
422pub enum SIGNMODE_A {
423    #[doc = "0: Single-Ended channels: Unsigned conversions.Differential channels: Signed conversions."]
424    SE_UNSG_DF_SIGN = 0,
425    #[doc = "1: Single-Ended channels: Signed conversions.Differential channels: Unsigned conversions."]
426    SE_SIGN_DF_UNSG = 1,
427    #[doc = "2: All channels: Unsigned conversions."]
428    ALL_UNSIGNED = 2,
429    #[doc = "3: All channels: Signed conversions."]
430    ALL_SIGNED = 3,
431}
432impl From<SIGNMODE_A> for u8 {
433    #[inline(always)]
434    fn from(variant: SIGNMODE_A) -> Self {
435        variant as _
436    }
437}
438#[doc = "Field `SIGNMODE` reader - Sign Mode"]
439pub struct SIGNMODE_R(crate::FieldReader<u8, SIGNMODE_A>);
440impl SIGNMODE_R {
441    #[inline(always)]
442    pub(crate) fn new(bits: u8) -> Self {
443        SIGNMODE_R(crate::FieldReader::new(bits))
444    }
445    #[doc = r"Get enumerated values variant"]
446    #[inline(always)]
447    pub fn variant(&self) -> SIGNMODE_A {
448        match self.bits {
449            0 => SIGNMODE_A::SE_UNSG_DF_SIGN,
450            1 => SIGNMODE_A::SE_SIGN_DF_UNSG,
451            2 => SIGNMODE_A::ALL_UNSIGNED,
452            3 => SIGNMODE_A::ALL_SIGNED,
453            _ => unreachable!(),
454        }
455    }
456    #[doc = "Checks if the value of the field is `SE_UNSG_DF_SIGN`"]
457    #[inline(always)]
458    pub fn is_se_unsg_df_sign(&self) -> bool {
459        **self == SIGNMODE_A::SE_UNSG_DF_SIGN
460    }
461    #[doc = "Checks if the value of the field is `SE_SIGN_DF_UNSG`"]
462    #[inline(always)]
463    pub fn is_se_sign_df_unsg(&self) -> bool {
464        **self == SIGNMODE_A::SE_SIGN_DF_UNSG
465    }
466    #[doc = "Checks if the value of the field is `ALL_UNSIGNED`"]
467    #[inline(always)]
468    pub fn is_all_unsigned(&self) -> bool {
469        **self == SIGNMODE_A::ALL_UNSIGNED
470    }
471    #[doc = "Checks if the value of the field is `ALL_SIGNED`"]
472    #[inline(always)]
473    pub fn is_all_signed(&self) -> bool {
474        **self == SIGNMODE_A::ALL_SIGNED
475    }
476}
477impl core::ops::Deref for SIGNMODE_R {
478    type Target = crate::FieldReader<u8, SIGNMODE_A>;
479    #[inline(always)]
480    fn deref(&self) -> &Self::Target {
481        &self.0
482    }
483}
484#[doc = "Field `SIGNMODE` writer - Sign Mode"]
485pub struct SIGNMODE_W<'a> {
486    w: &'a mut W,
487}
488impl<'a> SIGNMODE_W<'a> {
489    #[doc = r"Writes `variant` to the field"]
490    #[inline(always)]
491    pub fn variant(self, variant: SIGNMODE_A) -> &'a mut W {
492        self.bits(variant.into())
493    }
494    #[doc = "Single-Ended channels: Unsigned conversions.Differential channels: Signed conversions."]
495    #[inline(always)]
496    pub fn se_unsg_df_sign(self) -> &'a mut W {
497        self.variant(SIGNMODE_A::SE_UNSG_DF_SIGN)
498    }
499    #[doc = "Single-Ended channels: Signed conversions.Differential channels: Unsigned conversions."]
500    #[inline(always)]
501    pub fn se_sign_df_unsg(self) -> &'a mut W {
502        self.variant(SIGNMODE_A::SE_SIGN_DF_UNSG)
503    }
504    #[doc = "All channels: Unsigned conversions."]
505    #[inline(always)]
506    pub fn all_unsigned(self) -> &'a mut W {
507        self.variant(SIGNMODE_A::ALL_UNSIGNED)
508    }
509    #[doc = "All channels: Signed conversions."]
510    #[inline(always)]
511    pub fn all_signed(self) -> &'a mut W {
512        self.variant(SIGNMODE_A::ALL_SIGNED)
513    }
514    #[doc = r"Writes raw bits to the field"]
515    #[inline(always)]
516    pub fn bits(self, value: u8) -> &'a mut W {
517        self.w.bits = (self.w.bits & !(0x03 << 28)) | ((value as u32 & 0x03) << 28);
518        self.w
519    }
520}
521impl R {
522    #[doc = "Bits 0:1 - Comparison Mode"]
523    #[inline(always)]
524    pub fn cmpmode(&self) -> CMPMODE_R {
525        CMPMODE_R::new((self.bits & 0x03) as u8)
526    }
527    #[doc = "Bits 3:7 - Comparison Selected Channel"]
528    #[inline(always)]
529    pub fn cmpsel(&self) -> CMPSEL_R {
530        CMPSEL_R::new(((self.bits >> 3) & 0x1f) as u8)
531    }
532    #[doc = "Bit 9 - Compare All Channels"]
533    #[inline(always)]
534    pub fn cmpall(&self) -> CMPALL_R {
535        CMPALL_R::new(((self.bits >> 9) & 0x01) != 0)
536    }
537    #[doc = "Bits 12:13 - Compare Event Filtering"]
538    #[inline(always)]
539    pub fn cmpfilter(&self) -> CMPFILTER_R {
540        CMPFILTER_R::new(((self.bits >> 12) & 0x03) as u8)
541    }
542    #[doc = "Bits 16:18 - Resolution"]
543    #[inline(always)]
544    pub fn res(&self) -> RES_R {
545        RES_R::new(((self.bits >> 16) & 0x07) as u8)
546    }
547    #[doc = "Bit 24 - TAG of the AFEC_LDCR"]
548    #[inline(always)]
549    pub fn tag(&self) -> TAG_R {
550        TAG_R::new(((self.bits >> 24) & 0x01) != 0)
551    }
552    #[doc = "Bit 25 - Single Trigger Mode"]
553    #[inline(always)]
554    pub fn stm(&self) -> STM_R {
555        STM_R::new(((self.bits >> 25) & 0x01) != 0)
556    }
557    #[doc = "Bits 28:29 - Sign Mode"]
558    #[inline(always)]
559    pub fn signmode(&self) -> SIGNMODE_R {
560        SIGNMODE_R::new(((self.bits >> 28) & 0x03) as u8)
561    }
562}
563impl W {
564    #[doc = "Bits 0:1 - Comparison Mode"]
565    #[inline(always)]
566    pub fn cmpmode(&mut self) -> CMPMODE_W {
567        CMPMODE_W { w: self }
568    }
569    #[doc = "Bits 3:7 - Comparison Selected Channel"]
570    #[inline(always)]
571    pub fn cmpsel(&mut self) -> CMPSEL_W {
572        CMPSEL_W { w: self }
573    }
574    #[doc = "Bit 9 - Compare All Channels"]
575    #[inline(always)]
576    pub fn cmpall(&mut self) -> CMPALL_W {
577        CMPALL_W { w: self }
578    }
579    #[doc = "Bits 12:13 - Compare Event Filtering"]
580    #[inline(always)]
581    pub fn cmpfilter(&mut self) -> CMPFILTER_W {
582        CMPFILTER_W { w: self }
583    }
584    #[doc = "Bits 16:18 - Resolution"]
585    #[inline(always)]
586    pub fn res(&mut self) -> RES_W {
587        RES_W { w: self }
588    }
589    #[doc = "Bit 24 - TAG of the AFEC_LDCR"]
590    #[inline(always)]
591    pub fn tag(&mut self) -> TAG_W {
592        TAG_W { w: self }
593    }
594    #[doc = "Bit 25 - Single Trigger Mode"]
595    #[inline(always)]
596    pub fn stm(&mut self) -> STM_W {
597        STM_W { w: self }
598    }
599    #[doc = "Bits 28:29 - Sign Mode"]
600    #[inline(always)]
601    pub fn signmode(&mut self) -> SIGNMODE_W {
602        SIGNMODE_W { w: self }
603    }
604    #[doc = "Writes raw bits to the register."]
605    #[inline(always)]
606    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
607        self.0.bits(bits);
608        self
609    }
610}
611#[doc = "AFEC Extended 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 [afec_emr](index.html) module"]
612pub struct AFEC_EMR_SPEC;
613impl crate::RegisterSpec for AFEC_EMR_SPEC {
614    type Ux = u32;
615}
616#[doc = "`read()` method returns [afec_emr::R](R) reader structure"]
617impl crate::Readable for AFEC_EMR_SPEC {
618    type Reader = R;
619}
620#[doc = "`write(|w| ..)` method takes [afec_emr::W](W) writer structure"]
621impl crate::Writable for AFEC_EMR_SPEC {
622    type Writer = W;
623}
624#[doc = "`reset()` method sets AFEC_EMR to value 0"]
625impl crate::Resettable for AFEC_EMR_SPEC {
626    #[inline(always)]
627    fn reset_value() -> Self::Ux {
628        0
629    }
630}