1#[doc = "Register `POWERCLR` writer"]
2pub struct W(crate::W<POWERCLR_SPEC>);
3impl core::ops::Deref for W {
4 type Target = crate::W<POWERCLR_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl core::ops::DerefMut for W {
11 #[inline(always)]
12 fn deref_mut(&mut self) -> &mut Self::Target {
13 &mut self.0
14 }
15}
16impl From<crate::W<POWERCLR_SPEC>> for W {
17 #[inline(always)]
18 fn from(writer: crate::W<POWERCLR_SPEC>) -> Self {
19 W(writer)
20 }
21}
22#[doc = "Keep RAM section S0 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
23#[derive(Clone, Copy, Debug, PartialEq)]
24pub enum S0POWER_AW {
25 #[doc = "1: Off"]
26 OFF = 1,
27}
28impl From<S0POWER_AW> for bool {
29 #[inline(always)]
30 fn from(variant: S0POWER_AW) -> Self {
31 variant as u8 != 0
32 }
33}
34#[doc = "Field `S0POWER` writer - Keep RAM section S0 of RAMn on or off in System ON mode"]
35pub type S0POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S0POWER_AW, O>;
36impl<'a, const O: u8> S0POWER_W<'a, O> {
37 #[doc = "Off"]
38 #[inline(always)]
39 pub fn off(self) -> &'a mut W {
40 self.variant(S0POWER_AW::OFF)
41 }
42}
43#[doc = "Keep RAM section S1 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
44#[derive(Clone, Copy, Debug, PartialEq)]
45pub enum S1POWER_AW {
46 #[doc = "1: Off"]
47 OFF = 1,
48}
49impl From<S1POWER_AW> for bool {
50 #[inline(always)]
51 fn from(variant: S1POWER_AW) -> Self {
52 variant as u8 != 0
53 }
54}
55#[doc = "Field `S1POWER` writer - Keep RAM section S1 of RAMn on or off in System ON mode"]
56pub type S1POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S1POWER_AW, O>;
57impl<'a, const O: u8> S1POWER_W<'a, O> {
58 #[doc = "Off"]
59 #[inline(always)]
60 pub fn off(self) -> &'a mut W {
61 self.variant(S1POWER_AW::OFF)
62 }
63}
64#[doc = "Keep RAM section S2 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
65#[derive(Clone, Copy, Debug, PartialEq)]
66pub enum S2POWER_AW {
67 #[doc = "1: Off"]
68 OFF = 1,
69}
70impl From<S2POWER_AW> for bool {
71 #[inline(always)]
72 fn from(variant: S2POWER_AW) -> Self {
73 variant as u8 != 0
74 }
75}
76#[doc = "Field `S2POWER` writer - Keep RAM section S2 of RAMn on or off in System ON mode"]
77pub type S2POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S2POWER_AW, O>;
78impl<'a, const O: u8> S2POWER_W<'a, O> {
79 #[doc = "Off"]
80 #[inline(always)]
81 pub fn off(self) -> &'a mut W {
82 self.variant(S2POWER_AW::OFF)
83 }
84}
85#[doc = "Keep RAM section S3 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
86#[derive(Clone, Copy, Debug, PartialEq)]
87pub enum S3POWER_AW {
88 #[doc = "1: Off"]
89 OFF = 1,
90}
91impl From<S3POWER_AW> for bool {
92 #[inline(always)]
93 fn from(variant: S3POWER_AW) -> Self {
94 variant as u8 != 0
95 }
96}
97#[doc = "Field `S3POWER` writer - Keep RAM section S3 of RAMn on or off in System ON mode"]
98pub type S3POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S3POWER_AW, O>;
99impl<'a, const O: u8> S3POWER_W<'a, O> {
100 #[doc = "Off"]
101 #[inline(always)]
102 pub fn off(self) -> &'a mut W {
103 self.variant(S3POWER_AW::OFF)
104 }
105}
106#[doc = "Keep RAM section S4 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
107#[derive(Clone, Copy, Debug, PartialEq)]
108pub enum S4POWER_AW {
109 #[doc = "1: Off"]
110 OFF = 1,
111}
112impl From<S4POWER_AW> for bool {
113 #[inline(always)]
114 fn from(variant: S4POWER_AW) -> Self {
115 variant as u8 != 0
116 }
117}
118#[doc = "Field `S4POWER` writer - Keep RAM section S4 of RAMn on or off in System ON mode"]
119pub type S4POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S4POWER_AW, O>;
120impl<'a, const O: u8> S4POWER_W<'a, O> {
121 #[doc = "Off"]
122 #[inline(always)]
123 pub fn off(self) -> &'a mut W {
124 self.variant(S4POWER_AW::OFF)
125 }
126}
127#[doc = "Keep RAM section S5 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
128#[derive(Clone, Copy, Debug, PartialEq)]
129pub enum S5POWER_AW {
130 #[doc = "1: Off"]
131 OFF = 1,
132}
133impl From<S5POWER_AW> for bool {
134 #[inline(always)]
135 fn from(variant: S5POWER_AW) -> Self {
136 variant as u8 != 0
137 }
138}
139#[doc = "Field `S5POWER` writer - Keep RAM section S5 of RAMn on or off in System ON mode"]
140pub type S5POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S5POWER_AW, O>;
141impl<'a, const O: u8> S5POWER_W<'a, O> {
142 #[doc = "Off"]
143 #[inline(always)]
144 pub fn off(self) -> &'a mut W {
145 self.variant(S5POWER_AW::OFF)
146 }
147}
148#[doc = "Keep RAM section S6 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
149#[derive(Clone, Copy, Debug, PartialEq)]
150pub enum S6POWER_AW {
151 #[doc = "1: Off"]
152 OFF = 1,
153}
154impl From<S6POWER_AW> for bool {
155 #[inline(always)]
156 fn from(variant: S6POWER_AW) -> Self {
157 variant as u8 != 0
158 }
159}
160#[doc = "Field `S6POWER` writer - Keep RAM section S6 of RAMn on or off in System ON mode"]
161pub type S6POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S6POWER_AW, O>;
162impl<'a, const O: u8> S6POWER_W<'a, O> {
163 #[doc = "Off"]
164 #[inline(always)]
165 pub fn off(self) -> &'a mut W {
166 self.variant(S6POWER_AW::OFF)
167 }
168}
169#[doc = "Keep RAM section S7 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
170#[derive(Clone, Copy, Debug, PartialEq)]
171pub enum S7POWER_AW {
172 #[doc = "1: Off"]
173 OFF = 1,
174}
175impl From<S7POWER_AW> for bool {
176 #[inline(always)]
177 fn from(variant: S7POWER_AW) -> Self {
178 variant as u8 != 0
179 }
180}
181#[doc = "Field `S7POWER` writer - Keep RAM section S7 of RAMn on or off in System ON mode"]
182pub type S7POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S7POWER_AW, O>;
183impl<'a, const O: u8> S7POWER_W<'a, O> {
184 #[doc = "Off"]
185 #[inline(always)]
186 pub fn off(self) -> &'a mut W {
187 self.variant(S7POWER_AW::OFF)
188 }
189}
190#[doc = "Keep RAM section S8 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
191#[derive(Clone, Copy, Debug, PartialEq)]
192pub enum S8POWER_AW {
193 #[doc = "1: Off"]
194 OFF = 1,
195}
196impl From<S8POWER_AW> for bool {
197 #[inline(always)]
198 fn from(variant: S8POWER_AW) -> Self {
199 variant as u8 != 0
200 }
201}
202#[doc = "Field `S8POWER` writer - Keep RAM section S8 of RAMn on or off in System ON mode"]
203pub type S8POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S8POWER_AW, O>;
204impl<'a, const O: u8> S8POWER_W<'a, O> {
205 #[doc = "Off"]
206 #[inline(always)]
207 pub fn off(self) -> &'a mut W {
208 self.variant(S8POWER_AW::OFF)
209 }
210}
211#[doc = "Keep RAM section S9 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
212#[derive(Clone, Copy, Debug, PartialEq)]
213pub enum S9POWER_AW {
214 #[doc = "1: Off"]
215 OFF = 1,
216}
217impl From<S9POWER_AW> for bool {
218 #[inline(always)]
219 fn from(variant: S9POWER_AW) -> Self {
220 variant as u8 != 0
221 }
222}
223#[doc = "Field `S9POWER` writer - Keep RAM section S9 of RAMn on or off in System ON mode"]
224pub type S9POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S9POWER_AW, O>;
225impl<'a, const O: u8> S9POWER_W<'a, O> {
226 #[doc = "Off"]
227 #[inline(always)]
228 pub fn off(self) -> &'a mut W {
229 self.variant(S9POWER_AW::OFF)
230 }
231}
232#[doc = "Keep RAM section S10 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
233#[derive(Clone, Copy, Debug, PartialEq)]
234pub enum S10POWER_AW {
235 #[doc = "1: Off"]
236 OFF = 1,
237}
238impl From<S10POWER_AW> for bool {
239 #[inline(always)]
240 fn from(variant: S10POWER_AW) -> Self {
241 variant as u8 != 0
242 }
243}
244#[doc = "Field `S10POWER` writer - Keep RAM section S10 of RAMn on or off in System ON mode"]
245pub type S10POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S10POWER_AW, O>;
246impl<'a, const O: u8> S10POWER_W<'a, O> {
247 #[doc = "Off"]
248 #[inline(always)]
249 pub fn off(self) -> &'a mut W {
250 self.variant(S10POWER_AW::OFF)
251 }
252}
253#[doc = "Keep RAM section S11 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
254#[derive(Clone, Copy, Debug, PartialEq)]
255pub enum S11POWER_AW {
256 #[doc = "1: Off"]
257 OFF = 1,
258}
259impl From<S11POWER_AW> for bool {
260 #[inline(always)]
261 fn from(variant: S11POWER_AW) -> Self {
262 variant as u8 != 0
263 }
264}
265#[doc = "Field `S11POWER` writer - Keep RAM section S11 of RAMn on or off in System ON mode"]
266pub type S11POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S11POWER_AW, O>;
267impl<'a, const O: u8> S11POWER_W<'a, O> {
268 #[doc = "Off"]
269 #[inline(always)]
270 pub fn off(self) -> &'a mut W {
271 self.variant(S11POWER_AW::OFF)
272 }
273}
274#[doc = "Keep RAM section S12 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
275#[derive(Clone, Copy, Debug, PartialEq)]
276pub enum S12POWER_AW {
277 #[doc = "1: Off"]
278 OFF = 1,
279}
280impl From<S12POWER_AW> for bool {
281 #[inline(always)]
282 fn from(variant: S12POWER_AW) -> Self {
283 variant as u8 != 0
284 }
285}
286#[doc = "Field `S12POWER` writer - Keep RAM section S12 of RAMn on or off in System ON mode"]
287pub type S12POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S12POWER_AW, O>;
288impl<'a, const O: u8> S12POWER_W<'a, O> {
289 #[doc = "Off"]
290 #[inline(always)]
291 pub fn off(self) -> &'a mut W {
292 self.variant(S12POWER_AW::OFF)
293 }
294}
295#[doc = "Keep RAM section S13 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
296#[derive(Clone, Copy, Debug, PartialEq)]
297pub enum S13POWER_AW {
298 #[doc = "1: Off"]
299 OFF = 1,
300}
301impl From<S13POWER_AW> for bool {
302 #[inline(always)]
303 fn from(variant: S13POWER_AW) -> Self {
304 variant as u8 != 0
305 }
306}
307#[doc = "Field `S13POWER` writer - Keep RAM section S13 of RAMn on or off in System ON mode"]
308pub type S13POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S13POWER_AW, O>;
309impl<'a, const O: u8> S13POWER_W<'a, O> {
310 #[doc = "Off"]
311 #[inline(always)]
312 pub fn off(self) -> &'a mut W {
313 self.variant(S13POWER_AW::OFF)
314 }
315}
316#[doc = "Keep RAM section S14 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
317#[derive(Clone, Copy, Debug, PartialEq)]
318pub enum S14POWER_AW {
319 #[doc = "1: Off"]
320 OFF = 1,
321}
322impl From<S14POWER_AW> for bool {
323 #[inline(always)]
324 fn from(variant: S14POWER_AW) -> Self {
325 variant as u8 != 0
326 }
327}
328#[doc = "Field `S14POWER` writer - Keep RAM section S14 of RAMn on or off in System ON mode"]
329pub type S14POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S14POWER_AW, O>;
330impl<'a, const O: u8> S14POWER_W<'a, O> {
331 #[doc = "Off"]
332 #[inline(always)]
333 pub fn off(self) -> &'a mut W {
334 self.variant(S14POWER_AW::OFF)
335 }
336}
337#[doc = "Keep RAM section S15 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
338#[derive(Clone, Copy, Debug, PartialEq)]
339pub enum S15POWER_AW {
340 #[doc = "1: Off"]
341 OFF = 1,
342}
343impl From<S15POWER_AW> for bool {
344 #[inline(always)]
345 fn from(variant: S15POWER_AW) -> Self {
346 variant as u8 != 0
347 }
348}
349#[doc = "Field `S15POWER` writer - Keep RAM section S15 of RAMn on or off in System ON mode"]
350pub type S15POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S15POWER_AW, O>;
351impl<'a, const O: u8> S15POWER_W<'a, O> {
352 #[doc = "Off"]
353 #[inline(always)]
354 pub fn off(self) -> &'a mut W {
355 self.variant(S15POWER_AW::OFF)
356 }
357}
358#[doc = "Keep retention on RAM section S0 when RAM section is switched off\n\nValue on reset: 0"]
359#[derive(Clone, Copy, Debug, PartialEq)]
360pub enum S0RETENTION_AW {
361 #[doc = "1: Off"]
362 OFF = 1,
363}
364impl From<S0RETENTION_AW> for bool {
365 #[inline(always)]
366 fn from(variant: S0RETENTION_AW) -> Self {
367 variant as u8 != 0
368 }
369}
370#[doc = "Field `S0RETENTION` writer - Keep retention on RAM section S0 when RAM section is switched off"]
371pub type S0RETENTION_W<'a, const O: u8> =
372 crate::BitWriter<'a, u32, POWERCLR_SPEC, S0RETENTION_AW, O>;
373impl<'a, const O: u8> S0RETENTION_W<'a, O> {
374 #[doc = "Off"]
375 #[inline(always)]
376 pub fn off(self) -> &'a mut W {
377 self.variant(S0RETENTION_AW::OFF)
378 }
379}
380#[doc = "Keep retention on RAM section S1 when RAM section is switched off\n\nValue on reset: 0"]
381#[derive(Clone, Copy, Debug, PartialEq)]
382pub enum S1RETENTION_AW {
383 #[doc = "1: Off"]
384 OFF = 1,
385}
386impl From<S1RETENTION_AW> for bool {
387 #[inline(always)]
388 fn from(variant: S1RETENTION_AW) -> Self {
389 variant as u8 != 0
390 }
391}
392#[doc = "Field `S1RETENTION` writer - Keep retention on RAM section S1 when RAM section is switched off"]
393pub type S1RETENTION_W<'a, const O: u8> =
394 crate::BitWriter<'a, u32, POWERCLR_SPEC, S1RETENTION_AW, O>;
395impl<'a, const O: u8> S1RETENTION_W<'a, O> {
396 #[doc = "Off"]
397 #[inline(always)]
398 pub fn off(self) -> &'a mut W {
399 self.variant(S1RETENTION_AW::OFF)
400 }
401}
402#[doc = "Keep retention on RAM section S2 when RAM section is switched off\n\nValue on reset: 0"]
403#[derive(Clone, Copy, Debug, PartialEq)]
404pub enum S2RETENTION_AW {
405 #[doc = "1: Off"]
406 OFF = 1,
407}
408impl From<S2RETENTION_AW> for bool {
409 #[inline(always)]
410 fn from(variant: S2RETENTION_AW) -> Self {
411 variant as u8 != 0
412 }
413}
414#[doc = "Field `S2RETENTION` writer - Keep retention on RAM section S2 when RAM section is switched off"]
415pub type S2RETENTION_W<'a, const O: u8> =
416 crate::BitWriter<'a, u32, POWERCLR_SPEC, S2RETENTION_AW, O>;
417impl<'a, const O: u8> S2RETENTION_W<'a, O> {
418 #[doc = "Off"]
419 #[inline(always)]
420 pub fn off(self) -> &'a mut W {
421 self.variant(S2RETENTION_AW::OFF)
422 }
423}
424#[doc = "Keep retention on RAM section S3 when RAM section is switched off\n\nValue on reset: 0"]
425#[derive(Clone, Copy, Debug, PartialEq)]
426pub enum S3RETENTION_AW {
427 #[doc = "1: Off"]
428 OFF = 1,
429}
430impl From<S3RETENTION_AW> for bool {
431 #[inline(always)]
432 fn from(variant: S3RETENTION_AW) -> Self {
433 variant as u8 != 0
434 }
435}
436#[doc = "Field `S3RETENTION` writer - Keep retention on RAM section S3 when RAM section is switched off"]
437pub type S3RETENTION_W<'a, const O: u8> =
438 crate::BitWriter<'a, u32, POWERCLR_SPEC, S3RETENTION_AW, O>;
439impl<'a, const O: u8> S3RETENTION_W<'a, O> {
440 #[doc = "Off"]
441 #[inline(always)]
442 pub fn off(self) -> &'a mut W {
443 self.variant(S3RETENTION_AW::OFF)
444 }
445}
446#[doc = "Keep retention on RAM section S4 when RAM section is switched off\n\nValue on reset: 0"]
447#[derive(Clone, Copy, Debug, PartialEq)]
448pub enum S4RETENTION_AW {
449 #[doc = "1: Off"]
450 OFF = 1,
451}
452impl From<S4RETENTION_AW> for bool {
453 #[inline(always)]
454 fn from(variant: S4RETENTION_AW) -> Self {
455 variant as u8 != 0
456 }
457}
458#[doc = "Field `S4RETENTION` writer - Keep retention on RAM section S4 when RAM section is switched off"]
459pub type S4RETENTION_W<'a, const O: u8> =
460 crate::BitWriter<'a, u32, POWERCLR_SPEC, S4RETENTION_AW, O>;
461impl<'a, const O: u8> S4RETENTION_W<'a, O> {
462 #[doc = "Off"]
463 #[inline(always)]
464 pub fn off(self) -> &'a mut W {
465 self.variant(S4RETENTION_AW::OFF)
466 }
467}
468#[doc = "Keep retention on RAM section S5 when RAM section is switched off\n\nValue on reset: 0"]
469#[derive(Clone, Copy, Debug, PartialEq)]
470pub enum S5RETENTION_AW {
471 #[doc = "1: Off"]
472 OFF = 1,
473}
474impl From<S5RETENTION_AW> for bool {
475 #[inline(always)]
476 fn from(variant: S5RETENTION_AW) -> Self {
477 variant as u8 != 0
478 }
479}
480#[doc = "Field `S5RETENTION` writer - Keep retention on RAM section S5 when RAM section is switched off"]
481pub type S5RETENTION_W<'a, const O: u8> =
482 crate::BitWriter<'a, u32, POWERCLR_SPEC, S5RETENTION_AW, O>;
483impl<'a, const O: u8> S5RETENTION_W<'a, O> {
484 #[doc = "Off"]
485 #[inline(always)]
486 pub fn off(self) -> &'a mut W {
487 self.variant(S5RETENTION_AW::OFF)
488 }
489}
490#[doc = "Keep retention on RAM section S6 when RAM section is switched off\n\nValue on reset: 0"]
491#[derive(Clone, Copy, Debug, PartialEq)]
492pub enum S6RETENTION_AW {
493 #[doc = "1: Off"]
494 OFF = 1,
495}
496impl From<S6RETENTION_AW> for bool {
497 #[inline(always)]
498 fn from(variant: S6RETENTION_AW) -> Self {
499 variant as u8 != 0
500 }
501}
502#[doc = "Field `S6RETENTION` writer - Keep retention on RAM section S6 when RAM section is switched off"]
503pub type S6RETENTION_W<'a, const O: u8> =
504 crate::BitWriter<'a, u32, POWERCLR_SPEC, S6RETENTION_AW, O>;
505impl<'a, const O: u8> S6RETENTION_W<'a, O> {
506 #[doc = "Off"]
507 #[inline(always)]
508 pub fn off(self) -> &'a mut W {
509 self.variant(S6RETENTION_AW::OFF)
510 }
511}
512#[doc = "Keep retention on RAM section S7 when RAM section is switched off\n\nValue on reset: 0"]
513#[derive(Clone, Copy, Debug, PartialEq)]
514pub enum S7RETENTION_AW {
515 #[doc = "1: Off"]
516 OFF = 1,
517}
518impl From<S7RETENTION_AW> for bool {
519 #[inline(always)]
520 fn from(variant: S7RETENTION_AW) -> Self {
521 variant as u8 != 0
522 }
523}
524#[doc = "Field `S7RETENTION` writer - Keep retention on RAM section S7 when RAM section is switched off"]
525pub type S7RETENTION_W<'a, const O: u8> =
526 crate::BitWriter<'a, u32, POWERCLR_SPEC, S7RETENTION_AW, O>;
527impl<'a, const O: u8> S7RETENTION_W<'a, O> {
528 #[doc = "Off"]
529 #[inline(always)]
530 pub fn off(self) -> &'a mut W {
531 self.variant(S7RETENTION_AW::OFF)
532 }
533}
534#[doc = "Keep retention on RAM section S8 when RAM section is switched off\n\nValue on reset: 0"]
535#[derive(Clone, Copy, Debug, PartialEq)]
536pub enum S8RETENTION_AW {
537 #[doc = "1: Off"]
538 OFF = 1,
539}
540impl From<S8RETENTION_AW> for bool {
541 #[inline(always)]
542 fn from(variant: S8RETENTION_AW) -> Self {
543 variant as u8 != 0
544 }
545}
546#[doc = "Field `S8RETENTION` writer - Keep retention on RAM section S8 when RAM section is switched off"]
547pub type S8RETENTION_W<'a, const O: u8> =
548 crate::BitWriter<'a, u32, POWERCLR_SPEC, S8RETENTION_AW, O>;
549impl<'a, const O: u8> S8RETENTION_W<'a, O> {
550 #[doc = "Off"]
551 #[inline(always)]
552 pub fn off(self) -> &'a mut W {
553 self.variant(S8RETENTION_AW::OFF)
554 }
555}
556#[doc = "Keep retention on RAM section S9 when RAM section is switched off\n\nValue on reset: 0"]
557#[derive(Clone, Copy, Debug, PartialEq)]
558pub enum S9RETENTION_AW {
559 #[doc = "1: Off"]
560 OFF = 1,
561}
562impl From<S9RETENTION_AW> for bool {
563 #[inline(always)]
564 fn from(variant: S9RETENTION_AW) -> Self {
565 variant as u8 != 0
566 }
567}
568#[doc = "Field `S9RETENTION` writer - Keep retention on RAM section S9 when RAM section is switched off"]
569pub type S9RETENTION_W<'a, const O: u8> =
570 crate::BitWriter<'a, u32, POWERCLR_SPEC, S9RETENTION_AW, O>;
571impl<'a, const O: u8> S9RETENTION_W<'a, O> {
572 #[doc = "Off"]
573 #[inline(always)]
574 pub fn off(self) -> &'a mut W {
575 self.variant(S9RETENTION_AW::OFF)
576 }
577}
578#[doc = "Keep retention on RAM section S10 when RAM section is switched off\n\nValue on reset: 0"]
579#[derive(Clone, Copy, Debug, PartialEq)]
580pub enum S10RETENTION_AW {
581 #[doc = "1: Off"]
582 OFF = 1,
583}
584impl From<S10RETENTION_AW> for bool {
585 #[inline(always)]
586 fn from(variant: S10RETENTION_AW) -> Self {
587 variant as u8 != 0
588 }
589}
590#[doc = "Field `S10RETENTION` writer - Keep retention on RAM section S10 when RAM section is switched off"]
591pub type S10RETENTION_W<'a, const O: u8> =
592 crate::BitWriter<'a, u32, POWERCLR_SPEC, S10RETENTION_AW, O>;
593impl<'a, const O: u8> S10RETENTION_W<'a, O> {
594 #[doc = "Off"]
595 #[inline(always)]
596 pub fn off(self) -> &'a mut W {
597 self.variant(S10RETENTION_AW::OFF)
598 }
599}
600#[doc = "Keep retention on RAM section S11 when RAM section is switched off\n\nValue on reset: 0"]
601#[derive(Clone, Copy, Debug, PartialEq)]
602pub enum S11RETENTION_AW {
603 #[doc = "1: Off"]
604 OFF = 1,
605}
606impl From<S11RETENTION_AW> for bool {
607 #[inline(always)]
608 fn from(variant: S11RETENTION_AW) -> Self {
609 variant as u8 != 0
610 }
611}
612#[doc = "Field `S11RETENTION` writer - Keep retention on RAM section S11 when RAM section is switched off"]
613pub type S11RETENTION_W<'a, const O: u8> =
614 crate::BitWriter<'a, u32, POWERCLR_SPEC, S11RETENTION_AW, O>;
615impl<'a, const O: u8> S11RETENTION_W<'a, O> {
616 #[doc = "Off"]
617 #[inline(always)]
618 pub fn off(self) -> &'a mut W {
619 self.variant(S11RETENTION_AW::OFF)
620 }
621}
622#[doc = "Keep retention on RAM section S12 when RAM section is switched off\n\nValue on reset: 0"]
623#[derive(Clone, Copy, Debug, PartialEq)]
624pub enum S12RETENTION_AW {
625 #[doc = "1: Off"]
626 OFF = 1,
627}
628impl From<S12RETENTION_AW> for bool {
629 #[inline(always)]
630 fn from(variant: S12RETENTION_AW) -> Self {
631 variant as u8 != 0
632 }
633}
634#[doc = "Field `S12RETENTION` writer - Keep retention on RAM section S12 when RAM section is switched off"]
635pub type S12RETENTION_W<'a, const O: u8> =
636 crate::BitWriter<'a, u32, POWERCLR_SPEC, S12RETENTION_AW, O>;
637impl<'a, const O: u8> S12RETENTION_W<'a, O> {
638 #[doc = "Off"]
639 #[inline(always)]
640 pub fn off(self) -> &'a mut W {
641 self.variant(S12RETENTION_AW::OFF)
642 }
643}
644#[doc = "Keep retention on RAM section S13 when RAM section is switched off\n\nValue on reset: 0"]
645#[derive(Clone, Copy, Debug, PartialEq)]
646pub enum S13RETENTION_AW {
647 #[doc = "1: Off"]
648 OFF = 1,
649}
650impl From<S13RETENTION_AW> for bool {
651 #[inline(always)]
652 fn from(variant: S13RETENTION_AW) -> Self {
653 variant as u8 != 0
654 }
655}
656#[doc = "Field `S13RETENTION` writer - Keep retention on RAM section S13 when RAM section is switched off"]
657pub type S13RETENTION_W<'a, const O: u8> =
658 crate::BitWriter<'a, u32, POWERCLR_SPEC, S13RETENTION_AW, O>;
659impl<'a, const O: u8> S13RETENTION_W<'a, O> {
660 #[doc = "Off"]
661 #[inline(always)]
662 pub fn off(self) -> &'a mut W {
663 self.variant(S13RETENTION_AW::OFF)
664 }
665}
666#[doc = "Keep retention on RAM section S14 when RAM section is switched off\n\nValue on reset: 0"]
667#[derive(Clone, Copy, Debug, PartialEq)]
668pub enum S14RETENTION_AW {
669 #[doc = "1: Off"]
670 OFF = 1,
671}
672impl From<S14RETENTION_AW> for bool {
673 #[inline(always)]
674 fn from(variant: S14RETENTION_AW) -> Self {
675 variant as u8 != 0
676 }
677}
678#[doc = "Field `S14RETENTION` writer - Keep retention on RAM section S14 when RAM section is switched off"]
679pub type S14RETENTION_W<'a, const O: u8> =
680 crate::BitWriter<'a, u32, POWERCLR_SPEC, S14RETENTION_AW, O>;
681impl<'a, const O: u8> S14RETENTION_W<'a, O> {
682 #[doc = "Off"]
683 #[inline(always)]
684 pub fn off(self) -> &'a mut W {
685 self.variant(S14RETENTION_AW::OFF)
686 }
687}
688#[doc = "Keep retention on RAM section S15 when RAM section is switched off\n\nValue on reset: 0"]
689#[derive(Clone, Copy, Debug, PartialEq)]
690pub enum S15RETENTION_AW {
691 #[doc = "1: Off"]
692 OFF = 1,
693}
694impl From<S15RETENTION_AW> for bool {
695 #[inline(always)]
696 fn from(variant: S15RETENTION_AW) -> Self {
697 variant as u8 != 0
698 }
699}
700#[doc = "Field `S15RETENTION` writer - Keep retention on RAM section S15 when RAM section is switched off"]
701pub type S15RETENTION_W<'a, const O: u8> =
702 crate::BitWriter<'a, u32, POWERCLR_SPEC, S15RETENTION_AW, O>;
703impl<'a, const O: u8> S15RETENTION_W<'a, O> {
704 #[doc = "Off"]
705 #[inline(always)]
706 pub fn off(self) -> &'a mut W {
707 self.variant(S15RETENTION_AW::OFF)
708 }
709}
710impl W {
711 #[doc = "Bit 0 - Keep RAM section S0 of RAMn on or off in System ON mode"]
712 #[inline(always)]
713 pub fn s0power(&mut self) -> S0POWER_W<0> {
714 S0POWER_W::new(self)
715 }
716 #[doc = "Bit 1 - Keep RAM section S1 of RAMn on or off in System ON mode"]
717 #[inline(always)]
718 pub fn s1power(&mut self) -> S1POWER_W<1> {
719 S1POWER_W::new(self)
720 }
721 #[doc = "Bit 2 - Keep RAM section S2 of RAMn on or off in System ON mode"]
722 #[inline(always)]
723 pub fn s2power(&mut self) -> S2POWER_W<2> {
724 S2POWER_W::new(self)
725 }
726 #[doc = "Bit 3 - Keep RAM section S3 of RAMn on or off in System ON mode"]
727 #[inline(always)]
728 pub fn s3power(&mut self) -> S3POWER_W<3> {
729 S3POWER_W::new(self)
730 }
731 #[doc = "Bit 4 - Keep RAM section S4 of RAMn on or off in System ON mode"]
732 #[inline(always)]
733 pub fn s4power(&mut self) -> S4POWER_W<4> {
734 S4POWER_W::new(self)
735 }
736 #[doc = "Bit 5 - Keep RAM section S5 of RAMn on or off in System ON mode"]
737 #[inline(always)]
738 pub fn s5power(&mut self) -> S5POWER_W<5> {
739 S5POWER_W::new(self)
740 }
741 #[doc = "Bit 6 - Keep RAM section S6 of RAMn on or off in System ON mode"]
742 #[inline(always)]
743 pub fn s6power(&mut self) -> S6POWER_W<6> {
744 S6POWER_W::new(self)
745 }
746 #[doc = "Bit 7 - Keep RAM section S7 of RAMn on or off in System ON mode"]
747 #[inline(always)]
748 pub fn s7power(&mut self) -> S7POWER_W<7> {
749 S7POWER_W::new(self)
750 }
751 #[doc = "Bit 8 - Keep RAM section S8 of RAMn on or off in System ON mode"]
752 #[inline(always)]
753 pub fn s8power(&mut self) -> S8POWER_W<8> {
754 S8POWER_W::new(self)
755 }
756 #[doc = "Bit 9 - Keep RAM section S9 of RAMn on or off in System ON mode"]
757 #[inline(always)]
758 pub fn s9power(&mut self) -> S9POWER_W<9> {
759 S9POWER_W::new(self)
760 }
761 #[doc = "Bit 10 - Keep RAM section S10 of RAMn on or off in System ON mode"]
762 #[inline(always)]
763 pub fn s10power(&mut self) -> S10POWER_W<10> {
764 S10POWER_W::new(self)
765 }
766 #[doc = "Bit 11 - Keep RAM section S11 of RAMn on or off in System ON mode"]
767 #[inline(always)]
768 pub fn s11power(&mut self) -> S11POWER_W<11> {
769 S11POWER_W::new(self)
770 }
771 #[doc = "Bit 12 - Keep RAM section S12 of RAMn on or off in System ON mode"]
772 #[inline(always)]
773 pub fn s12power(&mut self) -> S12POWER_W<12> {
774 S12POWER_W::new(self)
775 }
776 #[doc = "Bit 13 - Keep RAM section S13 of RAMn on or off in System ON mode"]
777 #[inline(always)]
778 pub fn s13power(&mut self) -> S13POWER_W<13> {
779 S13POWER_W::new(self)
780 }
781 #[doc = "Bit 14 - Keep RAM section S14 of RAMn on or off in System ON mode"]
782 #[inline(always)]
783 pub fn s14power(&mut self) -> S14POWER_W<14> {
784 S14POWER_W::new(self)
785 }
786 #[doc = "Bit 15 - Keep RAM section S15 of RAMn on or off in System ON mode"]
787 #[inline(always)]
788 pub fn s15power(&mut self) -> S15POWER_W<15> {
789 S15POWER_W::new(self)
790 }
791 #[doc = "Bit 16 - Keep retention on RAM section S0 when RAM section is switched off"]
792 #[inline(always)]
793 pub fn s0retention(&mut self) -> S0RETENTION_W<16> {
794 S0RETENTION_W::new(self)
795 }
796 #[doc = "Bit 17 - Keep retention on RAM section S1 when RAM section is switched off"]
797 #[inline(always)]
798 pub fn s1retention(&mut self) -> S1RETENTION_W<17> {
799 S1RETENTION_W::new(self)
800 }
801 #[doc = "Bit 18 - Keep retention on RAM section S2 when RAM section is switched off"]
802 #[inline(always)]
803 pub fn s2retention(&mut self) -> S2RETENTION_W<18> {
804 S2RETENTION_W::new(self)
805 }
806 #[doc = "Bit 19 - Keep retention on RAM section S3 when RAM section is switched off"]
807 #[inline(always)]
808 pub fn s3retention(&mut self) -> S3RETENTION_W<19> {
809 S3RETENTION_W::new(self)
810 }
811 #[doc = "Bit 20 - Keep retention on RAM section S4 when RAM section is switched off"]
812 #[inline(always)]
813 pub fn s4retention(&mut self) -> S4RETENTION_W<20> {
814 S4RETENTION_W::new(self)
815 }
816 #[doc = "Bit 21 - Keep retention on RAM section S5 when RAM section is switched off"]
817 #[inline(always)]
818 pub fn s5retention(&mut self) -> S5RETENTION_W<21> {
819 S5RETENTION_W::new(self)
820 }
821 #[doc = "Bit 22 - Keep retention on RAM section S6 when RAM section is switched off"]
822 #[inline(always)]
823 pub fn s6retention(&mut self) -> S6RETENTION_W<22> {
824 S6RETENTION_W::new(self)
825 }
826 #[doc = "Bit 23 - Keep retention on RAM section S7 when RAM section is switched off"]
827 #[inline(always)]
828 pub fn s7retention(&mut self) -> S7RETENTION_W<23> {
829 S7RETENTION_W::new(self)
830 }
831 #[doc = "Bit 24 - Keep retention on RAM section S8 when RAM section is switched off"]
832 #[inline(always)]
833 pub fn s8retention(&mut self) -> S8RETENTION_W<24> {
834 S8RETENTION_W::new(self)
835 }
836 #[doc = "Bit 25 - Keep retention on RAM section S9 when RAM section is switched off"]
837 #[inline(always)]
838 pub fn s9retention(&mut self) -> S9RETENTION_W<25> {
839 S9RETENTION_W::new(self)
840 }
841 #[doc = "Bit 26 - Keep retention on RAM section S10 when RAM section is switched off"]
842 #[inline(always)]
843 pub fn s10retention(&mut self) -> S10RETENTION_W<26> {
844 S10RETENTION_W::new(self)
845 }
846 #[doc = "Bit 27 - Keep retention on RAM section S11 when RAM section is switched off"]
847 #[inline(always)]
848 pub fn s11retention(&mut self) -> S11RETENTION_W<27> {
849 S11RETENTION_W::new(self)
850 }
851 #[doc = "Bit 28 - Keep retention on RAM section S12 when RAM section is switched off"]
852 #[inline(always)]
853 pub fn s12retention(&mut self) -> S12RETENTION_W<28> {
854 S12RETENTION_W::new(self)
855 }
856 #[doc = "Bit 29 - Keep retention on RAM section S13 when RAM section is switched off"]
857 #[inline(always)]
858 pub fn s13retention(&mut self) -> S13RETENTION_W<29> {
859 S13RETENTION_W::new(self)
860 }
861 #[doc = "Bit 30 - Keep retention on RAM section S14 when RAM section is switched off"]
862 #[inline(always)]
863 pub fn s14retention(&mut self) -> S14RETENTION_W<30> {
864 S14RETENTION_W::new(self)
865 }
866 #[doc = "Bit 31 - Keep retention on RAM section S15 when RAM section is switched off"]
867 #[inline(always)]
868 pub fn s15retention(&mut self) -> S15RETENTION_W<31> {
869 S15RETENTION_W::new(self)
870 }
871 #[doc = "Writes raw bits to the register."]
872 #[inline(always)]
873 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
874 self.0.bits(bits);
875 self
876 }
877}
878#[doc = "Description cluster\\[n\\]: RAMn power control 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 [powerclr](index.html) module"]
879pub struct POWERCLR_SPEC;
880impl crate::RegisterSpec for POWERCLR_SPEC {
881 type Ux = u32;
882}
883#[doc = "`write(|w| ..)` method takes [powerclr::W](W) writer structure"]
884impl crate::Writable for POWERCLR_SPEC {
885 type Writer = W;
886}
887#[doc = "`reset()` method sets POWERCLR to value 0xffff"]
888impl crate::Resettable for POWERCLR_SPEC {
889 #[inline(always)]
890 fn reset_value() -> Self::Ux {
891 0xffff
892 }
893}