1#![allow(clippy::missing_safety_doc)]
2#![allow(clippy::identity_op)]
3#![allow(clippy::unnecessary_cast)]
4#![allow(clippy::erasing_op)]
5
6#[doc = "Flash"]
7#[derive(Copy, Clone, Eq, PartialEq)]
8pub struct Flash {
9 ptr: *mut u8,
10}
11unsafe impl Send for Flash {}
12unsafe impl Sync for Flash {}
13impl Flash {
14 #[inline(always)]
15 pub const unsafe fn from_ptr(ptr: *mut ()) -> Self {
16 Self { ptr: ptr as _ }
17 }
18 #[inline(always)]
19 pub const fn as_ptr(&self) -> *mut () {
20 self.ptr as _
21 }
22 #[doc = "FLASH access control register"]
23 #[inline(always)]
24 pub const fn acr(self) -> crate::common::Reg<regs::Acr, crate::common::RW> {
25 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x0usize) as _) }
26 }
27 #[doc = "FLASH non-secure key register"]
28 #[inline(always)]
29 pub const fn nskeyr(self) -> crate::common::Reg<u32, crate::common::RW> {
30 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x08usize) as _) }
31 }
32 #[doc = "FLASH secure key register"]
33 #[inline(always)]
34 pub const fn seckeyr(self) -> crate::common::Reg<u32, crate::common::RW> {
35 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x0cusize) as _) }
36 }
37 #[doc = "FLASH option key register"]
38 #[inline(always)]
39 pub const fn optkeyr(self) -> crate::common::Reg<u32, crate::common::RW> {
40 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x10usize) as _) }
41 }
42 #[doc = "FLASH bank 1 power-down key register"]
43 #[inline(always)]
44 pub const fn pdkey1r(self) -> crate::common::Reg<regs::Pdkey1r, crate::common::RW> {
45 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x18usize) as _) }
46 }
47 #[doc = "FLASH bank 2 power-down key register"]
48 #[inline(always)]
49 pub const fn pdkey2r(self) -> crate::common::Reg<regs::Pdkey2r, crate::common::RW> {
50 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x1cusize) as _) }
51 }
52 #[doc = "FLASH non-secure status register"]
53 #[inline(always)]
54 pub const fn nssr(self) -> crate::common::Reg<regs::Nssr, crate::common::RW> {
55 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x20usize) as _) }
56 }
57 #[doc = "FLASH secure status register"]
58 #[inline(always)]
59 pub const fn secsr(self) -> crate::common::Reg<regs::Secsr, crate::common::RW> {
60 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x24usize) as _) }
61 }
62 #[doc = "FLASH non-secure control register"]
63 #[inline(always)]
64 pub const fn nscr(self) -> crate::common::Reg<regs::Nscr, crate::common::RW> {
65 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x28usize) as _) }
66 }
67 #[doc = "FLASH secure control register"]
68 #[inline(always)]
69 pub const fn seccr(self) -> crate::common::Reg<regs::Seccr, crate::common::RW> {
70 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x2cusize) as _) }
71 }
72 #[doc = "FLASH ECC register"]
73 #[inline(always)]
74 pub const fn eccr(self) -> crate::common::Reg<regs::Eccr, crate::common::RW> {
75 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x30usize) as _) }
76 }
77 #[doc = "FLASH operation status register"]
78 #[inline(always)]
79 pub const fn opsr(self) -> crate::common::Reg<regs::Opsr, crate::common::RW> {
80 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x34usize) as _) }
81 }
82 #[doc = "FLASH option register"]
83 #[inline(always)]
84 pub const fn optr(self) -> crate::common::Reg<regs::Optr, crate::common::RW> {
85 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x40usize) as _) }
86 }
87 #[doc = "FLASH non-secure boot address 0 register"]
88 #[inline(always)]
89 pub const fn nsbootadd0r(self) -> crate::common::Reg<regs::Nsbootadd0r, crate::common::RW> {
90 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x44usize) as _) }
91 }
92 #[doc = "FLASH non-secure boot address 1 register"]
93 #[inline(always)]
94 pub const fn nsbootadd1r(self) -> crate::common::Reg<regs::Nsbootadd1r, crate::common::RW> {
95 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x48usize) as _) }
96 }
97 #[doc = "FLASH secure boot address 0 register"]
98 #[inline(always)]
99 pub const fn secbootadd0r(self) -> crate::common::Reg<regs::Secbootadd0r, crate::common::RW> {
100 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x4cusize) as _) }
101 }
102 #[doc = "FLASH secure watermark1 register 1"]
103 #[inline(always)]
104 pub const fn secwm1r1(self) -> crate::common::Reg<regs::Secwm1r1, crate::common::RW> {
105 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x50usize) as _) }
106 }
107 #[doc = "FLASH secure watermark1 register 2"]
108 #[inline(always)]
109 pub const fn secwm1r2(self) -> crate::common::Reg<regs::Secwm1r2, crate::common::RW> {
110 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x54usize) as _) }
111 }
112 #[doc = "FLASH WRP1 area A address register"]
113 #[inline(always)]
114 pub const fn wrp1ar(self) -> crate::common::Reg<regs::Wrp1ar, crate::common::RW> {
115 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x58usize) as _) }
116 }
117 #[doc = "FLASH WRP1 area B address register"]
118 #[inline(always)]
119 pub const fn wrp1br(self) -> crate::common::Reg<regs::Wrp1br, crate::common::RW> {
120 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x5cusize) as _) }
121 }
122 #[doc = "FLASH secure watermark2 register 1"]
123 #[inline(always)]
124 pub const fn secwm2r1(self) -> crate::common::Reg<regs::Secwm2r1, crate::common::RW> {
125 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x60usize) as _) }
126 }
127 #[doc = "FLASH secure watermark2 register 2"]
128 #[inline(always)]
129 pub const fn secwm2r2(self) -> crate::common::Reg<regs::Secwm2r2, crate::common::RW> {
130 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x64usize) as _) }
131 }
132 #[doc = "FLASH WPR2 area A address register"]
133 #[inline(always)]
134 pub const fn wrp2ar(self) -> crate::common::Reg<regs::Wrp2ar, crate::common::RW> {
135 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x68usize) as _) }
136 }
137 #[doc = "FLASH WPR2 area B address register"]
138 #[inline(always)]
139 pub const fn wrp2br(self) -> crate::common::Reg<regs::Wrp2br, crate::common::RW> {
140 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x6cusize) as _) }
141 }
142 #[doc = "FLASH OEM1 key register 1"]
143 #[inline(always)]
144 pub const fn oem1keyr1(self) -> crate::common::Reg<regs::Oem1keyr1, crate::common::RW> {
145 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x70usize) as _) }
146 }
147 #[doc = "FLASH OEM1 key register 2"]
148 #[inline(always)]
149 pub const fn oem1keyr2(self) -> crate::common::Reg<regs::Oem1keyr2, crate::common::RW> {
150 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x74usize) as _) }
151 }
152 #[doc = "FLASH OEM2 key register 1"]
153 #[inline(always)]
154 pub const fn oem2keyr1(self) -> crate::common::Reg<regs::Oem2keyr1, crate::common::RW> {
155 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x78usize) as _) }
156 }
157 #[doc = "FLASH OEM2 key register 2"]
158 #[inline(always)]
159 pub const fn oem2keyr2(self) -> crate::common::Reg<regs::Oem2keyr2, crate::common::RW> {
160 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x7cusize) as _) }
161 }
162 #[doc = "FLASH secure block based bank 1 register 1"]
163 #[inline(always)]
164 pub const fn sec1bbr1(self) -> crate::common::Reg<regs::Sec1bbr1, crate::common::RW> {
165 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x80usize) as _) }
166 }
167 #[doc = "FLASH secure block based bank 1 register 2"]
168 #[inline(always)]
169 pub const fn sec1bbr2(self) -> crate::common::Reg<regs::Sec1bbr2, crate::common::RW> {
170 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x84usize) as _) }
171 }
172 #[doc = "FLASH secure block based bank 1 register 3"]
173 #[inline(always)]
174 pub const fn sec1bbr3(self) -> crate::common::Reg<regs::Sec1bbr3, crate::common::RW> {
175 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x88usize) as _) }
176 }
177 #[doc = "FLASH secure block based bank 1 register 4"]
178 #[inline(always)]
179 pub const fn sec1bbr4(self) -> crate::common::Reg<regs::Sec1bbr4, crate::common::RW> {
180 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0x8cusize) as _) }
181 }
182 #[doc = "FLASH secure block based bank 2 register 1"]
183 #[inline(always)]
184 pub const fn sec2bbr1(self) -> crate::common::Reg<regs::Sec2bbr1, crate::common::RW> {
185 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0xa0usize) as _) }
186 }
187 #[doc = "FLASH secure block based bank 2 register 2"]
188 #[inline(always)]
189 pub const fn sec2bbr2(self) -> crate::common::Reg<regs::Sec2bbr2, crate::common::RW> {
190 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0xa4usize) as _) }
191 }
192 #[doc = "FLASH secure block based bank 2 register 3"]
193 #[inline(always)]
194 pub const fn sec2bbr3(self) -> crate::common::Reg<regs::Sec2bbr3, crate::common::RW> {
195 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0xa8usize) as _) }
196 }
197 #[doc = "FLASH secure block based bank 2 register 4"]
198 #[inline(always)]
199 pub const fn sec2bbr4(self) -> crate::common::Reg<regs::Sec2bbr4, crate::common::RW> {
200 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0xacusize) as _) }
201 }
202 #[doc = "FLASH secure HDP control register"]
203 #[inline(always)]
204 pub const fn sechdpcr(self) -> crate::common::Reg<regs::Sechdpcr, crate::common::RW> {
205 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0xc0usize) as _) }
206 }
207 #[doc = "FLASH privilege configuration register"]
208 #[inline(always)]
209 pub const fn privcfgr(self) -> crate::common::Reg<regs::Privcfgr, crate::common::RW> {
210 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0xc4usize) as _) }
211 }
212 #[doc = "FLASH privilege block based bank 1 register 1"]
213 #[inline(always)]
214 pub const fn priv1bbr1(self) -> crate::common::Reg<regs::Priv1bbr1, crate::common::RW> {
215 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0xd0usize) as _) }
216 }
217 #[doc = "FLASH privilege block based bank 1 register 2"]
218 #[inline(always)]
219 pub const fn priv1bbr2(self) -> crate::common::Reg<regs::Priv1bbr2, crate::common::RW> {
220 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0xd4usize) as _) }
221 }
222 #[doc = "FLASH privilege block based bank 1 register 3"]
223 #[inline(always)]
224 pub const fn priv1bbr3(self) -> crate::common::Reg<regs::Priv1bbr3, crate::common::RW> {
225 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0xd8usize) as _) }
226 }
227 #[doc = "FLASH privilege block based bank 1 register 4"]
228 #[inline(always)]
229 pub const fn priv1bbr4(self) -> crate::common::Reg<regs::Priv1bbr4, crate::common::RW> {
230 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0xdcusize) as _) }
231 }
232 #[doc = "FLASH privilege block based bank 2 register 1"]
233 #[inline(always)]
234 pub const fn priv2bbr1(self) -> crate::common::Reg<regs::Priv2bbr1, crate::common::RW> {
235 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0xf0usize) as _) }
236 }
237 #[doc = "FLASH privilege block based bank 2 register 2"]
238 #[inline(always)]
239 pub const fn priv2bbr2(self) -> crate::common::Reg<regs::Priv2bbr2, crate::common::RW> {
240 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0xf4usize) as _) }
241 }
242 #[doc = "FLASH privilege block based bank 2 register 3"]
243 #[inline(always)]
244 pub const fn priv2bbr3(self) -> crate::common::Reg<regs::Priv2bbr3, crate::common::RW> {
245 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0xf8usize) as _) }
246 }
247 #[doc = "FLASH privilege block based bank 2 register 4"]
248 #[inline(always)]
249 pub const fn priv2bbr4(self) -> crate::common::Reg<regs::Priv2bbr4, crate::common::RW> {
250 unsafe { crate::common::Reg::from_ptr(self.ptr.add(0xfcusize) as _) }
251 }
252}
253pub mod regs {
254 #[doc = "FLASH access control register"]
255 #[repr(transparent)]
256 #[derive(Copy, Clone, Eq, PartialEq)]
257 pub struct Acr(pub u32);
258 impl Acr {
259 #[doc = "Latency These bits represent the ratio between the HCLK (AHB clock) period and the Flash memory access time. ..."]
260 #[inline(always)]
261 pub const fn latency(&self) -> u8 {
262 let val = (self.0 >> 0usize) & 0x0f;
263 val as u8
264 }
265 #[doc = "Latency These bits represent the ratio between the HCLK (AHB clock) period and the Flash memory access time. ..."]
266 #[inline(always)]
267 pub fn set_latency(&mut self, val: u8) {
268 self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize);
269 }
270 #[doc = "Prefetch enable This bit enables the prefetch buffer in the embedded Flash memory."]
271 #[inline(always)]
272 pub const fn prften(&self) -> bool {
273 let val = (self.0 >> 8usize) & 0x01;
274 val != 0
275 }
276 #[doc = "Prefetch enable This bit enables the prefetch buffer in the embedded Flash memory."]
277 #[inline(always)]
278 pub fn set_prften(&mut self, val: bool) {
279 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
280 }
281 #[doc = "Low-power read mode This bit puts the Flash memory in low-power read mode."]
282 #[inline(always)]
283 pub const fn lpm(&self) -> super::vals::Lpm {
284 let val = (self.0 >> 11usize) & 0x01;
285 super::vals::Lpm::from_bits(val as u8)
286 }
287 #[doc = "Low-power read mode This bit puts the Flash memory in low-power read mode."]
288 #[inline(always)]
289 pub fn set_lpm(&mut self, val: super::vals::Lpm) {
290 self.0 = (self.0 & !(0x01 << 11usize)) | (((val.to_bits() as u32) & 0x01) << 11usize);
291 }
292 #[doc = "Bank 1 power-down mode request This bit is write-protected with FLASH_PDKEY1R. This bit requests bank 1 to enter power-down mode. When bank 1 enters power-down mode, this bit is cleared by hardware and the PDKEY1R is locked."]
293 #[inline(always)]
294 pub const fn pdreq1(&self) -> super::vals::Pdreq {
295 let val = (self.0 >> 12usize) & 0x01;
296 super::vals::Pdreq::from_bits(val as u8)
297 }
298 #[doc = "Bank 1 power-down mode request This bit is write-protected with FLASH_PDKEY1R. This bit requests bank 1 to enter power-down mode. When bank 1 enters power-down mode, this bit is cleared by hardware and the PDKEY1R is locked."]
299 #[inline(always)]
300 pub fn set_pdreq1(&mut self, val: super::vals::Pdreq) {
301 self.0 = (self.0 & !(0x01 << 12usize)) | (((val.to_bits() as u32) & 0x01) << 12usize);
302 }
303 #[doc = "Bank 2 power-down mode request This bit is write-protected with FLASH_PDKEY2R. This bit requests bank 2 to enter power-down mode. When bank 2 enters power-down mode, this bit is cleared by hardware and the PDKEY2R is locked."]
304 #[inline(always)]
305 pub const fn pdreq2(&self) -> super::vals::Pdreq {
306 let val = (self.0 >> 13usize) & 0x01;
307 super::vals::Pdreq::from_bits(val as u8)
308 }
309 #[doc = "Bank 2 power-down mode request This bit is write-protected with FLASH_PDKEY2R. This bit requests bank 2 to enter power-down mode. When bank 2 enters power-down mode, this bit is cleared by hardware and the PDKEY2R is locked."]
310 #[inline(always)]
311 pub fn set_pdreq2(&mut self, val: super::vals::Pdreq) {
312 self.0 = (self.0 & !(0x01 << 13usize)) | (((val.to_bits() as u32) & 0x01) << 13usize);
313 }
314 #[doc = "Flash memory power-down mode during Sleep mode This bit determines whether the Flash memory is in power-down mode or Idle mode when the device is in Sleep mode. The Flash must not be put in power-down while a program or an erase operation is on-going."]
315 #[inline(always)]
316 pub const fn sleep_pd(&self) -> super::vals::SleepPd {
317 let val = (self.0 >> 14usize) & 0x01;
318 super::vals::SleepPd::from_bits(val as u8)
319 }
320 #[doc = "Flash memory power-down mode during Sleep mode This bit determines whether the Flash memory is in power-down mode or Idle mode when the device is in Sleep mode. The Flash must not be put in power-down while a program or an erase operation is on-going."]
321 #[inline(always)]
322 pub fn set_sleep_pd(&mut self, val: super::vals::SleepPd) {
323 self.0 = (self.0 & !(0x01 << 14usize)) | (((val.to_bits() as u32) & 0x01) << 14usize);
324 }
325 }
326 impl Default for Acr {
327 #[inline(always)]
328 fn default() -> Acr {
329 Acr(0)
330 }
331 }
332 impl core::fmt::Debug for Acr {
333 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
334 f.debug_struct("Acr")
335 .field("latency", &self.latency())
336 .field("prften", &self.prften())
337 .field("lpm", &self.lpm())
338 .field("pdreq1", &self.pdreq1())
339 .field("pdreq2", &self.pdreq2())
340 .field("sleep_pd", &self.sleep_pd())
341 .finish()
342 }
343 }
344 #[cfg(feature = "defmt")]
345 impl defmt::Format for Acr {
346 fn format(&self, f: defmt::Formatter) {
347 #[derive(defmt :: Format)]
348 struct Acr {
349 latency: u8,
350 prften: bool,
351 lpm: super::vals::Lpm,
352 pdreq1: super::vals::Pdreq,
353 pdreq2: super::vals::Pdreq,
354 sleep_pd: super::vals::SleepPd,
355 }
356 let proxy = Acr {
357 latency: self.latency(),
358 prften: self.prften(),
359 lpm: self.lpm(),
360 pdreq1: self.pdreq1(),
361 pdreq2: self.pdreq2(),
362 sleep_pd: self.sleep_pd(),
363 };
364 defmt::write!(f, "{}", proxy)
365 }
366 }
367 #[doc = "FLASH ECC register"]
368 #[repr(transparent)]
369 #[derive(Copy, Clone, Eq, PartialEq)]
370 pub struct Eccr(pub u32);
371 impl Eccr {
372 #[doc = "ECC fail address"]
373 #[inline(always)]
374 pub const fn addr_ecc(&self) -> u32 {
375 let val = (self.0 >> 0usize) & 0x000f_ffff;
376 val as u32
377 }
378 #[doc = "ECC fail address"]
379 #[inline(always)]
380 pub fn set_addr_ecc(&mut self, val: u32) {
381 self.0 = (self.0 & !(0x000f_ffff << 0usize)) | (((val as u32) & 0x000f_ffff) << 0usize);
382 }
383 #[doc = "ECC fail bank"]
384 #[inline(always)]
385 pub const fn bk_ecc(&self) -> super::vals::BkEcc {
386 let val = (self.0 >> 21usize) & 0x01;
387 super::vals::BkEcc::from_bits(val as u8)
388 }
389 #[doc = "ECC fail bank"]
390 #[inline(always)]
391 pub fn set_bk_ecc(&mut self, val: super::vals::BkEcc) {
392 self.0 = (self.0 & !(0x01 << 21usize)) | (((val.to_bits() as u32) & 0x01) << 21usize);
393 }
394 #[doc = "System Flash memory ECC fail This bit indicates that the ECC error correction or double ECC error detection is located in the system Flash memory."]
395 #[inline(always)]
396 pub const fn sysf_ecc(&self) -> bool {
397 let val = (self.0 >> 22usize) & 0x01;
398 val != 0
399 }
400 #[doc = "System Flash memory ECC fail This bit indicates that the ECC error correction or double ECC error detection is located in the system Flash memory."]
401 #[inline(always)]
402 pub fn set_sysf_ecc(&mut self, val: bool) {
403 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
404 }
405 #[doc = "ECC correction interrupt enable This bit enables the interrupt generation when the ECCC bit in the FLASH_ECCR register is set."]
406 #[inline(always)]
407 pub const fn eccie(&self) -> super::vals::Eccie {
408 let val = (self.0 >> 24usize) & 0x01;
409 super::vals::Eccie::from_bits(val as u8)
410 }
411 #[doc = "ECC correction interrupt enable This bit enables the interrupt generation when the ECCC bit in the FLASH_ECCR register is set."]
412 #[inline(always)]
413 pub fn set_eccie(&mut self, val: super::vals::Eccie) {
414 self.0 = (self.0 & !(0x01 << 24usize)) | (((val.to_bits() as u32) & 0x01) << 24usize);
415 }
416 #[doc = "ECC correction This bit is set by hardware when one ECC error has been detected and corrected (only if ECCC and ECCD were previously cleared). An interrupt is generated if ECCIE is set. This bit is cleared by writing 1."]
417 #[inline(always)]
418 pub const fn eccc(&self) -> bool {
419 let val = (self.0 >> 30usize) & 0x01;
420 val != 0
421 }
422 #[doc = "ECC correction This bit is set by hardware when one ECC error has been detected and corrected (only if ECCC and ECCD were previously cleared). An interrupt is generated if ECCIE is set. This bit is cleared by writing 1."]
423 #[inline(always)]
424 pub fn set_eccc(&mut self, val: bool) {
425 self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize);
426 }
427 #[doc = "ECC detection This bit is set by hardware when two ECC errors have been detected (only if ECCC and ECCD were previously cleared). When this bit is set, a NMI is generated. This bit is cleared by writing 1."]
428 #[inline(always)]
429 pub const fn eccd(&self) -> bool {
430 let val = (self.0 >> 31usize) & 0x01;
431 val != 0
432 }
433 #[doc = "ECC detection This bit is set by hardware when two ECC errors have been detected (only if ECCC and ECCD were previously cleared). When this bit is set, a NMI is generated. This bit is cleared by writing 1."]
434 #[inline(always)]
435 pub fn set_eccd(&mut self, val: bool) {
436 self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize);
437 }
438 }
439 impl Default for Eccr {
440 #[inline(always)]
441 fn default() -> Eccr {
442 Eccr(0)
443 }
444 }
445 impl core::fmt::Debug for Eccr {
446 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
447 f.debug_struct("Eccr")
448 .field("addr_ecc", &self.addr_ecc())
449 .field("bk_ecc", &self.bk_ecc())
450 .field("sysf_ecc", &self.sysf_ecc())
451 .field("eccie", &self.eccie())
452 .field("eccc", &self.eccc())
453 .field("eccd", &self.eccd())
454 .finish()
455 }
456 }
457 #[cfg(feature = "defmt")]
458 impl defmt::Format for Eccr {
459 fn format(&self, f: defmt::Formatter) {
460 #[derive(defmt :: Format)]
461 struct Eccr {
462 addr_ecc: u32,
463 bk_ecc: super::vals::BkEcc,
464 sysf_ecc: bool,
465 eccie: super::vals::Eccie,
466 eccc: bool,
467 eccd: bool,
468 }
469 let proxy = Eccr {
470 addr_ecc: self.addr_ecc(),
471 bk_ecc: self.bk_ecc(),
472 sysf_ecc: self.sysf_ecc(),
473 eccie: self.eccie(),
474 eccc: self.eccc(),
475 eccd: self.eccd(),
476 };
477 defmt::write!(f, "{}", proxy)
478 }
479 }
480 #[doc = "FLASH non-secure boot address 0 register"]
481 #[repr(transparent)]
482 #[derive(Copy, Clone, Eq, PartialEq)]
483 pub struct Nsbootadd0r(pub u32);
484 impl Nsbootadd0r {
485 #[doc = "Non-secure boot base address 0 The non-secure boot memory address can be programmed to any address in the valid address range with a granularity of 128 bytes. These bits correspond to address \\[31:7\\]. The NSBOOTADD0 option bytes are selected following the BOOT0 pin or nSWBOOT0 state. Examples: NSBOOTADD0\\[24:0\\]
486= 0x0100000: Boot from non-secure Flash memory (0x0800 0000) NSBOOTADD0\\[24:0\\]
487= 0x017F200: Boot from system memory bootloader (0x0BF9 0000) NSBOOTADD0\\[24:0\\]
488= 0x0400000: Boot from non-secure SRAM1 on S-Bus (0x2000 0000)"]
489 #[inline(always)]
490 pub const fn nsbootadd0(&self) -> u32 {
491 let val = (self.0 >> 7usize) & 0x01ff_ffff;
492 val as u32
493 }
494 #[doc = "Non-secure boot base address 0 The non-secure boot memory address can be programmed to any address in the valid address range with a granularity of 128 bytes. These bits correspond to address \\[31:7\\]. The NSBOOTADD0 option bytes are selected following the BOOT0 pin or nSWBOOT0 state. Examples: NSBOOTADD0\\[24:0\\]
495= 0x0100000: Boot from non-secure Flash memory (0x0800 0000) NSBOOTADD0\\[24:0\\]
496= 0x017F200: Boot from system memory bootloader (0x0BF9 0000) NSBOOTADD0\\[24:0\\]
497= 0x0400000: Boot from non-secure SRAM1 on S-Bus (0x2000 0000)"]
498 #[inline(always)]
499 pub fn set_nsbootadd0(&mut self, val: u32) {
500 self.0 = (self.0 & !(0x01ff_ffff << 7usize)) | (((val as u32) & 0x01ff_ffff) << 7usize);
501 }
502 }
503 impl Default for Nsbootadd0r {
504 #[inline(always)]
505 fn default() -> Nsbootadd0r {
506 Nsbootadd0r(0)
507 }
508 }
509 impl core::fmt::Debug for Nsbootadd0r {
510 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
511 f.debug_struct("Nsbootadd0r")
512 .field("nsbootadd0", &self.nsbootadd0())
513 .finish()
514 }
515 }
516 #[cfg(feature = "defmt")]
517 impl defmt::Format for Nsbootadd0r {
518 fn format(&self, f: defmt::Formatter) {
519 #[derive(defmt :: Format)]
520 struct Nsbootadd0r {
521 nsbootadd0: u32,
522 }
523 let proxy = Nsbootadd0r {
524 nsbootadd0: self.nsbootadd0(),
525 };
526 defmt::write!(f, "{}", proxy)
527 }
528 }
529 #[doc = "FLASH non-secure boot address 1 register"]
530 #[repr(transparent)]
531 #[derive(Copy, Clone, Eq, PartialEq)]
532 pub struct Nsbootadd1r(pub u32);
533 impl Nsbootadd1r {
534 #[doc = "Non-secure boot address 1 The non-secure boot memory address can be programmed to any address in the valid address range with a granularity of 128 bytes. These bits correspond to address \\[31:7\\]. The NSBOOTADD0 option bytes are selected following the BOOT0 pin or nSWBOOT0 state. Examples: NSBOOTADD1\\[24:0\\]
535= 0x0100000: Boot from non-secure Flash memory (0x0800 0000) NSBOOTADD1\\[24:0\\]
536= 0x017F200: Boot from system memory bootloader (0x0BF9 0000) NSBOOTADD1\\[24:0\\]
537= 0x0400000: Boot from non-secure SRAM1 on S-Bus (0x2000 0000)"]
538 #[inline(always)]
539 pub const fn nsbootadd1(&self) -> u32 {
540 let val = (self.0 >> 7usize) & 0x01ff_ffff;
541 val as u32
542 }
543 #[doc = "Non-secure boot address 1 The non-secure boot memory address can be programmed to any address in the valid address range with a granularity of 128 bytes. These bits correspond to address \\[31:7\\]. The NSBOOTADD0 option bytes are selected following the BOOT0 pin or nSWBOOT0 state. Examples: NSBOOTADD1\\[24:0\\]
544= 0x0100000: Boot from non-secure Flash memory (0x0800 0000) NSBOOTADD1\\[24:0\\]
545= 0x017F200: Boot from system memory bootloader (0x0BF9 0000) NSBOOTADD1\\[24:0\\]
546= 0x0400000: Boot from non-secure SRAM1 on S-Bus (0x2000 0000)"]
547 #[inline(always)]
548 pub fn set_nsbootadd1(&mut self, val: u32) {
549 self.0 = (self.0 & !(0x01ff_ffff << 7usize)) | (((val as u32) & 0x01ff_ffff) << 7usize);
550 }
551 }
552 impl Default for Nsbootadd1r {
553 #[inline(always)]
554 fn default() -> Nsbootadd1r {
555 Nsbootadd1r(0)
556 }
557 }
558 impl core::fmt::Debug for Nsbootadd1r {
559 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
560 f.debug_struct("Nsbootadd1r")
561 .field("nsbootadd1", &self.nsbootadd1())
562 .finish()
563 }
564 }
565 #[cfg(feature = "defmt")]
566 impl defmt::Format for Nsbootadd1r {
567 fn format(&self, f: defmt::Formatter) {
568 #[derive(defmt :: Format)]
569 struct Nsbootadd1r {
570 nsbootadd1: u32,
571 }
572 let proxy = Nsbootadd1r {
573 nsbootadd1: self.nsbootadd1(),
574 };
575 defmt::write!(f, "{}", proxy)
576 }
577 }
578 #[doc = "FLASH non-secure control register"]
579 #[repr(transparent)]
580 #[derive(Copy, Clone, Eq, PartialEq)]
581 pub struct Nscr(pub u32);
582 impl Nscr {
583 #[doc = "Non-secure programming"]
584 #[inline(always)]
585 pub const fn pg(&self) -> super::vals::NscrPg {
586 let val = (self.0 >> 0usize) & 0x01;
587 super::vals::NscrPg::from_bits(val as u8)
588 }
589 #[doc = "Non-secure programming"]
590 #[inline(always)]
591 pub fn set_pg(&mut self, val: super::vals::NscrPg) {
592 self.0 = (self.0 & !(0x01 << 0usize)) | (((val.to_bits() as u32) & 0x01) << 0usize);
593 }
594 #[doc = "Non-secure page erase"]
595 #[inline(always)]
596 pub const fn per(&self) -> super::vals::NscrPer {
597 let val = (self.0 >> 1usize) & 0x01;
598 super::vals::NscrPer::from_bits(val as u8)
599 }
600 #[doc = "Non-secure page erase"]
601 #[inline(always)]
602 pub fn set_per(&mut self, val: super::vals::NscrPer) {
603 self.0 = (self.0 & !(0x01 << 1usize)) | (((val.to_bits() as u32) & 0x01) << 1usize);
604 }
605 #[doc = "Non-secure bank 1 mass erase This bit triggers the bank 1 non-secure mass erase (all bank 1 user pages) when set."]
606 #[inline(always)]
607 pub const fn mer1(&self) -> bool {
608 let val = (self.0 >> 2usize) & 0x01;
609 val != 0
610 }
611 #[doc = "Non-secure bank 1 mass erase This bit triggers the bank 1 non-secure mass erase (all bank 1 user pages) when set."]
612 #[inline(always)]
613 pub fn set_mer1(&mut self, val: bool) {
614 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
615 }
616 #[doc = "Non-secure page number selection These bits select the page to erase. ..."]
617 #[inline(always)]
618 pub const fn pnb(&self) -> u8 {
619 let val = (self.0 >> 3usize) & 0xff;
620 val as u8
621 }
622 #[doc = "Non-secure page number selection These bits select the page to erase. ..."]
623 #[inline(always)]
624 pub fn set_pnb(&mut self, val: u8) {
625 self.0 = (self.0 & !(0xff << 3usize)) | (((val as u32) & 0xff) << 3usize);
626 }
627 #[doc = "Non-secure bank selection for page erase"]
628 #[inline(always)]
629 pub const fn bker(&self) -> super::vals::NscrBker {
630 let val = (self.0 >> 11usize) & 0x01;
631 super::vals::NscrBker::from_bits(val as u8)
632 }
633 #[doc = "Non-secure bank selection for page erase"]
634 #[inline(always)]
635 pub fn set_bker(&mut self, val: super::vals::NscrBker) {
636 self.0 = (self.0 & !(0x01 << 11usize)) | (((val.to_bits() as u32) & 0x01) << 11usize);
637 }
638 #[doc = "Non-secure burst write programming mode When set, this bit selects the burst write programming mode."]
639 #[inline(always)]
640 pub const fn bwr(&self) -> bool {
641 let val = (self.0 >> 14usize) & 0x01;
642 val != 0
643 }
644 #[doc = "Non-secure burst write programming mode When set, this bit selects the burst write programming mode."]
645 #[inline(always)]
646 pub fn set_bwr(&mut self, val: bool) {
647 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
648 }
649 #[doc = "Non-secure bank 2 mass erase This bit triggers the bank 2 non-secure mass erase (all bank 2 user pages) when set."]
650 #[inline(always)]
651 pub const fn mer2(&self) -> bool {
652 let val = (self.0 >> 15usize) & 0x01;
653 val != 0
654 }
655 #[doc = "Non-secure bank 2 mass erase This bit triggers the bank 2 non-secure mass erase (all bank 2 user pages) when set."]
656 #[inline(always)]
657 pub fn set_mer2(&mut self, val: bool) {
658 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
659 }
660 #[doc = "Non-secure start This bit triggers a non-secure erase operation when set. If MER1, MER2 and PER bits are reset and the STRT bit is set, the PGSERR bit in FLASH_NSSR is set (this condition is forbidden). This bit is set only by software and is cleared when the BSY bit is cleared in FLASH_NSSR."]
661 #[inline(always)]
662 pub const fn strt(&self) -> bool {
663 let val = (self.0 >> 16usize) & 0x01;
664 val != 0
665 }
666 #[doc = "Non-secure start This bit triggers a non-secure erase operation when set. If MER1, MER2 and PER bits are reset and the STRT bit is set, the PGSERR bit in FLASH_NSSR is set (this condition is forbidden). This bit is set only by software and is cleared when the BSY bit is cleared in FLASH_NSSR."]
667 #[inline(always)]
668 pub fn set_strt(&mut self, val: bool) {
669 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
670 }
671 #[doc = "Options modification start This bit triggers an options operation when set. It can not be written if OPTLOCK bit is set. This bit is set only by software, and is cleared when the BSY bit is cleared in FLASH_NSSR."]
672 #[inline(always)]
673 pub const fn optstrt(&self) -> bool {
674 let val = (self.0 >> 17usize) & 0x01;
675 val != 0
676 }
677 #[doc = "Options modification start This bit triggers an options operation when set. It can not be written if OPTLOCK bit is set. This bit is set only by software, and is cleared when the BSY bit is cleared in FLASH_NSSR."]
678 #[inline(always)]
679 pub fn set_optstrt(&mut self, val: bool) {
680 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
681 }
682 #[doc = "Non-secure end of operation interrupt enable This bit enables the interrupt generation when the EOP bit in the FLASH_NSSR is set to 1."]
683 #[inline(always)]
684 pub const fn eopie(&self) -> super::vals::NscrEopie {
685 let val = (self.0 >> 24usize) & 0x01;
686 super::vals::NscrEopie::from_bits(val as u8)
687 }
688 #[doc = "Non-secure end of operation interrupt enable This bit enables the interrupt generation when the EOP bit in the FLASH_NSSR is set to 1."]
689 #[inline(always)]
690 pub fn set_eopie(&mut self, val: super::vals::NscrEopie) {
691 self.0 = (self.0 & !(0x01 << 24usize)) | (((val.to_bits() as u32) & 0x01) << 24usize);
692 }
693 #[doc = "Non-secure error interrupt enable This bit enables the interrupt generation when the OPERR bit in the FLASH_NSSR is set to 1."]
694 #[inline(always)]
695 pub const fn errie(&self) -> super::vals::NscrErrie {
696 let val = (self.0 >> 25usize) & 0x01;
697 super::vals::NscrErrie::from_bits(val as u8)
698 }
699 #[doc = "Non-secure error interrupt enable This bit enables the interrupt generation when the OPERR bit in the FLASH_NSSR is set to 1."]
700 #[inline(always)]
701 pub fn set_errie(&mut self, val: super::vals::NscrErrie) {
702 self.0 = (self.0 & !(0x01 << 25usize)) | (((val.to_bits() as u32) & 0x01) << 25usize);
703 }
704 #[doc = "Force the option byte loading When set to 1, this bit forces the option byte reloading. This bit is cleared only when the option byte loading is complete. It cannot be written if OPTLOCK is set."]
705 #[inline(always)]
706 pub const fn obl_launch(&self) -> super::vals::OblLaunch {
707 let val = (self.0 >> 27usize) & 0x01;
708 super::vals::OblLaunch::from_bits(val as u8)
709 }
710 #[doc = "Force the option byte loading When set to 1, this bit forces the option byte reloading. This bit is cleared only when the option byte loading is complete. It cannot be written if OPTLOCK is set."]
711 #[inline(always)]
712 pub fn set_obl_launch(&mut self, val: super::vals::OblLaunch) {
713 self.0 = (self.0 & !(0x01 << 27usize)) | (((val.to_bits() as u32) & 0x01) << 27usize);
714 }
715 #[doc = "Option lock This bit is set only. When set, all bits concerning user options in FLASH_NSCR register are locked. This bit is cleared by hardware after detecting the unlock sequence. The LOCK bit in the FLASH_NSCR must be cleared before doing the unlock sequence for OPTLOCK bit. In case of an unsuccessful unlock operation, this bit remains set until the next reset."]
716 #[inline(always)]
717 pub const fn optlock(&self) -> bool {
718 let val = (self.0 >> 30usize) & 0x01;
719 val != 0
720 }
721 #[doc = "Option lock This bit is set only. When set, all bits concerning user options in FLASH_NSCR register are locked. This bit is cleared by hardware after detecting the unlock sequence. The LOCK bit in the FLASH_NSCR must be cleared before doing the unlock sequence for OPTLOCK bit. In case of an unsuccessful unlock operation, this bit remains set until the next reset."]
722 #[inline(always)]
723 pub fn set_optlock(&mut self, val: bool) {
724 self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize);
725 }
726 #[doc = "Non-secure lock This bit is set only. When set, the FLASH_NSCR register is locked. It is cleared by hardware after detecting the unlock sequence in FLASH_NSKEYR register. In case of an unsuccessful unlock operation, this bit remains set until the next system reset."]
727 #[inline(always)]
728 pub const fn lock(&self) -> bool {
729 let val = (self.0 >> 31usize) & 0x01;
730 val != 0
731 }
732 #[doc = "Non-secure lock This bit is set only. When set, the FLASH_NSCR register is locked. It is cleared by hardware after detecting the unlock sequence in FLASH_NSKEYR register. In case of an unsuccessful unlock operation, this bit remains set until the next system reset."]
733 #[inline(always)]
734 pub fn set_lock(&mut self, val: bool) {
735 self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize);
736 }
737 }
738 impl Default for Nscr {
739 #[inline(always)]
740 fn default() -> Nscr {
741 Nscr(0)
742 }
743 }
744 impl core::fmt::Debug for Nscr {
745 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
746 f.debug_struct("Nscr")
747 .field("pg", &self.pg())
748 .field("per", &self.per())
749 .field("mer1", &self.mer1())
750 .field("pnb", &self.pnb())
751 .field("bker", &self.bker())
752 .field("bwr", &self.bwr())
753 .field("mer2", &self.mer2())
754 .field("strt", &self.strt())
755 .field("optstrt", &self.optstrt())
756 .field("eopie", &self.eopie())
757 .field("errie", &self.errie())
758 .field("obl_launch", &self.obl_launch())
759 .field("optlock", &self.optlock())
760 .field("lock", &self.lock())
761 .finish()
762 }
763 }
764 #[cfg(feature = "defmt")]
765 impl defmt::Format for Nscr {
766 fn format(&self, f: defmt::Formatter) {
767 #[derive(defmt :: Format)]
768 struct Nscr {
769 pg: super::vals::NscrPg,
770 per: super::vals::NscrPer,
771 mer1: bool,
772 pnb: u8,
773 bker: super::vals::NscrBker,
774 bwr: bool,
775 mer2: bool,
776 strt: bool,
777 optstrt: bool,
778 eopie: super::vals::NscrEopie,
779 errie: super::vals::NscrErrie,
780 obl_launch: super::vals::OblLaunch,
781 optlock: bool,
782 lock: bool,
783 }
784 let proxy = Nscr {
785 pg: self.pg(),
786 per: self.per(),
787 mer1: self.mer1(),
788 pnb: self.pnb(),
789 bker: self.bker(),
790 bwr: self.bwr(),
791 mer2: self.mer2(),
792 strt: self.strt(),
793 optstrt: self.optstrt(),
794 eopie: self.eopie(),
795 errie: self.errie(),
796 obl_launch: self.obl_launch(),
797 optlock: self.optlock(),
798 lock: self.lock(),
799 };
800 defmt::write!(f, "{}", proxy)
801 }
802 }
803 #[doc = "FLASH non-secure status register"]
804 #[repr(transparent)]
805 #[derive(Copy, Clone, Eq, PartialEq)]
806 pub struct Nssr(pub u32);
807 impl Nssr {
808 #[doc = "Non-secure end of operation"]
809 #[inline(always)]
810 pub const fn eop(&self) -> bool {
811 let val = (self.0 >> 0usize) & 0x01;
812 val != 0
813 }
814 #[doc = "Non-secure end of operation"]
815 #[inline(always)]
816 pub fn set_eop(&mut self, val: bool) {
817 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
818 }
819 #[doc = "Non-secure operation error"]
820 #[inline(always)]
821 pub const fn operr(&self) -> bool {
822 let val = (self.0 >> 1usize) & 0x01;
823 val != 0
824 }
825 #[doc = "Non-secure operation error"]
826 #[inline(always)]
827 pub fn set_operr(&mut self, val: bool) {
828 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
829 }
830 #[doc = "Non-secure programming error This bit is set by hardware when a non-secure quad-word address to be programmed contains a value different from all 1 before programming, except if the data to write is all 0. This bit is cleared by writing 1."]
831 #[inline(always)]
832 pub const fn progerr(&self) -> bool {
833 let val = (self.0 >> 3usize) & 0x01;
834 val != 0
835 }
836 #[doc = "Non-secure programming error This bit is set by hardware when a non-secure quad-word address to be programmed contains a value different from all 1 before programming, except if the data to write is all 0. This bit is cleared by writing 1."]
837 #[inline(always)]
838 pub fn set_progerr(&mut self, val: bool) {
839 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
840 }
841 #[doc = "Non-secure write protection error This bit is set by hardware when an non-secure address to be erased/programmed belongs to a write-protected part (by WRP, HDP or RDP level 1) of the Flash memory. This bit is cleared by writing 1. Refer to for full conditions of error flag setting."]
842 #[inline(always)]
843 pub const fn wrperr(&self) -> bool {
844 let val = (self.0 >> 4usize) & 0x01;
845 val != 0
846 }
847 #[doc = "Non-secure write protection error This bit is set by hardware when an non-secure address to be erased/programmed belongs to a write-protected part (by WRP, HDP or RDP level 1) of the Flash memory. This bit is cleared by writing 1. Refer to for full conditions of error flag setting."]
848 #[inline(always)]
849 pub fn set_wrperr(&mut self, val: bool) {
850 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
851 }
852 #[doc = "Non-secure programming alignment error This bit is set by hardware when the first word to be programmed is not aligned with a quad-word address, or the second, third or forth word does not belong to the same quad-word address. This bit is cleared by writing 1."]
853 #[inline(always)]
854 pub const fn pgaerr(&self) -> bool {
855 let val = (self.0 >> 5usize) & 0x01;
856 val != 0
857 }
858 #[doc = "Non-secure programming alignment error This bit is set by hardware when the first word to be programmed is not aligned with a quad-word address, or the second, third or forth word does not belong to the same quad-word address. This bit is cleared by writing 1."]
859 #[inline(always)]
860 pub fn set_pgaerr(&mut self, val: bool) {
861 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
862 }
863 #[doc = "Non-secure size error This bit is set by hardware when the size of the access is a byte or half-word during a non-secure program sequence. Only quad-word programming is allowed by means of successive word accesses. This bit is cleared by writing 1."]
864 #[inline(always)]
865 pub const fn sizerr(&self) -> bool {
866 let val = (self.0 >> 6usize) & 0x01;
867 val != 0
868 }
869 #[doc = "Non-secure size error This bit is set by hardware when the size of the access is a byte or half-word during a non-secure program sequence. Only quad-word programming is allowed by means of successive word accesses. This bit is cleared by writing 1."]
870 #[inline(always)]
871 pub fn set_sizerr(&mut self, val: bool) {
872 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
873 }
874 #[doc = "Non-secure programming sequence error This bit is set by hardware when programming sequence is not correct. It is cleared by writing 1. Refer to for full conditions of error flag setting."]
875 #[inline(always)]
876 pub const fn pgserr(&self) -> bool {
877 let val = (self.0 >> 7usize) & 0x01;
878 val != 0
879 }
880 #[doc = "Non-secure programming sequence error This bit is set by hardware when programming sequence is not correct. It is cleared by writing 1. Refer to for full conditions of error flag setting."]
881 #[inline(always)]
882 pub fn set_pgserr(&mut self, val: bool) {
883 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
884 }
885 #[doc = "Option write error This bit is set by hardware when the options bytes are written with an invalid configuration. It is cleared by writing 1. Refer to for full conditions of error flag setting."]
886 #[inline(always)]
887 pub const fn optwerr(&self) -> bool {
888 let val = (self.0 >> 13usize) & 0x01;
889 val != 0
890 }
891 #[doc = "Option write error This bit is set by hardware when the options bytes are written with an invalid configuration. It is cleared by writing 1. Refer to for full conditions of error flag setting."]
892 #[inline(always)]
893 pub fn set_optwerr(&mut self, val: bool) {
894 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
895 }
896 #[doc = "Non-secure busy This indicates that a Flash memory secure or non-secure operation is in progress. This bit is set at the beginning of a Flash operation and reset when the operation finishes or when an error occurs."]
897 #[inline(always)]
898 pub const fn bsy(&self) -> bool {
899 let val = (self.0 >> 16usize) & 0x01;
900 val != 0
901 }
902 #[doc = "Non-secure busy This indicates that a Flash memory secure or non-secure operation is in progress. This bit is set at the beginning of a Flash operation and reset when the operation finishes or when an error occurs."]
903 #[inline(always)]
904 pub fn set_bsy(&mut self, val: bool) {
905 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
906 }
907 #[doc = "Non-secure wait data to write This bit indicates that the Flash memory write buffer has been written by a secure or non-secure operation. It is set when the first data is stored in the buffer and cleared when the write is performed in the Flash memory."]
908 #[inline(always)]
909 pub const fn wdw(&self) -> bool {
910 let val = (self.0 >> 17usize) & 0x01;
911 val != 0
912 }
913 #[doc = "Non-secure wait data to write This bit indicates that the Flash memory write buffer has been written by a secure or non-secure operation. It is set when the first data is stored in the buffer and cleared when the write is performed in the Flash memory."]
914 #[inline(always)]
915 pub fn set_wdw(&mut self, val: bool) {
916 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
917 }
918 #[doc = "OEM1 lock This bit indicates that the OEM1 RDP key read during the OBL is not virgin. When set, the OEM1 RDP lock mechanism is active."]
919 #[inline(always)]
920 pub const fn oem1lock(&self) -> bool {
921 let val = (self.0 >> 18usize) & 0x01;
922 val != 0
923 }
924 #[doc = "OEM1 lock This bit indicates that the OEM1 RDP key read during the OBL is not virgin. When set, the OEM1 RDP lock mechanism is active."]
925 #[inline(always)]
926 pub fn set_oem1lock(&mut self, val: bool) {
927 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
928 }
929 #[doc = "OEM2 lock This bit indicates that the OEM2 RDP key read during the OBL is not virgin. When set, the OEM2 RDP lock mechanism is active."]
930 #[inline(always)]
931 pub const fn oem2lock(&self) -> bool {
932 let val = (self.0 >> 19usize) & 0x01;
933 val != 0
934 }
935 #[doc = "OEM2 lock This bit indicates that the OEM2 RDP key read during the OBL is not virgin. When set, the OEM2 RDP lock mechanism is active."]
936 #[inline(always)]
937 pub fn set_oem2lock(&mut self, val: bool) {
938 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
939 }
940 #[doc = "Bank 1 in power-down mode This bit indicates that the Flash memory bank 1 is in power-down state. It is reset when bank 1 is in normal mode or being awaken."]
941 #[inline(always)]
942 pub const fn pd1(&self) -> bool {
943 let val = (self.0 >> 20usize) & 0x01;
944 val != 0
945 }
946 #[doc = "Bank 1 in power-down mode This bit indicates that the Flash memory bank 1 is in power-down state. It is reset when bank 1 is in normal mode or being awaken."]
947 #[inline(always)]
948 pub fn set_pd1(&mut self, val: bool) {
949 self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize);
950 }
951 #[doc = "Bank 2 in power-down mode This bit indicates that the Flash memory bank 2 is in power-down state. It is reset when bank 2 is in normal mode or being awaken."]
952 #[inline(always)]
953 pub const fn pd2(&self) -> bool {
954 let val = (self.0 >> 21usize) & 0x01;
955 val != 0
956 }
957 #[doc = "Bank 2 in power-down mode This bit indicates that the Flash memory bank 2 is in power-down state. It is reset when bank 2 is in normal mode or being awaken."]
958 #[inline(always)]
959 pub fn set_pd2(&mut self, val: bool) {
960 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
961 }
962 }
963 impl Default for Nssr {
964 #[inline(always)]
965 fn default() -> Nssr {
966 Nssr(0)
967 }
968 }
969 impl core::fmt::Debug for Nssr {
970 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
971 f.debug_struct("Nssr")
972 .field("eop", &self.eop())
973 .field("operr", &self.operr())
974 .field("progerr", &self.progerr())
975 .field("wrperr", &self.wrperr())
976 .field("pgaerr", &self.pgaerr())
977 .field("sizerr", &self.sizerr())
978 .field("pgserr", &self.pgserr())
979 .field("optwerr", &self.optwerr())
980 .field("bsy", &self.bsy())
981 .field("wdw", &self.wdw())
982 .field("oem1lock", &self.oem1lock())
983 .field("oem2lock", &self.oem2lock())
984 .field("pd1", &self.pd1())
985 .field("pd2", &self.pd2())
986 .finish()
987 }
988 }
989 #[cfg(feature = "defmt")]
990 impl defmt::Format for Nssr {
991 fn format(&self, f: defmt::Formatter) {
992 #[derive(defmt :: Format)]
993 struct Nssr {
994 eop: bool,
995 operr: bool,
996 progerr: bool,
997 wrperr: bool,
998 pgaerr: bool,
999 sizerr: bool,
1000 pgserr: bool,
1001 optwerr: bool,
1002 bsy: bool,
1003 wdw: bool,
1004 oem1lock: bool,
1005 oem2lock: bool,
1006 pd1: bool,
1007 pd2: bool,
1008 }
1009 let proxy = Nssr {
1010 eop: self.eop(),
1011 operr: self.operr(),
1012 progerr: self.progerr(),
1013 wrperr: self.wrperr(),
1014 pgaerr: self.pgaerr(),
1015 sizerr: self.sizerr(),
1016 pgserr: self.pgserr(),
1017 optwerr: self.optwerr(),
1018 bsy: self.bsy(),
1019 wdw: self.wdw(),
1020 oem1lock: self.oem1lock(),
1021 oem2lock: self.oem2lock(),
1022 pd1: self.pd1(),
1023 pd2: self.pd2(),
1024 };
1025 defmt::write!(f, "{}", proxy)
1026 }
1027 }
1028 #[doc = "FLASH OEM1 key register 1"]
1029 #[repr(transparent)]
1030 #[derive(Copy, Clone, Eq, PartialEq)]
1031 pub struct Oem1keyr1(pub u32);
1032 impl Oem1keyr1 {
1033 #[doc = "OEM1 least significant bytes key"]
1034 #[inline(always)]
1035 pub const fn oem1key(&self) -> u32 {
1036 let val = (self.0 >> 0usize) & 0xffff_ffff;
1037 val as u32
1038 }
1039 #[doc = "OEM1 least significant bytes key"]
1040 #[inline(always)]
1041 pub fn set_oem1key(&mut self, val: u32) {
1042 self.0 = (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
1043 }
1044 }
1045 impl Default for Oem1keyr1 {
1046 #[inline(always)]
1047 fn default() -> Oem1keyr1 {
1048 Oem1keyr1(0)
1049 }
1050 }
1051 impl core::fmt::Debug for Oem1keyr1 {
1052 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1053 f.debug_struct("Oem1keyr1").field("oem1key", &self.oem1key()).finish()
1054 }
1055 }
1056 #[cfg(feature = "defmt")]
1057 impl defmt::Format for Oem1keyr1 {
1058 fn format(&self, f: defmt::Formatter) {
1059 #[derive(defmt :: Format)]
1060 struct Oem1keyr1 {
1061 oem1key: u32,
1062 }
1063 let proxy = Oem1keyr1 {
1064 oem1key: self.oem1key(),
1065 };
1066 defmt::write!(f, "{}", proxy)
1067 }
1068 }
1069 #[doc = "FLASH OEM1 key register 2"]
1070 #[repr(transparent)]
1071 #[derive(Copy, Clone, Eq, PartialEq)]
1072 pub struct Oem1keyr2(pub u32);
1073 impl Oem1keyr2 {
1074 #[doc = "OEM1 most significant bytes key"]
1075 #[inline(always)]
1076 pub const fn oem1key(&self) -> u32 {
1077 let val = (self.0 >> 0usize) & 0xffff_ffff;
1078 val as u32
1079 }
1080 #[doc = "OEM1 most significant bytes key"]
1081 #[inline(always)]
1082 pub fn set_oem1key(&mut self, val: u32) {
1083 self.0 = (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
1084 }
1085 }
1086 impl Default for Oem1keyr2 {
1087 #[inline(always)]
1088 fn default() -> Oem1keyr2 {
1089 Oem1keyr2(0)
1090 }
1091 }
1092 impl core::fmt::Debug for Oem1keyr2 {
1093 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1094 f.debug_struct("Oem1keyr2").field("oem1key", &self.oem1key()).finish()
1095 }
1096 }
1097 #[cfg(feature = "defmt")]
1098 impl defmt::Format for Oem1keyr2 {
1099 fn format(&self, f: defmt::Formatter) {
1100 #[derive(defmt :: Format)]
1101 struct Oem1keyr2 {
1102 oem1key: u32,
1103 }
1104 let proxy = Oem1keyr2 {
1105 oem1key: self.oem1key(),
1106 };
1107 defmt::write!(f, "{}", proxy)
1108 }
1109 }
1110 #[doc = "FLASH OEM2 key register 1"]
1111 #[repr(transparent)]
1112 #[derive(Copy, Clone, Eq, PartialEq)]
1113 pub struct Oem2keyr1(pub u32);
1114 impl Oem2keyr1 {
1115 #[doc = "OEM2 least significant bytes key"]
1116 #[inline(always)]
1117 pub const fn oem2key(&self) -> u32 {
1118 let val = (self.0 >> 0usize) & 0xffff_ffff;
1119 val as u32
1120 }
1121 #[doc = "OEM2 least significant bytes key"]
1122 #[inline(always)]
1123 pub fn set_oem2key(&mut self, val: u32) {
1124 self.0 = (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
1125 }
1126 }
1127 impl Default for Oem2keyr1 {
1128 #[inline(always)]
1129 fn default() -> Oem2keyr1 {
1130 Oem2keyr1(0)
1131 }
1132 }
1133 impl core::fmt::Debug for Oem2keyr1 {
1134 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1135 f.debug_struct("Oem2keyr1").field("oem2key", &self.oem2key()).finish()
1136 }
1137 }
1138 #[cfg(feature = "defmt")]
1139 impl defmt::Format for Oem2keyr1 {
1140 fn format(&self, f: defmt::Formatter) {
1141 #[derive(defmt :: Format)]
1142 struct Oem2keyr1 {
1143 oem2key: u32,
1144 }
1145 let proxy = Oem2keyr1 {
1146 oem2key: self.oem2key(),
1147 };
1148 defmt::write!(f, "{}", proxy)
1149 }
1150 }
1151 #[doc = "FLASH OEM2 key register 2"]
1152 #[repr(transparent)]
1153 #[derive(Copy, Clone, Eq, PartialEq)]
1154 pub struct Oem2keyr2(pub u32);
1155 impl Oem2keyr2 {
1156 #[doc = "OEM2 most significant bytes key"]
1157 #[inline(always)]
1158 pub const fn oem2key(&self) -> u32 {
1159 let val = (self.0 >> 0usize) & 0xffff_ffff;
1160 val as u32
1161 }
1162 #[doc = "OEM2 most significant bytes key"]
1163 #[inline(always)]
1164 pub fn set_oem2key(&mut self, val: u32) {
1165 self.0 = (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
1166 }
1167 }
1168 impl Default for Oem2keyr2 {
1169 #[inline(always)]
1170 fn default() -> Oem2keyr2 {
1171 Oem2keyr2(0)
1172 }
1173 }
1174 impl core::fmt::Debug for Oem2keyr2 {
1175 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1176 f.debug_struct("Oem2keyr2").field("oem2key", &self.oem2key()).finish()
1177 }
1178 }
1179 #[cfg(feature = "defmt")]
1180 impl defmt::Format for Oem2keyr2 {
1181 fn format(&self, f: defmt::Formatter) {
1182 #[derive(defmt :: Format)]
1183 struct Oem2keyr2 {
1184 oem2key: u32,
1185 }
1186 let proxy = Oem2keyr2 {
1187 oem2key: self.oem2key(),
1188 };
1189 defmt::write!(f, "{}", proxy)
1190 }
1191 }
1192 #[doc = "FLASH operation status register"]
1193 #[repr(transparent)]
1194 #[derive(Copy, Clone, Eq, PartialEq)]
1195 pub struct Opsr(pub u32);
1196 impl Opsr {
1197 #[doc = "Interrupted operation address This field indicates which address in the Flash memory was accessed when reset occurred. The address is given by bank from address 0x0 0000 to 0xF FFF0."]
1198 #[inline(always)]
1199 pub const fn addr_op(&self) -> u32 {
1200 let val = (self.0 >> 0usize) & 0x000f_ffff;
1201 val as u32
1202 }
1203 #[doc = "Interrupted operation address This field indicates which address in the Flash memory was accessed when reset occurred. The address is given by bank from address 0x0 0000 to 0xF FFF0."]
1204 #[inline(always)]
1205 pub fn set_addr_op(&mut self, val: u32) {
1206 self.0 = (self.0 & !(0x000f_ffff << 0usize)) | (((val as u32) & 0x000f_ffff) << 0usize);
1207 }
1208 #[doc = "Interrupted operation bank This bit indicates which Flash memory bank was accessed when reset occurred"]
1209 #[inline(always)]
1210 pub const fn bk_op(&self) -> super::vals::BkOp {
1211 let val = (self.0 >> 21usize) & 0x01;
1212 super::vals::BkOp::from_bits(val as u8)
1213 }
1214 #[doc = "Interrupted operation bank This bit indicates which Flash memory bank was accessed when reset occurred"]
1215 #[inline(always)]
1216 pub fn set_bk_op(&mut self, val: super::vals::BkOp) {
1217 self.0 = (self.0 & !(0x01 << 21usize)) | (((val.to_bits() as u32) & 0x01) << 21usize);
1218 }
1219 #[doc = "Operation in system Flash memory interrupted This bit indicates that the reset occurred during an operation in the system Flash memory."]
1220 #[inline(always)]
1221 pub const fn sysf_op(&self) -> bool {
1222 let val = (self.0 >> 22usize) & 0x01;
1223 val != 0
1224 }
1225 #[doc = "Operation in system Flash memory interrupted This bit indicates that the reset occurred during an operation in the system Flash memory."]
1226 #[inline(always)]
1227 pub fn set_sysf_op(&mut self, val: bool) {
1228 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
1229 }
1230 #[doc = "Flash memory operation code This field indicates which Flash memory operation has been interrupted by a system reset:"]
1231 #[inline(always)]
1232 pub const fn code_op(&self) -> super::vals::CodeOp {
1233 let val = (self.0 >> 29usize) & 0x07;
1234 super::vals::CodeOp::from_bits(val as u8)
1235 }
1236 #[doc = "Flash memory operation code This field indicates which Flash memory operation has been interrupted by a system reset:"]
1237 #[inline(always)]
1238 pub fn set_code_op(&mut self, val: super::vals::CodeOp) {
1239 self.0 = (self.0 & !(0x07 << 29usize)) | (((val.to_bits() as u32) & 0x07) << 29usize);
1240 }
1241 }
1242 impl Default for Opsr {
1243 #[inline(always)]
1244 fn default() -> Opsr {
1245 Opsr(0)
1246 }
1247 }
1248 impl core::fmt::Debug for Opsr {
1249 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1250 f.debug_struct("Opsr")
1251 .field("addr_op", &self.addr_op())
1252 .field("bk_op", &self.bk_op())
1253 .field("sysf_op", &self.sysf_op())
1254 .field("code_op", &self.code_op())
1255 .finish()
1256 }
1257 }
1258 #[cfg(feature = "defmt")]
1259 impl defmt::Format for Opsr {
1260 fn format(&self, f: defmt::Formatter) {
1261 #[derive(defmt :: Format)]
1262 struct Opsr {
1263 addr_op: u32,
1264 bk_op: super::vals::BkOp,
1265 sysf_op: bool,
1266 code_op: super::vals::CodeOp,
1267 }
1268 let proxy = Opsr {
1269 addr_op: self.addr_op(),
1270 bk_op: self.bk_op(),
1271 sysf_op: self.sysf_op(),
1272 code_op: self.code_op(),
1273 };
1274 defmt::write!(f, "{}", proxy)
1275 }
1276 }
1277 #[doc = "FLASH option register"]
1278 #[repr(transparent)]
1279 #[derive(Copy, Clone, Eq, PartialEq)]
1280 pub struct Optr(pub u32);
1281 impl Optr {
1282 #[doc = "Readout protection level Others: Level 1 (memories readout protection active) Note: Refer to for more details."]
1283 #[inline(always)]
1284 pub const fn rdp(&self) -> super::vals::Rdp {
1285 let val = (self.0 >> 0usize) & 0xff;
1286 super::vals::Rdp::from_bits(val as u8)
1287 }
1288 #[doc = "Readout protection level Others: Level 1 (memories readout protection active) Note: Refer to for more details."]
1289 #[inline(always)]
1290 pub fn set_rdp(&mut self, val: super::vals::Rdp) {
1291 self.0 = (self.0 & !(0xff << 0usize)) | (((val.to_bits() as u32) & 0xff) << 0usize);
1292 }
1293 #[doc = "BOR reset level These bits contain the VDD supply level threshold that activates/releases the reset."]
1294 #[inline(always)]
1295 pub const fn bor_lev(&self) -> super::vals::BorLev {
1296 let val = (self.0 >> 8usize) & 0x07;
1297 super::vals::BorLev::from_bits(val as u8)
1298 }
1299 #[doc = "BOR reset level These bits contain the VDD supply level threshold that activates/releases the reset."]
1300 #[inline(always)]
1301 pub fn set_bor_lev(&mut self, val: super::vals::BorLev) {
1302 self.0 = (self.0 & !(0x07 << 8usize)) | (((val.to_bits() as u32) & 0x07) << 8usize);
1303 }
1304 #[doc = "Reset generation in Stop mode"]
1305 #[inline(always)]
1306 pub const fn n_rst_stop(&self) -> super::vals::NRstStop {
1307 let val = (self.0 >> 12usize) & 0x01;
1308 super::vals::NRstStop::from_bits(val as u8)
1309 }
1310 #[doc = "Reset generation in Stop mode"]
1311 #[inline(always)]
1312 pub fn set_n_rst_stop(&mut self, val: super::vals::NRstStop) {
1313 self.0 = (self.0 & !(0x01 << 12usize)) | (((val.to_bits() as u32) & 0x01) << 12usize);
1314 }
1315 #[doc = "Reset generation in Standby mode"]
1316 #[inline(always)]
1317 pub const fn n_rst_stdby(&self) -> super::vals::NRstStdby {
1318 let val = (self.0 >> 13usize) & 0x01;
1319 super::vals::NRstStdby::from_bits(val as u8)
1320 }
1321 #[doc = "Reset generation in Standby mode"]
1322 #[inline(always)]
1323 pub fn set_n_rst_stdby(&mut self, val: super::vals::NRstStdby) {
1324 self.0 = (self.0 & !(0x01 << 13usize)) | (((val.to_bits() as u32) & 0x01) << 13usize);
1325 }
1326 #[doc = "Reset generation in Shutdown mode"]
1327 #[inline(always)]
1328 pub const fn n_rst_shdw(&self) -> super::vals::NRstShdw {
1329 let val = (self.0 >> 14usize) & 0x01;
1330 super::vals::NRstShdw::from_bits(val as u8)
1331 }
1332 #[doc = "Reset generation in Shutdown mode"]
1333 #[inline(always)]
1334 pub fn set_n_rst_shdw(&mut self, val: super::vals::NRstShdw) {
1335 self.0 = (self.0 & !(0x01 << 14usize)) | (((val.to_bits() as u32) & 0x01) << 14usize);
1336 }
1337 #[doc = "SRAM1, SRAM3 and SRAM4 erase upon system reset"]
1338 #[inline(always)]
1339 pub const fn sram1345_rst(&self) -> bool {
1340 let val = (self.0 >> 15usize) & 0x01;
1341 val != 0
1342 }
1343 #[doc = "SRAM1, SRAM3 and SRAM4 erase upon system reset"]
1344 #[inline(always)]
1345 pub fn set_sram1345_rst(&mut self, val: bool) {
1346 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
1347 }
1348 #[doc = "Independent watchdog selection"]
1349 #[inline(always)]
1350 pub const fn iwdg_sw(&self) -> super::vals::IwdgSw {
1351 let val = (self.0 >> 16usize) & 0x01;
1352 super::vals::IwdgSw::from_bits(val as u8)
1353 }
1354 #[doc = "Independent watchdog selection"]
1355 #[inline(always)]
1356 pub fn set_iwdg_sw(&mut self, val: super::vals::IwdgSw) {
1357 self.0 = (self.0 & !(0x01 << 16usize)) | (((val.to_bits() as u32) & 0x01) << 16usize);
1358 }
1359 #[doc = "Independent watchdog counter freeze in Stop mode"]
1360 #[inline(always)]
1361 pub const fn iwdg_stop(&self) -> super::vals::IwdgStop {
1362 let val = (self.0 >> 17usize) & 0x01;
1363 super::vals::IwdgStop::from_bits(val as u8)
1364 }
1365 #[doc = "Independent watchdog counter freeze in Stop mode"]
1366 #[inline(always)]
1367 pub fn set_iwdg_stop(&mut self, val: super::vals::IwdgStop) {
1368 self.0 = (self.0 & !(0x01 << 17usize)) | (((val.to_bits() as u32) & 0x01) << 17usize);
1369 }
1370 #[doc = "Independent watchdog counter freeze in Standby mode"]
1371 #[inline(always)]
1372 pub const fn iwdg_stdby(&self) -> super::vals::IwdgStdby {
1373 let val = (self.0 >> 18usize) & 0x01;
1374 super::vals::IwdgStdby::from_bits(val as u8)
1375 }
1376 #[doc = "Independent watchdog counter freeze in Standby mode"]
1377 #[inline(always)]
1378 pub fn set_iwdg_stdby(&mut self, val: super::vals::IwdgStdby) {
1379 self.0 = (self.0 & !(0x01 << 18usize)) | (((val.to_bits() as u32) & 0x01) << 18usize);
1380 }
1381 #[doc = "Window watchdog selection"]
1382 #[inline(always)]
1383 pub const fn wwdg_sw(&self) -> super::vals::WwdgSw {
1384 let val = (self.0 >> 19usize) & 0x01;
1385 super::vals::WwdgSw::from_bits(val as u8)
1386 }
1387 #[doc = "Window watchdog selection"]
1388 #[inline(always)]
1389 pub fn set_wwdg_sw(&mut self, val: super::vals::WwdgSw) {
1390 self.0 = (self.0 & !(0x01 << 19usize)) | (((val.to_bits() as u32) & 0x01) << 19usize);
1391 }
1392 #[doc = "Swap banks"]
1393 #[inline(always)]
1394 pub const fn swap_bank(&self) -> super::vals::SwapBank {
1395 let val = (self.0 >> 20usize) & 0x01;
1396 super::vals::SwapBank::from_bits(val as u8)
1397 }
1398 #[doc = "Swap banks"]
1399 #[inline(always)]
1400 pub fn set_swap_bank(&mut self, val: super::vals::SwapBank) {
1401 self.0 = (self.0 & !(0x01 << 20usize)) | (((val.to_bits() as u32) & 0x01) << 20usize);
1402 }
1403 #[doc = "Dual-bank on 1-Mbyte and 512-Kbyte Flash memory devices"]
1404 #[inline(always)]
1405 pub const fn dualbank(&self) -> super::vals::Dualbank {
1406 let val = (self.0 >> 21usize) & 0x01;
1407 super::vals::Dualbank::from_bits(val as u8)
1408 }
1409 #[doc = "Dual-bank on 1-Mbyte and 512-Kbyte Flash memory devices"]
1410 #[inline(always)]
1411 pub fn set_dualbank(&mut self, val: super::vals::Dualbank) {
1412 self.0 = (self.0 & !(0x01 << 21usize)) | (((val.to_bits() as u32) & 0x01) << 21usize);
1413 }
1414 #[doc = "Backup RAM ECC detection and correction enable"]
1415 #[inline(always)]
1416 pub const fn bkpsram_ecc(&self) -> super::vals::BkpsramEcc {
1417 let val = (self.0 >> 22usize) & 0x01;
1418 super::vals::BkpsramEcc::from_bits(val as u8)
1419 }
1420 #[doc = "Backup RAM ECC detection and correction enable"]
1421 #[inline(always)]
1422 pub fn set_bkpsram_ecc(&mut self, val: super::vals::BkpsramEcc) {
1423 self.0 = (self.0 & !(0x01 << 22usize)) | (((val.to_bits() as u32) & 0x01) << 22usize);
1424 }
1425 #[doc = "SRAM3 ECC detection and correction enable"]
1426 #[inline(always)]
1427 pub const fn sram3_ecc(&self) -> super::vals::SramEcc {
1428 let val = (self.0 >> 23usize) & 0x01;
1429 super::vals::SramEcc::from_bits(val as u8)
1430 }
1431 #[doc = "SRAM3 ECC detection and correction enable"]
1432 #[inline(always)]
1433 pub fn set_sram3_ecc(&mut self, val: super::vals::SramEcc) {
1434 self.0 = (self.0 & !(0x01 << 23usize)) | (((val.to_bits() as u32) & 0x01) << 23usize);
1435 }
1436 #[doc = "SRAM2 ECC detection and correction enable"]
1437 #[inline(always)]
1438 pub const fn sram2_ecc(&self) -> super::vals::SramEcc {
1439 let val = (self.0 >> 24usize) & 0x01;
1440 super::vals::SramEcc::from_bits(val as u8)
1441 }
1442 #[doc = "SRAM2 ECC detection and correction enable"]
1443 #[inline(always)]
1444 pub fn set_sram2_ecc(&mut self, val: super::vals::SramEcc) {
1445 self.0 = (self.0 & !(0x01 << 24usize)) | (((val.to_bits() as u32) & 0x01) << 24usize);
1446 }
1447 #[doc = "SRAM2 erase when system reset"]
1448 #[inline(always)]
1449 pub const fn sram2_rst(&self) -> bool {
1450 let val = (self.0 >> 25usize) & 0x01;
1451 val != 0
1452 }
1453 #[doc = "SRAM2 erase when system reset"]
1454 #[inline(always)]
1455 pub fn set_sram2_rst(&mut self, val: bool) {
1456 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
1457 }
1458 #[doc = "Software BOOT0"]
1459 #[inline(always)]
1460 pub const fn n_swboot0(&self) -> super::vals::NSwboot {
1461 let val = (self.0 >> 26usize) & 0x01;
1462 super::vals::NSwboot::from_bits(val as u8)
1463 }
1464 #[doc = "Software BOOT0"]
1465 #[inline(always)]
1466 pub fn set_n_swboot0(&mut self, val: super::vals::NSwboot) {
1467 self.0 = (self.0 & !(0x01 << 26usize)) | (((val.to_bits() as u32) & 0x01) << 26usize);
1468 }
1469 #[doc = "nBOOT0 option bit"]
1470 #[inline(always)]
1471 pub const fn n_boot0(&self) -> super::vals::NBoot {
1472 let val = (self.0 >> 27usize) & 0x01;
1473 super::vals::NBoot::from_bits(val as u8)
1474 }
1475 #[doc = "nBOOT0 option bit"]
1476 #[inline(always)]
1477 pub fn set_n_boot0(&mut self, val: super::vals::NBoot) {
1478 self.0 = (self.0 & !(0x01 << 27usize)) | (((val.to_bits() as u32) & 0x01) << 27usize);
1479 }
1480 #[doc = "PA15 pull-up enable"]
1481 #[inline(always)]
1482 pub const fn pa15_pupen(&self) -> bool {
1483 let val = (self.0 >> 28usize) & 0x01;
1484 val != 0
1485 }
1486 #[doc = "PA15 pull-up enable"]
1487 #[inline(always)]
1488 pub fn set_pa15_pupen(&mut self, val: bool) {
1489 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
1490 }
1491 #[doc = "High-speed IO at low VDD voltage configuration bit This bit can be set only with VDD below 2.5V"]
1492 #[inline(always)]
1493 pub const fn io_vdd_hslv(&self) -> super::vals::IoVddHslv {
1494 let val = (self.0 >> 29usize) & 0x01;
1495 super::vals::IoVddHslv::from_bits(val as u8)
1496 }
1497 #[doc = "High-speed IO at low VDD voltage configuration bit This bit can be set only with VDD below 2.5V"]
1498 #[inline(always)]
1499 pub fn set_io_vdd_hslv(&mut self, val: super::vals::IoVddHslv) {
1500 self.0 = (self.0 & !(0x01 << 29usize)) | (((val.to_bits() as u32) & 0x01) << 29usize);
1501 }
1502 #[doc = "High-speed IO at low VDDIO2 voltage configuration bit This bit can be set only with VDDIO2 below 2.5 V."]
1503 #[inline(always)]
1504 pub const fn io_vddio2_hslv(&self) -> super::vals::IoVddioHslv {
1505 let val = (self.0 >> 30usize) & 0x01;
1506 super::vals::IoVddioHslv::from_bits(val as u8)
1507 }
1508 #[doc = "High-speed IO at low VDDIO2 voltage configuration bit This bit can be set only with VDDIO2 below 2.5 V."]
1509 #[inline(always)]
1510 pub fn set_io_vddio2_hslv(&mut self, val: super::vals::IoVddioHslv) {
1511 self.0 = (self.0 & !(0x01 << 30usize)) | (((val.to_bits() as u32) & 0x01) << 30usize);
1512 }
1513 #[doc = "Global TrustZone security enable"]
1514 #[inline(always)]
1515 pub const fn tzen(&self) -> bool {
1516 let val = (self.0 >> 31usize) & 0x01;
1517 val != 0
1518 }
1519 #[doc = "Global TrustZone security enable"]
1520 #[inline(always)]
1521 pub fn set_tzen(&mut self, val: bool) {
1522 self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize);
1523 }
1524 }
1525 impl Default for Optr {
1526 #[inline(always)]
1527 fn default() -> Optr {
1528 Optr(0)
1529 }
1530 }
1531 impl core::fmt::Debug for Optr {
1532 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1533 f.debug_struct("Optr")
1534 .field("rdp", &self.rdp())
1535 .field("bor_lev", &self.bor_lev())
1536 .field("n_rst_stop", &self.n_rst_stop())
1537 .field("n_rst_stdby", &self.n_rst_stdby())
1538 .field("n_rst_shdw", &self.n_rst_shdw())
1539 .field("sram1345_rst", &self.sram1345_rst())
1540 .field("iwdg_sw", &self.iwdg_sw())
1541 .field("iwdg_stop", &self.iwdg_stop())
1542 .field("iwdg_stdby", &self.iwdg_stdby())
1543 .field("wwdg_sw", &self.wwdg_sw())
1544 .field("swap_bank", &self.swap_bank())
1545 .field("dualbank", &self.dualbank())
1546 .field("bkpsram_ecc", &self.bkpsram_ecc())
1547 .field("sram3_ecc", &self.sram3_ecc())
1548 .field("sram2_ecc", &self.sram2_ecc())
1549 .field("sram2_rst", &self.sram2_rst())
1550 .field("n_swboot0", &self.n_swboot0())
1551 .field("n_boot0", &self.n_boot0())
1552 .field("pa15_pupen", &self.pa15_pupen())
1553 .field("io_vdd_hslv", &self.io_vdd_hslv())
1554 .field("io_vddio2_hslv", &self.io_vddio2_hslv())
1555 .field("tzen", &self.tzen())
1556 .finish()
1557 }
1558 }
1559 #[cfg(feature = "defmt")]
1560 impl defmt::Format for Optr {
1561 fn format(&self, f: defmt::Formatter) {
1562 #[derive(defmt :: Format)]
1563 struct Optr {
1564 rdp: super::vals::Rdp,
1565 bor_lev: super::vals::BorLev,
1566 n_rst_stop: super::vals::NRstStop,
1567 n_rst_stdby: super::vals::NRstStdby,
1568 n_rst_shdw: super::vals::NRstShdw,
1569 sram1345_rst: bool,
1570 iwdg_sw: super::vals::IwdgSw,
1571 iwdg_stop: super::vals::IwdgStop,
1572 iwdg_stdby: super::vals::IwdgStdby,
1573 wwdg_sw: super::vals::WwdgSw,
1574 swap_bank: super::vals::SwapBank,
1575 dualbank: super::vals::Dualbank,
1576 bkpsram_ecc: super::vals::BkpsramEcc,
1577 sram3_ecc: super::vals::SramEcc,
1578 sram2_ecc: super::vals::SramEcc,
1579 sram2_rst: bool,
1580 n_swboot0: super::vals::NSwboot,
1581 n_boot0: super::vals::NBoot,
1582 pa15_pupen: bool,
1583 io_vdd_hslv: super::vals::IoVddHslv,
1584 io_vddio2_hslv: super::vals::IoVddioHslv,
1585 tzen: bool,
1586 }
1587 let proxy = Optr {
1588 rdp: self.rdp(),
1589 bor_lev: self.bor_lev(),
1590 n_rst_stop: self.n_rst_stop(),
1591 n_rst_stdby: self.n_rst_stdby(),
1592 n_rst_shdw: self.n_rst_shdw(),
1593 sram1345_rst: self.sram1345_rst(),
1594 iwdg_sw: self.iwdg_sw(),
1595 iwdg_stop: self.iwdg_stop(),
1596 iwdg_stdby: self.iwdg_stdby(),
1597 wwdg_sw: self.wwdg_sw(),
1598 swap_bank: self.swap_bank(),
1599 dualbank: self.dualbank(),
1600 bkpsram_ecc: self.bkpsram_ecc(),
1601 sram3_ecc: self.sram3_ecc(),
1602 sram2_ecc: self.sram2_ecc(),
1603 sram2_rst: self.sram2_rst(),
1604 n_swboot0: self.n_swboot0(),
1605 n_boot0: self.n_boot0(),
1606 pa15_pupen: self.pa15_pupen(),
1607 io_vdd_hslv: self.io_vdd_hslv(),
1608 io_vddio2_hslv: self.io_vddio2_hslv(),
1609 tzen: self.tzen(),
1610 };
1611 defmt::write!(f, "{}", proxy)
1612 }
1613 }
1614 #[doc = "FLASH bank 1 power-down key register"]
1615 #[repr(transparent)]
1616 #[derive(Copy, Clone, Eq, PartialEq)]
1617 pub struct Pdkey1r(pub u32);
1618 impl Pdkey1r {
1619 #[doc = "Bank 1 power-down key"]
1620 #[inline(always)]
1621 pub const fn pdkey1(&self) -> u32 {
1622 let val = (self.0 >> 0usize) & 0xffff_ffff;
1623 val as u32
1624 }
1625 #[doc = "Bank 1 power-down key"]
1626 #[inline(always)]
1627 pub fn set_pdkey1(&mut self, val: u32) {
1628 self.0 = (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
1629 }
1630 }
1631 impl Default for Pdkey1r {
1632 #[inline(always)]
1633 fn default() -> Pdkey1r {
1634 Pdkey1r(0)
1635 }
1636 }
1637 impl core::fmt::Debug for Pdkey1r {
1638 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1639 f.debug_struct("Pdkey1r").field("pdkey1", &self.pdkey1()).finish()
1640 }
1641 }
1642 #[cfg(feature = "defmt")]
1643 impl defmt::Format for Pdkey1r {
1644 fn format(&self, f: defmt::Formatter) {
1645 #[derive(defmt :: Format)]
1646 struct Pdkey1r {
1647 pdkey1: u32,
1648 }
1649 let proxy = Pdkey1r { pdkey1: self.pdkey1() };
1650 defmt::write!(f, "{}", proxy)
1651 }
1652 }
1653 #[doc = "FLASH bank 2 power-down key register"]
1654 #[repr(transparent)]
1655 #[derive(Copy, Clone, Eq, PartialEq)]
1656 pub struct Pdkey2r(pub u32);
1657 impl Pdkey2r {
1658 #[doc = "Bank 2 power-down key"]
1659 #[inline(always)]
1660 pub const fn pdkey2(&self) -> u32 {
1661 let val = (self.0 >> 0usize) & 0xffff_ffff;
1662 val as u32
1663 }
1664 #[doc = "Bank 2 power-down key"]
1665 #[inline(always)]
1666 pub fn set_pdkey2(&mut self, val: u32) {
1667 self.0 = (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
1668 }
1669 }
1670 impl Default for Pdkey2r {
1671 #[inline(always)]
1672 fn default() -> Pdkey2r {
1673 Pdkey2r(0)
1674 }
1675 }
1676 impl core::fmt::Debug for Pdkey2r {
1677 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1678 f.debug_struct("Pdkey2r").field("pdkey2", &self.pdkey2()).finish()
1679 }
1680 }
1681 #[cfg(feature = "defmt")]
1682 impl defmt::Format for Pdkey2r {
1683 fn format(&self, f: defmt::Formatter) {
1684 #[derive(defmt :: Format)]
1685 struct Pdkey2r {
1686 pdkey2: u32,
1687 }
1688 let proxy = Pdkey2r { pdkey2: self.pdkey2() };
1689 defmt::write!(f, "{}", proxy)
1690 }
1691 }
1692 #[doc = "FLASH privilege block based bank 1 register 1"]
1693 #[repr(transparent)]
1694 #[derive(Copy, Clone, Eq, PartialEq)]
1695 pub struct Priv1bbr1(pub u32);
1696 impl Priv1bbr1 {
1697 #[doc = "page privileged/unprivileged attribution"]
1698 #[inline(always)]
1699 pub const fn priv1bb0(&self) -> bool {
1700 let val = (self.0 >> 0usize) & 0x01;
1701 val != 0
1702 }
1703 #[doc = "page privileged/unprivileged attribution"]
1704 #[inline(always)]
1705 pub fn set_priv1bb0(&mut self, val: bool) {
1706 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
1707 }
1708 #[doc = "page privileged/unprivileged attribution"]
1709 #[inline(always)]
1710 pub const fn priv1bb1(&self) -> bool {
1711 let val = (self.0 >> 1usize) & 0x01;
1712 val != 0
1713 }
1714 #[doc = "page privileged/unprivileged attribution"]
1715 #[inline(always)]
1716 pub fn set_priv1bb1(&mut self, val: bool) {
1717 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
1718 }
1719 #[doc = "page privileged/unprivileged attribution"]
1720 #[inline(always)]
1721 pub const fn priv1bb2(&self) -> bool {
1722 let val = (self.0 >> 2usize) & 0x01;
1723 val != 0
1724 }
1725 #[doc = "page privileged/unprivileged attribution"]
1726 #[inline(always)]
1727 pub fn set_priv1bb2(&mut self, val: bool) {
1728 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
1729 }
1730 #[doc = "page privileged/unprivileged attribution"]
1731 #[inline(always)]
1732 pub const fn priv1bb3(&self) -> bool {
1733 let val = (self.0 >> 3usize) & 0x01;
1734 val != 0
1735 }
1736 #[doc = "page privileged/unprivileged attribution"]
1737 #[inline(always)]
1738 pub fn set_priv1bb3(&mut self, val: bool) {
1739 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
1740 }
1741 #[doc = "page privileged/unprivileged attribution"]
1742 #[inline(always)]
1743 pub const fn priv1bb4(&self) -> bool {
1744 let val = (self.0 >> 4usize) & 0x01;
1745 val != 0
1746 }
1747 #[doc = "page privileged/unprivileged attribution"]
1748 #[inline(always)]
1749 pub fn set_priv1bb4(&mut self, val: bool) {
1750 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
1751 }
1752 #[doc = "page privileged/unprivileged attribution"]
1753 #[inline(always)]
1754 pub const fn priv1bb5(&self) -> bool {
1755 let val = (self.0 >> 5usize) & 0x01;
1756 val != 0
1757 }
1758 #[doc = "page privileged/unprivileged attribution"]
1759 #[inline(always)]
1760 pub fn set_priv1bb5(&mut self, val: bool) {
1761 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
1762 }
1763 #[doc = "page privileged/unprivileged attribution"]
1764 #[inline(always)]
1765 pub const fn priv1bb6(&self) -> bool {
1766 let val = (self.0 >> 6usize) & 0x01;
1767 val != 0
1768 }
1769 #[doc = "page privileged/unprivileged attribution"]
1770 #[inline(always)]
1771 pub fn set_priv1bb6(&mut self, val: bool) {
1772 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
1773 }
1774 #[doc = "page privileged/unprivileged attribution"]
1775 #[inline(always)]
1776 pub const fn priv1bb7(&self) -> bool {
1777 let val = (self.0 >> 7usize) & 0x01;
1778 val != 0
1779 }
1780 #[doc = "page privileged/unprivileged attribution"]
1781 #[inline(always)]
1782 pub fn set_priv1bb7(&mut self, val: bool) {
1783 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
1784 }
1785 #[doc = "page privileged/unprivileged attribution"]
1786 #[inline(always)]
1787 pub const fn priv1bb8(&self) -> bool {
1788 let val = (self.0 >> 8usize) & 0x01;
1789 val != 0
1790 }
1791 #[doc = "page privileged/unprivileged attribution"]
1792 #[inline(always)]
1793 pub fn set_priv1bb8(&mut self, val: bool) {
1794 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
1795 }
1796 #[doc = "page privileged/unprivileged attribution"]
1797 #[inline(always)]
1798 pub const fn priv1bb9(&self) -> bool {
1799 let val = (self.0 >> 9usize) & 0x01;
1800 val != 0
1801 }
1802 #[doc = "page privileged/unprivileged attribution"]
1803 #[inline(always)]
1804 pub fn set_priv1bb9(&mut self, val: bool) {
1805 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
1806 }
1807 #[doc = "page privileged/unprivileged attribution"]
1808 #[inline(always)]
1809 pub const fn priv1bb10(&self) -> bool {
1810 let val = (self.0 >> 10usize) & 0x01;
1811 val != 0
1812 }
1813 #[doc = "page privileged/unprivileged attribution"]
1814 #[inline(always)]
1815 pub fn set_priv1bb10(&mut self, val: bool) {
1816 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
1817 }
1818 #[doc = "page privileged/unprivileged attribution"]
1819 #[inline(always)]
1820 pub const fn priv1bb11(&self) -> bool {
1821 let val = (self.0 >> 11usize) & 0x01;
1822 val != 0
1823 }
1824 #[doc = "page privileged/unprivileged attribution"]
1825 #[inline(always)]
1826 pub fn set_priv1bb11(&mut self, val: bool) {
1827 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
1828 }
1829 #[doc = "page privileged/unprivileged attribution"]
1830 #[inline(always)]
1831 pub const fn priv1bb12(&self) -> bool {
1832 let val = (self.0 >> 12usize) & 0x01;
1833 val != 0
1834 }
1835 #[doc = "page privileged/unprivileged attribution"]
1836 #[inline(always)]
1837 pub fn set_priv1bb12(&mut self, val: bool) {
1838 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
1839 }
1840 #[doc = "page privileged/unprivileged attribution"]
1841 #[inline(always)]
1842 pub const fn priv1bb13(&self) -> bool {
1843 let val = (self.0 >> 13usize) & 0x01;
1844 val != 0
1845 }
1846 #[doc = "page privileged/unprivileged attribution"]
1847 #[inline(always)]
1848 pub fn set_priv1bb13(&mut self, val: bool) {
1849 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
1850 }
1851 #[doc = "page privileged/unprivileged attribution"]
1852 #[inline(always)]
1853 pub const fn priv1bb14(&self) -> bool {
1854 let val = (self.0 >> 14usize) & 0x01;
1855 val != 0
1856 }
1857 #[doc = "page privileged/unprivileged attribution"]
1858 #[inline(always)]
1859 pub fn set_priv1bb14(&mut self, val: bool) {
1860 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
1861 }
1862 #[doc = "page privileged/unprivileged attribution"]
1863 #[inline(always)]
1864 pub const fn priv1bb15(&self) -> bool {
1865 let val = (self.0 >> 15usize) & 0x01;
1866 val != 0
1867 }
1868 #[doc = "page privileged/unprivileged attribution"]
1869 #[inline(always)]
1870 pub fn set_priv1bb15(&mut self, val: bool) {
1871 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
1872 }
1873 #[doc = "page privileged/unprivileged attribution"]
1874 #[inline(always)]
1875 pub const fn priv1bb16(&self) -> bool {
1876 let val = (self.0 >> 16usize) & 0x01;
1877 val != 0
1878 }
1879 #[doc = "page privileged/unprivileged attribution"]
1880 #[inline(always)]
1881 pub fn set_priv1bb16(&mut self, val: bool) {
1882 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
1883 }
1884 #[doc = "page privileged/unprivileged attribution"]
1885 #[inline(always)]
1886 pub const fn priv1bb17(&self) -> bool {
1887 let val = (self.0 >> 17usize) & 0x01;
1888 val != 0
1889 }
1890 #[doc = "page privileged/unprivileged attribution"]
1891 #[inline(always)]
1892 pub fn set_priv1bb17(&mut self, val: bool) {
1893 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
1894 }
1895 #[doc = "page privileged/unprivileged attribution"]
1896 #[inline(always)]
1897 pub const fn priv1bb18(&self) -> bool {
1898 let val = (self.0 >> 18usize) & 0x01;
1899 val != 0
1900 }
1901 #[doc = "page privileged/unprivileged attribution"]
1902 #[inline(always)]
1903 pub fn set_priv1bb18(&mut self, val: bool) {
1904 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
1905 }
1906 #[doc = "page privileged/unprivileged attribution"]
1907 #[inline(always)]
1908 pub const fn priv1bb19(&self) -> bool {
1909 let val = (self.0 >> 19usize) & 0x01;
1910 val != 0
1911 }
1912 #[doc = "page privileged/unprivileged attribution"]
1913 #[inline(always)]
1914 pub fn set_priv1bb19(&mut self, val: bool) {
1915 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
1916 }
1917 #[doc = "page privileged/unprivileged attribution"]
1918 #[inline(always)]
1919 pub const fn priv1bb20(&self) -> bool {
1920 let val = (self.0 >> 20usize) & 0x01;
1921 val != 0
1922 }
1923 #[doc = "page privileged/unprivileged attribution"]
1924 #[inline(always)]
1925 pub fn set_priv1bb20(&mut self, val: bool) {
1926 self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize);
1927 }
1928 #[doc = "page privileged/unprivileged attribution"]
1929 #[inline(always)]
1930 pub const fn priv1bb21(&self) -> bool {
1931 let val = (self.0 >> 21usize) & 0x01;
1932 val != 0
1933 }
1934 #[doc = "page privileged/unprivileged attribution"]
1935 #[inline(always)]
1936 pub fn set_priv1bb21(&mut self, val: bool) {
1937 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
1938 }
1939 #[doc = "page privileged/unprivileged attribution"]
1940 #[inline(always)]
1941 pub const fn priv1bb22(&self) -> bool {
1942 let val = (self.0 >> 22usize) & 0x01;
1943 val != 0
1944 }
1945 #[doc = "page privileged/unprivileged attribution"]
1946 #[inline(always)]
1947 pub fn set_priv1bb22(&mut self, val: bool) {
1948 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
1949 }
1950 #[doc = "page privileged/unprivileged attribution"]
1951 #[inline(always)]
1952 pub const fn priv1bb23(&self) -> bool {
1953 let val = (self.0 >> 23usize) & 0x01;
1954 val != 0
1955 }
1956 #[doc = "page privileged/unprivileged attribution"]
1957 #[inline(always)]
1958 pub fn set_priv1bb23(&mut self, val: bool) {
1959 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
1960 }
1961 #[doc = "page privileged/unprivileged attribution"]
1962 #[inline(always)]
1963 pub const fn priv1bb24(&self) -> bool {
1964 let val = (self.0 >> 24usize) & 0x01;
1965 val != 0
1966 }
1967 #[doc = "page privileged/unprivileged attribution"]
1968 #[inline(always)]
1969 pub fn set_priv1bb24(&mut self, val: bool) {
1970 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
1971 }
1972 #[doc = "page privileged/unprivileged attribution"]
1973 #[inline(always)]
1974 pub const fn priv1bb25(&self) -> bool {
1975 let val = (self.0 >> 25usize) & 0x01;
1976 val != 0
1977 }
1978 #[doc = "page privileged/unprivileged attribution"]
1979 #[inline(always)]
1980 pub fn set_priv1bb25(&mut self, val: bool) {
1981 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
1982 }
1983 #[doc = "page privileged/unprivileged attribution"]
1984 #[inline(always)]
1985 pub const fn priv1bb26(&self) -> bool {
1986 let val = (self.0 >> 26usize) & 0x01;
1987 val != 0
1988 }
1989 #[doc = "page privileged/unprivileged attribution"]
1990 #[inline(always)]
1991 pub fn set_priv1bb26(&mut self, val: bool) {
1992 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
1993 }
1994 #[doc = "page privileged/unprivileged attribution"]
1995 #[inline(always)]
1996 pub const fn priv1bb27(&self) -> bool {
1997 let val = (self.0 >> 27usize) & 0x01;
1998 val != 0
1999 }
2000 #[doc = "page privileged/unprivileged attribution"]
2001 #[inline(always)]
2002 pub fn set_priv1bb27(&mut self, val: bool) {
2003 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize);
2004 }
2005 #[doc = "page privileged/unprivileged attribution"]
2006 #[inline(always)]
2007 pub const fn priv1bb28(&self) -> bool {
2008 let val = (self.0 >> 28usize) & 0x01;
2009 val != 0
2010 }
2011 #[doc = "page privileged/unprivileged attribution"]
2012 #[inline(always)]
2013 pub fn set_priv1bb28(&mut self, val: bool) {
2014 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
2015 }
2016 #[doc = "page privileged/unprivileged attribution"]
2017 #[inline(always)]
2018 pub const fn priv1bb29(&self) -> bool {
2019 let val = (self.0 >> 29usize) & 0x01;
2020 val != 0
2021 }
2022 #[doc = "page privileged/unprivileged attribution"]
2023 #[inline(always)]
2024 pub fn set_priv1bb29(&mut self, val: bool) {
2025 self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize);
2026 }
2027 #[doc = "page privileged/unprivileged attribution"]
2028 #[inline(always)]
2029 pub const fn priv1bb30(&self) -> bool {
2030 let val = (self.0 >> 30usize) & 0x01;
2031 val != 0
2032 }
2033 #[doc = "page privileged/unprivileged attribution"]
2034 #[inline(always)]
2035 pub fn set_priv1bb30(&mut self, val: bool) {
2036 self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize);
2037 }
2038 #[doc = "page privileged/unprivileged attribution"]
2039 #[inline(always)]
2040 pub const fn priv1bb31(&self) -> bool {
2041 let val = (self.0 >> 31usize) & 0x01;
2042 val != 0
2043 }
2044 #[doc = "page privileged/unprivileged attribution"]
2045 #[inline(always)]
2046 pub fn set_priv1bb31(&mut self, val: bool) {
2047 self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize);
2048 }
2049 }
2050 impl Default for Priv1bbr1 {
2051 #[inline(always)]
2052 fn default() -> Priv1bbr1 {
2053 Priv1bbr1(0)
2054 }
2055 }
2056 impl core::fmt::Debug for Priv1bbr1 {
2057 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2058 f.debug_struct("Priv1bbr1")
2059 .field("priv1bb0", &self.priv1bb0())
2060 .field("priv1bb1", &self.priv1bb1())
2061 .field("priv1bb2", &self.priv1bb2())
2062 .field("priv1bb3", &self.priv1bb3())
2063 .field("priv1bb4", &self.priv1bb4())
2064 .field("priv1bb5", &self.priv1bb5())
2065 .field("priv1bb6", &self.priv1bb6())
2066 .field("priv1bb7", &self.priv1bb7())
2067 .field("priv1bb8", &self.priv1bb8())
2068 .field("priv1bb9", &self.priv1bb9())
2069 .field("priv1bb10", &self.priv1bb10())
2070 .field("priv1bb11", &self.priv1bb11())
2071 .field("priv1bb12", &self.priv1bb12())
2072 .field("priv1bb13", &self.priv1bb13())
2073 .field("priv1bb14", &self.priv1bb14())
2074 .field("priv1bb15", &self.priv1bb15())
2075 .field("priv1bb16", &self.priv1bb16())
2076 .field("priv1bb17", &self.priv1bb17())
2077 .field("priv1bb18", &self.priv1bb18())
2078 .field("priv1bb19", &self.priv1bb19())
2079 .field("priv1bb20", &self.priv1bb20())
2080 .field("priv1bb21", &self.priv1bb21())
2081 .field("priv1bb22", &self.priv1bb22())
2082 .field("priv1bb23", &self.priv1bb23())
2083 .field("priv1bb24", &self.priv1bb24())
2084 .field("priv1bb25", &self.priv1bb25())
2085 .field("priv1bb26", &self.priv1bb26())
2086 .field("priv1bb27", &self.priv1bb27())
2087 .field("priv1bb28", &self.priv1bb28())
2088 .field("priv1bb29", &self.priv1bb29())
2089 .field("priv1bb30", &self.priv1bb30())
2090 .field("priv1bb31", &self.priv1bb31())
2091 .finish()
2092 }
2093 }
2094 #[cfg(feature = "defmt")]
2095 impl defmt::Format for Priv1bbr1 {
2096 fn format(&self, f: defmt::Formatter) {
2097 #[derive(defmt :: Format)]
2098 struct Priv1bbr1 {
2099 priv1bb0: bool,
2100 priv1bb1: bool,
2101 priv1bb2: bool,
2102 priv1bb3: bool,
2103 priv1bb4: bool,
2104 priv1bb5: bool,
2105 priv1bb6: bool,
2106 priv1bb7: bool,
2107 priv1bb8: bool,
2108 priv1bb9: bool,
2109 priv1bb10: bool,
2110 priv1bb11: bool,
2111 priv1bb12: bool,
2112 priv1bb13: bool,
2113 priv1bb14: bool,
2114 priv1bb15: bool,
2115 priv1bb16: bool,
2116 priv1bb17: bool,
2117 priv1bb18: bool,
2118 priv1bb19: bool,
2119 priv1bb20: bool,
2120 priv1bb21: bool,
2121 priv1bb22: bool,
2122 priv1bb23: bool,
2123 priv1bb24: bool,
2124 priv1bb25: bool,
2125 priv1bb26: bool,
2126 priv1bb27: bool,
2127 priv1bb28: bool,
2128 priv1bb29: bool,
2129 priv1bb30: bool,
2130 priv1bb31: bool,
2131 }
2132 let proxy = Priv1bbr1 {
2133 priv1bb0: self.priv1bb0(),
2134 priv1bb1: self.priv1bb1(),
2135 priv1bb2: self.priv1bb2(),
2136 priv1bb3: self.priv1bb3(),
2137 priv1bb4: self.priv1bb4(),
2138 priv1bb5: self.priv1bb5(),
2139 priv1bb6: self.priv1bb6(),
2140 priv1bb7: self.priv1bb7(),
2141 priv1bb8: self.priv1bb8(),
2142 priv1bb9: self.priv1bb9(),
2143 priv1bb10: self.priv1bb10(),
2144 priv1bb11: self.priv1bb11(),
2145 priv1bb12: self.priv1bb12(),
2146 priv1bb13: self.priv1bb13(),
2147 priv1bb14: self.priv1bb14(),
2148 priv1bb15: self.priv1bb15(),
2149 priv1bb16: self.priv1bb16(),
2150 priv1bb17: self.priv1bb17(),
2151 priv1bb18: self.priv1bb18(),
2152 priv1bb19: self.priv1bb19(),
2153 priv1bb20: self.priv1bb20(),
2154 priv1bb21: self.priv1bb21(),
2155 priv1bb22: self.priv1bb22(),
2156 priv1bb23: self.priv1bb23(),
2157 priv1bb24: self.priv1bb24(),
2158 priv1bb25: self.priv1bb25(),
2159 priv1bb26: self.priv1bb26(),
2160 priv1bb27: self.priv1bb27(),
2161 priv1bb28: self.priv1bb28(),
2162 priv1bb29: self.priv1bb29(),
2163 priv1bb30: self.priv1bb30(),
2164 priv1bb31: self.priv1bb31(),
2165 };
2166 defmt::write!(f, "{}", proxy)
2167 }
2168 }
2169 #[doc = "FLASH privilege block based bank 1 register 2"]
2170 #[repr(transparent)]
2171 #[derive(Copy, Clone, Eq, PartialEq)]
2172 pub struct Priv1bbr2(pub u32);
2173 impl Priv1bbr2 {
2174 #[doc = "page privileged/unprivileged attribution"]
2175 #[inline(always)]
2176 pub const fn priv1bb0(&self) -> bool {
2177 let val = (self.0 >> 0usize) & 0x01;
2178 val != 0
2179 }
2180 #[doc = "page privileged/unprivileged attribution"]
2181 #[inline(always)]
2182 pub fn set_priv1bb0(&mut self, val: bool) {
2183 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2184 }
2185 #[doc = "page privileged/unprivileged attribution"]
2186 #[inline(always)]
2187 pub const fn priv1bb1(&self) -> bool {
2188 let val = (self.0 >> 1usize) & 0x01;
2189 val != 0
2190 }
2191 #[doc = "page privileged/unprivileged attribution"]
2192 #[inline(always)]
2193 pub fn set_priv1bb1(&mut self, val: bool) {
2194 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
2195 }
2196 #[doc = "page privileged/unprivileged attribution"]
2197 #[inline(always)]
2198 pub const fn priv1bb2(&self) -> bool {
2199 let val = (self.0 >> 2usize) & 0x01;
2200 val != 0
2201 }
2202 #[doc = "page privileged/unprivileged attribution"]
2203 #[inline(always)]
2204 pub fn set_priv1bb2(&mut self, val: bool) {
2205 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
2206 }
2207 #[doc = "page privileged/unprivileged attribution"]
2208 #[inline(always)]
2209 pub const fn priv1bb3(&self) -> bool {
2210 let val = (self.0 >> 3usize) & 0x01;
2211 val != 0
2212 }
2213 #[doc = "page privileged/unprivileged attribution"]
2214 #[inline(always)]
2215 pub fn set_priv1bb3(&mut self, val: bool) {
2216 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
2217 }
2218 #[doc = "page privileged/unprivileged attribution"]
2219 #[inline(always)]
2220 pub const fn priv1bb4(&self) -> bool {
2221 let val = (self.0 >> 4usize) & 0x01;
2222 val != 0
2223 }
2224 #[doc = "page privileged/unprivileged attribution"]
2225 #[inline(always)]
2226 pub fn set_priv1bb4(&mut self, val: bool) {
2227 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
2228 }
2229 #[doc = "page privileged/unprivileged attribution"]
2230 #[inline(always)]
2231 pub const fn priv1bb5(&self) -> bool {
2232 let val = (self.0 >> 5usize) & 0x01;
2233 val != 0
2234 }
2235 #[doc = "page privileged/unprivileged attribution"]
2236 #[inline(always)]
2237 pub fn set_priv1bb5(&mut self, val: bool) {
2238 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
2239 }
2240 #[doc = "page privileged/unprivileged attribution"]
2241 #[inline(always)]
2242 pub const fn priv1bb6(&self) -> bool {
2243 let val = (self.0 >> 6usize) & 0x01;
2244 val != 0
2245 }
2246 #[doc = "page privileged/unprivileged attribution"]
2247 #[inline(always)]
2248 pub fn set_priv1bb6(&mut self, val: bool) {
2249 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
2250 }
2251 #[doc = "page privileged/unprivileged attribution"]
2252 #[inline(always)]
2253 pub const fn priv1bb7(&self) -> bool {
2254 let val = (self.0 >> 7usize) & 0x01;
2255 val != 0
2256 }
2257 #[doc = "page privileged/unprivileged attribution"]
2258 #[inline(always)]
2259 pub fn set_priv1bb7(&mut self, val: bool) {
2260 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
2261 }
2262 #[doc = "page privileged/unprivileged attribution"]
2263 #[inline(always)]
2264 pub const fn priv1bb8(&self) -> bool {
2265 let val = (self.0 >> 8usize) & 0x01;
2266 val != 0
2267 }
2268 #[doc = "page privileged/unprivileged attribution"]
2269 #[inline(always)]
2270 pub fn set_priv1bb8(&mut self, val: bool) {
2271 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
2272 }
2273 #[doc = "page privileged/unprivileged attribution"]
2274 #[inline(always)]
2275 pub const fn priv1bb9(&self) -> bool {
2276 let val = (self.0 >> 9usize) & 0x01;
2277 val != 0
2278 }
2279 #[doc = "page privileged/unprivileged attribution"]
2280 #[inline(always)]
2281 pub fn set_priv1bb9(&mut self, val: bool) {
2282 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
2283 }
2284 #[doc = "page privileged/unprivileged attribution"]
2285 #[inline(always)]
2286 pub const fn priv1bb10(&self) -> bool {
2287 let val = (self.0 >> 10usize) & 0x01;
2288 val != 0
2289 }
2290 #[doc = "page privileged/unprivileged attribution"]
2291 #[inline(always)]
2292 pub fn set_priv1bb10(&mut self, val: bool) {
2293 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
2294 }
2295 #[doc = "page privileged/unprivileged attribution"]
2296 #[inline(always)]
2297 pub const fn priv1bb11(&self) -> bool {
2298 let val = (self.0 >> 11usize) & 0x01;
2299 val != 0
2300 }
2301 #[doc = "page privileged/unprivileged attribution"]
2302 #[inline(always)]
2303 pub fn set_priv1bb11(&mut self, val: bool) {
2304 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
2305 }
2306 #[doc = "page privileged/unprivileged attribution"]
2307 #[inline(always)]
2308 pub const fn priv1bb12(&self) -> bool {
2309 let val = (self.0 >> 12usize) & 0x01;
2310 val != 0
2311 }
2312 #[doc = "page privileged/unprivileged attribution"]
2313 #[inline(always)]
2314 pub fn set_priv1bb12(&mut self, val: bool) {
2315 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
2316 }
2317 #[doc = "page privileged/unprivileged attribution"]
2318 #[inline(always)]
2319 pub const fn priv1bb13(&self) -> bool {
2320 let val = (self.0 >> 13usize) & 0x01;
2321 val != 0
2322 }
2323 #[doc = "page privileged/unprivileged attribution"]
2324 #[inline(always)]
2325 pub fn set_priv1bb13(&mut self, val: bool) {
2326 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
2327 }
2328 #[doc = "page privileged/unprivileged attribution"]
2329 #[inline(always)]
2330 pub const fn priv1bb14(&self) -> bool {
2331 let val = (self.0 >> 14usize) & 0x01;
2332 val != 0
2333 }
2334 #[doc = "page privileged/unprivileged attribution"]
2335 #[inline(always)]
2336 pub fn set_priv1bb14(&mut self, val: bool) {
2337 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
2338 }
2339 #[doc = "page privileged/unprivileged attribution"]
2340 #[inline(always)]
2341 pub const fn priv1bb15(&self) -> bool {
2342 let val = (self.0 >> 15usize) & 0x01;
2343 val != 0
2344 }
2345 #[doc = "page privileged/unprivileged attribution"]
2346 #[inline(always)]
2347 pub fn set_priv1bb15(&mut self, val: bool) {
2348 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
2349 }
2350 #[doc = "page privileged/unprivileged attribution"]
2351 #[inline(always)]
2352 pub const fn priv1bb16(&self) -> bool {
2353 let val = (self.0 >> 16usize) & 0x01;
2354 val != 0
2355 }
2356 #[doc = "page privileged/unprivileged attribution"]
2357 #[inline(always)]
2358 pub fn set_priv1bb16(&mut self, val: bool) {
2359 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
2360 }
2361 #[doc = "page privileged/unprivileged attribution"]
2362 #[inline(always)]
2363 pub const fn priv1bb17(&self) -> bool {
2364 let val = (self.0 >> 17usize) & 0x01;
2365 val != 0
2366 }
2367 #[doc = "page privileged/unprivileged attribution"]
2368 #[inline(always)]
2369 pub fn set_priv1bb17(&mut self, val: bool) {
2370 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
2371 }
2372 #[doc = "page privileged/unprivileged attribution"]
2373 #[inline(always)]
2374 pub const fn priv1bb18(&self) -> bool {
2375 let val = (self.0 >> 18usize) & 0x01;
2376 val != 0
2377 }
2378 #[doc = "page privileged/unprivileged attribution"]
2379 #[inline(always)]
2380 pub fn set_priv1bb18(&mut self, val: bool) {
2381 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
2382 }
2383 #[doc = "page privileged/unprivileged attribution"]
2384 #[inline(always)]
2385 pub const fn priv1bb19(&self) -> bool {
2386 let val = (self.0 >> 19usize) & 0x01;
2387 val != 0
2388 }
2389 #[doc = "page privileged/unprivileged attribution"]
2390 #[inline(always)]
2391 pub fn set_priv1bb19(&mut self, val: bool) {
2392 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
2393 }
2394 #[doc = "page privileged/unprivileged attribution"]
2395 #[inline(always)]
2396 pub const fn priv1bb20(&self) -> bool {
2397 let val = (self.0 >> 20usize) & 0x01;
2398 val != 0
2399 }
2400 #[doc = "page privileged/unprivileged attribution"]
2401 #[inline(always)]
2402 pub fn set_priv1bb20(&mut self, val: bool) {
2403 self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize);
2404 }
2405 #[doc = "page privileged/unprivileged attribution"]
2406 #[inline(always)]
2407 pub const fn priv1bb21(&self) -> bool {
2408 let val = (self.0 >> 21usize) & 0x01;
2409 val != 0
2410 }
2411 #[doc = "page privileged/unprivileged attribution"]
2412 #[inline(always)]
2413 pub fn set_priv1bb21(&mut self, val: bool) {
2414 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
2415 }
2416 #[doc = "page privileged/unprivileged attribution"]
2417 #[inline(always)]
2418 pub const fn priv1bb22(&self) -> bool {
2419 let val = (self.0 >> 22usize) & 0x01;
2420 val != 0
2421 }
2422 #[doc = "page privileged/unprivileged attribution"]
2423 #[inline(always)]
2424 pub fn set_priv1bb22(&mut self, val: bool) {
2425 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
2426 }
2427 #[doc = "page privileged/unprivileged attribution"]
2428 #[inline(always)]
2429 pub const fn priv1bb23(&self) -> bool {
2430 let val = (self.0 >> 23usize) & 0x01;
2431 val != 0
2432 }
2433 #[doc = "page privileged/unprivileged attribution"]
2434 #[inline(always)]
2435 pub fn set_priv1bb23(&mut self, val: bool) {
2436 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
2437 }
2438 #[doc = "page privileged/unprivileged attribution"]
2439 #[inline(always)]
2440 pub const fn priv1bb24(&self) -> bool {
2441 let val = (self.0 >> 24usize) & 0x01;
2442 val != 0
2443 }
2444 #[doc = "page privileged/unprivileged attribution"]
2445 #[inline(always)]
2446 pub fn set_priv1bb24(&mut self, val: bool) {
2447 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
2448 }
2449 #[doc = "page privileged/unprivileged attribution"]
2450 #[inline(always)]
2451 pub const fn priv1bb25(&self) -> bool {
2452 let val = (self.0 >> 25usize) & 0x01;
2453 val != 0
2454 }
2455 #[doc = "page privileged/unprivileged attribution"]
2456 #[inline(always)]
2457 pub fn set_priv1bb25(&mut self, val: bool) {
2458 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
2459 }
2460 #[doc = "page privileged/unprivileged attribution"]
2461 #[inline(always)]
2462 pub const fn priv1bb26(&self) -> bool {
2463 let val = (self.0 >> 26usize) & 0x01;
2464 val != 0
2465 }
2466 #[doc = "page privileged/unprivileged attribution"]
2467 #[inline(always)]
2468 pub fn set_priv1bb26(&mut self, val: bool) {
2469 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
2470 }
2471 #[doc = "page privileged/unprivileged attribution"]
2472 #[inline(always)]
2473 pub const fn priv1bb27(&self) -> bool {
2474 let val = (self.0 >> 27usize) & 0x01;
2475 val != 0
2476 }
2477 #[doc = "page privileged/unprivileged attribution"]
2478 #[inline(always)]
2479 pub fn set_priv1bb27(&mut self, val: bool) {
2480 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize);
2481 }
2482 #[doc = "page privileged/unprivileged attribution"]
2483 #[inline(always)]
2484 pub const fn priv1bb28(&self) -> bool {
2485 let val = (self.0 >> 28usize) & 0x01;
2486 val != 0
2487 }
2488 #[doc = "page privileged/unprivileged attribution"]
2489 #[inline(always)]
2490 pub fn set_priv1bb28(&mut self, val: bool) {
2491 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
2492 }
2493 #[doc = "page privileged/unprivileged attribution"]
2494 #[inline(always)]
2495 pub const fn priv1bb29(&self) -> bool {
2496 let val = (self.0 >> 29usize) & 0x01;
2497 val != 0
2498 }
2499 #[doc = "page privileged/unprivileged attribution"]
2500 #[inline(always)]
2501 pub fn set_priv1bb29(&mut self, val: bool) {
2502 self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize);
2503 }
2504 #[doc = "page privileged/unprivileged attribution"]
2505 #[inline(always)]
2506 pub const fn priv1bb30(&self) -> bool {
2507 let val = (self.0 >> 30usize) & 0x01;
2508 val != 0
2509 }
2510 #[doc = "page privileged/unprivileged attribution"]
2511 #[inline(always)]
2512 pub fn set_priv1bb30(&mut self, val: bool) {
2513 self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize);
2514 }
2515 #[doc = "page privileged/unprivileged attribution"]
2516 #[inline(always)]
2517 pub const fn priv1bb31(&self) -> bool {
2518 let val = (self.0 >> 31usize) & 0x01;
2519 val != 0
2520 }
2521 #[doc = "page privileged/unprivileged attribution"]
2522 #[inline(always)]
2523 pub fn set_priv1bb31(&mut self, val: bool) {
2524 self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize);
2525 }
2526 }
2527 impl Default for Priv1bbr2 {
2528 #[inline(always)]
2529 fn default() -> Priv1bbr2 {
2530 Priv1bbr2(0)
2531 }
2532 }
2533 impl core::fmt::Debug for Priv1bbr2 {
2534 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2535 f.debug_struct("Priv1bbr2")
2536 .field("priv1bb0", &self.priv1bb0())
2537 .field("priv1bb1", &self.priv1bb1())
2538 .field("priv1bb2", &self.priv1bb2())
2539 .field("priv1bb3", &self.priv1bb3())
2540 .field("priv1bb4", &self.priv1bb4())
2541 .field("priv1bb5", &self.priv1bb5())
2542 .field("priv1bb6", &self.priv1bb6())
2543 .field("priv1bb7", &self.priv1bb7())
2544 .field("priv1bb8", &self.priv1bb8())
2545 .field("priv1bb9", &self.priv1bb9())
2546 .field("priv1bb10", &self.priv1bb10())
2547 .field("priv1bb11", &self.priv1bb11())
2548 .field("priv1bb12", &self.priv1bb12())
2549 .field("priv1bb13", &self.priv1bb13())
2550 .field("priv1bb14", &self.priv1bb14())
2551 .field("priv1bb15", &self.priv1bb15())
2552 .field("priv1bb16", &self.priv1bb16())
2553 .field("priv1bb17", &self.priv1bb17())
2554 .field("priv1bb18", &self.priv1bb18())
2555 .field("priv1bb19", &self.priv1bb19())
2556 .field("priv1bb20", &self.priv1bb20())
2557 .field("priv1bb21", &self.priv1bb21())
2558 .field("priv1bb22", &self.priv1bb22())
2559 .field("priv1bb23", &self.priv1bb23())
2560 .field("priv1bb24", &self.priv1bb24())
2561 .field("priv1bb25", &self.priv1bb25())
2562 .field("priv1bb26", &self.priv1bb26())
2563 .field("priv1bb27", &self.priv1bb27())
2564 .field("priv1bb28", &self.priv1bb28())
2565 .field("priv1bb29", &self.priv1bb29())
2566 .field("priv1bb30", &self.priv1bb30())
2567 .field("priv1bb31", &self.priv1bb31())
2568 .finish()
2569 }
2570 }
2571 #[cfg(feature = "defmt")]
2572 impl defmt::Format for Priv1bbr2 {
2573 fn format(&self, f: defmt::Formatter) {
2574 #[derive(defmt :: Format)]
2575 struct Priv1bbr2 {
2576 priv1bb0: bool,
2577 priv1bb1: bool,
2578 priv1bb2: bool,
2579 priv1bb3: bool,
2580 priv1bb4: bool,
2581 priv1bb5: bool,
2582 priv1bb6: bool,
2583 priv1bb7: bool,
2584 priv1bb8: bool,
2585 priv1bb9: bool,
2586 priv1bb10: bool,
2587 priv1bb11: bool,
2588 priv1bb12: bool,
2589 priv1bb13: bool,
2590 priv1bb14: bool,
2591 priv1bb15: bool,
2592 priv1bb16: bool,
2593 priv1bb17: bool,
2594 priv1bb18: bool,
2595 priv1bb19: bool,
2596 priv1bb20: bool,
2597 priv1bb21: bool,
2598 priv1bb22: bool,
2599 priv1bb23: bool,
2600 priv1bb24: bool,
2601 priv1bb25: bool,
2602 priv1bb26: bool,
2603 priv1bb27: bool,
2604 priv1bb28: bool,
2605 priv1bb29: bool,
2606 priv1bb30: bool,
2607 priv1bb31: bool,
2608 }
2609 let proxy = Priv1bbr2 {
2610 priv1bb0: self.priv1bb0(),
2611 priv1bb1: self.priv1bb1(),
2612 priv1bb2: self.priv1bb2(),
2613 priv1bb3: self.priv1bb3(),
2614 priv1bb4: self.priv1bb4(),
2615 priv1bb5: self.priv1bb5(),
2616 priv1bb6: self.priv1bb6(),
2617 priv1bb7: self.priv1bb7(),
2618 priv1bb8: self.priv1bb8(),
2619 priv1bb9: self.priv1bb9(),
2620 priv1bb10: self.priv1bb10(),
2621 priv1bb11: self.priv1bb11(),
2622 priv1bb12: self.priv1bb12(),
2623 priv1bb13: self.priv1bb13(),
2624 priv1bb14: self.priv1bb14(),
2625 priv1bb15: self.priv1bb15(),
2626 priv1bb16: self.priv1bb16(),
2627 priv1bb17: self.priv1bb17(),
2628 priv1bb18: self.priv1bb18(),
2629 priv1bb19: self.priv1bb19(),
2630 priv1bb20: self.priv1bb20(),
2631 priv1bb21: self.priv1bb21(),
2632 priv1bb22: self.priv1bb22(),
2633 priv1bb23: self.priv1bb23(),
2634 priv1bb24: self.priv1bb24(),
2635 priv1bb25: self.priv1bb25(),
2636 priv1bb26: self.priv1bb26(),
2637 priv1bb27: self.priv1bb27(),
2638 priv1bb28: self.priv1bb28(),
2639 priv1bb29: self.priv1bb29(),
2640 priv1bb30: self.priv1bb30(),
2641 priv1bb31: self.priv1bb31(),
2642 };
2643 defmt::write!(f, "{}", proxy)
2644 }
2645 }
2646 #[doc = "FLASH privilege block based bank 1 register 3"]
2647 #[repr(transparent)]
2648 #[derive(Copy, Clone, Eq, PartialEq)]
2649 pub struct Priv1bbr3(pub u32);
2650 impl Priv1bbr3 {
2651 #[doc = "page privileged/unprivileged attribution"]
2652 #[inline(always)]
2653 pub const fn priv1bb0(&self) -> bool {
2654 let val = (self.0 >> 0usize) & 0x01;
2655 val != 0
2656 }
2657 #[doc = "page privileged/unprivileged attribution"]
2658 #[inline(always)]
2659 pub fn set_priv1bb0(&mut self, val: bool) {
2660 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
2661 }
2662 #[doc = "page privileged/unprivileged attribution"]
2663 #[inline(always)]
2664 pub const fn priv1bb1(&self) -> bool {
2665 let val = (self.0 >> 1usize) & 0x01;
2666 val != 0
2667 }
2668 #[doc = "page privileged/unprivileged attribution"]
2669 #[inline(always)]
2670 pub fn set_priv1bb1(&mut self, val: bool) {
2671 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
2672 }
2673 #[doc = "page privileged/unprivileged attribution"]
2674 #[inline(always)]
2675 pub const fn priv1bb2(&self) -> bool {
2676 let val = (self.0 >> 2usize) & 0x01;
2677 val != 0
2678 }
2679 #[doc = "page privileged/unprivileged attribution"]
2680 #[inline(always)]
2681 pub fn set_priv1bb2(&mut self, val: bool) {
2682 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
2683 }
2684 #[doc = "page privileged/unprivileged attribution"]
2685 #[inline(always)]
2686 pub const fn priv1bb3(&self) -> bool {
2687 let val = (self.0 >> 3usize) & 0x01;
2688 val != 0
2689 }
2690 #[doc = "page privileged/unprivileged attribution"]
2691 #[inline(always)]
2692 pub fn set_priv1bb3(&mut self, val: bool) {
2693 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
2694 }
2695 #[doc = "page privileged/unprivileged attribution"]
2696 #[inline(always)]
2697 pub const fn priv1bb4(&self) -> bool {
2698 let val = (self.0 >> 4usize) & 0x01;
2699 val != 0
2700 }
2701 #[doc = "page privileged/unprivileged attribution"]
2702 #[inline(always)]
2703 pub fn set_priv1bb4(&mut self, val: bool) {
2704 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
2705 }
2706 #[doc = "page privileged/unprivileged attribution"]
2707 #[inline(always)]
2708 pub const fn priv1bb5(&self) -> bool {
2709 let val = (self.0 >> 5usize) & 0x01;
2710 val != 0
2711 }
2712 #[doc = "page privileged/unprivileged attribution"]
2713 #[inline(always)]
2714 pub fn set_priv1bb5(&mut self, val: bool) {
2715 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
2716 }
2717 #[doc = "page privileged/unprivileged attribution"]
2718 #[inline(always)]
2719 pub const fn priv1bb6(&self) -> bool {
2720 let val = (self.0 >> 6usize) & 0x01;
2721 val != 0
2722 }
2723 #[doc = "page privileged/unprivileged attribution"]
2724 #[inline(always)]
2725 pub fn set_priv1bb6(&mut self, val: bool) {
2726 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
2727 }
2728 #[doc = "page privileged/unprivileged attribution"]
2729 #[inline(always)]
2730 pub const fn priv1bb7(&self) -> bool {
2731 let val = (self.0 >> 7usize) & 0x01;
2732 val != 0
2733 }
2734 #[doc = "page privileged/unprivileged attribution"]
2735 #[inline(always)]
2736 pub fn set_priv1bb7(&mut self, val: bool) {
2737 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
2738 }
2739 #[doc = "page privileged/unprivileged attribution"]
2740 #[inline(always)]
2741 pub const fn priv1bb8(&self) -> bool {
2742 let val = (self.0 >> 8usize) & 0x01;
2743 val != 0
2744 }
2745 #[doc = "page privileged/unprivileged attribution"]
2746 #[inline(always)]
2747 pub fn set_priv1bb8(&mut self, val: bool) {
2748 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
2749 }
2750 #[doc = "page privileged/unprivileged attribution"]
2751 #[inline(always)]
2752 pub const fn priv1bb9(&self) -> bool {
2753 let val = (self.0 >> 9usize) & 0x01;
2754 val != 0
2755 }
2756 #[doc = "page privileged/unprivileged attribution"]
2757 #[inline(always)]
2758 pub fn set_priv1bb9(&mut self, val: bool) {
2759 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
2760 }
2761 #[doc = "page privileged/unprivileged attribution"]
2762 #[inline(always)]
2763 pub const fn priv1bb10(&self) -> bool {
2764 let val = (self.0 >> 10usize) & 0x01;
2765 val != 0
2766 }
2767 #[doc = "page privileged/unprivileged attribution"]
2768 #[inline(always)]
2769 pub fn set_priv1bb10(&mut self, val: bool) {
2770 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
2771 }
2772 #[doc = "page privileged/unprivileged attribution"]
2773 #[inline(always)]
2774 pub const fn priv1bb11(&self) -> bool {
2775 let val = (self.0 >> 11usize) & 0x01;
2776 val != 0
2777 }
2778 #[doc = "page privileged/unprivileged attribution"]
2779 #[inline(always)]
2780 pub fn set_priv1bb11(&mut self, val: bool) {
2781 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
2782 }
2783 #[doc = "page privileged/unprivileged attribution"]
2784 #[inline(always)]
2785 pub const fn priv1bb12(&self) -> bool {
2786 let val = (self.0 >> 12usize) & 0x01;
2787 val != 0
2788 }
2789 #[doc = "page privileged/unprivileged attribution"]
2790 #[inline(always)]
2791 pub fn set_priv1bb12(&mut self, val: bool) {
2792 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
2793 }
2794 #[doc = "page privileged/unprivileged attribution"]
2795 #[inline(always)]
2796 pub const fn priv1bb13(&self) -> bool {
2797 let val = (self.0 >> 13usize) & 0x01;
2798 val != 0
2799 }
2800 #[doc = "page privileged/unprivileged attribution"]
2801 #[inline(always)]
2802 pub fn set_priv1bb13(&mut self, val: bool) {
2803 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
2804 }
2805 #[doc = "page privileged/unprivileged attribution"]
2806 #[inline(always)]
2807 pub const fn priv1bb14(&self) -> bool {
2808 let val = (self.0 >> 14usize) & 0x01;
2809 val != 0
2810 }
2811 #[doc = "page privileged/unprivileged attribution"]
2812 #[inline(always)]
2813 pub fn set_priv1bb14(&mut self, val: bool) {
2814 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
2815 }
2816 #[doc = "page privileged/unprivileged attribution"]
2817 #[inline(always)]
2818 pub const fn priv1bb15(&self) -> bool {
2819 let val = (self.0 >> 15usize) & 0x01;
2820 val != 0
2821 }
2822 #[doc = "page privileged/unprivileged attribution"]
2823 #[inline(always)]
2824 pub fn set_priv1bb15(&mut self, val: bool) {
2825 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
2826 }
2827 #[doc = "page privileged/unprivileged attribution"]
2828 #[inline(always)]
2829 pub const fn priv1bb16(&self) -> bool {
2830 let val = (self.0 >> 16usize) & 0x01;
2831 val != 0
2832 }
2833 #[doc = "page privileged/unprivileged attribution"]
2834 #[inline(always)]
2835 pub fn set_priv1bb16(&mut self, val: bool) {
2836 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
2837 }
2838 #[doc = "page privileged/unprivileged attribution"]
2839 #[inline(always)]
2840 pub const fn priv1bb17(&self) -> bool {
2841 let val = (self.0 >> 17usize) & 0x01;
2842 val != 0
2843 }
2844 #[doc = "page privileged/unprivileged attribution"]
2845 #[inline(always)]
2846 pub fn set_priv1bb17(&mut self, val: bool) {
2847 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
2848 }
2849 #[doc = "page privileged/unprivileged attribution"]
2850 #[inline(always)]
2851 pub const fn priv1bb18(&self) -> bool {
2852 let val = (self.0 >> 18usize) & 0x01;
2853 val != 0
2854 }
2855 #[doc = "page privileged/unprivileged attribution"]
2856 #[inline(always)]
2857 pub fn set_priv1bb18(&mut self, val: bool) {
2858 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
2859 }
2860 #[doc = "page privileged/unprivileged attribution"]
2861 #[inline(always)]
2862 pub const fn priv1bb19(&self) -> bool {
2863 let val = (self.0 >> 19usize) & 0x01;
2864 val != 0
2865 }
2866 #[doc = "page privileged/unprivileged attribution"]
2867 #[inline(always)]
2868 pub fn set_priv1bb19(&mut self, val: bool) {
2869 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
2870 }
2871 #[doc = "page privileged/unprivileged attribution"]
2872 #[inline(always)]
2873 pub const fn priv1bb20(&self) -> bool {
2874 let val = (self.0 >> 20usize) & 0x01;
2875 val != 0
2876 }
2877 #[doc = "page privileged/unprivileged attribution"]
2878 #[inline(always)]
2879 pub fn set_priv1bb20(&mut self, val: bool) {
2880 self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize);
2881 }
2882 #[doc = "page privileged/unprivileged attribution"]
2883 #[inline(always)]
2884 pub const fn priv1bb21(&self) -> bool {
2885 let val = (self.0 >> 21usize) & 0x01;
2886 val != 0
2887 }
2888 #[doc = "page privileged/unprivileged attribution"]
2889 #[inline(always)]
2890 pub fn set_priv1bb21(&mut self, val: bool) {
2891 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
2892 }
2893 #[doc = "page privileged/unprivileged attribution"]
2894 #[inline(always)]
2895 pub const fn priv1bb22(&self) -> bool {
2896 let val = (self.0 >> 22usize) & 0x01;
2897 val != 0
2898 }
2899 #[doc = "page privileged/unprivileged attribution"]
2900 #[inline(always)]
2901 pub fn set_priv1bb22(&mut self, val: bool) {
2902 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
2903 }
2904 #[doc = "page privileged/unprivileged attribution"]
2905 #[inline(always)]
2906 pub const fn priv1bb23(&self) -> bool {
2907 let val = (self.0 >> 23usize) & 0x01;
2908 val != 0
2909 }
2910 #[doc = "page privileged/unprivileged attribution"]
2911 #[inline(always)]
2912 pub fn set_priv1bb23(&mut self, val: bool) {
2913 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
2914 }
2915 #[doc = "page privileged/unprivileged attribution"]
2916 #[inline(always)]
2917 pub const fn priv1bb24(&self) -> bool {
2918 let val = (self.0 >> 24usize) & 0x01;
2919 val != 0
2920 }
2921 #[doc = "page privileged/unprivileged attribution"]
2922 #[inline(always)]
2923 pub fn set_priv1bb24(&mut self, val: bool) {
2924 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
2925 }
2926 #[doc = "page privileged/unprivileged attribution"]
2927 #[inline(always)]
2928 pub const fn priv1bb25(&self) -> bool {
2929 let val = (self.0 >> 25usize) & 0x01;
2930 val != 0
2931 }
2932 #[doc = "page privileged/unprivileged attribution"]
2933 #[inline(always)]
2934 pub fn set_priv1bb25(&mut self, val: bool) {
2935 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
2936 }
2937 #[doc = "page privileged/unprivileged attribution"]
2938 #[inline(always)]
2939 pub const fn priv1bb26(&self) -> bool {
2940 let val = (self.0 >> 26usize) & 0x01;
2941 val != 0
2942 }
2943 #[doc = "page privileged/unprivileged attribution"]
2944 #[inline(always)]
2945 pub fn set_priv1bb26(&mut self, val: bool) {
2946 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
2947 }
2948 #[doc = "page privileged/unprivileged attribution"]
2949 #[inline(always)]
2950 pub const fn priv1bb27(&self) -> bool {
2951 let val = (self.0 >> 27usize) & 0x01;
2952 val != 0
2953 }
2954 #[doc = "page privileged/unprivileged attribution"]
2955 #[inline(always)]
2956 pub fn set_priv1bb27(&mut self, val: bool) {
2957 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize);
2958 }
2959 #[doc = "page privileged/unprivileged attribution"]
2960 #[inline(always)]
2961 pub const fn priv1bb28(&self) -> bool {
2962 let val = (self.0 >> 28usize) & 0x01;
2963 val != 0
2964 }
2965 #[doc = "page privileged/unprivileged attribution"]
2966 #[inline(always)]
2967 pub fn set_priv1bb28(&mut self, val: bool) {
2968 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
2969 }
2970 #[doc = "page privileged/unprivileged attribution"]
2971 #[inline(always)]
2972 pub const fn priv1bb29(&self) -> bool {
2973 let val = (self.0 >> 29usize) & 0x01;
2974 val != 0
2975 }
2976 #[doc = "page privileged/unprivileged attribution"]
2977 #[inline(always)]
2978 pub fn set_priv1bb29(&mut self, val: bool) {
2979 self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize);
2980 }
2981 #[doc = "page privileged/unprivileged attribution"]
2982 #[inline(always)]
2983 pub const fn priv1bb30(&self) -> bool {
2984 let val = (self.0 >> 30usize) & 0x01;
2985 val != 0
2986 }
2987 #[doc = "page privileged/unprivileged attribution"]
2988 #[inline(always)]
2989 pub fn set_priv1bb30(&mut self, val: bool) {
2990 self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize);
2991 }
2992 #[doc = "page privileged/unprivileged attribution"]
2993 #[inline(always)]
2994 pub const fn priv1bb31(&self) -> bool {
2995 let val = (self.0 >> 31usize) & 0x01;
2996 val != 0
2997 }
2998 #[doc = "page privileged/unprivileged attribution"]
2999 #[inline(always)]
3000 pub fn set_priv1bb31(&mut self, val: bool) {
3001 self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize);
3002 }
3003 }
3004 impl Default for Priv1bbr3 {
3005 #[inline(always)]
3006 fn default() -> Priv1bbr3 {
3007 Priv1bbr3(0)
3008 }
3009 }
3010 impl core::fmt::Debug for Priv1bbr3 {
3011 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
3012 f.debug_struct("Priv1bbr3")
3013 .field("priv1bb0", &self.priv1bb0())
3014 .field("priv1bb1", &self.priv1bb1())
3015 .field("priv1bb2", &self.priv1bb2())
3016 .field("priv1bb3", &self.priv1bb3())
3017 .field("priv1bb4", &self.priv1bb4())
3018 .field("priv1bb5", &self.priv1bb5())
3019 .field("priv1bb6", &self.priv1bb6())
3020 .field("priv1bb7", &self.priv1bb7())
3021 .field("priv1bb8", &self.priv1bb8())
3022 .field("priv1bb9", &self.priv1bb9())
3023 .field("priv1bb10", &self.priv1bb10())
3024 .field("priv1bb11", &self.priv1bb11())
3025 .field("priv1bb12", &self.priv1bb12())
3026 .field("priv1bb13", &self.priv1bb13())
3027 .field("priv1bb14", &self.priv1bb14())
3028 .field("priv1bb15", &self.priv1bb15())
3029 .field("priv1bb16", &self.priv1bb16())
3030 .field("priv1bb17", &self.priv1bb17())
3031 .field("priv1bb18", &self.priv1bb18())
3032 .field("priv1bb19", &self.priv1bb19())
3033 .field("priv1bb20", &self.priv1bb20())
3034 .field("priv1bb21", &self.priv1bb21())
3035 .field("priv1bb22", &self.priv1bb22())
3036 .field("priv1bb23", &self.priv1bb23())
3037 .field("priv1bb24", &self.priv1bb24())
3038 .field("priv1bb25", &self.priv1bb25())
3039 .field("priv1bb26", &self.priv1bb26())
3040 .field("priv1bb27", &self.priv1bb27())
3041 .field("priv1bb28", &self.priv1bb28())
3042 .field("priv1bb29", &self.priv1bb29())
3043 .field("priv1bb30", &self.priv1bb30())
3044 .field("priv1bb31", &self.priv1bb31())
3045 .finish()
3046 }
3047 }
3048 #[cfg(feature = "defmt")]
3049 impl defmt::Format for Priv1bbr3 {
3050 fn format(&self, f: defmt::Formatter) {
3051 #[derive(defmt :: Format)]
3052 struct Priv1bbr3 {
3053 priv1bb0: bool,
3054 priv1bb1: bool,
3055 priv1bb2: bool,
3056 priv1bb3: bool,
3057 priv1bb4: bool,
3058 priv1bb5: bool,
3059 priv1bb6: bool,
3060 priv1bb7: bool,
3061 priv1bb8: bool,
3062 priv1bb9: bool,
3063 priv1bb10: bool,
3064 priv1bb11: bool,
3065 priv1bb12: bool,
3066 priv1bb13: bool,
3067 priv1bb14: bool,
3068 priv1bb15: bool,
3069 priv1bb16: bool,
3070 priv1bb17: bool,
3071 priv1bb18: bool,
3072 priv1bb19: bool,
3073 priv1bb20: bool,
3074 priv1bb21: bool,
3075 priv1bb22: bool,
3076 priv1bb23: bool,
3077 priv1bb24: bool,
3078 priv1bb25: bool,
3079 priv1bb26: bool,
3080 priv1bb27: bool,
3081 priv1bb28: bool,
3082 priv1bb29: bool,
3083 priv1bb30: bool,
3084 priv1bb31: bool,
3085 }
3086 let proxy = Priv1bbr3 {
3087 priv1bb0: self.priv1bb0(),
3088 priv1bb1: self.priv1bb1(),
3089 priv1bb2: self.priv1bb2(),
3090 priv1bb3: self.priv1bb3(),
3091 priv1bb4: self.priv1bb4(),
3092 priv1bb5: self.priv1bb5(),
3093 priv1bb6: self.priv1bb6(),
3094 priv1bb7: self.priv1bb7(),
3095 priv1bb8: self.priv1bb8(),
3096 priv1bb9: self.priv1bb9(),
3097 priv1bb10: self.priv1bb10(),
3098 priv1bb11: self.priv1bb11(),
3099 priv1bb12: self.priv1bb12(),
3100 priv1bb13: self.priv1bb13(),
3101 priv1bb14: self.priv1bb14(),
3102 priv1bb15: self.priv1bb15(),
3103 priv1bb16: self.priv1bb16(),
3104 priv1bb17: self.priv1bb17(),
3105 priv1bb18: self.priv1bb18(),
3106 priv1bb19: self.priv1bb19(),
3107 priv1bb20: self.priv1bb20(),
3108 priv1bb21: self.priv1bb21(),
3109 priv1bb22: self.priv1bb22(),
3110 priv1bb23: self.priv1bb23(),
3111 priv1bb24: self.priv1bb24(),
3112 priv1bb25: self.priv1bb25(),
3113 priv1bb26: self.priv1bb26(),
3114 priv1bb27: self.priv1bb27(),
3115 priv1bb28: self.priv1bb28(),
3116 priv1bb29: self.priv1bb29(),
3117 priv1bb30: self.priv1bb30(),
3118 priv1bb31: self.priv1bb31(),
3119 };
3120 defmt::write!(f, "{}", proxy)
3121 }
3122 }
3123 #[doc = "FLASH privilege block based bank 1 register 4"]
3124 #[repr(transparent)]
3125 #[derive(Copy, Clone, Eq, PartialEq)]
3126 pub struct Priv1bbr4(pub u32);
3127 impl Priv1bbr4 {
3128 #[doc = "page privileged/unprivileged attribution"]
3129 #[inline(always)]
3130 pub const fn priv1bb0(&self) -> bool {
3131 let val = (self.0 >> 0usize) & 0x01;
3132 val != 0
3133 }
3134 #[doc = "page privileged/unprivileged attribution"]
3135 #[inline(always)]
3136 pub fn set_priv1bb0(&mut self, val: bool) {
3137 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
3138 }
3139 #[doc = "page privileged/unprivileged attribution"]
3140 #[inline(always)]
3141 pub const fn priv1bb1(&self) -> bool {
3142 let val = (self.0 >> 1usize) & 0x01;
3143 val != 0
3144 }
3145 #[doc = "page privileged/unprivileged attribution"]
3146 #[inline(always)]
3147 pub fn set_priv1bb1(&mut self, val: bool) {
3148 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
3149 }
3150 #[doc = "page privileged/unprivileged attribution"]
3151 #[inline(always)]
3152 pub const fn priv1bb2(&self) -> bool {
3153 let val = (self.0 >> 2usize) & 0x01;
3154 val != 0
3155 }
3156 #[doc = "page privileged/unprivileged attribution"]
3157 #[inline(always)]
3158 pub fn set_priv1bb2(&mut self, val: bool) {
3159 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
3160 }
3161 #[doc = "page privileged/unprivileged attribution"]
3162 #[inline(always)]
3163 pub const fn priv1bb3(&self) -> bool {
3164 let val = (self.0 >> 3usize) & 0x01;
3165 val != 0
3166 }
3167 #[doc = "page privileged/unprivileged attribution"]
3168 #[inline(always)]
3169 pub fn set_priv1bb3(&mut self, val: bool) {
3170 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
3171 }
3172 #[doc = "page privileged/unprivileged attribution"]
3173 #[inline(always)]
3174 pub const fn priv1bb4(&self) -> bool {
3175 let val = (self.0 >> 4usize) & 0x01;
3176 val != 0
3177 }
3178 #[doc = "page privileged/unprivileged attribution"]
3179 #[inline(always)]
3180 pub fn set_priv1bb4(&mut self, val: bool) {
3181 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
3182 }
3183 #[doc = "page privileged/unprivileged attribution"]
3184 #[inline(always)]
3185 pub const fn priv1bb5(&self) -> bool {
3186 let val = (self.0 >> 5usize) & 0x01;
3187 val != 0
3188 }
3189 #[doc = "page privileged/unprivileged attribution"]
3190 #[inline(always)]
3191 pub fn set_priv1bb5(&mut self, val: bool) {
3192 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
3193 }
3194 #[doc = "page privileged/unprivileged attribution"]
3195 #[inline(always)]
3196 pub const fn priv1bb6(&self) -> bool {
3197 let val = (self.0 >> 6usize) & 0x01;
3198 val != 0
3199 }
3200 #[doc = "page privileged/unprivileged attribution"]
3201 #[inline(always)]
3202 pub fn set_priv1bb6(&mut self, val: bool) {
3203 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
3204 }
3205 #[doc = "page privileged/unprivileged attribution"]
3206 #[inline(always)]
3207 pub const fn priv1bb7(&self) -> bool {
3208 let val = (self.0 >> 7usize) & 0x01;
3209 val != 0
3210 }
3211 #[doc = "page privileged/unprivileged attribution"]
3212 #[inline(always)]
3213 pub fn set_priv1bb7(&mut self, val: bool) {
3214 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
3215 }
3216 #[doc = "page privileged/unprivileged attribution"]
3217 #[inline(always)]
3218 pub const fn priv1bb8(&self) -> bool {
3219 let val = (self.0 >> 8usize) & 0x01;
3220 val != 0
3221 }
3222 #[doc = "page privileged/unprivileged attribution"]
3223 #[inline(always)]
3224 pub fn set_priv1bb8(&mut self, val: bool) {
3225 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
3226 }
3227 #[doc = "page privileged/unprivileged attribution"]
3228 #[inline(always)]
3229 pub const fn priv1bb9(&self) -> bool {
3230 let val = (self.0 >> 9usize) & 0x01;
3231 val != 0
3232 }
3233 #[doc = "page privileged/unprivileged attribution"]
3234 #[inline(always)]
3235 pub fn set_priv1bb9(&mut self, val: bool) {
3236 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
3237 }
3238 #[doc = "page privileged/unprivileged attribution"]
3239 #[inline(always)]
3240 pub const fn priv1bb10(&self) -> bool {
3241 let val = (self.0 >> 10usize) & 0x01;
3242 val != 0
3243 }
3244 #[doc = "page privileged/unprivileged attribution"]
3245 #[inline(always)]
3246 pub fn set_priv1bb10(&mut self, val: bool) {
3247 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
3248 }
3249 #[doc = "page privileged/unprivileged attribution"]
3250 #[inline(always)]
3251 pub const fn priv1bb11(&self) -> bool {
3252 let val = (self.0 >> 11usize) & 0x01;
3253 val != 0
3254 }
3255 #[doc = "page privileged/unprivileged attribution"]
3256 #[inline(always)]
3257 pub fn set_priv1bb11(&mut self, val: bool) {
3258 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
3259 }
3260 #[doc = "page privileged/unprivileged attribution"]
3261 #[inline(always)]
3262 pub const fn priv1bb12(&self) -> bool {
3263 let val = (self.0 >> 12usize) & 0x01;
3264 val != 0
3265 }
3266 #[doc = "page privileged/unprivileged attribution"]
3267 #[inline(always)]
3268 pub fn set_priv1bb12(&mut self, val: bool) {
3269 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
3270 }
3271 #[doc = "page privileged/unprivileged attribution"]
3272 #[inline(always)]
3273 pub const fn priv1bb13(&self) -> bool {
3274 let val = (self.0 >> 13usize) & 0x01;
3275 val != 0
3276 }
3277 #[doc = "page privileged/unprivileged attribution"]
3278 #[inline(always)]
3279 pub fn set_priv1bb13(&mut self, val: bool) {
3280 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
3281 }
3282 #[doc = "page privileged/unprivileged attribution"]
3283 #[inline(always)]
3284 pub const fn priv1bb14(&self) -> bool {
3285 let val = (self.0 >> 14usize) & 0x01;
3286 val != 0
3287 }
3288 #[doc = "page privileged/unprivileged attribution"]
3289 #[inline(always)]
3290 pub fn set_priv1bb14(&mut self, val: bool) {
3291 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
3292 }
3293 #[doc = "page privileged/unprivileged attribution"]
3294 #[inline(always)]
3295 pub const fn priv1bb15(&self) -> bool {
3296 let val = (self.0 >> 15usize) & 0x01;
3297 val != 0
3298 }
3299 #[doc = "page privileged/unprivileged attribution"]
3300 #[inline(always)]
3301 pub fn set_priv1bb15(&mut self, val: bool) {
3302 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
3303 }
3304 #[doc = "page privileged/unprivileged attribution"]
3305 #[inline(always)]
3306 pub const fn priv1bb16(&self) -> bool {
3307 let val = (self.0 >> 16usize) & 0x01;
3308 val != 0
3309 }
3310 #[doc = "page privileged/unprivileged attribution"]
3311 #[inline(always)]
3312 pub fn set_priv1bb16(&mut self, val: bool) {
3313 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
3314 }
3315 #[doc = "page privileged/unprivileged attribution"]
3316 #[inline(always)]
3317 pub const fn priv1bb17(&self) -> bool {
3318 let val = (self.0 >> 17usize) & 0x01;
3319 val != 0
3320 }
3321 #[doc = "page privileged/unprivileged attribution"]
3322 #[inline(always)]
3323 pub fn set_priv1bb17(&mut self, val: bool) {
3324 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
3325 }
3326 #[doc = "page privileged/unprivileged attribution"]
3327 #[inline(always)]
3328 pub const fn priv1bb18(&self) -> bool {
3329 let val = (self.0 >> 18usize) & 0x01;
3330 val != 0
3331 }
3332 #[doc = "page privileged/unprivileged attribution"]
3333 #[inline(always)]
3334 pub fn set_priv1bb18(&mut self, val: bool) {
3335 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
3336 }
3337 #[doc = "page privileged/unprivileged attribution"]
3338 #[inline(always)]
3339 pub const fn priv1bb19(&self) -> bool {
3340 let val = (self.0 >> 19usize) & 0x01;
3341 val != 0
3342 }
3343 #[doc = "page privileged/unprivileged attribution"]
3344 #[inline(always)]
3345 pub fn set_priv1bb19(&mut self, val: bool) {
3346 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
3347 }
3348 #[doc = "page privileged/unprivileged attribution"]
3349 #[inline(always)]
3350 pub const fn priv1bb20(&self) -> bool {
3351 let val = (self.0 >> 20usize) & 0x01;
3352 val != 0
3353 }
3354 #[doc = "page privileged/unprivileged attribution"]
3355 #[inline(always)]
3356 pub fn set_priv1bb20(&mut self, val: bool) {
3357 self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize);
3358 }
3359 #[doc = "page privileged/unprivileged attribution"]
3360 #[inline(always)]
3361 pub const fn priv1bb21(&self) -> bool {
3362 let val = (self.0 >> 21usize) & 0x01;
3363 val != 0
3364 }
3365 #[doc = "page privileged/unprivileged attribution"]
3366 #[inline(always)]
3367 pub fn set_priv1bb21(&mut self, val: bool) {
3368 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
3369 }
3370 #[doc = "page privileged/unprivileged attribution"]
3371 #[inline(always)]
3372 pub const fn priv1bb22(&self) -> bool {
3373 let val = (self.0 >> 22usize) & 0x01;
3374 val != 0
3375 }
3376 #[doc = "page privileged/unprivileged attribution"]
3377 #[inline(always)]
3378 pub fn set_priv1bb22(&mut self, val: bool) {
3379 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
3380 }
3381 #[doc = "page privileged/unprivileged attribution"]
3382 #[inline(always)]
3383 pub const fn priv1bb23(&self) -> bool {
3384 let val = (self.0 >> 23usize) & 0x01;
3385 val != 0
3386 }
3387 #[doc = "page privileged/unprivileged attribution"]
3388 #[inline(always)]
3389 pub fn set_priv1bb23(&mut self, val: bool) {
3390 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
3391 }
3392 #[doc = "page privileged/unprivileged attribution"]
3393 #[inline(always)]
3394 pub const fn priv1bb24(&self) -> bool {
3395 let val = (self.0 >> 24usize) & 0x01;
3396 val != 0
3397 }
3398 #[doc = "page privileged/unprivileged attribution"]
3399 #[inline(always)]
3400 pub fn set_priv1bb24(&mut self, val: bool) {
3401 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
3402 }
3403 #[doc = "page privileged/unprivileged attribution"]
3404 #[inline(always)]
3405 pub const fn priv1bb25(&self) -> bool {
3406 let val = (self.0 >> 25usize) & 0x01;
3407 val != 0
3408 }
3409 #[doc = "page privileged/unprivileged attribution"]
3410 #[inline(always)]
3411 pub fn set_priv1bb25(&mut self, val: bool) {
3412 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
3413 }
3414 #[doc = "page privileged/unprivileged attribution"]
3415 #[inline(always)]
3416 pub const fn priv1bb26(&self) -> bool {
3417 let val = (self.0 >> 26usize) & 0x01;
3418 val != 0
3419 }
3420 #[doc = "page privileged/unprivileged attribution"]
3421 #[inline(always)]
3422 pub fn set_priv1bb26(&mut self, val: bool) {
3423 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
3424 }
3425 #[doc = "page privileged/unprivileged attribution"]
3426 #[inline(always)]
3427 pub const fn priv1bb27(&self) -> bool {
3428 let val = (self.0 >> 27usize) & 0x01;
3429 val != 0
3430 }
3431 #[doc = "page privileged/unprivileged attribution"]
3432 #[inline(always)]
3433 pub fn set_priv1bb27(&mut self, val: bool) {
3434 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize);
3435 }
3436 #[doc = "page privileged/unprivileged attribution"]
3437 #[inline(always)]
3438 pub const fn priv1bb28(&self) -> bool {
3439 let val = (self.0 >> 28usize) & 0x01;
3440 val != 0
3441 }
3442 #[doc = "page privileged/unprivileged attribution"]
3443 #[inline(always)]
3444 pub fn set_priv1bb28(&mut self, val: bool) {
3445 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
3446 }
3447 #[doc = "page privileged/unprivileged attribution"]
3448 #[inline(always)]
3449 pub const fn priv1bb29(&self) -> bool {
3450 let val = (self.0 >> 29usize) & 0x01;
3451 val != 0
3452 }
3453 #[doc = "page privileged/unprivileged attribution"]
3454 #[inline(always)]
3455 pub fn set_priv1bb29(&mut self, val: bool) {
3456 self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize);
3457 }
3458 #[doc = "page privileged/unprivileged attribution"]
3459 #[inline(always)]
3460 pub const fn priv1bb30(&self) -> bool {
3461 let val = (self.0 >> 30usize) & 0x01;
3462 val != 0
3463 }
3464 #[doc = "page privileged/unprivileged attribution"]
3465 #[inline(always)]
3466 pub fn set_priv1bb30(&mut self, val: bool) {
3467 self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize);
3468 }
3469 #[doc = "page privileged/unprivileged attribution"]
3470 #[inline(always)]
3471 pub const fn priv1bb31(&self) -> bool {
3472 let val = (self.0 >> 31usize) & 0x01;
3473 val != 0
3474 }
3475 #[doc = "page privileged/unprivileged attribution"]
3476 #[inline(always)]
3477 pub fn set_priv1bb31(&mut self, val: bool) {
3478 self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize);
3479 }
3480 }
3481 impl Default for Priv1bbr4 {
3482 #[inline(always)]
3483 fn default() -> Priv1bbr4 {
3484 Priv1bbr4(0)
3485 }
3486 }
3487 impl core::fmt::Debug for Priv1bbr4 {
3488 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
3489 f.debug_struct("Priv1bbr4")
3490 .field("priv1bb0", &self.priv1bb0())
3491 .field("priv1bb1", &self.priv1bb1())
3492 .field("priv1bb2", &self.priv1bb2())
3493 .field("priv1bb3", &self.priv1bb3())
3494 .field("priv1bb4", &self.priv1bb4())
3495 .field("priv1bb5", &self.priv1bb5())
3496 .field("priv1bb6", &self.priv1bb6())
3497 .field("priv1bb7", &self.priv1bb7())
3498 .field("priv1bb8", &self.priv1bb8())
3499 .field("priv1bb9", &self.priv1bb9())
3500 .field("priv1bb10", &self.priv1bb10())
3501 .field("priv1bb11", &self.priv1bb11())
3502 .field("priv1bb12", &self.priv1bb12())
3503 .field("priv1bb13", &self.priv1bb13())
3504 .field("priv1bb14", &self.priv1bb14())
3505 .field("priv1bb15", &self.priv1bb15())
3506 .field("priv1bb16", &self.priv1bb16())
3507 .field("priv1bb17", &self.priv1bb17())
3508 .field("priv1bb18", &self.priv1bb18())
3509 .field("priv1bb19", &self.priv1bb19())
3510 .field("priv1bb20", &self.priv1bb20())
3511 .field("priv1bb21", &self.priv1bb21())
3512 .field("priv1bb22", &self.priv1bb22())
3513 .field("priv1bb23", &self.priv1bb23())
3514 .field("priv1bb24", &self.priv1bb24())
3515 .field("priv1bb25", &self.priv1bb25())
3516 .field("priv1bb26", &self.priv1bb26())
3517 .field("priv1bb27", &self.priv1bb27())
3518 .field("priv1bb28", &self.priv1bb28())
3519 .field("priv1bb29", &self.priv1bb29())
3520 .field("priv1bb30", &self.priv1bb30())
3521 .field("priv1bb31", &self.priv1bb31())
3522 .finish()
3523 }
3524 }
3525 #[cfg(feature = "defmt")]
3526 impl defmt::Format for Priv1bbr4 {
3527 fn format(&self, f: defmt::Formatter) {
3528 #[derive(defmt :: Format)]
3529 struct Priv1bbr4 {
3530 priv1bb0: bool,
3531 priv1bb1: bool,
3532 priv1bb2: bool,
3533 priv1bb3: bool,
3534 priv1bb4: bool,
3535 priv1bb5: bool,
3536 priv1bb6: bool,
3537 priv1bb7: bool,
3538 priv1bb8: bool,
3539 priv1bb9: bool,
3540 priv1bb10: bool,
3541 priv1bb11: bool,
3542 priv1bb12: bool,
3543 priv1bb13: bool,
3544 priv1bb14: bool,
3545 priv1bb15: bool,
3546 priv1bb16: bool,
3547 priv1bb17: bool,
3548 priv1bb18: bool,
3549 priv1bb19: bool,
3550 priv1bb20: bool,
3551 priv1bb21: bool,
3552 priv1bb22: bool,
3553 priv1bb23: bool,
3554 priv1bb24: bool,
3555 priv1bb25: bool,
3556 priv1bb26: bool,
3557 priv1bb27: bool,
3558 priv1bb28: bool,
3559 priv1bb29: bool,
3560 priv1bb30: bool,
3561 priv1bb31: bool,
3562 }
3563 let proxy = Priv1bbr4 {
3564 priv1bb0: self.priv1bb0(),
3565 priv1bb1: self.priv1bb1(),
3566 priv1bb2: self.priv1bb2(),
3567 priv1bb3: self.priv1bb3(),
3568 priv1bb4: self.priv1bb4(),
3569 priv1bb5: self.priv1bb5(),
3570 priv1bb6: self.priv1bb6(),
3571 priv1bb7: self.priv1bb7(),
3572 priv1bb8: self.priv1bb8(),
3573 priv1bb9: self.priv1bb9(),
3574 priv1bb10: self.priv1bb10(),
3575 priv1bb11: self.priv1bb11(),
3576 priv1bb12: self.priv1bb12(),
3577 priv1bb13: self.priv1bb13(),
3578 priv1bb14: self.priv1bb14(),
3579 priv1bb15: self.priv1bb15(),
3580 priv1bb16: self.priv1bb16(),
3581 priv1bb17: self.priv1bb17(),
3582 priv1bb18: self.priv1bb18(),
3583 priv1bb19: self.priv1bb19(),
3584 priv1bb20: self.priv1bb20(),
3585 priv1bb21: self.priv1bb21(),
3586 priv1bb22: self.priv1bb22(),
3587 priv1bb23: self.priv1bb23(),
3588 priv1bb24: self.priv1bb24(),
3589 priv1bb25: self.priv1bb25(),
3590 priv1bb26: self.priv1bb26(),
3591 priv1bb27: self.priv1bb27(),
3592 priv1bb28: self.priv1bb28(),
3593 priv1bb29: self.priv1bb29(),
3594 priv1bb30: self.priv1bb30(),
3595 priv1bb31: self.priv1bb31(),
3596 };
3597 defmt::write!(f, "{}", proxy)
3598 }
3599 }
3600 #[doc = "FLASH privilege block based bank 2 register 1"]
3601 #[repr(transparent)]
3602 #[derive(Copy, Clone, Eq, PartialEq)]
3603 pub struct Priv2bbr1(pub u32);
3604 impl Priv2bbr1 {
3605 #[doc = "page privileged/unprivileged attribution"]
3606 #[inline(always)]
3607 pub const fn priv2bb0(&self) -> bool {
3608 let val = (self.0 >> 0usize) & 0x01;
3609 val != 0
3610 }
3611 #[doc = "page privileged/unprivileged attribution"]
3612 #[inline(always)]
3613 pub fn set_priv2bb0(&mut self, val: bool) {
3614 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
3615 }
3616 #[doc = "page privileged/unprivileged attribution"]
3617 #[inline(always)]
3618 pub const fn priv2bb1(&self) -> bool {
3619 let val = (self.0 >> 1usize) & 0x01;
3620 val != 0
3621 }
3622 #[doc = "page privileged/unprivileged attribution"]
3623 #[inline(always)]
3624 pub fn set_priv2bb1(&mut self, val: bool) {
3625 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
3626 }
3627 #[doc = "page privileged/unprivileged attribution"]
3628 #[inline(always)]
3629 pub const fn priv2bb2(&self) -> bool {
3630 let val = (self.0 >> 2usize) & 0x01;
3631 val != 0
3632 }
3633 #[doc = "page privileged/unprivileged attribution"]
3634 #[inline(always)]
3635 pub fn set_priv2bb2(&mut self, val: bool) {
3636 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
3637 }
3638 #[doc = "page privileged/unprivileged attribution"]
3639 #[inline(always)]
3640 pub const fn priv2bb3(&self) -> bool {
3641 let val = (self.0 >> 3usize) & 0x01;
3642 val != 0
3643 }
3644 #[doc = "page privileged/unprivileged attribution"]
3645 #[inline(always)]
3646 pub fn set_priv2bb3(&mut self, val: bool) {
3647 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
3648 }
3649 #[doc = "page privileged/unprivileged attribution"]
3650 #[inline(always)]
3651 pub const fn priv2bb4(&self) -> bool {
3652 let val = (self.0 >> 4usize) & 0x01;
3653 val != 0
3654 }
3655 #[doc = "page privileged/unprivileged attribution"]
3656 #[inline(always)]
3657 pub fn set_priv2bb4(&mut self, val: bool) {
3658 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
3659 }
3660 #[doc = "page privileged/unprivileged attribution"]
3661 #[inline(always)]
3662 pub const fn priv2bb5(&self) -> bool {
3663 let val = (self.0 >> 5usize) & 0x01;
3664 val != 0
3665 }
3666 #[doc = "page privileged/unprivileged attribution"]
3667 #[inline(always)]
3668 pub fn set_priv2bb5(&mut self, val: bool) {
3669 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
3670 }
3671 #[doc = "page privileged/unprivileged attribution"]
3672 #[inline(always)]
3673 pub const fn priv2bb6(&self) -> bool {
3674 let val = (self.0 >> 6usize) & 0x01;
3675 val != 0
3676 }
3677 #[doc = "page privileged/unprivileged attribution"]
3678 #[inline(always)]
3679 pub fn set_priv2bb6(&mut self, val: bool) {
3680 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
3681 }
3682 #[doc = "page privileged/unprivileged attribution"]
3683 #[inline(always)]
3684 pub const fn priv2bb7(&self) -> bool {
3685 let val = (self.0 >> 7usize) & 0x01;
3686 val != 0
3687 }
3688 #[doc = "page privileged/unprivileged attribution"]
3689 #[inline(always)]
3690 pub fn set_priv2bb7(&mut self, val: bool) {
3691 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
3692 }
3693 #[doc = "page privileged/unprivileged attribution"]
3694 #[inline(always)]
3695 pub const fn priv2bb8(&self) -> bool {
3696 let val = (self.0 >> 8usize) & 0x01;
3697 val != 0
3698 }
3699 #[doc = "page privileged/unprivileged attribution"]
3700 #[inline(always)]
3701 pub fn set_priv2bb8(&mut self, val: bool) {
3702 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
3703 }
3704 #[doc = "page privileged/unprivileged attribution"]
3705 #[inline(always)]
3706 pub const fn priv2bb9(&self) -> bool {
3707 let val = (self.0 >> 9usize) & 0x01;
3708 val != 0
3709 }
3710 #[doc = "page privileged/unprivileged attribution"]
3711 #[inline(always)]
3712 pub fn set_priv2bb9(&mut self, val: bool) {
3713 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
3714 }
3715 #[doc = "page privileged/unprivileged attribution"]
3716 #[inline(always)]
3717 pub const fn priv2bb10(&self) -> bool {
3718 let val = (self.0 >> 10usize) & 0x01;
3719 val != 0
3720 }
3721 #[doc = "page privileged/unprivileged attribution"]
3722 #[inline(always)]
3723 pub fn set_priv2bb10(&mut self, val: bool) {
3724 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
3725 }
3726 #[doc = "page privileged/unprivileged attribution"]
3727 #[inline(always)]
3728 pub const fn priv2bb11(&self) -> bool {
3729 let val = (self.0 >> 11usize) & 0x01;
3730 val != 0
3731 }
3732 #[doc = "page privileged/unprivileged attribution"]
3733 #[inline(always)]
3734 pub fn set_priv2bb11(&mut self, val: bool) {
3735 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
3736 }
3737 #[doc = "page privileged/unprivileged attribution"]
3738 #[inline(always)]
3739 pub const fn priv2bb12(&self) -> bool {
3740 let val = (self.0 >> 12usize) & 0x01;
3741 val != 0
3742 }
3743 #[doc = "page privileged/unprivileged attribution"]
3744 #[inline(always)]
3745 pub fn set_priv2bb12(&mut self, val: bool) {
3746 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
3747 }
3748 #[doc = "page privileged/unprivileged attribution"]
3749 #[inline(always)]
3750 pub const fn priv2bb13(&self) -> bool {
3751 let val = (self.0 >> 13usize) & 0x01;
3752 val != 0
3753 }
3754 #[doc = "page privileged/unprivileged attribution"]
3755 #[inline(always)]
3756 pub fn set_priv2bb13(&mut self, val: bool) {
3757 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
3758 }
3759 #[doc = "page privileged/unprivileged attribution"]
3760 #[inline(always)]
3761 pub const fn priv2bb14(&self) -> bool {
3762 let val = (self.0 >> 14usize) & 0x01;
3763 val != 0
3764 }
3765 #[doc = "page privileged/unprivileged attribution"]
3766 #[inline(always)]
3767 pub fn set_priv2bb14(&mut self, val: bool) {
3768 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
3769 }
3770 #[doc = "page privileged/unprivileged attribution"]
3771 #[inline(always)]
3772 pub const fn priv2bb15(&self) -> bool {
3773 let val = (self.0 >> 15usize) & 0x01;
3774 val != 0
3775 }
3776 #[doc = "page privileged/unprivileged attribution"]
3777 #[inline(always)]
3778 pub fn set_priv2bb15(&mut self, val: bool) {
3779 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
3780 }
3781 #[doc = "page privileged/unprivileged attribution"]
3782 #[inline(always)]
3783 pub const fn priv2bb16(&self) -> bool {
3784 let val = (self.0 >> 16usize) & 0x01;
3785 val != 0
3786 }
3787 #[doc = "page privileged/unprivileged attribution"]
3788 #[inline(always)]
3789 pub fn set_priv2bb16(&mut self, val: bool) {
3790 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
3791 }
3792 #[doc = "page privileged/unprivileged attribution"]
3793 #[inline(always)]
3794 pub const fn priv2bb17(&self) -> bool {
3795 let val = (self.0 >> 17usize) & 0x01;
3796 val != 0
3797 }
3798 #[doc = "page privileged/unprivileged attribution"]
3799 #[inline(always)]
3800 pub fn set_priv2bb17(&mut self, val: bool) {
3801 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
3802 }
3803 #[doc = "page privileged/unprivileged attribution"]
3804 #[inline(always)]
3805 pub const fn priv2bb18(&self) -> bool {
3806 let val = (self.0 >> 18usize) & 0x01;
3807 val != 0
3808 }
3809 #[doc = "page privileged/unprivileged attribution"]
3810 #[inline(always)]
3811 pub fn set_priv2bb18(&mut self, val: bool) {
3812 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
3813 }
3814 #[doc = "page privileged/unprivileged attribution"]
3815 #[inline(always)]
3816 pub const fn priv2bb19(&self) -> bool {
3817 let val = (self.0 >> 19usize) & 0x01;
3818 val != 0
3819 }
3820 #[doc = "page privileged/unprivileged attribution"]
3821 #[inline(always)]
3822 pub fn set_priv2bb19(&mut self, val: bool) {
3823 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
3824 }
3825 #[doc = "page privileged/unprivileged attribution"]
3826 #[inline(always)]
3827 pub const fn priv2bb20(&self) -> bool {
3828 let val = (self.0 >> 20usize) & 0x01;
3829 val != 0
3830 }
3831 #[doc = "page privileged/unprivileged attribution"]
3832 #[inline(always)]
3833 pub fn set_priv2bb20(&mut self, val: bool) {
3834 self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize);
3835 }
3836 #[doc = "page privileged/unprivileged attribution"]
3837 #[inline(always)]
3838 pub const fn priv2bb21(&self) -> bool {
3839 let val = (self.0 >> 21usize) & 0x01;
3840 val != 0
3841 }
3842 #[doc = "page privileged/unprivileged attribution"]
3843 #[inline(always)]
3844 pub fn set_priv2bb21(&mut self, val: bool) {
3845 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
3846 }
3847 #[doc = "page privileged/unprivileged attribution"]
3848 #[inline(always)]
3849 pub const fn priv2bb22(&self) -> bool {
3850 let val = (self.0 >> 22usize) & 0x01;
3851 val != 0
3852 }
3853 #[doc = "page privileged/unprivileged attribution"]
3854 #[inline(always)]
3855 pub fn set_priv2bb22(&mut self, val: bool) {
3856 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
3857 }
3858 #[doc = "page privileged/unprivileged attribution"]
3859 #[inline(always)]
3860 pub const fn priv2bb23(&self) -> bool {
3861 let val = (self.0 >> 23usize) & 0x01;
3862 val != 0
3863 }
3864 #[doc = "page privileged/unprivileged attribution"]
3865 #[inline(always)]
3866 pub fn set_priv2bb23(&mut self, val: bool) {
3867 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
3868 }
3869 #[doc = "page privileged/unprivileged attribution"]
3870 #[inline(always)]
3871 pub const fn priv2bb24(&self) -> bool {
3872 let val = (self.0 >> 24usize) & 0x01;
3873 val != 0
3874 }
3875 #[doc = "page privileged/unprivileged attribution"]
3876 #[inline(always)]
3877 pub fn set_priv2bb24(&mut self, val: bool) {
3878 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
3879 }
3880 #[doc = "page privileged/unprivileged attribution"]
3881 #[inline(always)]
3882 pub const fn priv2bb25(&self) -> bool {
3883 let val = (self.0 >> 25usize) & 0x01;
3884 val != 0
3885 }
3886 #[doc = "page privileged/unprivileged attribution"]
3887 #[inline(always)]
3888 pub fn set_priv2bb25(&mut self, val: bool) {
3889 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
3890 }
3891 #[doc = "page privileged/unprivileged attribution"]
3892 #[inline(always)]
3893 pub const fn priv2bb26(&self) -> bool {
3894 let val = (self.0 >> 26usize) & 0x01;
3895 val != 0
3896 }
3897 #[doc = "page privileged/unprivileged attribution"]
3898 #[inline(always)]
3899 pub fn set_priv2bb26(&mut self, val: bool) {
3900 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
3901 }
3902 #[doc = "page privileged/unprivileged attribution"]
3903 #[inline(always)]
3904 pub const fn priv2bb27(&self) -> bool {
3905 let val = (self.0 >> 27usize) & 0x01;
3906 val != 0
3907 }
3908 #[doc = "page privileged/unprivileged attribution"]
3909 #[inline(always)]
3910 pub fn set_priv2bb27(&mut self, val: bool) {
3911 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize);
3912 }
3913 #[doc = "page privileged/unprivileged attribution"]
3914 #[inline(always)]
3915 pub const fn priv2bb28(&self) -> bool {
3916 let val = (self.0 >> 28usize) & 0x01;
3917 val != 0
3918 }
3919 #[doc = "page privileged/unprivileged attribution"]
3920 #[inline(always)]
3921 pub fn set_priv2bb28(&mut self, val: bool) {
3922 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
3923 }
3924 #[doc = "page privileged/unprivileged attribution"]
3925 #[inline(always)]
3926 pub const fn priv2bb29(&self) -> bool {
3927 let val = (self.0 >> 29usize) & 0x01;
3928 val != 0
3929 }
3930 #[doc = "page privileged/unprivileged attribution"]
3931 #[inline(always)]
3932 pub fn set_priv2bb29(&mut self, val: bool) {
3933 self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize);
3934 }
3935 #[doc = "page privileged/unprivileged attribution"]
3936 #[inline(always)]
3937 pub const fn priv2bb30(&self) -> bool {
3938 let val = (self.0 >> 30usize) & 0x01;
3939 val != 0
3940 }
3941 #[doc = "page privileged/unprivileged attribution"]
3942 #[inline(always)]
3943 pub fn set_priv2bb30(&mut self, val: bool) {
3944 self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize);
3945 }
3946 #[doc = "page privileged/unprivileged attribution"]
3947 #[inline(always)]
3948 pub const fn priv2bb31(&self) -> bool {
3949 let val = (self.0 >> 31usize) & 0x01;
3950 val != 0
3951 }
3952 #[doc = "page privileged/unprivileged attribution"]
3953 #[inline(always)]
3954 pub fn set_priv2bb31(&mut self, val: bool) {
3955 self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize);
3956 }
3957 }
3958 impl Default for Priv2bbr1 {
3959 #[inline(always)]
3960 fn default() -> Priv2bbr1 {
3961 Priv2bbr1(0)
3962 }
3963 }
3964 impl core::fmt::Debug for Priv2bbr1 {
3965 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
3966 f.debug_struct("Priv2bbr1")
3967 .field("priv2bb0", &self.priv2bb0())
3968 .field("priv2bb1", &self.priv2bb1())
3969 .field("priv2bb2", &self.priv2bb2())
3970 .field("priv2bb3", &self.priv2bb3())
3971 .field("priv2bb4", &self.priv2bb4())
3972 .field("priv2bb5", &self.priv2bb5())
3973 .field("priv2bb6", &self.priv2bb6())
3974 .field("priv2bb7", &self.priv2bb7())
3975 .field("priv2bb8", &self.priv2bb8())
3976 .field("priv2bb9", &self.priv2bb9())
3977 .field("priv2bb10", &self.priv2bb10())
3978 .field("priv2bb11", &self.priv2bb11())
3979 .field("priv2bb12", &self.priv2bb12())
3980 .field("priv2bb13", &self.priv2bb13())
3981 .field("priv2bb14", &self.priv2bb14())
3982 .field("priv2bb15", &self.priv2bb15())
3983 .field("priv2bb16", &self.priv2bb16())
3984 .field("priv2bb17", &self.priv2bb17())
3985 .field("priv2bb18", &self.priv2bb18())
3986 .field("priv2bb19", &self.priv2bb19())
3987 .field("priv2bb20", &self.priv2bb20())
3988 .field("priv2bb21", &self.priv2bb21())
3989 .field("priv2bb22", &self.priv2bb22())
3990 .field("priv2bb23", &self.priv2bb23())
3991 .field("priv2bb24", &self.priv2bb24())
3992 .field("priv2bb25", &self.priv2bb25())
3993 .field("priv2bb26", &self.priv2bb26())
3994 .field("priv2bb27", &self.priv2bb27())
3995 .field("priv2bb28", &self.priv2bb28())
3996 .field("priv2bb29", &self.priv2bb29())
3997 .field("priv2bb30", &self.priv2bb30())
3998 .field("priv2bb31", &self.priv2bb31())
3999 .finish()
4000 }
4001 }
4002 #[cfg(feature = "defmt")]
4003 impl defmt::Format for Priv2bbr1 {
4004 fn format(&self, f: defmt::Formatter) {
4005 #[derive(defmt :: Format)]
4006 struct Priv2bbr1 {
4007 priv2bb0: bool,
4008 priv2bb1: bool,
4009 priv2bb2: bool,
4010 priv2bb3: bool,
4011 priv2bb4: bool,
4012 priv2bb5: bool,
4013 priv2bb6: bool,
4014 priv2bb7: bool,
4015 priv2bb8: bool,
4016 priv2bb9: bool,
4017 priv2bb10: bool,
4018 priv2bb11: bool,
4019 priv2bb12: bool,
4020 priv2bb13: bool,
4021 priv2bb14: bool,
4022 priv2bb15: bool,
4023 priv2bb16: bool,
4024 priv2bb17: bool,
4025 priv2bb18: bool,
4026 priv2bb19: bool,
4027 priv2bb20: bool,
4028 priv2bb21: bool,
4029 priv2bb22: bool,
4030 priv2bb23: bool,
4031 priv2bb24: bool,
4032 priv2bb25: bool,
4033 priv2bb26: bool,
4034 priv2bb27: bool,
4035 priv2bb28: bool,
4036 priv2bb29: bool,
4037 priv2bb30: bool,
4038 priv2bb31: bool,
4039 }
4040 let proxy = Priv2bbr1 {
4041 priv2bb0: self.priv2bb0(),
4042 priv2bb1: self.priv2bb1(),
4043 priv2bb2: self.priv2bb2(),
4044 priv2bb3: self.priv2bb3(),
4045 priv2bb4: self.priv2bb4(),
4046 priv2bb5: self.priv2bb5(),
4047 priv2bb6: self.priv2bb6(),
4048 priv2bb7: self.priv2bb7(),
4049 priv2bb8: self.priv2bb8(),
4050 priv2bb9: self.priv2bb9(),
4051 priv2bb10: self.priv2bb10(),
4052 priv2bb11: self.priv2bb11(),
4053 priv2bb12: self.priv2bb12(),
4054 priv2bb13: self.priv2bb13(),
4055 priv2bb14: self.priv2bb14(),
4056 priv2bb15: self.priv2bb15(),
4057 priv2bb16: self.priv2bb16(),
4058 priv2bb17: self.priv2bb17(),
4059 priv2bb18: self.priv2bb18(),
4060 priv2bb19: self.priv2bb19(),
4061 priv2bb20: self.priv2bb20(),
4062 priv2bb21: self.priv2bb21(),
4063 priv2bb22: self.priv2bb22(),
4064 priv2bb23: self.priv2bb23(),
4065 priv2bb24: self.priv2bb24(),
4066 priv2bb25: self.priv2bb25(),
4067 priv2bb26: self.priv2bb26(),
4068 priv2bb27: self.priv2bb27(),
4069 priv2bb28: self.priv2bb28(),
4070 priv2bb29: self.priv2bb29(),
4071 priv2bb30: self.priv2bb30(),
4072 priv2bb31: self.priv2bb31(),
4073 };
4074 defmt::write!(f, "{}", proxy)
4075 }
4076 }
4077 #[doc = "FLASH privilege block based bank 2 register 2"]
4078 #[repr(transparent)]
4079 #[derive(Copy, Clone, Eq, PartialEq)]
4080 pub struct Priv2bbr2(pub u32);
4081 impl Priv2bbr2 {
4082 #[doc = "page privileged/unprivileged attribution"]
4083 #[inline(always)]
4084 pub const fn priv2bb0(&self) -> bool {
4085 let val = (self.0 >> 0usize) & 0x01;
4086 val != 0
4087 }
4088 #[doc = "page privileged/unprivileged attribution"]
4089 #[inline(always)]
4090 pub fn set_priv2bb0(&mut self, val: bool) {
4091 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
4092 }
4093 #[doc = "page privileged/unprivileged attribution"]
4094 #[inline(always)]
4095 pub const fn priv2bb1(&self) -> bool {
4096 let val = (self.0 >> 1usize) & 0x01;
4097 val != 0
4098 }
4099 #[doc = "page privileged/unprivileged attribution"]
4100 #[inline(always)]
4101 pub fn set_priv2bb1(&mut self, val: bool) {
4102 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
4103 }
4104 #[doc = "page privileged/unprivileged attribution"]
4105 #[inline(always)]
4106 pub const fn priv2bb2(&self) -> bool {
4107 let val = (self.0 >> 2usize) & 0x01;
4108 val != 0
4109 }
4110 #[doc = "page privileged/unprivileged attribution"]
4111 #[inline(always)]
4112 pub fn set_priv2bb2(&mut self, val: bool) {
4113 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
4114 }
4115 #[doc = "page privileged/unprivileged attribution"]
4116 #[inline(always)]
4117 pub const fn priv2bb3(&self) -> bool {
4118 let val = (self.0 >> 3usize) & 0x01;
4119 val != 0
4120 }
4121 #[doc = "page privileged/unprivileged attribution"]
4122 #[inline(always)]
4123 pub fn set_priv2bb3(&mut self, val: bool) {
4124 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
4125 }
4126 #[doc = "page privileged/unprivileged attribution"]
4127 #[inline(always)]
4128 pub const fn priv2bb4(&self) -> bool {
4129 let val = (self.0 >> 4usize) & 0x01;
4130 val != 0
4131 }
4132 #[doc = "page privileged/unprivileged attribution"]
4133 #[inline(always)]
4134 pub fn set_priv2bb4(&mut self, val: bool) {
4135 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
4136 }
4137 #[doc = "page privileged/unprivileged attribution"]
4138 #[inline(always)]
4139 pub const fn priv2bb5(&self) -> bool {
4140 let val = (self.0 >> 5usize) & 0x01;
4141 val != 0
4142 }
4143 #[doc = "page privileged/unprivileged attribution"]
4144 #[inline(always)]
4145 pub fn set_priv2bb5(&mut self, val: bool) {
4146 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
4147 }
4148 #[doc = "page privileged/unprivileged attribution"]
4149 #[inline(always)]
4150 pub const fn priv2bb6(&self) -> bool {
4151 let val = (self.0 >> 6usize) & 0x01;
4152 val != 0
4153 }
4154 #[doc = "page privileged/unprivileged attribution"]
4155 #[inline(always)]
4156 pub fn set_priv2bb6(&mut self, val: bool) {
4157 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
4158 }
4159 #[doc = "page privileged/unprivileged attribution"]
4160 #[inline(always)]
4161 pub const fn priv2bb7(&self) -> bool {
4162 let val = (self.0 >> 7usize) & 0x01;
4163 val != 0
4164 }
4165 #[doc = "page privileged/unprivileged attribution"]
4166 #[inline(always)]
4167 pub fn set_priv2bb7(&mut self, val: bool) {
4168 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
4169 }
4170 #[doc = "page privileged/unprivileged attribution"]
4171 #[inline(always)]
4172 pub const fn priv2bb8(&self) -> bool {
4173 let val = (self.0 >> 8usize) & 0x01;
4174 val != 0
4175 }
4176 #[doc = "page privileged/unprivileged attribution"]
4177 #[inline(always)]
4178 pub fn set_priv2bb8(&mut self, val: bool) {
4179 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
4180 }
4181 #[doc = "page privileged/unprivileged attribution"]
4182 #[inline(always)]
4183 pub const fn priv2bb9(&self) -> bool {
4184 let val = (self.0 >> 9usize) & 0x01;
4185 val != 0
4186 }
4187 #[doc = "page privileged/unprivileged attribution"]
4188 #[inline(always)]
4189 pub fn set_priv2bb9(&mut self, val: bool) {
4190 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
4191 }
4192 #[doc = "page privileged/unprivileged attribution"]
4193 #[inline(always)]
4194 pub const fn priv2bb10(&self) -> bool {
4195 let val = (self.0 >> 10usize) & 0x01;
4196 val != 0
4197 }
4198 #[doc = "page privileged/unprivileged attribution"]
4199 #[inline(always)]
4200 pub fn set_priv2bb10(&mut self, val: bool) {
4201 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
4202 }
4203 #[doc = "page privileged/unprivileged attribution"]
4204 #[inline(always)]
4205 pub const fn priv2bb11(&self) -> bool {
4206 let val = (self.0 >> 11usize) & 0x01;
4207 val != 0
4208 }
4209 #[doc = "page privileged/unprivileged attribution"]
4210 #[inline(always)]
4211 pub fn set_priv2bb11(&mut self, val: bool) {
4212 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
4213 }
4214 #[doc = "page privileged/unprivileged attribution"]
4215 #[inline(always)]
4216 pub const fn priv2bb12(&self) -> bool {
4217 let val = (self.0 >> 12usize) & 0x01;
4218 val != 0
4219 }
4220 #[doc = "page privileged/unprivileged attribution"]
4221 #[inline(always)]
4222 pub fn set_priv2bb12(&mut self, val: bool) {
4223 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
4224 }
4225 #[doc = "page privileged/unprivileged attribution"]
4226 #[inline(always)]
4227 pub const fn priv2bb13(&self) -> bool {
4228 let val = (self.0 >> 13usize) & 0x01;
4229 val != 0
4230 }
4231 #[doc = "page privileged/unprivileged attribution"]
4232 #[inline(always)]
4233 pub fn set_priv2bb13(&mut self, val: bool) {
4234 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
4235 }
4236 #[doc = "page privileged/unprivileged attribution"]
4237 #[inline(always)]
4238 pub const fn priv2bb14(&self) -> bool {
4239 let val = (self.0 >> 14usize) & 0x01;
4240 val != 0
4241 }
4242 #[doc = "page privileged/unprivileged attribution"]
4243 #[inline(always)]
4244 pub fn set_priv2bb14(&mut self, val: bool) {
4245 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
4246 }
4247 #[doc = "page privileged/unprivileged attribution"]
4248 #[inline(always)]
4249 pub const fn priv2bb15(&self) -> bool {
4250 let val = (self.0 >> 15usize) & 0x01;
4251 val != 0
4252 }
4253 #[doc = "page privileged/unprivileged attribution"]
4254 #[inline(always)]
4255 pub fn set_priv2bb15(&mut self, val: bool) {
4256 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
4257 }
4258 #[doc = "page privileged/unprivileged attribution"]
4259 #[inline(always)]
4260 pub const fn priv2bb16(&self) -> bool {
4261 let val = (self.0 >> 16usize) & 0x01;
4262 val != 0
4263 }
4264 #[doc = "page privileged/unprivileged attribution"]
4265 #[inline(always)]
4266 pub fn set_priv2bb16(&mut self, val: bool) {
4267 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
4268 }
4269 #[doc = "page privileged/unprivileged attribution"]
4270 #[inline(always)]
4271 pub const fn priv2bb17(&self) -> bool {
4272 let val = (self.0 >> 17usize) & 0x01;
4273 val != 0
4274 }
4275 #[doc = "page privileged/unprivileged attribution"]
4276 #[inline(always)]
4277 pub fn set_priv2bb17(&mut self, val: bool) {
4278 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
4279 }
4280 #[doc = "page privileged/unprivileged attribution"]
4281 #[inline(always)]
4282 pub const fn priv2bb18(&self) -> bool {
4283 let val = (self.0 >> 18usize) & 0x01;
4284 val != 0
4285 }
4286 #[doc = "page privileged/unprivileged attribution"]
4287 #[inline(always)]
4288 pub fn set_priv2bb18(&mut self, val: bool) {
4289 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
4290 }
4291 #[doc = "page privileged/unprivileged attribution"]
4292 #[inline(always)]
4293 pub const fn priv2bb19(&self) -> bool {
4294 let val = (self.0 >> 19usize) & 0x01;
4295 val != 0
4296 }
4297 #[doc = "page privileged/unprivileged attribution"]
4298 #[inline(always)]
4299 pub fn set_priv2bb19(&mut self, val: bool) {
4300 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
4301 }
4302 #[doc = "page privileged/unprivileged attribution"]
4303 #[inline(always)]
4304 pub const fn priv2bb20(&self) -> bool {
4305 let val = (self.0 >> 20usize) & 0x01;
4306 val != 0
4307 }
4308 #[doc = "page privileged/unprivileged attribution"]
4309 #[inline(always)]
4310 pub fn set_priv2bb20(&mut self, val: bool) {
4311 self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize);
4312 }
4313 #[doc = "page privileged/unprivileged attribution"]
4314 #[inline(always)]
4315 pub const fn priv2bb21(&self) -> bool {
4316 let val = (self.0 >> 21usize) & 0x01;
4317 val != 0
4318 }
4319 #[doc = "page privileged/unprivileged attribution"]
4320 #[inline(always)]
4321 pub fn set_priv2bb21(&mut self, val: bool) {
4322 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
4323 }
4324 #[doc = "page privileged/unprivileged attribution"]
4325 #[inline(always)]
4326 pub const fn priv2bb22(&self) -> bool {
4327 let val = (self.0 >> 22usize) & 0x01;
4328 val != 0
4329 }
4330 #[doc = "page privileged/unprivileged attribution"]
4331 #[inline(always)]
4332 pub fn set_priv2bb22(&mut self, val: bool) {
4333 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
4334 }
4335 #[doc = "page privileged/unprivileged attribution"]
4336 #[inline(always)]
4337 pub const fn priv2bb23(&self) -> bool {
4338 let val = (self.0 >> 23usize) & 0x01;
4339 val != 0
4340 }
4341 #[doc = "page privileged/unprivileged attribution"]
4342 #[inline(always)]
4343 pub fn set_priv2bb23(&mut self, val: bool) {
4344 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
4345 }
4346 #[doc = "page privileged/unprivileged attribution"]
4347 #[inline(always)]
4348 pub const fn priv2bb24(&self) -> bool {
4349 let val = (self.0 >> 24usize) & 0x01;
4350 val != 0
4351 }
4352 #[doc = "page privileged/unprivileged attribution"]
4353 #[inline(always)]
4354 pub fn set_priv2bb24(&mut self, val: bool) {
4355 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
4356 }
4357 #[doc = "page privileged/unprivileged attribution"]
4358 #[inline(always)]
4359 pub const fn priv2bb25(&self) -> bool {
4360 let val = (self.0 >> 25usize) & 0x01;
4361 val != 0
4362 }
4363 #[doc = "page privileged/unprivileged attribution"]
4364 #[inline(always)]
4365 pub fn set_priv2bb25(&mut self, val: bool) {
4366 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
4367 }
4368 #[doc = "page privileged/unprivileged attribution"]
4369 #[inline(always)]
4370 pub const fn priv2bb26(&self) -> bool {
4371 let val = (self.0 >> 26usize) & 0x01;
4372 val != 0
4373 }
4374 #[doc = "page privileged/unprivileged attribution"]
4375 #[inline(always)]
4376 pub fn set_priv2bb26(&mut self, val: bool) {
4377 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
4378 }
4379 #[doc = "page privileged/unprivileged attribution"]
4380 #[inline(always)]
4381 pub const fn priv2bb27(&self) -> bool {
4382 let val = (self.0 >> 27usize) & 0x01;
4383 val != 0
4384 }
4385 #[doc = "page privileged/unprivileged attribution"]
4386 #[inline(always)]
4387 pub fn set_priv2bb27(&mut self, val: bool) {
4388 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize);
4389 }
4390 #[doc = "page privileged/unprivileged attribution"]
4391 #[inline(always)]
4392 pub const fn priv2bb28(&self) -> bool {
4393 let val = (self.0 >> 28usize) & 0x01;
4394 val != 0
4395 }
4396 #[doc = "page privileged/unprivileged attribution"]
4397 #[inline(always)]
4398 pub fn set_priv2bb28(&mut self, val: bool) {
4399 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
4400 }
4401 #[doc = "page privileged/unprivileged attribution"]
4402 #[inline(always)]
4403 pub const fn priv2bb29(&self) -> bool {
4404 let val = (self.0 >> 29usize) & 0x01;
4405 val != 0
4406 }
4407 #[doc = "page privileged/unprivileged attribution"]
4408 #[inline(always)]
4409 pub fn set_priv2bb29(&mut self, val: bool) {
4410 self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize);
4411 }
4412 #[doc = "page privileged/unprivileged attribution"]
4413 #[inline(always)]
4414 pub const fn priv2bb30(&self) -> bool {
4415 let val = (self.0 >> 30usize) & 0x01;
4416 val != 0
4417 }
4418 #[doc = "page privileged/unprivileged attribution"]
4419 #[inline(always)]
4420 pub fn set_priv2bb30(&mut self, val: bool) {
4421 self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize);
4422 }
4423 #[doc = "page privileged/unprivileged attribution"]
4424 #[inline(always)]
4425 pub const fn priv2bb31(&self) -> bool {
4426 let val = (self.0 >> 31usize) & 0x01;
4427 val != 0
4428 }
4429 #[doc = "page privileged/unprivileged attribution"]
4430 #[inline(always)]
4431 pub fn set_priv2bb31(&mut self, val: bool) {
4432 self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize);
4433 }
4434 }
4435 impl Default for Priv2bbr2 {
4436 #[inline(always)]
4437 fn default() -> Priv2bbr2 {
4438 Priv2bbr2(0)
4439 }
4440 }
4441 impl core::fmt::Debug for Priv2bbr2 {
4442 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
4443 f.debug_struct("Priv2bbr2")
4444 .field("priv2bb0", &self.priv2bb0())
4445 .field("priv2bb1", &self.priv2bb1())
4446 .field("priv2bb2", &self.priv2bb2())
4447 .field("priv2bb3", &self.priv2bb3())
4448 .field("priv2bb4", &self.priv2bb4())
4449 .field("priv2bb5", &self.priv2bb5())
4450 .field("priv2bb6", &self.priv2bb6())
4451 .field("priv2bb7", &self.priv2bb7())
4452 .field("priv2bb8", &self.priv2bb8())
4453 .field("priv2bb9", &self.priv2bb9())
4454 .field("priv2bb10", &self.priv2bb10())
4455 .field("priv2bb11", &self.priv2bb11())
4456 .field("priv2bb12", &self.priv2bb12())
4457 .field("priv2bb13", &self.priv2bb13())
4458 .field("priv2bb14", &self.priv2bb14())
4459 .field("priv2bb15", &self.priv2bb15())
4460 .field("priv2bb16", &self.priv2bb16())
4461 .field("priv2bb17", &self.priv2bb17())
4462 .field("priv2bb18", &self.priv2bb18())
4463 .field("priv2bb19", &self.priv2bb19())
4464 .field("priv2bb20", &self.priv2bb20())
4465 .field("priv2bb21", &self.priv2bb21())
4466 .field("priv2bb22", &self.priv2bb22())
4467 .field("priv2bb23", &self.priv2bb23())
4468 .field("priv2bb24", &self.priv2bb24())
4469 .field("priv2bb25", &self.priv2bb25())
4470 .field("priv2bb26", &self.priv2bb26())
4471 .field("priv2bb27", &self.priv2bb27())
4472 .field("priv2bb28", &self.priv2bb28())
4473 .field("priv2bb29", &self.priv2bb29())
4474 .field("priv2bb30", &self.priv2bb30())
4475 .field("priv2bb31", &self.priv2bb31())
4476 .finish()
4477 }
4478 }
4479 #[cfg(feature = "defmt")]
4480 impl defmt::Format for Priv2bbr2 {
4481 fn format(&self, f: defmt::Formatter) {
4482 #[derive(defmt :: Format)]
4483 struct Priv2bbr2 {
4484 priv2bb0: bool,
4485 priv2bb1: bool,
4486 priv2bb2: bool,
4487 priv2bb3: bool,
4488 priv2bb4: bool,
4489 priv2bb5: bool,
4490 priv2bb6: bool,
4491 priv2bb7: bool,
4492 priv2bb8: bool,
4493 priv2bb9: bool,
4494 priv2bb10: bool,
4495 priv2bb11: bool,
4496 priv2bb12: bool,
4497 priv2bb13: bool,
4498 priv2bb14: bool,
4499 priv2bb15: bool,
4500 priv2bb16: bool,
4501 priv2bb17: bool,
4502 priv2bb18: bool,
4503 priv2bb19: bool,
4504 priv2bb20: bool,
4505 priv2bb21: bool,
4506 priv2bb22: bool,
4507 priv2bb23: bool,
4508 priv2bb24: bool,
4509 priv2bb25: bool,
4510 priv2bb26: bool,
4511 priv2bb27: bool,
4512 priv2bb28: bool,
4513 priv2bb29: bool,
4514 priv2bb30: bool,
4515 priv2bb31: bool,
4516 }
4517 let proxy = Priv2bbr2 {
4518 priv2bb0: self.priv2bb0(),
4519 priv2bb1: self.priv2bb1(),
4520 priv2bb2: self.priv2bb2(),
4521 priv2bb3: self.priv2bb3(),
4522 priv2bb4: self.priv2bb4(),
4523 priv2bb5: self.priv2bb5(),
4524 priv2bb6: self.priv2bb6(),
4525 priv2bb7: self.priv2bb7(),
4526 priv2bb8: self.priv2bb8(),
4527 priv2bb9: self.priv2bb9(),
4528 priv2bb10: self.priv2bb10(),
4529 priv2bb11: self.priv2bb11(),
4530 priv2bb12: self.priv2bb12(),
4531 priv2bb13: self.priv2bb13(),
4532 priv2bb14: self.priv2bb14(),
4533 priv2bb15: self.priv2bb15(),
4534 priv2bb16: self.priv2bb16(),
4535 priv2bb17: self.priv2bb17(),
4536 priv2bb18: self.priv2bb18(),
4537 priv2bb19: self.priv2bb19(),
4538 priv2bb20: self.priv2bb20(),
4539 priv2bb21: self.priv2bb21(),
4540 priv2bb22: self.priv2bb22(),
4541 priv2bb23: self.priv2bb23(),
4542 priv2bb24: self.priv2bb24(),
4543 priv2bb25: self.priv2bb25(),
4544 priv2bb26: self.priv2bb26(),
4545 priv2bb27: self.priv2bb27(),
4546 priv2bb28: self.priv2bb28(),
4547 priv2bb29: self.priv2bb29(),
4548 priv2bb30: self.priv2bb30(),
4549 priv2bb31: self.priv2bb31(),
4550 };
4551 defmt::write!(f, "{}", proxy)
4552 }
4553 }
4554 #[doc = "FLASH privilege block based bank 2 register 3"]
4555 #[repr(transparent)]
4556 #[derive(Copy, Clone, Eq, PartialEq)]
4557 pub struct Priv2bbr3(pub u32);
4558 impl Priv2bbr3 {
4559 #[doc = "page privileged/unprivileged attribution"]
4560 #[inline(always)]
4561 pub const fn priv2bb0(&self) -> bool {
4562 let val = (self.0 >> 0usize) & 0x01;
4563 val != 0
4564 }
4565 #[doc = "page privileged/unprivileged attribution"]
4566 #[inline(always)]
4567 pub fn set_priv2bb0(&mut self, val: bool) {
4568 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
4569 }
4570 #[doc = "page privileged/unprivileged attribution"]
4571 #[inline(always)]
4572 pub const fn priv2bb1(&self) -> bool {
4573 let val = (self.0 >> 1usize) & 0x01;
4574 val != 0
4575 }
4576 #[doc = "page privileged/unprivileged attribution"]
4577 #[inline(always)]
4578 pub fn set_priv2bb1(&mut self, val: bool) {
4579 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
4580 }
4581 #[doc = "page privileged/unprivileged attribution"]
4582 #[inline(always)]
4583 pub const fn priv2bb2(&self) -> bool {
4584 let val = (self.0 >> 2usize) & 0x01;
4585 val != 0
4586 }
4587 #[doc = "page privileged/unprivileged attribution"]
4588 #[inline(always)]
4589 pub fn set_priv2bb2(&mut self, val: bool) {
4590 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
4591 }
4592 #[doc = "page privileged/unprivileged attribution"]
4593 #[inline(always)]
4594 pub const fn priv2bb3(&self) -> bool {
4595 let val = (self.0 >> 3usize) & 0x01;
4596 val != 0
4597 }
4598 #[doc = "page privileged/unprivileged attribution"]
4599 #[inline(always)]
4600 pub fn set_priv2bb3(&mut self, val: bool) {
4601 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
4602 }
4603 #[doc = "page privileged/unprivileged attribution"]
4604 #[inline(always)]
4605 pub const fn priv2bb4(&self) -> bool {
4606 let val = (self.0 >> 4usize) & 0x01;
4607 val != 0
4608 }
4609 #[doc = "page privileged/unprivileged attribution"]
4610 #[inline(always)]
4611 pub fn set_priv2bb4(&mut self, val: bool) {
4612 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
4613 }
4614 #[doc = "page privileged/unprivileged attribution"]
4615 #[inline(always)]
4616 pub const fn priv2bb5(&self) -> bool {
4617 let val = (self.0 >> 5usize) & 0x01;
4618 val != 0
4619 }
4620 #[doc = "page privileged/unprivileged attribution"]
4621 #[inline(always)]
4622 pub fn set_priv2bb5(&mut self, val: bool) {
4623 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
4624 }
4625 #[doc = "page privileged/unprivileged attribution"]
4626 #[inline(always)]
4627 pub const fn priv2bb6(&self) -> bool {
4628 let val = (self.0 >> 6usize) & 0x01;
4629 val != 0
4630 }
4631 #[doc = "page privileged/unprivileged attribution"]
4632 #[inline(always)]
4633 pub fn set_priv2bb6(&mut self, val: bool) {
4634 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
4635 }
4636 #[doc = "page privileged/unprivileged attribution"]
4637 #[inline(always)]
4638 pub const fn priv2bb7(&self) -> bool {
4639 let val = (self.0 >> 7usize) & 0x01;
4640 val != 0
4641 }
4642 #[doc = "page privileged/unprivileged attribution"]
4643 #[inline(always)]
4644 pub fn set_priv2bb7(&mut self, val: bool) {
4645 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
4646 }
4647 #[doc = "page privileged/unprivileged attribution"]
4648 #[inline(always)]
4649 pub const fn priv2bb8(&self) -> bool {
4650 let val = (self.0 >> 8usize) & 0x01;
4651 val != 0
4652 }
4653 #[doc = "page privileged/unprivileged attribution"]
4654 #[inline(always)]
4655 pub fn set_priv2bb8(&mut self, val: bool) {
4656 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
4657 }
4658 #[doc = "page privileged/unprivileged attribution"]
4659 #[inline(always)]
4660 pub const fn priv2bb9(&self) -> bool {
4661 let val = (self.0 >> 9usize) & 0x01;
4662 val != 0
4663 }
4664 #[doc = "page privileged/unprivileged attribution"]
4665 #[inline(always)]
4666 pub fn set_priv2bb9(&mut self, val: bool) {
4667 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
4668 }
4669 #[doc = "page privileged/unprivileged attribution"]
4670 #[inline(always)]
4671 pub const fn priv2bb10(&self) -> bool {
4672 let val = (self.0 >> 10usize) & 0x01;
4673 val != 0
4674 }
4675 #[doc = "page privileged/unprivileged attribution"]
4676 #[inline(always)]
4677 pub fn set_priv2bb10(&mut self, val: bool) {
4678 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
4679 }
4680 #[doc = "page privileged/unprivileged attribution"]
4681 #[inline(always)]
4682 pub const fn priv2bb11(&self) -> bool {
4683 let val = (self.0 >> 11usize) & 0x01;
4684 val != 0
4685 }
4686 #[doc = "page privileged/unprivileged attribution"]
4687 #[inline(always)]
4688 pub fn set_priv2bb11(&mut self, val: bool) {
4689 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
4690 }
4691 #[doc = "page privileged/unprivileged attribution"]
4692 #[inline(always)]
4693 pub const fn priv2bb12(&self) -> bool {
4694 let val = (self.0 >> 12usize) & 0x01;
4695 val != 0
4696 }
4697 #[doc = "page privileged/unprivileged attribution"]
4698 #[inline(always)]
4699 pub fn set_priv2bb12(&mut self, val: bool) {
4700 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
4701 }
4702 #[doc = "page privileged/unprivileged attribution"]
4703 #[inline(always)]
4704 pub const fn priv2bb13(&self) -> bool {
4705 let val = (self.0 >> 13usize) & 0x01;
4706 val != 0
4707 }
4708 #[doc = "page privileged/unprivileged attribution"]
4709 #[inline(always)]
4710 pub fn set_priv2bb13(&mut self, val: bool) {
4711 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
4712 }
4713 #[doc = "page privileged/unprivileged attribution"]
4714 #[inline(always)]
4715 pub const fn priv2bb14(&self) -> bool {
4716 let val = (self.0 >> 14usize) & 0x01;
4717 val != 0
4718 }
4719 #[doc = "page privileged/unprivileged attribution"]
4720 #[inline(always)]
4721 pub fn set_priv2bb14(&mut self, val: bool) {
4722 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
4723 }
4724 #[doc = "page privileged/unprivileged attribution"]
4725 #[inline(always)]
4726 pub const fn priv2bb15(&self) -> bool {
4727 let val = (self.0 >> 15usize) & 0x01;
4728 val != 0
4729 }
4730 #[doc = "page privileged/unprivileged attribution"]
4731 #[inline(always)]
4732 pub fn set_priv2bb15(&mut self, val: bool) {
4733 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
4734 }
4735 #[doc = "page privileged/unprivileged attribution"]
4736 #[inline(always)]
4737 pub const fn priv2bb16(&self) -> bool {
4738 let val = (self.0 >> 16usize) & 0x01;
4739 val != 0
4740 }
4741 #[doc = "page privileged/unprivileged attribution"]
4742 #[inline(always)]
4743 pub fn set_priv2bb16(&mut self, val: bool) {
4744 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
4745 }
4746 #[doc = "page privileged/unprivileged attribution"]
4747 #[inline(always)]
4748 pub const fn priv2bb17(&self) -> bool {
4749 let val = (self.0 >> 17usize) & 0x01;
4750 val != 0
4751 }
4752 #[doc = "page privileged/unprivileged attribution"]
4753 #[inline(always)]
4754 pub fn set_priv2bb17(&mut self, val: bool) {
4755 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
4756 }
4757 #[doc = "page privileged/unprivileged attribution"]
4758 #[inline(always)]
4759 pub const fn priv2bb18(&self) -> bool {
4760 let val = (self.0 >> 18usize) & 0x01;
4761 val != 0
4762 }
4763 #[doc = "page privileged/unprivileged attribution"]
4764 #[inline(always)]
4765 pub fn set_priv2bb18(&mut self, val: bool) {
4766 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
4767 }
4768 #[doc = "page privileged/unprivileged attribution"]
4769 #[inline(always)]
4770 pub const fn priv2bb19(&self) -> bool {
4771 let val = (self.0 >> 19usize) & 0x01;
4772 val != 0
4773 }
4774 #[doc = "page privileged/unprivileged attribution"]
4775 #[inline(always)]
4776 pub fn set_priv2bb19(&mut self, val: bool) {
4777 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
4778 }
4779 #[doc = "page privileged/unprivileged attribution"]
4780 #[inline(always)]
4781 pub const fn priv2bb20(&self) -> bool {
4782 let val = (self.0 >> 20usize) & 0x01;
4783 val != 0
4784 }
4785 #[doc = "page privileged/unprivileged attribution"]
4786 #[inline(always)]
4787 pub fn set_priv2bb20(&mut self, val: bool) {
4788 self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize);
4789 }
4790 #[doc = "page privileged/unprivileged attribution"]
4791 #[inline(always)]
4792 pub const fn priv2bb21(&self) -> bool {
4793 let val = (self.0 >> 21usize) & 0x01;
4794 val != 0
4795 }
4796 #[doc = "page privileged/unprivileged attribution"]
4797 #[inline(always)]
4798 pub fn set_priv2bb21(&mut self, val: bool) {
4799 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
4800 }
4801 #[doc = "page privileged/unprivileged attribution"]
4802 #[inline(always)]
4803 pub const fn priv2bb22(&self) -> bool {
4804 let val = (self.0 >> 22usize) & 0x01;
4805 val != 0
4806 }
4807 #[doc = "page privileged/unprivileged attribution"]
4808 #[inline(always)]
4809 pub fn set_priv2bb22(&mut self, val: bool) {
4810 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
4811 }
4812 #[doc = "page privileged/unprivileged attribution"]
4813 #[inline(always)]
4814 pub const fn priv2bb23(&self) -> bool {
4815 let val = (self.0 >> 23usize) & 0x01;
4816 val != 0
4817 }
4818 #[doc = "page privileged/unprivileged attribution"]
4819 #[inline(always)]
4820 pub fn set_priv2bb23(&mut self, val: bool) {
4821 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
4822 }
4823 #[doc = "page privileged/unprivileged attribution"]
4824 #[inline(always)]
4825 pub const fn priv2bb24(&self) -> bool {
4826 let val = (self.0 >> 24usize) & 0x01;
4827 val != 0
4828 }
4829 #[doc = "page privileged/unprivileged attribution"]
4830 #[inline(always)]
4831 pub fn set_priv2bb24(&mut self, val: bool) {
4832 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
4833 }
4834 #[doc = "page privileged/unprivileged attribution"]
4835 #[inline(always)]
4836 pub const fn priv2bb25(&self) -> bool {
4837 let val = (self.0 >> 25usize) & 0x01;
4838 val != 0
4839 }
4840 #[doc = "page privileged/unprivileged attribution"]
4841 #[inline(always)]
4842 pub fn set_priv2bb25(&mut self, val: bool) {
4843 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
4844 }
4845 #[doc = "page privileged/unprivileged attribution"]
4846 #[inline(always)]
4847 pub const fn priv2bb26(&self) -> bool {
4848 let val = (self.0 >> 26usize) & 0x01;
4849 val != 0
4850 }
4851 #[doc = "page privileged/unprivileged attribution"]
4852 #[inline(always)]
4853 pub fn set_priv2bb26(&mut self, val: bool) {
4854 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
4855 }
4856 #[doc = "page privileged/unprivileged attribution"]
4857 #[inline(always)]
4858 pub const fn priv2bb27(&self) -> bool {
4859 let val = (self.0 >> 27usize) & 0x01;
4860 val != 0
4861 }
4862 #[doc = "page privileged/unprivileged attribution"]
4863 #[inline(always)]
4864 pub fn set_priv2bb27(&mut self, val: bool) {
4865 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize);
4866 }
4867 #[doc = "page privileged/unprivileged attribution"]
4868 #[inline(always)]
4869 pub const fn priv2bb28(&self) -> bool {
4870 let val = (self.0 >> 28usize) & 0x01;
4871 val != 0
4872 }
4873 #[doc = "page privileged/unprivileged attribution"]
4874 #[inline(always)]
4875 pub fn set_priv2bb28(&mut self, val: bool) {
4876 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
4877 }
4878 #[doc = "page privileged/unprivileged attribution"]
4879 #[inline(always)]
4880 pub const fn priv2bb29(&self) -> bool {
4881 let val = (self.0 >> 29usize) & 0x01;
4882 val != 0
4883 }
4884 #[doc = "page privileged/unprivileged attribution"]
4885 #[inline(always)]
4886 pub fn set_priv2bb29(&mut self, val: bool) {
4887 self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize);
4888 }
4889 #[doc = "page privileged/unprivileged attribution"]
4890 #[inline(always)]
4891 pub const fn priv2bb30(&self) -> bool {
4892 let val = (self.0 >> 30usize) & 0x01;
4893 val != 0
4894 }
4895 #[doc = "page privileged/unprivileged attribution"]
4896 #[inline(always)]
4897 pub fn set_priv2bb30(&mut self, val: bool) {
4898 self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize);
4899 }
4900 #[doc = "page privileged/unprivileged attribution"]
4901 #[inline(always)]
4902 pub const fn priv2bb31(&self) -> bool {
4903 let val = (self.0 >> 31usize) & 0x01;
4904 val != 0
4905 }
4906 #[doc = "page privileged/unprivileged attribution"]
4907 #[inline(always)]
4908 pub fn set_priv2bb31(&mut self, val: bool) {
4909 self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize);
4910 }
4911 }
4912 impl Default for Priv2bbr3 {
4913 #[inline(always)]
4914 fn default() -> Priv2bbr3 {
4915 Priv2bbr3(0)
4916 }
4917 }
4918 impl core::fmt::Debug for Priv2bbr3 {
4919 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
4920 f.debug_struct("Priv2bbr3")
4921 .field("priv2bb0", &self.priv2bb0())
4922 .field("priv2bb1", &self.priv2bb1())
4923 .field("priv2bb2", &self.priv2bb2())
4924 .field("priv2bb3", &self.priv2bb3())
4925 .field("priv2bb4", &self.priv2bb4())
4926 .field("priv2bb5", &self.priv2bb5())
4927 .field("priv2bb6", &self.priv2bb6())
4928 .field("priv2bb7", &self.priv2bb7())
4929 .field("priv2bb8", &self.priv2bb8())
4930 .field("priv2bb9", &self.priv2bb9())
4931 .field("priv2bb10", &self.priv2bb10())
4932 .field("priv2bb11", &self.priv2bb11())
4933 .field("priv2bb12", &self.priv2bb12())
4934 .field("priv2bb13", &self.priv2bb13())
4935 .field("priv2bb14", &self.priv2bb14())
4936 .field("priv2bb15", &self.priv2bb15())
4937 .field("priv2bb16", &self.priv2bb16())
4938 .field("priv2bb17", &self.priv2bb17())
4939 .field("priv2bb18", &self.priv2bb18())
4940 .field("priv2bb19", &self.priv2bb19())
4941 .field("priv2bb20", &self.priv2bb20())
4942 .field("priv2bb21", &self.priv2bb21())
4943 .field("priv2bb22", &self.priv2bb22())
4944 .field("priv2bb23", &self.priv2bb23())
4945 .field("priv2bb24", &self.priv2bb24())
4946 .field("priv2bb25", &self.priv2bb25())
4947 .field("priv2bb26", &self.priv2bb26())
4948 .field("priv2bb27", &self.priv2bb27())
4949 .field("priv2bb28", &self.priv2bb28())
4950 .field("priv2bb29", &self.priv2bb29())
4951 .field("priv2bb30", &self.priv2bb30())
4952 .field("priv2bb31", &self.priv2bb31())
4953 .finish()
4954 }
4955 }
4956 #[cfg(feature = "defmt")]
4957 impl defmt::Format for Priv2bbr3 {
4958 fn format(&self, f: defmt::Formatter) {
4959 #[derive(defmt :: Format)]
4960 struct Priv2bbr3 {
4961 priv2bb0: bool,
4962 priv2bb1: bool,
4963 priv2bb2: bool,
4964 priv2bb3: bool,
4965 priv2bb4: bool,
4966 priv2bb5: bool,
4967 priv2bb6: bool,
4968 priv2bb7: bool,
4969 priv2bb8: bool,
4970 priv2bb9: bool,
4971 priv2bb10: bool,
4972 priv2bb11: bool,
4973 priv2bb12: bool,
4974 priv2bb13: bool,
4975 priv2bb14: bool,
4976 priv2bb15: bool,
4977 priv2bb16: bool,
4978 priv2bb17: bool,
4979 priv2bb18: bool,
4980 priv2bb19: bool,
4981 priv2bb20: bool,
4982 priv2bb21: bool,
4983 priv2bb22: bool,
4984 priv2bb23: bool,
4985 priv2bb24: bool,
4986 priv2bb25: bool,
4987 priv2bb26: bool,
4988 priv2bb27: bool,
4989 priv2bb28: bool,
4990 priv2bb29: bool,
4991 priv2bb30: bool,
4992 priv2bb31: bool,
4993 }
4994 let proxy = Priv2bbr3 {
4995 priv2bb0: self.priv2bb0(),
4996 priv2bb1: self.priv2bb1(),
4997 priv2bb2: self.priv2bb2(),
4998 priv2bb3: self.priv2bb3(),
4999 priv2bb4: self.priv2bb4(),
5000 priv2bb5: self.priv2bb5(),
5001 priv2bb6: self.priv2bb6(),
5002 priv2bb7: self.priv2bb7(),
5003 priv2bb8: self.priv2bb8(),
5004 priv2bb9: self.priv2bb9(),
5005 priv2bb10: self.priv2bb10(),
5006 priv2bb11: self.priv2bb11(),
5007 priv2bb12: self.priv2bb12(),
5008 priv2bb13: self.priv2bb13(),
5009 priv2bb14: self.priv2bb14(),
5010 priv2bb15: self.priv2bb15(),
5011 priv2bb16: self.priv2bb16(),
5012 priv2bb17: self.priv2bb17(),
5013 priv2bb18: self.priv2bb18(),
5014 priv2bb19: self.priv2bb19(),
5015 priv2bb20: self.priv2bb20(),
5016 priv2bb21: self.priv2bb21(),
5017 priv2bb22: self.priv2bb22(),
5018 priv2bb23: self.priv2bb23(),
5019 priv2bb24: self.priv2bb24(),
5020 priv2bb25: self.priv2bb25(),
5021 priv2bb26: self.priv2bb26(),
5022 priv2bb27: self.priv2bb27(),
5023 priv2bb28: self.priv2bb28(),
5024 priv2bb29: self.priv2bb29(),
5025 priv2bb30: self.priv2bb30(),
5026 priv2bb31: self.priv2bb31(),
5027 };
5028 defmt::write!(f, "{}", proxy)
5029 }
5030 }
5031 #[doc = "FLASH privilege block based bank 2 register 4"]
5032 #[repr(transparent)]
5033 #[derive(Copy, Clone, Eq, PartialEq)]
5034 pub struct Priv2bbr4(pub u32);
5035 impl Priv2bbr4 {
5036 #[doc = "page privileged/unprivileged attribution"]
5037 #[inline(always)]
5038 pub const fn priv2bb0(&self) -> bool {
5039 let val = (self.0 >> 0usize) & 0x01;
5040 val != 0
5041 }
5042 #[doc = "page privileged/unprivileged attribution"]
5043 #[inline(always)]
5044 pub fn set_priv2bb0(&mut self, val: bool) {
5045 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
5046 }
5047 #[doc = "page privileged/unprivileged attribution"]
5048 #[inline(always)]
5049 pub const fn priv2bb1(&self) -> bool {
5050 let val = (self.0 >> 1usize) & 0x01;
5051 val != 0
5052 }
5053 #[doc = "page privileged/unprivileged attribution"]
5054 #[inline(always)]
5055 pub fn set_priv2bb1(&mut self, val: bool) {
5056 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
5057 }
5058 #[doc = "page privileged/unprivileged attribution"]
5059 #[inline(always)]
5060 pub const fn priv2bb2(&self) -> bool {
5061 let val = (self.0 >> 2usize) & 0x01;
5062 val != 0
5063 }
5064 #[doc = "page privileged/unprivileged attribution"]
5065 #[inline(always)]
5066 pub fn set_priv2bb2(&mut self, val: bool) {
5067 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
5068 }
5069 #[doc = "page privileged/unprivileged attribution"]
5070 #[inline(always)]
5071 pub const fn priv2bb3(&self) -> bool {
5072 let val = (self.0 >> 3usize) & 0x01;
5073 val != 0
5074 }
5075 #[doc = "page privileged/unprivileged attribution"]
5076 #[inline(always)]
5077 pub fn set_priv2bb3(&mut self, val: bool) {
5078 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
5079 }
5080 #[doc = "page privileged/unprivileged attribution"]
5081 #[inline(always)]
5082 pub const fn priv2bb4(&self) -> bool {
5083 let val = (self.0 >> 4usize) & 0x01;
5084 val != 0
5085 }
5086 #[doc = "page privileged/unprivileged attribution"]
5087 #[inline(always)]
5088 pub fn set_priv2bb4(&mut self, val: bool) {
5089 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
5090 }
5091 #[doc = "page privileged/unprivileged attribution"]
5092 #[inline(always)]
5093 pub const fn priv2bb5(&self) -> bool {
5094 let val = (self.0 >> 5usize) & 0x01;
5095 val != 0
5096 }
5097 #[doc = "page privileged/unprivileged attribution"]
5098 #[inline(always)]
5099 pub fn set_priv2bb5(&mut self, val: bool) {
5100 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
5101 }
5102 #[doc = "page privileged/unprivileged attribution"]
5103 #[inline(always)]
5104 pub const fn priv2bb6(&self) -> bool {
5105 let val = (self.0 >> 6usize) & 0x01;
5106 val != 0
5107 }
5108 #[doc = "page privileged/unprivileged attribution"]
5109 #[inline(always)]
5110 pub fn set_priv2bb6(&mut self, val: bool) {
5111 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
5112 }
5113 #[doc = "page privileged/unprivileged attribution"]
5114 #[inline(always)]
5115 pub const fn priv2bb7(&self) -> bool {
5116 let val = (self.0 >> 7usize) & 0x01;
5117 val != 0
5118 }
5119 #[doc = "page privileged/unprivileged attribution"]
5120 #[inline(always)]
5121 pub fn set_priv2bb7(&mut self, val: bool) {
5122 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
5123 }
5124 #[doc = "page privileged/unprivileged attribution"]
5125 #[inline(always)]
5126 pub const fn priv2bb8(&self) -> bool {
5127 let val = (self.0 >> 8usize) & 0x01;
5128 val != 0
5129 }
5130 #[doc = "page privileged/unprivileged attribution"]
5131 #[inline(always)]
5132 pub fn set_priv2bb8(&mut self, val: bool) {
5133 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
5134 }
5135 #[doc = "page privileged/unprivileged attribution"]
5136 #[inline(always)]
5137 pub const fn priv2bb9(&self) -> bool {
5138 let val = (self.0 >> 9usize) & 0x01;
5139 val != 0
5140 }
5141 #[doc = "page privileged/unprivileged attribution"]
5142 #[inline(always)]
5143 pub fn set_priv2bb9(&mut self, val: bool) {
5144 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
5145 }
5146 #[doc = "page privileged/unprivileged attribution"]
5147 #[inline(always)]
5148 pub const fn priv2bb10(&self) -> bool {
5149 let val = (self.0 >> 10usize) & 0x01;
5150 val != 0
5151 }
5152 #[doc = "page privileged/unprivileged attribution"]
5153 #[inline(always)]
5154 pub fn set_priv2bb10(&mut self, val: bool) {
5155 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
5156 }
5157 #[doc = "page privileged/unprivileged attribution"]
5158 #[inline(always)]
5159 pub const fn priv2bb11(&self) -> bool {
5160 let val = (self.0 >> 11usize) & 0x01;
5161 val != 0
5162 }
5163 #[doc = "page privileged/unprivileged attribution"]
5164 #[inline(always)]
5165 pub fn set_priv2bb11(&mut self, val: bool) {
5166 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
5167 }
5168 #[doc = "page privileged/unprivileged attribution"]
5169 #[inline(always)]
5170 pub const fn priv2bb12(&self) -> bool {
5171 let val = (self.0 >> 12usize) & 0x01;
5172 val != 0
5173 }
5174 #[doc = "page privileged/unprivileged attribution"]
5175 #[inline(always)]
5176 pub fn set_priv2bb12(&mut self, val: bool) {
5177 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
5178 }
5179 #[doc = "page privileged/unprivileged attribution"]
5180 #[inline(always)]
5181 pub const fn priv2bb13(&self) -> bool {
5182 let val = (self.0 >> 13usize) & 0x01;
5183 val != 0
5184 }
5185 #[doc = "page privileged/unprivileged attribution"]
5186 #[inline(always)]
5187 pub fn set_priv2bb13(&mut self, val: bool) {
5188 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
5189 }
5190 #[doc = "page privileged/unprivileged attribution"]
5191 #[inline(always)]
5192 pub const fn priv2bb14(&self) -> bool {
5193 let val = (self.0 >> 14usize) & 0x01;
5194 val != 0
5195 }
5196 #[doc = "page privileged/unprivileged attribution"]
5197 #[inline(always)]
5198 pub fn set_priv2bb14(&mut self, val: bool) {
5199 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
5200 }
5201 #[doc = "page privileged/unprivileged attribution"]
5202 #[inline(always)]
5203 pub const fn priv2bb15(&self) -> bool {
5204 let val = (self.0 >> 15usize) & 0x01;
5205 val != 0
5206 }
5207 #[doc = "page privileged/unprivileged attribution"]
5208 #[inline(always)]
5209 pub fn set_priv2bb15(&mut self, val: bool) {
5210 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
5211 }
5212 #[doc = "page privileged/unprivileged attribution"]
5213 #[inline(always)]
5214 pub const fn priv2bb16(&self) -> bool {
5215 let val = (self.0 >> 16usize) & 0x01;
5216 val != 0
5217 }
5218 #[doc = "page privileged/unprivileged attribution"]
5219 #[inline(always)]
5220 pub fn set_priv2bb16(&mut self, val: bool) {
5221 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
5222 }
5223 #[doc = "page privileged/unprivileged attribution"]
5224 #[inline(always)]
5225 pub const fn priv2bb17(&self) -> bool {
5226 let val = (self.0 >> 17usize) & 0x01;
5227 val != 0
5228 }
5229 #[doc = "page privileged/unprivileged attribution"]
5230 #[inline(always)]
5231 pub fn set_priv2bb17(&mut self, val: bool) {
5232 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
5233 }
5234 #[doc = "page privileged/unprivileged attribution"]
5235 #[inline(always)]
5236 pub const fn priv2bb18(&self) -> bool {
5237 let val = (self.0 >> 18usize) & 0x01;
5238 val != 0
5239 }
5240 #[doc = "page privileged/unprivileged attribution"]
5241 #[inline(always)]
5242 pub fn set_priv2bb18(&mut self, val: bool) {
5243 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
5244 }
5245 #[doc = "page privileged/unprivileged attribution"]
5246 #[inline(always)]
5247 pub const fn priv2bb19(&self) -> bool {
5248 let val = (self.0 >> 19usize) & 0x01;
5249 val != 0
5250 }
5251 #[doc = "page privileged/unprivileged attribution"]
5252 #[inline(always)]
5253 pub fn set_priv2bb19(&mut self, val: bool) {
5254 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
5255 }
5256 #[doc = "page privileged/unprivileged attribution"]
5257 #[inline(always)]
5258 pub const fn priv2bb20(&self) -> bool {
5259 let val = (self.0 >> 20usize) & 0x01;
5260 val != 0
5261 }
5262 #[doc = "page privileged/unprivileged attribution"]
5263 #[inline(always)]
5264 pub fn set_priv2bb20(&mut self, val: bool) {
5265 self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize);
5266 }
5267 #[doc = "page privileged/unprivileged attribution"]
5268 #[inline(always)]
5269 pub const fn priv2bb21(&self) -> bool {
5270 let val = (self.0 >> 21usize) & 0x01;
5271 val != 0
5272 }
5273 #[doc = "page privileged/unprivileged attribution"]
5274 #[inline(always)]
5275 pub fn set_priv2bb21(&mut self, val: bool) {
5276 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
5277 }
5278 #[doc = "page privileged/unprivileged attribution"]
5279 #[inline(always)]
5280 pub const fn priv2bb22(&self) -> bool {
5281 let val = (self.0 >> 22usize) & 0x01;
5282 val != 0
5283 }
5284 #[doc = "page privileged/unprivileged attribution"]
5285 #[inline(always)]
5286 pub fn set_priv2bb22(&mut self, val: bool) {
5287 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
5288 }
5289 #[doc = "page privileged/unprivileged attribution"]
5290 #[inline(always)]
5291 pub const fn priv2bb23(&self) -> bool {
5292 let val = (self.0 >> 23usize) & 0x01;
5293 val != 0
5294 }
5295 #[doc = "page privileged/unprivileged attribution"]
5296 #[inline(always)]
5297 pub fn set_priv2bb23(&mut self, val: bool) {
5298 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
5299 }
5300 #[doc = "page privileged/unprivileged attribution"]
5301 #[inline(always)]
5302 pub const fn priv2bb24(&self) -> bool {
5303 let val = (self.0 >> 24usize) & 0x01;
5304 val != 0
5305 }
5306 #[doc = "page privileged/unprivileged attribution"]
5307 #[inline(always)]
5308 pub fn set_priv2bb24(&mut self, val: bool) {
5309 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
5310 }
5311 #[doc = "page privileged/unprivileged attribution"]
5312 #[inline(always)]
5313 pub const fn priv2bb25(&self) -> bool {
5314 let val = (self.0 >> 25usize) & 0x01;
5315 val != 0
5316 }
5317 #[doc = "page privileged/unprivileged attribution"]
5318 #[inline(always)]
5319 pub fn set_priv2bb25(&mut self, val: bool) {
5320 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
5321 }
5322 #[doc = "page privileged/unprivileged attribution"]
5323 #[inline(always)]
5324 pub const fn priv2bb26(&self) -> bool {
5325 let val = (self.0 >> 26usize) & 0x01;
5326 val != 0
5327 }
5328 #[doc = "page privileged/unprivileged attribution"]
5329 #[inline(always)]
5330 pub fn set_priv2bb26(&mut self, val: bool) {
5331 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
5332 }
5333 #[doc = "page privileged/unprivileged attribution"]
5334 #[inline(always)]
5335 pub const fn priv2bb27(&self) -> bool {
5336 let val = (self.0 >> 27usize) & 0x01;
5337 val != 0
5338 }
5339 #[doc = "page privileged/unprivileged attribution"]
5340 #[inline(always)]
5341 pub fn set_priv2bb27(&mut self, val: bool) {
5342 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize);
5343 }
5344 #[doc = "page privileged/unprivileged attribution"]
5345 #[inline(always)]
5346 pub const fn priv2bb28(&self) -> bool {
5347 let val = (self.0 >> 28usize) & 0x01;
5348 val != 0
5349 }
5350 #[doc = "page privileged/unprivileged attribution"]
5351 #[inline(always)]
5352 pub fn set_priv2bb28(&mut self, val: bool) {
5353 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
5354 }
5355 #[doc = "page privileged/unprivileged attribution"]
5356 #[inline(always)]
5357 pub const fn priv2bb29(&self) -> bool {
5358 let val = (self.0 >> 29usize) & 0x01;
5359 val != 0
5360 }
5361 #[doc = "page privileged/unprivileged attribution"]
5362 #[inline(always)]
5363 pub fn set_priv2bb29(&mut self, val: bool) {
5364 self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize);
5365 }
5366 #[doc = "page privileged/unprivileged attribution"]
5367 #[inline(always)]
5368 pub const fn priv2bb30(&self) -> bool {
5369 let val = (self.0 >> 30usize) & 0x01;
5370 val != 0
5371 }
5372 #[doc = "page privileged/unprivileged attribution"]
5373 #[inline(always)]
5374 pub fn set_priv2bb30(&mut self, val: bool) {
5375 self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize);
5376 }
5377 #[doc = "page privileged/unprivileged attribution"]
5378 #[inline(always)]
5379 pub const fn priv2bb31(&self) -> bool {
5380 let val = (self.0 >> 31usize) & 0x01;
5381 val != 0
5382 }
5383 #[doc = "page privileged/unprivileged attribution"]
5384 #[inline(always)]
5385 pub fn set_priv2bb31(&mut self, val: bool) {
5386 self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize);
5387 }
5388 }
5389 impl Default for Priv2bbr4 {
5390 #[inline(always)]
5391 fn default() -> Priv2bbr4 {
5392 Priv2bbr4(0)
5393 }
5394 }
5395 impl core::fmt::Debug for Priv2bbr4 {
5396 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
5397 f.debug_struct("Priv2bbr4")
5398 .field("priv2bb0", &self.priv2bb0())
5399 .field("priv2bb1", &self.priv2bb1())
5400 .field("priv2bb2", &self.priv2bb2())
5401 .field("priv2bb3", &self.priv2bb3())
5402 .field("priv2bb4", &self.priv2bb4())
5403 .field("priv2bb5", &self.priv2bb5())
5404 .field("priv2bb6", &self.priv2bb6())
5405 .field("priv2bb7", &self.priv2bb7())
5406 .field("priv2bb8", &self.priv2bb8())
5407 .field("priv2bb9", &self.priv2bb9())
5408 .field("priv2bb10", &self.priv2bb10())
5409 .field("priv2bb11", &self.priv2bb11())
5410 .field("priv2bb12", &self.priv2bb12())
5411 .field("priv2bb13", &self.priv2bb13())
5412 .field("priv2bb14", &self.priv2bb14())
5413 .field("priv2bb15", &self.priv2bb15())
5414 .field("priv2bb16", &self.priv2bb16())
5415 .field("priv2bb17", &self.priv2bb17())
5416 .field("priv2bb18", &self.priv2bb18())
5417 .field("priv2bb19", &self.priv2bb19())
5418 .field("priv2bb20", &self.priv2bb20())
5419 .field("priv2bb21", &self.priv2bb21())
5420 .field("priv2bb22", &self.priv2bb22())
5421 .field("priv2bb23", &self.priv2bb23())
5422 .field("priv2bb24", &self.priv2bb24())
5423 .field("priv2bb25", &self.priv2bb25())
5424 .field("priv2bb26", &self.priv2bb26())
5425 .field("priv2bb27", &self.priv2bb27())
5426 .field("priv2bb28", &self.priv2bb28())
5427 .field("priv2bb29", &self.priv2bb29())
5428 .field("priv2bb30", &self.priv2bb30())
5429 .field("priv2bb31", &self.priv2bb31())
5430 .finish()
5431 }
5432 }
5433 #[cfg(feature = "defmt")]
5434 impl defmt::Format for Priv2bbr4 {
5435 fn format(&self, f: defmt::Formatter) {
5436 #[derive(defmt :: Format)]
5437 struct Priv2bbr4 {
5438 priv2bb0: bool,
5439 priv2bb1: bool,
5440 priv2bb2: bool,
5441 priv2bb3: bool,
5442 priv2bb4: bool,
5443 priv2bb5: bool,
5444 priv2bb6: bool,
5445 priv2bb7: bool,
5446 priv2bb8: bool,
5447 priv2bb9: bool,
5448 priv2bb10: bool,
5449 priv2bb11: bool,
5450 priv2bb12: bool,
5451 priv2bb13: bool,
5452 priv2bb14: bool,
5453 priv2bb15: bool,
5454 priv2bb16: bool,
5455 priv2bb17: bool,
5456 priv2bb18: bool,
5457 priv2bb19: bool,
5458 priv2bb20: bool,
5459 priv2bb21: bool,
5460 priv2bb22: bool,
5461 priv2bb23: bool,
5462 priv2bb24: bool,
5463 priv2bb25: bool,
5464 priv2bb26: bool,
5465 priv2bb27: bool,
5466 priv2bb28: bool,
5467 priv2bb29: bool,
5468 priv2bb30: bool,
5469 priv2bb31: bool,
5470 }
5471 let proxy = Priv2bbr4 {
5472 priv2bb0: self.priv2bb0(),
5473 priv2bb1: self.priv2bb1(),
5474 priv2bb2: self.priv2bb2(),
5475 priv2bb3: self.priv2bb3(),
5476 priv2bb4: self.priv2bb4(),
5477 priv2bb5: self.priv2bb5(),
5478 priv2bb6: self.priv2bb6(),
5479 priv2bb7: self.priv2bb7(),
5480 priv2bb8: self.priv2bb8(),
5481 priv2bb9: self.priv2bb9(),
5482 priv2bb10: self.priv2bb10(),
5483 priv2bb11: self.priv2bb11(),
5484 priv2bb12: self.priv2bb12(),
5485 priv2bb13: self.priv2bb13(),
5486 priv2bb14: self.priv2bb14(),
5487 priv2bb15: self.priv2bb15(),
5488 priv2bb16: self.priv2bb16(),
5489 priv2bb17: self.priv2bb17(),
5490 priv2bb18: self.priv2bb18(),
5491 priv2bb19: self.priv2bb19(),
5492 priv2bb20: self.priv2bb20(),
5493 priv2bb21: self.priv2bb21(),
5494 priv2bb22: self.priv2bb22(),
5495 priv2bb23: self.priv2bb23(),
5496 priv2bb24: self.priv2bb24(),
5497 priv2bb25: self.priv2bb25(),
5498 priv2bb26: self.priv2bb26(),
5499 priv2bb27: self.priv2bb27(),
5500 priv2bb28: self.priv2bb28(),
5501 priv2bb29: self.priv2bb29(),
5502 priv2bb30: self.priv2bb30(),
5503 priv2bb31: self.priv2bb31(),
5504 };
5505 defmt::write!(f, "{}", proxy)
5506 }
5507 }
5508 #[doc = "FLASH privilege configuration register"]
5509 #[repr(transparent)]
5510 #[derive(Copy, Clone, Eq, PartialEq)]
5511 pub struct Privcfgr(pub u32);
5512 impl Privcfgr {
5513 #[doc = "Privileged protection for secure registers This bit can be accessed only when TrustZone is enabled (TZEN = 1). This bit can be read by both privileged or unprivileged, secure and non-secure access. The SPRIV bit can be written only by a secure privileged access. A non-secure write access on SPRIV bit is ignored. A secure unprivileged write access on SPRIV bit is ignored."]
5514 #[inline(always)]
5515 pub const fn spriv(&self) -> super::vals::Spriv {
5516 let val = (self.0 >> 0usize) & 0x01;
5517 super::vals::Spriv::from_bits(val as u8)
5518 }
5519 #[doc = "Privileged protection for secure registers This bit can be accessed only when TrustZone is enabled (TZEN = 1). This bit can be read by both privileged or unprivileged, secure and non-secure access. The SPRIV bit can be written only by a secure privileged access. A non-secure write access on SPRIV bit is ignored. A secure unprivileged write access on SPRIV bit is ignored."]
5520 #[inline(always)]
5521 pub fn set_spriv(&mut self, val: super::vals::Spriv) {
5522 self.0 = (self.0 & !(0x01 << 0usize)) | (((val.to_bits() as u32) & 0x01) << 0usize);
5523 }
5524 #[doc = "Privileged protection for non-secure registers This bit can be read by both privileged or unprivileged, secure and non-secure access. The NSPRIV bit can be written by a secure or non-secure privileged access. A secure or non-secure unprivileged write access on NSPRIV bit is ignored."]
5525 #[inline(always)]
5526 pub const fn nspriv(&self) -> super::vals::Nspriv {
5527 let val = (self.0 >> 1usize) & 0x01;
5528 super::vals::Nspriv::from_bits(val as u8)
5529 }
5530 #[doc = "Privileged protection for non-secure registers This bit can be read by both privileged or unprivileged, secure and non-secure access. The NSPRIV bit can be written by a secure or non-secure privileged access. A secure or non-secure unprivileged write access on NSPRIV bit is ignored."]
5531 #[inline(always)]
5532 pub fn set_nspriv(&mut self, val: super::vals::Nspriv) {
5533 self.0 = (self.0 & !(0x01 << 1usize)) | (((val.to_bits() as u32) & 0x01) << 1usize);
5534 }
5535 }
5536 impl Default for Privcfgr {
5537 #[inline(always)]
5538 fn default() -> Privcfgr {
5539 Privcfgr(0)
5540 }
5541 }
5542 impl core::fmt::Debug for Privcfgr {
5543 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
5544 f.debug_struct("Privcfgr")
5545 .field("spriv", &self.spriv())
5546 .field("nspriv", &self.nspriv())
5547 .finish()
5548 }
5549 }
5550 #[cfg(feature = "defmt")]
5551 impl defmt::Format for Privcfgr {
5552 fn format(&self, f: defmt::Formatter) {
5553 #[derive(defmt :: Format)]
5554 struct Privcfgr {
5555 spriv: super::vals::Spriv,
5556 nspriv: super::vals::Nspriv,
5557 }
5558 let proxy = Privcfgr {
5559 spriv: self.spriv(),
5560 nspriv: self.nspriv(),
5561 };
5562 defmt::write!(f, "{}", proxy)
5563 }
5564 }
5565 #[doc = "FLASH secure block based bank 1 register 1"]
5566 #[repr(transparent)]
5567 #[derive(Copy, Clone, Eq, PartialEq)]
5568 pub struct Sec1bbr1(pub u32);
5569 impl Sec1bbr1 {
5570 #[doc = "page secure/non-secure attribution"]
5571 #[inline(always)]
5572 pub const fn sec1bb0(&self) -> bool {
5573 let val = (self.0 >> 0usize) & 0x01;
5574 val != 0
5575 }
5576 #[doc = "page secure/non-secure attribution"]
5577 #[inline(always)]
5578 pub fn set_sec1bb0(&mut self, val: bool) {
5579 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
5580 }
5581 #[doc = "page secure/non-secure attribution"]
5582 #[inline(always)]
5583 pub const fn sec1bb1(&self) -> bool {
5584 let val = (self.0 >> 1usize) & 0x01;
5585 val != 0
5586 }
5587 #[doc = "page secure/non-secure attribution"]
5588 #[inline(always)]
5589 pub fn set_sec1bb1(&mut self, val: bool) {
5590 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
5591 }
5592 #[doc = "page secure/non-secure attribution"]
5593 #[inline(always)]
5594 pub const fn sec1bb2(&self) -> bool {
5595 let val = (self.0 >> 2usize) & 0x01;
5596 val != 0
5597 }
5598 #[doc = "page secure/non-secure attribution"]
5599 #[inline(always)]
5600 pub fn set_sec1bb2(&mut self, val: bool) {
5601 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
5602 }
5603 #[doc = "page secure/non-secure attribution"]
5604 #[inline(always)]
5605 pub const fn sec1bb3(&self) -> bool {
5606 let val = (self.0 >> 3usize) & 0x01;
5607 val != 0
5608 }
5609 #[doc = "page secure/non-secure attribution"]
5610 #[inline(always)]
5611 pub fn set_sec1bb3(&mut self, val: bool) {
5612 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
5613 }
5614 #[doc = "page secure/non-secure attribution"]
5615 #[inline(always)]
5616 pub const fn sec1bb4(&self) -> bool {
5617 let val = (self.0 >> 4usize) & 0x01;
5618 val != 0
5619 }
5620 #[doc = "page secure/non-secure attribution"]
5621 #[inline(always)]
5622 pub fn set_sec1bb4(&mut self, val: bool) {
5623 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
5624 }
5625 #[doc = "page secure/non-secure attribution"]
5626 #[inline(always)]
5627 pub const fn sec1bb5(&self) -> bool {
5628 let val = (self.0 >> 5usize) & 0x01;
5629 val != 0
5630 }
5631 #[doc = "page secure/non-secure attribution"]
5632 #[inline(always)]
5633 pub fn set_sec1bb5(&mut self, val: bool) {
5634 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
5635 }
5636 #[doc = "page secure/non-secure attribution"]
5637 #[inline(always)]
5638 pub const fn sec1bb6(&self) -> bool {
5639 let val = (self.0 >> 6usize) & 0x01;
5640 val != 0
5641 }
5642 #[doc = "page secure/non-secure attribution"]
5643 #[inline(always)]
5644 pub fn set_sec1bb6(&mut self, val: bool) {
5645 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
5646 }
5647 #[doc = "page secure/non-secure attribution"]
5648 #[inline(always)]
5649 pub const fn sec1bb7(&self) -> bool {
5650 let val = (self.0 >> 7usize) & 0x01;
5651 val != 0
5652 }
5653 #[doc = "page secure/non-secure attribution"]
5654 #[inline(always)]
5655 pub fn set_sec1bb7(&mut self, val: bool) {
5656 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
5657 }
5658 #[doc = "page secure/non-secure attribution"]
5659 #[inline(always)]
5660 pub const fn sec1bb8(&self) -> bool {
5661 let val = (self.0 >> 8usize) & 0x01;
5662 val != 0
5663 }
5664 #[doc = "page secure/non-secure attribution"]
5665 #[inline(always)]
5666 pub fn set_sec1bb8(&mut self, val: bool) {
5667 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
5668 }
5669 #[doc = "page secure/non-secure attribution"]
5670 #[inline(always)]
5671 pub const fn sec1bb9(&self) -> bool {
5672 let val = (self.0 >> 9usize) & 0x01;
5673 val != 0
5674 }
5675 #[doc = "page secure/non-secure attribution"]
5676 #[inline(always)]
5677 pub fn set_sec1bb9(&mut self, val: bool) {
5678 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
5679 }
5680 #[doc = "page secure/non-secure attribution"]
5681 #[inline(always)]
5682 pub const fn sec1bb10(&self) -> bool {
5683 let val = (self.0 >> 10usize) & 0x01;
5684 val != 0
5685 }
5686 #[doc = "page secure/non-secure attribution"]
5687 #[inline(always)]
5688 pub fn set_sec1bb10(&mut self, val: bool) {
5689 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
5690 }
5691 #[doc = "page secure/non-secure attribution"]
5692 #[inline(always)]
5693 pub const fn sec1bb11(&self) -> bool {
5694 let val = (self.0 >> 11usize) & 0x01;
5695 val != 0
5696 }
5697 #[doc = "page secure/non-secure attribution"]
5698 #[inline(always)]
5699 pub fn set_sec1bb11(&mut self, val: bool) {
5700 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
5701 }
5702 #[doc = "page secure/non-secure attribution"]
5703 #[inline(always)]
5704 pub const fn sec1bb12(&self) -> bool {
5705 let val = (self.0 >> 12usize) & 0x01;
5706 val != 0
5707 }
5708 #[doc = "page secure/non-secure attribution"]
5709 #[inline(always)]
5710 pub fn set_sec1bb12(&mut self, val: bool) {
5711 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
5712 }
5713 #[doc = "page secure/non-secure attribution"]
5714 #[inline(always)]
5715 pub const fn sec1bb13(&self) -> bool {
5716 let val = (self.0 >> 13usize) & 0x01;
5717 val != 0
5718 }
5719 #[doc = "page secure/non-secure attribution"]
5720 #[inline(always)]
5721 pub fn set_sec1bb13(&mut self, val: bool) {
5722 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
5723 }
5724 #[doc = "page secure/non-secure attribution"]
5725 #[inline(always)]
5726 pub const fn sec1bb14(&self) -> bool {
5727 let val = (self.0 >> 14usize) & 0x01;
5728 val != 0
5729 }
5730 #[doc = "page secure/non-secure attribution"]
5731 #[inline(always)]
5732 pub fn set_sec1bb14(&mut self, val: bool) {
5733 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
5734 }
5735 #[doc = "page secure/non-secure attribution"]
5736 #[inline(always)]
5737 pub const fn sec1bb15(&self) -> bool {
5738 let val = (self.0 >> 15usize) & 0x01;
5739 val != 0
5740 }
5741 #[doc = "page secure/non-secure attribution"]
5742 #[inline(always)]
5743 pub fn set_sec1bb15(&mut self, val: bool) {
5744 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
5745 }
5746 #[doc = "page secure/non-secure attribution"]
5747 #[inline(always)]
5748 pub const fn sec1bb16(&self) -> bool {
5749 let val = (self.0 >> 16usize) & 0x01;
5750 val != 0
5751 }
5752 #[doc = "page secure/non-secure attribution"]
5753 #[inline(always)]
5754 pub fn set_sec1bb16(&mut self, val: bool) {
5755 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
5756 }
5757 #[doc = "page secure/non-secure attribution"]
5758 #[inline(always)]
5759 pub const fn sec1bb17(&self) -> bool {
5760 let val = (self.0 >> 17usize) & 0x01;
5761 val != 0
5762 }
5763 #[doc = "page secure/non-secure attribution"]
5764 #[inline(always)]
5765 pub fn set_sec1bb17(&mut self, val: bool) {
5766 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
5767 }
5768 #[doc = "page secure/non-secure attribution"]
5769 #[inline(always)]
5770 pub const fn sec1bb18(&self) -> bool {
5771 let val = (self.0 >> 18usize) & 0x01;
5772 val != 0
5773 }
5774 #[doc = "page secure/non-secure attribution"]
5775 #[inline(always)]
5776 pub fn set_sec1bb18(&mut self, val: bool) {
5777 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
5778 }
5779 #[doc = "page secure/non-secure attribution"]
5780 #[inline(always)]
5781 pub const fn sec1bb19(&self) -> bool {
5782 let val = (self.0 >> 19usize) & 0x01;
5783 val != 0
5784 }
5785 #[doc = "page secure/non-secure attribution"]
5786 #[inline(always)]
5787 pub fn set_sec1bb19(&mut self, val: bool) {
5788 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
5789 }
5790 #[doc = "page secure/non-secure attribution"]
5791 #[inline(always)]
5792 pub const fn sec1bb20(&self) -> bool {
5793 let val = (self.0 >> 20usize) & 0x01;
5794 val != 0
5795 }
5796 #[doc = "page secure/non-secure attribution"]
5797 #[inline(always)]
5798 pub fn set_sec1bb20(&mut self, val: bool) {
5799 self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize);
5800 }
5801 #[doc = "page secure/non-secure attribution"]
5802 #[inline(always)]
5803 pub const fn sec1bb21(&self) -> bool {
5804 let val = (self.0 >> 21usize) & 0x01;
5805 val != 0
5806 }
5807 #[doc = "page secure/non-secure attribution"]
5808 #[inline(always)]
5809 pub fn set_sec1bb21(&mut self, val: bool) {
5810 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
5811 }
5812 #[doc = "page secure/non-secure attribution"]
5813 #[inline(always)]
5814 pub const fn sec1bb22(&self) -> bool {
5815 let val = (self.0 >> 22usize) & 0x01;
5816 val != 0
5817 }
5818 #[doc = "page secure/non-secure attribution"]
5819 #[inline(always)]
5820 pub fn set_sec1bb22(&mut self, val: bool) {
5821 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
5822 }
5823 #[doc = "page secure/non-secure attribution"]
5824 #[inline(always)]
5825 pub const fn sec1bb23(&self) -> bool {
5826 let val = (self.0 >> 23usize) & 0x01;
5827 val != 0
5828 }
5829 #[doc = "page secure/non-secure attribution"]
5830 #[inline(always)]
5831 pub fn set_sec1bb23(&mut self, val: bool) {
5832 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
5833 }
5834 #[doc = "page secure/non-secure attribution"]
5835 #[inline(always)]
5836 pub const fn sec1bb24(&self) -> bool {
5837 let val = (self.0 >> 24usize) & 0x01;
5838 val != 0
5839 }
5840 #[doc = "page secure/non-secure attribution"]
5841 #[inline(always)]
5842 pub fn set_sec1bb24(&mut self, val: bool) {
5843 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
5844 }
5845 #[doc = "page secure/non-secure attribution"]
5846 #[inline(always)]
5847 pub const fn sec1bb25(&self) -> bool {
5848 let val = (self.0 >> 25usize) & 0x01;
5849 val != 0
5850 }
5851 #[doc = "page secure/non-secure attribution"]
5852 #[inline(always)]
5853 pub fn set_sec1bb25(&mut self, val: bool) {
5854 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
5855 }
5856 #[doc = "page secure/non-secure attribution"]
5857 #[inline(always)]
5858 pub const fn sec1bb26(&self) -> bool {
5859 let val = (self.0 >> 26usize) & 0x01;
5860 val != 0
5861 }
5862 #[doc = "page secure/non-secure attribution"]
5863 #[inline(always)]
5864 pub fn set_sec1bb26(&mut self, val: bool) {
5865 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
5866 }
5867 #[doc = "page secure/non-secure attribution"]
5868 #[inline(always)]
5869 pub const fn sec1bb27(&self) -> bool {
5870 let val = (self.0 >> 27usize) & 0x01;
5871 val != 0
5872 }
5873 #[doc = "page secure/non-secure attribution"]
5874 #[inline(always)]
5875 pub fn set_sec1bb27(&mut self, val: bool) {
5876 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize);
5877 }
5878 #[doc = "page secure/non-secure attribution"]
5879 #[inline(always)]
5880 pub const fn sec1bb28(&self) -> bool {
5881 let val = (self.0 >> 28usize) & 0x01;
5882 val != 0
5883 }
5884 #[doc = "page secure/non-secure attribution"]
5885 #[inline(always)]
5886 pub fn set_sec1bb28(&mut self, val: bool) {
5887 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
5888 }
5889 #[doc = "page secure/non-secure attribution"]
5890 #[inline(always)]
5891 pub const fn sec1bb29(&self) -> bool {
5892 let val = (self.0 >> 29usize) & 0x01;
5893 val != 0
5894 }
5895 #[doc = "page secure/non-secure attribution"]
5896 #[inline(always)]
5897 pub fn set_sec1bb29(&mut self, val: bool) {
5898 self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize);
5899 }
5900 #[doc = "page secure/non-secure attribution"]
5901 #[inline(always)]
5902 pub const fn sec1bb30(&self) -> bool {
5903 let val = (self.0 >> 30usize) & 0x01;
5904 val != 0
5905 }
5906 #[doc = "page secure/non-secure attribution"]
5907 #[inline(always)]
5908 pub fn set_sec1bb30(&mut self, val: bool) {
5909 self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize);
5910 }
5911 #[doc = "page secure/non-secure attribution"]
5912 #[inline(always)]
5913 pub const fn sec1bb31(&self) -> bool {
5914 let val = (self.0 >> 31usize) & 0x01;
5915 val != 0
5916 }
5917 #[doc = "page secure/non-secure attribution"]
5918 #[inline(always)]
5919 pub fn set_sec1bb31(&mut self, val: bool) {
5920 self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize);
5921 }
5922 }
5923 impl Default for Sec1bbr1 {
5924 #[inline(always)]
5925 fn default() -> Sec1bbr1 {
5926 Sec1bbr1(0)
5927 }
5928 }
5929 impl core::fmt::Debug for Sec1bbr1 {
5930 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
5931 f.debug_struct("Sec1bbr1")
5932 .field("sec1bb0", &self.sec1bb0())
5933 .field("sec1bb1", &self.sec1bb1())
5934 .field("sec1bb2", &self.sec1bb2())
5935 .field("sec1bb3", &self.sec1bb3())
5936 .field("sec1bb4", &self.sec1bb4())
5937 .field("sec1bb5", &self.sec1bb5())
5938 .field("sec1bb6", &self.sec1bb6())
5939 .field("sec1bb7", &self.sec1bb7())
5940 .field("sec1bb8", &self.sec1bb8())
5941 .field("sec1bb9", &self.sec1bb9())
5942 .field("sec1bb10", &self.sec1bb10())
5943 .field("sec1bb11", &self.sec1bb11())
5944 .field("sec1bb12", &self.sec1bb12())
5945 .field("sec1bb13", &self.sec1bb13())
5946 .field("sec1bb14", &self.sec1bb14())
5947 .field("sec1bb15", &self.sec1bb15())
5948 .field("sec1bb16", &self.sec1bb16())
5949 .field("sec1bb17", &self.sec1bb17())
5950 .field("sec1bb18", &self.sec1bb18())
5951 .field("sec1bb19", &self.sec1bb19())
5952 .field("sec1bb20", &self.sec1bb20())
5953 .field("sec1bb21", &self.sec1bb21())
5954 .field("sec1bb22", &self.sec1bb22())
5955 .field("sec1bb23", &self.sec1bb23())
5956 .field("sec1bb24", &self.sec1bb24())
5957 .field("sec1bb25", &self.sec1bb25())
5958 .field("sec1bb26", &self.sec1bb26())
5959 .field("sec1bb27", &self.sec1bb27())
5960 .field("sec1bb28", &self.sec1bb28())
5961 .field("sec1bb29", &self.sec1bb29())
5962 .field("sec1bb30", &self.sec1bb30())
5963 .field("sec1bb31", &self.sec1bb31())
5964 .finish()
5965 }
5966 }
5967 #[cfg(feature = "defmt")]
5968 impl defmt::Format for Sec1bbr1 {
5969 fn format(&self, f: defmt::Formatter) {
5970 #[derive(defmt :: Format)]
5971 struct Sec1bbr1 {
5972 sec1bb0: bool,
5973 sec1bb1: bool,
5974 sec1bb2: bool,
5975 sec1bb3: bool,
5976 sec1bb4: bool,
5977 sec1bb5: bool,
5978 sec1bb6: bool,
5979 sec1bb7: bool,
5980 sec1bb8: bool,
5981 sec1bb9: bool,
5982 sec1bb10: bool,
5983 sec1bb11: bool,
5984 sec1bb12: bool,
5985 sec1bb13: bool,
5986 sec1bb14: bool,
5987 sec1bb15: bool,
5988 sec1bb16: bool,
5989 sec1bb17: bool,
5990 sec1bb18: bool,
5991 sec1bb19: bool,
5992 sec1bb20: bool,
5993 sec1bb21: bool,
5994 sec1bb22: bool,
5995 sec1bb23: bool,
5996 sec1bb24: bool,
5997 sec1bb25: bool,
5998 sec1bb26: bool,
5999 sec1bb27: bool,
6000 sec1bb28: bool,
6001 sec1bb29: bool,
6002 sec1bb30: bool,
6003 sec1bb31: bool,
6004 }
6005 let proxy = Sec1bbr1 {
6006 sec1bb0: self.sec1bb0(),
6007 sec1bb1: self.sec1bb1(),
6008 sec1bb2: self.sec1bb2(),
6009 sec1bb3: self.sec1bb3(),
6010 sec1bb4: self.sec1bb4(),
6011 sec1bb5: self.sec1bb5(),
6012 sec1bb6: self.sec1bb6(),
6013 sec1bb7: self.sec1bb7(),
6014 sec1bb8: self.sec1bb8(),
6015 sec1bb9: self.sec1bb9(),
6016 sec1bb10: self.sec1bb10(),
6017 sec1bb11: self.sec1bb11(),
6018 sec1bb12: self.sec1bb12(),
6019 sec1bb13: self.sec1bb13(),
6020 sec1bb14: self.sec1bb14(),
6021 sec1bb15: self.sec1bb15(),
6022 sec1bb16: self.sec1bb16(),
6023 sec1bb17: self.sec1bb17(),
6024 sec1bb18: self.sec1bb18(),
6025 sec1bb19: self.sec1bb19(),
6026 sec1bb20: self.sec1bb20(),
6027 sec1bb21: self.sec1bb21(),
6028 sec1bb22: self.sec1bb22(),
6029 sec1bb23: self.sec1bb23(),
6030 sec1bb24: self.sec1bb24(),
6031 sec1bb25: self.sec1bb25(),
6032 sec1bb26: self.sec1bb26(),
6033 sec1bb27: self.sec1bb27(),
6034 sec1bb28: self.sec1bb28(),
6035 sec1bb29: self.sec1bb29(),
6036 sec1bb30: self.sec1bb30(),
6037 sec1bb31: self.sec1bb31(),
6038 };
6039 defmt::write!(f, "{}", proxy)
6040 }
6041 }
6042 #[doc = "FLASH secure block based bank 1 register 2"]
6043 #[repr(transparent)]
6044 #[derive(Copy, Clone, Eq, PartialEq)]
6045 pub struct Sec1bbr2(pub u32);
6046 impl Sec1bbr2 {
6047 #[doc = "page secure/non-secure attribution"]
6048 #[inline(always)]
6049 pub const fn sec1bb0(&self) -> bool {
6050 let val = (self.0 >> 0usize) & 0x01;
6051 val != 0
6052 }
6053 #[doc = "page secure/non-secure attribution"]
6054 #[inline(always)]
6055 pub fn set_sec1bb0(&mut self, val: bool) {
6056 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
6057 }
6058 #[doc = "page secure/non-secure attribution"]
6059 #[inline(always)]
6060 pub const fn sec1bb1(&self) -> bool {
6061 let val = (self.0 >> 1usize) & 0x01;
6062 val != 0
6063 }
6064 #[doc = "page secure/non-secure attribution"]
6065 #[inline(always)]
6066 pub fn set_sec1bb1(&mut self, val: bool) {
6067 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
6068 }
6069 #[doc = "page secure/non-secure attribution"]
6070 #[inline(always)]
6071 pub const fn sec1bb2(&self) -> bool {
6072 let val = (self.0 >> 2usize) & 0x01;
6073 val != 0
6074 }
6075 #[doc = "page secure/non-secure attribution"]
6076 #[inline(always)]
6077 pub fn set_sec1bb2(&mut self, val: bool) {
6078 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
6079 }
6080 #[doc = "page secure/non-secure attribution"]
6081 #[inline(always)]
6082 pub const fn sec1bb3(&self) -> bool {
6083 let val = (self.0 >> 3usize) & 0x01;
6084 val != 0
6085 }
6086 #[doc = "page secure/non-secure attribution"]
6087 #[inline(always)]
6088 pub fn set_sec1bb3(&mut self, val: bool) {
6089 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
6090 }
6091 #[doc = "page secure/non-secure attribution"]
6092 #[inline(always)]
6093 pub const fn sec1bb4(&self) -> bool {
6094 let val = (self.0 >> 4usize) & 0x01;
6095 val != 0
6096 }
6097 #[doc = "page secure/non-secure attribution"]
6098 #[inline(always)]
6099 pub fn set_sec1bb4(&mut self, val: bool) {
6100 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
6101 }
6102 #[doc = "page secure/non-secure attribution"]
6103 #[inline(always)]
6104 pub const fn sec1bb5(&self) -> bool {
6105 let val = (self.0 >> 5usize) & 0x01;
6106 val != 0
6107 }
6108 #[doc = "page secure/non-secure attribution"]
6109 #[inline(always)]
6110 pub fn set_sec1bb5(&mut self, val: bool) {
6111 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
6112 }
6113 #[doc = "page secure/non-secure attribution"]
6114 #[inline(always)]
6115 pub const fn sec1bb6(&self) -> bool {
6116 let val = (self.0 >> 6usize) & 0x01;
6117 val != 0
6118 }
6119 #[doc = "page secure/non-secure attribution"]
6120 #[inline(always)]
6121 pub fn set_sec1bb6(&mut self, val: bool) {
6122 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
6123 }
6124 #[doc = "page secure/non-secure attribution"]
6125 #[inline(always)]
6126 pub const fn sec1bb7(&self) -> bool {
6127 let val = (self.0 >> 7usize) & 0x01;
6128 val != 0
6129 }
6130 #[doc = "page secure/non-secure attribution"]
6131 #[inline(always)]
6132 pub fn set_sec1bb7(&mut self, val: bool) {
6133 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
6134 }
6135 #[doc = "page secure/non-secure attribution"]
6136 #[inline(always)]
6137 pub const fn sec1bb8(&self) -> bool {
6138 let val = (self.0 >> 8usize) & 0x01;
6139 val != 0
6140 }
6141 #[doc = "page secure/non-secure attribution"]
6142 #[inline(always)]
6143 pub fn set_sec1bb8(&mut self, val: bool) {
6144 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
6145 }
6146 #[doc = "page secure/non-secure attribution"]
6147 #[inline(always)]
6148 pub const fn sec1bb9(&self) -> bool {
6149 let val = (self.0 >> 9usize) & 0x01;
6150 val != 0
6151 }
6152 #[doc = "page secure/non-secure attribution"]
6153 #[inline(always)]
6154 pub fn set_sec1bb9(&mut self, val: bool) {
6155 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
6156 }
6157 #[doc = "page secure/non-secure attribution"]
6158 #[inline(always)]
6159 pub const fn sec1bb10(&self) -> bool {
6160 let val = (self.0 >> 10usize) & 0x01;
6161 val != 0
6162 }
6163 #[doc = "page secure/non-secure attribution"]
6164 #[inline(always)]
6165 pub fn set_sec1bb10(&mut self, val: bool) {
6166 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
6167 }
6168 #[doc = "page secure/non-secure attribution"]
6169 #[inline(always)]
6170 pub const fn sec1bb11(&self) -> bool {
6171 let val = (self.0 >> 11usize) & 0x01;
6172 val != 0
6173 }
6174 #[doc = "page secure/non-secure attribution"]
6175 #[inline(always)]
6176 pub fn set_sec1bb11(&mut self, val: bool) {
6177 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
6178 }
6179 #[doc = "page secure/non-secure attribution"]
6180 #[inline(always)]
6181 pub const fn sec1bb12(&self) -> bool {
6182 let val = (self.0 >> 12usize) & 0x01;
6183 val != 0
6184 }
6185 #[doc = "page secure/non-secure attribution"]
6186 #[inline(always)]
6187 pub fn set_sec1bb12(&mut self, val: bool) {
6188 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
6189 }
6190 #[doc = "page secure/non-secure attribution"]
6191 #[inline(always)]
6192 pub const fn sec1bb13(&self) -> bool {
6193 let val = (self.0 >> 13usize) & 0x01;
6194 val != 0
6195 }
6196 #[doc = "page secure/non-secure attribution"]
6197 #[inline(always)]
6198 pub fn set_sec1bb13(&mut self, val: bool) {
6199 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
6200 }
6201 #[doc = "page secure/non-secure attribution"]
6202 #[inline(always)]
6203 pub const fn sec1bb14(&self) -> bool {
6204 let val = (self.0 >> 14usize) & 0x01;
6205 val != 0
6206 }
6207 #[doc = "page secure/non-secure attribution"]
6208 #[inline(always)]
6209 pub fn set_sec1bb14(&mut self, val: bool) {
6210 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
6211 }
6212 #[doc = "page secure/non-secure attribution"]
6213 #[inline(always)]
6214 pub const fn sec1bb15(&self) -> bool {
6215 let val = (self.0 >> 15usize) & 0x01;
6216 val != 0
6217 }
6218 #[doc = "page secure/non-secure attribution"]
6219 #[inline(always)]
6220 pub fn set_sec1bb15(&mut self, val: bool) {
6221 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
6222 }
6223 #[doc = "page secure/non-secure attribution"]
6224 #[inline(always)]
6225 pub const fn sec1bb16(&self) -> bool {
6226 let val = (self.0 >> 16usize) & 0x01;
6227 val != 0
6228 }
6229 #[doc = "page secure/non-secure attribution"]
6230 #[inline(always)]
6231 pub fn set_sec1bb16(&mut self, val: bool) {
6232 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
6233 }
6234 #[doc = "page secure/non-secure attribution"]
6235 #[inline(always)]
6236 pub const fn sec1bb17(&self) -> bool {
6237 let val = (self.0 >> 17usize) & 0x01;
6238 val != 0
6239 }
6240 #[doc = "page secure/non-secure attribution"]
6241 #[inline(always)]
6242 pub fn set_sec1bb17(&mut self, val: bool) {
6243 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
6244 }
6245 #[doc = "page secure/non-secure attribution"]
6246 #[inline(always)]
6247 pub const fn sec1bb18(&self) -> bool {
6248 let val = (self.0 >> 18usize) & 0x01;
6249 val != 0
6250 }
6251 #[doc = "page secure/non-secure attribution"]
6252 #[inline(always)]
6253 pub fn set_sec1bb18(&mut self, val: bool) {
6254 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
6255 }
6256 #[doc = "page secure/non-secure attribution"]
6257 #[inline(always)]
6258 pub const fn sec1bb19(&self) -> bool {
6259 let val = (self.0 >> 19usize) & 0x01;
6260 val != 0
6261 }
6262 #[doc = "page secure/non-secure attribution"]
6263 #[inline(always)]
6264 pub fn set_sec1bb19(&mut self, val: bool) {
6265 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
6266 }
6267 #[doc = "page secure/non-secure attribution"]
6268 #[inline(always)]
6269 pub const fn sec1bb20(&self) -> bool {
6270 let val = (self.0 >> 20usize) & 0x01;
6271 val != 0
6272 }
6273 #[doc = "page secure/non-secure attribution"]
6274 #[inline(always)]
6275 pub fn set_sec1bb20(&mut self, val: bool) {
6276 self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize);
6277 }
6278 #[doc = "page secure/non-secure attribution"]
6279 #[inline(always)]
6280 pub const fn sec1bb21(&self) -> bool {
6281 let val = (self.0 >> 21usize) & 0x01;
6282 val != 0
6283 }
6284 #[doc = "page secure/non-secure attribution"]
6285 #[inline(always)]
6286 pub fn set_sec1bb21(&mut self, val: bool) {
6287 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
6288 }
6289 #[doc = "page secure/non-secure attribution"]
6290 #[inline(always)]
6291 pub const fn sec1bb22(&self) -> bool {
6292 let val = (self.0 >> 22usize) & 0x01;
6293 val != 0
6294 }
6295 #[doc = "page secure/non-secure attribution"]
6296 #[inline(always)]
6297 pub fn set_sec1bb22(&mut self, val: bool) {
6298 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
6299 }
6300 #[doc = "page secure/non-secure attribution"]
6301 #[inline(always)]
6302 pub const fn sec1bb23(&self) -> bool {
6303 let val = (self.0 >> 23usize) & 0x01;
6304 val != 0
6305 }
6306 #[doc = "page secure/non-secure attribution"]
6307 #[inline(always)]
6308 pub fn set_sec1bb23(&mut self, val: bool) {
6309 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
6310 }
6311 #[doc = "page secure/non-secure attribution"]
6312 #[inline(always)]
6313 pub const fn sec1bb24(&self) -> bool {
6314 let val = (self.0 >> 24usize) & 0x01;
6315 val != 0
6316 }
6317 #[doc = "page secure/non-secure attribution"]
6318 #[inline(always)]
6319 pub fn set_sec1bb24(&mut self, val: bool) {
6320 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
6321 }
6322 #[doc = "page secure/non-secure attribution"]
6323 #[inline(always)]
6324 pub const fn sec1bb25(&self) -> bool {
6325 let val = (self.0 >> 25usize) & 0x01;
6326 val != 0
6327 }
6328 #[doc = "page secure/non-secure attribution"]
6329 #[inline(always)]
6330 pub fn set_sec1bb25(&mut self, val: bool) {
6331 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
6332 }
6333 #[doc = "page secure/non-secure attribution"]
6334 #[inline(always)]
6335 pub const fn sec1bb26(&self) -> bool {
6336 let val = (self.0 >> 26usize) & 0x01;
6337 val != 0
6338 }
6339 #[doc = "page secure/non-secure attribution"]
6340 #[inline(always)]
6341 pub fn set_sec1bb26(&mut self, val: bool) {
6342 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
6343 }
6344 #[doc = "page secure/non-secure attribution"]
6345 #[inline(always)]
6346 pub const fn sec1bb27(&self) -> bool {
6347 let val = (self.0 >> 27usize) & 0x01;
6348 val != 0
6349 }
6350 #[doc = "page secure/non-secure attribution"]
6351 #[inline(always)]
6352 pub fn set_sec1bb27(&mut self, val: bool) {
6353 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize);
6354 }
6355 #[doc = "page secure/non-secure attribution"]
6356 #[inline(always)]
6357 pub const fn sec1bb28(&self) -> bool {
6358 let val = (self.0 >> 28usize) & 0x01;
6359 val != 0
6360 }
6361 #[doc = "page secure/non-secure attribution"]
6362 #[inline(always)]
6363 pub fn set_sec1bb28(&mut self, val: bool) {
6364 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
6365 }
6366 #[doc = "page secure/non-secure attribution"]
6367 #[inline(always)]
6368 pub const fn sec1bb29(&self) -> bool {
6369 let val = (self.0 >> 29usize) & 0x01;
6370 val != 0
6371 }
6372 #[doc = "page secure/non-secure attribution"]
6373 #[inline(always)]
6374 pub fn set_sec1bb29(&mut self, val: bool) {
6375 self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize);
6376 }
6377 #[doc = "page secure/non-secure attribution"]
6378 #[inline(always)]
6379 pub const fn sec1bb30(&self) -> bool {
6380 let val = (self.0 >> 30usize) & 0x01;
6381 val != 0
6382 }
6383 #[doc = "page secure/non-secure attribution"]
6384 #[inline(always)]
6385 pub fn set_sec1bb30(&mut self, val: bool) {
6386 self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize);
6387 }
6388 #[doc = "page secure/non-secure attribution"]
6389 #[inline(always)]
6390 pub const fn sec1bb31(&self) -> bool {
6391 let val = (self.0 >> 31usize) & 0x01;
6392 val != 0
6393 }
6394 #[doc = "page secure/non-secure attribution"]
6395 #[inline(always)]
6396 pub fn set_sec1bb31(&mut self, val: bool) {
6397 self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize);
6398 }
6399 }
6400 impl Default for Sec1bbr2 {
6401 #[inline(always)]
6402 fn default() -> Sec1bbr2 {
6403 Sec1bbr2(0)
6404 }
6405 }
6406 impl core::fmt::Debug for Sec1bbr2 {
6407 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
6408 f.debug_struct("Sec1bbr2")
6409 .field("sec1bb0", &self.sec1bb0())
6410 .field("sec1bb1", &self.sec1bb1())
6411 .field("sec1bb2", &self.sec1bb2())
6412 .field("sec1bb3", &self.sec1bb3())
6413 .field("sec1bb4", &self.sec1bb4())
6414 .field("sec1bb5", &self.sec1bb5())
6415 .field("sec1bb6", &self.sec1bb6())
6416 .field("sec1bb7", &self.sec1bb7())
6417 .field("sec1bb8", &self.sec1bb8())
6418 .field("sec1bb9", &self.sec1bb9())
6419 .field("sec1bb10", &self.sec1bb10())
6420 .field("sec1bb11", &self.sec1bb11())
6421 .field("sec1bb12", &self.sec1bb12())
6422 .field("sec1bb13", &self.sec1bb13())
6423 .field("sec1bb14", &self.sec1bb14())
6424 .field("sec1bb15", &self.sec1bb15())
6425 .field("sec1bb16", &self.sec1bb16())
6426 .field("sec1bb17", &self.sec1bb17())
6427 .field("sec1bb18", &self.sec1bb18())
6428 .field("sec1bb19", &self.sec1bb19())
6429 .field("sec1bb20", &self.sec1bb20())
6430 .field("sec1bb21", &self.sec1bb21())
6431 .field("sec1bb22", &self.sec1bb22())
6432 .field("sec1bb23", &self.sec1bb23())
6433 .field("sec1bb24", &self.sec1bb24())
6434 .field("sec1bb25", &self.sec1bb25())
6435 .field("sec1bb26", &self.sec1bb26())
6436 .field("sec1bb27", &self.sec1bb27())
6437 .field("sec1bb28", &self.sec1bb28())
6438 .field("sec1bb29", &self.sec1bb29())
6439 .field("sec1bb30", &self.sec1bb30())
6440 .field("sec1bb31", &self.sec1bb31())
6441 .finish()
6442 }
6443 }
6444 #[cfg(feature = "defmt")]
6445 impl defmt::Format for Sec1bbr2 {
6446 fn format(&self, f: defmt::Formatter) {
6447 #[derive(defmt :: Format)]
6448 struct Sec1bbr2 {
6449 sec1bb0: bool,
6450 sec1bb1: bool,
6451 sec1bb2: bool,
6452 sec1bb3: bool,
6453 sec1bb4: bool,
6454 sec1bb5: bool,
6455 sec1bb6: bool,
6456 sec1bb7: bool,
6457 sec1bb8: bool,
6458 sec1bb9: bool,
6459 sec1bb10: bool,
6460 sec1bb11: bool,
6461 sec1bb12: bool,
6462 sec1bb13: bool,
6463 sec1bb14: bool,
6464 sec1bb15: bool,
6465 sec1bb16: bool,
6466 sec1bb17: bool,
6467 sec1bb18: bool,
6468 sec1bb19: bool,
6469 sec1bb20: bool,
6470 sec1bb21: bool,
6471 sec1bb22: bool,
6472 sec1bb23: bool,
6473 sec1bb24: bool,
6474 sec1bb25: bool,
6475 sec1bb26: bool,
6476 sec1bb27: bool,
6477 sec1bb28: bool,
6478 sec1bb29: bool,
6479 sec1bb30: bool,
6480 sec1bb31: bool,
6481 }
6482 let proxy = Sec1bbr2 {
6483 sec1bb0: self.sec1bb0(),
6484 sec1bb1: self.sec1bb1(),
6485 sec1bb2: self.sec1bb2(),
6486 sec1bb3: self.sec1bb3(),
6487 sec1bb4: self.sec1bb4(),
6488 sec1bb5: self.sec1bb5(),
6489 sec1bb6: self.sec1bb6(),
6490 sec1bb7: self.sec1bb7(),
6491 sec1bb8: self.sec1bb8(),
6492 sec1bb9: self.sec1bb9(),
6493 sec1bb10: self.sec1bb10(),
6494 sec1bb11: self.sec1bb11(),
6495 sec1bb12: self.sec1bb12(),
6496 sec1bb13: self.sec1bb13(),
6497 sec1bb14: self.sec1bb14(),
6498 sec1bb15: self.sec1bb15(),
6499 sec1bb16: self.sec1bb16(),
6500 sec1bb17: self.sec1bb17(),
6501 sec1bb18: self.sec1bb18(),
6502 sec1bb19: self.sec1bb19(),
6503 sec1bb20: self.sec1bb20(),
6504 sec1bb21: self.sec1bb21(),
6505 sec1bb22: self.sec1bb22(),
6506 sec1bb23: self.sec1bb23(),
6507 sec1bb24: self.sec1bb24(),
6508 sec1bb25: self.sec1bb25(),
6509 sec1bb26: self.sec1bb26(),
6510 sec1bb27: self.sec1bb27(),
6511 sec1bb28: self.sec1bb28(),
6512 sec1bb29: self.sec1bb29(),
6513 sec1bb30: self.sec1bb30(),
6514 sec1bb31: self.sec1bb31(),
6515 };
6516 defmt::write!(f, "{}", proxy)
6517 }
6518 }
6519 #[doc = "FLASH secure block based bank 1 register 3"]
6520 #[repr(transparent)]
6521 #[derive(Copy, Clone, Eq, PartialEq)]
6522 pub struct Sec1bbr3(pub u32);
6523 impl Sec1bbr3 {
6524 #[doc = "page secure/non-secure attribution"]
6525 #[inline(always)]
6526 pub const fn sec1bb0(&self) -> bool {
6527 let val = (self.0 >> 0usize) & 0x01;
6528 val != 0
6529 }
6530 #[doc = "page secure/non-secure attribution"]
6531 #[inline(always)]
6532 pub fn set_sec1bb0(&mut self, val: bool) {
6533 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
6534 }
6535 #[doc = "page secure/non-secure attribution"]
6536 #[inline(always)]
6537 pub const fn sec1bb1(&self) -> bool {
6538 let val = (self.0 >> 1usize) & 0x01;
6539 val != 0
6540 }
6541 #[doc = "page secure/non-secure attribution"]
6542 #[inline(always)]
6543 pub fn set_sec1bb1(&mut self, val: bool) {
6544 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
6545 }
6546 #[doc = "page secure/non-secure attribution"]
6547 #[inline(always)]
6548 pub const fn sec1bb2(&self) -> bool {
6549 let val = (self.0 >> 2usize) & 0x01;
6550 val != 0
6551 }
6552 #[doc = "page secure/non-secure attribution"]
6553 #[inline(always)]
6554 pub fn set_sec1bb2(&mut self, val: bool) {
6555 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
6556 }
6557 #[doc = "page secure/non-secure attribution"]
6558 #[inline(always)]
6559 pub const fn sec1bb3(&self) -> bool {
6560 let val = (self.0 >> 3usize) & 0x01;
6561 val != 0
6562 }
6563 #[doc = "page secure/non-secure attribution"]
6564 #[inline(always)]
6565 pub fn set_sec1bb3(&mut self, val: bool) {
6566 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
6567 }
6568 #[doc = "page secure/non-secure attribution"]
6569 #[inline(always)]
6570 pub const fn sec1bb4(&self) -> bool {
6571 let val = (self.0 >> 4usize) & 0x01;
6572 val != 0
6573 }
6574 #[doc = "page secure/non-secure attribution"]
6575 #[inline(always)]
6576 pub fn set_sec1bb4(&mut self, val: bool) {
6577 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
6578 }
6579 #[doc = "page secure/non-secure attribution"]
6580 #[inline(always)]
6581 pub const fn sec1bb5(&self) -> bool {
6582 let val = (self.0 >> 5usize) & 0x01;
6583 val != 0
6584 }
6585 #[doc = "page secure/non-secure attribution"]
6586 #[inline(always)]
6587 pub fn set_sec1bb5(&mut self, val: bool) {
6588 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
6589 }
6590 #[doc = "page secure/non-secure attribution"]
6591 #[inline(always)]
6592 pub const fn sec1bb6(&self) -> bool {
6593 let val = (self.0 >> 6usize) & 0x01;
6594 val != 0
6595 }
6596 #[doc = "page secure/non-secure attribution"]
6597 #[inline(always)]
6598 pub fn set_sec1bb6(&mut self, val: bool) {
6599 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
6600 }
6601 #[doc = "page secure/non-secure attribution"]
6602 #[inline(always)]
6603 pub const fn sec1bb7(&self) -> bool {
6604 let val = (self.0 >> 7usize) & 0x01;
6605 val != 0
6606 }
6607 #[doc = "page secure/non-secure attribution"]
6608 #[inline(always)]
6609 pub fn set_sec1bb7(&mut self, val: bool) {
6610 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
6611 }
6612 #[doc = "page secure/non-secure attribution"]
6613 #[inline(always)]
6614 pub const fn sec1bb8(&self) -> bool {
6615 let val = (self.0 >> 8usize) & 0x01;
6616 val != 0
6617 }
6618 #[doc = "page secure/non-secure attribution"]
6619 #[inline(always)]
6620 pub fn set_sec1bb8(&mut self, val: bool) {
6621 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
6622 }
6623 #[doc = "page secure/non-secure attribution"]
6624 #[inline(always)]
6625 pub const fn sec1bb9(&self) -> bool {
6626 let val = (self.0 >> 9usize) & 0x01;
6627 val != 0
6628 }
6629 #[doc = "page secure/non-secure attribution"]
6630 #[inline(always)]
6631 pub fn set_sec1bb9(&mut self, val: bool) {
6632 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
6633 }
6634 #[doc = "page secure/non-secure attribution"]
6635 #[inline(always)]
6636 pub const fn sec1bb10(&self) -> bool {
6637 let val = (self.0 >> 10usize) & 0x01;
6638 val != 0
6639 }
6640 #[doc = "page secure/non-secure attribution"]
6641 #[inline(always)]
6642 pub fn set_sec1bb10(&mut self, val: bool) {
6643 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
6644 }
6645 #[doc = "page secure/non-secure attribution"]
6646 #[inline(always)]
6647 pub const fn sec1bb11(&self) -> bool {
6648 let val = (self.0 >> 11usize) & 0x01;
6649 val != 0
6650 }
6651 #[doc = "page secure/non-secure attribution"]
6652 #[inline(always)]
6653 pub fn set_sec1bb11(&mut self, val: bool) {
6654 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
6655 }
6656 #[doc = "page secure/non-secure attribution"]
6657 #[inline(always)]
6658 pub const fn sec1bb12(&self) -> bool {
6659 let val = (self.0 >> 12usize) & 0x01;
6660 val != 0
6661 }
6662 #[doc = "page secure/non-secure attribution"]
6663 #[inline(always)]
6664 pub fn set_sec1bb12(&mut self, val: bool) {
6665 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
6666 }
6667 #[doc = "page secure/non-secure attribution"]
6668 #[inline(always)]
6669 pub const fn sec1bb13(&self) -> bool {
6670 let val = (self.0 >> 13usize) & 0x01;
6671 val != 0
6672 }
6673 #[doc = "page secure/non-secure attribution"]
6674 #[inline(always)]
6675 pub fn set_sec1bb13(&mut self, val: bool) {
6676 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
6677 }
6678 #[doc = "page secure/non-secure attribution"]
6679 #[inline(always)]
6680 pub const fn sec1bb14(&self) -> bool {
6681 let val = (self.0 >> 14usize) & 0x01;
6682 val != 0
6683 }
6684 #[doc = "page secure/non-secure attribution"]
6685 #[inline(always)]
6686 pub fn set_sec1bb14(&mut self, val: bool) {
6687 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
6688 }
6689 #[doc = "page secure/non-secure attribution"]
6690 #[inline(always)]
6691 pub const fn sec1bb15(&self) -> bool {
6692 let val = (self.0 >> 15usize) & 0x01;
6693 val != 0
6694 }
6695 #[doc = "page secure/non-secure attribution"]
6696 #[inline(always)]
6697 pub fn set_sec1bb15(&mut self, val: bool) {
6698 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
6699 }
6700 #[doc = "page secure/non-secure attribution"]
6701 #[inline(always)]
6702 pub const fn sec1bb16(&self) -> bool {
6703 let val = (self.0 >> 16usize) & 0x01;
6704 val != 0
6705 }
6706 #[doc = "page secure/non-secure attribution"]
6707 #[inline(always)]
6708 pub fn set_sec1bb16(&mut self, val: bool) {
6709 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
6710 }
6711 #[doc = "page secure/non-secure attribution"]
6712 #[inline(always)]
6713 pub const fn sec1bb17(&self) -> bool {
6714 let val = (self.0 >> 17usize) & 0x01;
6715 val != 0
6716 }
6717 #[doc = "page secure/non-secure attribution"]
6718 #[inline(always)]
6719 pub fn set_sec1bb17(&mut self, val: bool) {
6720 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
6721 }
6722 #[doc = "page secure/non-secure attribution"]
6723 #[inline(always)]
6724 pub const fn sec1bb18(&self) -> bool {
6725 let val = (self.0 >> 18usize) & 0x01;
6726 val != 0
6727 }
6728 #[doc = "page secure/non-secure attribution"]
6729 #[inline(always)]
6730 pub fn set_sec1bb18(&mut self, val: bool) {
6731 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
6732 }
6733 #[doc = "page secure/non-secure attribution"]
6734 #[inline(always)]
6735 pub const fn sec1bb19(&self) -> bool {
6736 let val = (self.0 >> 19usize) & 0x01;
6737 val != 0
6738 }
6739 #[doc = "page secure/non-secure attribution"]
6740 #[inline(always)]
6741 pub fn set_sec1bb19(&mut self, val: bool) {
6742 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
6743 }
6744 #[doc = "page secure/non-secure attribution"]
6745 #[inline(always)]
6746 pub const fn sec1bb20(&self) -> bool {
6747 let val = (self.0 >> 20usize) & 0x01;
6748 val != 0
6749 }
6750 #[doc = "page secure/non-secure attribution"]
6751 #[inline(always)]
6752 pub fn set_sec1bb20(&mut self, val: bool) {
6753 self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize);
6754 }
6755 #[doc = "page secure/non-secure attribution"]
6756 #[inline(always)]
6757 pub const fn sec1bb21(&self) -> bool {
6758 let val = (self.0 >> 21usize) & 0x01;
6759 val != 0
6760 }
6761 #[doc = "page secure/non-secure attribution"]
6762 #[inline(always)]
6763 pub fn set_sec1bb21(&mut self, val: bool) {
6764 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
6765 }
6766 #[doc = "page secure/non-secure attribution"]
6767 #[inline(always)]
6768 pub const fn sec1bb22(&self) -> bool {
6769 let val = (self.0 >> 22usize) & 0x01;
6770 val != 0
6771 }
6772 #[doc = "page secure/non-secure attribution"]
6773 #[inline(always)]
6774 pub fn set_sec1bb22(&mut self, val: bool) {
6775 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
6776 }
6777 #[doc = "page secure/non-secure attribution"]
6778 #[inline(always)]
6779 pub const fn sec1bb23(&self) -> bool {
6780 let val = (self.0 >> 23usize) & 0x01;
6781 val != 0
6782 }
6783 #[doc = "page secure/non-secure attribution"]
6784 #[inline(always)]
6785 pub fn set_sec1bb23(&mut self, val: bool) {
6786 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
6787 }
6788 #[doc = "page secure/non-secure attribution"]
6789 #[inline(always)]
6790 pub const fn sec1bb24(&self) -> bool {
6791 let val = (self.0 >> 24usize) & 0x01;
6792 val != 0
6793 }
6794 #[doc = "page secure/non-secure attribution"]
6795 #[inline(always)]
6796 pub fn set_sec1bb24(&mut self, val: bool) {
6797 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
6798 }
6799 #[doc = "page secure/non-secure attribution"]
6800 #[inline(always)]
6801 pub const fn sec1bb25(&self) -> bool {
6802 let val = (self.0 >> 25usize) & 0x01;
6803 val != 0
6804 }
6805 #[doc = "page secure/non-secure attribution"]
6806 #[inline(always)]
6807 pub fn set_sec1bb25(&mut self, val: bool) {
6808 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
6809 }
6810 #[doc = "page secure/non-secure attribution"]
6811 #[inline(always)]
6812 pub const fn sec1bb26(&self) -> bool {
6813 let val = (self.0 >> 26usize) & 0x01;
6814 val != 0
6815 }
6816 #[doc = "page secure/non-secure attribution"]
6817 #[inline(always)]
6818 pub fn set_sec1bb26(&mut self, val: bool) {
6819 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
6820 }
6821 #[doc = "page secure/non-secure attribution"]
6822 #[inline(always)]
6823 pub const fn sec1bb27(&self) -> bool {
6824 let val = (self.0 >> 27usize) & 0x01;
6825 val != 0
6826 }
6827 #[doc = "page secure/non-secure attribution"]
6828 #[inline(always)]
6829 pub fn set_sec1bb27(&mut self, val: bool) {
6830 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize);
6831 }
6832 #[doc = "page secure/non-secure attribution"]
6833 #[inline(always)]
6834 pub const fn sec1bb28(&self) -> bool {
6835 let val = (self.0 >> 28usize) & 0x01;
6836 val != 0
6837 }
6838 #[doc = "page secure/non-secure attribution"]
6839 #[inline(always)]
6840 pub fn set_sec1bb28(&mut self, val: bool) {
6841 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
6842 }
6843 #[doc = "page secure/non-secure attribution"]
6844 #[inline(always)]
6845 pub const fn sec1bb29(&self) -> bool {
6846 let val = (self.0 >> 29usize) & 0x01;
6847 val != 0
6848 }
6849 #[doc = "page secure/non-secure attribution"]
6850 #[inline(always)]
6851 pub fn set_sec1bb29(&mut self, val: bool) {
6852 self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize);
6853 }
6854 #[doc = "page secure/non-secure attribution"]
6855 #[inline(always)]
6856 pub const fn sec1bb30(&self) -> bool {
6857 let val = (self.0 >> 30usize) & 0x01;
6858 val != 0
6859 }
6860 #[doc = "page secure/non-secure attribution"]
6861 #[inline(always)]
6862 pub fn set_sec1bb30(&mut self, val: bool) {
6863 self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize);
6864 }
6865 #[doc = "page secure/non-secure attribution"]
6866 #[inline(always)]
6867 pub const fn sec1bb31(&self) -> bool {
6868 let val = (self.0 >> 31usize) & 0x01;
6869 val != 0
6870 }
6871 #[doc = "page secure/non-secure attribution"]
6872 #[inline(always)]
6873 pub fn set_sec1bb31(&mut self, val: bool) {
6874 self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize);
6875 }
6876 }
6877 impl Default for Sec1bbr3 {
6878 #[inline(always)]
6879 fn default() -> Sec1bbr3 {
6880 Sec1bbr3(0)
6881 }
6882 }
6883 impl core::fmt::Debug for Sec1bbr3 {
6884 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
6885 f.debug_struct("Sec1bbr3")
6886 .field("sec1bb0", &self.sec1bb0())
6887 .field("sec1bb1", &self.sec1bb1())
6888 .field("sec1bb2", &self.sec1bb2())
6889 .field("sec1bb3", &self.sec1bb3())
6890 .field("sec1bb4", &self.sec1bb4())
6891 .field("sec1bb5", &self.sec1bb5())
6892 .field("sec1bb6", &self.sec1bb6())
6893 .field("sec1bb7", &self.sec1bb7())
6894 .field("sec1bb8", &self.sec1bb8())
6895 .field("sec1bb9", &self.sec1bb9())
6896 .field("sec1bb10", &self.sec1bb10())
6897 .field("sec1bb11", &self.sec1bb11())
6898 .field("sec1bb12", &self.sec1bb12())
6899 .field("sec1bb13", &self.sec1bb13())
6900 .field("sec1bb14", &self.sec1bb14())
6901 .field("sec1bb15", &self.sec1bb15())
6902 .field("sec1bb16", &self.sec1bb16())
6903 .field("sec1bb17", &self.sec1bb17())
6904 .field("sec1bb18", &self.sec1bb18())
6905 .field("sec1bb19", &self.sec1bb19())
6906 .field("sec1bb20", &self.sec1bb20())
6907 .field("sec1bb21", &self.sec1bb21())
6908 .field("sec1bb22", &self.sec1bb22())
6909 .field("sec1bb23", &self.sec1bb23())
6910 .field("sec1bb24", &self.sec1bb24())
6911 .field("sec1bb25", &self.sec1bb25())
6912 .field("sec1bb26", &self.sec1bb26())
6913 .field("sec1bb27", &self.sec1bb27())
6914 .field("sec1bb28", &self.sec1bb28())
6915 .field("sec1bb29", &self.sec1bb29())
6916 .field("sec1bb30", &self.sec1bb30())
6917 .field("sec1bb31", &self.sec1bb31())
6918 .finish()
6919 }
6920 }
6921 #[cfg(feature = "defmt")]
6922 impl defmt::Format for Sec1bbr3 {
6923 fn format(&self, f: defmt::Formatter) {
6924 #[derive(defmt :: Format)]
6925 struct Sec1bbr3 {
6926 sec1bb0: bool,
6927 sec1bb1: bool,
6928 sec1bb2: bool,
6929 sec1bb3: bool,
6930 sec1bb4: bool,
6931 sec1bb5: bool,
6932 sec1bb6: bool,
6933 sec1bb7: bool,
6934 sec1bb8: bool,
6935 sec1bb9: bool,
6936 sec1bb10: bool,
6937 sec1bb11: bool,
6938 sec1bb12: bool,
6939 sec1bb13: bool,
6940 sec1bb14: bool,
6941 sec1bb15: bool,
6942 sec1bb16: bool,
6943 sec1bb17: bool,
6944 sec1bb18: bool,
6945 sec1bb19: bool,
6946 sec1bb20: bool,
6947 sec1bb21: bool,
6948 sec1bb22: bool,
6949 sec1bb23: bool,
6950 sec1bb24: bool,
6951 sec1bb25: bool,
6952 sec1bb26: bool,
6953 sec1bb27: bool,
6954 sec1bb28: bool,
6955 sec1bb29: bool,
6956 sec1bb30: bool,
6957 sec1bb31: bool,
6958 }
6959 let proxy = Sec1bbr3 {
6960 sec1bb0: self.sec1bb0(),
6961 sec1bb1: self.sec1bb1(),
6962 sec1bb2: self.sec1bb2(),
6963 sec1bb3: self.sec1bb3(),
6964 sec1bb4: self.sec1bb4(),
6965 sec1bb5: self.sec1bb5(),
6966 sec1bb6: self.sec1bb6(),
6967 sec1bb7: self.sec1bb7(),
6968 sec1bb8: self.sec1bb8(),
6969 sec1bb9: self.sec1bb9(),
6970 sec1bb10: self.sec1bb10(),
6971 sec1bb11: self.sec1bb11(),
6972 sec1bb12: self.sec1bb12(),
6973 sec1bb13: self.sec1bb13(),
6974 sec1bb14: self.sec1bb14(),
6975 sec1bb15: self.sec1bb15(),
6976 sec1bb16: self.sec1bb16(),
6977 sec1bb17: self.sec1bb17(),
6978 sec1bb18: self.sec1bb18(),
6979 sec1bb19: self.sec1bb19(),
6980 sec1bb20: self.sec1bb20(),
6981 sec1bb21: self.sec1bb21(),
6982 sec1bb22: self.sec1bb22(),
6983 sec1bb23: self.sec1bb23(),
6984 sec1bb24: self.sec1bb24(),
6985 sec1bb25: self.sec1bb25(),
6986 sec1bb26: self.sec1bb26(),
6987 sec1bb27: self.sec1bb27(),
6988 sec1bb28: self.sec1bb28(),
6989 sec1bb29: self.sec1bb29(),
6990 sec1bb30: self.sec1bb30(),
6991 sec1bb31: self.sec1bb31(),
6992 };
6993 defmt::write!(f, "{}", proxy)
6994 }
6995 }
6996 #[doc = "FLASH secure block based bank 1 register 4"]
6997 #[repr(transparent)]
6998 #[derive(Copy, Clone, Eq, PartialEq)]
6999 pub struct Sec1bbr4(pub u32);
7000 impl Sec1bbr4 {
7001 #[doc = "page secure/non-secure attribution"]
7002 #[inline(always)]
7003 pub const fn sec1bb0(&self) -> bool {
7004 let val = (self.0 >> 0usize) & 0x01;
7005 val != 0
7006 }
7007 #[doc = "page secure/non-secure attribution"]
7008 #[inline(always)]
7009 pub fn set_sec1bb0(&mut self, val: bool) {
7010 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
7011 }
7012 #[doc = "page secure/non-secure attribution"]
7013 #[inline(always)]
7014 pub const fn sec1bb1(&self) -> bool {
7015 let val = (self.0 >> 1usize) & 0x01;
7016 val != 0
7017 }
7018 #[doc = "page secure/non-secure attribution"]
7019 #[inline(always)]
7020 pub fn set_sec1bb1(&mut self, val: bool) {
7021 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
7022 }
7023 #[doc = "page secure/non-secure attribution"]
7024 #[inline(always)]
7025 pub const fn sec1bb2(&self) -> bool {
7026 let val = (self.0 >> 2usize) & 0x01;
7027 val != 0
7028 }
7029 #[doc = "page secure/non-secure attribution"]
7030 #[inline(always)]
7031 pub fn set_sec1bb2(&mut self, val: bool) {
7032 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
7033 }
7034 #[doc = "page secure/non-secure attribution"]
7035 #[inline(always)]
7036 pub const fn sec1bb3(&self) -> bool {
7037 let val = (self.0 >> 3usize) & 0x01;
7038 val != 0
7039 }
7040 #[doc = "page secure/non-secure attribution"]
7041 #[inline(always)]
7042 pub fn set_sec1bb3(&mut self, val: bool) {
7043 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
7044 }
7045 #[doc = "page secure/non-secure attribution"]
7046 #[inline(always)]
7047 pub const fn sec1bb4(&self) -> bool {
7048 let val = (self.0 >> 4usize) & 0x01;
7049 val != 0
7050 }
7051 #[doc = "page secure/non-secure attribution"]
7052 #[inline(always)]
7053 pub fn set_sec1bb4(&mut self, val: bool) {
7054 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
7055 }
7056 #[doc = "page secure/non-secure attribution"]
7057 #[inline(always)]
7058 pub const fn sec1bb5(&self) -> bool {
7059 let val = (self.0 >> 5usize) & 0x01;
7060 val != 0
7061 }
7062 #[doc = "page secure/non-secure attribution"]
7063 #[inline(always)]
7064 pub fn set_sec1bb5(&mut self, val: bool) {
7065 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
7066 }
7067 #[doc = "page secure/non-secure attribution"]
7068 #[inline(always)]
7069 pub const fn sec1bb6(&self) -> bool {
7070 let val = (self.0 >> 6usize) & 0x01;
7071 val != 0
7072 }
7073 #[doc = "page secure/non-secure attribution"]
7074 #[inline(always)]
7075 pub fn set_sec1bb6(&mut self, val: bool) {
7076 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
7077 }
7078 #[doc = "page secure/non-secure attribution"]
7079 #[inline(always)]
7080 pub const fn sec1bb7(&self) -> bool {
7081 let val = (self.0 >> 7usize) & 0x01;
7082 val != 0
7083 }
7084 #[doc = "page secure/non-secure attribution"]
7085 #[inline(always)]
7086 pub fn set_sec1bb7(&mut self, val: bool) {
7087 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
7088 }
7089 #[doc = "page secure/non-secure attribution"]
7090 #[inline(always)]
7091 pub const fn sec1bb8(&self) -> bool {
7092 let val = (self.0 >> 8usize) & 0x01;
7093 val != 0
7094 }
7095 #[doc = "page secure/non-secure attribution"]
7096 #[inline(always)]
7097 pub fn set_sec1bb8(&mut self, val: bool) {
7098 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
7099 }
7100 #[doc = "page secure/non-secure attribution"]
7101 #[inline(always)]
7102 pub const fn sec1bb9(&self) -> bool {
7103 let val = (self.0 >> 9usize) & 0x01;
7104 val != 0
7105 }
7106 #[doc = "page secure/non-secure attribution"]
7107 #[inline(always)]
7108 pub fn set_sec1bb9(&mut self, val: bool) {
7109 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
7110 }
7111 #[doc = "page secure/non-secure attribution"]
7112 #[inline(always)]
7113 pub const fn sec1bb10(&self) -> bool {
7114 let val = (self.0 >> 10usize) & 0x01;
7115 val != 0
7116 }
7117 #[doc = "page secure/non-secure attribution"]
7118 #[inline(always)]
7119 pub fn set_sec1bb10(&mut self, val: bool) {
7120 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
7121 }
7122 #[doc = "page secure/non-secure attribution"]
7123 #[inline(always)]
7124 pub const fn sec1bb11(&self) -> bool {
7125 let val = (self.0 >> 11usize) & 0x01;
7126 val != 0
7127 }
7128 #[doc = "page secure/non-secure attribution"]
7129 #[inline(always)]
7130 pub fn set_sec1bb11(&mut self, val: bool) {
7131 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
7132 }
7133 #[doc = "page secure/non-secure attribution"]
7134 #[inline(always)]
7135 pub const fn sec1bb12(&self) -> bool {
7136 let val = (self.0 >> 12usize) & 0x01;
7137 val != 0
7138 }
7139 #[doc = "page secure/non-secure attribution"]
7140 #[inline(always)]
7141 pub fn set_sec1bb12(&mut self, val: bool) {
7142 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
7143 }
7144 #[doc = "page secure/non-secure attribution"]
7145 #[inline(always)]
7146 pub const fn sec1bb13(&self) -> bool {
7147 let val = (self.0 >> 13usize) & 0x01;
7148 val != 0
7149 }
7150 #[doc = "page secure/non-secure attribution"]
7151 #[inline(always)]
7152 pub fn set_sec1bb13(&mut self, val: bool) {
7153 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
7154 }
7155 #[doc = "page secure/non-secure attribution"]
7156 #[inline(always)]
7157 pub const fn sec1bb14(&self) -> bool {
7158 let val = (self.0 >> 14usize) & 0x01;
7159 val != 0
7160 }
7161 #[doc = "page secure/non-secure attribution"]
7162 #[inline(always)]
7163 pub fn set_sec1bb14(&mut self, val: bool) {
7164 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
7165 }
7166 #[doc = "page secure/non-secure attribution"]
7167 #[inline(always)]
7168 pub const fn sec1bb15(&self) -> bool {
7169 let val = (self.0 >> 15usize) & 0x01;
7170 val != 0
7171 }
7172 #[doc = "page secure/non-secure attribution"]
7173 #[inline(always)]
7174 pub fn set_sec1bb15(&mut self, val: bool) {
7175 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
7176 }
7177 #[doc = "page secure/non-secure attribution"]
7178 #[inline(always)]
7179 pub const fn sec1bb16(&self) -> bool {
7180 let val = (self.0 >> 16usize) & 0x01;
7181 val != 0
7182 }
7183 #[doc = "page secure/non-secure attribution"]
7184 #[inline(always)]
7185 pub fn set_sec1bb16(&mut self, val: bool) {
7186 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
7187 }
7188 #[doc = "page secure/non-secure attribution"]
7189 #[inline(always)]
7190 pub const fn sec1bb17(&self) -> bool {
7191 let val = (self.0 >> 17usize) & 0x01;
7192 val != 0
7193 }
7194 #[doc = "page secure/non-secure attribution"]
7195 #[inline(always)]
7196 pub fn set_sec1bb17(&mut self, val: bool) {
7197 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
7198 }
7199 #[doc = "page secure/non-secure attribution"]
7200 #[inline(always)]
7201 pub const fn sec1bb18(&self) -> bool {
7202 let val = (self.0 >> 18usize) & 0x01;
7203 val != 0
7204 }
7205 #[doc = "page secure/non-secure attribution"]
7206 #[inline(always)]
7207 pub fn set_sec1bb18(&mut self, val: bool) {
7208 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
7209 }
7210 #[doc = "page secure/non-secure attribution"]
7211 #[inline(always)]
7212 pub const fn sec1bb19(&self) -> bool {
7213 let val = (self.0 >> 19usize) & 0x01;
7214 val != 0
7215 }
7216 #[doc = "page secure/non-secure attribution"]
7217 #[inline(always)]
7218 pub fn set_sec1bb19(&mut self, val: bool) {
7219 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
7220 }
7221 #[doc = "page secure/non-secure attribution"]
7222 #[inline(always)]
7223 pub const fn sec1bb20(&self) -> bool {
7224 let val = (self.0 >> 20usize) & 0x01;
7225 val != 0
7226 }
7227 #[doc = "page secure/non-secure attribution"]
7228 #[inline(always)]
7229 pub fn set_sec1bb20(&mut self, val: bool) {
7230 self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize);
7231 }
7232 #[doc = "page secure/non-secure attribution"]
7233 #[inline(always)]
7234 pub const fn sec1bb21(&self) -> bool {
7235 let val = (self.0 >> 21usize) & 0x01;
7236 val != 0
7237 }
7238 #[doc = "page secure/non-secure attribution"]
7239 #[inline(always)]
7240 pub fn set_sec1bb21(&mut self, val: bool) {
7241 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
7242 }
7243 #[doc = "page secure/non-secure attribution"]
7244 #[inline(always)]
7245 pub const fn sec1bb22(&self) -> bool {
7246 let val = (self.0 >> 22usize) & 0x01;
7247 val != 0
7248 }
7249 #[doc = "page secure/non-secure attribution"]
7250 #[inline(always)]
7251 pub fn set_sec1bb22(&mut self, val: bool) {
7252 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
7253 }
7254 #[doc = "page secure/non-secure attribution"]
7255 #[inline(always)]
7256 pub const fn sec1bb23(&self) -> bool {
7257 let val = (self.0 >> 23usize) & 0x01;
7258 val != 0
7259 }
7260 #[doc = "page secure/non-secure attribution"]
7261 #[inline(always)]
7262 pub fn set_sec1bb23(&mut self, val: bool) {
7263 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
7264 }
7265 #[doc = "page secure/non-secure attribution"]
7266 #[inline(always)]
7267 pub const fn sec1bb24(&self) -> bool {
7268 let val = (self.0 >> 24usize) & 0x01;
7269 val != 0
7270 }
7271 #[doc = "page secure/non-secure attribution"]
7272 #[inline(always)]
7273 pub fn set_sec1bb24(&mut self, val: bool) {
7274 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
7275 }
7276 #[doc = "page secure/non-secure attribution"]
7277 #[inline(always)]
7278 pub const fn sec1bb25(&self) -> bool {
7279 let val = (self.0 >> 25usize) & 0x01;
7280 val != 0
7281 }
7282 #[doc = "page secure/non-secure attribution"]
7283 #[inline(always)]
7284 pub fn set_sec1bb25(&mut self, val: bool) {
7285 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
7286 }
7287 #[doc = "page secure/non-secure attribution"]
7288 #[inline(always)]
7289 pub const fn sec1bb26(&self) -> bool {
7290 let val = (self.0 >> 26usize) & 0x01;
7291 val != 0
7292 }
7293 #[doc = "page secure/non-secure attribution"]
7294 #[inline(always)]
7295 pub fn set_sec1bb26(&mut self, val: bool) {
7296 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
7297 }
7298 #[doc = "page secure/non-secure attribution"]
7299 #[inline(always)]
7300 pub const fn sec1bb27(&self) -> bool {
7301 let val = (self.0 >> 27usize) & 0x01;
7302 val != 0
7303 }
7304 #[doc = "page secure/non-secure attribution"]
7305 #[inline(always)]
7306 pub fn set_sec1bb27(&mut self, val: bool) {
7307 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize);
7308 }
7309 #[doc = "page secure/non-secure attribution"]
7310 #[inline(always)]
7311 pub const fn sec1bb28(&self) -> bool {
7312 let val = (self.0 >> 28usize) & 0x01;
7313 val != 0
7314 }
7315 #[doc = "page secure/non-secure attribution"]
7316 #[inline(always)]
7317 pub fn set_sec1bb28(&mut self, val: bool) {
7318 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
7319 }
7320 #[doc = "page secure/non-secure attribution"]
7321 #[inline(always)]
7322 pub const fn sec1bb29(&self) -> bool {
7323 let val = (self.0 >> 29usize) & 0x01;
7324 val != 0
7325 }
7326 #[doc = "page secure/non-secure attribution"]
7327 #[inline(always)]
7328 pub fn set_sec1bb29(&mut self, val: bool) {
7329 self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize);
7330 }
7331 #[doc = "page secure/non-secure attribution"]
7332 #[inline(always)]
7333 pub const fn sec1bb30(&self) -> bool {
7334 let val = (self.0 >> 30usize) & 0x01;
7335 val != 0
7336 }
7337 #[doc = "page secure/non-secure attribution"]
7338 #[inline(always)]
7339 pub fn set_sec1bb30(&mut self, val: bool) {
7340 self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize);
7341 }
7342 #[doc = "page secure/non-secure attribution"]
7343 #[inline(always)]
7344 pub const fn sec1bb31(&self) -> bool {
7345 let val = (self.0 >> 31usize) & 0x01;
7346 val != 0
7347 }
7348 #[doc = "page secure/non-secure attribution"]
7349 #[inline(always)]
7350 pub fn set_sec1bb31(&mut self, val: bool) {
7351 self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize);
7352 }
7353 }
7354 impl Default for Sec1bbr4 {
7355 #[inline(always)]
7356 fn default() -> Sec1bbr4 {
7357 Sec1bbr4(0)
7358 }
7359 }
7360 impl core::fmt::Debug for Sec1bbr4 {
7361 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
7362 f.debug_struct("Sec1bbr4")
7363 .field("sec1bb0", &self.sec1bb0())
7364 .field("sec1bb1", &self.sec1bb1())
7365 .field("sec1bb2", &self.sec1bb2())
7366 .field("sec1bb3", &self.sec1bb3())
7367 .field("sec1bb4", &self.sec1bb4())
7368 .field("sec1bb5", &self.sec1bb5())
7369 .field("sec1bb6", &self.sec1bb6())
7370 .field("sec1bb7", &self.sec1bb7())
7371 .field("sec1bb8", &self.sec1bb8())
7372 .field("sec1bb9", &self.sec1bb9())
7373 .field("sec1bb10", &self.sec1bb10())
7374 .field("sec1bb11", &self.sec1bb11())
7375 .field("sec1bb12", &self.sec1bb12())
7376 .field("sec1bb13", &self.sec1bb13())
7377 .field("sec1bb14", &self.sec1bb14())
7378 .field("sec1bb15", &self.sec1bb15())
7379 .field("sec1bb16", &self.sec1bb16())
7380 .field("sec1bb17", &self.sec1bb17())
7381 .field("sec1bb18", &self.sec1bb18())
7382 .field("sec1bb19", &self.sec1bb19())
7383 .field("sec1bb20", &self.sec1bb20())
7384 .field("sec1bb21", &self.sec1bb21())
7385 .field("sec1bb22", &self.sec1bb22())
7386 .field("sec1bb23", &self.sec1bb23())
7387 .field("sec1bb24", &self.sec1bb24())
7388 .field("sec1bb25", &self.sec1bb25())
7389 .field("sec1bb26", &self.sec1bb26())
7390 .field("sec1bb27", &self.sec1bb27())
7391 .field("sec1bb28", &self.sec1bb28())
7392 .field("sec1bb29", &self.sec1bb29())
7393 .field("sec1bb30", &self.sec1bb30())
7394 .field("sec1bb31", &self.sec1bb31())
7395 .finish()
7396 }
7397 }
7398 #[cfg(feature = "defmt")]
7399 impl defmt::Format for Sec1bbr4 {
7400 fn format(&self, f: defmt::Formatter) {
7401 #[derive(defmt :: Format)]
7402 struct Sec1bbr4 {
7403 sec1bb0: bool,
7404 sec1bb1: bool,
7405 sec1bb2: bool,
7406 sec1bb3: bool,
7407 sec1bb4: bool,
7408 sec1bb5: bool,
7409 sec1bb6: bool,
7410 sec1bb7: bool,
7411 sec1bb8: bool,
7412 sec1bb9: bool,
7413 sec1bb10: bool,
7414 sec1bb11: bool,
7415 sec1bb12: bool,
7416 sec1bb13: bool,
7417 sec1bb14: bool,
7418 sec1bb15: bool,
7419 sec1bb16: bool,
7420 sec1bb17: bool,
7421 sec1bb18: bool,
7422 sec1bb19: bool,
7423 sec1bb20: bool,
7424 sec1bb21: bool,
7425 sec1bb22: bool,
7426 sec1bb23: bool,
7427 sec1bb24: bool,
7428 sec1bb25: bool,
7429 sec1bb26: bool,
7430 sec1bb27: bool,
7431 sec1bb28: bool,
7432 sec1bb29: bool,
7433 sec1bb30: bool,
7434 sec1bb31: bool,
7435 }
7436 let proxy = Sec1bbr4 {
7437 sec1bb0: self.sec1bb0(),
7438 sec1bb1: self.sec1bb1(),
7439 sec1bb2: self.sec1bb2(),
7440 sec1bb3: self.sec1bb3(),
7441 sec1bb4: self.sec1bb4(),
7442 sec1bb5: self.sec1bb5(),
7443 sec1bb6: self.sec1bb6(),
7444 sec1bb7: self.sec1bb7(),
7445 sec1bb8: self.sec1bb8(),
7446 sec1bb9: self.sec1bb9(),
7447 sec1bb10: self.sec1bb10(),
7448 sec1bb11: self.sec1bb11(),
7449 sec1bb12: self.sec1bb12(),
7450 sec1bb13: self.sec1bb13(),
7451 sec1bb14: self.sec1bb14(),
7452 sec1bb15: self.sec1bb15(),
7453 sec1bb16: self.sec1bb16(),
7454 sec1bb17: self.sec1bb17(),
7455 sec1bb18: self.sec1bb18(),
7456 sec1bb19: self.sec1bb19(),
7457 sec1bb20: self.sec1bb20(),
7458 sec1bb21: self.sec1bb21(),
7459 sec1bb22: self.sec1bb22(),
7460 sec1bb23: self.sec1bb23(),
7461 sec1bb24: self.sec1bb24(),
7462 sec1bb25: self.sec1bb25(),
7463 sec1bb26: self.sec1bb26(),
7464 sec1bb27: self.sec1bb27(),
7465 sec1bb28: self.sec1bb28(),
7466 sec1bb29: self.sec1bb29(),
7467 sec1bb30: self.sec1bb30(),
7468 sec1bb31: self.sec1bb31(),
7469 };
7470 defmt::write!(f, "{}", proxy)
7471 }
7472 }
7473 #[doc = "FLASH secure block based bank 2 register 1"]
7474 #[repr(transparent)]
7475 #[derive(Copy, Clone, Eq, PartialEq)]
7476 pub struct Sec2bbr1(pub u32);
7477 impl Sec2bbr1 {
7478 #[doc = "page secure/non-secure attribution"]
7479 #[inline(always)]
7480 pub const fn sec2bb0(&self) -> bool {
7481 let val = (self.0 >> 0usize) & 0x01;
7482 val != 0
7483 }
7484 #[doc = "page secure/non-secure attribution"]
7485 #[inline(always)]
7486 pub fn set_sec2bb0(&mut self, val: bool) {
7487 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
7488 }
7489 #[doc = "page secure/non-secure attribution"]
7490 #[inline(always)]
7491 pub const fn sec2bb1(&self) -> bool {
7492 let val = (self.0 >> 1usize) & 0x01;
7493 val != 0
7494 }
7495 #[doc = "page secure/non-secure attribution"]
7496 #[inline(always)]
7497 pub fn set_sec2bb1(&mut self, val: bool) {
7498 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
7499 }
7500 #[doc = "page secure/non-secure attribution"]
7501 #[inline(always)]
7502 pub const fn sec2bb2(&self) -> bool {
7503 let val = (self.0 >> 2usize) & 0x01;
7504 val != 0
7505 }
7506 #[doc = "page secure/non-secure attribution"]
7507 #[inline(always)]
7508 pub fn set_sec2bb2(&mut self, val: bool) {
7509 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
7510 }
7511 #[doc = "page secure/non-secure attribution"]
7512 #[inline(always)]
7513 pub const fn sec2bb3(&self) -> bool {
7514 let val = (self.0 >> 3usize) & 0x01;
7515 val != 0
7516 }
7517 #[doc = "page secure/non-secure attribution"]
7518 #[inline(always)]
7519 pub fn set_sec2bb3(&mut self, val: bool) {
7520 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
7521 }
7522 #[doc = "page secure/non-secure attribution"]
7523 #[inline(always)]
7524 pub const fn sec2bb4(&self) -> bool {
7525 let val = (self.0 >> 4usize) & 0x01;
7526 val != 0
7527 }
7528 #[doc = "page secure/non-secure attribution"]
7529 #[inline(always)]
7530 pub fn set_sec2bb4(&mut self, val: bool) {
7531 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
7532 }
7533 #[doc = "page secure/non-secure attribution"]
7534 #[inline(always)]
7535 pub const fn sec2bb5(&self) -> bool {
7536 let val = (self.0 >> 5usize) & 0x01;
7537 val != 0
7538 }
7539 #[doc = "page secure/non-secure attribution"]
7540 #[inline(always)]
7541 pub fn set_sec2bb5(&mut self, val: bool) {
7542 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
7543 }
7544 #[doc = "page secure/non-secure attribution"]
7545 #[inline(always)]
7546 pub const fn sec2bb6(&self) -> bool {
7547 let val = (self.0 >> 6usize) & 0x01;
7548 val != 0
7549 }
7550 #[doc = "page secure/non-secure attribution"]
7551 #[inline(always)]
7552 pub fn set_sec2bb6(&mut self, val: bool) {
7553 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
7554 }
7555 #[doc = "page secure/non-secure attribution"]
7556 #[inline(always)]
7557 pub const fn sec2bb7(&self) -> bool {
7558 let val = (self.0 >> 7usize) & 0x01;
7559 val != 0
7560 }
7561 #[doc = "page secure/non-secure attribution"]
7562 #[inline(always)]
7563 pub fn set_sec2bb7(&mut self, val: bool) {
7564 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
7565 }
7566 #[doc = "page secure/non-secure attribution"]
7567 #[inline(always)]
7568 pub const fn sec2bb8(&self) -> bool {
7569 let val = (self.0 >> 8usize) & 0x01;
7570 val != 0
7571 }
7572 #[doc = "page secure/non-secure attribution"]
7573 #[inline(always)]
7574 pub fn set_sec2bb8(&mut self, val: bool) {
7575 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
7576 }
7577 #[doc = "page secure/non-secure attribution"]
7578 #[inline(always)]
7579 pub const fn sec2bb9(&self) -> bool {
7580 let val = (self.0 >> 9usize) & 0x01;
7581 val != 0
7582 }
7583 #[doc = "page secure/non-secure attribution"]
7584 #[inline(always)]
7585 pub fn set_sec2bb9(&mut self, val: bool) {
7586 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
7587 }
7588 #[doc = "page secure/non-secure attribution"]
7589 #[inline(always)]
7590 pub const fn sec2bb10(&self) -> bool {
7591 let val = (self.0 >> 10usize) & 0x01;
7592 val != 0
7593 }
7594 #[doc = "page secure/non-secure attribution"]
7595 #[inline(always)]
7596 pub fn set_sec2bb10(&mut self, val: bool) {
7597 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
7598 }
7599 #[doc = "page secure/non-secure attribution"]
7600 #[inline(always)]
7601 pub const fn sec2bb11(&self) -> bool {
7602 let val = (self.0 >> 11usize) & 0x01;
7603 val != 0
7604 }
7605 #[doc = "page secure/non-secure attribution"]
7606 #[inline(always)]
7607 pub fn set_sec2bb11(&mut self, val: bool) {
7608 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
7609 }
7610 #[doc = "page secure/non-secure attribution"]
7611 #[inline(always)]
7612 pub const fn sec2bb12(&self) -> bool {
7613 let val = (self.0 >> 12usize) & 0x01;
7614 val != 0
7615 }
7616 #[doc = "page secure/non-secure attribution"]
7617 #[inline(always)]
7618 pub fn set_sec2bb12(&mut self, val: bool) {
7619 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
7620 }
7621 #[doc = "page secure/non-secure attribution"]
7622 #[inline(always)]
7623 pub const fn sec2bb13(&self) -> bool {
7624 let val = (self.0 >> 13usize) & 0x01;
7625 val != 0
7626 }
7627 #[doc = "page secure/non-secure attribution"]
7628 #[inline(always)]
7629 pub fn set_sec2bb13(&mut self, val: bool) {
7630 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
7631 }
7632 #[doc = "page secure/non-secure attribution"]
7633 #[inline(always)]
7634 pub const fn sec2bb14(&self) -> bool {
7635 let val = (self.0 >> 14usize) & 0x01;
7636 val != 0
7637 }
7638 #[doc = "page secure/non-secure attribution"]
7639 #[inline(always)]
7640 pub fn set_sec2bb14(&mut self, val: bool) {
7641 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
7642 }
7643 #[doc = "page secure/non-secure attribution"]
7644 #[inline(always)]
7645 pub const fn sec2bb15(&self) -> bool {
7646 let val = (self.0 >> 15usize) & 0x01;
7647 val != 0
7648 }
7649 #[doc = "page secure/non-secure attribution"]
7650 #[inline(always)]
7651 pub fn set_sec2bb15(&mut self, val: bool) {
7652 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
7653 }
7654 #[doc = "page secure/non-secure attribution"]
7655 #[inline(always)]
7656 pub const fn sec2bb16(&self) -> bool {
7657 let val = (self.0 >> 16usize) & 0x01;
7658 val != 0
7659 }
7660 #[doc = "page secure/non-secure attribution"]
7661 #[inline(always)]
7662 pub fn set_sec2bb16(&mut self, val: bool) {
7663 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
7664 }
7665 #[doc = "page secure/non-secure attribution"]
7666 #[inline(always)]
7667 pub const fn sec2bb17(&self) -> bool {
7668 let val = (self.0 >> 17usize) & 0x01;
7669 val != 0
7670 }
7671 #[doc = "page secure/non-secure attribution"]
7672 #[inline(always)]
7673 pub fn set_sec2bb17(&mut self, val: bool) {
7674 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
7675 }
7676 #[doc = "page secure/non-secure attribution"]
7677 #[inline(always)]
7678 pub const fn sec2bb18(&self) -> bool {
7679 let val = (self.0 >> 18usize) & 0x01;
7680 val != 0
7681 }
7682 #[doc = "page secure/non-secure attribution"]
7683 #[inline(always)]
7684 pub fn set_sec2bb18(&mut self, val: bool) {
7685 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
7686 }
7687 #[doc = "page secure/non-secure attribution"]
7688 #[inline(always)]
7689 pub const fn sec2bb19(&self) -> bool {
7690 let val = (self.0 >> 19usize) & 0x01;
7691 val != 0
7692 }
7693 #[doc = "page secure/non-secure attribution"]
7694 #[inline(always)]
7695 pub fn set_sec2bb19(&mut self, val: bool) {
7696 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
7697 }
7698 #[doc = "page secure/non-secure attribution"]
7699 #[inline(always)]
7700 pub const fn sec2bb20(&self) -> bool {
7701 let val = (self.0 >> 20usize) & 0x01;
7702 val != 0
7703 }
7704 #[doc = "page secure/non-secure attribution"]
7705 #[inline(always)]
7706 pub fn set_sec2bb20(&mut self, val: bool) {
7707 self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize);
7708 }
7709 #[doc = "page secure/non-secure attribution"]
7710 #[inline(always)]
7711 pub const fn sec2bb21(&self) -> bool {
7712 let val = (self.0 >> 21usize) & 0x01;
7713 val != 0
7714 }
7715 #[doc = "page secure/non-secure attribution"]
7716 #[inline(always)]
7717 pub fn set_sec2bb21(&mut self, val: bool) {
7718 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
7719 }
7720 #[doc = "page secure/non-secure attribution"]
7721 #[inline(always)]
7722 pub const fn sec2bb22(&self) -> bool {
7723 let val = (self.0 >> 22usize) & 0x01;
7724 val != 0
7725 }
7726 #[doc = "page secure/non-secure attribution"]
7727 #[inline(always)]
7728 pub fn set_sec2bb22(&mut self, val: bool) {
7729 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
7730 }
7731 #[doc = "page secure/non-secure attribution"]
7732 #[inline(always)]
7733 pub const fn sec2bb23(&self) -> bool {
7734 let val = (self.0 >> 23usize) & 0x01;
7735 val != 0
7736 }
7737 #[doc = "page secure/non-secure attribution"]
7738 #[inline(always)]
7739 pub fn set_sec2bb23(&mut self, val: bool) {
7740 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
7741 }
7742 #[doc = "page secure/non-secure attribution"]
7743 #[inline(always)]
7744 pub const fn sec2bb24(&self) -> bool {
7745 let val = (self.0 >> 24usize) & 0x01;
7746 val != 0
7747 }
7748 #[doc = "page secure/non-secure attribution"]
7749 #[inline(always)]
7750 pub fn set_sec2bb24(&mut self, val: bool) {
7751 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
7752 }
7753 #[doc = "page secure/non-secure attribution"]
7754 #[inline(always)]
7755 pub const fn sec2bb25(&self) -> bool {
7756 let val = (self.0 >> 25usize) & 0x01;
7757 val != 0
7758 }
7759 #[doc = "page secure/non-secure attribution"]
7760 #[inline(always)]
7761 pub fn set_sec2bb25(&mut self, val: bool) {
7762 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
7763 }
7764 #[doc = "page secure/non-secure attribution"]
7765 #[inline(always)]
7766 pub const fn sec2bb26(&self) -> bool {
7767 let val = (self.0 >> 26usize) & 0x01;
7768 val != 0
7769 }
7770 #[doc = "page secure/non-secure attribution"]
7771 #[inline(always)]
7772 pub fn set_sec2bb26(&mut self, val: bool) {
7773 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
7774 }
7775 #[doc = "page secure/non-secure attribution"]
7776 #[inline(always)]
7777 pub const fn sec2bb27(&self) -> bool {
7778 let val = (self.0 >> 27usize) & 0x01;
7779 val != 0
7780 }
7781 #[doc = "page secure/non-secure attribution"]
7782 #[inline(always)]
7783 pub fn set_sec2bb27(&mut self, val: bool) {
7784 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize);
7785 }
7786 #[doc = "page secure/non-secure attribution"]
7787 #[inline(always)]
7788 pub const fn sec2bb28(&self) -> bool {
7789 let val = (self.0 >> 28usize) & 0x01;
7790 val != 0
7791 }
7792 #[doc = "page secure/non-secure attribution"]
7793 #[inline(always)]
7794 pub fn set_sec2bb28(&mut self, val: bool) {
7795 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
7796 }
7797 #[doc = "page secure/non-secure attribution"]
7798 #[inline(always)]
7799 pub const fn sec2bb29(&self) -> bool {
7800 let val = (self.0 >> 29usize) & 0x01;
7801 val != 0
7802 }
7803 #[doc = "page secure/non-secure attribution"]
7804 #[inline(always)]
7805 pub fn set_sec2bb29(&mut self, val: bool) {
7806 self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize);
7807 }
7808 #[doc = "page secure/non-secure attribution"]
7809 #[inline(always)]
7810 pub const fn sec2bb30(&self) -> bool {
7811 let val = (self.0 >> 30usize) & 0x01;
7812 val != 0
7813 }
7814 #[doc = "page secure/non-secure attribution"]
7815 #[inline(always)]
7816 pub fn set_sec2bb30(&mut self, val: bool) {
7817 self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize);
7818 }
7819 #[doc = "page secure/non-secure attribution"]
7820 #[inline(always)]
7821 pub const fn sec2bb31(&self) -> bool {
7822 let val = (self.0 >> 31usize) & 0x01;
7823 val != 0
7824 }
7825 #[doc = "page secure/non-secure attribution"]
7826 #[inline(always)]
7827 pub fn set_sec2bb31(&mut self, val: bool) {
7828 self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize);
7829 }
7830 }
7831 impl Default for Sec2bbr1 {
7832 #[inline(always)]
7833 fn default() -> Sec2bbr1 {
7834 Sec2bbr1(0)
7835 }
7836 }
7837 impl core::fmt::Debug for Sec2bbr1 {
7838 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
7839 f.debug_struct("Sec2bbr1")
7840 .field("sec2bb0", &self.sec2bb0())
7841 .field("sec2bb1", &self.sec2bb1())
7842 .field("sec2bb2", &self.sec2bb2())
7843 .field("sec2bb3", &self.sec2bb3())
7844 .field("sec2bb4", &self.sec2bb4())
7845 .field("sec2bb5", &self.sec2bb5())
7846 .field("sec2bb6", &self.sec2bb6())
7847 .field("sec2bb7", &self.sec2bb7())
7848 .field("sec2bb8", &self.sec2bb8())
7849 .field("sec2bb9", &self.sec2bb9())
7850 .field("sec2bb10", &self.sec2bb10())
7851 .field("sec2bb11", &self.sec2bb11())
7852 .field("sec2bb12", &self.sec2bb12())
7853 .field("sec2bb13", &self.sec2bb13())
7854 .field("sec2bb14", &self.sec2bb14())
7855 .field("sec2bb15", &self.sec2bb15())
7856 .field("sec2bb16", &self.sec2bb16())
7857 .field("sec2bb17", &self.sec2bb17())
7858 .field("sec2bb18", &self.sec2bb18())
7859 .field("sec2bb19", &self.sec2bb19())
7860 .field("sec2bb20", &self.sec2bb20())
7861 .field("sec2bb21", &self.sec2bb21())
7862 .field("sec2bb22", &self.sec2bb22())
7863 .field("sec2bb23", &self.sec2bb23())
7864 .field("sec2bb24", &self.sec2bb24())
7865 .field("sec2bb25", &self.sec2bb25())
7866 .field("sec2bb26", &self.sec2bb26())
7867 .field("sec2bb27", &self.sec2bb27())
7868 .field("sec2bb28", &self.sec2bb28())
7869 .field("sec2bb29", &self.sec2bb29())
7870 .field("sec2bb30", &self.sec2bb30())
7871 .field("sec2bb31", &self.sec2bb31())
7872 .finish()
7873 }
7874 }
7875 #[cfg(feature = "defmt")]
7876 impl defmt::Format for Sec2bbr1 {
7877 fn format(&self, f: defmt::Formatter) {
7878 #[derive(defmt :: Format)]
7879 struct Sec2bbr1 {
7880 sec2bb0: bool,
7881 sec2bb1: bool,
7882 sec2bb2: bool,
7883 sec2bb3: bool,
7884 sec2bb4: bool,
7885 sec2bb5: bool,
7886 sec2bb6: bool,
7887 sec2bb7: bool,
7888 sec2bb8: bool,
7889 sec2bb9: bool,
7890 sec2bb10: bool,
7891 sec2bb11: bool,
7892 sec2bb12: bool,
7893 sec2bb13: bool,
7894 sec2bb14: bool,
7895 sec2bb15: bool,
7896 sec2bb16: bool,
7897 sec2bb17: bool,
7898 sec2bb18: bool,
7899 sec2bb19: bool,
7900 sec2bb20: bool,
7901 sec2bb21: bool,
7902 sec2bb22: bool,
7903 sec2bb23: bool,
7904 sec2bb24: bool,
7905 sec2bb25: bool,
7906 sec2bb26: bool,
7907 sec2bb27: bool,
7908 sec2bb28: bool,
7909 sec2bb29: bool,
7910 sec2bb30: bool,
7911 sec2bb31: bool,
7912 }
7913 let proxy = Sec2bbr1 {
7914 sec2bb0: self.sec2bb0(),
7915 sec2bb1: self.sec2bb1(),
7916 sec2bb2: self.sec2bb2(),
7917 sec2bb3: self.sec2bb3(),
7918 sec2bb4: self.sec2bb4(),
7919 sec2bb5: self.sec2bb5(),
7920 sec2bb6: self.sec2bb6(),
7921 sec2bb7: self.sec2bb7(),
7922 sec2bb8: self.sec2bb8(),
7923 sec2bb9: self.sec2bb9(),
7924 sec2bb10: self.sec2bb10(),
7925 sec2bb11: self.sec2bb11(),
7926 sec2bb12: self.sec2bb12(),
7927 sec2bb13: self.sec2bb13(),
7928 sec2bb14: self.sec2bb14(),
7929 sec2bb15: self.sec2bb15(),
7930 sec2bb16: self.sec2bb16(),
7931 sec2bb17: self.sec2bb17(),
7932 sec2bb18: self.sec2bb18(),
7933 sec2bb19: self.sec2bb19(),
7934 sec2bb20: self.sec2bb20(),
7935 sec2bb21: self.sec2bb21(),
7936 sec2bb22: self.sec2bb22(),
7937 sec2bb23: self.sec2bb23(),
7938 sec2bb24: self.sec2bb24(),
7939 sec2bb25: self.sec2bb25(),
7940 sec2bb26: self.sec2bb26(),
7941 sec2bb27: self.sec2bb27(),
7942 sec2bb28: self.sec2bb28(),
7943 sec2bb29: self.sec2bb29(),
7944 sec2bb30: self.sec2bb30(),
7945 sec2bb31: self.sec2bb31(),
7946 };
7947 defmt::write!(f, "{}", proxy)
7948 }
7949 }
7950 #[doc = "FLASH secure block based bank 2 register 2"]
7951 #[repr(transparent)]
7952 #[derive(Copy, Clone, Eq, PartialEq)]
7953 pub struct Sec2bbr2(pub u32);
7954 impl Sec2bbr2 {
7955 #[doc = "page secure/non-secure attribution"]
7956 #[inline(always)]
7957 pub const fn sec2bb0(&self) -> bool {
7958 let val = (self.0 >> 0usize) & 0x01;
7959 val != 0
7960 }
7961 #[doc = "page secure/non-secure attribution"]
7962 #[inline(always)]
7963 pub fn set_sec2bb0(&mut self, val: bool) {
7964 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
7965 }
7966 #[doc = "page secure/non-secure attribution"]
7967 #[inline(always)]
7968 pub const fn sec2bb1(&self) -> bool {
7969 let val = (self.0 >> 1usize) & 0x01;
7970 val != 0
7971 }
7972 #[doc = "page secure/non-secure attribution"]
7973 #[inline(always)]
7974 pub fn set_sec2bb1(&mut self, val: bool) {
7975 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
7976 }
7977 #[doc = "page secure/non-secure attribution"]
7978 #[inline(always)]
7979 pub const fn sec2bb2(&self) -> bool {
7980 let val = (self.0 >> 2usize) & 0x01;
7981 val != 0
7982 }
7983 #[doc = "page secure/non-secure attribution"]
7984 #[inline(always)]
7985 pub fn set_sec2bb2(&mut self, val: bool) {
7986 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
7987 }
7988 #[doc = "page secure/non-secure attribution"]
7989 #[inline(always)]
7990 pub const fn sec2bb3(&self) -> bool {
7991 let val = (self.0 >> 3usize) & 0x01;
7992 val != 0
7993 }
7994 #[doc = "page secure/non-secure attribution"]
7995 #[inline(always)]
7996 pub fn set_sec2bb3(&mut self, val: bool) {
7997 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
7998 }
7999 #[doc = "page secure/non-secure attribution"]
8000 #[inline(always)]
8001 pub const fn sec2bb4(&self) -> bool {
8002 let val = (self.0 >> 4usize) & 0x01;
8003 val != 0
8004 }
8005 #[doc = "page secure/non-secure attribution"]
8006 #[inline(always)]
8007 pub fn set_sec2bb4(&mut self, val: bool) {
8008 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
8009 }
8010 #[doc = "page secure/non-secure attribution"]
8011 #[inline(always)]
8012 pub const fn sec2bb5(&self) -> bool {
8013 let val = (self.0 >> 5usize) & 0x01;
8014 val != 0
8015 }
8016 #[doc = "page secure/non-secure attribution"]
8017 #[inline(always)]
8018 pub fn set_sec2bb5(&mut self, val: bool) {
8019 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
8020 }
8021 #[doc = "page secure/non-secure attribution"]
8022 #[inline(always)]
8023 pub const fn sec2bb6(&self) -> bool {
8024 let val = (self.0 >> 6usize) & 0x01;
8025 val != 0
8026 }
8027 #[doc = "page secure/non-secure attribution"]
8028 #[inline(always)]
8029 pub fn set_sec2bb6(&mut self, val: bool) {
8030 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
8031 }
8032 #[doc = "page secure/non-secure attribution"]
8033 #[inline(always)]
8034 pub const fn sec2bb7(&self) -> bool {
8035 let val = (self.0 >> 7usize) & 0x01;
8036 val != 0
8037 }
8038 #[doc = "page secure/non-secure attribution"]
8039 #[inline(always)]
8040 pub fn set_sec2bb7(&mut self, val: bool) {
8041 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
8042 }
8043 #[doc = "page secure/non-secure attribution"]
8044 #[inline(always)]
8045 pub const fn sec2bb8(&self) -> bool {
8046 let val = (self.0 >> 8usize) & 0x01;
8047 val != 0
8048 }
8049 #[doc = "page secure/non-secure attribution"]
8050 #[inline(always)]
8051 pub fn set_sec2bb8(&mut self, val: bool) {
8052 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
8053 }
8054 #[doc = "page secure/non-secure attribution"]
8055 #[inline(always)]
8056 pub const fn sec2bb9(&self) -> bool {
8057 let val = (self.0 >> 9usize) & 0x01;
8058 val != 0
8059 }
8060 #[doc = "page secure/non-secure attribution"]
8061 #[inline(always)]
8062 pub fn set_sec2bb9(&mut self, val: bool) {
8063 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
8064 }
8065 #[doc = "page secure/non-secure attribution"]
8066 #[inline(always)]
8067 pub const fn sec2bb10(&self) -> bool {
8068 let val = (self.0 >> 10usize) & 0x01;
8069 val != 0
8070 }
8071 #[doc = "page secure/non-secure attribution"]
8072 #[inline(always)]
8073 pub fn set_sec2bb10(&mut self, val: bool) {
8074 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
8075 }
8076 #[doc = "page secure/non-secure attribution"]
8077 #[inline(always)]
8078 pub const fn sec2bb11(&self) -> bool {
8079 let val = (self.0 >> 11usize) & 0x01;
8080 val != 0
8081 }
8082 #[doc = "page secure/non-secure attribution"]
8083 #[inline(always)]
8084 pub fn set_sec2bb11(&mut self, val: bool) {
8085 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
8086 }
8087 #[doc = "page secure/non-secure attribution"]
8088 #[inline(always)]
8089 pub const fn sec2bb12(&self) -> bool {
8090 let val = (self.0 >> 12usize) & 0x01;
8091 val != 0
8092 }
8093 #[doc = "page secure/non-secure attribution"]
8094 #[inline(always)]
8095 pub fn set_sec2bb12(&mut self, val: bool) {
8096 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
8097 }
8098 #[doc = "page secure/non-secure attribution"]
8099 #[inline(always)]
8100 pub const fn sec2bb13(&self) -> bool {
8101 let val = (self.0 >> 13usize) & 0x01;
8102 val != 0
8103 }
8104 #[doc = "page secure/non-secure attribution"]
8105 #[inline(always)]
8106 pub fn set_sec2bb13(&mut self, val: bool) {
8107 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
8108 }
8109 #[doc = "page secure/non-secure attribution"]
8110 #[inline(always)]
8111 pub const fn sec2bb14(&self) -> bool {
8112 let val = (self.0 >> 14usize) & 0x01;
8113 val != 0
8114 }
8115 #[doc = "page secure/non-secure attribution"]
8116 #[inline(always)]
8117 pub fn set_sec2bb14(&mut self, val: bool) {
8118 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
8119 }
8120 #[doc = "page secure/non-secure attribution"]
8121 #[inline(always)]
8122 pub const fn sec2bb15(&self) -> bool {
8123 let val = (self.0 >> 15usize) & 0x01;
8124 val != 0
8125 }
8126 #[doc = "page secure/non-secure attribution"]
8127 #[inline(always)]
8128 pub fn set_sec2bb15(&mut self, val: bool) {
8129 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
8130 }
8131 #[doc = "page secure/non-secure attribution"]
8132 #[inline(always)]
8133 pub const fn sec2bb16(&self) -> bool {
8134 let val = (self.0 >> 16usize) & 0x01;
8135 val != 0
8136 }
8137 #[doc = "page secure/non-secure attribution"]
8138 #[inline(always)]
8139 pub fn set_sec2bb16(&mut self, val: bool) {
8140 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
8141 }
8142 #[doc = "page secure/non-secure attribution"]
8143 #[inline(always)]
8144 pub const fn sec2bb17(&self) -> bool {
8145 let val = (self.0 >> 17usize) & 0x01;
8146 val != 0
8147 }
8148 #[doc = "page secure/non-secure attribution"]
8149 #[inline(always)]
8150 pub fn set_sec2bb17(&mut self, val: bool) {
8151 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
8152 }
8153 #[doc = "page secure/non-secure attribution"]
8154 #[inline(always)]
8155 pub const fn sec2bb18(&self) -> bool {
8156 let val = (self.0 >> 18usize) & 0x01;
8157 val != 0
8158 }
8159 #[doc = "page secure/non-secure attribution"]
8160 #[inline(always)]
8161 pub fn set_sec2bb18(&mut self, val: bool) {
8162 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
8163 }
8164 #[doc = "page secure/non-secure attribution"]
8165 #[inline(always)]
8166 pub const fn sec2bb19(&self) -> bool {
8167 let val = (self.0 >> 19usize) & 0x01;
8168 val != 0
8169 }
8170 #[doc = "page secure/non-secure attribution"]
8171 #[inline(always)]
8172 pub fn set_sec2bb19(&mut self, val: bool) {
8173 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
8174 }
8175 #[doc = "page secure/non-secure attribution"]
8176 #[inline(always)]
8177 pub const fn sec2bb20(&self) -> bool {
8178 let val = (self.0 >> 20usize) & 0x01;
8179 val != 0
8180 }
8181 #[doc = "page secure/non-secure attribution"]
8182 #[inline(always)]
8183 pub fn set_sec2bb20(&mut self, val: bool) {
8184 self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize);
8185 }
8186 #[doc = "page secure/non-secure attribution"]
8187 #[inline(always)]
8188 pub const fn sec2bb21(&self) -> bool {
8189 let val = (self.0 >> 21usize) & 0x01;
8190 val != 0
8191 }
8192 #[doc = "page secure/non-secure attribution"]
8193 #[inline(always)]
8194 pub fn set_sec2bb21(&mut self, val: bool) {
8195 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
8196 }
8197 #[doc = "page secure/non-secure attribution"]
8198 #[inline(always)]
8199 pub const fn sec2bb22(&self) -> bool {
8200 let val = (self.0 >> 22usize) & 0x01;
8201 val != 0
8202 }
8203 #[doc = "page secure/non-secure attribution"]
8204 #[inline(always)]
8205 pub fn set_sec2bb22(&mut self, val: bool) {
8206 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
8207 }
8208 #[doc = "page secure/non-secure attribution"]
8209 #[inline(always)]
8210 pub const fn sec2bb23(&self) -> bool {
8211 let val = (self.0 >> 23usize) & 0x01;
8212 val != 0
8213 }
8214 #[doc = "page secure/non-secure attribution"]
8215 #[inline(always)]
8216 pub fn set_sec2bb23(&mut self, val: bool) {
8217 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
8218 }
8219 #[doc = "page secure/non-secure attribution"]
8220 #[inline(always)]
8221 pub const fn sec2bb24(&self) -> bool {
8222 let val = (self.0 >> 24usize) & 0x01;
8223 val != 0
8224 }
8225 #[doc = "page secure/non-secure attribution"]
8226 #[inline(always)]
8227 pub fn set_sec2bb24(&mut self, val: bool) {
8228 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
8229 }
8230 #[doc = "page secure/non-secure attribution"]
8231 #[inline(always)]
8232 pub const fn sec2bb25(&self) -> bool {
8233 let val = (self.0 >> 25usize) & 0x01;
8234 val != 0
8235 }
8236 #[doc = "page secure/non-secure attribution"]
8237 #[inline(always)]
8238 pub fn set_sec2bb25(&mut self, val: bool) {
8239 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
8240 }
8241 #[doc = "page secure/non-secure attribution"]
8242 #[inline(always)]
8243 pub const fn sec2bb26(&self) -> bool {
8244 let val = (self.0 >> 26usize) & 0x01;
8245 val != 0
8246 }
8247 #[doc = "page secure/non-secure attribution"]
8248 #[inline(always)]
8249 pub fn set_sec2bb26(&mut self, val: bool) {
8250 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
8251 }
8252 #[doc = "page secure/non-secure attribution"]
8253 #[inline(always)]
8254 pub const fn sec2bb27(&self) -> bool {
8255 let val = (self.0 >> 27usize) & 0x01;
8256 val != 0
8257 }
8258 #[doc = "page secure/non-secure attribution"]
8259 #[inline(always)]
8260 pub fn set_sec2bb27(&mut self, val: bool) {
8261 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize);
8262 }
8263 #[doc = "page secure/non-secure attribution"]
8264 #[inline(always)]
8265 pub const fn sec2bb28(&self) -> bool {
8266 let val = (self.0 >> 28usize) & 0x01;
8267 val != 0
8268 }
8269 #[doc = "page secure/non-secure attribution"]
8270 #[inline(always)]
8271 pub fn set_sec2bb28(&mut self, val: bool) {
8272 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
8273 }
8274 #[doc = "page secure/non-secure attribution"]
8275 #[inline(always)]
8276 pub const fn sec2bb29(&self) -> bool {
8277 let val = (self.0 >> 29usize) & 0x01;
8278 val != 0
8279 }
8280 #[doc = "page secure/non-secure attribution"]
8281 #[inline(always)]
8282 pub fn set_sec2bb29(&mut self, val: bool) {
8283 self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize);
8284 }
8285 #[doc = "page secure/non-secure attribution"]
8286 #[inline(always)]
8287 pub const fn sec2bb30(&self) -> bool {
8288 let val = (self.0 >> 30usize) & 0x01;
8289 val != 0
8290 }
8291 #[doc = "page secure/non-secure attribution"]
8292 #[inline(always)]
8293 pub fn set_sec2bb30(&mut self, val: bool) {
8294 self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize);
8295 }
8296 #[doc = "page secure/non-secure attribution"]
8297 #[inline(always)]
8298 pub const fn sec2bb31(&self) -> bool {
8299 let val = (self.0 >> 31usize) & 0x01;
8300 val != 0
8301 }
8302 #[doc = "page secure/non-secure attribution"]
8303 #[inline(always)]
8304 pub fn set_sec2bb31(&mut self, val: bool) {
8305 self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize);
8306 }
8307 }
8308 impl Default for Sec2bbr2 {
8309 #[inline(always)]
8310 fn default() -> Sec2bbr2 {
8311 Sec2bbr2(0)
8312 }
8313 }
8314 impl core::fmt::Debug for Sec2bbr2 {
8315 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
8316 f.debug_struct("Sec2bbr2")
8317 .field("sec2bb0", &self.sec2bb0())
8318 .field("sec2bb1", &self.sec2bb1())
8319 .field("sec2bb2", &self.sec2bb2())
8320 .field("sec2bb3", &self.sec2bb3())
8321 .field("sec2bb4", &self.sec2bb4())
8322 .field("sec2bb5", &self.sec2bb5())
8323 .field("sec2bb6", &self.sec2bb6())
8324 .field("sec2bb7", &self.sec2bb7())
8325 .field("sec2bb8", &self.sec2bb8())
8326 .field("sec2bb9", &self.sec2bb9())
8327 .field("sec2bb10", &self.sec2bb10())
8328 .field("sec2bb11", &self.sec2bb11())
8329 .field("sec2bb12", &self.sec2bb12())
8330 .field("sec2bb13", &self.sec2bb13())
8331 .field("sec2bb14", &self.sec2bb14())
8332 .field("sec2bb15", &self.sec2bb15())
8333 .field("sec2bb16", &self.sec2bb16())
8334 .field("sec2bb17", &self.sec2bb17())
8335 .field("sec2bb18", &self.sec2bb18())
8336 .field("sec2bb19", &self.sec2bb19())
8337 .field("sec2bb20", &self.sec2bb20())
8338 .field("sec2bb21", &self.sec2bb21())
8339 .field("sec2bb22", &self.sec2bb22())
8340 .field("sec2bb23", &self.sec2bb23())
8341 .field("sec2bb24", &self.sec2bb24())
8342 .field("sec2bb25", &self.sec2bb25())
8343 .field("sec2bb26", &self.sec2bb26())
8344 .field("sec2bb27", &self.sec2bb27())
8345 .field("sec2bb28", &self.sec2bb28())
8346 .field("sec2bb29", &self.sec2bb29())
8347 .field("sec2bb30", &self.sec2bb30())
8348 .field("sec2bb31", &self.sec2bb31())
8349 .finish()
8350 }
8351 }
8352 #[cfg(feature = "defmt")]
8353 impl defmt::Format for Sec2bbr2 {
8354 fn format(&self, f: defmt::Formatter) {
8355 #[derive(defmt :: Format)]
8356 struct Sec2bbr2 {
8357 sec2bb0: bool,
8358 sec2bb1: bool,
8359 sec2bb2: bool,
8360 sec2bb3: bool,
8361 sec2bb4: bool,
8362 sec2bb5: bool,
8363 sec2bb6: bool,
8364 sec2bb7: bool,
8365 sec2bb8: bool,
8366 sec2bb9: bool,
8367 sec2bb10: bool,
8368 sec2bb11: bool,
8369 sec2bb12: bool,
8370 sec2bb13: bool,
8371 sec2bb14: bool,
8372 sec2bb15: bool,
8373 sec2bb16: bool,
8374 sec2bb17: bool,
8375 sec2bb18: bool,
8376 sec2bb19: bool,
8377 sec2bb20: bool,
8378 sec2bb21: bool,
8379 sec2bb22: bool,
8380 sec2bb23: bool,
8381 sec2bb24: bool,
8382 sec2bb25: bool,
8383 sec2bb26: bool,
8384 sec2bb27: bool,
8385 sec2bb28: bool,
8386 sec2bb29: bool,
8387 sec2bb30: bool,
8388 sec2bb31: bool,
8389 }
8390 let proxy = Sec2bbr2 {
8391 sec2bb0: self.sec2bb0(),
8392 sec2bb1: self.sec2bb1(),
8393 sec2bb2: self.sec2bb2(),
8394 sec2bb3: self.sec2bb3(),
8395 sec2bb4: self.sec2bb4(),
8396 sec2bb5: self.sec2bb5(),
8397 sec2bb6: self.sec2bb6(),
8398 sec2bb7: self.sec2bb7(),
8399 sec2bb8: self.sec2bb8(),
8400 sec2bb9: self.sec2bb9(),
8401 sec2bb10: self.sec2bb10(),
8402 sec2bb11: self.sec2bb11(),
8403 sec2bb12: self.sec2bb12(),
8404 sec2bb13: self.sec2bb13(),
8405 sec2bb14: self.sec2bb14(),
8406 sec2bb15: self.sec2bb15(),
8407 sec2bb16: self.sec2bb16(),
8408 sec2bb17: self.sec2bb17(),
8409 sec2bb18: self.sec2bb18(),
8410 sec2bb19: self.sec2bb19(),
8411 sec2bb20: self.sec2bb20(),
8412 sec2bb21: self.sec2bb21(),
8413 sec2bb22: self.sec2bb22(),
8414 sec2bb23: self.sec2bb23(),
8415 sec2bb24: self.sec2bb24(),
8416 sec2bb25: self.sec2bb25(),
8417 sec2bb26: self.sec2bb26(),
8418 sec2bb27: self.sec2bb27(),
8419 sec2bb28: self.sec2bb28(),
8420 sec2bb29: self.sec2bb29(),
8421 sec2bb30: self.sec2bb30(),
8422 sec2bb31: self.sec2bb31(),
8423 };
8424 defmt::write!(f, "{}", proxy)
8425 }
8426 }
8427 #[doc = "FLASH secure block based bank 2 register 3"]
8428 #[repr(transparent)]
8429 #[derive(Copy, Clone, Eq, PartialEq)]
8430 pub struct Sec2bbr3(pub u32);
8431 impl Sec2bbr3 {
8432 #[doc = "page secure/non-secure attribution"]
8433 #[inline(always)]
8434 pub const fn sec2bb0(&self) -> bool {
8435 let val = (self.0 >> 0usize) & 0x01;
8436 val != 0
8437 }
8438 #[doc = "page secure/non-secure attribution"]
8439 #[inline(always)]
8440 pub fn set_sec2bb0(&mut self, val: bool) {
8441 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
8442 }
8443 #[doc = "page secure/non-secure attribution"]
8444 #[inline(always)]
8445 pub const fn sec2bb1(&self) -> bool {
8446 let val = (self.0 >> 1usize) & 0x01;
8447 val != 0
8448 }
8449 #[doc = "page secure/non-secure attribution"]
8450 #[inline(always)]
8451 pub fn set_sec2bb1(&mut self, val: bool) {
8452 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
8453 }
8454 #[doc = "page secure/non-secure attribution"]
8455 #[inline(always)]
8456 pub const fn sec2bb2(&self) -> bool {
8457 let val = (self.0 >> 2usize) & 0x01;
8458 val != 0
8459 }
8460 #[doc = "page secure/non-secure attribution"]
8461 #[inline(always)]
8462 pub fn set_sec2bb2(&mut self, val: bool) {
8463 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
8464 }
8465 #[doc = "page secure/non-secure attribution"]
8466 #[inline(always)]
8467 pub const fn sec2bb3(&self) -> bool {
8468 let val = (self.0 >> 3usize) & 0x01;
8469 val != 0
8470 }
8471 #[doc = "page secure/non-secure attribution"]
8472 #[inline(always)]
8473 pub fn set_sec2bb3(&mut self, val: bool) {
8474 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
8475 }
8476 #[doc = "page secure/non-secure attribution"]
8477 #[inline(always)]
8478 pub const fn sec2bb4(&self) -> bool {
8479 let val = (self.0 >> 4usize) & 0x01;
8480 val != 0
8481 }
8482 #[doc = "page secure/non-secure attribution"]
8483 #[inline(always)]
8484 pub fn set_sec2bb4(&mut self, val: bool) {
8485 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
8486 }
8487 #[doc = "page secure/non-secure attribution"]
8488 #[inline(always)]
8489 pub const fn sec2bb5(&self) -> bool {
8490 let val = (self.0 >> 5usize) & 0x01;
8491 val != 0
8492 }
8493 #[doc = "page secure/non-secure attribution"]
8494 #[inline(always)]
8495 pub fn set_sec2bb5(&mut self, val: bool) {
8496 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
8497 }
8498 #[doc = "page secure/non-secure attribution"]
8499 #[inline(always)]
8500 pub const fn sec2bb6(&self) -> bool {
8501 let val = (self.0 >> 6usize) & 0x01;
8502 val != 0
8503 }
8504 #[doc = "page secure/non-secure attribution"]
8505 #[inline(always)]
8506 pub fn set_sec2bb6(&mut self, val: bool) {
8507 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
8508 }
8509 #[doc = "page secure/non-secure attribution"]
8510 #[inline(always)]
8511 pub const fn sec2bb7(&self) -> bool {
8512 let val = (self.0 >> 7usize) & 0x01;
8513 val != 0
8514 }
8515 #[doc = "page secure/non-secure attribution"]
8516 #[inline(always)]
8517 pub fn set_sec2bb7(&mut self, val: bool) {
8518 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
8519 }
8520 #[doc = "page secure/non-secure attribution"]
8521 #[inline(always)]
8522 pub const fn sec2bb8(&self) -> bool {
8523 let val = (self.0 >> 8usize) & 0x01;
8524 val != 0
8525 }
8526 #[doc = "page secure/non-secure attribution"]
8527 #[inline(always)]
8528 pub fn set_sec2bb8(&mut self, val: bool) {
8529 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
8530 }
8531 #[doc = "page secure/non-secure attribution"]
8532 #[inline(always)]
8533 pub const fn sec2bb9(&self) -> bool {
8534 let val = (self.0 >> 9usize) & 0x01;
8535 val != 0
8536 }
8537 #[doc = "page secure/non-secure attribution"]
8538 #[inline(always)]
8539 pub fn set_sec2bb9(&mut self, val: bool) {
8540 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
8541 }
8542 #[doc = "page secure/non-secure attribution"]
8543 #[inline(always)]
8544 pub const fn sec2bb10(&self) -> bool {
8545 let val = (self.0 >> 10usize) & 0x01;
8546 val != 0
8547 }
8548 #[doc = "page secure/non-secure attribution"]
8549 #[inline(always)]
8550 pub fn set_sec2bb10(&mut self, val: bool) {
8551 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
8552 }
8553 #[doc = "page secure/non-secure attribution"]
8554 #[inline(always)]
8555 pub const fn sec2bb11(&self) -> bool {
8556 let val = (self.0 >> 11usize) & 0x01;
8557 val != 0
8558 }
8559 #[doc = "page secure/non-secure attribution"]
8560 #[inline(always)]
8561 pub fn set_sec2bb11(&mut self, val: bool) {
8562 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
8563 }
8564 #[doc = "page secure/non-secure attribution"]
8565 #[inline(always)]
8566 pub const fn sec2bb12(&self) -> bool {
8567 let val = (self.0 >> 12usize) & 0x01;
8568 val != 0
8569 }
8570 #[doc = "page secure/non-secure attribution"]
8571 #[inline(always)]
8572 pub fn set_sec2bb12(&mut self, val: bool) {
8573 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
8574 }
8575 #[doc = "page secure/non-secure attribution"]
8576 #[inline(always)]
8577 pub const fn sec2bb13(&self) -> bool {
8578 let val = (self.0 >> 13usize) & 0x01;
8579 val != 0
8580 }
8581 #[doc = "page secure/non-secure attribution"]
8582 #[inline(always)]
8583 pub fn set_sec2bb13(&mut self, val: bool) {
8584 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
8585 }
8586 #[doc = "page secure/non-secure attribution"]
8587 #[inline(always)]
8588 pub const fn sec2bb14(&self) -> bool {
8589 let val = (self.0 >> 14usize) & 0x01;
8590 val != 0
8591 }
8592 #[doc = "page secure/non-secure attribution"]
8593 #[inline(always)]
8594 pub fn set_sec2bb14(&mut self, val: bool) {
8595 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
8596 }
8597 #[doc = "page secure/non-secure attribution"]
8598 #[inline(always)]
8599 pub const fn sec2bb15(&self) -> bool {
8600 let val = (self.0 >> 15usize) & 0x01;
8601 val != 0
8602 }
8603 #[doc = "page secure/non-secure attribution"]
8604 #[inline(always)]
8605 pub fn set_sec2bb15(&mut self, val: bool) {
8606 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
8607 }
8608 #[doc = "page secure/non-secure attribution"]
8609 #[inline(always)]
8610 pub const fn sec2bb16(&self) -> bool {
8611 let val = (self.0 >> 16usize) & 0x01;
8612 val != 0
8613 }
8614 #[doc = "page secure/non-secure attribution"]
8615 #[inline(always)]
8616 pub fn set_sec2bb16(&mut self, val: bool) {
8617 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
8618 }
8619 #[doc = "page secure/non-secure attribution"]
8620 #[inline(always)]
8621 pub const fn sec2bb17(&self) -> bool {
8622 let val = (self.0 >> 17usize) & 0x01;
8623 val != 0
8624 }
8625 #[doc = "page secure/non-secure attribution"]
8626 #[inline(always)]
8627 pub fn set_sec2bb17(&mut self, val: bool) {
8628 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
8629 }
8630 #[doc = "page secure/non-secure attribution"]
8631 #[inline(always)]
8632 pub const fn sec2bb18(&self) -> bool {
8633 let val = (self.0 >> 18usize) & 0x01;
8634 val != 0
8635 }
8636 #[doc = "page secure/non-secure attribution"]
8637 #[inline(always)]
8638 pub fn set_sec2bb18(&mut self, val: bool) {
8639 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
8640 }
8641 #[doc = "page secure/non-secure attribution"]
8642 #[inline(always)]
8643 pub const fn sec2bb19(&self) -> bool {
8644 let val = (self.0 >> 19usize) & 0x01;
8645 val != 0
8646 }
8647 #[doc = "page secure/non-secure attribution"]
8648 #[inline(always)]
8649 pub fn set_sec2bb19(&mut self, val: bool) {
8650 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
8651 }
8652 #[doc = "page secure/non-secure attribution"]
8653 #[inline(always)]
8654 pub const fn sec2bb20(&self) -> bool {
8655 let val = (self.0 >> 20usize) & 0x01;
8656 val != 0
8657 }
8658 #[doc = "page secure/non-secure attribution"]
8659 #[inline(always)]
8660 pub fn set_sec2bb20(&mut self, val: bool) {
8661 self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize);
8662 }
8663 #[doc = "page secure/non-secure attribution"]
8664 #[inline(always)]
8665 pub const fn sec2bb21(&self) -> bool {
8666 let val = (self.0 >> 21usize) & 0x01;
8667 val != 0
8668 }
8669 #[doc = "page secure/non-secure attribution"]
8670 #[inline(always)]
8671 pub fn set_sec2bb21(&mut self, val: bool) {
8672 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
8673 }
8674 #[doc = "page secure/non-secure attribution"]
8675 #[inline(always)]
8676 pub const fn sec2bb22(&self) -> bool {
8677 let val = (self.0 >> 22usize) & 0x01;
8678 val != 0
8679 }
8680 #[doc = "page secure/non-secure attribution"]
8681 #[inline(always)]
8682 pub fn set_sec2bb22(&mut self, val: bool) {
8683 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
8684 }
8685 #[doc = "page secure/non-secure attribution"]
8686 #[inline(always)]
8687 pub const fn sec2bb23(&self) -> bool {
8688 let val = (self.0 >> 23usize) & 0x01;
8689 val != 0
8690 }
8691 #[doc = "page secure/non-secure attribution"]
8692 #[inline(always)]
8693 pub fn set_sec2bb23(&mut self, val: bool) {
8694 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
8695 }
8696 #[doc = "page secure/non-secure attribution"]
8697 #[inline(always)]
8698 pub const fn sec2bb24(&self) -> bool {
8699 let val = (self.0 >> 24usize) & 0x01;
8700 val != 0
8701 }
8702 #[doc = "page secure/non-secure attribution"]
8703 #[inline(always)]
8704 pub fn set_sec2bb24(&mut self, val: bool) {
8705 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
8706 }
8707 #[doc = "page secure/non-secure attribution"]
8708 #[inline(always)]
8709 pub const fn sec2bb25(&self) -> bool {
8710 let val = (self.0 >> 25usize) & 0x01;
8711 val != 0
8712 }
8713 #[doc = "page secure/non-secure attribution"]
8714 #[inline(always)]
8715 pub fn set_sec2bb25(&mut self, val: bool) {
8716 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
8717 }
8718 #[doc = "page secure/non-secure attribution"]
8719 #[inline(always)]
8720 pub const fn sec2bb26(&self) -> bool {
8721 let val = (self.0 >> 26usize) & 0x01;
8722 val != 0
8723 }
8724 #[doc = "page secure/non-secure attribution"]
8725 #[inline(always)]
8726 pub fn set_sec2bb26(&mut self, val: bool) {
8727 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
8728 }
8729 #[doc = "page secure/non-secure attribution"]
8730 #[inline(always)]
8731 pub const fn sec2bb27(&self) -> bool {
8732 let val = (self.0 >> 27usize) & 0x01;
8733 val != 0
8734 }
8735 #[doc = "page secure/non-secure attribution"]
8736 #[inline(always)]
8737 pub fn set_sec2bb27(&mut self, val: bool) {
8738 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize);
8739 }
8740 #[doc = "page secure/non-secure attribution"]
8741 #[inline(always)]
8742 pub const fn sec2bb28(&self) -> bool {
8743 let val = (self.0 >> 28usize) & 0x01;
8744 val != 0
8745 }
8746 #[doc = "page secure/non-secure attribution"]
8747 #[inline(always)]
8748 pub fn set_sec2bb28(&mut self, val: bool) {
8749 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
8750 }
8751 #[doc = "page secure/non-secure attribution"]
8752 #[inline(always)]
8753 pub const fn sec2bb29(&self) -> bool {
8754 let val = (self.0 >> 29usize) & 0x01;
8755 val != 0
8756 }
8757 #[doc = "page secure/non-secure attribution"]
8758 #[inline(always)]
8759 pub fn set_sec2bb29(&mut self, val: bool) {
8760 self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize);
8761 }
8762 #[doc = "page secure/non-secure attribution"]
8763 #[inline(always)]
8764 pub const fn sec2bb30(&self) -> bool {
8765 let val = (self.0 >> 30usize) & 0x01;
8766 val != 0
8767 }
8768 #[doc = "page secure/non-secure attribution"]
8769 #[inline(always)]
8770 pub fn set_sec2bb30(&mut self, val: bool) {
8771 self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize);
8772 }
8773 #[doc = "page secure/non-secure attribution"]
8774 #[inline(always)]
8775 pub const fn sec2bb31(&self) -> bool {
8776 let val = (self.0 >> 31usize) & 0x01;
8777 val != 0
8778 }
8779 #[doc = "page secure/non-secure attribution"]
8780 #[inline(always)]
8781 pub fn set_sec2bb31(&mut self, val: bool) {
8782 self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize);
8783 }
8784 }
8785 impl Default for Sec2bbr3 {
8786 #[inline(always)]
8787 fn default() -> Sec2bbr3 {
8788 Sec2bbr3(0)
8789 }
8790 }
8791 impl core::fmt::Debug for Sec2bbr3 {
8792 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
8793 f.debug_struct("Sec2bbr3")
8794 .field("sec2bb0", &self.sec2bb0())
8795 .field("sec2bb1", &self.sec2bb1())
8796 .field("sec2bb2", &self.sec2bb2())
8797 .field("sec2bb3", &self.sec2bb3())
8798 .field("sec2bb4", &self.sec2bb4())
8799 .field("sec2bb5", &self.sec2bb5())
8800 .field("sec2bb6", &self.sec2bb6())
8801 .field("sec2bb7", &self.sec2bb7())
8802 .field("sec2bb8", &self.sec2bb8())
8803 .field("sec2bb9", &self.sec2bb9())
8804 .field("sec2bb10", &self.sec2bb10())
8805 .field("sec2bb11", &self.sec2bb11())
8806 .field("sec2bb12", &self.sec2bb12())
8807 .field("sec2bb13", &self.sec2bb13())
8808 .field("sec2bb14", &self.sec2bb14())
8809 .field("sec2bb15", &self.sec2bb15())
8810 .field("sec2bb16", &self.sec2bb16())
8811 .field("sec2bb17", &self.sec2bb17())
8812 .field("sec2bb18", &self.sec2bb18())
8813 .field("sec2bb19", &self.sec2bb19())
8814 .field("sec2bb20", &self.sec2bb20())
8815 .field("sec2bb21", &self.sec2bb21())
8816 .field("sec2bb22", &self.sec2bb22())
8817 .field("sec2bb23", &self.sec2bb23())
8818 .field("sec2bb24", &self.sec2bb24())
8819 .field("sec2bb25", &self.sec2bb25())
8820 .field("sec2bb26", &self.sec2bb26())
8821 .field("sec2bb27", &self.sec2bb27())
8822 .field("sec2bb28", &self.sec2bb28())
8823 .field("sec2bb29", &self.sec2bb29())
8824 .field("sec2bb30", &self.sec2bb30())
8825 .field("sec2bb31", &self.sec2bb31())
8826 .finish()
8827 }
8828 }
8829 #[cfg(feature = "defmt")]
8830 impl defmt::Format for Sec2bbr3 {
8831 fn format(&self, f: defmt::Formatter) {
8832 #[derive(defmt :: Format)]
8833 struct Sec2bbr3 {
8834 sec2bb0: bool,
8835 sec2bb1: bool,
8836 sec2bb2: bool,
8837 sec2bb3: bool,
8838 sec2bb4: bool,
8839 sec2bb5: bool,
8840 sec2bb6: bool,
8841 sec2bb7: bool,
8842 sec2bb8: bool,
8843 sec2bb9: bool,
8844 sec2bb10: bool,
8845 sec2bb11: bool,
8846 sec2bb12: bool,
8847 sec2bb13: bool,
8848 sec2bb14: bool,
8849 sec2bb15: bool,
8850 sec2bb16: bool,
8851 sec2bb17: bool,
8852 sec2bb18: bool,
8853 sec2bb19: bool,
8854 sec2bb20: bool,
8855 sec2bb21: bool,
8856 sec2bb22: bool,
8857 sec2bb23: bool,
8858 sec2bb24: bool,
8859 sec2bb25: bool,
8860 sec2bb26: bool,
8861 sec2bb27: bool,
8862 sec2bb28: bool,
8863 sec2bb29: bool,
8864 sec2bb30: bool,
8865 sec2bb31: bool,
8866 }
8867 let proxy = Sec2bbr3 {
8868 sec2bb0: self.sec2bb0(),
8869 sec2bb1: self.sec2bb1(),
8870 sec2bb2: self.sec2bb2(),
8871 sec2bb3: self.sec2bb3(),
8872 sec2bb4: self.sec2bb4(),
8873 sec2bb5: self.sec2bb5(),
8874 sec2bb6: self.sec2bb6(),
8875 sec2bb7: self.sec2bb7(),
8876 sec2bb8: self.sec2bb8(),
8877 sec2bb9: self.sec2bb9(),
8878 sec2bb10: self.sec2bb10(),
8879 sec2bb11: self.sec2bb11(),
8880 sec2bb12: self.sec2bb12(),
8881 sec2bb13: self.sec2bb13(),
8882 sec2bb14: self.sec2bb14(),
8883 sec2bb15: self.sec2bb15(),
8884 sec2bb16: self.sec2bb16(),
8885 sec2bb17: self.sec2bb17(),
8886 sec2bb18: self.sec2bb18(),
8887 sec2bb19: self.sec2bb19(),
8888 sec2bb20: self.sec2bb20(),
8889 sec2bb21: self.sec2bb21(),
8890 sec2bb22: self.sec2bb22(),
8891 sec2bb23: self.sec2bb23(),
8892 sec2bb24: self.sec2bb24(),
8893 sec2bb25: self.sec2bb25(),
8894 sec2bb26: self.sec2bb26(),
8895 sec2bb27: self.sec2bb27(),
8896 sec2bb28: self.sec2bb28(),
8897 sec2bb29: self.sec2bb29(),
8898 sec2bb30: self.sec2bb30(),
8899 sec2bb31: self.sec2bb31(),
8900 };
8901 defmt::write!(f, "{}", proxy)
8902 }
8903 }
8904 #[doc = "FLASH secure block based bank 2 register 4"]
8905 #[repr(transparent)]
8906 #[derive(Copy, Clone, Eq, PartialEq)]
8907 pub struct Sec2bbr4(pub u32);
8908 impl Sec2bbr4 {
8909 #[doc = "page secure/non-secure attribution"]
8910 #[inline(always)]
8911 pub const fn sec2bb0(&self) -> bool {
8912 let val = (self.0 >> 0usize) & 0x01;
8913 val != 0
8914 }
8915 #[doc = "page secure/non-secure attribution"]
8916 #[inline(always)]
8917 pub fn set_sec2bb0(&mut self, val: bool) {
8918 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
8919 }
8920 #[doc = "page secure/non-secure attribution"]
8921 #[inline(always)]
8922 pub const fn sec2bb1(&self) -> bool {
8923 let val = (self.0 >> 1usize) & 0x01;
8924 val != 0
8925 }
8926 #[doc = "page secure/non-secure attribution"]
8927 #[inline(always)]
8928 pub fn set_sec2bb1(&mut self, val: bool) {
8929 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
8930 }
8931 #[doc = "page secure/non-secure attribution"]
8932 #[inline(always)]
8933 pub const fn sec2bb2(&self) -> bool {
8934 let val = (self.0 >> 2usize) & 0x01;
8935 val != 0
8936 }
8937 #[doc = "page secure/non-secure attribution"]
8938 #[inline(always)]
8939 pub fn set_sec2bb2(&mut self, val: bool) {
8940 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
8941 }
8942 #[doc = "page secure/non-secure attribution"]
8943 #[inline(always)]
8944 pub const fn sec2bb3(&self) -> bool {
8945 let val = (self.0 >> 3usize) & 0x01;
8946 val != 0
8947 }
8948 #[doc = "page secure/non-secure attribution"]
8949 #[inline(always)]
8950 pub fn set_sec2bb3(&mut self, val: bool) {
8951 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
8952 }
8953 #[doc = "page secure/non-secure attribution"]
8954 #[inline(always)]
8955 pub const fn sec2bb4(&self) -> bool {
8956 let val = (self.0 >> 4usize) & 0x01;
8957 val != 0
8958 }
8959 #[doc = "page secure/non-secure attribution"]
8960 #[inline(always)]
8961 pub fn set_sec2bb4(&mut self, val: bool) {
8962 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
8963 }
8964 #[doc = "page secure/non-secure attribution"]
8965 #[inline(always)]
8966 pub const fn sec2bb5(&self) -> bool {
8967 let val = (self.0 >> 5usize) & 0x01;
8968 val != 0
8969 }
8970 #[doc = "page secure/non-secure attribution"]
8971 #[inline(always)]
8972 pub fn set_sec2bb5(&mut self, val: bool) {
8973 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
8974 }
8975 #[doc = "page secure/non-secure attribution"]
8976 #[inline(always)]
8977 pub const fn sec2bb6(&self) -> bool {
8978 let val = (self.0 >> 6usize) & 0x01;
8979 val != 0
8980 }
8981 #[doc = "page secure/non-secure attribution"]
8982 #[inline(always)]
8983 pub fn set_sec2bb6(&mut self, val: bool) {
8984 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
8985 }
8986 #[doc = "page secure/non-secure attribution"]
8987 #[inline(always)]
8988 pub const fn sec2bb7(&self) -> bool {
8989 let val = (self.0 >> 7usize) & 0x01;
8990 val != 0
8991 }
8992 #[doc = "page secure/non-secure attribution"]
8993 #[inline(always)]
8994 pub fn set_sec2bb7(&mut self, val: bool) {
8995 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
8996 }
8997 #[doc = "page secure/non-secure attribution"]
8998 #[inline(always)]
8999 pub const fn sec2bb8(&self) -> bool {
9000 let val = (self.0 >> 8usize) & 0x01;
9001 val != 0
9002 }
9003 #[doc = "page secure/non-secure attribution"]
9004 #[inline(always)]
9005 pub fn set_sec2bb8(&mut self, val: bool) {
9006 self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize);
9007 }
9008 #[doc = "page secure/non-secure attribution"]
9009 #[inline(always)]
9010 pub const fn sec2bb9(&self) -> bool {
9011 let val = (self.0 >> 9usize) & 0x01;
9012 val != 0
9013 }
9014 #[doc = "page secure/non-secure attribution"]
9015 #[inline(always)]
9016 pub fn set_sec2bb9(&mut self, val: bool) {
9017 self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize);
9018 }
9019 #[doc = "page secure/non-secure attribution"]
9020 #[inline(always)]
9021 pub const fn sec2bb10(&self) -> bool {
9022 let val = (self.0 >> 10usize) & 0x01;
9023 val != 0
9024 }
9025 #[doc = "page secure/non-secure attribution"]
9026 #[inline(always)]
9027 pub fn set_sec2bb10(&mut self, val: bool) {
9028 self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize);
9029 }
9030 #[doc = "page secure/non-secure attribution"]
9031 #[inline(always)]
9032 pub const fn sec2bb11(&self) -> bool {
9033 let val = (self.0 >> 11usize) & 0x01;
9034 val != 0
9035 }
9036 #[doc = "page secure/non-secure attribution"]
9037 #[inline(always)]
9038 pub fn set_sec2bb11(&mut self, val: bool) {
9039 self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize);
9040 }
9041 #[doc = "page secure/non-secure attribution"]
9042 #[inline(always)]
9043 pub const fn sec2bb12(&self) -> bool {
9044 let val = (self.0 >> 12usize) & 0x01;
9045 val != 0
9046 }
9047 #[doc = "page secure/non-secure attribution"]
9048 #[inline(always)]
9049 pub fn set_sec2bb12(&mut self, val: bool) {
9050 self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize);
9051 }
9052 #[doc = "page secure/non-secure attribution"]
9053 #[inline(always)]
9054 pub const fn sec2bb13(&self) -> bool {
9055 let val = (self.0 >> 13usize) & 0x01;
9056 val != 0
9057 }
9058 #[doc = "page secure/non-secure attribution"]
9059 #[inline(always)]
9060 pub fn set_sec2bb13(&mut self, val: bool) {
9061 self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize);
9062 }
9063 #[doc = "page secure/non-secure attribution"]
9064 #[inline(always)]
9065 pub const fn sec2bb14(&self) -> bool {
9066 let val = (self.0 >> 14usize) & 0x01;
9067 val != 0
9068 }
9069 #[doc = "page secure/non-secure attribution"]
9070 #[inline(always)]
9071 pub fn set_sec2bb14(&mut self, val: bool) {
9072 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
9073 }
9074 #[doc = "page secure/non-secure attribution"]
9075 #[inline(always)]
9076 pub const fn sec2bb15(&self) -> bool {
9077 let val = (self.0 >> 15usize) & 0x01;
9078 val != 0
9079 }
9080 #[doc = "page secure/non-secure attribution"]
9081 #[inline(always)]
9082 pub fn set_sec2bb15(&mut self, val: bool) {
9083 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
9084 }
9085 #[doc = "page secure/non-secure attribution"]
9086 #[inline(always)]
9087 pub const fn sec2bb16(&self) -> bool {
9088 let val = (self.0 >> 16usize) & 0x01;
9089 val != 0
9090 }
9091 #[doc = "page secure/non-secure attribution"]
9092 #[inline(always)]
9093 pub fn set_sec2bb16(&mut self, val: bool) {
9094 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
9095 }
9096 #[doc = "page secure/non-secure attribution"]
9097 #[inline(always)]
9098 pub const fn sec2bb17(&self) -> bool {
9099 let val = (self.0 >> 17usize) & 0x01;
9100 val != 0
9101 }
9102 #[doc = "page secure/non-secure attribution"]
9103 #[inline(always)]
9104 pub fn set_sec2bb17(&mut self, val: bool) {
9105 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
9106 }
9107 #[doc = "page secure/non-secure attribution"]
9108 #[inline(always)]
9109 pub const fn sec2bb18(&self) -> bool {
9110 let val = (self.0 >> 18usize) & 0x01;
9111 val != 0
9112 }
9113 #[doc = "page secure/non-secure attribution"]
9114 #[inline(always)]
9115 pub fn set_sec2bb18(&mut self, val: bool) {
9116 self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
9117 }
9118 #[doc = "page secure/non-secure attribution"]
9119 #[inline(always)]
9120 pub const fn sec2bb19(&self) -> bool {
9121 let val = (self.0 >> 19usize) & 0x01;
9122 val != 0
9123 }
9124 #[doc = "page secure/non-secure attribution"]
9125 #[inline(always)]
9126 pub fn set_sec2bb19(&mut self, val: bool) {
9127 self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
9128 }
9129 #[doc = "page secure/non-secure attribution"]
9130 #[inline(always)]
9131 pub const fn sec2bb20(&self) -> bool {
9132 let val = (self.0 >> 20usize) & 0x01;
9133 val != 0
9134 }
9135 #[doc = "page secure/non-secure attribution"]
9136 #[inline(always)]
9137 pub fn set_sec2bb20(&mut self, val: bool) {
9138 self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize);
9139 }
9140 #[doc = "page secure/non-secure attribution"]
9141 #[inline(always)]
9142 pub const fn sec2bb21(&self) -> bool {
9143 let val = (self.0 >> 21usize) & 0x01;
9144 val != 0
9145 }
9146 #[doc = "page secure/non-secure attribution"]
9147 #[inline(always)]
9148 pub fn set_sec2bb21(&mut self, val: bool) {
9149 self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
9150 }
9151 #[doc = "page secure/non-secure attribution"]
9152 #[inline(always)]
9153 pub const fn sec2bb22(&self) -> bool {
9154 let val = (self.0 >> 22usize) & 0x01;
9155 val != 0
9156 }
9157 #[doc = "page secure/non-secure attribution"]
9158 #[inline(always)]
9159 pub fn set_sec2bb22(&mut self, val: bool) {
9160 self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
9161 }
9162 #[doc = "page secure/non-secure attribution"]
9163 #[inline(always)]
9164 pub const fn sec2bb23(&self) -> bool {
9165 let val = (self.0 >> 23usize) & 0x01;
9166 val != 0
9167 }
9168 #[doc = "page secure/non-secure attribution"]
9169 #[inline(always)]
9170 pub fn set_sec2bb23(&mut self, val: bool) {
9171 self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
9172 }
9173 #[doc = "page secure/non-secure attribution"]
9174 #[inline(always)]
9175 pub const fn sec2bb24(&self) -> bool {
9176 let val = (self.0 >> 24usize) & 0x01;
9177 val != 0
9178 }
9179 #[doc = "page secure/non-secure attribution"]
9180 #[inline(always)]
9181 pub fn set_sec2bb24(&mut self, val: bool) {
9182 self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize);
9183 }
9184 #[doc = "page secure/non-secure attribution"]
9185 #[inline(always)]
9186 pub const fn sec2bb25(&self) -> bool {
9187 let val = (self.0 >> 25usize) & 0x01;
9188 val != 0
9189 }
9190 #[doc = "page secure/non-secure attribution"]
9191 #[inline(always)]
9192 pub fn set_sec2bb25(&mut self, val: bool) {
9193 self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize);
9194 }
9195 #[doc = "page secure/non-secure attribution"]
9196 #[inline(always)]
9197 pub const fn sec2bb26(&self) -> bool {
9198 let val = (self.0 >> 26usize) & 0x01;
9199 val != 0
9200 }
9201 #[doc = "page secure/non-secure attribution"]
9202 #[inline(always)]
9203 pub fn set_sec2bb26(&mut self, val: bool) {
9204 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
9205 }
9206 #[doc = "page secure/non-secure attribution"]
9207 #[inline(always)]
9208 pub const fn sec2bb27(&self) -> bool {
9209 let val = (self.0 >> 27usize) & 0x01;
9210 val != 0
9211 }
9212 #[doc = "page secure/non-secure attribution"]
9213 #[inline(always)]
9214 pub fn set_sec2bb27(&mut self, val: bool) {
9215 self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize);
9216 }
9217 #[doc = "page secure/non-secure attribution"]
9218 #[inline(always)]
9219 pub const fn sec2bb28(&self) -> bool {
9220 let val = (self.0 >> 28usize) & 0x01;
9221 val != 0
9222 }
9223 #[doc = "page secure/non-secure attribution"]
9224 #[inline(always)]
9225 pub fn set_sec2bb28(&mut self, val: bool) {
9226 self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize);
9227 }
9228 #[doc = "page secure/non-secure attribution"]
9229 #[inline(always)]
9230 pub const fn sec2bb29(&self) -> bool {
9231 let val = (self.0 >> 29usize) & 0x01;
9232 val != 0
9233 }
9234 #[doc = "page secure/non-secure attribution"]
9235 #[inline(always)]
9236 pub fn set_sec2bb29(&mut self, val: bool) {
9237 self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize);
9238 }
9239 #[doc = "page secure/non-secure attribution"]
9240 #[inline(always)]
9241 pub const fn sec2bb30(&self) -> bool {
9242 let val = (self.0 >> 30usize) & 0x01;
9243 val != 0
9244 }
9245 #[doc = "page secure/non-secure attribution"]
9246 #[inline(always)]
9247 pub fn set_sec2bb30(&mut self, val: bool) {
9248 self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize);
9249 }
9250 #[doc = "page secure/non-secure attribution"]
9251 #[inline(always)]
9252 pub const fn sec2bb31(&self) -> bool {
9253 let val = (self.0 >> 31usize) & 0x01;
9254 val != 0
9255 }
9256 #[doc = "page secure/non-secure attribution"]
9257 #[inline(always)]
9258 pub fn set_sec2bb31(&mut self, val: bool) {
9259 self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize);
9260 }
9261 }
9262 impl Default for Sec2bbr4 {
9263 #[inline(always)]
9264 fn default() -> Sec2bbr4 {
9265 Sec2bbr4(0)
9266 }
9267 }
9268 impl core::fmt::Debug for Sec2bbr4 {
9269 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
9270 f.debug_struct("Sec2bbr4")
9271 .field("sec2bb0", &self.sec2bb0())
9272 .field("sec2bb1", &self.sec2bb1())
9273 .field("sec2bb2", &self.sec2bb2())
9274 .field("sec2bb3", &self.sec2bb3())
9275 .field("sec2bb4", &self.sec2bb4())
9276 .field("sec2bb5", &self.sec2bb5())
9277 .field("sec2bb6", &self.sec2bb6())
9278 .field("sec2bb7", &self.sec2bb7())
9279 .field("sec2bb8", &self.sec2bb8())
9280 .field("sec2bb9", &self.sec2bb9())
9281 .field("sec2bb10", &self.sec2bb10())
9282 .field("sec2bb11", &self.sec2bb11())
9283 .field("sec2bb12", &self.sec2bb12())
9284 .field("sec2bb13", &self.sec2bb13())
9285 .field("sec2bb14", &self.sec2bb14())
9286 .field("sec2bb15", &self.sec2bb15())
9287 .field("sec2bb16", &self.sec2bb16())
9288 .field("sec2bb17", &self.sec2bb17())
9289 .field("sec2bb18", &self.sec2bb18())
9290 .field("sec2bb19", &self.sec2bb19())
9291 .field("sec2bb20", &self.sec2bb20())
9292 .field("sec2bb21", &self.sec2bb21())
9293 .field("sec2bb22", &self.sec2bb22())
9294 .field("sec2bb23", &self.sec2bb23())
9295 .field("sec2bb24", &self.sec2bb24())
9296 .field("sec2bb25", &self.sec2bb25())
9297 .field("sec2bb26", &self.sec2bb26())
9298 .field("sec2bb27", &self.sec2bb27())
9299 .field("sec2bb28", &self.sec2bb28())
9300 .field("sec2bb29", &self.sec2bb29())
9301 .field("sec2bb30", &self.sec2bb30())
9302 .field("sec2bb31", &self.sec2bb31())
9303 .finish()
9304 }
9305 }
9306 #[cfg(feature = "defmt")]
9307 impl defmt::Format for Sec2bbr4 {
9308 fn format(&self, f: defmt::Formatter) {
9309 #[derive(defmt :: Format)]
9310 struct Sec2bbr4 {
9311 sec2bb0: bool,
9312 sec2bb1: bool,
9313 sec2bb2: bool,
9314 sec2bb3: bool,
9315 sec2bb4: bool,
9316 sec2bb5: bool,
9317 sec2bb6: bool,
9318 sec2bb7: bool,
9319 sec2bb8: bool,
9320 sec2bb9: bool,
9321 sec2bb10: bool,
9322 sec2bb11: bool,
9323 sec2bb12: bool,
9324 sec2bb13: bool,
9325 sec2bb14: bool,
9326 sec2bb15: bool,
9327 sec2bb16: bool,
9328 sec2bb17: bool,
9329 sec2bb18: bool,
9330 sec2bb19: bool,
9331 sec2bb20: bool,
9332 sec2bb21: bool,
9333 sec2bb22: bool,
9334 sec2bb23: bool,
9335 sec2bb24: bool,
9336 sec2bb25: bool,
9337 sec2bb26: bool,
9338 sec2bb27: bool,
9339 sec2bb28: bool,
9340 sec2bb29: bool,
9341 sec2bb30: bool,
9342 sec2bb31: bool,
9343 }
9344 let proxy = Sec2bbr4 {
9345 sec2bb0: self.sec2bb0(),
9346 sec2bb1: self.sec2bb1(),
9347 sec2bb2: self.sec2bb2(),
9348 sec2bb3: self.sec2bb3(),
9349 sec2bb4: self.sec2bb4(),
9350 sec2bb5: self.sec2bb5(),
9351 sec2bb6: self.sec2bb6(),
9352 sec2bb7: self.sec2bb7(),
9353 sec2bb8: self.sec2bb8(),
9354 sec2bb9: self.sec2bb9(),
9355 sec2bb10: self.sec2bb10(),
9356 sec2bb11: self.sec2bb11(),
9357 sec2bb12: self.sec2bb12(),
9358 sec2bb13: self.sec2bb13(),
9359 sec2bb14: self.sec2bb14(),
9360 sec2bb15: self.sec2bb15(),
9361 sec2bb16: self.sec2bb16(),
9362 sec2bb17: self.sec2bb17(),
9363 sec2bb18: self.sec2bb18(),
9364 sec2bb19: self.sec2bb19(),
9365 sec2bb20: self.sec2bb20(),
9366 sec2bb21: self.sec2bb21(),
9367 sec2bb22: self.sec2bb22(),
9368 sec2bb23: self.sec2bb23(),
9369 sec2bb24: self.sec2bb24(),
9370 sec2bb25: self.sec2bb25(),
9371 sec2bb26: self.sec2bb26(),
9372 sec2bb27: self.sec2bb27(),
9373 sec2bb28: self.sec2bb28(),
9374 sec2bb29: self.sec2bb29(),
9375 sec2bb30: self.sec2bb30(),
9376 sec2bb31: self.sec2bb31(),
9377 };
9378 defmt::write!(f, "{}", proxy)
9379 }
9380 }
9381 #[doc = "FLASH secure boot address 0 register"]
9382 #[repr(transparent)]
9383 #[derive(Copy, Clone, Eq, PartialEq)]
9384 pub struct Secbootadd0r(pub u32);
9385 impl Secbootadd0r {
9386 #[doc = "Boot lock When set, the boot is always forced to base address value programmed in SECBOOTADD0\\[24:0\\]
9387option bytes whatever the boot selection option. When set, this bit can only be cleared by an RDP at level 0."]
9388 #[inline(always)]
9389 pub const fn boot_lock(&self) -> bool {
9390 let val = (self.0 >> 0usize) & 0x01;
9391 val != 0
9392 }
9393 #[doc = "Boot lock When set, the boot is always forced to base address value programmed in SECBOOTADD0\\[24:0\\]
9394option bytes whatever the boot selection option. When set, this bit can only be cleared by an RDP at level 0."]
9395 #[inline(always)]
9396 pub fn set_boot_lock(&mut self, val: bool) {
9397 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
9398 }
9399 #[doc = "Secure boot base address 0 The secure boot memory address can be programmed to any address in the valid address range with a granularity of 128 bytes. This bits correspond to address \\[31:7\\]
9400The SECBOOTADD0 option bytes are selected following the BOOT0 pin or nSWBOOT0 state. Examples: SECBOOTADD0\\[24:0\\]
9401= 0x018 0000: Boot from secure Flash memory (0x0C00 0000) SECBOOTADD0\\[24:0\\]
9402= 0x01F F000: Boot from RSS (0x0FF8 0000) SECBOOTADD0\\[24:0\\]
9403= 0x060 0000: Boot from secure SRAM1 on S-Bus (0x3000 0000)"]
9404 #[inline(always)]
9405 pub const fn secbootadd0(&self) -> u32 {
9406 let val = (self.0 >> 7usize) & 0x01ff_ffff;
9407 val as u32
9408 }
9409 #[doc = "Secure boot base address 0 The secure boot memory address can be programmed to any address in the valid address range with a granularity of 128 bytes. This bits correspond to address \\[31:7\\]
9410The SECBOOTADD0 option bytes are selected following the BOOT0 pin or nSWBOOT0 state. Examples: SECBOOTADD0\\[24:0\\]
9411= 0x018 0000: Boot from secure Flash memory (0x0C00 0000) SECBOOTADD0\\[24:0\\]
9412= 0x01F F000: Boot from RSS (0x0FF8 0000) SECBOOTADD0\\[24:0\\]
9413= 0x060 0000: Boot from secure SRAM1 on S-Bus (0x3000 0000)"]
9414 #[inline(always)]
9415 pub fn set_secbootadd0(&mut self, val: u32) {
9416 self.0 = (self.0 & !(0x01ff_ffff << 7usize)) | (((val as u32) & 0x01ff_ffff) << 7usize);
9417 }
9418 }
9419 impl Default for Secbootadd0r {
9420 #[inline(always)]
9421 fn default() -> Secbootadd0r {
9422 Secbootadd0r(0)
9423 }
9424 }
9425 impl core::fmt::Debug for Secbootadd0r {
9426 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
9427 f.debug_struct("Secbootadd0r")
9428 .field("boot_lock", &self.boot_lock())
9429 .field("secbootadd0", &self.secbootadd0())
9430 .finish()
9431 }
9432 }
9433 #[cfg(feature = "defmt")]
9434 impl defmt::Format for Secbootadd0r {
9435 fn format(&self, f: defmt::Formatter) {
9436 #[derive(defmt :: Format)]
9437 struct Secbootadd0r {
9438 boot_lock: bool,
9439 secbootadd0: u32,
9440 }
9441 let proxy = Secbootadd0r {
9442 boot_lock: self.boot_lock(),
9443 secbootadd0: self.secbootadd0(),
9444 };
9445 defmt::write!(f, "{}", proxy)
9446 }
9447 }
9448 #[doc = "FLASH secure control register"]
9449 #[repr(transparent)]
9450 #[derive(Copy, Clone, Eq, PartialEq)]
9451 pub struct Seccr(pub u32);
9452 impl Seccr {
9453 #[doc = "Secure programming"]
9454 #[inline(always)]
9455 pub const fn pg(&self) -> super::vals::SeccrPg {
9456 let val = (self.0 >> 0usize) & 0x01;
9457 super::vals::SeccrPg::from_bits(val as u8)
9458 }
9459 #[doc = "Secure programming"]
9460 #[inline(always)]
9461 pub fn set_pg(&mut self, val: super::vals::SeccrPg) {
9462 self.0 = (self.0 & !(0x01 << 0usize)) | (((val.to_bits() as u32) & 0x01) << 0usize);
9463 }
9464 #[doc = "Secure page erase"]
9465 #[inline(always)]
9466 pub const fn per(&self) -> super::vals::SeccrPer {
9467 let val = (self.0 >> 1usize) & 0x01;
9468 super::vals::SeccrPer::from_bits(val as u8)
9469 }
9470 #[doc = "Secure page erase"]
9471 #[inline(always)]
9472 pub fn set_per(&mut self, val: super::vals::SeccrPer) {
9473 self.0 = (self.0 & !(0x01 << 1usize)) | (((val.to_bits() as u32) & 0x01) << 1usize);
9474 }
9475 #[doc = "Secure bank 1 mass erase This bit triggers the bank 1 secure mass erase (all bank 1 user pages) when set."]
9476 #[inline(always)]
9477 pub const fn mer1(&self) -> bool {
9478 let val = (self.0 >> 2usize) & 0x01;
9479 val != 0
9480 }
9481 #[doc = "Secure bank 1 mass erase This bit triggers the bank 1 secure mass erase (all bank 1 user pages) when set."]
9482 #[inline(always)]
9483 pub fn set_mer1(&mut self, val: bool) {
9484 self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
9485 }
9486 #[doc = "Secure page number selection These bits select the page to erase: ..."]
9487 #[inline(always)]
9488 pub const fn pnb(&self) -> u8 {
9489 let val = (self.0 >> 3usize) & 0xff;
9490 val as u8
9491 }
9492 #[doc = "Secure page number selection These bits select the page to erase: ..."]
9493 #[inline(always)]
9494 pub fn set_pnb(&mut self, val: u8) {
9495 self.0 = (self.0 & !(0xff << 3usize)) | (((val as u32) & 0xff) << 3usize);
9496 }
9497 #[doc = "Secure bank selection for page erase"]
9498 #[inline(always)]
9499 pub const fn bker(&self) -> super::vals::SeccrBker {
9500 let val = (self.0 >> 11usize) & 0x01;
9501 super::vals::SeccrBker::from_bits(val as u8)
9502 }
9503 #[doc = "Secure bank selection for page erase"]
9504 #[inline(always)]
9505 pub fn set_bker(&mut self, val: super::vals::SeccrBker) {
9506 self.0 = (self.0 & !(0x01 << 11usize)) | (((val.to_bits() as u32) & 0x01) << 11usize);
9507 }
9508 #[doc = "Secure burst write programming mode When set, this bit selects the burst write programming mode."]
9509 #[inline(always)]
9510 pub const fn bwr(&self) -> bool {
9511 let val = (self.0 >> 14usize) & 0x01;
9512 val != 0
9513 }
9514 #[doc = "Secure burst write programming mode When set, this bit selects the burst write programming mode."]
9515 #[inline(always)]
9516 pub fn set_bwr(&mut self, val: bool) {
9517 self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize);
9518 }
9519 #[doc = "Secure bank 2 mass erase This bit triggers the bank 2 secure mass erase (all bank 2 user pages) when set."]
9520 #[inline(always)]
9521 pub const fn mer2(&self) -> bool {
9522 let val = (self.0 >> 15usize) & 0x01;
9523 val != 0
9524 }
9525 #[doc = "Secure bank 2 mass erase This bit triggers the bank 2 secure mass erase (all bank 2 user pages) when set."]
9526 #[inline(always)]
9527 pub fn set_mer2(&mut self, val: bool) {
9528 self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize);
9529 }
9530 #[doc = "Secure start This bit triggers a secure erase operation when set. If MER1, MER2 and PER bits are reset and the STRT bit is set, the PGSERR in the FLASH_SECSR is set (this condition is forbidden). This bit is set only by software and is cleared when the BSY bit is cleared in FLASH_SECSR."]
9531 #[inline(always)]
9532 pub const fn strt(&self) -> bool {
9533 let val = (self.0 >> 16usize) & 0x01;
9534 val != 0
9535 }
9536 #[doc = "Secure start This bit triggers a secure erase operation when set. If MER1, MER2 and PER bits are reset and the STRT bit is set, the PGSERR in the FLASH_SECSR is set (this condition is forbidden). This bit is set only by software and is cleared when the BSY bit is cleared in FLASH_SECSR."]
9537 #[inline(always)]
9538 pub fn set_strt(&mut self, val: bool) {
9539 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
9540 }
9541 #[doc = "Secure End of operation interrupt enable This bit enables the interrupt generation when the EOP bit in the FLASH_SECSR is set to 1."]
9542 #[inline(always)]
9543 pub const fn eopie(&self) -> super::vals::SeccrEopie {
9544 let val = (self.0 >> 24usize) & 0x01;
9545 super::vals::SeccrEopie::from_bits(val as u8)
9546 }
9547 #[doc = "Secure End of operation interrupt enable This bit enables the interrupt generation when the EOP bit in the FLASH_SECSR is set to 1."]
9548 #[inline(always)]
9549 pub fn set_eopie(&mut self, val: super::vals::SeccrEopie) {
9550 self.0 = (self.0 & !(0x01 << 24usize)) | (((val.to_bits() as u32) & 0x01) << 24usize);
9551 }
9552 #[doc = "Secure error interrupt enable"]
9553 #[inline(always)]
9554 pub const fn errie(&self) -> super::vals::SeccrErrie {
9555 let val = (self.0 >> 25usize) & 0x01;
9556 super::vals::SeccrErrie::from_bits(val as u8)
9557 }
9558 #[doc = "Secure error interrupt enable"]
9559 #[inline(always)]
9560 pub fn set_errie(&mut self, val: super::vals::SeccrErrie) {
9561 self.0 = (self.0 & !(0x01 << 25usize)) | (((val.to_bits() as u32) & 0x01) << 25usize);
9562 }
9563 #[doc = "Secure PCROP read error interrupt enable"]
9564 #[inline(always)]
9565 pub const fn rderrie(&self) -> bool {
9566 let val = (self.0 >> 26usize) & 0x01;
9567 val != 0
9568 }
9569 #[doc = "Secure PCROP read error interrupt enable"]
9570 #[inline(always)]
9571 pub fn set_rderrie(&mut self, val: bool) {
9572 self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize);
9573 }
9574 #[doc = "Flash memory security state invert This bit inverts the Flash memory security state."]
9575 #[inline(always)]
9576 pub const fn inv(&self) -> bool {
9577 let val = (self.0 >> 29usize) & 0x01;
9578 val != 0
9579 }
9580 #[doc = "Flash memory security state invert This bit inverts the Flash memory security state."]
9581 #[inline(always)]
9582 pub fn set_inv(&mut self, val: bool) {
9583 self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize);
9584 }
9585 #[doc = "Secure lock This bit is set only. When set, the FLASH_SECCR register is locked. It is cleared by hardware after detecting the unlock sequence in FLASH_SECKEYR register. In case of an unsuccessful unlock operation, this bit remains set until the next system reset."]
9586 #[inline(always)]
9587 pub const fn lock(&self) -> bool {
9588 let val = (self.0 >> 31usize) & 0x01;
9589 val != 0
9590 }
9591 #[doc = "Secure lock This bit is set only. When set, the FLASH_SECCR register is locked. It is cleared by hardware after detecting the unlock sequence in FLASH_SECKEYR register. In case of an unsuccessful unlock operation, this bit remains set until the next system reset."]
9592 #[inline(always)]
9593 pub fn set_lock(&mut self, val: bool) {
9594 self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize);
9595 }
9596 }
9597 impl Default for Seccr {
9598 #[inline(always)]
9599 fn default() -> Seccr {
9600 Seccr(0)
9601 }
9602 }
9603 impl core::fmt::Debug for Seccr {
9604 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
9605 f.debug_struct("Seccr")
9606 .field("pg", &self.pg())
9607 .field("per", &self.per())
9608 .field("mer1", &self.mer1())
9609 .field("pnb", &self.pnb())
9610 .field("bker", &self.bker())
9611 .field("bwr", &self.bwr())
9612 .field("mer2", &self.mer2())
9613 .field("strt", &self.strt())
9614 .field("eopie", &self.eopie())
9615 .field("errie", &self.errie())
9616 .field("rderrie", &self.rderrie())
9617 .field("inv", &self.inv())
9618 .field("lock", &self.lock())
9619 .finish()
9620 }
9621 }
9622 #[cfg(feature = "defmt")]
9623 impl defmt::Format for Seccr {
9624 fn format(&self, f: defmt::Formatter) {
9625 #[derive(defmt :: Format)]
9626 struct Seccr {
9627 pg: super::vals::SeccrPg,
9628 per: super::vals::SeccrPer,
9629 mer1: bool,
9630 pnb: u8,
9631 bker: super::vals::SeccrBker,
9632 bwr: bool,
9633 mer2: bool,
9634 strt: bool,
9635 eopie: super::vals::SeccrEopie,
9636 errie: super::vals::SeccrErrie,
9637 rderrie: bool,
9638 inv: bool,
9639 lock: bool,
9640 }
9641 let proxy = Seccr {
9642 pg: self.pg(),
9643 per: self.per(),
9644 mer1: self.mer1(),
9645 pnb: self.pnb(),
9646 bker: self.bker(),
9647 bwr: self.bwr(),
9648 mer2: self.mer2(),
9649 strt: self.strt(),
9650 eopie: self.eopie(),
9651 errie: self.errie(),
9652 rderrie: self.rderrie(),
9653 inv: self.inv(),
9654 lock: self.lock(),
9655 };
9656 defmt::write!(f, "{}", proxy)
9657 }
9658 }
9659 #[doc = "FLASH secure HDP control register"]
9660 #[repr(transparent)]
9661 #[derive(Copy, Clone, Eq, PartialEq)]
9662 pub struct Sechdpcr(pub u32);
9663 impl Sechdpcr {
9664 #[doc = "HDP1 area access disable When set, this bit is only cleared by a system reset."]
9665 #[inline(always)]
9666 pub const fn hdp1_accdis(&self) -> super::vals::HdpAccdis {
9667 let val = (self.0 >> 0usize) & 0x01;
9668 super::vals::HdpAccdis::from_bits(val as u8)
9669 }
9670 #[doc = "HDP1 area access disable When set, this bit is only cleared by a system reset."]
9671 #[inline(always)]
9672 pub fn set_hdp1_accdis(&mut self, val: super::vals::HdpAccdis) {
9673 self.0 = (self.0 & !(0x01 << 0usize)) | (((val.to_bits() as u32) & 0x01) << 0usize);
9674 }
9675 #[doc = "HDP2 area access disable When set, this bit is only cleared by a system reset."]
9676 #[inline(always)]
9677 pub const fn hdp2_accdis(&self) -> super::vals::HdpAccdis {
9678 let val = (self.0 >> 1usize) & 0x01;
9679 super::vals::HdpAccdis::from_bits(val as u8)
9680 }
9681 #[doc = "HDP2 area access disable When set, this bit is only cleared by a system reset."]
9682 #[inline(always)]
9683 pub fn set_hdp2_accdis(&mut self, val: super::vals::HdpAccdis) {
9684 self.0 = (self.0 & !(0x01 << 1usize)) | (((val.to_bits() as u32) & 0x01) << 1usize);
9685 }
9686 }
9687 impl Default for Sechdpcr {
9688 #[inline(always)]
9689 fn default() -> Sechdpcr {
9690 Sechdpcr(0)
9691 }
9692 }
9693 impl core::fmt::Debug for Sechdpcr {
9694 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
9695 f.debug_struct("Sechdpcr")
9696 .field("hdp1_accdis", &self.hdp1_accdis())
9697 .field("hdp2_accdis", &self.hdp2_accdis())
9698 .finish()
9699 }
9700 }
9701 #[cfg(feature = "defmt")]
9702 impl defmt::Format for Sechdpcr {
9703 fn format(&self, f: defmt::Formatter) {
9704 #[derive(defmt :: Format)]
9705 struct Sechdpcr {
9706 hdp1_accdis: super::vals::HdpAccdis,
9707 hdp2_accdis: super::vals::HdpAccdis,
9708 }
9709 let proxy = Sechdpcr {
9710 hdp1_accdis: self.hdp1_accdis(),
9711 hdp2_accdis: self.hdp2_accdis(),
9712 };
9713 defmt::write!(f, "{}", proxy)
9714 }
9715 }
9716 #[doc = "FLASH secure status register"]
9717 #[repr(transparent)]
9718 #[derive(Copy, Clone, Eq, PartialEq)]
9719 pub struct Secsr(pub u32);
9720 impl Secsr {
9721 #[doc = "Secure end of operation This bit is set by hardware when one or more Flash memory secure operation (program/erase) has been completed successfully. This bit is set only if the secure end of operation interrupts are enabled (EOPIE = 1 in FLASH_SECCR). This bit is cleared by writing 1."]
9722 #[inline(always)]
9723 pub const fn eop(&self) -> bool {
9724 let val = (self.0 >> 0usize) & 0x01;
9725 val != 0
9726 }
9727 #[doc = "Secure end of operation This bit is set by hardware when one or more Flash memory secure operation (program/erase) has been completed successfully. This bit is set only if the secure end of operation interrupts are enabled (EOPIE = 1 in FLASH_SECCR). This bit is cleared by writing 1."]
9728 #[inline(always)]
9729 pub fn set_eop(&mut self, val: bool) {
9730 self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
9731 }
9732 #[doc = "Secure operation error This bit is set by hardware when a Flash memory secure operation (program/erase) completes unsuccessfully. This bit is set only if secure error interrupts are enabled (SECERRIE = 1). This bit is cleared by writing 1."]
9733 #[inline(always)]
9734 pub const fn operr(&self) -> bool {
9735 let val = (self.0 >> 1usize) & 0x01;
9736 val != 0
9737 }
9738 #[doc = "Secure operation error This bit is set by hardware when a Flash memory secure operation (program/erase) completes unsuccessfully. This bit is set only if secure error interrupts are enabled (SECERRIE = 1). This bit is cleared by writing 1."]
9739 #[inline(always)]
9740 pub fn set_operr(&mut self, val: bool) {
9741 self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
9742 }
9743 #[doc = "Secure programming error This bit is set by hardware when a secure quad-word address to be programmed contains a value different from all 1 before programming, except if the data to write is all 0. This bit is cleared by writing 1."]
9744 #[inline(always)]
9745 pub const fn progerr(&self) -> bool {
9746 let val = (self.0 >> 3usize) & 0x01;
9747 val != 0
9748 }
9749 #[doc = "Secure programming error This bit is set by hardware when a secure quad-word address to be programmed contains a value different from all 1 before programming, except if the data to write is all 0. This bit is cleared by writing 1."]
9750 #[inline(always)]
9751 pub fn set_progerr(&mut self, val: bool) {
9752 self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
9753 }
9754 #[doc = "Secure write protection error This bit is set by hardware when an secure address to be erased/programmed belongs to a write-protected part (by WRP, PCROP, HDP or RDP level 1) of the Flash memory.This bit is cleared by writing 1. Refer to for full conditions of error flag setting."]
9755 #[inline(always)]
9756 pub const fn wrperr(&self) -> bool {
9757 let val = (self.0 >> 4usize) & 0x01;
9758 val != 0
9759 }
9760 #[doc = "Secure write protection error This bit is set by hardware when an secure address to be erased/programmed belongs to a write-protected part (by WRP, PCROP, HDP or RDP level 1) of the Flash memory.This bit is cleared by writing 1. Refer to for full conditions of error flag setting."]
9761 #[inline(always)]
9762 pub fn set_wrperr(&mut self, val: bool) {
9763 self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
9764 }
9765 #[doc = "Secure programming alignment error This bit is set by hardware when the first word to be programmed is not aligned with a quad-word address, or the second, third or forth word does not belong to the same quad-word address.This bit is cleared by writing 1."]
9766 #[inline(always)]
9767 pub const fn pgaerr(&self) -> bool {
9768 let val = (self.0 >> 5usize) & 0x01;
9769 val != 0
9770 }
9771 #[doc = "Secure programming alignment error This bit is set by hardware when the first word to be programmed is not aligned with a quad-word address, or the second, third or forth word does not belong to the same quad-word address.This bit is cleared by writing 1."]
9772 #[inline(always)]
9773 pub fn set_pgaerr(&mut self, val: bool) {
9774 self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
9775 }
9776 #[doc = "Secure size error This bit is set by hardware when the size of the access is a byte or half-word during a secure program sequence. Only quad-word programming is allowed by means of successive word accesses.This bit is cleared by writing 1."]
9777 #[inline(always)]
9778 pub const fn sizerr(&self) -> bool {
9779 let val = (self.0 >> 6usize) & 0x01;
9780 val != 0
9781 }
9782 #[doc = "Secure size error This bit is set by hardware when the size of the access is a byte or half-word during a secure program sequence. Only quad-word programming is allowed by means of successive word accesses.This bit is cleared by writing 1."]
9783 #[inline(always)]
9784 pub fn set_sizerr(&mut self, val: bool) {
9785 self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
9786 }
9787 #[doc = "Secure programming sequence error This bit is set by hardware when programming sequence is not correct. It is cleared by writing 1. Refer to for full conditions of error flag setting."]
9788 #[inline(always)]
9789 pub const fn pgserr(&self) -> bool {
9790 let val = (self.0 >> 7usize) & 0x01;
9791 val != 0
9792 }
9793 #[doc = "Secure programming sequence error This bit is set by hardware when programming sequence is not correct. It is cleared by writing 1. Refer to for full conditions of error flag setting."]
9794 #[inline(always)]
9795 pub fn set_pgserr(&mut self, val: bool) {
9796 self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize);
9797 }
9798 #[doc = "Secure busy This bit indicates that a Flash memory secure or non-secure operation is in progress. This is set on the beginning of a Flash operation and reset when the operation finishes or when an error occurs."]
9799 #[inline(always)]
9800 pub const fn bsy(&self) -> bool {
9801 let val = (self.0 >> 16usize) & 0x01;
9802 val != 0
9803 }
9804 #[doc = "Secure busy This bit indicates that a Flash memory secure or non-secure operation is in progress. This is set on the beginning of a Flash operation and reset when the operation finishes or when an error occurs."]
9805 #[inline(always)]
9806 pub fn set_bsy(&mut self, val: bool) {
9807 self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
9808 }
9809 #[doc = "Secure wait data to write This bit indicates that the Flash memory write buffer has been written by a secure or non-secure operation. It is set when the first data is stored in the buffer and cleared when the write is performed in the Flash memory."]
9810 #[inline(always)]
9811 pub const fn wdw(&self) -> bool {
9812 let val = (self.0 >> 17usize) & 0x01;
9813 val != 0
9814 }
9815 #[doc = "Secure wait data to write This bit indicates that the Flash memory write buffer has been written by a secure or non-secure operation. It is set when the first data is stored in the buffer and cleared when the write is performed in the Flash memory."]
9816 #[inline(always)]
9817 pub fn set_wdw(&mut self, val: bool) {
9818 self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
9819 }
9820 }
9821 impl Default for Secsr {
9822 #[inline(always)]
9823 fn default() -> Secsr {
9824 Secsr(0)
9825 }
9826 }
9827 impl core::fmt::Debug for Secsr {
9828 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
9829 f.debug_struct("Secsr")
9830 .field("eop", &self.eop())
9831 .field("operr", &self.operr())
9832 .field("progerr", &self.progerr())
9833 .field("wrperr", &self.wrperr())
9834 .field("pgaerr", &self.pgaerr())
9835 .field("sizerr", &self.sizerr())
9836 .field("pgserr", &self.pgserr())
9837 .field("bsy", &self.bsy())
9838 .field("wdw", &self.wdw())
9839 .finish()
9840 }
9841 }
9842 #[cfg(feature = "defmt")]
9843 impl defmt::Format for Secsr {
9844 fn format(&self, f: defmt::Formatter) {
9845 #[derive(defmt :: Format)]
9846 struct Secsr {
9847 eop: bool,
9848 operr: bool,
9849 progerr: bool,
9850 wrperr: bool,
9851 pgaerr: bool,
9852 sizerr: bool,
9853 pgserr: bool,
9854 bsy: bool,
9855 wdw: bool,
9856 }
9857 let proxy = Secsr {
9858 eop: self.eop(),
9859 operr: self.operr(),
9860 progerr: self.progerr(),
9861 wrperr: self.wrperr(),
9862 pgaerr: self.pgaerr(),
9863 sizerr: self.sizerr(),
9864 pgserr: self.pgserr(),
9865 bsy: self.bsy(),
9866 wdw: self.wdw(),
9867 };
9868 defmt::write!(f, "{}", proxy)
9869 }
9870 }
9871 #[doc = "FLASH secure watermark1 register 1"]
9872 #[repr(transparent)]
9873 #[derive(Copy, Clone, Eq, PartialEq)]
9874 pub struct Secwm1r1(pub u32);
9875 impl Secwm1r1 {
9876 #[doc = "Start page of first secure area This field contains the first page of the secure area in bank 1."]
9877 #[inline(always)]
9878 pub const fn secwm1_pstrt(&self) -> u8 {
9879 let val = (self.0 >> 0usize) & 0x7f;
9880 val as u8
9881 }
9882 #[doc = "Start page of first secure area This field contains the first page of the secure area in bank 1."]
9883 #[inline(always)]
9884 pub fn set_secwm1_pstrt(&mut self, val: u8) {
9885 self.0 = (self.0 & !(0x7f << 0usize)) | (((val as u32) & 0x7f) << 0usize);
9886 }
9887 #[doc = "End page of first secure area This field contains the last page of the secure area in bank 1."]
9888 #[inline(always)]
9889 pub const fn secwm1_pend(&self) -> u8 {
9890 let val = (self.0 >> 16usize) & 0x7f;
9891 val as u8
9892 }
9893 #[doc = "End page of first secure area This field contains the last page of the secure area in bank 1."]
9894 #[inline(always)]
9895 pub fn set_secwm1_pend(&mut self, val: u8) {
9896 self.0 = (self.0 & !(0x7f << 16usize)) | (((val as u32) & 0x7f) << 16usize);
9897 }
9898 }
9899 impl Default for Secwm1r1 {
9900 #[inline(always)]
9901 fn default() -> Secwm1r1 {
9902 Secwm1r1(0)
9903 }
9904 }
9905 impl core::fmt::Debug for Secwm1r1 {
9906 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
9907 f.debug_struct("Secwm1r1")
9908 .field("secwm1_pstrt", &self.secwm1_pstrt())
9909 .field("secwm1_pend", &self.secwm1_pend())
9910 .finish()
9911 }
9912 }
9913 #[cfg(feature = "defmt")]
9914 impl defmt::Format for Secwm1r1 {
9915 fn format(&self, f: defmt::Formatter) {
9916 #[derive(defmt :: Format)]
9917 struct Secwm1r1 {
9918 secwm1_pstrt: u8,
9919 secwm1_pend: u8,
9920 }
9921 let proxy = Secwm1r1 {
9922 secwm1_pstrt: self.secwm1_pstrt(),
9923 secwm1_pend: self.secwm1_pend(),
9924 };
9925 defmt::write!(f, "{}", proxy)
9926 }
9927 }
9928 #[doc = "FLASH secure watermark1 register 2"]
9929 #[repr(transparent)]
9930 #[derive(Copy, Clone, Eq, PartialEq)]
9931 pub struct Secwm1r2(pub u32);
9932 impl Secwm1r2 {
9933 #[doc = "End page of first hide protection area This field contains the last page of the HDP area in bank 1."]
9934 #[inline(always)]
9935 pub const fn hdp1_pend(&self) -> u8 {
9936 let val = (self.0 >> 16usize) & 0x7f;
9937 val as u8
9938 }
9939 #[doc = "End page of first hide protection area This field contains the last page of the HDP area in bank 1."]
9940 #[inline(always)]
9941 pub fn set_hdp1_pend(&mut self, val: u8) {
9942 self.0 = (self.0 & !(0x7f << 16usize)) | (((val as u32) & 0x7f) << 16usize);
9943 }
9944 #[doc = "Hide protection first area enable"]
9945 #[inline(always)]
9946 pub const fn hdp1en(&self) -> bool {
9947 let val = (self.0 >> 31usize) & 0x01;
9948 val != 0
9949 }
9950 #[doc = "Hide protection first area enable"]
9951 #[inline(always)]
9952 pub fn set_hdp1en(&mut self, val: bool) {
9953 self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize);
9954 }
9955 }
9956 impl Default for Secwm1r2 {
9957 #[inline(always)]
9958 fn default() -> Secwm1r2 {
9959 Secwm1r2(0)
9960 }
9961 }
9962 impl core::fmt::Debug for Secwm1r2 {
9963 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
9964 f.debug_struct("Secwm1r2")
9965 .field("hdp1_pend", &self.hdp1_pend())
9966 .field("hdp1en", &self.hdp1en())
9967 .finish()
9968 }
9969 }
9970 #[cfg(feature = "defmt")]
9971 impl defmt::Format for Secwm1r2 {
9972 fn format(&self, f: defmt::Formatter) {
9973 #[derive(defmt :: Format)]
9974 struct Secwm1r2 {
9975 hdp1_pend: u8,
9976 hdp1en: bool,
9977 }
9978 let proxy = Secwm1r2 {
9979 hdp1_pend: self.hdp1_pend(),
9980 hdp1en: self.hdp1en(),
9981 };
9982 defmt::write!(f, "{}", proxy)
9983 }
9984 }
9985 #[doc = "FLASH secure watermark2 register 1"]
9986 #[repr(transparent)]
9987 #[derive(Copy, Clone, Eq, PartialEq)]
9988 pub struct Secwm2r1(pub u32);
9989 impl Secwm2r1 {
9990 #[doc = "Start page of second secure area This field contains the first page of the secure area in bank 2."]
9991 #[inline(always)]
9992 pub const fn secwm2_pstrt(&self) -> u8 {
9993 let val = (self.0 >> 0usize) & 0x7f;
9994 val as u8
9995 }
9996 #[doc = "Start page of second secure area This field contains the first page of the secure area in bank 2."]
9997 #[inline(always)]
9998 pub fn set_secwm2_pstrt(&mut self, val: u8) {
9999 self.0 = (self.0 & !(0x7f << 0usize)) | (((val as u32) & 0x7f) << 0usize);
10000 }
10001 #[doc = "End page of second secure area This field contains the last page of the secure area in bank 2."]
10002 #[inline(always)]
10003 pub const fn secwm2_pend(&self) -> u8 {
10004 let val = (self.0 >> 16usize) & 0x7f;
10005 val as u8
10006 }
10007 #[doc = "End page of second secure area This field contains the last page of the secure area in bank 2."]
10008 #[inline(always)]
10009 pub fn set_secwm2_pend(&mut self, val: u8) {
10010 self.0 = (self.0 & !(0x7f << 16usize)) | (((val as u32) & 0x7f) << 16usize);
10011 }
10012 }
10013 impl Default for Secwm2r1 {
10014 #[inline(always)]
10015 fn default() -> Secwm2r1 {
10016 Secwm2r1(0)
10017 }
10018 }
10019 impl core::fmt::Debug for Secwm2r1 {
10020 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
10021 f.debug_struct("Secwm2r1")
10022 .field("secwm2_pstrt", &self.secwm2_pstrt())
10023 .field("secwm2_pend", &self.secwm2_pend())
10024 .finish()
10025 }
10026 }
10027 #[cfg(feature = "defmt")]
10028 impl defmt::Format for Secwm2r1 {
10029 fn format(&self, f: defmt::Formatter) {
10030 #[derive(defmt :: Format)]
10031 struct Secwm2r1 {
10032 secwm2_pstrt: u8,
10033 secwm2_pend: u8,
10034 }
10035 let proxy = Secwm2r1 {
10036 secwm2_pstrt: self.secwm2_pstrt(),
10037 secwm2_pend: self.secwm2_pend(),
10038 };
10039 defmt::write!(f, "{}", proxy)
10040 }
10041 }
10042 #[doc = "FLASH secure watermark2 register 2"]
10043 #[repr(transparent)]
10044 #[derive(Copy, Clone, Eq, PartialEq)]
10045 pub struct Secwm2r2(pub u32);
10046 impl Secwm2r2 {
10047 #[doc = "End page of hide protection second area HDP2_PEND contains the last page of the HDP area in bank 2."]
10048 #[inline(always)]
10049 pub const fn hdp2_pend(&self) -> u8 {
10050 let val = (self.0 >> 16usize) & 0x7f;
10051 val as u8
10052 }
10053 #[doc = "End page of hide protection second area HDP2_PEND contains the last page of the HDP area in bank 2."]
10054 #[inline(always)]
10055 pub fn set_hdp2_pend(&mut self, val: u8) {
10056 self.0 = (self.0 & !(0x7f << 16usize)) | (((val as u32) & 0x7f) << 16usize);
10057 }
10058 #[doc = "Hide protection second area enable"]
10059 #[inline(always)]
10060 pub const fn hdp2en(&self) -> bool {
10061 let val = (self.0 >> 31usize) & 0x01;
10062 val != 0
10063 }
10064 #[doc = "Hide protection second area enable"]
10065 #[inline(always)]
10066 pub fn set_hdp2en(&mut self, val: bool) {
10067 self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize);
10068 }
10069 }
10070 impl Default for Secwm2r2 {
10071 #[inline(always)]
10072 fn default() -> Secwm2r2 {
10073 Secwm2r2(0)
10074 }
10075 }
10076 impl core::fmt::Debug for Secwm2r2 {
10077 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
10078 f.debug_struct("Secwm2r2")
10079 .field("hdp2_pend", &self.hdp2_pend())
10080 .field("hdp2en", &self.hdp2en())
10081 .finish()
10082 }
10083 }
10084 #[cfg(feature = "defmt")]
10085 impl defmt::Format for Secwm2r2 {
10086 fn format(&self, f: defmt::Formatter) {
10087 #[derive(defmt :: Format)]
10088 struct Secwm2r2 {
10089 hdp2_pend: u8,
10090 hdp2en: bool,
10091 }
10092 let proxy = Secwm2r2 {
10093 hdp2_pend: self.hdp2_pend(),
10094 hdp2en: self.hdp2en(),
10095 };
10096 defmt::write!(f, "{}", proxy)
10097 }
10098 }
10099 #[doc = "FLASH WRP1 area A address register"]
10100 #[repr(transparent)]
10101 #[derive(Copy, Clone, Eq, PartialEq)]
10102 pub struct Wrp1ar(pub u32);
10103 impl Wrp1ar {
10104 #[doc = "bank 1 WPR first area A start page This field contains the first page of the first WPR area for bank 1."]
10105 #[inline(always)]
10106 pub const fn wrp1a_pstrt(&self) -> u8 {
10107 let val = (self.0 >> 0usize) & 0x7f;
10108 val as u8
10109 }
10110 #[doc = "bank 1 WPR first area A start page This field contains the first page of the first WPR area for bank 1."]
10111 #[inline(always)]
10112 pub fn set_wrp1a_pstrt(&mut self, val: u8) {
10113 self.0 = (self.0 & !(0x7f << 0usize)) | (((val as u32) & 0x7f) << 0usize);
10114 }
10115 #[doc = "Bank 1 WPR first area A end page This field contains the last page of the first WPR area in bank 1."]
10116 #[inline(always)]
10117 pub const fn wrp1a_pend(&self) -> u8 {
10118 let val = (self.0 >> 16usize) & 0x7f;
10119 val as u8
10120 }
10121 #[doc = "Bank 1 WPR first area A end page This field contains the last page of the first WPR area in bank 1."]
10122 #[inline(always)]
10123 pub fn set_wrp1a_pend(&mut self, val: u8) {
10124 self.0 = (self.0 & !(0x7f << 16usize)) | (((val as u32) & 0x7f) << 16usize);
10125 }
10126 #[doc = "Bank 1 WPR first area A unlock"]
10127 #[inline(always)]
10128 pub const fn unlock(&self) -> super::vals::WrparUnlock {
10129 let val = (self.0 >> 31usize) & 0x01;
10130 super::vals::WrparUnlock::from_bits(val as u8)
10131 }
10132 #[doc = "Bank 1 WPR first area A unlock"]
10133 #[inline(always)]
10134 pub fn set_unlock(&mut self, val: super::vals::WrparUnlock) {
10135 self.0 = (self.0 & !(0x01 << 31usize)) | (((val.to_bits() as u32) & 0x01) << 31usize);
10136 }
10137 }
10138 impl Default for Wrp1ar {
10139 #[inline(always)]
10140 fn default() -> Wrp1ar {
10141 Wrp1ar(0)
10142 }
10143 }
10144 impl core::fmt::Debug for Wrp1ar {
10145 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
10146 f.debug_struct("Wrp1ar")
10147 .field("wrp1a_pstrt", &self.wrp1a_pstrt())
10148 .field("wrp1a_pend", &self.wrp1a_pend())
10149 .field("unlock", &self.unlock())
10150 .finish()
10151 }
10152 }
10153 #[cfg(feature = "defmt")]
10154 impl defmt::Format for Wrp1ar {
10155 fn format(&self, f: defmt::Formatter) {
10156 #[derive(defmt :: Format)]
10157 struct Wrp1ar {
10158 wrp1a_pstrt: u8,
10159 wrp1a_pend: u8,
10160 unlock: super::vals::WrparUnlock,
10161 }
10162 let proxy = Wrp1ar {
10163 wrp1a_pstrt: self.wrp1a_pstrt(),
10164 wrp1a_pend: self.wrp1a_pend(),
10165 unlock: self.unlock(),
10166 };
10167 defmt::write!(f, "{}", proxy)
10168 }
10169 }
10170 #[doc = "FLASH WRP1 area B address register"]
10171 #[repr(transparent)]
10172 #[derive(Copy, Clone, Eq, PartialEq)]
10173 pub struct Wrp1br(pub u32);
10174 impl Wrp1br {
10175 #[doc = "Bank 1 WRP second area B start page This field contains the first page of the second WRP area for bank 1."]
10176 #[inline(always)]
10177 pub const fn wrp1b_pstrt(&self) -> u8 {
10178 let val = (self.0 >> 0usize) & 0x7f;
10179 val as u8
10180 }
10181 #[doc = "Bank 1 WRP second area B start page This field contains the first page of the second WRP area for bank 1."]
10182 #[inline(always)]
10183 pub fn set_wrp1b_pstrt(&mut self, val: u8) {
10184 self.0 = (self.0 & !(0x7f << 0usize)) | (((val as u32) & 0x7f) << 0usize);
10185 }
10186 #[doc = "Bank 1 WRP second area B end page This field contains the last page of the second WRP area in bank 1."]
10187 #[inline(always)]
10188 pub const fn wrp1b_pend(&self) -> u8 {
10189 let val = (self.0 >> 16usize) & 0x7f;
10190 val as u8
10191 }
10192 #[doc = "Bank 1 WRP second area B end page This field contains the last page of the second WRP area in bank 1."]
10193 #[inline(always)]
10194 pub fn set_wrp1b_pend(&mut self, val: u8) {
10195 self.0 = (self.0 & !(0x7f << 16usize)) | (((val as u32) & 0x7f) << 16usize);
10196 }
10197 #[doc = "Bank 1 WPR second area B unlock"]
10198 #[inline(always)]
10199 pub const fn unlock(&self) -> super::vals::WrpbrUnlock {
10200 let val = (self.0 >> 31usize) & 0x01;
10201 super::vals::WrpbrUnlock::from_bits(val as u8)
10202 }
10203 #[doc = "Bank 1 WPR second area B unlock"]
10204 #[inline(always)]
10205 pub fn set_unlock(&mut self, val: super::vals::WrpbrUnlock) {
10206 self.0 = (self.0 & !(0x01 << 31usize)) | (((val.to_bits() as u32) & 0x01) << 31usize);
10207 }
10208 }
10209 impl Default for Wrp1br {
10210 #[inline(always)]
10211 fn default() -> Wrp1br {
10212 Wrp1br(0)
10213 }
10214 }
10215 impl core::fmt::Debug for Wrp1br {
10216 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
10217 f.debug_struct("Wrp1br")
10218 .field("wrp1b_pstrt", &self.wrp1b_pstrt())
10219 .field("wrp1b_pend", &self.wrp1b_pend())
10220 .field("unlock", &self.unlock())
10221 .finish()
10222 }
10223 }
10224 #[cfg(feature = "defmt")]
10225 impl defmt::Format for Wrp1br {
10226 fn format(&self, f: defmt::Formatter) {
10227 #[derive(defmt :: Format)]
10228 struct Wrp1br {
10229 wrp1b_pstrt: u8,
10230 wrp1b_pend: u8,
10231 unlock: super::vals::WrpbrUnlock,
10232 }
10233 let proxy = Wrp1br {
10234 wrp1b_pstrt: self.wrp1b_pstrt(),
10235 wrp1b_pend: self.wrp1b_pend(),
10236 unlock: self.unlock(),
10237 };
10238 defmt::write!(f, "{}", proxy)
10239 }
10240 }
10241 #[doc = "FLASH WPR2 area A address register"]
10242 #[repr(transparent)]
10243 #[derive(Copy, Clone, Eq, PartialEq)]
10244 pub struct Wrp2ar(pub u32);
10245 impl Wrp2ar {
10246 #[doc = "Bank 2 WPR first area A start page This field contains the first page of the first WRP area for bank 2."]
10247 #[inline(always)]
10248 pub const fn wrp2a_pstrt(&self) -> u8 {
10249 let val = (self.0 >> 0usize) & 0x7f;
10250 val as u8
10251 }
10252 #[doc = "Bank 2 WPR first area A start page This field contains the first page of the first WRP area for bank 2."]
10253 #[inline(always)]
10254 pub fn set_wrp2a_pstrt(&mut self, val: u8) {
10255 self.0 = (self.0 & !(0x7f << 0usize)) | (((val as u32) & 0x7f) << 0usize);
10256 }
10257 #[doc = "Bank 2 WPR first area A end page This field contains the last page of the first WRP area in bank 2."]
10258 #[inline(always)]
10259 pub const fn wrp2a_pend(&self) -> u8 {
10260 let val = (self.0 >> 16usize) & 0x7f;
10261 val as u8
10262 }
10263 #[doc = "Bank 2 WPR first area A end page This field contains the last page of the first WRP area in bank 2."]
10264 #[inline(always)]
10265 pub fn set_wrp2a_pend(&mut self, val: u8) {
10266 self.0 = (self.0 & !(0x7f << 16usize)) | (((val as u32) & 0x7f) << 16usize);
10267 }
10268 #[doc = "Bank 2 WPR first area A unlock"]
10269 #[inline(always)]
10270 pub const fn unlock(&self) -> super::vals::WrparUnlock {
10271 let val = (self.0 >> 31usize) & 0x01;
10272 super::vals::WrparUnlock::from_bits(val as u8)
10273 }
10274 #[doc = "Bank 2 WPR first area A unlock"]
10275 #[inline(always)]
10276 pub fn set_unlock(&mut self, val: super::vals::WrparUnlock) {
10277 self.0 = (self.0 & !(0x01 << 31usize)) | (((val.to_bits() as u32) & 0x01) << 31usize);
10278 }
10279 }
10280 impl Default for Wrp2ar {
10281 #[inline(always)]
10282 fn default() -> Wrp2ar {
10283 Wrp2ar(0)
10284 }
10285 }
10286 impl core::fmt::Debug for Wrp2ar {
10287 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
10288 f.debug_struct("Wrp2ar")
10289 .field("wrp2a_pstrt", &self.wrp2a_pstrt())
10290 .field("wrp2a_pend", &self.wrp2a_pend())
10291 .field("unlock", &self.unlock())
10292 .finish()
10293 }
10294 }
10295 #[cfg(feature = "defmt")]
10296 impl defmt::Format for Wrp2ar {
10297 fn format(&self, f: defmt::Formatter) {
10298 #[derive(defmt :: Format)]
10299 struct Wrp2ar {
10300 wrp2a_pstrt: u8,
10301 wrp2a_pend: u8,
10302 unlock: super::vals::WrparUnlock,
10303 }
10304 let proxy = Wrp2ar {
10305 wrp2a_pstrt: self.wrp2a_pstrt(),
10306 wrp2a_pend: self.wrp2a_pend(),
10307 unlock: self.unlock(),
10308 };
10309 defmt::write!(f, "{}", proxy)
10310 }
10311 }
10312 #[doc = "FLASH WPR2 area B address register"]
10313 #[repr(transparent)]
10314 #[derive(Copy, Clone, Eq, PartialEq)]
10315 pub struct Wrp2br(pub u32);
10316 impl Wrp2br {
10317 #[doc = "Bank 2 WPR second area B start page This field contains the first page of the second WRP area for bank 2."]
10318 #[inline(always)]
10319 pub const fn wrp2b_pstrt(&self) -> u8 {
10320 let val = (self.0 >> 0usize) & 0x7f;
10321 val as u8
10322 }
10323 #[doc = "Bank 2 WPR second area B start page This field contains the first page of the second WRP area for bank 2."]
10324 #[inline(always)]
10325 pub fn set_wrp2b_pstrt(&mut self, val: u8) {
10326 self.0 = (self.0 & !(0x7f << 0usize)) | (((val as u32) & 0x7f) << 0usize);
10327 }
10328 #[doc = "Bank 2 WPR second area B end page This field contains the last page of the second WRP area in bank 2."]
10329 #[inline(always)]
10330 pub const fn wrp2b_pend(&self) -> u8 {
10331 let val = (self.0 >> 16usize) & 0x7f;
10332 val as u8
10333 }
10334 #[doc = "Bank 2 WPR second area B end page This field contains the last page of the second WRP area in bank 2."]
10335 #[inline(always)]
10336 pub fn set_wrp2b_pend(&mut self, val: u8) {
10337 self.0 = (self.0 & !(0x7f << 16usize)) | (((val as u32) & 0x7f) << 16usize);
10338 }
10339 #[doc = "Bank 2 WPR second area B unlock"]
10340 #[inline(always)]
10341 pub const fn unlock(&self) -> super::vals::WrpbrUnlock {
10342 let val = (self.0 >> 31usize) & 0x01;
10343 super::vals::WrpbrUnlock::from_bits(val as u8)
10344 }
10345 #[doc = "Bank 2 WPR second area B unlock"]
10346 #[inline(always)]
10347 pub fn set_unlock(&mut self, val: super::vals::WrpbrUnlock) {
10348 self.0 = (self.0 & !(0x01 << 31usize)) | (((val.to_bits() as u32) & 0x01) << 31usize);
10349 }
10350 }
10351 impl Default for Wrp2br {
10352 #[inline(always)]
10353 fn default() -> Wrp2br {
10354 Wrp2br(0)
10355 }
10356 }
10357 impl core::fmt::Debug for Wrp2br {
10358 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
10359 f.debug_struct("Wrp2br")
10360 .field("wrp2b_pstrt", &self.wrp2b_pstrt())
10361 .field("wrp2b_pend", &self.wrp2b_pend())
10362 .field("unlock", &self.unlock())
10363 .finish()
10364 }
10365 }
10366 #[cfg(feature = "defmt")]
10367 impl defmt::Format for Wrp2br {
10368 fn format(&self, f: defmt::Formatter) {
10369 #[derive(defmt :: Format)]
10370 struct Wrp2br {
10371 wrp2b_pstrt: u8,
10372 wrp2b_pend: u8,
10373 unlock: super::vals::WrpbrUnlock,
10374 }
10375 let proxy = Wrp2br {
10376 wrp2b_pstrt: self.wrp2b_pstrt(),
10377 wrp2b_pend: self.wrp2b_pend(),
10378 unlock: self.unlock(),
10379 };
10380 defmt::write!(f, "{}", proxy)
10381 }
10382 }
10383}
10384pub mod vals {
10385 #[repr(u8)]
10386 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
10387 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
10388 pub enum BkEcc {
10389 #[doc = "Bank 1"]
10390 B_0X0 = 0x0,
10391 #[doc = "Bank 2"]
10392 B_0X1 = 0x01,
10393 }
10394 impl BkEcc {
10395 #[inline(always)]
10396 pub const fn from_bits(val: u8) -> BkEcc {
10397 unsafe { core::mem::transmute(val & 0x01) }
10398 }
10399 #[inline(always)]
10400 pub const fn to_bits(self) -> u8 {
10401 unsafe { core::mem::transmute(self) }
10402 }
10403 }
10404 impl From<u8> for BkEcc {
10405 #[inline(always)]
10406 fn from(val: u8) -> BkEcc {
10407 BkEcc::from_bits(val)
10408 }
10409 }
10410 impl From<BkEcc> for u8 {
10411 #[inline(always)]
10412 fn from(val: BkEcc) -> u8 {
10413 BkEcc::to_bits(val)
10414 }
10415 }
10416 #[repr(u8)]
10417 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
10418 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
10419 pub enum BkOp {
10420 #[doc = "Bank 1"]
10421 B_0X0 = 0x0,
10422 #[doc = "Bank 2"]
10423 B_0X1 = 0x01,
10424 }
10425 impl BkOp {
10426 #[inline(always)]
10427 pub const fn from_bits(val: u8) -> BkOp {
10428 unsafe { core::mem::transmute(val & 0x01) }
10429 }
10430 #[inline(always)]
10431 pub const fn to_bits(self) -> u8 {
10432 unsafe { core::mem::transmute(self) }
10433 }
10434 }
10435 impl From<u8> for BkOp {
10436 #[inline(always)]
10437 fn from(val: u8) -> BkOp {
10438 BkOp::from_bits(val)
10439 }
10440 }
10441 impl From<BkOp> for u8 {
10442 #[inline(always)]
10443 fn from(val: BkOp) -> u8 {
10444 BkOp::to_bits(val)
10445 }
10446 }
10447 #[repr(u8)]
10448 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
10449 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
10450 pub enum BkpsramEcc {
10451 #[doc = "Backup RAM ECC check enabled"]
10452 B_0X0 = 0x0,
10453 #[doc = "Backup RAM ECC check disabled"]
10454 B_0X1 = 0x01,
10455 }
10456 impl BkpsramEcc {
10457 #[inline(always)]
10458 pub const fn from_bits(val: u8) -> BkpsramEcc {
10459 unsafe { core::mem::transmute(val & 0x01) }
10460 }
10461 #[inline(always)]
10462 pub const fn to_bits(self) -> u8 {
10463 unsafe { core::mem::transmute(self) }
10464 }
10465 }
10466 impl From<u8> for BkpsramEcc {
10467 #[inline(always)]
10468 fn from(val: u8) -> BkpsramEcc {
10469 BkpsramEcc::from_bits(val)
10470 }
10471 }
10472 impl From<BkpsramEcc> for u8 {
10473 #[inline(always)]
10474 fn from(val: BkpsramEcc) -> u8 {
10475 BkpsramEcc::to_bits(val)
10476 }
10477 }
10478 #[repr(u8)]
10479 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
10480 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
10481 pub enum BorLev {
10482 #[doc = "BOR level 0 (reset level threshold around 1.7 V)"]
10483 B_0X0 = 0x0,
10484 #[doc = "BOR level 1 (reset level threshold around 2.0 V)"]
10485 B_0X1 = 0x01,
10486 #[doc = "BOR level 2 (reset level threshold around 2.2 V)"]
10487 B_0X2 = 0x02,
10488 #[doc = "BOR level 3 (reset level threshold around 2.5 V)"]
10489 B_0X3 = 0x03,
10490 #[doc = "BOR level 4 (reset level threshold around 2.8 V)"]
10491 B_0X4 = 0x04,
10492 _RESERVED_5 = 0x05,
10493 _RESERVED_6 = 0x06,
10494 _RESERVED_7 = 0x07,
10495 }
10496 impl BorLev {
10497 #[inline(always)]
10498 pub const fn from_bits(val: u8) -> BorLev {
10499 unsafe { core::mem::transmute(val & 0x07) }
10500 }
10501 #[inline(always)]
10502 pub const fn to_bits(self) -> u8 {
10503 unsafe { core::mem::transmute(self) }
10504 }
10505 }
10506 impl From<u8> for BorLev {
10507 #[inline(always)]
10508 fn from(val: u8) -> BorLev {
10509 BorLev::from_bits(val)
10510 }
10511 }
10512 impl From<BorLev> for u8 {
10513 #[inline(always)]
10514 fn from(val: BorLev) -> u8 {
10515 BorLev::to_bits(val)
10516 }
10517 }
10518 #[repr(u8)]
10519 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
10520 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
10521 pub enum CodeOp {
10522 #[doc = "No Flash operation interrupted by previous reset"]
10523 B_0X0 = 0x0,
10524 #[doc = "Single write operation interrupted"]
10525 B_0X1 = 0x01,
10526 #[doc = "Burst write operation interrupted"]
10527 B_0X2 = 0x02,
10528 #[doc = "Page erase operation interrupted"]
10529 B_0X3 = 0x03,
10530 #[doc = "Bank erase operation interrupted"]
10531 B_0X4 = 0x04,
10532 #[doc = "Mass erase operation interrupted"]
10533 B_0X5 = 0x05,
10534 #[doc = "Option change operation interrupted"]
10535 B_0X6 = 0x06,
10536 _RESERVED_7 = 0x07,
10537 }
10538 impl CodeOp {
10539 #[inline(always)]
10540 pub const fn from_bits(val: u8) -> CodeOp {
10541 unsafe { core::mem::transmute(val & 0x07) }
10542 }
10543 #[inline(always)]
10544 pub const fn to_bits(self) -> u8 {
10545 unsafe { core::mem::transmute(self) }
10546 }
10547 }
10548 impl From<u8> for CodeOp {
10549 #[inline(always)]
10550 fn from(val: u8) -> CodeOp {
10551 CodeOp::from_bits(val)
10552 }
10553 }
10554 impl From<CodeOp> for u8 {
10555 #[inline(always)]
10556 fn from(val: CodeOp) -> u8 {
10557 CodeOp::to_bits(val)
10558 }
10559 }
10560 #[repr(u8)]
10561 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
10562 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
10563 pub enum Dualbank {
10564 #[doc = "Single bank Flash with contiguous address in bank 1"]
10565 B_0X0 = 0x0,
10566 #[doc = "Dual-bank Flash with contiguous addresses"]
10567 B_0X1 = 0x01,
10568 }
10569 impl Dualbank {
10570 #[inline(always)]
10571 pub const fn from_bits(val: u8) -> Dualbank {
10572 unsafe { core::mem::transmute(val & 0x01) }
10573 }
10574 #[inline(always)]
10575 pub const fn to_bits(self) -> u8 {
10576 unsafe { core::mem::transmute(self) }
10577 }
10578 }
10579 impl From<u8> for Dualbank {
10580 #[inline(always)]
10581 fn from(val: u8) -> Dualbank {
10582 Dualbank::from_bits(val)
10583 }
10584 }
10585 impl From<Dualbank> for u8 {
10586 #[inline(always)]
10587 fn from(val: Dualbank) -> u8 {
10588 Dualbank::to_bits(val)
10589 }
10590 }
10591 #[repr(u8)]
10592 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
10593 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
10594 pub enum Eccie {
10595 #[doc = "ECCC interrupt disabled"]
10596 B_0X0 = 0x0,
10597 #[doc = "ECCC interrupt enabled."]
10598 B_0X1 = 0x01,
10599 }
10600 impl Eccie {
10601 #[inline(always)]
10602 pub const fn from_bits(val: u8) -> Eccie {
10603 unsafe { core::mem::transmute(val & 0x01) }
10604 }
10605 #[inline(always)]
10606 pub const fn to_bits(self) -> u8 {
10607 unsafe { core::mem::transmute(self) }
10608 }
10609 }
10610 impl From<u8> for Eccie {
10611 #[inline(always)]
10612 fn from(val: u8) -> Eccie {
10613 Eccie::from_bits(val)
10614 }
10615 }
10616 impl From<Eccie> for u8 {
10617 #[inline(always)]
10618 fn from(val: Eccie) -> u8 {
10619 Eccie::to_bits(val)
10620 }
10621 }
10622 #[repr(u8)]
10623 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
10624 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
10625 pub enum HdpAccdis {
10626 #[doc = "Access to HDP2 area granted"]
10627 B_0X0 = 0x0,
10628 #[doc = "Access to HDP2 area denied (SECWM2Ry option bytes modification bocked -refer to )"]
10629 B_0X1 = 0x01,
10630 }
10631 impl HdpAccdis {
10632 #[inline(always)]
10633 pub const fn from_bits(val: u8) -> HdpAccdis {
10634 unsafe { core::mem::transmute(val & 0x01) }
10635 }
10636 #[inline(always)]
10637 pub const fn to_bits(self) -> u8 {
10638 unsafe { core::mem::transmute(self) }
10639 }
10640 }
10641 impl From<u8> for HdpAccdis {
10642 #[inline(always)]
10643 fn from(val: u8) -> HdpAccdis {
10644 HdpAccdis::from_bits(val)
10645 }
10646 }
10647 impl From<HdpAccdis> for u8 {
10648 #[inline(always)]
10649 fn from(val: HdpAccdis) -> u8 {
10650 HdpAccdis::to_bits(val)
10651 }
10652 }
10653 #[repr(u8)]
10654 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
10655 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
10656 pub enum IoVddHslv {
10657 #[doc = "High-speed IO at low VDD voltage feature disabled (VDD can exceed 2.5 V)"]
10658 B_0X0 = 0x0,
10659 #[doc = "High-speed IO at low VDD voltage feature enabled (VDD remains below 2.5 V)"]
10660 B_0X1 = 0x01,
10661 }
10662 impl IoVddHslv {
10663 #[inline(always)]
10664 pub const fn from_bits(val: u8) -> IoVddHslv {
10665 unsafe { core::mem::transmute(val & 0x01) }
10666 }
10667 #[inline(always)]
10668 pub const fn to_bits(self) -> u8 {
10669 unsafe { core::mem::transmute(self) }
10670 }
10671 }
10672 impl From<u8> for IoVddHslv {
10673 #[inline(always)]
10674 fn from(val: u8) -> IoVddHslv {
10675 IoVddHslv::from_bits(val)
10676 }
10677 }
10678 impl From<IoVddHslv> for u8 {
10679 #[inline(always)]
10680 fn from(val: IoVddHslv) -> u8 {
10681 IoVddHslv::to_bits(val)
10682 }
10683 }
10684 #[repr(u8)]
10685 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
10686 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
10687 pub enum IoVddioHslv {
10688 #[doc = "High-speed IO at low VDDIO2 voltage feature disabled (VDDIO2 can exceed 2.5 V)"]
10689 B_0X0 = 0x0,
10690 #[doc = "High-speed IO at low VDDIO2 voltage feature enabled (VDDIO2 remains below 2.5 V)"]
10691 B_0X1 = 0x01,
10692 }
10693 impl IoVddioHslv {
10694 #[inline(always)]
10695 pub const fn from_bits(val: u8) -> IoVddioHslv {
10696 unsafe { core::mem::transmute(val & 0x01) }
10697 }
10698 #[inline(always)]
10699 pub const fn to_bits(self) -> u8 {
10700 unsafe { core::mem::transmute(self) }
10701 }
10702 }
10703 impl From<u8> for IoVddioHslv {
10704 #[inline(always)]
10705 fn from(val: u8) -> IoVddioHslv {
10706 IoVddioHslv::from_bits(val)
10707 }
10708 }
10709 impl From<IoVddioHslv> for u8 {
10710 #[inline(always)]
10711 fn from(val: IoVddioHslv) -> u8 {
10712 IoVddioHslv::to_bits(val)
10713 }
10714 }
10715 #[repr(u8)]
10716 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
10717 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
10718 pub enum IwdgStdby {
10719 #[doc = "Independent watchdog counter frozen in Standby mode"]
10720 B_0X0 = 0x0,
10721 #[doc = "Independent watchdog counter running in Standby mode"]
10722 B_0X1 = 0x01,
10723 }
10724 impl IwdgStdby {
10725 #[inline(always)]
10726 pub const fn from_bits(val: u8) -> IwdgStdby {
10727 unsafe { core::mem::transmute(val & 0x01) }
10728 }
10729 #[inline(always)]
10730 pub const fn to_bits(self) -> u8 {
10731 unsafe { core::mem::transmute(self) }
10732 }
10733 }
10734 impl From<u8> for IwdgStdby {
10735 #[inline(always)]
10736 fn from(val: u8) -> IwdgStdby {
10737 IwdgStdby::from_bits(val)
10738 }
10739 }
10740 impl From<IwdgStdby> for u8 {
10741 #[inline(always)]
10742 fn from(val: IwdgStdby) -> u8 {
10743 IwdgStdby::to_bits(val)
10744 }
10745 }
10746 #[repr(u8)]
10747 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
10748 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
10749 pub enum IwdgStop {
10750 #[doc = "Independent watchdog counter frozen in Stop mode"]
10751 B_0X0 = 0x0,
10752 #[doc = "Independent watchdog counter running in Stop mode"]
10753 B_0X1 = 0x01,
10754 }
10755 impl IwdgStop {
10756 #[inline(always)]
10757 pub const fn from_bits(val: u8) -> IwdgStop {
10758 unsafe { core::mem::transmute(val & 0x01) }
10759 }
10760 #[inline(always)]
10761 pub const fn to_bits(self) -> u8 {
10762 unsafe { core::mem::transmute(self) }
10763 }
10764 }
10765 impl From<u8> for IwdgStop {
10766 #[inline(always)]
10767 fn from(val: u8) -> IwdgStop {
10768 IwdgStop::from_bits(val)
10769 }
10770 }
10771 impl From<IwdgStop> for u8 {
10772 #[inline(always)]
10773 fn from(val: IwdgStop) -> u8 {
10774 IwdgStop::to_bits(val)
10775 }
10776 }
10777 #[repr(u8)]
10778 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
10779 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
10780 pub enum IwdgSw {
10781 #[doc = "Hardware independent watchdog selected"]
10782 B_0X0 = 0x0,
10783 #[doc = "Software independent watchdog selected"]
10784 B_0X1 = 0x01,
10785 }
10786 impl IwdgSw {
10787 #[inline(always)]
10788 pub const fn from_bits(val: u8) -> IwdgSw {
10789 unsafe { core::mem::transmute(val & 0x01) }
10790 }
10791 #[inline(always)]
10792 pub const fn to_bits(self) -> u8 {
10793 unsafe { core::mem::transmute(self) }
10794 }
10795 }
10796 impl From<u8> for IwdgSw {
10797 #[inline(always)]
10798 fn from(val: u8) -> IwdgSw {
10799 IwdgSw::from_bits(val)
10800 }
10801 }
10802 impl From<IwdgSw> for u8 {
10803 #[inline(always)]
10804 fn from(val: IwdgSw) -> u8 {
10805 IwdgSw::to_bits(val)
10806 }
10807 }
10808 #[repr(u8)]
10809 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
10810 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
10811 pub enum Lpm {
10812 #[doc = "Flash not in low-power read mode"]
10813 B_0X0 = 0x0,
10814 #[doc = "Flash in low-power read mode"]
10815 B_0X1 = 0x01,
10816 }
10817 impl Lpm {
10818 #[inline(always)]
10819 pub const fn from_bits(val: u8) -> Lpm {
10820 unsafe { core::mem::transmute(val & 0x01) }
10821 }
10822 #[inline(always)]
10823 pub const fn to_bits(self) -> u8 {
10824 unsafe { core::mem::transmute(self) }
10825 }
10826 }
10827 impl From<u8> for Lpm {
10828 #[inline(always)]
10829 fn from(val: u8) -> Lpm {
10830 Lpm::from_bits(val)
10831 }
10832 }
10833 impl From<Lpm> for u8 {
10834 #[inline(always)]
10835 fn from(val: Lpm) -> u8 {
10836 Lpm::to_bits(val)
10837 }
10838 }
10839 #[repr(u8)]
10840 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
10841 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
10842 pub enum NBoot {
10843 #[doc = "nBOOT0 = 0"]
10844 B_0X0 = 0x0,
10845 #[doc = "nBOOT0 = 1"]
10846 B_0X1 = 0x01,
10847 }
10848 impl NBoot {
10849 #[inline(always)]
10850 pub const fn from_bits(val: u8) -> NBoot {
10851 unsafe { core::mem::transmute(val & 0x01) }
10852 }
10853 #[inline(always)]
10854 pub const fn to_bits(self) -> u8 {
10855 unsafe { core::mem::transmute(self) }
10856 }
10857 }
10858 impl From<u8> for NBoot {
10859 #[inline(always)]
10860 fn from(val: u8) -> NBoot {
10861 NBoot::from_bits(val)
10862 }
10863 }
10864 impl From<NBoot> for u8 {
10865 #[inline(always)]
10866 fn from(val: NBoot) -> u8 {
10867 NBoot::to_bits(val)
10868 }
10869 }
10870 #[repr(u8)]
10871 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
10872 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
10873 pub enum NRstShdw {
10874 #[doc = "Reset generated when entering the Shutdown mode"]
10875 B_0X0 = 0x0,
10876 #[doc = "No reset generated when entering the Shutdown mode"]
10877 B_0X1 = 0x01,
10878 }
10879 impl NRstShdw {
10880 #[inline(always)]
10881 pub const fn from_bits(val: u8) -> NRstShdw {
10882 unsafe { core::mem::transmute(val & 0x01) }
10883 }
10884 #[inline(always)]
10885 pub const fn to_bits(self) -> u8 {
10886 unsafe { core::mem::transmute(self) }
10887 }
10888 }
10889 impl From<u8> for NRstShdw {
10890 #[inline(always)]
10891 fn from(val: u8) -> NRstShdw {
10892 NRstShdw::from_bits(val)
10893 }
10894 }
10895 impl From<NRstShdw> for u8 {
10896 #[inline(always)]
10897 fn from(val: NRstShdw) -> u8 {
10898 NRstShdw::to_bits(val)
10899 }
10900 }
10901 #[repr(u8)]
10902 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
10903 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
10904 pub enum NRstStdby {
10905 #[doc = "Reset generated when entering the Standby mode"]
10906 B_0X0 = 0x0,
10907 #[doc = "No reset generate when entering the Standby mode"]
10908 B_0X1 = 0x01,
10909 }
10910 impl NRstStdby {
10911 #[inline(always)]
10912 pub const fn from_bits(val: u8) -> NRstStdby {
10913 unsafe { core::mem::transmute(val & 0x01) }
10914 }
10915 #[inline(always)]
10916 pub const fn to_bits(self) -> u8 {
10917 unsafe { core::mem::transmute(self) }
10918 }
10919 }
10920 impl From<u8> for NRstStdby {
10921 #[inline(always)]
10922 fn from(val: u8) -> NRstStdby {
10923 NRstStdby::from_bits(val)
10924 }
10925 }
10926 impl From<NRstStdby> for u8 {
10927 #[inline(always)]
10928 fn from(val: NRstStdby) -> u8 {
10929 NRstStdby::to_bits(val)
10930 }
10931 }
10932 #[repr(u8)]
10933 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
10934 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
10935 pub enum NRstStop {
10936 #[doc = "Reset generated when entering the Stop mode"]
10937 B_0X0 = 0x0,
10938 #[doc = "No reset generated when entering the Stop mode"]
10939 B_0X1 = 0x01,
10940 }
10941 impl NRstStop {
10942 #[inline(always)]
10943 pub const fn from_bits(val: u8) -> NRstStop {
10944 unsafe { core::mem::transmute(val & 0x01) }
10945 }
10946 #[inline(always)]
10947 pub const fn to_bits(self) -> u8 {
10948 unsafe { core::mem::transmute(self) }
10949 }
10950 }
10951 impl From<u8> for NRstStop {
10952 #[inline(always)]
10953 fn from(val: u8) -> NRstStop {
10954 NRstStop::from_bits(val)
10955 }
10956 }
10957 impl From<NRstStop> for u8 {
10958 #[inline(always)]
10959 fn from(val: NRstStop) -> u8 {
10960 NRstStop::to_bits(val)
10961 }
10962 }
10963 #[repr(u8)]
10964 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
10965 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
10966 pub enum NSwboot {
10967 #[doc = "BOOT0 taken from the option bit nBOOT0"]
10968 B_0X0 = 0x0,
10969 #[doc = "BOOT0 taken from PH3/BOOT0 pin"]
10970 B_0X1 = 0x01,
10971 }
10972 impl NSwboot {
10973 #[inline(always)]
10974 pub const fn from_bits(val: u8) -> NSwboot {
10975 unsafe { core::mem::transmute(val & 0x01) }
10976 }
10977 #[inline(always)]
10978 pub const fn to_bits(self) -> u8 {
10979 unsafe { core::mem::transmute(self) }
10980 }
10981 }
10982 impl From<u8> for NSwboot {
10983 #[inline(always)]
10984 fn from(val: u8) -> NSwboot {
10985 NSwboot::from_bits(val)
10986 }
10987 }
10988 impl From<NSwboot> for u8 {
10989 #[inline(always)]
10990 fn from(val: NSwboot) -> u8 {
10991 NSwboot::to_bits(val)
10992 }
10993 }
10994 #[repr(u8)]
10995 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
10996 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
10997 pub enum NscrBker {
10998 #[doc = "Bank 1 selected for non-secure page erase"]
10999 B_0X0 = 0x0,
11000 #[doc = "Bank 2 selected for non-secure page erase"]
11001 B_0X1 = 0x01,
11002 }
11003 impl NscrBker {
11004 #[inline(always)]
11005 pub const fn from_bits(val: u8) -> NscrBker {
11006 unsafe { core::mem::transmute(val & 0x01) }
11007 }
11008 #[inline(always)]
11009 pub const fn to_bits(self) -> u8 {
11010 unsafe { core::mem::transmute(self) }
11011 }
11012 }
11013 impl From<u8> for NscrBker {
11014 #[inline(always)]
11015 fn from(val: u8) -> NscrBker {
11016 NscrBker::from_bits(val)
11017 }
11018 }
11019 impl From<NscrBker> for u8 {
11020 #[inline(always)]
11021 fn from(val: NscrBker) -> u8 {
11022 NscrBker::to_bits(val)
11023 }
11024 }
11025 #[repr(u8)]
11026 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
11027 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
11028 pub enum NscrEopie {
11029 #[doc = "Non-secure EOP Interrupt disabled"]
11030 B_0X0 = 0x0,
11031 #[doc = "Non-secure EOP Interrupt enabled"]
11032 B_0X1 = 0x01,
11033 }
11034 impl NscrEopie {
11035 #[inline(always)]
11036 pub const fn from_bits(val: u8) -> NscrEopie {
11037 unsafe { core::mem::transmute(val & 0x01) }
11038 }
11039 #[inline(always)]
11040 pub const fn to_bits(self) -> u8 {
11041 unsafe { core::mem::transmute(self) }
11042 }
11043 }
11044 impl From<u8> for NscrEopie {
11045 #[inline(always)]
11046 fn from(val: u8) -> NscrEopie {
11047 NscrEopie::from_bits(val)
11048 }
11049 }
11050 impl From<NscrEopie> for u8 {
11051 #[inline(always)]
11052 fn from(val: NscrEopie) -> u8 {
11053 NscrEopie::to_bits(val)
11054 }
11055 }
11056 #[repr(u8)]
11057 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
11058 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
11059 pub enum NscrErrie {
11060 #[doc = "Non-secure OPERR error interrupt disabled"]
11061 B_0X0 = 0x0,
11062 #[doc = "Non-secure OPERR error interrupt enabled"]
11063 B_0X1 = 0x01,
11064 }
11065 impl NscrErrie {
11066 #[inline(always)]
11067 pub const fn from_bits(val: u8) -> NscrErrie {
11068 unsafe { core::mem::transmute(val & 0x01) }
11069 }
11070 #[inline(always)]
11071 pub const fn to_bits(self) -> u8 {
11072 unsafe { core::mem::transmute(self) }
11073 }
11074 }
11075 impl From<u8> for NscrErrie {
11076 #[inline(always)]
11077 fn from(val: u8) -> NscrErrie {
11078 NscrErrie::from_bits(val)
11079 }
11080 }
11081 impl From<NscrErrie> for u8 {
11082 #[inline(always)]
11083 fn from(val: NscrErrie) -> u8 {
11084 NscrErrie::to_bits(val)
11085 }
11086 }
11087 #[repr(u8)]
11088 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
11089 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
11090 pub enum NscrPer {
11091 #[doc = "Non-secure page erase disabled"]
11092 B_0X0 = 0x0,
11093 #[doc = "Non-secure page erase enabled"]
11094 B_0X1 = 0x01,
11095 }
11096 impl NscrPer {
11097 #[inline(always)]
11098 pub const fn from_bits(val: u8) -> NscrPer {
11099 unsafe { core::mem::transmute(val & 0x01) }
11100 }
11101 #[inline(always)]
11102 pub const fn to_bits(self) -> u8 {
11103 unsafe { core::mem::transmute(self) }
11104 }
11105 }
11106 impl From<u8> for NscrPer {
11107 #[inline(always)]
11108 fn from(val: u8) -> NscrPer {
11109 NscrPer::from_bits(val)
11110 }
11111 }
11112 impl From<NscrPer> for u8 {
11113 #[inline(always)]
11114 fn from(val: NscrPer) -> u8 {
11115 NscrPer::to_bits(val)
11116 }
11117 }
11118 #[repr(u8)]
11119 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
11120 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
11121 pub enum NscrPg {
11122 #[doc = "Non-secure Flash programming disabled"]
11123 B_0X0 = 0x0,
11124 #[doc = "Non-secure Flash programming enabled"]
11125 B_0X1 = 0x01,
11126 }
11127 impl NscrPg {
11128 #[inline(always)]
11129 pub const fn from_bits(val: u8) -> NscrPg {
11130 unsafe { core::mem::transmute(val & 0x01) }
11131 }
11132 #[inline(always)]
11133 pub const fn to_bits(self) -> u8 {
11134 unsafe { core::mem::transmute(self) }
11135 }
11136 }
11137 impl From<u8> for NscrPg {
11138 #[inline(always)]
11139 fn from(val: u8) -> NscrPg {
11140 NscrPg::from_bits(val)
11141 }
11142 }
11143 impl From<NscrPg> for u8 {
11144 #[inline(always)]
11145 fn from(val: NscrPg) -> u8 {
11146 NscrPg::to_bits(val)
11147 }
11148 }
11149 #[repr(u8)]
11150 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
11151 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
11152 pub enum Nspriv {
11153 #[doc = "Non-secure Flash registers can be read and written by privileged or unprivileged access."]
11154 B_0X0 = 0x0,
11155 #[doc = "Non-secure Flash registers can be read and written by privileged access only."]
11156 B_0X1 = 0x01,
11157 }
11158 impl Nspriv {
11159 #[inline(always)]
11160 pub const fn from_bits(val: u8) -> Nspriv {
11161 unsafe { core::mem::transmute(val & 0x01) }
11162 }
11163 #[inline(always)]
11164 pub const fn to_bits(self) -> u8 {
11165 unsafe { core::mem::transmute(self) }
11166 }
11167 }
11168 impl From<u8> for Nspriv {
11169 #[inline(always)]
11170 fn from(val: u8) -> Nspriv {
11171 Nspriv::from_bits(val)
11172 }
11173 }
11174 impl From<Nspriv> for u8 {
11175 #[inline(always)]
11176 fn from(val: Nspriv) -> u8 {
11177 Nspriv::to_bits(val)
11178 }
11179 }
11180 #[repr(u8)]
11181 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
11182 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
11183 pub enum OblLaunch {
11184 #[doc = "Option byte loading complete"]
11185 B_0X0 = 0x0,
11186 #[doc = "Option byte loading requested"]
11187 B_0X1 = 0x01,
11188 }
11189 impl OblLaunch {
11190 #[inline(always)]
11191 pub const fn from_bits(val: u8) -> OblLaunch {
11192 unsafe { core::mem::transmute(val & 0x01) }
11193 }
11194 #[inline(always)]
11195 pub const fn to_bits(self) -> u8 {
11196 unsafe { core::mem::transmute(self) }
11197 }
11198 }
11199 impl From<u8> for OblLaunch {
11200 #[inline(always)]
11201 fn from(val: u8) -> OblLaunch {
11202 OblLaunch::from_bits(val)
11203 }
11204 }
11205 impl From<OblLaunch> for u8 {
11206 #[inline(always)]
11207 fn from(val: OblLaunch) -> u8 {
11208 OblLaunch::to_bits(val)
11209 }
11210 }
11211 #[repr(u8)]
11212 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
11213 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
11214 pub enum Pdreq {
11215 #[doc = "No request for bank 2 to enter power-down mode"]
11216 B_0X0 = 0x0,
11217 #[doc = "Bank 2 requested to enter power-down mode"]
11218 B_0X1 = 0x01,
11219 }
11220 impl Pdreq {
11221 #[inline(always)]
11222 pub const fn from_bits(val: u8) -> Pdreq {
11223 unsafe { core::mem::transmute(val & 0x01) }
11224 }
11225 #[inline(always)]
11226 pub const fn to_bits(self) -> u8 {
11227 unsafe { core::mem::transmute(self) }
11228 }
11229 }
11230 impl From<u8> for Pdreq {
11231 #[inline(always)]
11232 fn from(val: u8) -> Pdreq {
11233 Pdreq::from_bits(val)
11234 }
11235 }
11236 impl From<Pdreq> for u8 {
11237 #[inline(always)]
11238 fn from(val: Pdreq) -> u8 {
11239 Pdreq::to_bits(val)
11240 }
11241 }
11242 #[repr(transparent)]
11243 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
11244 pub struct Rdp(pub u8);
11245 impl Rdp {
11246 #[doc = "Level 0.5 (readout protection not active, only non-secure debug access is possible). Only available when TrustZone is active (TZEN=1)"]
11247 pub const B_0X55: Self = Self(0x55);
11248 #[doc = "Level 0 (readout protection not active)"]
11249 pub const B_0X_AA: Self = Self(0xaa);
11250 #[doc = "Level 2 (chip readout protection active)"]
11251 pub const B_0X_CC: Self = Self(0xcc);
11252 }
11253 impl Rdp {
11254 pub const fn from_bits(val: u8) -> Rdp {
11255 Self(val & 0xff)
11256 }
11257 pub const fn to_bits(self) -> u8 {
11258 self.0
11259 }
11260 }
11261 impl core::fmt::Debug for Rdp {
11262 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
11263 match self.0 {
11264 0x55 => f.write_str("B_0X55"),
11265 0xaa => f.write_str("B_0X_AA"),
11266 0xcc => f.write_str("B_0X_CC"),
11267 other => core::write!(f, "0x{:02X}", other),
11268 }
11269 }
11270 }
11271 #[cfg(feature = "defmt")]
11272 impl defmt::Format for Rdp {
11273 fn format(&self, f: defmt::Formatter) {
11274 match self.0 {
11275 0x55 => defmt::write!(f, "B_0X55"),
11276 0xaa => defmt::write!(f, "B_0X_AA"),
11277 0xcc => defmt::write!(f, "B_0X_CC"),
11278 other => defmt::write!(f, "0x{:02X}", other),
11279 }
11280 }
11281 }
11282 impl From<u8> for Rdp {
11283 #[inline(always)]
11284 fn from(val: u8) -> Rdp {
11285 Rdp::from_bits(val)
11286 }
11287 }
11288 impl From<Rdp> for u8 {
11289 #[inline(always)]
11290 fn from(val: Rdp) -> u8 {
11291 Rdp::to_bits(val)
11292 }
11293 }
11294 #[repr(u8)]
11295 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
11296 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
11297 pub enum SeccrBker {
11298 #[doc = "Bank 1 selected for secure page erase"]
11299 B_0X0 = 0x0,
11300 #[doc = "Bank 2 selected for secure page erase"]
11301 B_0X1 = 0x01,
11302 }
11303 impl SeccrBker {
11304 #[inline(always)]
11305 pub const fn from_bits(val: u8) -> SeccrBker {
11306 unsafe { core::mem::transmute(val & 0x01) }
11307 }
11308 #[inline(always)]
11309 pub const fn to_bits(self) -> u8 {
11310 unsafe { core::mem::transmute(self) }
11311 }
11312 }
11313 impl From<u8> for SeccrBker {
11314 #[inline(always)]
11315 fn from(val: u8) -> SeccrBker {
11316 SeccrBker::from_bits(val)
11317 }
11318 }
11319 impl From<SeccrBker> for u8 {
11320 #[inline(always)]
11321 fn from(val: SeccrBker) -> u8 {
11322 SeccrBker::to_bits(val)
11323 }
11324 }
11325 #[repr(u8)]
11326 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
11327 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
11328 pub enum SeccrEopie {
11329 #[doc = "Secure EOP Interrupt disabled"]
11330 B_0X0 = 0x0,
11331 #[doc = "Secure EOP Interrupt enabled"]
11332 B_0X1 = 0x01,
11333 }
11334 impl SeccrEopie {
11335 #[inline(always)]
11336 pub const fn from_bits(val: u8) -> SeccrEopie {
11337 unsafe { core::mem::transmute(val & 0x01) }
11338 }
11339 #[inline(always)]
11340 pub const fn to_bits(self) -> u8 {
11341 unsafe { core::mem::transmute(self) }
11342 }
11343 }
11344 impl From<u8> for SeccrEopie {
11345 #[inline(always)]
11346 fn from(val: u8) -> SeccrEopie {
11347 SeccrEopie::from_bits(val)
11348 }
11349 }
11350 impl From<SeccrEopie> for u8 {
11351 #[inline(always)]
11352 fn from(val: SeccrEopie) -> u8 {
11353 SeccrEopie::to_bits(val)
11354 }
11355 }
11356 #[repr(u8)]
11357 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
11358 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
11359 pub enum SeccrErrie {
11360 #[doc = "Secure OPERR error interrupt disabled"]
11361 B_0X0 = 0x0,
11362 #[doc = "Secure OPERR error interrupt enabled"]
11363 B_0X1 = 0x01,
11364 }
11365 impl SeccrErrie {
11366 #[inline(always)]
11367 pub const fn from_bits(val: u8) -> SeccrErrie {
11368 unsafe { core::mem::transmute(val & 0x01) }
11369 }
11370 #[inline(always)]
11371 pub const fn to_bits(self) -> u8 {
11372 unsafe { core::mem::transmute(self) }
11373 }
11374 }
11375 impl From<u8> for SeccrErrie {
11376 #[inline(always)]
11377 fn from(val: u8) -> SeccrErrie {
11378 SeccrErrie::from_bits(val)
11379 }
11380 }
11381 impl From<SeccrErrie> for u8 {
11382 #[inline(always)]
11383 fn from(val: SeccrErrie) -> u8 {
11384 SeccrErrie::to_bits(val)
11385 }
11386 }
11387 #[repr(u8)]
11388 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
11389 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
11390 pub enum SeccrPer {
11391 #[doc = "Secure page erase disabled"]
11392 B_0X0 = 0x0,
11393 #[doc = "Secure page erase enabled"]
11394 B_0X1 = 0x01,
11395 }
11396 impl SeccrPer {
11397 #[inline(always)]
11398 pub const fn from_bits(val: u8) -> SeccrPer {
11399 unsafe { core::mem::transmute(val & 0x01) }
11400 }
11401 #[inline(always)]
11402 pub const fn to_bits(self) -> u8 {
11403 unsafe { core::mem::transmute(self) }
11404 }
11405 }
11406 impl From<u8> for SeccrPer {
11407 #[inline(always)]
11408 fn from(val: u8) -> SeccrPer {
11409 SeccrPer::from_bits(val)
11410 }
11411 }
11412 impl From<SeccrPer> for u8 {
11413 #[inline(always)]
11414 fn from(val: SeccrPer) -> u8 {
11415 SeccrPer::to_bits(val)
11416 }
11417 }
11418 #[repr(u8)]
11419 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
11420 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
11421 pub enum SeccrPg {
11422 #[doc = "Secure Flash programming disabled"]
11423 B_0X0 = 0x0,
11424 #[doc = "Secure Flash programming enabled"]
11425 B_0X1 = 0x01,
11426 }
11427 impl SeccrPg {
11428 #[inline(always)]
11429 pub const fn from_bits(val: u8) -> SeccrPg {
11430 unsafe { core::mem::transmute(val & 0x01) }
11431 }
11432 #[inline(always)]
11433 pub const fn to_bits(self) -> u8 {
11434 unsafe { core::mem::transmute(self) }
11435 }
11436 }
11437 impl From<u8> for SeccrPg {
11438 #[inline(always)]
11439 fn from(val: u8) -> SeccrPg {
11440 SeccrPg::from_bits(val)
11441 }
11442 }
11443 impl From<SeccrPg> for u8 {
11444 #[inline(always)]
11445 fn from(val: SeccrPg) -> u8 {
11446 SeccrPg::to_bits(val)
11447 }
11448 }
11449 #[repr(u8)]
11450 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
11451 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
11452 pub enum SleepPd {
11453 #[doc = "Flash in Idle mode during Sleep mode"]
11454 B_0X0 = 0x0,
11455 #[doc = "Flash in power-down mode during Sleep mode"]
11456 B_0X1 = 0x01,
11457 }
11458 impl SleepPd {
11459 #[inline(always)]
11460 pub const fn from_bits(val: u8) -> SleepPd {
11461 unsafe { core::mem::transmute(val & 0x01) }
11462 }
11463 #[inline(always)]
11464 pub const fn to_bits(self) -> u8 {
11465 unsafe { core::mem::transmute(self) }
11466 }
11467 }
11468 impl From<u8> for SleepPd {
11469 #[inline(always)]
11470 fn from(val: u8) -> SleepPd {
11471 SleepPd::from_bits(val)
11472 }
11473 }
11474 impl From<SleepPd> for u8 {
11475 #[inline(always)]
11476 fn from(val: SleepPd) -> u8 {
11477 SleepPd::to_bits(val)
11478 }
11479 }
11480 #[repr(u8)]
11481 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
11482 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
11483 pub enum Spriv {
11484 #[doc = "Secure Flash registers can be read and written by privileged or unprivileged access."]
11485 B_0X0 = 0x0,
11486 #[doc = "Secure Flash registers can be read and written by privileged access only."]
11487 B_0X1 = 0x01,
11488 }
11489 impl Spriv {
11490 #[inline(always)]
11491 pub const fn from_bits(val: u8) -> Spriv {
11492 unsafe { core::mem::transmute(val & 0x01) }
11493 }
11494 #[inline(always)]
11495 pub const fn to_bits(self) -> u8 {
11496 unsafe { core::mem::transmute(self) }
11497 }
11498 }
11499 impl From<u8> for Spriv {
11500 #[inline(always)]
11501 fn from(val: u8) -> Spriv {
11502 Spriv::from_bits(val)
11503 }
11504 }
11505 impl From<Spriv> for u8 {
11506 #[inline(always)]
11507 fn from(val: Spriv) -> u8 {
11508 Spriv::to_bits(val)
11509 }
11510 }
11511 #[repr(u8)]
11512 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
11513 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
11514 pub enum SramEcc {
11515 #[doc = "SRAM3 ECC check enabled"]
11516 B_0X0 = 0x0,
11517 #[doc = "SRAM3 ECC check disabled"]
11518 B_0X1 = 0x01,
11519 }
11520 impl SramEcc {
11521 #[inline(always)]
11522 pub const fn from_bits(val: u8) -> SramEcc {
11523 unsafe { core::mem::transmute(val & 0x01) }
11524 }
11525 #[inline(always)]
11526 pub const fn to_bits(self) -> u8 {
11527 unsafe { core::mem::transmute(self) }
11528 }
11529 }
11530 impl From<u8> for SramEcc {
11531 #[inline(always)]
11532 fn from(val: u8) -> SramEcc {
11533 SramEcc::from_bits(val)
11534 }
11535 }
11536 impl From<SramEcc> for u8 {
11537 #[inline(always)]
11538 fn from(val: SramEcc) -> u8 {
11539 SramEcc::to_bits(val)
11540 }
11541 }
11542 #[repr(u8)]
11543 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
11544 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
11545 pub enum SwapBank {
11546 #[doc = "Bank 1 and bank 2 addresses not swapped"]
11547 B_0X0 = 0x0,
11548 #[doc = "Bank 1 and bank 2 addresses swapped"]
11549 B_0X1 = 0x01,
11550 }
11551 impl SwapBank {
11552 #[inline(always)]
11553 pub const fn from_bits(val: u8) -> SwapBank {
11554 unsafe { core::mem::transmute(val & 0x01) }
11555 }
11556 #[inline(always)]
11557 pub const fn to_bits(self) -> u8 {
11558 unsafe { core::mem::transmute(self) }
11559 }
11560 }
11561 impl From<u8> for SwapBank {
11562 #[inline(always)]
11563 fn from(val: u8) -> SwapBank {
11564 SwapBank::from_bits(val)
11565 }
11566 }
11567 impl From<SwapBank> for u8 {
11568 #[inline(always)]
11569 fn from(val: SwapBank) -> u8 {
11570 SwapBank::to_bits(val)
11571 }
11572 }
11573 #[repr(u8)]
11574 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
11575 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
11576 pub enum WrparUnlock {
11577 #[doc = "WRP2A start and end pages locked"]
11578 B_0X0 = 0x0,
11579 #[doc = "WRP2A start and end pages unlocked"]
11580 B_0X1 = 0x01,
11581 }
11582 impl WrparUnlock {
11583 #[inline(always)]
11584 pub const fn from_bits(val: u8) -> WrparUnlock {
11585 unsafe { core::mem::transmute(val & 0x01) }
11586 }
11587 #[inline(always)]
11588 pub const fn to_bits(self) -> u8 {
11589 unsafe { core::mem::transmute(self) }
11590 }
11591 }
11592 impl From<u8> for WrparUnlock {
11593 #[inline(always)]
11594 fn from(val: u8) -> WrparUnlock {
11595 WrparUnlock::from_bits(val)
11596 }
11597 }
11598 impl From<WrparUnlock> for u8 {
11599 #[inline(always)]
11600 fn from(val: WrparUnlock) -> u8 {
11601 WrparUnlock::to_bits(val)
11602 }
11603 }
11604 #[repr(u8)]
11605 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
11606 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
11607 pub enum WrpbrUnlock {
11608 #[doc = "WRP2B start and end pages locked"]
11609 B_0X0 = 0x0,
11610 #[doc = "WRP2B start and end pages unlocked"]
11611 B_0X1 = 0x01,
11612 }
11613 impl WrpbrUnlock {
11614 #[inline(always)]
11615 pub const fn from_bits(val: u8) -> WrpbrUnlock {
11616 unsafe { core::mem::transmute(val & 0x01) }
11617 }
11618 #[inline(always)]
11619 pub const fn to_bits(self) -> u8 {
11620 unsafe { core::mem::transmute(self) }
11621 }
11622 }
11623 impl From<u8> for WrpbrUnlock {
11624 #[inline(always)]
11625 fn from(val: u8) -> WrpbrUnlock {
11626 WrpbrUnlock::from_bits(val)
11627 }
11628 }
11629 impl From<WrpbrUnlock> for u8 {
11630 #[inline(always)]
11631 fn from(val: WrpbrUnlock) -> u8 {
11632 WrpbrUnlock::to_bits(val)
11633 }
11634 }
11635 #[repr(u8)]
11636 #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
11637 #[cfg_attr(feature = "defmt", derive(defmt::Format))]
11638 pub enum WwdgSw {
11639 #[doc = "Hardware window watchdog selected"]
11640 B_0X0 = 0x0,
11641 #[doc = "Software window watchdog selected"]
11642 B_0X1 = 0x01,
11643 }
11644 impl WwdgSw {
11645 #[inline(always)]
11646 pub const fn from_bits(val: u8) -> WwdgSw {
11647 unsafe { core::mem::transmute(val & 0x01) }
11648 }
11649 #[inline(always)]
11650 pub const fn to_bits(self) -> u8 {
11651 unsafe { core::mem::transmute(self) }
11652 }
11653 }
11654 impl From<u8> for WwdgSw {
11655 #[inline(always)]
11656 fn from(val: u8) -> WwdgSw {
11657 WwdgSw::from_bits(val)
11658 }
11659 }
11660 impl From<WwdgSw> for u8 {
11661 #[inline(always)]
11662 fn from(val: WwdgSw) -> u8 {
11663 WwdgSw::to_bits(val)
11664 }
11665 }
11666}
11667

Provided by KDAB

Privacy Policy