summaryrefslogtreecommitdiffstats
path: root/src/channels.rs
diff options
context:
space:
mode:
authorDiego Barrios Romero <eldruin@gmail.com>2021-07-29 23:14:25 +0200
committerDiego Barrios Romero <eldruin@gmail.com>2021-07-29 23:14:25 +0200
commit28126fee8ce253e67ab737927ff0d89ebc24e419 (patch)
tree503e6056682296c3ac3ead637cad7f5c2e6da8a3 /src/channels.rs
parentdeb65c3a794bdc4e5c534983c8753072cec10adf (diff)
downloadads1x1x-async-28126fee8ce253e67ab737927ff0d89ebc24e419.tar.gz
ads1x1x-async-28126fee8ce253e67ab737927ff0d89ebc24e419.tar.xz
ads1x1x-async-28126fee8ce253e67ab737927ff0d89ebc24e419.zip
Add value-based one-shot trait to ease driver usage in functions
Diffstat (limited to 'src/channels.rs')
-rw-r--r--src/channels.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/channels.rs b/src/channels.rs
index c0f0ff9..a4c806c 100644
--- a/src/channels.rs
+++ b/src/channels.rs
@@ -23,15 +23,24 @@ pub mod channel {
pub struct DifferentialA2A3;
}
+/// ADC input channel selection
#[derive(Debug, Clone, Copy)]
pub enum ChannelSelection {
+ /// Measure single-ended signal on input channel 0
SingleA0,
+ /// Measure single-ended signal on input channel 1
SingleA1,
+ /// Measure single-ended signal on input channel 2
SingleA2,
+ /// Measure single-ended signal on input channel 3
SingleA3,
+ /// Measure signal on input channel 0 differentially to signal on input channel 1
DifferentialA0A1,
+ /// Measure signal on input channel 0 differentially to signal on input channel 3
DifferentialA0A3,
+ /// Measure signal on input channel 1 differentially to signal on input channel 3
DifferentialA1A3,
+ /// Measure signal on input channel 2 differentially to signal on input channel 3
DifferentialA2A3,
}