diff options
Diffstat (limited to 'src/devices/features')
-rw-r--r-- | src/devices/features/tier1.rs | 8 | ||||
-rw-r--r-- | src/devices/features/tier2.rs | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/devices/features/tier1.rs b/src/devices/features/tier1.rs index 9e5cb77..0c940ee 100644 --- a/src/devices/features/tier1.rs +++ b/src/devices/features/tier1.rs @@ -1,6 +1,8 @@ //! Common functions -use {ic, interface, Ads1x1x, BitFlags as BF, DataRate12Bit, DataRate16Bit, Error, Register}; +use crate::{ + ic, interface, Ads1x1x, BitFlags as BF, DataRate12Bit, DataRate16Bit, Error, Register, +}; impl<DI, IC, MODE, E> Ads1x1x<DI, IC, ic::Resolution12Bit, MODE> where @@ -8,7 +10,7 @@ where { /// Set data rate pub fn set_data_rate(&mut self, rate: DataRate12Bit) -> Result<(), Error<E>> { - use DataRate12Bit as DR; + use crate::DataRate12Bit as DR; let cfg = self.config.clone(); let config = match rate { DR::Sps128 => cfg.with_low(BF::DR2).with_low(BF::DR1).with_low(BF::DR0), @@ -31,7 +33,7 @@ where { /// Set data rate pub fn set_data_rate(&mut self, rate: DataRate16Bit) -> Result<(), Error<E>> { - use DataRate16Bit as DR; + use crate::DataRate16Bit as DR; let cfg = self.config.clone(); let config = match rate { DR::Sps8 => cfg.with_low(BF::DR2).with_low(BF::DR1).with_low(BF::DR0), diff --git a/src/devices/features/tier2.rs b/src/devices/features/tier2.rs index 0b0b92c..96330a0 100644 --- a/src/devices/features/tier2.rs +++ b/src/devices/features/tier2.rs @@ -2,7 +2,7 @@ //! //! These are the features included only in ADS1x14, ADS1x15 -use { +use crate::{ conversion, ic, interface, Ads1x1x, BitFlags as BF, ComparatorLatching, ComparatorMode, ComparatorPolarity, ComparatorQueue, Error, FullScaleRange, Register, }; @@ -17,7 +17,7 @@ where /// /// This configures the programmable gain amplifier and determines the measurable input voltage range. pub fn set_full_scale_range(&mut self, range: FullScaleRange) -> Result<(), Error<E>> { - use FullScaleRange as FSR; + use crate::FullScaleRange as FSR; let cfg = self.config.clone(); let config = match range { FSR::Within6_144V => cfg.with_low(BF::PGA2).with_low(BF::PGA1).with_low(BF::PGA0), |