diff options
author | Diego Barrios Romero <eldruin@gmail.com> | 2018-11-21 09:35:37 +0100 |
---|---|---|
committer | Diego Barrios Romero <eldruin@gmail.com> | 2018-11-21 09:35:37 +0100 |
commit | 5485d9655e2ab3a6d04e5f69b246f5db4d2c5936 (patch) | |
tree | 84bb1e825656d4c523b65edc5d7780fbb060c8cc /src/devices/mode/continuous.rs | |
parent | e4a1ac5a04d021ef026c559354e9913ae59864d8 (diff) | |
download | ads1x1x-async-5485d9655e2ab3a6d04e5f69b246f5db4d2c5936.tar.gz ads1x1x-async-5485d9655e2ab3a6d04e5f69b246f5db4d2c5936.tar.xz ads1x1x-async-5485d9655e2ab3a6d04e5f69b246f5db4d2c5936.zip |
Code formatting
Diffstat (limited to 'src/devices/mode/continuous.rs')
-rw-r--r-- | src/devices/mode/continuous.rs | 11 |
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; |