diff options
author | Dario Nieuwenhuis <dirbaio@dirbaio.net> | 2020-12-04 16:17:01 +0100 |
---|---|---|
committer | Dario Nieuwenhuis <dirbaio@dirbaio.net> | 2020-12-04 16:17:01 +0100 |
commit | 0867b0d36912a7ddadffe818b838cca6398fccdd (patch) | |
tree | bfb97c39f78b317a24f68531b23b6889c33c5b21 /examples/src/bin/ble_bas_central.rs | |
parent | 18312e0473979592e21c621c853cfbd8b29f7a2d (diff) | |
download | nrf-softdevice-0867b0d36912a7ddadffe818b838cca6398fccdd.zip |
More rusty Address type
Diffstat (limited to 'examples/src/bin/ble_bas_central.rs')
-rw-r--r-- | examples/src/bin/ble_bas_central.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/src/bin/ble_bas_central.rs b/examples/src/bin/ble_bas_central.rs index 2b37593..6bf9a1d 100644 --- a/examples/src/bin/ble_bas_central.rs +++ b/examples/src/bin/ble_bas_central.rs @@ -14,7 +14,7 @@ use defmt::{panic, *}; use embassy::executor::{task, Executor}; use embassy::util::Forever; -use nrf_softdevice::ble::{central, gatt_client, Address, Connection, Uuid}; +use nrf_softdevice::ble::{central, gatt_client, Address, AddressType, Connection, Uuid}; use nrf_softdevice::raw; use nrf_softdevice::Softdevice; @@ -33,9 +33,10 @@ struct BatteryServiceClient { #[task] async fn ble_central_task(sd: &'static Softdevice) { - let addrs = &[Address::new_random_static([ - 0x06, 0x6b, 0x71, 0x2c, 0xf5, 0xc0, - ])]; + let addrs = &[Address::new( + AddressType::RandomStatic, + [0x06, 0x6b, 0x71, 0x2c, 0xf5, 0xc0], + )]; let config = central::Config::default(); let conn = unwrap!(central::connect(sd, addrs, &config).await); |