ra4m2/icu/
wupen0.rs

1#[doc = "Register `WUPEN0` reader"]
2pub struct R(crate::R<WUPEN0_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<WUPEN0_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<WUPEN0_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<WUPEN0_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `WUPEN0` writer"]
17pub struct W(crate::W<WUPEN0_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<WUPEN0_SPEC>;
20    #[inline(always)]
21    fn deref(&self) -> &Self::Target {
22        &self.0
23    }
24}
25impl core::ops::DerefMut for W {
26    #[inline(always)]
27    fn deref_mut(&mut self) -> &mut Self::Target {
28        &mut self.0
29    }
30}
31impl From<crate::W<WUPEN0_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<WUPEN0_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `IRQWUPEN` reader - IRQn Interrupt Software Standby/Snooze Mode Returns Enable bit"]
38pub type IRQWUPEN_R = crate::FieldReader<u16, IRQWUPEN_A>;
39#[doc = "IRQn Interrupt Software Standby/Snooze Mode Returns Enable bit\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41#[repr(u16)]
42pub enum IRQWUPEN_A {
43    #[doc = "0: Software Standby/Snooze Mode returns by IRQn interrupt is disabled"]
44    _0 = 0,
45    #[doc = "1: Software Standby/Snooze Mode returns by IRQn interrupt is enabled"]
46    _1 = 1,
47}
48impl From<IRQWUPEN_A> for u16 {
49    #[inline(always)]
50    fn from(variant: IRQWUPEN_A) -> Self {
51        variant as _
52    }
53}
54impl IRQWUPEN_R {
55    #[doc = "Get enumerated values variant"]
56    #[inline(always)]
57    pub fn variant(&self) -> Option<IRQWUPEN_A> {
58        match self.bits {
59            0 => Some(IRQWUPEN_A::_0),
60            1 => Some(IRQWUPEN_A::_1),
61            _ => None,
62        }
63    }
64    #[doc = "Checks if the value of the field is `_0`"]
65    #[inline(always)]
66    pub fn is_0(&self) -> bool {
67        *self == IRQWUPEN_A::_0
68    }
69    #[doc = "Checks if the value of the field is `_1`"]
70    #[inline(always)]
71    pub fn is_1(&self) -> bool {
72        *self == IRQWUPEN_A::_1
73    }
74}
75#[doc = "Field `IRQWUPEN` writer - IRQn Interrupt Software Standby/Snooze Mode Returns Enable bit"]
76pub type IRQWUPEN_W<'a, const O: u8> =
77    crate::FieldWriter<'a, u32, WUPEN0_SPEC, u16, IRQWUPEN_A, 16, O>;
78impl<'a, const O: u8> IRQWUPEN_W<'a, O> {
79    #[doc = "Software Standby/Snooze Mode returns by IRQn interrupt is disabled"]
80    #[inline(always)]
81    pub fn _0(self) -> &'a mut W {
82        self.variant(IRQWUPEN_A::_0)
83    }
84    #[doc = "Software Standby/Snooze Mode returns by IRQn interrupt is enabled"]
85    #[inline(always)]
86    pub fn _1(self) -> &'a mut W {
87        self.variant(IRQWUPEN_A::_1)
88    }
89}
90#[doc = "Field `IWDTWUPEN` reader - IWDT Interrupt Software Standby/Snooze Mode Returns Enable bit"]
91pub type IWDTWUPEN_R = crate::BitReader<IWDTWUPEN_A>;
92#[doc = "IWDT Interrupt Software Standby/Snooze Mode Returns Enable bit\n\nValue on reset: 0"]
93#[derive(Clone, Copy, Debug, PartialEq, Eq)]
94pub enum IWDTWUPEN_A {
95    #[doc = "0: Software Standby/Snooze Mode returns by IWDT interrupt is disabled"]
96    _0 = 0,
97    #[doc = "1: Software Standby/Snooze Mode returns by IWDT interrupt is enabled"]
98    _1 = 1,
99}
100impl From<IWDTWUPEN_A> for bool {
101    #[inline(always)]
102    fn from(variant: IWDTWUPEN_A) -> Self {
103        variant as u8 != 0
104    }
105}
106impl IWDTWUPEN_R {
107    #[doc = "Get enumerated values variant"]
108    #[inline(always)]
109    pub fn variant(&self) -> IWDTWUPEN_A {
110        match self.bits {
111            false => IWDTWUPEN_A::_0,
112            true => IWDTWUPEN_A::_1,
113        }
114    }
115    #[doc = "Checks if the value of the field is `_0`"]
116    #[inline(always)]
117    pub fn is_0(&self) -> bool {
118        *self == IWDTWUPEN_A::_0
119    }
120    #[doc = "Checks if the value of the field is `_1`"]
121    #[inline(always)]
122    pub fn is_1(&self) -> bool {
123        *self == IWDTWUPEN_A::_1
124    }
125}
126#[doc = "Field `IWDTWUPEN` writer - IWDT Interrupt Software Standby/Snooze Mode Returns Enable bit"]
127pub type IWDTWUPEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, WUPEN0_SPEC, IWDTWUPEN_A, O>;
128impl<'a, const O: u8> IWDTWUPEN_W<'a, O> {
129    #[doc = "Software Standby/Snooze Mode returns by IWDT interrupt is disabled"]
130    #[inline(always)]
131    pub fn _0(self) -> &'a mut W {
132        self.variant(IWDTWUPEN_A::_0)
133    }
134    #[doc = "Software Standby/Snooze Mode returns by IWDT interrupt is enabled"]
135    #[inline(always)]
136    pub fn _1(self) -> &'a mut W {
137        self.variant(IWDTWUPEN_A::_1)
138    }
139}
140#[doc = "Field `LVD1WUPEN` reader - LVD1 Interrupt Software Standby/Snooze Mode Returns Enable bit"]
141pub type LVD1WUPEN_R = crate::BitReader<LVD1WUPEN_A>;
142#[doc = "LVD1 Interrupt Software Standby/Snooze Mode Returns Enable bit\n\nValue on reset: 0"]
143#[derive(Clone, Copy, Debug, PartialEq, Eq)]
144pub enum LVD1WUPEN_A {
145    #[doc = "0: Software Standby/Snooze Mode returns by LVD1 interrupt is disabled"]
146    _0 = 0,
147    #[doc = "1: Software Standby/Snooze Mode returns by LVD1 interrupt is enabled"]
148    _1 = 1,
149}
150impl From<LVD1WUPEN_A> for bool {
151    #[inline(always)]
152    fn from(variant: LVD1WUPEN_A) -> Self {
153        variant as u8 != 0
154    }
155}
156impl LVD1WUPEN_R {
157    #[doc = "Get enumerated values variant"]
158    #[inline(always)]
159    pub fn variant(&self) -> LVD1WUPEN_A {
160        match self.bits {
161            false => LVD1WUPEN_A::_0,
162            true => LVD1WUPEN_A::_1,
163        }
164    }
165    #[doc = "Checks if the value of the field is `_0`"]
166    #[inline(always)]
167    pub fn is_0(&self) -> bool {
168        *self == LVD1WUPEN_A::_0
169    }
170    #[doc = "Checks if the value of the field is `_1`"]
171    #[inline(always)]
172    pub fn is_1(&self) -> bool {
173        *self == LVD1WUPEN_A::_1
174    }
175}
176#[doc = "Field `LVD1WUPEN` writer - LVD1 Interrupt Software Standby/Snooze Mode Returns Enable bit"]
177pub type LVD1WUPEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, WUPEN0_SPEC, LVD1WUPEN_A, O>;
178impl<'a, const O: u8> LVD1WUPEN_W<'a, O> {
179    #[doc = "Software Standby/Snooze Mode returns by LVD1 interrupt is disabled"]
180    #[inline(always)]
181    pub fn _0(self) -> &'a mut W {
182        self.variant(LVD1WUPEN_A::_0)
183    }
184    #[doc = "Software Standby/Snooze Mode returns by LVD1 interrupt is enabled"]
185    #[inline(always)]
186    pub fn _1(self) -> &'a mut W {
187        self.variant(LVD1WUPEN_A::_1)
188    }
189}
190#[doc = "Field `LVD2WUPEN` reader - LVD2 Interrupt Software Standby/Snooze Mode Returns Enable bit"]
191pub type LVD2WUPEN_R = crate::BitReader<LVD2WUPEN_A>;
192#[doc = "LVD2 Interrupt Software Standby/Snooze Mode Returns Enable bit\n\nValue on reset: 0"]
193#[derive(Clone, Copy, Debug, PartialEq, Eq)]
194pub enum LVD2WUPEN_A {
195    #[doc = "0: Software Standby/Snooze Mode returns by LVD2 interrupt is disabled"]
196    _0 = 0,
197    #[doc = "1: Software Standby/Snooze Mode returns by LVD2 interrupt is enabled"]
198    _1 = 1,
199}
200impl From<LVD2WUPEN_A> for bool {
201    #[inline(always)]
202    fn from(variant: LVD2WUPEN_A) -> Self {
203        variant as u8 != 0
204    }
205}
206impl LVD2WUPEN_R {
207    #[doc = "Get enumerated values variant"]
208    #[inline(always)]
209    pub fn variant(&self) -> LVD2WUPEN_A {
210        match self.bits {
211            false => LVD2WUPEN_A::_0,
212            true => LVD2WUPEN_A::_1,
213        }
214    }
215    #[doc = "Checks if the value of the field is `_0`"]
216    #[inline(always)]
217    pub fn is_0(&self) -> bool {
218        *self == LVD2WUPEN_A::_0
219    }
220    #[doc = "Checks if the value of the field is `_1`"]
221    #[inline(always)]
222    pub fn is_1(&self) -> bool {
223        *self == LVD2WUPEN_A::_1
224    }
225}
226#[doc = "Field `LVD2WUPEN` writer - LVD2 Interrupt Software Standby/Snooze Mode Returns Enable bit"]
227pub type LVD2WUPEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, WUPEN0_SPEC, LVD2WUPEN_A, O>;
228impl<'a, const O: u8> LVD2WUPEN_W<'a, O> {
229    #[doc = "Software Standby/Snooze Mode returns by LVD2 interrupt is disabled"]
230    #[inline(always)]
231    pub fn _0(self) -> &'a mut W {
232        self.variant(LVD2WUPEN_A::_0)
233    }
234    #[doc = "Software Standby/Snooze Mode returns by LVD2 interrupt is enabled"]
235    #[inline(always)]
236    pub fn _1(self) -> &'a mut W {
237        self.variant(LVD2WUPEN_A::_1)
238    }
239}
240#[doc = "Field `RTCALMWUPEN` reader - RTC Alarm Interrupt Software Standby/Snooze Mode Returns Enable bit"]
241pub type RTCALMWUPEN_R = crate::BitReader<RTCALMWUPEN_A>;
242#[doc = "RTC Alarm Interrupt Software Standby/Snooze Mode Returns Enable bit\n\nValue on reset: 0"]
243#[derive(Clone, Copy, Debug, PartialEq, Eq)]
244pub enum RTCALMWUPEN_A {
245    #[doc = "0: Software Standby/Snooze Mode returns by RTC alarm interrupt is disabled"]
246    _0 = 0,
247    #[doc = "1: Software Standby/Snooze Mode returns by RTC alarm interrupt is enabled"]
248    _1 = 1,
249}
250impl From<RTCALMWUPEN_A> for bool {
251    #[inline(always)]
252    fn from(variant: RTCALMWUPEN_A) -> Self {
253        variant as u8 != 0
254    }
255}
256impl RTCALMWUPEN_R {
257    #[doc = "Get enumerated values variant"]
258    #[inline(always)]
259    pub fn variant(&self) -> RTCALMWUPEN_A {
260        match self.bits {
261            false => RTCALMWUPEN_A::_0,
262            true => RTCALMWUPEN_A::_1,
263        }
264    }
265    #[doc = "Checks if the value of the field is `_0`"]
266    #[inline(always)]
267    pub fn is_0(&self) -> bool {
268        *self == RTCALMWUPEN_A::_0
269    }
270    #[doc = "Checks if the value of the field is `_1`"]
271    #[inline(always)]
272    pub fn is_1(&self) -> bool {
273        *self == RTCALMWUPEN_A::_1
274    }
275}
276#[doc = "Field `RTCALMWUPEN` writer - RTC Alarm Interrupt Software Standby/Snooze Mode Returns Enable bit"]
277pub type RTCALMWUPEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, WUPEN0_SPEC, RTCALMWUPEN_A, O>;
278impl<'a, const O: u8> RTCALMWUPEN_W<'a, O> {
279    #[doc = "Software Standby/Snooze Mode returns by RTC alarm interrupt is disabled"]
280    #[inline(always)]
281    pub fn _0(self) -> &'a mut W {
282        self.variant(RTCALMWUPEN_A::_0)
283    }
284    #[doc = "Software Standby/Snooze Mode returns by RTC alarm interrupt is enabled"]
285    #[inline(always)]
286    pub fn _1(self) -> &'a mut W {
287        self.variant(RTCALMWUPEN_A::_1)
288    }
289}
290#[doc = "Field `RTCPRDWUPEN` reader - RTC Period Interrupt Software Standby/Snooze Mode Returns Enable bit"]
291pub type RTCPRDWUPEN_R = crate::BitReader<RTCPRDWUPEN_A>;
292#[doc = "RTC Period Interrupt Software Standby/Snooze Mode Returns Enable bit\n\nValue on reset: 0"]
293#[derive(Clone, Copy, Debug, PartialEq, Eq)]
294pub enum RTCPRDWUPEN_A {
295    #[doc = "0: Software Standby/Snooze Mode returns by RTC period interrupt is disabled"]
296    _0 = 0,
297    #[doc = "1: Software Standby/Snooze Mode returns by RTC period interrupt is enabled"]
298    _1 = 1,
299}
300impl From<RTCPRDWUPEN_A> for bool {
301    #[inline(always)]
302    fn from(variant: RTCPRDWUPEN_A) -> Self {
303        variant as u8 != 0
304    }
305}
306impl RTCPRDWUPEN_R {
307    #[doc = "Get enumerated values variant"]
308    #[inline(always)]
309    pub fn variant(&self) -> RTCPRDWUPEN_A {
310        match self.bits {
311            false => RTCPRDWUPEN_A::_0,
312            true => RTCPRDWUPEN_A::_1,
313        }
314    }
315    #[doc = "Checks if the value of the field is `_0`"]
316    #[inline(always)]
317    pub fn is_0(&self) -> bool {
318        *self == RTCPRDWUPEN_A::_0
319    }
320    #[doc = "Checks if the value of the field is `_1`"]
321    #[inline(always)]
322    pub fn is_1(&self) -> bool {
323        *self == RTCPRDWUPEN_A::_1
324    }
325}
326#[doc = "Field `RTCPRDWUPEN` writer - RTC Period Interrupt Software Standby/Snooze Mode Returns Enable bit"]
327pub type RTCPRDWUPEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, WUPEN0_SPEC, RTCPRDWUPEN_A, O>;
328impl<'a, const O: u8> RTCPRDWUPEN_W<'a, O> {
329    #[doc = "Software Standby/Snooze Mode returns by RTC period interrupt is disabled"]
330    #[inline(always)]
331    pub fn _0(self) -> &'a mut W {
332        self.variant(RTCPRDWUPEN_A::_0)
333    }
334    #[doc = "Software Standby/Snooze Mode returns by RTC period interrupt is enabled"]
335    #[inline(always)]
336    pub fn _1(self) -> &'a mut W {
337        self.variant(RTCPRDWUPEN_A::_1)
338    }
339}
340#[doc = "Field `USBFS0WUPEN` reader - USBFS0 Interrupt Software Standby/Snooze Mode Returns Enable bit"]
341pub type USBFS0WUPEN_R = crate::BitReader<USBFS0WUPEN_A>;
342#[doc = "USBFS0 Interrupt Software Standby/Snooze Mode Returns Enable bit\n\nValue on reset: 0"]
343#[derive(Clone, Copy, Debug, PartialEq, Eq)]
344pub enum USBFS0WUPEN_A {
345    #[doc = "0: Software Standby/Snooze Mode returns by USBFS0 interrupt is disabled"]
346    _0 = 0,
347    #[doc = "1: Software Standby/Snooze Mode returns by USBFS0 interrupt is enabled"]
348    _1 = 1,
349}
350impl From<USBFS0WUPEN_A> for bool {
351    #[inline(always)]
352    fn from(variant: USBFS0WUPEN_A) -> Self {
353        variant as u8 != 0
354    }
355}
356impl USBFS0WUPEN_R {
357    #[doc = "Get enumerated values variant"]
358    #[inline(always)]
359    pub fn variant(&self) -> USBFS0WUPEN_A {
360        match self.bits {
361            false => USBFS0WUPEN_A::_0,
362            true => USBFS0WUPEN_A::_1,
363        }
364    }
365    #[doc = "Checks if the value of the field is `_0`"]
366    #[inline(always)]
367    pub fn is_0(&self) -> bool {
368        *self == USBFS0WUPEN_A::_0
369    }
370    #[doc = "Checks if the value of the field is `_1`"]
371    #[inline(always)]
372    pub fn is_1(&self) -> bool {
373        *self == USBFS0WUPEN_A::_1
374    }
375}
376#[doc = "Field `USBFS0WUPEN` writer - USBFS0 Interrupt Software Standby/Snooze Mode Returns Enable bit"]
377pub type USBFS0WUPEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, WUPEN0_SPEC, USBFS0WUPEN_A, O>;
378impl<'a, const O: u8> USBFS0WUPEN_W<'a, O> {
379    #[doc = "Software Standby/Snooze Mode returns by USBFS0 interrupt is disabled"]
380    #[inline(always)]
381    pub fn _0(self) -> &'a mut W {
382        self.variant(USBFS0WUPEN_A::_0)
383    }
384    #[doc = "Software Standby/Snooze Mode returns by USBFS0 interrupt is enabled"]
385    #[inline(always)]
386    pub fn _1(self) -> &'a mut W {
387        self.variant(USBFS0WUPEN_A::_1)
388    }
389}
390#[doc = "Field `AGT1UDWUPEN` reader - AGT1 Underflow Interrupt Software Standby/Snooze Mode Returns Enable bit"]
391pub type AGT1UDWUPEN_R = crate::BitReader<AGT1UDWUPEN_A>;
392#[doc = "AGT1 Underflow Interrupt Software Standby/Snooze Mode Returns Enable bit\n\nValue on reset: 0"]
393#[derive(Clone, Copy, Debug, PartialEq, Eq)]
394pub enum AGT1UDWUPEN_A {
395    #[doc = "0: Software Standby/Snooze Mode returns by AGT1 underflow interrupt is disabled"]
396    _0 = 0,
397    #[doc = "1: Software Standby/Snooze Mode returns by AGT1 underflow interrupt is enabled"]
398    _1 = 1,
399}
400impl From<AGT1UDWUPEN_A> for bool {
401    #[inline(always)]
402    fn from(variant: AGT1UDWUPEN_A) -> Self {
403        variant as u8 != 0
404    }
405}
406impl AGT1UDWUPEN_R {
407    #[doc = "Get enumerated values variant"]
408    #[inline(always)]
409    pub fn variant(&self) -> AGT1UDWUPEN_A {
410        match self.bits {
411            false => AGT1UDWUPEN_A::_0,
412            true => AGT1UDWUPEN_A::_1,
413        }
414    }
415    #[doc = "Checks if the value of the field is `_0`"]
416    #[inline(always)]
417    pub fn is_0(&self) -> bool {
418        *self == AGT1UDWUPEN_A::_0
419    }
420    #[doc = "Checks if the value of the field is `_1`"]
421    #[inline(always)]
422    pub fn is_1(&self) -> bool {
423        *self == AGT1UDWUPEN_A::_1
424    }
425}
426#[doc = "Field `AGT1UDWUPEN` writer - AGT1 Underflow Interrupt Software Standby/Snooze Mode Returns Enable bit"]
427pub type AGT1UDWUPEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, WUPEN0_SPEC, AGT1UDWUPEN_A, O>;
428impl<'a, const O: u8> AGT1UDWUPEN_W<'a, O> {
429    #[doc = "Software Standby/Snooze Mode returns by AGT1 underflow interrupt is disabled"]
430    #[inline(always)]
431    pub fn _0(self) -> &'a mut W {
432        self.variant(AGT1UDWUPEN_A::_0)
433    }
434    #[doc = "Software Standby/Snooze Mode returns by AGT1 underflow interrupt is enabled"]
435    #[inline(always)]
436    pub fn _1(self) -> &'a mut W {
437        self.variant(AGT1UDWUPEN_A::_1)
438    }
439}
440#[doc = "Field `AGT1CAWUPEN` reader - AGT1 Compare Match A Interrupt Software Standby/Snooze Mode Returns Enable bit"]
441pub type AGT1CAWUPEN_R = crate::BitReader<AGT1CAWUPEN_A>;
442#[doc = "AGT1 Compare Match A Interrupt Software Standby/Snooze Mode Returns Enable bit\n\nValue on reset: 0"]
443#[derive(Clone, Copy, Debug, PartialEq, Eq)]
444pub enum AGT1CAWUPEN_A {
445    #[doc = "0: Software Standby/Snooze Mode returns by AGT1 compare match A interrupt is disabled"]
446    _0 = 0,
447    #[doc = "1: Software Standby/Snooze Mode returns by AGT1 compare match A interrupt is enabled"]
448    _1 = 1,
449}
450impl From<AGT1CAWUPEN_A> for bool {
451    #[inline(always)]
452    fn from(variant: AGT1CAWUPEN_A) -> Self {
453        variant as u8 != 0
454    }
455}
456impl AGT1CAWUPEN_R {
457    #[doc = "Get enumerated values variant"]
458    #[inline(always)]
459    pub fn variant(&self) -> AGT1CAWUPEN_A {
460        match self.bits {
461            false => AGT1CAWUPEN_A::_0,
462            true => AGT1CAWUPEN_A::_1,
463        }
464    }
465    #[doc = "Checks if the value of the field is `_0`"]
466    #[inline(always)]
467    pub fn is_0(&self) -> bool {
468        *self == AGT1CAWUPEN_A::_0
469    }
470    #[doc = "Checks if the value of the field is `_1`"]
471    #[inline(always)]
472    pub fn is_1(&self) -> bool {
473        *self == AGT1CAWUPEN_A::_1
474    }
475}
476#[doc = "Field `AGT1CAWUPEN` writer - AGT1 Compare Match A Interrupt Software Standby/Snooze Mode Returns Enable bit"]
477pub type AGT1CAWUPEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, WUPEN0_SPEC, AGT1CAWUPEN_A, O>;
478impl<'a, const O: u8> AGT1CAWUPEN_W<'a, O> {
479    #[doc = "Software Standby/Snooze Mode returns by AGT1 compare match A interrupt is disabled"]
480    #[inline(always)]
481    pub fn _0(self) -> &'a mut W {
482        self.variant(AGT1CAWUPEN_A::_0)
483    }
484    #[doc = "Software Standby/Snooze Mode returns by AGT1 compare match A interrupt is enabled"]
485    #[inline(always)]
486    pub fn _1(self) -> &'a mut W {
487        self.variant(AGT1CAWUPEN_A::_1)
488    }
489}
490#[doc = "Field `AGT1CBWUPEN` reader - AGT1 Compare Match B Interrupt Software Standby/Snooze Mode Returns Enable bit"]
491pub type AGT1CBWUPEN_R = crate::BitReader<AGT1CBWUPEN_A>;
492#[doc = "AGT1 Compare Match B Interrupt Software Standby/Snooze Mode Returns Enable bit\n\nValue on reset: 0"]
493#[derive(Clone, Copy, Debug, PartialEq, Eq)]
494pub enum AGT1CBWUPEN_A {
495    #[doc = "0: Software Standby/Snooze Mode returns by AGT1 compare match B interrupt is disabled"]
496    _0 = 0,
497    #[doc = "1: Software Standby/Snooze Mode returns by AGT1 compare match B interrupt is enabled"]
498    _1 = 1,
499}
500impl From<AGT1CBWUPEN_A> for bool {
501    #[inline(always)]
502    fn from(variant: AGT1CBWUPEN_A) -> Self {
503        variant as u8 != 0
504    }
505}
506impl AGT1CBWUPEN_R {
507    #[doc = "Get enumerated values variant"]
508    #[inline(always)]
509    pub fn variant(&self) -> AGT1CBWUPEN_A {
510        match self.bits {
511            false => AGT1CBWUPEN_A::_0,
512            true => AGT1CBWUPEN_A::_1,
513        }
514    }
515    #[doc = "Checks if the value of the field is `_0`"]
516    #[inline(always)]
517    pub fn is_0(&self) -> bool {
518        *self == AGT1CBWUPEN_A::_0
519    }
520    #[doc = "Checks if the value of the field is `_1`"]
521    #[inline(always)]
522    pub fn is_1(&self) -> bool {
523        *self == AGT1CBWUPEN_A::_1
524    }
525}
526#[doc = "Field `AGT1CBWUPEN` writer - AGT1 Compare Match B Interrupt Software Standby/Snooze Mode Returns Enable bit"]
527pub type AGT1CBWUPEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, WUPEN0_SPEC, AGT1CBWUPEN_A, O>;
528impl<'a, const O: u8> AGT1CBWUPEN_W<'a, O> {
529    #[doc = "Software Standby/Snooze Mode returns by AGT1 compare match B interrupt is disabled"]
530    #[inline(always)]
531    pub fn _0(self) -> &'a mut W {
532        self.variant(AGT1CBWUPEN_A::_0)
533    }
534    #[doc = "Software Standby/Snooze Mode returns by AGT1 compare match B interrupt is enabled"]
535    #[inline(always)]
536    pub fn _1(self) -> &'a mut W {
537        self.variant(AGT1CBWUPEN_A::_1)
538    }
539}
540#[doc = "Field `IIC0WUPEN` reader - IIC0 Address Match Interrupt Software Standby/Snooze Mode Returns Enable bit"]
541pub type IIC0WUPEN_R = crate::BitReader<IIC0WUPEN_A>;
542#[doc = "IIC0 Address Match Interrupt Software Standby/Snooze Mode Returns Enable bit\n\nValue on reset: 0"]
543#[derive(Clone, Copy, Debug, PartialEq, Eq)]
544pub enum IIC0WUPEN_A {
545    #[doc = "0: Software Standby/Snooze Mode returns by IIC0 address match interrupt is disabled"]
546    _0 = 0,
547    #[doc = "1: Software Standby/Snooze Mode returns by IIC0 address match interrupt is enabled"]
548    _1 = 1,
549}
550impl From<IIC0WUPEN_A> for bool {
551    #[inline(always)]
552    fn from(variant: IIC0WUPEN_A) -> Self {
553        variant as u8 != 0
554    }
555}
556impl IIC0WUPEN_R {
557    #[doc = "Get enumerated values variant"]
558    #[inline(always)]
559    pub fn variant(&self) -> IIC0WUPEN_A {
560        match self.bits {
561            false => IIC0WUPEN_A::_0,
562            true => IIC0WUPEN_A::_1,
563        }
564    }
565    #[doc = "Checks if the value of the field is `_0`"]
566    #[inline(always)]
567    pub fn is_0(&self) -> bool {
568        *self == IIC0WUPEN_A::_0
569    }
570    #[doc = "Checks if the value of the field is `_1`"]
571    #[inline(always)]
572    pub fn is_1(&self) -> bool {
573        *self == IIC0WUPEN_A::_1
574    }
575}
576#[doc = "Field `IIC0WUPEN` writer - IIC0 Address Match Interrupt Software Standby/Snooze Mode Returns Enable bit"]
577pub type IIC0WUPEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, WUPEN0_SPEC, IIC0WUPEN_A, O>;
578impl<'a, const O: u8> IIC0WUPEN_W<'a, O> {
579    #[doc = "Software Standby/Snooze Mode returns by IIC0 address match interrupt is disabled"]
580    #[inline(always)]
581    pub fn _0(self) -> &'a mut W {
582        self.variant(IIC0WUPEN_A::_0)
583    }
584    #[doc = "Software Standby/Snooze Mode returns by IIC0 address match interrupt is enabled"]
585    #[inline(always)]
586    pub fn _1(self) -> &'a mut W {
587        self.variant(IIC0WUPEN_A::_1)
588    }
589}
590impl R {
591    #[doc = "Bits 0:15 - IRQn Interrupt Software Standby/Snooze Mode Returns Enable bit"]
592    #[inline(always)]
593    pub fn irqwupen(&self) -> IRQWUPEN_R {
594        IRQWUPEN_R::new((self.bits & 0xffff) as u16)
595    }
596    #[doc = "Bit 16 - IWDT Interrupt Software Standby/Snooze Mode Returns Enable bit"]
597    #[inline(always)]
598    pub fn iwdtwupen(&self) -> IWDTWUPEN_R {
599        IWDTWUPEN_R::new(((self.bits >> 16) & 1) != 0)
600    }
601    #[doc = "Bit 18 - LVD1 Interrupt Software Standby/Snooze Mode Returns Enable bit"]
602    #[inline(always)]
603    pub fn lvd1wupen(&self) -> LVD1WUPEN_R {
604        LVD1WUPEN_R::new(((self.bits >> 18) & 1) != 0)
605    }
606    #[doc = "Bit 19 - LVD2 Interrupt Software Standby/Snooze Mode Returns Enable bit"]
607    #[inline(always)]
608    pub fn lvd2wupen(&self) -> LVD2WUPEN_R {
609        LVD2WUPEN_R::new(((self.bits >> 19) & 1) != 0)
610    }
611    #[doc = "Bit 24 - RTC Alarm Interrupt Software Standby/Snooze Mode Returns Enable bit"]
612    #[inline(always)]
613    pub fn rtcalmwupen(&self) -> RTCALMWUPEN_R {
614        RTCALMWUPEN_R::new(((self.bits >> 24) & 1) != 0)
615    }
616    #[doc = "Bit 25 - RTC Period Interrupt Software Standby/Snooze Mode Returns Enable bit"]
617    #[inline(always)]
618    pub fn rtcprdwupen(&self) -> RTCPRDWUPEN_R {
619        RTCPRDWUPEN_R::new(((self.bits >> 25) & 1) != 0)
620    }
621    #[doc = "Bit 27 - USBFS0 Interrupt Software Standby/Snooze Mode Returns Enable bit"]
622    #[inline(always)]
623    pub fn usbfs0wupen(&self) -> USBFS0WUPEN_R {
624        USBFS0WUPEN_R::new(((self.bits >> 27) & 1) != 0)
625    }
626    #[doc = "Bit 28 - AGT1 Underflow Interrupt Software Standby/Snooze Mode Returns Enable bit"]
627    #[inline(always)]
628    pub fn agt1udwupen(&self) -> AGT1UDWUPEN_R {
629        AGT1UDWUPEN_R::new(((self.bits >> 28) & 1) != 0)
630    }
631    #[doc = "Bit 29 - AGT1 Compare Match A Interrupt Software Standby/Snooze Mode Returns Enable bit"]
632    #[inline(always)]
633    pub fn agt1cawupen(&self) -> AGT1CAWUPEN_R {
634        AGT1CAWUPEN_R::new(((self.bits >> 29) & 1) != 0)
635    }
636    #[doc = "Bit 30 - AGT1 Compare Match B Interrupt Software Standby/Snooze Mode Returns Enable bit"]
637    #[inline(always)]
638    pub fn agt1cbwupen(&self) -> AGT1CBWUPEN_R {
639        AGT1CBWUPEN_R::new(((self.bits >> 30) & 1) != 0)
640    }
641    #[doc = "Bit 31 - IIC0 Address Match Interrupt Software Standby/Snooze Mode Returns Enable bit"]
642    #[inline(always)]
643    pub fn iic0wupen(&self) -> IIC0WUPEN_R {
644        IIC0WUPEN_R::new(((self.bits >> 31) & 1) != 0)
645    }
646}
647impl W {
648    #[doc = "Bits 0:15 - IRQn Interrupt Software Standby/Snooze Mode Returns Enable bit"]
649    #[inline(always)]
650    #[must_use]
651    pub fn irqwupen(&mut self) -> IRQWUPEN_W<0> {
652        IRQWUPEN_W::new(self)
653    }
654    #[doc = "Bit 16 - IWDT Interrupt Software Standby/Snooze Mode Returns Enable bit"]
655    #[inline(always)]
656    #[must_use]
657    pub fn iwdtwupen(&mut self) -> IWDTWUPEN_W<16> {
658        IWDTWUPEN_W::new(self)
659    }
660    #[doc = "Bit 18 - LVD1 Interrupt Software Standby/Snooze Mode Returns Enable bit"]
661    #[inline(always)]
662    #[must_use]
663    pub fn lvd1wupen(&mut self) -> LVD1WUPEN_W<18> {
664        LVD1WUPEN_W::new(self)
665    }
666    #[doc = "Bit 19 - LVD2 Interrupt Software Standby/Snooze Mode Returns Enable bit"]
667    #[inline(always)]
668    #[must_use]
669    pub fn lvd2wupen(&mut self) -> LVD2WUPEN_W<19> {
670        LVD2WUPEN_W::new(self)
671    }
672    #[doc = "Bit 24 - RTC Alarm Interrupt Software Standby/Snooze Mode Returns Enable bit"]
673    #[inline(always)]
674    #[must_use]
675    pub fn rtcalmwupen(&mut self) -> RTCALMWUPEN_W<24> {
676        RTCALMWUPEN_W::new(self)
677    }
678    #[doc = "Bit 25 - RTC Period Interrupt Software Standby/Snooze Mode Returns Enable bit"]
679    #[inline(always)]
680    #[must_use]
681    pub fn rtcprdwupen(&mut self) -> RTCPRDWUPEN_W<25> {
682        RTCPRDWUPEN_W::new(self)
683    }
684    #[doc = "Bit 27 - USBFS0 Interrupt Software Standby/Snooze Mode Returns Enable bit"]
685    #[inline(always)]
686    #[must_use]
687    pub fn usbfs0wupen(&mut self) -> USBFS0WUPEN_W<27> {
688        USBFS0WUPEN_W::new(self)
689    }
690    #[doc = "Bit 28 - AGT1 Underflow Interrupt Software Standby/Snooze Mode Returns Enable bit"]
691    #[inline(always)]
692    #[must_use]
693    pub fn agt1udwupen(&mut self) -> AGT1UDWUPEN_W<28> {
694        AGT1UDWUPEN_W::new(self)
695    }
696    #[doc = "Bit 29 - AGT1 Compare Match A Interrupt Software Standby/Snooze Mode Returns Enable bit"]
697    #[inline(always)]
698    #[must_use]
699    pub fn agt1cawupen(&mut self) -> AGT1CAWUPEN_W<29> {
700        AGT1CAWUPEN_W::new(self)
701    }
702    #[doc = "Bit 30 - AGT1 Compare Match B Interrupt Software Standby/Snooze Mode Returns Enable bit"]
703    #[inline(always)]
704    #[must_use]
705    pub fn agt1cbwupen(&mut self) -> AGT1CBWUPEN_W<30> {
706        AGT1CBWUPEN_W::new(self)
707    }
708    #[doc = "Bit 31 - IIC0 Address Match Interrupt Software Standby/Snooze Mode Returns Enable bit"]
709    #[inline(always)]
710    #[must_use]
711    pub fn iic0wupen(&mut self) -> IIC0WUPEN_W<31> {
712        IIC0WUPEN_W::new(self)
713    }
714    #[doc = "Writes raw bits to the register."]
715    #[inline(always)]
716    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
717        self.0.bits(bits);
718        self
719    }
720}
721#[doc = "Wake Up Interrupt Enable Register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [wupen0](index.html) module"]
722pub struct WUPEN0_SPEC;
723impl crate::RegisterSpec for WUPEN0_SPEC {
724    type Ux = u32;
725}
726#[doc = "`read()` method returns [wupen0::R](R) reader structure"]
727impl crate::Readable for WUPEN0_SPEC {
728    type Reader = R;
729}
730#[doc = "`write(|w| ..)` method takes [wupen0::W](W) writer structure"]
731impl crate::Writable for WUPEN0_SPEC {
732    type Writer = W;
733    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
734    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
735}
736#[doc = "`reset()` method sets WUPEN0 to value 0"]
737impl crate::Resettable for WUPEN0_SPEC {
738    const RESET_VALUE: Self::Ux = 0;
739}