Open jnthbdn opened 6 months ago
Yeah I'm also not sure this makes sense to allow. Can you elaborate on what the necessary use case is here?
Hello,
Thank you for your feedback. I've added this function to make the link with the PR725 (https://github.com/rp-rs/rp-hal/pull/725) from rp-hal.
The problem is that creating a UsbBus
requires ownership of two peripherals (USBCTRL_REGS
and USBCTRL_DPRAM
) and a clock. But if you want to stop the USB, it's not possible to recover these resources, and you end up, for example, with a Partially move
error (in my case from the clockManager).
Allowing users to free the UsbBus from the UsbAllocator.