From 669d29767664d2a318d1d6c1ff5735fa2694245d Mon Sep 17 00:00:00 2001 From: bjoernQ Date: Fri, 12 Apr 2024 13:47:56 +0200 Subject: [PATCH 1/2] Update esp-synopsys-usb-otg --- esp-hal/CHANGELOG.md | 1 + esp-hal/Cargo.toml | 2 +- examples/src/bin/usb_serial.rs | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/esp-hal/CHANGELOG.md b/esp-hal/CHANGELOG.md index 18fb077da86..c08ab111b01 100644 --- a/esp-hal/CHANGELOG.md +++ b/esp-hal/CHANGELOG.md @@ -60,6 +60,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Runtime ISR binding for software interrupts, software interrupts are split now, interrupt-executor takes the software interrupt to use, interrupt-executor is easier to use (#1398) - PCNT: Runtime ISR binding (#1396) - Runtime ISR binding for RTC (#1405) +- Update `esp-synopsys-usb-otg`, includes https://github.com/esp-rs-compat/synopsys-usb-otg/pull/1 ### Removed diff --git a/esp-hal/Cargo.toml b/esp-hal/Cargo.toml index 47bd4f34288..8c04a74cd39 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 = { git = "https://github.com/esp-rs-compat/synopsys-usb-otg.git", rev = "b6d9238ad8bdcffaddfa00e99b0487c42805fdfa", version = "0.4.0", 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 00418621ce3..45a526f8fda 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); From f3df750f592dc0a7963940764d207421e6ab2f12 Mon Sep 17 00:00:00 2001 From: bjoernQ Date: Fri, 12 Apr 2024 13:50:29 +0200 Subject: [PATCH 2/2] CHANGELOG.md --- esp-hal/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esp-hal/CHANGELOG.md b/esp-hal/CHANGELOG.md index c08ab111b01..56334ce1097 100644 --- a/esp-hal/CHANGELOG.md +++ b/esp-hal/CHANGELOG.md @@ -60,7 +60,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Runtime ISR binding for software interrupts, software interrupts are split now, interrupt-executor takes the software interrupt to use, interrupt-executor is easier to use (#1398) - PCNT: Runtime ISR binding (#1396) - Runtime ISR binding for RTC (#1405) -- Update `esp-synopsys-usb-otg`, includes https://github.com/esp-rs-compat/synopsys-usb-otg/pull/1 +- Update `esp-synopsys-usb-otg`, includes https://github.com/esp-rs-compat/synopsys-usb-otg/pull/1 (#1427) ### Removed