Skip to content

Are there any plans to update the embedded-hal dependency to version 1.0.0? #41

@szagi3891

Description

@szagi3891

I'm having trouble using this library because it relies on an older version of embedded-hal.

error[E0277]: the trait bound `I2c<'_, Async>: embedded_hal::blocking::i2c::Write` is not satisfied
   --> src/scenario4.rs:52:67
    |
52  |     let mut display: GraphicsMode<_> = Builder::new().connect_i2c(i2c_bus).into();
    |                                                       ----------- ^^^^^^^ the trait `embedded_hal::blocking::i2c::Write` is not implemented for `I2c<'_, Async>`
    |                                                       |
    |                                                       required by a bound introduced by this call
    |
note: there are multiple different versions of crate `embedded_hal` in the dependency graph
   --> /Users/grzegorz/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/embedded-hal-0.2.7/src/blocking/i2c.rs:145:1
    |
145 | pub trait Write<A: AddressMode = SevenBitAddress> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this is the required trait
    |
   ::: src/main.rs:10:5
    |
10  | use esp_hal::clock::CpuClock;
    |     -------
    |     |
    |     one version of crate `embedded_hal` used here, as a dependency of crate `embassy_embedded_hal`
    |     one version of crate `embedded_hal` used here, as a dependency of crate `esp_hal`
    |
   ::: /Users/grzegorz/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/esp-hal-1.0.0-beta.1/src/i2c/master/mod.rs:551:1
    |
551 | pub struct I2c<'d, Dm: DriverMode> {
    | ---------------------------------- this type doesn't implement the required trait
    |
   ::: /Users/grzegorz/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/embedded-hal-1.0.0/src/delay.rs:9:1
    |
9   | pub trait DelayNs {
    | ----------------- this is the found trait
    = help: you can use `cargo tree` to explore your dependency tree
note: required by a bound in `Builder::connect_i2c`
   --> /Users/grzegorz/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sh1106-0.5.0/src/builder.rs:119:14
    |
117 |     pub fn connect_i2c<I2C, CommE>(self, i2c: I2C) -> DisplayMode<RawMode<I2cInterface<I2C>>>
    |            ----------- required by a bound in this associated function
118 |     where
119 |         I2C: hal::blocking::i2c::Write<Error = CommE>,
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Builder::connect_i2c`


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions