Closed mobergmann closed 1 month ago
Definitely. Upgrading should be very simple. Mostly just changing the bounds. You can have a try. Otherwise I will see when I find some time for this.
I tried, but it seems that there are more issues.
Fist off, I had to change use embedded_hal::blocking::i2c;
to use embedded_hal::i2c;
, as all functions are blocking. I am new to rust embedded, so my guess is that that was changed.
But there are more issues lingering. For example:
error[E0405]: cannot find trait `Write` in module `i2c`
--> src/lib.rs:225:15
|
225 | I2C: i2c::Write<Error = E>,
| ^^^^^ not found in `i2c`
Same for Read and WriteRead
Found the migration guide on the trait issue: https://github.com/rust-embedded/embedded-hal/blob/master/docs/migrating-from-0.2-to-1.0.md#trait-unification
I think I won't be able to do it myself. I am fairly new to the "advanced" rust features and this crate has many of them. Especially the macros are a bit too much for me. I don't really understand what is happening... Sorry. But I am planning to do some research on macros and traits. I will also stare at the code and who knows, maybe it clicks and I can fix it myself.
I have done this and have now published version 1.0.0 of this driver :tada:
Hi, I wanted to know if there are plans to update the code to the new
embedded-hal
version (1.0)? I need to use theembedded_hal_bus
crate, especially theembedded_hal_bus::i2c::RefCellDevice
struct, which is not compatible with this version of the driver AFAICT, and updating this driver would allow such an usage, I think.