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

[Feature request] Split SerialPort into Writer, Reader and UsbClass #53

Open
Tnze opened this issue Jan 24, 2025 · 0 comments
Open

[Feature request] Split SerialPort into Writer, Reader and UsbClass #53

Tnze opened this issue Jan 24, 2025 · 0 comments

Comments

@Tnze
Copy link

Tnze commented Jan 24, 2025

It's usually people needs to write and read at the same time. Allowing split Writer and Reader or impl Write and Read on the immutable reference of SerialPort can make it happened.

It's also required by implement embedded-io-async that split UsbClass impl. Because when we .await on the SerialPort, no one can wake it because the ownership is borrowed by read(&mut self) and write(&mut self).

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

No branches or pull requests

1 participant