Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add free function to UsbAllocator #137

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jnthbdn
Copy link

@jnthbdn jnthbdn commented Dec 15, 2023

Allowing users to free the UsbBus from the UsbAllocator.

Copy link
Member

@eldruin eldruin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure it makes sense to allow this.
Maybe somebody else can comment like @ryan-summers ?

@ryan-summers
Copy link
Member

Yeah I'm also not sure this makes sense to allow. Can you elaborate on what the necessary use case is here?

@jnthbdn
Copy link
Author

jnthbdn commented Jan 30, 2024

Hello,

Thank you for your feedback. I've added this function to make the link with the PR725 (rp-rs/rp-hal#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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants