atsaml21e18b/tcc0/
fctrla.rs

1#[doc = "Register `FCTRLA` reader"]
2pub struct R(crate::R<FCTRLA_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<FCTRLA_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<FCTRLA_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<FCTRLA_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `FCTRLA` writer"]
17pub struct W(crate::W<FCTRLA_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<FCTRLA_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<FCTRLA_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<FCTRLA_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `SRC` reader - Fault A Source"]
38pub type SRC_R = crate::FieldReader<u8, SRCSELECT_A>;
39#[doc = "Fault A Source\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41#[repr(u8)]
42pub enum SRCSELECT_A {
43    #[doc = "0: Fault input disabled"]
44    DISABLE = 0,
45    #[doc = "1: MCEx (x=0,1) event input"]
46    ENABLE = 1,
47    #[doc = "2: Inverted MCEx (x=0,1) event input"]
48    INVERT = 2,
49    #[doc = "3: Alternate fault (A or B) state at the end of the previous period"]
50    ALTFAULT = 3,
51}
52impl From<SRCSELECT_A> for u8 {
53    #[inline(always)]
54    fn from(variant: SRCSELECT_A) -> Self {
55        variant as _
56    }
57}
58impl SRC_R {
59    #[doc = "Get enumerated values variant"]
60    #[inline(always)]
61    pub fn variant(&self) -> SRCSELECT_A {
62        match self.bits {
63            0 => SRCSELECT_A::DISABLE,
64            1 => SRCSELECT_A::ENABLE,
65            2 => SRCSELECT_A::INVERT,
66            3 => SRCSELECT_A::ALTFAULT,
67            _ => unreachable!(),
68        }
69    }
70    #[doc = "Checks if the value of the field is `DISABLE`"]
71    #[inline(always)]
72    pub fn is_disable(&self) -> bool {
73        *self == SRCSELECT_A::DISABLE
74    }
75    #[doc = "Checks if the value of the field is `ENABLE`"]
76    #[inline(always)]
77    pub fn is_enable(&self) -> bool {
78        *self == SRCSELECT_A::ENABLE
79    }
80    #[doc = "Checks if the value of the field is `INVERT`"]
81    #[inline(always)]
82    pub fn is_invert(&self) -> bool {
83        *self == SRCSELECT_A::INVERT
84    }
85    #[doc = "Checks if the value of the field is `ALTFAULT`"]
86    #[inline(always)]
87    pub fn is_altfault(&self) -> bool {
88        *self == SRCSELECT_A::ALTFAULT
89    }
90}
91#[doc = "Field `SRC` writer - Fault A Source"]
92pub type SRC_W<'a, const O: u8> =
93    crate::FieldWriterSafe<'a, u32, FCTRLA_SPEC, u8, SRCSELECT_A, 2, O>;
94impl<'a, const O: u8> SRC_W<'a, O> {
95    #[doc = "Fault input disabled"]
96    #[inline(always)]
97    pub fn disable(self) -> &'a mut W {
98        self.variant(SRCSELECT_A::DISABLE)
99    }
100    #[doc = "MCEx (x=0,1) event input"]
101    #[inline(always)]
102    pub fn enable(self) -> &'a mut W {
103        self.variant(SRCSELECT_A::ENABLE)
104    }
105    #[doc = "Inverted MCEx (x=0,1) event input"]
106    #[inline(always)]
107    pub fn invert(self) -> &'a mut W {
108        self.variant(SRCSELECT_A::INVERT)
109    }
110    #[doc = "Alternate fault (A or B) state at the end of the previous period"]
111    #[inline(always)]
112    pub fn altfault(self) -> &'a mut W {
113        self.variant(SRCSELECT_A::ALTFAULT)
114    }
115}
116#[doc = "Field `KEEP` reader - Fault A Keeper"]
117pub type KEEP_R = crate::BitReader<bool>;
118#[doc = "Field `KEEP` writer - Fault A Keeper"]
119pub type KEEP_W<'a, const O: u8> = crate::BitWriter<'a, u32, FCTRLA_SPEC, bool, O>;
120#[doc = "Field `QUAL` reader - Fault A Qualification"]
121pub type QUAL_R = crate::BitReader<bool>;
122#[doc = "Field `QUAL` writer - Fault A Qualification"]
123pub type QUAL_W<'a, const O: u8> = crate::BitWriter<'a, u32, FCTRLA_SPEC, bool, O>;
124#[doc = "Field `BLANK` reader - Fault A Blanking Mode"]
125pub type BLANK_R = crate::FieldReader<u8, BLANKSELECT_A>;
126#[doc = "Fault A Blanking Mode\n\nValue on reset: 0"]
127#[derive(Clone, Copy, Debug, PartialEq, Eq)]
128#[repr(u8)]
129pub enum BLANKSELECT_A {
130    #[doc = "0: Blanking applied from start of the ramp"]
131    START = 0,
132    #[doc = "1: Blanking applied from rising edge of the output waveform"]
133    RISE = 1,
134    #[doc = "2: Blanking applied from falling edge of the output waveform"]
135    FALL = 2,
136    #[doc = "3: Blanking applied from each toggle of the output waveform"]
137    BOTH = 3,
138}
139impl From<BLANKSELECT_A> for u8 {
140    #[inline(always)]
141    fn from(variant: BLANKSELECT_A) -> Self {
142        variant as _
143    }
144}
145impl BLANK_R {
146    #[doc = "Get enumerated values variant"]
147    #[inline(always)]
148    pub fn variant(&self) -> BLANKSELECT_A {
149        match self.bits {
150            0 => BLANKSELECT_A::START,
151            1 => BLANKSELECT_A::RISE,
152            2 => BLANKSELECT_A::FALL,
153            3 => BLANKSELECT_A::BOTH,
154            _ => unreachable!(),
155        }
156    }
157    #[doc = "Checks if the value of the field is `START`"]
158    #[inline(always)]
159    pub fn is_start(&self) -> bool {
160        *self == BLANKSELECT_A::START
161    }
162    #[doc = "Checks if the value of the field is `RISE`"]
163    #[inline(always)]
164    pub fn is_rise(&self) -> bool {
165        *self == BLANKSELECT_A::RISE
166    }
167    #[doc = "Checks if the value of the field is `FALL`"]
168    #[inline(always)]
169    pub fn is_fall(&self) -> bool {
170        *self == BLANKSELECT_A::FALL
171    }
172    #[doc = "Checks if the value of the field is `BOTH`"]
173    #[inline(always)]
174    pub fn is_both(&self) -> bool {
175        *self == BLANKSELECT_A::BOTH
176    }
177}
178#[doc = "Field `BLANK` writer - Fault A Blanking Mode"]
179pub type BLANK_W<'a, const O: u8> =
180    crate::FieldWriterSafe<'a, u32, FCTRLA_SPEC, u8, BLANKSELECT_A, 2, O>;
181impl<'a, const O: u8> BLANK_W<'a, O> {
182    #[doc = "Blanking applied from start of the ramp"]
183    #[inline(always)]
184    pub fn start(self) -> &'a mut W {
185        self.variant(BLANKSELECT_A::START)
186    }
187    #[doc = "Blanking applied from rising edge of the output waveform"]
188    #[inline(always)]
189    pub fn rise(self) -> &'a mut W {
190        self.variant(BLANKSELECT_A::RISE)
191    }
192    #[doc = "Blanking applied from falling edge of the output waveform"]
193    #[inline(always)]
194    pub fn fall(self) -> &'a mut W {
195        self.variant(BLANKSELECT_A::FALL)
196    }
197    #[doc = "Blanking applied from each toggle of the output waveform"]
198    #[inline(always)]
199    pub fn both(self) -> &'a mut W {
200        self.variant(BLANKSELECT_A::BOTH)
201    }
202}
203#[doc = "Field `RESTART` reader - Fault A Restart"]
204pub type RESTART_R = crate::BitReader<bool>;
205#[doc = "Field `RESTART` writer - Fault A Restart"]
206pub type RESTART_W<'a, const O: u8> = crate::BitWriter<'a, u32, FCTRLA_SPEC, bool, O>;
207#[doc = "Field `HALT` reader - Fault A Halt Mode"]
208pub type HALT_R = crate::FieldReader<u8, HALTSELECT_A>;
209#[doc = "Fault A Halt Mode\n\nValue on reset: 0"]
210#[derive(Clone, Copy, Debug, PartialEq, Eq)]
211#[repr(u8)]
212pub enum HALTSELECT_A {
213    #[doc = "0: Halt action disabled"]
214    DISABLE = 0,
215    #[doc = "1: Hardware halt action"]
216    HW = 1,
217    #[doc = "2: Software halt action"]
218    SW = 2,
219    #[doc = "3: Non-recoverable fault"]
220    NR = 3,
221}
222impl From<HALTSELECT_A> for u8 {
223    #[inline(always)]
224    fn from(variant: HALTSELECT_A) -> Self {
225        variant as _
226    }
227}
228impl HALT_R {
229    #[doc = "Get enumerated values variant"]
230    #[inline(always)]
231    pub fn variant(&self) -> HALTSELECT_A {
232        match self.bits {
233            0 => HALTSELECT_A::DISABLE,
234            1 => HALTSELECT_A::HW,
235            2 => HALTSELECT_A::SW,
236            3 => HALTSELECT_A::NR,
237            _ => unreachable!(),
238        }
239    }
240    #[doc = "Checks if the value of the field is `DISABLE`"]
241    #[inline(always)]
242    pub fn is_disable(&self) -> bool {
243        *self == HALTSELECT_A::DISABLE
244    }
245    #[doc = "Checks if the value of the field is `HW`"]
246    #[inline(always)]
247    pub fn is_hw(&self) -> bool {
248        *self == HALTSELECT_A::HW
249    }
250    #[doc = "Checks if the value of the field is `SW`"]
251    #[inline(always)]
252    pub fn is_sw(&self) -> bool {
253        *self == HALTSELECT_A::SW
254    }
255    #[doc = "Checks if the value of the field is `NR`"]
256    #[inline(always)]
257    pub fn is_nr(&self) -> bool {
258        *self == HALTSELECT_A::NR
259    }
260}
261#[doc = "Field `HALT` writer - Fault A Halt Mode"]
262pub type HALT_W<'a, const O: u8> =
263    crate::FieldWriterSafe<'a, u32, FCTRLA_SPEC, u8, HALTSELECT_A, 2, O>;
264impl<'a, const O: u8> HALT_W<'a, O> {
265    #[doc = "Halt action disabled"]
266    #[inline(always)]
267    pub fn disable(self) -> &'a mut W {
268        self.variant(HALTSELECT_A::DISABLE)
269    }
270    #[doc = "Hardware halt action"]
271    #[inline(always)]
272    pub fn hw(self) -> &'a mut W {
273        self.variant(HALTSELECT_A::HW)
274    }
275    #[doc = "Software halt action"]
276    #[inline(always)]
277    pub fn sw(self) -> &'a mut W {
278        self.variant(HALTSELECT_A::SW)
279    }
280    #[doc = "Non-recoverable fault"]
281    #[inline(always)]
282    pub fn nr(self) -> &'a mut W {
283        self.variant(HALTSELECT_A::NR)
284    }
285}
286#[doc = "Field `CHSEL` reader - Fault A Capture Channel"]
287pub type CHSEL_R = crate::FieldReader<u8, CHSELSELECT_A>;
288#[doc = "Fault A Capture Channel\n\nValue on reset: 0"]
289#[derive(Clone, Copy, Debug, PartialEq, Eq)]
290#[repr(u8)]
291pub enum CHSELSELECT_A {
292    #[doc = "0: Capture value stored in channel 0"]
293    CC0 = 0,
294    #[doc = "1: Capture value stored in channel 1"]
295    CC1 = 1,
296    #[doc = "2: Capture value stored in channel 2"]
297    CC2 = 2,
298    #[doc = "3: Capture value stored in channel 3"]
299    CC3 = 3,
300}
301impl From<CHSELSELECT_A> for u8 {
302    #[inline(always)]
303    fn from(variant: CHSELSELECT_A) -> Self {
304        variant as _
305    }
306}
307impl CHSEL_R {
308    #[doc = "Get enumerated values variant"]
309    #[inline(always)]
310    pub fn variant(&self) -> CHSELSELECT_A {
311        match self.bits {
312            0 => CHSELSELECT_A::CC0,
313            1 => CHSELSELECT_A::CC1,
314            2 => CHSELSELECT_A::CC2,
315            3 => CHSELSELECT_A::CC3,
316            _ => unreachable!(),
317        }
318    }
319    #[doc = "Checks if the value of the field is `CC0`"]
320    #[inline(always)]
321    pub fn is_cc0(&self) -> bool {
322        *self == CHSELSELECT_A::CC0
323    }
324    #[doc = "Checks if the value of the field is `CC1`"]
325    #[inline(always)]
326    pub fn is_cc1(&self) -> bool {
327        *self == CHSELSELECT_A::CC1
328    }
329    #[doc = "Checks if the value of the field is `CC2`"]
330    #[inline(always)]
331    pub fn is_cc2(&self) -> bool {
332        *self == CHSELSELECT_A::CC2
333    }
334    #[doc = "Checks if the value of the field is `CC3`"]
335    #[inline(always)]
336    pub fn is_cc3(&self) -> bool {
337        *self == CHSELSELECT_A::CC3
338    }
339}
340#[doc = "Field `CHSEL` writer - Fault A Capture Channel"]
341pub type CHSEL_W<'a, const O: u8> =
342    crate::FieldWriterSafe<'a, u32, FCTRLA_SPEC, u8, CHSELSELECT_A, 2, O>;
343impl<'a, const O: u8> CHSEL_W<'a, O> {
344    #[doc = "Capture value stored in channel 0"]
345    #[inline(always)]
346    pub fn cc0(self) -> &'a mut W {
347        self.variant(CHSELSELECT_A::CC0)
348    }
349    #[doc = "Capture value stored in channel 1"]
350    #[inline(always)]
351    pub fn cc1(self) -> &'a mut W {
352        self.variant(CHSELSELECT_A::CC1)
353    }
354    #[doc = "Capture value stored in channel 2"]
355    #[inline(always)]
356    pub fn cc2(self) -> &'a mut W {
357        self.variant(CHSELSELECT_A::CC2)
358    }
359    #[doc = "Capture value stored in channel 3"]
360    #[inline(always)]
361    pub fn cc3(self) -> &'a mut W {
362        self.variant(CHSELSELECT_A::CC3)
363    }
364}
365#[doc = "Field `CAPTURE` reader - Fault A Capture Action"]
366pub type CAPTURE_R = crate::FieldReader<u8, CAPTURESELECT_A>;
367#[doc = "Fault A Capture Action\n\nValue on reset: 0"]
368#[derive(Clone, Copy, Debug, PartialEq, Eq)]
369#[repr(u8)]
370pub enum CAPTURESELECT_A {
371    #[doc = "0: No capture"]
372    DISABLE = 0,
373    #[doc = "1: Capture on fault"]
374    CAPT = 1,
375    #[doc = "2: Minimum capture"]
376    CAPTMIN = 2,
377    #[doc = "3: Maximum capture"]
378    CAPTMAX = 3,
379    #[doc = "4: Minimum local detection"]
380    LOCMIN = 4,
381    #[doc = "5: Maximum local detection"]
382    LOCMAX = 5,
383    #[doc = "6: Minimum and maximum local detection"]
384    DERIV0 = 6,
385    #[doc = "7: Capture with ramp index as MSB value"]
386    CAPTMARK = 7,
387}
388impl From<CAPTURESELECT_A> for u8 {
389    #[inline(always)]
390    fn from(variant: CAPTURESELECT_A) -> Self {
391        variant as _
392    }
393}
394impl CAPTURE_R {
395    #[doc = "Get enumerated values variant"]
396    #[inline(always)]
397    pub fn variant(&self) -> CAPTURESELECT_A {
398        match self.bits {
399            0 => CAPTURESELECT_A::DISABLE,
400            1 => CAPTURESELECT_A::CAPT,
401            2 => CAPTURESELECT_A::CAPTMIN,
402            3 => CAPTURESELECT_A::CAPTMAX,
403            4 => CAPTURESELECT_A::LOCMIN,
404            5 => CAPTURESELECT_A::LOCMAX,
405            6 => CAPTURESELECT_A::DERIV0,
406            7 => CAPTURESELECT_A::CAPTMARK,
407            _ => unreachable!(),
408        }
409    }
410    #[doc = "Checks if the value of the field is `DISABLE`"]
411    #[inline(always)]
412    pub fn is_disable(&self) -> bool {
413        *self == CAPTURESELECT_A::DISABLE
414    }
415    #[doc = "Checks if the value of the field is `CAPT`"]
416    #[inline(always)]
417    pub fn is_capt(&self) -> bool {
418        *self == CAPTURESELECT_A::CAPT
419    }
420    #[doc = "Checks if the value of the field is `CAPTMIN`"]
421    #[inline(always)]
422    pub fn is_captmin(&self) -> bool {
423        *self == CAPTURESELECT_A::CAPTMIN
424    }
425    #[doc = "Checks if the value of the field is `CAPTMAX`"]
426    #[inline(always)]
427    pub fn is_captmax(&self) -> bool {
428        *self == CAPTURESELECT_A::CAPTMAX
429    }
430    #[doc = "Checks if the value of the field is `LOCMIN`"]
431    #[inline(always)]
432    pub fn is_locmin(&self) -> bool {
433        *self == CAPTURESELECT_A::LOCMIN
434    }
435    #[doc = "Checks if the value of the field is `LOCMAX`"]
436    #[inline(always)]
437    pub fn is_locmax(&self) -> bool {
438        *self == CAPTURESELECT_A::LOCMAX
439    }
440    #[doc = "Checks if the value of the field is `DERIV0`"]
441    #[inline(always)]
442    pub fn is_deriv0(&self) -> bool {
443        *self == CAPTURESELECT_A::DERIV0
444    }
445    #[doc = "Checks if the value of the field is `CAPTMARK`"]
446    #[inline(always)]
447    pub fn is_captmark(&self) -> bool {
448        *self == CAPTURESELECT_A::CAPTMARK
449    }
450}
451#[doc = "Field `CAPTURE` writer - Fault A Capture Action"]
452pub type CAPTURE_W<'a, const O: u8> =
453    crate::FieldWriterSafe<'a, u32, FCTRLA_SPEC, u8, CAPTURESELECT_A, 3, O>;
454impl<'a, const O: u8> CAPTURE_W<'a, O> {
455    #[doc = "No capture"]
456    #[inline(always)]
457    pub fn disable(self) -> &'a mut W {
458        self.variant(CAPTURESELECT_A::DISABLE)
459    }
460    #[doc = "Capture on fault"]
461    #[inline(always)]
462    pub fn capt(self) -> &'a mut W {
463        self.variant(CAPTURESELECT_A::CAPT)
464    }
465    #[doc = "Minimum capture"]
466    #[inline(always)]
467    pub fn captmin(self) -> &'a mut W {
468        self.variant(CAPTURESELECT_A::CAPTMIN)
469    }
470    #[doc = "Maximum capture"]
471    #[inline(always)]
472    pub fn captmax(self) -> &'a mut W {
473        self.variant(CAPTURESELECT_A::CAPTMAX)
474    }
475    #[doc = "Minimum local detection"]
476    #[inline(always)]
477    pub fn locmin(self) -> &'a mut W {
478        self.variant(CAPTURESELECT_A::LOCMIN)
479    }
480    #[doc = "Maximum local detection"]
481    #[inline(always)]
482    pub fn locmax(self) -> &'a mut W {
483        self.variant(CAPTURESELECT_A::LOCMAX)
484    }
485    #[doc = "Minimum and maximum local detection"]
486    #[inline(always)]
487    pub fn deriv0(self) -> &'a mut W {
488        self.variant(CAPTURESELECT_A::DERIV0)
489    }
490    #[doc = "Capture with ramp index as MSB value"]
491    #[inline(always)]
492    pub fn captmark(self) -> &'a mut W {
493        self.variant(CAPTURESELECT_A::CAPTMARK)
494    }
495}
496#[doc = "Field `BLANKPRESC` reader - Fault A Blanking Prescaler"]
497pub type BLANKPRESC_R = crate::BitReader<bool>;
498#[doc = "Field `BLANKPRESC` writer - Fault A Blanking Prescaler"]
499pub type BLANKPRESC_W<'a, const O: u8> = crate::BitWriter<'a, u32, FCTRLA_SPEC, bool, O>;
500#[doc = "Field `BLANKVAL` reader - Fault A Blanking Time"]
501pub type BLANKVAL_R = crate::FieldReader<u8, u8>;
502#[doc = "Field `BLANKVAL` writer - Fault A Blanking Time"]
503pub type BLANKVAL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, FCTRLA_SPEC, u8, u8, 8, O>;
504#[doc = "Field `FILTERVAL` reader - Fault A Filter Value"]
505pub type FILTERVAL_R = crate::FieldReader<u8, u8>;
506#[doc = "Field `FILTERVAL` writer - Fault A Filter Value"]
507pub type FILTERVAL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, FCTRLA_SPEC, u8, u8, 4, O>;
508impl R {
509    #[doc = "Bits 0:1 - Fault A Source"]
510    #[inline(always)]
511    pub fn src(&self) -> SRC_R {
512        SRC_R::new((self.bits & 3) as u8)
513    }
514    #[doc = "Bit 3 - Fault A Keeper"]
515    #[inline(always)]
516    pub fn keep(&self) -> KEEP_R {
517        KEEP_R::new(((self.bits >> 3) & 1) != 0)
518    }
519    #[doc = "Bit 4 - Fault A Qualification"]
520    #[inline(always)]
521    pub fn qual(&self) -> QUAL_R {
522        QUAL_R::new(((self.bits >> 4) & 1) != 0)
523    }
524    #[doc = "Bits 5:6 - Fault A Blanking Mode"]
525    #[inline(always)]
526    pub fn blank(&self) -> BLANK_R {
527        BLANK_R::new(((self.bits >> 5) & 3) as u8)
528    }
529    #[doc = "Bit 7 - Fault A Restart"]
530    #[inline(always)]
531    pub fn restart(&self) -> RESTART_R {
532        RESTART_R::new(((self.bits >> 7) & 1) != 0)
533    }
534    #[doc = "Bits 8:9 - Fault A Halt Mode"]
535    #[inline(always)]
536    pub fn halt(&self) -> HALT_R {
537        HALT_R::new(((self.bits >> 8) & 3) as u8)
538    }
539    #[doc = "Bits 10:11 - Fault A Capture Channel"]
540    #[inline(always)]
541    pub fn chsel(&self) -> CHSEL_R {
542        CHSEL_R::new(((self.bits >> 10) & 3) as u8)
543    }
544    #[doc = "Bits 12:14 - Fault A Capture Action"]
545    #[inline(always)]
546    pub fn capture(&self) -> CAPTURE_R {
547        CAPTURE_R::new(((self.bits >> 12) & 7) as u8)
548    }
549    #[doc = "Bit 15 - Fault A Blanking Prescaler"]
550    #[inline(always)]
551    pub fn blankpresc(&self) -> BLANKPRESC_R {
552        BLANKPRESC_R::new(((self.bits >> 15) & 1) != 0)
553    }
554    #[doc = "Bits 16:23 - Fault A Blanking Time"]
555    #[inline(always)]
556    pub fn blankval(&self) -> BLANKVAL_R {
557        BLANKVAL_R::new(((self.bits >> 16) & 0xff) as u8)
558    }
559    #[doc = "Bits 24:27 - Fault A Filter Value"]
560    #[inline(always)]
561    pub fn filterval(&self) -> FILTERVAL_R {
562        FILTERVAL_R::new(((self.bits >> 24) & 0x0f) as u8)
563    }
564}
565impl W {
566    #[doc = "Bits 0:1 - Fault A Source"]
567    #[inline(always)]
568    #[must_use]
569    pub fn src(&mut self) -> SRC_W<0> {
570        SRC_W::new(self)
571    }
572    #[doc = "Bit 3 - Fault A Keeper"]
573    #[inline(always)]
574    #[must_use]
575    pub fn keep(&mut self) -> KEEP_W<3> {
576        KEEP_W::new(self)
577    }
578    #[doc = "Bit 4 - Fault A Qualification"]
579    #[inline(always)]
580    #[must_use]
581    pub fn qual(&mut self) -> QUAL_W<4> {
582        QUAL_W::new(self)
583    }
584    #[doc = "Bits 5:6 - Fault A Blanking Mode"]
585    #[inline(always)]
586    #[must_use]
587    pub fn blank(&mut self) -> BLANK_W<5> {
588        BLANK_W::new(self)
589    }
590    #[doc = "Bit 7 - Fault A Restart"]
591    #[inline(always)]
592    #[must_use]
593    pub fn restart(&mut self) -> RESTART_W<7> {
594        RESTART_W::new(self)
595    }
596    #[doc = "Bits 8:9 - Fault A Halt Mode"]
597    #[inline(always)]
598    #[must_use]
599    pub fn halt(&mut self) -> HALT_W<8> {
600        HALT_W::new(self)
601    }
602    #[doc = "Bits 10:11 - Fault A Capture Channel"]
603    #[inline(always)]
604    #[must_use]
605    pub fn chsel(&mut self) -> CHSEL_W<10> {
606        CHSEL_W::new(self)
607    }
608    #[doc = "Bits 12:14 - Fault A Capture Action"]
609    #[inline(always)]
610    #[must_use]
611    pub fn capture(&mut self) -> CAPTURE_W<12> {
612        CAPTURE_W::new(self)
613    }
614    #[doc = "Bit 15 - Fault A Blanking Prescaler"]
615    #[inline(always)]
616    #[must_use]
617    pub fn blankpresc(&mut self) -> BLANKPRESC_W<15> {
618        BLANKPRESC_W::new(self)
619    }
620    #[doc = "Bits 16:23 - Fault A Blanking Time"]
621    #[inline(always)]
622    #[must_use]
623    pub fn blankval(&mut self) -> BLANKVAL_W<16> {
624        BLANKVAL_W::new(self)
625    }
626    #[doc = "Bits 24:27 - Fault A Filter Value"]
627    #[inline(always)]
628    #[must_use]
629    pub fn filterval(&mut self) -> FILTERVAL_W<24> {
630        FILTERVAL_W::new(self)
631    }
632    #[doc = "Writes raw bits to the register."]
633    #[inline(always)]
634    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
635        self.0.bits(bits);
636        self
637    }
638}
639#[doc = "Recoverable Fault A Configuration\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 [fctrla](index.html) module"]
640pub struct FCTRLA_SPEC;
641impl crate::RegisterSpec for FCTRLA_SPEC {
642    type Ux = u32;
643}
644#[doc = "`read()` method returns [fctrla::R](R) reader structure"]
645impl crate::Readable for FCTRLA_SPEC {
646    type Reader = R;
647}
648#[doc = "`write(|w| ..)` method takes [fctrla::W](W) writer structure"]
649impl crate::Writable for FCTRLA_SPEC {
650    type Writer = W;
651    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
652    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
653}
654#[doc = "`reset()` method sets FCTRLA to value 0"]
655impl crate::Resettable for FCTRLA_SPEC {
656    const RESET_VALUE: Self::Ux = 0;
657}