Skip to content

Commit

Permalink
Shrink several buffers to avoid stack overflows
Browse files Browse the repository at this point in the history
  • Loading branch information
jannic committed Sep 6, 2022
1 parent 322b517 commit 12b9c4c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion boards/rp-pico-w/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ panic-probe = { version = "0.3", features = ["print-defmt"] }
cyw43 = { version = "0.1.0", git = "https://github.com/jannic-dev-forks/cyw43", branch = "stable", features=["defmt"] }
embassy-executor = { version = "0.1.0", git = "https://github.com/embassy-rs/embassy.git", features=["integrated-timers"], rev = "1fb6bfbec943742fb25e70391278bf4a4b638772" }
embassy-futures = { version = "0.1.0" }
embassy-net = { version = "0.1.0", git = "https://github.com/embassy-rs/embassy.git", rev = "1fb6bfbec943742fb25e70391278bf4a4b638772", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "pool-16"] }
embassy-net = { version = "0.1.0", git = "https://github.com/embassy-rs/embassy.git", rev = "1fb6bfbec943742fb25e70391278bf4a4b638772", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "pool-4"] }
defmt-rtt = "0.3"

[features]
Expand Down
6 changes: 3 additions & 3 deletions boards/rp-pico-w/examples/pico_w_blinky.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ fn main() -> ! {
// Safety: function never returns, executor is never dropped
let executor: &'static mut Executor = unsafe { forever_mut(&mut executor) };

let task_pool: TaskPool<_, 10> = TaskPool::new();
let task_pool: TaskPool<_, 1> = TaskPool::new();
let task_pool = unsafe { forever(&task_pool) };

let state = cyw43::State::new();
Expand Down Expand Up @@ -140,7 +140,7 @@ async fn run(spawner: Spawner, pins: rp_pico_w::Pins, state: &'static cyw43::Sta
info!("create cyw43 driver");
let (mut control, runner) = cyw43::new(state, pwr, spi, fw).await;

let task_pool: TaskPool<_, 10> = TaskPool::new();
let task_pool: TaskPool<_, 1> = TaskPool::new();
let task_pool = unsafe { forever(&task_pool) };
let spawn_token = task_pool.spawn(|| runner.run());
spawner.spawn(spawn_token).unwrap();
Expand Down Expand Up @@ -182,7 +182,7 @@ async fn run(spawner: Spawner, pins: rp_pico_w::Pins, state: &'static cyw43::Sta
let stack = Stack::new(net_device, config, stack_resources, seed);
let stack = unsafe { forever(&stack) };

let task_pool: TaskPool<_, 10> = TaskPool::new();
let task_pool: TaskPool<_, 1> = TaskPool::new();
let task_pool = unsafe { forever(&task_pool) };
let spawn_token = task_pool.spawn(|| stack.run());
spawner.spawn(spawn_token).unwrap();
Expand Down

0 comments on commit 12b9c4c

Please sign in to comment.