summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorDiego Barrios Romero <eldruin@gmail.com>2018-11-13 19:32:42 +0100
committerDiego Barrios Romero <eldruin@gmail.com>2018-11-13 19:32:42 +0100
commitc2e4de6c9325be6538f61954dd1cd6bc502ea6ae (patch)
treebc4904921358ca226e0a7c42c7c0040c16638144 /examples
parent676504976d67f976cde947b11652848fd5132613 (diff)
downloadads1x1x-async-c2e4de6c9325be6538f61954dd1cd6bc502ea6ae.tar.gz
ads1x1x-async-c2e4de6c9325be6538f61954dd1cd6bc502ea6ae.tar.xz
ads1x1x-async-c2e4de6c9325be6538f61954dd1cd6bc502ea6ae.zip
Add destroying device to example
Diffstat (limited to 'examples')
-rw-r--r--examples/linux.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/linux.rs b/examples/linux.rs
index f4c7e87..7f65c52 100644
--- a/examples/linux.rs
+++ b/examples/linux.rs
@@ -13,4 +13,5 @@ fn main() {
let mut adc = Ads1x1x::new_ads1013(dev, SlaveAddr::default());
let measurement = block!(adc.read(&mut channel::DifferentialA0A1)).unwrap();
println!("Measurement: {}", measurement);
+ let _dev = adc.destroy_ads1013(); // get I2C device back
}