1#[doc = "Register `PWC` reader"]
2pub type R = crate::R<PWC_SPEC>;
3#[doc = "Register `PWC` writer"]
4pub type W = crate::W<PWC_SPEC>;
5#[doc = "Field `FASTMEM_FORCE_NOISO` reader - Fast RTC memory force no ISO"]
6pub type FASTMEM_FORCE_NOISO_R = crate::BitReader;
7#[doc = "Field `FASTMEM_FORCE_NOISO` writer - Fast RTC memory force no ISO"]
8pub type FASTMEM_FORCE_NOISO_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `FASTMEM_FORCE_ISO` reader - Fast RTC memory force ISO"]
10pub type FASTMEM_FORCE_ISO_R = crate::BitReader;
11#[doc = "Field `FASTMEM_FORCE_ISO` writer - Fast RTC memory force ISO"]
12pub type FASTMEM_FORCE_ISO_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `SLOWMEM_FORCE_NOISO` reader - RTC memory force no ISO"]
14pub type SLOWMEM_FORCE_NOISO_R = crate::BitReader;
15#[doc = "Field `SLOWMEM_FORCE_NOISO` writer - RTC memory force no ISO"]
16pub type SLOWMEM_FORCE_NOISO_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `SLOWMEM_FORCE_ISO` reader - RTC memory force ISO"]
18pub type SLOWMEM_FORCE_ISO_R = crate::BitReader;
19#[doc = "Field `SLOWMEM_FORCE_ISO` writer - RTC memory force ISO"]
20pub type SLOWMEM_FORCE_ISO_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `FORCE_ISO` reader - rtc_peri force ISO"]
22pub type FORCE_ISO_R = crate::BitReader;
23#[doc = "Field `FORCE_ISO` writer - rtc_peri force ISO"]
24pub type FORCE_ISO_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `FORCE_NOISO` reader - rtc_peri force no ISO"]
26pub type FORCE_NOISO_R = crate::BitReader;
27#[doc = "Field `FORCE_NOISO` writer - rtc_peri force no ISO"]
28pub type FORCE_NOISO_W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `FASTMEM_FOLW_CPU` reader - 1: Fast RTC memory PD following CPU 0: fast RTC memory PD following RTC state machine"]
30pub type FASTMEM_FOLW_CPU_R = crate::BitReader;
31#[doc = "Field `FASTMEM_FOLW_CPU` writer - 1: Fast RTC memory PD following CPU 0: fast RTC memory PD following RTC state machine"]
32pub type FASTMEM_FOLW_CPU_W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `FASTMEM_FORCE_LPD` reader - Fast RTC memory force PD"]
34pub type FASTMEM_FORCE_LPD_R = crate::BitReader;
35#[doc = "Field `FASTMEM_FORCE_LPD` writer - Fast RTC memory force PD"]
36pub type FASTMEM_FORCE_LPD_W<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `FASTMEM_FORCE_LPU` reader - Fast RTC memory force no PD"]
38pub type FASTMEM_FORCE_LPU_R = crate::BitReader;
39#[doc = "Field `FASTMEM_FORCE_LPU` writer - Fast RTC memory force no PD"]
40pub type FASTMEM_FORCE_LPU_W<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `SLOWMEM_FOLW_CPU` reader - 1: RTC memory PD following CPU 0: RTC memory PD following RTC state machine"]
42pub type SLOWMEM_FOLW_CPU_R = crate::BitReader;
43#[doc = "Field `SLOWMEM_FOLW_CPU` writer - 1: RTC memory PD following CPU 0: RTC memory PD following RTC state machine"]
44pub type SLOWMEM_FOLW_CPU_W<'a, REG> = crate::BitWriter<'a, REG>;
45#[doc = "Field `SLOWMEM_FORCE_LPD` reader - RTC memory force PD"]
46pub type SLOWMEM_FORCE_LPD_R = crate::BitReader;
47#[doc = "Field `SLOWMEM_FORCE_LPD` writer - RTC memory force PD"]
48pub type SLOWMEM_FORCE_LPD_W<'a, REG> = crate::BitWriter<'a, REG>;
49#[doc = "Field `SLOWMEM_FORCE_LPU` reader - RTC memory force no PD"]
50pub type SLOWMEM_FORCE_LPU_R = crate::BitReader;
51#[doc = "Field `SLOWMEM_FORCE_LPU` writer - RTC memory force no PD"]
52pub type SLOWMEM_FORCE_LPU_W<'a, REG> = crate::BitWriter<'a, REG>;
53#[doc = "Field `FASTMEM_FORCE_PD` reader - Fast RTC memory force power down"]
54pub type FASTMEM_FORCE_PD_R = crate::BitReader;
55#[doc = "Field `FASTMEM_FORCE_PD` writer - Fast RTC memory force power down"]
56pub type FASTMEM_FORCE_PD_W<'a, REG> = crate::BitWriter<'a, REG>;
57#[doc = "Field `FASTMEM_FORCE_PU` reader - Fast RTC memory force power up"]
58pub type FASTMEM_FORCE_PU_R = crate::BitReader;
59#[doc = "Field `FASTMEM_FORCE_PU` writer - Fast RTC memory force power up"]
60pub type FASTMEM_FORCE_PU_W<'a, REG> = crate::BitWriter<'a, REG>;
61#[doc = "Field `FASTMEM_PD_EN` reader - enable power down fast RTC memory in sleep"]
62pub type FASTMEM_PD_EN_R = crate::BitReader;
63#[doc = "Field `FASTMEM_PD_EN` writer - enable power down fast RTC memory in sleep"]
64pub type FASTMEM_PD_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
65#[doc = "Field `SLOWMEM_FORCE_PD` reader - RTC memory force power down"]
66pub type SLOWMEM_FORCE_PD_R = crate::BitReader;
67#[doc = "Field `SLOWMEM_FORCE_PD` writer - RTC memory force power down"]
68pub type SLOWMEM_FORCE_PD_W<'a, REG> = crate::BitWriter<'a, REG>;
69#[doc = "Field `SLOWMEM_FORCE_PU` reader - RTC memory force power up"]
70pub type SLOWMEM_FORCE_PU_R = crate::BitReader;
71#[doc = "Field `SLOWMEM_FORCE_PU` writer - RTC memory force power up"]
72pub type SLOWMEM_FORCE_PU_W<'a, REG> = crate::BitWriter<'a, REG>;
73#[doc = "Field `SLOWMEM_PD_EN` reader - enable power down RTC memory in sleep"]
74pub type SLOWMEM_PD_EN_R = crate::BitReader;
75#[doc = "Field `SLOWMEM_PD_EN` writer - enable power down RTC memory in sleep"]
76pub type SLOWMEM_PD_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
77#[doc = "Field `FORCE_PD` reader - rtc_peri force power down"]
78pub type FORCE_PD_R = crate::BitReader;
79#[doc = "Field `FORCE_PD` writer - rtc_peri force power down"]
80pub type FORCE_PD_W<'a, REG> = crate::BitWriter<'a, REG>;
81#[doc = "Field `FORCE_PU` reader - rtc_peri force power up"]
82pub type FORCE_PU_R = crate::BitReader;
83#[doc = "Field `FORCE_PU` writer - rtc_peri force power up"]
84pub type FORCE_PU_W<'a, REG> = crate::BitWriter<'a, REG>;
85#[doc = "Field `PD_EN` reader - enable power down rtc_peri in sleep"]
86pub type PD_EN_R = crate::BitReader;
87#[doc = "Field `PD_EN` writer - enable power down rtc_peri in sleep"]
88pub type PD_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
89impl R {
90 #[doc = "Bit 0 - Fast RTC memory force no ISO"]
91 #[inline(always)]
92 pub fn fastmem_force_noiso(&self) -> FASTMEM_FORCE_NOISO_R {
93 FASTMEM_FORCE_NOISO_R::new((self.bits & 1) != 0)
94 }
95 #[doc = "Bit 1 - Fast RTC memory force ISO"]
96 #[inline(always)]
97 pub fn fastmem_force_iso(&self) -> FASTMEM_FORCE_ISO_R {
98 FASTMEM_FORCE_ISO_R::new(((self.bits >> 1) & 1) != 0)
99 }
100 #[doc = "Bit 2 - RTC memory force no ISO"]
101 #[inline(always)]
102 pub fn slowmem_force_noiso(&self) -> SLOWMEM_FORCE_NOISO_R {
103 SLOWMEM_FORCE_NOISO_R::new(((self.bits >> 2) & 1) != 0)
104 }
105 #[doc = "Bit 3 - RTC memory force ISO"]
106 #[inline(always)]
107 pub fn slowmem_force_iso(&self) -> SLOWMEM_FORCE_ISO_R {
108 SLOWMEM_FORCE_ISO_R::new(((self.bits >> 3) & 1) != 0)
109 }
110 #[doc = "Bit 4 - rtc_peri force ISO"]
111 #[inline(always)]
112 pub fn force_iso(&self) -> FORCE_ISO_R {
113 FORCE_ISO_R::new(((self.bits >> 4) & 1) != 0)
114 }
115 #[doc = "Bit 5 - rtc_peri force no ISO"]
116 #[inline(always)]
117 pub fn force_noiso(&self) -> FORCE_NOISO_R {
118 FORCE_NOISO_R::new(((self.bits >> 5) & 1) != 0)
119 }
120 #[doc = "Bit 6 - 1: Fast RTC memory PD following CPU 0: fast RTC memory PD following RTC state machine"]
121 #[inline(always)]
122 pub fn fastmem_folw_cpu(&self) -> FASTMEM_FOLW_CPU_R {
123 FASTMEM_FOLW_CPU_R::new(((self.bits >> 6) & 1) != 0)
124 }
125 #[doc = "Bit 7 - Fast RTC memory force PD"]
126 #[inline(always)]
127 pub fn fastmem_force_lpd(&self) -> FASTMEM_FORCE_LPD_R {
128 FASTMEM_FORCE_LPD_R::new(((self.bits >> 7) & 1) != 0)
129 }
130 #[doc = "Bit 8 - Fast RTC memory force no PD"]
131 #[inline(always)]
132 pub fn fastmem_force_lpu(&self) -> FASTMEM_FORCE_LPU_R {
133 FASTMEM_FORCE_LPU_R::new(((self.bits >> 8) & 1) != 0)
134 }
135 #[doc = "Bit 9 - 1: RTC memory PD following CPU 0: RTC memory PD following RTC state machine"]
136 #[inline(always)]
137 pub fn slowmem_folw_cpu(&self) -> SLOWMEM_FOLW_CPU_R {
138 SLOWMEM_FOLW_CPU_R::new(((self.bits >> 9) & 1) != 0)
139 }
140 #[doc = "Bit 10 - RTC memory force PD"]
141 #[inline(always)]
142 pub fn slowmem_force_lpd(&self) -> SLOWMEM_FORCE_LPD_R {
143 SLOWMEM_FORCE_LPD_R::new(((self.bits >> 10) & 1) != 0)
144 }
145 #[doc = "Bit 11 - RTC memory force no PD"]
146 #[inline(always)]
147 pub fn slowmem_force_lpu(&self) -> SLOWMEM_FORCE_LPU_R {
148 SLOWMEM_FORCE_LPU_R::new(((self.bits >> 11) & 1) != 0)
149 }
150 #[doc = "Bit 12 - Fast RTC memory force power down"]
151 #[inline(always)]
152 pub fn fastmem_force_pd(&self) -> FASTMEM_FORCE_PD_R {
153 FASTMEM_FORCE_PD_R::new(((self.bits >> 12) & 1) != 0)
154 }
155 #[doc = "Bit 13 - Fast RTC memory force power up"]
156 #[inline(always)]
157 pub fn fastmem_force_pu(&self) -> FASTMEM_FORCE_PU_R {
158 FASTMEM_FORCE_PU_R::new(((self.bits >> 13) & 1) != 0)
159 }
160 #[doc = "Bit 14 - enable power down fast RTC memory in sleep"]
161 #[inline(always)]
162 pub fn fastmem_pd_en(&self) -> FASTMEM_PD_EN_R {
163 FASTMEM_PD_EN_R::new(((self.bits >> 14) & 1) != 0)
164 }
165 #[doc = "Bit 15 - RTC memory force power down"]
166 #[inline(always)]
167 pub fn slowmem_force_pd(&self) -> SLOWMEM_FORCE_PD_R {
168 SLOWMEM_FORCE_PD_R::new(((self.bits >> 15) & 1) != 0)
169 }
170 #[doc = "Bit 16 - RTC memory force power up"]
171 #[inline(always)]
172 pub fn slowmem_force_pu(&self) -> SLOWMEM_FORCE_PU_R {
173 SLOWMEM_FORCE_PU_R::new(((self.bits >> 16) & 1) != 0)
174 }
175 #[doc = "Bit 17 - enable power down RTC memory in sleep"]
176 #[inline(always)]
177 pub fn slowmem_pd_en(&self) -> SLOWMEM_PD_EN_R {
178 SLOWMEM_PD_EN_R::new(((self.bits >> 17) & 1) != 0)
179 }
180 #[doc = "Bit 18 - rtc_peri force power down"]
181 #[inline(always)]
182 pub fn force_pd(&self) -> FORCE_PD_R {
183 FORCE_PD_R::new(((self.bits >> 18) & 1) != 0)
184 }
185 #[doc = "Bit 19 - rtc_peri force power up"]
186 #[inline(always)]
187 pub fn force_pu(&self) -> FORCE_PU_R {
188 FORCE_PU_R::new(((self.bits >> 19) & 1) != 0)
189 }
190 #[doc = "Bit 20 - enable power down rtc_peri in sleep"]
191 #[inline(always)]
192 pub fn pd_en(&self) -> PD_EN_R {
193 PD_EN_R::new(((self.bits >> 20) & 1) != 0)
194 }
195}
196#[cfg(feature = "impl-register-debug")]
197impl core::fmt::Debug for R {
198 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
199 f.debug_struct("PWC")
200 .field("fastmem_force_noiso", &self.fastmem_force_noiso())
201 .field("fastmem_force_iso", &self.fastmem_force_iso())
202 .field("slowmem_force_noiso", &self.slowmem_force_noiso())
203 .field("slowmem_force_iso", &self.slowmem_force_iso())
204 .field("force_iso", &self.force_iso())
205 .field("force_noiso", &self.force_noiso())
206 .field("fastmem_folw_cpu", &self.fastmem_folw_cpu())
207 .field("fastmem_force_lpd", &self.fastmem_force_lpd())
208 .field("fastmem_force_lpu", &self.fastmem_force_lpu())
209 .field("slowmem_folw_cpu", &self.slowmem_folw_cpu())
210 .field("slowmem_force_lpd", &self.slowmem_force_lpd())
211 .field("slowmem_force_lpu", &self.slowmem_force_lpu())
212 .field("fastmem_force_pd", &self.fastmem_force_pd())
213 .field("fastmem_force_pu", &self.fastmem_force_pu())
214 .field("fastmem_pd_en", &self.fastmem_pd_en())
215 .field("slowmem_force_pd", &self.slowmem_force_pd())
216 .field("slowmem_force_pu", &self.slowmem_force_pu())
217 .field("slowmem_pd_en", &self.slowmem_pd_en())
218 .field("force_pd", &self.force_pd())
219 .field("force_pu", &self.force_pu())
220 .field("pd_en", &self.pd_en())
221 .finish()
222 }
223}
224impl W {
225 #[doc = "Bit 0 - Fast RTC memory force no ISO"]
226 #[inline(always)]
227 pub fn fastmem_force_noiso(&mut self) -> FASTMEM_FORCE_NOISO_W<PWC_SPEC> {
228 FASTMEM_FORCE_NOISO_W::new(self, 0)
229 }
230 #[doc = "Bit 1 - Fast RTC memory force ISO"]
231 #[inline(always)]
232 pub fn fastmem_force_iso(&mut self) -> FASTMEM_FORCE_ISO_W<PWC_SPEC> {
233 FASTMEM_FORCE_ISO_W::new(self, 1)
234 }
235 #[doc = "Bit 2 - RTC memory force no ISO"]
236 #[inline(always)]
237 pub fn slowmem_force_noiso(&mut self) -> SLOWMEM_FORCE_NOISO_W<PWC_SPEC> {
238 SLOWMEM_FORCE_NOISO_W::new(self, 2)
239 }
240 #[doc = "Bit 3 - RTC memory force ISO"]
241 #[inline(always)]
242 pub fn slowmem_force_iso(&mut self) -> SLOWMEM_FORCE_ISO_W<PWC_SPEC> {
243 SLOWMEM_FORCE_ISO_W::new(self, 3)
244 }
245 #[doc = "Bit 4 - rtc_peri force ISO"]
246 #[inline(always)]
247 pub fn force_iso(&mut self) -> FORCE_ISO_W<PWC_SPEC> {
248 FORCE_ISO_W::new(self, 4)
249 }
250 #[doc = "Bit 5 - rtc_peri force no ISO"]
251 #[inline(always)]
252 pub fn force_noiso(&mut self) -> FORCE_NOISO_W<PWC_SPEC> {
253 FORCE_NOISO_W::new(self, 5)
254 }
255 #[doc = "Bit 6 - 1: Fast RTC memory PD following CPU 0: fast RTC memory PD following RTC state machine"]
256 #[inline(always)]
257 pub fn fastmem_folw_cpu(&mut self) -> FASTMEM_FOLW_CPU_W<PWC_SPEC> {
258 FASTMEM_FOLW_CPU_W::new(self, 6)
259 }
260 #[doc = "Bit 7 - Fast RTC memory force PD"]
261 #[inline(always)]
262 pub fn fastmem_force_lpd(&mut self) -> FASTMEM_FORCE_LPD_W<PWC_SPEC> {
263 FASTMEM_FORCE_LPD_W::new(self, 7)
264 }
265 #[doc = "Bit 8 - Fast RTC memory force no PD"]
266 #[inline(always)]
267 pub fn fastmem_force_lpu(&mut self) -> FASTMEM_FORCE_LPU_W<PWC_SPEC> {
268 FASTMEM_FORCE_LPU_W::new(self, 8)
269 }
270 #[doc = "Bit 9 - 1: RTC memory PD following CPU 0: RTC memory PD following RTC state machine"]
271 #[inline(always)]
272 pub fn slowmem_folw_cpu(&mut self) -> SLOWMEM_FOLW_CPU_W<PWC_SPEC> {
273 SLOWMEM_FOLW_CPU_W::new(self, 9)
274 }
275 #[doc = "Bit 10 - RTC memory force PD"]
276 #[inline(always)]
277 pub fn slowmem_force_lpd(&mut self) -> SLOWMEM_FORCE_LPD_W<PWC_SPEC> {
278 SLOWMEM_FORCE_LPD_W::new(self, 10)
279 }
280 #[doc = "Bit 11 - RTC memory force no PD"]
281 #[inline(always)]
282 pub fn slowmem_force_lpu(&mut self) -> SLOWMEM_FORCE_LPU_W<PWC_SPEC> {
283 SLOWMEM_FORCE_LPU_W::new(self, 11)
284 }
285 #[doc = "Bit 12 - Fast RTC memory force power down"]
286 #[inline(always)]
287 pub fn fastmem_force_pd(&mut self) -> FASTMEM_FORCE_PD_W<PWC_SPEC> {
288 FASTMEM_FORCE_PD_W::new(self, 12)
289 }
290 #[doc = "Bit 13 - Fast RTC memory force power up"]
291 #[inline(always)]
292 pub fn fastmem_force_pu(&mut self) -> FASTMEM_FORCE_PU_W<PWC_SPEC> {
293 FASTMEM_FORCE_PU_W::new(self, 13)
294 }
295 #[doc = "Bit 14 - enable power down fast RTC memory in sleep"]
296 #[inline(always)]
297 pub fn fastmem_pd_en(&mut self) -> FASTMEM_PD_EN_W<PWC_SPEC> {
298 FASTMEM_PD_EN_W::new(self, 14)
299 }
300 #[doc = "Bit 15 - RTC memory force power down"]
301 #[inline(always)]
302 pub fn slowmem_force_pd(&mut self) -> SLOWMEM_FORCE_PD_W<PWC_SPEC> {
303 SLOWMEM_FORCE_PD_W::new(self, 15)
304 }
305 #[doc = "Bit 16 - RTC memory force power up"]
306 #[inline(always)]
307 pub fn slowmem_force_pu(&mut self) -> SLOWMEM_FORCE_PU_W<PWC_SPEC> {
308 SLOWMEM_FORCE_PU_W::new(self, 16)
309 }
310 #[doc = "Bit 17 - enable power down RTC memory in sleep"]
311 #[inline(always)]
312 pub fn slowmem_pd_en(&mut self) -> SLOWMEM_PD_EN_W<PWC_SPEC> {
313 SLOWMEM_PD_EN_W::new(self, 17)
314 }
315 #[doc = "Bit 18 - rtc_peri force power down"]
316 #[inline(always)]
317 pub fn force_pd(&mut self) -> FORCE_PD_W<PWC_SPEC> {
318 FORCE_PD_W::new(self, 18)
319 }
320 #[doc = "Bit 19 - rtc_peri force power up"]
321 #[inline(always)]
322 pub fn force_pu(&mut self) -> FORCE_PU_W<PWC_SPEC> {
323 FORCE_PU_W::new(self, 19)
324 }
325 #[doc = "Bit 20 - enable power down rtc_peri in sleep"]
326 #[inline(always)]
327 pub fn pd_en(&mut self) -> PD_EN_W<PWC_SPEC> {
328 PD_EN_W::new(self, 20)
329 }
330}
331#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`pwc::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pwc::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
332pub struct PWC_SPEC;
333impl crate::RegisterSpec for PWC_SPEC {
334 type Ux = u32;
335}
336#[doc = "`read()` method returns [`pwc::R`](R) reader structure"]
337impl crate::Readable for PWC_SPEC {}
338#[doc = "`write(|w| ..)` method takes [`pwc::W`](W) writer structure"]
339impl crate::Writable for PWC_SPEC {
340 type Safety = crate::Unsafe;
341 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
342 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
343}
344#[doc = "`reset()` method sets PWC to value 0x0001_2925"]
345impl crate::Resettable for PWC_SPEC {
346 const RESET_VALUE: u32 = 0x0001_2925;
347}