summaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorDiego Barrios Romero <eldruin@gmail.com>2021-07-29 23:14:25 +0200
committerDiego Barrios Romero <eldruin@gmail.com>2021-07-29 23:14:25 +0200
commit28126fee8ce253e67ab737927ff0d89ebc24e419 (patch)
tree503e6056682296c3ac3ead637cad7f5c2e6da8a3 /src/lib.rs
parentdeb65c3a794bdc4e5c534983c8753072cec10adf (diff)
downloadads1x1x-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.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 418fc46..90a0f62 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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 {}