diff --git a/Cargo.toml b/Cargo.toml index 42f14f9..ec62d0b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ util = [ "structopt", "simplelog", "humantime", "linux-embedded-hal", "anyhow" ] default = [ "util" ] [dependencies] -sensirion-i2c = "0.1" +sensirion-i2c = "0.2" embedded-hal = "0.2" log = { version = "0.4.16", default_features = false } @@ -33,7 +33,7 @@ humantime = { version = "2.1.0", optional = true } [dev-dependencies] linux-embedded-hal = "0.3" -embedded-hal-mock = "0.8" +embedded-hal-mock = "0.9" [[bin]] name = "scd4x-util" diff --git a/src/scd4x.rs b/src/scd4x.rs index ea998b2..5f58ec1 100644 --- a/src/scd4x.rs +++ b/src/scd4x.rs @@ -264,7 +264,7 @@ where if !allowed_if_running && self.is_running { return Err(Error::NotAllowed); } - i2c::write_command(&mut self.i2c, SCD4X_I2C_ADDRESS, command).map_err(Error::I2c)?; + i2c::write_command_u16(&mut self.i2c, SCD4X_I2C_ADDRESS, command).map_err(Error::I2c)?; self.delay.delay_ms(delay); Ok(()) }