From ea48b456d5045cd136c08829d40708eef1cab67a Mon Sep 17 00:00:00 2001 From: Diego Barrios Romero Date: Tue, 20 Nov 2018 18:45:32 +0100 Subject: Add method to start continuous conversions --- src/devices/mode/continuous.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/devices/mode/continuous.rs') 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> { + self.set_operating_mode(OperatingMode::Continuous)?; + self.a_conversion_was_started = true; + Ok(()) + } } -- cgit v1.2.3-54-g00ecf