diff options
author | Markus Reiter <me@reitermark.us> | 2024-01-12 20:24:51 +0100 |
---|---|---|
committer | Diego Barrios Romero <eldruin@gmail.com> | 2024-01-19 11:23:31 +0100 |
commit | b3ca672f70c71194da40a7670549a8264c13d971 (patch) | |
tree | 1f316806351a059ca5b5fccbcf4d790b94c0b471 /tests/tier1.rs | |
parent | ed4cc1dbc5b048332b68a0ebc1d7113d482a74a2 (diff) | |
download | ads1x1x-async-b3ca672f70c71194da40a7670549a8264c13d971.tar.gz ads1x1x-async-b3ca672f70c71194da40a7670549a8264c13d971.tar.xz ads1x1x-async-b3ca672f70c71194da40a7670549a8264c13d971.zip |
Update to `embedded-hal` 1.0.
Diffstat (limited to 'tests/tier1.rs')
-rw-r--r-- | tests/tier1.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/tier1.rs b/tests/tier1.rs index 1f1a542..bbe9d6f 100644 --- a/tests/tier1.rs +++ b/tests/tier1.rs @@ -1,5 +1,5 @@ use ads1x1x::{channel, DataRate12Bit, DataRate16Bit}; -use embedded_hal_mock::i2c::Transaction as I2cTrans; +use embedded_hal_mock::eh1::i2c::Transaction as I2cTrans; use nb::block; mod common; @@ -12,7 +12,6 @@ macro_rules! measure_tests { ($IC:ident, $create:ident, $destroy:ident, $expected:expr) => { mod $IC { use super::*; - use embedded_hal::adc::OneShot; mod would_block { use super::*; @@ -26,7 +25,7 @@ macro_rules! measure_tests { vec![config.msb(), config.lsb()], )]; let mut dev = $create(&transactions); - assert_would_block!(dev.read(&mut channel::DifferentialA0A1)); + assert_would_block!(dev.read(channel::DifferentialA0A1)); $destroy(dev); } } @@ -53,7 +52,7 @@ macro_rules! measure_tests { I2cTrans::write_read(DEV_ADDR, vec![Register::CONVERSION], vec![0x80, 0x00]), ]; let mut dev = $create(&transactions); - let measurement = block!(dev.read(&mut channel::DifferentialA0A1)).unwrap(); + let measurement = block!(dev.read(channel::DifferentialA0A1)).unwrap(); assert_eq!($expected, measurement); $destroy(dev); } |