lpc55s6x_pac/pint/
pmcfg.rs

1#[doc = "Reader of register PMCFG"]
2pub type R = crate::R<u32, super::PMCFG>;
3#[doc = "Writer for register PMCFG"]
4pub type W = crate::W<u32, super::PMCFG>;
5#[doc = "Register PMCFG `reset()`'s with value 0"]
6impl crate::ResetValue for super::PMCFG {
7    type Type = u32;
8    #[inline(always)]
9    fn reset_value() -> Self::Type {
10        0
11    }
12}
13#[doc = "Determines whether slice 0 is an endpoint.\n\nValue on reset: 0"]
14#[derive(Clone, Copy, Debug, PartialEq)]
15pub enum PROD_ENDPTS0_A {
16    #[doc = "0: No effect. Slice 0 is not an endpoint."]
17    NO_EFFECT = 0,
18    #[doc = "1: endpoint. Slice 0 is the endpoint of a product term (minterm). Pin interrupt 0 in the NVIC is raised if the minterm evaluates as true."]
19    ENDPOINT = 1,
20}
21impl From<PROD_ENDPTS0_A> for bool {
22    #[inline(always)]
23    fn from(variant: PROD_ENDPTS0_A) -> Self {
24        variant as u8 != 0
25    }
26}
27#[doc = "Reader of field `PROD_ENDPTS0`"]
28pub type PROD_ENDPTS0_R = crate::R<bool, PROD_ENDPTS0_A>;
29impl PROD_ENDPTS0_R {
30    #[doc = r"Get enumerated values variant"]
31    #[inline(always)]
32    pub fn variant(&self) -> PROD_ENDPTS0_A {
33        match self.bits {
34            false => PROD_ENDPTS0_A::NO_EFFECT,
35            true => PROD_ENDPTS0_A::ENDPOINT,
36        }
37    }
38    #[doc = "Checks if the value of the field is `NO_EFFECT`"]
39    #[inline(always)]
40    pub fn is_no_effect(&self) -> bool {
41        *self == PROD_ENDPTS0_A::NO_EFFECT
42    }
43    #[doc = "Checks if the value of the field is `ENDPOINT`"]
44    #[inline(always)]
45    pub fn is_endpoint(&self) -> bool {
46        *self == PROD_ENDPTS0_A::ENDPOINT
47    }
48}
49#[doc = "Write proxy for field `PROD_ENDPTS0`"]
50pub struct PROD_ENDPTS0_W<'a> {
51    w: &'a mut W,
52}
53impl<'a> PROD_ENDPTS0_W<'a> {
54    #[doc = r"Writes `variant` to the field"]
55    #[inline(always)]
56    pub fn variant(self, variant: PROD_ENDPTS0_A) -> &'a mut W {
57        {
58            self.bit(variant.into())
59        }
60    }
61    #[doc = "No effect. Slice 0 is not an endpoint."]
62    #[inline(always)]
63    pub fn no_effect(self) -> &'a mut W {
64        self.variant(PROD_ENDPTS0_A::NO_EFFECT)
65    }
66    #[doc = "endpoint. Slice 0 is the endpoint of a product term (minterm). Pin interrupt 0 in the NVIC is raised if the minterm evaluates as true."]
67    #[inline(always)]
68    pub fn endpoint(self) -> &'a mut W {
69        self.variant(PROD_ENDPTS0_A::ENDPOINT)
70    }
71    #[doc = r"Sets the field bit"]
72    #[inline(always)]
73    pub fn set_bit(self) -> &'a mut W {
74        self.bit(true)
75    }
76    #[doc = r"Clears the field bit"]
77    #[inline(always)]
78    pub fn clear_bit(self) -> &'a mut W {
79        self.bit(false)
80    }
81    #[doc = r"Writes raw bits to the field"]
82    #[inline(always)]
83    pub fn bit(self, value: bool) -> &'a mut W {
84        self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
85        self.w
86    }
87}
88#[doc = "Determines whether slice 1 is an endpoint.\n\nValue on reset: 0"]
89#[derive(Clone, Copy, Debug, PartialEq)]
90pub enum PROD_ENDPTS1_A {
91    #[doc = "0: No effect. Slice 1 is not an endpoint."]
92    NO_EFFECT = 0,
93    #[doc = "1: endpoint. Slice 1 is the endpoint of a product term (minterm). Pin interrupt 1 in the NVIC is raised if the minterm evaluates as true."]
94    ENDPOINT = 1,
95}
96impl From<PROD_ENDPTS1_A> for bool {
97    #[inline(always)]
98    fn from(variant: PROD_ENDPTS1_A) -> Self {
99        variant as u8 != 0
100    }
101}
102#[doc = "Reader of field `PROD_ENDPTS1`"]
103pub type PROD_ENDPTS1_R = crate::R<bool, PROD_ENDPTS1_A>;
104impl PROD_ENDPTS1_R {
105    #[doc = r"Get enumerated values variant"]
106    #[inline(always)]
107    pub fn variant(&self) -> PROD_ENDPTS1_A {
108        match self.bits {
109            false => PROD_ENDPTS1_A::NO_EFFECT,
110            true => PROD_ENDPTS1_A::ENDPOINT,
111        }
112    }
113    #[doc = "Checks if the value of the field is `NO_EFFECT`"]
114    #[inline(always)]
115    pub fn is_no_effect(&self) -> bool {
116        *self == PROD_ENDPTS1_A::NO_EFFECT
117    }
118    #[doc = "Checks if the value of the field is `ENDPOINT`"]
119    #[inline(always)]
120    pub fn is_endpoint(&self) -> bool {
121        *self == PROD_ENDPTS1_A::ENDPOINT
122    }
123}
124#[doc = "Write proxy for field `PROD_ENDPTS1`"]
125pub struct PROD_ENDPTS1_W<'a> {
126    w: &'a mut W,
127}
128impl<'a> PROD_ENDPTS1_W<'a> {
129    #[doc = r"Writes `variant` to the field"]
130    #[inline(always)]
131    pub fn variant(self, variant: PROD_ENDPTS1_A) -> &'a mut W {
132        {
133            self.bit(variant.into())
134        }
135    }
136    #[doc = "No effect. Slice 1 is not an endpoint."]
137    #[inline(always)]
138    pub fn no_effect(self) -> &'a mut W {
139        self.variant(PROD_ENDPTS1_A::NO_EFFECT)
140    }
141    #[doc = "endpoint. Slice 1 is the endpoint of a product term (minterm). Pin interrupt 1 in the NVIC is raised if the minterm evaluates as true."]
142    #[inline(always)]
143    pub fn endpoint(self) -> &'a mut W {
144        self.variant(PROD_ENDPTS1_A::ENDPOINT)
145    }
146    #[doc = r"Sets the field bit"]
147    #[inline(always)]
148    pub fn set_bit(self) -> &'a mut W {
149        self.bit(true)
150    }
151    #[doc = r"Clears the field bit"]
152    #[inline(always)]
153    pub fn clear_bit(self) -> &'a mut W {
154        self.bit(false)
155    }
156    #[doc = r"Writes raw bits to the field"]
157    #[inline(always)]
158    pub fn bit(self, value: bool) -> &'a mut W {
159        self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1);
160        self.w
161    }
162}
163#[doc = "Determines whether slice 2 is an endpoint.\n\nValue on reset: 0"]
164#[derive(Clone, Copy, Debug, PartialEq)]
165pub enum PROD_ENDPTS2_A {
166    #[doc = "0: No effect. Slice 2 is not an endpoint."]
167    NO_EFFECT = 0,
168    #[doc = "1: endpoint. Slice 2 is the endpoint of a product term (minterm). Pin interrupt 2 in the NVIC is raised if the minterm evaluates as true."]
169    ENDPOINT = 1,
170}
171impl From<PROD_ENDPTS2_A> for bool {
172    #[inline(always)]
173    fn from(variant: PROD_ENDPTS2_A) -> Self {
174        variant as u8 != 0
175    }
176}
177#[doc = "Reader of field `PROD_ENDPTS2`"]
178pub type PROD_ENDPTS2_R = crate::R<bool, PROD_ENDPTS2_A>;
179impl PROD_ENDPTS2_R {
180    #[doc = r"Get enumerated values variant"]
181    #[inline(always)]
182    pub fn variant(&self) -> PROD_ENDPTS2_A {
183        match self.bits {
184            false => PROD_ENDPTS2_A::NO_EFFECT,
185            true => PROD_ENDPTS2_A::ENDPOINT,
186        }
187    }
188    #[doc = "Checks if the value of the field is `NO_EFFECT`"]
189    #[inline(always)]
190    pub fn is_no_effect(&self) -> bool {
191        *self == PROD_ENDPTS2_A::NO_EFFECT
192    }
193    #[doc = "Checks if the value of the field is `ENDPOINT`"]
194    #[inline(always)]
195    pub fn is_endpoint(&self) -> bool {
196        *self == PROD_ENDPTS2_A::ENDPOINT
197    }
198}
199#[doc = "Write proxy for field `PROD_ENDPTS2`"]
200pub struct PROD_ENDPTS2_W<'a> {
201    w: &'a mut W,
202}
203impl<'a> PROD_ENDPTS2_W<'a> {
204    #[doc = r"Writes `variant` to the field"]
205    #[inline(always)]
206    pub fn variant(self, variant: PROD_ENDPTS2_A) -> &'a mut W {
207        {
208            self.bit(variant.into())
209        }
210    }
211    #[doc = "No effect. Slice 2 is not an endpoint."]
212    #[inline(always)]
213    pub fn no_effect(self) -> &'a mut W {
214        self.variant(PROD_ENDPTS2_A::NO_EFFECT)
215    }
216    #[doc = "endpoint. Slice 2 is the endpoint of a product term (minterm). Pin interrupt 2 in the NVIC is raised if the minterm evaluates as true."]
217    #[inline(always)]
218    pub fn endpoint(self) -> &'a mut W {
219        self.variant(PROD_ENDPTS2_A::ENDPOINT)
220    }
221    #[doc = r"Sets the field bit"]
222    #[inline(always)]
223    pub fn set_bit(self) -> &'a mut W {
224        self.bit(true)
225    }
226    #[doc = r"Clears the field bit"]
227    #[inline(always)]
228    pub fn clear_bit(self) -> &'a mut W {
229        self.bit(false)
230    }
231    #[doc = r"Writes raw bits to the field"]
232    #[inline(always)]
233    pub fn bit(self, value: bool) -> &'a mut W {
234        self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
235        self.w
236    }
237}
238#[doc = "Determines whether slice 3 is an endpoint.\n\nValue on reset: 0"]
239#[derive(Clone, Copy, Debug, PartialEq)]
240pub enum PROD_ENDPTS3_A {
241    #[doc = "0: No effect. Slice 3 is not an endpoint."]
242    NO_EFFECT = 0,
243    #[doc = "1: endpoint. Slice 3 is the endpoint of a product term (minterm). Pin interrupt 3 in the NVIC is raised if the minterm evaluates as true."]
244    ENDPOINT = 1,
245}
246impl From<PROD_ENDPTS3_A> for bool {
247    #[inline(always)]
248    fn from(variant: PROD_ENDPTS3_A) -> Self {
249        variant as u8 != 0
250    }
251}
252#[doc = "Reader of field `PROD_ENDPTS3`"]
253pub type PROD_ENDPTS3_R = crate::R<bool, PROD_ENDPTS3_A>;
254impl PROD_ENDPTS3_R {
255    #[doc = r"Get enumerated values variant"]
256    #[inline(always)]
257    pub fn variant(&self) -> PROD_ENDPTS3_A {
258        match self.bits {
259            false => PROD_ENDPTS3_A::NO_EFFECT,
260            true => PROD_ENDPTS3_A::ENDPOINT,
261        }
262    }
263    #[doc = "Checks if the value of the field is `NO_EFFECT`"]
264    #[inline(always)]
265    pub fn is_no_effect(&self) -> bool {
266        *self == PROD_ENDPTS3_A::NO_EFFECT
267    }
268    #[doc = "Checks if the value of the field is `ENDPOINT`"]
269    #[inline(always)]
270    pub fn is_endpoint(&self) -> bool {
271        *self == PROD_ENDPTS3_A::ENDPOINT
272    }
273}
274#[doc = "Write proxy for field `PROD_ENDPTS3`"]
275pub struct PROD_ENDPTS3_W<'a> {
276    w: &'a mut W,
277}
278impl<'a> PROD_ENDPTS3_W<'a> {
279    #[doc = r"Writes `variant` to the field"]
280    #[inline(always)]
281    pub fn variant(self, variant: PROD_ENDPTS3_A) -> &'a mut W {
282        {
283            self.bit(variant.into())
284        }
285    }
286    #[doc = "No effect. Slice 3 is not an endpoint."]
287    #[inline(always)]
288    pub fn no_effect(self) -> &'a mut W {
289        self.variant(PROD_ENDPTS3_A::NO_EFFECT)
290    }
291    #[doc = "endpoint. Slice 3 is the endpoint of a product term (minterm). Pin interrupt 3 in the NVIC is raised if the minterm evaluates as true."]
292    #[inline(always)]
293    pub fn endpoint(self) -> &'a mut W {
294        self.variant(PROD_ENDPTS3_A::ENDPOINT)
295    }
296    #[doc = r"Sets the field bit"]
297    #[inline(always)]
298    pub fn set_bit(self) -> &'a mut W {
299        self.bit(true)
300    }
301    #[doc = r"Clears the field bit"]
302    #[inline(always)]
303    pub fn clear_bit(self) -> &'a mut W {
304        self.bit(false)
305    }
306    #[doc = r"Writes raw bits to the field"]
307    #[inline(always)]
308    pub fn bit(self, value: bool) -> &'a mut W {
309        self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3);
310        self.w
311    }
312}
313#[doc = "Determines whether slice 4 is an endpoint.\n\nValue on reset: 0"]
314#[derive(Clone, Copy, Debug, PartialEq)]
315pub enum PROD_ENDPTS4_A {
316    #[doc = "0: No effect. Slice 4 is not an endpoint."]
317    NO_EFFECT = 0,
318    #[doc = "1: endpoint. Slice 4 is the endpoint of a product term (minterm). Pin interrupt 4 in the NVIC is raised if the minterm evaluates as true."]
319    ENDPOINT = 1,
320}
321impl From<PROD_ENDPTS4_A> for bool {
322    #[inline(always)]
323    fn from(variant: PROD_ENDPTS4_A) -> Self {
324        variant as u8 != 0
325    }
326}
327#[doc = "Reader of field `PROD_ENDPTS4`"]
328pub type PROD_ENDPTS4_R = crate::R<bool, PROD_ENDPTS4_A>;
329impl PROD_ENDPTS4_R {
330    #[doc = r"Get enumerated values variant"]
331    #[inline(always)]
332    pub fn variant(&self) -> PROD_ENDPTS4_A {
333        match self.bits {
334            false => PROD_ENDPTS4_A::NO_EFFECT,
335            true => PROD_ENDPTS4_A::ENDPOINT,
336        }
337    }
338    #[doc = "Checks if the value of the field is `NO_EFFECT`"]
339    #[inline(always)]
340    pub fn is_no_effect(&self) -> bool {
341        *self == PROD_ENDPTS4_A::NO_EFFECT
342    }
343    #[doc = "Checks if the value of the field is `ENDPOINT`"]
344    #[inline(always)]
345    pub fn is_endpoint(&self) -> bool {
346        *self == PROD_ENDPTS4_A::ENDPOINT
347    }
348}
349#[doc = "Write proxy for field `PROD_ENDPTS4`"]
350pub struct PROD_ENDPTS4_W<'a> {
351    w: &'a mut W,
352}
353impl<'a> PROD_ENDPTS4_W<'a> {
354    #[doc = r"Writes `variant` to the field"]
355    #[inline(always)]
356    pub fn variant(self, variant: PROD_ENDPTS4_A) -> &'a mut W {
357        {
358            self.bit(variant.into())
359        }
360    }
361    #[doc = "No effect. Slice 4 is not an endpoint."]
362    #[inline(always)]
363    pub fn no_effect(self) -> &'a mut W {
364        self.variant(PROD_ENDPTS4_A::NO_EFFECT)
365    }
366    #[doc = "endpoint. Slice 4 is the endpoint of a product term (minterm). Pin interrupt 4 in the NVIC is raised if the minterm evaluates as true."]
367    #[inline(always)]
368    pub fn endpoint(self) -> &'a mut W {
369        self.variant(PROD_ENDPTS4_A::ENDPOINT)
370    }
371    #[doc = r"Sets the field bit"]
372    #[inline(always)]
373    pub fn set_bit(self) -> &'a mut W {
374        self.bit(true)
375    }
376    #[doc = r"Clears the field bit"]
377    #[inline(always)]
378    pub fn clear_bit(self) -> &'a mut W {
379        self.bit(false)
380    }
381    #[doc = r"Writes raw bits to the field"]
382    #[inline(always)]
383    pub fn bit(self, value: bool) -> &'a mut W {
384        self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
385        self.w
386    }
387}
388#[doc = "Determines whether slice 5 is an endpoint.\n\nValue on reset: 0"]
389#[derive(Clone, Copy, Debug, PartialEq)]
390pub enum PROD_ENDPTS5_A {
391    #[doc = "0: No effect. Slice 5 is not an endpoint."]
392    NO_EFFECT = 0,
393    #[doc = "1: endpoint. Slice 5 is the endpoint of a product term (minterm). Pin interrupt 5 in the NVIC is raised if the minterm evaluates as true."]
394    ENDPOINT = 1,
395}
396impl From<PROD_ENDPTS5_A> for bool {
397    #[inline(always)]
398    fn from(variant: PROD_ENDPTS5_A) -> Self {
399        variant as u8 != 0
400    }
401}
402#[doc = "Reader of field `PROD_ENDPTS5`"]
403pub type PROD_ENDPTS5_R = crate::R<bool, PROD_ENDPTS5_A>;
404impl PROD_ENDPTS5_R {
405    #[doc = r"Get enumerated values variant"]
406    #[inline(always)]
407    pub fn variant(&self) -> PROD_ENDPTS5_A {
408        match self.bits {
409            false => PROD_ENDPTS5_A::NO_EFFECT,
410            true => PROD_ENDPTS5_A::ENDPOINT,
411        }
412    }
413    #[doc = "Checks if the value of the field is `NO_EFFECT`"]
414    #[inline(always)]
415    pub fn is_no_effect(&self) -> bool {
416        *self == PROD_ENDPTS5_A::NO_EFFECT
417    }
418    #[doc = "Checks if the value of the field is `ENDPOINT`"]
419    #[inline(always)]
420    pub fn is_endpoint(&self) -> bool {
421        *self == PROD_ENDPTS5_A::ENDPOINT
422    }
423}
424#[doc = "Write proxy for field `PROD_ENDPTS5`"]
425pub struct PROD_ENDPTS5_W<'a> {
426    w: &'a mut W,
427}
428impl<'a> PROD_ENDPTS5_W<'a> {
429    #[doc = r"Writes `variant` to the field"]
430    #[inline(always)]
431    pub fn variant(self, variant: PROD_ENDPTS5_A) -> &'a mut W {
432        {
433            self.bit(variant.into())
434        }
435    }
436    #[doc = "No effect. Slice 5 is not an endpoint."]
437    #[inline(always)]
438    pub fn no_effect(self) -> &'a mut W {
439        self.variant(PROD_ENDPTS5_A::NO_EFFECT)
440    }
441    #[doc = "endpoint. Slice 5 is the endpoint of a product term (minterm). Pin interrupt 5 in the NVIC is raised if the minterm evaluates as true."]
442    #[inline(always)]
443    pub fn endpoint(self) -> &'a mut W {
444        self.variant(PROD_ENDPTS5_A::ENDPOINT)
445    }
446    #[doc = r"Sets the field bit"]
447    #[inline(always)]
448    pub fn set_bit(self) -> &'a mut W {
449        self.bit(true)
450    }
451    #[doc = r"Clears the field bit"]
452    #[inline(always)]
453    pub fn clear_bit(self) -> &'a mut W {
454        self.bit(false)
455    }
456    #[doc = r"Writes raw bits to the field"]
457    #[inline(always)]
458    pub fn bit(self, value: bool) -> &'a mut W {
459        self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5);
460        self.w
461    }
462}
463#[doc = "Determines whether slice 6 is an endpoint.\n\nValue on reset: 0"]
464#[derive(Clone, Copy, Debug, PartialEq)]
465pub enum PROD_ENDPTS6_A {
466    #[doc = "0: No effect. Slice 6 is not an endpoint."]
467    NO_EFFECT = 0,
468    #[doc = "1: endpoint. Slice 6 is the endpoint of a product term (minterm). Pin interrupt 6 in the NVIC is raised if the minterm evaluates as true."]
469    ENDPOINT = 1,
470}
471impl From<PROD_ENDPTS6_A> for bool {
472    #[inline(always)]
473    fn from(variant: PROD_ENDPTS6_A) -> Self {
474        variant as u8 != 0
475    }
476}
477#[doc = "Reader of field `PROD_ENDPTS6`"]
478pub type PROD_ENDPTS6_R = crate::R<bool, PROD_ENDPTS6_A>;
479impl PROD_ENDPTS6_R {
480    #[doc = r"Get enumerated values variant"]
481    #[inline(always)]
482    pub fn variant(&self) -> PROD_ENDPTS6_A {
483        match self.bits {
484            false => PROD_ENDPTS6_A::NO_EFFECT,
485            true => PROD_ENDPTS6_A::ENDPOINT,
486        }
487    }
488    #[doc = "Checks if the value of the field is `NO_EFFECT`"]
489    #[inline(always)]
490    pub fn is_no_effect(&self) -> bool {
491        *self == PROD_ENDPTS6_A::NO_EFFECT
492    }
493    #[doc = "Checks if the value of the field is `ENDPOINT`"]
494    #[inline(always)]
495    pub fn is_endpoint(&self) -> bool {
496        *self == PROD_ENDPTS6_A::ENDPOINT
497    }
498}
499#[doc = "Write proxy for field `PROD_ENDPTS6`"]
500pub struct PROD_ENDPTS6_W<'a> {
501    w: &'a mut W,
502}
503impl<'a> PROD_ENDPTS6_W<'a> {
504    #[doc = r"Writes `variant` to the field"]
505    #[inline(always)]
506    pub fn variant(self, variant: PROD_ENDPTS6_A) -> &'a mut W {
507        {
508            self.bit(variant.into())
509        }
510    }
511    #[doc = "No effect. Slice 6 is not an endpoint."]
512    #[inline(always)]
513    pub fn no_effect(self) -> &'a mut W {
514        self.variant(PROD_ENDPTS6_A::NO_EFFECT)
515    }
516    #[doc = "endpoint. Slice 6 is the endpoint of a product term (minterm). Pin interrupt 6 in the NVIC is raised if the minterm evaluates as true."]
517    #[inline(always)]
518    pub fn endpoint(self) -> &'a mut W {
519        self.variant(PROD_ENDPTS6_A::ENDPOINT)
520    }
521    #[doc = r"Sets the field bit"]
522    #[inline(always)]
523    pub fn set_bit(self) -> &'a mut W {
524        self.bit(true)
525    }
526    #[doc = r"Clears the field bit"]
527    #[inline(always)]
528    pub fn clear_bit(self) -> &'a mut W {
529        self.bit(false)
530    }
531    #[doc = r"Writes raw bits to the field"]
532    #[inline(always)]
533    pub fn bit(self, value: bool) -> &'a mut W {
534        self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6);
535        self.w
536    }
537}
538#[doc = "Specifies the match contribution condition for bit slice 0.\n\nValue on reset: 0"]
539#[derive(Clone, Copy, Debug, PartialEq)]
540#[repr(u8)]
541pub enum CFG0_A {
542    #[doc = "0: Constant HIGH. This bit slice always contributes to a product term match."]
543    CONSTANT_HIGH = 0,
544    #[doc = "1: Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
545    STICKY_RISING_EDGE = 1,
546    #[doc = "2: Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
547    STICKY_FALLING_EDGE = 2,
548    #[doc = "3: Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
549    STICKY_RISING_FALLING_EDGE = 3,
550    #[doc = "4: High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register."]
551    HIGH_LEVEL = 4,
552    #[doc = "5: Low level. Match occurs when there is a low level on the specified input."]
553    LOW_LEVEL = 5,
554    #[doc = "6: Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices)."]
555    CONSTANT_ZERO = 6,
556    #[doc = "7: Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit is cleared after one clock cycle."]
557    EVENT = 7,
558}
559impl From<CFG0_A> for u8 {
560    #[inline(always)]
561    fn from(variant: CFG0_A) -> Self {
562        variant as _
563    }
564}
565#[doc = "Reader of field `CFG0`"]
566pub type CFG0_R = crate::R<u8, CFG0_A>;
567impl CFG0_R {
568    #[doc = r"Get enumerated values variant"]
569    #[inline(always)]
570    pub fn variant(&self) -> CFG0_A {
571        match self.bits {
572            0 => CFG0_A::CONSTANT_HIGH,
573            1 => CFG0_A::STICKY_RISING_EDGE,
574            2 => CFG0_A::STICKY_FALLING_EDGE,
575            3 => CFG0_A::STICKY_RISING_FALLING_EDGE,
576            4 => CFG0_A::HIGH_LEVEL,
577            5 => CFG0_A::LOW_LEVEL,
578            6 => CFG0_A::CONSTANT_ZERO,
579            7 => CFG0_A::EVENT,
580            _ => unreachable!(),
581        }
582    }
583    #[doc = "Checks if the value of the field is `CONSTANT_HIGH`"]
584    #[inline(always)]
585    pub fn is_constant_high(&self) -> bool {
586        *self == CFG0_A::CONSTANT_HIGH
587    }
588    #[doc = "Checks if the value of the field is `STICKY_RISING_EDGE`"]
589    #[inline(always)]
590    pub fn is_sticky_rising_edge(&self) -> bool {
591        *self == CFG0_A::STICKY_RISING_EDGE
592    }
593    #[doc = "Checks if the value of the field is `STICKY_FALLING_EDGE`"]
594    #[inline(always)]
595    pub fn is_sticky_falling_edge(&self) -> bool {
596        *self == CFG0_A::STICKY_FALLING_EDGE
597    }
598    #[doc = "Checks if the value of the field is `STICKY_RISING_FALLING_EDGE`"]
599    #[inline(always)]
600    pub fn is_sticky_rising_falling_edge(&self) -> bool {
601        *self == CFG0_A::STICKY_RISING_FALLING_EDGE
602    }
603    #[doc = "Checks if the value of the field is `HIGH_LEVEL`"]
604    #[inline(always)]
605    pub fn is_high_level(&self) -> bool {
606        *self == CFG0_A::HIGH_LEVEL
607    }
608    #[doc = "Checks if the value of the field is `LOW_LEVEL`"]
609    #[inline(always)]
610    pub fn is_low_level(&self) -> bool {
611        *self == CFG0_A::LOW_LEVEL
612    }
613    #[doc = "Checks if the value of the field is `CONSTANT_ZERO`"]
614    #[inline(always)]
615    pub fn is_constant_zero(&self) -> bool {
616        *self == CFG0_A::CONSTANT_ZERO
617    }
618    #[doc = "Checks if the value of the field is `EVENT`"]
619    #[inline(always)]
620    pub fn is_event(&self) -> bool {
621        *self == CFG0_A::EVENT
622    }
623}
624#[doc = "Write proxy for field `CFG0`"]
625pub struct CFG0_W<'a> {
626    w: &'a mut W,
627}
628impl<'a> CFG0_W<'a> {
629    #[doc = r"Writes `variant` to the field"]
630    #[inline(always)]
631    pub fn variant(self, variant: CFG0_A) -> &'a mut W {
632        {
633            self.bits(variant.into())
634        }
635    }
636    #[doc = "Constant HIGH. This bit slice always contributes to a product term match."]
637    #[inline(always)]
638    pub fn constant_high(self) -> &'a mut W {
639        self.variant(CFG0_A::CONSTANT_HIGH)
640    }
641    #[doc = "Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
642    #[inline(always)]
643    pub fn sticky_rising_edge(self) -> &'a mut W {
644        self.variant(CFG0_A::STICKY_RISING_EDGE)
645    }
646    #[doc = "Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
647    #[inline(always)]
648    pub fn sticky_falling_edge(self) -> &'a mut W {
649        self.variant(CFG0_A::STICKY_FALLING_EDGE)
650    }
651    #[doc = "Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
652    #[inline(always)]
653    pub fn sticky_rising_falling_edge(self) -> &'a mut W {
654        self.variant(CFG0_A::STICKY_RISING_FALLING_EDGE)
655    }
656    #[doc = "High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register."]
657    #[inline(always)]
658    pub fn high_level(self) -> &'a mut W {
659        self.variant(CFG0_A::HIGH_LEVEL)
660    }
661    #[doc = "Low level. Match occurs when there is a low level on the specified input."]
662    #[inline(always)]
663    pub fn low_level(self) -> &'a mut W {
664        self.variant(CFG0_A::LOW_LEVEL)
665    }
666    #[doc = "Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices)."]
667    #[inline(always)]
668    pub fn constant_zero(self) -> &'a mut W {
669        self.variant(CFG0_A::CONSTANT_ZERO)
670    }
671    #[doc = "Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit is cleared after one clock cycle."]
672    #[inline(always)]
673    pub fn event(self) -> &'a mut W {
674        self.variant(CFG0_A::EVENT)
675    }
676    #[doc = r"Writes raw bits to the field"]
677    #[inline(always)]
678    pub fn bits(self, value: u8) -> &'a mut W {
679        self.w.bits = (self.w.bits & !(0x07 << 8)) | (((value as u32) & 0x07) << 8);
680        self.w
681    }
682}
683#[doc = "Specifies the match contribution condition for bit slice 1.\n\nValue on reset: 0"]
684#[derive(Clone, Copy, Debug, PartialEq)]
685#[repr(u8)]
686pub enum CFG1_A {
687    #[doc = "0: Constant HIGH. This bit slice always contributes to a product term match."]
688    CONSTANT_HIGH = 0,
689    #[doc = "1: Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
690    STICKY_RISING_EDGE = 1,
691    #[doc = "2: Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
692    STICKY_FALLING_EDGE = 2,
693    #[doc = "3: Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
694    STICKY_RISING_FALLING_EDGE = 3,
695    #[doc = "4: High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register."]
696    HIGH_LEVEL = 4,
697    #[doc = "5: Low level. Match occurs when there is a low level on the specified input."]
698    LOW_LEVEL = 5,
699    #[doc = "6: Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices)."]
700    CONSTANT_ZERO = 6,
701    #[doc = "7: Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit is cleared after one clock cycle."]
702    EVENT = 7,
703}
704impl From<CFG1_A> for u8 {
705    #[inline(always)]
706    fn from(variant: CFG1_A) -> Self {
707        variant as _
708    }
709}
710#[doc = "Reader of field `CFG1`"]
711pub type CFG1_R = crate::R<u8, CFG1_A>;
712impl CFG1_R {
713    #[doc = r"Get enumerated values variant"]
714    #[inline(always)]
715    pub fn variant(&self) -> CFG1_A {
716        match self.bits {
717            0 => CFG1_A::CONSTANT_HIGH,
718            1 => CFG1_A::STICKY_RISING_EDGE,
719            2 => CFG1_A::STICKY_FALLING_EDGE,
720            3 => CFG1_A::STICKY_RISING_FALLING_EDGE,
721            4 => CFG1_A::HIGH_LEVEL,
722            5 => CFG1_A::LOW_LEVEL,
723            6 => CFG1_A::CONSTANT_ZERO,
724            7 => CFG1_A::EVENT,
725            _ => unreachable!(),
726        }
727    }
728    #[doc = "Checks if the value of the field is `CONSTANT_HIGH`"]
729    #[inline(always)]
730    pub fn is_constant_high(&self) -> bool {
731        *self == CFG1_A::CONSTANT_HIGH
732    }
733    #[doc = "Checks if the value of the field is `STICKY_RISING_EDGE`"]
734    #[inline(always)]
735    pub fn is_sticky_rising_edge(&self) -> bool {
736        *self == CFG1_A::STICKY_RISING_EDGE
737    }
738    #[doc = "Checks if the value of the field is `STICKY_FALLING_EDGE`"]
739    #[inline(always)]
740    pub fn is_sticky_falling_edge(&self) -> bool {
741        *self == CFG1_A::STICKY_FALLING_EDGE
742    }
743    #[doc = "Checks if the value of the field is `STICKY_RISING_FALLING_EDGE`"]
744    #[inline(always)]
745    pub fn is_sticky_rising_falling_edge(&self) -> bool {
746        *self == CFG1_A::STICKY_RISING_FALLING_EDGE
747    }
748    #[doc = "Checks if the value of the field is `HIGH_LEVEL`"]
749    #[inline(always)]
750    pub fn is_high_level(&self) -> bool {
751        *self == CFG1_A::HIGH_LEVEL
752    }
753    #[doc = "Checks if the value of the field is `LOW_LEVEL`"]
754    #[inline(always)]
755    pub fn is_low_level(&self) -> bool {
756        *self == CFG1_A::LOW_LEVEL
757    }
758    #[doc = "Checks if the value of the field is `CONSTANT_ZERO`"]
759    #[inline(always)]
760    pub fn is_constant_zero(&self) -> bool {
761        *self == CFG1_A::CONSTANT_ZERO
762    }
763    #[doc = "Checks if the value of the field is `EVENT`"]
764    #[inline(always)]
765    pub fn is_event(&self) -> bool {
766        *self == CFG1_A::EVENT
767    }
768}
769#[doc = "Write proxy for field `CFG1`"]
770pub struct CFG1_W<'a> {
771    w: &'a mut W,
772}
773impl<'a> CFG1_W<'a> {
774    #[doc = r"Writes `variant` to the field"]
775    #[inline(always)]
776    pub fn variant(self, variant: CFG1_A) -> &'a mut W {
777        {
778            self.bits(variant.into())
779        }
780    }
781    #[doc = "Constant HIGH. This bit slice always contributes to a product term match."]
782    #[inline(always)]
783    pub fn constant_high(self) -> &'a mut W {
784        self.variant(CFG1_A::CONSTANT_HIGH)
785    }
786    #[doc = "Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
787    #[inline(always)]
788    pub fn sticky_rising_edge(self) -> &'a mut W {
789        self.variant(CFG1_A::STICKY_RISING_EDGE)
790    }
791    #[doc = "Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
792    #[inline(always)]
793    pub fn sticky_falling_edge(self) -> &'a mut W {
794        self.variant(CFG1_A::STICKY_FALLING_EDGE)
795    }
796    #[doc = "Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
797    #[inline(always)]
798    pub fn sticky_rising_falling_edge(self) -> &'a mut W {
799        self.variant(CFG1_A::STICKY_RISING_FALLING_EDGE)
800    }
801    #[doc = "High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register."]
802    #[inline(always)]
803    pub fn high_level(self) -> &'a mut W {
804        self.variant(CFG1_A::HIGH_LEVEL)
805    }
806    #[doc = "Low level. Match occurs when there is a low level on the specified input."]
807    #[inline(always)]
808    pub fn low_level(self) -> &'a mut W {
809        self.variant(CFG1_A::LOW_LEVEL)
810    }
811    #[doc = "Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices)."]
812    #[inline(always)]
813    pub fn constant_zero(self) -> &'a mut W {
814        self.variant(CFG1_A::CONSTANT_ZERO)
815    }
816    #[doc = "Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit is cleared after one clock cycle."]
817    #[inline(always)]
818    pub fn event(self) -> &'a mut W {
819        self.variant(CFG1_A::EVENT)
820    }
821    #[doc = r"Writes raw bits to the field"]
822    #[inline(always)]
823    pub fn bits(self, value: u8) -> &'a mut W {
824        self.w.bits = (self.w.bits & !(0x07 << 11)) | (((value as u32) & 0x07) << 11);
825        self.w
826    }
827}
828#[doc = "Specifies the match contribution condition for bit slice 2.\n\nValue on reset: 0"]
829#[derive(Clone, Copy, Debug, PartialEq)]
830#[repr(u8)]
831pub enum CFG2_A {
832    #[doc = "0: Constant HIGH. This bit slice always contributes to a product term match."]
833    CONSTANT_HIGH = 0,
834    #[doc = "1: Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
835    STICKY_RISING_EDGE = 1,
836    #[doc = "2: Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
837    STICKY_FALLING_EDGE = 2,
838    #[doc = "3: Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
839    STICKY_RISING_FALLING_EDGE = 3,
840    #[doc = "4: High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register."]
841    HIGH_LEVEL = 4,
842    #[doc = "5: Low level. Match occurs when there is a low level on the specified input."]
843    LOW_LEVEL = 5,
844    #[doc = "6: Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices)."]
845    CONSTANT_ZERO = 6,
846    #[doc = "7: Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit is cleared after one clock cycle."]
847    EVENT = 7,
848}
849impl From<CFG2_A> for u8 {
850    #[inline(always)]
851    fn from(variant: CFG2_A) -> Self {
852        variant as _
853    }
854}
855#[doc = "Reader of field `CFG2`"]
856pub type CFG2_R = crate::R<u8, CFG2_A>;
857impl CFG2_R {
858    #[doc = r"Get enumerated values variant"]
859    #[inline(always)]
860    pub fn variant(&self) -> CFG2_A {
861        match self.bits {
862            0 => CFG2_A::CONSTANT_HIGH,
863            1 => CFG2_A::STICKY_RISING_EDGE,
864            2 => CFG2_A::STICKY_FALLING_EDGE,
865            3 => CFG2_A::STICKY_RISING_FALLING_EDGE,
866            4 => CFG2_A::HIGH_LEVEL,
867            5 => CFG2_A::LOW_LEVEL,
868            6 => CFG2_A::CONSTANT_ZERO,
869            7 => CFG2_A::EVENT,
870            _ => unreachable!(),
871        }
872    }
873    #[doc = "Checks if the value of the field is `CONSTANT_HIGH`"]
874    #[inline(always)]
875    pub fn is_constant_high(&self) -> bool {
876        *self == CFG2_A::CONSTANT_HIGH
877    }
878    #[doc = "Checks if the value of the field is `STICKY_RISING_EDGE`"]
879    #[inline(always)]
880    pub fn is_sticky_rising_edge(&self) -> bool {
881        *self == CFG2_A::STICKY_RISING_EDGE
882    }
883    #[doc = "Checks if the value of the field is `STICKY_FALLING_EDGE`"]
884    #[inline(always)]
885    pub fn is_sticky_falling_edge(&self) -> bool {
886        *self == CFG2_A::STICKY_FALLING_EDGE
887    }
888    #[doc = "Checks if the value of the field is `STICKY_RISING_FALLING_EDGE`"]
889    #[inline(always)]
890    pub fn is_sticky_rising_falling_edge(&self) -> bool {
891        *self == CFG2_A::STICKY_RISING_FALLING_EDGE
892    }
893    #[doc = "Checks if the value of the field is `HIGH_LEVEL`"]
894    #[inline(always)]
895    pub fn is_high_level(&self) -> bool {
896        *self == CFG2_A::HIGH_LEVEL
897    }
898    #[doc = "Checks if the value of the field is `LOW_LEVEL`"]
899    #[inline(always)]
900    pub fn is_low_level(&self) -> bool {
901        *self == CFG2_A::LOW_LEVEL
902    }
903    #[doc = "Checks if the value of the field is `CONSTANT_ZERO`"]
904    #[inline(always)]
905    pub fn is_constant_zero(&self) -> bool {
906        *self == CFG2_A::CONSTANT_ZERO
907    }
908    #[doc = "Checks if the value of the field is `EVENT`"]
909    #[inline(always)]
910    pub fn is_event(&self) -> bool {
911        *self == CFG2_A::EVENT
912    }
913}
914#[doc = "Write proxy for field `CFG2`"]
915pub struct CFG2_W<'a> {
916    w: &'a mut W,
917}
918impl<'a> CFG2_W<'a> {
919    #[doc = r"Writes `variant` to the field"]
920    #[inline(always)]
921    pub fn variant(self, variant: CFG2_A) -> &'a mut W {
922        {
923            self.bits(variant.into())
924        }
925    }
926    #[doc = "Constant HIGH. This bit slice always contributes to a product term match."]
927    #[inline(always)]
928    pub fn constant_high(self) -> &'a mut W {
929        self.variant(CFG2_A::CONSTANT_HIGH)
930    }
931    #[doc = "Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
932    #[inline(always)]
933    pub fn sticky_rising_edge(self) -> &'a mut W {
934        self.variant(CFG2_A::STICKY_RISING_EDGE)
935    }
936    #[doc = "Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
937    #[inline(always)]
938    pub fn sticky_falling_edge(self) -> &'a mut W {
939        self.variant(CFG2_A::STICKY_FALLING_EDGE)
940    }
941    #[doc = "Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
942    #[inline(always)]
943    pub fn sticky_rising_falling_edge(self) -> &'a mut W {
944        self.variant(CFG2_A::STICKY_RISING_FALLING_EDGE)
945    }
946    #[doc = "High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register."]
947    #[inline(always)]
948    pub fn high_level(self) -> &'a mut W {
949        self.variant(CFG2_A::HIGH_LEVEL)
950    }
951    #[doc = "Low level. Match occurs when there is a low level on the specified input."]
952    #[inline(always)]
953    pub fn low_level(self) -> &'a mut W {
954        self.variant(CFG2_A::LOW_LEVEL)
955    }
956    #[doc = "Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices)."]
957    #[inline(always)]
958    pub fn constant_zero(self) -> &'a mut W {
959        self.variant(CFG2_A::CONSTANT_ZERO)
960    }
961    #[doc = "Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit is cleared after one clock cycle."]
962    #[inline(always)]
963    pub fn event(self) -> &'a mut W {
964        self.variant(CFG2_A::EVENT)
965    }
966    #[doc = r"Writes raw bits to the field"]
967    #[inline(always)]
968    pub fn bits(self, value: u8) -> &'a mut W {
969        self.w.bits = (self.w.bits & !(0x07 << 14)) | (((value as u32) & 0x07) << 14);
970        self.w
971    }
972}
973#[doc = "Specifies the match contribution condition for bit slice 3.\n\nValue on reset: 0"]
974#[derive(Clone, Copy, Debug, PartialEq)]
975#[repr(u8)]
976pub enum CFG3_A {
977    #[doc = "0: Constant HIGH. This bit slice always contributes to a product term match."]
978    CONSTANT_HIGH = 0,
979    #[doc = "1: Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
980    STICKY_RISING_EDGE = 1,
981    #[doc = "2: Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
982    STICKY_FALLING_EDGE = 2,
983    #[doc = "3: Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
984    STICKY_RISING_FALLING_EDGE = 3,
985    #[doc = "4: High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register."]
986    HIGH_LEVEL = 4,
987    #[doc = "5: Low level. Match occurs when there is a low level on the specified input."]
988    LOW_LEVEL = 5,
989    #[doc = "6: Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices)."]
990    CONSTANT_ZERO = 6,
991    #[doc = "7: Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit is cleared after one clock cycle."]
992    EVENT = 7,
993}
994impl From<CFG3_A> for u8 {
995    #[inline(always)]
996    fn from(variant: CFG3_A) -> Self {
997        variant as _
998    }
999}
1000#[doc = "Reader of field `CFG3`"]
1001pub type CFG3_R = crate::R<u8, CFG3_A>;
1002impl CFG3_R {
1003    #[doc = r"Get enumerated values variant"]
1004    #[inline(always)]
1005    pub fn variant(&self) -> CFG3_A {
1006        match self.bits {
1007            0 => CFG3_A::CONSTANT_HIGH,
1008            1 => CFG3_A::STICKY_RISING_EDGE,
1009            2 => CFG3_A::STICKY_FALLING_EDGE,
1010            3 => CFG3_A::STICKY_RISING_FALLING_EDGE,
1011            4 => CFG3_A::HIGH_LEVEL,
1012            5 => CFG3_A::LOW_LEVEL,
1013            6 => CFG3_A::CONSTANT_ZERO,
1014            7 => CFG3_A::EVENT,
1015            _ => unreachable!(),
1016        }
1017    }
1018    #[doc = "Checks if the value of the field is `CONSTANT_HIGH`"]
1019    #[inline(always)]
1020    pub fn is_constant_high(&self) -> bool {
1021        *self == CFG3_A::CONSTANT_HIGH
1022    }
1023    #[doc = "Checks if the value of the field is `STICKY_RISING_EDGE`"]
1024    #[inline(always)]
1025    pub fn is_sticky_rising_edge(&self) -> bool {
1026        *self == CFG3_A::STICKY_RISING_EDGE
1027    }
1028    #[doc = "Checks if the value of the field is `STICKY_FALLING_EDGE`"]
1029    #[inline(always)]
1030    pub fn is_sticky_falling_edge(&self) -> bool {
1031        *self == CFG3_A::STICKY_FALLING_EDGE
1032    }
1033    #[doc = "Checks if the value of the field is `STICKY_RISING_FALLING_EDGE`"]
1034    #[inline(always)]
1035    pub fn is_sticky_rising_falling_edge(&self) -> bool {
1036        *self == CFG3_A::STICKY_RISING_FALLING_EDGE
1037    }
1038    #[doc = "Checks if the value of the field is `HIGH_LEVEL`"]
1039    #[inline(always)]
1040    pub fn is_high_level(&self) -> bool {
1041        *self == CFG3_A::HIGH_LEVEL
1042    }
1043    #[doc = "Checks if the value of the field is `LOW_LEVEL`"]
1044    #[inline(always)]
1045    pub fn is_low_level(&self) -> bool {
1046        *self == CFG3_A::LOW_LEVEL
1047    }
1048    #[doc = "Checks if the value of the field is `CONSTANT_ZERO`"]
1049    #[inline(always)]
1050    pub fn is_constant_zero(&self) -> bool {
1051        *self == CFG3_A::CONSTANT_ZERO
1052    }
1053    #[doc = "Checks if the value of the field is `EVENT`"]
1054    #[inline(always)]
1055    pub fn is_event(&self) -> bool {
1056        *self == CFG3_A::EVENT
1057    }
1058}
1059#[doc = "Write proxy for field `CFG3`"]
1060pub struct CFG3_W<'a> {
1061    w: &'a mut W,
1062}
1063impl<'a> CFG3_W<'a> {
1064    #[doc = r"Writes `variant` to the field"]
1065    #[inline(always)]
1066    pub fn variant(self, variant: CFG3_A) -> &'a mut W {
1067        {
1068            self.bits(variant.into())
1069        }
1070    }
1071    #[doc = "Constant HIGH. This bit slice always contributes to a product term match."]
1072    #[inline(always)]
1073    pub fn constant_high(self) -> &'a mut W {
1074        self.variant(CFG3_A::CONSTANT_HIGH)
1075    }
1076    #[doc = "Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
1077    #[inline(always)]
1078    pub fn sticky_rising_edge(self) -> &'a mut W {
1079        self.variant(CFG3_A::STICKY_RISING_EDGE)
1080    }
1081    #[doc = "Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
1082    #[inline(always)]
1083    pub fn sticky_falling_edge(self) -> &'a mut W {
1084        self.variant(CFG3_A::STICKY_FALLING_EDGE)
1085    }
1086    #[doc = "Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
1087    #[inline(always)]
1088    pub fn sticky_rising_falling_edge(self) -> &'a mut W {
1089        self.variant(CFG3_A::STICKY_RISING_FALLING_EDGE)
1090    }
1091    #[doc = "High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register."]
1092    #[inline(always)]
1093    pub fn high_level(self) -> &'a mut W {
1094        self.variant(CFG3_A::HIGH_LEVEL)
1095    }
1096    #[doc = "Low level. Match occurs when there is a low level on the specified input."]
1097    #[inline(always)]
1098    pub fn low_level(self) -> &'a mut W {
1099        self.variant(CFG3_A::LOW_LEVEL)
1100    }
1101    #[doc = "Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices)."]
1102    #[inline(always)]
1103    pub fn constant_zero(self) -> &'a mut W {
1104        self.variant(CFG3_A::CONSTANT_ZERO)
1105    }
1106    #[doc = "Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit is cleared after one clock cycle."]
1107    #[inline(always)]
1108    pub fn event(self) -> &'a mut W {
1109        self.variant(CFG3_A::EVENT)
1110    }
1111    #[doc = r"Writes raw bits to the field"]
1112    #[inline(always)]
1113    pub fn bits(self, value: u8) -> &'a mut W {
1114        self.w.bits = (self.w.bits & !(0x07 << 17)) | (((value as u32) & 0x07) << 17);
1115        self.w
1116    }
1117}
1118#[doc = "Specifies the match contribution condition for bit slice 4.\n\nValue on reset: 0"]
1119#[derive(Clone, Copy, Debug, PartialEq)]
1120#[repr(u8)]
1121pub enum CFG4_A {
1122    #[doc = "0: Constant HIGH. This bit slice always contributes to a product term match."]
1123    CONSTANT_HIGH = 0,
1124    #[doc = "1: Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
1125    STICKY_RISING_EDGE = 1,
1126    #[doc = "2: Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
1127    STICKY_FALLING_EDGE = 2,
1128    #[doc = "3: Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
1129    STICKY_RISING_FALLING_EDGE = 3,
1130    #[doc = "4: High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register."]
1131    HIGH_LEVEL = 4,
1132    #[doc = "5: Low level. Match occurs when there is a low level on the specified input."]
1133    LOW_LEVEL = 5,
1134    #[doc = "6: Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices)."]
1135    CONSTANT_ZERO = 6,
1136    #[doc = "7: Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit is cleared after one clock cycle."]
1137    EVENT = 7,
1138}
1139impl From<CFG4_A> for u8 {
1140    #[inline(always)]
1141    fn from(variant: CFG4_A) -> Self {
1142        variant as _
1143    }
1144}
1145#[doc = "Reader of field `CFG4`"]
1146pub type CFG4_R = crate::R<u8, CFG4_A>;
1147impl CFG4_R {
1148    #[doc = r"Get enumerated values variant"]
1149    #[inline(always)]
1150    pub fn variant(&self) -> CFG4_A {
1151        match self.bits {
1152            0 => CFG4_A::CONSTANT_HIGH,
1153            1 => CFG4_A::STICKY_RISING_EDGE,
1154            2 => CFG4_A::STICKY_FALLING_EDGE,
1155            3 => CFG4_A::STICKY_RISING_FALLING_EDGE,
1156            4 => CFG4_A::HIGH_LEVEL,
1157            5 => CFG4_A::LOW_LEVEL,
1158            6 => CFG4_A::CONSTANT_ZERO,
1159            7 => CFG4_A::EVENT,
1160            _ => unreachable!(),
1161        }
1162    }
1163    #[doc = "Checks if the value of the field is `CONSTANT_HIGH`"]
1164    #[inline(always)]
1165    pub fn is_constant_high(&self) -> bool {
1166        *self == CFG4_A::CONSTANT_HIGH
1167    }
1168    #[doc = "Checks if the value of the field is `STICKY_RISING_EDGE`"]
1169    #[inline(always)]
1170    pub fn is_sticky_rising_edge(&self) -> bool {
1171        *self == CFG4_A::STICKY_RISING_EDGE
1172    }
1173    #[doc = "Checks if the value of the field is `STICKY_FALLING_EDGE`"]
1174    #[inline(always)]
1175    pub fn is_sticky_falling_edge(&self) -> bool {
1176        *self == CFG4_A::STICKY_FALLING_EDGE
1177    }
1178    #[doc = "Checks if the value of the field is `STICKY_RISING_FALLING_EDGE`"]
1179    #[inline(always)]
1180    pub fn is_sticky_rising_falling_edge(&self) -> bool {
1181        *self == CFG4_A::STICKY_RISING_FALLING_EDGE
1182    }
1183    #[doc = "Checks if the value of the field is `HIGH_LEVEL`"]
1184    #[inline(always)]
1185    pub fn is_high_level(&self) -> bool {
1186        *self == CFG4_A::HIGH_LEVEL
1187    }
1188    #[doc = "Checks if the value of the field is `LOW_LEVEL`"]
1189    #[inline(always)]
1190    pub fn is_low_level(&self) -> bool {
1191        *self == CFG4_A::LOW_LEVEL
1192    }
1193    #[doc = "Checks if the value of the field is `CONSTANT_ZERO`"]
1194    #[inline(always)]
1195    pub fn is_constant_zero(&self) -> bool {
1196        *self == CFG4_A::CONSTANT_ZERO
1197    }
1198    #[doc = "Checks if the value of the field is `EVENT`"]
1199    #[inline(always)]
1200    pub fn is_event(&self) -> bool {
1201        *self == CFG4_A::EVENT
1202    }
1203}
1204#[doc = "Write proxy for field `CFG4`"]
1205pub struct CFG4_W<'a> {
1206    w: &'a mut W,
1207}
1208impl<'a> CFG4_W<'a> {
1209    #[doc = r"Writes `variant` to the field"]
1210    #[inline(always)]
1211    pub fn variant(self, variant: CFG4_A) -> &'a mut W {
1212        {
1213            self.bits(variant.into())
1214        }
1215    }
1216    #[doc = "Constant HIGH. This bit slice always contributes to a product term match."]
1217    #[inline(always)]
1218    pub fn constant_high(self) -> &'a mut W {
1219        self.variant(CFG4_A::CONSTANT_HIGH)
1220    }
1221    #[doc = "Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
1222    #[inline(always)]
1223    pub fn sticky_rising_edge(self) -> &'a mut W {
1224        self.variant(CFG4_A::STICKY_RISING_EDGE)
1225    }
1226    #[doc = "Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
1227    #[inline(always)]
1228    pub fn sticky_falling_edge(self) -> &'a mut W {
1229        self.variant(CFG4_A::STICKY_FALLING_EDGE)
1230    }
1231    #[doc = "Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
1232    #[inline(always)]
1233    pub fn sticky_rising_falling_edge(self) -> &'a mut W {
1234        self.variant(CFG4_A::STICKY_RISING_FALLING_EDGE)
1235    }
1236    #[doc = "High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register."]
1237    #[inline(always)]
1238    pub fn high_level(self) -> &'a mut W {
1239        self.variant(CFG4_A::HIGH_LEVEL)
1240    }
1241    #[doc = "Low level. Match occurs when there is a low level on the specified input."]
1242    #[inline(always)]
1243    pub fn low_level(self) -> &'a mut W {
1244        self.variant(CFG4_A::LOW_LEVEL)
1245    }
1246    #[doc = "Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices)."]
1247    #[inline(always)]
1248    pub fn constant_zero(self) -> &'a mut W {
1249        self.variant(CFG4_A::CONSTANT_ZERO)
1250    }
1251    #[doc = "Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit is cleared after one clock cycle."]
1252    #[inline(always)]
1253    pub fn event(self) -> &'a mut W {
1254        self.variant(CFG4_A::EVENT)
1255    }
1256    #[doc = r"Writes raw bits to the field"]
1257    #[inline(always)]
1258    pub fn bits(self, value: u8) -> &'a mut W {
1259        self.w.bits = (self.w.bits & !(0x07 << 20)) | (((value as u32) & 0x07) << 20);
1260        self.w
1261    }
1262}
1263#[doc = "Specifies the match contribution condition for bit slice 5.\n\nValue on reset: 0"]
1264#[derive(Clone, Copy, Debug, PartialEq)]
1265#[repr(u8)]
1266pub enum CFG5_A {
1267    #[doc = "0: Constant HIGH. This bit slice always contributes to a product term match."]
1268    CONSTANT_HIGH = 0,
1269    #[doc = "1: Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
1270    STICKY_RISING_EDGE = 1,
1271    #[doc = "2: Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
1272    STICKY_FALLING_EDGE = 2,
1273    #[doc = "3: Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
1274    STICKY_RISING_FALLING_EDGE = 3,
1275    #[doc = "4: High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register."]
1276    HIGH_LEVEL = 4,
1277    #[doc = "5: Low level. Match occurs when there is a low level on the specified input."]
1278    LOW_LEVEL = 5,
1279    #[doc = "6: Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices)."]
1280    CONSTANT_ZERO = 6,
1281    #[doc = "7: Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit is cleared after one clock cycle."]
1282    EVENT = 7,
1283}
1284impl From<CFG5_A> for u8 {
1285    #[inline(always)]
1286    fn from(variant: CFG5_A) -> Self {
1287        variant as _
1288    }
1289}
1290#[doc = "Reader of field `CFG5`"]
1291pub type CFG5_R = crate::R<u8, CFG5_A>;
1292impl CFG5_R {
1293    #[doc = r"Get enumerated values variant"]
1294    #[inline(always)]
1295    pub fn variant(&self) -> CFG5_A {
1296        match self.bits {
1297            0 => CFG5_A::CONSTANT_HIGH,
1298            1 => CFG5_A::STICKY_RISING_EDGE,
1299            2 => CFG5_A::STICKY_FALLING_EDGE,
1300            3 => CFG5_A::STICKY_RISING_FALLING_EDGE,
1301            4 => CFG5_A::HIGH_LEVEL,
1302            5 => CFG5_A::LOW_LEVEL,
1303            6 => CFG5_A::CONSTANT_ZERO,
1304            7 => CFG5_A::EVENT,
1305            _ => unreachable!(),
1306        }
1307    }
1308    #[doc = "Checks if the value of the field is `CONSTANT_HIGH`"]
1309    #[inline(always)]
1310    pub fn is_constant_high(&self) -> bool {
1311        *self == CFG5_A::CONSTANT_HIGH
1312    }
1313    #[doc = "Checks if the value of the field is `STICKY_RISING_EDGE`"]
1314    #[inline(always)]
1315    pub fn is_sticky_rising_edge(&self) -> bool {
1316        *self == CFG5_A::STICKY_RISING_EDGE
1317    }
1318    #[doc = "Checks if the value of the field is `STICKY_FALLING_EDGE`"]
1319    #[inline(always)]
1320    pub fn is_sticky_falling_edge(&self) -> bool {
1321        *self == CFG5_A::STICKY_FALLING_EDGE
1322    }
1323    #[doc = "Checks if the value of the field is `STICKY_RISING_FALLING_EDGE`"]
1324    #[inline(always)]
1325    pub fn is_sticky_rising_falling_edge(&self) -> bool {
1326        *self == CFG5_A::STICKY_RISING_FALLING_EDGE
1327    }
1328    #[doc = "Checks if the value of the field is `HIGH_LEVEL`"]
1329    #[inline(always)]
1330    pub fn is_high_level(&self) -> bool {
1331        *self == CFG5_A::HIGH_LEVEL
1332    }
1333    #[doc = "Checks if the value of the field is `LOW_LEVEL`"]
1334    #[inline(always)]
1335    pub fn is_low_level(&self) -> bool {
1336        *self == CFG5_A::LOW_LEVEL
1337    }
1338    #[doc = "Checks if the value of the field is `CONSTANT_ZERO`"]
1339    #[inline(always)]
1340    pub fn is_constant_zero(&self) -> bool {
1341        *self == CFG5_A::CONSTANT_ZERO
1342    }
1343    #[doc = "Checks if the value of the field is `EVENT`"]
1344    #[inline(always)]
1345    pub fn is_event(&self) -> bool {
1346        *self == CFG5_A::EVENT
1347    }
1348}
1349#[doc = "Write proxy for field `CFG5`"]
1350pub struct CFG5_W<'a> {
1351    w: &'a mut W,
1352}
1353impl<'a> CFG5_W<'a> {
1354    #[doc = r"Writes `variant` to the field"]
1355    #[inline(always)]
1356    pub fn variant(self, variant: CFG5_A) -> &'a mut W {
1357        {
1358            self.bits(variant.into())
1359        }
1360    }
1361    #[doc = "Constant HIGH. This bit slice always contributes to a product term match."]
1362    #[inline(always)]
1363    pub fn constant_high(self) -> &'a mut W {
1364        self.variant(CFG5_A::CONSTANT_HIGH)
1365    }
1366    #[doc = "Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
1367    #[inline(always)]
1368    pub fn sticky_rising_edge(self) -> &'a mut W {
1369        self.variant(CFG5_A::STICKY_RISING_EDGE)
1370    }
1371    #[doc = "Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
1372    #[inline(always)]
1373    pub fn sticky_falling_edge(self) -> &'a mut W {
1374        self.variant(CFG5_A::STICKY_FALLING_EDGE)
1375    }
1376    #[doc = "Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
1377    #[inline(always)]
1378    pub fn sticky_rising_falling_edge(self) -> &'a mut W {
1379        self.variant(CFG5_A::STICKY_RISING_FALLING_EDGE)
1380    }
1381    #[doc = "High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register."]
1382    #[inline(always)]
1383    pub fn high_level(self) -> &'a mut W {
1384        self.variant(CFG5_A::HIGH_LEVEL)
1385    }
1386    #[doc = "Low level. Match occurs when there is a low level on the specified input."]
1387    #[inline(always)]
1388    pub fn low_level(self) -> &'a mut W {
1389        self.variant(CFG5_A::LOW_LEVEL)
1390    }
1391    #[doc = "Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices)."]
1392    #[inline(always)]
1393    pub fn constant_zero(self) -> &'a mut W {
1394        self.variant(CFG5_A::CONSTANT_ZERO)
1395    }
1396    #[doc = "Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit is cleared after one clock cycle."]
1397    #[inline(always)]
1398    pub fn event(self) -> &'a mut W {
1399        self.variant(CFG5_A::EVENT)
1400    }
1401    #[doc = r"Writes raw bits to the field"]
1402    #[inline(always)]
1403    pub fn bits(self, value: u8) -> &'a mut W {
1404        self.w.bits = (self.w.bits & !(0x07 << 23)) | (((value as u32) & 0x07) << 23);
1405        self.w
1406    }
1407}
1408#[doc = "Specifies the match contribution condition for bit slice 6.\n\nValue on reset: 0"]
1409#[derive(Clone, Copy, Debug, PartialEq)]
1410#[repr(u8)]
1411pub enum CFG6_A {
1412    #[doc = "0: Constant HIGH. This bit slice always contributes to a product term match."]
1413    CONSTANT_HIGH = 0,
1414    #[doc = "1: Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
1415    STICKY_RISING_EDGE = 1,
1416    #[doc = "2: Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
1417    STICKY_FALLING_EDGE = 2,
1418    #[doc = "3: Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
1419    STICKY_RISING_FALLING_EDGE = 3,
1420    #[doc = "4: High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register."]
1421    HIGH_LEVEL = 4,
1422    #[doc = "5: Low level. Match occurs when there is a low level on the specified input."]
1423    LOW_LEVEL = 5,
1424    #[doc = "6: Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices)."]
1425    CONSTANT_ZERO = 6,
1426    #[doc = "7: Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit is cleared after one clock cycle."]
1427    EVENT = 7,
1428}
1429impl From<CFG6_A> for u8 {
1430    #[inline(always)]
1431    fn from(variant: CFG6_A) -> Self {
1432        variant as _
1433    }
1434}
1435#[doc = "Reader of field `CFG6`"]
1436pub type CFG6_R = crate::R<u8, CFG6_A>;
1437impl CFG6_R {
1438    #[doc = r"Get enumerated values variant"]
1439    #[inline(always)]
1440    pub fn variant(&self) -> CFG6_A {
1441        match self.bits {
1442            0 => CFG6_A::CONSTANT_HIGH,
1443            1 => CFG6_A::STICKY_RISING_EDGE,
1444            2 => CFG6_A::STICKY_FALLING_EDGE,
1445            3 => CFG6_A::STICKY_RISING_FALLING_EDGE,
1446            4 => CFG6_A::HIGH_LEVEL,
1447            5 => CFG6_A::LOW_LEVEL,
1448            6 => CFG6_A::CONSTANT_ZERO,
1449            7 => CFG6_A::EVENT,
1450            _ => unreachable!(),
1451        }
1452    }
1453    #[doc = "Checks if the value of the field is `CONSTANT_HIGH`"]
1454    #[inline(always)]
1455    pub fn is_constant_high(&self) -> bool {
1456        *self == CFG6_A::CONSTANT_HIGH
1457    }
1458    #[doc = "Checks if the value of the field is `STICKY_RISING_EDGE`"]
1459    #[inline(always)]
1460    pub fn is_sticky_rising_edge(&self) -> bool {
1461        *self == CFG6_A::STICKY_RISING_EDGE
1462    }
1463    #[doc = "Checks if the value of the field is `STICKY_FALLING_EDGE`"]
1464    #[inline(always)]
1465    pub fn is_sticky_falling_edge(&self) -> bool {
1466        *self == CFG6_A::STICKY_FALLING_EDGE
1467    }
1468    #[doc = "Checks if the value of the field is `STICKY_RISING_FALLING_EDGE`"]
1469    #[inline(always)]
1470    pub fn is_sticky_rising_falling_edge(&self) -> bool {
1471        *self == CFG6_A::STICKY_RISING_FALLING_EDGE
1472    }
1473    #[doc = "Checks if the value of the field is `HIGH_LEVEL`"]
1474    #[inline(always)]
1475    pub fn is_high_level(&self) -> bool {
1476        *self == CFG6_A::HIGH_LEVEL
1477    }
1478    #[doc = "Checks if the value of the field is `LOW_LEVEL`"]
1479    #[inline(always)]
1480    pub fn is_low_level(&self) -> bool {
1481        *self == CFG6_A::LOW_LEVEL
1482    }
1483    #[doc = "Checks if the value of the field is `CONSTANT_ZERO`"]
1484    #[inline(always)]
1485    pub fn is_constant_zero(&self) -> bool {
1486        *self == CFG6_A::CONSTANT_ZERO
1487    }
1488    #[doc = "Checks if the value of the field is `EVENT`"]
1489    #[inline(always)]
1490    pub fn is_event(&self) -> bool {
1491        *self == CFG6_A::EVENT
1492    }
1493}
1494#[doc = "Write proxy for field `CFG6`"]
1495pub struct CFG6_W<'a> {
1496    w: &'a mut W,
1497}
1498impl<'a> CFG6_W<'a> {
1499    #[doc = r"Writes `variant` to the field"]
1500    #[inline(always)]
1501    pub fn variant(self, variant: CFG6_A) -> &'a mut W {
1502        {
1503            self.bits(variant.into())
1504        }
1505    }
1506    #[doc = "Constant HIGH. This bit slice always contributes to a product term match."]
1507    #[inline(always)]
1508    pub fn constant_high(self) -> &'a mut W {
1509        self.variant(CFG6_A::CONSTANT_HIGH)
1510    }
1511    #[doc = "Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
1512    #[inline(always)]
1513    pub fn sticky_rising_edge(self) -> &'a mut W {
1514        self.variant(CFG6_A::STICKY_RISING_EDGE)
1515    }
1516    #[doc = "Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
1517    #[inline(always)]
1518    pub fn sticky_falling_edge(self) -> &'a mut W {
1519        self.variant(CFG6_A::STICKY_FALLING_EDGE)
1520    }
1521    #[doc = "Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
1522    #[inline(always)]
1523    pub fn sticky_rising_falling_edge(self) -> &'a mut W {
1524        self.variant(CFG6_A::STICKY_RISING_FALLING_EDGE)
1525    }
1526    #[doc = "High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register."]
1527    #[inline(always)]
1528    pub fn high_level(self) -> &'a mut W {
1529        self.variant(CFG6_A::HIGH_LEVEL)
1530    }
1531    #[doc = "Low level. Match occurs when there is a low level on the specified input."]
1532    #[inline(always)]
1533    pub fn low_level(self) -> &'a mut W {
1534        self.variant(CFG6_A::LOW_LEVEL)
1535    }
1536    #[doc = "Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices)."]
1537    #[inline(always)]
1538    pub fn constant_zero(self) -> &'a mut W {
1539        self.variant(CFG6_A::CONSTANT_ZERO)
1540    }
1541    #[doc = "Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit is cleared after one clock cycle."]
1542    #[inline(always)]
1543    pub fn event(self) -> &'a mut W {
1544        self.variant(CFG6_A::EVENT)
1545    }
1546    #[doc = r"Writes raw bits to the field"]
1547    #[inline(always)]
1548    pub fn bits(self, value: u8) -> &'a mut W {
1549        self.w.bits = (self.w.bits & !(0x07 << 26)) | (((value as u32) & 0x07) << 26);
1550        self.w
1551    }
1552}
1553#[doc = "Specifies the match contribution condition for bit slice 7.\n\nValue on reset: 0"]
1554#[derive(Clone, Copy, Debug, PartialEq)]
1555#[repr(u8)]
1556pub enum CFG7_A {
1557    #[doc = "0: Constant HIGH. This bit slice always contributes to a product term match."]
1558    CONSTANT_HIGH = 0,
1559    #[doc = "1: Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
1560    STICKY_RISING_EDGE = 1,
1561    #[doc = "2: Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
1562    STICKY_FALLING_EDGE = 2,
1563    #[doc = "3: Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
1564    STICKY_RISING_FALLING_EDGE = 3,
1565    #[doc = "4: High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register."]
1566    HIGH_LEVEL = 4,
1567    #[doc = "5: Low level. Match occurs when there is a low level on the specified input."]
1568    LOW_LEVEL = 5,
1569    #[doc = "6: Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices)."]
1570    CONSTANT_ZERO = 6,
1571    #[doc = "7: Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit is cleared after one clock cycle."]
1572    EVENT = 7,
1573}
1574impl From<CFG7_A> for u8 {
1575    #[inline(always)]
1576    fn from(variant: CFG7_A) -> Self {
1577        variant as _
1578    }
1579}
1580#[doc = "Reader of field `CFG7`"]
1581pub type CFG7_R = crate::R<u8, CFG7_A>;
1582impl CFG7_R {
1583    #[doc = r"Get enumerated values variant"]
1584    #[inline(always)]
1585    pub fn variant(&self) -> CFG7_A {
1586        match self.bits {
1587            0 => CFG7_A::CONSTANT_HIGH,
1588            1 => CFG7_A::STICKY_RISING_EDGE,
1589            2 => CFG7_A::STICKY_FALLING_EDGE,
1590            3 => CFG7_A::STICKY_RISING_FALLING_EDGE,
1591            4 => CFG7_A::HIGH_LEVEL,
1592            5 => CFG7_A::LOW_LEVEL,
1593            6 => CFG7_A::CONSTANT_ZERO,
1594            7 => CFG7_A::EVENT,
1595            _ => unreachable!(),
1596        }
1597    }
1598    #[doc = "Checks if the value of the field is `CONSTANT_HIGH`"]
1599    #[inline(always)]
1600    pub fn is_constant_high(&self) -> bool {
1601        *self == CFG7_A::CONSTANT_HIGH
1602    }
1603    #[doc = "Checks if the value of the field is `STICKY_RISING_EDGE`"]
1604    #[inline(always)]
1605    pub fn is_sticky_rising_edge(&self) -> bool {
1606        *self == CFG7_A::STICKY_RISING_EDGE
1607    }
1608    #[doc = "Checks if the value of the field is `STICKY_FALLING_EDGE`"]
1609    #[inline(always)]
1610    pub fn is_sticky_falling_edge(&self) -> bool {
1611        *self == CFG7_A::STICKY_FALLING_EDGE
1612    }
1613    #[doc = "Checks if the value of the field is `STICKY_RISING_FALLING_EDGE`"]
1614    #[inline(always)]
1615    pub fn is_sticky_rising_falling_edge(&self) -> bool {
1616        *self == CFG7_A::STICKY_RISING_FALLING_EDGE
1617    }
1618    #[doc = "Checks if the value of the field is `HIGH_LEVEL`"]
1619    #[inline(always)]
1620    pub fn is_high_level(&self) -> bool {
1621        *self == CFG7_A::HIGH_LEVEL
1622    }
1623    #[doc = "Checks if the value of the field is `LOW_LEVEL`"]
1624    #[inline(always)]
1625    pub fn is_low_level(&self) -> bool {
1626        *self == CFG7_A::LOW_LEVEL
1627    }
1628    #[doc = "Checks if the value of the field is `CONSTANT_ZERO`"]
1629    #[inline(always)]
1630    pub fn is_constant_zero(&self) -> bool {
1631        *self == CFG7_A::CONSTANT_ZERO
1632    }
1633    #[doc = "Checks if the value of the field is `EVENT`"]
1634    #[inline(always)]
1635    pub fn is_event(&self) -> bool {
1636        *self == CFG7_A::EVENT
1637    }
1638}
1639#[doc = "Write proxy for field `CFG7`"]
1640pub struct CFG7_W<'a> {
1641    w: &'a mut W,
1642}
1643impl<'a> CFG7_W<'a> {
1644    #[doc = r"Writes `variant` to the field"]
1645    #[inline(always)]
1646    pub fn variant(self, variant: CFG7_A) -> &'a mut W {
1647        {
1648            self.bits(variant.into())
1649        }
1650    }
1651    #[doc = "Constant HIGH. This bit slice always contributes to a product term match."]
1652    #[inline(always)]
1653    pub fn constant_high(self) -> &'a mut W {
1654        self.variant(CFG7_A::CONSTANT_HIGH)
1655    }
1656    #[doc = "Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
1657    #[inline(always)]
1658    pub fn sticky_rising_edge(self) -> &'a mut W {
1659        self.variant(CFG7_A::STICKY_RISING_EDGE)
1660    }
1661    #[doc = "Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
1662    #[inline(always)]
1663    pub fn sticky_falling_edge(self) -> &'a mut W {
1664        self.variant(CFG7_A::STICKY_FALLING_EDGE)
1665    }
1666    #[doc = "Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input has occurred since the last time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the PMSRC registers are written to."]
1667    #[inline(always)]
1668    pub fn sticky_rising_falling_edge(self) -> &'a mut W {
1669        self.variant(CFG7_A::STICKY_RISING_FALLING_EDGE)
1670    }
1671    #[doc = "High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register."]
1672    #[inline(always)]
1673    pub fn high_level(self) -> &'a mut W {
1674        self.variant(CFG7_A::HIGH_LEVEL)
1675    }
1676    #[doc = "Low level. Match occurs when there is a low level on the specified input."]
1677    #[inline(always)]
1678    pub fn low_level(self) -> &'a mut W {
1679        self.variant(CFG7_A::LOW_LEVEL)
1680    }
1681    #[doc = "Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices)."]
1682    #[inline(always)]
1683    pub fn constant_zero(self) -> &'a mut W {
1684        self.variant(CFG7_A::CONSTANT_ZERO)
1685    }
1686    #[doc = "Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit is cleared after one clock cycle."]
1687    #[inline(always)]
1688    pub fn event(self) -> &'a mut W {
1689        self.variant(CFG7_A::EVENT)
1690    }
1691    #[doc = r"Writes raw bits to the field"]
1692    #[inline(always)]
1693    pub fn bits(self, value: u8) -> &'a mut W {
1694        self.w.bits = (self.w.bits & !(0x07 << 29)) | (((value as u32) & 0x07) << 29);
1695        self.w
1696    }
1697}
1698impl R {
1699    #[doc = "Bit 0 - Determines whether slice 0 is an endpoint."]
1700    #[inline(always)]
1701    pub fn prod_endpts0(&self) -> PROD_ENDPTS0_R {
1702        PROD_ENDPTS0_R::new((self.bits & 0x01) != 0)
1703    }
1704    #[doc = "Bit 1 - Determines whether slice 1 is an endpoint."]
1705    #[inline(always)]
1706    pub fn prod_endpts1(&self) -> PROD_ENDPTS1_R {
1707        PROD_ENDPTS1_R::new(((self.bits >> 1) & 0x01) != 0)
1708    }
1709    #[doc = "Bit 2 - Determines whether slice 2 is an endpoint."]
1710    #[inline(always)]
1711    pub fn prod_endpts2(&self) -> PROD_ENDPTS2_R {
1712        PROD_ENDPTS2_R::new(((self.bits >> 2) & 0x01) != 0)
1713    }
1714    #[doc = "Bit 3 - Determines whether slice 3 is an endpoint."]
1715    #[inline(always)]
1716    pub fn prod_endpts3(&self) -> PROD_ENDPTS3_R {
1717        PROD_ENDPTS3_R::new(((self.bits >> 3) & 0x01) != 0)
1718    }
1719    #[doc = "Bit 4 - Determines whether slice 4 is an endpoint."]
1720    #[inline(always)]
1721    pub fn prod_endpts4(&self) -> PROD_ENDPTS4_R {
1722        PROD_ENDPTS4_R::new(((self.bits >> 4) & 0x01) != 0)
1723    }
1724    #[doc = "Bit 5 - Determines whether slice 5 is an endpoint."]
1725    #[inline(always)]
1726    pub fn prod_endpts5(&self) -> PROD_ENDPTS5_R {
1727        PROD_ENDPTS5_R::new(((self.bits >> 5) & 0x01) != 0)
1728    }
1729    #[doc = "Bit 6 - Determines whether slice 6 is an endpoint."]
1730    #[inline(always)]
1731    pub fn prod_endpts6(&self) -> PROD_ENDPTS6_R {
1732        PROD_ENDPTS6_R::new(((self.bits >> 6) & 0x01) != 0)
1733    }
1734    #[doc = "Bits 8:10 - Specifies the match contribution condition for bit slice 0."]
1735    #[inline(always)]
1736    pub fn cfg0(&self) -> CFG0_R {
1737        CFG0_R::new(((self.bits >> 8) & 0x07) as u8)
1738    }
1739    #[doc = "Bits 11:13 - Specifies the match contribution condition for bit slice 1."]
1740    #[inline(always)]
1741    pub fn cfg1(&self) -> CFG1_R {
1742        CFG1_R::new(((self.bits >> 11) & 0x07) as u8)
1743    }
1744    #[doc = "Bits 14:16 - Specifies the match contribution condition for bit slice 2."]
1745    #[inline(always)]
1746    pub fn cfg2(&self) -> CFG2_R {
1747        CFG2_R::new(((self.bits >> 14) & 0x07) as u8)
1748    }
1749    #[doc = "Bits 17:19 - Specifies the match contribution condition for bit slice 3."]
1750    #[inline(always)]
1751    pub fn cfg3(&self) -> CFG3_R {
1752        CFG3_R::new(((self.bits >> 17) & 0x07) as u8)
1753    }
1754    #[doc = "Bits 20:22 - Specifies the match contribution condition for bit slice 4."]
1755    #[inline(always)]
1756    pub fn cfg4(&self) -> CFG4_R {
1757        CFG4_R::new(((self.bits >> 20) & 0x07) as u8)
1758    }
1759    #[doc = "Bits 23:25 - Specifies the match contribution condition for bit slice 5."]
1760    #[inline(always)]
1761    pub fn cfg5(&self) -> CFG5_R {
1762        CFG5_R::new(((self.bits >> 23) & 0x07) as u8)
1763    }
1764    #[doc = "Bits 26:28 - Specifies the match contribution condition for bit slice 6."]
1765    #[inline(always)]
1766    pub fn cfg6(&self) -> CFG6_R {
1767        CFG6_R::new(((self.bits >> 26) & 0x07) as u8)
1768    }
1769    #[doc = "Bits 29:31 - Specifies the match contribution condition for bit slice 7."]
1770    #[inline(always)]
1771    pub fn cfg7(&self) -> CFG7_R {
1772        CFG7_R::new(((self.bits >> 29) & 0x07) as u8)
1773    }
1774}
1775impl W {
1776    #[doc = "Bit 0 - Determines whether slice 0 is an endpoint."]
1777    #[inline(always)]
1778    pub fn prod_endpts0(&mut self) -> PROD_ENDPTS0_W {
1779        PROD_ENDPTS0_W { w: self }
1780    }
1781    #[doc = "Bit 1 - Determines whether slice 1 is an endpoint."]
1782    #[inline(always)]
1783    pub fn prod_endpts1(&mut self) -> PROD_ENDPTS1_W {
1784        PROD_ENDPTS1_W { w: self }
1785    }
1786    #[doc = "Bit 2 - Determines whether slice 2 is an endpoint."]
1787    #[inline(always)]
1788    pub fn prod_endpts2(&mut self) -> PROD_ENDPTS2_W {
1789        PROD_ENDPTS2_W { w: self }
1790    }
1791    #[doc = "Bit 3 - Determines whether slice 3 is an endpoint."]
1792    #[inline(always)]
1793    pub fn prod_endpts3(&mut self) -> PROD_ENDPTS3_W {
1794        PROD_ENDPTS3_W { w: self }
1795    }
1796    #[doc = "Bit 4 - Determines whether slice 4 is an endpoint."]
1797    #[inline(always)]
1798    pub fn prod_endpts4(&mut self) -> PROD_ENDPTS4_W {
1799        PROD_ENDPTS4_W { w: self }
1800    }
1801    #[doc = "Bit 5 - Determines whether slice 5 is an endpoint."]
1802    #[inline(always)]
1803    pub fn prod_endpts5(&mut self) -> PROD_ENDPTS5_W {
1804        PROD_ENDPTS5_W { w: self }
1805    }
1806    #[doc = "Bit 6 - Determines whether slice 6 is an endpoint."]
1807    #[inline(always)]
1808    pub fn prod_endpts6(&mut self) -> PROD_ENDPTS6_W {
1809        PROD_ENDPTS6_W { w: self }
1810    }
1811    #[doc = "Bits 8:10 - Specifies the match contribution condition for bit slice 0."]
1812    #[inline(always)]
1813    pub fn cfg0(&mut self) -> CFG0_W {
1814        CFG0_W { w: self }
1815    }
1816    #[doc = "Bits 11:13 - Specifies the match contribution condition for bit slice 1."]
1817    #[inline(always)]
1818    pub fn cfg1(&mut self) -> CFG1_W {
1819        CFG1_W { w: self }
1820    }
1821    #[doc = "Bits 14:16 - Specifies the match contribution condition for bit slice 2."]
1822    #[inline(always)]
1823    pub fn cfg2(&mut self) -> CFG2_W {
1824        CFG2_W { w: self }
1825    }
1826    #[doc = "Bits 17:19 - Specifies the match contribution condition for bit slice 3."]
1827    #[inline(always)]
1828    pub fn cfg3(&mut self) -> CFG3_W {
1829        CFG3_W { w: self }
1830    }
1831    #[doc = "Bits 20:22 - Specifies the match contribution condition for bit slice 4."]
1832    #[inline(always)]
1833    pub fn cfg4(&mut self) -> CFG4_W {
1834        CFG4_W { w: self }
1835    }
1836    #[doc = "Bits 23:25 - Specifies the match contribution condition for bit slice 5."]
1837    #[inline(always)]
1838    pub fn cfg5(&mut self) -> CFG5_W {
1839        CFG5_W { w: self }
1840    }
1841    #[doc = "Bits 26:28 - Specifies the match contribution condition for bit slice 6."]
1842    #[inline(always)]
1843    pub fn cfg6(&mut self) -> CFG6_W {
1844        CFG6_W { w: self }
1845    }
1846    #[doc = "Bits 29:31 - Specifies the match contribution condition for bit slice 7."]
1847    #[inline(always)]
1848    pub fn cfg7(&mut self) -> CFG7_W {
1849        CFG7_W { w: self }
1850    }
1851}