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 /embassy-net/src | |
| parent | 6aa27d1a8e348a17dfdf0d994b26c95dfe7e23c5 (diff) | |
Update smoltcp, fix build issues with no ethernet.
Diffstat (limited to 'embassy-net/src')
| -rw-r--r-- | embassy-net/src/lib.rs | 4 | ||||
| -rw-r--r-- | embassy-net/src/stack.rs | 13 |
2 files changed, 8 insertions, 9 deletions
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; |
