usbd-serial
usbd-serial copied to clipboard
[Feature request] Split `SerialPort` into Writer, Reader and UsbClass
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)
.