Skip to main content

mcxa_pac/aoi0/
bfcrt230.rs

1#[doc = "Register `BFCRT230` reader"]
2pub type R = crate::R<Bfcrt230Spec>;
3#[doc = "Register `BFCRT230` writer"]
4pub type W = crate::W<Bfcrt230Spec>;
5#[doc = "Product Term 3, Input D Configuration\n\nValue on reset: 0"]
6#[cfg_attr(feature = "defmt", derive(defmt::Format))]
7#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8#[repr(u8)]
9pub enum Pt3Dc {
10    #[doc = "0: Force input D to become 0"]
11    Force0 = 0,
12    #[doc = "1: Pass input D"]
13    Pass = 1,
14    #[doc = "2: Complement input D"]
15    Complement = 2,
16    #[doc = "3: Force input D to become 1"]
17    Force1 = 3,
18}
19impl From<Pt3Dc> for u8 {
20    #[inline(always)]
21    fn from(variant: Pt3Dc) -> Self {
22        variant as _
23    }
24}
25impl crate::FieldSpec for Pt3Dc {
26    type Ux = u8;
27}
28impl crate::IsEnum for Pt3Dc {}
29#[doc = "Field `PT3_DC` reader - Product Term 3, Input D Configuration"]
30pub type Pt3DcR = crate::FieldReader<Pt3Dc>;
31impl Pt3DcR {
32    #[doc = "Get enumerated values variant"]
33    #[inline(always)]
34    pub const fn variant(&self) -> Pt3Dc {
35        match self.bits {
36            0 => Pt3Dc::Force0,
37            1 => Pt3Dc::Pass,
38            2 => Pt3Dc::Complement,
39            3 => Pt3Dc::Force1,
40            _ => unreachable!(),
41        }
42    }
43    #[doc = "Force input D to become 0"]
44    #[inline(always)]
45    pub fn is_force_0(&self) -> bool {
46        *self == Pt3Dc::Force0
47    }
48    #[doc = "Pass input D"]
49    #[inline(always)]
50    pub fn is_pass(&self) -> bool {
51        *self == Pt3Dc::Pass
52    }
53    #[doc = "Complement input D"]
54    #[inline(always)]
55    pub fn is_complement(&self) -> bool {
56        *self == Pt3Dc::Complement
57    }
58    #[doc = "Force input D to become 1"]
59    #[inline(always)]
60    pub fn is_force_1(&self) -> bool {
61        *self == Pt3Dc::Force1
62    }
63}
64#[doc = "Field `PT3_DC` writer - Product Term 3, Input D Configuration"]
65pub type Pt3DcW<'a, REG> = crate::FieldWriter<'a, REG, 2, Pt3Dc, crate::Safe>;
66impl<'a, REG> Pt3DcW<'a, REG>
67where
68    REG: crate::Writable + crate::RegisterSpec,
69    REG::Ux: From<u8>,
70{
71    #[doc = "Force input D to become 0"]
72    #[inline(always)]
73    pub fn force_0(self) -> &'a mut crate::W<REG> {
74        self.variant(Pt3Dc::Force0)
75    }
76    #[doc = "Pass input D"]
77    #[inline(always)]
78    pub fn pass(self) -> &'a mut crate::W<REG> {
79        self.variant(Pt3Dc::Pass)
80    }
81    #[doc = "Complement input D"]
82    #[inline(always)]
83    pub fn complement(self) -> &'a mut crate::W<REG> {
84        self.variant(Pt3Dc::Complement)
85    }
86    #[doc = "Force input D to become 1"]
87    #[inline(always)]
88    pub fn force_1(self) -> &'a mut crate::W<REG> {
89        self.variant(Pt3Dc::Force1)
90    }
91}
92#[doc = "Product Term 3, Input C Configuration\n\nValue on reset: 0"]
93#[cfg_attr(feature = "defmt", derive(defmt::Format))]
94#[derive(Clone, Copy, Debug, PartialEq, Eq)]
95#[repr(u8)]
96pub enum Pt3Cc {
97    #[doc = "0: Force input C to become 0"]
98    Force0 = 0,
99    #[doc = "1: Pass input C"]
100    Pass = 1,
101    #[doc = "2: Complement input C"]
102    Complement = 2,
103    #[doc = "3: Force input C to become 1"]
104    Force1 = 3,
105}
106impl From<Pt3Cc> for u8 {
107    #[inline(always)]
108    fn from(variant: Pt3Cc) -> Self {
109        variant as _
110    }
111}
112impl crate::FieldSpec for Pt3Cc {
113    type Ux = u8;
114}
115impl crate::IsEnum for Pt3Cc {}
116#[doc = "Field `PT3_CC` reader - Product Term 3, Input C Configuration"]
117pub type Pt3CcR = crate::FieldReader<Pt3Cc>;
118impl Pt3CcR {
119    #[doc = "Get enumerated values variant"]
120    #[inline(always)]
121    pub const fn variant(&self) -> Pt3Cc {
122        match self.bits {
123            0 => Pt3Cc::Force0,
124            1 => Pt3Cc::Pass,
125            2 => Pt3Cc::Complement,
126            3 => Pt3Cc::Force1,
127            _ => unreachable!(),
128        }
129    }
130    #[doc = "Force input C to become 0"]
131    #[inline(always)]
132    pub fn is_force_0(&self) -> bool {
133        *self == Pt3Cc::Force0
134    }
135    #[doc = "Pass input C"]
136    #[inline(always)]
137    pub fn is_pass(&self) -> bool {
138        *self == Pt3Cc::Pass
139    }
140    #[doc = "Complement input C"]
141    #[inline(always)]
142    pub fn is_complement(&self) -> bool {
143        *self == Pt3Cc::Complement
144    }
145    #[doc = "Force input C to become 1"]
146    #[inline(always)]
147    pub fn is_force_1(&self) -> bool {
148        *self == Pt3Cc::Force1
149    }
150}
151#[doc = "Field `PT3_CC` writer - Product Term 3, Input C Configuration"]
152pub type Pt3CcW<'a, REG> = crate::FieldWriter<'a, REG, 2, Pt3Cc, crate::Safe>;
153impl<'a, REG> Pt3CcW<'a, REG>
154where
155    REG: crate::Writable + crate::RegisterSpec,
156    REG::Ux: From<u8>,
157{
158    #[doc = "Force input C to become 0"]
159    #[inline(always)]
160    pub fn force_0(self) -> &'a mut crate::W<REG> {
161        self.variant(Pt3Cc::Force0)
162    }
163    #[doc = "Pass input C"]
164    #[inline(always)]
165    pub fn pass(self) -> &'a mut crate::W<REG> {
166        self.variant(Pt3Cc::Pass)
167    }
168    #[doc = "Complement input C"]
169    #[inline(always)]
170    pub fn complement(self) -> &'a mut crate::W<REG> {
171        self.variant(Pt3Cc::Complement)
172    }
173    #[doc = "Force input C to become 1"]
174    #[inline(always)]
175    pub fn force_1(self) -> &'a mut crate::W<REG> {
176        self.variant(Pt3Cc::Force1)
177    }
178}
179#[doc = "Product Term 3, Input B Configuration\n\nValue on reset: 0"]
180#[cfg_attr(feature = "defmt", derive(defmt::Format))]
181#[derive(Clone, Copy, Debug, PartialEq, Eq)]
182#[repr(u8)]
183pub enum Pt3Bc {
184    #[doc = "0: Force input B to become 0"]
185    Force0 = 0,
186    #[doc = "1: Pass input B"]
187    Pass = 1,
188    #[doc = "2: Complement input B"]
189    Complement = 2,
190    #[doc = "3: Force input B to become 1"]
191    Force1 = 3,
192}
193impl From<Pt3Bc> for u8 {
194    #[inline(always)]
195    fn from(variant: Pt3Bc) -> Self {
196        variant as _
197    }
198}
199impl crate::FieldSpec for Pt3Bc {
200    type Ux = u8;
201}
202impl crate::IsEnum for Pt3Bc {}
203#[doc = "Field `PT3_BC` reader - Product Term 3, Input B Configuration"]
204pub type Pt3BcR = crate::FieldReader<Pt3Bc>;
205impl Pt3BcR {
206    #[doc = "Get enumerated values variant"]
207    #[inline(always)]
208    pub const fn variant(&self) -> Pt3Bc {
209        match self.bits {
210            0 => Pt3Bc::Force0,
211            1 => Pt3Bc::Pass,
212            2 => Pt3Bc::Complement,
213            3 => Pt3Bc::Force1,
214            _ => unreachable!(),
215        }
216    }
217    #[doc = "Force input B to become 0"]
218    #[inline(always)]
219    pub fn is_force_0(&self) -> bool {
220        *self == Pt3Bc::Force0
221    }
222    #[doc = "Pass input B"]
223    #[inline(always)]
224    pub fn is_pass(&self) -> bool {
225        *self == Pt3Bc::Pass
226    }
227    #[doc = "Complement input B"]
228    #[inline(always)]
229    pub fn is_complement(&self) -> bool {
230        *self == Pt3Bc::Complement
231    }
232    #[doc = "Force input B to become 1"]
233    #[inline(always)]
234    pub fn is_force_1(&self) -> bool {
235        *self == Pt3Bc::Force1
236    }
237}
238#[doc = "Field `PT3_BC` writer - Product Term 3, Input B Configuration"]
239pub type Pt3BcW<'a, REG> = crate::FieldWriter<'a, REG, 2, Pt3Bc, crate::Safe>;
240impl<'a, REG> Pt3BcW<'a, REG>
241where
242    REG: crate::Writable + crate::RegisterSpec,
243    REG::Ux: From<u8>,
244{
245    #[doc = "Force input B to become 0"]
246    #[inline(always)]
247    pub fn force_0(self) -> &'a mut crate::W<REG> {
248        self.variant(Pt3Bc::Force0)
249    }
250    #[doc = "Pass input B"]
251    #[inline(always)]
252    pub fn pass(self) -> &'a mut crate::W<REG> {
253        self.variant(Pt3Bc::Pass)
254    }
255    #[doc = "Complement input B"]
256    #[inline(always)]
257    pub fn complement(self) -> &'a mut crate::W<REG> {
258        self.variant(Pt3Bc::Complement)
259    }
260    #[doc = "Force input B to become 1"]
261    #[inline(always)]
262    pub fn force_1(self) -> &'a mut crate::W<REG> {
263        self.variant(Pt3Bc::Force1)
264    }
265}
266#[doc = "Product Term 3, Input A Configuration\n\nValue on reset: 0"]
267#[cfg_attr(feature = "defmt", derive(defmt::Format))]
268#[derive(Clone, Copy, Debug, PartialEq, Eq)]
269#[repr(u8)]
270pub enum Pt3Ac {
271    #[doc = "0: Force input A to become 0"]
272    Force0 = 0,
273    #[doc = "1: Pass input A"]
274    Pass = 1,
275    #[doc = "2: Complement input A"]
276    Complement = 2,
277    #[doc = "3: Force input to become 1"]
278    Force1 = 3,
279}
280impl From<Pt3Ac> for u8 {
281    #[inline(always)]
282    fn from(variant: Pt3Ac) -> Self {
283        variant as _
284    }
285}
286impl crate::FieldSpec for Pt3Ac {
287    type Ux = u8;
288}
289impl crate::IsEnum for Pt3Ac {}
290#[doc = "Field `PT3_AC` reader - Product Term 3, Input A Configuration"]
291pub type Pt3AcR = crate::FieldReader<Pt3Ac>;
292impl Pt3AcR {
293    #[doc = "Get enumerated values variant"]
294    #[inline(always)]
295    pub const fn variant(&self) -> Pt3Ac {
296        match self.bits {
297            0 => Pt3Ac::Force0,
298            1 => Pt3Ac::Pass,
299            2 => Pt3Ac::Complement,
300            3 => Pt3Ac::Force1,
301            _ => unreachable!(),
302        }
303    }
304    #[doc = "Force input A to become 0"]
305    #[inline(always)]
306    pub fn is_force_0(&self) -> bool {
307        *self == Pt3Ac::Force0
308    }
309    #[doc = "Pass input A"]
310    #[inline(always)]
311    pub fn is_pass(&self) -> bool {
312        *self == Pt3Ac::Pass
313    }
314    #[doc = "Complement input A"]
315    #[inline(always)]
316    pub fn is_complement(&self) -> bool {
317        *self == Pt3Ac::Complement
318    }
319    #[doc = "Force input to become 1"]
320    #[inline(always)]
321    pub fn is_force_1(&self) -> bool {
322        *self == Pt3Ac::Force1
323    }
324}
325#[doc = "Field `PT3_AC` writer - Product Term 3, Input A Configuration"]
326pub type Pt3AcW<'a, REG> = crate::FieldWriter<'a, REG, 2, Pt3Ac, crate::Safe>;
327impl<'a, REG> Pt3AcW<'a, REG>
328where
329    REG: crate::Writable + crate::RegisterSpec,
330    REG::Ux: From<u8>,
331{
332    #[doc = "Force input A to become 0"]
333    #[inline(always)]
334    pub fn force_0(self) -> &'a mut crate::W<REG> {
335        self.variant(Pt3Ac::Force0)
336    }
337    #[doc = "Pass input A"]
338    #[inline(always)]
339    pub fn pass(self) -> &'a mut crate::W<REG> {
340        self.variant(Pt3Ac::Pass)
341    }
342    #[doc = "Complement input A"]
343    #[inline(always)]
344    pub fn complement(self) -> &'a mut crate::W<REG> {
345        self.variant(Pt3Ac::Complement)
346    }
347    #[doc = "Force input to become 1"]
348    #[inline(always)]
349    pub fn force_1(self) -> &'a mut crate::W<REG> {
350        self.variant(Pt3Ac::Force1)
351    }
352}
353#[doc = "Product Term 2, Input D Configuration\n\nValue on reset: 0"]
354#[cfg_attr(feature = "defmt", derive(defmt::Format))]
355#[derive(Clone, Copy, Debug, PartialEq, Eq)]
356#[repr(u8)]
357pub enum Pt2Dc {
358    #[doc = "0: Force input D to become 0"]
359    Force0 = 0,
360    #[doc = "1: Pass input D"]
361    Pass = 1,
362    #[doc = "2: Complement input D"]
363    Complement = 2,
364    #[doc = "3: Force input D to become 1"]
365    Force1 = 3,
366}
367impl From<Pt2Dc> for u8 {
368    #[inline(always)]
369    fn from(variant: Pt2Dc) -> Self {
370        variant as _
371    }
372}
373impl crate::FieldSpec for Pt2Dc {
374    type Ux = u8;
375}
376impl crate::IsEnum for Pt2Dc {}
377#[doc = "Field `PT2_DC` reader - Product Term 2, Input D Configuration"]
378pub type Pt2DcR = crate::FieldReader<Pt2Dc>;
379impl Pt2DcR {
380    #[doc = "Get enumerated values variant"]
381    #[inline(always)]
382    pub const fn variant(&self) -> Pt2Dc {
383        match self.bits {
384            0 => Pt2Dc::Force0,
385            1 => Pt2Dc::Pass,
386            2 => Pt2Dc::Complement,
387            3 => Pt2Dc::Force1,
388            _ => unreachable!(),
389        }
390    }
391    #[doc = "Force input D to become 0"]
392    #[inline(always)]
393    pub fn is_force_0(&self) -> bool {
394        *self == Pt2Dc::Force0
395    }
396    #[doc = "Pass input D"]
397    #[inline(always)]
398    pub fn is_pass(&self) -> bool {
399        *self == Pt2Dc::Pass
400    }
401    #[doc = "Complement input D"]
402    #[inline(always)]
403    pub fn is_complement(&self) -> bool {
404        *self == Pt2Dc::Complement
405    }
406    #[doc = "Force input D to become 1"]
407    #[inline(always)]
408    pub fn is_force_1(&self) -> bool {
409        *self == Pt2Dc::Force1
410    }
411}
412#[doc = "Field `PT2_DC` writer - Product Term 2, Input D Configuration"]
413pub type Pt2DcW<'a, REG> = crate::FieldWriter<'a, REG, 2, Pt2Dc, crate::Safe>;
414impl<'a, REG> Pt2DcW<'a, REG>
415where
416    REG: crate::Writable + crate::RegisterSpec,
417    REG::Ux: From<u8>,
418{
419    #[doc = "Force input D to become 0"]
420    #[inline(always)]
421    pub fn force_0(self) -> &'a mut crate::W<REG> {
422        self.variant(Pt2Dc::Force0)
423    }
424    #[doc = "Pass input D"]
425    #[inline(always)]
426    pub fn pass(self) -> &'a mut crate::W<REG> {
427        self.variant(Pt2Dc::Pass)
428    }
429    #[doc = "Complement input D"]
430    #[inline(always)]
431    pub fn complement(self) -> &'a mut crate::W<REG> {
432        self.variant(Pt2Dc::Complement)
433    }
434    #[doc = "Force input D to become 1"]
435    #[inline(always)]
436    pub fn force_1(self) -> &'a mut crate::W<REG> {
437        self.variant(Pt2Dc::Force1)
438    }
439}
440#[doc = "Product Term 2, Input C Configuration\n\nValue on reset: 0"]
441#[cfg_attr(feature = "defmt", derive(defmt::Format))]
442#[derive(Clone, Copy, Debug, PartialEq, Eq)]
443#[repr(u8)]
444pub enum Pt2Cc {
445    #[doc = "0: Force input C to become 0"]
446    Force0 = 0,
447    #[doc = "1: Pass input C"]
448    Pass = 1,
449    #[doc = "2: Complement input C"]
450    Complement = 2,
451    #[doc = "3: Force input C to become 1"]
452    Force1 = 3,
453}
454impl From<Pt2Cc> for u8 {
455    #[inline(always)]
456    fn from(variant: Pt2Cc) -> Self {
457        variant as _
458    }
459}
460impl crate::FieldSpec for Pt2Cc {
461    type Ux = u8;
462}
463impl crate::IsEnum for Pt2Cc {}
464#[doc = "Field `PT2_CC` reader - Product Term 2, Input C Configuration"]
465pub type Pt2CcR = crate::FieldReader<Pt2Cc>;
466impl Pt2CcR {
467    #[doc = "Get enumerated values variant"]
468    #[inline(always)]
469    pub const fn variant(&self) -> Pt2Cc {
470        match self.bits {
471            0 => Pt2Cc::Force0,
472            1 => Pt2Cc::Pass,
473            2 => Pt2Cc::Complement,
474            3 => Pt2Cc::Force1,
475            _ => unreachable!(),
476        }
477    }
478    #[doc = "Force input C to become 0"]
479    #[inline(always)]
480    pub fn is_force_0(&self) -> bool {
481        *self == Pt2Cc::Force0
482    }
483    #[doc = "Pass input C"]
484    #[inline(always)]
485    pub fn is_pass(&self) -> bool {
486        *self == Pt2Cc::Pass
487    }
488    #[doc = "Complement input C"]
489    #[inline(always)]
490    pub fn is_complement(&self) -> bool {
491        *self == Pt2Cc::Complement
492    }
493    #[doc = "Force input C to become 1"]
494    #[inline(always)]
495    pub fn is_force_1(&self) -> bool {
496        *self == Pt2Cc::Force1
497    }
498}
499#[doc = "Field `PT2_CC` writer - Product Term 2, Input C Configuration"]
500pub type Pt2CcW<'a, REG> = crate::FieldWriter<'a, REG, 2, Pt2Cc, crate::Safe>;
501impl<'a, REG> Pt2CcW<'a, REG>
502where
503    REG: crate::Writable + crate::RegisterSpec,
504    REG::Ux: From<u8>,
505{
506    #[doc = "Force input C to become 0"]
507    #[inline(always)]
508    pub fn force_0(self) -> &'a mut crate::W<REG> {
509        self.variant(Pt2Cc::Force0)
510    }
511    #[doc = "Pass input C"]
512    #[inline(always)]
513    pub fn pass(self) -> &'a mut crate::W<REG> {
514        self.variant(Pt2Cc::Pass)
515    }
516    #[doc = "Complement input C"]
517    #[inline(always)]
518    pub fn complement(self) -> &'a mut crate::W<REG> {
519        self.variant(Pt2Cc::Complement)
520    }
521    #[doc = "Force input C to become 1"]
522    #[inline(always)]
523    pub fn force_1(self) -> &'a mut crate::W<REG> {
524        self.variant(Pt2Cc::Force1)
525    }
526}
527#[doc = "Product Term 2, Input B Configuration\n\nValue on reset: 0"]
528#[cfg_attr(feature = "defmt", derive(defmt::Format))]
529#[derive(Clone, Copy, Debug, PartialEq, Eq)]
530#[repr(u8)]
531pub enum Pt2Bc {
532    #[doc = "0: Force input B to become 0"]
533    Force0 = 0,
534    #[doc = "1: Pass input B"]
535    Pass = 1,
536    #[doc = "2: Complement input B"]
537    Complement = 2,
538    #[doc = "3: Force input B to become 1"]
539    Force1 = 3,
540}
541impl From<Pt2Bc> for u8 {
542    #[inline(always)]
543    fn from(variant: Pt2Bc) -> Self {
544        variant as _
545    }
546}
547impl crate::FieldSpec for Pt2Bc {
548    type Ux = u8;
549}
550impl crate::IsEnum for Pt2Bc {}
551#[doc = "Field `PT2_BC` reader - Product Term 2, Input B Configuration"]
552pub type Pt2BcR = crate::FieldReader<Pt2Bc>;
553impl Pt2BcR {
554    #[doc = "Get enumerated values variant"]
555    #[inline(always)]
556    pub const fn variant(&self) -> Pt2Bc {
557        match self.bits {
558            0 => Pt2Bc::Force0,
559            1 => Pt2Bc::Pass,
560            2 => Pt2Bc::Complement,
561            3 => Pt2Bc::Force1,
562            _ => unreachable!(),
563        }
564    }
565    #[doc = "Force input B to become 0"]
566    #[inline(always)]
567    pub fn is_force_0(&self) -> bool {
568        *self == Pt2Bc::Force0
569    }
570    #[doc = "Pass input B"]
571    #[inline(always)]
572    pub fn is_pass(&self) -> bool {
573        *self == Pt2Bc::Pass
574    }
575    #[doc = "Complement input B"]
576    #[inline(always)]
577    pub fn is_complement(&self) -> bool {
578        *self == Pt2Bc::Complement
579    }
580    #[doc = "Force input B to become 1"]
581    #[inline(always)]
582    pub fn is_force_1(&self) -> bool {
583        *self == Pt2Bc::Force1
584    }
585}
586#[doc = "Field `PT2_BC` writer - Product Term 2, Input B Configuration"]
587pub type Pt2BcW<'a, REG> = crate::FieldWriter<'a, REG, 2, Pt2Bc, crate::Safe>;
588impl<'a, REG> Pt2BcW<'a, REG>
589where
590    REG: crate::Writable + crate::RegisterSpec,
591    REG::Ux: From<u8>,
592{
593    #[doc = "Force input B to become 0"]
594    #[inline(always)]
595    pub fn force_0(self) -> &'a mut crate::W<REG> {
596        self.variant(Pt2Bc::Force0)
597    }
598    #[doc = "Pass input B"]
599    #[inline(always)]
600    pub fn pass(self) -> &'a mut crate::W<REG> {
601        self.variant(Pt2Bc::Pass)
602    }
603    #[doc = "Complement input B"]
604    #[inline(always)]
605    pub fn complement(self) -> &'a mut crate::W<REG> {
606        self.variant(Pt2Bc::Complement)
607    }
608    #[doc = "Force input B to become 1"]
609    #[inline(always)]
610    pub fn force_1(self) -> &'a mut crate::W<REG> {
611        self.variant(Pt2Bc::Force1)
612    }
613}
614#[doc = "Product Term 2, Input A Configuration\n\nValue on reset: 0"]
615#[cfg_attr(feature = "defmt", derive(defmt::Format))]
616#[derive(Clone, Copy, Debug, PartialEq, Eq)]
617#[repr(u8)]
618pub enum Pt2Ac {
619    #[doc = "0: Force input A to become 0"]
620    Force0 = 0,
621    #[doc = "1: Pass input A"]
622    Pass = 1,
623    #[doc = "2: Complement input A"]
624    Complement = 2,
625    #[doc = "3: Force input A to become 1"]
626    Force1 = 3,
627}
628impl From<Pt2Ac> for u8 {
629    #[inline(always)]
630    fn from(variant: Pt2Ac) -> Self {
631        variant as _
632    }
633}
634impl crate::FieldSpec for Pt2Ac {
635    type Ux = u8;
636}
637impl crate::IsEnum for Pt2Ac {}
638#[doc = "Field `PT2_AC` reader - Product Term 2, Input A Configuration"]
639pub type Pt2AcR = crate::FieldReader<Pt2Ac>;
640impl Pt2AcR {
641    #[doc = "Get enumerated values variant"]
642    #[inline(always)]
643    pub const fn variant(&self) -> Pt2Ac {
644        match self.bits {
645            0 => Pt2Ac::Force0,
646            1 => Pt2Ac::Pass,
647            2 => Pt2Ac::Complement,
648            3 => Pt2Ac::Force1,
649            _ => unreachable!(),
650        }
651    }
652    #[doc = "Force input A to become 0"]
653    #[inline(always)]
654    pub fn is_force_0(&self) -> bool {
655        *self == Pt2Ac::Force0
656    }
657    #[doc = "Pass input A"]
658    #[inline(always)]
659    pub fn is_pass(&self) -> bool {
660        *self == Pt2Ac::Pass
661    }
662    #[doc = "Complement input A"]
663    #[inline(always)]
664    pub fn is_complement(&self) -> bool {
665        *self == Pt2Ac::Complement
666    }
667    #[doc = "Force input A to become 1"]
668    #[inline(always)]
669    pub fn is_force_1(&self) -> bool {
670        *self == Pt2Ac::Force1
671    }
672}
673#[doc = "Field `PT2_AC` writer - Product Term 2, Input A Configuration"]
674pub type Pt2AcW<'a, REG> = crate::FieldWriter<'a, REG, 2, Pt2Ac, crate::Safe>;
675impl<'a, REG> Pt2AcW<'a, REG>
676where
677    REG: crate::Writable + crate::RegisterSpec,
678    REG::Ux: From<u8>,
679{
680    #[doc = "Force input A to become 0"]
681    #[inline(always)]
682    pub fn force_0(self) -> &'a mut crate::W<REG> {
683        self.variant(Pt2Ac::Force0)
684    }
685    #[doc = "Pass input A"]
686    #[inline(always)]
687    pub fn pass(self) -> &'a mut crate::W<REG> {
688        self.variant(Pt2Ac::Pass)
689    }
690    #[doc = "Complement input A"]
691    #[inline(always)]
692    pub fn complement(self) -> &'a mut crate::W<REG> {
693        self.variant(Pt2Ac::Complement)
694    }
695    #[doc = "Force input A to become 1"]
696    #[inline(always)]
697    pub fn force_1(self) -> &'a mut crate::W<REG> {
698        self.variant(Pt2Ac::Force1)
699    }
700}
701impl R {
702    #[doc = "Bits 0:1 - Product Term 3, Input D Configuration"]
703    #[inline(always)]
704    pub fn pt3_dc(&self) -> Pt3DcR {
705        Pt3DcR::new((self.bits & 3) as u8)
706    }
707    #[doc = "Bits 2:3 - Product Term 3, Input C Configuration"]
708    #[inline(always)]
709    pub fn pt3_cc(&self) -> Pt3CcR {
710        Pt3CcR::new(((self.bits >> 2) & 3) as u8)
711    }
712    #[doc = "Bits 4:5 - Product Term 3, Input B Configuration"]
713    #[inline(always)]
714    pub fn pt3_bc(&self) -> Pt3BcR {
715        Pt3BcR::new(((self.bits >> 4) & 3) as u8)
716    }
717    #[doc = "Bits 6:7 - Product Term 3, Input A Configuration"]
718    #[inline(always)]
719    pub fn pt3_ac(&self) -> Pt3AcR {
720        Pt3AcR::new(((self.bits >> 6) & 3) as u8)
721    }
722    #[doc = "Bits 8:9 - Product Term 2, Input D Configuration"]
723    #[inline(always)]
724    pub fn pt2_dc(&self) -> Pt2DcR {
725        Pt2DcR::new(((self.bits >> 8) & 3) as u8)
726    }
727    #[doc = "Bits 10:11 - Product Term 2, Input C Configuration"]
728    #[inline(always)]
729    pub fn pt2_cc(&self) -> Pt2CcR {
730        Pt2CcR::new(((self.bits >> 10) & 3) as u8)
731    }
732    #[doc = "Bits 12:13 - Product Term 2, Input B Configuration"]
733    #[inline(always)]
734    pub fn pt2_bc(&self) -> Pt2BcR {
735        Pt2BcR::new(((self.bits >> 12) & 3) as u8)
736    }
737    #[doc = "Bits 14:15 - Product Term 2, Input A Configuration"]
738    #[inline(always)]
739    pub fn pt2_ac(&self) -> Pt2AcR {
740        Pt2AcR::new(((self.bits >> 14) & 3) as u8)
741    }
742}
743#[cfg(feature = "debug")]
744impl core::fmt::Debug for R {
745    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
746        f.debug_struct("BFCRT230")
747            .field("pt3_dc", &self.pt3_dc())
748            .field("pt3_cc", &self.pt3_cc())
749            .field("pt3_bc", &self.pt3_bc())
750            .field("pt3_ac", &self.pt3_ac())
751            .field("pt2_dc", &self.pt2_dc())
752            .field("pt2_cc", &self.pt2_cc())
753            .field("pt2_bc", &self.pt2_bc())
754            .field("pt2_ac", &self.pt2_ac())
755            .finish()
756    }
757}
758impl W {
759    #[doc = "Bits 0:1 - Product Term 3, Input D Configuration"]
760    #[inline(always)]
761    pub fn pt3_dc(&mut self) -> Pt3DcW<'_, Bfcrt230Spec> {
762        Pt3DcW::new(self, 0)
763    }
764    #[doc = "Bits 2:3 - Product Term 3, Input C Configuration"]
765    #[inline(always)]
766    pub fn pt3_cc(&mut self) -> Pt3CcW<'_, Bfcrt230Spec> {
767        Pt3CcW::new(self, 2)
768    }
769    #[doc = "Bits 4:5 - Product Term 3, Input B Configuration"]
770    #[inline(always)]
771    pub fn pt3_bc(&mut self) -> Pt3BcW<'_, Bfcrt230Spec> {
772        Pt3BcW::new(self, 4)
773    }
774    #[doc = "Bits 6:7 - Product Term 3, Input A Configuration"]
775    #[inline(always)]
776    pub fn pt3_ac(&mut self) -> Pt3AcW<'_, Bfcrt230Spec> {
777        Pt3AcW::new(self, 6)
778    }
779    #[doc = "Bits 8:9 - Product Term 2, Input D Configuration"]
780    #[inline(always)]
781    pub fn pt2_dc(&mut self) -> Pt2DcW<'_, Bfcrt230Spec> {
782        Pt2DcW::new(self, 8)
783    }
784    #[doc = "Bits 10:11 - Product Term 2, Input C Configuration"]
785    #[inline(always)]
786    pub fn pt2_cc(&mut self) -> Pt2CcW<'_, Bfcrt230Spec> {
787        Pt2CcW::new(self, 10)
788    }
789    #[doc = "Bits 12:13 - Product Term 2, Input B Configuration"]
790    #[inline(always)]
791    pub fn pt2_bc(&mut self) -> Pt2BcW<'_, Bfcrt230Spec> {
792        Pt2BcW::new(self, 12)
793    }
794    #[doc = "Bits 14:15 - Product Term 2, Input A Configuration"]
795    #[inline(always)]
796    pub fn pt2_ac(&mut self) -> Pt2AcW<'_, Bfcrt230Spec> {
797        Pt2AcW::new(self, 14)
798    }
799}
800#[doc = "Boolean Function Term 2 and 3 Configuration for EVENT0\n\nYou can [`read`](crate::Reg::read) this register and get [`bfcrt230::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`bfcrt230::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
801pub struct Bfcrt230Spec;
802impl crate::RegisterSpec for Bfcrt230Spec {
803    type Ux = u16;
804}
805#[doc = "`read()` method returns [`bfcrt230::R`](R) reader structure"]
806impl crate::Readable for Bfcrt230Spec {}
807#[doc = "`write(|w| ..)` method takes [`bfcrt230::W`](W) writer structure"]
808impl crate::Writable for Bfcrt230Spec {
809    type Safety = crate::Unsafe;
810}
811#[doc = "`reset()` method sets BFCRT230 to value 0"]
812impl crate::Resettable for Bfcrt230Spec {}