1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
///Register block
#[repr(C)]
pub struct RegisterBlock {
///0x00 - desc CR1
pub cr1: CR1,
///0x04 - desc CR2
pub cr2: CR2,
///0x08 - desc SR
pub sr: SR,
_reserved_3_dr: [u8; 0x04],
///0x10 - desc CRCPR
pub crcpr: CRCPR,
///0x14 - desc RXCRCR
pub rxcrcr: RXCRCR,
///0x18 - desc TXCRCR
pub txcrcr: TXCRCR,
///0x1c - desc I2SCFGR
pub i2scfgr: I2SCFGR,
///0x20 - desc I2SPR
pub i2spr: I2SPR,
}
impl RegisterBlock {
///0x0c - Direct 8-bit access to data register
#[inline(always)]
pub const fn dr8(&self) -> &DR8 {
unsafe { &*(self as *const Self).cast::<u8>().add(12usize).cast() }
}
///0x0c - desc DR
#[inline(always)]
pub const fn dr(&self) -> &DR {
unsafe { &*(self as *const Self).cast::<u8>().add(12usize).cast() }
}
}
///CR1 (rw) register accessor: an alias for `Reg<CR1_SPEC>`
pub type CR1 = crate::Reg<cr1::CR1_SPEC>;
///desc CR1
pub mod cr1;
///CR2 (rw) register accessor: an alias for `Reg<CR2_SPEC>`
pub type CR2 = crate::Reg<cr2::CR2_SPEC>;
///desc CR2
pub mod cr2;
///SR (rw) register accessor: an alias for `Reg<SR_SPEC>`
pub type SR = crate::Reg<sr::SR_SPEC>;
///desc SR
pub mod sr;
///DR (rw) register accessor: an alias for `Reg<DR_SPEC>`
pub type DR = crate::Reg<dr::DR_SPEC>;
///desc DR
pub mod dr;
///CRCPR (rw) register accessor: an alias for `Reg<CRCPR_SPEC>`
pub type CRCPR = crate::Reg<crcpr::CRCPR_SPEC>;
///desc CRCPR
pub mod crcpr;
///RXCRCR (r) register accessor: an alias for `Reg<RXCRCR_SPEC>`
pub type RXCRCR = crate::Reg<rxcrcr::RXCRCR_SPEC>;
///desc RXCRCR
pub mod rxcrcr;
///TXCRCR (r) register accessor: an alias for `Reg<TXCRCR_SPEC>`
pub type TXCRCR = crate::Reg<txcrcr::TXCRCR_SPEC>;
///desc TXCRCR
pub mod txcrcr;
///I2SCFGR (rw) register accessor: an alias for `Reg<I2SCFGR_SPEC>`
pub type I2SCFGR = crate::Reg<i2scfgr::I2SCFGR_SPEC>;
///desc I2SCFGR
pub mod i2scfgr;
///I2SPR (rw) register accessor: an alias for `Reg<I2SPR_SPEC>`
pub type I2SPR = crate::Reg<i2spr::I2SPR_SPEC>;
///desc I2SPR
pub mod i2spr;
///DR8 (rw) register accessor: an alias for `Reg<DR8_SPEC>`
pub type DR8 = crate::Reg<dr8::DR8_SPEC>;
///Direct 8-bit access to data register
pub mod dr8;