stm32f3/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`] module*/
64pub type ACR = crate::Reg<acr::ACRrs>;
65///Flash access control register
66pub mod acr;
67/**KEYR (w) register accessor: Flash key register
68
69You 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).
70
71See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F373.html#FLASH:KEYR)
72
73For information about available fields see [`mod@keyr`] module*/
74pub type KEYR = crate::Reg<keyr::KEYRrs>;
75///Flash key register
76pub mod keyr;
77/**OPTKEYR (w) register accessor: Flash option key register
78
79You 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).
80
81See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F373.html#FLASH:OPTKEYR)
82
83For information about available fields see [`mod@optkeyr`] module*/
84pub type OPTKEYR = crate::Reg<optkeyr::OPTKEYRrs>;
85///Flash option key register
86pub mod optkeyr;
87/**SR (rw) register accessor: Flash status register
88
89You 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).
90
91See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F373.html#FLASH:SR)
92
93For information about available fields see [`mod@sr`] module*/
94pub type SR = crate::Reg<sr::SRrs>;
95///Flash status register
96pub mod sr;
97/**CR (rw) register accessor: Flash control register
98
99You 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).
100
101See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F373.html#FLASH:CR)
102
103For information about available fields see [`mod@cr`] module*/
104pub type CR = crate::Reg<cr::CRrs>;
105///Flash control register
106pub mod cr;
107/**AR (w) register accessor: Flash address register
108
109You 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).
110
111See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F373.html#FLASH:AR)
112
113For information about available fields see [`mod@ar`] module*/
114pub type AR = crate::Reg<ar::ARrs>;
115///Flash address register
116pub mod ar;
117/**OBR (r) register accessor: Option byte register
118
119You can [`read`](crate::Reg::read) this register and get [`obr::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
120
121See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F373.html#FLASH:OBR)
122
123For information about available fields see [`mod@obr`] module*/
124pub type OBR = crate::Reg<obr::OBRrs>;
125///Option byte register
126pub mod obr;
127/**WRPR (r) register accessor: Write protection register
128
129You can [`read`](crate::Reg::read) this register and get [`wrpr::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
130
131See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F373.html#FLASH:WRPR)
132
133For information about available fields see [`mod@wrpr`] module*/
134pub type WRPR = crate::Reg<wrpr::WRPRrs>;
135///Write protection register
136pub mod wrpr;