diff options
author | Dario Nieuwenhuis <dirbaio@dirbaio.net> | 2021-05-10 00:24:24 +0200 |
---|---|---|
committer | Dario Nieuwenhuis <dirbaio@dirbaio.net> | 2021-05-10 00:24:24 +0200 |
commit | 8201255a9d6dde4b29a5a539a1d6aeefcbd467df (patch) | |
tree | 3366939a2c4b121091eb1abb3605f82e750b5c2f /examples/src/bin/ble_l2cap_central.rs | |
parent | 7e0bf163f35dca8a1daba11429035a7780f5f4b7 (diff) | |
download | nrf-softdevice-8201255a9d6dde4b29a5a539a1d6aeefcbd467df.zip |
Update embassy
Diffstat (limited to 'examples/src/bin/ble_l2cap_central.rs')
-rw-r--r-- | examples/src/bin/ble_l2cap_central.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/src/bin/ble_l2cap_central.rs b/examples/src/bin/ble_l2cap_central.rs index 179fff7..1bb4e3f 100644 --- a/examples/src/bin/ble_l2cap_central.rs +++ b/examples/src/bin/ble_l2cap_central.rs @@ -4,6 +4,7 @@ #![feature(min_type_alias_impl_trait)] #![feature(impl_trait_in_bindings)] #![feature(alloc_error_handler)] +#![allow(incomplete_features)] extern crate alloc; #[path = "../example_common.rs"] @@ -16,7 +17,7 @@ use core::slice; use cortex_m_rt::entry; use defmt::info; use defmt::*; -use embassy::executor::{task, Executor}; +use embassy::executor::Executor; use embassy::util::Forever; use nrf_softdevice::ble::l2cap::Packet as _; @@ -28,12 +29,12 @@ static EXECUTOR: Forever<Executor> = Forever::new(); const PSM: u16 = 0x2349; -#[task] +#[embassy::task] async fn softdevice_task(sd: &'static Softdevice) { sd.run().await; } -#[task] +#[embassy::task] async fn ble_central_task(sd: &'static Softdevice) { info!("Scanning for peer..."); @@ -173,8 +174,7 @@ fn main() -> ! { ..Default::default() }; - let (sdp, _p) = take_peripherals(); - let sd = Softdevice::enable(sdp, &config); + let sd = Softdevice::enable(&config); let executor = EXECUTOR.put(Executor::new()); executor.run(|spawner| { |