Skip to main content

rsl10_pac/acs/
acs_wakeup_ctrl.rs

1#[doc = "Reader of register ACS_WAKEUP_CTRL"]
2pub type R = crate::R<u32, super::ACS_WAKEUP_CTRL>;
3#[doc = "Writer for register ACS_WAKEUP_CTRL"]
4pub type W = crate::W<u32, super::ACS_WAKEUP_CTRL>;
5#[doc = "Register ACS_WAKEUP_CTRL `reset()`'s with value 0"]
6impl crate::ResetValue for super::ACS_WAKEUP_CTRL {
7    type Type = u32;
8    #[inline(always)]
9    fn reset_value() -> Self::Type {
10        0
11    }
12}
13#[doc = "Enable / Disable the retention mode of the pads\n\nValue on reset: 0"]
14#[derive(Clone, Copy, Debug, PartialEq)]
15pub enum PADS_RETENTION_EN_A {
16    #[doc = "0: Disable the pad retention mode"]
17    PADS_RETENTION_DISABLE = 0,
18    #[doc = "1: Enable the pad retention mode"]
19    PADS_RETENTION_ENABLE = 1,
20}
21impl From<PADS_RETENTION_EN_A> for bool {
22    #[inline(always)]
23    fn from(variant: PADS_RETENTION_EN_A) -> Self {
24        variant as u8 != 0
25    }
26}
27#[doc = "Reader of field `PADS_RETENTION_EN`"]
28pub type PADS_RETENTION_EN_R = crate::R<bool, PADS_RETENTION_EN_A>;
29impl PADS_RETENTION_EN_R {
30    #[doc = r"Get enumerated values variant"]
31    #[inline(always)]
32    pub fn variant(&self) -> PADS_RETENTION_EN_A {
33        match self.bits {
34            false => PADS_RETENTION_EN_A::PADS_RETENTION_DISABLE,
35            true => PADS_RETENTION_EN_A::PADS_RETENTION_ENABLE,
36        }
37    }
38    #[doc = "Checks if the value of the field is `PADS_RETENTION_DISABLE`"]
39    #[inline(always)]
40    pub fn is_pads_retention_disable(&self) -> bool {
41        *self == PADS_RETENTION_EN_A::PADS_RETENTION_DISABLE
42    }
43    #[doc = "Checks if the value of the field is `PADS_RETENTION_ENABLE`"]
44    #[inline(always)]
45    pub fn is_pads_retention_enable(&self) -> bool {
46        *self == PADS_RETENTION_EN_A::PADS_RETENTION_ENABLE
47    }
48}
49#[doc = "Write proxy for field `PADS_RETENTION_EN`"]
50pub struct PADS_RETENTION_EN_W<'a> {
51    w: &'a mut W,
52}
53impl<'a> PADS_RETENTION_EN_W<'a> {
54    #[doc = r"Writes `variant` to the field"]
55    #[inline(always)]
56    pub fn variant(self, variant: PADS_RETENTION_EN_A) -> &'a mut W {
57        {
58            self.bit(variant.into())
59        }
60    }
61    #[doc = "Disable the pad retention mode"]
62    #[inline(always)]
63    pub fn pads_retention_disable(self) -> &'a mut W {
64        self.variant(PADS_RETENTION_EN_A::PADS_RETENTION_DISABLE)
65    }
66    #[doc = "Enable the pad retention mode"]
67    #[inline(always)]
68    pub fn pads_retention_enable(self) -> &'a mut W {
69        self.variant(PADS_RETENTION_EN_A::PADS_RETENTION_ENABLE)
70    }
71    #[doc = r"Sets the field bit"]
72    #[inline(always)]
73    pub fn set_bit(self) -> &'a mut W {
74        self.bit(true)
75    }
76    #[doc = r"Clears the field bit"]
77    #[inline(always)]
78    pub fn clear_bit(self) -> &'a mut W {
79        self.bit(false)
80    }
81    #[doc = r"Writes raw bits to the field"]
82    #[inline(always)]
83    pub fn bit(self, value: bool) -> &'a mut W {
84        self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24);
85        self.w
86    }
87}
88#[doc = "Boot mode flag\n\nValue on reset: 0"]
89#[derive(Clone, Copy, Debug, PartialEq)]
90pub enum BOOT_FLASH_APP_REBOOT_A {
91    #[doc = "0: The reboot mode flag is not set"]
92    BOOT_FLASH_APP_REBOOT_DISABLE = 0,
93    #[doc = "1: The reboot mode flag is set (ROM will not read the calibration values from flash and will directly execute the application)"]
94    BOOT_FLASH_APP_REBOOT_ENABLE = 1,
95}
96impl From<BOOT_FLASH_APP_REBOOT_A> for bool {
97    #[inline(always)]
98    fn from(variant: BOOT_FLASH_APP_REBOOT_A) -> Self {
99        variant as u8 != 0
100    }
101}
102#[doc = "Reader of field `BOOT_FLASH_APP_REBOOT`"]
103pub type BOOT_FLASH_APP_REBOOT_R = crate::R<bool, BOOT_FLASH_APP_REBOOT_A>;
104impl BOOT_FLASH_APP_REBOOT_R {
105    #[doc = r"Get enumerated values variant"]
106    #[inline(always)]
107    pub fn variant(&self) -> BOOT_FLASH_APP_REBOOT_A {
108        match self.bits {
109            false => BOOT_FLASH_APP_REBOOT_A::BOOT_FLASH_APP_REBOOT_DISABLE,
110            true => BOOT_FLASH_APP_REBOOT_A::BOOT_FLASH_APP_REBOOT_ENABLE,
111        }
112    }
113    #[doc = "Checks if the value of the field is `BOOT_FLASH_APP_REBOOT_DISABLE`"]
114    #[inline(always)]
115    pub fn is_boot_flash_app_reboot_disable(&self) -> bool {
116        *self == BOOT_FLASH_APP_REBOOT_A::BOOT_FLASH_APP_REBOOT_DISABLE
117    }
118    #[doc = "Checks if the value of the field is `BOOT_FLASH_APP_REBOOT_ENABLE`"]
119    #[inline(always)]
120    pub fn is_boot_flash_app_reboot_enable(&self) -> bool {
121        *self == BOOT_FLASH_APP_REBOOT_A::BOOT_FLASH_APP_REBOOT_ENABLE
122    }
123}
124#[doc = "Write proxy for field `BOOT_FLASH_APP_REBOOT`"]
125pub struct BOOT_FLASH_APP_REBOOT_W<'a> {
126    w: &'a mut W,
127}
128impl<'a> BOOT_FLASH_APP_REBOOT_W<'a> {
129    #[doc = r"Writes `variant` to the field"]
130    #[inline(always)]
131    pub fn variant(self, variant: BOOT_FLASH_APP_REBOOT_A) -> &'a mut W {
132        {
133            self.bit(variant.into())
134        }
135    }
136    #[doc = "The reboot mode flag is not set"]
137    #[inline(always)]
138    pub fn boot_flash_app_reboot_disable(self) -> &'a mut W {
139        self.variant(BOOT_FLASH_APP_REBOOT_A::BOOT_FLASH_APP_REBOOT_DISABLE)
140    }
141    #[doc = "The reboot mode flag is set (ROM will not read the calibration values from flash and will directly execute the application)"]
142    #[inline(always)]
143    pub fn boot_flash_app_reboot_enable(self) -> &'a mut W {
144        self.variant(BOOT_FLASH_APP_REBOOT_A::BOOT_FLASH_APP_REBOOT_ENABLE)
145    }
146    #[doc = r"Sets the field bit"]
147    #[inline(always)]
148    pub fn set_bit(self) -> &'a mut W {
149        self.bit(true)
150    }
151    #[doc = r"Clears the field bit"]
152    #[inline(always)]
153    pub fn clear_bit(self) -> &'a mut W {
154        self.bit(false)
155    }
156    #[doc = r"Writes raw bits to the field"]
157    #[inline(always)]
158    pub fn bit(self, value: bool) -> &'a mut W {
159        self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20);
160        self.w
161    }
162}
163#[doc = "RC oscillator clock multiplier read only flag (mirror of CLOCK_MULT of ACS_RCOSC_CTRL register)\n\nValue on reset: 0"]
164#[derive(Clone, Copy, Debug, PartialEq)]
165pub enum RC_CLOCK_MULT_A {
166    #[doc = "0: The startup RC Oscillator is at 3 MHz"]
167    RC_START_OSC_STATUS_3MHZ = 0,
168    #[doc = "1: The startup RC Oscillator is at 12 MHz"]
169    RC_START_OSC_STATUS_12MHZ = 1,
170}
171impl From<RC_CLOCK_MULT_A> for bool {
172    #[inline(always)]
173    fn from(variant: RC_CLOCK_MULT_A) -> Self {
174        variant as u8 != 0
175    }
176}
177#[doc = "Reader of field `RC_CLOCK_MULT`"]
178pub type RC_CLOCK_MULT_R = crate::R<bool, RC_CLOCK_MULT_A>;
179impl RC_CLOCK_MULT_R {
180    #[doc = r"Get enumerated values variant"]
181    #[inline(always)]
182    pub fn variant(&self) -> RC_CLOCK_MULT_A {
183        match self.bits {
184            false => RC_CLOCK_MULT_A::RC_START_OSC_STATUS_3MHZ,
185            true => RC_CLOCK_MULT_A::RC_START_OSC_STATUS_12MHZ,
186        }
187    }
188    #[doc = "Checks if the value of the field is `RC_START_OSC_STATUS_3MHZ`"]
189    #[inline(always)]
190    pub fn is_rc_start_osc_status_3mhz(&self) -> bool {
191        *self == RC_CLOCK_MULT_A::RC_START_OSC_STATUS_3MHZ
192    }
193    #[doc = "Checks if the value of the field is `RC_START_OSC_STATUS_12MHZ`"]
194    #[inline(always)]
195    pub fn is_rc_start_osc_status_12mhz(&self) -> bool {
196        *self == RC_CLOCK_MULT_A::RC_START_OSC_STATUS_12MHZ
197    }
198}
199#[doc = "RC oscillator trimming read only flag (mirror of FTRIM_FLAG of ACS_RCOSC_CTRL register\n\nValue on reset: 0"]
200#[derive(Clone, Copy, Debug, PartialEq)]
201pub enum RC_FTRIM_FLAG_A {
202    #[doc = "0: The oscillators are not calibrated"]
203    RC_OSC_STATUS_UNCALIBRATED = 0,
204    #[doc = "1: The oscillators are calibrated"]
205    RC_OSC_STATUS_CALIBRATED = 1,
206}
207impl From<RC_FTRIM_FLAG_A> for bool {
208    #[inline(always)]
209    fn from(variant: RC_FTRIM_FLAG_A) -> Self {
210        variant as u8 != 0
211    }
212}
213#[doc = "Reader of field `RC_FTRIM_FLAG`"]
214pub type RC_FTRIM_FLAG_R = crate::R<bool, RC_FTRIM_FLAG_A>;
215impl RC_FTRIM_FLAG_R {
216    #[doc = r"Get enumerated values variant"]
217    #[inline(always)]
218    pub fn variant(&self) -> RC_FTRIM_FLAG_A {
219        match self.bits {
220            false => RC_FTRIM_FLAG_A::RC_OSC_STATUS_UNCALIBRATED,
221            true => RC_FTRIM_FLAG_A::RC_OSC_STATUS_CALIBRATED,
222        }
223    }
224    #[doc = "Checks if the value of the field is `RC_OSC_STATUS_UNCALIBRATED`"]
225    #[inline(always)]
226    pub fn is_rc_osc_status_uncalibrated(&self) -> bool {
227        *self == RC_FTRIM_FLAG_A::RC_OSC_STATUS_UNCALIBRATED
228    }
229    #[doc = "Checks if the value of the field is `RC_OSC_STATUS_CALIBRATED`"]
230    #[inline(always)]
231    pub fn is_rc_osc_status_calibrated(&self) -> bool {
232        *self == RC_FTRIM_FLAG_A::RC_OSC_STATUS_CALIBRATED
233    }
234}
235#[doc = "Boot selection to indicate boot source\n\nValue on reset: 0"]
236#[derive(Clone, Copy, Debug, PartialEq)]
237#[repr(u8)]
238pub enum BOOT_SELECT_A {
239    #[doc = "0: The ARM Cortex-M3 executes code from the flash and the XTAL will not be started at boot"]
240    BOOT_FLASH_XTAL_DISABLE = 0,
241    #[doc = "1: The ARM Cortex-M3 executed code from the address specified in the wakeup information in retention RAM and the XTAL will not be started at boot"]
242    BOOT_CUSTOM = 1,
243    #[doc = "2: The ARM Cortex-M3 executes code from the flash and the XTAL will be started at boot with the default trim"]
244    BOOT_FLASH_XTAL_DEFAULT_TRIM = 2,
245    #[doc = "3: The ARM Cortex-M3 executes code from the flash and the XTAL will be started at boot with trim from ACS_WAKEUP_GP_DATA"]
246    BOOT_FLASH_XTAL_CUSTOM_TRIM = 3,
247}
248impl From<BOOT_SELECT_A> for u8 {
249    #[inline(always)]
250    fn from(variant: BOOT_SELECT_A) -> Self {
251        variant as _
252    }
253}
254#[doc = "Reader of field `BOOT_SELECT`"]
255pub type BOOT_SELECT_R = crate::R<u8, BOOT_SELECT_A>;
256impl BOOT_SELECT_R {
257    #[doc = r"Get enumerated values variant"]
258    #[inline(always)]
259    pub fn variant(&self) -> BOOT_SELECT_A {
260        match self.bits {
261            0 => BOOT_SELECT_A::BOOT_FLASH_XTAL_DISABLE,
262            1 => BOOT_SELECT_A::BOOT_CUSTOM,
263            2 => BOOT_SELECT_A::BOOT_FLASH_XTAL_DEFAULT_TRIM,
264            3 => BOOT_SELECT_A::BOOT_FLASH_XTAL_CUSTOM_TRIM,
265            _ => unreachable!(),
266        }
267    }
268    #[doc = "Checks if the value of the field is `BOOT_FLASH_XTAL_DISABLE`"]
269    #[inline(always)]
270    pub fn is_boot_flash_xtal_disable(&self) -> bool {
271        *self == BOOT_SELECT_A::BOOT_FLASH_XTAL_DISABLE
272    }
273    #[doc = "Checks if the value of the field is `BOOT_CUSTOM`"]
274    #[inline(always)]
275    pub fn is_boot_custom(&self) -> bool {
276        *self == BOOT_SELECT_A::BOOT_CUSTOM
277    }
278    #[doc = "Checks if the value of the field is `BOOT_FLASH_XTAL_DEFAULT_TRIM`"]
279    #[inline(always)]
280    pub fn is_boot_flash_xtal_default_trim(&self) -> bool {
281        *self == BOOT_SELECT_A::BOOT_FLASH_XTAL_DEFAULT_TRIM
282    }
283    #[doc = "Checks if the value of the field is `BOOT_FLASH_XTAL_CUSTOM_TRIM`"]
284    #[inline(always)]
285    pub fn is_boot_flash_xtal_custom_trim(&self) -> bool {
286        *self == BOOT_SELECT_A::BOOT_FLASH_XTAL_CUSTOM_TRIM
287    }
288}
289#[doc = "Write proxy for field `BOOT_SELECT`"]
290pub struct BOOT_SELECT_W<'a> {
291    w: &'a mut W,
292}
293impl<'a> BOOT_SELECT_W<'a> {
294    #[doc = r"Writes `variant` to the field"]
295    #[inline(always)]
296    pub fn variant(self, variant: BOOT_SELECT_A) -> &'a mut W {
297        {
298            self.bits(variant.into())
299        }
300    }
301    #[doc = "The ARM Cortex-M3 executes code from the flash and the XTAL will not be started at boot"]
302    #[inline(always)]
303    pub fn boot_flash_xtal_disable(self) -> &'a mut W {
304        self.variant(BOOT_SELECT_A::BOOT_FLASH_XTAL_DISABLE)
305    }
306    #[doc = "The ARM Cortex-M3 executed code from the address specified in the wakeup information in retention RAM and the XTAL will not be started at boot"]
307    #[inline(always)]
308    pub fn boot_custom(self) -> &'a mut W {
309        self.variant(BOOT_SELECT_A::BOOT_CUSTOM)
310    }
311    #[doc = "The ARM Cortex-M3 executes code from the flash and the XTAL will be started at boot with the default trim"]
312    #[inline(always)]
313    pub fn boot_flash_xtal_default_trim(self) -> &'a mut W {
314        self.variant(BOOT_SELECT_A::BOOT_FLASH_XTAL_DEFAULT_TRIM)
315    }
316    #[doc = "The ARM Cortex-M3 executes code from the flash and the XTAL will be started at boot with trim from ACS_WAKEUP_GP_DATA"]
317    #[inline(always)]
318    pub fn boot_flash_xtal_custom_trim(self) -> &'a mut W {
319        self.variant(BOOT_SELECT_A::BOOT_FLASH_XTAL_CUSTOM_TRIM)
320    }
321    #[doc = r"Writes raw bits to the field"]
322    #[inline(always)]
323    pub fn bits(self, value: u8) -> &'a mut W {
324        self.w.bits = (self.w.bits & !(0x03 << 16)) | (((value as u32) & 0x03) << 16);
325        self.w
326    }
327}
328#[doc = "\n\nValue on reset: 0"]
329#[derive(Clone, Copy, Debug, PartialEq)]
330pub enum DCDC_OVERLOAD_WAKEUP_A {
331    #[doc = "0: DCDC overload has not triggered a wakeup event"]
332    WAKEUP_DCDC_OVERLOAD_NOT_SET = 0,
333    #[doc = "1: DCDC overload has triggered a wakeup event at least once"]
334    WAKEUP_DCDC_OVERLOAD_SET = 1,
335}
336impl From<DCDC_OVERLOAD_WAKEUP_A> for bool {
337    #[inline(always)]
338    fn from(variant: DCDC_OVERLOAD_WAKEUP_A) -> Self {
339        variant as u8 != 0
340    }
341}
342#[doc = "Reader of field `DCDC_OVERLOAD_WAKEUP`"]
343pub type DCDC_OVERLOAD_WAKEUP_R = crate::R<bool, DCDC_OVERLOAD_WAKEUP_A>;
344impl DCDC_OVERLOAD_WAKEUP_R {
345    #[doc = r"Get enumerated values variant"]
346    #[inline(always)]
347    pub fn variant(&self) -> DCDC_OVERLOAD_WAKEUP_A {
348        match self.bits {
349            false => DCDC_OVERLOAD_WAKEUP_A::WAKEUP_DCDC_OVERLOAD_NOT_SET,
350            true => DCDC_OVERLOAD_WAKEUP_A::WAKEUP_DCDC_OVERLOAD_SET,
351        }
352    }
353    #[doc = "Checks if the value of the field is `WAKEUP_DCDC_OVERLOAD_NOT_SET`"]
354    #[inline(always)]
355    pub fn is_wakeup_dcdc_overload_not_set(&self) -> bool {
356        *self == DCDC_OVERLOAD_WAKEUP_A::WAKEUP_DCDC_OVERLOAD_NOT_SET
357    }
358    #[doc = "Checks if the value of the field is `WAKEUP_DCDC_OVERLOAD_SET`"]
359    #[inline(always)]
360    pub fn is_wakeup_dcdc_overload_set(&self) -> bool {
361        *self == DCDC_OVERLOAD_WAKEUP_A::WAKEUP_DCDC_OVERLOAD_SET
362    }
363}
364#[doc = "\n\nValue on reset: 0"]
365#[derive(Clone, Copy, Debug, PartialEq)]
366pub enum WAKEUP_PAD_WAKEUP_A {
367    #[doc = "0: Wakeup pad has not triggered a wakeup event"]
368    WAKEUP_PAD_EVENT_NOT_SET = 0,
369    #[doc = "1: Wakeup pad has triggered a wakeup event at least once"]
370    WAKEUP_PAD_EVENT_SET = 1,
371}
372impl From<WAKEUP_PAD_WAKEUP_A> for bool {
373    #[inline(always)]
374    fn from(variant: WAKEUP_PAD_WAKEUP_A) -> Self {
375        variant as u8 != 0
376    }
377}
378#[doc = "Reader of field `WAKEUP_PAD_WAKEUP`"]
379pub type WAKEUP_PAD_WAKEUP_R = crate::R<bool, WAKEUP_PAD_WAKEUP_A>;
380impl WAKEUP_PAD_WAKEUP_R {
381    #[doc = r"Get enumerated values variant"]
382    #[inline(always)]
383    pub fn variant(&self) -> WAKEUP_PAD_WAKEUP_A {
384        match self.bits {
385            false => WAKEUP_PAD_WAKEUP_A::WAKEUP_PAD_EVENT_NOT_SET,
386            true => WAKEUP_PAD_WAKEUP_A::WAKEUP_PAD_EVENT_SET,
387        }
388    }
389    #[doc = "Checks if the value of the field is `WAKEUP_PAD_EVENT_NOT_SET`"]
390    #[inline(always)]
391    pub fn is_wakeup_pad_event_not_set(&self) -> bool {
392        *self == WAKEUP_PAD_WAKEUP_A::WAKEUP_PAD_EVENT_NOT_SET
393    }
394    #[doc = "Checks if the value of the field is `WAKEUP_PAD_EVENT_SET`"]
395    #[inline(always)]
396    pub fn is_wakeup_pad_event_set(&self) -> bool {
397        *self == WAKEUP_PAD_WAKEUP_A::WAKEUP_PAD_EVENT_SET
398    }
399}
400#[doc = "\n\nValue on reset: 0"]
401#[derive(Clone, Copy, Debug, PartialEq)]
402pub enum RTC_ALARM_WAKEUP_A {
403    #[doc = "0: RTC alarm has not triggered a wakeup event"]
404    WAKEUP_RTC_ALARM_EVENT_NOT_SET = 0,
405    #[doc = "1: RTC alarm has triggered a wakeup event at least once"]
406    WAKEUP_RTC_ALARM_EVENT_SET = 1,
407}
408impl From<RTC_ALARM_WAKEUP_A> for bool {
409    #[inline(always)]
410    fn from(variant: RTC_ALARM_WAKEUP_A) -> Self {
411        variant as u8 != 0
412    }
413}
414#[doc = "Reader of field `RTC_ALARM_WAKEUP`"]
415pub type RTC_ALARM_WAKEUP_R = crate::R<bool, RTC_ALARM_WAKEUP_A>;
416impl RTC_ALARM_WAKEUP_R {
417    #[doc = r"Get enumerated values variant"]
418    #[inline(always)]
419    pub fn variant(&self) -> RTC_ALARM_WAKEUP_A {
420        match self.bits {
421            false => RTC_ALARM_WAKEUP_A::WAKEUP_RTC_ALARM_EVENT_NOT_SET,
422            true => RTC_ALARM_WAKEUP_A::WAKEUP_RTC_ALARM_EVENT_SET,
423        }
424    }
425    #[doc = "Checks if the value of the field is `WAKEUP_RTC_ALARM_EVENT_NOT_SET`"]
426    #[inline(always)]
427    pub fn is_wakeup_rtc_alarm_event_not_set(&self) -> bool {
428        *self == RTC_ALARM_WAKEUP_A::WAKEUP_RTC_ALARM_EVENT_NOT_SET
429    }
430    #[doc = "Checks if the value of the field is `WAKEUP_RTC_ALARM_EVENT_SET`"]
431    #[inline(always)]
432    pub fn is_wakeup_rtc_alarm_event_set(&self) -> bool {
433        *self == RTC_ALARM_WAKEUP_A::WAKEUP_RTC_ALARM_EVENT_SET
434    }
435}
436#[doc = "\n\nValue on reset: 0"]
437#[derive(Clone, Copy, Debug, PartialEq)]
438pub enum BB_TIMER_WAKEUP_A {
439    #[doc = "0: BB timer has not triggered a wakeup event"]
440    WAKEUP_BB_TIMER_EVENT_NOT_SET = 0,
441    #[doc = "1: BB timer has triggered a wakeup event at least once"]
442    WAKEUP_BB_TIMER_EVENT_SET = 1,
443}
444impl From<BB_TIMER_WAKEUP_A> for bool {
445    #[inline(always)]
446    fn from(variant: BB_TIMER_WAKEUP_A) -> Self {
447        variant as u8 != 0
448    }
449}
450#[doc = "Reader of field `BB_TIMER_WAKEUP`"]
451pub type BB_TIMER_WAKEUP_R = crate::R<bool, BB_TIMER_WAKEUP_A>;
452impl BB_TIMER_WAKEUP_R {
453    #[doc = r"Get enumerated values variant"]
454    #[inline(always)]
455    pub fn variant(&self) -> BB_TIMER_WAKEUP_A {
456        match self.bits {
457            false => BB_TIMER_WAKEUP_A::WAKEUP_BB_TIMER_EVENT_NOT_SET,
458            true => BB_TIMER_WAKEUP_A::WAKEUP_BB_TIMER_EVENT_SET,
459        }
460    }
461    #[doc = "Checks if the value of the field is `WAKEUP_BB_TIMER_EVENT_NOT_SET`"]
462    #[inline(always)]
463    pub fn is_wakeup_bb_timer_event_not_set(&self) -> bool {
464        *self == BB_TIMER_WAKEUP_A::WAKEUP_BB_TIMER_EVENT_NOT_SET
465    }
466    #[doc = "Checks if the value of the field is `WAKEUP_BB_TIMER_EVENT_SET`"]
467    #[inline(always)]
468    pub fn is_wakeup_bb_timer_event_set(&self) -> bool {
469        *self == BB_TIMER_WAKEUP_A::WAKEUP_BB_TIMER_EVENT_SET
470    }
471}
472#[doc = "\n\nValue on reset: 0"]
473#[derive(Clone, Copy, Debug, PartialEq)]
474pub enum DIO3_WAKEUP_A {
475    #[doc = "0: DIO3 has not triggered a wakeup event"]
476    WAKEUP_DIO3_EVENT_NOT_SET = 0,
477    #[doc = "1: DIO3 has triggered a wakeup event at least once"]
478    WAKEUP_DIO3_EVENT_SET = 1,
479}
480impl From<DIO3_WAKEUP_A> for bool {
481    #[inline(always)]
482    fn from(variant: DIO3_WAKEUP_A) -> Self {
483        variant as u8 != 0
484    }
485}
486#[doc = "Reader of field `DIO3_WAKEUP`"]
487pub type DIO3_WAKEUP_R = crate::R<bool, DIO3_WAKEUP_A>;
488impl DIO3_WAKEUP_R {
489    #[doc = r"Get enumerated values variant"]
490    #[inline(always)]
491    pub fn variant(&self) -> DIO3_WAKEUP_A {
492        match self.bits {
493            false => DIO3_WAKEUP_A::WAKEUP_DIO3_EVENT_NOT_SET,
494            true => DIO3_WAKEUP_A::WAKEUP_DIO3_EVENT_SET,
495        }
496    }
497    #[doc = "Checks if the value of the field is `WAKEUP_DIO3_EVENT_NOT_SET`"]
498    #[inline(always)]
499    pub fn is_wakeup_dio3_event_not_set(&self) -> bool {
500        *self == DIO3_WAKEUP_A::WAKEUP_DIO3_EVENT_NOT_SET
501    }
502    #[doc = "Checks if the value of the field is `WAKEUP_DIO3_EVENT_SET`"]
503    #[inline(always)]
504    pub fn is_wakeup_dio3_event_set(&self) -> bool {
505        *self == DIO3_WAKEUP_A::WAKEUP_DIO3_EVENT_SET
506    }
507}
508#[doc = "\n\nValue on reset: 0"]
509#[derive(Clone, Copy, Debug, PartialEq)]
510pub enum DIO2_WAKEUP_A {
511    #[doc = "0: DIO2 has not triggered a wakeup event"]
512    WAKEUP_DIO2_EVENT_NOT_SET = 0,
513    #[doc = "1: DIO2 has triggered a wakeup event at least once"]
514    WAKEUP_DIO2_EVENT_SET = 1,
515}
516impl From<DIO2_WAKEUP_A> for bool {
517    #[inline(always)]
518    fn from(variant: DIO2_WAKEUP_A) -> Self {
519        variant as u8 != 0
520    }
521}
522#[doc = "Reader of field `DIO2_WAKEUP`"]
523pub type DIO2_WAKEUP_R = crate::R<bool, DIO2_WAKEUP_A>;
524impl DIO2_WAKEUP_R {
525    #[doc = r"Get enumerated values variant"]
526    #[inline(always)]
527    pub fn variant(&self) -> DIO2_WAKEUP_A {
528        match self.bits {
529            false => DIO2_WAKEUP_A::WAKEUP_DIO2_EVENT_NOT_SET,
530            true => DIO2_WAKEUP_A::WAKEUP_DIO2_EVENT_SET,
531        }
532    }
533    #[doc = "Checks if the value of the field is `WAKEUP_DIO2_EVENT_NOT_SET`"]
534    #[inline(always)]
535    pub fn is_wakeup_dio2_event_not_set(&self) -> bool {
536        *self == DIO2_WAKEUP_A::WAKEUP_DIO2_EVENT_NOT_SET
537    }
538    #[doc = "Checks if the value of the field is `WAKEUP_DIO2_EVENT_SET`"]
539    #[inline(always)]
540    pub fn is_wakeup_dio2_event_set(&self) -> bool {
541        *self == DIO2_WAKEUP_A::WAKEUP_DIO2_EVENT_SET
542    }
543}
544#[doc = "\n\nValue on reset: 0"]
545#[derive(Clone, Copy, Debug, PartialEq)]
546pub enum DIO1_WAKEUP_A {
547    #[doc = "0: DIO1 has not triggered a wakeup event"]
548    WAKEUP_DIO1_EVENT_NOT_SET = 0,
549    #[doc = "1: DIO1 has triggered a wakeup event at least once"]
550    WAKEUP_DIO1_EVENT_SET = 1,
551}
552impl From<DIO1_WAKEUP_A> for bool {
553    #[inline(always)]
554    fn from(variant: DIO1_WAKEUP_A) -> Self {
555        variant as u8 != 0
556    }
557}
558#[doc = "Reader of field `DIO1_WAKEUP`"]
559pub type DIO1_WAKEUP_R = crate::R<bool, DIO1_WAKEUP_A>;
560impl DIO1_WAKEUP_R {
561    #[doc = r"Get enumerated values variant"]
562    #[inline(always)]
563    pub fn variant(&self) -> DIO1_WAKEUP_A {
564        match self.bits {
565            false => DIO1_WAKEUP_A::WAKEUP_DIO1_EVENT_NOT_SET,
566            true => DIO1_WAKEUP_A::WAKEUP_DIO1_EVENT_SET,
567        }
568    }
569    #[doc = "Checks if the value of the field is `WAKEUP_DIO1_EVENT_NOT_SET`"]
570    #[inline(always)]
571    pub fn is_wakeup_dio1_event_not_set(&self) -> bool {
572        *self == DIO1_WAKEUP_A::WAKEUP_DIO1_EVENT_NOT_SET
573    }
574    #[doc = "Checks if the value of the field is `WAKEUP_DIO1_EVENT_SET`"]
575    #[inline(always)]
576    pub fn is_wakeup_dio1_event_set(&self) -> bool {
577        *self == DIO1_WAKEUP_A::WAKEUP_DIO1_EVENT_SET
578    }
579}
580#[doc = "\n\nValue on reset: 0"]
581#[derive(Clone, Copy, Debug, PartialEq)]
582pub enum DIO0_WAKEUP_A {
583    #[doc = "0: DIO0 has not triggered a wakeup event"]
584    WAKEUP_DIO0_EVENT_NOT_SET = 0,
585    #[doc = "1: DIO0 has triggered a wakeup event at least once"]
586    WAKEUP_DIO0_EVENT_SET = 1,
587}
588impl From<DIO0_WAKEUP_A> for bool {
589    #[inline(always)]
590    fn from(variant: DIO0_WAKEUP_A) -> Self {
591        variant as u8 != 0
592    }
593}
594#[doc = "Reader of field `DIO0_WAKEUP`"]
595pub type DIO0_WAKEUP_R = crate::R<bool, DIO0_WAKEUP_A>;
596impl DIO0_WAKEUP_R {
597    #[doc = r"Get enumerated values variant"]
598    #[inline(always)]
599    pub fn variant(&self) -> DIO0_WAKEUP_A {
600        match self.bits {
601            false => DIO0_WAKEUP_A::WAKEUP_DIO0_EVENT_NOT_SET,
602            true => DIO0_WAKEUP_A::WAKEUP_DIO0_EVENT_SET,
603        }
604    }
605    #[doc = "Checks if the value of the field is `WAKEUP_DIO0_EVENT_NOT_SET`"]
606    #[inline(always)]
607    pub fn is_wakeup_dio0_event_not_set(&self) -> bool {
608        *self == DIO0_WAKEUP_A::WAKEUP_DIO0_EVENT_NOT_SET
609    }
610    #[doc = "Checks if the value of the field is `WAKEUP_DIO0_EVENT_SET`"]
611    #[inline(always)]
612    pub fn is_wakeup_dio0_event_set(&self) -> bool {
613        *self == DIO0_WAKEUP_A::WAKEUP_DIO0_EVENT_SET
614    }
615}
616#[doc = "\n\nValue on reset: 0"]
617#[derive(Clone, Copy, Debug, PartialEq)]
618pub enum DCDC_OVERLOAD_CLEAR_AW {
619    #[doc = "1: Reset the sticky WAKEUP_DCDC_OVERLOAD flag"]
620    WAKEUP_DCDC_OVERLOAD_CLEAR = 1,
621}
622impl From<DCDC_OVERLOAD_CLEAR_AW> for bool {
623    #[inline(always)]
624    fn from(variant: DCDC_OVERLOAD_CLEAR_AW) -> Self {
625        variant as u8 != 0
626    }
627}
628#[doc = "Write proxy for field `DCDC_OVERLOAD_CLEAR`"]
629pub struct DCDC_OVERLOAD_CLEAR_W<'a> {
630    w: &'a mut W,
631}
632impl<'a> DCDC_OVERLOAD_CLEAR_W<'a> {
633    #[doc = r"Writes `variant` to the field"]
634    #[inline(always)]
635    pub fn variant(self, variant: DCDC_OVERLOAD_CLEAR_AW) -> &'a mut W {
636        {
637            self.bit(variant.into())
638        }
639    }
640    #[doc = "Reset the sticky WAKEUP_DCDC_OVERLOAD flag"]
641    #[inline(always)]
642    pub fn wakeup_dcdc_overload_clear(self) -> &'a mut W {
643        self.variant(DCDC_OVERLOAD_CLEAR_AW::WAKEUP_DCDC_OVERLOAD_CLEAR)
644    }
645    #[doc = r"Sets the field bit"]
646    #[inline(always)]
647    pub fn set_bit(self) -> &'a mut W {
648        self.bit(true)
649    }
650    #[doc = r"Clears the field bit"]
651    #[inline(always)]
652    pub fn clear_bit(self) -> &'a mut W {
653        self.bit(false)
654    }
655    #[doc = r"Writes raw bits to the field"]
656    #[inline(always)]
657    pub fn bit(self, value: bool) -> &'a mut W {
658        self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7);
659        self.w
660    }
661}
662#[doc = "\n\nValue on reset: 0"]
663#[derive(Clone, Copy, Debug, PartialEq)]
664pub enum WAKEUP_PAD_WAKEUP_CLEAR_AW {
665    #[doc = "1: Reset the sticky WAKEUP_PAD_WAKEUP flag"]
666    WAKEUP_PAD_EVENT_CLEAR = 1,
667}
668impl From<WAKEUP_PAD_WAKEUP_CLEAR_AW> for bool {
669    #[inline(always)]
670    fn from(variant: WAKEUP_PAD_WAKEUP_CLEAR_AW) -> Self {
671        variant as u8 != 0
672    }
673}
674#[doc = "Write proxy for field `WAKEUP_PAD_WAKEUP_CLEAR`"]
675pub struct WAKEUP_PAD_WAKEUP_CLEAR_W<'a> {
676    w: &'a mut W,
677}
678impl<'a> WAKEUP_PAD_WAKEUP_CLEAR_W<'a> {
679    #[doc = r"Writes `variant` to the field"]
680    #[inline(always)]
681    pub fn variant(self, variant: WAKEUP_PAD_WAKEUP_CLEAR_AW) -> &'a mut W {
682        {
683            self.bit(variant.into())
684        }
685    }
686    #[doc = "Reset the sticky WAKEUP_PAD_WAKEUP flag"]
687    #[inline(always)]
688    pub fn wakeup_pad_event_clear(self) -> &'a mut W {
689        self.variant(WAKEUP_PAD_WAKEUP_CLEAR_AW::WAKEUP_PAD_EVENT_CLEAR)
690    }
691    #[doc = r"Sets the field bit"]
692    #[inline(always)]
693    pub fn set_bit(self) -> &'a mut W {
694        self.bit(true)
695    }
696    #[doc = r"Clears the field bit"]
697    #[inline(always)]
698    pub fn clear_bit(self) -> &'a mut W {
699        self.bit(false)
700    }
701    #[doc = r"Writes raw bits to the field"]
702    #[inline(always)]
703    pub fn bit(self, value: bool) -> &'a mut W {
704        self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6);
705        self.w
706    }
707}
708#[doc = "\n\nValue on reset: 0"]
709#[derive(Clone, Copy, Debug, PartialEq)]
710pub enum RTC_ALARM_WAKEUP_CLEAR_AW {
711    #[doc = "1: Reset the sticky WAKEUP_RTC_ALARM flag"]
712    WAKEUP_RTC_ALARM_CLEAR = 1,
713}
714impl From<RTC_ALARM_WAKEUP_CLEAR_AW> for bool {
715    #[inline(always)]
716    fn from(variant: RTC_ALARM_WAKEUP_CLEAR_AW) -> Self {
717        variant as u8 != 0
718    }
719}
720#[doc = "Write proxy for field `RTC_ALARM_WAKEUP_CLEAR`"]
721pub struct RTC_ALARM_WAKEUP_CLEAR_W<'a> {
722    w: &'a mut W,
723}
724impl<'a> RTC_ALARM_WAKEUP_CLEAR_W<'a> {
725    #[doc = r"Writes `variant` to the field"]
726    #[inline(always)]
727    pub fn variant(self, variant: RTC_ALARM_WAKEUP_CLEAR_AW) -> &'a mut W {
728        {
729            self.bit(variant.into())
730        }
731    }
732    #[doc = "Reset the sticky WAKEUP_RTC_ALARM flag"]
733    #[inline(always)]
734    pub fn wakeup_rtc_alarm_clear(self) -> &'a mut W {
735        self.variant(RTC_ALARM_WAKEUP_CLEAR_AW::WAKEUP_RTC_ALARM_CLEAR)
736    }
737    #[doc = r"Sets the field bit"]
738    #[inline(always)]
739    pub fn set_bit(self) -> &'a mut W {
740        self.bit(true)
741    }
742    #[doc = r"Clears the field bit"]
743    #[inline(always)]
744    pub fn clear_bit(self) -> &'a mut W {
745        self.bit(false)
746    }
747    #[doc = r"Writes raw bits to the field"]
748    #[inline(always)]
749    pub fn bit(self, value: bool) -> &'a mut W {
750        self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5);
751        self.w
752    }
753}
754#[doc = "\n\nValue on reset: 0"]
755#[derive(Clone, Copy, Debug, PartialEq)]
756pub enum BB_TIMER_WAKEUP_CLEAR_AW {
757    #[doc = "1: Reset the sticky WAKEUP_BB_TIMER flag"]
758    WAKEUP_BB_TIMER_CLEAR = 1,
759}
760impl From<BB_TIMER_WAKEUP_CLEAR_AW> for bool {
761    #[inline(always)]
762    fn from(variant: BB_TIMER_WAKEUP_CLEAR_AW) -> Self {
763        variant as u8 != 0
764    }
765}
766#[doc = "Write proxy for field `BB_TIMER_WAKEUP_CLEAR`"]
767pub struct BB_TIMER_WAKEUP_CLEAR_W<'a> {
768    w: &'a mut W,
769}
770impl<'a> BB_TIMER_WAKEUP_CLEAR_W<'a> {
771    #[doc = r"Writes `variant` to the field"]
772    #[inline(always)]
773    pub fn variant(self, variant: BB_TIMER_WAKEUP_CLEAR_AW) -> &'a mut W {
774        {
775            self.bit(variant.into())
776        }
777    }
778    #[doc = "Reset the sticky WAKEUP_BB_TIMER flag"]
779    #[inline(always)]
780    pub fn wakeup_bb_timer_clear(self) -> &'a mut W {
781        self.variant(BB_TIMER_WAKEUP_CLEAR_AW::WAKEUP_BB_TIMER_CLEAR)
782    }
783    #[doc = r"Sets the field bit"]
784    #[inline(always)]
785    pub fn set_bit(self) -> &'a mut W {
786        self.bit(true)
787    }
788    #[doc = r"Clears the field bit"]
789    #[inline(always)]
790    pub fn clear_bit(self) -> &'a mut W {
791        self.bit(false)
792    }
793    #[doc = r"Writes raw bits to the field"]
794    #[inline(always)]
795    pub fn bit(self, value: bool) -> &'a mut W {
796        self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
797        self.w
798    }
799}
800#[doc = "\n\nValue on reset: 0"]
801#[derive(Clone, Copy, Debug, PartialEq)]
802pub enum DIO3_WAKEUP_CLEAR_AW {
803    #[doc = "1: Reset the sticky WAKEUP_DIO3_EVENT flag"]
804    WAKEUP_DIO3_EVENT_CLEAR = 1,
805}
806impl From<DIO3_WAKEUP_CLEAR_AW> for bool {
807    #[inline(always)]
808    fn from(variant: DIO3_WAKEUP_CLEAR_AW) -> Self {
809        variant as u8 != 0
810    }
811}
812#[doc = "Write proxy for field `DIO3_WAKEUP_CLEAR`"]
813pub struct DIO3_WAKEUP_CLEAR_W<'a> {
814    w: &'a mut W,
815}
816impl<'a> DIO3_WAKEUP_CLEAR_W<'a> {
817    #[doc = r"Writes `variant` to the field"]
818    #[inline(always)]
819    pub fn variant(self, variant: DIO3_WAKEUP_CLEAR_AW) -> &'a mut W {
820        {
821            self.bit(variant.into())
822        }
823    }
824    #[doc = "Reset the sticky WAKEUP_DIO3_EVENT flag"]
825    #[inline(always)]
826    pub fn wakeup_dio3_event_clear(self) -> &'a mut W {
827        self.variant(DIO3_WAKEUP_CLEAR_AW::WAKEUP_DIO3_EVENT_CLEAR)
828    }
829    #[doc = r"Sets the field bit"]
830    #[inline(always)]
831    pub fn set_bit(self) -> &'a mut W {
832        self.bit(true)
833    }
834    #[doc = r"Clears the field bit"]
835    #[inline(always)]
836    pub fn clear_bit(self) -> &'a mut W {
837        self.bit(false)
838    }
839    #[doc = r"Writes raw bits to the field"]
840    #[inline(always)]
841    pub fn bit(self, value: bool) -> &'a mut W {
842        self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3);
843        self.w
844    }
845}
846#[doc = "\n\nValue on reset: 0"]
847#[derive(Clone, Copy, Debug, PartialEq)]
848pub enum DIO2_WAKEUP_CLEAR_AW {
849    #[doc = "1: Reset the sticky WAKEUP_DIO2_EVENT flag"]
850    WAKEUP_DIO2_EVENT_CLEAR = 1,
851}
852impl From<DIO2_WAKEUP_CLEAR_AW> for bool {
853    #[inline(always)]
854    fn from(variant: DIO2_WAKEUP_CLEAR_AW) -> Self {
855        variant as u8 != 0
856    }
857}
858#[doc = "Write proxy for field `DIO2_WAKEUP_CLEAR`"]
859pub struct DIO2_WAKEUP_CLEAR_W<'a> {
860    w: &'a mut W,
861}
862impl<'a> DIO2_WAKEUP_CLEAR_W<'a> {
863    #[doc = r"Writes `variant` to the field"]
864    #[inline(always)]
865    pub fn variant(self, variant: DIO2_WAKEUP_CLEAR_AW) -> &'a mut W {
866        {
867            self.bit(variant.into())
868        }
869    }
870    #[doc = "Reset the sticky WAKEUP_DIO2_EVENT flag"]
871    #[inline(always)]
872    pub fn wakeup_dio2_event_clear(self) -> &'a mut W {
873        self.variant(DIO2_WAKEUP_CLEAR_AW::WAKEUP_DIO2_EVENT_CLEAR)
874    }
875    #[doc = r"Sets the field bit"]
876    #[inline(always)]
877    pub fn set_bit(self) -> &'a mut W {
878        self.bit(true)
879    }
880    #[doc = r"Clears the field bit"]
881    #[inline(always)]
882    pub fn clear_bit(self) -> &'a mut W {
883        self.bit(false)
884    }
885    #[doc = r"Writes raw bits to the field"]
886    #[inline(always)]
887    pub fn bit(self, value: bool) -> &'a mut W {
888        self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
889        self.w
890    }
891}
892#[doc = "\n\nValue on reset: 0"]
893#[derive(Clone, Copy, Debug, PartialEq)]
894pub enum DIO1_WAKEUP_CLEAR_AW {
895    #[doc = "1: Reset the sticky WAKEUP_DIO1_EVENT flag"]
896    WAKEUP_DIO1_EVENT_CLEAR = 1,
897}
898impl From<DIO1_WAKEUP_CLEAR_AW> for bool {
899    #[inline(always)]
900    fn from(variant: DIO1_WAKEUP_CLEAR_AW) -> Self {
901        variant as u8 != 0
902    }
903}
904#[doc = "Write proxy for field `DIO1_WAKEUP_CLEAR`"]
905pub struct DIO1_WAKEUP_CLEAR_W<'a> {
906    w: &'a mut W,
907}
908impl<'a> DIO1_WAKEUP_CLEAR_W<'a> {
909    #[doc = r"Writes `variant` to the field"]
910    #[inline(always)]
911    pub fn variant(self, variant: DIO1_WAKEUP_CLEAR_AW) -> &'a mut W {
912        {
913            self.bit(variant.into())
914        }
915    }
916    #[doc = "Reset the sticky WAKEUP_DIO1_EVENT flag"]
917    #[inline(always)]
918    pub fn wakeup_dio1_event_clear(self) -> &'a mut W {
919        self.variant(DIO1_WAKEUP_CLEAR_AW::WAKEUP_DIO1_EVENT_CLEAR)
920    }
921    #[doc = r"Sets the field bit"]
922    #[inline(always)]
923    pub fn set_bit(self) -> &'a mut W {
924        self.bit(true)
925    }
926    #[doc = r"Clears the field bit"]
927    #[inline(always)]
928    pub fn clear_bit(self) -> &'a mut W {
929        self.bit(false)
930    }
931    #[doc = r"Writes raw bits to the field"]
932    #[inline(always)]
933    pub fn bit(self, value: bool) -> &'a mut W {
934        self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1);
935        self.w
936    }
937}
938#[doc = "\n\nValue on reset: 0"]
939#[derive(Clone, Copy, Debug, PartialEq)]
940pub enum DIO0_WAKEUP_CLEAR_AW {
941    #[doc = "1: Reset the sticky WAKEUP_DIO0_EVENT flag"]
942    WAKEUP_DIO0_EVENT_CLEAR = 1,
943}
944impl From<DIO0_WAKEUP_CLEAR_AW> for bool {
945    #[inline(always)]
946    fn from(variant: DIO0_WAKEUP_CLEAR_AW) -> Self {
947        variant as u8 != 0
948    }
949}
950#[doc = "Write proxy for field `DIO0_WAKEUP_CLEAR`"]
951pub struct DIO0_WAKEUP_CLEAR_W<'a> {
952    w: &'a mut W,
953}
954impl<'a> DIO0_WAKEUP_CLEAR_W<'a> {
955    #[doc = r"Writes `variant` to the field"]
956    #[inline(always)]
957    pub fn variant(self, variant: DIO0_WAKEUP_CLEAR_AW) -> &'a mut W {
958        {
959            self.bit(variant.into())
960        }
961    }
962    #[doc = "Reset the sticky WAKEUP_DIO0_EVENT flag"]
963    #[inline(always)]
964    pub fn wakeup_dio0_event_clear(self) -> &'a mut W {
965        self.variant(DIO0_WAKEUP_CLEAR_AW::WAKEUP_DIO0_EVENT_CLEAR)
966    }
967    #[doc = r"Sets the field bit"]
968    #[inline(always)]
969    pub fn set_bit(self) -> &'a mut W {
970        self.bit(true)
971    }
972    #[doc = r"Clears the field bit"]
973    #[inline(always)]
974    pub fn clear_bit(self) -> &'a mut W {
975        self.bit(false)
976    }
977    #[doc = r"Writes raw bits to the field"]
978    #[inline(always)]
979    pub fn bit(self, value: bool) -> &'a mut W {
980        self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
981        self.w
982    }
983}
984impl R {
985    #[doc = "Bit 24 - Enable / Disable the retention mode of the pads"]
986    #[inline(always)]
987    pub fn pads_retention_en(&self) -> PADS_RETENTION_EN_R {
988        PADS_RETENTION_EN_R::new(((self.bits >> 24) & 0x01) != 0)
989    }
990    #[doc = "Bit 20 - Boot mode flag"]
991    #[inline(always)]
992    pub fn boot_flash_app_reboot(&self) -> BOOT_FLASH_APP_REBOOT_R {
993        BOOT_FLASH_APP_REBOOT_R::new(((self.bits >> 20) & 0x01) != 0)
994    }
995    #[doc = "Bit 19 - RC oscillator clock multiplier read only flag (mirror of CLOCK_MULT of ACS_RCOSC_CTRL register)"]
996    #[inline(always)]
997    pub fn rc_clock_mult(&self) -> RC_CLOCK_MULT_R {
998        RC_CLOCK_MULT_R::new(((self.bits >> 19) & 0x01) != 0)
999    }
1000    #[doc = "Bit 18 - RC oscillator trimming read only flag (mirror of FTRIM_FLAG of ACS_RCOSC_CTRL register"]
1001    #[inline(always)]
1002    pub fn rc_ftrim_flag(&self) -> RC_FTRIM_FLAG_R {
1003        RC_FTRIM_FLAG_R::new(((self.bits >> 18) & 0x01) != 0)
1004    }
1005    #[doc = "Bits 16:17 - Boot selection to indicate boot source"]
1006    #[inline(always)]
1007    pub fn boot_select(&self) -> BOOT_SELECT_R {
1008        BOOT_SELECT_R::new(((self.bits >> 16) & 0x03) as u8)
1009    }
1010    #[doc = "Bit 15"]
1011    #[inline(always)]
1012    pub fn dcdc_overload_wakeup(&self) -> DCDC_OVERLOAD_WAKEUP_R {
1013        DCDC_OVERLOAD_WAKEUP_R::new(((self.bits >> 15) & 0x01) != 0)
1014    }
1015    #[doc = "Bit 14"]
1016    #[inline(always)]
1017    pub fn wakeup_pad_wakeup(&self) -> WAKEUP_PAD_WAKEUP_R {
1018        WAKEUP_PAD_WAKEUP_R::new(((self.bits >> 14) & 0x01) != 0)
1019    }
1020    #[doc = "Bit 13"]
1021    #[inline(always)]
1022    pub fn rtc_alarm_wakeup(&self) -> RTC_ALARM_WAKEUP_R {
1023        RTC_ALARM_WAKEUP_R::new(((self.bits >> 13) & 0x01) != 0)
1024    }
1025    #[doc = "Bit 12"]
1026    #[inline(always)]
1027    pub fn bb_timer_wakeup(&self) -> BB_TIMER_WAKEUP_R {
1028        BB_TIMER_WAKEUP_R::new(((self.bits >> 12) & 0x01) != 0)
1029    }
1030    #[doc = "Bit 11"]
1031    #[inline(always)]
1032    pub fn dio3_wakeup(&self) -> DIO3_WAKEUP_R {
1033        DIO3_WAKEUP_R::new(((self.bits >> 11) & 0x01) != 0)
1034    }
1035    #[doc = "Bit 10"]
1036    #[inline(always)]
1037    pub fn dio2_wakeup(&self) -> DIO2_WAKEUP_R {
1038        DIO2_WAKEUP_R::new(((self.bits >> 10) & 0x01) != 0)
1039    }
1040    #[doc = "Bit 9"]
1041    #[inline(always)]
1042    pub fn dio1_wakeup(&self) -> DIO1_WAKEUP_R {
1043        DIO1_WAKEUP_R::new(((self.bits >> 9) & 0x01) != 0)
1044    }
1045    #[doc = "Bit 8"]
1046    #[inline(always)]
1047    pub fn dio0_wakeup(&self) -> DIO0_WAKEUP_R {
1048        DIO0_WAKEUP_R::new(((self.bits >> 8) & 0x01) != 0)
1049    }
1050}
1051impl W {
1052    #[doc = "Bit 24 - Enable / Disable the retention mode of the pads"]
1053    #[inline(always)]
1054    pub fn pads_retention_en(&mut self) -> PADS_RETENTION_EN_W {
1055        PADS_RETENTION_EN_W { w: self }
1056    }
1057    #[doc = "Bit 20 - Boot mode flag"]
1058    #[inline(always)]
1059    pub fn boot_flash_app_reboot(&mut self) -> BOOT_FLASH_APP_REBOOT_W {
1060        BOOT_FLASH_APP_REBOOT_W { w: self }
1061    }
1062    #[doc = "Bits 16:17 - Boot selection to indicate boot source"]
1063    #[inline(always)]
1064    pub fn boot_select(&mut self) -> BOOT_SELECT_W {
1065        BOOT_SELECT_W { w: self }
1066    }
1067    #[doc = "Bit 7"]
1068    #[inline(always)]
1069    pub fn dcdc_overload_clear(&mut self) -> DCDC_OVERLOAD_CLEAR_W {
1070        DCDC_OVERLOAD_CLEAR_W { w: self }
1071    }
1072    #[doc = "Bit 6"]
1073    #[inline(always)]
1074    pub fn wakeup_pad_wakeup_clear(&mut self) -> WAKEUP_PAD_WAKEUP_CLEAR_W {
1075        WAKEUP_PAD_WAKEUP_CLEAR_W { w: self }
1076    }
1077    #[doc = "Bit 5"]
1078    #[inline(always)]
1079    pub fn rtc_alarm_wakeup_clear(&mut self) -> RTC_ALARM_WAKEUP_CLEAR_W {
1080        RTC_ALARM_WAKEUP_CLEAR_W { w: self }
1081    }
1082    #[doc = "Bit 4"]
1083    #[inline(always)]
1084    pub fn bb_timer_wakeup_clear(&mut self) -> BB_TIMER_WAKEUP_CLEAR_W {
1085        BB_TIMER_WAKEUP_CLEAR_W { w: self }
1086    }
1087    #[doc = "Bit 3"]
1088    #[inline(always)]
1089    pub fn dio3_wakeup_clear(&mut self) -> DIO3_WAKEUP_CLEAR_W {
1090        DIO3_WAKEUP_CLEAR_W { w: self }
1091    }
1092    #[doc = "Bit 2"]
1093    #[inline(always)]
1094    pub fn dio2_wakeup_clear(&mut self) -> DIO2_WAKEUP_CLEAR_W {
1095        DIO2_WAKEUP_CLEAR_W { w: self }
1096    }
1097    #[doc = "Bit 1"]
1098    #[inline(always)]
1099    pub fn dio1_wakeup_clear(&mut self) -> DIO1_WAKEUP_CLEAR_W {
1100        DIO1_WAKEUP_CLEAR_W { w: self }
1101    }
1102    #[doc = "Bit 0"]
1103    #[inline(always)]
1104    pub fn dio0_wakeup_clear(&mut self) -> DIO0_WAKEUP_CLEAR_W {
1105        DIO0_WAKEUP_CLEAR_W { w: self }
1106    }
1107}