diff options
author | Dario Nieuwenhuis <dirbaio@dirbaio.net> | 2021-06-19 03:21:36 +0200 |
---|---|---|
committer | Dario Nieuwenhuis <dirbaio@dirbaio.net> | 2021-06-19 03:59:51 +0200 |
commit | ed4d42f88622c31003e5594afecbdb31441657f4 (patch) | |
tree | 2890a9d77aa29fb89cbe678be1dfcf4194a85f30 /examples/src/bin/ble_peripheral_onoff.rs | |
parent | f679f23dfba4e8b8c76fe5577498bb6f9434846f (diff) | |
download | nrf-softdevice-ed4d42f88622c31003e5594afecbdb31441657f4.zip |
Add non-connectable advertisements.
Diffstat (limited to 'examples/src/bin/ble_peripheral_onoff.rs')
-rw-r--r-- | examples/src/bin/ble_peripheral_onoff.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/src/bin/ble_peripheral_onoff.rs b/examples/src/bin/ble_peripheral_onoff.rs index f61d1b3..eb74814 100644 --- a/examples/src/bin/ble_peripheral_onoff.rs +++ b/examples/src/bin/ble_peripheral_onoff.rs @@ -54,7 +54,7 @@ async fn run_bluetooth(sd: &'static Softdevice, server: &FooService) { adv_data, scan_data, }; - let conn = unwrap!(peripheral::advertise(sd, adv, &config).await); + let conn = unwrap!(peripheral::advertise_connectable(sd, adv, &config).await); info!("advertising done!"); @@ -111,7 +111,7 @@ async fn bluetooth_task(sd: &'static Softdevice, button1: AnyPin, button2: AnyPi // Since the bluetooth future never finishes, this can only happen when the Off button is pressed. // This will cause the bluetooth future to be dropped. // - // If it was advertising, the nested `peripheral::advertise` future will be dropped, which will cause + // If it was advertising, the nested `peripheral::advertise_connectable` future will be dropped, which will cause // the softdevice to stop advertising. // If it was connected, it will drop everything including the `Connection` instance, which // will tell the softdevice to disconnect it. |