summaryrefslogtreecommitdiff
path: root/examples/src/bin/ble_bas_central.rs
diff options
context:
space:
mode:
authorDario Nieuwenhuis <dirbaio@dirbaio.net>2020-12-03 20:42:43 +0100
committerDario Nieuwenhuis <dirbaio@dirbaio.net>2020-12-03 20:42:43 +0100
commit1fd0b6290fe23dee4988e370926d6cc00765fdb7 (patch)
tree8d0f77f39a58770eeb43fe0e5c0173f8d7904674 /examples/src/bin/ble_bas_central.rs
parent61176d7022433a1da60e66026d165cd1ebe2276a (diff)
downloadnrf-softdevice-1fd0b6290fe23dee4988e370926d6cc00765fdb7.zip
Take configs by ref.
Diffstat (limited to 'examples/src/bin/ble_bas_central.rs')
-rw-r--r--examples/src/bin/ble_bas_central.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/src/bin/ble_bas_central.rs b/examples/src/bin/ble_bas_central.rs
index 5216aea..2b37593 100644
--- a/examples/src/bin/ble_bas_central.rs
+++ b/examples/src/bin/ble_bas_central.rs
@@ -32,12 +32,13 @@ struct BatteryServiceClient {
}
#[task]
-async fn ble_central_task(sd: &'static Softdevice, config: central::Config) {
+async fn ble_central_task(sd: &'static Softdevice) {
let addrs = &[Address::new_random_static([
0x06, 0x6b, 0x71, 0x2c, 0xf5, 0xc0,
])];
- let conn = unwrap!(central::connect(sd, addrs, config).await);
+ let config = central::Config::default();
+ let conn = unwrap!(central::connect(sd, addrs, &config).await);
info!("connected");
let client: BatteryServiceClient = unwrap!(gatt_client::discover(&conn).await);
@@ -98,7 +99,7 @@ fn main() -> ! {
let executor = EXECUTOR.put(Executor::new(cortex_m::asm::sev));
unwrap!(executor.spawn(softdevice_task(sd)));
- unwrap!(executor.spawn(ble_central_task(sd, central::Config::default())));
+ unwrap!(executor.spawn(ble_central_task(sd)));
loop {
executor.run();