Skip to content

Commit f4a4e7d

Browse files
author
Johannes Cornelis Draaijer
committed
Make all register blocks (with delays) Repr(C)
Fixes an incorrect assumption that was broken in [Rust PR 102750](rust-lang/rust#102750)
1 parent 74eb751 commit f4a4e7d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/peripherals.rs

+3
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ mod pac_override_impl {
135135
}
136136
}
137137

138+
#[repr(C)]
138139
pub struct MacRegisterBlock {
139140
#[doc = "0x00 - Ethernet MAC configuration register"]
140141
pub maccr: DelayedReg<maccr::MACCR_SPEC>,
@@ -207,6 +208,7 @@ mod pac_override_impl {
207208
}
208209
}
209210

211+
#[repr(C)]
210212
pub struct DmaRegisterBlock {
211213
#[doc = "0x00 - Ethernet DMA bus mode register"]
212214
pub dmabmr: DelayedReg<dmabmr::DMABMR_SPEC>,
@@ -274,6 +276,7 @@ mod pac_override_impl {
274276
}
275277
}
276278

279+
#[repr(C)]
277280
pub struct PtpRegisterBlock {
278281
#[doc = "0x00 - Ethernet PTP time stamp control register"]
279282
pub ptptscr: DelayedReg<ptptscr::PTPTSCR_SPEC>,

0 commit comments

Comments
 (0)