diff options
| author | Ruben De Smet <[email protected]> | 2023-07-28 14:52:03 +0200 |
|---|---|---|
| committer | Ruben De Smet <[email protected]> | 2023-07-28 15:11:24 +0200 |
| commit | f81ee103bf946bc42355474d5e125d1e5ab08da8 (patch) | |
| tree | 5d492d091a09cf9140045909f4b94bb812f100f3 | |
| parent | b1242226494bfdeed13c2f80c5df239687a398ac (diff) | |
Allow ethernet and 802.15.4 to coexist
Co-authored-by: Thibaut Vandervelden <[email protected]>
| -rw-r--r-- | embassy-net/src/lib.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/embassy-net/src/lib.rs b/embassy-net/src/lib.rs index 81c751a2c..3f9150168 100644 --- a/embassy-net/src/lib.rs +++ b/embassy-net/src/lib.rs | |||
| @@ -32,12 +32,14 @@ pub use smoltcp::iface::MulticastError; | |||
| 32 | use smoltcp::iface::{Interface, SocketHandle, SocketSet, SocketStorage}; | 32 | use smoltcp::iface::{Interface, SocketHandle, SocketSet, SocketStorage}; |
| 33 | #[cfg(feature = "dhcpv4")] | 33 | #[cfg(feature = "dhcpv4")] |
| 34 | use smoltcp::socket::dhcpv4::{self, RetryConfig}; | 34 | use smoltcp::socket::dhcpv4::{self, RetryConfig}; |
| 35 | #[cfg(feature = "medium-ethernet")] | ||
| 36 | pub use smoltcp::wire::EthernetAddress; | ||
| 37 | #[cfg(any(feature = "medium-ethernet", feature = "medium-ieee802154"))] | ||
| 38 | pub use smoltcp::wire::HardwareAddress; | ||
| 35 | #[cfg(feature = "udp")] | 39 | #[cfg(feature = "udp")] |
| 36 | pub use smoltcp::wire::IpListenEndpoint; | 40 | pub use smoltcp::wire::IpListenEndpoint; |
| 37 | #[cfg(feature = "medium-ethernet")] | ||
| 38 | pub use smoltcp::wire::{EthernetAddress, HardwareAddress}; | ||
| 39 | #[cfg(feature = "medium-ieee802154")] | 41 | #[cfg(feature = "medium-ieee802154")] |
| 40 | pub use smoltcp::wire::{HardwareAddress, Ieee802154Address}; | 42 | pub use smoltcp::wire::{Ieee802154Address, Ieee802154Frame}; |
| 41 | pub use smoltcp::wire::{IpAddress, IpCidr, IpEndpoint}; | 43 | pub use smoltcp::wire::{IpAddress, IpCidr, IpEndpoint}; |
| 42 | #[cfg(feature = "proto-ipv4")] | 44 | #[cfg(feature = "proto-ipv4")] |
| 43 | pub use smoltcp::wire::{Ipv4Address, Ipv4Cidr}; | 45 | pub use smoltcp::wire::{Ipv4Address, Ipv4Cidr}; |
| @@ -583,7 +585,7 @@ impl SocketStack { | |||
| 583 | impl<D: Driver + 'static> Inner<D> { | 585 | impl<D: Driver + 'static> Inner<D> { |
| 584 | #[cfg(feature = "proto-ipv4")] | 586 | #[cfg(feature = "proto-ipv4")] |
| 585 | fn apply_config_v4(&mut self, s: &mut SocketStack, config: StaticConfigV4) { | 587 | fn apply_config_v4(&mut self, s: &mut SocketStack, config: StaticConfigV4) { |
| 586 | #[cfg(feature = "medium-ethernet")] | 588 | #[cfg(any(feature = "medium-ethernet", feature = "medium-ieee802154"))] |
| 587 | let medium = self.device.capabilities().medium; | 589 | let medium = self.device.capabilities().medium; |
| 588 | 590 | ||
| 589 | debug!("Acquired IP configuration:"); | 591 | debug!("Acquired IP configuration:"); |
