wifi task needs to be spawned immediately, otherwise ioctls are just stuck (duh). fix #44

This commit is contained in:
kbleeke 2023-03-22 11:33:55 +01:00
parent 33cbc22236
commit 369f205962

View File

@ -77,6 +77,7 @@ async fn main(spawner: Spawner) {
let state = singleton!(cyw43::State::new()); let state = singleton!(cyw43::State::new());
let (net_device, mut control, runner) = cyw43::new(state, pwr, spi, fw).await; let (net_device, mut control, runner) = cyw43::new(state, pwr, spi, fw).await;
unwrap!(spawner.spawn(wifi_task(runner)));
control.init(clm).await; control.init(clm).await;
control control
@ -101,7 +102,6 @@ async fn main(spawner: Spawner) {
seed seed
)); ));
unwrap!(spawner.spawn(wifi_task(runner)));
unwrap!(spawner.spawn(net_task(stack))); unwrap!(spawner.spawn(net_task(stack)));
//control.join_open(env!("WIFI_NETWORK")).await; //control.join_open(env!("WIFI_NETWORK")).await;