diff options
-rw-r--r-- | examples/linux.rs | 2 | ||||
-rw-r--r-- | tests/ads1x13.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/linux.rs b/examples/linux.rs index aa1eec4..f4c7e87 100644 --- a/examples/linux.rs +++ b/examples/linux.rs @@ -11,6 +11,6 @@ use ads1x1x::{ Ads1x1x, SlaveAddr, channel }; fn main() { let dev = I2cdev::new("/dev/i2c-1").unwrap(); let mut adc = Ads1x1x::new_ads1013(dev, SlaveAddr::default()); - let measurement = block!(adc.read(&mut channel::A0)).unwrap(); + let measurement = block!(adc.read(&mut channel::DifferentialA0A1)).unwrap(); println!("Measurement: {}", measurement); } diff --git a/tests/ads1x13.rs b/tests/ads1x13.rs index 89dd031..37a68d5 100644 --- a/tests/ads1x13.rs +++ b/tests/ads1x13.rs @@ -30,7 +30,7 @@ macro_rules! impl_tests { let config = Config::default().with_low(BitFlags::OS); let transactions = [ I2cTrans::write_read(DEV_ADDR, vec![Register::CONFIG], vec![config.msb(), config.lsb()] ) ]; let mut dev = $create(&transactions); - assert_would_block!(dev.read(&mut channel::A0)); + assert_would_block!(dev.read(&mut channel::DifferentialA0A1)); $destroy(dev); } } @@ -44,7 +44,7 @@ macro_rules! impl_tests { I2cTrans::write_read(DEV_ADDR, vec![Register::CONFIG], vec![config_with_os.msb(), config_with_os.lsb()]), I2cTrans::write_read(DEV_ADDR, vec![Register::CONVERSION], vec![0x80, 0x00] ) ]; let mut dev = $create(&transactions); - let measurement = block!(dev.read(&mut channel::A0{})).unwrap(); + let measurement = block!(dev.read(&mut channel::DifferentialA0A1)).unwrap(); assert_eq!($expected, measurement); $destroy(dev); } |