summaryrefslogtreecommitdiff
path: root/examples/src/bin/ble_bas_central.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/src/bin/ble_bas_central.rs')
-rw-r--r--examples/src/bin/ble_bas_central.rs16
1 files changed, 5 insertions, 11 deletions
diff --git a/examples/src/bin/ble_bas_central.rs b/examples/src/bin/ble_bas_central.rs
index f09cb91..f0bda6e 100644
--- a/examples/src/bin/ble_bas_central.rs
+++ b/examples/src/bin/ble_bas_central.rs
@@ -6,15 +6,13 @@
mod example_common;
use core::mem;
+
use cortex_m_rt::entry;
-use defmt::info;
-use defmt::*;
+use defmt::{info, *};
use embassy::executor::Executor;
use embassy::util::Forever;
-
use nrf_softdevice::ble::{central, gatt_client, Address, AddressType};
-use nrf_softdevice::raw;
-use nrf_softdevice::Softdevice;
+use nrf_softdevice::{raw, Softdevice};
static EXECUTOR: Forever<Executor> = Forever::new();
@@ -71,9 +69,7 @@ fn main() -> ! {
event_length: 6,
}),
conn_gatt: Some(raw::ble_gatt_conn_cfg_t { att_mtu: 128 }),
- gatts_attr_tab_size: Some(raw::ble_gatts_cfg_attr_tab_size_t {
- attr_tab_size: 32768,
- }),
+ gatts_attr_tab_size: Some(raw::ble_gatts_cfg_attr_tab_size_t { attr_tab_size: 32768 }),
gap_role_count: Some(raw::ble_gap_cfg_role_count_t {
adv_set_count: 1,
periph_role_count: 3,
@@ -86,9 +82,7 @@ fn main() -> ! {
current_len: 9,
max_len: 9,
write_perm: unsafe { mem::zeroed() },
- _bitfield_1: raw::ble_gap_cfg_device_name_t::new_bitfield_1(
- raw::BLE_GATTS_VLOC_STACK as u8,
- ),
+ _bitfield_1: raw::ble_gap_cfg_device_name_t::new_bitfield_1(raw::BLE_GATTS_VLOC_STACK as u8),
}),
..Default::default()
};