Skip to content

Commit

Permalink
[Fixes #72] USB require fix in doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
michalfita committed Dec 23, 2023
1 parent 96b8f9d commit 8775dd0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions hal/src/usb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8775dd0

Please sign in to comment.