net: allocate space for 2 sockets, needed for dhcp.
This commit is contained in:
parent
570ffab670
commit
fe15a7beee
@ -115,7 +115,7 @@ async fn main(spawner: Spawner) {
|
|||||||
let seed = u64::from_le_bytes(seed);
|
let seed = u64::from_le_bytes(seed);
|
||||||
|
|
||||||
// Init network stack
|
// Init network stack
|
||||||
let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<1>::new()), seed));
|
let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<2>::new()), seed));
|
||||||
|
|
||||||
unwrap!(spawner.spawn(net_task(stack)));
|
unwrap!(spawner.spawn(net_task(stack)));
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ async fn main(spawner: Spawner) {
|
|||||||
let seed = 1234; // guaranteed random, chosen by a fair dice roll
|
let seed = 1234; // guaranteed random, chosen by a fair dice roll
|
||||||
|
|
||||||
// Init network stack
|
// Init network stack
|
||||||
let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<1>::new()), seed));
|
let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<2>::new()), seed));
|
||||||
|
|
||||||
unwrap!(spawner.spawn(net_task(stack)));
|
unwrap!(spawner.spawn(net_task(stack)));
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ async fn main_task(spawner: Spawner) {
|
|||||||
let seed = u64::from_le_bytes(seed);
|
let seed = u64::from_le_bytes(seed);
|
||||||
|
|
||||||
// Init network stack
|
// Init network stack
|
||||||
let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<1>::new()), seed));
|
let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<2>::new()), seed));
|
||||||
|
|
||||||
// Launch network task
|
// Launch network task
|
||||||
spawner.spawn(net_task(stack)).unwrap();
|
spawner.spawn(net_task(stack)).unwrap();
|
||||||
|
@ -62,7 +62,7 @@ async fn main_task(spawner: Spawner) {
|
|||||||
let seed = u64::from_le_bytes(seed);
|
let seed = u64::from_le_bytes(seed);
|
||||||
|
|
||||||
// Init network stack
|
// Init network stack
|
||||||
let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<1>::new()), seed));
|
let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<2>::new()), seed));
|
||||||
|
|
||||||
// Launch network task
|
// Launch network task
|
||||||
spawner.spawn(net_task(stack)).unwrap();
|
spawner.spawn(net_task(stack)).unwrap();
|
||||||
|
@ -77,7 +77,7 @@ async fn main(spawner: Spawner) -> ! {
|
|||||||
//});
|
//});
|
||||||
|
|
||||||
// Init network stack
|
// Init network stack
|
||||||
let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<1>::new()), seed));
|
let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<2>::new()), seed));
|
||||||
|
|
||||||
// Launch network task
|
// Launch network task
|
||||||
unwrap!(spawner.spawn(net_task(&stack)));
|
unwrap!(spawner.spawn(net_task(&stack)));
|
||||||
|
@ -78,7 +78,7 @@ async fn main(spawner: Spawner) -> ! {
|
|||||||
//});
|
//});
|
||||||
|
|
||||||
// Init network stack
|
// Init network stack
|
||||||
let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<1>::new()), seed));
|
let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<2>::new()), seed));
|
||||||
|
|
||||||
// Launch network task
|
// Launch network task
|
||||||
unwrap!(spawner.spawn(net_task(&stack)));
|
unwrap!(spawner.spawn(net_task(&stack)));
|
||||||
|
@ -79,7 +79,7 @@ async fn main(spawner: Spawner) -> ! {
|
|||||||
//});
|
//});
|
||||||
|
|
||||||
// Init network stack
|
// Init network stack
|
||||||
let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<1>::new()), seed));
|
let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<2>::new()), seed));
|
||||||
|
|
||||||
// Launch network task
|
// Launch network task
|
||||||
unwrap!(spawner.spawn(net_task(&stack)));
|
unwrap!(spawner.spawn(net_task(&stack)));
|
||||||
|
@ -110,7 +110,7 @@ async fn main(spawner: Spawner) {
|
|||||||
let seed = rng.next_u64();
|
let seed = rng.next_u64();
|
||||||
|
|
||||||
// Init network stack
|
// Init network stack
|
||||||
let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<1>::new()), seed));
|
let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<2>::new()), seed));
|
||||||
|
|
||||||
unwrap!(spawner.spawn(net_task(stack)));
|
unwrap!(spawner.spawn(net_task(stack)));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user