summaryrefslogtreecommitdiffstats
path: root/src/devices/mode/continuous.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/mode/continuous.rs')
-rw-r--r--src/devices/mode/continuous.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/devices/mode/continuous.rs b/src/devices/mode/continuous.rs
index 35cfd7b..cb4757c 100644
--- a/src/devices/mode/continuous.rs
+++ b/src/devices/mode/continuous.rs
@@ -1,9 +1,9 @@
//! Continuous measurement mode
-use core::marker::PhantomData;
-use { Ads1x1x, conversion, Error, hal, interface, mode, Register };
-use channels::ChannelSelection;
use super::super::OperatingMode;
+use channels::ChannelSelection;
+use core::marker::PhantomData;
+use {conversion, hal, interface, mode, Ads1x1x, Error, Register};
impl<DI, IC, CONV, E> Ads1x1x<DI, IC, CONV, mode::Continuous>
where
@@ -20,7 +20,7 @@ where
a_conversion_was_started: false,
_conv: PhantomData,
_ic: PhantomData,
- _mode: PhantomData
+ _mode: PhantomData,
})
}
@@ -58,7 +58,8 @@ where
/// Select the channel for measurements.
pub fn select_channel<CH>(&mut self, _channel: &mut CH) -> Result<(), Error<E>>
where
- CH: hal::adc::Channel<Ads1x1x<DI, IC, CONV, mode::OneShot>, ID = ChannelSelection> {
+ CH: hal::adc::Channel<Ads1x1x<DI, IC, CONV, mode::OneShot>, ID = ChannelSelection>,
+ {
let config = self.config.with_mux_bits(CH::channel());
self.iface.write_register(Register::CONFIG, config.bits)?;
self.config = config;