Closed wezm closed 4 years ago
Merging #10 into master will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #10 +/- ##
=======================================
Coverage 92.14% 92.14%
=======================================
Files 4 4
Lines 191 191
=======================================
Hits 176 176
Misses 15 15
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 9d8b68d...f27c2c6. Read the comment docs.
looks a lot cleaner than what I came up with. I think the linux traits may be able to fail, so at some point you may want to handle the errors. I use mostly stm32, so this works well for me.
I think the linux traits may be able to fail, so at some point you may want to handle the errors.
Yes this is true. My first attempt was to extend your error type so it could hold an SPI error and a GPIO error and then add From
impls for it. The generics make it really awkward though.
Since this is effectively how it worked with the v1 traits I'm not too fussed. I've subscribed to that v3 issue and hopefully they come up with something that's a bit nice to use.
@etrombly I came up with this to avoid the need for the error type. It seems the v1/v2 GPIO traits are a bit of a mess. There some discussion on the embedded-hal repo about a v3 that would address some of the issues like we're seeing here. Hopefully that will get sorted eventually and we can move to that.