diff options
author | Diego Barrios Romero <eldruin@gmail.com> | 2020-06-21 22:57:06 +0200 |
---|---|---|
committer | Diego Barrios Romero <eldruin@gmail.com> | 2020-06-21 22:57:06 +0200 |
commit | 667e5e55a26453ef9e23f0ab45532f4e46ce37db (patch) | |
tree | 3d8e068076c74fbf27900169cbb911f344a43312 | |
parent | 4ac2f8994b817ad3b1f8d3609d54a4283c530ac8 (diff) | |
download | ads1x1x-async-667e5e55a26453ef9e23f0ab45532f4e46ce37db.tar.gz ads1x1x-async-667e5e55a26453ef9e23f0ab45532f4e46ce37db.tar.xz ads1x1x-async-667e5e55a26453ef9e23f0ab45532f4e46ce37db.zip |
Simplify imports
-rw-r--r-- | src/devices/mode/continuous.rs | 5 | ||||
-rw-r--r-- | src/lib.rs | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/devices/mode/continuous.rs b/src/devices/mode/continuous.rs index d2955aa..64aa179 100644 --- a/src/devices/mode/continuous.rs +++ b/src/devices/mode/continuous.rs @@ -1,10 +1,11 @@ //! Continuous measurement mode use crate::{ - channels::ChannelSelection, conversion, devices::OperatingMode, hal, interface, mode, Ads1x1x, + channels::ChannelSelection, conversion, devices::OperatingMode, interface, mode, Ads1x1x, Error, ModeChangeError, Register, }; use core::marker::PhantomData; +use embedded_hal::adc; impl<DI, IC, CONV, E> Ads1x1x<DI, IC, CONV, mode::Continuous> where @@ -42,7 +43,7 @@ where /// The following conversions will use the new channel configuration. pub fn select_channel<CH>(&mut self, _channel: &mut CH) -> Result<(), Error<E>> where - CH: hal::adc::Channel<Ads1x1x<DI, IC, CONV, mode::OneShot>, ID = ChannelSelection>, + CH: adc::Channel<Ads1x1x<DI, IC, CONV, mode::OneShot>, ID = ChannelSelection>, { let config = self.config.with_mux_bits(CH::channel()); self.iface.write_register(Register::CONFIG, config.bits)?; @@ -191,8 +191,6 @@ #![deny(missing_docs)] #![no_std] -extern crate embedded_hal as hal; -extern crate nb; use core::marker::PhantomData; /// Errors in this crate |