diff options
author | Jacob Rosenthal <jacobrosenthal@gmail.com> | 2020-11-09 19:44:18 +0100 |
---|---|---|
committer | Dario Nieuwenhuis <dirbaio@dirbaio.net> | 2020-11-09 19:44:18 +0100 |
commit | 7aab09e30071cd10fea784b0d5aa1aa49ae75815 (patch) | |
tree | d88c58951a4661a1c2f141a7224bb7084cbc0a80 /examples/src/bin/ble_bas_peripheral.rs | |
parent | 6a33fc8bb70a248c904c16f9b4eb594be7eb9815 (diff) | |
download | nrf-softdevice-7aab09e30071cd10fea784b0d5aa1aa49ae75815.zip |
AATT MTU and data length negotiations
Diffstat (limited to 'examples/src/bin/ble_bas_peripheral.rs')
-rw-r--r-- | examples/src/bin/ble_bas_peripheral.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/src/bin/ble_bas_peripheral.rs b/examples/src/bin/ble_bas_peripheral.rs index f81cc53..eb755f2 100644 --- a/examples/src/bin/ble_bas_peripheral.rs +++ b/examples/src/bin/ble_bas_peripheral.rs @@ -30,7 +30,7 @@ struct BatteryService { } #[task] -async fn bluetooth_task(sd: &'static Softdevice) { +async fn bluetooth_task(sd: &'static Softdevice, config: peripheral::Config) { let server: BatteryService = gatt_server::register(sd).dewrap(); #[rustfmt::skip] let adv_data = &[ @@ -50,6 +50,7 @@ async fn bluetooth_task(sd: &'static Softdevice) { adv_data, scan_data, }, + config, ) .await .dewrap(); @@ -122,7 +123,9 @@ fn main() -> ! { let executor = EXECUTOR.put(Executor::new(cortex_m::asm::sev)); executor.spawn(softdevice_task(sd)).dewrap(); - executor.spawn(bluetooth_task(sd)).dewrap(); + executor + .spawn(bluetooth_task(sd, peripheral::Config::default())) + .dewrap(); loop { executor.run(); |