1#[doc = "Register `BFCRT011` reader"]
2pub type R = crate::R<Bfcrt011Spec>;
3#[doc = "Register `BFCRT011` writer"]
4pub type W = crate::W<Bfcrt011Spec>;
5#[doc = "Product Term 1, 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 Pt1Dc {
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<Pt1Dc> for u8 {
20 #[inline(always)]
21 fn from(variant: Pt1Dc) -> Self {
22 variant as _
23 }
24}
25impl crate::FieldSpec for Pt1Dc {
26 type Ux = u8;
27}
28impl crate::IsEnum for Pt1Dc {}
29#[doc = "Field `PT1_DC` reader - Product Term 1, Input D Configuration"]
30pub type Pt1DcR = crate::FieldReader<Pt1Dc>;
31impl Pt1DcR {
32 #[doc = "Get enumerated values variant"]
33 #[inline(always)]
34 pub const fn variant(&self) -> Pt1Dc {
35 match self.bits {
36 0 => Pt1Dc::Force0,
37 1 => Pt1Dc::Pass,
38 2 => Pt1Dc::Complement,
39 3 => Pt1Dc::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 == Pt1Dc::Force0
47 }
48 #[doc = "Pass input D"]
49 #[inline(always)]
50 pub fn is_pass(&self) -> bool {
51 *self == Pt1Dc::Pass
52 }
53 #[doc = "Complement input D"]
54 #[inline(always)]
55 pub fn is_complement(&self) -> bool {
56 *self == Pt1Dc::Complement
57 }
58 #[doc = "Force input D to become 1"]
59 #[inline(always)]
60 pub fn is_force_1(&self) -> bool {
61 *self == Pt1Dc::Force1
62 }
63}
64#[doc = "Field `PT1_DC` writer - Product Term 1, Input D Configuration"]
65pub type Pt1DcW<'a, REG> = crate::FieldWriter<'a, REG, 2, Pt1Dc, crate::Safe>;
66impl<'a, REG> Pt1DcW<'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(Pt1Dc::Force0)
75 }
76 #[doc = "Pass input D"]
77 #[inline(always)]
78 pub fn pass(self) -> &'a mut crate::W<REG> {
79 self.variant(Pt1Dc::Pass)
80 }
81 #[doc = "Complement input D"]
82 #[inline(always)]
83 pub fn complement(self) -> &'a mut crate::W<REG> {
84 self.variant(Pt1Dc::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(Pt1Dc::Force1)
90 }
91}
92#[doc = "Product Term 1, 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 Pt1Cc {
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<Pt1Cc> for u8 {
107 #[inline(always)]
108 fn from(variant: Pt1Cc) -> Self {
109 variant as _
110 }
111}
112impl crate::FieldSpec for Pt1Cc {
113 type Ux = u8;
114}
115impl crate::IsEnum for Pt1Cc {}
116#[doc = "Field `PT1_CC` reader - Product Term 1, Input C Configuration"]
117pub type Pt1CcR = crate::FieldReader<Pt1Cc>;
118impl Pt1CcR {
119 #[doc = "Get enumerated values variant"]
120 #[inline(always)]
121 pub const fn variant(&self) -> Pt1Cc {
122 match self.bits {
123 0 => Pt1Cc::Force0,
124 1 => Pt1Cc::Pass,
125 2 => Pt1Cc::Complement,
126 3 => Pt1Cc::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 == Pt1Cc::Force0
134 }
135 #[doc = "Pass input C"]
136 #[inline(always)]
137 pub fn is_pass(&self) -> bool {
138 *self == Pt1Cc::Pass
139 }
140 #[doc = "Complement input C"]
141 #[inline(always)]
142 pub fn is_complement(&self) -> bool {
143 *self == Pt1Cc::Complement
144 }
145 #[doc = "Force input C to become 1"]
146 #[inline(always)]
147 pub fn is_force_1(&self) -> bool {
148 *self == Pt1Cc::Force1
149 }
150}
151#[doc = "Field `PT1_CC` writer - Product Term 1, Input C Configuration"]
152pub type Pt1CcW<'a, REG> = crate::FieldWriter<'a, REG, 2, Pt1Cc, crate::Safe>;
153impl<'a, REG> Pt1CcW<'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(Pt1Cc::Force0)
162 }
163 #[doc = "Pass input C"]
164 #[inline(always)]
165 pub fn pass(self) -> &'a mut crate::W<REG> {
166 self.variant(Pt1Cc::Pass)
167 }
168 #[doc = "Complement input C"]
169 #[inline(always)]
170 pub fn complement(self) -> &'a mut crate::W<REG> {
171 self.variant(Pt1Cc::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(Pt1Cc::Force1)
177 }
178}
179#[doc = "Product Term 1, 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 Pt1Bc {
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<Pt1Bc> for u8 {
194 #[inline(always)]
195 fn from(variant: Pt1Bc) -> Self {
196 variant as _
197 }
198}
199impl crate::FieldSpec for Pt1Bc {
200 type Ux = u8;
201}
202impl crate::IsEnum for Pt1Bc {}
203#[doc = "Field `PT1_BC` reader - Product Term 1, Input B Configuration"]
204pub type Pt1BcR = crate::FieldReader<Pt1Bc>;
205impl Pt1BcR {
206 #[doc = "Get enumerated values variant"]
207 #[inline(always)]
208 pub const fn variant(&self) -> Pt1Bc {
209 match self.bits {
210 0 => Pt1Bc::Force0,
211 1 => Pt1Bc::Pass,
212 2 => Pt1Bc::Complement,
213 3 => Pt1Bc::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 == Pt1Bc::Force0
221 }
222 #[doc = "Pass input B"]
223 #[inline(always)]
224 pub fn is_pass(&self) -> bool {
225 *self == Pt1Bc::Pass
226 }
227 #[doc = "Complement input B"]
228 #[inline(always)]
229 pub fn is_complement(&self) -> bool {
230 *self == Pt1Bc::Complement
231 }
232 #[doc = "Force input B to become 1"]
233 #[inline(always)]
234 pub fn is_force_1(&self) -> bool {
235 *self == Pt1Bc::Force1
236 }
237}
238#[doc = "Field `PT1_BC` writer - Product Term 1, Input B Configuration"]
239pub type Pt1BcW<'a, REG> = crate::FieldWriter<'a, REG, 2, Pt1Bc, crate::Safe>;
240impl<'a, REG> Pt1BcW<'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(Pt1Bc::Force0)
249 }
250 #[doc = "Pass input B"]
251 #[inline(always)]
252 pub fn pass(self) -> &'a mut crate::W<REG> {
253 self.variant(Pt1Bc::Pass)
254 }
255 #[doc = "Complement input B"]
256 #[inline(always)]
257 pub fn complement(self) -> &'a mut crate::W<REG> {
258 self.variant(Pt1Bc::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(Pt1Bc::Force1)
264 }
265}
266#[doc = "Product Term 1, 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 Pt1Ac {
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 A to become 1"]
278 Force1 = 3,
279}
280impl From<Pt1Ac> for u8 {
281 #[inline(always)]
282 fn from(variant: Pt1Ac) -> Self {
283 variant as _
284 }
285}
286impl crate::FieldSpec for Pt1Ac {
287 type Ux = u8;
288}
289impl crate::IsEnum for Pt1Ac {}
290#[doc = "Field `PT1_AC` reader - Product Term 1, Input A Configuration"]
291pub type Pt1AcR = crate::FieldReader<Pt1Ac>;
292impl Pt1AcR {
293 #[doc = "Get enumerated values variant"]
294 #[inline(always)]
295 pub const fn variant(&self) -> Pt1Ac {
296 match self.bits {
297 0 => Pt1Ac::Force0,
298 1 => Pt1Ac::Pass,
299 2 => Pt1Ac::Complement,
300 3 => Pt1Ac::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 == Pt1Ac::Force0
308 }
309 #[doc = "Pass input A"]
310 #[inline(always)]
311 pub fn is_pass(&self) -> bool {
312 *self == Pt1Ac::Pass
313 }
314 #[doc = "Complement input A"]
315 #[inline(always)]
316 pub fn is_complement(&self) -> bool {
317 *self == Pt1Ac::Complement
318 }
319 #[doc = "Force input A to become 1"]
320 #[inline(always)]
321 pub fn is_force_1(&self) -> bool {
322 *self == Pt1Ac::Force1
323 }
324}
325#[doc = "Field `PT1_AC` writer - Product Term 1, Input A Configuration"]
326pub type Pt1AcW<'a, REG> = crate::FieldWriter<'a, REG, 2, Pt1Ac, crate::Safe>;
327impl<'a, REG> Pt1AcW<'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(Pt1Ac::Force0)
336 }
337 #[doc = "Pass input A"]
338 #[inline(always)]
339 pub fn pass(self) -> &'a mut crate::W<REG> {
340 self.variant(Pt1Ac::Pass)
341 }
342 #[doc = "Complement input A"]
343 #[inline(always)]
344 pub fn complement(self) -> &'a mut crate::W<REG> {
345 self.variant(Pt1Ac::Complement)
346 }
347 #[doc = "Force input A to become 1"]
348 #[inline(always)]
349 pub fn force_1(self) -> &'a mut crate::W<REG> {
350 self.variant(Pt1Ac::Force1)
351 }
352}
353#[doc = "Product Term 0, 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 Pt0Dc {
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<Pt0Dc> for u8 {
368 #[inline(always)]
369 fn from(variant: Pt0Dc) -> Self {
370 variant as _
371 }
372}
373impl crate::FieldSpec for Pt0Dc {
374 type Ux = u8;
375}
376impl crate::IsEnum for Pt0Dc {}
377#[doc = "Field `PT0_DC` reader - Product Term 0, Input D Configuration"]
378pub type Pt0DcR = crate::FieldReader<Pt0Dc>;
379impl Pt0DcR {
380 #[doc = "Get enumerated values variant"]
381 #[inline(always)]
382 pub const fn variant(&self) -> Pt0Dc {
383 match self.bits {
384 0 => Pt0Dc::Force0,
385 1 => Pt0Dc::Pass,
386 2 => Pt0Dc::Complement,
387 3 => Pt0Dc::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 == Pt0Dc::Force0
395 }
396 #[doc = "Pass input D"]
397 #[inline(always)]
398 pub fn is_pass(&self) -> bool {
399 *self == Pt0Dc::Pass
400 }
401 #[doc = "Complement input D"]
402 #[inline(always)]
403 pub fn is_complement(&self) -> bool {
404 *self == Pt0Dc::Complement
405 }
406 #[doc = "Force input D to become 1"]
407 #[inline(always)]
408 pub fn is_force_1(&self) -> bool {
409 *self == Pt0Dc::Force1
410 }
411}
412#[doc = "Field `PT0_DC` writer - Product Term 0, Input D Configuration"]
413pub type Pt0DcW<'a, REG> = crate::FieldWriter<'a, REG, 2, Pt0Dc, crate::Safe>;
414impl<'a, REG> Pt0DcW<'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(Pt0Dc::Force0)
423 }
424 #[doc = "Pass input D"]
425 #[inline(always)]
426 pub fn pass(self) -> &'a mut crate::W<REG> {
427 self.variant(Pt0Dc::Pass)
428 }
429 #[doc = "Complement input D"]
430 #[inline(always)]
431 pub fn complement(self) -> &'a mut crate::W<REG> {
432 self.variant(Pt0Dc::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(Pt0Dc::Force1)
438 }
439}
440#[doc = "Product Term 0, 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 Pt0Cc {
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<Pt0Cc> for u8 {
455 #[inline(always)]
456 fn from(variant: Pt0Cc) -> Self {
457 variant as _
458 }
459}
460impl crate::FieldSpec for Pt0Cc {
461 type Ux = u8;
462}
463impl crate::IsEnum for Pt0Cc {}
464#[doc = "Field `PT0_CC` reader - Product Term 0, Input C Configuration"]
465pub type Pt0CcR = crate::FieldReader<Pt0Cc>;
466impl Pt0CcR {
467 #[doc = "Get enumerated values variant"]
468 #[inline(always)]
469 pub const fn variant(&self) -> Pt0Cc {
470 match self.bits {
471 0 => Pt0Cc::Force0,
472 1 => Pt0Cc::Pass,
473 2 => Pt0Cc::Complement,
474 3 => Pt0Cc::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 == Pt0Cc::Force0
482 }
483 #[doc = "Pass input C"]
484 #[inline(always)]
485 pub fn is_pass(&self) -> bool {
486 *self == Pt0Cc::Pass
487 }
488 #[doc = "Complement input C"]
489 #[inline(always)]
490 pub fn is_complement(&self) -> bool {
491 *self == Pt0Cc::Complement
492 }
493 #[doc = "Force input C to become 1"]
494 #[inline(always)]
495 pub fn is_force_1(&self) -> bool {
496 *self == Pt0Cc::Force1
497 }
498}
499#[doc = "Field `PT0_CC` writer - Product Term 0, Input C Configuration"]
500pub type Pt0CcW<'a, REG> = crate::FieldWriter<'a, REG, 2, Pt0Cc, crate::Safe>;
501impl<'a, REG> Pt0CcW<'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(Pt0Cc::Force0)
510 }
511 #[doc = "Pass input C"]
512 #[inline(always)]
513 pub fn pass(self) -> &'a mut crate::W<REG> {
514 self.variant(Pt0Cc::Pass)
515 }
516 #[doc = "Complement input C"]
517 #[inline(always)]
518 pub fn complement(self) -> &'a mut crate::W<REG> {
519 self.variant(Pt0Cc::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(Pt0Cc::Force1)
525 }
526}
527#[doc = "Product Term 0, 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 Pt0Bc {
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<Pt0Bc> for u8 {
542 #[inline(always)]
543 fn from(variant: Pt0Bc) -> Self {
544 variant as _
545 }
546}
547impl crate::FieldSpec for Pt0Bc {
548 type Ux = u8;
549}
550impl crate::IsEnum for Pt0Bc {}
551#[doc = "Field `PT0_BC` reader - Product Term 0, Input B Configuration"]
552pub type Pt0BcR = crate::FieldReader<Pt0Bc>;
553impl Pt0BcR {
554 #[doc = "Get enumerated values variant"]
555 #[inline(always)]
556 pub const fn variant(&self) -> Pt0Bc {
557 match self.bits {
558 0 => Pt0Bc::Force0,
559 1 => Pt0Bc::Pass,
560 2 => Pt0Bc::Complement,
561 3 => Pt0Bc::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 == Pt0Bc::Force0
569 }
570 #[doc = "Pass input B"]
571 #[inline(always)]
572 pub fn is_pass(&self) -> bool {
573 *self == Pt0Bc::Pass
574 }
575 #[doc = "Complement input B"]
576 #[inline(always)]
577 pub fn is_complement(&self) -> bool {
578 *self == Pt0Bc::Complement
579 }
580 #[doc = "Force input B to become 1"]
581 #[inline(always)]
582 pub fn is_force_1(&self) -> bool {
583 *self == Pt0Bc::Force1
584 }
585}
586#[doc = "Field `PT0_BC` writer - Product Term 0, Input B Configuration"]
587pub type Pt0BcW<'a, REG> = crate::FieldWriter<'a, REG, 2, Pt0Bc, crate::Safe>;
588impl<'a, REG> Pt0BcW<'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(Pt0Bc::Force0)
597 }
598 #[doc = "Pass input B"]
599 #[inline(always)]
600 pub fn pass(self) -> &'a mut crate::W<REG> {
601 self.variant(Pt0Bc::Pass)
602 }
603 #[doc = "Complement input B"]
604 #[inline(always)]
605 pub fn complement(self) -> &'a mut crate::W<REG> {
606 self.variant(Pt0Bc::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(Pt0Bc::Force1)
612 }
613}
614#[doc = "Product Term 0, 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 Pt0Ac {
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<Pt0Ac> for u8 {
629 #[inline(always)]
630 fn from(variant: Pt0Ac) -> Self {
631 variant as _
632 }
633}
634impl crate::FieldSpec for Pt0Ac {
635 type Ux = u8;
636}
637impl crate::IsEnum for Pt0Ac {}
638#[doc = "Field `PT0_AC` reader - Product Term 0, Input A Configuration"]
639pub type Pt0AcR = crate::FieldReader<Pt0Ac>;
640impl Pt0AcR {
641 #[doc = "Get enumerated values variant"]
642 #[inline(always)]
643 pub const fn variant(&self) -> Pt0Ac {
644 match self.bits {
645 0 => Pt0Ac::Force0,
646 1 => Pt0Ac::Pass,
647 2 => Pt0Ac::Complement,
648 3 => Pt0Ac::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 == Pt0Ac::Force0
656 }
657 #[doc = "Pass input A"]
658 #[inline(always)]
659 pub fn is_pass(&self) -> bool {
660 *self == Pt0Ac::Pass
661 }
662 #[doc = "Complement input A"]
663 #[inline(always)]
664 pub fn is_complement(&self) -> bool {
665 *self == Pt0Ac::Complement
666 }
667 #[doc = "Force input A to become 1"]
668 #[inline(always)]
669 pub fn is_force_1(&self) -> bool {
670 *self == Pt0Ac::Force1
671 }
672}
673#[doc = "Field `PT0_AC` writer - Product Term 0, Input A Configuration"]
674pub type Pt0AcW<'a, REG> = crate::FieldWriter<'a, REG, 2, Pt0Ac, crate::Safe>;
675impl<'a, REG> Pt0AcW<'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(Pt0Ac::Force0)
684 }
685 #[doc = "Pass input A"]
686 #[inline(always)]
687 pub fn pass(self) -> &'a mut crate::W<REG> {
688 self.variant(Pt0Ac::Pass)
689 }
690 #[doc = "Complement input A"]
691 #[inline(always)]
692 pub fn complement(self) -> &'a mut crate::W<REG> {
693 self.variant(Pt0Ac::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(Pt0Ac::Force1)
699 }
700}
701impl R {
702 #[doc = "Bits 0:1 - Product Term 1, Input D Configuration"]
703 #[inline(always)]
704 pub fn pt1_dc(&self) -> Pt1DcR {
705 Pt1DcR::new((self.bits & 3) as u8)
706 }
707 #[doc = "Bits 2:3 - Product Term 1, Input C Configuration"]
708 #[inline(always)]
709 pub fn pt1_cc(&self) -> Pt1CcR {
710 Pt1CcR::new(((self.bits >> 2) & 3) as u8)
711 }
712 #[doc = "Bits 4:5 - Product Term 1, Input B Configuration"]
713 #[inline(always)]
714 pub fn pt1_bc(&self) -> Pt1BcR {
715 Pt1BcR::new(((self.bits >> 4) & 3) as u8)
716 }
717 #[doc = "Bits 6:7 - Product Term 1, Input A Configuration"]
718 #[inline(always)]
719 pub fn pt1_ac(&self) -> Pt1AcR {
720 Pt1AcR::new(((self.bits >> 6) & 3) as u8)
721 }
722 #[doc = "Bits 8:9 - Product Term 0, Input D Configuration"]
723 #[inline(always)]
724 pub fn pt0_dc(&self) -> Pt0DcR {
725 Pt0DcR::new(((self.bits >> 8) & 3) as u8)
726 }
727 #[doc = "Bits 10:11 - Product Term 0, Input C Configuration"]
728 #[inline(always)]
729 pub fn pt0_cc(&self) -> Pt0CcR {
730 Pt0CcR::new(((self.bits >> 10) & 3) as u8)
731 }
732 #[doc = "Bits 12:13 - Product Term 0, Input B Configuration"]
733 #[inline(always)]
734 pub fn pt0_bc(&self) -> Pt0BcR {
735 Pt0BcR::new(((self.bits >> 12) & 3) as u8)
736 }
737 #[doc = "Bits 14:15 - Product Term 0, Input A Configuration"]
738 #[inline(always)]
739 pub fn pt0_ac(&self) -> Pt0AcR {
740 Pt0AcR::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("BFCRT011")
747 .field("pt1_dc", &self.pt1_dc())
748 .field("pt1_cc", &self.pt1_cc())
749 .field("pt1_bc", &self.pt1_bc())
750 .field("pt1_ac", &self.pt1_ac())
751 .field("pt0_dc", &self.pt0_dc())
752 .field("pt0_cc", &self.pt0_cc())
753 .field("pt0_bc", &self.pt0_bc())
754 .field("pt0_ac", &self.pt0_ac())
755 .finish()
756 }
757}
758impl W {
759 #[doc = "Bits 0:1 - Product Term 1, Input D Configuration"]
760 #[inline(always)]
761 pub fn pt1_dc(&mut self) -> Pt1DcW<'_, Bfcrt011Spec> {
762 Pt1DcW::new(self, 0)
763 }
764 #[doc = "Bits 2:3 - Product Term 1, Input C Configuration"]
765 #[inline(always)]
766 pub fn pt1_cc(&mut self) -> Pt1CcW<'_, Bfcrt011Spec> {
767 Pt1CcW::new(self, 2)
768 }
769 #[doc = "Bits 4:5 - Product Term 1, Input B Configuration"]
770 #[inline(always)]
771 pub fn pt1_bc(&mut self) -> Pt1BcW<'_, Bfcrt011Spec> {
772 Pt1BcW::new(self, 4)
773 }
774 #[doc = "Bits 6:7 - Product Term 1, Input A Configuration"]
775 #[inline(always)]
776 pub fn pt1_ac(&mut self) -> Pt1AcW<'_, Bfcrt011Spec> {
777 Pt1AcW::new(self, 6)
778 }
779 #[doc = "Bits 8:9 - Product Term 0, Input D Configuration"]
780 #[inline(always)]
781 pub fn pt0_dc(&mut self) -> Pt0DcW<'_, Bfcrt011Spec> {
782 Pt0DcW::new(self, 8)
783 }
784 #[doc = "Bits 10:11 - Product Term 0, Input C Configuration"]
785 #[inline(always)]
786 pub fn pt0_cc(&mut self) -> Pt0CcW<'_, Bfcrt011Spec> {
787 Pt0CcW::new(self, 10)
788 }
789 #[doc = "Bits 12:13 - Product Term 0, Input B Configuration"]
790 #[inline(always)]
791 pub fn pt0_bc(&mut self) -> Pt0BcW<'_, Bfcrt011Spec> {
792 Pt0BcW::new(self, 12)
793 }
794 #[doc = "Bits 14:15 - Product Term 0, Input A Configuration"]
795 #[inline(always)]
796 pub fn pt0_ac(&mut self) -> Pt0AcW<'_, Bfcrt011Spec> {
797 Pt0AcW::new(self, 14)
798 }
799}
800#[doc = "Boolean Function Term 0 and 1 Configuration for EVENT1\n\nYou can [`read`](crate::Reg::read) this register and get [`bfcrt011::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`bfcrt011::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
801pub struct Bfcrt011Spec;
802impl crate::RegisterSpec for Bfcrt011Spec {
803 type Ux = u16;
804}
805#[doc = "`read()` method returns [`bfcrt011::R`](R) reader structure"]
806impl crate::Readable for Bfcrt011Spec {}
807#[doc = "`write(|w| ..)` method takes [`bfcrt011::W`](W) writer structure"]
808impl crate::Writable for Bfcrt011Spec {
809 type Safety = crate::Unsafe;
810}
811#[doc = "`reset()` method sets BFCRT011 to value 0"]
812impl crate::Resettable for Bfcrt011Spec {}