From 28126fee8ce253e67ab737927ff0d89ebc24e419 Mon Sep 17 00:00:00 2001 From: Diego Barrios Romero Date: Thu, 29 Jul 2021 23:14:25 +0200 Subject: Add value-based one-shot trait to ease driver usage in functions --- src/channels.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/channels.rs') 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, } -- cgit v1.2.3-54-g00ecf