1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
#[doc = "Register `SCR` writer"]
pub struct W(crate::W<SCR_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<SCR_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::ops::DerefMut for W {
    #[inline(always)]
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.0
    }
}
impl From<crate::W<SCR_SPEC>> for W {
    #[inline(always)]
    fn from(writer: crate::W<SCR_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Field `CC2HF` writer - lear CPU2 Hold interrupt flag"]
pub type CC2HF_W<'a, const O: u8> = crate::BitWriter<'a, u32, SCR_SPEC, bool, O>;
#[doc = "Clear wakeup Radio BUSY flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CWRFBUSYF_AW {
    #[doc = "1: Setting this bit clears the WRFBUSYF flag in the PWR_SR1. This bit is always read 0."]
    Clear = 1,
}
impl From<CWRFBUSYF_AW> for bool {
    #[inline(always)]
    fn from(variant: CWRFBUSYF_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `CWRFBUSYF` writer - Clear wakeup Radio BUSY flag"]
pub type CWRFBUSYF_W<'a, const O: u8> = crate::BitWriter<'a, u32, SCR_SPEC, CWRFBUSYF_AW, O>;
impl<'a, const O: u8> CWRFBUSYF_W<'a, O> {
    #[doc = "Setting this bit clears the WRFBUSYF flag in the PWR_SR1. This bit is always read 0."]
    #[inline(always)]
    pub fn clear(self) -> &'a mut W {
        self.variant(CWRFBUSYF_AW::Clear)
    }
}
#[doc = "Clear wakeup PVD interrupt flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CWPVDF_AW {
    #[doc = "1: Setting this bit clears the WPVDF flag in the PWR_SR1. This bit is always read as 0."]
    Clear = 1,
}
impl From<CWPVDF_AW> for bool {
    #[inline(always)]
    fn from(variant: CWPVDF_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `CWPVDF` writer - Clear wakeup PVD interrupt flag"]
pub type CWPVDF_W<'a, const O: u8> = crate::BitWriter<'a, u32, SCR_SPEC, CWPVDF_AW, O>;
impl<'a, const O: u8> CWPVDF_W<'a, O> {
    #[doc = "Setting this bit clears the WPVDF flag in the PWR_SR1. This bit is always read as 0."]
    #[inline(always)]
    pub fn clear(self) -> &'a mut W {
        self.variant(CWPVDF_AW::Clear)
    }
}
#[doc = "Clear wakeup flag 3\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CWUF3_AW {
    #[doc = "1: Setting this bit clears the WUF3 flag in the PWR_SR1 register. This bit is always read as 0."]
    Clear = 1,
}
impl From<CWUF3_AW> for bool {
    #[inline(always)]
    fn from(variant: CWUF3_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `CWUF3` writer - Clear wakeup flag 3"]
pub type CWUF3_W<'a, const O: u8> = crate::BitWriter<'a, u32, SCR_SPEC, CWUF3_AW, O>;
impl<'a, const O: u8> CWUF3_W<'a, O> {
    #[doc = "Setting this bit clears the WUF3 flag in the PWR_SR1 register. This bit is always read as 0."]
    #[inline(always)]
    pub fn clear(self) -> &'a mut W {
        self.variant(CWUF3_AW::Clear)
    }
}
#[doc = "Clear wakeup flag 2\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CWUF2_AW {
    #[doc = "1: Setting this bit clears the WUF2 flag in the PWR_SR1 register. This bit is always read as 0."]
    Clear = 1,
}
impl From<CWUF2_AW> for bool {
    #[inline(always)]
    fn from(variant: CWUF2_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `CWUF2` writer - Clear wakeup flag 2"]
pub type CWUF2_W<'a, const O: u8> = crate::BitWriter<'a, u32, SCR_SPEC, CWUF2_AW, O>;
impl<'a, const O: u8> CWUF2_W<'a, O> {
    #[doc = "Setting this bit clears the WUF2 flag in the PWR_SR1 register. This bit is always read as 0."]
    #[inline(always)]
    pub fn clear(self) -> &'a mut W {
        self.variant(CWUF2_AW::Clear)
    }
}
#[doc = "Clear wakeup flag 1\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CWUF1_AW {
    #[doc = "1: Setting this bit clears the WUF1 flag in the PWR_SR1 register. This bit is always read as 0."]
    Clear = 1,
}
impl From<CWUF1_AW> for bool {
    #[inline(always)]
    fn from(variant: CWUF1_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `CWUF1` writer - Clear wakeup flag 1"]
pub type CWUF1_W<'a, const O: u8> = crate::BitWriter<'a, u32, SCR_SPEC, CWUF1_AW, O>;
impl<'a, const O: u8> CWUF1_W<'a, O> {
    #[doc = "Setting this bit clears the WUF1 flag in the PWR_SR1 register. This bit is always read as 0."]
    #[inline(always)]
    pub fn clear(self) -> &'a mut W {
        self.variant(CWUF1_AW::Clear)
    }
}
impl W {
    #[doc = "Bit 14 - lear CPU2 Hold interrupt flag"]
    #[inline(always)]
    pub fn cc2hf(&mut self) -> CC2HF_W<14> {
        CC2HF_W::new(self)
    }
    #[doc = "Bit 11 - Clear wakeup Radio BUSY flag"]
    #[inline(always)]
    pub fn cwrfbusyf(&mut self) -> CWRFBUSYF_W<11> {
        CWRFBUSYF_W::new(self)
    }
    #[doc = "Bit 8 - Clear wakeup PVD interrupt flag"]
    #[inline(always)]
    pub fn cwpvdf(&mut self) -> CWPVDF_W<8> {
        CWPVDF_W::new(self)
    }
    #[doc = "Bit 2 - Clear wakeup flag 3"]
    #[inline(always)]
    pub fn cwuf3(&mut self) -> CWUF3_W<2> {
        CWUF3_W::new(self)
    }
    #[doc = "Bit 1 - Clear wakeup flag 2"]
    #[inline(always)]
    pub fn cwuf2(&mut self) -> CWUF2_W<1> {
        CWUF2_W::new(self)
    }
    #[doc = "Bit 0 - Clear wakeup flag 1"]
    #[inline(always)]
    pub fn cwuf1(&mut self) -> CWUF1_W<0> {
        CWUF1_W::new(self)
    }
    #[doc = "Writes raw bits to the register."]
    #[inline(always)]
    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
        self.0.bits(bits);
        self
    }
}
#[doc = "Power status clear register\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [scr](index.html) module"]
pub struct SCR_SPEC;
impl crate::RegisterSpec for SCR_SPEC {
    type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [scr::W](W) writer structure"]
impl crate::Writable for SCR_SPEC {
    type Writer = W;
}
#[doc = "`reset()` method sets SCR to value 0"]
impl crate::Resettable for SCR_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0
    }
}