mimxrt685s_pac/pint/
pmcfg.rs

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