Skip to content

Commit

Permalink
Make all register blocks (with delays) Repr(C)
Browse files Browse the repository at this point in the history
Fixes an incorrect assumption that was broken in [Rust PR 102750](rust-lang/rust#102750)
  • Loading branch information
Johannes Cornelis Draaijer committed Jan 24, 2023
1 parent 74eb751 commit f4a4e7d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/peripherals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ mod pac_override_impl {
}
}

#[repr(C)]
pub struct MacRegisterBlock {
#[doc = "0x00 - Ethernet MAC configuration register"]
pub maccr: DelayedReg<maccr::MACCR_SPEC>,
Expand Down Expand Up @@ -207,6 +208,7 @@ mod pac_override_impl {
}
}

#[repr(C)]
pub struct DmaRegisterBlock {
#[doc = "0x00 - Ethernet DMA bus mode register"]
pub dmabmr: DelayedReg<dmabmr::DMABMR_SPEC>,
Expand Down Expand Up @@ -274,6 +276,7 @@ mod pac_override_impl {
}
}

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

0 comments on commit f4a4e7d

Please sign in to comment.