stm32g0_staging/stm32g0b0/crc.rs
1#[repr(C)]
2#[derive(Debug)]
3///Register block
4pub struct RegisterBlock {
5 dr: DR,
6 idr: IDR,
7 cr: CR,
8 _reserved3: [u8; 0x04],
9 init: INIT,
10 pol: POL,
11}
12impl RegisterBlock {
13 ///0x00 - Data register
14 #[inline(always)]
15 pub const fn dr(&self) -> &DR {
16 &self.dr
17 }
18 ///0x04 - Independent data register
19 #[inline(always)]
20 pub const fn idr(&self) -> &IDR {
21 &self.idr
22 }
23 ///0x08 - Control register
24 #[inline(always)]
25 pub const fn cr(&self) -> &CR {
26 &self.cr
27 }
28 ///0x10 - Initial CRC value
29 #[inline(always)]
30 pub const fn init(&self) -> &INIT {
31 &self.init
32 }
33 ///0x14 - polynomial
34 #[inline(always)]
35 pub const fn pol(&self) -> &POL {
36 &self.pol
37 }
38}
39/**DR (rw) register accessor: Data register
40
41You can [`read`](crate::Reg::read) this register and get [`dr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`dr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
42
43See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0B0.html#CRC:DR)
44
45For information about available fields see [`mod@dr`]
46module*/
47pub type DR = crate::Reg<dr::DRrs>;
48///Data register
49pub mod dr;
50/**IDR (rw) register accessor: Independent data register
51
52You can [`read`](crate::Reg::read) this register and get [`idr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`idr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
53
54See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0B0.html#CRC:IDR)
55
56For information about available fields see [`mod@idr`]
57module*/
58pub type IDR = crate::Reg<idr::IDRrs>;
59///Independent data register
60pub mod idr;
61/**CR (rw) register accessor: Control register
62
63You 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).
64
65See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0B0.html#CRC:CR)
66
67For information about available fields see [`mod@cr`]
68module*/
69pub type CR = crate::Reg<cr::CRrs>;
70///Control register
71pub mod cr;
72/**INIT (rw) register accessor: Initial CRC value
73
74You can [`read`](crate::Reg::read) this register and get [`init::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`init::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
75
76See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0B0.html#CRC:INIT)
77
78For information about available fields see [`mod@init`]
79module*/
80pub type INIT = crate::Reg<init::INITrs>;
81///Initial CRC value
82pub mod init;
83/**POL (rw) register accessor: polynomial
84
85You can [`read`](crate::Reg::read) this register and get [`pol::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pol::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
86
87See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0B0.html#CRC:POL)
88
89For information about available fields see [`mod@pol`]
90module*/
91pub type POL = crate::Reg<pol::POLrs>;
92///polynomial
93pub mod pol;