diff options
author | Diego Barrios Romero <eldruin@gmail.com> | 2018-11-11 08:04:42 +0100 |
---|---|---|
committer | Diego Barrios Romero <eldruin@gmail.com> | 2018-11-11 08:04:42 +0100 |
commit | 3e3a790d9f70bfd6cb4210dfe09560d0385fdf5a (patch) | |
tree | 8cf40e43cb93b15a774696c3af639d504addce8c /src | |
parent | 8b9e9ecdb85a30ac1c57fe6b96498cae6ad9f7cc (diff) | |
download | ads1x1x-async-3e3a790d9f70bfd6cb4210dfe09560d0385fdf5a.tar.gz ads1x1x-async-3e3a790d9f70bfd6cb4210dfe09560d0385fdf5a.tar.xz ads1x1x-async-3e3a790d9f70bfd6cb4210dfe09560d0385fdf5a.zip |
Reorganize modules
Diffstat (limited to 'src')
-rw-r--r-- | src/channels.rs (renamed from src/devices/channels.rs) | 0 | ||||
-rw-r--r-- | src/construction/i2c.rs (renamed from src/devices/construction/i2c.rs) | 0 | ||||
-rw-r--r-- | src/construction/mod.rs (renamed from src/devices/construction/mod.rs) | 0 | ||||
-rw-r--r-- | src/devices/ads1x1x/mod.rs | 10 | ||||
-rw-r--r-- | src/devices/common.rs (renamed from src/devices/ads1x1x/common.rs) | 0 | ||||
-rw-r--r-- | src/devices/features/mod.rs (renamed from src/devices/ads1x1x/features/mod.rs) | 0 | ||||
-rw-r--r-- | src/devices/features/tier1.rs (renamed from src/devices/ads1x1x/features/tier1.rs) | 0 | ||||
-rw-r--r-- | src/devices/features/tier2.rs (renamed from src/devices/ads1x1x/features/tier2.rs) | 0 | ||||
-rw-r--r-- | src/devices/mod.rs | 16 | ||||
-rw-r--r-- | src/devices/mode/continuous.rs (renamed from src/devices/ads1x1x/mode/continuous.rs) | 0 | ||||
-rw-r--r-- | src/devices/mode/mod.rs (renamed from src/devices/ads1x1x/mode/mod.rs) | 0 | ||||
-rw-r--r-- | src/devices/mode/oneshot.rs (renamed from src/devices/ads1x1x/mode/oneshot.rs) | 4 | ||||
-rw-r--r-- | src/ic.rs (renamed from src/devices/ic.rs) | 0 | ||||
-rw-r--r-- | src/lib.rs | 9 |
14 files changed, 18 insertions, 21 deletions
diff --git a/src/devices/channels.rs b/src/channels.rs index c202ad3..c202ad3 100644 --- a/src/devices/channels.rs +++ b/src/channels.rs diff --git a/src/devices/construction/i2c.rs b/src/construction/i2c.rs index 9ef18eb..9ef18eb 100644 --- a/src/devices/construction/i2c.rs +++ b/src/construction/i2c.rs diff --git a/src/devices/construction/mod.rs b/src/construction/mod.rs index 0873d88..0873d88 100644 --- a/src/devices/construction/mod.rs +++ b/src/construction/mod.rs diff --git a/src/devices/ads1x1x/mod.rs b/src/devices/ads1x1x/mod.rs deleted file mode 100644 index 95d8907..0000000 --- a/src/devices/ads1x1x/mod.rs +++ /dev/null @@ -1,10 +0,0 @@ -//! Functions for all devices - -enum OperatingMode { - OneShot, - Continuous -} - -mod common; -mod mode; -mod features; diff --git a/src/devices/ads1x1x/common.rs b/src/devices/common.rs index 5abb99c..5abb99c 100644 --- a/src/devices/ads1x1x/common.rs +++ b/src/devices/common.rs diff --git a/src/devices/ads1x1x/features/mod.rs b/src/devices/features/mod.rs index c24b7b4..c24b7b4 100644 --- a/src/devices/ads1x1x/features/mod.rs +++ b/src/devices/features/mod.rs diff --git a/src/devices/ads1x1x/features/tier1.rs b/src/devices/features/tier1.rs index 9f72b77..9f72b77 100644 --- a/src/devices/ads1x1x/features/tier1.rs +++ b/src/devices/features/tier1.rs diff --git a/src/devices/ads1x1x/features/tier2.rs b/src/devices/features/tier2.rs index 43dce5c..43dce5c 100644 --- a/src/devices/ads1x1x/features/tier2.rs +++ b/src/devices/features/tier2.rs diff --git a/src/devices/mod.rs b/src/devices/mod.rs index c73d344..95d8907 100644 --- a/src/devices/mod.rs +++ b/src/devices/mod.rs @@ -1,6 +1,10 @@ -#[doc(hidden)] -pub mod ic; -mod ads1x1x; -mod construction; -mod channels; -pub use self::channels::channel; +//! Functions for all devices + +enum OperatingMode { + OneShot, + Continuous +} + +mod common; +mod mode; +mod features; diff --git a/src/devices/ads1x1x/mode/continuous.rs b/src/devices/mode/continuous.rs index 1472478..1472478 100644 --- a/src/devices/ads1x1x/mode/continuous.rs +++ b/src/devices/mode/continuous.rs diff --git a/src/devices/ads1x1x/mode/mod.rs b/src/devices/mode/mod.rs index 8e0e012..8e0e012 100644 --- a/src/devices/ads1x1x/mode/mod.rs +++ b/src/devices/mode/mod.rs diff --git a/src/devices/ads1x1x/mode/oneshot.rs b/src/devices/mode/oneshot.rs index 7ff9ac9..30958ab 100644 --- a/src/devices/ads1x1x/mode/oneshot.rs +++ b/src/devices/mode/oneshot.rs @@ -3,8 +3,8 @@ use core::marker::PhantomData; use { Ads1x1x, mode, Error, Register, BitFlags, Config, ic }; use { interface, hal, nb }; -use devices::ads1x1x::OperatingMode; -use devices::channels::ChannelSelection; +use devices::OperatingMode; +use channels::ChannelSelection; use super::convert_measurement; impl<DI, IC, E> Ads1x1x<DI, IC, mode::OneShot> diff --git a/src/devices/ic.rs b/src/ic.rs index 7b30f85..7b30f85 100644 --- a/src/devices/ic.rs +++ b/src/ic.rs @@ -285,12 +285,15 @@ pub struct Ads1x1x<DI, IC, MODE> { #[doc(hidden)] pub mod interface; +#[doc(hidden)] +pub mod ic; +mod channels; mod devices; -pub use devices::ic; -pub use devices::channel; +mod construction; +pub use channels::channel; mod private { - use super::{ devices::ic, interface }; + use super::{ ic, interface }; pub trait Sealed {} impl<I2C> Sealed for interface::I2cInterface<I2C> {} |