summaryrefslogtreecommitdiff
path: root/examples/src/bin/ble_l2cap_central.rs
diff options
context:
space:
mode:
authorDario Nieuwenhuis <dirbaio@dirbaio.net>2020-12-26 03:28:34 +0100
committerDario Nieuwenhuis <dirbaio@dirbaio.net>2020-12-26 03:28:34 +0100
commitb1b9bb393242a78bc8e5ad632ed79c3c9e014880 (patch)
tree4188bcc244caa4ef261d212392cf73fa154bac6b /examples/src/bin/ble_l2cap_central.rs
parent41f00393ddd5607c415ecc3d1862703c85411820 (diff)
downloadnrf-softdevice-b1b9bb393242a78bc8e5ad632ed79c3c9e014880.zip
Fix examples build.
Diffstat (limited to 'examples/src/bin/ble_l2cap_central.rs')
-rw-r--r--examples/src/bin/ble_l2cap_central.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/src/bin/ble_l2cap_central.rs b/examples/src/bin/ble_l2cap_central.rs
index b329fa5..b00087a 100644
--- a/examples/src/bin/ble_l2cap_central.rs
+++ b/examples/src/bin/ble_l2cap_central.rs
@@ -19,7 +19,7 @@ use embassy::util::Forever;
use heapless::consts::*;
use nrf_softdevice::ble::l2cap::Packet as _;
-use nrf_softdevice::ble::{central, l2cap, Address, Connection, Uuid};
+use nrf_softdevice::ble::{central, l2cap, Address, Connection, TxPower, Uuid};
use nrf_softdevice::raw;
use nrf_softdevice::Softdevice;
@@ -36,7 +36,10 @@ async fn softdevice_task(sd: &'static Softdevice) {
async fn ble_central_task(sd: &'static Softdevice) {
info!("Scanning for peer...");
- let config = central::ScanConfig { whitelist: None };
+ let config = central::ScanConfig {
+ whitelist: None,
+ tx_power: TxPower::ZerodBm,
+ };
let res = central::scan(sd, &config, |params| unsafe {
let mut data = slice::from_raw_parts(params.data.p_data, params.data.len as usize);
while data.len() != 0 {