From ca1d4179a792d4a33b4f2b97b33002759fd28a21 Mon Sep 17 00:00:00 2001 From: xoviat Date: Tue, 18 Jul 2023 20:52:03 -0500 Subject: wpan: implement initial event loop --- examples/stm32wb/Cargo.toml | 6 +++++- examples/stm32wb/src/bin/mac_ffd_net.rs | 10 +++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/stm32wb/Cargo.toml b/examples/stm32wb/Cargo.toml index 8585b99f9..7c0b83e65 100644 --- a/examples/stm32wb/Cargo.toml +++ b/examples/stm32wb/Cargo.toml @@ -21,7 +21,7 @@ embedded-hal = "0.2.6" panic-probe = { version = "0.3", features = ["print-defmt"] } futures = { version = "0.3.17", default-features = false, features = ["async-await"] } heapless = { version = "0.7.5", default-features = false } - +static_cell = { version = "1.1", features = ["nightly"]} [features] default = ["ble", "mac"] @@ -40,6 +40,10 @@ required-features = ["mac"] name = "mac_ffd" required-features = ["mac"] +[[bin]] +name = "mac_ffd_net" +required-features = ["mac"] + [[bin]] name = "eddystone_beacon" required-features = ["ble"] diff --git a/examples/stm32wb/src/bin/mac_ffd_net.rs b/examples/stm32wb/src/bin/mac_ffd_net.rs index 6072f418c..7b8c4b9dc 100644 --- a/examples/stm32wb/src/bin/mac_ffd_net.rs +++ b/examples/stm32wb/src/bin/mac_ffd_net.rs @@ -172,7 +172,15 @@ async fn main(spawner: Spawner) { defmt::info!("{:#x}", evt.mac_event()); } - let runner = make_static!(Runner::new(mbox.mac_subsystem)); + let tx_queue = [ + make_static!([0u8; 127]), + make_static!([0u8; 127]), + make_static!([0u8; 127]), + make_static!([0u8; 127]), + make_static!([0u8; 127]), + ]; + + let runner = make_static!(Runner::new(mbox.mac_subsystem, tx_queue)); spawner.spawn(run_mac(runner)).unwrap(); -- cgit