summaryrefslogtreecommitdiffstats
path: root/src/devices/mode/continuous.rs
diff options
context:
space:
mode:
authorDiego Barrios Romero <eldruin@gmail.com>2018-11-11 17:32:52 +0100
committerDiego Barrios Romero <eldruin@gmail.com>2018-11-11 17:32:52 +0100
commitfce3d8546bd619964ec5dd1594cd93e744a99521 (patch)
tree7bc17d465652c86b25b9fb34ccd7ed3bf0218b56 /src/devices/mode/continuous.rs
parentb9b5349b4b78a5d59be4a7e4a11f712e2f6a8256 (diff)
downloadads1x1x-async-fce3d8546bd619964ec5dd1594cd93e744a99521.tar.gz
ads1x1x-async-fce3d8546bd619964ec5dd1594cd93e744a99521.tar.xz
ads1x1x-async-fce3d8546bd619964ec5dd1594cd93e744a99521.zip
Implement value conversions over type parameter
Diffstat (limited to 'src/devices/mode/continuous.rs')
-rw-r--r--src/devices/mode/continuous.rs8
1 files changed, 4 insertions, 4 deletions
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<DI, IC, E> Ads1x1x<DI, IC, mode::Continuous>
+impl<DI, IC, CONV, E> Ads1x1x<DI, IC, CONV, mode::Continuous>
where
DI: interface::WriteData<Error = E>,
- IC: ic::Resolution
{
/// Change operating mode to OneShot
- pub fn into_one_shot(mut self) -> Result<Ads1x1x<DI, IC, mode::OneShot>, Error<E>> {
+ pub fn into_one_shot(mut self) -> Result<Ads1x1x<DI, IC, CONV, mode::OneShot>, Error<E>> {
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
})