Skip to content

Commit

Permalink
fix for issue #114447 <rust-lang/rust#114447>
Browse files Browse the repository at this point in the history
  • Loading branch information
Koppany Pazman authored and Koppany Pazman committed Aug 22, 2024
1 parent d2c5e12 commit 712a646
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/ethernet_hal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ fn main() -> ! {
dp.ETHERNET_MAC,
dp.ETHERNET_MTL,
dp.ETHERNET_DMA,
&mut ETHERNET_DESCRIPTOR_RING,
&mut *core::ptr::addr_of_mut!(ETHERNET_DESCRIPTOR_RING),
mac_addr.clone(),
ccdr.peripheral.ETH1MAC,
&ccdr.clocks,
Expand Down
4 changes: 2 additions & 2 deletions src/ethernet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ impl<'a> EthernetInterface<'a> {

let mut interface = EthernetInterface::new(pins);
let timeout_timer = match interface.up(
unsafe { &mut ETHERNET_STORAGE },
unsafe { &mut *core::ptr::addr_of_mut!(ETHERNET_STORAGE) },
mac_address,
ip_address,
eth1mac,
Expand Down Expand Up @@ -248,7 +248,7 @@ impl<'a> EthernetInterface<'a> {
dp.ETHERNET_MAC,
dp.ETHERNET_MTL,
dp.ETHERNET_DMA,
&mut ETHERNET_DESCRIPTOR_RING,
&mut *core::ptr::addr_of_mut!(ETHERNET_DESCRIPTOR_RING),
ethernet_address,
eth1mac,
ccdr_clocks,
Expand Down

0 comments on commit 712a646

Please sign in to comment.