stm32f3_staging/stm32f303/
crc.rs

1#[repr(C)]
2#[derive(Debug)]
3///Register block
4pub struct RegisterBlock {
5    _reserved_0_dr: [u8; 0x04],
6    idr: IDR,
7    cr: CR,
8    _reserved3: [u8; 0x04],
9    init: INIT,
10    pol: POL,
11}
12impl RegisterBlock {
13    ///0x00 - Data register - half-word sized
14    #[inline(always)]
15    pub const fn dr16(&self) -> &DR16 {
16        unsafe { &*core::ptr::from_ref(self).cast::<u8>().cast() }
17    }
18    ///0x00 - Data register - byte sized
19    #[inline(always)]
20    pub const fn dr8(&self) -> &DR8 {
21        unsafe { &*core::ptr::from_ref(self).cast::<u8>().cast() }
22    }
23    ///0x00 - Data register
24    #[inline(always)]
25    pub const fn dr(&self) -> &DR {
26        unsafe { &*core::ptr::from_ref(self).cast::<u8>().cast() }
27    }
28    ///0x04 - Independent data register
29    #[inline(always)]
30    pub const fn idr(&self) -> &IDR {
31        &self.idr
32    }
33    ///0x08 - Control register
34    #[inline(always)]
35    pub const fn cr(&self) -> &CR {
36        &self.cr
37    }
38    ///0x10 - Initial CRC value
39    #[inline(always)]
40    pub const fn init(&self) -> &INIT {
41        &self.init
42    }
43    ///0x14 - CRC polynomial
44    #[inline(always)]
45    pub const fn pol(&self) -> &POL {
46        &self.pol
47    }
48}
49/**DR (rw) register accessor: Data register
50
51You 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).
52
53See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F303.html#CRC:DR)
54
55For information about available fields see [`mod@dr`]
56module*/
57pub type DR = crate::Reg<dr::DRrs>;
58///Data register
59pub mod dr;
60/**IDR (rw) register accessor: Independent data register
61
62You 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).
63
64See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F303.html#CRC:IDR)
65
66For information about available fields see [`mod@idr`]
67module*/
68pub type IDR = crate::Reg<idr::IDRrs>;
69///Independent data register
70pub mod idr;
71/**CR (rw) register accessor: Control register
72
73You 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).
74
75See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F303.html#CRC:CR)
76
77For information about available fields see [`mod@cr`]
78module*/
79pub type CR = crate::Reg<cr::CRrs>;
80///Control register
81pub mod cr;
82/**INIT (rw) register accessor: Initial CRC value
83
84You 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).
85
86See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F303.html#CRC:INIT)
87
88For information about available fields see [`mod@init`]
89module*/
90pub type INIT = crate::Reg<init::INITrs>;
91///Initial CRC value
92pub mod init;
93/**POL (rw) register accessor: CRC polynomial
94
95You 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).
96
97See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F303.html#CRC:POL)
98
99For information about available fields see [`mod@pol`]
100module*/
101pub type POL = crate::Reg<pol::POLrs>;
102///CRC polynomial
103pub mod pol;
104/**DR8 (rw) register accessor: Data register - byte sized
105
106You can [`read`](crate::Reg::read) this register and get [`dr8::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`dr8::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
107
108See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F303.html#CRC:DR8)
109
110For information about available fields see [`mod@dr8`]
111module*/
112pub type DR8 = crate::Reg<dr8::DR8rs>;
113///Data register - byte sized
114pub mod dr8;
115/**DR16 (rw) register accessor: Data register - half-word sized
116
117You can [`read`](crate::Reg::read) this register and get [`dr16::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`dr16::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
118
119See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F303.html#CRC:DR16)
120
121For information about available fields see [`mod@dr16`]
122module*/
123pub type DR16 = crate::Reg<dr16::DR16rs>;
124///Data register - half-word sized
125pub mod dr16;