stm32g4/stm32g431/pwr.rs
1#[repr(C)]
2#[derive(Debug)]
3///Register block
4pub struct RegisterBlock {
5 cr1: CR1,
6 cr2: CR2,
7 cr3: CR3,
8 cr4: CR4,
9 sr1: SR1,
10 sr2: SR2,
11 scr: SCR,
12 _reserved7: [u8; 0x04],
13 pucra: PUCRA,
14 pdcra: PDCRA,
15 pucrb: PUCRB,
16 pdcrb: PDCRB,
17 pucrc: PUCRC,
18 pdcrc: PDCRC,
19 pucrd: PUCRD,
20 pdcrd: PDCRD,
21 pucre: PUCRE,
22 pdcre: PDCRE,
23 pucrf: PUCRF,
24 pdcrf: PDCRF,
25 pucrg: PUCRG,
26 pdcrg: PDCRG,
27 _reserved21: [u8; 0x28],
28 cr5: CR5,
29}
30impl RegisterBlock {
31 ///0x00 - Power control register 1
32 #[inline(always)]
33 pub const fn cr1(&self) -> &CR1 {
34 &self.cr1
35 }
36 ///0x04 - Power control register 2
37 #[inline(always)]
38 pub const fn cr2(&self) -> &CR2 {
39 &self.cr2
40 }
41 ///0x08 - Power control register 3
42 #[inline(always)]
43 pub const fn cr3(&self) -> &CR3 {
44 &self.cr3
45 }
46 ///0x0c - Power control register 4
47 #[inline(always)]
48 pub const fn cr4(&self) -> &CR4 {
49 &self.cr4
50 }
51 ///0x10 - Power status register 1
52 #[inline(always)]
53 pub const fn sr1(&self) -> &SR1 {
54 &self.sr1
55 }
56 ///0x14 - Power status register 2
57 #[inline(always)]
58 pub const fn sr2(&self) -> &SR2 {
59 &self.sr2
60 }
61 ///0x18 - Power status clear register
62 #[inline(always)]
63 pub const fn scr(&self) -> &SCR {
64 &self.scr
65 }
66 ///0x20 - Power Port A pull-up control register
67 #[inline(always)]
68 pub const fn pucra(&self) -> &PUCRA {
69 &self.pucra
70 }
71 ///0x24 - Power Port A pull-down control register
72 #[inline(always)]
73 pub const fn pdcra(&self) -> &PDCRA {
74 &self.pdcra
75 }
76 ///0x28 - Power Port B pull-up control register
77 #[inline(always)]
78 pub const fn pucrb(&self) -> &PUCRB {
79 &self.pucrb
80 }
81 ///0x2c - Power Port B pull-down control register
82 #[inline(always)]
83 pub const fn pdcrb(&self) -> &PDCRB {
84 &self.pdcrb
85 }
86 ///0x30 - Power Port C pull-up control register
87 #[inline(always)]
88 pub const fn pucrc(&self) -> &PUCRC {
89 &self.pucrc
90 }
91 ///0x34 - Power Port C pull-down control register
92 #[inline(always)]
93 pub const fn pdcrc(&self) -> &PDCRC {
94 &self.pdcrc
95 }
96 ///0x38 - Power Port D pull-up control register
97 #[inline(always)]
98 pub const fn pucrd(&self) -> &PUCRD {
99 &self.pucrd
100 }
101 ///0x3c - Power Port D pull-down control register
102 #[inline(always)]
103 pub const fn pdcrd(&self) -> &PDCRD {
104 &self.pdcrd
105 }
106 ///0x40 - Power Port E pull-up control register
107 #[inline(always)]
108 pub const fn pucre(&self) -> &PUCRE {
109 &self.pucre
110 }
111 ///0x44 - Power Port E pull-down control register
112 #[inline(always)]
113 pub const fn pdcre(&self) -> &PDCRE {
114 &self.pdcre
115 }
116 ///0x48 - Power Port F pull-up control register
117 #[inline(always)]
118 pub const fn pucrf(&self) -> &PUCRF {
119 &self.pucrf
120 }
121 ///0x4c - Power Port F pull-down control register
122 #[inline(always)]
123 pub const fn pdcrf(&self) -> &PDCRF {
124 &self.pdcrf
125 }
126 ///0x50 - Power Port G pull-up control register
127 #[inline(always)]
128 pub const fn pucrg(&self) -> &PUCRG {
129 &self.pucrg
130 }
131 ///0x54 - Power Port G pull-down control register
132 #[inline(always)]
133 pub const fn pdcrg(&self) -> &PDCRG {
134 &self.pdcrg
135 }
136 ///0x80 - Power control register
137 #[inline(always)]
138 pub const fn cr5(&self) -> &CR5 {
139 &self.cr5
140 }
141}
142/**CR1 (rw) register accessor: Power control register 1
143
144You can [`read`](crate::Reg::read) this register and get [`cr1::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cr1::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
145
146See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G431.html#PWR:CR1)
147
148For information about available fields see [`mod@cr1`] module*/
149pub type CR1 = crate::Reg<cr1::CR1rs>;
150///Power control register 1
151pub mod cr1;
152/**CR2 (rw) register accessor: Power control register 2
153
154You can [`read`](crate::Reg::read) this register and get [`cr2::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cr2::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
155
156See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G431.html#PWR:CR2)
157
158For information about available fields see [`mod@cr2`] module*/
159pub type CR2 = crate::Reg<cr2::CR2rs>;
160///Power control register 2
161pub mod cr2;
162/**CR3 (rw) register accessor: Power control register 3
163
164You can [`read`](crate::Reg::read) this register and get [`cr3::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cr3::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
165
166See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G431.html#PWR:CR3)
167
168For information about available fields see [`mod@cr3`] module*/
169pub type CR3 = crate::Reg<cr3::CR3rs>;
170///Power control register 3
171pub mod cr3;
172/**CR4 (rw) register accessor: Power control register 4
173
174You can [`read`](crate::Reg::read) this register and get [`cr4::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cr4::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
175
176See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G431.html#PWR:CR4)
177
178For information about available fields see [`mod@cr4`] module*/
179pub type CR4 = crate::Reg<cr4::CR4rs>;
180///Power control register 4
181pub mod cr4;
182/**SR1 (r) register accessor: Power status register 1
183
184You can [`read`](crate::Reg::read) this register and get [`sr1::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
185
186See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G431.html#PWR:SR1)
187
188For information about available fields see [`mod@sr1`] module*/
189pub type SR1 = crate::Reg<sr1::SR1rs>;
190///Power status register 1
191pub mod sr1;
192/**SR2 (r) register accessor: Power status register 2
193
194You can [`read`](crate::Reg::read) this register and get [`sr2::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
195
196See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G431.html#PWR:SR2)
197
198For information about available fields see [`mod@sr2`] module*/
199pub type SR2 = crate::Reg<sr2::SR2rs>;
200///Power status register 2
201pub mod sr2;
202/**SCR (w) register accessor: Power status clear register
203
204You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`scr::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
205
206See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G431.html#PWR:SCR)
207
208For information about available fields see [`mod@scr`] module*/
209pub type SCR = crate::Reg<scr::SCRrs>;
210///Power status clear register
211pub mod scr;
212/**PUCRA (rw) register accessor: Power Port A pull-up control register
213
214You can [`read`](crate::Reg::read) this register and get [`pucra::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pucra::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
215
216See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G431.html#PWR:PUCRA)
217
218For information about available fields see [`mod@pucra`] module*/
219pub type PUCRA = crate::Reg<pucra::PUCRArs>;
220///Power Port A pull-up control register
221pub mod pucra;
222/**PDCRA (rw) register accessor: Power Port A pull-down control register
223
224You can [`read`](crate::Reg::read) this register and get [`pdcra::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pdcra::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
225
226See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G431.html#PWR:PDCRA)
227
228For information about available fields see [`mod@pdcra`] module*/
229pub type PDCRA = crate::Reg<pdcra::PDCRArs>;
230///Power Port A pull-down control register
231pub mod pdcra;
232/**PUCRB (rw) register accessor: Power Port B pull-up control register
233
234You can [`read`](crate::Reg::read) this register and get [`pucrb::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pucrb::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
235
236See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G431.html#PWR:PUCRB)
237
238For information about available fields see [`mod@pucrb`] module*/
239pub type PUCRB = crate::Reg<pucrb::PUCRBrs>;
240///Power Port B pull-up control register
241pub mod pucrb;
242/**PDCRB (rw) register accessor: Power Port B pull-down control register
243
244You can [`read`](crate::Reg::read) this register and get [`pdcrb::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pdcrb::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
245
246See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G431.html#PWR:PDCRB)
247
248For information about available fields see [`mod@pdcrb`] module*/
249pub type PDCRB = crate::Reg<pdcrb::PDCRBrs>;
250///Power Port B pull-down control register
251pub mod pdcrb;
252/**PUCRC (rw) register accessor: Power Port C pull-up control register
253
254You can [`read`](crate::Reg::read) this register and get [`pucrc::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pucrc::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
255
256See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G431.html#PWR:PUCRC)
257
258For information about available fields see [`mod@pucrc`] module*/
259pub type PUCRC = crate::Reg<pucrc::PUCRCrs>;
260///Power Port C pull-up control register
261pub mod pucrc;
262/**PDCRC (rw) register accessor: Power Port C pull-down control register
263
264You can [`read`](crate::Reg::read) this register and get [`pdcrc::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pdcrc::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
265
266See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G431.html#PWR:PDCRC)
267
268For information about available fields see [`mod@pdcrc`] module*/
269pub type PDCRC = crate::Reg<pdcrc::PDCRCrs>;
270///Power Port C pull-down control register
271pub mod pdcrc;
272/**PUCRD (rw) register accessor: Power Port D pull-up control register
273
274You can [`read`](crate::Reg::read) this register and get [`pucrd::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pucrd::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
275
276See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G431.html#PWR:PUCRD)
277
278For information about available fields see [`mod@pucrd`] module*/
279pub type PUCRD = crate::Reg<pucrd::PUCRDrs>;
280///Power Port D pull-up control register
281pub mod pucrd;
282/**PDCRD (rw) register accessor: Power Port D pull-down control register
283
284You can [`read`](crate::Reg::read) this register and get [`pdcrd::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pdcrd::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
285
286See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G431.html#PWR:PDCRD)
287
288For information about available fields see [`mod@pdcrd`] module*/
289pub type PDCRD = crate::Reg<pdcrd::PDCRDrs>;
290///Power Port D pull-down control register
291pub mod pdcrd;
292/**PUCRE (rw) register accessor: Power Port E pull-up control register
293
294You can [`read`](crate::Reg::read) this register and get [`pucre::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pucre::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
295
296See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G431.html#PWR:PUCRE)
297
298For information about available fields see [`mod@pucre`] module*/
299pub type PUCRE = crate::Reg<pucre::PUCRErs>;
300///Power Port E pull-up control register
301pub mod pucre;
302/**PDCRE (rw) register accessor: Power Port E pull-down control register
303
304You can [`read`](crate::Reg::read) this register and get [`pdcre::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pdcre::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/STM32G431.html#PWR:PDCRE)
307
308For information about available fields see [`mod@pdcre`] module*/
309pub type PDCRE = crate::Reg<pdcre::PDCRErs>;
310///Power Port E pull-down control register
311pub mod pdcre;
312/**PUCRF (rw) register accessor: Power Port F pull-up control register
313
314You can [`read`](crate::Reg::read) this register and get [`pucrf::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pucrf::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
315
316See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G431.html#PWR:PUCRF)
317
318For information about available fields see [`mod@pucrf`] module*/
319pub type PUCRF = crate::Reg<pucrf::PUCRFrs>;
320///Power Port F pull-up control register
321pub mod pucrf;
322/**PDCRF (rw) register accessor: Power Port F pull-down control register
323
324You can [`read`](crate::Reg::read) this register and get [`pdcrf::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pdcrf::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
325
326See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G431.html#PWR:PDCRF)
327
328For information about available fields see [`mod@pdcrf`] module*/
329pub type PDCRF = crate::Reg<pdcrf::PDCRFrs>;
330///Power Port F pull-down control register
331pub mod pdcrf;
332/**PUCRG (rw) register accessor: Power Port G pull-up control register
333
334You can [`read`](crate::Reg::read) this register and get [`pucrg::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pucrg::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
335
336See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G431.html#PWR:PUCRG)
337
338For information about available fields see [`mod@pucrg`] module*/
339pub type PUCRG = crate::Reg<pucrg::PUCRGrs>;
340///Power Port G pull-up control register
341pub mod pucrg;
342/**PDCRG (rw) register accessor: Power Port G pull-down control register
343
344You can [`read`](crate::Reg::read) this register and get [`pdcrg::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pdcrg::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
345
346See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G431.html#PWR:PDCRG)
347
348For information about available fields see [`mod@pdcrg`] module*/
349pub type PDCRG = crate::Reg<pdcrg::PDCRGrs>;
350///Power Port G pull-down control register
351pub mod pdcrg;
352/**CR5 (rw) register accessor: Power control register
353
354You can [`read`](crate::Reg::read) this register and get [`cr5::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cr5::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
355
356See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G431.html#PWR:CR5)
357
358For information about available fields see [`mod@cr5`] module*/
359pub type CR5 = crate::Reg<cr5::CR5rs>;
360///Power control register
361pub mod cr5;