rust-embedded / linux-embedded-hal

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

Improvement of error matching necessary #74

Open eldruin opened 2 years ago

eldruin commented 2 years ago

We have merged #71 which did the heavy-lifting for updating this to embedded-hal 1.0.0-alpha.6. However, currently we are missing the extraction of information from the underlying nix/io errors in the embedded_hal::*::Error implementations so that they can be converted to a meaningful embedded_hal::*::ErrorKind. At the moment, converting all errors to Other would render all drivers unable to act on things like i2c::NoAcknowledge. For this one needs to dig a bit into the Linux kernel, and so on, though.

TODO: