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 /src/devices/mode/oneshot.rs | |
parent | b7e9c9acf1bb42f4966930354135782bab57394a (diff) | |
download | ads1x1x-async-6aed921780dbe12c058e0aa0ce8b617e404b5a87.tar.gz ads1x1x-async-6aed921780dbe12c058e0aa0ce8b617e404b5a87.tar.xz ads1x1x-async-6aed921780dbe12c058e0aa0ce8b617e404b5a87.zip |
Use edition 2018
Diffstat (limited to 'src/devices/mode/oneshot.rs')
-rw-r--r-- | src/devices/mode/oneshot.rs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/devices/mode/oneshot.rs b/src/devices/mode/oneshot.rs index 5901292..579c2fb 100644 --- a/src/devices/mode/oneshot.rs +++ b/src/devices/mode/oneshot.rs @@ -1,10 +1,11 @@ //! Common functions - -use super::super::OperatingMode; -use channels::ChannelSelection; +use crate::{ + channels::ChannelSelection, conversion, devices::OperatingMode, interface, mode, Ads1x1x, + BitFlags, Config, Error, ModeChangeError, Register, +}; use core::marker::PhantomData; -use {conversion, hal, interface, nb}; -use {mode, Ads1x1x, BitFlags, Config, Error, ModeChangeError, Register}; +use embedded_hal::adc; +use nb; impl<DI, IC, CONV, E> Ads1x1x<DI, IC, CONV, mode::OneShot> where @@ -35,12 +36,12 @@ where } } -impl<DI, IC, CONV, E, CH> hal::adc::OneShot<Ads1x1x<DI, IC, CONV, mode::OneShot>, i16, CH> +impl<DI, IC, CONV, E, CH> adc::OneShot<Ads1x1x<DI, IC, CONV, mode::OneShot>, i16, CH> for Ads1x1x<DI, IC, CONV, mode::OneShot> where DI: interface::ReadData<Error = E> + interface::WriteData<Error = E>, CONV: conversion::ConvertMeasurement, - CH: hal::adc::Channel<Ads1x1x<DI, IC, CONV, mode::OneShot>, ID = ChannelSelection>, + CH: adc::Channel<Ads1x1x<DI, IC, CONV, mode::OneShot>, ID = ChannelSelection>, { type Error = Error<E>; |