summaryrefslogtreecommitdiffstats
path: root/src/devices/ads1x1x/mode/continuous.rs
diff options
context:
space:
mode:
authorDiego Barrios Romero <eldruin@gmail.com>2018-11-08 19:01:40 +0100
committerDiego Barrios Romero <eldruin@gmail.com>2018-11-08 19:01:40 +0100
commitdbecb1c3af672b06e7443134e1efc7f5050e99ff (patch)
treed84cd91660f86bbf22646a0f831be49c77529d51 /src/devices/ads1x1x/mode/continuous.rs
parent0a9652fe9c079a6bb3829d74c31a14ec7b34affe (diff)
downloadads1x1x-async-dbecb1c3af672b06e7443134e1efc7f5050e99ff.tar.gz
ads1x1x-async-dbecb1c3af672b06e7443134e1efc7f5050e99ff.tar.xz
ads1x1x-async-dbecb1c3af672b06e7443134e1efc7f5050e99ff.zip
Enforce IC type to contain a resolution
Diffstat (limited to 'src/devices/ads1x1x/mode/continuous.rs')
-rw-r--r--src/devices/ads1x1x/mode/continuous.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/devices/ads1x1x/mode/continuous.rs b/src/devices/ads1x1x/mode/continuous.rs
index 1532b62..1472478 100644
--- a/src/devices/ads1x1x/mode/continuous.rs
+++ b/src/devices/ads1x1x/mode/continuous.rs
@@ -1,12 +1,13 @@
//! Common functions
use core::marker::PhantomData;
-use { Ads1x1x, mode, Error, interface };
+use { Ads1x1x, mode, Error, interface, ic };
use super::super::OperatingMode;
impl<DI, IC, E> Ads1x1x<DI, IC, mode::Continuous>
where
- DI: interface::WriteData<Error = E>
+ 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>> {