From 6e7b9558cf6d586f67e509efc157b7d41751ac26 Mon Sep 17 00:00:00 2001 From: Diego Barrios Romero Date: Thu, 8 Nov 2018 19:17:12 +0100 Subject: Improve documentation --- src/devices/ads1x1x/mode/oneshot.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/devices/ads1x1x/mode/oneshot.rs b/src/devices/ads1x1x/mode/oneshot.rs index 554a55e..0da4a7b 100644 --- a/src/devices/ads1x1x/mode/oneshot.rs +++ b/src/devices/ads1x1x/mode/oneshot.rs @@ -24,7 +24,7 @@ where } fn is_measurement_in_progress(&mut self) -> Result> { - let config = Config { + let config = Config { bits: self.iface.read_register(Register::CONFIG)? }; Ok(!config.is_high(BitFlags::OS)) @@ -44,6 +44,7 @@ where { type Error = Error; + /// Request that the ADC begin a conversion on the specified channel fn read(&mut self, _channel: &mut CH) -> nb::Result { //TODO for devices with MUX select channel, if it is the wrong one, return AlreadyInProgress or WrongChannel error if self.is_measurement_in_progress().map_err(nb::Error::Other)? { -- cgit v1.2.3-54-g00ecf