fix(faderboard): instantiate serial port before usb bus allocator is frozen
This commit is contained in:
parent
4ce5d0a1b3
commit
15ee464440
|
@ -19,14 +19,14 @@ pub struct Usb<'a> {
|
|||
|
||||
impl<'a> Usb<'a> {
|
||||
pub fn new(usb_bus: &'a UsbBusAllocator<UsbBusType>) -> Self {
|
||||
let serial = SerialPort::new(usb_bus);
|
||||
|
||||
let usb_dev = UsbDeviceBuilder::new(usb_bus, UsbVidPid(VENDOR_ID, PRODUCT_ID))
|
||||
.manufacturer("lujoga")
|
||||
.product("faderboard")
|
||||
.max_power(500)
|
||||
.build();
|
||||
|
||||
let serial = SerialPort::new(&usb_bus);
|
||||
|
||||
Usb { usb_dev, serial }
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue