diff --git a/examples/ethernet-nucleo-h743zi2.rs b/examples/ethernet-nucleo-h743zi2.rs index 917f56d8..787ca35c 100644 --- a/examples/ethernet-nucleo-h743zi2.rs +++ b/examples/ethernet-nucleo-h743zi2.rs @@ -114,6 +114,7 @@ fn main() -> ! { let mac_addr = smoltcp::wire::EthernetAddress::from_bytes(&MAC_ADDRESS); let (_eth_dma, eth_mac) = unsafe { + #[allow(static_mut_refs)] // TODO: Fix this DES_RING.write(ethernet::DesRing::new()); ethernet::new( @@ -131,6 +132,7 @@ fn main() -> ! { rmii_txd0, rmii_txd1, ), + #[allow(static_mut_refs)] // TODO: Fix this DES_RING.assume_init_mut(), mac_addr, ccdr.peripheral.ETH1MAC, diff --git a/examples/usb_phy_serial_interrupt.rs b/examples/usb_phy_serial_interrupt.rs index 90b2533a..e25e8dc5 100644 --- a/examples/usb_phy_serial_interrupt.rs +++ b/examples/usb_phy_serial_interrupt.rs @@ -157,11 +157,17 @@ unsafe fn main() -> ! { } } - USB_BUS_ALLOCATOR = Some(UsbBus::new(usb, USB_MEMORY_1.assume_init_mut())); + #[allow(static_mut_refs)] // TODO: Fix this + { + USB_BUS_ALLOCATOR = + Some(UsbBus::new(usb, USB_MEMORY_1.assume_init_mut())); + } + #[allow(static_mut_refs)] // TODO: Fix this let usb_serial = usbd_serial::SerialPort::new(USB_BUS_ALLOCATOR.as_ref().unwrap()); + #[allow(static_mut_refs)] // TODO: Fix this let usb_dev = UsbDeviceBuilder::new( USB_BUS_ALLOCATOR.as_ref().unwrap(), UsbVidPid(VID, PID), diff --git a/examples/usb_rtic.rs b/examples/usb_rtic.rs index 418bb8b6..1c6a210e 100644 --- a/examples/usb_rtic.rs +++ b/examples/usb_rtic.rs @@ -95,6 +95,7 @@ mod app { } // Now we may assume that EP_MEMORY is initialised + #[allow(static_mut_refs)] // TODO: Fix this let usb_bus = cortex_m::singleton!( : usb_device::class_prelude::UsbBusAllocator> = UsbBus::new(usb, unsafe { EP_MEMORY.assume_init_mut() }) diff --git a/examples/usb_serial.rs b/examples/usb_serial.rs index ed9100b4..90dff296 100644 --- a/examples/usb_serial.rs +++ b/examples/usb_serial.rs @@ -85,6 +85,7 @@ fn main() -> ! { } // Now we may assume that EP_MEMORY is initialised + #[allow(static_mut_refs)] // TODO: Fix this let usb_bus = UsbBus::new(usb, unsafe { EP_MEMORY.assume_init_mut() }); let mut serial = usbd_serial::SerialPort::new(&usb_bus);