diff options
author | Diego Barrios Romero <eldruin@gmail.com> | 2018-11-11 08:04:42 +0100 |
---|---|---|
committer | Diego Barrios Romero <eldruin@gmail.com> | 2018-11-11 08:04:42 +0100 |
commit | 3e3a790d9f70bfd6cb4210dfe09560d0385fdf5a (patch) | |
tree | 8cf40e43cb93b15a774696c3af639d504addce8c /src/devices/ads1x1x/mode/continuous.rs | |
parent | 8b9e9ecdb85a30ac1c57fe6b96498cae6ad9f7cc (diff) | |
download | ads1x1x-async-3e3a790d9f70bfd6cb4210dfe09560d0385fdf5a.tar.gz ads1x1x-async-3e3a790d9f70bfd6cb4210dfe09560d0385fdf5a.tar.xz ads1x1x-async-3e3a790d9f70bfd6cb4210dfe09560d0385fdf5a.zip |
Reorganize modules
Diffstat (limited to 'src/devices/ads1x1x/mode/continuous.rs')
-rw-r--r-- | src/devices/ads1x1x/mode/continuous.rs | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/devices/ads1x1x/mode/continuous.rs b/src/devices/ads1x1x/mode/continuous.rs deleted file mode 100644 index 1472478..0000000 --- a/src/devices/ads1x1x/mode/continuous.rs +++ /dev/null @@ -1,23 +0,0 @@ -//! Common functions - -use core::marker::PhantomData; -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>, - IC: ic::Resolution -{ - /// Change operating mode to OneShot - pub fn into_one_shot(mut self) -> Result<Ads1x1x<DI, IC, 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, - _ic: PhantomData, - _mode: PhantomData - }) - } -} |