Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.4.0 is missing embedded_hal_0_2::blocking::i2c traits? #113

Open
bsodmike opened this issue Feb 29, 2024 · 0 comments
Open

v0.4.0 is missing embedded_hal_0_2::blocking::i2c traits? #113

bsodmike opened this issue Feb 29, 2024 · 0 comments

Comments

@bsodmike
Copy link

This breaks when moving from 0.3.2 to [0.4.0-alpha.1](https://github.com/rust-embedded/linux-embedded-hal/compare/v0.3.0...v0.4.0-alpha.1) -- but the changelog does not mention this?

error[E0277]: the trait bound `I2cdev: _embedded_hal_blocking_i2c_Write` is not satisfied
  --> examples/basic.rs:12:26
   |
12 |         Rv8803::from_i2c(i2c, rv8803::bus::Address::Default).expect("Failed to initialize RV8803");
   |         ---------------- ^^^ the trait `_embedded_hal_blocking_i2c_Write` is not implemented for `I2cdev`
   |         |
   |         required by a bound introduced by this call
   |
note: required by a bound in `rv8803::<impl Rv8803<Bus<'a, I2C>>>::from_i2c`
  --> /home/mike/esp/rv8803/src/lib.rs:29:11
   |
29 |         + embedded_hal_0_2::blocking::i2c::Write<Error = E>,
   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `rv8803::<impl Rv8803<Bus<'a, I2C>>>::from_i2c`
...
39 |     pub fn from_i2c(i2c: I2C, address: crate::bus::Address) -> Result<Self, E> {
   |            -------- required by a bound in this associated function

error[E0277]: the trait bound `I2cdev: WriteRead` is not satisfied
  --> examples/basic.rs:12:26
   |
12 |         Rv8803::from_i2c(i2c, rv8803::bus::Address::Default).expect("Failed to initialize RV8803");
   |         ---------------- ^^^ the trait `WriteRead` is not implemented for `I2cdev`
   |         |
   |         required by a bound introduced by this call
   |
note: required by a bound in `rv8803::<impl Rv8803<Bus<'a, I2C>>>::from_i2c`
  --> /home/mike/esp/rv8803/src/lib.rs:28:10
   |
28 |     I2C: embedded_hal_0_2::blocking::i2c::WriteRead<Error = E>
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `rv8803::<impl Rv8803<Bus<'a, I2C>>>::from_i2c`
...
39 |     pub fn from_i2c(i2c: I2C, address: crate::bus::Address) -> Result<Self, E> {
   |            -------- required by a bound in this associated function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant