stm32g0_staging/stm32g0c1/flash.rs
1#[repr(C)]
2#[derive(Debug)]
3///Register block
4pub struct RegisterBlock {
5 acr: ACR,
6 _reserved1: [u8; 0x04],
7 keyr: KEYR,
8 optkeyr: OPTKEYR,
9 sr: SR,
10 cr: CR,
11 eccr: ECCR,
12 eccr2: ECCR2,
13 optr: OPTR,
14 pcrop1asr: PCROP1ASR,
15 pcrop1aer: PCROP1AER,
16 wrp1ar: WRP1AR,
17 wrp1br: WRP1BR,
18 pcrop1bsr: PCROP1BSR,
19 pcrop1ber: PCROP1BER,
20 _reserved14: [u8; 0x08],
21 pcrop2asr: PCROP2ASR,
22 pcrop2aer: PCROP2AER,
23 wrp2ar: WRP2AR,
24 wrp2br: WRP2BR,
25 pcrop2bsr: PCROP2BSR,
26 pcrop2ber: PCROP2BER,
27 _reserved20: [u8; 0x24],
28 secr: SECR,
29}
30impl RegisterBlock {
31 ///0x00 - Access control register
32 #[inline(always)]
33 pub const fn acr(&self) -> &ACR {
34 &self.acr
35 }
36 ///0x08 - Flash key register
37 #[inline(always)]
38 pub const fn keyr(&self) -> &KEYR {
39 &self.keyr
40 }
41 ///0x0c - Option byte key register
42 #[inline(always)]
43 pub const fn optkeyr(&self) -> &OPTKEYR {
44 &self.optkeyr
45 }
46 ///0x10 - Status register
47 #[inline(always)]
48 pub const fn sr(&self) -> &SR {
49 &self.sr
50 }
51 ///0x14 - Flash control register
52 #[inline(always)]
53 pub const fn cr(&self) -> &CR {
54 &self.cr
55 }
56 ///0x18 - Flash ECC register
57 #[inline(always)]
58 pub const fn eccr(&self) -> &ECCR {
59 &self.eccr
60 }
61 ///0x1c - Flash ECC register 2
62 #[inline(always)]
63 pub const fn eccr2(&self) -> &ECCR2 {
64 &self.eccr2
65 }
66 ///0x20 - Flash option register
67 #[inline(always)]
68 pub const fn optr(&self) -> &OPTR {
69 &self.optr
70 }
71 ///0x24 - Flash PCROP zone A Start address register
72 #[inline(always)]
73 pub const fn pcrop1asr(&self) -> &PCROP1ASR {
74 &self.pcrop1asr
75 }
76 ///0x28 - Flash PCROP zone A End address register
77 #[inline(always)]
78 pub const fn pcrop1aer(&self) -> &PCROP1AER {
79 &self.pcrop1aer
80 }
81 ///0x2c - Flash WRP area A address register
82 #[inline(always)]
83 pub const fn wrp1ar(&self) -> &WRP1AR {
84 &self.wrp1ar
85 }
86 ///0x30 - Flash WRP area B address register
87 #[inline(always)]
88 pub const fn wrp1br(&self) -> &WRP1BR {
89 &self.wrp1br
90 }
91 ///0x34 - Flash PCROP zone B Start address register
92 #[inline(always)]
93 pub const fn pcrop1bsr(&self) -> &PCROP1BSR {
94 &self.pcrop1bsr
95 }
96 ///0x38 - Flash PCROP area B End address register
97 #[inline(always)]
98 pub const fn pcrop1ber(&self) -> &PCROP1BER {
99 &self.pcrop1ber
100 }
101 ///0x44 - Flash PCROP2 area A start address register
102 #[inline(always)]
103 pub const fn pcrop2asr(&self) -> &PCROP2ASR {
104 &self.pcrop2asr
105 }
106 ///0x48 - Flash PCROP2 area A end address register
107 #[inline(always)]
108 pub const fn pcrop2aer(&self) -> &PCROP2AER {
109 &self.pcrop2aer
110 }
111 ///0x4c - Flash WRP2 area A address register
112 #[inline(always)]
113 pub const fn wrp2ar(&self) -> &WRP2AR {
114 &self.wrp2ar
115 }
116 ///0x50 - Flash WRP2 area B address register
117 #[inline(always)]
118 pub const fn wrp2br(&self) -> &WRP2BR {
119 &self.wrp2br
120 }
121 ///0x54 - FLASH PCROP2 area B start address register
122 #[inline(always)]
123 pub const fn pcrop2bsr(&self) -> &PCROP2BSR {
124 &self.pcrop2bsr
125 }
126 ///0x58 - FLASH PCROP2 area B end address register
127 #[inline(always)]
128 pub const fn pcrop2ber(&self) -> &PCROP2BER {
129 &self.pcrop2ber
130 }
131 ///0x80 - Flash Security register
132 #[inline(always)]
133 pub const fn secr(&self) -> &SECR {
134 &self.secr
135 }
136}
137/**ACR (rw) register accessor: Access control register
138
139You can [`read`](crate::Reg::read) this register and get [`acr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`acr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
140
141See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0C1.html#FLASH:ACR)
142
143For information about available fields see [`mod@acr`]
144module*/
145pub type ACR = crate::Reg<acr::ACRrs>;
146///Access control register
147pub mod acr;
148/**KEYR (w) register accessor: Flash key register
149
150You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`keyr::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
151
152See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0C1.html#FLASH:KEYR)
153
154For information about available fields see [`mod@keyr`]
155module*/
156pub type KEYR = crate::Reg<keyr::KEYRrs>;
157///Flash key register
158pub mod keyr;
159/**OPTKEYR (w) register accessor: Option byte key register
160
161You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`optkeyr::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
162
163See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0C1.html#FLASH:OPTKEYR)
164
165For information about available fields see [`mod@optkeyr`]
166module*/
167pub type OPTKEYR = crate::Reg<optkeyr::OPTKEYRrs>;
168///Option byte key register
169pub mod optkeyr;
170/**SR (rw) register accessor: Status register
171
172You can [`read`](crate::Reg::read) this register and get [`sr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
173
174See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0C1.html#FLASH:SR)
175
176For information about available fields see [`mod@sr`]
177module*/
178pub type SR = crate::Reg<sr::SRrs>;
179///Status register
180pub mod sr;
181/**CR (rw) register accessor: Flash control register
182
183You can [`read`](crate::Reg::read) this register and get [`cr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
184
185See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0C1.html#FLASH:CR)
186
187For information about available fields see [`mod@cr`]
188module*/
189pub type CR = crate::Reg<cr::CRrs>;
190///Flash control register
191pub mod cr;
192/**ECCR (rw) register accessor: Flash ECC register
193
194You can [`read`](crate::Reg::read) this register and get [`eccr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`eccr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
195
196See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0C1.html#FLASH:ECCR)
197
198For information about available fields see [`mod@eccr`]
199module*/
200pub type ECCR = crate::Reg<eccr::ECCRrs>;
201///Flash ECC register
202pub mod eccr;
203/**ECCR2 (rw) register accessor: Flash ECC register 2
204
205You can [`read`](crate::Reg::read) this register and get [`eccr2::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`eccr2::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
206
207See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0C1.html#FLASH:ECCR2)
208
209For information about available fields see [`mod@eccr2`]
210module*/
211pub type ECCR2 = crate::Reg<eccr2::ECCR2rs>;
212///Flash ECC register 2
213pub mod eccr2;
214/**OPTR (rw) register accessor: Flash option register
215
216You can [`read`](crate::Reg::read) this register and get [`optr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`optr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
217
218See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0C1.html#FLASH:OPTR)
219
220For information about available fields see [`mod@optr`]
221module*/
222pub type OPTR = crate::Reg<optr::OPTRrs>;
223///Flash option register
224pub mod optr;
225/**PCROP1ASR (r) register accessor: Flash PCROP zone A Start address register
226
227You can [`read`](crate::Reg::read) this register and get [`pcrop1asr::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
228
229See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0C1.html#FLASH:PCROP1ASR)
230
231For information about available fields see [`mod@pcrop1asr`]
232module*/
233pub type PCROP1ASR = crate::Reg<pcrop1asr::PCROP1ASRrs>;
234///Flash PCROP zone A Start address register
235pub mod pcrop1asr;
236/**PCROP1AER (r) register accessor: Flash PCROP zone A End address register
237
238You can [`read`](crate::Reg::read) this register and get [`pcrop1aer::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
239
240See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0C1.html#FLASH:PCROP1AER)
241
242For information about available fields see [`mod@pcrop1aer`]
243module*/
244pub type PCROP1AER = crate::Reg<pcrop1aer::PCROP1AERrs>;
245///Flash PCROP zone A End address register
246pub mod pcrop1aer;
247/**WRP1AR (rw) register accessor: Flash WRP area A address register
248
249You can [`read`](crate::Reg::read) this register and get [`wrp1ar::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`wrp1ar::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
250
251See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0C1.html#FLASH:WRP1AR)
252
253For information about available fields see [`mod@wrp1ar`]
254module*/
255pub type WRP1AR = crate::Reg<wrp1ar::WRP1ARrs>;
256///Flash WRP area A address register
257pub mod wrp1ar;
258/**WRP1BR (rw) register accessor: Flash WRP area B address register
259
260You can [`read`](crate::Reg::read) this register and get [`wrp1br::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`wrp1br::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
261
262See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0C1.html#FLASH:WRP1BR)
263
264For information about available fields see [`mod@wrp1br`]
265module*/
266pub type WRP1BR = crate::Reg<wrp1br::WRP1BRrs>;
267///Flash WRP area B address register
268pub mod wrp1br;
269/**PCROP1BSR (r) register accessor: Flash PCROP zone B Start address register
270
271You can [`read`](crate::Reg::read) this register and get [`pcrop1bsr::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
272
273See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0C1.html#FLASH:PCROP1BSR)
274
275For information about available fields see [`mod@pcrop1bsr`]
276module*/
277pub type PCROP1BSR = crate::Reg<pcrop1bsr::PCROP1BSRrs>;
278///Flash PCROP zone B Start address register
279pub mod pcrop1bsr;
280/**PCROP1BER (rw) register accessor: Flash PCROP area B End address register
281
282You can [`read`](crate::Reg::read) this register and get [`pcrop1ber::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pcrop1ber::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
283
284See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0C1.html#FLASH:PCROP1BER)
285
286For information about available fields see [`mod@pcrop1ber`]
287module*/
288pub type PCROP1BER = crate::Reg<pcrop1ber::PCROP1BERrs>;
289///Flash PCROP area B End address register
290pub mod pcrop1ber;
291/**PCROP2ASR (rw) register accessor: Flash PCROP2 area A start address register
292
293You can [`read`](crate::Reg::read) this register and get [`pcrop2asr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pcrop2asr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
294
295See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0C1.html#FLASH:PCROP2ASR)
296
297For information about available fields see [`mod@pcrop2asr`]
298module*/
299pub type PCROP2ASR = crate::Reg<pcrop2asr::PCROP2ASRrs>;
300///Flash PCROP2 area A start address register
301pub mod pcrop2asr;
302/**PCROP2AER (rw) register accessor: Flash PCROP2 area A end address register
303
304You can [`read`](crate::Reg::read) this register and get [`pcrop2aer::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pcrop2aer::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
305
306See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0C1.html#FLASH:PCROP2AER)
307
308For information about available fields see [`mod@pcrop2aer`]
309module*/
310pub type PCROP2AER = crate::Reg<pcrop2aer::PCROP2AERrs>;
311///Flash PCROP2 area A end address register
312pub mod pcrop2aer;
313/**WRP2AR (rw) register accessor: Flash WRP2 area A address register
314
315You can [`read`](crate::Reg::read) this register and get [`wrp2ar::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`wrp2ar::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
316
317See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0C1.html#FLASH:WRP2AR)
318
319For information about available fields see [`mod@wrp2ar`]
320module*/
321pub type WRP2AR = crate::Reg<wrp2ar::WRP2ARrs>;
322///Flash WRP2 area A address register
323pub mod wrp2ar;
324/**WRP2BR (rw) register accessor: Flash WRP2 area B address register
325
326You can [`read`](crate::Reg::read) this register and get [`wrp2br::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`wrp2br::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
327
328See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0C1.html#FLASH:WRP2BR)
329
330For information about available fields see [`mod@wrp2br`]
331module*/
332pub type WRP2BR = crate::Reg<wrp2br::WRP2BRrs>;
333///Flash WRP2 area B address register
334pub mod wrp2br;
335/**PCROP2BSR (rw) register accessor: FLASH PCROP2 area B start address register
336
337You can [`read`](crate::Reg::read) this register and get [`pcrop2bsr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pcrop2bsr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
338
339See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0C1.html#FLASH:PCROP2BSR)
340
341For information about available fields see [`mod@pcrop2bsr`]
342module*/
343pub type PCROP2BSR = crate::Reg<pcrop2bsr::PCROP2BSRrs>;
344///FLASH PCROP2 area B start address register
345pub mod pcrop2bsr;
346/**PCROP2BER (rw) register accessor: FLASH PCROP2 area B end address register
347
348You can [`read`](crate::Reg::read) this register and get [`pcrop2ber::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pcrop2ber::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
349
350See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0C1.html#FLASH:PCROP2BER)
351
352For information about available fields see [`mod@pcrop2ber`]
353module*/
354pub type PCROP2BER = crate::Reg<pcrop2ber::PCROP2BERrs>;
355///FLASH PCROP2 area B end address register
356pub mod pcrop2ber;
357/**SECR (rw) register accessor: Flash Security register
358
359You can [`read`](crate::Reg::read) this register and get [`secr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`secr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
360
361See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0C1.html#FLASH:SECR)
362
363For information about available fields see [`mod@secr`]
364module*/
365pub type SECR = crate::Reg<secr::SECRrs>;
366///Flash Security register
367pub mod secr;