aboutsummaryrefslogtreecommitdiff
path: root/embassy-net/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-net/src/lib.rs')
-rw-r--r--embassy-net/src/lib.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/embassy-net/src/lib.rs b/embassy-net/src/lib.rs
index bf1468642..2cef2232c 100644
--- a/embassy-net/src/lib.rs
+++ b/embassy-net/src/lib.rs
@@ -5,6 +5,9 @@
5#![warn(missing_docs)] 5#![warn(missing_docs)]
6#![doc = include_str!("../README.md")] 6#![doc = include_str!("../README.md")]
7 7
8//! ## Feature flags
9#![doc = document_features::document_features!(feature_label = r#"<span class="stab portability"><code>{feature}</code></span>"#)]
10
8#[cfg(not(any(feature = "proto-ipv4", feature = "proto-ipv6")))] 11#[cfg(not(any(feature = "proto-ipv4", feature = "proto-ipv6")))]
9compile_error!("You must enable at least one of the following features: proto-ipv4, proto-ipv6"); 12compile_error!("You must enable at least one of the following features: proto-ipv4, proto-ipv6");
10 13
@@ -411,10 +414,12 @@ impl<D: Driver> Stack<D> {
411 /// ```ignore 414 /// ```ignore
412 /// let config = embassy_net::Config::dhcpv4(Default::default()); 415 /// let config = embassy_net::Config::dhcpv4(Default::default());
413 ///// Init network stack 416 ///// Init network stack
414 /// let stack = &*make_static!(embassy_net::Stack::new( 417 /// static RESOURCES: StaticCell<embassy_net::StackResources<2> = StaticCell::new();
418 /// static STACK: StaticCell<embassy_net::Stack> = StaticCell::new();
419 /// let stack = &*STACK.init(embassy_net::Stack::new(
415 /// device, 420 /// device,
416 /// config, 421 /// config,
417 /// make_static!(embassy_net::StackResources::<2>::new()), 422 /// RESOURCES.init(embassy_net::StackResources::new()),
418 /// seed 423 /// seed
419 /// )); 424 /// ));
420 /// // Launch network task that runs `stack.run().await` 425 /// // Launch network task that runs `stack.run().await`