Update smoltcp, fix build issues with no ethernet.

This commit is contained in:
Dario Nieuwenhuis 2021-11-26 20:39:21 +01:00
parent 6aa27d1a8e
commit 524eed5db5
3 changed files with 9 additions and 10 deletions

View file

@ -35,7 +35,7 @@ atomic-pool = "0.2.1"
[dependencies.smoltcp]
git = "https://github.com/smoltcp-rs/smoltcp"
rev = "453183f8a1d16daf2f6739b565d3dc7ac93b662e"
rev = "f5bc05cda8d83595c98688991f4b69fc963a88f6"
default-features = false
features = [
"proto-ipv4",

View file

@ -26,6 +26,8 @@ pub use tcp_socket::TcpSocket;
pub use smoltcp::phy::{DeviceCapabilities, Medium};
pub use smoltcp::time::Duration as SmolDuration;
pub use smoltcp::time::Instant as SmolInstant;
pub use smoltcp::wire::{HardwareAddress, IpAddress, IpCidr, Ipv4Address, Ipv4Cidr};
#[cfg(feature = "medium-ethernet")]
pub use smoltcp::wire::{EthernetAddress, HardwareAddress};
pub use smoltcp::wire::{IpAddress, IpCidr, Ipv4Address, Ipv4Cidr};
pub type Interface = smoltcp::iface::Interface<'static, device::DeviceAdapter>;
pub use smoltcp::{Error, Result};

View file

@ -8,18 +8,15 @@ use embassy::waitqueue::WakerRegistration;
use futures::pin_mut;
use smoltcp::iface::InterfaceBuilder;
use smoltcp::iface::SocketStorage;
use smoltcp::time::Instant as SmolInstant;
use smoltcp::wire::{IpCidr, Ipv4Address, Ipv4Cidr};
#[cfg(feature = "medium-ethernet")]
use smoltcp::iface::{Neighbor, NeighborCache, Route, Routes};
#[cfg(feature = "medium-ethernet")]
use smoltcp::phy::Device as _;
use smoltcp::phy::{Device as _, Medium};
#[cfg(feature = "medium-ethernet")]
use smoltcp::phy::Medium;
use smoltcp::time::Instant as SmolInstant;
#[cfg(feature = "medium-ethernet")]
use smoltcp::wire::EthernetAddress;
#[cfg(feature = "medium-ethernet")]
use smoltcp::wire::IpAddress;
use smoltcp::wire::{HardwareAddress, IpCidr, Ipv4Address, Ipv4Cidr};
use smoltcp::wire::{EthernetAddress, HardwareAddress, IpAddress};
use crate::config::Configurator;
use crate::config::Event;