diff options
author | Diego Barrios Romero <eldruin@gmail.com> | 2020-06-21 22:52:41 +0200 |
---|---|---|
committer | Diego Barrios Romero <eldruin@gmail.com> | 2020-06-21 22:52:41 +0200 |
commit | 6aed921780dbe12c058e0aa0ce8b617e404b5a87 (patch) | |
tree | 3b76c4d8946aede3e48fcfade62a2e19488ee118 /examples | |
parent | b7e9c9acf1bb42f4966930354135782bab57394a (diff) | |
download | ads1x1x-async-6aed921780dbe12c058e0aa0ce8b617e404b5a87.tar.gz ads1x1x-async-6aed921780dbe12c058e0aa0ce8b617e404b5a87.tar.xz ads1x1x-async-6aed921780dbe12c058e0aa0ce8b617e404b5a87.zip |
Use edition 2018
Diffstat (limited to 'examples')
-rw-r--r-- | examples/all_channels.rs | 8 | ||||
-rw-r--r-- | examples/linux.rs | 8 | ||||
-rw-r--r-- | examples/typed.rs | 7 |
3 files changed, 5 insertions, 18 deletions
diff --git a/examples/all_channels.rs b/examples/all_channels.rs index be016e8..888737c 100644 --- a/examples/all_channels.rs +++ b/examples/all_channels.rs @@ -1,12 +1,8 @@ -extern crate embedded_hal; use embedded_hal::adc::OneShot; -extern crate linux_embedded_hal; -#[macro_use(block)] -extern crate nb; -extern crate ads1x1x; +use linux_embedded_hal::I2cdev; +use nb::block; use ads1x1x::{channel, Ads1x1x, SlaveAddr}; -use linux_embedded_hal::I2cdev; fn main() { let dev = I2cdev::new("/dev/i2c-1").unwrap(); diff --git a/examples/linux.rs b/examples/linux.rs index d0b2bc5..7364816 100644 --- a/examples/linux.rs +++ b/examples/linux.rs @@ -1,12 +1,8 @@ -extern crate embedded_hal; use embedded_hal::adc::OneShot; -extern crate linux_embedded_hal; -#[macro_use(block)] -extern crate nb; -extern crate ads1x1x; +use linux_embedded_hal::I2cdev; +use nb::block; use ads1x1x::{channel, Ads1x1x, SlaveAddr}; -use linux_embedded_hal::I2cdev; fn main() { let dev = I2cdev::new("/dev/i2c-1").unwrap(); diff --git a/examples/typed.rs b/examples/typed.rs index 22a2212..61268cf 100644 --- a/examples/typed.rs +++ b/examples/typed.rs @@ -1,15 +1,10 @@ // This example demonstrates the use of a type alias for the `Ads1x1x` struct // to ease usage in signatures. -#[macro_use(block)] -extern crate nb; - -extern crate embedded_hal; use embedded_hal::adc::OneShot; -extern crate linux_embedded_hal; use linux_embedded_hal::I2cdev; +use nb::block; -extern crate ads1x1x; use ads1x1x::{ channel::SingleA0, ic::{Ads1115, Resolution16Bit}, |