stm32f3_staging/stm32f373/flash.rs
1#[repr(C)]
2#[derive(Debug)]
3///Register block
4pub struct RegisterBlock {
5 acr: ACR,
6 keyr: KEYR,
7 optkeyr: OPTKEYR,
8 sr: SR,
9 cr: CR,
10 ar: AR,
11 _reserved6: [u8; 0x04],
12 obr: OBR,
13 wrpr: WRPR,
14}
15impl RegisterBlock {
16 ///0x00 - Flash access control register
17 #[inline(always)]
18 pub const fn acr(&self) -> &ACR {
19 &self.acr
20 }
21 ///0x04 - Flash key register
22 #[inline(always)]
23 pub const fn keyr(&self) -> &KEYR {
24 &self.keyr
25 }
26 ///0x08 - Flash option key register
27 #[inline(always)]
28 pub const fn optkeyr(&self) -> &OPTKEYR {
29 &self.optkeyr
30 }
31 ///0x0c - Flash status register
32 #[inline(always)]
33 pub const fn sr(&self) -> &SR {
34 &self.sr
35 }
36 ///0x10 - Flash control register
37 #[inline(always)]
38 pub const fn cr(&self) -> &CR {
39 &self.cr
40 }
41 ///0x14 - Flash address register
42 #[inline(always)]
43 pub const fn ar(&self) -> &AR {
44 &self.ar
45 }
46 ///0x1c - Option byte register
47 #[inline(always)]
48 pub const fn obr(&self) -> &OBR {
49 &self.obr
50 }
51 ///0x20 - Write protection register
52 #[inline(always)]
53 pub const fn wrpr(&self) -> &WRPR {
54 &self.wrpr
55 }
56}
57/**ACR (rw) register accessor: Flash access control register
58
59You 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).
60
61See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F373.html#FLASH:ACR)
62
63For information about available fields see [`mod@acr`]
64module*/
65pub type ACR = crate::Reg<acr::ACRrs>;
66///Flash access control register
67pub mod acr;
68/**KEYR (w) register accessor: Flash key register
69
70You 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).
71
72See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F373.html#FLASH:KEYR)
73
74For information about available fields see [`mod@keyr`]
75module*/
76pub type KEYR = crate::Reg<keyr::KEYRrs>;
77///Flash key register
78pub mod keyr;
79/**OPTKEYR (w) register accessor: Flash option key register
80
81You 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).
82
83See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F373.html#FLASH:OPTKEYR)
84
85For information about available fields see [`mod@optkeyr`]
86module*/
87pub type OPTKEYR = crate::Reg<optkeyr::OPTKEYRrs>;
88///Flash option key register
89pub mod optkeyr;
90/**SR (rw) register accessor: Flash status register
91
92You 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).
93
94See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F373.html#FLASH:SR)
95
96For information about available fields see [`mod@sr`]
97module*/
98pub type SR = crate::Reg<sr::SRrs>;
99///Flash status register
100pub mod sr;
101/**CR (rw) register accessor: Flash control register
102
103You 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).
104
105See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F373.html#FLASH:CR)
106
107For information about available fields see [`mod@cr`]
108module*/
109pub type CR = crate::Reg<cr::CRrs>;
110///Flash control register
111pub mod cr;
112/**AR (w) register accessor: Flash address register
113
114You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ar::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
115
116See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F373.html#FLASH:AR)
117
118For information about available fields see [`mod@ar`]
119module*/
120pub type AR = crate::Reg<ar::ARrs>;
121///Flash address register
122pub mod ar;
123/**OBR (r) register accessor: Option byte register
124
125You can [`read`](crate::Reg::read) this register and get [`obr::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
126
127See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F373.html#FLASH:OBR)
128
129For information about available fields see [`mod@obr`]
130module*/
131pub type OBR = crate::Reg<obr::OBRrs>;
132///Option byte register
133pub mod obr;
134/**WRPR (r) register accessor: Write protection register
135
136You can [`read`](crate::Reg::read) this register and get [`wrpr::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
137
138See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F373.html#FLASH:WRPR)
139
140For information about available fields see [`mod@wrpr`]
141module*/
142pub type WRPR = crate::Reg<wrpr::WRPRrs>;
143///Write protection register
144pub mod wrpr;