From fce3d8546bd619964ec5dd1594cd93e744a99521 Mon Sep 17 00:00:00 2001 From: Diego Barrios Romero Date: Sun, 11 Nov 2018 17:32:52 +0100 Subject: Implement value conversions over type parameter --- src/devices/mode/continuous.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/devices/mode/continuous.rs') diff --git a/src/devices/mode/continuous.rs b/src/devices/mode/continuous.rs index 1472478..a06df60 100644 --- a/src/devices/mode/continuous.rs +++ b/src/devices/mode/continuous.rs @@ -1,21 +1,21 @@ //! Common functions use core::marker::PhantomData; -use { Ads1x1x, mode, Error, interface, ic }; +use { Ads1x1x, mode, Error, interface }; use super::super::OperatingMode; -impl Ads1x1x +impl Ads1x1x where DI: interface::WriteData, - IC: ic::Resolution { /// Change operating mode to OneShot - pub fn into_one_shot(mut self) -> Result, Error> { + pub fn into_one_shot(mut self) -> Result, Error> { self.set_operating_mode(OperatingMode::OneShot)?; Ok(Ads1x1x { iface: self.iface, config: self.config, a_conversion_was_started: self.a_conversion_was_started, + converter: self.converter, _ic: PhantomData, _mode: PhantomData }) -- cgit v1.2.3-54-g00ecf