summaryrefslogtreecommitdiff
path: root/examples/src/bin/ble_bas_peripheral.rs
diff options
context:
space:
mode:
authorDario Nieuwenhuis <dirbaio@dirbaio.net>2020-11-09 15:45:08 +0100
committerDario Nieuwenhuis <dirbaio@dirbaio.net>2020-11-09 15:45:08 +0100
commit81b795229bed915247b2f44fedb6d09335d2ec15 (patch)
treea8d917aacbac7b7f1d3f21cbf64c95d582d6d479 /examples/src/bin/ble_bas_peripheral.rs
parentc517b8740e93964da3819b0589e962d947cd1d88 (diff)
downloadnrf-softdevice-81b795229bed915247b2f44fedb6d09335d2ec15.zip
Take owned reserved peripherals in enable. Fixes #4
Diffstat (limited to 'examples/src/bin/ble_bas_peripheral.rs')
-rw-r--r--examples/src/bin/ble_bas_peripheral.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/src/bin/ble_bas_peripheral.rs b/examples/src/bin/ble_bas_peripheral.rs
index 53f4ff9..b2d294b 100644
--- a/examples/src/bin/ble_bas_peripheral.rs
+++ b/examples/src/bin/ble_bas_peripheral.rs
@@ -121,7 +121,8 @@ fn main() -> ! {
..Default::default()
};
- let sd = Softdevice::enable(&config);
+ let (sdp, p) = take_peripherals();
+ let sd = Softdevice::enable(sdp, &config);
let executor = EXECUTOR.put(Executor::new(cortex_m::asm::sev));
executor.spawn(softdevice_task(sd)).dewrap();