diff options
| author | Dario Nieuwenhuis <[email protected]> | 2021-05-28 23:02:38 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2021-05-28 23:07:27 +0200 |
| commit | 4ebc1138520f7a353a3fba060936bc548e09bdbd (patch) | |
| tree | f6c3f112871e08a0cbbc750e14fa2218fc4dfd51 /embassy-net/src/lib.rs | |
| parent | 6898ec73182618f72c05c44f59f61b38660474c1 (diff) | |
| parent | b4c11695cf43dcdd0aa7a35798a15c923c7844c4 (diff) | |
Merge remote-tracking branch 'embassy-net/main'
Diffstat (limited to 'embassy-net/src/lib.rs')
| -rw-r--r-- | embassy-net/src/lib.rs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/embassy-net/src/lib.rs b/embassy-net/src/lib.rs new file mode 100644 index 000000000..88dcf0aa5 --- /dev/null +++ b/embassy-net/src/lib.rs | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | #![cfg_attr(not(feature = "std"), no_std)] | ||
| 2 | |||
| 3 | // This mod MUST go first, so that the others see its macros. | ||
| 4 | pub(crate) mod fmt; | ||
| 5 | |||
| 6 | mod config; | ||
| 7 | mod device; | ||
| 8 | mod packet_pool; | ||
| 9 | mod stack; | ||
| 10 | |||
| 11 | #[cfg(feature = "dhcpv4")] | ||
| 12 | pub use config::DhcpConfigurator; | ||
| 13 | pub use config::{Config, Configurator, Event as ConfigEvent, StaticConfigurator}; | ||
| 14 | |||
| 15 | pub use device::{Device, LinkState}; | ||
| 16 | pub use packet_pool::{Packet, PacketBox, PacketBoxExt, PacketBuf}; | ||
| 17 | pub use stack::{init, is_config_up, is_init, is_link_up, run}; | ||
| 18 | |||
| 19 | #[cfg(feature = "tcp")] | ||
| 20 | mod tcp_socket; | ||
| 21 | #[cfg(feature = "tcp")] | ||
| 22 | pub use tcp_socket::TcpSocket; | ||
| 23 | |||
| 24 | // smoltcp reexports | ||
| 25 | pub use smoltcp::phy::{DeviceCapabilities, Medium}; | ||
| 26 | pub use smoltcp::time::Duration as SmolDuration; | ||
| 27 | pub use smoltcp::time::Instant as SmolInstant; | ||
| 28 | pub use smoltcp::wire::{IpAddress, IpCidr, Ipv4Address, Ipv4Cidr}; | ||
| 29 | pub type Interface = smoltcp::iface::Interface<'static, device::DeviceAdapter>; | ||
| 30 | pub type SocketSet = smoltcp::socket::SocketSet<'static>; | ||
| 31 | pub use smoltcp::{Error, Result}; | ||
