diff options
| author | xoviat <[email protected]> | 2023-07-18 20:52:03 -0500 |
|---|---|---|
| committer | xoviat <[email protected]> | 2023-07-18 20:52:03 -0500 |
| commit | ca1d4179a792d4a33b4f2b97b33002759fd28a21 (patch) | |
| tree | 9df5aa97c8a61b8b4f1c777cef6d871d5e51fe7c /examples | |
| parent | 890d113b855dc11be75a9716401c7703f4ce48e1 (diff) | |
wpan: implement initial event loop
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/stm32wb/Cargo.toml | 6 | ||||
| -rw-r--r-- | examples/stm32wb/src/bin/mac_ffd_net.rs | 10 |
2 files changed, 14 insertions, 2 deletions
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" | |||
| 21 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 21 | panic-probe = { version = "0.3", features = ["print-defmt"] } |
| 22 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | 22 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } |
| 23 | heapless = { version = "0.7.5", default-features = false } | 23 | heapless = { version = "0.7.5", default-features = false } |
| 24 | 24 | static_cell = { version = "1.1", features = ["nightly"]} | |
| 25 | 25 | ||
| 26 | [features] | 26 | [features] |
| 27 | default = ["ble", "mac"] | 27 | default = ["ble", "mac"] |
| @@ -41,6 +41,10 @@ name = "mac_ffd" | |||
| 41 | required-features = ["mac"] | 41 | required-features = ["mac"] |
| 42 | 42 | ||
| 43 | [[bin]] | 43 | [[bin]] |
| 44 | name = "mac_ffd_net" | ||
| 45 | required-features = ["mac"] | ||
| 46 | |||
| 47 | [[bin]] | ||
| 44 | name = "eddystone_beacon" | 48 | name = "eddystone_beacon" |
| 45 | required-features = ["ble"] | 49 | required-features = ["ble"] |
| 46 | 50 | ||
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) { | |||
| 172 | defmt::info!("{:#x}", evt.mac_event()); | 172 | defmt::info!("{:#x}", evt.mac_event()); |
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | let runner = make_static!(Runner::new(mbox.mac_subsystem)); | 175 | let tx_queue = [ |
| 176 | make_static!([0u8; 127]), | ||
| 177 | make_static!([0u8; 127]), | ||
| 178 | make_static!([0u8; 127]), | ||
| 179 | make_static!([0u8; 127]), | ||
| 180 | make_static!([0u8; 127]), | ||
| 181 | ]; | ||
| 182 | |||
| 183 | let runner = make_static!(Runner::new(mbox.mac_subsystem, tx_queue)); | ||
| 176 | 184 | ||
| 177 | spawner.spawn(run_mac(runner)).unwrap(); | 185 | spawner.spawn(run_mac(runner)).unwrap(); |
| 178 | 186 | ||
