diff --git a/src/interfaces.rs b/src/channels.rs similarity index 100% rename from src/interfaces.rs rename to src/channels.rs diff --git a/src/interfaces/jlink.rs b/src/channels/jlink.rs similarity index 100% rename from src/interfaces/jlink.rs rename to src/channels/jlink.rs diff --git a/src/interfaces/jlink/board_interface.rs b/src/channels/jlink/board_interface.rs similarity index 65% rename from src/interfaces/jlink/board_interface.rs rename to src/channels/jlink/board_interface.rs index a68ed0c..8ec2ba7 100644 --- a/src/interfaces/jlink/board_interface.rs +++ b/src/channels/jlink/board_interface.rs @@ -1,6 +1,6 @@ +use crate::channels::traits::BoardChannel; +use crate::channels::JLinkChannel; use crate::errors::TockloaderError; -use crate::interfaces::traits::BoardChannel; -use crate::interfaces::JLinkChannel; impl BoardChannel for JLinkChannel { fn open(&mut self) -> Result<(), TockloaderError> { diff --git a/src/interfaces/openocd.rs b/src/channels/openocd.rs similarity index 100% rename from src/interfaces/openocd.rs rename to src/channels/openocd.rs diff --git a/src/interfaces/openocd/board_interface.rs b/src/channels/openocd/board_interface.rs similarity index 62% rename from src/interfaces/openocd/board_interface.rs rename to src/channels/openocd/board_interface.rs index 0a70ce9..0dde2cd 100644 --- a/src/interfaces/openocd/board_interface.rs +++ b/src/channels/openocd/board_interface.rs @@ -1,9 +1,9 @@ -use crate::errors::TockloaderError; -use crate::interfaces::traits::BoardChannel; -use crate::interfaces::OpenOCDChannel; - -impl BoardChannel for OpenOCDChannel { - fn open(&mut self) -> Result<(), TockloaderError> { - todo!() - } -} +use crate::channels::traits::BoardChannel; +use crate::channels::OpenOCDChannel; +use crate::errors::TockloaderError; + +impl BoardChannel for OpenOCDChannel { + fn open(&mut self) -> Result<(), TockloaderError> { + todo!() + } +} diff --git a/src/interfaces/serial.rs b/src/channels/serial.rs similarity index 100% rename from src/interfaces/serial.rs rename to src/channels/serial.rs diff --git a/src/interfaces/serial/board_interface.rs b/src/channels/serial/board_interface.rs similarity index 62% rename from src/interfaces/serial/board_interface.rs rename to src/channels/serial/board_interface.rs index a8fd627..286dea0 100644 --- a/src/interfaces/serial/board_interface.rs +++ b/src/channels/serial/board_interface.rs @@ -1,9 +1,9 @@ -use crate::errors::TockloaderError; -use crate::interfaces::traits::BoardChannel; -use crate::interfaces::SerialChannel; - -impl BoardChannel for SerialChannel { - fn open(&mut self) -> Result<(), TockloaderError> { - todo!() - } -} +use crate::channels::traits::BoardChannel; +use crate::channels::SerialChannel; +use crate::errors::TockloaderError; + +impl BoardChannel for SerialChannel { + fn open(&mut self) -> Result<(), TockloaderError> { + todo!() + } +} diff --git a/src/interfaces/traits.rs b/src/channels/traits.rs similarity index 100% rename from src/interfaces/traits.rs rename to src/channels/traits.rs diff --git a/src/main.rs b/src/main.rs index 8c362ab..0d30179 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,6 @@ +mod channels; mod cli; mod errors; -mod interfaces; use cli::make_cli; fn main() {