diff --git a/examples/usb_passthrough.rs b/examples/usb_passthrough.rs index 0c8dc1cc..e1a4982d 100644 --- a/examples/usb_passthrough.rs +++ b/examples/usb_passthrough.rs @@ -73,9 +73,11 @@ fn main() -> ! { let mut serial1 = usbd_serial::SerialPort::new(&usb1_bus); let mut usb1_dev = UsbDeviceBuilder::new(&usb1_bus, UsbVidPid(0x16c0, 0x27dd)) - .manufacturer("Fake company") - .product("Serial port") - .serial_number("TEST PORT 1") + .strings(&[usb_device::device::StringDescriptors::default() + .manufacturer("Fake company") + .product("Serial port") + .serial_number("TEST PORT 1") + ]).unwrap() .device_class(usbd_serial::USB_CLASS_CDC) .build(); diff --git a/examples/usb_phy_serial_interrupt.rs b/examples/usb_phy_serial_interrupt.rs index dff0fee7..bd314a82 100644 --- a/examples/usb_phy_serial_interrupt.rs +++ b/examples/usb_phy_serial_interrupt.rs @@ -152,11 +152,13 @@ unsafe fn main() -> ! { USB_BUS_ALLOCATOR.as_ref().unwrap(), UsbVidPid(VID, PID), ) - .manufacturer("Fake company") - .product("Serial port") - .serial_number("TEST") + .strings(&[usb_device::device::StringDescriptors::default() + .manufacturer("Fake company") + .product("Serial port") + .serial_number("TEST PORT 1") + ]).unwrap() .device_class(usbd_serial::USB_CLASS_CDC) - .max_packet_size_0(64) + .max_packet_size_0(64).unwrap() .build(); interrupt_free(|cs| { diff --git a/examples/usb_rtic.rs b/examples/usb_rtic.rs index 19fe6273..8263b805 100644 --- a/examples/usb_rtic.rs +++ b/examples/usb_rtic.rs @@ -91,9 +91,11 @@ mod app { .unwrap(); let serial = usbd_serial::SerialPort::new(usb_bus); let usb_dev = UsbDeviceBuilder::new(usb_bus, UsbVidPid(0x16c0, 0x27dd)) - .manufacturer("Fake company") - .product("Serial port") - .serial_number("TEST") + .strings(&[usb_device::device::StringDescriptors::default() + .manufacturer("Fake company") + .product("Serial port") + .serial_number("TEST PORT 1") + ]).unwrap() .device_class(usbd_serial::USB_CLASS_CDC) .build(); let usb = (usb_dev, serial); diff --git a/examples/usb_serial.rs b/examples/usb_serial.rs index 892e15f6..2ddf85c6 100644 --- a/examples/usb_serial.rs +++ b/examples/usb_serial.rs @@ -78,9 +78,11 @@ fn main() -> ! { let mut usb_dev = UsbDeviceBuilder::new(&usb_bus, UsbVidPid(0x16c0, 0x27dd)) - .manufacturer("Fake company") - .product("Serial port") - .serial_number("TEST") + .strings(&[usb_device::device::StringDescriptors::default() + .manufacturer("Fake company") + .product("Serial port") + .serial_number("TEST PORT 1") + ]).unwrap() .device_class(usbd_serial::USB_CLASS_CDC) .build(); diff --git a/src/usb_hs.rs b/src/usb_hs.rs index 26354e2f..e0aa7983 100644 --- a/src/usb_hs.rs +++ b/src/usb_hs.rs @@ -18,7 +18,7 @@ use crate::rcc; use crate::stm32; -use crate::gpio::{self, Alternate, Analog, Speed}; +use crate::gpio::{self, Alternate, Speed}; use crate::time::Hertz; @@ -50,8 +50,8 @@ impl USB1 { usb_global: stm32::OTG1_HS_GLOBAL, usb_device: stm32::OTG1_HS_DEVICE, usb_pwrclk: stm32::OTG1_HS_PWRCLK, - _pin_dm: gpio::PA11, - _pin_dp: gpio::PA12, + _pin_dm: gpio::PA11, + _pin_dp: gpio::PA12, prec: rcc::rec::Usb1Otg, clocks: &rcc::CoreClocks, ) -> Self {