Skip to content

Commit 712a646

Browse files
Koppany PazmanKoppany Pazman
Koppany Pazman
authored and
Koppany Pazman
committed
fix for issue #114447 <rust-lang/rust#114447>
1 parent d2c5e12 commit 712a646

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/ethernet_hal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ fn main() -> ! {
119119
dp.ETHERNET_MAC,
120120
dp.ETHERNET_MTL,
121121
dp.ETHERNET_DMA,
122-
&mut ETHERNET_DESCRIPTOR_RING,
122+
&mut *core::ptr::addr_of_mut!(ETHERNET_DESCRIPTOR_RING),
123123
mac_addr.clone(),
124124
ccdr.peripheral.ETH1MAC,
125125
&ccdr.clocks,

src/ethernet.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ impl<'a> EthernetInterface<'a> {
187187

188188
let mut interface = EthernetInterface::new(pins);
189189
let timeout_timer = match interface.up(
190-
unsafe { &mut ETHERNET_STORAGE },
190+
unsafe { &mut *core::ptr::addr_of_mut!(ETHERNET_STORAGE) },
191191
mac_address,
192192
ip_address,
193193
eth1mac,
@@ -248,7 +248,7 @@ impl<'a> EthernetInterface<'a> {
248248
dp.ETHERNET_MAC,
249249
dp.ETHERNET_MTL,
250250
dp.ETHERNET_DMA,
251-
&mut ETHERNET_DESCRIPTOR_RING,
251+
&mut *core::ptr::addr_of_mut!(ETHERNET_DESCRIPTOR_RING),
252252
ethernet_address,
253253
eth1mac,
254254
ccdr_clocks,

0 commit comments

Comments
 (0)