summaryrefslogtreecommitdiff
path: root/examples
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
parent41f00393ddd5607c415ecc3d1862703c85411820 (diff)
downloadnrf-softdevice-b1b9bb393242a78bc8e5ad632ed79c3c9e014880.zip
Fix examples build.
Diffstat (limited to 'examples')
-rw-r--r--examples/src/bin/ble_l2cap_central.rs7
-rw-r--r--examples/src/bin/ble_scan.rs7
2 files changed, 10 insertions, 4 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 {
diff --git a/examples/src/bin/ble_scan.rs b/examples/src/bin/ble_scan.rs
index 46c61a3..71ee0d0 100644
--- a/examples/src/bin/ble_scan.rs
+++ b/examples/src/bin/ble_scan.rs
@@ -14,7 +14,7 @@ use defmt::{panic, *};
use embassy::executor::{task, Executor};
use embassy::util::Forever;
-use nrf_softdevice::ble::central;
+use nrf_softdevice::ble::{central, TxPower};
use nrf_softdevice::raw;
use nrf_softdevice::Softdevice;
@@ -27,7 +27,10 @@ async fn softdevice_task(sd: &'static Softdevice) {
#[task]
async fn ble_task(sd: &'static Softdevice) {
- let config = central::ScanConfig { whitelist: None };
+ let config = central::ScanConfig {
+ whitelist: None,
+ tx_power: TxPower::ZerodBm,
+ };
let res = central::scan(sd, &config, |params| unsafe {
info!("AdvReport!");
info!(