summaryrefslogtreecommitdiff
path: root/examples/src/bin/ble_bas_central.rs
diff options
context:
space:
mode:
authorJacob Rosenthal <jacobrosenthal@gmail.com>2020-11-09 19:44:18 +0100
committerDario Nieuwenhuis <dirbaio@dirbaio.net>2020-11-09 19:44:18 +0100
commit7aab09e30071cd10fea784b0d5aa1aa49ae75815 (patch)
treed88c58951a4661a1c2f141a7224bb7084cbc0a80 /examples/src/bin/ble_bas_central.rs
parent6a33fc8bb70a248c904c16f9b4eb594be7eb9815 (diff)
downloadnrf-softdevice-7aab09e30071cd10fea784b0d5aa1aa49ae75815.zip
AATT MTU and data length negotiations
Diffstat (limited to 'examples/src/bin/ble_bas_central.rs')
-rw-r--r--examples/src/bin/ble_bas_central.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/src/bin/ble_bas_central.rs b/examples/src/bin/ble_bas_central.rs
index c1cbe7a..9af9e59 100644
--- a/examples/src/bin/ble_bas_central.rs
+++ b/examples/src/bin/ble_bas_central.rs
@@ -77,12 +77,12 @@ impl gatt_client::Client for BatteryServiceClient {
}
#[task]
-async fn ble_central_task(sd: &'static Softdevice) {
+async fn ble_central_task(sd: &'static Softdevice, config: central::Config) {
let addrs = &[Address::new_random_static([
0x59, 0xf9, 0xb1, 0x9c, 0x01, 0xf5,
])];
- let conn = central::connect(sd, addrs)
+ let conn = central::connect(sd, addrs, config)
.await
.dexpect(intern!("connect"));
info!("connected");
@@ -161,7 +161,9 @@ fn main() -> ! {
let executor = EXECUTOR.put(Executor::new(cortex_m::asm::sev));
executor.spawn(softdevice_task(sd)).dewrap();
- executor.spawn(ble_central_task(sd)).dewrap();
+ executor
+ .spawn(ble_central_task(sd, central::Config::default()))
+ .dewrap();
loop {
executor.run();