From 8775dd0d85030d4c20dd9da171d40c541294e46e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Fita?= <4925040+michalfita@users.noreply.github.com> Date: Sat, 23 Dec 2023 15:39:23 +0000 Subject: [PATCH] [Fixes #72] USB require fix in doctests --- hal/src/usb.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hal/src/usb.rs b/hal/src/usb.rs index 4d25165..8d4e8de 100644 --- a/hal/src/usb.rs +++ b/hal/src/usb.rs @@ -46,10 +46,13 @@ use usb_device::prelude::*; let usb_alloc = Usb::new(pac.USBHS, &mut mck, &upllck).into_usb_allocator(); let mut usb_dev = UsbDeviceBuilder::new(&usb_alloc, UsbVidPid(0x16c0, 0x27dd)) - .manufacturer("Fake company") - .product("Serial port") - .serial_number("TEST") + .strings(&[StringDescriptors::new(LangID::EN) + .manufacturer("Fake company") + .product("Serial port") + .serial_number("TEST")]) + .unwrap() .max_packet_size_0(64) // makes control transfers 8x faster + .unwrap() .build(); loop {