From b3ca672f70c71194da40a7670549a8264c13d971 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Fri, 12 Jan 2024 20:24:51 +0100 Subject: Update to `embedded-hal` 1.0. --- src/lib.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index e5405d1..a9046ed 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -129,13 +129,12 @@ //! ### Make a one-shot measurement //! ```no_run //! use ads1x1x::{channel, Ads1x1x, SlaveAddr}; -//! use embedded_hal::adc::OneShot; //! use linux_embedded_hal::I2cdev; //! use nb::block; //! //! let dev = I2cdev::new("/dev/i2c-1").unwrap(); //! let mut adc = Ads1x1x::new_ads1013(dev, SlaveAddr::default()); -//! let measurement = block!(adc.read(&mut channel::DifferentialA0A1)).unwrap(); +//! let measurement = block!(adc.read(channel::DifferentialA0A1)).unwrap(); //! println!("Measurement: {}", measurement); //! let _dev = adc.destroy_ads1013(); // get I2C device back //! ``` @@ -201,8 +200,6 @@ //! adc.set_high_threshold_raw(1500).unwrap(); //! adc.set_comparator_latching(ComparatorLatching::Latching).unwrap(); //! ``` - -#![doc(html_root_url = "https://docs.rs/ads1x1x/0.2.2")] #![deny(unsafe_code)] #![deny(missing_docs)] #![no_std] @@ -237,8 +234,8 @@ impl BitFlags { const COMP_QUE0: u16 = 0b0000_0000_0000_0001; } -mod channels; -pub use crate::channels::{channel, ChannelSelection}; +pub mod channel; +pub use channel::{ChannelId, ChannelSelection}; mod construction; mod conversion; pub use crate::conversion::{ConvertMeasurement, ConvertThreshold}; -- cgit v1.2.3-54-g00ecf