1#[doc = r"Register block"]
2#[repr(C)]
3pub struct RegisterBlock {
4 #[doc = "0x00 - SPI Control Register"]
5 pub spcr: SPCR,
6 #[doc = "0x01 - SPI Slave Select Polarity Register"]
7 pub sslp: SSLP,
8 #[doc = "0x02 - SPI Pin Control Register"]
9 pub sppcr: SPPCR,
10 #[doc = "0x03 - SPI Status Register"]
11 pub spsr: SPSR,
12 _reserved_4_spdr: [u8; 0x04],
13 _reserved5: [u8; 0x02],
14 #[doc = "0x0a - SPI Bit Rate Register"]
15 pub spbr: SPBR,
16 #[doc = "0x0b - SPI Data Control Register"]
17 pub spdcr: SPDCR,
18 #[doc = "0x0c - SPI Clock Delay Register"]
19 pub spckd: SPCKD,
20 #[doc = "0x0d - SPI Slave Select Negation Delay Register"]
21 pub sslnd: SSLND,
22 #[doc = "0x0e - SPI Next-Access Delay Register"]
23 pub spnd: SPND,
24 #[doc = "0x0f - SPI Control Register 2"]
25 pub spcr2: SPCR2,
26 #[doc = "0x10 - SPI Command Register 0"]
27 pub spcmd0: SPCMD0,
28}
29impl RegisterBlock {
30 #[doc = "0x04 - SPI Data Register ( halfword access )"]
31 #[inline(always)]
32 pub const fn spdr_ha(&self) -> &SPDR_HA {
33 unsafe { &*(self as *const Self).cast::<u8>().add(4usize).cast() }
34 }
35 #[doc = "0x04 - SPI Data Register"]
36 #[inline(always)]
37 pub const fn spdr(&self) -> &SPDR {
38 unsafe { &*(self as *const Self).cast::<u8>().add(4usize).cast() }
39 }
40}
41#[doc = "SPCR (rw) register accessor: an alias for `Reg<SPCR_SPEC>`"]
42pub type SPCR = crate::Reg<spcr::SPCR_SPEC>;
43#[doc = "SPI Control Register"]
44pub mod spcr;
45#[doc = "SSLP (rw) register accessor: an alias for `Reg<SSLP_SPEC>`"]
46pub type SSLP = crate::Reg<sslp::SSLP_SPEC>;
47#[doc = "SPI Slave Select Polarity Register"]
48pub mod sslp;
49#[doc = "SPPCR (rw) register accessor: an alias for `Reg<SPPCR_SPEC>`"]
50pub type SPPCR = crate::Reg<sppcr::SPPCR_SPEC>;
51#[doc = "SPI Pin Control Register"]
52pub mod sppcr;
53#[doc = "SPSR (rw) register accessor: an alias for `Reg<SPSR_SPEC>`"]
54pub type SPSR = crate::Reg<spsr::SPSR_SPEC>;
55#[doc = "SPI Status Register"]
56pub mod spsr;
57#[doc = "SPDR (rw) register accessor: an alias for `Reg<SPDR_SPEC>`"]
58pub type SPDR = crate::Reg<spdr::SPDR_SPEC>;
59#[doc = "SPI Data Register"]
60pub mod spdr;
61#[doc = "SPDR_HA (rw) register accessor: an alias for `Reg<SPDR_HA_SPEC>`"]
62pub type SPDR_HA = crate::Reg<spdr_ha::SPDR_HA_SPEC>;
63#[doc = "SPI Data Register ( halfword access )"]
64pub mod spdr_ha;
65#[doc = "SPBR (rw) register accessor: an alias for `Reg<SPBR_SPEC>`"]
66pub type SPBR = crate::Reg<spbr::SPBR_SPEC>;
67#[doc = "SPI Bit Rate Register"]
68pub mod spbr;
69#[doc = "SPDCR (rw) register accessor: an alias for `Reg<SPDCR_SPEC>`"]
70pub type SPDCR = crate::Reg<spdcr::SPDCR_SPEC>;
71#[doc = "SPI Data Control Register"]
72pub mod spdcr;
73#[doc = "SPCKD (rw) register accessor: an alias for `Reg<SPCKD_SPEC>`"]
74pub type SPCKD = crate::Reg<spckd::SPCKD_SPEC>;
75#[doc = "SPI Clock Delay Register"]
76pub mod spckd;
77#[doc = "SSLND (rw) register accessor: an alias for `Reg<SSLND_SPEC>`"]
78pub type SSLND = crate::Reg<sslnd::SSLND_SPEC>;
79#[doc = "SPI Slave Select Negation Delay Register"]
80pub mod sslnd;
81#[doc = "SPND (rw) register accessor: an alias for `Reg<SPND_SPEC>`"]
82pub type SPND = crate::Reg<spnd::SPND_SPEC>;
83#[doc = "SPI Next-Access Delay Register"]
84pub mod spnd;
85#[doc = "SPCR2 (rw) register accessor: an alias for `Reg<SPCR2_SPEC>`"]
86pub type SPCR2 = crate::Reg<spcr2::SPCR2_SPEC>;
87#[doc = "SPI Control Register 2"]
88pub mod spcr2;
89#[doc = "SPCMD0 (rw) register accessor: an alias for `Reg<SPCMD0_SPEC>`"]
90pub type SPCMD0 = crate::Reg<spcmd0::SPCMD0_SPEC>;
91#[doc = "SPI Command Register 0"]
92pub mod spcmd0;