diff options
| author | Dario Nieuwenhuis <[email protected]> | 2021-11-26 20:39:21 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2021-11-26 21:09:44 +0100 |
| commit | 524eed5db57c73fe06777283f5992bc514f8fc50 (patch) | |
| tree | d299ad704f8896c1dbc4f717352bcd04d586dde9 | |
| parent | 6aa27d1a8e348a17dfdf0d994b26c95dfe7e23c5 (diff) | |
Update smoltcp, fix build issues with no ethernet.
| -rw-r--r-- | embassy-net/Cargo.toml | 2 | ||||
| -rw-r--r-- | embassy-net/src/lib.rs | 4 | ||||
| -rw-r--r-- | embassy-net/src/stack.rs | 13 |
3 files changed, 9 insertions, 10 deletions
diff --git a/embassy-net/Cargo.toml b/embassy-net/Cargo.toml index a62bdde4d..ccfa2906e 100644 --- a/embassy-net/Cargo.toml +++ b/embassy-net/Cargo.toml | |||
| @@ -35,7 +35,7 @@ atomic-pool = "0.2.1" | |||
| 35 | 35 | ||
| 36 | [dependencies.smoltcp] | 36 | [dependencies.smoltcp] |
| 37 | git = "https://github.com/smoltcp-rs/smoltcp" | 37 | git = "https://github.com/smoltcp-rs/smoltcp" |
| 38 | rev = "453183f8a1d16daf2f6739b565d3dc7ac93b662e" | 38 | rev = "f5bc05cda8d83595c98688991f4b69fc963a88f6" |
| 39 | default-features = false | 39 | default-features = false |
| 40 | features = [ | 40 | features = [ |
| 41 | "proto-ipv4", | 41 | "proto-ipv4", |
diff --git a/embassy-net/src/lib.rs b/embassy-net/src/lib.rs index 307179556..c4229446f 100644 --- a/embassy-net/src/lib.rs +++ b/embassy-net/src/lib.rs | |||
| @@ -26,6 +26,8 @@ pub use tcp_socket::TcpSocket; | |||
| 26 | pub use smoltcp::phy::{DeviceCapabilities, Medium}; | 26 | pub use smoltcp::phy::{DeviceCapabilities, Medium}; |
| 27 | pub use smoltcp::time::Duration as SmolDuration; | 27 | pub use smoltcp::time::Duration as SmolDuration; |
| 28 | pub use smoltcp::time::Instant as SmolInstant; | 28 | pub use smoltcp::time::Instant as SmolInstant; |
| 29 | pub use smoltcp::wire::{HardwareAddress, IpAddress, IpCidr, Ipv4Address, Ipv4Cidr}; | 29 | #[cfg(feature = "medium-ethernet")] |
| 30 | pub use smoltcp::wire::{EthernetAddress, HardwareAddress}; | ||
| 31 | pub use smoltcp::wire::{IpAddress, IpCidr, Ipv4Address, Ipv4Cidr}; | ||
| 30 | pub type Interface = smoltcp::iface::Interface<'static, device::DeviceAdapter>; | 32 | pub type Interface = smoltcp::iface::Interface<'static, device::DeviceAdapter>; |
| 31 | pub use smoltcp::{Error, Result}; | 33 | pub use smoltcp::{Error, Result}; |
diff --git a/embassy-net/src/stack.rs b/embassy-net/src/stack.rs index 610260a8e..f1f92e8ed 100644 --- a/embassy-net/src/stack.rs +++ b/embassy-net/src/stack.rs | |||
| @@ -8,18 +8,15 @@ use embassy::waitqueue::WakerRegistration; | |||
| 8 | use futures::pin_mut; | 8 | use futures::pin_mut; |
| 9 | use smoltcp::iface::InterfaceBuilder; | 9 | use smoltcp::iface::InterfaceBuilder; |
| 10 | use smoltcp::iface::SocketStorage; | 10 | use smoltcp::iface::SocketStorage; |
| 11 | use smoltcp::time::Instant as SmolInstant; | ||
| 12 | use smoltcp::wire::{IpCidr, Ipv4Address, Ipv4Cidr}; | ||
| 13 | |||
| 11 | #[cfg(feature = "medium-ethernet")] | 14 | #[cfg(feature = "medium-ethernet")] |
| 12 | use smoltcp::iface::{Neighbor, NeighborCache, Route, Routes}; | 15 | use smoltcp::iface::{Neighbor, NeighborCache, Route, Routes}; |
| 13 | #[cfg(feature = "medium-ethernet")] | 16 | #[cfg(feature = "medium-ethernet")] |
| 14 | use smoltcp::phy::Device as _; | 17 | use smoltcp::phy::{Device as _, Medium}; |
| 15 | #[cfg(feature = "medium-ethernet")] | ||
| 16 | use smoltcp::phy::Medium; | ||
| 17 | use smoltcp::time::Instant as SmolInstant; | ||
| 18 | #[cfg(feature = "medium-ethernet")] | ||
| 19 | use smoltcp::wire::EthernetAddress; | ||
| 20 | #[cfg(feature = "medium-ethernet")] | 18 | #[cfg(feature = "medium-ethernet")] |
| 21 | use smoltcp::wire::IpAddress; | 19 | use smoltcp::wire::{EthernetAddress, HardwareAddress, IpAddress}; |
| 22 | use smoltcp::wire::{HardwareAddress, IpCidr, Ipv4Address, Ipv4Cidr}; | ||
| 23 | 20 | ||
| 24 | use crate::config::Configurator; | 21 | use crate::config::Configurator; |
| 25 | use crate::config::Event; | 22 | use crate::config::Event; |
