diff --git a/esp-hal/Cargo.toml b/esp-hal/Cargo.toml index 44ca95e53..b1cd7fcbd 100644 --- a/esp-hal/Cargo.toml +++ b/esp-hal/Cargo.toml @@ -34,7 +34,7 @@ embedded-hal-nb = { version = "1.0.0", optional = true } embedded-io = { version = "0.6.1", optional = true } embedded-io-async = { version = "0.6.1", optional = true } enumset = "1.1.3" -esp-synopsys-usb-otg = { version = "0.4.0", optional = true, features = ["fs", "esp32sx"] } +esp-synopsys-usb-otg = { version = "0.4.1", optional = true, features = ["fs", "esp32sx"] } fugit = "0.3.7" log = { version = "0.4.21", optional = true } nb = "1.1.0" diff --git a/examples/src/bin/usb_serial.rs b/examples/src/bin/usb_serial.rs index 00418621c..45a526f8f 100644 --- a/examples/src/bin/usb_serial.rs +++ b/examples/src/bin/usb_serial.rs @@ -7,6 +7,8 @@ #![no_std] #![no_main] +use core::ptr::addr_of_mut; + use esp_backtrace as _; use esp_hal::{ gpio::IO, @@ -26,7 +28,7 @@ fn main() -> ! { let io = IO::new(peripherals.GPIO, peripherals.IO_MUX); let usb = USB::new(peripherals.USB0, io.pins.gpio19, io.pins.gpio20); - let usb_bus = UsbBus::new(usb, unsafe { &mut EP_MEMORY }); + let usb_bus = UsbBus::new(usb, unsafe { &mut *addr_of_mut!(EP_MEMORY) }); let mut serial = SerialPort::new(&usb_bus);