From dd24bc2c9ad77525f2c5876484185522c7c9c399 Mon Sep 17 00:00:00 2001 From: hacknus Date: Fri, 24 Nov 2023 00:27:16 +0100 Subject: [PATCH 1/4] update synopsys-usb-otg --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 1f0085b4..5cf8e129 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,7 +34,7 @@ cortex-m-rt = "0.7.3" nb = "1.1" rand_core = "0.6.4" stm32f4 = "0.15.1" -synopsys-usb-otg = { version = "0.3.2", features = ["cortex-m"], optional = true } +synopsys-usb-otg = { version = "0.4.0", features = ["cortex-m"], optional = true } sdio-host = { version = "0.6.0", optional = true } embedded-dma = "0.2.0" bare-metal = { version = "1" } From 6a52fd2ed3722aed542073f5e992aaa8c2bac1ca Mon Sep 17 00:00:00 2001 From: hacknus Date: Mon, 27 Nov 2023 22:52:38 +0100 Subject: [PATCH 2/4] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cca94ac5..440e7f19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] - Added an example to show how to do DMA with UART (Rx only) [#698] +- Updated `synopsys-usb-otg` to `0.4.0` ## [v0.18.0] - 2023-11-19 From 1c600f64f686674db1176138d37a424344e5bc2b Mon Sep 17 00:00:00 2001 From: hacknus Date: Sun, 3 Dec 2023 13:02:44 +0100 Subject: [PATCH 3/4] update dependencies for examples --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5cf8e129..b2194679 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -72,8 +72,8 @@ heapless = "0.7.16" panic-halt = "0.2.0" ssd1306 = "0.7.1" embedded-graphics = "0.7.1" -usb-device = "0.2.9" -usbd-serial = "0.1.1" +usb-device = "0.3.1" +usbd-serial = "0.2.0" micromath = "2" cortex-m-rtic = { version = "1.1.4", features = ["test-critical-section"] } dwt-systick-monotonic = "1.1" From 570aeee364eea5c2538fa24f3c3c14b0dd488123 Mon Sep 17 00:00:00 2001 From: hacknus Date: Sun, 3 Dec 2023 13:09:22 +0100 Subject: [PATCH 4/4] update usb examples for `usb-device v0.3.1` --- examples/rtic-usb-cdc-echo.rs | 8 +++++--- examples/usb-serial-irq.rs | 8 +++++--- examples/usb-serial-poll.rs | 8 +++++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/examples/rtic-usb-cdc-echo.rs b/examples/rtic-usb-cdc-echo.rs index 880fa8e1..2f114680 100644 --- a/examples/rtic-usb-cdc-echo.rs +++ b/examples/rtic-usb-cdc-echo.rs @@ -73,10 +73,12 @@ mod app { unsafe { USB_BUS.as_ref().unwrap() }, UsbVidPid(0x16c0, 0x27dd), ) - .manufacturer("rust embedded") - .product("usb echo server") - .serial_number("4242") .device_class(usbd_serial::USB_CLASS_CDC) + .strings(&[StringDescriptors::default() + .manufacturer("Fake Company") + .product("Product") + .serial_number("TEST")]) + .unwrap() .build(); ( diff --git a/examples/usb-serial-irq.rs b/examples/usb-serial-irq.rs index 06e60f11..e648f315 100644 --- a/examples/usb-serial-irq.rs +++ b/examples/usb-serial-irq.rs @@ -50,10 +50,12 @@ fn main() -> ! { *G_USB_DEVICE.borrow(cs).borrow_mut() = Some( UsbDeviceBuilder::new(usb_bus, UsbVidPid(0x16c0, 0x27dd)) - .manufacturer("Fake company") - .product("Serial port") - .serial_number("TEST") .device_class(usbd_serial::USB_CLASS_CDC) + .strings(&[StringDescriptors::default() + .manufacturer("Fake Company") + .product("Product") + .serial_number("TEST")]) + .unwrap() .build(), ); }); diff --git a/examples/usb-serial-poll.rs b/examples/usb-serial-poll.rs index 239abf97..acce819c 100644 --- a/examples/usb-serial-poll.rs +++ b/examples/usb-serial-poll.rs @@ -38,10 +38,12 @@ fn main() -> ! { let mut serial = usbd_serial::SerialPort::new(&usb_bus); let mut usb_dev = UsbDeviceBuilder::new(&usb_bus, UsbVidPid(0x16c0, 0x27dd)) - .manufacturer("Fake company") - .product("Serial port") - .serial_number("TEST") .device_class(usbd_serial::USB_CLASS_CDC) + .strings(&[StringDescriptors::default() + .manufacturer("Fake Company") + .product("Product") + .serial_number("TEST")]) + .unwrap() .build(); loop {