pub fn task(
wifi: WIFI<'static>,
config: Config,
spawner: Spawner,
) -> Result<SpawnToken<impl Sized>, SpawnError>Expand description
Network task: brings up WiFi in station or AP mode and runs the
event loop.
Spawned from main after logging and the embassy scheduler are up.
Never returns — besides logging driver events (client join/leave,
station disconnects), the final loop holds the controller alive; in
station mode it also re-associates after [EventInfo::StationDisconnected].