From 319f7d9eef1ca1b66d3ccac6076a5b89ae457024 Mon Sep 17 00:00:00 2001 From: Astro Date: Wed, 25 Mar 2020 22:23:30 +0100 Subject: [PATCH] move smoltcp dependency to libboard_zynq only --- experiments/Cargo.toml | 6 ------ experiments/src/main.rs | 17 +++++++++++------ libboard_zynq/src/lib.rs | 3 +++ libcortex_a9/Cargo.toml | 6 ------ libsupport_zynq/Cargo.toml | 6 ------ libsupport_zynq/src/lib.rs | 1 - 6 files changed, 14 insertions(+), 25 deletions(-) diff --git a/experiments/Cargo.toml b/experiments/Cargo.toml index 08056b1..a9bdc2e 100644 --- a/experiments/Cargo.toml +++ b/experiments/Cargo.toml @@ -15,9 +15,3 @@ libregister = { path = "../libregister" } libcortex_a9 = { path = "../libcortex_a9" } libboard_zynq = { path = "../libboard_zynq" } libsupport_zynq = { path = "../libsupport_zynq" } - -[dependencies.smoltcp] -git = "https://github.com/m-labs/smoltcp.git" -rev = "8eb01aca364aefe5f823d68d552d62c76c9be4a3" -features = ["ethernet", "proto-ipv4", "socket-tcp"] -default-features = false diff --git a/experiments/src/main.rs b/experiments/src/main.rs index dcaecc1..c78febf 100644 --- a/experiments/src/main.rs +++ b/experiments/src/main.rs @@ -3,15 +3,20 @@ use core::mem::transmute; use libcortex_a9::mutex::Mutex; -use libboard_zynq::{print, println, self as zynq, clocks::Clocks, clocks::source::{ClockSource, ArmPll, IoPll}}; +use libboard_zynq::{ + print, println, + self as zynq, clocks::Clocks, clocks::source::{ClockSource, ArmPll, IoPll}, + smoltcp::{ + wire::{EthernetAddress, IpAddress, IpCidr}, + iface::{NeighborCache, EthernetInterfaceBuilder}, + time::Instant, + socket::SocketSet, + socket::{TcpSocket, TcpSocketBuffer}, + }, +}; use libsupport_zynq::{ ram, alloc::{vec, vec::Vec}, boot, - smoltcp::wire::{EthernetAddress, IpAddress, IpCidr}, - smoltcp::iface::{NeighborCache, EthernetInterfaceBuilder}, - smoltcp::time::Instant, - smoltcp::socket::SocketSet, - smoltcp::socket::{TcpSocket, TcpSocketBuffer}, }; const HWADDR: [u8; 6] = [0, 0x23, 0xde, 0xea, 0xbe, 0xef]; diff --git a/libboard_zynq/src/lib.rs b/libboard_zynq/src/lib.rs index 729600a..e07920e 100644 --- a/libboard_zynq/src/lib.rs +++ b/libboard_zynq/src/lib.rs @@ -1,5 +1,8 @@ #![no_std] +/// Re-export so that dependents can always use the same version +pub use smoltcp; + pub mod slcr; pub mod clocks; pub mod uart; diff --git a/libcortex_a9/Cargo.toml b/libcortex_a9/Cargo.toml index 8657ed5..45f628c 100644 --- a/libcortex_a9/Cargo.toml +++ b/libcortex_a9/Cargo.toml @@ -12,9 +12,3 @@ default = ["target_zc706"] [dependencies] bit_field = "0.10" libregister = { path = "../libregister" } - -[dependencies.smoltcp] -git = "https://github.com/m-labs/smoltcp.git" -rev = "8eb01aca364aefe5f823d68d552d62c76c9be4a3" -features = ["ethernet", "proto-ipv4", "socket-tcp"] -default-features = false diff --git a/libsupport_zynq/Cargo.toml b/libsupport_zynq/Cargo.toml index 621858c..8921ac7 100644 --- a/libsupport_zynq/Cargo.toml +++ b/libsupport_zynq/Cargo.toml @@ -16,9 +16,3 @@ linked_list_allocator = { version = "0.8", default-features = false } libregister = { path = "../libregister" } libcortex_a9 = { path = "../libcortex_a9" } libboard_zynq = { path = "../libboard_zynq" } - -[dependencies.smoltcp] -git = "https://github.com/m-labs/smoltcp.git" -rev = "8eb01aca364aefe5f823d68d552d62c76c9be4a3" -features = ["ethernet", "proto-ipv4", "socket-tcp"] -default-features = false diff --git a/libsupport_zynq/src/lib.rs b/libsupport_zynq/src/lib.rs index a2051a3..c1e0a5e 100644 --- a/libsupport_zynq/src/lib.rs +++ b/libsupport_zynq/src/lib.rs @@ -11,4 +11,3 @@ pub mod boot; mod abort; mod panic; pub mod ram; -pub use smoltcp;