diff options
author | Diego Barrios Romero <eldruin@gmail.com> | 2018-11-20 18:45:32 +0100 |
---|---|---|
committer | Diego Barrios Romero <eldruin@gmail.com> | 2018-11-20 18:45:32 +0100 |
commit | ea48b456d5045cd136c08829d40708eef1cab67a (patch) | |
tree | b01cbefeb66b2a7f45950dd953fbec31ab4aa9a8 /src/devices/mode/continuous.rs | |
parent | 23f62d84d1232b7ef5ec02483a8090aa5c336fa6 (diff) | |
download | ads1x1x-async-ea48b456d5045cd136c08829d40708eef1cab67a.tar.gz ads1x1x-async-ea48b456d5045cd136c08829d40708eef1cab67a.tar.xz ads1x1x-async-ea48b456d5045cd136c08829d40708eef1cab67a.zip |
Add method to start continuous conversions
Diffstat (limited to 'src/devices/mode/continuous.rs')
-rw-r--r-- | src/devices/mode/continuous.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/devices/mode/continuous.rs b/src/devices/mode/continuous.rs index cb62f8d..6bf5201 100644 --- a/src/devices/mode/continuous.rs +++ b/src/devices/mode/continuous.rs @@ -21,4 +21,11 @@ where _mode: PhantomData }) } + + /// Start continuous conversions + pub fn start(&mut self) -> Result<(), Error<E>> { + self.set_operating_mode(OperatingMode::Continuous)?; + self.a_conversion_was_started = true; + Ok(()) + } } |