summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 20f5857..9491baa 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -133,7 +133,7 @@
//! # }
//! ```
//!
-//! ### Change into continuous conversion mode
+//! ### Change into continuous conversion mode and read the last measurement
//!
//! ```no_run
//! extern crate linux_embedded_hal as hal;
@@ -145,9 +145,15 @@
//! let address = SlaveAddr::default();
//! let adc = Ads1x1x::new_ads1013(dev, address);
//! let mut adc = adc.into_continuous().unwrap();
+//! adc.start().unwrap();
+//! while(!adc.is_measurement_in_progress().unwrap()) {
+//! // some delay...
+//! }
+//! let measurement = adc.read().unwrap();
//! # }
//! ```
//!
+//!
//! ### Set the data rate
//! For 12-bit devices, the available data rates are given by `DataRate12Bit`.
//! For 16-bit devices, the available data rates are given by `DataRate16Bit`.