summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDiego Barrios Romero <eldruin@gmail.com>2018-11-07 20:22:02 +0100
committerDiego Barrios Romero <eldruin@gmail.com>2018-11-07 20:22:02 +0100
commitec0ffcaa6d49ae7c6e3256f9742e996d7b0752c4 (patch)
tree69e5e9ee40c98b65b59dfc57709ab35222b50fd1 /src
parent42cc99c1835ff2838a25218ae57e47649846af9d (diff)
downloadads1x1x-async-ec0ffcaa6d49ae7c6e3256f9742e996d7b0752c4.tar.gz
ads1x1x-async-ec0ffcaa6d49ae7c6e3256f9742e996d7b0752c4.tar.xz
ads1x1x-async-ec0ffcaa6d49ae7c6e3256f9742e996d7b0752c4.zip
Add data rate type
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index ea9a383..00ffd72 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -74,6 +74,25 @@ pub mod mode {
pub struct Continuous(());
}
+/// Data rate
+#[derive(Debug, Clone)]
+pub enum DataRate {
+ /// 128 SPS
+ Sps128,
+ /// 250 SPS
+ Sps250,
+ /// 490 SPS
+ Sps490,
+ /// 920 SPS
+ Sps920,
+ /// 1600 SPS (default)
+ Sps1600,
+ /// 2400 SPS
+ Sps2400,
+ /// 3300 SPS
+ Sps3300
+}
+
/// Possible slave addresses
#[derive(Debug, Clone)]
pub enum SlaveAddr {