diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/all_channels.rs | 4 | ||||
-rw-r--r-- | examples/linux.rs | 4 | ||||
-rw-r--r-- | examples/typed.rs | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/examples/all_channels.rs b/examples/all_channels.rs index 39687ca..283f834 100644 --- a/examples/all_channels.rs +++ b/examples/all_channels.rs @@ -1,11 +1,11 @@ use linux_embedded_hal::I2cdev; use nb::block; -use ads1x1x::{channel, Ads1x1x, SlaveAddr}; +use ads1x1x::{channel, Ads1x1x, TargetAddr}; fn main() { let dev = I2cdev::new("/dev/i2c-1").unwrap(); - let mut adc = Ads1x1x::new_ads1015(dev, SlaveAddr::default()); + let mut adc = Ads1x1x::new_ads1015(dev, TargetAddr::default()); let values = [ block!(adc.read(channel::SingleA0)).unwrap(), block!(adc.read(channel::SingleA1)).unwrap(), diff --git a/examples/linux.rs b/examples/linux.rs index c3c9d54..6bf735c 100644 --- a/examples/linux.rs +++ b/examples/linux.rs @@ -1,11 +1,11 @@ use linux_embedded_hal::I2cdev; use nb::block; -use ads1x1x::{channel, Ads1x1x, SlaveAddr}; +use ads1x1x::{channel, Ads1x1x, TargetAddr}; fn main() { let dev = I2cdev::new("/dev/i2c-1").unwrap(); - let mut adc = Ads1x1x::new_ads1013(dev, SlaveAddr::default()); + let mut adc = Ads1x1x::new_ads1013(dev, TargetAddr::default()); let value = block!(adc.read(channel::DifferentialA0A1)).unwrap(); println!("Measurement: {}", value); // get I2C device back diff --git a/examples/typed.rs b/examples/typed.rs index 797b69e..11a6373 100644 --- a/examples/typed.rs +++ b/examples/typed.rs @@ -7,7 +7,7 @@ use nb::block; use ads1x1x::{ channel, ic::{Ads1115, Resolution16Bit}, - Ads1x1x, SlaveAddr, + Ads1x1x, TargetAddr, }; /// Type alias @@ -21,7 +21,7 @@ pub fn read(adc: &mut Adc) -> i16 { fn main() { let dev = I2cdev::new("/dev/i2c-1").unwrap(); - let mut adc = Ads1x1x::new_ads1115(dev, SlaveAddr::default()); + let mut adc = Ads1x1x::new_ads1115(dev, TargetAddr::default()); let value = read(&mut adc); println!("Measurement: {}", value); |