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;