Skip to content

Commit

Permalink
Examples
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoernQ committed Feb 11, 2025
1 parent 2ff0391 commit 3f58873
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions examples/src/bin/wifi_embassy_access_point_with_sta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ async fn main(spawner: Spawner) -> ! {
controller.set_configuration(&client_config).unwrap();

spawner.spawn(connection(controller)).ok();
spawner.spawn(ap_task(ap_runner)).ok();
spawner.spawn(sta_task(sta_runner)).ok();
spawner.spawn(net_task(ap_runner)).ok();
spawner.spawn(net_task(sta_runner)).ok();

loop {
if sta_stack.is_link_up() {
Expand Down Expand Up @@ -328,12 +328,7 @@ async fn connection(mut controller: WifiController<'static>) {
}
}

#[embassy_executor::task]
async fn ap_task(mut runner: Runner<'static, WifiDevice<'static>>) {
runner.run().await
}

#[embassy_executor::task]
async fn sta_task(mut runner: Runner<'static, WifiDevice<'static>>) {
#[embassy_executor::task(pool_size = 2)]
async fn net_task(mut runner: Runner<'static, WifiDevice<'static>>) {
runner.run().await
}

0 comments on commit 3f58873

Please sign in to comment.