summaryrefslogtreecommitdiff
path: root/examples/src/bin/ble_bas_peripheral.rs
diff options
context:
space:
mode:
authorDario Nieuwenhuis <dirbaio@dirbaio.net>2021-02-26 01:08:04 +0100
committerDario Nieuwenhuis <dirbaio@dirbaio.net>2021-02-26 01:10:17 +0100
commita1a0d87a14c047c8b2838ec2f8c62a5ca8875406 (patch)
treebba95bfbd3ba8e5c8651d0df0d238eb2d1dc88f2 /examples/src/bin/ble_bas_peripheral.rs
parent6cf4ada4e51f37b774f3b9000f2c75fd08cf46c3 (diff)
downloadnrf-softdevice-a1a0d87a14c047c8b2838ec2f8c62a5ca8875406.zip
Fix warnings. Closes #39
Diffstat (limited to 'examples/src/bin/ble_bas_peripheral.rs')
-rw-r--r--examples/src/bin/ble_bas_peripheral.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/src/bin/ble_bas_peripheral.rs b/examples/src/bin/ble_bas_peripheral.rs
index 89c4621..462dfc9 100644
--- a/examples/src/bin/ble_bas_peripheral.rs
+++ b/examples/src/bin/ble_bas_peripheral.rs
@@ -10,10 +10,10 @@ use example_common::*;
use core::mem;
use cortex_m_rt::entry;
use defmt::info;
-use defmt::{panic, *};
+use defmt::*;
-use nrf_softdevice::ble::{gatt_server, peripheral, Connection};
-use nrf_softdevice::{raw, RawError, Softdevice};
+use nrf_softdevice::ble::{gatt_server, peripheral};
+use nrf_softdevice::{raw, Softdevice};
use embassy::executor::{task, Executor};
use embassy::util::Forever;
@@ -33,7 +33,7 @@ struct BatteryService {
}
#[task]
-async fn bluetooth_task(sd: &'static Softdevice, config: peripheral::Config) {
+async fn bluetooth_task(sd: &'static Softdevice) {
let server: BatteryService = unwrap!(gatt_server::register(sd));
#[rustfmt::skip]
let adv_data = &[
@@ -125,12 +125,12 @@ fn main() -> ! {
..Default::default()
};
- let (sdp, p) = take_peripherals();
+ let (sdp, _p) = take_peripherals();
let sd = Softdevice::enable(sdp, &config);
let executor = EXECUTOR.put(Executor::new());
executor.run(|spawner| {
unwrap!(spawner.spawn(softdevice_task(sd)));
- unwrap!(spawner.spawn(bluetooth_task(sd, peripheral::Config::default())));
+ unwrap!(spawner.spawn(bluetooth_task(sd)));
});
}