summaryrefslogtreecommitdiffstats
path: root/examples/all_channels.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/all_channels.rs')
-rw-r--r--examples/all_channels.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/all_channels.rs b/examples/all_channels.rs
index ddf8326..39687ca 100644
--- a/examples/all_channels.rs
+++ b/examples/all_channels.rs
@@ -5,8 +5,7 @@ use ads1x1x::{channel, Ads1x1x, SlaveAddr};
fn main() {
let dev = I2cdev::new("/dev/i2c-1").unwrap();
- let address = SlaveAddr::default();
- let mut adc = Ads1x1x::new_ads1015(dev, address);
+ let mut adc = Ads1x1x::new_ads1015(dev, SlaveAddr::default());
let values = [
block!(adc.read(channel::SingleA0)).unwrap(),
block!(adc.read(channel::SingleA1)).unwrap(),