summaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorDiego Barrios Romero <eldruin@gmail.com>2018-11-11 18:04:37 +0100
committerDiego Barrios Romero <eldruin@gmail.com>2018-11-11 18:04:37 +0100
commit62a9825c41fd0b859eeb2aa3a25b8f2a2eba58b5 (patch)
treee90146dca2fd075398c4231da12b98a77c602c17 /src/lib.rs
parentfbb2099933e6e287d838995836a857127c18efa2 (diff)
downloadads1x1x-async-62a9825c41fd0b859eeb2aa3a25b8f2a2eba58b5.tar.gz
ads1x1x-async-62a9825c41fd0b859eeb2aa3a25b8f2a2eba58b5.tar.xz
ads1x1x-async-62a9825c41fd0b859eeb2aa3a25b8f2a2eba58b5.zip
Add support for setting the data rate in 16bit devices
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index d4b10e7..4abe8f8 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -150,6 +150,27 @@ pub enum DataRate12Bit {
Sps3300
}
+
+/// Data rate for ADS1113, ADS1114, ADS1115, ADS1118
+#[derive(Debug, Clone, PartialEq)]
+pub enum DataRate16Bit {
+ /// 8 SPS
+ Sps8,
+ /// 16 SPS
+ Sps16,
+ /// 32 SPS
+ Sps32,
+ /// 64 SPS
+ Sps64,
+ /// 128 SPS (default)
+ Sps128,
+ /// 250 SPS
+ Sps250,
+ /// 475 SPS
+ Sps475,
+ /// 860 SPS
+ Sps860
+}
/// Comparator mode (only for ADS1x14, ADS1x15)
#[derive(Debug, Clone, PartialEq)]
pub enum ComparatorMode {