diff options
author | Diego Barrios Romero <eldruin@gmail.com> | 2021-07-29 23:14:25 +0200 |
---|---|---|
committer | Diego Barrios Romero <eldruin@gmail.com> | 2021-07-29 23:14:25 +0200 |
commit | 28126fee8ce253e67ab737927ff0d89ebc24e419 (patch) | |
tree | 503e6056682296c3ac3ead637cad7f5c2e6da8a3 /src/lib.rs | |
parent | deb65c3a794bdc4e5c534983c8753072cec10adf (diff) | |
download | ads1x1x-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/lib.rs')
-rw-r--r-- | src/lib.rs | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -237,7 +237,7 @@ impl BitFlags { } mod channels; -pub use crate::channels::channel; +pub use crate::channels::{channel, ChannelSelection}; mod construction; mod conversion; pub use crate::conversion::{ConvertMeasurement, ConvertThreshold}; @@ -250,14 +250,16 @@ mod types; use crate::types::Config; pub use crate::types::{ mode, Ads1x1x, ComparatorLatching, ComparatorMode, ComparatorPolarity, ComparatorQueue, - DataRate12Bit, DataRate16Bit, Error, FullScaleRange, ModeChangeError, SlaveAddr, + DataRate12Bit, DataRate16Bit, DynamicOneShot, Error, FullScaleRange, ModeChangeError, + SlaveAddr, }; mod private { - use super::{ic, interface}; + use super::{ic, interface, Ads1x1x}; pub trait Sealed {} impl<I2C> Sealed for interface::I2cInterface<I2C> {} + impl<DI, IC, CONV, MODE> Sealed for Ads1x1x<DI, IC, CONV, MODE> {} impl Sealed for ic::Resolution12Bit {} impl Sealed for ic::Resolution16Bit {} |