rust-embedded / linux-embedded-hal

Implementation of the `embedded-hal` traits for Linux devices
Apache License 2.0
241 stars 41 forks source link

serial-unix crate is unmaintained #86

Closed samgoldman-bionautlabs closed 1 year ago

samgoldman-bionautlabs commented 2 years ago

We have noticed that this crate uses serial-unix which has not been maintained in 5 years: https://github.com/dcuddeback/serial-rs.

Instead the maintained crate serialport (https://github.com/serialport/serialport-rs) could be used.

qrasmont commented 1 year ago

Hi,

This means Serial::open should become a wrapper around serialport::TTYPort::open instead of serial_unix::TTYPort::open.

Is it then ok to modify the Serial::open signature to match the arguments expected by serialport::TTYPort::open ? Or should the existing signature be preserved ?

eldruin commented 1 year ago

Keeping the signature is not a must. It would be nice to keep if possible, though, just because it is currently very straight-forward by simply providing a path. We have a breaking release in the pipeline so if you are interested, now it would be a great time to have a go at it.

qrasmont commented 1 year ago

The main difference is that serial-rs would rely on termios to get the baud rate while serialport-rs requires the user to provide it to be able to open the port.

So the signature could be maintained by using termios.