stm32g0_staging/stm32g030/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 _reserved6: [u8; 0x04],
13 optr: OPTR,
14 _reserved7: [u8; 0x08],
15 wrp1ar: WRP1AR,
16 wrp1br: WRP1BR,
17 _reserved9: [u8; 0x18],
18 wrp2ar: WRP2AR,
19 wrp2br: WRP2BR,
20}
21impl RegisterBlock {
22 ///0x00 - Access control register
23 #[inline(always)]
24 pub const fn acr(&self) -> &ACR {
25 &self.acr
26 }
27 ///0x08 - Flash key register
28 #[inline(always)]
29 pub const fn keyr(&self) -> &KEYR {
30 &self.keyr
31 }
32 ///0x0c - Option byte key register
33 #[inline(always)]
34 pub const fn optkeyr(&self) -> &OPTKEYR {
35 &self.optkeyr
36 }
37 ///0x10 - Status register
38 #[inline(always)]
39 pub const fn sr(&self) -> &SR {
40 &self.sr
41 }
42 ///0x14 - Flash control register
43 #[inline(always)]
44 pub const fn cr(&self) -> &CR {
45 &self.cr
46 }
47 ///0x18 - Flash ECC register
48 #[inline(always)]
49 pub const fn eccr(&self) -> &ECCR {
50 &self.eccr
51 }
52 ///0x20 - Flash option register
53 #[inline(always)]
54 pub const fn optr(&self) -> &OPTR {
55 &self.optr
56 }
57 ///0x2c - Flash WRP area A address register
58 #[inline(always)]
59 pub const fn wrp1ar(&self) -> &WRP1AR {
60 &self.wrp1ar
61 }
62 ///0x30 - Flash WRP area B address register
63 #[inline(always)]
64 pub const fn wrp1br(&self) -> &WRP1BR {
65 &self.wrp1br
66 }
67 ///0x4c - FLASH WRP2 area A address register
68 #[inline(always)]
69 pub const fn wrp2ar(&self) -> &WRP2AR {
70 &self.wrp2ar
71 }
72 ///0x50 - FLASH WRP2 area B address register
73 #[inline(always)]
74 pub const fn wrp2br(&self) -> &WRP2BR {
75 &self.wrp2br
76 }
77}
78/**ACR (rw) register accessor: Access control register
79
80You 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).
81
82See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G030.html#FLASH:ACR)
83
84For information about available fields see [`mod@acr`]
85module*/
86pub type ACR = crate::Reg<acr::ACRrs>;
87///Access control register
88pub mod acr;
89/**KEYR (w) register accessor: Flash key register
90
91You 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).
92
93See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G030.html#FLASH:KEYR)
94
95For information about available fields see [`mod@keyr`]
96module*/
97pub type KEYR = crate::Reg<keyr::KEYRrs>;
98///Flash key register
99pub mod keyr;
100/**OPTKEYR (w) register accessor: Option byte key register
101
102You 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).
103
104See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G030.html#FLASH:OPTKEYR)
105
106For information about available fields see [`mod@optkeyr`]
107module*/
108pub type OPTKEYR = crate::Reg<optkeyr::OPTKEYRrs>;
109///Option byte key register
110pub mod optkeyr;
111/**SR (rw) register accessor: Status register
112
113You 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).
114
115See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G030.html#FLASH:SR)
116
117For information about available fields see [`mod@sr`]
118module*/
119pub type SR = crate::Reg<sr::SRrs>;
120///Status register
121pub mod sr;
122/**CR (rw) register accessor: Flash control register
123
124You 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).
125
126See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G030.html#FLASH:CR)
127
128For information about available fields see [`mod@cr`]
129module*/
130pub type CR = crate::Reg<cr::CRrs>;
131///Flash control register
132pub mod cr;
133/**ECCR (rw) register accessor: Flash ECC register
134
135You 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).
136
137See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G030.html#FLASH:ECCR)
138
139For information about available fields see [`mod@eccr`]
140module*/
141pub type ECCR = crate::Reg<eccr::ECCRrs>;
142///Flash ECC register
143pub mod eccr;
144/**OPTR (rw) register accessor: Flash option register
145
146You 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).
147
148See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G030.html#FLASH:OPTR)
149
150For information about available fields see [`mod@optr`]
151module*/
152pub type OPTR = crate::Reg<optr::OPTRrs>;
153///Flash option register
154pub mod optr;
155/**WRP1AR (rw) register accessor: Flash WRP area A address register
156
157You 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).
158
159See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G030.html#FLASH:WRP1AR)
160
161For information about available fields see [`mod@wrp1ar`]
162module*/
163pub type WRP1AR = crate::Reg<wrp1ar::WRP1ARrs>;
164///Flash WRP area A address register
165pub mod wrp1ar;
166/**WRP1BR (rw) register accessor: Flash WRP area B address register
167
168You 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).
169
170See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G030.html#FLASH:WRP1BR)
171
172For information about available fields see [`mod@wrp1br`]
173module*/
174pub type WRP1BR = crate::Reg<wrp1br::WRP1BRrs>;
175///Flash WRP area B address register
176pub mod wrp1br;
177/**WRP2AR (rw) register accessor: FLASH WRP2 area A address register
178
179You 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).
180
181See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G030.html#FLASH:WRP2AR)
182
183For information about available fields see [`mod@wrp2ar`]
184module*/
185pub type WRP2AR = crate::Reg<wrp2ar::WRP2ARrs>;
186///FLASH WRP2 area A address register
187pub mod wrp2ar;
188/**WRP2BR (rw) register accessor: FLASH WRP2 area B address register
189
190You 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).
191
192See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G030.html#FLASH:WRP2BR)
193
194For information about available fields see [`mod@wrp2br`]
195module*/
196pub type WRP2BR = crate::Reg<wrp2br::WRP2BRrs>;
197///FLASH WRP2 area B address register
198pub mod wrp2br;