aboutsummaryrefslogtreecommitdiff
path: root/embassy-net
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2024-08-05 21:38:30 +0200
committerDario Nieuwenhuis <[email protected]>2024-08-07 14:58:20 +0200
commit59cb1531c91386cec8d7b209630b6b4d9eb7fd7c (patch)
tree9d5268c5fc9ea6014a69313eeff268b5d3aed256 /embassy-net
parent21edbd3c17837f9a3f196fe1bdda4a065805d12f (diff)
examples: ensure at least 3 sockets to avoid running out (DHCP, DNS, the user's)
Diffstat (limited to 'embassy-net')
-rw-r--r--embassy-net/src/lib.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/embassy-net/src/lib.rs b/embassy-net/src/lib.rs
index bd3de1f8c..56321cec9 100644
--- a/embassy-net/src/lib.rs
+++ b/embassy-net/src/lib.rs
@@ -415,8 +415,11 @@ impl<D: Driver> Stack<D> {
415 /// ## Example 415 /// ## Example
416 /// ```ignore 416 /// ```ignore
417 /// let config = embassy_net::Config::dhcpv4(Default::default()); 417 /// let config = embassy_net::Config::dhcpv4(Default::default());
418 ///// Init network stack 418 /// // Init network stack
419 /// static RESOURCES: StaticCell<embassy_net::StackResources<2>> = StaticCell::new(); 419 /// // NOTE: DHCP and DNS need one socket slot if enabled. This is why we're
420 /// // provisioning space for 3 sockets here: one for DHCP, one for DNS, and one for your code (e.g. TCP).
421 /// // If you use more sockets you must increase this. If you don't enable DHCP or DNS you can decrease it.
422 /// static RESOURCES: StaticCell<embassy_net::StackResources<3>> = StaticCell::new();
420 /// static STACK: StaticCell<embassy_net::Stack> = StaticCell::new(); 423 /// static STACK: StaticCell<embassy_net::Stack> = StaticCell::new();
421 /// let stack = &*STACK.init(embassy_net::Stack::new( 424 /// let stack = &*STACK.init(embassy_net::Stack::new(
422 /// device, 425 /// device,