Modify an example
This commit is contained in:
parent
2809e926cf
commit
12872ce49b
@ -7,7 +7,11 @@ use embassy_executor::Spawner;
|
||||
use embassy_time::{Duration, Timer};
|
||||
use {defmt_rtt as _, panic_probe as _};
|
||||
|
||||
#[embassy_executor::task(pool_size = 2)]
|
||||
mod config {
|
||||
pub const MY_TASK_POOL_SIZE: usize = 2;
|
||||
}
|
||||
|
||||
#[embassy_executor::task(pool_size = config::MY_TASK_POOL_SIZE)]
|
||||
async fn my_task(spawner: Spawner, n: u32) {
|
||||
Timer::after(Duration::from_secs(1)).await;
|
||||
info!("Spawning self! {}", n);
|
||||
|
Loading…
Reference in New Issue
Block a user