From c5dac9d7c0cbfb82cc23c97c465b163d3f1a1900 Mon Sep 17 00:00:00 2001 From: Dylan McKay Date: Thu, 14 Dec 2017 02:28:11 +1300 Subject: [PATCH] Move the serial module into a 'legacy' module --- src/legacy/mod.rs | 9 +++++++++ src/{ => legacy}/serial.rs | 0 src/lib.rs | 9 ++------- src/pin.rs | 7 ++++++- 4 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 src/legacy/mod.rs rename src/{ => legacy}/serial.rs (100%) diff --git a/src/legacy/mod.rs b/src/legacy/mod.rs new file mode 100644 index 0000000..7aaba83 --- /dev/null +++ b/src/legacy/mod.rs @@ -0,0 +1,9 @@ +//! Legacy code. +//! +//! The code in here needs to be cleaned up and rewritten. +//! +//! Once a replacement exists, these legacy modules may be removed +//! in a major release! + +pub mod serial; + diff --git a/src/serial.rs b/src/legacy/serial.rs similarity index 100% rename from src/serial.rs rename to src/legacy/serial.rs diff --git a/src/lib.rs b/src/lib.rs index 18ac3b9..770b487 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -14,10 +14,10 @@ #![no_std] pub use self::register::{Bitset, Mask, Register, RegisterValue}; -pub use self::pin::Pin; +pub use self::pin::{DataDirection, Pin}; pub mod prelude; -pub mod serial; +pub mod legacy; pub mod cores; pub mod modules; @@ -28,8 +28,3 @@ mod pin; #[doc(hidden)] pub mod std_stub; -pub enum DataDirection { - Input, - Output, -} - diff --git a/src/pin.rs b/src/pin.rs index 758b89e..c917721 100644 --- a/src/pin.rs +++ b/src/pin.rs @@ -1,4 +1,9 @@ -use {DataDirection, Register}; +use Register; + +pub enum DataDirection { + Input, + Output, +} /// An IO pin. pub trait Pin {