diff options
| author | Dario Nieuwenhuis <[email protected]> | 2024-08-05 21:38:30 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2024-08-07 14:58:20 +0200 |
| commit | 59cb1531c91386cec8d7b209630b6b4d9eb7fd7c (patch) | |
| tree | 9d5268c5fc9ea6014a69313eeff268b5d3aed256 /examples/stm32l5/src | |
| parent | 21edbd3c17837f9a3f196fe1bdda4a065805d12f (diff) | |
examples: ensure at least 3 sockets to avoid running out (DHCP, DNS, the user's)
Diffstat (limited to 'examples/stm32l5/src')
| -rw-r--r-- | examples/stm32l5/src/bin/usb_ethernet.rs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/examples/stm32l5/src/bin/usb_ethernet.rs b/examples/stm32l5/src/bin/usb_ethernet.rs index 7f73fd677..d02bac91d 100644 --- a/examples/stm32l5/src/bin/usb_ethernet.rs +++ b/examples/stm32l5/src/bin/usb_ethernet.rs | |||
| @@ -122,13 +122,8 @@ async fn main(spawner: Spawner) { | |||
| 122 | 122 | ||
| 123 | // Init network stack | 123 | // Init network stack |
| 124 | static STACK: StaticCell<Stack<Device<'static, MTU>>> = StaticCell::new(); | 124 | static STACK: StaticCell<Stack<Device<'static, MTU>>> = StaticCell::new(); |
| 125 | static RESOURCES: StaticCell<StackResources<2>> = StaticCell::new(); | 125 | static RESOURCES: StaticCell<StackResources<3>> = StaticCell::new(); |
| 126 | let stack = &*STACK.init(Stack::new( | 126 | let stack = &*STACK.init(Stack::new(device, config, RESOURCES.init(StackResources::new()), seed)); |
| 127 | device, | ||
| 128 | config, | ||
| 129 | RESOURCES.init(StackResources::<2>::new()), | ||
| 130 | seed, | ||
| 131 | )); | ||
| 132 | 127 | ||
| 133 | unwrap!(spawner.spawn(net_task(stack))); | 128 | unwrap!(spawner.spawn(net_task(stack))); |
| 134 | 129 | ||
