rust-embedded / linux-embedded-hal

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

WIP: Update embedded-hal to version 1.0.0-alpha.6 #71

Closed caemor closed 2 years ago

caemor commented 2 years ago

The delay update is pretty straightforward.

The error update is more difficult: The current implementation creates a new struct including a single element: the upstream linux error, and implement the e-h error trait for it. I've got two issues with this. Is creating a new struct the best way to do this? For matching the e-h trait kind: Currently I just matched everything to Other because I couldn't find any good matches when taking a quick glance. Is there something that should be matched? The creation of a central error enum for linux e-h would be an other alternative way to solve this.

rust-highfive commented 2 years ago

r? @ryankurte

(rust-highfive has picked a reviewer for you, use r? to override)

caemor commented 2 years ago

If someone else wants to take over, go for it. I am currently missing the time to finish this.

ryankurte commented 2 years ago

it doesn't look to me like any of the IoErrorKinds have great correspondence with our ErrorKinds except for I2C, see changes here to match. i'd be happy to merge this then that and keep moving forward, any other opinions @rust-embedded/embedded-linux ?

eldruin commented 2 years ago

Ok, Let's merge this then and I will create an issue about improving the match. @caemor could you resolve the conflict?

bors[bot] commented 2 years ago

Build succeeded:

ryankurte commented 2 years ago

thanks folks! @eldruin what do you think of another alpha release to keep up with e-h?

eldruin commented 2 years ago

Sure. I would prefer doing #74 beforehand, though.