de-vri-es / serial2-rs

Cross platform serial ports for Rust
Other
41 stars 10 forks source link

simultaneously transmission reception serial data #20

Closed learncodingforweb closed 7 months ago

learncodingforweb commented 7 months ago

Hi, You have provided example for loopback using Arc, But if receiver is waiting for data. how will it transmit data at the same time. There should be provision for simultaneously transmission reception using try_clone(), where it should provide separate reader and writer. can be used independently. Please you update

de-vri-es commented 7 months ago

Hi!

You don't need to clone() or try_clone() or split() if you use the non-trait read() and write() functions. They take &self, not &mut self.

learncodingforweb commented 7 months ago

will it work simultaneously. if reader is waiting for input. can it transmit data at the same time?

de-vri-es commented 7 months ago

Yes :)

learncodingforweb commented 7 months ago

Thanks, then I am closing the issue as able to read and write simultaneously.