From 98a31ce672c3113a2c238dc4e2ae9d632e59713a Mon Sep 17 00:00:00 2001 From: alexmoon Date: Thu, 14 Jul 2022 15:45:28 -0400 Subject: Add rustfmt.toml to match embassy formatting --- examples/src/bin/ble_advertise.rs | 15 +- examples/src/bin/ble_bas_central.rs | 16 +- examples/src/bin/ble_bas_peripheral.rs | 31 +- examples/src/bin/ble_dis_bas_peripheral_builder.rs | 51 +- examples/src/bin/ble_l2cap_central.rs | 24 +- examples/src/bin/ble_l2cap_peripheral.rs | 22 +- examples/src/bin/ble_peripheral_onoff.rs | 22 +- examples/src/bin/ble_scan.rs | 22 +- examples/src/bin/flash.rs | 1 - nrf-softdevice-defmt-rtt/src/channel.rs | 12 +- nrf-softdevice-gen/src/main.rs | 37 +- nrf-softdevice-macro/src/lib.rs | 44 +- nrf-softdevice-macro/src/uuid.rs | 1 + nrf-softdevice-mbr/src/bindings.rs | 58 +- nrf-softdevice-s112/src/bindings.rs | 1559 ++++------------ nrf-softdevice-s113/src/bindings.rs | 1800 +++++------------- nrf-softdevice-s122/src/bindings.rs | 1574 ++++------------ nrf-softdevice-s132/src/bindings.rs | 1920 +++++--------------- nrf-softdevice-s140/src/bindings.rs | 1913 +++++-------------- nrf-softdevice/src/ble/central.rs | 17 +- nrf-softdevice/src/ble/connection.rs | 40 +- nrf-softdevice/src/ble/gap.rs | 21 +- nrf-softdevice/src/ble/gatt_client.rs | 79 +- nrf-softdevice/src/ble/gatt_server.rs | 35 +- nrf-softdevice/src/ble/gatt_server/builder.rs | 42 +- nrf-softdevice/src/ble/gatt_traits.rs | 4 +- nrf-softdevice/src/ble/l2cap.rs | 53 +- nrf-softdevice/src/ble/peripheral.rs | 95 +- nrf-softdevice/src/ble/types.rs | 3 +- nrf-softdevice/src/critical_section_impl.rs | 3 +- nrf-softdevice/src/events.rs | 4 +- nrf-softdevice/src/flash.rs | 12 +- nrf-softdevice/src/lib.rs | 8 +- nrf-softdevice/src/softdevice.rs | 47 +- nrf-softdevice/src/util/mod.rs | 5 +- nrf-softdevice/src/util/portal.rs | 3 +- rustfmt.toml | 3 + 37 files changed, 2264 insertions(+), 7332 deletions(-) create mode 100644 rustfmt.toml diff --git a/examples/src/bin/ble_advertise.rs b/examples/src/bin/ble_advertise.rs index 144568e..b6f7bd4 100644 --- a/examples/src/bin/ble_advertise.rs +++ b/examples/src/bin/ble_advertise.rs @@ -6,11 +6,11 @@ mod example_common; use core::mem; + use cortex_m_rt::entry; use defmt::{info, unreachable, *}; use embassy::executor::Executor; use embassy::util::Forever; - use nrf_softdevice::ble::peripheral; use nrf_softdevice::{raw, Softdevice}; @@ -36,10 +36,7 @@ async fn bluetooth_task(sd: &'static Softdevice) { let mut config = peripheral::Config::default(); config.interval = 50; - let adv = peripheral::NonconnectableAdvertisement::ScannableUndirected { - adv_data, - scan_data, - }; + let adv = peripheral::NonconnectableAdvertisement::ScannableUndirected { adv_data, scan_data }; unwrap!(peripheral::advertise(sd, adv, &config).await); // advertise never returns @@ -62,9 +59,7 @@ fn main() -> ! { event_length: 24, }), conn_gatt: Some(raw::ble_gatt_conn_cfg_t { att_mtu: 256 }), - 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, @@ -77,9 +72,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() }; 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 = 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() }; diff --git a/examples/src/bin/ble_bas_peripheral.rs b/examples/src/bin/ble_bas_peripheral.rs index 2c7e769..d62a111 100644 --- a/examples/src/bin/ble_bas_peripheral.rs +++ b/examples/src/bin/ble_bas_peripheral.rs @@ -6,12 +6,11 @@ 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::{gatt_server, peripheral}; use nrf_softdevice::{raw, Softdevice}; @@ -30,13 +29,7 @@ struct BatteryService { #[nrf_softdevice::gatt_service(uuid = "9e7312e0-2354-11eb-9f10-fbc30a62cf38")] struct FooService { - #[characteristic( - uuid = "9e7312e0-2354-11eb-9f10-fbc30a63cf38", - read, - write, - notify, - indicate - )] + #[characteristic(uuid = "9e7312e0-2354-11eb-9f10-fbc30a63cf38", read, write, notify, indicate)] foo: u16, } @@ -61,10 +54,7 @@ async fn bluetooth_task(sd: &'static Softdevice, server: Server) { loop { let config = peripheral::Config::default(); - let adv = peripheral::ConnectableAdvertisement::ScannableUndirected { - adv_data, - scan_data, - }; + let adv = peripheral::ConnectableAdvertisement::ScannableUndirected { adv_data, scan_data }; let conn = unwrap!(peripheral::advertise_connectable(sd, adv, &config).await); info!("advertising done!"); @@ -87,10 +77,7 @@ async fn bluetooth_task(sd: &'static Softdevice, server: Server) { indications, notifications, } => { - info!( - "foo indications: {}, notifications: {}", - indications, notifications - ) + info!("foo indications: {}, notifications: {}", indications, notifications) } }, }) @@ -118,9 +105,7 @@ fn main() -> ! { event_length: 24, }), conn_gatt: Some(raw::ble_gatt_conn_cfg_t { att_mtu: 256 }), - 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, @@ -133,9 +118,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() }; diff --git a/examples/src/bin/ble_dis_bas_peripheral_builder.rs b/examples/src/bin/ble_dis_bas_peripheral_builder.rs index 012ba7d..4d65e67 100644 --- a/examples/src/bin/ble_dis_bas_peripheral_builder.rs +++ b/examples/src/bin/ble_dis_bas_peripheral_builder.rs @@ -6,9 +6,9 @@ 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::gatt_server::builder::ServiceBuilder; @@ -65,11 +65,7 @@ pub struct DeviceInformation { pub struct DeviceInformationService {} impl DeviceInformationService { - pub fn new( - sd: &mut Softdevice, - pnp_id: &PnPID, - info: DeviceInformation, - ) -> Result { + pub fn new(sd: &mut Softdevice, pnp_id: &PnPID, info: DeviceInformation) -> Result { let mut sb = ServiceBuilder::new(sd, DEVICE_INFORMATION)?; Self::add_pnp_characteristic(&mut sb, pnp_id)?; @@ -99,17 +95,10 @@ impl DeviceInformationService { } } - fn add_pnp_characteristic( - sb: &mut ServiceBuilder, - pnp_id: &PnPID, - ) -> Result { + fn add_pnp_characteristic(sb: &mut ServiceBuilder, pnp_id: &PnPID) -> Result { // SAFETY: `PnPID` is `repr(C, packed)` so viewing it as an immutable slice of bytes is safe. - let val = unsafe { - core::slice::from_raw_parts( - pnp_id as *const _ as *const u8, - core::mem::size_of::(), - ) - }; + let val = + unsafe { core::slice::from_raw_parts(pnp_id as *const _ as *const u8, core::mem::size_of::()) }; let attr = Attribute::new(val); let md = Metadata::new(Properties::new().read()); @@ -128,8 +117,7 @@ impl BatteryService { let attr = Attribute::new(&[0u8]); let metadata = Metadata::new(Properties::new().read().notify()); - let characteristic_builder = - service_builder.add_characteristic(BATTERY_LEVEL, attr, metadata)?; + let characteristic_builder = service_builder.add_characteristic(BATTERY_LEVEL, attr, metadata)?; let characteristic_handles = characteristic_builder.build(); let _service_handle = service_builder.build(); @@ -146,18 +134,10 @@ impl BatteryService { Ok(buf[0]) } - pub fn battery_level_set( - &self, - sd: &Softdevice, - val: u8, - ) -> Result<(), gatt_server::SetValueError> { + pub fn battery_level_set(&self, sd: &Softdevice, val: u8) -> Result<(), gatt_server::SetValueError> { gatt_server::set_value(sd, self.value_handle, &[val]) } - pub fn battery_level_notify( - &self, - conn: &Connection, - val: u8, - ) -> Result<(), gatt_server::NotifyValueError> { + pub fn battery_level_notify(&self, conn: &Connection, val: u8) -> Result<(), gatt_server::NotifyValueError> { gatt_server::notify_value(conn, self.value_handle, &[val]) } @@ -221,10 +201,7 @@ async fn bluetooth_task(sd: &'static Softdevice, server: Server) { loop { let config = peripheral::Config::default(); - let adv = peripheral::ConnectableAdvertisement::ScannableUndirected { - adv_data, - scan_data, - }; + let adv = peripheral::ConnectableAdvertisement::ScannableUndirected { adv_data, scan_data }; let conn = unwrap!(peripheral::advertise_connectable(sd, adv, &config).await); info!("advertising done!"); @@ -254,9 +231,7 @@ fn main() -> ! { event_length: 24, }), conn_gatt: Some(raw::ble_gatt_conn_cfg_t { att_mtu: 256 }), - 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, @@ -269,9 +244,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() }; diff --git a/examples/src/bin/ble_l2cap_central.rs b/examples/src/bin/ble_l2cap_central.rs index 2169c35..f344fa8 100644 --- a/examples/src/bin/ble_l2cap_central.rs +++ b/examples/src/bin/ble_l2cap_central.rs @@ -5,18 +5,16 @@ #[path = "../example_common.rs"] mod example_common; -use core::mem; use core::ptr::NonNull; -use core::slice; +use core::{mem, slice}; + use cortex_m_rt::entry; use defmt::{info, *}; use embassy::executor::Executor; use embassy::util::Forever; - use nrf_softdevice::ble::l2cap::Packet as _; use nrf_softdevice::ble::{central, l2cap, Address, TxPower}; -use nrf_softdevice::raw; -use nrf_softdevice::Softdevice; +use nrf_softdevice::{raw, Softdevice}; static EXECUTOR: Forever = Forever::new(); @@ -52,8 +50,7 @@ async fn ble_central_task(sd: &'static Softdevice) { if key == 0x06 && value == &[ - 0xeb, 0x04, 0x8b, 0xfd, 0x5b, 0x03, 0x21, 0xb5, 0xeb, 0x11, 0x65, 0x2f, - 0x18, 0xce, 0x9c, 0x82, + 0xeb, 0x04, 0x8b, 0xfd, 0x5b, 0x03, 0x21, 0xb5, 0xeb, 0x11, 0x65, 0x2f, 0x18, 0xce, 0x9c, 0x82, ] { return Some(Address::from_raw(params.peer_addr)); @@ -104,10 +101,7 @@ impl Packet { fn new(data: &[u8]) -> Self { let mut buf = unwrap!(Box::::new([0; 512])); buf[..data.len()].copy_from_slice(data); - Packet { - len: data.len(), - buf, - } + Packet { len: data.len(), buf } } } @@ -158,9 +152,7 @@ fn main() -> ! { conn_gattc: Some(raw::ble_gattc_conn_cfg_t { write_cmd_tx_queue_size: 0, }), - conn_gatts: Some(raw::ble_gatts_conn_cfg_t { - hvn_tx_queue_size: 0, - }), + conn_gatts: Some(raw::ble_gatts_conn_cfg_t { hvn_tx_queue_size: 0 }), gatts_attr_tab_size: Some(raw::ble_gatts_cfg_attr_tab_size_t { attr_tab_size: 512 }), gap_role_count: Some(raw::ble_gap_cfg_role_count_t { adv_set_count: 1, @@ -174,9 +166,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), }), conn_l2cap: Some(raw::ble_l2cap_conn_cfg_t { ch_count: 1, diff --git a/examples/src/bin/ble_l2cap_peripheral.rs b/examples/src/bin/ble_l2cap_peripheral.rs index 77aae30..d542a45 100644 --- a/examples/src/bin/ble_l2cap_peripheral.rs +++ b/examples/src/bin/ble_l2cap_peripheral.rs @@ -7,14 +7,13 @@ mod example_common; use core::mem; use core::ptr::NonNull; + use cortex_m_rt::entry; use defmt::*; use embassy::executor::Executor; use embassy::util::Forever; - use nrf_softdevice::ble::{l2cap, peripheral}; -use nrf_softdevice::{ble, RawError}; -use nrf_softdevice::{raw, Softdevice}; +use nrf_softdevice::{ble, raw, RawError, Softdevice}; static EXECUTOR: Forever = Forever::new(); @@ -42,10 +41,7 @@ async fn bluetooth_task(sd: &'static Softdevice) { loop { let config = peripheral::Config::default(); - let adv = peripheral::ConnectableAdvertisement::ScannableUndirected { - adv_data, - scan_data, - }; + let adv = peripheral::ConnectableAdvertisement::ScannableUndirected { adv_data, scan_data }; let conn = unwrap!(peripheral::advertise_connectable(sd, adv, &config).await); info!("advertising done!"); @@ -123,12 +119,8 @@ fn main() -> ! { conn_gattc: Some(raw::ble_gattc_conn_cfg_t { write_cmd_tx_queue_size: 0, }), - conn_gatts: Some(raw::ble_gatts_conn_cfg_t { - hvn_tx_queue_size: 0, - }), - gatts_attr_tab_size: Some(raw::ble_gatts_cfg_attr_tab_size_t { - attr_tab_size: 1024, - }), + conn_gatts: Some(raw::ble_gatts_conn_cfg_t { hvn_tx_queue_size: 0 }), + gatts_attr_tab_size: Some(raw::ble_gatts_cfg_attr_tab_size_t { attr_tab_size: 1024 }), gap_role_count: Some(raw::ble_gap_cfg_role_count_t { adv_set_count: 1, periph_role_count: 5, @@ -141,9 +133,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), }), conn_l2cap: Some(raw::ble_l2cap_conn_cfg_t { ch_count: 1, diff --git a/examples/src/bin/ble_peripheral_onoff.rs b/examples/src/bin/ble_peripheral_onoff.rs index 101f208..a75ec49 100644 --- a/examples/src/bin/ble_peripheral_onoff.rs +++ b/examples/src/bin/ble_peripheral_onoff.rs @@ -6,6 +6,7 @@ mod example_common; use core::mem; + use cortex_m_rt::entry; use defmt::*; use embassy::executor::Executor; @@ -13,7 +14,6 @@ use embassy::util::Forever; use embassy_nrf::gpio::{AnyPin, Input, Pin as _, Pull}; use embassy_nrf::interrupt::Priority; use futures::pin_mut; - use nrf_softdevice::ble::{gatt_server, peripheral}; use nrf_softdevice::{raw, Softdevice}; @@ -49,10 +49,7 @@ async fn run_bluetooth(sd: &'static Softdevice, server: &Server) { loop { let config = peripheral::Config::default(); - let adv = peripheral::ConnectableAdvertisement::ScannableUndirected { - adv_data, - scan_data, - }; + let adv = peripheral::ConnectableAdvertisement::ScannableUndirected { adv_data, scan_data }; let conn = unwrap!(peripheral::advertise_connectable(sd, adv, &config).await); info!("advertising done!"); @@ -141,9 +138,7 @@ fn main() -> ! { event_length: 24, }), conn_gatt: Some(raw::ble_gatt_conn_cfg_t { att_mtu: 256 }), - 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, @@ -156,9 +151,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() }; @@ -169,11 +162,6 @@ fn main() -> ! { executor.run(move |spawner| { let server = unwrap!(Server::new(sd)); unwrap!(spawner.spawn(softdevice_task(sd))); - unwrap!(spawner.spawn(bluetooth_task( - sd, - server, - p.P0_11.degrade(), - p.P0_12.degrade() - ))); + unwrap!(spawner.spawn(bluetooth_task(sd, server, p.P0_11.degrade(), p.P0_12.degrade()))); }); } diff --git a/examples/src/bin/ble_scan.rs b/examples/src/bin/ble_scan.rs index f0b4cf8..c8ed543 100644 --- a/examples/src/bin/ble_scan.rs +++ b/examples/src/bin/ble_scan.rs @@ -5,16 +5,14 @@ #[path = "../example_common.rs"] mod example_common; -use core::mem; -use core::slice; +use core::{mem, slice}; + use cortex_m_rt::entry; use defmt::*; use embassy::executor::Executor; use embassy::util::Forever; - use nrf_softdevice::ble::central; -use nrf_softdevice::raw; -use nrf_softdevice::Softdevice; +use nrf_softdevice::{raw, Softdevice}; static EXECUTOR: Forever = Forever::new(); @@ -46,7 +44,7 @@ async fn ble_task(sd: &'static Softdevice) { let mut data = slice::from_raw_parts(params.data.p_data, params.data.len as usize); while data.len() != 0 { let len = data[0] as usize; - if data.len() < len+1 { + if data.len() < len + 1 { warn!("Advertisement data truncated?"); break; } @@ -55,9 +53,9 @@ async fn ble_task(sd: &'static Softdevice) { break; } let key = data[1]; - let value = &data[2..len+1]; + let value = &data[2..len + 1]; info!("value {}: {:x}", key, value); - data = &data[len+1..]; + data = &data[len + 1..]; } None }) @@ -82,9 +80,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, @@ -97,9 +93,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() }; diff --git a/examples/src/bin/flash.rs b/examples/src/bin/flash.rs index 3c293bd..dfaa7fb 100644 --- a/examples/src/bin/flash.rs +++ b/examples/src/bin/flash.rs @@ -11,7 +11,6 @@ use embassy::executor::Executor; use embassy::util::Forever; use embedded_storage_async::nor_flash::*; use futures::pin_mut; - use nrf_softdevice::{Flash, Softdevice}; static EXECUTOR: Forever = Forever::new(); diff --git a/nrf-softdevice-defmt-rtt/src/channel.rs b/nrf-softdevice-defmt-rtt/src/channel.rs index ebe44bf..d0d899f 100644 --- a/nrf-softdevice-defmt-rtt/src/channel.rs +++ b/nrf-softdevice-defmt-rtt/src/channel.rs @@ -1,7 +1,5 @@ -use core::{ - ptr, - sync::atomic::{AtomicUsize, Ordering}, -}; +use core::ptr; +use core::sync::atomic::{AtomicUsize, Ordering}; use crate::{MODE_BLOCK_IF_FULL, MODE_MASK, SIZE}; @@ -68,8 +66,7 @@ impl Channel { ptr::copy_nonoverlapping(bytes.as_ptr(), self.buffer.add(cursor), len); } } - self.write - .store(write.wrapping_add(len) % SIZE, Ordering::Release); + self.write.store(write.wrapping_add(len) % SIZE, Ordering::Release); len } @@ -91,8 +88,7 @@ impl Channel { ptr::copy_nonoverlapping(bytes.as_ptr(), self.buffer.add(cursor), len); } } - self.write - .store(write.wrapping_add(len) % SIZE, Ordering::Release); + self.write.store(write.wrapping_add(len) % SIZE, Ordering::Release); len } diff --git a/nrf-softdevice-gen/src/main.rs b/nrf-softdevice-gen/src/main.rs index faa8d6b..3fa2c27 100644 --- a/nrf-softdevice-gen/src/main.rs +++ b/nrf-softdevice-gen/src/main.rs @@ -1,17 +1,12 @@ -use regex::{Captures, Regex}; use std::collections::HashMap; -use std::env; use std::fmt::Write; -use std::fs; use std::path::PathBuf; +use std::{env, fs}; + +use regex::{Captures, Regex}; use walkdir::WalkDir; -pub fn gen_bindings( - tmp_dir: &PathBuf, - src_dir: &PathBuf, - dst: &PathBuf, - mut f: impl FnMut(String) -> String, -) { +pub fn gen_bindings(tmp_dir: &PathBuf, src_dir: &PathBuf, dst: &PathBuf, mut f: impl FnMut(String) -> String) { let mut wrapper = String::new(); for entry in WalkDir::new(src_dir) @@ -29,12 +24,7 @@ pub fn gen_bindings( let data = f(data); fs::write(tmp_dir.join(entry.file_name()), data.as_bytes()).unwrap(); - writeln!( - &mut wrapper, - "#include \"{}\"", - entry.file_name().to_string_lossy() - ) - .unwrap(); + writeln!(&mut wrapper, "#include \"{}\"", entry.file_name().to_string_lossy()).unwrap(); } } fs::write(tmp_dir.join("nrf.h"), &[]).unwrap(); @@ -70,7 +60,10 @@ fn main() { fs::create_dir_all(&tmp_dir).unwrap(); gen_bindings(&tmp_dir, &src_dir, &tmp_bindings_path, |data| { - let re = Regex::new(r"SVCALL\((?P[A-Za-z0-9_]+),\s*(?P[A-Za-z0-9_]+),\s*(?P[A-Za-z0-9_]+)\((?P.*)\)\);").unwrap(); + let re = Regex::new( + r"SVCALL\((?P[A-Za-z0-9_]+),\s*(?P[A-Za-z0-9_]+),\s*(?P[A-Za-z0-9_]+)\((?P.*)\)\);", + ) + .unwrap(); re.replace_all(&data, "uint32_t __svc_$name = $svc;").into() }); @@ -92,7 +85,10 @@ fn main() { // they're used inside enums :( let data = data.replace("[1];", "[0];"); - let re = Regex::new(r"SVCALL\((?P[A-Za-z0-9_]+),\s*(?P[A-Za-z0-9_]+),\s*(?P[A-Za-z0-9_]+)\((?P.*)\)\);").unwrap(); + let re = Regex::new( + r"SVCALL\((?P[A-Za-z0-9_]+),\s*(?P[A-Za-z0-9_]+),\s*(?P[A-Za-z0-9_]+)\((?P.*)\)\);", + ) + .unwrap(); re.replace_all(&data, "$ret $name($args);").into() }); @@ -143,12 +139,7 @@ fn main() { } else { let arg = arg_names[r]; let out = if r == 0 { "ret" } else { "_" }; - writeln!( - &mut res, - " inout(\"r{}\") to_asm({}) => {},", - r, arg, out - ) - .unwrap(); + writeln!(&mut res, " inout(\"r{}\") to_asm({}) => {},", r, arg, out).unwrap(); } } writeln!(&mut res, " lateout(\"r12\") _,").unwrap(); diff --git a/nrf-softdevice-macro/src/lib.rs b/nrf-softdevice-macro/src/lib.rs index 020da80..3b71c6d 100644 --- a/nrf-softdevice-macro/src/lib.rs +++ b/nrf-softdevice-macro/src/lib.rs @@ -2,11 +2,12 @@ extern crate proc_macro; +use std::iter::FromIterator; + use darling::FromMeta; use proc_macro::TokenStream; use proc_macro2::{Span, TokenStream as TokenStream2}; use quote::{format_ident, quote, quote_spanned}; -use std::iter::FromIterator; use syn::spanned::Spanned; mod uuid; @@ -58,11 +59,7 @@ pub fn gatt_server(_args: TokenStream, item: TokenStream) -> TokenStream { return TokenStream::new(); } }; - let fields = struct_fields - .named - .iter() - .cloned() - .collect::>(); + let fields = struct_fields.named.iter().cloned().collect::>(); let struct_name = struc.ident.clone(); let event_enum_name = format_ident!("{}Event", struct_name); @@ -82,10 +79,7 @@ pub fn gatt_server(_args: TokenStream, item: TokenStream) -> TokenStream { )); if let syn::Type::Path(p) = &field.ty { - let name_pascal = format_ident!( - "{}", - inflector::cases::pascalcase::to_pascal_case(&name.to_string()) - ); + let name_pascal = format_ident!("{}", inflector::cases::pascalcase::to_pascal_case(&name.to_string())); let event_enum_ty = p.path.get_ident().unwrap(); let event_enum_variant = format_ident!("{}Event", event_enum_ty); code_event_enum.extend(quote_spanned!(span=> @@ -160,17 +154,14 @@ pub fn gatt_service(args: TokenStream, item: TokenStream) -> TokenStream { return TokenStream::new(); } }; - let mut fields = struct_fields - .named - .iter() - .cloned() - .collect::>(); + let mut fields = struct_fields.named.iter().cloned().collect::>(); let mut err = None; fields.retain(|field| { - if let Some(attr) = field.attrs.iter().find(|attr| { - attr.path.segments.len() == 1 - && attr.path.segments.first().unwrap().ident == "characteristic" - }) { + if let Some(attr) = field + .attrs + .iter() + .find(|attr| attr.path.segments.len() == 1 && attr.path.segments.first().unwrap().ident == "characteristic") + { let args = attr.parse_meta().unwrap(); let args = match CharacteristicArgs::from_meta(&args) { @@ -450,17 +441,14 @@ pub fn gatt_client(args: TokenStream, item: TokenStream) -> TokenStream { return TokenStream::new(); } }; - let mut fields = struct_fields - .named - .iter() - .cloned() - .collect::>(); + let mut fields = struct_fields.named.iter().cloned().collect::>(); let mut err = None; fields.retain(|field| { - if let Some(attr) = field.attrs.iter().find(|attr| { - attr.path.segments.len() == 1 - && attr.path.segments.first().unwrap().ident == "characteristic" - }) { + if let Some(attr) = field + .attrs + .iter() + .find(|attr| attr.path.segments.len() == 1 && attr.path.segments.first().unwrap().ident == "characteristic") + { let args = attr.parse_meta().unwrap(); let args = match CharacteristicArgs::from_meta(&args) { diff --git a/nrf-softdevice-macro/src/uuid.rs b/nrf-softdevice-macro/src/uuid.rs index 0c8b59b..a2e4f3d 100644 --- a/nrf-softdevice-macro/src/uuid.rs +++ b/nrf-softdevice-macro/src/uuid.rs @@ -1,4 +1,5 @@ use core::str::FromStr; + use darling::FromMeta; use proc_macro2::TokenStream as TokenStream2; use quote::quote; diff --git a/nrf-softdevice-mbr/src/bindings.rs b/nrf-softdevice-mbr/src/bindings.rs index f4b6504..49186c7 100644 --- a/nrf-softdevice-mbr/src/bindings.rs +++ b/nrf-softdevice-mbr/src/bindings.rs @@ -331,9 +331,7 @@ fn bindgen_test_layout_sd_mbr_command_copy_bl_t() { concat!("Alignment of ", stringify!(sd_mbr_command_copy_bl_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).bl_src as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).bl_src as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -343,9 +341,7 @@ fn bindgen_test_layout_sd_mbr_command_copy_bl_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).bl_len as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).bl_len as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -387,24 +383,15 @@ fn bindgen_test_layout_sd_mbr_command_vector_table_base_set_t() { assert_eq!( ::core::mem::size_of::(), 4usize, - concat!( - "Size of: ", - stringify!(sd_mbr_command_vector_table_base_set_t) - ) + concat!("Size of: ", stringify!(sd_mbr_command_vector_table_base_set_t)) ); assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(sd_mbr_command_vector_table_base_set_t) - ) + concat!("Alignment of ", stringify!(sd_mbr_command_vector_table_base_set_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).address as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).address as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -431,24 +418,15 @@ fn bindgen_test_layout_sd_mbr_command_irq_forward_address_set_t() { assert_eq!( ::core::mem::size_of::(), 4usize, - concat!( - "Size of: ", - stringify!(sd_mbr_command_irq_forward_address_set_t) - ) + concat!("Size of: ", stringify!(sd_mbr_command_irq_forward_address_set_t)) ); assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(sd_mbr_command_irq_forward_address_set_t) - ) + concat!("Alignment of ", stringify!(sd_mbr_command_irq_forward_address_set_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).address - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).address as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -499,9 +477,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(sd_mbr_command_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).copy_sd as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).copy_sd as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -511,9 +487,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).compare as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).compare as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -523,9 +497,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).copy_bl as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).copy_bl as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -535,10 +507,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).base_set as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).base_set as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -549,8 +518,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).irq_forward_address_set - as *const _ as usize + &(*(::core::ptr::null::())).irq_forward_address_set as *const _ as usize }, 0usize, concat!( diff --git a/nrf-softdevice-s112/src/bindings.rs b/nrf-softdevice-s112/src/bindings.rs index 7d1ad13..9988bd5 100644 --- a/nrf-softdevice-s112/src/bindings.rs +++ b/nrf-softdevice-s112/src/bindings.rs @@ -918,73 +918,57 @@ pub const NRF_POWER_DCDC_MODES_NRF_POWER_DCDC_ENABLE: NRF_POWER_DCDC_MODES = 1; #[doc = "@brief DC/DC converter modes."] pub type NRF_POWER_DCDC_MODES = self::c_uint; #[doc = "< The event does not have a notification."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_NONE: - NRF_RADIO_NOTIFICATION_DISTANCES = 0; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_NONE: NRF_RADIO_NOTIFICATION_DISTANCES = 0; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_800US: - NRF_RADIO_NOTIFICATION_DISTANCES = 1; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_800US: NRF_RADIO_NOTIFICATION_DISTANCES = 1; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_1740US: - NRF_RADIO_NOTIFICATION_DISTANCES = 2; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_1740US: NRF_RADIO_NOTIFICATION_DISTANCES = 2; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_2680US: - NRF_RADIO_NOTIFICATION_DISTANCES = 3; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_2680US: NRF_RADIO_NOTIFICATION_DISTANCES = 3; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_3620US: - NRF_RADIO_NOTIFICATION_DISTANCES = 4; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_3620US: NRF_RADIO_NOTIFICATION_DISTANCES = 4; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_4560US: - NRF_RADIO_NOTIFICATION_DISTANCES = 5; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_4560US: NRF_RADIO_NOTIFICATION_DISTANCES = 5; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_5500US: - NRF_RADIO_NOTIFICATION_DISTANCES = 6; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_5500US: NRF_RADIO_NOTIFICATION_DISTANCES = 6; #[doc = "@brief Radio notification distances."] pub type NRF_RADIO_NOTIFICATION_DISTANCES = self::c_uint; #[doc = "< The event does not have a radio notification signal."] -pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_NONE: - NRF_RADIO_NOTIFICATION_TYPES = 0; +pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_NONE: NRF_RADIO_NOTIFICATION_TYPES = 0; #[doc = "< Using interrupt for notification when the radio will be enabled."] -pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_ACTIVE: - NRF_RADIO_NOTIFICATION_TYPES = 1; +pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_ACTIVE: NRF_RADIO_NOTIFICATION_TYPES = 1; #[doc = "< Using interrupt for notification when the radio has been disabled."] -pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_INACTIVE: - NRF_RADIO_NOTIFICATION_TYPES = 2; +pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_INACTIVE: NRF_RADIO_NOTIFICATION_TYPES = 2; #[doc = "< Using interrupt for notification both when the radio will be enabled and disabled."] -pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_BOTH: - NRF_RADIO_NOTIFICATION_TYPES = 3; +pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_BOTH: NRF_RADIO_NOTIFICATION_TYPES = 3; #[doc = "@brief Radio notification types."] pub type NRF_RADIO_NOTIFICATION_TYPES = self::c_uint; #[doc = "< This signal indicates the start of the radio timeslot."] -pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_START: - NRF_RADIO_CALLBACK_SIGNAL_TYPE = 0; +pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_START: NRF_RADIO_CALLBACK_SIGNAL_TYPE = 0; #[doc = "< This signal indicates the NRF_TIMER0 interrupt."] -pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_TIMER0: - NRF_RADIO_CALLBACK_SIGNAL_TYPE = 1; +pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_TIMER0: NRF_RADIO_CALLBACK_SIGNAL_TYPE = 1; #[doc = "< This signal indicates the NRF_RADIO interrupt."] -pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_RADIO: - NRF_RADIO_CALLBACK_SIGNAL_TYPE = 2; +pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_RADIO: NRF_RADIO_CALLBACK_SIGNAL_TYPE = 2; #[doc = "< This signal indicates extend action failed."] -pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_FAILED: - NRF_RADIO_CALLBACK_SIGNAL_TYPE = 3; +pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_FAILED: NRF_RADIO_CALLBACK_SIGNAL_TYPE = + 3; #[doc = "< This signal indicates extend action succeeded."] pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_SUCCEEDED: NRF_RADIO_CALLBACK_SIGNAL_TYPE = 4; #[doc = "@brief The Radio signal callback types."] pub type NRF_RADIO_CALLBACK_SIGNAL_TYPE = self::c_uint; #[doc = "< Return without action."] -pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_NONE: - NRF_RADIO_SIGNAL_CALLBACK_ACTION = 0; +pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_NONE: NRF_RADIO_SIGNAL_CALLBACK_ACTION = 0; #[doc = "< Request an extension of the current"] #[doc = "timeslot. Maximum execution time for this action:"] #[doc = "@ref NRF_RADIO_MAX_EXTENSION_PROCESSING_TIME_US."] #[doc = "This action must be started at least"] #[doc = "@ref NRF_RADIO_MIN_EXTENSION_MARGIN_US before"] #[doc = "the end of the timeslot."] -pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_EXTEND: - NRF_RADIO_SIGNAL_CALLBACK_ACTION = 1; +pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_EXTEND: NRF_RADIO_SIGNAL_CALLBACK_ACTION = + 1; #[doc = "< End the current radio timeslot."] -pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_END: - NRF_RADIO_SIGNAL_CALLBACK_ACTION = 2; +pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_END: NRF_RADIO_SIGNAL_CALLBACK_ACTION = 2; #[doc = "< Request a new radio timeslot and end the current timeslot."] pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_REQUEST_AND_END: NRF_RADIO_SIGNAL_CALLBACK_ACTION = 3; @@ -1071,9 +1055,7 @@ fn bindgen_test_layout_nrf_radio_request_earliest_t() { concat!("Alignment of ", stringify!(nrf_radio_request_earliest_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hfclk as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hfclk as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -1083,9 +1065,7 @@ fn bindgen_test_layout_nrf_radio_request_earliest_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).priority as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).priority as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -1095,9 +1075,7 @@ fn bindgen_test_layout_nrf_radio_request_earliest_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).length_us as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).length_us as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -1107,10 +1085,7 @@ fn bindgen_test_layout_nrf_radio_request_earliest_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).timeout_us as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).timeout_us as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -1146,9 +1121,7 @@ fn bindgen_test_layout_nrf_radio_request_normal_t() { concat!("Alignment of ", stringify!(nrf_radio_request_normal_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hfclk as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hfclk as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -1158,9 +1131,7 @@ fn bindgen_test_layout_nrf_radio_request_normal_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).priority as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).priority as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -1170,9 +1141,7 @@ fn bindgen_test_layout_nrf_radio_request_normal_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).distance_us as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).distance_us as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -1182,9 +1151,7 @@ fn bindgen_test_layout_nrf_radio_request_normal_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).length_us as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).length_us as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -1222,16 +1189,10 @@ fn bindgen_test_layout_nrf_radio_request_t__bindgen_ty_1() { assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(nrf_radio_request_t__bindgen_ty_1) - ) + concat!("Alignment of ", stringify!(nrf_radio_request_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).earliest as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).earliest as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -1241,10 +1202,7 @@ fn bindgen_test_layout_nrf_radio_request_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).normal as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).normal as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -1267,9 +1225,7 @@ fn bindgen_test_layout_nrf_radio_request_t() { concat!("Alignment of ", stringify!(nrf_radio_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).request_type as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).request_type as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -1316,8 +1272,7 @@ pub struct nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_1 #[test] fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_1() { assert_eq!( - ::core::mem::size_of::( - ), + ::core::mem::size_of::(), 4usize, concat!( "Size of: ", @@ -1325,8 +1280,7 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__b ) ); assert_eq!( - ::core::mem::align_of::( - ), + ::core::mem::align_of::(), 4usize, concat!( "Alignment of ", @@ -1335,10 +1289,8 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__b ); assert_eq!( unsafe { - &(*(::core::ptr::null::< - nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_1, - >())) - .p_next as *const _ as usize + &(*(::core::ptr::null::())).p_next + as *const _ as usize }, 0usize, concat!( @@ -1358,8 +1310,7 @@ pub struct nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_2 #[test] fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_2() { assert_eq!( - ::core::mem::size_of::( - ), + ::core::mem::size_of::(), 4usize, concat!( "Size of: ", @@ -1367,8 +1318,7 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__b ) ); assert_eq!( - ::core::mem::align_of::( - ), + ::core::mem::align_of::(), 4usize, concat!( "Alignment of ", @@ -1377,10 +1327,8 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__b ); assert_eq!( unsafe { - &(*(::core::ptr::null::< - nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_2, - >())) - .length_us as *const _ as usize + &(*(::core::ptr::null::())).length_us + as *const _ as usize }, 0usize, concat!( @@ -1411,8 +1359,8 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1() ); assert_eq!( unsafe { - &(*(::core::ptr::null::())) - .request as *const _ as usize + &(*(::core::ptr::null::())).request as *const _ + as usize }, 0usize, concat!( @@ -1424,8 +1372,8 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1() ); assert_eq!( unsafe { - &(*(::core::ptr::null::())) - .extend as *const _ as usize + &(*(::core::ptr::null::())).extend as *const _ + as usize }, 0usize, concat!( @@ -1441,23 +1389,16 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t() { assert_eq!( ::core::mem::size_of::(), 8usize, - concat!( - "Size of: ", - stringify!(nrf_radio_signal_callback_return_param_t) - ) + concat!("Size of: ", stringify!(nrf_radio_signal_callback_return_param_t)) ); assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(nrf_radio_signal_callback_return_param_t) - ) + concat!("Alignment of ", stringify!(nrf_radio_signal_callback_return_param_t)) ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).callback_action - as *const _ as usize + &(*(::core::ptr::null::())).callback_action as *const _ as usize }, 0usize, concat!( @@ -1468,10 +1409,7 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).params as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).params as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -1492,9 +1430,8 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t() { #[doc = " @param[in] signal_type Type of signal, see @ref NRF_RADIO_CALLBACK_SIGNAL_TYPE."] #[doc = ""] #[doc = " @return Pointer to structure containing action requested by the application."] -pub type nrf_radio_signal_callback_t = ::core::option::Option< - unsafe extern "C" fn(signal_type: u8) -> *mut nrf_radio_signal_callback_return_param_t, ->; +pub type nrf_radio_signal_callback_t = + ::core::option::Option *mut nrf_radio_signal_callback_return_param_t>; #[doc = "@brief AES ECB parameter typedefs"] pub type soc_ecb_key_t = [u8; 16usize]; pub type soc_ecb_cleartext_t = [u8; 16usize]; @@ -1588,9 +1525,7 @@ fn bindgen_test_layout_nrf_ecb_hal_data_block_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_cleartext as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_cleartext as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -1600,9 +1535,7 @@ fn bindgen_test_layout_nrf_ecb_hal_data_block_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_ciphertext as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_ciphertext as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -2310,10 +2243,7 @@ pub unsafe fn sd_ecb_block_encrypt(p_ecb_data: *mut nrf_ecb_hal_data_t) -> u32 { #[doc = ""] #[doc = " @retval ::NRF_SUCCESS"] #[inline(always)] -pub unsafe fn sd_ecb_blocks_encrypt( - block_count: u8, - p_data_blocks: *mut nrf_ecb_hal_data_block_t, -) -> u32 { +pub unsafe fn sd_ecb_blocks_encrypt(block_count: u8, p_data_blocks: *mut nrf_ecb_hal_data_block_t) -> u32 { let ret: u32; core::arch::asm!("svc 71", inout("r0") to_asm(block_count) => ret, @@ -2475,12 +2405,7 @@ pub unsafe fn sd_flash_page_erase(page_number: u32) -> u32 { #[doc = " @retval ::NRF_ERROR_NOT_SUPPORTED Non-zero value supplied to one or more of the unsupported parameters."] #[doc = " @retval ::NRF_SUCCESS Values successfully written to configuration registers."] #[inline(always)] -pub unsafe fn sd_flash_protect( - block_cfg0: u32, - block_cfg1: u32, - block_cfg2: u32, - block_cfg3: u32, -) -> u32 { +pub unsafe fn sd_flash_protect(block_cfg0: u32, block_cfg1: u32, block_cfg2: u32, block_cfg3: u32) -> u32 { let ret: u32; core::arch::asm!("svc 42", inout("r0") to_asm(block_cfg0) => ret, @@ -2707,9 +2632,7 @@ fn bindgen_test_layout_nrf_clock_lf_cfg_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rc_temp_ctiv as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rc_temp_ctiv as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -2748,8 +2671,7 @@ fn bindgen_test_layout_nrf_clock_lf_cfg_t() { #[doc = ""] #[doc = " @note When id is set to @ref NRF_FAULT_ID_APP_MEMACC, pc will contain the address of the instruction being executed at the time when"] #[doc = " the fault is detected by the CPU. The CPU program counter may have advanced up to 2 instructions (no branching) after the one that triggered the fault."] -pub type nrf_fault_handler_t = - ::core::option::Option; +pub type nrf_fault_handler_t = ::core::option::Option; #[doc = "@brief Enables the SoftDevice and by extension the protocol stack."] #[doc = ""] @@ -2912,22 +2834,12 @@ fn bindgen_test_layout_ble_uuid_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).uuid as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_uuid_t), - "::", - stringify!(uuid) - ) + concat!("Offset of field: ", stringify!(ble_uuid_t), "::", stringify!(uuid)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).type_ as *const _ as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(ble_uuid_t), - "::", - stringify!(type_) - ) + concat!("Offset of field: ", stringify!(ble_uuid_t), "::", stringify!(type_)) ); } #[doc = "@brief Data structure."] @@ -2954,22 +2866,12 @@ fn bindgen_test_layout_ble_data_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).p_data as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_data_t), - "::", - stringify!(p_data) - ) + concat!("Offset of field: ", stringify!(ble_data_t), "::", stringify!(p_data)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).len as *const _ as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(ble_data_t), - "::", - stringify!(len) - ) + concat!("Offset of field: ", stringify!(ble_data_t), "::", stringify!(len)) ); } #[doc = " @brief BLE GATT connection configuration parameters, set with @ref sd_ble_cfg_set."] @@ -3116,8 +3018,7 @@ impl ble_gatt_char_props_t { indicate: u8, auth_signed_wr: u8, ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let broadcast: u8 = unsafe { ::core::mem::transmute(broadcast) }; broadcast as u64 @@ -3193,8 +3094,7 @@ impl ble_gatt_char_ext_props_t { } #[inline] pub fn new_bitfield_1(reliable_wr: u8, wr_aux: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let reliable_wr: u8 = unsafe { ::core::mem::transmute(reliable_wr) }; reliable_wr as u64 @@ -3387,9 +3287,7 @@ fn bindgen_test_layout_sd_mbr_command_copy_bl_t() { concat!("Alignment of ", stringify!(sd_mbr_command_copy_bl_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).bl_src as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).bl_src as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3399,9 +3297,7 @@ fn bindgen_test_layout_sd_mbr_command_copy_bl_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).bl_len as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).bl_len as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -3443,24 +3339,15 @@ fn bindgen_test_layout_sd_mbr_command_vector_table_base_set_t() { assert_eq!( ::core::mem::size_of::(), 4usize, - concat!( - "Size of: ", - stringify!(sd_mbr_command_vector_table_base_set_t) - ) + concat!("Size of: ", stringify!(sd_mbr_command_vector_table_base_set_t)) ); assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(sd_mbr_command_vector_table_base_set_t) - ) + concat!("Alignment of ", stringify!(sd_mbr_command_vector_table_base_set_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).address as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).address as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3487,24 +3374,15 @@ fn bindgen_test_layout_sd_mbr_command_irq_forward_address_set_t() { assert_eq!( ::core::mem::size_of::(), 4usize, - concat!( - "Size of: ", - stringify!(sd_mbr_command_irq_forward_address_set_t) - ) + concat!("Size of: ", stringify!(sd_mbr_command_irq_forward_address_set_t)) ); assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(sd_mbr_command_irq_forward_address_set_t) - ) + concat!("Alignment of ", stringify!(sd_mbr_command_irq_forward_address_set_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).address - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).address as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3555,9 +3433,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(sd_mbr_command_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).copy_sd as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).copy_sd as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3567,9 +3443,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).compare as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).compare as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3579,9 +3453,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).copy_bl as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).copy_bl as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3591,10 +3463,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).base_set as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).base_set as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3605,8 +3474,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).irq_forward_address_set - as *const _ as usize + &(*(::core::ptr::null::())).irq_forward_address_set as *const _ as usize }, 0usize, concat!( @@ -3881,12 +3749,8 @@ impl ble_gap_adv_properties_t { } } #[inline] - pub fn new_bitfield_1( - anonymous: u8, - include_tx_power: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(anonymous: u8, include_tx_power: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let anonymous: u8 = unsafe { ::core::mem::transmute(anonymous) }; anonymous as u64 @@ -3921,12 +3785,7 @@ fn bindgen_test_layout_ble_gap_addr_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).addr as *const _ as usize }, 1usize, - concat!( - "Offset of field: ", - stringify!(ble_gap_addr_t), - "::", - stringify!(addr) - ) + concat!("Offset of field: ", stringify!(ble_gap_addr_t), "::", stringify!(addr)) ); } impl ble_gap_addr_t { @@ -3953,12 +3812,8 @@ impl ble_gap_addr_t { } } #[inline] - pub fn new_bitfield_1( - addr_id_peer: u8, - addr_type: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(addr_id_peer: u8, addr_type: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let addr_id_peer: u8 = unsafe { ::core::mem::transmute(addr_id_peer) }; addr_id_peer as u64 @@ -4005,10 +3860,7 @@ fn bindgen_test_layout_ble_gap_conn_params_t() { concat!("Alignment of ", stringify!(ble_gap_conn_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).min_conn_interval as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).min_conn_interval as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -4018,10 +3870,7 @@ fn bindgen_test_layout_ble_gap_conn_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_conn_interval as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).max_conn_interval as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -4031,9 +3880,7 @@ fn bindgen_test_layout_ble_gap_conn_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).slave_latency as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).slave_latency as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -4043,9 +3890,7 @@ fn bindgen_test_layout_ble_gap_conn_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_sup_timeout as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_sup_timeout as *const _ as usize }, 6usize, concat!( "Offset of field: ", @@ -4107,8 +3952,7 @@ impl ble_gap_conn_sec_mode_t { } #[inline] pub fn new_bitfield_1(sm: u8, lv: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { let sm: u8 = unsafe { ::core::mem::transmute(sm) }; sm as u64 @@ -4152,9 +3996,7 @@ fn bindgen_test_layout_ble_gap_conn_sec_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).encr_key_size as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).encr_key_size as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -4186,12 +4028,7 @@ fn bindgen_test_layout_ble_gap_irk_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).irk as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_gap_irk_t), - "::", - stringify!(irk) - ) + concat!("Offset of field: ", stringify!(ble_gap_irk_t), "::", stringify!(irk)) ); } #[doc = "@brief Channel mask (40 bits)."] @@ -4265,9 +4102,7 @@ fn bindgen_test_layout_ble_gap_adv_params_t() { concat!("Alignment of ", stringify!(ble_gap_adv_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).properties as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).properties as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -4277,9 +4112,7 @@ fn bindgen_test_layout_ble_gap_adv_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_peer_addr as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_peer_addr as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -4309,9 +4142,7 @@ fn bindgen_test_layout_ble_gap_adv_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_adv_evts as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).max_adv_evts as *const _ as usize }, 14usize, concat!( "Offset of field: ", @@ -4321,9 +4152,7 @@ fn bindgen_test_layout_ble_gap_adv_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).channel_mask as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).channel_mask as *const _ as usize }, 15usize, concat!( "Offset of field: ", @@ -4333,9 +4162,7 @@ fn bindgen_test_layout_ble_gap_adv_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).filter_policy as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).filter_policy as *const _ as usize }, 20usize, concat!( "Offset of field: ", @@ -4345,9 +4172,7 @@ fn bindgen_test_layout_ble_gap_adv_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).primary_phy as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).primary_phy as *const _ as usize }, 21usize, concat!( "Offset of field: ", @@ -4357,9 +4182,7 @@ fn bindgen_test_layout_ble_gap_adv_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).secondary_phy as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).secondary_phy as *const _ as usize }, 22usize, concat!( "Offset of field: ", @@ -4393,19 +4216,14 @@ impl ble_gap_adv_params_t { } } #[inline] - pub fn new_bitfield_1( - set_id: u8, - scan_req_notification: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(set_id: u8, scan_req_notification: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { let set_id: u8 = unsafe { ::core::mem::transmute(set_id) }; set_id as u64 }); __bindgen_bitfield_unit.set(4usize, 1u8, { - let scan_req_notification: u8 = - unsafe { ::core::mem::transmute(scan_req_notification) }; + let scan_req_notification: u8 = unsafe { ::core::mem::transmute(scan_req_notification) }; scan_req_notification as u64 }); __bindgen_bitfield_unit @@ -4458,9 +4276,7 @@ fn bindgen_test_layout_ble_gap_adv_data_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).scan_rsp_data as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).scan_rsp_data as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -4513,9 +4329,7 @@ fn bindgen_test_layout_ble_gap_privacy_params_t() { concat!("Alignment of ", stringify!(ble_gap_privacy_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).privacy_mode as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).privacy_mode as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -4525,10 +4339,7 @@ fn bindgen_test_layout_ble_gap_privacy_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).private_addr_type as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).private_addr_type as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -4538,10 +4349,7 @@ fn bindgen_test_layout_ble_gap_privacy_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).private_addr_cycle_s as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).private_addr_cycle_s as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -4551,9 +4359,7 @@ fn bindgen_test_layout_ble_gap_privacy_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_device_irk as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_device_irk as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -4676,14 +4482,8 @@ impl ble_gap_sec_kdist_t { } } #[inline] - pub fn new_bitfield_1( - enc: u8, - id: u8, - sign: u8, - link: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(enc: u8, id: u8, sign: u8, link: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let enc: u8 = unsafe { ::core::mem::transmute(enc) }; enc as u64 @@ -4730,9 +4530,7 @@ fn bindgen_test_layout_ble_gap_sec_params_t() { concat!("Alignment of ", stringify!(ble_gap_sec_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).min_key_size as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).min_key_size as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -4742,9 +4540,7 @@ fn bindgen_test_layout_ble_gap_sec_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_key_size as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).max_key_size as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -4764,9 +4560,7 @@ fn bindgen_test_layout_ble_gap_sec_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).kdist_peer as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).kdist_peer as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -4852,8 +4646,7 @@ impl ble_gap_sec_params_t { io_caps: u8, oob: u8, ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let bond: u8 = unsafe { ::core::mem::transmute(bond) }; bond as u64 @@ -4947,13 +4740,8 @@ impl ble_gap_enc_info_t { } } #[inline] - pub fn new_bitfield_1( - lesc: u8, - auth: u8, - ltk_len: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(lesc: u8, auth: u8, ltk_len: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let lesc: u8 = unsafe { ::core::mem::transmute(lesc) }; lesc as u64 @@ -5188,9 +4976,7 @@ fn bindgen_test_layout_ble_gap_evt_connected_t() { concat!("Alignment of ", stringify!(ble_gap_evt_connected_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).peer_addr as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).peer_addr as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5210,9 +4996,7 @@ fn bindgen_test_layout_ble_gap_evt_connected_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_params as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_params as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -5222,9 +5006,7 @@ fn bindgen_test_layout_ble_gap_evt_connected_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_handle as *const _ as usize }, 16usize, concat!( "Offset of field: ", @@ -5234,9 +5016,7 @@ fn bindgen_test_layout_ble_gap_evt_connected_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_data as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_data as *const _ as usize }, 20usize, concat!( "Offset of field: ", @@ -5266,9 +5046,7 @@ fn bindgen_test_layout_ble_gap_evt_disconnected_t() { concat!("Alignment of ", stringify!(ble_gap_evt_disconnected_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).reason as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).reason as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5298,10 +5076,7 @@ fn bindgen_test_layout_ble_gap_evt_conn_param_update_t() { concat!("Alignment of ", stringify!(ble_gap_evt_conn_param_update_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_params as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_params as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5328,15 +5103,11 @@ fn bindgen_test_layout_ble_gap_evt_phy_update_request_t() { assert_eq!( ::core::mem::align_of::(), 1usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_phy_update_request_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_phy_update_request_t)) ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).peer_preferred_phys - as *const _ as usize + &(*(::core::ptr::null::())).peer_preferred_phys as *const _ as usize }, 0usize, concat!( @@ -5371,9 +5142,7 @@ fn bindgen_test_layout_ble_gap_evt_phy_update_t() { concat!("Alignment of ", stringify!(ble_gap_evt_phy_update_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).status as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).status as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5383,9 +5152,7 @@ fn bindgen_test_layout_ble_gap_evt_phy_update_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).tx_phy as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).tx_phy as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -5395,9 +5162,7 @@ fn bindgen_test_layout_ble_gap_evt_phy_update_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rx_phy as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rx_phy as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -5424,16 +5189,10 @@ fn bindgen_test_layout_ble_gap_evt_sec_params_request_t() { assert_eq!( ::core::mem::align_of::(), 1usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_sec_params_request_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_sec_params_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).peer_params as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).peer_params as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5467,10 +5226,7 @@ fn bindgen_test_layout_ble_gap_evt_sec_info_request_t() { concat!("Alignment of ", stringify!(ble_gap_evt_sec_info_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).peer_addr as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).peer_addr as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5480,10 +5236,7 @@ fn bindgen_test_layout_ble_gap_evt_sec_info_request_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).master_id as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).master_id as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -5528,13 +5281,8 @@ impl ble_gap_evt_sec_info_request_t { } } #[inline] - pub fn new_bitfield_1( - enc_info: u8, - id_info: u8, - sign_info: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(enc_info: u8, id_info: u8, sign_info: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let enc_info: u8 = unsafe { ::core::mem::transmute(enc_info) }; enc_info as u64 @@ -5571,9 +5319,7 @@ fn bindgen_test_layout_ble_gap_evt_passkey_display_t() { concat!("Alignment of ", stringify!(ble_gap_evt_passkey_display_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).passkey as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).passkey as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5597,8 +5343,7 @@ impl ble_gap_evt_passkey_display_t { } #[inline] pub fn new_bitfield_1(match_request: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let match_request: u8 = unsafe { ::core::mem::transmute(match_request) }; match_request as u64 @@ -5626,9 +5371,7 @@ fn bindgen_test_layout_ble_gap_evt_key_pressed_t() { concat!("Alignment of ", stringify!(ble_gap_evt_key_pressed_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).kp_not as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).kp_not as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5658,10 +5401,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_key_request_t() { concat!("Alignment of ", stringify!(ble_gap_evt_auth_key_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).key_type as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).key_type as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5691,16 +5431,10 @@ fn bindgen_test_layout_ble_gap_evt_lesc_dhkey_request_t() { assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_lesc_dhkey_request_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_lesc_dhkey_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_pk_peer as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).p_pk_peer as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5724,8 +5458,7 @@ impl ble_gap_evt_lesc_dhkey_request_t { } #[inline] pub fn new_bitfield_1(oobd_req: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let oobd_req: u8 = unsafe { ::core::mem::transmute(oobd_req) }; oobd_req as u64 @@ -5799,14 +5532,8 @@ impl ble_gap_sec_levels_t { } } #[inline] - pub fn new_bitfield_1( - lv1: u8, - lv2: u8, - lv3: u8, - lv4: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(lv1: u8, lv2: u8, lv3: u8, lv4: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let lv1: u8 = unsafe { ::core::mem::transmute(lv1) }; lv1 as u64 @@ -6048,9 +5775,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_status_t() { concat!("Alignment of ", stringify!(ble_gap_evt_auth_status_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).auth_status as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).auth_status as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6060,9 +5785,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_status_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sm1_levels as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).sm1_levels as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -6072,9 +5795,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_status_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sm2_levels as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).sm2_levels as *const _ as usize }, 3usize, concat!( "Offset of field: ", @@ -6084,9 +5805,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_status_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).kdist_own as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).kdist_own as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -6096,9 +5815,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_status_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).kdist_peer as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).kdist_peer as *const _ as usize }, 5usize, concat!( "Offset of field: ", @@ -6143,13 +5860,8 @@ impl ble_gap_evt_auth_status_t { } } #[inline] - pub fn new_bitfield_1( - error_src: u8, - bonded: u8, - lesc: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(error_src: u8, bonded: u8, lesc: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 2u8, { let error_src: u8 = unsafe { ::core::mem::transmute(error_src) }; error_src as u64 @@ -6185,9 +5897,7 @@ fn bindgen_test_layout_ble_gap_evt_conn_sec_update_t() { concat!("Alignment of ", stringify!(ble_gap_evt_conn_sec_update_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_sec as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_sec as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6249,9 +5959,7 @@ fn bindgen_test_layout_ble_gap_evt_rssi_changed_t() { concat!("Alignment of ", stringify!(ble_gap_evt_rssi_changed_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rssi as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rssi as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6261,9 +5969,7 @@ fn bindgen_test_layout_ble_gap_evt_rssi_changed_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ch_index as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).ch_index as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -6300,16 +6006,10 @@ fn bindgen_test_layout_ble_gap_evt_adv_set_terminated_t() { assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_adv_set_terminated_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_adv_set_terminated_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).reason as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).reason as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6319,10 +6019,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_set_terminated_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_handle as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_handle as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -6333,8 +6030,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_set_terminated_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).num_completed_adv_events - as *const _ as usize + &(*(::core::ptr::null::())).num_completed_adv_events as *const _ as usize }, 2usize, concat!( @@ -6345,10 +6041,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_set_terminated_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_data as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_data as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -6423,14 +6116,8 @@ impl ble_gap_evt_sec_request_t { } } #[inline] - pub fn new_bitfield_1( - bond: u8, - mitm: u8, - lesc: u8, - keypress: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(bond: u8, mitm: u8, lesc: u8, keypress: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let bond: u8 = unsafe { ::core::mem::transmute(bond) }; bond as u64 @@ -6475,10 +6162,7 @@ fn bindgen_test_layout_ble_gap_evt_scan_req_report_t() { concat!("Alignment of ", stringify!(ble_gap_evt_scan_req_report_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_handle as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6488,9 +6172,7 @@ fn bindgen_test_layout_ble_gap_evt_scan_req_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rssi as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rssi as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -6500,10 +6182,7 @@ fn bindgen_test_layout_ble_gap_evt_scan_req_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).peer_addr as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).peer_addr as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -6576,9 +6255,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_gap_evt_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).connected as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).connected as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6588,10 +6265,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).disconnected as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).disconnected as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6601,10 +6275,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_param_update as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_param_update as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6614,10 +6285,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sec_params_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).sec_params_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6627,10 +6295,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sec_info_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).sec_info_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6640,10 +6305,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).passkey_display as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).passkey_display as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6653,10 +6315,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).key_pressed as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).key_pressed as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6666,10 +6325,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).auth_key_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).auth_key_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6679,10 +6335,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).lesc_dhkey_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).lesc_dhkey_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6692,10 +6345,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).auth_status as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).auth_status as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6705,10 +6355,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_sec_update as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_sec_update as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6718,9 +6365,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).timeout as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).timeout as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6730,10 +6375,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rssi_changed as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).rssi_changed as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6743,10 +6385,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_set_terminated as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_set_terminated as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6756,10 +6395,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sec_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).sec_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6769,10 +6405,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).scan_req_report as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).scan_req_report as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6782,10 +6415,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).phy_update_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).phy_update_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6795,9 +6425,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).phy_update as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).phy_update as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6832,12 +6460,7 @@ fn bindgen_test_layout_ble_gap_evt_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).params as *const _ as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(ble_gap_evt_t), - "::", - stringify!(params) - ) + concat!("Offset of field: ", stringify!(ble_gap_evt_t), "::", stringify!(params)) ); } #[doc = " @brief BLE GAP connection configuration parameters, set with @ref sd_ble_cfg_set."] @@ -6882,9 +6505,7 @@ fn bindgen_test_layout_ble_gap_conn_cfg_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).event_length as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).event_length as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -6924,9 +6545,7 @@ fn bindgen_test_layout_ble_gap_cfg_role_count_t() { concat!("Alignment of ", stringify!(ble_gap_cfg_role_count_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_set_count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_set_count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6936,10 +6555,7 @@ fn bindgen_test_layout_ble_gap_cfg_role_count_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).periph_role_count as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).periph_role_count as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -7001,9 +6617,7 @@ fn bindgen_test_layout_ble_gap_cfg_device_name_t() { concat!("Alignment of ", stringify!(ble_gap_cfg_device_name_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write_perm as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).write_perm as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7013,9 +6627,7 @@ fn bindgen_test_layout_ble_gap_cfg_device_name_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_value as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_value as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -7025,9 +6637,7 @@ fn bindgen_test_layout_ble_gap_cfg_device_name_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).current_len as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).current_len as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -7037,9 +6647,7 @@ fn bindgen_test_layout_ble_gap_cfg_device_name_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_len as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).max_len as *const _ as usize }, 10usize, concat!( "Offset of field: ", @@ -7063,8 +6671,7 @@ impl ble_gap_cfg_device_name_t { } #[inline] pub fn new_bitfield_1(vloc: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 2u8, { let vloc: u8 = unsafe { ::core::mem::transmute(vloc) }; vloc as u64 @@ -7093,10 +6700,7 @@ fn bindgen_test_layout_ble_gap_cfg_ppcp_incl_cfg_t() { concat!("Alignment of ", stringify!(ble_gap_cfg_ppcp_incl_cfg_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).include_cfg as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).include_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7127,9 +6731,7 @@ fn bindgen_test_layout_ble_gap_cfg_car_incl_cfg_t() { concat!("Alignment of ", stringify!(ble_gap_cfg_car_incl_cfg_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).include_cfg as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).include_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7252,9 +6854,7 @@ fn bindgen_test_layout_ble_gap_opt_ch_map_t() { concat!("Alignment of ", stringify!(ble_gap_opt_ch_map_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7315,16 +6915,10 @@ fn bindgen_test_layout_ble_gap_opt_local_conn_latency_t() { assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(ble_gap_opt_local_conn_latency_t) - ) + concat!("Alignment of ", stringify!(ble_gap_opt_local_conn_latency_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_handle as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7334,10 +6928,7 @@ fn bindgen_test_layout_ble_gap_opt_local_conn_latency_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).requested_latency - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).requested_latency as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -7347,10 +6938,7 @@ fn bindgen_test_layout_ble_gap_opt_local_conn_latency_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_actual_latency - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_actual_latency as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -7389,16 +6977,10 @@ fn bindgen_test_layout_ble_gap_opt_slave_latency_disable_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gap_opt_slave_latency_disable_t) - ) + concat!("Alignment of ", stringify!(ble_gap_opt_slave_latency_disable_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_handle as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7422,8 +7004,7 @@ impl ble_gap_opt_slave_latency_disable_t { } #[inline] pub fn new_bitfield_1(disable: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let disable: u8 = unsafe { ::core::mem::transmute(disable) }; disable as u64 @@ -7464,9 +7045,7 @@ fn bindgen_test_layout_ble_gap_opt_passkey_t() { concat!("Alignment of ", stringify!(ble_gap_opt_passkey_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_passkey as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_passkey as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7512,16 +7091,10 @@ fn bindgen_test_layout_ble_gap_opt_auth_payload_timeout_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gap_opt_auth_payload_timeout_t) - ) + concat!("Alignment of ", stringify!(ble_gap_opt_auth_payload_timeout_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_handle as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7532,8 +7105,7 @@ fn bindgen_test_layout_ble_gap_opt_auth_payload_timeout_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).auth_payload_timeout - as *const _ as usize + &(*(::core::ptr::null::())).auth_payload_timeout as *const _ as usize }, 2usize, concat!( @@ -7575,17 +7147,10 @@ fn bindgen_test_layout_ble_gap_opt_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).ch_map as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_gap_opt_t), - "::", - stringify!(ch_map) - ) + concat!("Offset of field: ", stringify!(ble_gap_opt_t), "::", stringify!(ch_map)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).local_conn_latency as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).local_conn_latency as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7605,9 +7170,7 @@ fn bindgen_test_layout_ble_gap_opt_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).auth_payload_timeout as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).auth_payload_timeout as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7617,9 +7180,7 @@ fn bindgen_test_layout_ble_gap_opt_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).slave_latency_disable as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).slave_latency_disable as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8008,10 +7569,7 @@ pub unsafe fn sd_ble_gap_adv_stop(adv_handle: u8) -> u32 { #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."] #[doc = " @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation."] #[inline(always)] -pub unsafe fn sd_ble_gap_conn_param_update( - conn_handle: u16, - p_conn_params: *const ble_gap_conn_params_t, -) -> u32 { +pub unsafe fn sd_ble_gap_conn_param_update(conn_handle: u16, p_conn_params: *const ble_gap_conn_params_t) -> u32 { let ret: u32; core::arch::asm!("svc 117", inout("r0") to_asm(conn_handle) => ret, @@ -8262,10 +7820,7 @@ pub unsafe fn sd_ble_gap_device_name_get(p_dev_name: *mut u8, p_len: *mut u16) - #[doc = " @retval ::NRF_ERROR_NO_MEM The maximum number of authentication procedures that can run in parallel for the given role is reached."] #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."] #[inline(always)] -pub unsafe fn sd_ble_gap_authenticate( - conn_handle: u16, - p_sec_params: *const ble_gap_sec_params_t, -) -> u32 { +pub unsafe fn sd_ble_gap_authenticate(conn_handle: u16, p_sec_params: *const ble_gap_sec_params_t) -> u32 { let ret: u32; core::arch::asm!("svc 126", inout("r0") to_asm(conn_handle) => ret, @@ -8408,10 +7963,7 @@ pub unsafe fn sd_ble_gap_auth_key_reply(conn_handle: u16, key_type: u8, p_key: * #[doc = " - The application has not pulled a @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST event."] #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."] #[inline(always)] -pub unsafe fn sd_ble_gap_lesc_dhkey_reply( - conn_handle: u16, - p_dhkey: *const ble_gap_lesc_dhkey_t, -) -> u32 { +pub unsafe fn sd_ble_gap_lesc_dhkey_reply(conn_handle: u16, p_dhkey: *const ble_gap_lesc_dhkey_t) -> u32 { let ret: u32; core::arch::asm!("svc 129", inout("r0") to_asm(conn_handle) => ret, @@ -8579,10 +8131,7 @@ pub unsafe fn sd_ble_gap_sec_info_reply( #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."] #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."] #[inline(always)] -pub unsafe fn sd_ble_gap_conn_sec_get( - conn_handle: u16, - p_conn_sec: *mut ble_gap_conn_sec_t, -) -> u32 { +pub unsafe fn sd_ble_gap_conn_sec_get(conn_handle: u16, p_conn_sec: *mut ble_gap_conn_sec_t) -> u32 { let ret: u32; core::arch::asm!("svc 135", inout("r0") to_asm(conn_handle) => ret, @@ -8853,10 +8402,7 @@ fn bindgen_test_layout_ble_gattc_conn_cfg_t() { concat!("Alignment of ", stringify!(ble_gattc_conn_cfg_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write_cmd_tx_queue_size as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).write_cmd_tx_queue_size as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8888,9 +8434,7 @@ fn bindgen_test_layout_ble_gattc_handle_range_t() { concat!("Alignment of ", stringify!(ble_gattc_handle_range_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).start_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).start_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8900,9 +8444,7 @@ fn bindgen_test_layout_ble_gattc_handle_range_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).end_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).end_handle as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -8944,9 +8486,7 @@ fn bindgen_test_layout_ble_gattc_service_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle_range as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle_range as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -8988,9 +8528,7 @@ fn bindgen_test_layout_ble_gattc_include_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).included_srvc as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).included_srvc as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -9081,8 +8619,7 @@ impl ble_gattc_char_t { } #[inline] pub fn new_bitfield_1(char_ext_props: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let char_ext_props: u8 = unsafe { ::core::mem::transmute(char_ext_props) }; char_ext_props as u64 @@ -9162,9 +8699,7 @@ fn bindgen_test_layout_ble_gattc_write_params_t() { concat!("Alignment of ", stringify!(ble_gattc_write_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write_op as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).write_op as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -9184,9 +8719,7 @@ fn bindgen_test_layout_ble_gattc_write_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -9196,9 +8729,7 @@ fn bindgen_test_layout_ble_gattc_write_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).offset as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).offset as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -9218,9 +8749,7 @@ fn bindgen_test_layout_ble_gattc_write_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_value as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_value as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -9294,9 +8823,7 @@ fn bindgen_test_layout_ble_gattc_attr_info128_t() { concat!("Alignment of ", stringify!(ble_gattc_attr_info128_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -9336,16 +8863,10 @@ fn bindgen_test_layout_ble_gattc_evt_prim_srvc_disc_rsp_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_prim_srvc_disc_rsp_t) - ) + concat!("Alignment of ", stringify!(ble_gattc_evt_prim_srvc_disc_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -9355,10 +8876,7 @@ fn bindgen_test_layout_ble_gattc_evt_prim_srvc_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).services as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).services as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -9391,9 +8909,7 @@ fn bindgen_test_layout_ble_gattc_evt_rel_disc_rsp_t() { concat!("Alignment of ", stringify!(ble_gattc_evt_rel_disc_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -9403,9 +8919,7 @@ fn bindgen_test_layout_ble_gattc_evt_rel_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).includes as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).includes as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -9438,9 +8952,7 @@ fn bindgen_test_layout_ble_gattc_evt_char_disc_rsp_t() { concat!("Alignment of ", stringify!(ble_gattc_evt_char_disc_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -9450,9 +8962,7 @@ fn bindgen_test_layout_ble_gattc_evt_char_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).chars as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).chars as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -9485,9 +8995,7 @@ fn bindgen_test_layout_ble_gattc_evt_desc_disc_rsp_t() { concat!("Alignment of ", stringify!(ble_gattc_evt_desc_disc_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -9497,9 +9005,7 @@ fn bindgen_test_layout_ble_gattc_evt_desc_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).descs as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).descs as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -9551,8 +9057,8 @@ fn bindgen_test_layout_ble_gattc_evt_attr_info_disc_rsp_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())) - .attr_info16 as *const _ as usize + &(*(::core::ptr::null::())).attr_info16 as *const _ + as usize }, 0usize, concat!( @@ -9564,8 +9070,8 @@ fn bindgen_test_layout_ble_gattc_evt_attr_info_disc_rsp_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())) - .attr_info128 as *const _ as usize + &(*(::core::ptr::null::())).attr_info128 as *const _ + as usize }, 0usize, concat!( @@ -9586,16 +9092,10 @@ fn bindgen_test_layout_ble_gattc_evt_attr_info_disc_rsp_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_attr_info_disc_rsp_t) - ) + concat!("Alignment of ", stringify!(ble_gattc_evt_attr_info_disc_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -9605,10 +9105,7 @@ fn bindgen_test_layout_ble_gattc_evt_attr_info_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).format as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).format as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -9618,10 +9115,7 @@ fn bindgen_test_layout_ble_gattc_evt_attr_info_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).info as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).info as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -9653,9 +9147,7 @@ fn bindgen_test_layout_ble_gattc_handle_value_t() { concat!("Alignment of ", stringify!(ble_gattc_handle_value_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -9665,9 +9157,7 @@ fn bindgen_test_layout_ble_gattc_handle_value_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_value as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_value as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -9695,24 +9185,15 @@ fn bindgen_test_layout_ble_gattc_evt_char_val_by_uuid_read_rsp_t() { assert_eq!( ::core::mem::size_of::(), 4usize, - concat!( - "Size of: ", - stringify!(ble_gattc_evt_char_val_by_uuid_read_rsp_t) - ) + concat!("Size of: ", stringify!(ble_gattc_evt_char_val_by_uuid_read_rsp_t)) ); assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_char_val_by_uuid_read_rsp_t) - ) + concat!("Alignment of ", stringify!(ble_gattc_evt_char_val_by_uuid_read_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -9723,8 +9204,7 @@ fn bindgen_test_layout_ble_gattc_evt_char_val_by_uuid_read_rsp_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).value_len - as *const _ as usize + &(*(::core::ptr::null::())).value_len as *const _ as usize }, 2usize, concat!( @@ -9736,8 +9216,7 @@ fn bindgen_test_layout_ble_gattc_evt_char_val_by_uuid_read_rsp_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).handle_value - as *const _ as usize + &(*(::core::ptr::null::())).handle_value as *const _ as usize }, 4usize, concat!( @@ -9775,9 +9254,7 @@ fn bindgen_test_layout_ble_gattc_evt_read_rsp_t() { concat!("Alignment of ", stringify!(ble_gattc_evt_read_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -9787,9 +9264,7 @@ fn bindgen_test_layout_ble_gattc_evt_read_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).offset as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).offset as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -9839,15 +9314,10 @@ fn bindgen_test_layout_ble_gattc_evt_char_vals_read_rsp_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_char_vals_read_rsp_t) - ) + concat!("Alignment of ", stringify!(ble_gattc_evt_char_vals_read_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).len as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).len as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -9857,10 +9327,7 @@ fn bindgen_test_layout_ble_gattc_evt_char_vals_read_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).values as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).values as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -9899,9 +9366,7 @@ fn bindgen_test_layout_ble_gattc_evt_write_rsp_t() { concat!("Alignment of ", stringify!(ble_gattc_evt_write_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -9911,9 +9376,7 @@ fn bindgen_test_layout_ble_gattc_evt_write_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write_op as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).write_op as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -9923,9 +9386,7 @@ fn bindgen_test_layout_ble_gattc_evt_write_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).offset as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).offset as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -10039,16 +9500,10 @@ fn bindgen_test_layout_ble_gattc_evt_exchange_mtu_rsp_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_exchange_mtu_rsp_t) - ) + concat!("Alignment of ", stringify!(ble_gattc_evt_exchange_mtu_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).server_rx_mtu as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).server_rx_mtu as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10100,24 +9555,15 @@ fn bindgen_test_layout_ble_gattc_evt_write_cmd_tx_complete_t() { assert_eq!( ::core::mem::size_of::(), 1usize, - concat!( - "Size of: ", - stringify!(ble_gattc_evt_write_cmd_tx_complete_t) - ) + concat!("Size of: ", stringify!(ble_gattc_evt_write_cmd_tx_complete_t)) ); assert_eq!( ::core::mem::align_of::(), 1usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_write_cmd_tx_complete_t) - ) + concat!("Alignment of ", stringify!(ble_gattc_evt_write_cmd_tx_complete_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10182,10 +9628,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_gattc_evt_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).prim_srvc_disc_rsp - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).prim_srvc_disc_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10195,10 +9638,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rel_disc_rsp as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).rel_disc_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10208,10 +9648,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).char_disc_rsp as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).char_disc_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10221,10 +9658,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).desc_disc_rsp as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).desc_disc_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10235,8 +9669,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).char_val_by_uuid_read_rsp - as *const _ as usize + &(*(::core::ptr::null::())).char_val_by_uuid_read_rsp as *const _ as usize }, 0usize, concat!( @@ -10247,9 +9680,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).read_rsp as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).read_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10259,10 +9690,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).char_vals_read_rsp - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).char_vals_read_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10272,10 +9700,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write_rsp as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).write_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10285,9 +9710,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hvx as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hvx as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10297,10 +9720,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).exchange_mtu_rsp as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).exchange_mtu_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10310,9 +9730,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).timeout as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).timeout as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10322,10 +9740,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).attr_info_disc_rsp - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).attr_info_disc_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10336,8 +9751,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).write_cmd_tx_complete - as *const _ as usize + &(*(::core::ptr::null::())).write_cmd_tx_complete as *const _ as usize }, 0usize, concat!( @@ -10662,11 +10076,7 @@ pub unsafe fn sd_ble_gattc_read(conn_handle: u16, handle: u16, offset: u16) -> u #[doc = " @retval ::NRF_ERROR_BUSY Client procedure already in progress."] #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."] #[inline(always)] -pub unsafe fn sd_ble_gattc_char_values_read( - conn_handle: u16, - p_handles: *const u16, - handle_count: u16, -) -> u32 { +pub unsafe fn sd_ble_gattc_char_values_read(conn_handle: u16, p_handles: *const u16, handle_count: u16) -> u32 { let ret: u32; core::arch::asm!("svc 162", inout("r0") to_asm(conn_handle) => ret, @@ -10722,10 +10132,7 @@ pub unsafe fn sd_ble_gattc_char_values_read( #[doc = " Wait for a @ref BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE event and retry."] #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."] #[inline(always)] -pub unsafe fn sd_ble_gattc_write( - conn_handle: u16, - p_write_params: *const ble_gattc_write_params_t, -) -> u32 { +pub unsafe fn sd_ble_gattc_write(conn_handle: u16, p_write_params: *const ble_gattc_write_params_t) -> u32 { let ret: u32; core::arch::asm!("svc 163", inout("r0") to_asm(conn_handle) => ret, @@ -10915,9 +10322,7 @@ fn bindgen_test_layout_ble_gatts_conn_cfg_t() { concat!("Alignment of ", stringify!(ble_gatts_conn_cfg_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hvn_tx_queue_size as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hvn_tx_queue_size as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11016,14 +10421,8 @@ impl ble_gatts_attr_md_t { } } #[inline] - pub fn new_bitfield_1( - vlen: u8, - vloc: u8, - rd_auth: u8, - wr_auth: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(vlen: u8, vloc: u8, rd_auth: u8, wr_auth: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let vlen: u8 = unsafe { ::core::mem::transmute(vlen) }; vlen as u64 @@ -11315,9 +10714,7 @@ fn bindgen_test_layout_ble_gatts_char_md_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).char_ext_props as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).char_ext_props as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -11327,9 +10724,7 @@ fn bindgen_test_layout_ble_gatts_char_md_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_char_user_desc as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_char_user_desc as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -11339,10 +10734,7 @@ fn bindgen_test_layout_ble_gatts_char_md_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).char_user_desc_max_size as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).char_user_desc_max_size as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -11352,10 +10744,7 @@ fn bindgen_test_layout_ble_gatts_char_md_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).char_user_desc_size as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).char_user_desc_size as *const _ as usize }, 10usize, concat!( "Offset of field: ", @@ -11375,9 +10764,7 @@ fn bindgen_test_layout_ble_gatts_char_md_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_user_desc_md as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_user_desc_md as *const _ as usize }, 16usize, concat!( "Offset of field: ", @@ -11433,9 +10820,7 @@ fn bindgen_test_layout_ble_gatts_char_handles_t() { concat!("Alignment of ", stringify!(ble_gatts_char_handles_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).value_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).value_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11445,10 +10830,7 @@ fn bindgen_test_layout_ble_gatts_char_handles_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).user_desc_handle as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).user_desc_handle as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -11458,9 +10840,7 @@ fn bindgen_test_layout_ble_gatts_char_handles_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).cccd_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).cccd_handle as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -11470,9 +10850,7 @@ fn bindgen_test_layout_ble_gatts_char_handles_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sccd_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).sccd_handle as *const _ as usize }, 6usize, concat!( "Offset of field: ", @@ -11587,10 +10965,7 @@ fn bindgen_test_layout_ble_gatts_authorize_params_t() { concat!("Alignment of ", stringify!(ble_gatts_authorize_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gatt_status as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).gatt_status as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11600,9 +10975,7 @@ fn bindgen_test_layout_ble_gatts_authorize_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).offset as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).offset as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -11612,9 +10985,7 @@ fn bindgen_test_layout_ble_gatts_authorize_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).len as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).len as *const _ as usize }, 6usize, concat!( "Offset of field: ", @@ -11624,9 +10995,7 @@ fn bindgen_test_layout_ble_gatts_authorize_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_data as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_data as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -11650,8 +11019,7 @@ impl ble_gatts_authorize_params_t { } #[inline] pub fn new_bitfield_1(update: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let update: u8 = unsafe { ::core::mem::transmute(update) }; update as u64 @@ -11697,8 +11065,7 @@ fn bindgen_test_layout_ble_gatts_rw_authorize_reply_params_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).read - as *const _ as usize + &(*(::core::ptr::null::())).read as *const _ as usize }, 0usize, concat!( @@ -11710,8 +11077,7 @@ fn bindgen_test_layout_ble_gatts_rw_authorize_reply_params_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).write - as *const _ as usize + &(*(::core::ptr::null::())).write as *const _ as usize }, 0usize, concat!( @@ -11727,24 +11093,15 @@ fn bindgen_test_layout_ble_gatts_rw_authorize_reply_params_t() { assert_eq!( ::core::mem::size_of::(), 16usize, - concat!( - "Size of: ", - stringify!(ble_gatts_rw_authorize_reply_params_t) - ) + concat!("Size of: ", stringify!(ble_gatts_rw_authorize_reply_params_t)) ); assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(ble_gatts_rw_authorize_reply_params_t) - ) + concat!("Alignment of ", stringify!(ble_gatts_rw_authorize_reply_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).type_ as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).type_ as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11754,10 +11111,7 @@ fn bindgen_test_layout_ble_gatts_rw_authorize_reply_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).params as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).params as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -11800,8 +11154,7 @@ impl ble_gatts_cfg_service_changed_t { } #[inline] pub fn new_bitfield_1(service_changed: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let service_changed: u8 = unsafe { ::core::mem::transmute(service_changed) }; service_changed as u64 @@ -11834,10 +11187,7 @@ fn bindgen_test_layout_ble_gatts_cfg_attr_tab_size_t() { concat!("Alignment of ", stringify!(ble_gatts_cfg_attr_tab_size_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).attr_tab_size as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).attr_tab_size as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11870,9 +11220,7 @@ fn bindgen_test_layout_ble_gatts_cfg_t() { concat!("Alignment of ", stringify!(ble_gatts_cfg_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).service_changed as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).service_changed as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11955,9 +11303,7 @@ fn bindgen_test_layout_ble_gatts_evt_write_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).auth_required as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).auth_required as *const _ as usize }, 7usize, concat!( "Offset of field: ", @@ -12087,8 +11433,7 @@ fn bindgen_test_layout_ble_gatts_evt_rw_authorize_request_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).read - as *const _ as usize + &(*(::core::ptr::null::())).read as *const _ as usize }, 0usize, concat!( @@ -12100,8 +11445,7 @@ fn bindgen_test_layout_ble_gatts_evt_rw_authorize_request_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).write - as *const _ as usize + &(*(::core::ptr::null::())).write as *const _ as usize }, 0usize, concat!( @@ -12117,24 +11461,15 @@ fn bindgen_test_layout_ble_gatts_evt_rw_authorize_request_t() { assert_eq!( ::core::mem::size_of::(), 14usize, - concat!( - "Size of: ", - stringify!(ble_gatts_evt_rw_authorize_request_t) - ) + concat!("Size of: ", stringify!(ble_gatts_evt_rw_authorize_request_t)) ); assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gatts_evt_rw_authorize_request_t) - ) + concat!("Alignment of ", stringify!(ble_gatts_evt_rw_authorize_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).type_ as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).type_ as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12144,10 +11479,7 @@ fn bindgen_test_layout_ble_gatts_evt_rw_authorize_request_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).request as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -12174,15 +11506,10 @@ fn bindgen_test_layout_ble_gatts_evt_sys_attr_missing_t() { assert_eq!( ::core::mem::align_of::(), 1usize, - concat!( - "Alignment of ", - stringify!(ble_gatts_evt_sys_attr_missing_t) - ) + concat!("Alignment of ", stringify!(ble_gatts_evt_sys_attr_missing_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hint as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hint as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12234,24 +11561,15 @@ fn bindgen_test_layout_ble_gatts_evt_exchange_mtu_request_t() { assert_eq!( ::core::mem::size_of::(), 2usize, - concat!( - "Size of: ", - stringify!(ble_gatts_evt_exchange_mtu_request_t) - ) + concat!("Size of: ", stringify!(ble_gatts_evt_exchange_mtu_request_t)) ); assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gatts_evt_exchange_mtu_request_t) - ) + concat!("Alignment of ", stringify!(ble_gatts_evt_exchange_mtu_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).client_rx_mtu - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).client_rx_mtu as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12311,9 +11629,7 @@ fn bindgen_test_layout_ble_gatts_evt_hvn_tx_complete_t() { concat!("Alignment of ", stringify!(ble_gatts_evt_hvn_tx_complete_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12362,9 +11678,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_gatts_evt_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).write as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12374,10 +11688,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).authorize_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).authorize_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12387,10 +11698,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sys_attr_missing as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).sys_attr_missing as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12400,9 +11708,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hvc as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hvc as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12412,10 +11718,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).exchange_mtu_request - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).exchange_mtu_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12425,9 +11728,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).timeout as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).timeout as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12437,10 +11738,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hvn_tx_complete as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).hvn_tx_complete as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12503,11 +11801,7 @@ fn bindgen_test_layout_ble_gatts_evt_t() { #[doc = " @retval ::NRF_ERROR_FORBIDDEN Forbidden value supplied, certain UUIDs are reserved for the stack."] #[doc = " @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation."] #[inline(always)] -pub unsafe fn sd_ble_gatts_service_add( - type_: u8, - p_uuid: *const ble_uuid_t, - p_handle: *mut u16, -) -> u32 { +pub unsafe fn sd_ble_gatts_service_add(type_: u8, p_uuid: *const ble_uuid_t, p_handle: *mut u16) -> u32 { let ret: u32; core::arch::asm!("svc 168", inout("r0") to_asm(type_) => ret, @@ -12542,11 +11836,7 @@ pub unsafe fn sd_ble_gatts_service_add( #[doc = " @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation."] #[doc = " @retval ::NRF_ERROR_NOT_FOUND Attribute not found."] #[inline(always)] -pub unsafe fn sd_ble_gatts_include_add( - service_handle: u16, - inc_srvc_handle: u16, - p_include_handle: *mut u16, -) -> u32 { +pub unsafe fn sd_ble_gatts_include_add(service_handle: u16, inc_srvc_handle: u16, p_include_handle: *mut u16) -> u32 { let ret: u32; core::arch::asm!("svc 169", inout("r0") to_asm(service_handle) => ret, @@ -12658,11 +11948,7 @@ pub unsafe fn sd_ble_gatts_descriptor_add( #[doc = " @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied, attribute lengths are restricted by @ref BLE_GATTS_ATTR_LENS_MAX."] #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied on a system attribute."] #[inline(always)] -pub unsafe fn sd_ble_gatts_value_set( - conn_handle: u16, - handle: u16, - p_value: *mut ble_gatts_value_t, -) -> u32 { +pub unsafe fn sd_ble_gatts_value_set(conn_handle: u16, handle: u16, p_value: *mut ble_gatts_value_t) -> u32 { let ret: u32; core::arch::asm!("svc 172", inout("r0") to_asm(conn_handle) => ret, @@ -12696,11 +11982,7 @@ pub unsafe fn sd_ble_gatts_value_set( #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied on a system attribute."] #[doc = " @retval ::BLE_ERROR_GATTS_SYS_ATTR_MISSING System attributes missing, use @ref sd_ble_gatts_sys_attr_set to set them to a known value."] #[inline(always)] -pub unsafe fn sd_ble_gatts_value_get( - conn_handle: u16, - handle: u16, - p_value: *mut ble_gatts_value_t, -) -> u32 { +pub unsafe fn sd_ble_gatts_value_get(conn_handle: u16, handle: u16, p_value: *mut ble_gatts_value_t) -> u32 { let ret: u32; core::arch::asm!("svc 173", inout("r0") to_asm(conn_handle) => ret, @@ -12775,10 +12057,7 @@ pub unsafe fn sd_ble_gatts_value_get( #[doc = " Wait for a @ref BLE_GATTS_EVT_HVN_TX_COMPLETE event and retry."] #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."] #[inline(always)] -pub unsafe fn sd_ble_gatts_hvx( - conn_handle: u16, - p_hvx_params: *const ble_gatts_hvx_params_t, -) -> u32 { +pub unsafe fn sd_ble_gatts_hvx(conn_handle: u16, p_hvx_params: *const ble_gatts_hvx_params_t) -> u32 { let ret: u32; core::arch::asm!("svc 174", inout("r0") to_asm(conn_handle) => ret, @@ -12824,11 +12103,7 @@ pub unsafe fn sd_ble_gatts_hvx( #[doc = " @retval ::BLE_ERROR_GATTS_SYS_ATTR_MISSING System attributes missing, use @ref sd_ble_gatts_sys_attr_set to set them to a known value."] #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."] #[inline(always)] -pub unsafe fn sd_ble_gatts_service_changed( - conn_handle: u16, - start_handle: u16, - end_handle: u16, -) -> u32 { +pub unsafe fn sd_ble_gatts_service_changed(conn_handle: u16, start_handle: u16, end_handle: u16) -> u32 { let ret: u32; core::arch::asm!("svc 175", inout("r0") to_asm(conn_handle) => ret, @@ -12927,12 +12202,7 @@ pub unsafe fn sd_ble_gatts_rw_authorize_reply( #[doc = " @retval ::NRF_ERROR_INVALID_DATA Invalid data supplied, the data should be exactly the same as retrieved with @ref sd_ble_gatts_sys_attr_get."] #[doc = " @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation."] #[inline(always)] -pub unsafe fn sd_ble_gatts_sys_attr_set( - conn_handle: u16, - p_sys_attr_data: *const u8, - len: u16, - flags: u32, -) -> u32 { +pub unsafe fn sd_ble_gatts_sys_attr_set(conn_handle: u16, p_sys_attr_data: *const u8, len: u16, flags: u32) -> u32 { let ret: u32; core::arch::asm!("svc 177", inout("r0") to_asm(conn_handle) => ret, @@ -13021,11 +12291,7 @@ pub unsafe fn sd_ble_gatts_initial_user_handle_get(p_handle: *mut u16) -> u32 { #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameters supplied. Returned when both @c p_uuid and @c p_md are NULL."] #[doc = " @retval ::NRF_ERROR_NOT_FOUND Attribute was not found."] #[inline(always)] -pub unsafe fn sd_ble_gatts_attr_get( - handle: u16, - p_uuid: *mut ble_uuid_t, - p_md: *mut ble_gatts_attr_md_t, -) -> u32 { +pub unsafe fn sd_ble_gatts_attr_get(handle: u16, p_uuid: *mut ble_uuid_t, p_md: *mut ble_gatts_attr_md_t) -> u32 { let ret: u32; core::arch::asm!("svc 180", inout("r0") to_asm(handle) => ret, @@ -13196,9 +12462,7 @@ fn bindgen_test_layout_ble_evt_user_mem_request_t() { concat!("Alignment of ", stringify!(ble_evt_user_mem_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).type_ as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).type_ as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13230,9 +12494,7 @@ fn bindgen_test_layout_ble_evt_user_mem_release_t() { concat!("Alignment of ", stringify!(ble_evt_user_mem_release_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).type_ as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).type_ as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13242,9 +12504,7 @@ fn bindgen_test_layout_ble_evt_user_mem_release_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).mem_block as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).mem_block as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -13285,10 +12545,7 @@ fn bindgen_test_layout_ble_common_evt_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_common_evt_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).user_mem_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).user_mem_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13298,10 +12555,7 @@ fn bindgen_test_layout_ble_common_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).user_mem_release as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).user_mem_release as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13368,12 +12622,7 @@ fn bindgen_test_layout_ble_evt_hdr_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).evt_id as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_evt_hdr_t), - "::", - stringify!(evt_id) - ) + concat!("Offset of field: ", stringify!(ble_evt_hdr_t), "::", stringify!(evt_id)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).evt_len as *const _ as usize }, @@ -13419,9 +12668,7 @@ fn bindgen_test_layout_ble_evt_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_evt_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).common_evt as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).common_evt as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13431,9 +12678,7 @@ fn bindgen_test_layout_ble_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gap_evt as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).gap_evt as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13443,9 +12688,7 @@ fn bindgen_test_layout_ble_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gattc_evt as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).gattc_evt as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13455,9 +12698,7 @@ fn bindgen_test_layout_ble_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gatts_evt as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).gatts_evt as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13482,22 +12723,12 @@ fn bindgen_test_layout_ble_evt_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).header as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_evt_t), - "::", - stringify!(header) - ) + concat!("Offset of field: ", stringify!(ble_evt_t), "::", stringify!(header)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).evt as *const _ as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(ble_evt_t), - "::", - stringify!(evt) - ) + concat!("Offset of field: ", stringify!(ble_evt_t), "::", stringify!(evt)) ); } #[doc = " @brief Version Information."] @@ -13544,9 +12775,7 @@ fn bindgen_test_layout_ble_version_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).subversion_number as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).subversion_number as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -13610,13 +12839,8 @@ impl ble_pa_lna_cfg_t { } } #[inline] - pub fn new_bitfield_1( - enable: u8, - active_high: u8, - gpio_pin: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(enable: u8, active_high: u8, gpio_pin: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let enable: u8 = unsafe { ::core::mem::transmute(enable) }; enable as u64 @@ -13680,9 +12904,7 @@ fn bindgen_test_layout_ble_common_opt_pa_lna_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).lna_cfg as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).lna_cfg as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -13692,9 +12914,7 @@ fn bindgen_test_layout_ble_common_opt_pa_lna_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ppi_ch_id_set as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).ppi_ch_id_set as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -13704,9 +12924,7 @@ fn bindgen_test_layout_ble_common_opt_pa_lna_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ppi_ch_id_clr as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).ppi_ch_id_clr as *const _ as usize }, 3usize, concat!( "Offset of field: ", @@ -13716,9 +12934,7 @@ fn bindgen_test_layout_ble_common_opt_pa_lna_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gpiote_ch_id as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).gpiote_ch_id as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -13769,8 +12985,7 @@ impl ble_common_opt_conn_evt_ext_t { } #[inline] pub fn new_bitfield_1(enable: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let enable: u8 = unsafe { ::core::mem::transmute(enable) }; enable as u64 @@ -13806,10 +13021,7 @@ fn bindgen_test_layout_ble_common_opt_extended_rc_cal_t() { assert_eq!( ::core::mem::align_of::(), 1usize, - concat!( - "Alignment of ", - stringify!(ble_common_opt_extended_rc_cal_t) - ) + concat!("Alignment of ", stringify!(ble_common_opt_extended_rc_cal_t)) ); } impl ble_common_opt_extended_rc_cal_t { @@ -13826,8 +13038,7 @@ impl ble_common_opt_extended_rc_cal_t { } #[inline] pub fn new_bitfield_1(enable: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let enable: u8 = unsafe { ::core::mem::transmute(enable) }; enable as u64 @@ -13880,9 +13091,7 @@ fn bindgen_test_layout_ble_common_opt_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).extended_rc_cal as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).extended_rc_cal as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13917,22 +13126,12 @@ fn bindgen_test_layout_ble_opt_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).common_opt as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_opt_t), - "::", - stringify!(common_opt) - ) + concat!("Offset of field: ", stringify!(ble_opt_t), "::", stringify!(common_opt)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).gap_opt as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_opt_t), - "::", - stringify!(gap_opt) - ) + concat!("Offset of field: ", stringify!(ble_opt_t), "::", stringify!(gap_opt)) ); } #[doc = "@brief BLE connection configuration type, wrapping the module specific configurations, set with"] @@ -13987,10 +13186,7 @@ fn bindgen_test_layout_ble_conn_cfg_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_conn_cfg_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gap_conn_cfg as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).gap_conn_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14000,10 +13196,7 @@ fn bindgen_test_layout_ble_conn_cfg_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gattc_conn_cfg as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).gattc_conn_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14013,10 +13206,7 @@ fn bindgen_test_layout_ble_conn_cfg_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gatts_conn_cfg as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).gatts_conn_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14026,10 +13216,7 @@ fn bindgen_test_layout_ble_conn_cfg_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gatt_conn_cfg as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).gatt_conn_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14096,9 +13283,7 @@ fn bindgen_test_layout_ble_common_cfg_vs_uuid_t() { concat!("Alignment of ", stringify!(ble_common_cfg_vs_uuid_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).vs_uuid_count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).vs_uuid_count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14168,42 +13353,22 @@ fn bindgen_test_layout_ble_cfg_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).conn_cfg as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_cfg_t), - "::", - stringify!(conn_cfg) - ) + concat!("Offset of field: ", stringify!(ble_cfg_t), "::", stringify!(conn_cfg)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).common_cfg as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_cfg_t), - "::", - stringify!(common_cfg) - ) + concat!("Offset of field: ", stringify!(ble_cfg_t), "::", stringify!(common_cfg)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).gap_cfg as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_cfg_t), - "::", - stringify!(gap_cfg) - ) + concat!("Offset of field: ", stringify!(ble_cfg_t), "::", stringify!(gap_cfg)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).gatts_cfg as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_cfg_t), - "::", - stringify!(gatts_cfg) - ) + concat!("Offset of field: ", stringify!(ble_cfg_t), "::", stringify!(gatts_cfg)) ); } @@ -14431,11 +13596,7 @@ pub unsafe fn sd_ble_uuid_vs_remove(p_uuid_type: *mut u8) -> u32 { #[doc = " @retval ::NRF_ERROR_INVALID_LENGTH Invalid UUID length."] #[doc = " @retval ::NRF_ERROR_NOT_FOUND For a 128-bit UUID, no match in the populated table of UUIDs."] #[inline(always)] -pub unsafe fn sd_ble_uuid_decode( - uuid_le_len: u8, - p_uuid_le: *const u8, - p_uuid: *mut ble_uuid_t, -) -> u32 { +pub unsafe fn sd_ble_uuid_decode(uuid_le_len: u8, p_uuid_le: *const u8, p_uuid: *mut ble_uuid_t) -> u32 { let ret: u32; core::arch::asm!("svc 99", inout("r0") to_asm(uuid_le_len) => ret, @@ -14459,11 +13620,7 @@ pub unsafe fn sd_ble_uuid_decode( #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."] #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid UUID type."] #[inline(always)] -pub unsafe fn sd_ble_uuid_encode( - p_uuid: *const ble_uuid_t, - p_uuid_le_len: *mut u8, - p_uuid_le: *mut u8, -) -> u32 { +pub unsafe fn sd_ble_uuid_encode(p_uuid: *const ble_uuid_t, p_uuid_le_len: *mut u8, p_uuid_le: *mut u8) -> u32 { let ret: u32; core::arch::asm!("svc 100", inout("r0") to_asm(p_uuid) => ret, diff --git a/nrf-softdevice-s113/src/bindings.rs b/nrf-softdevice-s113/src/bindings.rs index 8911cca..82fda54 100644 --- a/nrf-softdevice-s113/src/bindings.rs +++ b/nrf-softdevice-s113/src/bindings.rs @@ -950,73 +950,57 @@ pub const NRF_POWER_DCDC_MODES_NRF_POWER_DCDC_ENABLE: NRF_POWER_DCDC_MODES = 1; #[doc = "@brief DC/DC converter modes."] pub type NRF_POWER_DCDC_MODES = self::c_uint; #[doc = "< The event does not have a notification."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_NONE: - NRF_RADIO_NOTIFICATION_DISTANCES = 0; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_NONE: NRF_RADIO_NOTIFICATION_DISTANCES = 0; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_800US: - NRF_RADIO_NOTIFICATION_DISTANCES = 1; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_800US: NRF_RADIO_NOTIFICATION_DISTANCES = 1; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_1740US: - NRF_RADIO_NOTIFICATION_DISTANCES = 2; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_1740US: NRF_RADIO_NOTIFICATION_DISTANCES = 2; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_2680US: - NRF_RADIO_NOTIFICATION_DISTANCES = 3; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_2680US: NRF_RADIO_NOTIFICATION_DISTANCES = 3; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_3620US: - NRF_RADIO_NOTIFICATION_DISTANCES = 4; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_3620US: NRF_RADIO_NOTIFICATION_DISTANCES = 4; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_4560US: - NRF_RADIO_NOTIFICATION_DISTANCES = 5; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_4560US: NRF_RADIO_NOTIFICATION_DISTANCES = 5; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_5500US: - NRF_RADIO_NOTIFICATION_DISTANCES = 6; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_5500US: NRF_RADIO_NOTIFICATION_DISTANCES = 6; #[doc = "@brief Radio notification distances."] pub type NRF_RADIO_NOTIFICATION_DISTANCES = self::c_uint; #[doc = "< The event does not have a radio notification signal."] -pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_NONE: - NRF_RADIO_NOTIFICATION_TYPES = 0; +pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_NONE: NRF_RADIO_NOTIFICATION_TYPES = 0; #[doc = "< Using interrupt for notification when the radio will be enabled."] -pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_ACTIVE: - NRF_RADIO_NOTIFICATION_TYPES = 1; +pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_ACTIVE: NRF_RADIO_NOTIFICATION_TYPES = 1; #[doc = "< Using interrupt for notification when the radio has been disabled."] -pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_INACTIVE: - NRF_RADIO_NOTIFICATION_TYPES = 2; +pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_INACTIVE: NRF_RADIO_NOTIFICATION_TYPES = 2; #[doc = "< Using interrupt for notification both when the radio will be enabled and disabled."] -pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_BOTH: - NRF_RADIO_NOTIFICATION_TYPES = 3; +pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_BOTH: NRF_RADIO_NOTIFICATION_TYPES = 3; #[doc = "@brief Radio notification types."] pub type NRF_RADIO_NOTIFICATION_TYPES = self::c_uint; #[doc = "< This signal indicates the start of the radio timeslot."] -pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_START: - NRF_RADIO_CALLBACK_SIGNAL_TYPE = 0; +pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_START: NRF_RADIO_CALLBACK_SIGNAL_TYPE = 0; #[doc = "< This signal indicates the NRF_TIMER0 interrupt."] -pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_TIMER0: - NRF_RADIO_CALLBACK_SIGNAL_TYPE = 1; +pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_TIMER0: NRF_RADIO_CALLBACK_SIGNAL_TYPE = 1; #[doc = "< This signal indicates the NRF_RADIO interrupt."] -pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_RADIO: - NRF_RADIO_CALLBACK_SIGNAL_TYPE = 2; +pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_RADIO: NRF_RADIO_CALLBACK_SIGNAL_TYPE = 2; #[doc = "< This signal indicates extend action failed."] -pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_FAILED: - NRF_RADIO_CALLBACK_SIGNAL_TYPE = 3; +pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_FAILED: NRF_RADIO_CALLBACK_SIGNAL_TYPE = + 3; #[doc = "< This signal indicates extend action succeeded."] pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_SUCCEEDED: NRF_RADIO_CALLBACK_SIGNAL_TYPE = 4; #[doc = "@brief The Radio signal callback types."] pub type NRF_RADIO_CALLBACK_SIGNAL_TYPE = self::c_uint; #[doc = "< Return without action."] -pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_NONE: - NRF_RADIO_SIGNAL_CALLBACK_ACTION = 0; +pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_NONE: NRF_RADIO_SIGNAL_CALLBACK_ACTION = 0; #[doc = "< Request an extension of the current"] #[doc = "timeslot. Maximum execution time for this action:"] #[doc = "@ref NRF_RADIO_MAX_EXTENSION_PROCESSING_TIME_US."] #[doc = "This action must be started at least"] #[doc = "@ref NRF_RADIO_MIN_EXTENSION_MARGIN_US before"] #[doc = "the end of the timeslot."] -pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_EXTEND: - NRF_RADIO_SIGNAL_CALLBACK_ACTION = 1; +pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_EXTEND: NRF_RADIO_SIGNAL_CALLBACK_ACTION = + 1; #[doc = "< End the current radio timeslot."] -pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_END: - NRF_RADIO_SIGNAL_CALLBACK_ACTION = 2; +pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_END: NRF_RADIO_SIGNAL_CALLBACK_ACTION = 2; #[doc = "< Request a new radio timeslot and end the current timeslot."] pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_REQUEST_AND_END: NRF_RADIO_SIGNAL_CALLBACK_ACTION = 3; @@ -1109,9 +1093,7 @@ fn bindgen_test_layout_nrf_radio_request_earliest_t() { concat!("Alignment of ", stringify!(nrf_radio_request_earliest_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hfclk as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hfclk as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -1121,9 +1103,7 @@ fn bindgen_test_layout_nrf_radio_request_earliest_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).priority as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).priority as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -1133,9 +1113,7 @@ fn bindgen_test_layout_nrf_radio_request_earliest_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).length_us as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).length_us as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -1145,10 +1123,7 @@ fn bindgen_test_layout_nrf_radio_request_earliest_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).timeout_us as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).timeout_us as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -1184,9 +1159,7 @@ fn bindgen_test_layout_nrf_radio_request_normal_t() { concat!("Alignment of ", stringify!(nrf_radio_request_normal_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hfclk as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hfclk as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -1196,9 +1169,7 @@ fn bindgen_test_layout_nrf_radio_request_normal_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).priority as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).priority as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -1208,9 +1179,7 @@ fn bindgen_test_layout_nrf_radio_request_normal_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).distance_us as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).distance_us as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -1220,9 +1189,7 @@ fn bindgen_test_layout_nrf_radio_request_normal_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).length_us as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).length_us as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -1260,16 +1227,10 @@ fn bindgen_test_layout_nrf_radio_request_t__bindgen_ty_1() { assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(nrf_radio_request_t__bindgen_ty_1) - ) + concat!("Alignment of ", stringify!(nrf_radio_request_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).earliest as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).earliest as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -1279,10 +1240,7 @@ fn bindgen_test_layout_nrf_radio_request_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).normal as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).normal as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -1305,9 +1263,7 @@ fn bindgen_test_layout_nrf_radio_request_t() { concat!("Alignment of ", stringify!(nrf_radio_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).request_type as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).request_type as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -1354,8 +1310,7 @@ pub struct nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_1 #[test] fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_1() { assert_eq!( - ::core::mem::size_of::( - ), + ::core::mem::size_of::(), 4usize, concat!( "Size of: ", @@ -1363,8 +1318,7 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__b ) ); assert_eq!( - ::core::mem::align_of::( - ), + ::core::mem::align_of::(), 4usize, concat!( "Alignment of ", @@ -1373,10 +1327,8 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__b ); assert_eq!( unsafe { - &(*(::core::ptr::null::< - nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_1, - >())) - .p_next as *const _ as usize + &(*(::core::ptr::null::())).p_next + as *const _ as usize }, 0usize, concat!( @@ -1396,8 +1348,7 @@ pub struct nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_2 #[test] fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_2() { assert_eq!( - ::core::mem::size_of::( - ), + ::core::mem::size_of::(), 4usize, concat!( "Size of: ", @@ -1405,8 +1356,7 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__b ) ); assert_eq!( - ::core::mem::align_of::( - ), + ::core::mem::align_of::(), 4usize, concat!( "Alignment of ", @@ -1415,10 +1365,8 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__b ); assert_eq!( unsafe { - &(*(::core::ptr::null::< - nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_2, - >())) - .length_us as *const _ as usize + &(*(::core::ptr::null::())).length_us + as *const _ as usize }, 0usize, concat!( @@ -1449,8 +1397,8 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1() ); assert_eq!( unsafe { - &(*(::core::ptr::null::())) - .request as *const _ as usize + &(*(::core::ptr::null::())).request as *const _ + as usize }, 0usize, concat!( @@ -1462,8 +1410,8 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1() ); assert_eq!( unsafe { - &(*(::core::ptr::null::())) - .extend as *const _ as usize + &(*(::core::ptr::null::())).extend as *const _ + as usize }, 0usize, concat!( @@ -1479,23 +1427,16 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t() { assert_eq!( ::core::mem::size_of::(), 8usize, - concat!( - "Size of: ", - stringify!(nrf_radio_signal_callback_return_param_t) - ) + concat!("Size of: ", stringify!(nrf_radio_signal_callback_return_param_t)) ); assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(nrf_radio_signal_callback_return_param_t) - ) + concat!("Alignment of ", stringify!(nrf_radio_signal_callback_return_param_t)) ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).callback_action - as *const _ as usize + &(*(::core::ptr::null::())).callback_action as *const _ as usize }, 0usize, concat!( @@ -1506,10 +1447,7 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).params as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).params as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -1530,9 +1468,8 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t() { #[doc = " @param[in] signal_type Type of signal, see @ref NRF_RADIO_CALLBACK_SIGNAL_TYPE."] #[doc = ""] #[doc = " @return Pointer to structure containing action requested by the application."] -pub type nrf_radio_signal_callback_t = ::core::option::Option< - unsafe extern "C" fn(signal_type: u8) -> *mut nrf_radio_signal_callback_return_param_t, ->; +pub type nrf_radio_signal_callback_t = + ::core::option::Option *mut nrf_radio_signal_callback_return_param_t>; #[doc = "@brief AES ECB parameter typedefs"] pub type soc_ecb_key_t = [u8; 16usize]; pub type soc_ecb_cleartext_t = [u8; 16usize]; @@ -1626,9 +1563,7 @@ fn bindgen_test_layout_nrf_ecb_hal_data_block_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_cleartext as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_cleartext as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -1638,9 +1573,7 @@ fn bindgen_test_layout_nrf_ecb_hal_data_block_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_ciphertext as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_ciphertext as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -2437,10 +2370,7 @@ pub unsafe fn sd_ecb_block_encrypt(p_ecb_data: *mut nrf_ecb_hal_data_t) -> u32 { #[doc = ""] #[doc = " @retval ::NRF_SUCCESS"] #[inline(always)] -pub unsafe fn sd_ecb_blocks_encrypt( - block_count: u8, - p_data_blocks: *mut nrf_ecb_hal_data_block_t, -) -> u32 { +pub unsafe fn sd_ecb_blocks_encrypt(block_count: u8, p_data_blocks: *mut nrf_ecb_hal_data_block_t) -> u32 { let ret: u32; core::arch::asm!("svc 71", inout("r0") to_asm(block_count) => ret, @@ -2602,12 +2532,7 @@ pub unsafe fn sd_flash_page_erase(page_number: u32) -> u32 { #[doc = " @retval ::NRF_ERROR_NOT_SUPPORTED Non-zero value supplied to one or more of the unsupported parameters."] #[doc = " @retval ::NRF_SUCCESS Values successfully written to configuration registers."] #[inline(always)] -pub unsafe fn sd_flash_protect( - block_cfg0: u32, - block_cfg1: u32, - block_cfg2: u32, - block_cfg3: u32, -) -> u32 { +pub unsafe fn sd_flash_protect(block_cfg0: u32, block_cfg1: u32, block_cfg2: u32, block_cfg3: u32) -> u32 { let ret: u32; core::arch::asm!("svc 42", inout("r0") to_asm(block_cfg0) => ret, @@ -2834,9 +2759,7 @@ fn bindgen_test_layout_nrf_clock_lf_cfg_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rc_temp_ctiv as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rc_temp_ctiv as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -2875,8 +2798,7 @@ fn bindgen_test_layout_nrf_clock_lf_cfg_t() { #[doc = ""] #[doc = " @note When id is set to @ref NRF_FAULT_ID_APP_MEMACC, pc will contain the address of the instruction being executed at the time when"] #[doc = " the fault is detected by the CPU. The CPU program counter may have advanced up to 2 instructions (no branching) after the one that triggered the fault."] -pub type nrf_fault_handler_t = - ::core::option::Option; +pub type nrf_fault_handler_t = ::core::option::Option; #[doc = "@brief Enables the SoftDevice and by extension the protocol stack."] #[doc = ""] @@ -3039,22 +2961,12 @@ fn bindgen_test_layout_ble_uuid_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).uuid as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_uuid_t), - "::", - stringify!(uuid) - ) + concat!("Offset of field: ", stringify!(ble_uuid_t), "::", stringify!(uuid)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).type_ as *const _ as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(ble_uuid_t), - "::", - stringify!(type_) - ) + concat!("Offset of field: ", stringify!(ble_uuid_t), "::", stringify!(type_)) ); } #[doc = "@brief Data structure."] @@ -3081,22 +2993,12 @@ fn bindgen_test_layout_ble_data_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).p_data as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_data_t), - "::", - stringify!(p_data) - ) + concat!("Offset of field: ", stringify!(ble_data_t), "::", stringify!(p_data)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).len as *const _ as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(ble_data_t), - "::", - stringify!(len) - ) + concat!("Offset of field: ", stringify!(ble_data_t), "::", stringify!(len)) ); } #[doc = " @brief BLE GATT connection configuration parameters, set with @ref sd_ble_cfg_set."] @@ -3243,8 +3145,7 @@ impl ble_gatt_char_props_t { indicate: u8, auth_signed_wr: u8, ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let broadcast: u8 = unsafe { ::core::mem::transmute(broadcast) }; broadcast as u64 @@ -3320,8 +3221,7 @@ impl ble_gatt_char_ext_props_t { } #[inline] pub fn new_bitfield_1(reliable_wr: u8, wr_aux: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let reliable_wr: u8 = unsafe { ::core::mem::transmute(reliable_wr) }; reliable_wr as u64 @@ -3514,9 +3414,7 @@ fn bindgen_test_layout_sd_mbr_command_copy_bl_t() { concat!("Alignment of ", stringify!(sd_mbr_command_copy_bl_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).bl_src as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).bl_src as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3526,9 +3424,7 @@ fn bindgen_test_layout_sd_mbr_command_copy_bl_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).bl_len as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).bl_len as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -3570,24 +3466,15 @@ fn bindgen_test_layout_sd_mbr_command_vector_table_base_set_t() { assert_eq!( ::core::mem::size_of::(), 4usize, - concat!( - "Size of: ", - stringify!(sd_mbr_command_vector_table_base_set_t) - ) + concat!("Size of: ", stringify!(sd_mbr_command_vector_table_base_set_t)) ); assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(sd_mbr_command_vector_table_base_set_t) - ) + concat!("Alignment of ", stringify!(sd_mbr_command_vector_table_base_set_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).address as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).address as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3614,24 +3501,15 @@ fn bindgen_test_layout_sd_mbr_command_irq_forward_address_set_t() { assert_eq!( ::core::mem::size_of::(), 4usize, - concat!( - "Size of: ", - stringify!(sd_mbr_command_irq_forward_address_set_t) - ) + concat!("Size of: ", stringify!(sd_mbr_command_irq_forward_address_set_t)) ); assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(sd_mbr_command_irq_forward_address_set_t) - ) + concat!("Alignment of ", stringify!(sd_mbr_command_irq_forward_address_set_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).address - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).address as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3682,9 +3560,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(sd_mbr_command_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).copy_sd as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).copy_sd as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3694,9 +3570,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).compare as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).compare as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3706,9 +3580,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).copy_bl as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).copy_bl as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3718,10 +3590,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).base_set as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).base_set as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3732,8 +3601,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).irq_forward_address_set - as *const _ as usize + &(*(::core::ptr::null::())).irq_forward_address_set as *const _ as usize }, 0usize, concat!( @@ -4017,12 +3885,8 @@ impl ble_gap_adv_properties_t { } } #[inline] - pub fn new_bitfield_1( - anonymous: u8, - include_tx_power: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(anonymous: u8, include_tx_power: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let anonymous: u8 = unsafe { ::core::mem::transmute(anonymous) }; anonymous as u64 @@ -4057,12 +3921,7 @@ fn bindgen_test_layout_ble_gap_addr_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).addr as *const _ as usize }, 1usize, - concat!( - "Offset of field: ", - stringify!(ble_gap_addr_t), - "::", - stringify!(addr) - ) + concat!("Offset of field: ", stringify!(ble_gap_addr_t), "::", stringify!(addr)) ); } impl ble_gap_addr_t { @@ -4089,12 +3948,8 @@ impl ble_gap_addr_t { } } #[inline] - pub fn new_bitfield_1( - addr_id_peer: u8, - addr_type: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(addr_id_peer: u8, addr_type: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let addr_id_peer: u8 = unsafe { ::core::mem::transmute(addr_id_peer) }; addr_id_peer as u64 @@ -4141,10 +3996,7 @@ fn bindgen_test_layout_ble_gap_conn_params_t() { concat!("Alignment of ", stringify!(ble_gap_conn_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).min_conn_interval as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).min_conn_interval as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -4154,10 +4006,7 @@ fn bindgen_test_layout_ble_gap_conn_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_conn_interval as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).max_conn_interval as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -4167,9 +4016,7 @@ fn bindgen_test_layout_ble_gap_conn_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).slave_latency as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).slave_latency as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -4179,9 +4026,7 @@ fn bindgen_test_layout_ble_gap_conn_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_sup_timeout as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_sup_timeout as *const _ as usize }, 6usize, concat!( "Offset of field: ", @@ -4243,8 +4088,7 @@ impl ble_gap_conn_sec_mode_t { } #[inline] pub fn new_bitfield_1(sm: u8, lv: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { let sm: u8 = unsafe { ::core::mem::transmute(sm) }; sm as u64 @@ -4288,9 +4132,7 @@ fn bindgen_test_layout_ble_gap_conn_sec_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).encr_key_size as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).encr_key_size as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -4322,12 +4164,7 @@ fn bindgen_test_layout_ble_gap_irk_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).irk as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_gap_irk_t), - "::", - stringify!(irk) - ) + concat!("Offset of field: ", stringify!(ble_gap_irk_t), "::", stringify!(irk)) ); } #[doc = "@brief Channel mask (40 bits)."] @@ -4401,9 +4238,7 @@ fn bindgen_test_layout_ble_gap_adv_params_t() { concat!("Alignment of ", stringify!(ble_gap_adv_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).properties as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).properties as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -4413,9 +4248,7 @@ fn bindgen_test_layout_ble_gap_adv_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_peer_addr as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_peer_addr as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -4445,9 +4278,7 @@ fn bindgen_test_layout_ble_gap_adv_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_adv_evts as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).max_adv_evts as *const _ as usize }, 14usize, concat!( "Offset of field: ", @@ -4457,9 +4288,7 @@ fn bindgen_test_layout_ble_gap_adv_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).channel_mask as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).channel_mask as *const _ as usize }, 15usize, concat!( "Offset of field: ", @@ -4469,9 +4298,7 @@ fn bindgen_test_layout_ble_gap_adv_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).filter_policy as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).filter_policy as *const _ as usize }, 20usize, concat!( "Offset of field: ", @@ -4481,9 +4308,7 @@ fn bindgen_test_layout_ble_gap_adv_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).primary_phy as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).primary_phy as *const _ as usize }, 21usize, concat!( "Offset of field: ", @@ -4493,9 +4318,7 @@ fn bindgen_test_layout_ble_gap_adv_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).secondary_phy as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).secondary_phy as *const _ as usize }, 22usize, concat!( "Offset of field: ", @@ -4529,19 +4352,14 @@ impl ble_gap_adv_params_t { } } #[inline] - pub fn new_bitfield_1( - set_id: u8, - scan_req_notification: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(set_id: u8, scan_req_notification: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { let set_id: u8 = unsafe { ::core::mem::transmute(set_id) }; set_id as u64 }); __bindgen_bitfield_unit.set(4usize, 1u8, { - let scan_req_notification: u8 = - unsafe { ::core::mem::transmute(scan_req_notification) }; + let scan_req_notification: u8 = unsafe { ::core::mem::transmute(scan_req_notification) }; scan_req_notification as u64 }); __bindgen_bitfield_unit @@ -4594,9 +4412,7 @@ fn bindgen_test_layout_ble_gap_adv_data_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).scan_rsp_data as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).scan_rsp_data as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -4649,9 +4465,7 @@ fn bindgen_test_layout_ble_gap_privacy_params_t() { concat!("Alignment of ", stringify!(ble_gap_privacy_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).privacy_mode as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).privacy_mode as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -4661,10 +4475,7 @@ fn bindgen_test_layout_ble_gap_privacy_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).private_addr_type as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).private_addr_type as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -4674,10 +4485,7 @@ fn bindgen_test_layout_ble_gap_privacy_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).private_addr_cycle_s as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).private_addr_cycle_s as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -4687,9 +4495,7 @@ fn bindgen_test_layout_ble_gap_privacy_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_device_irk as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_device_irk as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -4812,14 +4618,8 @@ impl ble_gap_sec_kdist_t { } } #[inline] - pub fn new_bitfield_1( - enc: u8, - id: u8, - sign: u8, - link: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(enc: u8, id: u8, sign: u8, link: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let enc: u8 = unsafe { ::core::mem::transmute(enc) }; enc as u64 @@ -4866,9 +4666,7 @@ fn bindgen_test_layout_ble_gap_sec_params_t() { concat!("Alignment of ", stringify!(ble_gap_sec_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).min_key_size as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).min_key_size as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -4878,9 +4676,7 @@ fn bindgen_test_layout_ble_gap_sec_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_key_size as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).max_key_size as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -4900,9 +4696,7 @@ fn bindgen_test_layout_ble_gap_sec_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).kdist_peer as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).kdist_peer as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -4988,8 +4782,7 @@ impl ble_gap_sec_params_t { io_caps: u8, oob: u8, ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let bond: u8 = unsafe { ::core::mem::transmute(bond) }; bond as u64 @@ -5083,13 +4876,8 @@ impl ble_gap_enc_info_t { } } #[inline] - pub fn new_bitfield_1( - lesc: u8, - auth: u8, - ltk_len: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(lesc: u8, auth: u8, ltk_len: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let lesc: u8 = unsafe { ::core::mem::transmute(lesc) }; lesc as u64 @@ -5324,9 +5112,7 @@ fn bindgen_test_layout_ble_gap_evt_connected_t() { concat!("Alignment of ", stringify!(ble_gap_evt_connected_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).peer_addr as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).peer_addr as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5346,9 +5132,7 @@ fn bindgen_test_layout_ble_gap_evt_connected_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_params as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_params as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -5358,9 +5142,7 @@ fn bindgen_test_layout_ble_gap_evt_connected_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_handle as *const _ as usize }, 16usize, concat!( "Offset of field: ", @@ -5370,9 +5152,7 @@ fn bindgen_test_layout_ble_gap_evt_connected_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_data as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_data as *const _ as usize }, 20usize, concat!( "Offset of field: ", @@ -5402,9 +5182,7 @@ fn bindgen_test_layout_ble_gap_evt_disconnected_t() { concat!("Alignment of ", stringify!(ble_gap_evt_disconnected_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).reason as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).reason as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5434,10 +5212,7 @@ fn bindgen_test_layout_ble_gap_evt_conn_param_update_t() { concat!("Alignment of ", stringify!(ble_gap_evt_conn_param_update_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_params as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_params as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5464,15 +5239,11 @@ fn bindgen_test_layout_ble_gap_evt_phy_update_request_t() { assert_eq!( ::core::mem::align_of::(), 1usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_phy_update_request_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_phy_update_request_t)) ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).peer_preferred_phys - as *const _ as usize + &(*(::core::ptr::null::())).peer_preferred_phys as *const _ as usize }, 0usize, concat!( @@ -5507,9 +5278,7 @@ fn bindgen_test_layout_ble_gap_evt_phy_update_t() { concat!("Alignment of ", stringify!(ble_gap_evt_phy_update_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).status as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).status as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5519,9 +5288,7 @@ fn bindgen_test_layout_ble_gap_evt_phy_update_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).tx_phy as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).tx_phy as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -5531,9 +5298,7 @@ fn bindgen_test_layout_ble_gap_evt_phy_update_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rx_phy as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rx_phy as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -5560,16 +5325,10 @@ fn bindgen_test_layout_ble_gap_evt_sec_params_request_t() { assert_eq!( ::core::mem::align_of::(), 1usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_sec_params_request_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_sec_params_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).peer_params as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).peer_params as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5603,10 +5362,7 @@ fn bindgen_test_layout_ble_gap_evt_sec_info_request_t() { concat!("Alignment of ", stringify!(ble_gap_evt_sec_info_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).peer_addr as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).peer_addr as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5616,10 +5372,7 @@ fn bindgen_test_layout_ble_gap_evt_sec_info_request_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).master_id as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).master_id as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -5664,13 +5417,8 @@ impl ble_gap_evt_sec_info_request_t { } } #[inline] - pub fn new_bitfield_1( - enc_info: u8, - id_info: u8, - sign_info: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(enc_info: u8, id_info: u8, sign_info: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let enc_info: u8 = unsafe { ::core::mem::transmute(enc_info) }; enc_info as u64 @@ -5707,9 +5455,7 @@ fn bindgen_test_layout_ble_gap_evt_passkey_display_t() { concat!("Alignment of ", stringify!(ble_gap_evt_passkey_display_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).passkey as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).passkey as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5733,8 +5479,7 @@ impl ble_gap_evt_passkey_display_t { } #[inline] pub fn new_bitfield_1(match_request: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let match_request: u8 = unsafe { ::core::mem::transmute(match_request) }; match_request as u64 @@ -5762,9 +5507,7 @@ fn bindgen_test_layout_ble_gap_evt_key_pressed_t() { concat!("Alignment of ", stringify!(ble_gap_evt_key_pressed_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).kp_not as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).kp_not as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5794,10 +5537,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_key_request_t() { concat!("Alignment of ", stringify!(ble_gap_evt_auth_key_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).key_type as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).key_type as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5827,16 +5567,10 @@ fn bindgen_test_layout_ble_gap_evt_lesc_dhkey_request_t() { assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_lesc_dhkey_request_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_lesc_dhkey_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_pk_peer as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).p_pk_peer as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5860,8 +5594,7 @@ impl ble_gap_evt_lesc_dhkey_request_t { } #[inline] pub fn new_bitfield_1(oobd_req: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let oobd_req: u8 = unsafe { ::core::mem::transmute(oobd_req) }; oobd_req as u64 @@ -5935,14 +5668,8 @@ impl ble_gap_sec_levels_t { } } #[inline] - pub fn new_bitfield_1( - lv1: u8, - lv2: u8, - lv3: u8, - lv4: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(lv1: u8, lv2: u8, lv3: u8, lv4: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let lv1: u8 = unsafe { ::core::mem::transmute(lv1) }; lv1 as u64 @@ -6181,10 +5908,7 @@ fn bindgen_test_layout_ble_gap_data_length_params_t() { concat!("Alignment of ", stringify!(ble_gap_data_length_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_tx_octets as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).max_tx_octets as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6194,10 +5918,7 @@ fn bindgen_test_layout_ble_gap_data_length_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_rx_octets as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).max_rx_octets as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -6207,10 +5928,7 @@ fn bindgen_test_layout_ble_gap_data_length_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_tx_time_us as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).max_tx_time_us as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -6220,10 +5938,7 @@ fn bindgen_test_layout_ble_gap_data_length_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_rx_time_us as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).max_rx_time_us as *const _ as usize }, 6usize, concat!( "Offset of field: ", @@ -6254,15 +5969,11 @@ fn bindgen_test_layout_ble_gap_data_length_limitation_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gap_data_length_limitation_t) - ) + concat!("Alignment of ", stringify!(ble_gap_data_length_limitation_t)) ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).tx_payload_limited_octets - as *const _ as usize + &(*(::core::ptr::null::())).tx_payload_limited_octets as *const _ as usize }, 0usize, concat!( @@ -6274,8 +5985,7 @@ fn bindgen_test_layout_ble_gap_data_length_limitation_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).rx_payload_limited_octets - as *const _ as usize + &(*(::core::ptr::null::())).rx_payload_limited_octets as *const _ as usize }, 2usize, concat!( @@ -6287,8 +5997,7 @@ fn bindgen_test_layout_ble_gap_data_length_limitation_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).tx_rx_time_limited_us - as *const _ as usize + &(*(::core::ptr::null::())).tx_rx_time_limited_us as *const _ as usize }, 4usize, concat!( @@ -6328,9 +6037,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_status_t() { concat!("Alignment of ", stringify!(ble_gap_evt_auth_status_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).auth_status as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).auth_status as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6340,9 +6047,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_status_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sm1_levels as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).sm1_levels as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -6352,9 +6057,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_status_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sm2_levels as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).sm2_levels as *const _ as usize }, 3usize, concat!( "Offset of field: ", @@ -6364,9 +6067,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_status_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).kdist_own as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).kdist_own as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -6376,9 +6077,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_status_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).kdist_peer as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).kdist_peer as *const _ as usize }, 5usize, concat!( "Offset of field: ", @@ -6423,13 +6122,8 @@ impl ble_gap_evt_auth_status_t { } } #[inline] - pub fn new_bitfield_1( - error_src: u8, - bonded: u8, - lesc: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(error_src: u8, bonded: u8, lesc: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 2u8, { let error_src: u8 = unsafe { ::core::mem::transmute(error_src) }; error_src as u64 @@ -6465,9 +6159,7 @@ fn bindgen_test_layout_ble_gap_evt_conn_sec_update_t() { concat!("Alignment of ", stringify!(ble_gap_evt_conn_sec_update_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_sec as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_sec as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6529,9 +6221,7 @@ fn bindgen_test_layout_ble_gap_evt_rssi_changed_t() { concat!("Alignment of ", stringify!(ble_gap_evt_rssi_changed_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rssi as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rssi as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6541,9 +6231,7 @@ fn bindgen_test_layout_ble_gap_evt_rssi_changed_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ch_index as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).ch_index as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -6580,16 +6268,10 @@ fn bindgen_test_layout_ble_gap_evt_adv_set_terminated_t() { assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_adv_set_terminated_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_adv_set_terminated_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).reason as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).reason as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6599,10 +6281,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_set_terminated_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_handle as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_handle as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -6613,8 +6292,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_set_terminated_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).num_completed_adv_events - as *const _ as usize + &(*(::core::ptr::null::())).num_completed_adv_events as *const _ as usize }, 2usize, concat!( @@ -6625,10 +6303,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_set_terminated_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_data as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_data as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -6703,14 +6378,8 @@ impl ble_gap_evt_sec_request_t { } } #[inline] - pub fn new_bitfield_1( - bond: u8, - mitm: u8, - lesc: u8, - keypress: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(bond: u8, mitm: u8, lesc: u8, keypress: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let bond: u8 = unsafe { ::core::mem::transmute(bond) }; bond as u64 @@ -6755,10 +6424,7 @@ fn bindgen_test_layout_ble_gap_evt_scan_req_report_t() { concat!("Alignment of ", stringify!(ble_gap_evt_scan_req_report_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_handle as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6768,9 +6434,7 @@ fn bindgen_test_layout_ble_gap_evt_scan_req_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rssi as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rssi as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -6780,10 +6444,7 @@ fn bindgen_test_layout_ble_gap_evt_scan_req_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).peer_addr as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).peer_addr as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -6805,23 +6466,16 @@ fn bindgen_test_layout_ble_gap_evt_data_length_update_request_t() { assert_eq!( ::core::mem::size_of::(), 8usize, - concat!( - "Size of: ", - stringify!(ble_gap_evt_data_length_update_request_t) - ) + concat!("Size of: ", stringify!(ble_gap_evt_data_length_update_request_t)) ); assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_data_length_update_request_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_data_length_update_request_t)) ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).peer_params - as *const _ as usize + &(*(::core::ptr::null::())).peer_params as *const _ as usize }, 0usize, concat!( @@ -6849,16 +6503,10 @@ fn bindgen_test_layout_ble_gap_evt_data_length_update_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_data_length_update_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_data_length_update_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).effective_params - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).effective_params as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6935,9 +6583,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_gap_evt_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).connected as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).connected as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6947,10 +6593,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).disconnected as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).disconnected as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6960,10 +6603,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_param_update as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_param_update as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6973,10 +6613,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sec_params_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).sec_params_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6986,10 +6623,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sec_info_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).sec_info_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6999,10 +6633,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).passkey_display as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).passkey_display as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7012,10 +6643,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).key_pressed as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).key_pressed as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7025,10 +6653,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).auth_key_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).auth_key_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7038,10 +6663,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).lesc_dhkey_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).lesc_dhkey_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7051,10 +6673,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).auth_status as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).auth_status as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7064,10 +6683,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_sec_update as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_sec_update as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7077,9 +6693,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).timeout as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).timeout as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7089,10 +6703,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rssi_changed as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).rssi_changed as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7102,10 +6713,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_set_terminated as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_set_terminated as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7115,10 +6723,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sec_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).sec_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7128,10 +6733,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).scan_req_report as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).scan_req_report as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7141,10 +6743,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).phy_update_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).phy_update_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7154,9 +6753,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).phy_update as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).phy_update as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7167,8 +6764,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).data_length_update_request - as *const _ as usize + &(*(::core::ptr::null::())).data_length_update_request as *const _ as usize }, 0usize, concat!( @@ -7179,10 +6775,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).data_length_update as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).data_length_update as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7217,12 +6810,7 @@ fn bindgen_test_layout_ble_gap_evt_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).params as *const _ as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(ble_gap_evt_t), - "::", - stringify!(params) - ) + concat!("Offset of field: ", stringify!(ble_gap_evt_t), "::", stringify!(params)) ); } #[doc = " @brief BLE GAP connection configuration parameters, set with @ref sd_ble_cfg_set."] @@ -7267,9 +6855,7 @@ fn bindgen_test_layout_ble_gap_conn_cfg_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).event_length as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).event_length as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -7309,9 +6895,7 @@ fn bindgen_test_layout_ble_gap_cfg_role_count_t() { concat!("Alignment of ", stringify!(ble_gap_cfg_role_count_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_set_count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_set_count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7321,10 +6905,7 @@ fn bindgen_test_layout_ble_gap_cfg_role_count_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).periph_role_count as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).periph_role_count as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -7386,9 +6967,7 @@ fn bindgen_test_layout_ble_gap_cfg_device_name_t() { concat!("Alignment of ", stringify!(ble_gap_cfg_device_name_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write_perm as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).write_perm as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7398,9 +6977,7 @@ fn bindgen_test_layout_ble_gap_cfg_device_name_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_value as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_value as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -7410,9 +6987,7 @@ fn bindgen_test_layout_ble_gap_cfg_device_name_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).current_len as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).current_len as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -7422,9 +6997,7 @@ fn bindgen_test_layout_ble_gap_cfg_device_name_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_len as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).max_len as *const _ as usize }, 10usize, concat!( "Offset of field: ", @@ -7448,8 +7021,7 @@ impl ble_gap_cfg_device_name_t { } #[inline] pub fn new_bitfield_1(vloc: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 2u8, { let vloc: u8 = unsafe { ::core::mem::transmute(vloc) }; vloc as u64 @@ -7478,10 +7050,7 @@ fn bindgen_test_layout_ble_gap_cfg_ppcp_incl_cfg_t() { concat!("Alignment of ", stringify!(ble_gap_cfg_ppcp_incl_cfg_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).include_cfg as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).include_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7512,9 +7081,7 @@ fn bindgen_test_layout_ble_gap_cfg_car_incl_cfg_t() { concat!("Alignment of ", stringify!(ble_gap_cfg_car_incl_cfg_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).include_cfg as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).include_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7637,9 +7204,7 @@ fn bindgen_test_layout_ble_gap_opt_ch_map_t() { concat!("Alignment of ", stringify!(ble_gap_opt_ch_map_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7700,16 +7265,10 @@ fn bindgen_test_layout_ble_gap_opt_local_conn_latency_t() { assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(ble_gap_opt_local_conn_latency_t) - ) + concat!("Alignment of ", stringify!(ble_gap_opt_local_conn_latency_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_handle as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7719,10 +7278,7 @@ fn bindgen_test_layout_ble_gap_opt_local_conn_latency_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).requested_latency - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).requested_latency as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -7732,10 +7288,7 @@ fn bindgen_test_layout_ble_gap_opt_local_conn_latency_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_actual_latency - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_actual_latency as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -7774,16 +7327,10 @@ fn bindgen_test_layout_ble_gap_opt_slave_latency_disable_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gap_opt_slave_latency_disable_t) - ) + concat!("Alignment of ", stringify!(ble_gap_opt_slave_latency_disable_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_handle as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7807,8 +7354,7 @@ impl ble_gap_opt_slave_latency_disable_t { } #[inline] pub fn new_bitfield_1(disable: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let disable: u8 = unsafe { ::core::mem::transmute(disable) }; disable as u64 @@ -7849,9 +7395,7 @@ fn bindgen_test_layout_ble_gap_opt_passkey_t() { concat!("Alignment of ", stringify!(ble_gap_opt_passkey_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_passkey as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_passkey as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7897,16 +7441,10 @@ fn bindgen_test_layout_ble_gap_opt_auth_payload_timeout_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gap_opt_auth_payload_timeout_t) - ) + concat!("Alignment of ", stringify!(ble_gap_opt_auth_payload_timeout_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_handle as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7917,8 +7455,7 @@ fn bindgen_test_layout_ble_gap_opt_auth_payload_timeout_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).auth_payload_timeout - as *const _ as usize + &(*(::core::ptr::null::())).auth_payload_timeout as *const _ as usize }, 2usize, concat!( @@ -7960,17 +7497,10 @@ fn bindgen_test_layout_ble_gap_opt_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).ch_map as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_gap_opt_t), - "::", - stringify!(ch_map) - ) + concat!("Offset of field: ", stringify!(ble_gap_opt_t), "::", stringify!(ch_map)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).local_conn_latency as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).local_conn_latency as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7990,9 +7520,7 @@ fn bindgen_test_layout_ble_gap_opt_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).auth_payload_timeout as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).auth_payload_timeout as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8002,9 +7530,7 @@ fn bindgen_test_layout_ble_gap_opt_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).slave_latency_disable as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).slave_latency_disable as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8046,9 +7572,7 @@ fn bindgen_test_layout_ble_gap_conn_event_trigger_t() { concat!("Alignment of ", stringify!(ble_gap_conn_event_trigger_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ppi_ch_id as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).ppi_ch_id as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8058,10 +7582,7 @@ fn bindgen_test_layout_ble_gap_conn_event_trigger_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).task_endpoint as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).task_endpoint as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -8072,8 +7593,7 @@ fn bindgen_test_layout_ble_gap_conn_event_trigger_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).conn_evt_counter_start - as *const _ as usize + &(*(::core::ptr::null::())).conn_evt_counter_start as *const _ as usize }, 8usize, concat!( @@ -8084,10 +7604,7 @@ fn bindgen_test_layout_ble_gap_conn_event_trigger_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).period_in_events as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).period_in_events as *const _ as usize }, 10usize, concat!( "Offset of field: ", @@ -8476,10 +7993,7 @@ pub unsafe fn sd_ble_gap_adv_stop(adv_handle: u8) -> u32 { #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."] #[doc = " @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation."] #[inline(always)] -pub unsafe fn sd_ble_gap_conn_param_update( - conn_handle: u16, - p_conn_params: *const ble_gap_conn_params_t, -) -> u32 { +pub unsafe fn sd_ble_gap_conn_param_update(conn_handle: u16, p_conn_params: *const ble_gap_conn_params_t) -> u32 { let ret: u32; core::arch::asm!("svc 117", inout("r0") to_asm(conn_handle) => ret, @@ -8730,10 +8244,7 @@ pub unsafe fn sd_ble_gap_device_name_get(p_dev_name: *mut u8, p_len: *mut u16) - #[doc = " @retval ::NRF_ERROR_NO_MEM The maximum number of authentication procedures that can run in parallel for the given role is reached."] #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."] #[inline(always)] -pub unsafe fn sd_ble_gap_authenticate( - conn_handle: u16, - p_sec_params: *const ble_gap_sec_params_t, -) -> u32 { +pub unsafe fn sd_ble_gap_authenticate(conn_handle: u16, p_sec_params: *const ble_gap_sec_params_t) -> u32 { let ret: u32; core::arch::asm!("svc 126", inout("r0") to_asm(conn_handle) => ret, @@ -8876,10 +8387,7 @@ pub unsafe fn sd_ble_gap_auth_key_reply(conn_handle: u16, key_type: u8, p_key: * #[doc = " - The application has not pulled a @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST event."] #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."] #[inline(always)] -pub unsafe fn sd_ble_gap_lesc_dhkey_reply( - conn_handle: u16, - p_dhkey: *const ble_gap_lesc_dhkey_t, -) -> u32 { +pub unsafe fn sd_ble_gap_lesc_dhkey_reply(conn_handle: u16, p_dhkey: *const ble_gap_lesc_dhkey_t) -> u32 { let ret: u32; core::arch::asm!("svc 129", inout("r0") to_asm(conn_handle) => ret, @@ -9047,10 +8555,7 @@ pub unsafe fn sd_ble_gap_sec_info_reply( #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."] #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."] #[inline(always)] -pub unsafe fn sd_ble_gap_conn_sec_get( - conn_handle: u16, - p_conn_sec: *mut ble_gap_conn_sec_t, -) -> u32 { +pub unsafe fn sd_ble_gap_conn_sec_get(conn_handle: u16, p_conn_sec: *mut ble_gap_conn_sec_t) -> u32 { let ret: u32; core::arch::asm!("svc 135", inout("r0") to_asm(conn_handle) => ret, @@ -9455,9 +8960,7 @@ fn bindgen_test_layout_ble_l2cap_conn_cfg_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rx_queue_size as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rx_queue_size as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -9467,9 +8970,7 @@ fn bindgen_test_layout_ble_l2cap_conn_cfg_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).tx_queue_size as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).tx_queue_size as *const _ as usize }, 5usize, concat!( "Offset of field: ", @@ -9522,9 +9023,7 @@ fn bindgen_test_layout_ble_l2cap_ch_rx_params_t() { concat!("Alignment of ", stringify!(ble_l2cap_ch_rx_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rx_mtu as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rx_mtu as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -9534,9 +9033,7 @@ fn bindgen_test_layout_ble_l2cap_ch_rx_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rx_mps as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rx_mps as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -9546,9 +9043,7 @@ fn bindgen_test_layout_ble_l2cap_ch_rx_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sdu_buf as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).sdu_buf as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -9585,9 +9080,7 @@ fn bindgen_test_layout_ble_l2cap_ch_setup_params_t() { concat!("Alignment of ", stringify!(ble_l2cap_ch_setup_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rx_params as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rx_params as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -9597,9 +9090,7 @@ fn bindgen_test_layout_ble_l2cap_ch_setup_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).le_psm as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).le_psm as *const _ as usize }, 12usize, concat!( "Offset of field: ", @@ -9609,9 +9100,7 @@ fn bindgen_test_layout_ble_l2cap_ch_setup_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).status as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).status as *const _ as usize }, 14usize, concat!( "Offset of field: ", @@ -9652,9 +9141,7 @@ fn bindgen_test_layout_ble_l2cap_ch_tx_params_t() { concat!("Alignment of ", stringify!(ble_l2cap_ch_tx_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).tx_mtu as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).tx_mtu as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -9664,9 +9151,7 @@ fn bindgen_test_layout_ble_l2cap_ch_tx_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).peer_mps as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).peer_mps as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -9676,9 +9161,7 @@ fn bindgen_test_layout_ble_l2cap_ch_tx_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).tx_mps as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).tx_mps as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -9688,9 +9171,7 @@ fn bindgen_test_layout_ble_l2cap_ch_tx_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).credits as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).credits as *const _ as usize }, 6usize, concat!( "Offset of field: ", @@ -9719,16 +9200,10 @@ fn bindgen_test_layout_ble_l2cap_evt_ch_setup_request_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_l2cap_evt_ch_setup_request_t) - ) + concat!("Alignment of ", stringify!(ble_l2cap_evt_ch_setup_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).tx_params as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).tx_params as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -9738,10 +9213,7 @@ fn bindgen_test_layout_ble_l2cap_evt_ch_setup_request_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).le_psm as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).le_psm as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -9770,16 +9242,10 @@ fn bindgen_test_layout_ble_l2cap_evt_ch_setup_refused_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_l2cap_evt_ch_setup_refused_t) - ) + concat!("Alignment of ", stringify!(ble_l2cap_evt_ch_setup_refused_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).source as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).source as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -9789,10 +9255,7 @@ fn bindgen_test_layout_ble_l2cap_evt_ch_setup_refused_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).status as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).status as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -9822,9 +9285,7 @@ fn bindgen_test_layout_ble_l2cap_evt_ch_setup_t() { concat!("Alignment of ", stringify!(ble_l2cap_evt_ch_setup_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).tx_params as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).tx_params as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -9854,16 +9315,10 @@ fn bindgen_test_layout_ble_l2cap_evt_ch_sdu_buf_released_t() { assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(ble_l2cap_evt_ch_sdu_buf_released_t) - ) + concat!("Alignment of ", stringify!(ble_l2cap_evt_ch_sdu_buf_released_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sdu_buf as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).sdu_buf as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -9893,9 +9348,7 @@ fn bindgen_test_layout_ble_l2cap_evt_ch_credit_t() { concat!("Alignment of ", stringify!(ble_l2cap_evt_ch_credit_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).credits as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).credits as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10024,10 +9477,7 @@ fn bindgen_test_layout_ble_l2cap_evt_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_l2cap_evt_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ch_setup_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).ch_setup_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10037,10 +9487,7 @@ fn bindgen_test_layout_ble_l2cap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ch_setup_refused as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).ch_setup_refused as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10050,9 +9497,7 @@ fn bindgen_test_layout_ble_l2cap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ch_setup as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).ch_setup as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10062,10 +9507,7 @@ fn bindgen_test_layout_ble_l2cap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ch_sdu_buf_released - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).ch_sdu_buf_released as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10075,9 +9517,7 @@ fn bindgen_test_layout_ble_l2cap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).credit as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).credit as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10087,9 +9527,7 @@ fn bindgen_test_layout_ble_l2cap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rx as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rx as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10099,9 +9537,7 @@ fn bindgen_test_layout_ble_l2cap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).tx as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).tx as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10276,11 +9712,7 @@ pub unsafe fn sd_ble_l2cap_ch_release(conn_handle: u16, local_cid: u16) -> u32 { #[doc = " @retval ::NRF_ERROR_RESOURCES Too many SDU data buffers supplied. Wait for a"] #[doc = " @ref BLE_L2CAP_EVT_CH_RX event and retry."] #[inline(always)] -pub unsafe fn sd_ble_l2cap_ch_rx( - conn_handle: u16, - local_cid: u16, - p_sdu_buf: *const ble_data_t, -) -> u32 { +pub unsafe fn sd_ble_l2cap_ch_rx(conn_handle: u16, local_cid: u16, p_sdu_buf: *const ble_data_t) -> u32 { let ret: u32; core::arch::asm!("svc 186", inout("r0") to_asm(conn_handle) => ret, @@ -10335,11 +9767,7 @@ pub unsafe fn sd_ble_l2cap_ch_rx( #[doc = " @retval ::NRF_ERROR_RESOURCES Too many SDUs queued for transmission. Wait for a"] #[doc = " @ref BLE_L2CAP_EVT_CH_TX event and retry."] #[inline(always)] -pub unsafe fn sd_ble_l2cap_ch_tx( - conn_handle: u16, - local_cid: u16, - p_sdu_buf: *const ble_data_t, -) -> u32 { +pub unsafe fn sd_ble_l2cap_ch_tx(conn_handle: u16, local_cid: u16, p_sdu_buf: *const ble_data_t) -> u32 { let ret: u32; core::arch::asm!("svc 187", inout("r0") to_asm(conn_handle) => ret, @@ -10393,12 +9821,7 @@ pub unsafe fn sd_ble_l2cap_ch_tx( #[doc = " in progress for an L2CAP channel)."] #[doc = " @retval ::NRF_ERROR_NOT_FOUND CID not found."] #[inline(always)] -pub unsafe fn sd_ble_l2cap_ch_flow_control( - conn_handle: u16, - local_cid: u16, - credits: u16, - p_credits: *mut u16, -) -> u32 { +pub unsafe fn sd_ble_l2cap_ch_flow_control(conn_handle: u16, local_cid: u16, credits: u16, p_credits: *mut u16) -> u32 { let ret: u32; core::arch::asm!("svc 188", inout("r0") to_asm(conn_handle) => ret, @@ -10483,10 +9906,7 @@ fn bindgen_test_layout_ble_gattc_conn_cfg_t() { concat!("Alignment of ", stringify!(ble_gattc_conn_cfg_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write_cmd_tx_queue_size as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).write_cmd_tx_queue_size as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10518,9 +9938,7 @@ fn bindgen_test_layout_ble_gattc_handle_range_t() { concat!("Alignment of ", stringify!(ble_gattc_handle_range_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).start_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).start_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10530,9 +9948,7 @@ fn bindgen_test_layout_ble_gattc_handle_range_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).end_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).end_handle as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -10574,9 +9990,7 @@ fn bindgen_test_layout_ble_gattc_service_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle_range as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle_range as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -10618,9 +10032,7 @@ fn bindgen_test_layout_ble_gattc_include_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).included_srvc as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).included_srvc as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -10711,8 +10123,7 @@ impl ble_gattc_char_t { } #[inline] pub fn new_bitfield_1(char_ext_props: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let char_ext_props: u8 = unsafe { ::core::mem::transmute(char_ext_props) }; char_ext_props as u64 @@ -10792,9 +10203,7 @@ fn bindgen_test_layout_ble_gattc_write_params_t() { concat!("Alignment of ", stringify!(ble_gattc_write_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write_op as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).write_op as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10814,9 +10223,7 @@ fn bindgen_test_layout_ble_gattc_write_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -10826,9 +10233,7 @@ fn bindgen_test_layout_ble_gattc_write_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).offset as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).offset as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -10848,9 +10253,7 @@ fn bindgen_test_layout_ble_gattc_write_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_value as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_value as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -10924,9 +10327,7 @@ fn bindgen_test_layout_ble_gattc_attr_info128_t() { concat!("Alignment of ", stringify!(ble_gattc_attr_info128_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10966,16 +10367,10 @@ fn bindgen_test_layout_ble_gattc_evt_prim_srvc_disc_rsp_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_prim_srvc_disc_rsp_t) - ) + concat!("Alignment of ", stringify!(ble_gattc_evt_prim_srvc_disc_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10985,10 +10380,7 @@ fn bindgen_test_layout_ble_gattc_evt_prim_srvc_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).services as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).services as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -11021,9 +10413,7 @@ fn bindgen_test_layout_ble_gattc_evt_rel_disc_rsp_t() { concat!("Alignment of ", stringify!(ble_gattc_evt_rel_disc_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11033,9 +10423,7 @@ fn bindgen_test_layout_ble_gattc_evt_rel_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).includes as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).includes as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -11068,9 +10456,7 @@ fn bindgen_test_layout_ble_gattc_evt_char_disc_rsp_t() { concat!("Alignment of ", stringify!(ble_gattc_evt_char_disc_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11080,9 +10466,7 @@ fn bindgen_test_layout_ble_gattc_evt_char_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).chars as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).chars as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -11115,9 +10499,7 @@ fn bindgen_test_layout_ble_gattc_evt_desc_disc_rsp_t() { concat!("Alignment of ", stringify!(ble_gattc_evt_desc_disc_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11127,9 +10509,7 @@ fn bindgen_test_layout_ble_gattc_evt_desc_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).descs as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).descs as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -11181,8 +10561,8 @@ fn bindgen_test_layout_ble_gattc_evt_attr_info_disc_rsp_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())) - .attr_info16 as *const _ as usize + &(*(::core::ptr::null::())).attr_info16 as *const _ + as usize }, 0usize, concat!( @@ -11194,8 +10574,8 @@ fn bindgen_test_layout_ble_gattc_evt_attr_info_disc_rsp_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())) - .attr_info128 as *const _ as usize + &(*(::core::ptr::null::())).attr_info128 as *const _ + as usize }, 0usize, concat!( @@ -11216,16 +10596,10 @@ fn bindgen_test_layout_ble_gattc_evt_attr_info_disc_rsp_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_attr_info_disc_rsp_t) - ) + concat!("Alignment of ", stringify!(ble_gattc_evt_attr_info_disc_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11235,10 +10609,7 @@ fn bindgen_test_layout_ble_gattc_evt_attr_info_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).format as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).format as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -11248,10 +10619,7 @@ fn bindgen_test_layout_ble_gattc_evt_attr_info_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).info as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).info as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -11283,9 +10651,7 @@ fn bindgen_test_layout_ble_gattc_handle_value_t() { concat!("Alignment of ", stringify!(ble_gattc_handle_value_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11295,9 +10661,7 @@ fn bindgen_test_layout_ble_gattc_handle_value_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_value as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_value as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -11325,24 +10689,15 @@ fn bindgen_test_layout_ble_gattc_evt_char_val_by_uuid_read_rsp_t() { assert_eq!( ::core::mem::size_of::(), 4usize, - concat!( - "Size of: ", - stringify!(ble_gattc_evt_char_val_by_uuid_read_rsp_t) - ) + concat!("Size of: ", stringify!(ble_gattc_evt_char_val_by_uuid_read_rsp_t)) ); assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_char_val_by_uuid_read_rsp_t) - ) + concat!("Alignment of ", stringify!(ble_gattc_evt_char_val_by_uuid_read_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11353,8 +10708,7 @@ fn bindgen_test_layout_ble_gattc_evt_char_val_by_uuid_read_rsp_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).value_len - as *const _ as usize + &(*(::core::ptr::null::())).value_len as *const _ as usize }, 2usize, concat!( @@ -11366,8 +10720,7 @@ fn bindgen_test_layout_ble_gattc_evt_char_val_by_uuid_read_rsp_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).handle_value - as *const _ as usize + &(*(::core::ptr::null::())).handle_value as *const _ as usize }, 4usize, concat!( @@ -11405,9 +10758,7 @@ fn bindgen_test_layout_ble_gattc_evt_read_rsp_t() { concat!("Alignment of ", stringify!(ble_gattc_evt_read_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11417,9 +10768,7 @@ fn bindgen_test_layout_ble_gattc_evt_read_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).offset as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).offset as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -11469,15 +10818,10 @@ fn bindgen_test_layout_ble_gattc_evt_char_vals_read_rsp_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_char_vals_read_rsp_t) - ) + concat!("Alignment of ", stringify!(ble_gattc_evt_char_vals_read_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).len as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).len as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11487,10 +10831,7 @@ fn bindgen_test_layout_ble_gattc_evt_char_vals_read_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).values as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).values as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -11529,9 +10870,7 @@ fn bindgen_test_layout_ble_gattc_evt_write_rsp_t() { concat!("Alignment of ", stringify!(ble_gattc_evt_write_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11541,9 +10880,7 @@ fn bindgen_test_layout_ble_gattc_evt_write_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write_op as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).write_op as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -11553,9 +10890,7 @@ fn bindgen_test_layout_ble_gattc_evt_write_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).offset as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).offset as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -11669,16 +11004,10 @@ fn bindgen_test_layout_ble_gattc_evt_exchange_mtu_rsp_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_exchange_mtu_rsp_t) - ) + concat!("Alignment of ", stringify!(ble_gattc_evt_exchange_mtu_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).server_rx_mtu as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).server_rx_mtu as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11730,24 +11059,15 @@ fn bindgen_test_layout_ble_gattc_evt_write_cmd_tx_complete_t() { assert_eq!( ::core::mem::size_of::(), 1usize, - concat!( - "Size of: ", - stringify!(ble_gattc_evt_write_cmd_tx_complete_t) - ) + concat!("Size of: ", stringify!(ble_gattc_evt_write_cmd_tx_complete_t)) ); assert_eq!( ::core::mem::align_of::(), 1usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_write_cmd_tx_complete_t) - ) - ); - assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ - as usize - }, + concat!("Alignment of ", stringify!(ble_gattc_evt_write_cmd_tx_complete_t)) + ); + assert_eq!( + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11812,10 +11132,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_gattc_evt_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).prim_srvc_disc_rsp - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).prim_srvc_disc_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11825,10 +11142,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rel_disc_rsp as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).rel_disc_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11838,10 +11152,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).char_disc_rsp as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).char_disc_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11851,10 +11162,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).desc_disc_rsp as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).desc_disc_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11865,8 +11173,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).char_val_by_uuid_read_rsp - as *const _ as usize + &(*(::core::ptr::null::())).char_val_by_uuid_read_rsp as *const _ as usize }, 0usize, concat!( @@ -11877,9 +11184,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).read_rsp as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).read_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11889,10 +11194,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).char_vals_read_rsp - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).char_vals_read_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11902,10 +11204,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write_rsp as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).write_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11915,9 +11214,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hvx as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hvx as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11927,10 +11224,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).exchange_mtu_rsp as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).exchange_mtu_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11940,9 +11234,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).timeout as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).timeout as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11952,10 +11244,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).attr_info_disc_rsp - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).attr_info_disc_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11966,8 +11255,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).write_cmd_tx_complete - as *const _ as usize + &(*(::core::ptr::null::())).write_cmd_tx_complete as *const _ as usize }, 0usize, concat!( @@ -12292,11 +11580,7 @@ pub unsafe fn sd_ble_gattc_read(conn_handle: u16, handle: u16, offset: u16) -> u #[doc = " @retval ::NRF_ERROR_BUSY Client procedure already in progress."] #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."] #[inline(always)] -pub unsafe fn sd_ble_gattc_char_values_read( - conn_handle: u16, - p_handles: *const u16, - handle_count: u16, -) -> u32 { +pub unsafe fn sd_ble_gattc_char_values_read(conn_handle: u16, p_handles: *const u16, handle_count: u16) -> u32 { let ret: u32; core::arch::asm!("svc 162", inout("r0") to_asm(conn_handle) => ret, @@ -12352,10 +11636,7 @@ pub unsafe fn sd_ble_gattc_char_values_read( #[doc = " Wait for a @ref BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE event and retry."] #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."] #[inline(always)] -pub unsafe fn sd_ble_gattc_write( - conn_handle: u16, - p_write_params: *const ble_gattc_write_params_t, -) -> u32 { +pub unsafe fn sd_ble_gattc_write(conn_handle: u16, p_write_params: *const ble_gattc_write_params_t) -> u32 { let ret: u32; core::arch::asm!("svc 163", inout("r0") to_asm(conn_handle) => ret, @@ -12545,9 +11826,7 @@ fn bindgen_test_layout_ble_gatts_conn_cfg_t() { concat!("Alignment of ", stringify!(ble_gatts_conn_cfg_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hvn_tx_queue_size as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hvn_tx_queue_size as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12646,14 +11925,8 @@ impl ble_gatts_attr_md_t { } } #[inline] - pub fn new_bitfield_1( - vlen: u8, - vloc: u8, - rd_auth: u8, - wr_auth: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(vlen: u8, vloc: u8, rd_auth: u8, wr_auth: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let vlen: u8 = unsafe { ::core::mem::transmute(vlen) }; vlen as u64 @@ -12945,9 +12218,7 @@ fn bindgen_test_layout_ble_gatts_char_md_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).char_ext_props as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).char_ext_props as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -12957,9 +12228,7 @@ fn bindgen_test_layout_ble_gatts_char_md_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_char_user_desc as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_char_user_desc as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -12969,10 +12238,7 @@ fn bindgen_test_layout_ble_gatts_char_md_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).char_user_desc_max_size as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).char_user_desc_max_size as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -12982,10 +12248,7 @@ fn bindgen_test_layout_ble_gatts_char_md_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).char_user_desc_size as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).char_user_desc_size as *const _ as usize }, 10usize, concat!( "Offset of field: ", @@ -13005,9 +12268,7 @@ fn bindgen_test_layout_ble_gatts_char_md_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_user_desc_md as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_user_desc_md as *const _ as usize }, 16usize, concat!( "Offset of field: ", @@ -13063,9 +12324,7 @@ fn bindgen_test_layout_ble_gatts_char_handles_t() { concat!("Alignment of ", stringify!(ble_gatts_char_handles_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).value_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).value_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13075,10 +12334,7 @@ fn bindgen_test_layout_ble_gatts_char_handles_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).user_desc_handle as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).user_desc_handle as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -13088,9 +12344,7 @@ fn bindgen_test_layout_ble_gatts_char_handles_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).cccd_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).cccd_handle as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -13100,9 +12354,7 @@ fn bindgen_test_layout_ble_gatts_char_handles_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sccd_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).sccd_handle as *const _ as usize }, 6usize, concat!( "Offset of field: ", @@ -13217,10 +12469,7 @@ fn bindgen_test_layout_ble_gatts_authorize_params_t() { concat!("Alignment of ", stringify!(ble_gatts_authorize_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gatt_status as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).gatt_status as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13230,9 +12479,7 @@ fn bindgen_test_layout_ble_gatts_authorize_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).offset as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).offset as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -13242,9 +12489,7 @@ fn bindgen_test_layout_ble_gatts_authorize_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).len as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).len as *const _ as usize }, 6usize, concat!( "Offset of field: ", @@ -13254,9 +12499,7 @@ fn bindgen_test_layout_ble_gatts_authorize_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_data as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_data as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -13280,8 +12523,7 @@ impl ble_gatts_authorize_params_t { } #[inline] pub fn new_bitfield_1(update: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let update: u8 = unsafe { ::core::mem::transmute(update) }; update as u64 @@ -13327,8 +12569,7 @@ fn bindgen_test_layout_ble_gatts_rw_authorize_reply_params_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).read - as *const _ as usize + &(*(::core::ptr::null::())).read as *const _ as usize }, 0usize, concat!( @@ -13340,8 +12581,7 @@ fn bindgen_test_layout_ble_gatts_rw_authorize_reply_params_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).write - as *const _ as usize + &(*(::core::ptr::null::())).write as *const _ as usize }, 0usize, concat!( @@ -13357,24 +12597,15 @@ fn bindgen_test_layout_ble_gatts_rw_authorize_reply_params_t() { assert_eq!( ::core::mem::size_of::(), 16usize, - concat!( - "Size of: ", - stringify!(ble_gatts_rw_authorize_reply_params_t) - ) + concat!("Size of: ", stringify!(ble_gatts_rw_authorize_reply_params_t)) ); assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(ble_gatts_rw_authorize_reply_params_t) - ) + concat!("Alignment of ", stringify!(ble_gatts_rw_authorize_reply_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).type_ as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).type_ as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13384,10 +12615,7 @@ fn bindgen_test_layout_ble_gatts_rw_authorize_reply_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).params as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).params as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -13430,8 +12658,7 @@ impl ble_gatts_cfg_service_changed_t { } #[inline] pub fn new_bitfield_1(service_changed: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let service_changed: u8 = unsafe { ::core::mem::transmute(service_changed) }; service_changed as u64 @@ -13464,10 +12691,7 @@ fn bindgen_test_layout_ble_gatts_cfg_attr_tab_size_t() { concat!("Alignment of ", stringify!(ble_gatts_cfg_attr_tab_size_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).attr_tab_size as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).attr_tab_size as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13500,9 +12724,7 @@ fn bindgen_test_layout_ble_gatts_cfg_t() { concat!("Alignment of ", stringify!(ble_gatts_cfg_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).service_changed as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).service_changed as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13585,9 +12807,7 @@ fn bindgen_test_layout_ble_gatts_evt_write_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).auth_required as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).auth_required as *const _ as usize }, 7usize, concat!( "Offset of field: ", @@ -13717,8 +12937,7 @@ fn bindgen_test_layout_ble_gatts_evt_rw_authorize_request_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).read - as *const _ as usize + &(*(::core::ptr::null::())).read as *const _ as usize }, 0usize, concat!( @@ -13730,8 +12949,7 @@ fn bindgen_test_layout_ble_gatts_evt_rw_authorize_request_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).write - as *const _ as usize + &(*(::core::ptr::null::())).write as *const _ as usize }, 0usize, concat!( @@ -13747,24 +12965,15 @@ fn bindgen_test_layout_ble_gatts_evt_rw_authorize_request_t() { assert_eq!( ::core::mem::size_of::(), 14usize, - concat!( - "Size of: ", - stringify!(ble_gatts_evt_rw_authorize_request_t) - ) + concat!("Size of: ", stringify!(ble_gatts_evt_rw_authorize_request_t)) ); assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gatts_evt_rw_authorize_request_t) - ) + concat!("Alignment of ", stringify!(ble_gatts_evt_rw_authorize_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).type_ as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).type_ as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13774,10 +12983,7 @@ fn bindgen_test_layout_ble_gatts_evt_rw_authorize_request_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).request as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -13804,15 +13010,10 @@ fn bindgen_test_layout_ble_gatts_evt_sys_attr_missing_t() { assert_eq!( ::core::mem::align_of::(), 1usize, - concat!( - "Alignment of ", - stringify!(ble_gatts_evt_sys_attr_missing_t) - ) + concat!("Alignment of ", stringify!(ble_gatts_evt_sys_attr_missing_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hint as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hint as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13864,24 +13065,15 @@ fn bindgen_test_layout_ble_gatts_evt_exchange_mtu_request_t() { assert_eq!( ::core::mem::size_of::(), 2usize, - concat!( - "Size of: ", - stringify!(ble_gatts_evt_exchange_mtu_request_t) - ) + concat!("Size of: ", stringify!(ble_gatts_evt_exchange_mtu_request_t)) ); assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gatts_evt_exchange_mtu_request_t) - ) + concat!("Alignment of ", stringify!(ble_gatts_evt_exchange_mtu_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).client_rx_mtu - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).client_rx_mtu as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13941,9 +13133,7 @@ fn bindgen_test_layout_ble_gatts_evt_hvn_tx_complete_t() { concat!("Alignment of ", stringify!(ble_gatts_evt_hvn_tx_complete_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13992,9 +13182,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_gatts_evt_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).write as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14004,10 +13192,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).authorize_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).authorize_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14017,10 +13202,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sys_attr_missing as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).sys_attr_missing as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14030,9 +13212,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hvc as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hvc as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14042,10 +13222,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).exchange_mtu_request - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).exchange_mtu_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14055,9 +13232,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).timeout as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).timeout as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14067,10 +13242,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hvn_tx_complete as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).hvn_tx_complete as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14133,11 +13305,7 @@ fn bindgen_test_layout_ble_gatts_evt_t() { #[doc = " @retval ::NRF_ERROR_FORBIDDEN Forbidden value supplied, certain UUIDs are reserved for the stack."] #[doc = " @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation."] #[inline(always)] -pub unsafe fn sd_ble_gatts_service_add( - type_: u8, - p_uuid: *const ble_uuid_t, - p_handle: *mut u16, -) -> u32 { +pub unsafe fn sd_ble_gatts_service_add(type_: u8, p_uuid: *const ble_uuid_t, p_handle: *mut u16) -> u32 { let ret: u32; core::arch::asm!("svc 168", inout("r0") to_asm(type_) => ret, @@ -14172,11 +13340,7 @@ pub unsafe fn sd_ble_gatts_service_add( #[doc = " @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation."] #[doc = " @retval ::NRF_ERROR_NOT_FOUND Attribute not found."] #[inline(always)] -pub unsafe fn sd_ble_gatts_include_add( - service_handle: u16, - inc_srvc_handle: u16, - p_include_handle: *mut u16, -) -> u32 { +pub unsafe fn sd_ble_gatts_include_add(service_handle: u16, inc_srvc_handle: u16, p_include_handle: *mut u16) -> u32 { let ret: u32; core::arch::asm!("svc 169", inout("r0") to_asm(service_handle) => ret, @@ -14288,11 +13452,7 @@ pub unsafe fn sd_ble_gatts_descriptor_add( #[doc = " @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied, attribute lengths are restricted by @ref BLE_GATTS_ATTR_LENS_MAX."] #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied on a system attribute."] #[inline(always)] -pub unsafe fn sd_ble_gatts_value_set( - conn_handle: u16, - handle: u16, - p_value: *mut ble_gatts_value_t, -) -> u32 { +pub unsafe fn sd_ble_gatts_value_set(conn_handle: u16, handle: u16, p_value: *mut ble_gatts_value_t) -> u32 { let ret: u32; core::arch::asm!("svc 172", inout("r0") to_asm(conn_handle) => ret, @@ -14326,11 +13486,7 @@ pub unsafe fn sd_ble_gatts_value_set( #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied on a system attribute."] #[doc = " @retval ::BLE_ERROR_GATTS_SYS_ATTR_MISSING System attributes missing, use @ref sd_ble_gatts_sys_attr_set to set them to a known value."] #[inline(always)] -pub unsafe fn sd_ble_gatts_value_get( - conn_handle: u16, - handle: u16, - p_value: *mut ble_gatts_value_t, -) -> u32 { +pub unsafe fn sd_ble_gatts_value_get(conn_handle: u16, handle: u16, p_value: *mut ble_gatts_value_t) -> u32 { let ret: u32; core::arch::asm!("svc 173", inout("r0") to_asm(conn_handle) => ret, @@ -14405,10 +13561,7 @@ pub unsafe fn sd_ble_gatts_value_get( #[doc = " Wait for a @ref BLE_GATTS_EVT_HVN_TX_COMPLETE event and retry."] #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."] #[inline(always)] -pub unsafe fn sd_ble_gatts_hvx( - conn_handle: u16, - p_hvx_params: *const ble_gatts_hvx_params_t, -) -> u32 { +pub unsafe fn sd_ble_gatts_hvx(conn_handle: u16, p_hvx_params: *const ble_gatts_hvx_params_t) -> u32 { let ret: u32; core::arch::asm!("svc 174", inout("r0") to_asm(conn_handle) => ret, @@ -14454,11 +13607,7 @@ pub unsafe fn sd_ble_gatts_hvx( #[doc = " @retval ::BLE_ERROR_GATTS_SYS_ATTR_MISSING System attributes missing, use @ref sd_ble_gatts_sys_attr_set to set them to a known value."] #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."] #[inline(always)] -pub unsafe fn sd_ble_gatts_service_changed( - conn_handle: u16, - start_handle: u16, - end_handle: u16, -) -> u32 { +pub unsafe fn sd_ble_gatts_service_changed(conn_handle: u16, start_handle: u16, end_handle: u16) -> u32 { let ret: u32; core::arch::asm!("svc 175", inout("r0") to_asm(conn_handle) => ret, @@ -14557,12 +13706,7 @@ pub unsafe fn sd_ble_gatts_rw_authorize_reply( #[doc = " @retval ::NRF_ERROR_INVALID_DATA Invalid data supplied, the data should be exactly the same as retrieved with @ref sd_ble_gatts_sys_attr_get."] #[doc = " @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation."] #[inline(always)] -pub unsafe fn sd_ble_gatts_sys_attr_set( - conn_handle: u16, - p_sys_attr_data: *const u8, - len: u16, - flags: u32, -) -> u32 { +pub unsafe fn sd_ble_gatts_sys_attr_set(conn_handle: u16, p_sys_attr_data: *const u8, len: u16, flags: u32) -> u32 { let ret: u32; core::arch::asm!("svc 177", inout("r0") to_asm(conn_handle) => ret, @@ -14651,11 +13795,7 @@ pub unsafe fn sd_ble_gatts_initial_user_handle_get(p_handle: *mut u16) -> u32 { #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameters supplied. Returned when both @c p_uuid and @c p_md are NULL."] #[doc = " @retval ::NRF_ERROR_NOT_FOUND Attribute was not found."] #[inline(always)] -pub unsafe fn sd_ble_gatts_attr_get( - handle: u16, - p_uuid: *mut ble_uuid_t, - p_md: *mut ble_gatts_attr_md_t, -) -> u32 { +pub unsafe fn sd_ble_gatts_attr_get(handle: u16, p_uuid: *mut ble_uuid_t, p_md: *mut ble_gatts_attr_md_t) -> u32 { let ret: u32; core::arch::asm!("svc 180", inout("r0") to_asm(handle) => ret, @@ -14828,9 +13968,7 @@ fn bindgen_test_layout_ble_evt_user_mem_request_t() { concat!("Alignment of ", stringify!(ble_evt_user_mem_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).type_ as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).type_ as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14862,9 +14000,7 @@ fn bindgen_test_layout_ble_evt_user_mem_release_t() { concat!("Alignment of ", stringify!(ble_evt_user_mem_release_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).type_ as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).type_ as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14874,9 +14010,7 @@ fn bindgen_test_layout_ble_evt_user_mem_release_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).mem_block as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).mem_block as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -14917,10 +14051,7 @@ fn bindgen_test_layout_ble_common_evt_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_common_evt_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).user_mem_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).user_mem_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14930,10 +14061,7 @@ fn bindgen_test_layout_ble_common_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).user_mem_release as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).user_mem_release as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15000,12 +14128,7 @@ fn bindgen_test_layout_ble_evt_hdr_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).evt_id as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_evt_hdr_t), - "::", - stringify!(evt_id) - ) + concat!("Offset of field: ", stringify!(ble_evt_hdr_t), "::", stringify!(evt_id)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).evt_len as *const _ as usize }, @@ -15053,9 +14176,7 @@ fn bindgen_test_layout_ble_evt_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_evt_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).common_evt as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).common_evt as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15065,9 +14186,7 @@ fn bindgen_test_layout_ble_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gap_evt as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).gap_evt as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15077,9 +14196,7 @@ fn bindgen_test_layout_ble_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gattc_evt as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).gattc_evt as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15089,9 +14206,7 @@ fn bindgen_test_layout_ble_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gatts_evt as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).gatts_evt as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15101,9 +14216,7 @@ fn bindgen_test_layout_ble_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).l2cap_evt as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).l2cap_evt as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15128,22 +14241,12 @@ fn bindgen_test_layout_ble_evt_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).header as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_evt_t), - "::", - stringify!(header) - ) + concat!("Offset of field: ", stringify!(ble_evt_t), "::", stringify!(header)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).evt as *const _ as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(ble_evt_t), - "::", - stringify!(evt) - ) + concat!("Offset of field: ", stringify!(ble_evt_t), "::", stringify!(evt)) ); } #[doc = " @brief Version Information."] @@ -15190,9 +14293,7 @@ fn bindgen_test_layout_ble_version_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).subversion_number as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).subversion_number as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -15256,13 +14357,8 @@ impl ble_pa_lna_cfg_t { } } #[inline] - pub fn new_bitfield_1( - enable: u8, - active_high: u8, - gpio_pin: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(enable: u8, active_high: u8, gpio_pin: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let enable: u8 = unsafe { ::core::mem::transmute(enable) }; enable as u64 @@ -15326,9 +14422,7 @@ fn bindgen_test_layout_ble_common_opt_pa_lna_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).lna_cfg as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).lna_cfg as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -15338,9 +14432,7 @@ fn bindgen_test_layout_ble_common_opt_pa_lna_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ppi_ch_id_set as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).ppi_ch_id_set as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -15350,9 +14442,7 @@ fn bindgen_test_layout_ble_common_opt_pa_lna_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ppi_ch_id_clr as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).ppi_ch_id_clr as *const _ as usize }, 3usize, concat!( "Offset of field: ", @@ -15362,9 +14452,7 @@ fn bindgen_test_layout_ble_common_opt_pa_lna_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gpiote_ch_id as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).gpiote_ch_id as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -15415,8 +14503,7 @@ impl ble_common_opt_conn_evt_ext_t { } #[inline] pub fn new_bitfield_1(enable: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let enable: u8 = unsafe { ::core::mem::transmute(enable) }; enable as u64 @@ -15452,10 +14539,7 @@ fn bindgen_test_layout_ble_common_opt_extended_rc_cal_t() { assert_eq!( ::core::mem::align_of::(), 1usize, - concat!( - "Alignment of ", - stringify!(ble_common_opt_extended_rc_cal_t) - ) + concat!("Alignment of ", stringify!(ble_common_opt_extended_rc_cal_t)) ); } impl ble_common_opt_extended_rc_cal_t { @@ -15472,8 +14556,7 @@ impl ble_common_opt_extended_rc_cal_t { } #[inline] pub fn new_bitfield_1(enable: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let enable: u8 = unsafe { ::core::mem::transmute(enable) }; enable as u64 @@ -15526,9 +14609,7 @@ fn bindgen_test_layout_ble_common_opt_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).extended_rc_cal as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).extended_rc_cal as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15563,22 +14644,12 @@ fn bindgen_test_layout_ble_opt_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).common_opt as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_opt_t), - "::", - stringify!(common_opt) - ) + concat!("Offset of field: ", stringify!(ble_opt_t), "::", stringify!(common_opt)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).gap_opt as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_opt_t), - "::", - stringify!(gap_opt) - ) + concat!("Offset of field: ", stringify!(ble_opt_t), "::", stringify!(gap_opt)) ); } #[doc = "@brief BLE connection configuration type, wrapping the module specific configurations, set with"] @@ -15635,10 +14706,7 @@ fn bindgen_test_layout_ble_conn_cfg_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_conn_cfg_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gap_conn_cfg as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).gap_conn_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15648,10 +14716,7 @@ fn bindgen_test_layout_ble_conn_cfg_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gattc_conn_cfg as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).gattc_conn_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15661,10 +14726,7 @@ fn bindgen_test_layout_ble_conn_cfg_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gatts_conn_cfg as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).gatts_conn_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15674,10 +14736,7 @@ fn bindgen_test_layout_ble_conn_cfg_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gatt_conn_cfg as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).gatt_conn_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15687,10 +14746,7 @@ fn bindgen_test_layout_ble_conn_cfg_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).l2cap_conn_cfg as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).l2cap_conn_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15757,9 +14813,7 @@ fn bindgen_test_layout_ble_common_cfg_vs_uuid_t() { concat!("Alignment of ", stringify!(ble_common_cfg_vs_uuid_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).vs_uuid_count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).vs_uuid_count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15829,42 +14883,22 @@ fn bindgen_test_layout_ble_cfg_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).conn_cfg as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_cfg_t), - "::", - stringify!(conn_cfg) - ) + concat!("Offset of field: ", stringify!(ble_cfg_t), "::", stringify!(conn_cfg)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).common_cfg as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_cfg_t), - "::", - stringify!(common_cfg) - ) + concat!("Offset of field: ", stringify!(ble_cfg_t), "::", stringify!(common_cfg)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).gap_cfg as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_cfg_t), - "::", - stringify!(gap_cfg) - ) + concat!("Offset of field: ", stringify!(ble_cfg_t), "::", stringify!(gap_cfg)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).gatts_cfg as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_cfg_t), - "::", - stringify!(gatts_cfg) - ) + concat!("Offset of field: ", stringify!(ble_cfg_t), "::", stringify!(gatts_cfg)) ); } @@ -16092,11 +15126,7 @@ pub unsafe fn sd_ble_uuid_vs_remove(p_uuid_type: *mut u8) -> u32 { #[doc = " @retval ::NRF_ERROR_INVALID_LENGTH Invalid UUID length."] #[doc = " @retval ::NRF_ERROR_NOT_FOUND For a 128-bit UUID, no match in the populated table of UUIDs."] #[inline(always)] -pub unsafe fn sd_ble_uuid_decode( - uuid_le_len: u8, - p_uuid_le: *const u8, - p_uuid: *mut ble_uuid_t, -) -> u32 { +pub unsafe fn sd_ble_uuid_decode(uuid_le_len: u8, p_uuid_le: *const u8, p_uuid: *mut ble_uuid_t) -> u32 { let ret: u32; core::arch::asm!("svc 99", inout("r0") to_asm(uuid_le_len) => ret, @@ -16120,11 +15150,7 @@ pub unsafe fn sd_ble_uuid_decode( #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."] #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid UUID type."] #[inline(always)] -pub unsafe fn sd_ble_uuid_encode( - p_uuid: *const ble_uuid_t, - p_uuid_le_len: *mut u8, - p_uuid_le: *mut u8, -) -> u32 { +pub unsafe fn sd_ble_uuid_encode(p_uuid: *const ble_uuid_t, p_uuid_le_len: *mut u8, p_uuid_le: *mut u8) -> u32 { let ret: u32; core::arch::asm!("svc 100", inout("r0") to_asm(p_uuid) => ret, diff --git a/nrf-softdevice-s122/src/bindings.rs b/nrf-softdevice-s122/src/bindings.rs index 44aa2cd..8cd4d02 100644 --- a/nrf-softdevice-s122/src/bindings.rs +++ b/nrf-softdevice-s122/src/bindings.rs @@ -922,79 +922,61 @@ pub const NRF_POWER_DCDC_MODES_NRF_POWER_DCDC_ENABLE: NRF_POWER_DCDC_MODES = 1; #[doc = "@brief DC/DC converter modes."] pub type NRF_POWER_DCDC_MODES = self::c_uint; #[doc = "< The event does not have a notification."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_NONE: - NRF_RADIO_NOTIFICATION_DISTANCES = 0; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_NONE: NRF_RADIO_NOTIFICATION_DISTANCES = 0; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_200US: - NRF_RADIO_NOTIFICATION_DISTANCES = 1; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_200US: NRF_RADIO_NOTIFICATION_DISTANCES = 1; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_420US: - NRF_RADIO_NOTIFICATION_DISTANCES = 2; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_420US: NRF_RADIO_NOTIFICATION_DISTANCES = 2; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_800US: - NRF_RADIO_NOTIFICATION_DISTANCES = 3; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_800US: NRF_RADIO_NOTIFICATION_DISTANCES = 3; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_1740US: - NRF_RADIO_NOTIFICATION_DISTANCES = 4; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_1740US: NRF_RADIO_NOTIFICATION_DISTANCES = 4; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_2680US: - NRF_RADIO_NOTIFICATION_DISTANCES = 5; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_2680US: NRF_RADIO_NOTIFICATION_DISTANCES = 5; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_3620US: - NRF_RADIO_NOTIFICATION_DISTANCES = 6; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_3620US: NRF_RADIO_NOTIFICATION_DISTANCES = 6; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_4560US: - NRF_RADIO_NOTIFICATION_DISTANCES = 7; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_4560US: NRF_RADIO_NOTIFICATION_DISTANCES = 7; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_5500US: - NRF_RADIO_NOTIFICATION_DISTANCES = 8; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_5500US: NRF_RADIO_NOTIFICATION_DISTANCES = 8; #[doc = "@brief Radio notification distances."] pub type NRF_RADIO_NOTIFICATION_DISTANCES = self::c_uint; #[doc = "< The event does not have a radio notification signal."] -pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_NONE: - NRF_RADIO_NOTIFICATION_TYPES = 0; +pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_NONE: NRF_RADIO_NOTIFICATION_TYPES = 0; #[doc = "< Using interrupt for notification when the radio will be enabled."] -pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_ACTIVE: - NRF_RADIO_NOTIFICATION_TYPES = 1; +pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_ACTIVE: NRF_RADIO_NOTIFICATION_TYPES = 1; #[doc = "< Using interrupt for notification when the radio has been disabled."] -pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_INACTIVE: - NRF_RADIO_NOTIFICATION_TYPES = 2; +pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_INACTIVE: NRF_RADIO_NOTIFICATION_TYPES = 2; #[doc = "< Using interrupt for notification both when the radio will be enabled and disabled."] -pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_BOTH: - NRF_RADIO_NOTIFICATION_TYPES = 3; +pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_BOTH: NRF_RADIO_NOTIFICATION_TYPES = 3; #[doc = "@brief Radio notification types."] pub type NRF_RADIO_NOTIFICATION_TYPES = self::c_uint; #[doc = "< This signal indicates the start of the radio timeslot."] -pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_START: - NRF_RADIO_CALLBACK_SIGNAL_TYPE = 0; +pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_START: NRF_RADIO_CALLBACK_SIGNAL_TYPE = 0; #[doc = "< This signal indicates the NRF_TIMER0 interrupt."] -pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_TIMER0: - NRF_RADIO_CALLBACK_SIGNAL_TYPE = 1; +pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_TIMER0: NRF_RADIO_CALLBACK_SIGNAL_TYPE = 1; #[doc = "< This signal indicates the NRF_RADIO interrupt."] -pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_RADIO: - NRF_RADIO_CALLBACK_SIGNAL_TYPE = 2; +pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_RADIO: NRF_RADIO_CALLBACK_SIGNAL_TYPE = 2; #[doc = "< This signal indicates extend action failed."] -pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_FAILED: - NRF_RADIO_CALLBACK_SIGNAL_TYPE = 3; +pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_FAILED: NRF_RADIO_CALLBACK_SIGNAL_TYPE = + 3; #[doc = "< This signal indicates extend action succeeded."] pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_SUCCEEDED: NRF_RADIO_CALLBACK_SIGNAL_TYPE = 4; #[doc = "@brief The Radio signal callback types."] pub type NRF_RADIO_CALLBACK_SIGNAL_TYPE = self::c_uint; #[doc = "< Return without action."] -pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_NONE: - NRF_RADIO_SIGNAL_CALLBACK_ACTION = 0; +pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_NONE: NRF_RADIO_SIGNAL_CALLBACK_ACTION = 0; #[doc = "< Request an extension of the current"] #[doc = "timeslot. Maximum execution time for this action:"] #[doc = "@ref NRF_RADIO_MAX_EXTENSION_PROCESSING_TIME_US."] #[doc = "This action must be started at least"] #[doc = "@ref NRF_RADIO_MIN_EXTENSION_MARGIN_US before"] #[doc = "the end of the timeslot."] -pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_EXTEND: - NRF_RADIO_SIGNAL_CALLBACK_ACTION = 1; +pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_EXTEND: NRF_RADIO_SIGNAL_CALLBACK_ACTION = + 1; #[doc = "< End the current radio timeslot."] -pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_END: - NRF_RADIO_SIGNAL_CALLBACK_ACTION = 2; +pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_END: NRF_RADIO_SIGNAL_CALLBACK_ACTION = 2; #[doc = "< Request a new radio timeslot and end the current timeslot."] pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_REQUEST_AND_END: NRF_RADIO_SIGNAL_CALLBACK_ACTION = 3; @@ -1087,9 +1069,7 @@ fn bindgen_test_layout_nrf_radio_request_earliest_t() { concat!("Alignment of ", stringify!(nrf_radio_request_earliest_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hfclk as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hfclk as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -1099,9 +1079,7 @@ fn bindgen_test_layout_nrf_radio_request_earliest_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).priority as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).priority as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -1111,9 +1089,7 @@ fn bindgen_test_layout_nrf_radio_request_earliest_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).length_us as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).length_us as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -1123,10 +1099,7 @@ fn bindgen_test_layout_nrf_radio_request_earliest_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).timeout_us as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).timeout_us as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -1162,9 +1135,7 @@ fn bindgen_test_layout_nrf_radio_request_normal_t() { concat!("Alignment of ", stringify!(nrf_radio_request_normal_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hfclk as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hfclk as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -1174,9 +1145,7 @@ fn bindgen_test_layout_nrf_radio_request_normal_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).priority as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).priority as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -1186,9 +1155,7 @@ fn bindgen_test_layout_nrf_radio_request_normal_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).distance_us as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).distance_us as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -1198,9 +1165,7 @@ fn bindgen_test_layout_nrf_radio_request_normal_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).length_us as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).length_us as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -1238,16 +1203,10 @@ fn bindgen_test_layout_nrf_radio_request_t__bindgen_ty_1() { assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(nrf_radio_request_t__bindgen_ty_1) - ) + concat!("Alignment of ", stringify!(nrf_radio_request_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).earliest as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).earliest as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -1257,10 +1216,7 @@ fn bindgen_test_layout_nrf_radio_request_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).normal as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).normal as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -1283,9 +1239,7 @@ fn bindgen_test_layout_nrf_radio_request_t() { concat!("Alignment of ", stringify!(nrf_radio_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).request_type as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).request_type as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -1332,8 +1286,7 @@ pub struct nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_1 #[test] fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_1() { assert_eq!( - ::core::mem::size_of::( - ), + ::core::mem::size_of::(), 4usize, concat!( "Size of: ", @@ -1341,8 +1294,7 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__b ) ); assert_eq!( - ::core::mem::align_of::( - ), + ::core::mem::align_of::(), 4usize, concat!( "Alignment of ", @@ -1351,10 +1303,8 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__b ); assert_eq!( unsafe { - &(*(::core::ptr::null::< - nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_1, - >())) - .p_next as *const _ as usize + &(*(::core::ptr::null::())).p_next + as *const _ as usize }, 0usize, concat!( @@ -1374,8 +1324,7 @@ pub struct nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_2 #[test] fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_2() { assert_eq!( - ::core::mem::size_of::( - ), + ::core::mem::size_of::(), 4usize, concat!( "Size of: ", @@ -1383,8 +1332,7 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__b ) ); assert_eq!( - ::core::mem::align_of::( - ), + ::core::mem::align_of::(), 4usize, concat!( "Alignment of ", @@ -1393,10 +1341,8 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__b ); assert_eq!( unsafe { - &(*(::core::ptr::null::< - nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_2, - >())) - .length_us as *const _ as usize + &(*(::core::ptr::null::())).length_us + as *const _ as usize }, 0usize, concat!( @@ -1427,8 +1373,8 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1() ); assert_eq!( unsafe { - &(*(::core::ptr::null::())) - .request as *const _ as usize + &(*(::core::ptr::null::())).request as *const _ + as usize }, 0usize, concat!( @@ -1440,8 +1386,8 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1() ); assert_eq!( unsafe { - &(*(::core::ptr::null::())) - .extend as *const _ as usize + &(*(::core::ptr::null::())).extend as *const _ + as usize }, 0usize, concat!( @@ -1457,23 +1403,16 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t() { assert_eq!( ::core::mem::size_of::(), 8usize, - concat!( - "Size of: ", - stringify!(nrf_radio_signal_callback_return_param_t) - ) + concat!("Size of: ", stringify!(nrf_radio_signal_callback_return_param_t)) ); assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(nrf_radio_signal_callback_return_param_t) - ) + concat!("Alignment of ", stringify!(nrf_radio_signal_callback_return_param_t)) ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).callback_action - as *const _ as usize + &(*(::core::ptr::null::())).callback_action as *const _ as usize }, 0usize, concat!( @@ -1484,10 +1423,7 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).params as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).params as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -1508,9 +1444,8 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t() { #[doc = " @param[in] signal_type Type of signal, see @ref NRF_RADIO_CALLBACK_SIGNAL_TYPE."] #[doc = ""] #[doc = " @return Pointer to structure containing action requested by the application."] -pub type nrf_radio_signal_callback_t = ::core::option::Option< - unsafe extern "C" fn(signal_type: u8) -> *mut nrf_radio_signal_callback_return_param_t, ->; +pub type nrf_radio_signal_callback_t = + ::core::option::Option *mut nrf_radio_signal_callback_return_param_t>; #[doc = "@brief AES ECB parameter typedefs"] pub type soc_ecb_key_t = [u8; 16usize]; pub type soc_ecb_cleartext_t = [u8; 16usize]; @@ -1604,9 +1539,7 @@ fn bindgen_test_layout_nrf_ecb_hal_data_block_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_cleartext as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_cleartext as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -1616,9 +1549,7 @@ fn bindgen_test_layout_nrf_ecb_hal_data_block_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_ciphertext as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_ciphertext as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -2415,10 +2346,7 @@ pub unsafe fn sd_ecb_block_encrypt(p_ecb_data: *mut nrf_ecb_hal_data_t) -> u32 { #[doc = ""] #[doc = " @retval ::NRF_SUCCESS"] #[inline(always)] -pub unsafe fn sd_ecb_blocks_encrypt( - block_count: u8, - p_data_blocks: *mut nrf_ecb_hal_data_block_t, -) -> u32 { +pub unsafe fn sd_ecb_blocks_encrypt(block_count: u8, p_data_blocks: *mut nrf_ecb_hal_data_block_t) -> u32 { let ret: u32; core::arch::asm!("svc 71", inout("r0") to_asm(block_count) => ret, @@ -2775,9 +2703,7 @@ fn bindgen_test_layout_nrf_clock_lf_cfg_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rc_temp_ctiv as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rc_temp_ctiv as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -2816,8 +2742,7 @@ fn bindgen_test_layout_nrf_clock_lf_cfg_t() { #[doc = ""] #[doc = " @note When id is set to @ref NRF_FAULT_ID_APP_MEMACC, pc will contain the address of the instruction being executed at the time when"] #[doc = " the fault is detected by the CPU. The CPU program counter may have advanced up to 2 instructions (no branching) after the one that triggered the fault."] -pub type nrf_fault_handler_t = - ::core::option::Option; +pub type nrf_fault_handler_t = ::core::option::Option; #[doc = "@brief Enables the SoftDevice and by extension the protocol stack."] #[doc = ""] @@ -2980,22 +2905,12 @@ fn bindgen_test_layout_ble_uuid_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).uuid as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_uuid_t), - "::", - stringify!(uuid) - ) + concat!("Offset of field: ", stringify!(ble_uuid_t), "::", stringify!(uuid)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).type_ as *const _ as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(ble_uuid_t), - "::", - stringify!(type_) - ) + concat!("Offset of field: ", stringify!(ble_uuid_t), "::", stringify!(type_)) ); } #[doc = "@brief Data structure."] @@ -3022,22 +2937,12 @@ fn bindgen_test_layout_ble_data_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).p_data as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_data_t), - "::", - stringify!(p_data) - ) + concat!("Offset of field: ", stringify!(ble_data_t), "::", stringify!(p_data)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).len as *const _ as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(ble_data_t), - "::", - stringify!(len) - ) + concat!("Offset of field: ", stringify!(ble_data_t), "::", stringify!(len)) ); } #[doc = " @brief BLE GATT connection configuration parameters, set with @ref sd_ble_cfg_set."] @@ -3184,8 +3089,7 @@ impl ble_gatt_char_props_t { indicate: u8, auth_signed_wr: u8, ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let broadcast: u8 = unsafe { ::core::mem::transmute(broadcast) }; broadcast as u64 @@ -3261,8 +3165,7 @@ impl ble_gatt_char_ext_props_t { } #[inline] pub fn new_bitfield_1(reliable_wr: u8, wr_aux: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let reliable_wr: u8 = unsafe { ::core::mem::transmute(reliable_wr) }; reliable_wr as u64 @@ -3455,9 +3358,7 @@ fn bindgen_test_layout_sd_mbr_command_copy_bl_t() { concat!("Alignment of ", stringify!(sd_mbr_command_copy_bl_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).bl_src as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).bl_src as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3467,9 +3368,7 @@ fn bindgen_test_layout_sd_mbr_command_copy_bl_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).bl_len as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).bl_len as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -3511,24 +3410,15 @@ fn bindgen_test_layout_sd_mbr_command_vector_table_base_set_t() { assert_eq!( ::core::mem::size_of::(), 4usize, - concat!( - "Size of: ", - stringify!(sd_mbr_command_vector_table_base_set_t) - ) + concat!("Size of: ", stringify!(sd_mbr_command_vector_table_base_set_t)) ); assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(sd_mbr_command_vector_table_base_set_t) - ) + concat!("Alignment of ", stringify!(sd_mbr_command_vector_table_base_set_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).address as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).address as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3555,24 +3445,15 @@ fn bindgen_test_layout_sd_mbr_command_irq_forward_address_set_t() { assert_eq!( ::core::mem::size_of::(), 4usize, - concat!( - "Size of: ", - stringify!(sd_mbr_command_irq_forward_address_set_t) - ) + concat!("Size of: ", stringify!(sd_mbr_command_irq_forward_address_set_t)) ); assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(sd_mbr_command_irq_forward_address_set_t) - ) + concat!("Alignment of ", stringify!(sd_mbr_command_irq_forward_address_set_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).address - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).address as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3623,9 +3504,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(sd_mbr_command_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).copy_sd as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).copy_sd as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3635,9 +3514,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).compare as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).compare as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3647,9 +3524,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).copy_bl as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).copy_bl as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3659,10 +3534,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).base_set as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).base_set as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3673,8 +3545,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).irq_forward_address_set - as *const _ as usize + &(*(::core::ptr::null::())).irq_forward_address_set as *const _ as usize }, 0usize, concat!( @@ -4023,8 +3894,7 @@ impl ble_gap_adv_report_type_t { status: u16, reserved: u16, ) -> __BindgenBitfieldUnit<[u8; 2usize], u16> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize], u16> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize], u16> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let connectable: u16 = unsafe { ::core::mem::transmute(connectable) }; connectable as u64 @@ -4078,9 +3948,7 @@ fn bindgen_test_layout_ble_gap_aux_pointer_t() { concat!("Alignment of ", stringify!(ble_gap_aux_pointer_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).aux_offset as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).aux_offset as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -4123,12 +3991,7 @@ fn bindgen_test_layout_ble_gap_addr_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).addr as *const _ as usize }, 1usize, - concat!( - "Offset of field: ", - stringify!(ble_gap_addr_t), - "::", - stringify!(addr) - ) + concat!("Offset of field: ", stringify!(ble_gap_addr_t), "::", stringify!(addr)) ); } impl ble_gap_addr_t { @@ -4155,12 +4018,8 @@ impl ble_gap_addr_t { } } #[inline] - pub fn new_bitfield_1( - addr_id_peer: u8, - addr_type: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(addr_id_peer: u8, addr_type: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let addr_id_peer: u8 = unsafe { ::core::mem::transmute(addr_id_peer) }; addr_id_peer as u64 @@ -4207,10 +4066,7 @@ fn bindgen_test_layout_ble_gap_conn_params_t() { concat!("Alignment of ", stringify!(ble_gap_conn_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).min_conn_interval as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).min_conn_interval as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -4220,10 +4076,7 @@ fn bindgen_test_layout_ble_gap_conn_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_conn_interval as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).max_conn_interval as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -4233,9 +4086,7 @@ fn bindgen_test_layout_ble_gap_conn_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).slave_latency as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).slave_latency as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -4245,9 +4096,7 @@ fn bindgen_test_layout_ble_gap_conn_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_sup_timeout as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_sup_timeout as *const _ as usize }, 6usize, concat!( "Offset of field: ", @@ -4309,8 +4158,7 @@ impl ble_gap_conn_sec_mode_t { } #[inline] pub fn new_bitfield_1(sm: u8, lv: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { let sm: u8 = unsafe { ::core::mem::transmute(sm) }; sm as u64 @@ -4354,9 +4202,7 @@ fn bindgen_test_layout_ble_gap_conn_sec_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).encr_key_size as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).encr_key_size as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -4388,12 +4234,7 @@ fn bindgen_test_layout_ble_gap_irk_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).irk as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_gap_irk_t), - "::", - stringify!(irk) - ) + concat!("Offset of field: ", stringify!(ble_gap_irk_t), "::", stringify!(irk)) ); } #[doc = "@brief Channel mask (40 bits)."] @@ -4440,9 +4281,7 @@ fn bindgen_test_layout_ble_gap_scan_params_t() { concat!("Alignment of ", stringify!(ble_gap_scan_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).scan_phys as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).scan_phys as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -4452,9 +4291,7 @@ fn bindgen_test_layout_ble_gap_scan_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).interval_us as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).interval_us as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -4464,9 +4301,7 @@ fn bindgen_test_layout_ble_gap_scan_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).window_us as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).window_us as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -4486,9 +4321,7 @@ fn bindgen_test_layout_ble_gap_scan_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).channel_mask as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).channel_mask as *const _ as usize }, 14usize, concat!( "Offset of field: ", @@ -4550,15 +4383,13 @@ impl ble_gap_scan_params_t { active: u8, filter_policy: u8, ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let extended: u8 = unsafe { ::core::mem::transmute(extended) }; extended as u64 }); __bindgen_bitfield_unit.set(1usize, 1u8, { - let report_incomplete_evts: u8 = - unsafe { ::core::mem::transmute(report_incomplete_evts) }; + let report_incomplete_evts: u8 = unsafe { ::core::mem::transmute(report_incomplete_evts) }; report_incomplete_evts as u64 }); __bindgen_bitfield_unit.set(2usize, 1u8, { @@ -4615,9 +4446,7 @@ fn bindgen_test_layout_ble_gap_privacy_params_t() { concat!("Alignment of ", stringify!(ble_gap_privacy_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).privacy_mode as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).privacy_mode as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -4627,10 +4456,7 @@ fn bindgen_test_layout_ble_gap_privacy_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).private_addr_type as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).private_addr_type as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -4640,10 +4466,7 @@ fn bindgen_test_layout_ble_gap_privacy_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).private_addr_cycle_s as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).private_addr_cycle_s as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -4653,9 +4476,7 @@ fn bindgen_test_layout_ble_gap_privacy_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_device_irk as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_device_irk as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -4778,14 +4599,8 @@ impl ble_gap_sec_kdist_t { } } #[inline] - pub fn new_bitfield_1( - enc: u8, - id: u8, - sign: u8, - link: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(enc: u8, id: u8, sign: u8, link: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let enc: u8 = unsafe { ::core::mem::transmute(enc) }; enc as u64 @@ -4832,9 +4647,7 @@ fn bindgen_test_layout_ble_gap_sec_params_t() { concat!("Alignment of ", stringify!(ble_gap_sec_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).min_key_size as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).min_key_size as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -4844,9 +4657,7 @@ fn bindgen_test_layout_ble_gap_sec_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_key_size as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).max_key_size as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -4866,9 +4677,7 @@ fn bindgen_test_layout_ble_gap_sec_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).kdist_peer as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).kdist_peer as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -4954,8 +4763,7 @@ impl ble_gap_sec_params_t { io_caps: u8, oob: u8, ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let bond: u8 = unsafe { ::core::mem::transmute(bond) }; bond as u64 @@ -5049,13 +4857,8 @@ impl ble_gap_enc_info_t { } } #[inline] - pub fn new_bitfield_1( - lesc: u8, - auth: u8, - ltk_len: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(lesc: u8, auth: u8, ltk_len: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let lesc: u8 = unsafe { ::core::mem::transmute(lesc) }; lesc as u64 @@ -5282,9 +5085,7 @@ fn bindgen_test_layout_ble_gap_evt_connected_t() { concat!("Alignment of ", stringify!(ble_gap_evt_connected_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).peer_addr as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).peer_addr as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5304,9 +5105,7 @@ fn bindgen_test_layout_ble_gap_evt_connected_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_params as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_params as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -5336,9 +5135,7 @@ fn bindgen_test_layout_ble_gap_evt_disconnected_t() { concat!("Alignment of ", stringify!(ble_gap_evt_disconnected_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).reason as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).reason as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5368,10 +5165,7 @@ fn bindgen_test_layout_ble_gap_evt_conn_param_update_t() { concat!("Alignment of ", stringify!(ble_gap_evt_conn_param_update_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_params as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_params as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5398,15 +5192,11 @@ fn bindgen_test_layout_ble_gap_evt_phy_update_request_t() { assert_eq!( ::core::mem::align_of::(), 1usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_phy_update_request_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_phy_update_request_t)) ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).peer_preferred_phys - as *const _ as usize + &(*(::core::ptr::null::())).peer_preferred_phys as *const _ as usize }, 0usize, concat!( @@ -5441,9 +5231,7 @@ fn bindgen_test_layout_ble_gap_evt_phy_update_t() { concat!("Alignment of ", stringify!(ble_gap_evt_phy_update_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).status as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).status as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5453,9 +5241,7 @@ fn bindgen_test_layout_ble_gap_evt_phy_update_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).tx_phy as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).tx_phy as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -5465,9 +5251,7 @@ fn bindgen_test_layout_ble_gap_evt_phy_update_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rx_phy as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rx_phy as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -5494,16 +5278,10 @@ fn bindgen_test_layout_ble_gap_evt_sec_params_request_t() { assert_eq!( ::core::mem::align_of::(), 1usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_sec_params_request_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_sec_params_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).peer_params as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).peer_params as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5534,9 +5312,7 @@ fn bindgen_test_layout_ble_gap_evt_passkey_display_t() { concat!("Alignment of ", stringify!(ble_gap_evt_passkey_display_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).passkey as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).passkey as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5560,8 +5336,7 @@ impl ble_gap_evt_passkey_display_t { } #[inline] pub fn new_bitfield_1(match_request: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let match_request: u8 = unsafe { ::core::mem::transmute(match_request) }; match_request as u64 @@ -5589,9 +5364,7 @@ fn bindgen_test_layout_ble_gap_evt_key_pressed_t() { concat!("Alignment of ", stringify!(ble_gap_evt_key_pressed_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).kp_not as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).kp_not as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5621,10 +5394,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_key_request_t() { concat!("Alignment of ", stringify!(ble_gap_evt_auth_key_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).key_type as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).key_type as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5654,16 +5424,10 @@ fn bindgen_test_layout_ble_gap_evt_lesc_dhkey_request_t() { assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_lesc_dhkey_request_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_lesc_dhkey_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_pk_peer as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).p_pk_peer as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5687,8 +5451,7 @@ impl ble_gap_evt_lesc_dhkey_request_t { } #[inline] pub fn new_bitfield_1(oobd_req: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let oobd_req: u8 = unsafe { ::core::mem::transmute(oobd_req) }; oobd_req as u64 @@ -5762,14 +5525,8 @@ impl ble_gap_sec_levels_t { } } #[inline] - pub fn new_bitfield_1( - lv1: u8, - lv2: u8, - lv3: u8, - lv4: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(lv1: u8, lv2: u8, lv3: u8, lv4: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let lv1: u8 = unsafe { ::core::mem::transmute(lv1) }; lv1 as u64 @@ -6011,9 +5768,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_status_t() { concat!("Alignment of ", stringify!(ble_gap_evt_auth_status_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).auth_status as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).auth_status as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6023,9 +5778,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_status_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sm1_levels as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).sm1_levels as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -6035,9 +5788,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_status_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sm2_levels as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).sm2_levels as *const _ as usize }, 3usize, concat!( "Offset of field: ", @@ -6047,9 +5798,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_status_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).kdist_own as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).kdist_own as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -6059,9 +5808,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_status_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).kdist_peer as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).kdist_peer as *const _ as usize }, 5usize, concat!( "Offset of field: ", @@ -6106,13 +5853,8 @@ impl ble_gap_evt_auth_status_t { } } #[inline] - pub fn new_bitfield_1( - error_src: u8, - bonded: u8, - lesc: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(error_src: u8, bonded: u8, lesc: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 2u8, { let error_src: u8 = unsafe { ::core::mem::transmute(error_src) }; error_src as u64 @@ -6148,9 +5890,7 @@ fn bindgen_test_layout_ble_gap_evt_conn_sec_update_t() { concat!("Alignment of ", stringify!(ble_gap_evt_conn_sec_update_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_sec as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_sec as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6187,15 +5927,11 @@ fn bindgen_test_layout_ble_gap_evt_timeout_t__bindgen_ty_1() { assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_timeout_t__bindgen_ty_1) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_timeout_t__bindgen_ty_1)) ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).adv_report_buffer - as *const _ as usize + &(*(::core::ptr::null::())).adv_report_buffer as *const _ as usize }, 0usize, concat!( @@ -6262,9 +5998,7 @@ fn bindgen_test_layout_ble_gap_evt_rssi_changed_t() { concat!("Alignment of ", stringify!(ble_gap_evt_rssi_changed_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rssi as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rssi as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6274,9 +6008,7 @@ fn bindgen_test_layout_ble_gap_evt_rssi_changed_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ch_index as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).ch_index as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -6355,9 +6087,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).peer_addr as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).peer_addr as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -6367,9 +6097,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).direct_addr as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).direct_addr as *const _ as usize }, 9usize, concat!( "Offset of field: ", @@ -6379,9 +6107,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).primary_phy as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).primary_phy as *const _ as usize }, 16usize, concat!( "Offset of field: ", @@ -6391,9 +6117,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).secondary_phy as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).secondary_phy as *const _ as usize }, 17usize, concat!( "Offset of field: ", @@ -6403,9 +6127,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).tx_power as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).tx_power as *const _ as usize }, 18usize, concat!( "Offset of field: ", @@ -6425,9 +6147,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ch_index as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).ch_index as *const _ as usize }, 20usize, concat!( "Offset of field: ", @@ -6437,9 +6157,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).set_id as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).set_id as *const _ as usize }, 21usize, concat!( "Offset of field: ", @@ -6459,9 +6177,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).aux_pointer as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).aux_pointer as *const _ as usize }, 32usize, concat!( "Offset of field: ", @@ -6485,8 +6201,7 @@ impl ble_gap_evt_adv_report_t { } #[inline] pub fn new_bitfield_1(data_id: u16) -> __BindgenBitfieldUnit<[u8; 2usize], u16> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize], u16> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize], u16> = Default::default(); __bindgen_bitfield_unit.set(0usize, 12u8, { let data_id: u16 = unsafe { ::core::mem::transmute(data_id) }; data_id as u64 @@ -6559,14 +6274,8 @@ impl ble_gap_evt_sec_request_t { } } #[inline] - pub fn new_bitfield_1( - bond: u8, - mitm: u8, - lesc: u8, - keypress: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(bond: u8, mitm: u8, lesc: u8, keypress: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let bond: u8 = unsafe { ::core::mem::transmute(bond) }; bond as u64 @@ -6598,23 +6307,16 @@ fn bindgen_test_layout_ble_gap_evt_conn_param_update_request_t() { assert_eq!( ::core::mem::size_of::(), 8usize, - concat!( - "Size of: ", - stringify!(ble_gap_evt_conn_param_update_request_t) - ) + concat!("Size of: ", stringify!(ble_gap_evt_conn_param_update_request_t)) ); assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_conn_param_update_request_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_conn_param_update_request_t)) ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).conn_params - as *const _ as usize + &(*(::core::ptr::null::())).conn_params as *const _ as usize }, 0usize, concat!( @@ -6640,23 +6342,16 @@ fn bindgen_test_layout_ble_gap_evt_qos_channel_survey_report_t() { assert_eq!( ::core::mem::size_of::(), 40usize, - concat!( - "Size of: ", - stringify!(ble_gap_evt_qos_channel_survey_report_t) - ) + concat!("Size of: ", stringify!(ble_gap_evt_qos_channel_survey_report_t)) ); assert_eq!( ::core::mem::align_of::(), 1usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_qos_channel_survey_report_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_qos_channel_survey_report_t)) ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).channel_energy - as *const _ as usize + &(*(::core::ptr::null::())).channel_energy as *const _ as usize }, 0usize, concat!( @@ -6691,16 +6386,10 @@ fn bindgen_test_layout_ble_gap_evt_qos_conn_event_report_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_qos_conn_event_report_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_qos_conn_event_report_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).event_counter - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).event_counter as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6710,10 +6399,7 @@ fn bindgen_test_layout_ble_gap_evt_qos_conn_event_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ch_index as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).ch_index as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -6723,10 +6409,7 @@ fn bindgen_test_layout_ble_gap_evt_qos_conn_event_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).crc_ok_count - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).crc_ok_count as *const _ as usize }, 3usize, concat!( "Offset of field: ", @@ -6737,8 +6420,7 @@ fn bindgen_test_layout_ble_gap_evt_qos_conn_event_report_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).crc_error_count - as *const _ as usize + &(*(::core::ptr::null::())).crc_error_count as *const _ as usize }, 4usize, concat!( @@ -6763,8 +6445,7 @@ impl ble_gap_evt_qos_conn_event_report_t { } #[inline] pub fn new_bitfield_1(rx_timeout: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let rx_timeout: u8 = unsafe { ::core::mem::transmute(rx_timeout) }; rx_timeout as u64 @@ -6837,9 +6518,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_gap_evt_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).connected as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).connected as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6849,10 +6528,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).disconnected as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).disconnected as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6862,10 +6538,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_param_update as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_param_update as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6875,10 +6548,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sec_params_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).sec_params_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6888,10 +6558,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).passkey_display as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).passkey_display as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6901,10 +6568,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).key_pressed as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).key_pressed as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6914,10 +6578,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).auth_key_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).auth_key_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6927,10 +6588,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).lesc_dhkey_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).lesc_dhkey_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6940,10 +6598,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).auth_status as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).auth_status as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6953,10 +6608,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_sec_update as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_sec_update as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6966,9 +6618,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).timeout as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).timeout as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6978,10 +6628,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rssi_changed as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).rssi_changed as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6991,9 +6638,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_report as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_report as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7003,10 +6648,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sec_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).sec_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7017,8 +6659,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).conn_param_update_request - as *const _ as usize + &(*(::core::ptr::null::())).conn_param_update_request as *const _ as usize }, 0usize, concat!( @@ -7029,10 +6670,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).phy_update_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).phy_update_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7042,9 +6680,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).phy_update as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).phy_update as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7055,8 +6691,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).qos_channel_survey_report - as *const _ as usize + &(*(::core::ptr::null::())).qos_channel_survey_report as *const _ as usize }, 0usize, concat!( @@ -7067,10 +6702,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).qos_conn_event_report - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).qos_conn_event_report as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7105,12 +6737,7 @@ fn bindgen_test_layout_ble_gap_evt_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).params as *const _ as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(ble_gap_evt_t), - "::", - stringify!(params) - ) + concat!("Offset of field: ", stringify!(ble_gap_evt_t), "::", stringify!(params)) ); } #[doc = " @brief BLE GAP connection configuration parameters, set with @ref sd_ble_cfg_set."] @@ -7155,9 +6782,7 @@ fn bindgen_test_layout_ble_gap_conn_cfg_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).event_length as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).event_length as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -7197,10 +6822,7 @@ fn bindgen_test_layout_ble_gap_cfg_role_count_t() { concat!("Alignment of ", stringify!(ble_gap_cfg_role_count_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).central_role_count as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).central_role_count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7210,10 +6832,7 @@ fn bindgen_test_layout_ble_gap_cfg_role_count_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).central_sec_count as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).central_sec_count as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -7236,11 +6855,8 @@ impl ble_gap_cfg_role_count_t { } } #[inline] - pub fn new_bitfield_1( - qos_channel_survey_role_available: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(qos_channel_survey_role_available: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let qos_channel_survey_role_available: u8 = unsafe { ::core::mem::transmute(qos_channel_survey_role_available) }; @@ -7301,9 +6917,7 @@ fn bindgen_test_layout_ble_gap_cfg_device_name_t() { concat!("Alignment of ", stringify!(ble_gap_cfg_device_name_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write_perm as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).write_perm as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7313,9 +6927,7 @@ fn bindgen_test_layout_ble_gap_cfg_device_name_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_value as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_value as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -7325,9 +6937,7 @@ fn bindgen_test_layout_ble_gap_cfg_device_name_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).current_len as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).current_len as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -7337,9 +6947,7 @@ fn bindgen_test_layout_ble_gap_cfg_device_name_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_len as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).max_len as *const _ as usize }, 10usize, concat!( "Offset of field: ", @@ -7363,8 +6971,7 @@ impl ble_gap_cfg_device_name_t { } #[inline] pub fn new_bitfield_1(vloc: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 2u8, { let vloc: u8 = unsafe { ::core::mem::transmute(vloc) }; vloc as u64 @@ -7395,10 +7002,7 @@ fn bindgen_test_layout_ble_gap_cfg_ppcp_incl_cfg_t() { concat!("Alignment of ", stringify!(ble_gap_cfg_ppcp_incl_cfg_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).include_cfg as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).include_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7429,9 +7033,7 @@ fn bindgen_test_layout_ble_gap_cfg_car_incl_cfg_t() { concat!("Alignment of ", stringify!(ble_gap_cfg_car_incl_cfg_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).include_cfg as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).include_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7553,9 +7155,7 @@ fn bindgen_test_layout_ble_gap_opt_ch_map_t() { concat!("Alignment of ", stringify!(ble_gap_opt_ch_map_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7605,9 +7205,7 @@ fn bindgen_test_layout_ble_gap_opt_passkey_t() { concat!("Alignment of ", stringify!(ble_gap_opt_passkey_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_passkey as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_passkey as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7663,8 +7261,7 @@ impl ble_gap_opt_compat_mode_1_t { } #[inline] pub fn new_bitfield_1(enable: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let enable: u8 = unsafe { ::core::mem::transmute(enable) }; enable as u64 @@ -7708,16 +7305,10 @@ fn bindgen_test_layout_ble_gap_opt_auth_payload_timeout_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gap_opt_auth_payload_timeout_t) - ) + concat!("Alignment of ", stringify!(ble_gap_opt_auth_payload_timeout_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_handle as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7728,8 +7319,7 @@ fn bindgen_test_layout_ble_gap_opt_auth_payload_timeout_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).auth_payload_timeout - as *const _ as usize + &(*(::core::ptr::null::())).auth_payload_timeout as *const _ as usize }, 2usize, concat!( @@ -7774,10 +7364,7 @@ fn bindgen_test_layout_ble_gap_opt_enable_evt_len_check_t() { assert_eq!( ::core::mem::align_of::(), 1usize, - concat!( - "Alignment of ", - stringify!(ble_gap_opt_enable_evt_len_check_t) - ) + concat!("Alignment of ", stringify!(ble_gap_opt_enable_evt_len_check_t)) ); } impl ble_gap_opt_enable_evt_len_check_t { @@ -7794,8 +7381,7 @@ impl ble_gap_opt_enable_evt_len_check_t { } #[inline] pub fn new_bitfield_1(enable: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let enable: u8 = unsafe { ::core::mem::transmute(enable) }; enable as u64 @@ -7834,12 +7420,7 @@ fn bindgen_test_layout_ble_gap_opt_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).ch_map as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_gap_opt_t), - "::", - stringify!(ch_map) - ) + concat!("Offset of field: ", stringify!(ble_gap_opt_t), "::", stringify!(ch_map)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).passkey as *const _ as usize }, @@ -7862,9 +7443,7 @@ fn bindgen_test_layout_ble_gap_opt_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).auth_payload_timeout as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).auth_payload_timeout as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7874,9 +7453,7 @@ fn bindgen_test_layout_ble_gap_opt_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).enable_evt_len_check as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).enable_evt_len_check as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7923,9 +7500,7 @@ fn bindgen_test_layout_ble_gap_event_trigger_t() { concat!("Alignment of ", stringify!(ble_gap_event_trigger_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ppi_ch_id as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).ppi_ch_id as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7935,9 +7510,7 @@ fn bindgen_test_layout_ble_gap_event_trigger_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).task_endpoint as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).task_endpoint as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -7947,10 +7520,7 @@ fn bindgen_test_layout_ble_gap_event_trigger_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_evt_counter_start as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_evt_counter_start as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -7960,10 +7530,7 @@ fn bindgen_test_layout_ble_gap_event_trigger_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).period_in_events as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).period_in_events as *const _ as usize }, 10usize, concat!( "Offset of field: ", @@ -8023,10 +7590,7 @@ fn bindgen_test_layout_ble_gap_qos_channel_survey_t() { concat!("Alignment of ", stringify!(ble_gap_qos_channel_survey_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).interval_us as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).interval_us as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8093,9 +7657,7 @@ fn bindgen_test_layout_ble_gap_qos_rssi_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).threshold_dbm as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).threshold_dbm as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -8138,9 +7700,7 @@ fn bindgen_test_layout_ble_gap_qos_params_t() { concat!("Alignment of ", stringify!(ble_gap_qos_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).channel_survey as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).channel_survey as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8385,10 +7945,7 @@ pub unsafe fn sd_ble_gap_privacy_get(p_privacy_params: *mut ble_gap_privacy_para #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."] #[doc = " @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation."] #[inline(always)] -pub unsafe fn sd_ble_gap_conn_param_update( - conn_handle: u16, - p_conn_params: *const ble_gap_conn_params_t, -) -> u32 { +pub unsafe fn sd_ble_gap_conn_param_update(conn_handle: u16, p_conn_params: *const ble_gap_conn_params_t) -> u32 { let ret: u32; core::arch::asm!("svc 118", inout("r0") to_asm(conn_handle) => ret, @@ -8608,10 +8165,7 @@ pub unsafe fn sd_ble_gap_device_name_get(p_dev_name: *mut u8, p_len: *mut u16) - #[doc = " See @ref ble_gap_cfg_car_incl_cfg_t and @ref ble_gap_cfg_role_count_t."] #[doc = " @retval ::NRF_ERROR_TIMEOUT A SMP timeout has occurred, and further SMP operations on this link is prohibited."] #[inline(always)] -pub unsafe fn sd_ble_gap_authenticate( - conn_handle: u16, - p_sec_params: *const ble_gap_sec_params_t, -) -> u32 { +pub unsafe fn sd_ble_gap_authenticate(conn_handle: u16, p_sec_params: *const ble_gap_sec_params_t) -> u32 { let ret: u32; core::arch::asm!("svc 127", inout("r0") to_asm(conn_handle) => ret, @@ -8753,10 +8307,7 @@ pub unsafe fn sd_ble_gap_auth_key_reply(conn_handle: u16, key_type: u8, p_key: * #[doc = " - The application has not pulled a @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST event."] #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."] #[inline(always)] -pub unsafe fn sd_ble_gap_lesc_dhkey_reply( - conn_handle: u16, - p_dhkey: *const ble_gap_lesc_dhkey_t, -) -> u32 { +pub unsafe fn sd_ble_gap_lesc_dhkey_reply(conn_handle: u16, p_dhkey: *const ble_gap_lesc_dhkey_t) -> u32 { let ret: u32; core::arch::asm!("svc 130", inout("r0") to_asm(conn_handle) => ret, @@ -8928,10 +8479,7 @@ pub unsafe fn sd_ble_gap_encrypt( #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."] #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."] #[inline(always)] -pub unsafe fn sd_ble_gap_conn_sec_get( - conn_handle: u16, - p_conn_sec: *mut ble_gap_conn_sec_t, -) -> u32 { +pub unsafe fn sd_ble_gap_conn_sec_get(conn_handle: u16, p_conn_sec: *mut ble_gap_conn_sec_t) -> u32 { let ret: u32; core::arch::asm!("svc 136", inout("r0") to_asm(conn_handle) => ret, @@ -9313,11 +8861,7 @@ pub unsafe fn sd_ble_gap_next_conn_evt_counter_get(conn_handle: u16, p_counter: #[doc = " - Trying to start the event triggering for @ref BLE_GAP_LL_ROLE_SCAN or"] #[doc = " @ref BLE_GAP_LL_ROLE_INIT when the corresponding LL role is not active."] #[inline(always)] -pub unsafe fn sd_ble_gap_evt_trigger_start( - role: u8, - handle: u16, - p_params: *const ble_gap_event_trigger_t, -) -> u32 { +pub unsafe fn sd_ble_gap_evt_trigger_start(role: u8, handle: u16, p_params: *const ble_gap_event_trigger_t) -> u32 { let ret: u32; core::arch::asm!("svc 148", inout("r0") to_asm(role) => ret, @@ -9429,10 +8973,7 @@ fn bindgen_test_layout_ble_gattc_conn_cfg_t() { concat!("Alignment of ", stringify!(ble_gattc_conn_cfg_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write_cmd_tx_queue_size as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).write_cmd_tx_queue_size as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -9464,9 +9005,7 @@ fn bindgen_test_layout_ble_gattc_handle_range_t() { concat!("Alignment of ", stringify!(ble_gattc_handle_range_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).start_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).start_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -9476,9 +9015,7 @@ fn bindgen_test_layout_ble_gattc_handle_range_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).end_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).end_handle as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -9520,9 +9057,7 @@ fn bindgen_test_layout_ble_gattc_service_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle_range as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle_range as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -9564,9 +9099,7 @@ fn bindgen_test_layout_ble_gattc_include_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).included_srvc as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).included_srvc as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -9657,8 +9190,7 @@ impl ble_gattc_char_t { } #[inline] pub fn new_bitfield_1(char_ext_props: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let char_ext_props: u8 = unsafe { ::core::mem::transmute(char_ext_props) }; char_ext_props as u64 @@ -9738,9 +9270,7 @@ fn bindgen_test_layout_ble_gattc_write_params_t() { concat!("Alignment of ", stringify!(ble_gattc_write_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write_op as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).write_op as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -9760,9 +9290,7 @@ fn bindgen_test_layout_ble_gattc_write_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -9772,9 +9300,7 @@ fn bindgen_test_layout_ble_gattc_write_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).offset as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).offset as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -9794,9 +9320,7 @@ fn bindgen_test_layout_ble_gattc_write_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_value as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_value as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -9870,9 +9394,7 @@ fn bindgen_test_layout_ble_gattc_attr_info128_t() { concat!("Alignment of ", stringify!(ble_gattc_attr_info128_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -9912,16 +9434,10 @@ fn bindgen_test_layout_ble_gattc_evt_prim_srvc_disc_rsp_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_prim_srvc_disc_rsp_t) - ) + concat!("Alignment of ", stringify!(ble_gattc_evt_prim_srvc_disc_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -9931,10 +9447,7 @@ fn bindgen_test_layout_ble_gattc_evt_prim_srvc_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).services as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).services as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -9967,9 +9480,7 @@ fn bindgen_test_layout_ble_gattc_evt_rel_disc_rsp_t() { concat!("Alignment of ", stringify!(ble_gattc_evt_rel_disc_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -9979,9 +9490,7 @@ fn bindgen_test_layout_ble_gattc_evt_rel_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).includes as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).includes as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -10014,9 +9523,7 @@ fn bindgen_test_layout_ble_gattc_evt_char_disc_rsp_t() { concat!("Alignment of ", stringify!(ble_gattc_evt_char_disc_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10026,9 +9533,7 @@ fn bindgen_test_layout_ble_gattc_evt_char_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).chars as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).chars as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -10061,9 +9566,7 @@ fn bindgen_test_layout_ble_gattc_evt_desc_disc_rsp_t() { concat!("Alignment of ", stringify!(ble_gattc_evt_desc_disc_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10073,9 +9576,7 @@ fn bindgen_test_layout_ble_gattc_evt_desc_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).descs as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).descs as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -10127,8 +9628,8 @@ fn bindgen_test_layout_ble_gattc_evt_attr_info_disc_rsp_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())) - .attr_info16 as *const _ as usize + &(*(::core::ptr::null::())).attr_info16 as *const _ + as usize }, 0usize, concat!( @@ -10140,8 +9641,8 @@ fn bindgen_test_layout_ble_gattc_evt_attr_info_disc_rsp_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())) - .attr_info128 as *const _ as usize + &(*(::core::ptr::null::())).attr_info128 as *const _ + as usize }, 0usize, concat!( @@ -10162,16 +9663,10 @@ fn bindgen_test_layout_ble_gattc_evt_attr_info_disc_rsp_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_attr_info_disc_rsp_t) - ) + concat!("Alignment of ", stringify!(ble_gattc_evt_attr_info_disc_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10181,10 +9676,7 @@ fn bindgen_test_layout_ble_gattc_evt_attr_info_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).format as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).format as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -10194,10 +9686,7 @@ fn bindgen_test_layout_ble_gattc_evt_attr_info_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).info as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).info as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -10229,9 +9718,7 @@ fn bindgen_test_layout_ble_gattc_handle_value_t() { concat!("Alignment of ", stringify!(ble_gattc_handle_value_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10241,9 +9728,7 @@ fn bindgen_test_layout_ble_gattc_handle_value_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_value as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_value as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -10271,24 +9756,15 @@ fn bindgen_test_layout_ble_gattc_evt_char_val_by_uuid_read_rsp_t() { assert_eq!( ::core::mem::size_of::(), 4usize, - concat!( - "Size of: ", - stringify!(ble_gattc_evt_char_val_by_uuid_read_rsp_t) - ) + concat!("Size of: ", stringify!(ble_gattc_evt_char_val_by_uuid_read_rsp_t)) ); assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_char_val_by_uuid_read_rsp_t) - ) + concat!("Alignment of ", stringify!(ble_gattc_evt_char_val_by_uuid_read_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10299,8 +9775,7 @@ fn bindgen_test_layout_ble_gattc_evt_char_val_by_uuid_read_rsp_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).value_len - as *const _ as usize + &(*(::core::ptr::null::())).value_len as *const _ as usize }, 2usize, concat!( @@ -10312,8 +9787,7 @@ fn bindgen_test_layout_ble_gattc_evt_char_val_by_uuid_read_rsp_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).handle_value - as *const _ as usize + &(*(::core::ptr::null::())).handle_value as *const _ as usize }, 4usize, concat!( @@ -10351,9 +9825,7 @@ fn bindgen_test_layout_ble_gattc_evt_read_rsp_t() { concat!("Alignment of ", stringify!(ble_gattc_evt_read_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10363,9 +9835,7 @@ fn bindgen_test_layout_ble_gattc_evt_read_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).offset as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).offset as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -10415,15 +9885,10 @@ fn bindgen_test_layout_ble_gattc_evt_char_vals_read_rsp_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_char_vals_read_rsp_t) - ) + concat!("Alignment of ", stringify!(ble_gattc_evt_char_vals_read_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).len as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).len as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10433,10 +9898,7 @@ fn bindgen_test_layout_ble_gattc_evt_char_vals_read_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).values as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).values as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -10475,9 +9937,7 @@ fn bindgen_test_layout_ble_gattc_evt_write_rsp_t() { concat!("Alignment of ", stringify!(ble_gattc_evt_write_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10487,9 +9947,7 @@ fn bindgen_test_layout_ble_gattc_evt_write_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write_op as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).write_op as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -10499,9 +9957,7 @@ fn bindgen_test_layout_ble_gattc_evt_write_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).offset as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).offset as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -10615,16 +10071,10 @@ fn bindgen_test_layout_ble_gattc_evt_exchange_mtu_rsp_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_exchange_mtu_rsp_t) - ) + concat!("Alignment of ", stringify!(ble_gattc_evt_exchange_mtu_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).server_rx_mtu as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).server_rx_mtu as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10676,24 +10126,15 @@ fn bindgen_test_layout_ble_gattc_evt_write_cmd_tx_complete_t() { assert_eq!( ::core::mem::size_of::(), 1usize, - concat!( - "Size of: ", - stringify!(ble_gattc_evt_write_cmd_tx_complete_t) - ) + concat!("Size of: ", stringify!(ble_gattc_evt_write_cmd_tx_complete_t)) ); assert_eq!( ::core::mem::align_of::(), 1usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_write_cmd_tx_complete_t) - ) + concat!("Alignment of ", stringify!(ble_gattc_evt_write_cmd_tx_complete_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10758,10 +10199,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_gattc_evt_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).prim_srvc_disc_rsp - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).prim_srvc_disc_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10771,10 +10209,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rel_disc_rsp as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).rel_disc_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10784,10 +10219,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).char_disc_rsp as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).char_disc_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10797,10 +10229,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).desc_disc_rsp as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).desc_disc_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10811,8 +10240,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).char_val_by_uuid_read_rsp - as *const _ as usize + &(*(::core::ptr::null::())).char_val_by_uuid_read_rsp as *const _ as usize }, 0usize, concat!( @@ -10823,9 +10251,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).read_rsp as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).read_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10835,10 +10261,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).char_vals_read_rsp - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).char_vals_read_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10848,10 +10271,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write_rsp as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).write_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10861,9 +10281,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hvx as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hvx as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10873,10 +10291,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).exchange_mtu_rsp as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).exchange_mtu_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10886,9 +10301,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).timeout as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).timeout as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10898,10 +10311,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).attr_info_disc_rsp - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).attr_info_disc_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10912,8 +10322,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).write_cmd_tx_complete - as *const _ as usize + &(*(::core::ptr::null::())).write_cmd_tx_complete as *const _ as usize }, 0usize, concat!( @@ -11238,11 +10647,7 @@ pub unsafe fn sd_ble_gattc_read(conn_handle: u16, handle: u16, offset: u16) -> u #[doc = " @retval ::NRF_ERROR_BUSY Client procedure already in progress."] #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."] #[inline(always)] -pub unsafe fn sd_ble_gattc_char_values_read( - conn_handle: u16, - p_handles: *const u16, - handle_count: u16, -) -> u32 { +pub unsafe fn sd_ble_gattc_char_values_read(conn_handle: u16, p_handles: *const u16, handle_count: u16) -> u32 { let ret: u32; core::arch::asm!("svc 162", inout("r0") to_asm(conn_handle) => ret, @@ -11298,10 +10703,7 @@ pub unsafe fn sd_ble_gattc_char_values_read( #[doc = " Wait for a @ref BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE event and retry."] #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."] #[inline(always)] -pub unsafe fn sd_ble_gattc_write( - conn_handle: u16, - p_write_params: *const ble_gattc_write_params_t, -) -> u32 { +pub unsafe fn sd_ble_gattc_write(conn_handle: u16, p_write_params: *const ble_gattc_write_params_t) -> u32 { let ret: u32; core::arch::asm!("svc 163", inout("r0") to_asm(conn_handle) => ret, @@ -11491,9 +10893,7 @@ fn bindgen_test_layout_ble_gatts_conn_cfg_t() { concat!("Alignment of ", stringify!(ble_gatts_conn_cfg_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hvn_tx_queue_size as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hvn_tx_queue_size as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11592,14 +10992,8 @@ impl ble_gatts_attr_md_t { } } #[inline] - pub fn new_bitfield_1( - vlen: u8, - vloc: u8, - rd_auth: u8, - wr_auth: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(vlen: u8, vloc: u8, rd_auth: u8, wr_auth: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let vlen: u8 = unsafe { ::core::mem::transmute(vlen) }; vlen as u64 @@ -11891,9 +11285,7 @@ fn bindgen_test_layout_ble_gatts_char_md_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).char_ext_props as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).char_ext_props as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -11903,9 +11295,7 @@ fn bindgen_test_layout_ble_gatts_char_md_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_char_user_desc as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_char_user_desc as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -11915,10 +11305,7 @@ fn bindgen_test_layout_ble_gatts_char_md_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).char_user_desc_max_size as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).char_user_desc_max_size as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -11928,10 +11315,7 @@ fn bindgen_test_layout_ble_gatts_char_md_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).char_user_desc_size as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).char_user_desc_size as *const _ as usize }, 10usize, concat!( "Offset of field: ", @@ -11951,9 +11335,7 @@ fn bindgen_test_layout_ble_gatts_char_md_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_user_desc_md as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_user_desc_md as *const _ as usize }, 16usize, concat!( "Offset of field: ", @@ -12009,9 +11391,7 @@ fn bindgen_test_layout_ble_gatts_char_handles_t() { concat!("Alignment of ", stringify!(ble_gatts_char_handles_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).value_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).value_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12021,10 +11401,7 @@ fn bindgen_test_layout_ble_gatts_char_handles_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).user_desc_handle as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).user_desc_handle as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -12034,9 +11411,7 @@ fn bindgen_test_layout_ble_gatts_char_handles_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).cccd_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).cccd_handle as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -12046,9 +11421,7 @@ fn bindgen_test_layout_ble_gatts_char_handles_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sccd_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).sccd_handle as *const _ as usize }, 6usize, concat!( "Offset of field: ", @@ -12163,10 +11536,7 @@ fn bindgen_test_layout_ble_gatts_authorize_params_t() { concat!("Alignment of ", stringify!(ble_gatts_authorize_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gatt_status as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).gatt_status as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12176,9 +11546,7 @@ fn bindgen_test_layout_ble_gatts_authorize_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).offset as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).offset as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -12188,9 +11556,7 @@ fn bindgen_test_layout_ble_gatts_authorize_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).len as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).len as *const _ as usize }, 6usize, concat!( "Offset of field: ", @@ -12200,9 +11566,7 @@ fn bindgen_test_layout_ble_gatts_authorize_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_data as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_data as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -12226,8 +11590,7 @@ impl ble_gatts_authorize_params_t { } #[inline] pub fn new_bitfield_1(update: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let update: u8 = unsafe { ::core::mem::transmute(update) }; update as u64 @@ -12273,8 +11636,7 @@ fn bindgen_test_layout_ble_gatts_rw_authorize_reply_params_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).read - as *const _ as usize + &(*(::core::ptr::null::())).read as *const _ as usize }, 0usize, concat!( @@ -12286,8 +11648,7 @@ fn bindgen_test_layout_ble_gatts_rw_authorize_reply_params_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).write - as *const _ as usize + &(*(::core::ptr::null::())).write as *const _ as usize }, 0usize, concat!( @@ -12303,24 +11664,15 @@ fn bindgen_test_layout_ble_gatts_rw_authorize_reply_params_t() { assert_eq!( ::core::mem::size_of::(), 16usize, - concat!( - "Size of: ", - stringify!(ble_gatts_rw_authorize_reply_params_t) - ) + concat!("Size of: ", stringify!(ble_gatts_rw_authorize_reply_params_t)) ); assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(ble_gatts_rw_authorize_reply_params_t) - ) + concat!("Alignment of ", stringify!(ble_gatts_rw_authorize_reply_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).type_ as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).type_ as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12330,10 +11682,7 @@ fn bindgen_test_layout_ble_gatts_rw_authorize_reply_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).params as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).params as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -12376,8 +11725,7 @@ impl ble_gatts_cfg_service_changed_t { } #[inline] pub fn new_bitfield_1(service_changed: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let service_changed: u8 = unsafe { ::core::mem::transmute(service_changed) }; service_changed as u64 @@ -12410,10 +11758,7 @@ fn bindgen_test_layout_ble_gatts_cfg_attr_tab_size_t() { concat!("Alignment of ", stringify!(ble_gatts_cfg_attr_tab_size_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).attr_tab_size as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).attr_tab_size as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12446,9 +11791,7 @@ fn bindgen_test_layout_ble_gatts_cfg_t() { concat!("Alignment of ", stringify!(ble_gatts_cfg_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).service_changed as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).service_changed as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12531,9 +11874,7 @@ fn bindgen_test_layout_ble_gatts_evt_write_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).auth_required as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).auth_required as *const _ as usize }, 7usize, concat!( "Offset of field: ", @@ -12663,8 +12004,7 @@ fn bindgen_test_layout_ble_gatts_evt_rw_authorize_request_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).read - as *const _ as usize + &(*(::core::ptr::null::())).read as *const _ as usize }, 0usize, concat!( @@ -12676,8 +12016,7 @@ fn bindgen_test_layout_ble_gatts_evt_rw_authorize_request_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).write - as *const _ as usize + &(*(::core::ptr::null::())).write as *const _ as usize }, 0usize, concat!( @@ -12693,24 +12032,15 @@ fn bindgen_test_layout_ble_gatts_evt_rw_authorize_request_t() { assert_eq!( ::core::mem::size_of::(), 14usize, - concat!( - "Size of: ", - stringify!(ble_gatts_evt_rw_authorize_request_t) - ) + concat!("Size of: ", stringify!(ble_gatts_evt_rw_authorize_request_t)) ); assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gatts_evt_rw_authorize_request_t) - ) + concat!("Alignment of ", stringify!(ble_gatts_evt_rw_authorize_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).type_ as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).type_ as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12720,10 +12050,7 @@ fn bindgen_test_layout_ble_gatts_evt_rw_authorize_request_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).request as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -12750,15 +12077,10 @@ fn bindgen_test_layout_ble_gatts_evt_sys_attr_missing_t() { assert_eq!( ::core::mem::align_of::(), 1usize, - concat!( - "Alignment of ", - stringify!(ble_gatts_evt_sys_attr_missing_t) - ) + concat!("Alignment of ", stringify!(ble_gatts_evt_sys_attr_missing_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hint as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hint as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12810,24 +12132,15 @@ fn bindgen_test_layout_ble_gatts_evt_exchange_mtu_request_t() { assert_eq!( ::core::mem::size_of::(), 2usize, - concat!( - "Size of: ", - stringify!(ble_gatts_evt_exchange_mtu_request_t) - ) + concat!("Size of: ", stringify!(ble_gatts_evt_exchange_mtu_request_t)) ); assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gatts_evt_exchange_mtu_request_t) - ) + concat!("Alignment of ", stringify!(ble_gatts_evt_exchange_mtu_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).client_rx_mtu - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).client_rx_mtu as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12887,9 +12200,7 @@ fn bindgen_test_layout_ble_gatts_evt_hvn_tx_complete_t() { concat!("Alignment of ", stringify!(ble_gatts_evt_hvn_tx_complete_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12938,9 +12249,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_gatts_evt_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).write as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12950,10 +12259,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).authorize_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).authorize_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12963,10 +12269,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sys_attr_missing as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).sys_attr_missing as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12976,9 +12279,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hvc as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hvc as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12988,10 +12289,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).exchange_mtu_request - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).exchange_mtu_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13001,9 +12299,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).timeout as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).timeout as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13013,10 +12309,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hvn_tx_complete as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).hvn_tx_complete as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13079,11 +12372,7 @@ fn bindgen_test_layout_ble_gatts_evt_t() { #[doc = " @retval ::NRF_ERROR_FORBIDDEN Forbidden value supplied, certain UUIDs are reserved for the stack."] #[doc = " @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation."] #[inline(always)] -pub unsafe fn sd_ble_gatts_service_add( - type_: u8, - p_uuid: *const ble_uuid_t, - p_handle: *mut u16, -) -> u32 { +pub unsafe fn sd_ble_gatts_service_add(type_: u8, p_uuid: *const ble_uuid_t, p_handle: *mut u16) -> u32 { let ret: u32; core::arch::asm!("svc 168", inout("r0") to_asm(type_) => ret, @@ -13118,11 +12407,7 @@ pub unsafe fn sd_ble_gatts_service_add( #[doc = " @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation."] #[doc = " @retval ::NRF_ERROR_NOT_FOUND Attribute not found."] #[inline(always)] -pub unsafe fn sd_ble_gatts_include_add( - service_handle: u16, - inc_srvc_handle: u16, - p_include_handle: *mut u16, -) -> u32 { +pub unsafe fn sd_ble_gatts_include_add(service_handle: u16, inc_srvc_handle: u16, p_include_handle: *mut u16) -> u32 { let ret: u32; core::arch::asm!("svc 169", inout("r0") to_asm(service_handle) => ret, @@ -13234,11 +12519,7 @@ pub unsafe fn sd_ble_gatts_descriptor_add( #[doc = " @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied, attribute lengths are restricted by @ref BLE_GATTS_ATTR_LENS_MAX."] #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied on a system attribute."] #[inline(always)] -pub unsafe fn sd_ble_gatts_value_set( - conn_handle: u16, - handle: u16, - p_value: *mut ble_gatts_value_t, -) -> u32 { +pub unsafe fn sd_ble_gatts_value_set(conn_handle: u16, handle: u16, p_value: *mut ble_gatts_value_t) -> u32 { let ret: u32; core::arch::asm!("svc 172", inout("r0") to_asm(conn_handle) => ret, @@ -13272,11 +12553,7 @@ pub unsafe fn sd_ble_gatts_value_set( #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied on a system attribute."] #[doc = " @retval ::BLE_ERROR_GATTS_SYS_ATTR_MISSING System attributes missing, use @ref sd_ble_gatts_sys_attr_set to set them to a known value."] #[inline(always)] -pub unsafe fn sd_ble_gatts_value_get( - conn_handle: u16, - handle: u16, - p_value: *mut ble_gatts_value_t, -) -> u32 { +pub unsafe fn sd_ble_gatts_value_get(conn_handle: u16, handle: u16, p_value: *mut ble_gatts_value_t) -> u32 { let ret: u32; core::arch::asm!("svc 173", inout("r0") to_asm(conn_handle) => ret, @@ -13351,10 +12628,7 @@ pub unsafe fn sd_ble_gatts_value_get( #[doc = " Wait for a @ref BLE_GATTS_EVT_HVN_TX_COMPLETE event and retry."] #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."] #[inline(always)] -pub unsafe fn sd_ble_gatts_hvx( - conn_handle: u16, - p_hvx_params: *const ble_gatts_hvx_params_t, -) -> u32 { +pub unsafe fn sd_ble_gatts_hvx(conn_handle: u16, p_hvx_params: *const ble_gatts_hvx_params_t) -> u32 { let ret: u32; core::arch::asm!("svc 174", inout("r0") to_asm(conn_handle) => ret, @@ -13400,11 +12674,7 @@ pub unsafe fn sd_ble_gatts_hvx( #[doc = " @retval ::BLE_ERROR_GATTS_SYS_ATTR_MISSING System attributes missing, use @ref sd_ble_gatts_sys_attr_set to set them to a known value."] #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."] #[inline(always)] -pub unsafe fn sd_ble_gatts_service_changed( - conn_handle: u16, - start_handle: u16, - end_handle: u16, -) -> u32 { +pub unsafe fn sd_ble_gatts_service_changed(conn_handle: u16, start_handle: u16, end_handle: u16) -> u32 { let ret: u32; core::arch::asm!("svc 175", inout("r0") to_asm(conn_handle) => ret, @@ -13503,12 +12773,7 @@ pub unsafe fn sd_ble_gatts_rw_authorize_reply( #[doc = " @retval ::NRF_ERROR_INVALID_DATA Invalid data supplied, the data should be exactly the same as retrieved with @ref sd_ble_gatts_sys_attr_get."] #[doc = " @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation."] #[inline(always)] -pub unsafe fn sd_ble_gatts_sys_attr_set( - conn_handle: u16, - p_sys_attr_data: *const u8, - len: u16, - flags: u32, -) -> u32 { +pub unsafe fn sd_ble_gatts_sys_attr_set(conn_handle: u16, p_sys_attr_data: *const u8, len: u16, flags: u32) -> u32 { let ret: u32; core::arch::asm!("svc 177", inout("r0") to_asm(conn_handle) => ret, @@ -13597,11 +12862,7 @@ pub unsafe fn sd_ble_gatts_initial_user_handle_get(p_handle: *mut u16) -> u32 { #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameters supplied. Returned when both @c p_uuid and @c p_md are NULL."] #[doc = " @retval ::NRF_ERROR_NOT_FOUND Attribute was not found."] #[inline(always)] -pub unsafe fn sd_ble_gatts_attr_get( - handle: u16, - p_uuid: *mut ble_uuid_t, - p_md: *mut ble_gatts_attr_md_t, -) -> u32 { +pub unsafe fn sd_ble_gatts_attr_get(handle: u16, p_uuid: *mut ble_uuid_t, p_md: *mut ble_gatts_attr_md_t) -> u32 { let ret: u32; core::arch::asm!("svc 180", inout("r0") to_asm(handle) => ret, @@ -13773,9 +13034,7 @@ fn bindgen_test_layout_ble_evt_user_mem_request_t() { concat!("Alignment of ", stringify!(ble_evt_user_mem_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).type_ as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).type_ as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13807,9 +13066,7 @@ fn bindgen_test_layout_ble_evt_user_mem_release_t() { concat!("Alignment of ", stringify!(ble_evt_user_mem_release_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).type_ as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).type_ as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13819,9 +13076,7 @@ fn bindgen_test_layout_ble_evt_user_mem_release_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).mem_block as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).mem_block as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -13862,10 +13117,7 @@ fn bindgen_test_layout_ble_common_evt_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_common_evt_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).user_mem_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).user_mem_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13875,10 +13127,7 @@ fn bindgen_test_layout_ble_common_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).user_mem_release as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).user_mem_release as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13945,12 +13194,7 @@ fn bindgen_test_layout_ble_evt_hdr_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).evt_id as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_evt_hdr_t), - "::", - stringify!(evt_id) - ) + concat!("Offset of field: ", stringify!(ble_evt_hdr_t), "::", stringify!(evt_id)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).evt_len as *const _ as usize }, @@ -13996,9 +13240,7 @@ fn bindgen_test_layout_ble_evt_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_evt_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).common_evt as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).common_evt as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14008,9 +13250,7 @@ fn bindgen_test_layout_ble_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gap_evt as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).gap_evt as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14020,9 +13260,7 @@ fn bindgen_test_layout_ble_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gattc_evt as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).gattc_evt as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14032,9 +13270,7 @@ fn bindgen_test_layout_ble_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gatts_evt as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).gatts_evt as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14059,22 +13295,12 @@ fn bindgen_test_layout_ble_evt_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).header as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_evt_t), - "::", - stringify!(header) - ) + concat!("Offset of field: ", stringify!(ble_evt_t), "::", stringify!(header)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).evt as *const _ as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(ble_evt_t), - "::", - stringify!(evt) - ) + concat!("Offset of field: ", stringify!(ble_evt_t), "::", stringify!(evt)) ); } #[doc = " @brief Version Information."] @@ -14121,9 +13347,7 @@ fn bindgen_test_layout_ble_version_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).subversion_number as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).subversion_number as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -14187,13 +13411,8 @@ impl ble_pa_lna_cfg_t { } } #[inline] - pub fn new_bitfield_1( - enable: u8, - active_high: u8, - gpio_pin: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(enable: u8, active_high: u8, gpio_pin: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let enable: u8 = unsafe { ::core::mem::transmute(enable) }; enable as u64 @@ -14257,9 +13476,7 @@ fn bindgen_test_layout_ble_common_opt_pa_lna_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).lna_cfg as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).lna_cfg as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -14269,9 +13486,7 @@ fn bindgen_test_layout_ble_common_opt_pa_lna_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ppi_ch_id_set as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).ppi_ch_id_set as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -14281,9 +13496,7 @@ fn bindgen_test_layout_ble_common_opt_pa_lna_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ppi_ch_id_clr as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).ppi_ch_id_clr as *const _ as usize }, 3usize, concat!( "Offset of field: ", @@ -14293,9 +13506,7 @@ fn bindgen_test_layout_ble_common_opt_pa_lna_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gpiote_ch_id as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).gpiote_ch_id as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -14346,8 +13557,7 @@ impl ble_common_opt_conn_evt_ext_t { } #[inline] pub fn new_bitfield_1(enable: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let enable: u8 = unsafe { ::core::mem::transmute(enable) }; enable as u64 @@ -14423,22 +13633,12 @@ fn bindgen_test_layout_ble_opt_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).common_opt as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_opt_t), - "::", - stringify!(common_opt) - ) + concat!("Offset of field: ", stringify!(ble_opt_t), "::", stringify!(common_opt)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).gap_opt as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_opt_t), - "::", - stringify!(gap_opt) - ) + concat!("Offset of field: ", stringify!(ble_opt_t), "::", stringify!(gap_opt)) ); } #[doc = "@brief BLE connection configuration type, wrapping the module specific configurations, set with"] @@ -14493,10 +13693,7 @@ fn bindgen_test_layout_ble_conn_cfg_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_conn_cfg_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gap_conn_cfg as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).gap_conn_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14506,10 +13703,7 @@ fn bindgen_test_layout_ble_conn_cfg_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gattc_conn_cfg as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).gattc_conn_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14519,10 +13713,7 @@ fn bindgen_test_layout_ble_conn_cfg_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gatts_conn_cfg as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).gatts_conn_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14532,10 +13723,7 @@ fn bindgen_test_layout_ble_conn_cfg_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gatt_conn_cfg as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).gatt_conn_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14602,9 +13790,7 @@ fn bindgen_test_layout_ble_common_cfg_vs_uuid_t() { concat!("Alignment of ", stringify!(ble_common_cfg_vs_uuid_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).vs_uuid_count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).vs_uuid_count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14674,42 +13860,22 @@ fn bindgen_test_layout_ble_cfg_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).conn_cfg as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_cfg_t), - "::", - stringify!(conn_cfg) - ) + concat!("Offset of field: ", stringify!(ble_cfg_t), "::", stringify!(conn_cfg)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).common_cfg as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_cfg_t), - "::", - stringify!(common_cfg) - ) + concat!("Offset of field: ", stringify!(ble_cfg_t), "::", stringify!(common_cfg)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).gap_cfg as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_cfg_t), - "::", - stringify!(gap_cfg) - ) + concat!("Offset of field: ", stringify!(ble_cfg_t), "::", stringify!(gap_cfg)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).gatts_cfg as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_cfg_t), - "::", - stringify!(gatts_cfg) - ) + concat!("Offset of field: ", stringify!(ble_cfg_t), "::", stringify!(gatts_cfg)) ); } @@ -14949,11 +14115,7 @@ pub unsafe fn sd_ble_uuid_vs_remove(p_uuid_type: *mut u8) -> u32 { #[doc = " @retval ::NRF_ERROR_INVALID_LENGTH Invalid UUID length."] #[doc = " @retval ::NRF_ERROR_NOT_FOUND For a 128-bit UUID, no match in the populated table of UUIDs."] #[inline(always)] -pub unsafe fn sd_ble_uuid_decode( - uuid_le_len: u8, - p_uuid_le: *const u8, - p_uuid: *mut ble_uuid_t, -) -> u32 { +pub unsafe fn sd_ble_uuid_decode(uuid_le_len: u8, p_uuid_le: *const u8, p_uuid: *mut ble_uuid_t) -> u32 { let ret: u32; core::arch::asm!("svc 100", inout("r0") to_asm(uuid_le_len) => ret, @@ -14977,11 +14139,7 @@ pub unsafe fn sd_ble_uuid_decode( #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."] #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid UUID type."] #[inline(always)] -pub unsafe fn sd_ble_uuid_encode( - p_uuid: *const ble_uuid_t, - p_uuid_le_len: *mut u8, - p_uuid_le: *mut u8, -) -> u32 { +pub unsafe fn sd_ble_uuid_encode(p_uuid: *const ble_uuid_t, p_uuid_le_len: *mut u8, p_uuid_le: *mut u8) -> u32 { let ret: u32; core::arch::asm!("svc 101", inout("r0") to_asm(p_uuid) => ret, diff --git a/nrf-softdevice-s132/src/bindings.rs b/nrf-softdevice-s132/src/bindings.rs index 66d68b4..a251663 100644 --- a/nrf-softdevice-s132/src/bindings.rs +++ b/nrf-softdevice-s132/src/bindings.rs @@ -982,73 +982,57 @@ pub const NRF_POWER_DCDC_MODES_NRF_POWER_DCDC_ENABLE: NRF_POWER_DCDC_MODES = 1; #[doc = "@brief DC/DC converter modes."] pub type NRF_POWER_DCDC_MODES = self::c_uint; #[doc = "< The event does not have a notification."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_NONE: - NRF_RADIO_NOTIFICATION_DISTANCES = 0; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_NONE: NRF_RADIO_NOTIFICATION_DISTANCES = 0; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_800US: - NRF_RADIO_NOTIFICATION_DISTANCES = 1; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_800US: NRF_RADIO_NOTIFICATION_DISTANCES = 1; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_1740US: - NRF_RADIO_NOTIFICATION_DISTANCES = 2; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_1740US: NRF_RADIO_NOTIFICATION_DISTANCES = 2; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_2680US: - NRF_RADIO_NOTIFICATION_DISTANCES = 3; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_2680US: NRF_RADIO_NOTIFICATION_DISTANCES = 3; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_3620US: - NRF_RADIO_NOTIFICATION_DISTANCES = 4; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_3620US: NRF_RADIO_NOTIFICATION_DISTANCES = 4; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_4560US: - NRF_RADIO_NOTIFICATION_DISTANCES = 5; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_4560US: NRF_RADIO_NOTIFICATION_DISTANCES = 5; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_5500US: - NRF_RADIO_NOTIFICATION_DISTANCES = 6; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_5500US: NRF_RADIO_NOTIFICATION_DISTANCES = 6; #[doc = "@brief Radio notification distances."] pub type NRF_RADIO_NOTIFICATION_DISTANCES = self::c_uint; #[doc = "< The event does not have a radio notification signal."] -pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_NONE: - NRF_RADIO_NOTIFICATION_TYPES = 0; +pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_NONE: NRF_RADIO_NOTIFICATION_TYPES = 0; #[doc = "< Using interrupt for notification when the radio will be enabled."] -pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_ACTIVE: - NRF_RADIO_NOTIFICATION_TYPES = 1; +pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_ACTIVE: NRF_RADIO_NOTIFICATION_TYPES = 1; #[doc = "< Using interrupt for notification when the radio has been disabled."] -pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_INACTIVE: - NRF_RADIO_NOTIFICATION_TYPES = 2; +pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_INACTIVE: NRF_RADIO_NOTIFICATION_TYPES = 2; #[doc = "< Using interrupt for notification both when the radio will be enabled and disabled."] -pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_BOTH: - NRF_RADIO_NOTIFICATION_TYPES = 3; +pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_BOTH: NRF_RADIO_NOTIFICATION_TYPES = 3; #[doc = "@brief Radio notification types."] pub type NRF_RADIO_NOTIFICATION_TYPES = self::c_uint; #[doc = "< This signal indicates the start of the radio timeslot."] -pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_START: - NRF_RADIO_CALLBACK_SIGNAL_TYPE = 0; +pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_START: NRF_RADIO_CALLBACK_SIGNAL_TYPE = 0; #[doc = "< This signal indicates the NRF_TIMER0 interrupt."] -pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_TIMER0: - NRF_RADIO_CALLBACK_SIGNAL_TYPE = 1; +pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_TIMER0: NRF_RADIO_CALLBACK_SIGNAL_TYPE = 1; #[doc = "< This signal indicates the NRF_RADIO interrupt."] -pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_RADIO: - NRF_RADIO_CALLBACK_SIGNAL_TYPE = 2; +pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_RADIO: NRF_RADIO_CALLBACK_SIGNAL_TYPE = 2; #[doc = "< This signal indicates extend action failed."] -pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_FAILED: - NRF_RADIO_CALLBACK_SIGNAL_TYPE = 3; +pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_FAILED: NRF_RADIO_CALLBACK_SIGNAL_TYPE = + 3; #[doc = "< This signal indicates extend action succeeded."] pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_SUCCEEDED: NRF_RADIO_CALLBACK_SIGNAL_TYPE = 4; #[doc = "@brief The Radio signal callback types."] pub type NRF_RADIO_CALLBACK_SIGNAL_TYPE = self::c_uint; #[doc = "< Return without action."] -pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_NONE: - NRF_RADIO_SIGNAL_CALLBACK_ACTION = 0; +pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_NONE: NRF_RADIO_SIGNAL_CALLBACK_ACTION = 0; #[doc = "< Request an extension of the current"] #[doc = "timeslot. Maximum execution time for this action:"] #[doc = "@ref NRF_RADIO_MAX_EXTENSION_PROCESSING_TIME_US."] #[doc = "This action must be started at least"] #[doc = "@ref NRF_RADIO_MIN_EXTENSION_MARGIN_US before"] #[doc = "the end of the timeslot."] -pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_EXTEND: - NRF_RADIO_SIGNAL_CALLBACK_ACTION = 1; +pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_EXTEND: NRF_RADIO_SIGNAL_CALLBACK_ACTION = + 1; #[doc = "< End the current radio timeslot."] -pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_END: - NRF_RADIO_SIGNAL_CALLBACK_ACTION = 2; +pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_END: NRF_RADIO_SIGNAL_CALLBACK_ACTION = 2; #[doc = "< Request a new radio timeslot and end the current timeslot."] pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_REQUEST_AND_END: NRF_RADIO_SIGNAL_CALLBACK_ACTION = 3; @@ -1135,9 +1119,7 @@ fn bindgen_test_layout_nrf_radio_request_earliest_t() { concat!("Alignment of ", stringify!(nrf_radio_request_earliest_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hfclk as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hfclk as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -1147,9 +1129,7 @@ fn bindgen_test_layout_nrf_radio_request_earliest_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).priority as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).priority as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -1159,9 +1139,7 @@ fn bindgen_test_layout_nrf_radio_request_earliest_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).length_us as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).length_us as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -1171,10 +1149,7 @@ fn bindgen_test_layout_nrf_radio_request_earliest_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).timeout_us as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).timeout_us as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -1210,9 +1185,7 @@ fn bindgen_test_layout_nrf_radio_request_normal_t() { concat!("Alignment of ", stringify!(nrf_radio_request_normal_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hfclk as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hfclk as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -1222,9 +1195,7 @@ fn bindgen_test_layout_nrf_radio_request_normal_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).priority as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).priority as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -1234,9 +1205,7 @@ fn bindgen_test_layout_nrf_radio_request_normal_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).distance_us as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).distance_us as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -1246,9 +1215,7 @@ fn bindgen_test_layout_nrf_radio_request_normal_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).length_us as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).length_us as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -1286,16 +1253,10 @@ fn bindgen_test_layout_nrf_radio_request_t__bindgen_ty_1() { assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(nrf_radio_request_t__bindgen_ty_1) - ) + concat!("Alignment of ", stringify!(nrf_radio_request_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).earliest as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).earliest as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -1305,10 +1266,7 @@ fn bindgen_test_layout_nrf_radio_request_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).normal as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).normal as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -1331,9 +1289,7 @@ fn bindgen_test_layout_nrf_radio_request_t() { concat!("Alignment of ", stringify!(nrf_radio_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).request_type as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).request_type as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -1380,8 +1336,7 @@ pub struct nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_1 #[test] fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_1() { assert_eq!( - ::core::mem::size_of::( - ), + ::core::mem::size_of::(), 4usize, concat!( "Size of: ", @@ -1389,8 +1344,7 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__b ) ); assert_eq!( - ::core::mem::align_of::( - ), + ::core::mem::align_of::(), 4usize, concat!( "Alignment of ", @@ -1399,10 +1353,8 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__b ); assert_eq!( unsafe { - &(*(::core::ptr::null::< - nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_1, - >())) - .p_next as *const _ as usize + &(*(::core::ptr::null::())).p_next + as *const _ as usize }, 0usize, concat!( @@ -1422,8 +1374,7 @@ pub struct nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_2 #[test] fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_2() { assert_eq!( - ::core::mem::size_of::( - ), + ::core::mem::size_of::(), 4usize, concat!( "Size of: ", @@ -1431,8 +1382,7 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__b ) ); assert_eq!( - ::core::mem::align_of::( - ), + ::core::mem::align_of::(), 4usize, concat!( "Alignment of ", @@ -1441,10 +1391,8 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__b ); assert_eq!( unsafe { - &(*(::core::ptr::null::< - nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_2, - >())) - .length_us as *const _ as usize + &(*(::core::ptr::null::())).length_us + as *const _ as usize }, 0usize, concat!( @@ -1475,8 +1423,8 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1() ); assert_eq!( unsafe { - &(*(::core::ptr::null::())) - .request as *const _ as usize + &(*(::core::ptr::null::())).request as *const _ + as usize }, 0usize, concat!( @@ -1488,8 +1436,8 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1() ); assert_eq!( unsafe { - &(*(::core::ptr::null::())) - .extend as *const _ as usize + &(*(::core::ptr::null::())).extend as *const _ + as usize }, 0usize, concat!( @@ -1505,23 +1453,16 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t() { assert_eq!( ::core::mem::size_of::(), 8usize, - concat!( - "Size of: ", - stringify!(nrf_radio_signal_callback_return_param_t) - ) + concat!("Size of: ", stringify!(nrf_radio_signal_callback_return_param_t)) ); assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(nrf_radio_signal_callback_return_param_t) - ) + concat!("Alignment of ", stringify!(nrf_radio_signal_callback_return_param_t)) ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).callback_action - as *const _ as usize + &(*(::core::ptr::null::())).callback_action as *const _ as usize }, 0usize, concat!( @@ -1532,10 +1473,7 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).params as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).params as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -1556,9 +1494,8 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t() { #[doc = " @param[in] signal_type Type of signal, see @ref NRF_RADIO_CALLBACK_SIGNAL_TYPE."] #[doc = ""] #[doc = " @return Pointer to structure containing action requested by the application."] -pub type nrf_radio_signal_callback_t = ::core::option::Option< - unsafe extern "C" fn(signal_type: u8) -> *mut nrf_radio_signal_callback_return_param_t, ->; +pub type nrf_radio_signal_callback_t = + ::core::option::Option *mut nrf_radio_signal_callback_return_param_t>; #[doc = "@brief AES ECB parameter typedefs"] pub type soc_ecb_key_t = [u8; 16usize]; pub type soc_ecb_cleartext_t = [u8; 16usize]; @@ -1652,9 +1589,7 @@ fn bindgen_test_layout_nrf_ecb_hal_data_block_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_cleartext as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_cleartext as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -1664,9 +1599,7 @@ fn bindgen_test_layout_nrf_ecb_hal_data_block_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_ciphertext as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_ciphertext as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -2374,10 +2307,7 @@ pub unsafe fn sd_ecb_block_encrypt(p_ecb_data: *mut nrf_ecb_hal_data_t) -> u32 { #[doc = ""] #[doc = " @retval ::NRF_SUCCESS"] #[inline(always)] -pub unsafe fn sd_ecb_blocks_encrypt( - block_count: u8, - p_data_blocks: *mut nrf_ecb_hal_data_block_t, -) -> u32 { +pub unsafe fn sd_ecb_blocks_encrypt(block_count: u8, p_data_blocks: *mut nrf_ecb_hal_data_block_t) -> u32 { let ret: u32; core::arch::asm!("svc 71", inout("r0") to_asm(block_count) => ret, @@ -2539,12 +2469,7 @@ pub unsafe fn sd_flash_page_erase(page_number: u32) -> u32 { #[doc = " @retval ::NRF_ERROR_NOT_SUPPORTED Non-zero value supplied to one or more of the unsupported parameters."] #[doc = " @retval ::NRF_SUCCESS Values successfully written to configuration registers."] #[inline(always)] -pub unsafe fn sd_flash_protect( - block_cfg0: u32, - block_cfg1: u32, - block_cfg2: u32, - block_cfg3: u32, -) -> u32 { +pub unsafe fn sd_flash_protect(block_cfg0: u32, block_cfg1: u32, block_cfg2: u32, block_cfg3: u32) -> u32 { let ret: u32; core::arch::asm!("svc 42", inout("r0") to_asm(block_cfg0) => ret, @@ -2771,9 +2696,7 @@ fn bindgen_test_layout_nrf_clock_lf_cfg_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rc_temp_ctiv as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rc_temp_ctiv as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -2812,8 +2735,7 @@ fn bindgen_test_layout_nrf_clock_lf_cfg_t() { #[doc = ""] #[doc = " @note When id is set to @ref NRF_FAULT_ID_APP_MEMACC, pc will contain the address of the instruction being executed at the time when"] #[doc = " the fault is detected by the CPU. The CPU program counter may have advanced up to 2 instructions (no branching) after the one that triggered the fault."] -pub type nrf_fault_handler_t = - ::core::option::Option; +pub type nrf_fault_handler_t = ::core::option::Option; #[doc = "@brief Enables the SoftDevice and by extension the protocol stack."] #[doc = ""] @@ -2976,22 +2898,12 @@ fn bindgen_test_layout_ble_uuid_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).uuid as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_uuid_t), - "::", - stringify!(uuid) - ) + concat!("Offset of field: ", stringify!(ble_uuid_t), "::", stringify!(uuid)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).type_ as *const _ as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(ble_uuid_t), - "::", - stringify!(type_) - ) + concat!("Offset of field: ", stringify!(ble_uuid_t), "::", stringify!(type_)) ); } #[doc = "@brief Data structure."] @@ -3018,22 +2930,12 @@ fn bindgen_test_layout_ble_data_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).p_data as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_data_t), - "::", - stringify!(p_data) - ) + concat!("Offset of field: ", stringify!(ble_data_t), "::", stringify!(p_data)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).len as *const _ as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(ble_data_t), - "::", - stringify!(len) - ) + concat!("Offset of field: ", stringify!(ble_data_t), "::", stringify!(len)) ); } #[doc = " @brief BLE GATT connection configuration parameters, set with @ref sd_ble_cfg_set."] @@ -3180,8 +3082,7 @@ impl ble_gatt_char_props_t { indicate: u8, auth_signed_wr: u8, ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let broadcast: u8 = unsafe { ::core::mem::transmute(broadcast) }; broadcast as u64 @@ -3257,8 +3158,7 @@ impl ble_gatt_char_ext_props_t { } #[inline] pub fn new_bitfield_1(reliable_wr: u8, wr_aux: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let reliable_wr: u8 = unsafe { ::core::mem::transmute(reliable_wr) }; reliable_wr as u64 @@ -3451,9 +3351,7 @@ fn bindgen_test_layout_sd_mbr_command_copy_bl_t() { concat!("Alignment of ", stringify!(sd_mbr_command_copy_bl_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).bl_src as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).bl_src as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3463,9 +3361,7 @@ fn bindgen_test_layout_sd_mbr_command_copy_bl_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).bl_len as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).bl_len as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -3507,24 +3403,15 @@ fn bindgen_test_layout_sd_mbr_command_vector_table_base_set_t() { assert_eq!( ::core::mem::size_of::(), 4usize, - concat!( - "Size of: ", - stringify!(sd_mbr_command_vector_table_base_set_t) - ) + concat!("Size of: ", stringify!(sd_mbr_command_vector_table_base_set_t)) ); assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(sd_mbr_command_vector_table_base_set_t) - ) + concat!("Alignment of ", stringify!(sd_mbr_command_vector_table_base_set_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).address as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).address as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3551,24 +3438,15 @@ fn bindgen_test_layout_sd_mbr_command_irq_forward_address_set_t() { assert_eq!( ::core::mem::size_of::(), 4usize, - concat!( - "Size of: ", - stringify!(sd_mbr_command_irq_forward_address_set_t) - ) + concat!("Size of: ", stringify!(sd_mbr_command_irq_forward_address_set_t)) ); assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(sd_mbr_command_irq_forward_address_set_t) - ) + concat!("Alignment of ", stringify!(sd_mbr_command_irq_forward_address_set_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).address - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).address as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3619,9 +3497,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(sd_mbr_command_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).copy_sd as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).copy_sd as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3631,9 +3507,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).compare as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).compare as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3643,9 +3517,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).copy_bl as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).copy_bl as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3655,10 +3527,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).base_set as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).base_set as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3669,8 +3538,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).irq_forward_address_set - as *const _ as usize + &(*(::core::ptr::null::())).irq_forward_address_set as *const _ as usize }, 0usize, concat!( @@ -3978,12 +3846,8 @@ impl ble_gap_adv_properties_t { } } #[inline] - pub fn new_bitfield_1( - anonymous: u8, - include_tx_power: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(anonymous: u8, include_tx_power: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let anonymous: u8 = unsafe { ::core::mem::transmute(anonymous) }; anonymous as u64 @@ -4103,8 +3967,7 @@ impl ble_gap_adv_report_type_t { status: u16, reserved: u16, ) -> __BindgenBitfieldUnit<[u8; 2usize], u16> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize], u16> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize], u16> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let connectable: u16 = unsafe { ::core::mem::transmute(connectable) }; connectable as u64 @@ -4158,9 +4021,7 @@ fn bindgen_test_layout_ble_gap_aux_pointer_t() { concat!("Alignment of ", stringify!(ble_gap_aux_pointer_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).aux_offset as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).aux_offset as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -4204,12 +4065,7 @@ fn bindgen_test_layout_ble_gap_addr_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).addr as *const _ as usize }, 1usize, - concat!( - "Offset of field: ", - stringify!(ble_gap_addr_t), - "::", - stringify!(addr) - ) + concat!("Offset of field: ", stringify!(ble_gap_addr_t), "::", stringify!(addr)) ); } impl ble_gap_addr_t { @@ -4236,12 +4092,8 @@ impl ble_gap_addr_t { } } #[inline] - pub fn new_bitfield_1( - addr_id_peer: u8, - addr_type: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(addr_id_peer: u8, addr_type: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let addr_id_peer: u8 = unsafe { ::core::mem::transmute(addr_id_peer) }; addr_id_peer as u64 @@ -4288,10 +4140,7 @@ fn bindgen_test_layout_ble_gap_conn_params_t() { concat!("Alignment of ", stringify!(ble_gap_conn_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).min_conn_interval as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).min_conn_interval as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -4301,10 +4150,7 @@ fn bindgen_test_layout_ble_gap_conn_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_conn_interval as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).max_conn_interval as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -4314,9 +4160,7 @@ fn bindgen_test_layout_ble_gap_conn_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).slave_latency as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).slave_latency as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -4326,9 +4170,7 @@ fn bindgen_test_layout_ble_gap_conn_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_sup_timeout as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_sup_timeout as *const _ as usize }, 6usize, concat!( "Offset of field: ", @@ -4390,8 +4232,7 @@ impl ble_gap_conn_sec_mode_t { } #[inline] pub fn new_bitfield_1(sm: u8, lv: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { let sm: u8 = unsafe { ::core::mem::transmute(sm) }; sm as u64 @@ -4435,9 +4276,7 @@ fn bindgen_test_layout_ble_gap_conn_sec_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).encr_key_size as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).encr_key_size as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -4469,12 +4308,7 @@ fn bindgen_test_layout_ble_gap_irk_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).irk as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_gap_irk_t), - "::", - stringify!(irk) - ) + concat!("Offset of field: ", stringify!(ble_gap_irk_t), "::", stringify!(irk)) ); } #[doc = "@brief Channel mask (40 bits)."] @@ -4561,9 +4395,7 @@ fn bindgen_test_layout_ble_gap_adv_params_t() { concat!("Alignment of ", stringify!(ble_gap_adv_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).properties as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).properties as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -4573,9 +4405,7 @@ fn bindgen_test_layout_ble_gap_adv_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_peer_addr as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_peer_addr as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -4605,9 +4435,7 @@ fn bindgen_test_layout_ble_gap_adv_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_adv_evts as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).max_adv_evts as *const _ as usize }, 14usize, concat!( "Offset of field: ", @@ -4617,9 +4445,7 @@ fn bindgen_test_layout_ble_gap_adv_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).channel_mask as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).channel_mask as *const _ as usize }, 15usize, concat!( "Offset of field: ", @@ -4629,9 +4455,7 @@ fn bindgen_test_layout_ble_gap_adv_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).filter_policy as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).filter_policy as *const _ as usize }, 20usize, concat!( "Offset of field: ", @@ -4641,9 +4465,7 @@ fn bindgen_test_layout_ble_gap_adv_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).primary_phy as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).primary_phy as *const _ as usize }, 21usize, concat!( "Offset of field: ", @@ -4653,9 +4475,7 @@ fn bindgen_test_layout_ble_gap_adv_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).secondary_phy as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).secondary_phy as *const _ as usize }, 22usize, concat!( "Offset of field: ", @@ -4689,19 +4509,14 @@ impl ble_gap_adv_params_t { } } #[inline] - pub fn new_bitfield_1( - set_id: u8, - scan_req_notification: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(set_id: u8, scan_req_notification: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { let set_id: u8 = unsafe { ::core::mem::transmute(set_id) }; set_id as u64 }); __bindgen_bitfield_unit.set(4usize, 1u8, { - let scan_req_notification: u8 = - unsafe { ::core::mem::transmute(scan_req_notification) }; + let scan_req_notification: u8 = unsafe { ::core::mem::transmute(scan_req_notification) }; scan_req_notification as u64 }); __bindgen_bitfield_unit @@ -4754,9 +4569,7 @@ fn bindgen_test_layout_ble_gap_adv_data_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).scan_rsp_data as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).scan_rsp_data as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -4811,9 +4624,7 @@ fn bindgen_test_layout_ble_gap_scan_params_t() { concat!("Alignment of ", stringify!(ble_gap_scan_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).scan_phys as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).scan_phys as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -4853,9 +4664,7 @@ fn bindgen_test_layout_ble_gap_scan_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).channel_mask as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).channel_mask as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -4917,15 +4726,13 @@ impl ble_gap_scan_params_t { active: u8, filter_policy: u8, ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let extended: u8 = unsafe { ::core::mem::transmute(extended) }; extended as u64 }); __bindgen_bitfield_unit.set(1usize, 1u8, { - let report_incomplete_evts: u8 = - unsafe { ::core::mem::transmute(report_incomplete_evts) }; + let report_incomplete_evts: u8 = unsafe { ::core::mem::transmute(report_incomplete_evts) }; report_incomplete_evts as u64 }); __bindgen_bitfield_unit.set(2usize, 1u8, { @@ -4982,9 +4789,7 @@ fn bindgen_test_layout_ble_gap_privacy_params_t() { concat!("Alignment of ", stringify!(ble_gap_privacy_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).privacy_mode as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).privacy_mode as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -4994,10 +4799,7 @@ fn bindgen_test_layout_ble_gap_privacy_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).private_addr_type as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).private_addr_type as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -5007,10 +4809,7 @@ fn bindgen_test_layout_ble_gap_privacy_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).private_addr_cycle_s as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).private_addr_cycle_s as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -5020,9 +4819,7 @@ fn bindgen_test_layout_ble_gap_privacy_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_device_irk as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_device_irk as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -5145,14 +4942,8 @@ impl ble_gap_sec_kdist_t { } } #[inline] - pub fn new_bitfield_1( - enc: u8, - id: u8, - sign: u8, - link: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(enc: u8, id: u8, sign: u8, link: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let enc: u8 = unsafe { ::core::mem::transmute(enc) }; enc as u64 @@ -5199,9 +4990,7 @@ fn bindgen_test_layout_ble_gap_sec_params_t() { concat!("Alignment of ", stringify!(ble_gap_sec_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).min_key_size as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).min_key_size as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -5211,9 +5000,7 @@ fn bindgen_test_layout_ble_gap_sec_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_key_size as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).max_key_size as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -5233,9 +5020,7 @@ fn bindgen_test_layout_ble_gap_sec_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).kdist_peer as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).kdist_peer as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -5321,8 +5106,7 @@ impl ble_gap_sec_params_t { io_caps: u8, oob: u8, ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let bond: u8 = unsafe { ::core::mem::transmute(bond) }; bond as u64 @@ -5416,13 +5200,8 @@ impl ble_gap_enc_info_t { } } #[inline] - pub fn new_bitfield_1( - lesc: u8, - auth: u8, - ltk_len: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(lesc: u8, auth: u8, ltk_len: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let lesc: u8 = unsafe { ::core::mem::transmute(lesc) }; lesc as u64 @@ -5657,9 +5436,7 @@ fn bindgen_test_layout_ble_gap_evt_connected_t() { concat!("Alignment of ", stringify!(ble_gap_evt_connected_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).peer_addr as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).peer_addr as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5679,9 +5456,7 @@ fn bindgen_test_layout_ble_gap_evt_connected_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_params as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_params as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -5691,9 +5466,7 @@ fn bindgen_test_layout_ble_gap_evt_connected_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_handle as *const _ as usize }, 16usize, concat!( "Offset of field: ", @@ -5703,9 +5476,7 @@ fn bindgen_test_layout_ble_gap_evt_connected_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_data as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_data as *const _ as usize }, 20usize, concat!( "Offset of field: ", @@ -5735,9 +5506,7 @@ fn bindgen_test_layout_ble_gap_evt_disconnected_t() { concat!("Alignment of ", stringify!(ble_gap_evt_disconnected_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).reason as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).reason as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5767,10 +5536,7 @@ fn bindgen_test_layout_ble_gap_evt_conn_param_update_t() { concat!("Alignment of ", stringify!(ble_gap_evt_conn_param_update_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_params as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_params as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5797,15 +5563,11 @@ fn bindgen_test_layout_ble_gap_evt_phy_update_request_t() { assert_eq!( ::core::mem::align_of::(), 1usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_phy_update_request_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_phy_update_request_t)) ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).peer_preferred_phys - as *const _ as usize + &(*(::core::ptr::null::())).peer_preferred_phys as *const _ as usize }, 0usize, concat!( @@ -5840,9 +5602,7 @@ fn bindgen_test_layout_ble_gap_evt_phy_update_t() { concat!("Alignment of ", stringify!(ble_gap_evt_phy_update_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).status as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).status as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5852,9 +5612,7 @@ fn bindgen_test_layout_ble_gap_evt_phy_update_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).tx_phy as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).tx_phy as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -5864,9 +5622,7 @@ fn bindgen_test_layout_ble_gap_evt_phy_update_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rx_phy as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rx_phy as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -5893,16 +5649,10 @@ fn bindgen_test_layout_ble_gap_evt_sec_params_request_t() { assert_eq!( ::core::mem::align_of::(), 1usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_sec_params_request_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_sec_params_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).peer_params as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).peer_params as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5936,10 +5686,7 @@ fn bindgen_test_layout_ble_gap_evt_sec_info_request_t() { concat!("Alignment of ", stringify!(ble_gap_evt_sec_info_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).peer_addr as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).peer_addr as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5949,10 +5696,7 @@ fn bindgen_test_layout_ble_gap_evt_sec_info_request_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).master_id as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).master_id as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -5997,13 +5741,8 @@ impl ble_gap_evt_sec_info_request_t { } } #[inline] - pub fn new_bitfield_1( - enc_info: u8, - id_info: u8, - sign_info: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(enc_info: u8, id_info: u8, sign_info: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let enc_info: u8 = unsafe { ::core::mem::transmute(enc_info) }; enc_info as u64 @@ -6040,9 +5779,7 @@ fn bindgen_test_layout_ble_gap_evt_passkey_display_t() { concat!("Alignment of ", stringify!(ble_gap_evt_passkey_display_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).passkey as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).passkey as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6066,8 +5803,7 @@ impl ble_gap_evt_passkey_display_t { } #[inline] pub fn new_bitfield_1(match_request: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let match_request: u8 = unsafe { ::core::mem::transmute(match_request) }; match_request as u64 @@ -6095,9 +5831,7 @@ fn bindgen_test_layout_ble_gap_evt_key_pressed_t() { concat!("Alignment of ", stringify!(ble_gap_evt_key_pressed_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).kp_not as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).kp_not as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6127,10 +5861,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_key_request_t() { concat!("Alignment of ", stringify!(ble_gap_evt_auth_key_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).key_type as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).key_type as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6160,16 +5891,10 @@ fn bindgen_test_layout_ble_gap_evt_lesc_dhkey_request_t() { assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_lesc_dhkey_request_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_lesc_dhkey_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_pk_peer as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).p_pk_peer as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6193,8 +5918,7 @@ impl ble_gap_evt_lesc_dhkey_request_t { } #[inline] pub fn new_bitfield_1(oobd_req: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let oobd_req: u8 = unsafe { ::core::mem::transmute(oobd_req) }; oobd_req as u64 @@ -6268,14 +5992,8 @@ impl ble_gap_sec_levels_t { } } #[inline] - pub fn new_bitfield_1( - lv1: u8, - lv2: u8, - lv3: u8, - lv4: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(lv1: u8, lv2: u8, lv3: u8, lv4: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let lv1: u8 = unsafe { ::core::mem::transmute(lv1) }; lv1 as u64 @@ -6514,10 +6232,7 @@ fn bindgen_test_layout_ble_gap_data_length_params_t() { concat!("Alignment of ", stringify!(ble_gap_data_length_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_tx_octets as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).max_tx_octets as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6527,10 +6242,7 @@ fn bindgen_test_layout_ble_gap_data_length_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_rx_octets as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).max_rx_octets as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -6540,10 +6252,7 @@ fn bindgen_test_layout_ble_gap_data_length_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_tx_time_us as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).max_tx_time_us as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -6553,10 +6262,7 @@ fn bindgen_test_layout_ble_gap_data_length_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_rx_time_us as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).max_rx_time_us as *const _ as usize }, 6usize, concat!( "Offset of field: ", @@ -6587,15 +6293,11 @@ fn bindgen_test_layout_ble_gap_data_length_limitation_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gap_data_length_limitation_t) - ) + concat!("Alignment of ", stringify!(ble_gap_data_length_limitation_t)) ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).tx_payload_limited_octets - as *const _ as usize + &(*(::core::ptr::null::())).tx_payload_limited_octets as *const _ as usize }, 0usize, concat!( @@ -6607,8 +6309,7 @@ fn bindgen_test_layout_ble_gap_data_length_limitation_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).rx_payload_limited_octets - as *const _ as usize + &(*(::core::ptr::null::())).rx_payload_limited_octets as *const _ as usize }, 2usize, concat!( @@ -6620,8 +6321,7 @@ fn bindgen_test_layout_ble_gap_data_length_limitation_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).tx_rx_time_limited_us - as *const _ as usize + &(*(::core::ptr::null::())).tx_rx_time_limited_us as *const _ as usize }, 4usize, concat!( @@ -6661,9 +6361,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_status_t() { concat!("Alignment of ", stringify!(ble_gap_evt_auth_status_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).auth_status as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).auth_status as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6673,9 +6371,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_status_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sm1_levels as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).sm1_levels as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -6685,9 +6381,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_status_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sm2_levels as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).sm2_levels as *const _ as usize }, 3usize, concat!( "Offset of field: ", @@ -6697,9 +6391,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_status_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).kdist_own as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).kdist_own as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -6709,9 +6401,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_status_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).kdist_peer as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).kdist_peer as *const _ as usize }, 5usize, concat!( "Offset of field: ", @@ -6756,13 +6446,8 @@ impl ble_gap_evt_auth_status_t { } } #[inline] - pub fn new_bitfield_1( - error_src: u8, - bonded: u8, - lesc: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(error_src: u8, bonded: u8, lesc: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 2u8, { let error_src: u8 = unsafe { ::core::mem::transmute(error_src) }; error_src as u64 @@ -6798,9 +6483,7 @@ fn bindgen_test_layout_ble_gap_evt_conn_sec_update_t() { concat!("Alignment of ", stringify!(ble_gap_evt_conn_sec_update_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_sec as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_sec as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6837,15 +6520,11 @@ fn bindgen_test_layout_ble_gap_evt_timeout_t__bindgen_ty_1() { assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_timeout_t__bindgen_ty_1) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_timeout_t__bindgen_ty_1)) ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).adv_report_buffer - as *const _ as usize + &(*(::core::ptr::null::())).adv_report_buffer as *const _ as usize }, 0usize, concat!( @@ -6911,9 +6590,7 @@ fn bindgen_test_layout_ble_gap_evt_rssi_changed_t() { concat!("Alignment of ", stringify!(ble_gap_evt_rssi_changed_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rssi as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rssi as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6923,9 +6600,7 @@ fn bindgen_test_layout_ble_gap_evt_rssi_changed_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ch_index as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).ch_index as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -6962,16 +6637,10 @@ fn bindgen_test_layout_ble_gap_evt_adv_set_terminated_t() { assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_adv_set_terminated_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_adv_set_terminated_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).reason as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).reason as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6981,10 +6650,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_set_terminated_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_handle as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_handle as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -6995,8 +6661,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_set_terminated_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).num_completed_adv_events - as *const _ as usize + &(*(::core::ptr::null::())).num_completed_adv_events as *const _ as usize }, 2usize, concat!( @@ -7007,10 +6672,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_set_terminated_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_data as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_data as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -7099,9 +6761,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).peer_addr as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).peer_addr as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -7111,9 +6771,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).direct_addr as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).direct_addr as *const _ as usize }, 9usize, concat!( "Offset of field: ", @@ -7123,9 +6781,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).primary_phy as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).primary_phy as *const _ as usize }, 16usize, concat!( "Offset of field: ", @@ -7135,9 +6791,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).secondary_phy as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).secondary_phy as *const _ as usize }, 17usize, concat!( "Offset of field: ", @@ -7147,9 +6801,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).tx_power as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).tx_power as *const _ as usize }, 18usize, concat!( "Offset of field: ", @@ -7169,9 +6821,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ch_index as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).ch_index as *const _ as usize }, 20usize, concat!( "Offset of field: ", @@ -7181,9 +6831,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).set_id as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).set_id as *const _ as usize }, 21usize, concat!( "Offset of field: ", @@ -7203,9 +6851,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).aux_pointer as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).aux_pointer as *const _ as usize }, 32usize, concat!( "Offset of field: ", @@ -7229,8 +6875,7 @@ impl ble_gap_evt_adv_report_t { } #[inline] pub fn new_bitfield_1(data_id: u16) -> __BindgenBitfieldUnit<[u8; 2usize], u16> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize], u16> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize], u16> = Default::default(); __bindgen_bitfield_unit.set(0usize, 12u8, { let data_id: u16 = unsafe { ::core::mem::transmute(data_id) }; data_id as u64 @@ -7303,14 +6948,8 @@ impl ble_gap_evt_sec_request_t { } } #[inline] - pub fn new_bitfield_1( - bond: u8, - mitm: u8, - lesc: u8, - keypress: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(bond: u8, mitm: u8, lesc: u8, keypress: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let bond: u8 = unsafe { ::core::mem::transmute(bond) }; bond as u64 @@ -7342,23 +6981,16 @@ fn bindgen_test_layout_ble_gap_evt_conn_param_update_request_t() { assert_eq!( ::core::mem::size_of::(), 8usize, - concat!( - "Size of: ", - stringify!(ble_gap_evt_conn_param_update_request_t) - ) + concat!("Size of: ", stringify!(ble_gap_evt_conn_param_update_request_t)) ); assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_conn_param_update_request_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_conn_param_update_request_t)) ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).conn_params - as *const _ as usize + &(*(::core::ptr::null::())).conn_params as *const _ as usize }, 0usize, concat!( @@ -7394,10 +7026,7 @@ fn bindgen_test_layout_ble_gap_evt_scan_req_report_t() { concat!("Alignment of ", stringify!(ble_gap_evt_scan_req_report_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_handle as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7407,9 +7036,7 @@ fn bindgen_test_layout_ble_gap_evt_scan_req_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rssi as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rssi as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -7419,10 +7046,7 @@ fn bindgen_test_layout_ble_gap_evt_scan_req_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).peer_addr as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).peer_addr as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -7444,23 +7068,16 @@ fn bindgen_test_layout_ble_gap_evt_data_length_update_request_t() { assert_eq!( ::core::mem::size_of::(), 8usize, - concat!( - "Size of: ", - stringify!(ble_gap_evt_data_length_update_request_t) - ) + concat!("Size of: ", stringify!(ble_gap_evt_data_length_update_request_t)) ); assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_data_length_update_request_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_data_length_update_request_t)) ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).peer_params - as *const _ as usize + &(*(::core::ptr::null::())).peer_params as *const _ as usize }, 0usize, concat!( @@ -7488,16 +7105,10 @@ fn bindgen_test_layout_ble_gap_evt_data_length_update_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_data_length_update_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_data_length_update_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).effective_params - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).effective_params as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7522,23 +7133,16 @@ fn bindgen_test_layout_ble_gap_evt_qos_channel_survey_report_t() { assert_eq!( ::core::mem::size_of::(), 40usize, - concat!( - "Size of: ", - stringify!(ble_gap_evt_qos_channel_survey_report_t) - ) + concat!("Size of: ", stringify!(ble_gap_evt_qos_channel_survey_report_t)) ); assert_eq!( ::core::mem::align_of::(), 1usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_qos_channel_survey_report_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_qos_channel_survey_report_t)) ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).channel_energy - as *const _ as usize + &(*(::core::ptr::null::())).channel_energy as *const _ as usize }, 0usize, concat!( @@ -7622,9 +7226,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_gap_evt_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).connected as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).connected as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7634,10 +7236,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).disconnected as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).disconnected as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7647,10 +7246,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_param_update as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_param_update as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7660,10 +7256,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sec_params_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).sec_params_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7673,10 +7266,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sec_info_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).sec_info_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7686,10 +7276,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).passkey_display as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).passkey_display as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7699,10 +7286,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).key_pressed as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).key_pressed as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7712,10 +7296,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).auth_key_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).auth_key_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7725,10 +7306,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).lesc_dhkey_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).lesc_dhkey_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7738,10 +7316,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).auth_status as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).auth_status as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7751,10 +7326,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_sec_update as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_sec_update as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7764,9 +7336,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).timeout as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).timeout as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7776,10 +7346,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rssi_changed as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).rssi_changed as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7789,9 +7356,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_report as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_report as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7801,10 +7366,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_set_terminated as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_set_terminated as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7814,10 +7376,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sec_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).sec_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7828,8 +7387,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).conn_param_update_request - as *const _ as usize + &(*(::core::ptr::null::())).conn_param_update_request as *const _ as usize }, 0usize, concat!( @@ -7840,10 +7398,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).scan_req_report as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).scan_req_report as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7853,10 +7408,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).phy_update_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).phy_update_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7866,9 +7418,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).phy_update as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).phy_update as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7879,8 +7429,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).data_length_update_request - as *const _ as usize + &(*(::core::ptr::null::())).data_length_update_request as *const _ as usize }, 0usize, concat!( @@ -7891,10 +7440,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).data_length_update as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).data_length_update as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7905,8 +7451,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).qos_channel_survey_report - as *const _ as usize + &(*(::core::ptr::null::())).qos_channel_survey_report as *const _ as usize }, 0usize, concat!( @@ -7942,12 +7487,7 @@ fn bindgen_test_layout_ble_gap_evt_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).params as *const _ as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(ble_gap_evt_t), - "::", - stringify!(params) - ) + concat!("Offset of field: ", stringify!(ble_gap_evt_t), "::", stringify!(params)) ); } #[doc = " @brief BLE GAP connection configuration parameters, set with @ref sd_ble_cfg_set."] @@ -7992,9 +7532,7 @@ fn bindgen_test_layout_ble_gap_conn_cfg_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).event_length as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).event_length as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -8040,9 +7578,7 @@ fn bindgen_test_layout_ble_gap_cfg_role_count_t() { concat!("Alignment of ", stringify!(ble_gap_cfg_role_count_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_set_count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_set_count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8052,10 +7588,7 @@ fn bindgen_test_layout_ble_gap_cfg_role_count_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).periph_role_count as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).periph_role_count as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -8065,10 +7598,7 @@ fn bindgen_test_layout_ble_gap_cfg_role_count_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).central_role_count as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).central_role_count as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -8078,10 +7608,7 @@ fn bindgen_test_layout_ble_gap_cfg_role_count_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).central_sec_count as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).central_sec_count as *const _ as usize }, 3usize, concat!( "Offset of field: ", @@ -8104,11 +7631,8 @@ impl ble_gap_cfg_role_count_t { } } #[inline] - pub fn new_bitfield_1( - qos_channel_survey_role_available: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(qos_channel_survey_role_available: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let qos_channel_survey_role_available: u8 = unsafe { ::core::mem::transmute(qos_channel_survey_role_available) }; @@ -8169,9 +7693,7 @@ fn bindgen_test_layout_ble_gap_cfg_device_name_t() { concat!("Alignment of ", stringify!(ble_gap_cfg_device_name_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write_perm as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).write_perm as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8181,9 +7703,7 @@ fn bindgen_test_layout_ble_gap_cfg_device_name_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_value as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_value as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -8193,9 +7713,7 @@ fn bindgen_test_layout_ble_gap_cfg_device_name_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).current_len as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).current_len as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -8205,9 +7723,7 @@ fn bindgen_test_layout_ble_gap_cfg_device_name_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_len as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).max_len as *const _ as usize }, 10usize, concat!( "Offset of field: ", @@ -8231,8 +7747,7 @@ impl ble_gap_cfg_device_name_t { } #[inline] pub fn new_bitfield_1(vloc: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 2u8, { let vloc: u8 = unsafe { ::core::mem::transmute(vloc) }; vloc as u64 @@ -8261,10 +7776,7 @@ fn bindgen_test_layout_ble_gap_cfg_ppcp_incl_cfg_t() { concat!("Alignment of ", stringify!(ble_gap_cfg_ppcp_incl_cfg_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).include_cfg as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).include_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8295,9 +7807,7 @@ fn bindgen_test_layout_ble_gap_cfg_car_incl_cfg_t() { concat!("Alignment of ", stringify!(ble_gap_cfg_car_incl_cfg_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).include_cfg as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).include_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8419,9 +7929,7 @@ fn bindgen_test_layout_ble_gap_opt_ch_map_t() { concat!("Alignment of ", stringify!(ble_gap_opt_ch_map_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8482,16 +7990,10 @@ fn bindgen_test_layout_ble_gap_opt_local_conn_latency_t() { assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(ble_gap_opt_local_conn_latency_t) - ) + concat!("Alignment of ", stringify!(ble_gap_opt_local_conn_latency_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_handle as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8501,10 +8003,7 @@ fn bindgen_test_layout_ble_gap_opt_local_conn_latency_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).requested_latency - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).requested_latency as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -8514,10 +8013,7 @@ fn bindgen_test_layout_ble_gap_opt_local_conn_latency_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_actual_latency - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_actual_latency as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -8556,16 +8052,10 @@ fn bindgen_test_layout_ble_gap_opt_slave_latency_disable_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gap_opt_slave_latency_disable_t) - ) + concat!("Alignment of ", stringify!(ble_gap_opt_slave_latency_disable_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_handle as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8589,8 +8079,7 @@ impl ble_gap_opt_slave_latency_disable_t { } #[inline] pub fn new_bitfield_1(disable: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let disable: u8 = unsafe { ::core::mem::transmute(disable) }; disable as u64 @@ -8631,9 +8120,7 @@ fn bindgen_test_layout_ble_gap_opt_passkey_t() { concat!("Alignment of ", stringify!(ble_gap_opt_passkey_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_passkey as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_passkey as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8689,8 +8176,7 @@ impl ble_gap_opt_compat_mode_1_t { } #[inline] pub fn new_bitfield_1(enable: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let enable: u8 = unsafe { ::core::mem::transmute(enable) }; enable as u64 @@ -8734,16 +8220,10 @@ fn bindgen_test_layout_ble_gap_opt_auth_payload_timeout_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gap_opt_auth_payload_timeout_t) - ) + concat!("Alignment of ", stringify!(ble_gap_opt_auth_payload_timeout_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_handle as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8754,8 +8234,7 @@ fn bindgen_test_layout_ble_gap_opt_auth_payload_timeout_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).auth_payload_timeout - as *const _ as usize + &(*(::core::ptr::null::())).auth_payload_timeout as *const _ as usize }, 2usize, concat!( @@ -8799,17 +8278,10 @@ fn bindgen_test_layout_ble_gap_opt_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).ch_map as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_gap_opt_t), - "::", - stringify!(ch_map) - ) + concat!("Offset of field: ", stringify!(ble_gap_opt_t), "::", stringify!(ch_map)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).local_conn_latency as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).local_conn_latency as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8839,9 +8311,7 @@ fn bindgen_test_layout_ble_gap_opt_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).auth_payload_timeout as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).auth_payload_timeout as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8851,9 +8321,7 @@ fn bindgen_test_layout_ble_gap_opt_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).slave_latency_disable as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).slave_latency_disable as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8895,9 +8363,7 @@ fn bindgen_test_layout_ble_gap_conn_event_trigger_t() { concat!("Alignment of ", stringify!(ble_gap_conn_event_trigger_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ppi_ch_id as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).ppi_ch_id as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8907,10 +8373,7 @@ fn bindgen_test_layout_ble_gap_conn_event_trigger_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).task_endpoint as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).task_endpoint as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -8921,8 +8384,7 @@ fn bindgen_test_layout_ble_gap_conn_event_trigger_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).conn_evt_counter_start - as *const _ as usize + &(*(::core::ptr::null::())).conn_evt_counter_start as *const _ as usize }, 8usize, concat!( @@ -8933,10 +8395,7 @@ fn bindgen_test_layout_ble_gap_conn_event_trigger_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).period_in_events as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).period_in_events as *const _ as usize }, 10usize, concat!( "Offset of field: ", @@ -9351,10 +8810,7 @@ pub unsafe fn sd_ble_gap_adv_stop(adv_handle: u8) -> u32 { #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."] #[doc = " @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation."] #[inline(always)] -pub unsafe fn sd_ble_gap_conn_param_update( - conn_handle: u16, - p_conn_params: *const ble_gap_conn_params_t, -) -> u32 { +pub unsafe fn sd_ble_gap_conn_param_update(conn_handle: u16, p_conn_params: *const ble_gap_conn_params_t) -> u32 { let ret: u32; core::arch::asm!("svc 117", inout("r0") to_asm(conn_handle) => ret, @@ -9624,10 +9080,7 @@ pub unsafe fn sd_ble_gap_device_name_get(p_dev_name: *mut u8, p_len: *mut u16) - #[doc = " See @ref ble_gap_cfg_car_incl_cfg_t and @ref ble_gap_cfg_role_count_t."] #[doc = " @retval ::NRF_ERROR_TIMEOUT A SMP timeout has occurred, and further SMP operations on this link is prohibited."] #[inline(always)] -pub unsafe fn sd_ble_gap_authenticate( - conn_handle: u16, - p_sec_params: *const ble_gap_sec_params_t, -) -> u32 { +pub unsafe fn sd_ble_gap_authenticate(conn_handle: u16, p_sec_params: *const ble_gap_sec_params_t) -> u32 { let ret: u32; core::arch::asm!("svc 126", inout("r0") to_asm(conn_handle) => ret, @@ -9792,10 +9245,7 @@ pub unsafe fn sd_ble_gap_auth_key_reply(conn_handle: u16, key_type: u8, p_key: * #[doc = " - The application has not pulled a @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST event."] #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."] #[inline(always)] -pub unsafe fn sd_ble_gap_lesc_dhkey_reply( - conn_handle: u16, - p_dhkey: *const ble_gap_lesc_dhkey_t, -) -> u32 { +pub unsafe fn sd_ble_gap_lesc_dhkey_reply(conn_handle: u16, p_dhkey: *const ble_gap_lesc_dhkey_t) -> u32 { let ret: u32; core::arch::asm!("svc 129", inout("r0") to_asm(conn_handle) => ret, @@ -10009,10 +9459,7 @@ pub unsafe fn sd_ble_gap_sec_info_reply( #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."] #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."] #[inline(always)] -pub unsafe fn sd_ble_gap_conn_sec_get( - conn_handle: u16, - p_conn_sec: *mut ble_gap_conn_sec_t, -) -> u32 { +pub unsafe fn sd_ble_gap_conn_sec_get(conn_handle: u16, p_conn_sec: *mut ble_gap_conn_sec_t) -> u32 { let ret: u32; core::arch::asm!("svc 135", inout("r0") to_asm(conn_handle) => ret, @@ -10655,9 +10102,7 @@ fn bindgen_test_layout_ble_l2cap_conn_cfg_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rx_queue_size as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rx_queue_size as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -10667,9 +10112,7 @@ fn bindgen_test_layout_ble_l2cap_conn_cfg_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).tx_queue_size as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).tx_queue_size as *const _ as usize }, 5usize, concat!( "Offset of field: ", @@ -10722,9 +10165,7 @@ fn bindgen_test_layout_ble_l2cap_ch_rx_params_t() { concat!("Alignment of ", stringify!(ble_l2cap_ch_rx_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rx_mtu as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rx_mtu as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10734,9 +10175,7 @@ fn bindgen_test_layout_ble_l2cap_ch_rx_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rx_mps as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rx_mps as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -10746,9 +10185,7 @@ fn bindgen_test_layout_ble_l2cap_ch_rx_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sdu_buf as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).sdu_buf as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -10785,9 +10222,7 @@ fn bindgen_test_layout_ble_l2cap_ch_setup_params_t() { concat!("Alignment of ", stringify!(ble_l2cap_ch_setup_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rx_params as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rx_params as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10797,9 +10232,7 @@ fn bindgen_test_layout_ble_l2cap_ch_setup_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).le_psm as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).le_psm as *const _ as usize }, 12usize, concat!( "Offset of field: ", @@ -10809,9 +10242,7 @@ fn bindgen_test_layout_ble_l2cap_ch_setup_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).status as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).status as *const _ as usize }, 14usize, concat!( "Offset of field: ", @@ -10852,9 +10283,7 @@ fn bindgen_test_layout_ble_l2cap_ch_tx_params_t() { concat!("Alignment of ", stringify!(ble_l2cap_ch_tx_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).tx_mtu as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).tx_mtu as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10864,9 +10293,7 @@ fn bindgen_test_layout_ble_l2cap_ch_tx_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).peer_mps as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).peer_mps as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -10876,9 +10303,7 @@ fn bindgen_test_layout_ble_l2cap_ch_tx_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).tx_mps as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).tx_mps as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -10888,9 +10313,7 @@ fn bindgen_test_layout_ble_l2cap_ch_tx_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).credits as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).credits as *const _ as usize }, 6usize, concat!( "Offset of field: ", @@ -10919,16 +10342,10 @@ fn bindgen_test_layout_ble_l2cap_evt_ch_setup_request_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_l2cap_evt_ch_setup_request_t) - ) + concat!("Alignment of ", stringify!(ble_l2cap_evt_ch_setup_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).tx_params as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).tx_params as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10938,10 +10355,7 @@ fn bindgen_test_layout_ble_l2cap_evt_ch_setup_request_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).le_psm as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).le_psm as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -10970,16 +10384,10 @@ fn bindgen_test_layout_ble_l2cap_evt_ch_setup_refused_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_l2cap_evt_ch_setup_refused_t) - ) + concat!("Alignment of ", stringify!(ble_l2cap_evt_ch_setup_refused_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).source as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).source as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10989,10 +10397,7 @@ fn bindgen_test_layout_ble_l2cap_evt_ch_setup_refused_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).status as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).status as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -11022,9 +10427,7 @@ fn bindgen_test_layout_ble_l2cap_evt_ch_setup_t() { concat!("Alignment of ", stringify!(ble_l2cap_evt_ch_setup_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).tx_params as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).tx_params as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11054,16 +10457,10 @@ fn bindgen_test_layout_ble_l2cap_evt_ch_sdu_buf_released_t() { assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(ble_l2cap_evt_ch_sdu_buf_released_t) - ) + concat!("Alignment of ", stringify!(ble_l2cap_evt_ch_sdu_buf_released_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sdu_buf as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).sdu_buf as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11093,9 +10490,7 @@ fn bindgen_test_layout_ble_l2cap_evt_ch_credit_t() { concat!("Alignment of ", stringify!(ble_l2cap_evt_ch_credit_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).credits as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).credits as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11224,10 +10619,7 @@ fn bindgen_test_layout_ble_l2cap_evt_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_l2cap_evt_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ch_setup_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).ch_setup_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11237,10 +10629,7 @@ fn bindgen_test_layout_ble_l2cap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ch_setup_refused as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).ch_setup_refused as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11250,9 +10639,7 @@ fn bindgen_test_layout_ble_l2cap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ch_setup as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).ch_setup as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11262,10 +10649,7 @@ fn bindgen_test_layout_ble_l2cap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ch_sdu_buf_released - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).ch_sdu_buf_released as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11275,9 +10659,7 @@ fn bindgen_test_layout_ble_l2cap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).credit as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).credit as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11287,9 +10669,7 @@ fn bindgen_test_layout_ble_l2cap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rx as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rx as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11299,9 +10679,7 @@ fn bindgen_test_layout_ble_l2cap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).tx as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).tx as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11476,11 +10854,7 @@ pub unsafe fn sd_ble_l2cap_ch_release(conn_handle: u16, local_cid: u16) -> u32 { #[doc = " @retval ::NRF_ERROR_RESOURCES Too many SDU data buffers supplied. Wait for a"] #[doc = " @ref BLE_L2CAP_EVT_CH_RX event and retry."] #[inline(always)] -pub unsafe fn sd_ble_l2cap_ch_rx( - conn_handle: u16, - local_cid: u16, - p_sdu_buf: *const ble_data_t, -) -> u32 { +pub unsafe fn sd_ble_l2cap_ch_rx(conn_handle: u16, local_cid: u16, p_sdu_buf: *const ble_data_t) -> u32 { let ret: u32; core::arch::asm!("svc 186", inout("r0") to_asm(conn_handle) => ret, @@ -11535,11 +10909,7 @@ pub unsafe fn sd_ble_l2cap_ch_rx( #[doc = " @retval ::NRF_ERROR_RESOURCES Too many SDUs queued for transmission. Wait for a"] #[doc = " @ref BLE_L2CAP_EVT_CH_TX event and retry."] #[inline(always)] -pub unsafe fn sd_ble_l2cap_ch_tx( - conn_handle: u16, - local_cid: u16, - p_sdu_buf: *const ble_data_t, -) -> u32 { +pub unsafe fn sd_ble_l2cap_ch_tx(conn_handle: u16, local_cid: u16, p_sdu_buf: *const ble_data_t) -> u32 { let ret: u32; core::arch::asm!("svc 187", inout("r0") to_asm(conn_handle) => ret, @@ -11593,12 +10963,7 @@ pub unsafe fn sd_ble_l2cap_ch_tx( #[doc = " in progress for an L2CAP channel)."] #[doc = " @retval ::NRF_ERROR_NOT_FOUND CID not found."] #[inline(always)] -pub unsafe fn sd_ble_l2cap_ch_flow_control( - conn_handle: u16, - local_cid: u16, - credits: u16, - p_credits: *mut u16, -) -> u32 { +pub unsafe fn sd_ble_l2cap_ch_flow_control(conn_handle: u16, local_cid: u16, credits: u16, p_credits: *mut u16) -> u32 { let ret: u32; core::arch::asm!("svc 188", inout("r0") to_asm(conn_handle) => ret, @@ -11683,10 +11048,7 @@ fn bindgen_test_layout_ble_gattc_conn_cfg_t() { concat!("Alignment of ", stringify!(ble_gattc_conn_cfg_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write_cmd_tx_queue_size as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).write_cmd_tx_queue_size as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11718,9 +11080,7 @@ fn bindgen_test_layout_ble_gattc_handle_range_t() { concat!("Alignment of ", stringify!(ble_gattc_handle_range_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).start_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).start_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11730,9 +11090,7 @@ fn bindgen_test_layout_ble_gattc_handle_range_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).end_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).end_handle as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -11774,9 +11132,7 @@ fn bindgen_test_layout_ble_gattc_service_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle_range as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle_range as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -11818,9 +11174,7 @@ fn bindgen_test_layout_ble_gattc_include_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).included_srvc as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).included_srvc as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -11911,8 +11265,7 @@ impl ble_gattc_char_t { } #[inline] pub fn new_bitfield_1(char_ext_props: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let char_ext_props: u8 = unsafe { ::core::mem::transmute(char_ext_props) }; char_ext_props as u64 @@ -11992,9 +11345,7 @@ fn bindgen_test_layout_ble_gattc_write_params_t() { concat!("Alignment of ", stringify!(ble_gattc_write_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write_op as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).write_op as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12014,9 +11365,7 @@ fn bindgen_test_layout_ble_gattc_write_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -12026,9 +11375,7 @@ fn bindgen_test_layout_ble_gattc_write_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).offset as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).offset as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -12048,9 +11395,7 @@ fn bindgen_test_layout_ble_gattc_write_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_value as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_value as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -12124,9 +11469,7 @@ fn bindgen_test_layout_ble_gattc_attr_info128_t() { concat!("Alignment of ", stringify!(ble_gattc_attr_info128_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12166,16 +11509,10 @@ fn bindgen_test_layout_ble_gattc_evt_prim_srvc_disc_rsp_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_prim_srvc_disc_rsp_t) - ) + concat!("Alignment of ", stringify!(ble_gattc_evt_prim_srvc_disc_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12185,10 +11522,7 @@ fn bindgen_test_layout_ble_gattc_evt_prim_srvc_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).services as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).services as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -12221,9 +11555,7 @@ fn bindgen_test_layout_ble_gattc_evt_rel_disc_rsp_t() { concat!("Alignment of ", stringify!(ble_gattc_evt_rel_disc_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12233,9 +11565,7 @@ fn bindgen_test_layout_ble_gattc_evt_rel_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).includes as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).includes as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -12268,9 +11598,7 @@ fn bindgen_test_layout_ble_gattc_evt_char_disc_rsp_t() { concat!("Alignment of ", stringify!(ble_gattc_evt_char_disc_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12280,9 +11608,7 @@ fn bindgen_test_layout_ble_gattc_evt_char_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).chars as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).chars as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -12315,9 +11641,7 @@ fn bindgen_test_layout_ble_gattc_evt_desc_disc_rsp_t() { concat!("Alignment of ", stringify!(ble_gattc_evt_desc_disc_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12327,9 +11651,7 @@ fn bindgen_test_layout_ble_gattc_evt_desc_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).descs as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).descs as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -12381,8 +11703,8 @@ fn bindgen_test_layout_ble_gattc_evt_attr_info_disc_rsp_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())) - .attr_info16 as *const _ as usize + &(*(::core::ptr::null::())).attr_info16 as *const _ + as usize }, 0usize, concat!( @@ -12394,8 +11716,8 @@ fn bindgen_test_layout_ble_gattc_evt_attr_info_disc_rsp_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())) - .attr_info128 as *const _ as usize + &(*(::core::ptr::null::())).attr_info128 as *const _ + as usize }, 0usize, concat!( @@ -12416,16 +11738,10 @@ fn bindgen_test_layout_ble_gattc_evt_attr_info_disc_rsp_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_attr_info_disc_rsp_t) - ) + concat!("Alignment of ", stringify!(ble_gattc_evt_attr_info_disc_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12435,10 +11751,7 @@ fn bindgen_test_layout_ble_gattc_evt_attr_info_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).format as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).format as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -12448,10 +11761,7 @@ fn bindgen_test_layout_ble_gattc_evt_attr_info_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).info as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).info as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -12483,9 +11793,7 @@ fn bindgen_test_layout_ble_gattc_handle_value_t() { concat!("Alignment of ", stringify!(ble_gattc_handle_value_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12495,9 +11803,7 @@ fn bindgen_test_layout_ble_gattc_handle_value_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_value as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_value as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -12525,24 +11831,15 @@ fn bindgen_test_layout_ble_gattc_evt_char_val_by_uuid_read_rsp_t() { assert_eq!( ::core::mem::size_of::(), 4usize, - concat!( - "Size of: ", - stringify!(ble_gattc_evt_char_val_by_uuid_read_rsp_t) - ) + concat!("Size of: ", stringify!(ble_gattc_evt_char_val_by_uuid_read_rsp_t)) ); assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_char_val_by_uuid_read_rsp_t) - ) + concat!("Alignment of ", stringify!(ble_gattc_evt_char_val_by_uuid_read_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12553,8 +11850,7 @@ fn bindgen_test_layout_ble_gattc_evt_char_val_by_uuid_read_rsp_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).value_len - as *const _ as usize + &(*(::core::ptr::null::())).value_len as *const _ as usize }, 2usize, concat!( @@ -12566,8 +11862,7 @@ fn bindgen_test_layout_ble_gattc_evt_char_val_by_uuid_read_rsp_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).handle_value - as *const _ as usize + &(*(::core::ptr::null::())).handle_value as *const _ as usize }, 4usize, concat!( @@ -12605,9 +11900,7 @@ fn bindgen_test_layout_ble_gattc_evt_read_rsp_t() { concat!("Alignment of ", stringify!(ble_gattc_evt_read_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12617,9 +11910,7 @@ fn bindgen_test_layout_ble_gattc_evt_read_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).offset as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).offset as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -12669,15 +11960,10 @@ fn bindgen_test_layout_ble_gattc_evt_char_vals_read_rsp_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_char_vals_read_rsp_t) - ) + concat!("Alignment of ", stringify!(ble_gattc_evt_char_vals_read_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).len as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).len as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12687,10 +11973,7 @@ fn bindgen_test_layout_ble_gattc_evt_char_vals_read_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).values as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).values as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -12729,9 +12012,7 @@ fn bindgen_test_layout_ble_gattc_evt_write_rsp_t() { concat!("Alignment of ", stringify!(ble_gattc_evt_write_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12741,9 +12022,7 @@ fn bindgen_test_layout_ble_gattc_evt_write_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write_op as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).write_op as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -12753,9 +12032,7 @@ fn bindgen_test_layout_ble_gattc_evt_write_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).offset as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).offset as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -12869,16 +12146,10 @@ fn bindgen_test_layout_ble_gattc_evt_exchange_mtu_rsp_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_exchange_mtu_rsp_t) - ) + concat!("Alignment of ", stringify!(ble_gattc_evt_exchange_mtu_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).server_rx_mtu as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).server_rx_mtu as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12930,24 +12201,15 @@ fn bindgen_test_layout_ble_gattc_evt_write_cmd_tx_complete_t() { assert_eq!( ::core::mem::size_of::(), 1usize, - concat!( - "Size of: ", - stringify!(ble_gattc_evt_write_cmd_tx_complete_t) - ) + concat!("Size of: ", stringify!(ble_gattc_evt_write_cmd_tx_complete_t)) ); assert_eq!( ::core::mem::align_of::(), 1usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_write_cmd_tx_complete_t) - ) - ); - assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ - as usize - }, + concat!("Alignment of ", stringify!(ble_gattc_evt_write_cmd_tx_complete_t)) + ); + assert_eq!( + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13012,10 +12274,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_gattc_evt_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).prim_srvc_disc_rsp - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).prim_srvc_disc_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13025,10 +12284,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rel_disc_rsp as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).rel_disc_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13038,10 +12294,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).char_disc_rsp as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).char_disc_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13051,10 +12304,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).desc_disc_rsp as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).desc_disc_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13065,8 +12315,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).char_val_by_uuid_read_rsp - as *const _ as usize + &(*(::core::ptr::null::())).char_val_by_uuid_read_rsp as *const _ as usize }, 0usize, concat!( @@ -13077,9 +12326,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).read_rsp as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).read_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13089,10 +12336,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).char_vals_read_rsp - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).char_vals_read_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13102,10 +12346,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write_rsp as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).write_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13115,9 +12356,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hvx as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hvx as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13127,10 +12366,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).exchange_mtu_rsp as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).exchange_mtu_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13140,9 +12376,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).timeout as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).timeout as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13152,10 +12386,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).attr_info_disc_rsp - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).attr_info_disc_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13166,8 +12397,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).write_cmd_tx_complete - as *const _ as usize + &(*(::core::ptr::null::())).write_cmd_tx_complete as *const _ as usize }, 0usize, concat!( @@ -13492,11 +12722,7 @@ pub unsafe fn sd_ble_gattc_read(conn_handle: u16, handle: u16, offset: u16) -> u #[doc = " @retval ::NRF_ERROR_BUSY Client procedure already in progress."] #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."] #[inline(always)] -pub unsafe fn sd_ble_gattc_char_values_read( - conn_handle: u16, - p_handles: *const u16, - handle_count: u16, -) -> u32 { +pub unsafe fn sd_ble_gattc_char_values_read(conn_handle: u16, p_handles: *const u16, handle_count: u16) -> u32 { let ret: u32; core::arch::asm!("svc 162", inout("r0") to_asm(conn_handle) => ret, @@ -13552,10 +12778,7 @@ pub unsafe fn sd_ble_gattc_char_values_read( #[doc = " Wait for a @ref BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE event and retry."] #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."] #[inline(always)] -pub unsafe fn sd_ble_gattc_write( - conn_handle: u16, - p_write_params: *const ble_gattc_write_params_t, -) -> u32 { +pub unsafe fn sd_ble_gattc_write(conn_handle: u16, p_write_params: *const ble_gattc_write_params_t) -> u32 { let ret: u32; core::arch::asm!("svc 163", inout("r0") to_asm(conn_handle) => ret, @@ -13745,9 +12968,7 @@ fn bindgen_test_layout_ble_gatts_conn_cfg_t() { concat!("Alignment of ", stringify!(ble_gatts_conn_cfg_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hvn_tx_queue_size as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hvn_tx_queue_size as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13846,14 +13067,8 @@ impl ble_gatts_attr_md_t { } } #[inline] - pub fn new_bitfield_1( - vlen: u8, - vloc: u8, - rd_auth: u8, - wr_auth: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(vlen: u8, vloc: u8, rd_auth: u8, wr_auth: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let vlen: u8 = unsafe { ::core::mem::transmute(vlen) }; vlen as u64 @@ -14145,9 +13360,7 @@ fn bindgen_test_layout_ble_gatts_char_md_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).char_ext_props as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).char_ext_props as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -14157,9 +13370,7 @@ fn bindgen_test_layout_ble_gatts_char_md_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_char_user_desc as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_char_user_desc as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -14169,10 +13380,7 @@ fn bindgen_test_layout_ble_gatts_char_md_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).char_user_desc_max_size as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).char_user_desc_max_size as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -14182,10 +13390,7 @@ fn bindgen_test_layout_ble_gatts_char_md_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).char_user_desc_size as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).char_user_desc_size as *const _ as usize }, 10usize, concat!( "Offset of field: ", @@ -14205,9 +13410,7 @@ fn bindgen_test_layout_ble_gatts_char_md_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_user_desc_md as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_user_desc_md as *const _ as usize }, 16usize, concat!( "Offset of field: ", @@ -14263,9 +13466,7 @@ fn bindgen_test_layout_ble_gatts_char_handles_t() { concat!("Alignment of ", stringify!(ble_gatts_char_handles_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).value_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).value_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14275,10 +13476,7 @@ fn bindgen_test_layout_ble_gatts_char_handles_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).user_desc_handle as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).user_desc_handle as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -14288,9 +13486,7 @@ fn bindgen_test_layout_ble_gatts_char_handles_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).cccd_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).cccd_handle as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -14300,9 +13496,7 @@ fn bindgen_test_layout_ble_gatts_char_handles_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sccd_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).sccd_handle as *const _ as usize }, 6usize, concat!( "Offset of field: ", @@ -14417,10 +13611,7 @@ fn bindgen_test_layout_ble_gatts_authorize_params_t() { concat!("Alignment of ", stringify!(ble_gatts_authorize_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gatt_status as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).gatt_status as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14430,9 +13621,7 @@ fn bindgen_test_layout_ble_gatts_authorize_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).offset as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).offset as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -14442,9 +13631,7 @@ fn bindgen_test_layout_ble_gatts_authorize_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).len as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).len as *const _ as usize }, 6usize, concat!( "Offset of field: ", @@ -14454,9 +13641,7 @@ fn bindgen_test_layout_ble_gatts_authorize_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_data as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_data as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -14480,8 +13665,7 @@ impl ble_gatts_authorize_params_t { } #[inline] pub fn new_bitfield_1(update: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let update: u8 = unsafe { ::core::mem::transmute(update) }; update as u64 @@ -14527,8 +13711,7 @@ fn bindgen_test_layout_ble_gatts_rw_authorize_reply_params_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).read - as *const _ as usize + &(*(::core::ptr::null::())).read as *const _ as usize }, 0usize, concat!( @@ -14540,8 +13723,7 @@ fn bindgen_test_layout_ble_gatts_rw_authorize_reply_params_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).write - as *const _ as usize + &(*(::core::ptr::null::())).write as *const _ as usize }, 0usize, concat!( @@ -14557,24 +13739,15 @@ fn bindgen_test_layout_ble_gatts_rw_authorize_reply_params_t() { assert_eq!( ::core::mem::size_of::(), 16usize, - concat!( - "Size of: ", - stringify!(ble_gatts_rw_authorize_reply_params_t) - ) + concat!("Size of: ", stringify!(ble_gatts_rw_authorize_reply_params_t)) ); assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(ble_gatts_rw_authorize_reply_params_t) - ) + concat!("Alignment of ", stringify!(ble_gatts_rw_authorize_reply_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).type_ as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).type_ as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14584,10 +13757,7 @@ fn bindgen_test_layout_ble_gatts_rw_authorize_reply_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).params as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).params as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -14630,8 +13800,7 @@ impl ble_gatts_cfg_service_changed_t { } #[inline] pub fn new_bitfield_1(service_changed: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let service_changed: u8 = unsafe { ::core::mem::transmute(service_changed) }; service_changed as u64 @@ -14664,10 +13833,7 @@ fn bindgen_test_layout_ble_gatts_cfg_attr_tab_size_t() { concat!("Alignment of ", stringify!(ble_gatts_cfg_attr_tab_size_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).attr_tab_size as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).attr_tab_size as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14700,9 +13866,7 @@ fn bindgen_test_layout_ble_gatts_cfg_t() { concat!("Alignment of ", stringify!(ble_gatts_cfg_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).service_changed as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).service_changed as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14785,9 +13949,7 @@ fn bindgen_test_layout_ble_gatts_evt_write_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).auth_required as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).auth_required as *const _ as usize }, 7usize, concat!( "Offset of field: ", @@ -14917,8 +14079,7 @@ fn bindgen_test_layout_ble_gatts_evt_rw_authorize_request_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).read - as *const _ as usize + &(*(::core::ptr::null::())).read as *const _ as usize }, 0usize, concat!( @@ -14930,8 +14091,7 @@ fn bindgen_test_layout_ble_gatts_evt_rw_authorize_request_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).write - as *const _ as usize + &(*(::core::ptr::null::())).write as *const _ as usize }, 0usize, concat!( @@ -14947,24 +14107,15 @@ fn bindgen_test_layout_ble_gatts_evt_rw_authorize_request_t() { assert_eq!( ::core::mem::size_of::(), 14usize, - concat!( - "Size of: ", - stringify!(ble_gatts_evt_rw_authorize_request_t) - ) + concat!("Size of: ", stringify!(ble_gatts_evt_rw_authorize_request_t)) ); assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gatts_evt_rw_authorize_request_t) - ) + concat!("Alignment of ", stringify!(ble_gatts_evt_rw_authorize_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).type_ as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).type_ as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14974,10 +14125,7 @@ fn bindgen_test_layout_ble_gatts_evt_rw_authorize_request_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).request as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -15004,15 +14152,10 @@ fn bindgen_test_layout_ble_gatts_evt_sys_attr_missing_t() { assert_eq!( ::core::mem::align_of::(), 1usize, - concat!( - "Alignment of ", - stringify!(ble_gatts_evt_sys_attr_missing_t) - ) + concat!("Alignment of ", stringify!(ble_gatts_evt_sys_attr_missing_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hint as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hint as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15064,24 +14207,15 @@ fn bindgen_test_layout_ble_gatts_evt_exchange_mtu_request_t() { assert_eq!( ::core::mem::size_of::(), 2usize, - concat!( - "Size of: ", - stringify!(ble_gatts_evt_exchange_mtu_request_t) - ) + concat!("Size of: ", stringify!(ble_gatts_evt_exchange_mtu_request_t)) ); assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gatts_evt_exchange_mtu_request_t) - ) + concat!("Alignment of ", stringify!(ble_gatts_evt_exchange_mtu_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).client_rx_mtu - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).client_rx_mtu as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15141,9 +14275,7 @@ fn bindgen_test_layout_ble_gatts_evt_hvn_tx_complete_t() { concat!("Alignment of ", stringify!(ble_gatts_evt_hvn_tx_complete_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15192,9 +14324,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_gatts_evt_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).write as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15204,10 +14334,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).authorize_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).authorize_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15217,10 +14344,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sys_attr_missing as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).sys_attr_missing as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15230,9 +14354,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hvc as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hvc as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15242,10 +14364,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).exchange_mtu_request - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).exchange_mtu_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15255,9 +14374,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).timeout as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).timeout as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15267,10 +14384,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hvn_tx_complete as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).hvn_tx_complete as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15333,11 +14447,7 @@ fn bindgen_test_layout_ble_gatts_evt_t() { #[doc = " @retval ::NRF_ERROR_FORBIDDEN Forbidden value supplied, certain UUIDs are reserved for the stack."] #[doc = " @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation."] #[inline(always)] -pub unsafe fn sd_ble_gatts_service_add( - type_: u8, - p_uuid: *const ble_uuid_t, - p_handle: *mut u16, -) -> u32 { +pub unsafe fn sd_ble_gatts_service_add(type_: u8, p_uuid: *const ble_uuid_t, p_handle: *mut u16) -> u32 { let ret: u32; core::arch::asm!("svc 168", inout("r0") to_asm(type_) => ret, @@ -15372,11 +14482,7 @@ pub unsafe fn sd_ble_gatts_service_add( #[doc = " @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation."] #[doc = " @retval ::NRF_ERROR_NOT_FOUND Attribute not found."] #[inline(always)] -pub unsafe fn sd_ble_gatts_include_add( - service_handle: u16, - inc_srvc_handle: u16, - p_include_handle: *mut u16, -) -> u32 { +pub unsafe fn sd_ble_gatts_include_add(service_handle: u16, inc_srvc_handle: u16, p_include_handle: *mut u16) -> u32 { let ret: u32; core::arch::asm!("svc 169", inout("r0") to_asm(service_handle) => ret, @@ -15488,11 +14594,7 @@ pub unsafe fn sd_ble_gatts_descriptor_add( #[doc = " @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied, attribute lengths are restricted by @ref BLE_GATTS_ATTR_LENS_MAX."] #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied on a system attribute."] #[inline(always)] -pub unsafe fn sd_ble_gatts_value_set( - conn_handle: u16, - handle: u16, - p_value: *mut ble_gatts_value_t, -) -> u32 { +pub unsafe fn sd_ble_gatts_value_set(conn_handle: u16, handle: u16, p_value: *mut ble_gatts_value_t) -> u32 { let ret: u32; core::arch::asm!("svc 172", inout("r0") to_asm(conn_handle) => ret, @@ -15526,11 +14628,7 @@ pub unsafe fn sd_ble_gatts_value_set( #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied on a system attribute."] #[doc = " @retval ::BLE_ERROR_GATTS_SYS_ATTR_MISSING System attributes missing, use @ref sd_ble_gatts_sys_attr_set to set them to a known value."] #[inline(always)] -pub unsafe fn sd_ble_gatts_value_get( - conn_handle: u16, - handle: u16, - p_value: *mut ble_gatts_value_t, -) -> u32 { +pub unsafe fn sd_ble_gatts_value_get(conn_handle: u16, handle: u16, p_value: *mut ble_gatts_value_t) -> u32 { let ret: u32; core::arch::asm!("svc 173", inout("r0") to_asm(conn_handle) => ret, @@ -15605,10 +14703,7 @@ pub unsafe fn sd_ble_gatts_value_get( #[doc = " Wait for a @ref BLE_GATTS_EVT_HVN_TX_COMPLETE event and retry."] #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."] #[inline(always)] -pub unsafe fn sd_ble_gatts_hvx( - conn_handle: u16, - p_hvx_params: *const ble_gatts_hvx_params_t, -) -> u32 { +pub unsafe fn sd_ble_gatts_hvx(conn_handle: u16, p_hvx_params: *const ble_gatts_hvx_params_t) -> u32 { let ret: u32; core::arch::asm!("svc 174", inout("r0") to_asm(conn_handle) => ret, @@ -15654,11 +14749,7 @@ pub unsafe fn sd_ble_gatts_hvx( #[doc = " @retval ::BLE_ERROR_GATTS_SYS_ATTR_MISSING System attributes missing, use @ref sd_ble_gatts_sys_attr_set to set them to a known value."] #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."] #[inline(always)] -pub unsafe fn sd_ble_gatts_service_changed( - conn_handle: u16, - start_handle: u16, - end_handle: u16, -) -> u32 { +pub unsafe fn sd_ble_gatts_service_changed(conn_handle: u16, start_handle: u16, end_handle: u16) -> u32 { let ret: u32; core::arch::asm!("svc 175", inout("r0") to_asm(conn_handle) => ret, @@ -15757,12 +14848,7 @@ pub unsafe fn sd_ble_gatts_rw_authorize_reply( #[doc = " @retval ::NRF_ERROR_INVALID_DATA Invalid data supplied, the data should be exactly the same as retrieved with @ref sd_ble_gatts_sys_attr_get."] #[doc = " @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation."] #[inline(always)] -pub unsafe fn sd_ble_gatts_sys_attr_set( - conn_handle: u16, - p_sys_attr_data: *const u8, - len: u16, - flags: u32, -) -> u32 { +pub unsafe fn sd_ble_gatts_sys_attr_set(conn_handle: u16, p_sys_attr_data: *const u8, len: u16, flags: u32) -> u32 { let ret: u32; core::arch::asm!("svc 177", inout("r0") to_asm(conn_handle) => ret, @@ -15851,11 +14937,7 @@ pub unsafe fn sd_ble_gatts_initial_user_handle_get(p_handle: *mut u16) -> u32 { #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameters supplied. Returned when both @c p_uuid and @c p_md are NULL."] #[doc = " @retval ::NRF_ERROR_NOT_FOUND Attribute was not found."] #[inline(always)] -pub unsafe fn sd_ble_gatts_attr_get( - handle: u16, - p_uuid: *mut ble_uuid_t, - p_md: *mut ble_gatts_attr_md_t, -) -> u32 { +pub unsafe fn sd_ble_gatts_attr_get(handle: u16, p_uuid: *mut ble_uuid_t, p_md: *mut ble_gatts_attr_md_t) -> u32 { let ret: u32; core::arch::asm!("svc 180", inout("r0") to_asm(handle) => ret, @@ -16028,9 +15110,7 @@ fn bindgen_test_layout_ble_evt_user_mem_request_t() { concat!("Alignment of ", stringify!(ble_evt_user_mem_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).type_ as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).type_ as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -16062,9 +15142,7 @@ fn bindgen_test_layout_ble_evt_user_mem_release_t() { concat!("Alignment of ", stringify!(ble_evt_user_mem_release_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).type_ as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).type_ as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -16074,9 +15152,7 @@ fn bindgen_test_layout_ble_evt_user_mem_release_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).mem_block as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).mem_block as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -16117,10 +15193,7 @@ fn bindgen_test_layout_ble_common_evt_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_common_evt_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).user_mem_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).user_mem_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -16130,10 +15203,7 @@ fn bindgen_test_layout_ble_common_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).user_mem_release as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).user_mem_release as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -16200,12 +15270,7 @@ fn bindgen_test_layout_ble_evt_hdr_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).evt_id as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_evt_hdr_t), - "::", - stringify!(evt_id) - ) + concat!("Offset of field: ", stringify!(ble_evt_hdr_t), "::", stringify!(evt_id)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).evt_len as *const _ as usize }, @@ -16253,9 +15318,7 @@ fn bindgen_test_layout_ble_evt_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_evt_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).common_evt as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).common_evt as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -16265,9 +15328,7 @@ fn bindgen_test_layout_ble_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gap_evt as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).gap_evt as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -16277,9 +15338,7 @@ fn bindgen_test_layout_ble_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gattc_evt as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).gattc_evt as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -16289,9 +15348,7 @@ fn bindgen_test_layout_ble_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gatts_evt as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).gatts_evt as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -16301,9 +15358,7 @@ fn bindgen_test_layout_ble_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).l2cap_evt as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).l2cap_evt as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -16328,22 +15383,12 @@ fn bindgen_test_layout_ble_evt_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).header as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_evt_t), - "::", - stringify!(header) - ) + concat!("Offset of field: ", stringify!(ble_evt_t), "::", stringify!(header)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).evt as *const _ as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(ble_evt_t), - "::", - stringify!(evt) - ) + concat!("Offset of field: ", stringify!(ble_evt_t), "::", stringify!(evt)) ); } #[doc = " @brief Version Information."] @@ -16390,9 +15435,7 @@ fn bindgen_test_layout_ble_version_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).subversion_number as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).subversion_number as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -16456,13 +15499,8 @@ impl ble_pa_lna_cfg_t { } } #[inline] - pub fn new_bitfield_1( - enable: u8, - active_high: u8, - gpio_pin: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(enable: u8, active_high: u8, gpio_pin: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let enable: u8 = unsafe { ::core::mem::transmute(enable) }; enable as u64 @@ -16526,9 +15564,7 @@ fn bindgen_test_layout_ble_common_opt_pa_lna_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).lna_cfg as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).lna_cfg as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -16538,9 +15574,7 @@ fn bindgen_test_layout_ble_common_opt_pa_lna_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ppi_ch_id_set as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).ppi_ch_id_set as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -16550,9 +15584,7 @@ fn bindgen_test_layout_ble_common_opt_pa_lna_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ppi_ch_id_clr as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).ppi_ch_id_clr as *const _ as usize }, 3usize, concat!( "Offset of field: ", @@ -16562,9 +15594,7 @@ fn bindgen_test_layout_ble_common_opt_pa_lna_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gpiote_ch_id as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).gpiote_ch_id as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -16615,8 +15645,7 @@ impl ble_common_opt_conn_evt_ext_t { } #[inline] pub fn new_bitfield_1(enable: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let enable: u8 = unsafe { ::core::mem::transmute(enable) }; enable as u64 @@ -16652,10 +15681,7 @@ fn bindgen_test_layout_ble_common_opt_extended_rc_cal_t() { assert_eq!( ::core::mem::align_of::(), 1usize, - concat!( - "Alignment of ", - stringify!(ble_common_opt_extended_rc_cal_t) - ) + concat!("Alignment of ", stringify!(ble_common_opt_extended_rc_cal_t)) ); } impl ble_common_opt_extended_rc_cal_t { @@ -16672,8 +15698,7 @@ impl ble_common_opt_extended_rc_cal_t { } #[inline] pub fn new_bitfield_1(enable: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let enable: u8 = unsafe { ::core::mem::transmute(enable) }; enable as u64 @@ -16726,9 +15751,7 @@ fn bindgen_test_layout_ble_common_opt_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).extended_rc_cal as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).extended_rc_cal as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -16763,22 +15786,12 @@ fn bindgen_test_layout_ble_opt_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).common_opt as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_opt_t), - "::", - stringify!(common_opt) - ) + concat!("Offset of field: ", stringify!(ble_opt_t), "::", stringify!(common_opt)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).gap_opt as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_opt_t), - "::", - stringify!(gap_opt) - ) + concat!("Offset of field: ", stringify!(ble_opt_t), "::", stringify!(gap_opt)) ); } #[doc = "@brief BLE connection configuration type, wrapping the module specific configurations, set with"] @@ -16836,10 +15849,7 @@ fn bindgen_test_layout_ble_conn_cfg_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_conn_cfg_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gap_conn_cfg as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).gap_conn_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -16849,10 +15859,7 @@ fn bindgen_test_layout_ble_conn_cfg_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gattc_conn_cfg as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).gattc_conn_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -16862,10 +15869,7 @@ fn bindgen_test_layout_ble_conn_cfg_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gatts_conn_cfg as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).gatts_conn_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -16875,10 +15879,7 @@ fn bindgen_test_layout_ble_conn_cfg_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gatt_conn_cfg as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).gatt_conn_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -16888,10 +15889,7 @@ fn bindgen_test_layout_ble_conn_cfg_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).l2cap_conn_cfg as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).l2cap_conn_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -16958,9 +15956,7 @@ fn bindgen_test_layout_ble_common_cfg_vs_uuid_t() { concat!("Alignment of ", stringify!(ble_common_cfg_vs_uuid_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).vs_uuid_count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).vs_uuid_count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -17030,42 +16026,22 @@ fn bindgen_test_layout_ble_cfg_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).conn_cfg as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_cfg_t), - "::", - stringify!(conn_cfg) - ) + concat!("Offset of field: ", stringify!(ble_cfg_t), "::", stringify!(conn_cfg)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).common_cfg as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_cfg_t), - "::", - stringify!(common_cfg) - ) + concat!("Offset of field: ", stringify!(ble_cfg_t), "::", stringify!(common_cfg)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).gap_cfg as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_cfg_t), - "::", - stringify!(gap_cfg) - ) + concat!("Offset of field: ", stringify!(ble_cfg_t), "::", stringify!(gap_cfg)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).gatts_cfg as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_cfg_t), - "::", - stringify!(gatts_cfg) - ) + concat!("Offset of field: ", stringify!(ble_cfg_t), "::", stringify!(gatts_cfg)) ); } @@ -17293,11 +16269,7 @@ pub unsafe fn sd_ble_uuid_vs_remove(p_uuid_type: *mut u8) -> u32 { #[doc = " @retval ::NRF_ERROR_INVALID_LENGTH Invalid UUID length."] #[doc = " @retval ::NRF_ERROR_NOT_FOUND For a 128-bit UUID, no match in the populated table of UUIDs."] #[inline(always)] -pub unsafe fn sd_ble_uuid_decode( - uuid_le_len: u8, - p_uuid_le: *const u8, - p_uuid: *mut ble_uuid_t, -) -> u32 { +pub unsafe fn sd_ble_uuid_decode(uuid_le_len: u8, p_uuid_le: *const u8, p_uuid: *mut ble_uuid_t) -> u32 { let ret: u32; core::arch::asm!("svc 99", inout("r0") to_asm(uuid_le_len) => ret, @@ -17321,11 +16293,7 @@ pub unsafe fn sd_ble_uuid_decode( #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."] #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid UUID type."] #[inline(always)] -pub unsafe fn sd_ble_uuid_encode( - p_uuid: *const ble_uuid_t, - p_uuid_le_len: *mut u8, - p_uuid_le: *mut u8, -) -> u32 { +pub unsafe fn sd_ble_uuid_encode(p_uuid: *const ble_uuid_t, p_uuid_le_len: *mut u8, p_uuid_le: *mut u8) -> u32 { let ret: u32; core::arch::asm!("svc 100", inout("r0") to_asm(p_uuid) => ret, diff --git a/nrf-softdevice-s140/src/bindings.rs b/nrf-softdevice-s140/src/bindings.rs index 7159ba9..de1eaa9 100644 --- a/nrf-softdevice-s140/src/bindings.rs +++ b/nrf-softdevice-s140/src/bindings.rs @@ -1022,73 +1022,57 @@ pub const NRF_POWER_DCDC_MODES_NRF_POWER_DCDC_ENABLE: NRF_POWER_DCDC_MODES = 1; #[doc = "@brief DC/DC converter modes."] pub type NRF_POWER_DCDC_MODES = self::c_uint; #[doc = "< The event does not have a notification."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_NONE: - NRF_RADIO_NOTIFICATION_DISTANCES = 0; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_NONE: NRF_RADIO_NOTIFICATION_DISTANCES = 0; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_800US: - NRF_RADIO_NOTIFICATION_DISTANCES = 1; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_800US: NRF_RADIO_NOTIFICATION_DISTANCES = 1; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_1740US: - NRF_RADIO_NOTIFICATION_DISTANCES = 2; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_1740US: NRF_RADIO_NOTIFICATION_DISTANCES = 2; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_2680US: - NRF_RADIO_NOTIFICATION_DISTANCES = 3; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_2680US: NRF_RADIO_NOTIFICATION_DISTANCES = 3; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_3620US: - NRF_RADIO_NOTIFICATION_DISTANCES = 4; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_3620US: NRF_RADIO_NOTIFICATION_DISTANCES = 4; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_4560US: - NRF_RADIO_NOTIFICATION_DISTANCES = 5; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_4560US: NRF_RADIO_NOTIFICATION_DISTANCES = 5; #[doc = "< The distance from the active notification to start of radio activity."] -pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_5500US: - NRF_RADIO_NOTIFICATION_DISTANCES = 6; +pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_5500US: NRF_RADIO_NOTIFICATION_DISTANCES = 6; #[doc = "@brief Radio notification distances."] pub type NRF_RADIO_NOTIFICATION_DISTANCES = self::c_uint; #[doc = "< The event does not have a radio notification signal."] -pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_NONE: - NRF_RADIO_NOTIFICATION_TYPES = 0; +pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_NONE: NRF_RADIO_NOTIFICATION_TYPES = 0; #[doc = "< Using interrupt for notification when the radio will be enabled."] -pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_ACTIVE: - NRF_RADIO_NOTIFICATION_TYPES = 1; +pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_ACTIVE: NRF_RADIO_NOTIFICATION_TYPES = 1; #[doc = "< Using interrupt for notification when the radio has been disabled."] -pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_INACTIVE: - NRF_RADIO_NOTIFICATION_TYPES = 2; +pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_INACTIVE: NRF_RADIO_NOTIFICATION_TYPES = 2; #[doc = "< Using interrupt for notification both when the radio will be enabled and disabled."] -pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_BOTH: - NRF_RADIO_NOTIFICATION_TYPES = 3; +pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_BOTH: NRF_RADIO_NOTIFICATION_TYPES = 3; #[doc = "@brief Radio notification types."] pub type NRF_RADIO_NOTIFICATION_TYPES = self::c_uint; #[doc = "< This signal indicates the start of the radio timeslot."] -pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_START: - NRF_RADIO_CALLBACK_SIGNAL_TYPE = 0; +pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_START: NRF_RADIO_CALLBACK_SIGNAL_TYPE = 0; #[doc = "< This signal indicates the NRF_TIMER0 interrupt."] -pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_TIMER0: - NRF_RADIO_CALLBACK_SIGNAL_TYPE = 1; +pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_TIMER0: NRF_RADIO_CALLBACK_SIGNAL_TYPE = 1; #[doc = "< This signal indicates the NRF_RADIO interrupt."] -pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_RADIO: - NRF_RADIO_CALLBACK_SIGNAL_TYPE = 2; +pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_RADIO: NRF_RADIO_CALLBACK_SIGNAL_TYPE = 2; #[doc = "< This signal indicates extend action failed."] -pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_FAILED: - NRF_RADIO_CALLBACK_SIGNAL_TYPE = 3; +pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_FAILED: NRF_RADIO_CALLBACK_SIGNAL_TYPE = + 3; #[doc = "< This signal indicates extend action succeeded."] pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_SUCCEEDED: NRF_RADIO_CALLBACK_SIGNAL_TYPE = 4; #[doc = "@brief The Radio signal callback types."] pub type NRF_RADIO_CALLBACK_SIGNAL_TYPE = self::c_uint; #[doc = "< Return without action."] -pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_NONE: - NRF_RADIO_SIGNAL_CALLBACK_ACTION = 0; +pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_NONE: NRF_RADIO_SIGNAL_CALLBACK_ACTION = 0; #[doc = "< Request an extension of the current"] #[doc = "timeslot. Maximum execution time for this action:"] #[doc = "@ref NRF_RADIO_MAX_EXTENSION_PROCESSING_TIME_US."] #[doc = "This action must be started at least"] #[doc = "@ref NRF_RADIO_MIN_EXTENSION_MARGIN_US before"] #[doc = "the end of the timeslot."] -pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_EXTEND: - NRF_RADIO_SIGNAL_CALLBACK_ACTION = 1; +pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_EXTEND: NRF_RADIO_SIGNAL_CALLBACK_ACTION = + 1; #[doc = "< End the current radio timeslot."] -pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_END: - NRF_RADIO_SIGNAL_CALLBACK_ACTION = 2; +pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_END: NRF_RADIO_SIGNAL_CALLBACK_ACTION = 2; #[doc = "< Request a new radio timeslot and end the current timeslot."] pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_REQUEST_AND_END: NRF_RADIO_SIGNAL_CALLBACK_ACTION = 3; @@ -1181,9 +1165,7 @@ fn bindgen_test_layout_nrf_radio_request_earliest_t() { concat!("Alignment of ", stringify!(nrf_radio_request_earliest_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hfclk as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hfclk as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -1193,9 +1175,7 @@ fn bindgen_test_layout_nrf_radio_request_earliest_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).priority as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).priority as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -1205,9 +1185,7 @@ fn bindgen_test_layout_nrf_radio_request_earliest_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).length_us as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).length_us as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -1217,10 +1195,7 @@ fn bindgen_test_layout_nrf_radio_request_earliest_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).timeout_us as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).timeout_us as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -1256,9 +1231,7 @@ fn bindgen_test_layout_nrf_radio_request_normal_t() { concat!("Alignment of ", stringify!(nrf_radio_request_normal_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hfclk as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hfclk as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -1268,9 +1241,7 @@ fn bindgen_test_layout_nrf_radio_request_normal_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).priority as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).priority as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -1280,9 +1251,7 @@ fn bindgen_test_layout_nrf_radio_request_normal_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).distance_us as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).distance_us as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -1292,9 +1261,7 @@ fn bindgen_test_layout_nrf_radio_request_normal_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).length_us as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).length_us as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -1332,16 +1299,10 @@ fn bindgen_test_layout_nrf_radio_request_t__bindgen_ty_1() { assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(nrf_radio_request_t__bindgen_ty_1) - ) + concat!("Alignment of ", stringify!(nrf_radio_request_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).earliest as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).earliest as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -1351,10 +1312,7 @@ fn bindgen_test_layout_nrf_radio_request_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).normal as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).normal as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -1377,9 +1335,7 @@ fn bindgen_test_layout_nrf_radio_request_t() { concat!("Alignment of ", stringify!(nrf_radio_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).request_type as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).request_type as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -1426,8 +1382,7 @@ pub struct nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_1 #[test] fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_1() { assert_eq!( - ::core::mem::size_of::( - ), + ::core::mem::size_of::(), 4usize, concat!( "Size of: ", @@ -1435,8 +1390,7 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__b ) ); assert_eq!( - ::core::mem::align_of::( - ), + ::core::mem::align_of::(), 4usize, concat!( "Alignment of ", @@ -1445,10 +1399,8 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__b ); assert_eq!( unsafe { - &(*(::core::ptr::null::< - nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_1, - >())) - .p_next as *const _ as usize + &(*(::core::ptr::null::())).p_next + as *const _ as usize }, 0usize, concat!( @@ -1468,8 +1420,7 @@ pub struct nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_2 #[test] fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_2() { assert_eq!( - ::core::mem::size_of::( - ), + ::core::mem::size_of::(), 4usize, concat!( "Size of: ", @@ -1477,8 +1428,7 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__b ) ); assert_eq!( - ::core::mem::align_of::( - ), + ::core::mem::align_of::(), 4usize, concat!( "Alignment of ", @@ -1487,10 +1437,8 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__b ); assert_eq!( unsafe { - &(*(::core::ptr::null::< - nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_2, - >())) - .length_us as *const _ as usize + &(*(::core::ptr::null::())).length_us + as *const _ as usize }, 0usize, concat!( @@ -1521,8 +1469,8 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1() ); assert_eq!( unsafe { - &(*(::core::ptr::null::())) - .request as *const _ as usize + &(*(::core::ptr::null::())).request as *const _ + as usize }, 0usize, concat!( @@ -1534,8 +1482,8 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1() ); assert_eq!( unsafe { - &(*(::core::ptr::null::())) - .extend as *const _ as usize + &(*(::core::ptr::null::())).extend as *const _ + as usize }, 0usize, concat!( @@ -1551,23 +1499,16 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t() { assert_eq!( ::core::mem::size_of::(), 8usize, - concat!( - "Size of: ", - stringify!(nrf_radio_signal_callback_return_param_t) - ) + concat!("Size of: ", stringify!(nrf_radio_signal_callback_return_param_t)) ); assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(nrf_radio_signal_callback_return_param_t) - ) + concat!("Alignment of ", stringify!(nrf_radio_signal_callback_return_param_t)) ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).callback_action - as *const _ as usize + &(*(::core::ptr::null::())).callback_action as *const _ as usize }, 0usize, concat!( @@ -1578,10 +1519,7 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).params as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).params as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -1602,9 +1540,8 @@ fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t() { #[doc = " @param[in] signal_type Type of signal, see @ref NRF_RADIO_CALLBACK_SIGNAL_TYPE."] #[doc = ""] #[doc = " @return Pointer to structure containing action requested by the application."] -pub type nrf_radio_signal_callback_t = ::core::option::Option< - unsafe extern "C" fn(signal_type: u8) -> *mut nrf_radio_signal_callback_return_param_t, ->; +pub type nrf_radio_signal_callback_t = + ::core::option::Option *mut nrf_radio_signal_callback_return_param_t>; #[doc = "@brief AES ECB parameter typedefs"] pub type soc_ecb_key_t = [u8; 16usize]; pub type soc_ecb_cleartext_t = [u8; 16usize]; @@ -1698,9 +1635,7 @@ fn bindgen_test_layout_nrf_ecb_hal_data_block_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_cleartext as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_cleartext as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -1710,9 +1645,7 @@ fn bindgen_test_layout_nrf_ecb_hal_data_block_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_ciphertext as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_ciphertext as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -2556,10 +2489,7 @@ pub unsafe fn sd_ecb_block_encrypt(p_ecb_data: *mut nrf_ecb_hal_data_t) -> u32 { #[doc = ""] #[doc = " @retval ::NRF_SUCCESS"] #[inline(always)] -pub unsafe fn sd_ecb_blocks_encrypt( - block_count: u8, - p_data_blocks: *mut nrf_ecb_hal_data_block_t, -) -> u32 { +pub unsafe fn sd_ecb_blocks_encrypt(block_count: u8, p_data_blocks: *mut nrf_ecb_hal_data_block_t) -> u32 { let ret: u32; core::arch::asm!("svc 71", inout("r0") to_asm(block_count) => ret, @@ -2916,9 +2846,7 @@ fn bindgen_test_layout_nrf_clock_lf_cfg_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rc_temp_ctiv as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rc_temp_ctiv as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -2957,8 +2885,7 @@ fn bindgen_test_layout_nrf_clock_lf_cfg_t() { #[doc = ""] #[doc = " @note When id is set to @ref NRF_FAULT_ID_APP_MEMACC, pc will contain the address of the instruction being executed at the time when"] #[doc = " the fault is detected by the CPU. The CPU program counter may have advanced up to 2 instructions (no branching) after the one that triggered the fault."] -pub type nrf_fault_handler_t = - ::core::option::Option; +pub type nrf_fault_handler_t = ::core::option::Option; #[doc = "@brief Enables the SoftDevice and by extension the protocol stack."] #[doc = ""] @@ -3121,22 +3048,12 @@ fn bindgen_test_layout_ble_uuid_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).uuid as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_uuid_t), - "::", - stringify!(uuid) - ) + concat!("Offset of field: ", stringify!(ble_uuid_t), "::", stringify!(uuid)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).type_ as *const _ as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(ble_uuid_t), - "::", - stringify!(type_) - ) + concat!("Offset of field: ", stringify!(ble_uuid_t), "::", stringify!(type_)) ); } #[doc = "@brief Data structure."] @@ -3163,22 +3080,12 @@ fn bindgen_test_layout_ble_data_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).p_data as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_data_t), - "::", - stringify!(p_data) - ) + concat!("Offset of field: ", stringify!(ble_data_t), "::", stringify!(p_data)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).len as *const _ as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(ble_data_t), - "::", - stringify!(len) - ) + concat!("Offset of field: ", stringify!(ble_data_t), "::", stringify!(len)) ); } #[doc = " @brief BLE GATT connection configuration parameters, set with @ref sd_ble_cfg_set."] @@ -3325,8 +3232,7 @@ impl ble_gatt_char_props_t { indicate: u8, auth_signed_wr: u8, ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let broadcast: u8 = unsafe { ::core::mem::transmute(broadcast) }; broadcast as u64 @@ -3402,8 +3308,7 @@ impl ble_gatt_char_ext_props_t { } #[inline] pub fn new_bitfield_1(reliable_wr: u8, wr_aux: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let reliable_wr: u8 = unsafe { ::core::mem::transmute(reliable_wr) }; reliable_wr as u64 @@ -3596,9 +3501,7 @@ fn bindgen_test_layout_sd_mbr_command_copy_bl_t() { concat!("Alignment of ", stringify!(sd_mbr_command_copy_bl_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).bl_src as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).bl_src as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3608,9 +3511,7 @@ fn bindgen_test_layout_sd_mbr_command_copy_bl_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).bl_len as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).bl_len as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -3652,24 +3553,15 @@ fn bindgen_test_layout_sd_mbr_command_vector_table_base_set_t() { assert_eq!( ::core::mem::size_of::(), 4usize, - concat!( - "Size of: ", - stringify!(sd_mbr_command_vector_table_base_set_t) - ) + concat!("Size of: ", stringify!(sd_mbr_command_vector_table_base_set_t)) ); assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(sd_mbr_command_vector_table_base_set_t) - ) + concat!("Alignment of ", stringify!(sd_mbr_command_vector_table_base_set_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).address as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).address as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3696,24 +3588,15 @@ fn bindgen_test_layout_sd_mbr_command_irq_forward_address_set_t() { assert_eq!( ::core::mem::size_of::(), 4usize, - concat!( - "Size of: ", - stringify!(sd_mbr_command_irq_forward_address_set_t) - ) + concat!("Size of: ", stringify!(sd_mbr_command_irq_forward_address_set_t)) ); assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(sd_mbr_command_irq_forward_address_set_t) - ) + concat!("Alignment of ", stringify!(sd_mbr_command_irq_forward_address_set_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).address - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).address as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3764,9 +3647,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(sd_mbr_command_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).copy_sd as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).copy_sd as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3776,9 +3657,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).compare as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).compare as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3788,9 +3667,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).copy_bl as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).copy_bl as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3800,10 +3677,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).base_set as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).base_set as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -3814,8 +3688,7 @@ fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).irq_forward_address_set - as *const _ as usize + &(*(::core::ptr::null::())).irq_forward_address_set as *const _ as usize }, 0usize, concat!( @@ -4123,12 +3996,8 @@ impl ble_gap_adv_properties_t { } } #[inline] - pub fn new_bitfield_1( - anonymous: u8, - include_tx_power: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(anonymous: u8, include_tx_power: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let anonymous: u8 = unsafe { ::core::mem::transmute(anonymous) }; anonymous as u64 @@ -4248,8 +4117,7 @@ impl ble_gap_adv_report_type_t { status: u16, reserved: u16, ) -> __BindgenBitfieldUnit<[u8; 2usize], u16> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize], u16> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize], u16> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let connectable: u16 = unsafe { ::core::mem::transmute(connectable) }; connectable as u64 @@ -4303,9 +4171,7 @@ fn bindgen_test_layout_ble_gap_aux_pointer_t() { concat!("Alignment of ", stringify!(ble_gap_aux_pointer_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).aux_offset as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).aux_offset as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -4349,12 +4215,7 @@ fn bindgen_test_layout_ble_gap_addr_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).addr as *const _ as usize }, 1usize, - concat!( - "Offset of field: ", - stringify!(ble_gap_addr_t), - "::", - stringify!(addr) - ) + concat!("Offset of field: ", stringify!(ble_gap_addr_t), "::", stringify!(addr)) ); } impl ble_gap_addr_t { @@ -4381,12 +4242,8 @@ impl ble_gap_addr_t { } } #[inline] - pub fn new_bitfield_1( - addr_id_peer: u8, - addr_type: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(addr_id_peer: u8, addr_type: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let addr_id_peer: u8 = unsafe { ::core::mem::transmute(addr_id_peer) }; addr_id_peer as u64 @@ -4433,10 +4290,7 @@ fn bindgen_test_layout_ble_gap_conn_params_t() { concat!("Alignment of ", stringify!(ble_gap_conn_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).min_conn_interval as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).min_conn_interval as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -4446,10 +4300,7 @@ fn bindgen_test_layout_ble_gap_conn_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_conn_interval as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).max_conn_interval as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -4459,9 +4310,7 @@ fn bindgen_test_layout_ble_gap_conn_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).slave_latency as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).slave_latency as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -4471,9 +4320,7 @@ fn bindgen_test_layout_ble_gap_conn_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_sup_timeout as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_sup_timeout as *const _ as usize }, 6usize, concat!( "Offset of field: ", @@ -4535,8 +4382,7 @@ impl ble_gap_conn_sec_mode_t { } #[inline] pub fn new_bitfield_1(sm: u8, lv: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { let sm: u8 = unsafe { ::core::mem::transmute(sm) }; sm as u64 @@ -4580,9 +4426,7 @@ fn bindgen_test_layout_ble_gap_conn_sec_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).encr_key_size as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).encr_key_size as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -4614,12 +4458,7 @@ fn bindgen_test_layout_ble_gap_irk_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).irk as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_gap_irk_t), - "::", - stringify!(irk) - ) + concat!("Offset of field: ", stringify!(ble_gap_irk_t), "::", stringify!(irk)) ); } #[doc = "@brief Channel mask (40 bits)."] @@ -4707,9 +4546,7 @@ fn bindgen_test_layout_ble_gap_adv_params_t() { concat!("Alignment of ", stringify!(ble_gap_adv_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).properties as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).properties as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -4719,9 +4556,7 @@ fn bindgen_test_layout_ble_gap_adv_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_peer_addr as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_peer_addr as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -4751,9 +4586,7 @@ fn bindgen_test_layout_ble_gap_adv_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_adv_evts as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).max_adv_evts as *const _ as usize }, 14usize, concat!( "Offset of field: ", @@ -4763,9 +4596,7 @@ fn bindgen_test_layout_ble_gap_adv_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).channel_mask as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).channel_mask as *const _ as usize }, 15usize, concat!( "Offset of field: ", @@ -4775,9 +4606,7 @@ fn bindgen_test_layout_ble_gap_adv_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).filter_policy as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).filter_policy as *const _ as usize }, 20usize, concat!( "Offset of field: ", @@ -4787,9 +4616,7 @@ fn bindgen_test_layout_ble_gap_adv_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).primary_phy as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).primary_phy as *const _ as usize }, 21usize, concat!( "Offset of field: ", @@ -4799,9 +4626,7 @@ fn bindgen_test_layout_ble_gap_adv_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).secondary_phy as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).secondary_phy as *const _ as usize }, 22usize, concat!( "Offset of field: ", @@ -4835,19 +4660,14 @@ impl ble_gap_adv_params_t { } } #[inline] - pub fn new_bitfield_1( - set_id: u8, - scan_req_notification: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(set_id: u8, scan_req_notification: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { let set_id: u8 = unsafe { ::core::mem::transmute(set_id) }; set_id as u64 }); __bindgen_bitfield_unit.set(4usize, 1u8, { - let scan_req_notification: u8 = - unsafe { ::core::mem::transmute(scan_req_notification) }; + let scan_req_notification: u8 = unsafe { ::core::mem::transmute(scan_req_notification) }; scan_req_notification as u64 }); __bindgen_bitfield_unit @@ -4900,9 +4720,7 @@ fn bindgen_test_layout_ble_gap_adv_data_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).scan_rsp_data as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).scan_rsp_data as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -4964,9 +4782,7 @@ fn bindgen_test_layout_ble_gap_scan_params_t() { concat!("Alignment of ", stringify!(ble_gap_scan_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).scan_phys as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).scan_phys as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -5006,9 +4822,7 @@ fn bindgen_test_layout_ble_gap_scan_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).channel_mask as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).channel_mask as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -5070,15 +4884,13 @@ impl ble_gap_scan_params_t { active: u8, filter_policy: u8, ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let extended: u8 = unsafe { ::core::mem::transmute(extended) }; extended as u64 }); __bindgen_bitfield_unit.set(1usize, 1u8, { - let report_incomplete_evts: u8 = - unsafe { ::core::mem::transmute(report_incomplete_evts) }; + let report_incomplete_evts: u8 = unsafe { ::core::mem::transmute(report_incomplete_evts) }; report_incomplete_evts as u64 }); __bindgen_bitfield_unit.set(2usize, 1u8, { @@ -5135,9 +4947,7 @@ fn bindgen_test_layout_ble_gap_privacy_params_t() { concat!("Alignment of ", stringify!(ble_gap_privacy_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).privacy_mode as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).privacy_mode as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5147,10 +4957,7 @@ fn bindgen_test_layout_ble_gap_privacy_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).private_addr_type as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).private_addr_type as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -5160,10 +4967,7 @@ fn bindgen_test_layout_ble_gap_privacy_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).private_addr_cycle_s as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).private_addr_cycle_s as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -5173,9 +4977,7 @@ fn bindgen_test_layout_ble_gap_privacy_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_device_irk as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_device_irk as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -5298,14 +5100,8 @@ impl ble_gap_sec_kdist_t { } } #[inline] - pub fn new_bitfield_1( - enc: u8, - id: u8, - sign: u8, - link: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(enc: u8, id: u8, sign: u8, link: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let enc: u8 = unsafe { ::core::mem::transmute(enc) }; enc as u64 @@ -5352,9 +5148,7 @@ fn bindgen_test_layout_ble_gap_sec_params_t() { concat!("Alignment of ", stringify!(ble_gap_sec_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).min_key_size as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).min_key_size as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -5364,9 +5158,7 @@ fn bindgen_test_layout_ble_gap_sec_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_key_size as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).max_key_size as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -5386,9 +5178,7 @@ fn bindgen_test_layout_ble_gap_sec_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).kdist_peer as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).kdist_peer as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -5474,8 +5264,7 @@ impl ble_gap_sec_params_t { io_caps: u8, oob: u8, ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let bond: u8 = unsafe { ::core::mem::transmute(bond) }; bond as u64 @@ -5569,13 +5358,8 @@ impl ble_gap_enc_info_t { } } #[inline] - pub fn new_bitfield_1( - lesc: u8, - auth: u8, - ltk_len: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(lesc: u8, auth: u8, ltk_len: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let lesc: u8 = unsafe { ::core::mem::transmute(lesc) }; lesc as u64 @@ -5810,9 +5594,7 @@ fn bindgen_test_layout_ble_gap_evt_connected_t() { concat!("Alignment of ", stringify!(ble_gap_evt_connected_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).peer_addr as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).peer_addr as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5832,9 +5614,7 @@ fn bindgen_test_layout_ble_gap_evt_connected_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_params as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_params as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -5844,9 +5624,7 @@ fn bindgen_test_layout_ble_gap_evt_connected_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_handle as *const _ as usize }, 16usize, concat!( "Offset of field: ", @@ -5856,9 +5634,7 @@ fn bindgen_test_layout_ble_gap_evt_connected_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_data as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_data as *const _ as usize }, 20usize, concat!( "Offset of field: ", @@ -5888,9 +5664,7 @@ fn bindgen_test_layout_ble_gap_evt_disconnected_t() { concat!("Alignment of ", stringify!(ble_gap_evt_disconnected_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).reason as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).reason as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5920,10 +5694,7 @@ fn bindgen_test_layout_ble_gap_evt_conn_param_update_t() { concat!("Alignment of ", stringify!(ble_gap_evt_conn_param_update_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_params as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_params as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -5950,15 +5721,11 @@ fn bindgen_test_layout_ble_gap_evt_phy_update_request_t() { assert_eq!( ::core::mem::align_of::(), 1usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_phy_update_request_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_phy_update_request_t)) ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).peer_preferred_phys - as *const _ as usize + &(*(::core::ptr::null::())).peer_preferred_phys as *const _ as usize }, 0usize, concat!( @@ -5993,9 +5760,7 @@ fn bindgen_test_layout_ble_gap_evt_phy_update_t() { concat!("Alignment of ", stringify!(ble_gap_evt_phy_update_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).status as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).status as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6005,9 +5770,7 @@ fn bindgen_test_layout_ble_gap_evt_phy_update_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).tx_phy as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).tx_phy as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -6017,9 +5780,7 @@ fn bindgen_test_layout_ble_gap_evt_phy_update_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rx_phy as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rx_phy as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -6046,16 +5807,10 @@ fn bindgen_test_layout_ble_gap_evt_sec_params_request_t() { assert_eq!( ::core::mem::align_of::(), 1usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_sec_params_request_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_sec_params_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).peer_params as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).peer_params as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6089,10 +5844,7 @@ fn bindgen_test_layout_ble_gap_evt_sec_info_request_t() { concat!("Alignment of ", stringify!(ble_gap_evt_sec_info_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).peer_addr as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).peer_addr as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6102,10 +5854,7 @@ fn bindgen_test_layout_ble_gap_evt_sec_info_request_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).master_id as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).master_id as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -6150,13 +5899,8 @@ impl ble_gap_evt_sec_info_request_t { } } #[inline] - pub fn new_bitfield_1( - enc_info: u8, - id_info: u8, - sign_info: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(enc_info: u8, id_info: u8, sign_info: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let enc_info: u8 = unsafe { ::core::mem::transmute(enc_info) }; enc_info as u64 @@ -6193,9 +5937,7 @@ fn bindgen_test_layout_ble_gap_evt_passkey_display_t() { concat!("Alignment of ", stringify!(ble_gap_evt_passkey_display_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).passkey as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).passkey as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6219,8 +5961,7 @@ impl ble_gap_evt_passkey_display_t { } #[inline] pub fn new_bitfield_1(match_request: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let match_request: u8 = unsafe { ::core::mem::transmute(match_request) }; match_request as u64 @@ -6248,9 +5989,7 @@ fn bindgen_test_layout_ble_gap_evt_key_pressed_t() { concat!("Alignment of ", stringify!(ble_gap_evt_key_pressed_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).kp_not as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).kp_not as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6280,10 +6019,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_key_request_t() { concat!("Alignment of ", stringify!(ble_gap_evt_auth_key_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).key_type as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).key_type as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6313,16 +6049,10 @@ fn bindgen_test_layout_ble_gap_evt_lesc_dhkey_request_t() { assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_lesc_dhkey_request_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_lesc_dhkey_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_pk_peer as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).p_pk_peer as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6346,8 +6076,7 @@ impl ble_gap_evt_lesc_dhkey_request_t { } #[inline] pub fn new_bitfield_1(oobd_req: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let oobd_req: u8 = unsafe { ::core::mem::transmute(oobd_req) }; oobd_req as u64 @@ -6421,14 +6150,8 @@ impl ble_gap_sec_levels_t { } } #[inline] - pub fn new_bitfield_1( - lv1: u8, - lv2: u8, - lv3: u8, - lv4: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(lv1: u8, lv2: u8, lv3: u8, lv4: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let lv1: u8 = unsafe { ::core::mem::transmute(lv1) }; lv1 as u64 @@ -6667,10 +6390,7 @@ fn bindgen_test_layout_ble_gap_data_length_params_t() { concat!("Alignment of ", stringify!(ble_gap_data_length_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_tx_octets as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).max_tx_octets as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6680,10 +6400,7 @@ fn bindgen_test_layout_ble_gap_data_length_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_rx_octets as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).max_rx_octets as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -6693,10 +6410,7 @@ fn bindgen_test_layout_ble_gap_data_length_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_tx_time_us as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).max_tx_time_us as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -6706,10 +6420,7 @@ fn bindgen_test_layout_ble_gap_data_length_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_rx_time_us as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).max_rx_time_us as *const _ as usize }, 6usize, concat!( "Offset of field: ", @@ -6740,15 +6451,11 @@ fn bindgen_test_layout_ble_gap_data_length_limitation_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gap_data_length_limitation_t) - ) + concat!("Alignment of ", stringify!(ble_gap_data_length_limitation_t)) ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).tx_payload_limited_octets - as *const _ as usize + &(*(::core::ptr::null::())).tx_payload_limited_octets as *const _ as usize }, 0usize, concat!( @@ -6760,8 +6467,7 @@ fn bindgen_test_layout_ble_gap_data_length_limitation_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).rx_payload_limited_octets - as *const _ as usize + &(*(::core::ptr::null::())).rx_payload_limited_octets as *const _ as usize }, 2usize, concat!( @@ -6773,8 +6479,7 @@ fn bindgen_test_layout_ble_gap_data_length_limitation_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).tx_rx_time_limited_us - as *const _ as usize + &(*(::core::ptr::null::())).tx_rx_time_limited_us as *const _ as usize }, 4usize, concat!( @@ -6814,9 +6519,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_status_t() { concat!("Alignment of ", stringify!(ble_gap_evt_auth_status_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).auth_status as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).auth_status as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6826,9 +6529,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_status_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sm1_levels as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).sm1_levels as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -6838,9 +6539,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_status_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sm2_levels as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).sm2_levels as *const _ as usize }, 3usize, concat!( "Offset of field: ", @@ -6850,9 +6549,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_status_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).kdist_own as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).kdist_own as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -6862,9 +6559,7 @@ fn bindgen_test_layout_ble_gap_evt_auth_status_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).kdist_peer as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).kdist_peer as *const _ as usize }, 5usize, concat!( "Offset of field: ", @@ -6909,13 +6604,8 @@ impl ble_gap_evt_auth_status_t { } } #[inline] - pub fn new_bitfield_1( - error_src: u8, - bonded: u8, - lesc: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(error_src: u8, bonded: u8, lesc: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 2u8, { let error_src: u8 = unsafe { ::core::mem::transmute(error_src) }; error_src as u64 @@ -6951,9 +6641,7 @@ fn bindgen_test_layout_ble_gap_evt_conn_sec_update_t() { concat!("Alignment of ", stringify!(ble_gap_evt_conn_sec_update_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_sec as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_sec as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -6990,15 +6678,11 @@ fn bindgen_test_layout_ble_gap_evt_timeout_t__bindgen_ty_1() { assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_timeout_t__bindgen_ty_1) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_timeout_t__bindgen_ty_1)) ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).adv_report_buffer - as *const _ as usize + &(*(::core::ptr::null::())).adv_report_buffer as *const _ as usize }, 0usize, concat!( @@ -7065,9 +6749,7 @@ fn bindgen_test_layout_ble_gap_evt_rssi_changed_t() { concat!("Alignment of ", stringify!(ble_gap_evt_rssi_changed_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rssi as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rssi as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7077,9 +6759,7 @@ fn bindgen_test_layout_ble_gap_evt_rssi_changed_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ch_index as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).ch_index as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -7116,16 +6796,10 @@ fn bindgen_test_layout_ble_gap_evt_adv_set_terminated_t() { assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_adv_set_terminated_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_adv_set_terminated_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).reason as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).reason as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7135,10 +6809,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_set_terminated_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_handle as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_handle as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -7149,8 +6820,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_set_terminated_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).num_completed_adv_events - as *const _ as usize + &(*(::core::ptr::null::())).num_completed_adv_events as *const _ as usize }, 2usize, concat!( @@ -7161,10 +6831,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_set_terminated_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_data as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_data as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -7254,9 +6921,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).peer_addr as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).peer_addr as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -7266,9 +6931,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).direct_addr as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).direct_addr as *const _ as usize }, 9usize, concat!( "Offset of field: ", @@ -7278,9 +6941,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).primary_phy as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).primary_phy as *const _ as usize }, 16usize, concat!( "Offset of field: ", @@ -7290,9 +6951,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).secondary_phy as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).secondary_phy as *const _ as usize }, 17usize, concat!( "Offset of field: ", @@ -7302,9 +6961,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).tx_power as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).tx_power as *const _ as usize }, 18usize, concat!( "Offset of field: ", @@ -7324,9 +6981,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ch_index as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).ch_index as *const _ as usize }, 20usize, concat!( "Offset of field: ", @@ -7336,9 +6991,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).set_id as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).set_id as *const _ as usize }, 21usize, concat!( "Offset of field: ", @@ -7358,9 +7011,7 @@ fn bindgen_test_layout_ble_gap_evt_adv_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).aux_pointer as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).aux_pointer as *const _ as usize }, 32usize, concat!( "Offset of field: ", @@ -7384,8 +7035,7 @@ impl ble_gap_evt_adv_report_t { } #[inline] pub fn new_bitfield_1(data_id: u16) -> __BindgenBitfieldUnit<[u8; 2usize], u16> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize], u16> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize], u16> = Default::default(); __bindgen_bitfield_unit.set(0usize, 12u8, { let data_id: u16 = unsafe { ::core::mem::transmute(data_id) }; data_id as u64 @@ -7458,14 +7108,8 @@ impl ble_gap_evt_sec_request_t { } } #[inline] - pub fn new_bitfield_1( - bond: u8, - mitm: u8, - lesc: u8, - keypress: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(bond: u8, mitm: u8, lesc: u8, keypress: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let bond: u8 = unsafe { ::core::mem::transmute(bond) }; bond as u64 @@ -7497,23 +7141,16 @@ fn bindgen_test_layout_ble_gap_evt_conn_param_update_request_t() { assert_eq!( ::core::mem::size_of::(), 8usize, - concat!( - "Size of: ", - stringify!(ble_gap_evt_conn_param_update_request_t) - ) + concat!("Size of: ", stringify!(ble_gap_evt_conn_param_update_request_t)) ); assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_conn_param_update_request_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_conn_param_update_request_t)) ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).conn_params - as *const _ as usize + &(*(::core::ptr::null::())).conn_params as *const _ as usize }, 0usize, concat!( @@ -7550,10 +7187,7 @@ fn bindgen_test_layout_ble_gap_evt_scan_req_report_t() { concat!("Alignment of ", stringify!(ble_gap_evt_scan_req_report_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_handle as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7563,9 +7197,7 @@ fn bindgen_test_layout_ble_gap_evt_scan_req_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rssi as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rssi as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -7575,10 +7207,7 @@ fn bindgen_test_layout_ble_gap_evt_scan_req_report_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).peer_addr as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).peer_addr as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -7600,23 +7229,16 @@ fn bindgen_test_layout_ble_gap_evt_data_length_update_request_t() { assert_eq!( ::core::mem::size_of::(), 8usize, - concat!( - "Size of: ", - stringify!(ble_gap_evt_data_length_update_request_t) - ) + concat!("Size of: ", stringify!(ble_gap_evt_data_length_update_request_t)) ); assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_data_length_update_request_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_data_length_update_request_t)) ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).peer_params - as *const _ as usize + &(*(::core::ptr::null::())).peer_params as *const _ as usize }, 0usize, concat!( @@ -7646,16 +7268,10 @@ fn bindgen_test_layout_ble_gap_evt_data_length_update_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_data_length_update_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_data_length_update_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).effective_params - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).effective_params as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7680,23 +7296,16 @@ fn bindgen_test_layout_ble_gap_evt_qos_channel_survey_report_t() { assert_eq!( ::core::mem::size_of::(), 40usize, - concat!( - "Size of: ", - stringify!(ble_gap_evt_qos_channel_survey_report_t) - ) + concat!("Size of: ", stringify!(ble_gap_evt_qos_channel_survey_report_t)) ); assert_eq!( ::core::mem::align_of::(), 1usize, - concat!( - "Alignment of ", - stringify!(ble_gap_evt_qos_channel_survey_report_t) - ) + concat!("Alignment of ", stringify!(ble_gap_evt_qos_channel_survey_report_t)) ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).channel_energy - as *const _ as usize + &(*(::core::ptr::null::())).channel_energy as *const _ as usize }, 0usize, concat!( @@ -7780,9 +7389,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_gap_evt_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).connected as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).connected as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7792,10 +7399,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).disconnected as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).disconnected as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7805,10 +7409,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_param_update as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_param_update as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7818,10 +7419,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sec_params_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).sec_params_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7831,10 +7429,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sec_info_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).sec_info_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7844,10 +7439,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).passkey_display as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).passkey_display as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7857,10 +7449,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).key_pressed as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).key_pressed as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7870,10 +7459,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).auth_key_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).auth_key_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7883,10 +7469,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).lesc_dhkey_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).lesc_dhkey_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7896,10 +7479,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).auth_status as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).auth_status as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7909,10 +7489,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_sec_update as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_sec_update as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7922,9 +7499,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).timeout as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).timeout as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7934,10 +7509,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rssi_changed as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).rssi_changed as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7947,9 +7519,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_report as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_report as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7959,10 +7529,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_set_terminated as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_set_terminated as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7972,10 +7539,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sec_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).sec_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -7986,8 +7550,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).conn_param_update_request - as *const _ as usize + &(*(::core::ptr::null::())).conn_param_update_request as *const _ as usize }, 0usize, concat!( @@ -7998,10 +7561,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).scan_req_report as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).scan_req_report as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8011,10 +7571,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).phy_update_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).phy_update_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8024,9 +7581,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).phy_update as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).phy_update as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8037,8 +7592,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).data_length_update_request - as *const _ as usize + &(*(::core::ptr::null::())).data_length_update_request as *const _ as usize }, 0usize, concat!( @@ -8049,10 +7603,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).data_length_update as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).data_length_update as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8063,8 +7614,7 @@ fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).qos_channel_survey_report - as *const _ as usize + &(*(::core::ptr::null::())).qos_channel_survey_report as *const _ as usize }, 0usize, concat!( @@ -8100,12 +7650,7 @@ fn bindgen_test_layout_ble_gap_evt_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).params as *const _ as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(ble_gap_evt_t), - "::", - stringify!(params) - ) + concat!("Offset of field: ", stringify!(ble_gap_evt_t), "::", stringify!(params)) ); } #[doc = " @brief BLE GAP connection configuration parameters, set with @ref sd_ble_cfg_set."] @@ -8150,9 +7695,7 @@ fn bindgen_test_layout_ble_gap_conn_cfg_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).event_length as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).event_length as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -8198,9 +7741,7 @@ fn bindgen_test_layout_ble_gap_cfg_role_count_t() { concat!("Alignment of ", stringify!(ble_gap_cfg_role_count_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).adv_set_count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).adv_set_count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8210,10 +7751,7 @@ fn bindgen_test_layout_ble_gap_cfg_role_count_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).periph_role_count as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).periph_role_count as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -8223,10 +7761,7 @@ fn bindgen_test_layout_ble_gap_cfg_role_count_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).central_role_count as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).central_role_count as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -8236,10 +7771,7 @@ fn bindgen_test_layout_ble_gap_cfg_role_count_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).central_sec_count as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).central_sec_count as *const _ as usize }, 3usize, concat!( "Offset of field: ", @@ -8262,11 +7794,8 @@ impl ble_gap_cfg_role_count_t { } } #[inline] - pub fn new_bitfield_1( - qos_channel_survey_role_available: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(qos_channel_survey_role_available: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let qos_channel_survey_role_available: u8 = unsafe { ::core::mem::transmute(qos_channel_survey_role_available) }; @@ -8327,9 +7856,7 @@ fn bindgen_test_layout_ble_gap_cfg_device_name_t() { concat!("Alignment of ", stringify!(ble_gap_cfg_device_name_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write_perm as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).write_perm as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8339,9 +7866,7 @@ fn bindgen_test_layout_ble_gap_cfg_device_name_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_value as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_value as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -8351,9 +7876,7 @@ fn bindgen_test_layout_ble_gap_cfg_device_name_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).current_len as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).current_len as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -8363,9 +7886,7 @@ fn bindgen_test_layout_ble_gap_cfg_device_name_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).max_len as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).max_len as *const _ as usize }, 10usize, concat!( "Offset of field: ", @@ -8389,8 +7910,7 @@ impl ble_gap_cfg_device_name_t { } #[inline] pub fn new_bitfield_1(vloc: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 2u8, { let vloc: u8 = unsafe { ::core::mem::transmute(vloc) }; vloc as u64 @@ -8419,10 +7939,7 @@ fn bindgen_test_layout_ble_gap_cfg_ppcp_incl_cfg_t() { concat!("Alignment of ", stringify!(ble_gap_cfg_ppcp_incl_cfg_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).include_cfg as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).include_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8453,9 +7970,7 @@ fn bindgen_test_layout_ble_gap_cfg_car_incl_cfg_t() { concat!("Alignment of ", stringify!(ble_gap_cfg_car_incl_cfg_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).include_cfg as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).include_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8577,9 +8092,7 @@ fn bindgen_test_layout_ble_gap_opt_ch_map_t() { concat!("Alignment of ", stringify!(ble_gap_opt_ch_map_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8640,16 +8153,10 @@ fn bindgen_test_layout_ble_gap_opt_local_conn_latency_t() { assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(ble_gap_opt_local_conn_latency_t) - ) + concat!("Alignment of ", stringify!(ble_gap_opt_local_conn_latency_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_handle as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8659,10 +8166,7 @@ fn bindgen_test_layout_ble_gap_opt_local_conn_latency_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).requested_latency - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).requested_latency as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -8672,10 +8176,7 @@ fn bindgen_test_layout_ble_gap_opt_local_conn_latency_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_actual_latency - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_actual_latency as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -8714,16 +8215,10 @@ fn bindgen_test_layout_ble_gap_opt_slave_latency_disable_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gap_opt_slave_latency_disable_t) - ) + concat!("Alignment of ", stringify!(ble_gap_opt_slave_latency_disable_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_handle as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8747,8 +8242,7 @@ impl ble_gap_opt_slave_latency_disable_t { } #[inline] pub fn new_bitfield_1(disable: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let disable: u8 = unsafe { ::core::mem::transmute(disable) }; disable as u64 @@ -8789,9 +8283,7 @@ fn bindgen_test_layout_ble_gap_opt_passkey_t() { concat!("Alignment of ", stringify!(ble_gap_opt_passkey_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_passkey as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_passkey as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8847,8 +8339,7 @@ impl ble_gap_opt_compat_mode_1_t { } #[inline] pub fn new_bitfield_1(enable: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let enable: u8 = unsafe { ::core::mem::transmute(enable) }; enable as u64 @@ -8892,16 +8383,10 @@ fn bindgen_test_layout_ble_gap_opt_auth_payload_timeout_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gap_opt_auth_payload_timeout_t) - ) + concat!("Alignment of ", stringify!(ble_gap_opt_auth_payload_timeout_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).conn_handle as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).conn_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8912,8 +8397,7 @@ fn bindgen_test_layout_ble_gap_opt_auth_payload_timeout_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).auth_payload_timeout - as *const _ as usize + &(*(::core::ptr::null::())).auth_payload_timeout as *const _ as usize }, 2usize, concat!( @@ -8957,17 +8441,10 @@ fn bindgen_test_layout_ble_gap_opt_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).ch_map as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_gap_opt_t), - "::", - stringify!(ch_map) - ) + concat!("Offset of field: ", stringify!(ble_gap_opt_t), "::", stringify!(ch_map)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).local_conn_latency as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).local_conn_latency as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -8997,9 +8474,7 @@ fn bindgen_test_layout_ble_gap_opt_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).auth_payload_timeout as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).auth_payload_timeout as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -9009,9 +8484,7 @@ fn bindgen_test_layout_ble_gap_opt_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).slave_latency_disable as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).slave_latency_disable as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -9053,9 +8526,7 @@ fn bindgen_test_layout_ble_gap_conn_event_trigger_t() { concat!("Alignment of ", stringify!(ble_gap_conn_event_trigger_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ppi_ch_id as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).ppi_ch_id as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -9065,10 +8536,7 @@ fn bindgen_test_layout_ble_gap_conn_event_trigger_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).task_endpoint as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).task_endpoint as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -9079,8 +8547,7 @@ fn bindgen_test_layout_ble_gap_conn_event_trigger_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).conn_evt_counter_start - as *const _ as usize + &(*(::core::ptr::null::())).conn_evt_counter_start as *const _ as usize }, 8usize, concat!( @@ -9091,10 +8558,7 @@ fn bindgen_test_layout_ble_gap_conn_event_trigger_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).period_in_events as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).period_in_events as *const _ as usize }, 10usize, concat!( "Offset of field: ", @@ -9508,10 +8972,7 @@ pub unsafe fn sd_ble_gap_adv_stop(adv_handle: u8) -> u32 { #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."] #[doc = " @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation."] #[inline(always)] -pub unsafe fn sd_ble_gap_conn_param_update( - conn_handle: u16, - p_conn_params: *const ble_gap_conn_params_t, -) -> u32 { +pub unsafe fn sd_ble_gap_conn_param_update(conn_handle: u16, p_conn_params: *const ble_gap_conn_params_t) -> u32 { let ret: u32; core::arch::asm!("svc 117", inout("r0") to_asm(conn_handle) => ret, @@ -9781,10 +9242,7 @@ pub unsafe fn sd_ble_gap_device_name_get(p_dev_name: *mut u8, p_len: *mut u16) - #[doc = " See @ref ble_gap_cfg_car_incl_cfg_t and @ref ble_gap_cfg_role_count_t."] #[doc = " @retval ::NRF_ERROR_TIMEOUT A SMP timeout has occurred, and further SMP operations on this link is prohibited."] #[inline(always)] -pub unsafe fn sd_ble_gap_authenticate( - conn_handle: u16, - p_sec_params: *const ble_gap_sec_params_t, -) -> u32 { +pub unsafe fn sd_ble_gap_authenticate(conn_handle: u16, p_sec_params: *const ble_gap_sec_params_t) -> u32 { let ret: u32; core::arch::asm!("svc 126", inout("r0") to_asm(conn_handle) => ret, @@ -9949,10 +9407,7 @@ pub unsafe fn sd_ble_gap_auth_key_reply(conn_handle: u16, key_type: u8, p_key: * #[doc = " - The application has not pulled a @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST event."] #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."] #[inline(always)] -pub unsafe fn sd_ble_gap_lesc_dhkey_reply( - conn_handle: u16, - p_dhkey: *const ble_gap_lesc_dhkey_t, -) -> u32 { +pub unsafe fn sd_ble_gap_lesc_dhkey_reply(conn_handle: u16, p_dhkey: *const ble_gap_lesc_dhkey_t) -> u32 { let ret: u32; core::arch::asm!("svc 129", inout("r0") to_asm(conn_handle) => ret, @@ -10166,10 +9621,7 @@ pub unsafe fn sd_ble_gap_sec_info_reply( #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."] #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."] #[inline(always)] -pub unsafe fn sd_ble_gap_conn_sec_get( - conn_handle: u16, - p_conn_sec: *mut ble_gap_conn_sec_t, -) -> u32 { +pub unsafe fn sd_ble_gap_conn_sec_get(conn_handle: u16, p_conn_sec: *mut ble_gap_conn_sec_t) -> u32 { let ret: u32; core::arch::asm!("svc 135", inout("r0") to_asm(conn_handle) => ret, @@ -10816,9 +10268,7 @@ fn bindgen_test_layout_ble_l2cap_conn_cfg_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rx_queue_size as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rx_queue_size as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -10828,9 +10278,7 @@ fn bindgen_test_layout_ble_l2cap_conn_cfg_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).tx_queue_size as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).tx_queue_size as *const _ as usize }, 5usize, concat!( "Offset of field: ", @@ -10883,9 +10331,7 @@ fn bindgen_test_layout_ble_l2cap_ch_rx_params_t() { concat!("Alignment of ", stringify!(ble_l2cap_ch_rx_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rx_mtu as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rx_mtu as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10895,9 +10341,7 @@ fn bindgen_test_layout_ble_l2cap_ch_rx_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rx_mps as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rx_mps as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -10907,9 +10351,7 @@ fn bindgen_test_layout_ble_l2cap_ch_rx_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sdu_buf as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).sdu_buf as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -10946,9 +10388,7 @@ fn bindgen_test_layout_ble_l2cap_ch_setup_params_t() { concat!("Alignment of ", stringify!(ble_l2cap_ch_setup_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rx_params as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rx_params as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -10958,9 +10398,7 @@ fn bindgen_test_layout_ble_l2cap_ch_setup_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).le_psm as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).le_psm as *const _ as usize }, 12usize, concat!( "Offset of field: ", @@ -10970,9 +10408,7 @@ fn bindgen_test_layout_ble_l2cap_ch_setup_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).status as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).status as *const _ as usize }, 14usize, concat!( "Offset of field: ", @@ -11013,9 +10449,7 @@ fn bindgen_test_layout_ble_l2cap_ch_tx_params_t() { concat!("Alignment of ", stringify!(ble_l2cap_ch_tx_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).tx_mtu as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).tx_mtu as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11025,9 +10459,7 @@ fn bindgen_test_layout_ble_l2cap_ch_tx_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).peer_mps as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).peer_mps as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -11037,9 +10469,7 @@ fn bindgen_test_layout_ble_l2cap_ch_tx_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).tx_mps as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).tx_mps as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -11049,9 +10479,7 @@ fn bindgen_test_layout_ble_l2cap_ch_tx_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).credits as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).credits as *const _ as usize }, 6usize, concat!( "Offset of field: ", @@ -11080,16 +10508,10 @@ fn bindgen_test_layout_ble_l2cap_evt_ch_setup_request_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_l2cap_evt_ch_setup_request_t) - ) + concat!("Alignment of ", stringify!(ble_l2cap_evt_ch_setup_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).tx_params as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).tx_params as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11099,10 +10521,7 @@ fn bindgen_test_layout_ble_l2cap_evt_ch_setup_request_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).le_psm as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).le_psm as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -11131,16 +10550,10 @@ fn bindgen_test_layout_ble_l2cap_evt_ch_setup_refused_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_l2cap_evt_ch_setup_refused_t) - ) + concat!("Alignment of ", stringify!(ble_l2cap_evt_ch_setup_refused_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).source as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).source as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11150,10 +10563,7 @@ fn bindgen_test_layout_ble_l2cap_evt_ch_setup_refused_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).status as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).status as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -11183,9 +10593,7 @@ fn bindgen_test_layout_ble_l2cap_evt_ch_setup_t() { concat!("Alignment of ", stringify!(ble_l2cap_evt_ch_setup_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).tx_params as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).tx_params as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11215,16 +10623,10 @@ fn bindgen_test_layout_ble_l2cap_evt_ch_sdu_buf_released_t() { assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(ble_l2cap_evt_ch_sdu_buf_released_t) - ) + concat!("Alignment of ", stringify!(ble_l2cap_evt_ch_sdu_buf_released_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sdu_buf as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).sdu_buf as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11254,9 +10656,7 @@ fn bindgen_test_layout_ble_l2cap_evt_ch_credit_t() { concat!("Alignment of ", stringify!(ble_l2cap_evt_ch_credit_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).credits as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).credits as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11385,10 +10785,7 @@ fn bindgen_test_layout_ble_l2cap_evt_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_l2cap_evt_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ch_setup_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).ch_setup_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11398,10 +10795,7 @@ fn bindgen_test_layout_ble_l2cap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ch_setup_refused as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).ch_setup_refused as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11411,9 +10805,7 @@ fn bindgen_test_layout_ble_l2cap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ch_setup as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).ch_setup as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11423,10 +10815,7 @@ fn bindgen_test_layout_ble_l2cap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ch_sdu_buf_released - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).ch_sdu_buf_released as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11436,9 +10825,7 @@ fn bindgen_test_layout_ble_l2cap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).credit as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).credit as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11448,9 +10835,7 @@ fn bindgen_test_layout_ble_l2cap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rx as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).rx as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11460,9 +10845,7 @@ fn bindgen_test_layout_ble_l2cap_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).tx as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).tx as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11637,11 +11020,7 @@ pub unsafe fn sd_ble_l2cap_ch_release(conn_handle: u16, local_cid: u16) -> u32 { #[doc = " @retval ::NRF_ERROR_RESOURCES Too many SDU data buffers supplied. Wait for a"] #[doc = " @ref BLE_L2CAP_EVT_CH_RX event and retry."] #[inline(always)] -pub unsafe fn sd_ble_l2cap_ch_rx( - conn_handle: u16, - local_cid: u16, - p_sdu_buf: *const ble_data_t, -) -> u32 { +pub unsafe fn sd_ble_l2cap_ch_rx(conn_handle: u16, local_cid: u16, p_sdu_buf: *const ble_data_t) -> u32 { let ret: u32; core::arch::asm!("svc 186", inout("r0") to_asm(conn_handle) => ret, @@ -11696,11 +11075,7 @@ pub unsafe fn sd_ble_l2cap_ch_rx( #[doc = " @retval ::NRF_ERROR_RESOURCES Too many SDUs queued for transmission. Wait for a"] #[doc = " @ref BLE_L2CAP_EVT_CH_TX event and retry."] #[inline(always)] -pub unsafe fn sd_ble_l2cap_ch_tx( - conn_handle: u16, - local_cid: u16, - p_sdu_buf: *const ble_data_t, -) -> u32 { +pub unsafe fn sd_ble_l2cap_ch_tx(conn_handle: u16, local_cid: u16, p_sdu_buf: *const ble_data_t) -> u32 { let ret: u32; core::arch::asm!("svc 187", inout("r0") to_asm(conn_handle) => ret, @@ -11754,12 +11129,7 @@ pub unsafe fn sd_ble_l2cap_ch_tx( #[doc = " in progress for an L2CAP channel)."] #[doc = " @retval ::NRF_ERROR_NOT_FOUND CID not found."] #[inline(always)] -pub unsafe fn sd_ble_l2cap_ch_flow_control( - conn_handle: u16, - local_cid: u16, - credits: u16, - p_credits: *mut u16, -) -> u32 { +pub unsafe fn sd_ble_l2cap_ch_flow_control(conn_handle: u16, local_cid: u16, credits: u16, p_credits: *mut u16) -> u32 { let ret: u32; core::arch::asm!("svc 188", inout("r0") to_asm(conn_handle) => ret, @@ -11844,10 +11214,7 @@ fn bindgen_test_layout_ble_gattc_conn_cfg_t() { concat!("Alignment of ", stringify!(ble_gattc_conn_cfg_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write_cmd_tx_queue_size as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).write_cmd_tx_queue_size as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11879,9 +11246,7 @@ fn bindgen_test_layout_ble_gattc_handle_range_t() { concat!("Alignment of ", stringify!(ble_gattc_handle_range_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).start_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).start_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -11891,9 +11256,7 @@ fn bindgen_test_layout_ble_gattc_handle_range_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).end_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).end_handle as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -11935,9 +11298,7 @@ fn bindgen_test_layout_ble_gattc_service_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle_range as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle_range as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -11979,9 +11340,7 @@ fn bindgen_test_layout_ble_gattc_include_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).included_srvc as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).included_srvc as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -12072,8 +11431,7 @@ impl ble_gattc_char_t { } #[inline] pub fn new_bitfield_1(char_ext_props: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let char_ext_props: u8 = unsafe { ::core::mem::transmute(char_ext_props) }; char_ext_props as u64 @@ -12153,9 +11511,7 @@ fn bindgen_test_layout_ble_gattc_write_params_t() { concat!("Alignment of ", stringify!(ble_gattc_write_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write_op as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).write_op as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12175,9 +11531,7 @@ fn bindgen_test_layout_ble_gattc_write_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -12187,9 +11541,7 @@ fn bindgen_test_layout_ble_gattc_write_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).offset as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).offset as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -12209,9 +11561,7 @@ fn bindgen_test_layout_ble_gattc_write_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_value as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_value as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -12285,9 +11635,7 @@ fn bindgen_test_layout_ble_gattc_attr_info128_t() { concat!("Alignment of ", stringify!(ble_gattc_attr_info128_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12327,16 +11675,10 @@ fn bindgen_test_layout_ble_gattc_evt_prim_srvc_disc_rsp_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_prim_srvc_disc_rsp_t) - ) + concat!("Alignment of ", stringify!(ble_gattc_evt_prim_srvc_disc_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12346,10 +11688,7 @@ fn bindgen_test_layout_ble_gattc_evt_prim_srvc_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).services as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).services as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -12382,9 +11721,7 @@ fn bindgen_test_layout_ble_gattc_evt_rel_disc_rsp_t() { concat!("Alignment of ", stringify!(ble_gattc_evt_rel_disc_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12394,9 +11731,7 @@ fn bindgen_test_layout_ble_gattc_evt_rel_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).includes as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).includes as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -12429,9 +11764,7 @@ fn bindgen_test_layout_ble_gattc_evt_char_disc_rsp_t() { concat!("Alignment of ", stringify!(ble_gattc_evt_char_disc_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12441,9 +11774,7 @@ fn bindgen_test_layout_ble_gattc_evt_char_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).chars as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).chars as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -12476,9 +11807,7 @@ fn bindgen_test_layout_ble_gattc_evt_desc_disc_rsp_t() { concat!("Alignment of ", stringify!(ble_gattc_evt_desc_disc_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12488,9 +11817,7 @@ fn bindgen_test_layout_ble_gattc_evt_desc_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).descs as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).descs as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -12542,8 +11869,8 @@ fn bindgen_test_layout_ble_gattc_evt_attr_info_disc_rsp_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())) - .attr_info16 as *const _ as usize + &(*(::core::ptr::null::())).attr_info16 as *const _ + as usize }, 0usize, concat!( @@ -12555,8 +11882,8 @@ fn bindgen_test_layout_ble_gattc_evt_attr_info_disc_rsp_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())) - .attr_info128 as *const _ as usize + &(*(::core::ptr::null::())).attr_info128 as *const _ + as usize }, 0usize, concat!( @@ -12577,16 +11904,10 @@ fn bindgen_test_layout_ble_gattc_evt_attr_info_disc_rsp_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_attr_info_disc_rsp_t) - ) + concat!("Alignment of ", stringify!(ble_gattc_evt_attr_info_disc_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12596,10 +11917,7 @@ fn bindgen_test_layout_ble_gattc_evt_attr_info_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).format as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).format as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -12609,10 +11927,7 @@ fn bindgen_test_layout_ble_gattc_evt_attr_info_disc_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).info as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).info as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -12644,9 +11959,7 @@ fn bindgen_test_layout_ble_gattc_handle_value_t() { concat!("Alignment of ", stringify!(ble_gattc_handle_value_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12656,9 +11969,7 @@ fn bindgen_test_layout_ble_gattc_handle_value_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_value as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_value as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -12686,24 +11997,15 @@ fn bindgen_test_layout_ble_gattc_evt_char_val_by_uuid_read_rsp_t() { assert_eq!( ::core::mem::size_of::(), 4usize, - concat!( - "Size of: ", - stringify!(ble_gattc_evt_char_val_by_uuid_read_rsp_t) - ) + concat!("Size of: ", stringify!(ble_gattc_evt_char_val_by_uuid_read_rsp_t)) ); assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_char_val_by_uuid_read_rsp_t) - ) + concat!("Alignment of ", stringify!(ble_gattc_evt_char_val_by_uuid_read_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12714,8 +12016,7 @@ fn bindgen_test_layout_ble_gattc_evt_char_val_by_uuid_read_rsp_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).value_len - as *const _ as usize + &(*(::core::ptr::null::())).value_len as *const _ as usize }, 2usize, concat!( @@ -12727,8 +12028,7 @@ fn bindgen_test_layout_ble_gattc_evt_char_val_by_uuid_read_rsp_t() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).handle_value - as *const _ as usize + &(*(::core::ptr::null::())).handle_value as *const _ as usize }, 4usize, concat!( @@ -12766,9 +12066,7 @@ fn bindgen_test_layout_ble_gattc_evt_read_rsp_t() { concat!("Alignment of ", stringify!(ble_gattc_evt_read_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12778,9 +12076,7 @@ fn bindgen_test_layout_ble_gattc_evt_read_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).offset as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).offset as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -12830,15 +12126,10 @@ fn bindgen_test_layout_ble_gattc_evt_char_vals_read_rsp_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_char_vals_read_rsp_t) - ) + concat!("Alignment of ", stringify!(ble_gattc_evt_char_vals_read_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).len as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).len as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12848,10 +12139,7 @@ fn bindgen_test_layout_ble_gattc_evt_char_vals_read_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).values as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).values as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -12890,9 +12178,7 @@ fn bindgen_test_layout_ble_gattc_evt_write_rsp_t() { concat!("Alignment of ", stringify!(ble_gattc_evt_write_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -12902,9 +12188,7 @@ fn bindgen_test_layout_ble_gattc_evt_write_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write_op as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).write_op as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -12914,9 +12198,7 @@ fn bindgen_test_layout_ble_gattc_evt_write_rsp_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).offset as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).offset as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -13030,16 +12312,10 @@ fn bindgen_test_layout_ble_gattc_evt_exchange_mtu_rsp_t() { assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_exchange_mtu_rsp_t) - ) + concat!("Alignment of ", stringify!(ble_gattc_evt_exchange_mtu_rsp_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).server_rx_mtu as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).server_rx_mtu as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13091,24 +12367,15 @@ fn bindgen_test_layout_ble_gattc_evt_write_cmd_tx_complete_t() { assert_eq!( ::core::mem::size_of::(), 1usize, - concat!( - "Size of: ", - stringify!(ble_gattc_evt_write_cmd_tx_complete_t) - ) + concat!("Size of: ", stringify!(ble_gattc_evt_write_cmd_tx_complete_t)) ); assert_eq!( ::core::mem::align_of::(), 1usize, - concat!( - "Alignment of ", - stringify!(ble_gattc_evt_write_cmd_tx_complete_t) - ) - ); - assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ - as usize - }, + concat!("Alignment of ", stringify!(ble_gattc_evt_write_cmd_tx_complete_t)) + ); + assert_eq!( + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13173,10 +12440,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_gattc_evt_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).prim_srvc_disc_rsp - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).prim_srvc_disc_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13186,10 +12450,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).rel_disc_rsp as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).rel_disc_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13199,10 +12460,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).char_disc_rsp as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).char_disc_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13212,10 +12470,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).desc_disc_rsp as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).desc_disc_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13226,8 +12481,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).char_val_by_uuid_read_rsp - as *const _ as usize + &(*(::core::ptr::null::())).char_val_by_uuid_read_rsp as *const _ as usize }, 0usize, concat!( @@ -13238,9 +12492,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).read_rsp as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).read_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13250,10 +12502,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).char_vals_read_rsp - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).char_vals_read_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13263,10 +12512,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write_rsp as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).write_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13276,9 +12522,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hvx as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hvx as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13288,10 +12532,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).exchange_mtu_rsp as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).exchange_mtu_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13301,9 +12542,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).timeout as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).timeout as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13313,10 +12552,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).attr_info_disc_rsp - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).attr_info_disc_rsp as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -13327,8 +12563,7 @@ fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).write_cmd_tx_complete - as *const _ as usize + &(*(::core::ptr::null::())).write_cmd_tx_complete as *const _ as usize }, 0usize, concat!( @@ -13653,11 +12888,7 @@ pub unsafe fn sd_ble_gattc_read(conn_handle: u16, handle: u16, offset: u16) -> u #[doc = " @retval ::NRF_ERROR_BUSY Client procedure already in progress."] #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."] #[inline(always)] -pub unsafe fn sd_ble_gattc_char_values_read( - conn_handle: u16, - p_handles: *const u16, - handle_count: u16, -) -> u32 { +pub unsafe fn sd_ble_gattc_char_values_read(conn_handle: u16, p_handles: *const u16, handle_count: u16) -> u32 { let ret: u32; core::arch::asm!("svc 162", inout("r0") to_asm(conn_handle) => ret, @@ -13713,10 +12944,7 @@ pub unsafe fn sd_ble_gattc_char_values_read( #[doc = " Wait for a @ref BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE event and retry."] #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."] #[inline(always)] -pub unsafe fn sd_ble_gattc_write( - conn_handle: u16, - p_write_params: *const ble_gattc_write_params_t, -) -> u32 { +pub unsafe fn sd_ble_gattc_write(conn_handle: u16, p_write_params: *const ble_gattc_write_params_t) -> u32 { let ret: u32; core::arch::asm!("svc 163", inout("r0") to_asm(conn_handle) => ret, @@ -13906,9 +13134,7 @@ fn bindgen_test_layout_ble_gatts_conn_cfg_t() { concat!("Alignment of ", stringify!(ble_gatts_conn_cfg_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hvn_tx_queue_size as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hvn_tx_queue_size as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14007,14 +13233,8 @@ impl ble_gatts_attr_md_t { } } #[inline] - pub fn new_bitfield_1( - vlen: u8, - vloc: u8, - rd_auth: u8, - wr_auth: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(vlen: u8, vloc: u8, rd_auth: u8, wr_auth: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let vlen: u8 = unsafe { ::core::mem::transmute(vlen) }; vlen as u64 @@ -14306,9 +13526,7 @@ fn bindgen_test_layout_ble_gatts_char_md_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).char_ext_props as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).char_ext_props as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -14318,9 +13536,7 @@ fn bindgen_test_layout_ble_gatts_char_md_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_char_user_desc as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_char_user_desc as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -14330,10 +13546,7 @@ fn bindgen_test_layout_ble_gatts_char_md_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).char_user_desc_max_size as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).char_user_desc_max_size as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -14343,10 +13556,7 @@ fn bindgen_test_layout_ble_gatts_char_md_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).char_user_desc_size as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).char_user_desc_size as *const _ as usize }, 10usize, concat!( "Offset of field: ", @@ -14366,9 +13576,7 @@ fn bindgen_test_layout_ble_gatts_char_md_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_user_desc_md as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_user_desc_md as *const _ as usize }, 16usize, concat!( "Offset of field: ", @@ -14424,9 +13632,7 @@ fn bindgen_test_layout_ble_gatts_char_handles_t() { concat!("Alignment of ", stringify!(ble_gatts_char_handles_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).value_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).value_handle as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14436,10 +13642,7 @@ fn bindgen_test_layout_ble_gatts_char_handles_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).user_desc_handle as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).user_desc_handle as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -14449,9 +13652,7 @@ fn bindgen_test_layout_ble_gatts_char_handles_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).cccd_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).cccd_handle as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -14461,9 +13662,7 @@ fn bindgen_test_layout_ble_gatts_char_handles_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sccd_handle as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).sccd_handle as *const _ as usize }, 6usize, concat!( "Offset of field: ", @@ -14578,10 +13777,7 @@ fn bindgen_test_layout_ble_gatts_authorize_params_t() { concat!("Alignment of ", stringify!(ble_gatts_authorize_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gatt_status as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).gatt_status as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14591,9 +13787,7 @@ fn bindgen_test_layout_ble_gatts_authorize_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).offset as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).offset as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -14603,9 +13797,7 @@ fn bindgen_test_layout_ble_gatts_authorize_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).len as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).len as *const _ as usize }, 6usize, concat!( "Offset of field: ", @@ -14615,9 +13807,7 @@ fn bindgen_test_layout_ble_gatts_authorize_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).p_data as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).p_data as *const _ as usize }, 8usize, concat!( "Offset of field: ", @@ -14641,8 +13831,7 @@ impl ble_gatts_authorize_params_t { } #[inline] pub fn new_bitfield_1(update: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let update: u8 = unsafe { ::core::mem::transmute(update) }; update as u64 @@ -14688,8 +13877,7 @@ fn bindgen_test_layout_ble_gatts_rw_authorize_reply_params_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).read - as *const _ as usize + &(*(::core::ptr::null::())).read as *const _ as usize }, 0usize, concat!( @@ -14701,8 +13889,7 @@ fn bindgen_test_layout_ble_gatts_rw_authorize_reply_params_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).write - as *const _ as usize + &(*(::core::ptr::null::())).write as *const _ as usize }, 0usize, concat!( @@ -14718,24 +13905,15 @@ fn bindgen_test_layout_ble_gatts_rw_authorize_reply_params_t() { assert_eq!( ::core::mem::size_of::(), 16usize, - concat!( - "Size of: ", - stringify!(ble_gatts_rw_authorize_reply_params_t) - ) + concat!("Size of: ", stringify!(ble_gatts_rw_authorize_reply_params_t)) ); assert_eq!( ::core::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(ble_gatts_rw_authorize_reply_params_t) - ) + concat!("Alignment of ", stringify!(ble_gatts_rw_authorize_reply_params_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).type_ as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).type_ as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14745,10 +13923,7 @@ fn bindgen_test_layout_ble_gatts_rw_authorize_reply_params_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).params as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).params as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -14791,8 +13966,7 @@ impl ble_gatts_cfg_service_changed_t { } #[inline] pub fn new_bitfield_1(service_changed: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let service_changed: u8 = unsafe { ::core::mem::transmute(service_changed) }; service_changed as u64 @@ -14825,10 +13999,7 @@ fn bindgen_test_layout_ble_gatts_cfg_attr_tab_size_t() { concat!("Alignment of ", stringify!(ble_gatts_cfg_attr_tab_size_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).attr_tab_size as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).attr_tab_size as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14861,9 +14032,7 @@ fn bindgen_test_layout_ble_gatts_cfg_t() { concat!("Alignment of ", stringify!(ble_gatts_cfg_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).service_changed as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).service_changed as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -14946,9 +14115,7 @@ fn bindgen_test_layout_ble_gatts_evt_write_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).auth_required as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).auth_required as *const _ as usize }, 7usize, concat!( "Offset of field: ", @@ -15078,8 +14245,7 @@ fn bindgen_test_layout_ble_gatts_evt_rw_authorize_request_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).read - as *const _ as usize + &(*(::core::ptr::null::())).read as *const _ as usize }, 0usize, concat!( @@ -15091,8 +14257,7 @@ fn bindgen_test_layout_ble_gatts_evt_rw_authorize_request_t__bindgen_ty_1() { ); assert_eq!( unsafe { - &(*(::core::ptr::null::())).write - as *const _ as usize + &(*(::core::ptr::null::())).write as *const _ as usize }, 0usize, concat!( @@ -15108,24 +14273,15 @@ fn bindgen_test_layout_ble_gatts_evt_rw_authorize_request_t() { assert_eq!( ::core::mem::size_of::(), 14usize, - concat!( - "Size of: ", - stringify!(ble_gatts_evt_rw_authorize_request_t) - ) + concat!("Size of: ", stringify!(ble_gatts_evt_rw_authorize_request_t)) ); assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gatts_evt_rw_authorize_request_t) - ) + concat!("Alignment of ", stringify!(ble_gatts_evt_rw_authorize_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).type_ as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).type_ as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15135,10 +14291,7 @@ fn bindgen_test_layout_ble_gatts_evt_rw_authorize_request_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).request as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -15165,15 +14318,10 @@ fn bindgen_test_layout_ble_gatts_evt_sys_attr_missing_t() { assert_eq!( ::core::mem::align_of::(), 1usize, - concat!( - "Alignment of ", - stringify!(ble_gatts_evt_sys_attr_missing_t) - ) + concat!("Alignment of ", stringify!(ble_gatts_evt_sys_attr_missing_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hint as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hint as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15225,24 +14373,15 @@ fn bindgen_test_layout_ble_gatts_evt_exchange_mtu_request_t() { assert_eq!( ::core::mem::size_of::(), 2usize, - concat!( - "Size of: ", - stringify!(ble_gatts_evt_exchange_mtu_request_t) - ) + concat!("Size of: ", stringify!(ble_gatts_evt_exchange_mtu_request_t)) ); assert_eq!( ::core::mem::align_of::(), 2usize, - concat!( - "Alignment of ", - stringify!(ble_gatts_evt_exchange_mtu_request_t) - ) + concat!("Alignment of ", stringify!(ble_gatts_evt_exchange_mtu_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).client_rx_mtu - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).client_rx_mtu as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15302,9 +14441,7 @@ fn bindgen_test_layout_ble_gatts_evt_hvn_tx_complete_t() { concat!("Alignment of ", stringify!(ble_gatts_evt_hvn_tx_complete_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15353,9 +14490,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_gatts_evt_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).write as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).write as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15365,10 +14500,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).authorize_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).authorize_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15378,10 +14510,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).sys_attr_missing as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).sys_attr_missing as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15391,9 +14520,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hvc as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).hvc as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15403,10 +14530,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).exchange_mtu_request - as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).exchange_mtu_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15416,9 +14540,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).timeout as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).timeout as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15428,10 +14550,7 @@ fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).hvn_tx_complete as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).hvn_tx_complete as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -15494,11 +14613,7 @@ fn bindgen_test_layout_ble_gatts_evt_t() { #[doc = " @retval ::NRF_ERROR_FORBIDDEN Forbidden value supplied, certain UUIDs are reserved for the stack."] #[doc = " @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation."] #[inline(always)] -pub unsafe fn sd_ble_gatts_service_add( - type_: u8, - p_uuid: *const ble_uuid_t, - p_handle: *mut u16, -) -> u32 { +pub unsafe fn sd_ble_gatts_service_add(type_: u8, p_uuid: *const ble_uuid_t, p_handle: *mut u16) -> u32 { let ret: u32; core::arch::asm!("svc 168", inout("r0") to_asm(type_) => ret, @@ -15533,11 +14648,7 @@ pub unsafe fn sd_ble_gatts_service_add( #[doc = " @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation."] #[doc = " @retval ::NRF_ERROR_NOT_FOUND Attribute not found."] #[inline(always)] -pub unsafe fn sd_ble_gatts_include_add( - service_handle: u16, - inc_srvc_handle: u16, - p_include_handle: *mut u16, -) -> u32 { +pub unsafe fn sd_ble_gatts_include_add(service_handle: u16, inc_srvc_handle: u16, p_include_handle: *mut u16) -> u32 { let ret: u32; core::arch::asm!("svc 169", inout("r0") to_asm(service_handle) => ret, @@ -15649,11 +14760,7 @@ pub unsafe fn sd_ble_gatts_descriptor_add( #[doc = " @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied, attribute lengths are restricted by @ref BLE_GATTS_ATTR_LENS_MAX."] #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied on a system attribute."] #[inline(always)] -pub unsafe fn sd_ble_gatts_value_set( - conn_handle: u16, - handle: u16, - p_value: *mut ble_gatts_value_t, -) -> u32 { +pub unsafe fn sd_ble_gatts_value_set(conn_handle: u16, handle: u16, p_value: *mut ble_gatts_value_t) -> u32 { let ret: u32; core::arch::asm!("svc 172", inout("r0") to_asm(conn_handle) => ret, @@ -15687,11 +14794,7 @@ pub unsafe fn sd_ble_gatts_value_set( #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied on a system attribute."] #[doc = " @retval ::BLE_ERROR_GATTS_SYS_ATTR_MISSING System attributes missing, use @ref sd_ble_gatts_sys_attr_set to set them to a known value."] #[inline(always)] -pub unsafe fn sd_ble_gatts_value_get( - conn_handle: u16, - handle: u16, - p_value: *mut ble_gatts_value_t, -) -> u32 { +pub unsafe fn sd_ble_gatts_value_get(conn_handle: u16, handle: u16, p_value: *mut ble_gatts_value_t) -> u32 { let ret: u32; core::arch::asm!("svc 173", inout("r0") to_asm(conn_handle) => ret, @@ -15766,10 +14869,7 @@ pub unsafe fn sd_ble_gatts_value_get( #[doc = " Wait for a @ref BLE_GATTS_EVT_HVN_TX_COMPLETE event and retry."] #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."] #[inline(always)] -pub unsafe fn sd_ble_gatts_hvx( - conn_handle: u16, - p_hvx_params: *const ble_gatts_hvx_params_t, -) -> u32 { +pub unsafe fn sd_ble_gatts_hvx(conn_handle: u16, p_hvx_params: *const ble_gatts_hvx_params_t) -> u32 { let ret: u32; core::arch::asm!("svc 174", inout("r0") to_asm(conn_handle) => ret, @@ -15815,11 +14915,7 @@ pub unsafe fn sd_ble_gatts_hvx( #[doc = " @retval ::BLE_ERROR_GATTS_SYS_ATTR_MISSING System attributes missing, use @ref sd_ble_gatts_sys_attr_set to set them to a known value."] #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."] #[inline(always)] -pub unsafe fn sd_ble_gatts_service_changed( - conn_handle: u16, - start_handle: u16, - end_handle: u16, -) -> u32 { +pub unsafe fn sd_ble_gatts_service_changed(conn_handle: u16, start_handle: u16, end_handle: u16) -> u32 { let ret: u32; core::arch::asm!("svc 175", inout("r0") to_asm(conn_handle) => ret, @@ -15918,12 +15014,7 @@ pub unsafe fn sd_ble_gatts_rw_authorize_reply( #[doc = " @retval ::NRF_ERROR_INVALID_DATA Invalid data supplied, the data should be exactly the same as retrieved with @ref sd_ble_gatts_sys_attr_get."] #[doc = " @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation."] #[inline(always)] -pub unsafe fn sd_ble_gatts_sys_attr_set( - conn_handle: u16, - p_sys_attr_data: *const u8, - len: u16, - flags: u32, -) -> u32 { +pub unsafe fn sd_ble_gatts_sys_attr_set(conn_handle: u16, p_sys_attr_data: *const u8, len: u16, flags: u32) -> u32 { let ret: u32; core::arch::asm!("svc 177", inout("r0") to_asm(conn_handle) => ret, @@ -16012,11 +15103,7 @@ pub unsafe fn sd_ble_gatts_initial_user_handle_get(p_handle: *mut u16) -> u32 { #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameters supplied. Returned when both @c p_uuid and @c p_md are NULL."] #[doc = " @retval ::NRF_ERROR_NOT_FOUND Attribute was not found."] #[inline(always)] -pub unsafe fn sd_ble_gatts_attr_get( - handle: u16, - p_uuid: *mut ble_uuid_t, - p_md: *mut ble_gatts_attr_md_t, -) -> u32 { +pub unsafe fn sd_ble_gatts_attr_get(handle: u16, p_uuid: *mut ble_uuid_t, p_md: *mut ble_gatts_attr_md_t) -> u32 { let ret: u32; core::arch::asm!("svc 180", inout("r0") to_asm(handle) => ret, @@ -16189,9 +15276,7 @@ fn bindgen_test_layout_ble_evt_user_mem_request_t() { concat!("Alignment of ", stringify!(ble_evt_user_mem_request_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).type_ as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).type_ as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -16223,9 +15308,7 @@ fn bindgen_test_layout_ble_evt_user_mem_release_t() { concat!("Alignment of ", stringify!(ble_evt_user_mem_release_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).type_ as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).type_ as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -16235,9 +15318,7 @@ fn bindgen_test_layout_ble_evt_user_mem_release_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).mem_block as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).mem_block as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -16278,10 +15359,7 @@ fn bindgen_test_layout_ble_common_evt_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_common_evt_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).user_mem_request as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).user_mem_request as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -16291,10 +15369,7 @@ fn bindgen_test_layout_ble_common_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).user_mem_release as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).user_mem_release as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -16361,12 +15436,7 @@ fn bindgen_test_layout_ble_evt_hdr_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).evt_id as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_evt_hdr_t), - "::", - stringify!(evt_id) - ) + concat!("Offset of field: ", stringify!(ble_evt_hdr_t), "::", stringify!(evt_id)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).evt_len as *const _ as usize }, @@ -16414,9 +15484,7 @@ fn bindgen_test_layout_ble_evt_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_evt_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).common_evt as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).common_evt as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -16426,9 +15494,7 @@ fn bindgen_test_layout_ble_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gap_evt as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).gap_evt as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -16438,9 +15504,7 @@ fn bindgen_test_layout_ble_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gattc_evt as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).gattc_evt as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -16450,9 +15514,7 @@ fn bindgen_test_layout_ble_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gatts_evt as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).gatts_evt as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -16462,9 +15524,7 @@ fn bindgen_test_layout_ble_evt_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).l2cap_evt as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).l2cap_evt as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -16489,22 +15549,12 @@ fn bindgen_test_layout_ble_evt_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).header as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_evt_t), - "::", - stringify!(header) - ) + concat!("Offset of field: ", stringify!(ble_evt_t), "::", stringify!(header)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).evt as *const _ as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(ble_evt_t), - "::", - stringify!(evt) - ) + concat!("Offset of field: ", stringify!(ble_evt_t), "::", stringify!(evt)) ); } #[doc = " @brief Version Information."] @@ -16551,9 +15601,7 @@ fn bindgen_test_layout_ble_version_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).subversion_number as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).subversion_number as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -16617,13 +15665,8 @@ impl ble_pa_lna_cfg_t { } } #[inline] - pub fn new_bitfield_1( - enable: u8, - active_high: u8, - gpio_pin: u8, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + pub fn new_bitfield_1(enable: u8, active_high: u8, gpio_pin: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let enable: u8 = unsafe { ::core::mem::transmute(enable) }; enable as u64 @@ -16687,9 +15730,7 @@ fn bindgen_test_layout_ble_common_opt_pa_lna_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).lna_cfg as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).lna_cfg as *const _ as usize }, 1usize, concat!( "Offset of field: ", @@ -16699,9 +15740,7 @@ fn bindgen_test_layout_ble_common_opt_pa_lna_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ppi_ch_id_set as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).ppi_ch_id_set as *const _ as usize }, 2usize, concat!( "Offset of field: ", @@ -16711,9 +15750,7 @@ fn bindgen_test_layout_ble_common_opt_pa_lna_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).ppi_ch_id_clr as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).ppi_ch_id_clr as *const _ as usize }, 3usize, concat!( "Offset of field: ", @@ -16723,9 +15760,7 @@ fn bindgen_test_layout_ble_common_opt_pa_lna_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gpiote_ch_id as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).gpiote_ch_id as *const _ as usize }, 4usize, concat!( "Offset of field: ", @@ -16776,8 +15811,7 @@ impl ble_common_opt_conn_evt_ext_t { } #[inline] pub fn new_bitfield_1(enable: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let enable: u8 = unsafe { ::core::mem::transmute(enable) }; enable as u64 @@ -16813,10 +15847,7 @@ fn bindgen_test_layout_ble_common_opt_extended_rc_cal_t() { assert_eq!( ::core::mem::align_of::(), 1usize, - concat!( - "Alignment of ", - stringify!(ble_common_opt_extended_rc_cal_t) - ) + concat!("Alignment of ", stringify!(ble_common_opt_extended_rc_cal_t)) ); } impl ble_common_opt_extended_rc_cal_t { @@ -16833,8 +15864,7 @@ impl ble_common_opt_extended_rc_cal_t { } #[inline] pub fn new_bitfield_1(enable: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let enable: u8 = unsafe { ::core::mem::transmute(enable) }; enable as u64 @@ -16887,9 +15917,7 @@ fn bindgen_test_layout_ble_common_opt_t() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).extended_rc_cal as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).extended_rc_cal as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -16924,22 +15952,12 @@ fn bindgen_test_layout_ble_opt_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).common_opt as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_opt_t), - "::", - stringify!(common_opt) - ) + concat!("Offset of field: ", stringify!(ble_opt_t), "::", stringify!(common_opt)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).gap_opt as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_opt_t), - "::", - stringify!(gap_opt) - ) + concat!("Offset of field: ", stringify!(ble_opt_t), "::", stringify!(gap_opt)) ); } #[doc = "@brief BLE connection configuration type, wrapping the module specific configurations, set with"] @@ -16997,10 +16015,7 @@ fn bindgen_test_layout_ble_conn_cfg_t__bindgen_ty_1() { concat!("Alignment of ", stringify!(ble_conn_cfg_t__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gap_conn_cfg as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).gap_conn_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -17010,10 +16025,7 @@ fn bindgen_test_layout_ble_conn_cfg_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gattc_conn_cfg as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).gattc_conn_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -17023,10 +16035,7 @@ fn bindgen_test_layout_ble_conn_cfg_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gatts_conn_cfg as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).gatts_conn_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -17036,10 +16045,7 @@ fn bindgen_test_layout_ble_conn_cfg_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).gatt_conn_cfg as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).gatt_conn_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -17049,10 +16055,7 @@ fn bindgen_test_layout_ble_conn_cfg_t__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).l2cap_conn_cfg as *const _ - as usize - }, + unsafe { &(*(::core::ptr::null::())).l2cap_conn_cfg as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -17119,9 +16122,7 @@ fn bindgen_test_layout_ble_common_cfg_vs_uuid_t() { concat!("Alignment of ", stringify!(ble_common_cfg_vs_uuid_t)) ); assert_eq!( - unsafe { - &(*(::core::ptr::null::())).vs_uuid_count as *const _ as usize - }, + unsafe { &(*(::core::ptr::null::())).vs_uuid_count as *const _ as usize }, 0usize, concat!( "Offset of field: ", @@ -17191,42 +16192,22 @@ fn bindgen_test_layout_ble_cfg_t() { assert_eq!( unsafe { &(*(::core::ptr::null::())).conn_cfg as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_cfg_t), - "::", - stringify!(conn_cfg) - ) + concat!("Offset of field: ", stringify!(ble_cfg_t), "::", stringify!(conn_cfg)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).common_cfg as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_cfg_t), - "::", - stringify!(common_cfg) - ) + concat!("Offset of field: ", stringify!(ble_cfg_t), "::", stringify!(common_cfg)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).gap_cfg as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_cfg_t), - "::", - stringify!(gap_cfg) - ) + concat!("Offset of field: ", stringify!(ble_cfg_t), "::", stringify!(gap_cfg)) ); assert_eq!( unsafe { &(*(::core::ptr::null::())).gatts_cfg as *const _ as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ble_cfg_t), - "::", - stringify!(gatts_cfg) - ) + concat!("Offset of field: ", stringify!(ble_cfg_t), "::", stringify!(gatts_cfg)) ); } @@ -17454,11 +16435,7 @@ pub unsafe fn sd_ble_uuid_vs_remove(p_uuid_type: *mut u8) -> u32 { #[doc = " @retval ::NRF_ERROR_INVALID_LENGTH Invalid UUID length."] #[doc = " @retval ::NRF_ERROR_NOT_FOUND For a 128-bit UUID, no match in the populated table of UUIDs."] #[inline(always)] -pub unsafe fn sd_ble_uuid_decode( - uuid_le_len: u8, - p_uuid_le: *const u8, - p_uuid: *mut ble_uuid_t, -) -> u32 { +pub unsafe fn sd_ble_uuid_decode(uuid_le_len: u8, p_uuid_le: *const u8, p_uuid: *mut ble_uuid_t) -> u32 { let ret: u32; core::arch::asm!("svc 99", inout("r0") to_asm(uuid_le_len) => ret, @@ -17482,11 +16459,7 @@ pub unsafe fn sd_ble_uuid_decode( #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."] #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid UUID type."] #[inline(always)] -pub unsafe fn sd_ble_uuid_encode( - p_uuid: *const ble_uuid_t, - p_uuid_le_len: *mut u8, - p_uuid_le: *mut u8, -) -> u32 { +pub unsafe fn sd_ble_uuid_encode(p_uuid: *const ble_uuid_t, p_uuid_le_len: *mut u8, p_uuid_le: *mut u8) -> u32 { let ret: u32; core::arch::asm!("svc 100", inout("r0") to_asm(p_uuid) => ret, diff --git a/nrf-softdevice/src/ble/central.rs b/nrf-softdevice/src/ble/central.rs index e6297c5..79392b2 100644 --- a/nrf-softdevice/src/ble/central.rs +++ b/nrf-softdevice/src/ble/central.rs @@ -3,14 +3,12 @@ //! Typically the Central device is the higher-powered device, such as a smartphone or laptop, since scanning is more //! power-hungry than advertising. -use core::mem; -use core::ptr; +use core::{mem, ptr}; use crate::ble::types::*; use crate::ble::{Address, Connection}; -use crate::raw; use crate::util::{get_union_field, OnDrop, Portal}; -use crate::{RawError, Softdevice}; +use crate::{raw, RawError, Softdevice}; #[derive(Debug, PartialEq, Eq, Clone, Copy)] #[cfg_attr(feature = "defmt", derive(defmt::Format))] @@ -30,10 +28,7 @@ impl From for ConnectError { pub(crate) static CONNECT_PORTAL: Portal<*const raw::ble_evt_t> = Portal::new(); // Begins an ATT MTU exchange procedure, followed by a data length update request as necessary. -pub async fn connect( - _sd: &Softdevice, - config: &ConnectConfig<'_>, -) -> Result { +pub async fn connect(_sd: &Softdevice, config: &ConnectConfig<'_>) -> Result { if let Some(w) = config.scan_config.whitelist { if w.len() == 0 { return Err(ConnectError::NoAddresses); @@ -145,11 +140,7 @@ impl From for ScanError { pub(crate) static SCAN_PORTAL: Portal<*const raw::ble_evt_t> = Portal::new(); -pub async fn scan<'a, F, R>( - _sd: &Softdevice, - config: &ScanConfig<'a>, - mut f: F, -) -> Result +pub async fn scan<'a, F, R>(_sd: &Softdevice, config: &ScanConfig<'a>, mut f: F) -> Result where F: for<'b> FnMut(&'b raw::ble_gap_evt_adv_report_t) -> Option, { diff --git a/nrf-softdevice/src/ble/connection.rs b/nrf-softdevice/src/ble/connection.rs index feb1c3c..c9c0d02 100644 --- a/nrf-softdevice/src/ble/connection.rs +++ b/nrf-softdevice/src/ble/connection.rs @@ -1,12 +1,10 @@ -use core::cell::Cell; -use core::cell::UnsafeCell; +use core::cell::{Cell, UnsafeCell}; use core::iter::FusedIterator; use raw::ble_gap_conn_params_t; use crate::ble::types::{Address, AddressType, Role}; -use crate::raw; -use crate::RawError; +use crate::{raw, RawError}; #[cfg(any(feature = "s113", feature = "s132", feature = "s140"))] const BLE_GAP_DATA_LENGTH_DEFAULT: u8 = 27; // The stack's default data length. <27-251> @@ -136,12 +134,8 @@ impl ConnectionState { return Ok(()); } - let ret = unsafe { - raw::sd_ble_gap_disconnect( - conn_handle, - raw::BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION as u8, - ) - }; + let ret = + unsafe { raw::sd_ble_gap_disconnect(conn_handle, raw::BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION as u8) }; unwrap!(RawError::convert(ret), "sd_ble_gap_disconnect"); self.disconnecting = true; @@ -149,10 +143,7 @@ impl ConnectionState { } pub(crate) fn on_disconnected(&mut self, _ble_evt: *const raw::ble_evt_t) { - let conn_handle = unwrap!( - self.conn_handle, - "bug: on_disconnected when already disconnected" - ); + let conn_handle = unwrap!(self.conn_handle, "bug: on_disconnected when already disconnected"); let ibh = index_by_handle(conn_handle); let _index = unwrap!(ibh.get(), "bug: conn_handle has no index"); @@ -201,10 +192,7 @@ impl Drop for Connection { impl Clone for Connection { fn clone(&self) -> Self { self.with_state(|state| { - state.refcount = unwrap!( - state.refcount.checked_add(1), - "Too many references to same connection" - ); + state.refcount = unwrap!(state.refcount.checked_add(1), "Too many references to same connection"); }); Self { index: self.index } @@ -306,10 +294,7 @@ impl Connection { /// For central connections, this will initiate a Link Layer connection parameter update procedure. /// For peripheral connections, this will send the corresponding L2CAP request to the central. It is then /// up to the central to accept or deny the request. - pub fn set_conn_params( - &self, - conn_params: ble_gap_conn_params_t, - ) -> Result<(), SetConnParamsError> { + pub fn set_conn_params(&self, conn_params: ble_gap_conn_params_t) -> Result<(), SetConnParamsError> { let conn_handle = self.with_state(|state| state.check_connected())?; let ret = unsafe { raw::sd_ble_gap_conn_param_update(conn_handle, &conn_params) }; if let Err(err) = RawError::convert(ret) { @@ -383,10 +368,8 @@ impl Iterator for ConnectionIter { let state = &mut *s.get(); if state.conn_handle.is_some() { let index = (n + i) as u8; - state.refcount = unwrap!( - state.refcount.checked_add(1), - "Too many references to same connection" - ); + state.refcount = + unwrap!(state.refcount.checked_add(1), "Too many references to same connection"); self.0 = index + 1; return Some(Connection { index }); } @@ -408,10 +391,7 @@ impl FusedIterator for ConnectionIter {} const DUMMY_STATE: UnsafeCell = UnsafeCell::new(ConnectionState::dummy()); static mut STATES: [UnsafeCell; CONNS_MAX] = [DUMMY_STATE; CONNS_MAX]; -pub(crate) fn with_state_by_conn_handle( - conn_handle: u16, - f: impl FnOnce(&mut ConnectionState) -> T, -) -> T { +pub(crate) fn with_state_by_conn_handle(conn_handle: u16, f: impl FnOnce(&mut ConnectionState) -> T) -> T { let index = unwrap!( index_by_handle(conn_handle).get(), "bug: with_state_by_conn_handle on conn_handle that has no state" diff --git a/nrf-softdevice/src/ble/gap.rs b/nrf-softdevice/src/ble/gap.rs index c01b6ae..4e758ef 100644 --- a/nrf-softdevice/src/ble/gap.rs +++ b/nrf-softdevice/src/ble/gap.rs @@ -1,7 +1,6 @@ use crate::ble::*; -use crate::raw; use crate::util::get_union_field; -use crate::RawError; +use crate::{raw, RawError}; pub(crate) unsafe fn on_evt(ble_evt: *const raw::ble_evt_t) { let gap_evt = get_union_field(ble_evt, &(*ble_evt).evt.gap_evt); @@ -24,17 +23,12 @@ pub(crate) unsafe fn on_evt(ble_evt: *const raw::ble_evt_t) { Role::Peripheral => peripheral::ADV_PORTAL.call(ble_evt), }; if !handled { - raw::sd_ble_gap_disconnect( - gap_evt.conn_handle, - raw::BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION as _, - ); + raw::sd_ble_gap_disconnect(gap_evt.conn_handle, raw::BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION as _); } } raw::BLE_GAP_EVTS_BLE_GAP_EVT_DISCONNECTED => { trace!("on_disconnected conn_handle={:?}", gap_evt.conn_handle); - connection::with_state_by_conn_handle(gap_evt.conn_handle, |state| { - state.on_disconnected(ble_evt) - }); + connection::with_state_by_conn_handle(gap_evt.conn_handle, |state| state.on_disconnected(ble_evt)); } raw::BLE_GAP_EVTS_BLE_GAP_EVT_CONN_PARAM_UPDATE => { let conn_params = gap_evt.params.conn_param_update.conn_params; @@ -174,18 +168,13 @@ pub(crate) unsafe fn on_evt(ble_evt: *const raw::ble_evt_t) { } #[cfg(any(feature = "s113", feature = "s132", feature = "s140"))] -pub(crate) unsafe fn do_data_length_update( - conn_handle: u16, - params: *const raw::ble_gap_data_length_params_t, -) { +pub(crate) unsafe fn do_data_length_update(conn_handle: u16, params: *const raw::ble_gap_data_length_params_t) { let mut dl_limitation = core::mem::zeroed(); let ret = raw::sd_ble_gap_data_length_update(conn_handle, params, &mut dl_limitation); if let Err(_err) = RawError::convert(ret) { warn!("sd_ble_gap_data_length_update err {:?}", _err); - if dl_limitation.tx_payload_limited_octets != 0 - || dl_limitation.rx_payload_limited_octets != 0 - { + if dl_limitation.tx_payload_limited_octets != 0 || dl_limitation.rx_payload_limited_octets != 0 { warn!( "The requested TX/RX packet length is too long by {:?}/{:?} octets.", dl_limitation.tx_payload_limited_octets, dl_limitation.rx_payload_limited_octets diff --git a/nrf-softdevice/src/ble/gatt_client.rs b/nrf-softdevice/src/ble/gatt_client.rs index c5e0c8e..54fd69c 100644 --- a/nrf-softdevice/src/ble/gatt_client.rs +++ b/nrf-softdevice/src/ble/gatt_client.rs @@ -4,9 +4,8 @@ use heapless::Vec; use num_enum::{FromPrimitive, IntoPrimitive}; use crate::ble::*; -use crate::raw; use crate::util::{get_flexarray, get_union_field, Portal}; -use crate::RawError; +use crate::{raw, RawError}; /// Discovered characteristic pub struct Characteristic { @@ -35,11 +34,7 @@ pub trait Client { /// Called by [`discover`] for every discovered characteristic. Implementations must /// check if they're interested in the UUID of the characteristic, and save their /// handles if needed. - fn discovered_characteristic( - &mut self, - characteristic: &Characteristic, - descriptors: &[Descriptor], - ); + fn discovered_characteristic(&mut self, characteristic: &Characteristic, descriptors: &[Descriptor]); /// Called by [`discover`] at the end of the discovery procedure. Implementations must check /// that all required characteristics have been discovered, and return [`DiscoverError::ServiceIncomplete`] @@ -122,13 +117,9 @@ impl From for DiscoverError { const DISC_CHARS_MAX: usize = 6; const DISC_DESCS_MAX: usize = 6; -pub(crate) async fn discover_service( - conn: &Connection, - uuid: Uuid, -) -> Result { +pub(crate) async fn discover_service(conn: &Connection, uuid: Uuid) -> Result { let conn_handle = conn.with_state(|state| state.check_connected())?; - let ret = - unsafe { raw::sd_ble_gattc_primary_services_discover(conn_handle, 1, uuid.as_raw_ptr()) }; + let ret = unsafe { raw::sd_ble_gattc_primary_services_discover(conn_handle, 1, uuid.as_raw_ptr()) }; RawError::convert(ret).map_err(|err| { warn!("sd_ble_gattc_primary_services_discover err {:?}", err); err @@ -137,9 +128,7 @@ pub(crate) async fn discover_service( portal(conn_handle) .wait_once(|ble_evt| unsafe { match (*ble_evt).header.evt_id as u32 { - raw::BLE_GAP_EVTS_BLE_GAP_EVT_DISCONNECTED => { - return Err(DiscoverError::Disconnected) - } + raw::BLE_GAP_EVTS_BLE_GAP_EVT_DISCONNECTED => return Err(DiscoverError::Disconnected), raw::BLE_GATTC_EVTS_BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP => { let gattc_evt = check_status(ble_evt)?; let params = get_union_field(ble_evt, &gattc_evt.params.prim_srvc_disc_rsp); @@ -189,16 +178,13 @@ async fn discover_characteristics( portal(conn_handle) .wait_once(|ble_evt| unsafe { match (*ble_evt).header.evt_id as u32 { - raw::BLE_GAP_EVTS_BLE_GAP_EVT_DISCONNECTED => { - return Err(DiscoverError::Disconnected) - } + raw::BLE_GAP_EVTS_BLE_GAP_EVT_DISCONNECTED => return Err(DiscoverError::Disconnected), raw::BLE_GATTC_EVTS_BLE_GATTC_EVT_CHAR_DISC_RSP => { let gattc_evt = check_status(ble_evt)?; let params = get_union_field(ble_evt, &gattc_evt.params.char_disc_rsp); let v = get_flexarray(ble_evt, ¶ms.chars, params.count as usize); - let v = Vec::from_slice(v).unwrap_or_else(|_| { - panic!("too many gatt chars, increase DiscCharsMax: {:?}", v.len()) - }); + let v = Vec::from_slice(v) + .unwrap_or_else(|_| panic!("too many gatt chars, increase DiscCharsMax: {:?}", v.len())); Ok(v) } e => panic!("unexpected event {}", e), @@ -233,16 +219,13 @@ async fn discover_descriptors( portal(conn_handle) .wait_once(|ble_evt| unsafe { match (*ble_evt).header.evt_id as u32 { - raw::BLE_GAP_EVTS_BLE_GAP_EVT_DISCONNECTED => { - return Err(DiscoverError::Disconnected) - } + raw::BLE_GAP_EVTS_BLE_GAP_EVT_DISCONNECTED => return Err(DiscoverError::Disconnected), raw::BLE_GATTC_EVTS_BLE_GATTC_EVT_DESC_DISC_RSP => { let gattc_evt = check_status(ble_evt)?; let params = get_union_field(ble_evt, &gattc_evt.params.desc_disc_rsp); let v = get_flexarray(ble_evt, ¶ms.descs, params.count as usize); - let v = Vec::from_slice(v).unwrap_or_else(|_| { - panic!("too many gatt descs, increase DiscDescsMax: {:?}", v.len()) - }); + let v = Vec::from_slice(v) + .unwrap_or_else(|_| panic!("too many gatt descs, increase DiscDescsMax: {:?}", v.len())); Ok(v) } e => panic!("unexpected event {}", e), @@ -262,9 +245,7 @@ async fn discover_inner( ) -> Result<(), DiscoverError> { // Calcuate range of possible descriptors let start_handle = curr.handle_value + 1; - let end_handle = next - .map(|c| c.handle_decl - 1) - .unwrap_or(svc.handle_range.end_handle); + let end_handle = next.map(|c| c.handle_decl - 1).unwrap_or(svc.handle_range.end_handle); let characteristic = Characteristic { uuid: Uuid::from_raw(curr.uuid), @@ -306,9 +287,7 @@ pub async fn discover(conn: &Connection) -> Result // TODO handle drop. Probably doable gracefully (no DropBomb) let svc = match discover_service(conn, T::uuid()).await { - Err(DiscoverError::Gatt(GattError::AtterrAttributeNotFound)) => { - Err(DiscoverError::ServiceNotFound) - } + Err(DiscoverError::Gatt(GattError::AtterrAttributeNotFound)) => Err(DiscoverError::ServiceNotFound), x => x, }?; @@ -380,9 +359,7 @@ pub async fn read(conn: &Connection, handle: u16, buf: &mut [u8]) -> Result { - return Some(Err(ReadError::Disconnected)) - } + raw::BLE_GAP_EVTS_BLE_GAP_EVT_DISCONNECTED => return Some(Err(ReadError::Disconnected)), raw::BLE_GATTC_EVTS_BLE_GATTC_EVT_READ_RSP => { let gattc_evt = match check_status(ble_evt) { Ok(evt) => evt, @@ -453,9 +430,7 @@ pub async fn write(conn: &Connection, handle: u16, buf: &[u8]) -> Result<(), Wri portal(conn_handle) .wait_many(|ble_evt| unsafe { match (*ble_evt).header.evt_id as u32 { - raw::BLE_GAP_EVTS_BLE_GAP_EVT_DISCONNECTED => { - return Some(Err(WriteError::Disconnected)) - } + raw::BLE_GAP_EVTS_BLE_GAP_EVT_DISCONNECTED => return Some(Err(WriteError::Disconnected)), raw::BLE_GATTC_EVTS_BLE_GATTC_EVT_WRITE_RSP => { match check_status(ble_evt) { Ok(_) => {} @@ -472,11 +447,7 @@ pub async fn write(conn: &Connection, handle: u16, buf: &[u8]) -> Result<(), Wri .await } -pub async fn write_without_response( - conn: &Connection, - handle: u16, - buf: &[u8], -) -> Result<(), WriteError> { +pub async fn write_without_response(conn: &Connection, handle: u16, buf: &[u8]) -> Result<(), WriteError> { loop { let conn_handle = conn.with_state(|state| state.check_connected())?; @@ -500,9 +471,7 @@ pub async fn write_without_response( portal(conn_handle) .wait_many(|ble_evt| unsafe { match (*ble_evt).header.evt_id as u32 { - raw::BLE_GAP_EVTS_BLE_GAP_EVT_DISCONNECTED => { - return Some(Err(WriteError::Disconnected)) - } + raw::BLE_GAP_EVTS_BLE_GAP_EVT_DISCONNECTED => return Some(Err(WriteError::Disconnected)), raw::BLE_GATTC_EVTS_BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE => Some(Ok(())), _ => None, } @@ -538,11 +507,7 @@ impl From for TryWriteError { } } -pub fn try_write_without_response( - conn: &Connection, - handle: u16, - buf: &[u8], -) -> Result<(), TryWriteError> { +pub fn try_write_without_response(conn: &Connection, handle: u16, buf: &[u8]) -> Result<(), TryWriteError> { let conn_handle = conn.with_state(|state| state.check_connected())?; assert!(buf.len() <= u16::MAX as usize); @@ -563,9 +528,7 @@ pub fn try_write_without_response( } } -unsafe fn check_status( - ble_evt: *const raw::ble_evt_t, -) -> Result<&'static raw::ble_gattc_evt_t, GattError> { +unsafe fn check_status(ble_evt: *const raw::ble_evt_t) -> Result<&'static raw::ble_gattc_evt_t, GattError> { let gattc_evt = get_union_field(ble_evt, &(*ble_evt).evt.gattc_evt); match gattc_evt.gatt_status as u32 { raw::BLE_GATT_STATUS_SUCCESS => Ok(gattc_evt), @@ -633,9 +596,7 @@ pub(crate) async fn att_mtu_exchange(conn: &Connection, mtu: u16) -> Result<(), portal(conn_handle) .wait_once(|ble_evt| unsafe { match (*ble_evt).header.evt_id as u32 { - raw::BLE_GAP_EVTS_BLE_GAP_EVT_DISCONNECTED => { - return Err(MtuExchangeError::Disconnected) - } + raw::BLE_GAP_EVTS_BLE_GAP_EVT_DISCONNECTED => return Err(MtuExchangeError::Disconnected), raw::BLE_GATTC_EVTS_BLE_GATTC_EVT_EXCHANGE_MTU_RSP => { let gattc_evt = match check_status(ble_evt) { Ok(evt) => evt, diff --git a/nrf-softdevice/src/ble/gatt_server.rs b/nrf-softdevice/src/ble/gatt_server.rs index 9c655fb..6694250 100644 --- a/nrf-softdevice/src/ble/gatt_server.rs +++ b/nrf-softdevice/src/ble/gatt_server.rs @@ -4,10 +4,8 @@ //! In a connection any device can be server and client, and even both can be both at the same time. use crate::ble::*; -use crate::raw; use crate::util::{get_flexarray, get_union_field, Portal}; -use crate::RawError; -use crate::Softdevice; +use crate::{raw, RawError, Softdevice}; pub mod builder; pub mod characteristic; @@ -111,9 +109,7 @@ where portal(conn_handle) .wait_many(|ble_evt| unsafe { match (*ble_evt).header.evt_id as u32 { - raw::BLE_GAP_EVTS_BLE_GAP_EVT_DISCONNECTED => { - return Some(Err(RunError::Disconnected)) - } + raw::BLE_GAP_EVTS_BLE_GAP_EVT_DISCONNECTED => return Some(Err(RunError::Disconnected)), raw::BLE_GATTS_EVTS_BLE_GATTS_EVT_WRITE => { let evt = &*ble_evt; let gatts_evt = get_union_field(ble_evt, &evt.evt.gatts_evt); @@ -131,8 +127,7 @@ where } raw::BLE_GATTS_EVTS_BLE_GATTS_EVT_SYS_ATTR_MISSING => { debug!("initializing gatt sys att"); - let ret = - raw::sd_ble_gatts_sys_attr_set(conn_handle, ::core::ptr::null(), 0, 0); + let ret = raw::sd_ble_gatts_sys_attr_set(conn_handle, ::core::ptr::null(), 0, 0); RawError::convert(ret).err(); } _ => {} @@ -161,9 +156,7 @@ pub fn get_value(_sd: &Softdevice, handle: u16, buf: &mut [u8]) -> Result buf.len() { @@ -192,9 +185,7 @@ pub fn set_value(_sd: &Softdevice, handle: u16, val: &[u8]) -> Result<(), SetVal len: val.len() as _, offset: 0, }; - let ret = unsafe { - raw::sd_ble_gatts_value_set(raw::BLE_CONN_HANDLE_INVALID as u16, handle, &mut value) - }; + let ret = unsafe { raw::sd_ble_gatts_value_set(raw::BLE_CONN_HANDLE_INVALID as u16, handle, &mut value) }; RawError::convert(ret)?; Ok(()) @@ -257,11 +248,7 @@ impl From for IndicateValueError { } /// This will fail if an indication is already in progress -pub fn indicate_value( - conn: &Connection, - handle: u16, - val: &[u8], -) -> Result<(), IndicateValueError> { +pub fn indicate_value(conn: &Connection, handle: u16, val: &[u8]) -> Result<(), IndicateValueError> { let conn_handle = conn.with_state(|state| state.check_connected())?; let mut len: u16 = val.len() as _; @@ -286,14 +273,8 @@ pub(crate) unsafe fn on_evt(ble_evt: *const raw::ble_evt_t) { let params = get_union_field(ble_evt, &gatts_evt.params.exchange_mtu_request); let want_mtu = params.client_rx_mtu; let max_mtu = crate::Softdevice::steal().att_mtu; - let mtu = want_mtu - .min(max_mtu) - .max(raw::BLE_GATT_ATT_MTU_DEFAULT as u16); - trace!( - "att mtu exchange: peer wants mtu {:?}, granting {:?}", - want_mtu, - mtu - ); + let mtu = want_mtu.min(max_mtu).max(raw::BLE_GATT_ATT_MTU_DEFAULT as u16); + trace!("att mtu exchange: peer wants mtu {:?}, granting {:?}", want_mtu, mtu); let ret = { raw::sd_ble_gatts_exchange_mtu_reply(conn_handle, mtu) }; if let Err(_err) = RawError::convert(ret) { diff --git a/nrf-softdevice/src/ble/gatt_server/builder.rs b/nrf-softdevice/src/ble/gatt_server/builder.rs index c0bff21..4d40258 100644 --- a/nrf-softdevice/src/ble/gatt_server/builder.rs +++ b/nrf-softdevice/src/ble/gatt_server/builder.rs @@ -1,6 +1,9 @@ #![allow(dead_code)] -use core::{convert::TryInto, marker::PhantomData, mem, ptr::null}; +use core::convert::TryInto; +use core::marker::PhantomData; +use core::mem; +use core::ptr::null; #[cfg(feature = "alloc")] extern crate alloc; @@ -8,12 +11,10 @@ extern crate alloc; #[cfg(feature = "alloc")] use alloc::boxed::Box; -use crate::{ble::Uuid, raw, RawError, Softdevice}; - -use super::{ - characteristic::{self, AttributeMetadata}, - CharacteristicHandles, DescriptorHandle, IncludedServiceHandle, RegisterError, ServiceHandle, -}; +use super::characteristic::{self, AttributeMetadata}; +use super::{CharacteristicHandles, DescriptorHandle, IncludedServiceHandle, RegisterError, ServiceHandle}; +use crate::ble::Uuid; +use crate::{raw, RawError, Softdevice}; pub struct ServiceBuilder<'a> { handle: u16, @@ -89,9 +90,7 @@ impl<'a> ServiceBuilder<'a> { let mut char_md = raw::ble_gatts_char_md_t { char_props, char_ext_props, - p_char_user_desc: char_md - .user_description - .map_or(null(), |x| x.value.as_ptr()), + p_char_user_desc: char_md.user_description.map_or(null(), |x| x.value.as_ptr()), char_user_desc_max_size: char_md.user_description.map_or(0, |x| x.max_len), char_user_desc_size: char_md.user_description.map_or(0, |x| x.value.len() as u16), p_char_pf: null(), @@ -112,12 +111,7 @@ impl<'a> ServiceBuilder<'a> { let mut handles: raw::ble_gatts_char_handles_t = unsafe { mem::zeroed() }; let ret = unsafe { - raw::sd_ble_gatts_characteristic_add( - self.handle, - &mut char_md as _, - &mut attr as _, - &mut handles as _, - ) + raw::sd_ble_gatts_characteristic_add(self.handle, &mut char_md as _, &mut attr as _, &mut handles as _) }; RawError::convert(ret)?; @@ -134,13 +128,9 @@ impl<'a> ServiceBuilder<'a> { }) } - pub fn include_service( - &mut self, - service: &ServiceHandle, - ) -> Result { + pub fn include_service(&mut self, service: &ServiceHandle) -> Result { let mut handle = 0; - let ret = - unsafe { raw::sd_ble_gatts_include_add(self.handle, service.0, &mut handle as _) }; + let ret = unsafe { raw::sd_ble_gatts_include_add(self.handle, service.0, &mut handle as _) }; RawError::convert(ret)?; Ok(IncludedServiceHandle(handle)) @@ -190,13 +180,7 @@ impl<'a> CharacteristicBuilder<'a> { }; let mut handle = 0; - let ret = unsafe { - raw::sd_ble_gatts_descriptor_add( - self.handles.value_handle, - &attr as _, - &mut handle as _, - ) - }; + let ret = unsafe { raw::sd_ble_gatts_descriptor_add(self.handles.value_handle, &attr as _, &mut handle as _) }; RawError::convert(ret)?; Ok(DescriptorHandle(handle)) diff --git a/nrf-softdevice/src/ble/gatt_traits.rs b/nrf-softdevice/src/ble/gatt_traits.rs index 490e59a..2b27f8f 100644 --- a/nrf-softdevice/src/ble/gatt_traits.rs +++ b/nrf-softdevice/src/ble/gatt_traits.rs @@ -1,6 +1,6 @@ use core::convert::TryInto; -use core::mem; -use core::slice; +use core::{mem, slice}; + use heapless::{String, Vec}; #[derive(Debug, PartialEq, Eq, Clone, Copy)] diff --git a/nrf-softdevice/src/ble/l2cap.rs b/nrf-softdevice/src/ble/l2cap.rs index 4488e92..a5b79d3 100644 --- a/nrf-softdevice/src/ble/l2cap.rs +++ b/nrf-softdevice/src/ble/l2cap.rs @@ -1,15 +1,13 @@ //! Link-Layer Control and Adaptation Protocol use core::marker::PhantomData; -use core::ptr; use core::ptr::NonNull; use core::sync::atomic::{AtomicBool, Ordering}; -use core::u16; +use core::{ptr, u16}; use crate::ble::*; -use crate::raw; use crate::util::{get_union_field, Portal}; -use crate::{RawError, Softdevice}; +use crate::{raw, RawError, Softdevice}; #[cfg(feature = "ble-l2cap-credit-wrokaround")] fn credit_hack_refill(conn: u16, cid: u16) { @@ -33,10 +31,7 @@ fn credit_hack_refill(conn: u16, cid: u16) { let ret = unsafe { raw::sd_ble_l2cap_ch_flow_control(conn, cid, CREDITS_MAX, ptr::null_mut()) }; if let Err(err) = RawError::convert(ret) { - warn!( - "sd_ble_l2cap_ch_flow_control credits=CREDITS_MAX err {:?}", - err - ); + warn!("sd_ble_l2cap_ch_flow_control credits=CREDITS_MAX err {:?}", err); return; } @@ -162,17 +157,10 @@ impl L2cap

{ }) } - Self { - _private: PhantomData, - } + Self { _private: PhantomData } } - pub async fn setup( - &self, - conn: &Connection, - config: &Config, - psm: u16, - ) -> Result, SetupError> { + pub async fn setup(&self, conn: &Connection, config: &Config, psm: u16) -> Result, SetupError> { let sd = unsafe { Softdevice::steal() }; let conn_handle = conn.with_state(|state| state.check_connected())?; @@ -199,9 +187,7 @@ impl L2cap

{ portal(conn_handle) .wait_once(|ble_evt| unsafe { match (*ble_evt).header.evt_id as u32 { - raw::BLE_GAP_EVTS_BLE_GAP_EVT_DISCONNECTED => { - return Err(SetupError::Disconnected) - } + raw::BLE_GAP_EVTS_BLE_GAP_EVT_DISCONNECTED => return Err(SetupError::Disconnected), raw::BLE_L2CAP_EVTS_BLE_L2CAP_EVT_CH_RELEASED => { // It is possible to get L2CAP_EVT_CH_RELEASED for the // "half-setup" channel if the conn gets disconnected while @@ -216,12 +202,8 @@ impl L2cap

{ let _ = config.credits; #[cfg(not(feature = "ble-l2cap-credit-wrokaround"))] if config.credits != 1 { - let ret = raw::sd_ble_l2cap_ch_flow_control( - conn_handle, - cid, - config.credits, - ptr::null_mut(), - ); + let ret = + raw::sd_ble_l2cap_ch_flow_control(conn_handle, cid, config.credits, ptr::null_mut()); if let Err(err) = RawError::convert(ret) { warn!("sd_ble_l2cap_ch_flow_control err {:?}", err); return Err(err.into()); @@ -245,12 +227,7 @@ impl L2cap

{ .await } - pub async fn listen( - &self, - conn: &Connection, - config: &Config, - psm: u16, - ) -> Result, SetupError> { + pub async fn listen(&self, conn: &Connection, config: &Config, psm: u16) -> Result, SetupError> { self.listen_with(conn, config, move |got_psm| got_psm == psm) .await .map(|(_, ch)| ch) @@ -268,9 +245,7 @@ impl L2cap

{ portal(conn_handle) .wait_many(|ble_evt| unsafe { match (*ble_evt).header.evt_id as u32 { - raw::BLE_GAP_EVTS_BLE_GAP_EVT_DISCONNECTED => { - return Some(Err(SetupError::Disconnected)) - } + raw::BLE_GAP_EVTS_BLE_GAP_EVT_DISCONNECTED => return Some(Err(SetupError::Disconnected)), raw::BLE_L2CAP_EVTS_BLE_L2CAP_EVT_CH_SETUP_REQUEST => { let l2cap_evt = get_union_field(ble_evt, &(*ble_evt).evt.l2cap_evt); let evt = &l2cap_evt.params.ch_setup_request; @@ -379,9 +354,7 @@ impl Channel

{ let ret = unsafe { raw::sd_ble_l2cap_ch_tx(conn_handle, self.cid, &data) }; match RawError::convert(ret) { - Err(RawError::Resources) => { - Err(TxError::TxQueueFull(unsafe { P::from_raw_parts(ptr, len) })) - } + Err(RawError::Resources) => Err(TxError::TxQueueFull(unsafe { P::from_raw_parts(ptr, len) })), Err(err) => { warn!("sd_ble_l2cap_ch_tx err {:?}", err); // The SD didn't take ownership of the buffer, so it's on us to free it. @@ -446,9 +419,7 @@ impl Channel

{ .wait_many(|ble_evt| unsafe { match (*ble_evt).header.evt_id as u32 { raw::BLE_GAP_EVTS_BLE_GAP_EVT_DISCONNECTED => Some(Err(RxError::Disconnected)), - raw::BLE_L2CAP_EVTS_BLE_L2CAP_EVT_CH_RELEASED => { - Some(Err(RxError::Disconnected)) - } + raw::BLE_L2CAP_EVTS_BLE_L2CAP_EVT_CH_RELEASED => Some(Err(RxError::Disconnected)), raw::BLE_L2CAP_EVTS_BLE_L2CAP_EVT_CH_RX => { let l2cap_evt = get_union_field(ble_evt, &(*ble_evt).evt.l2cap_evt); let evt = &l2cap_evt.params.rx; diff --git a/nrf-softdevice/src/ble/peripheral.rs b/nrf-softdevice/src/ble/peripheral.rs index 5c8ee41..f5edc2a 100644 --- a/nrf-softdevice/src/ble/peripheral.rs +++ b/nrf-softdevice/src/ble/peripheral.rs @@ -1,13 +1,10 @@ //! Bluetooth Peripheral operations. Peripheral devices emit advertisements, and optionally accept connections from Central devices. -use core::mem; -use core::ptr; +use core::{mem, ptr}; use crate::ble::*; -use crate::raw; -use crate::util::get_union_field; -use crate::util::{OnDrop, Portal}; -use crate::{RawError, Softdevice}; +use crate::util::{get_union_field, OnDrop, Portal}; +use crate::{raw, RawError, Softdevice}; struct RawAdvertisement<'a> { kind: u8, @@ -40,10 +37,7 @@ pub enum ConnectableAdvertisement<'a> { impl<'a> From> for RawAdvertisement<'a> { fn from(val: ConnectableAdvertisement<'a>) -> RawAdvertisement<'a> { match val { - ConnectableAdvertisement::ScannableUndirected { - adv_data, - scan_data, - } => RawAdvertisement { + ConnectableAdvertisement::ScannableUndirected { adv_data, scan_data } => RawAdvertisement { kind: raw::BLE_GAP_ADV_TYPE_CONNECTABLE_SCANNABLE_UNDIRECTED as u8, adv_data: Some(adv_data), scan_data: Some(scan_data), @@ -53,30 +47,23 @@ impl<'a> From> for RawAdvertisement<'a> { adv_data: None, scan_data: Some(scan_data), }, - ConnectableAdvertisement::NonscannableDirectedHighDuty { scan_data } => { - RawAdvertisement { - kind: raw::BLE_GAP_ADV_TYPE_CONNECTABLE_NONSCANNABLE_DIRECTED_HIGH_DUTY_CYCLE - as u8, - adv_data: None, - scan_data: Some(scan_data), - } - } + ConnectableAdvertisement::NonscannableDirectedHighDuty { scan_data } => RawAdvertisement { + kind: raw::BLE_GAP_ADV_TYPE_CONNECTABLE_NONSCANNABLE_DIRECTED_HIGH_DUTY_CYCLE as u8, + adv_data: None, + scan_data: Some(scan_data), + }, #[cfg(any(feature = "s132", feature = "s140"))] - ConnectableAdvertisement::ExtendedNonscannableUndirected { adv_data } => { - RawAdvertisement { - kind: raw::BLE_GAP_ADV_TYPE_EXTENDED_CONNECTABLE_NONSCANNABLE_UNDIRECTED as u8, - adv_data: Some(adv_data), - scan_data: None, - } - } + ConnectableAdvertisement::ExtendedNonscannableUndirected { adv_data } => RawAdvertisement { + kind: raw::BLE_GAP_ADV_TYPE_EXTENDED_CONNECTABLE_NONSCANNABLE_UNDIRECTED as u8, + adv_data: Some(adv_data), + scan_data: None, + }, #[cfg(any(feature = "s132", feature = "s140"))] - ConnectableAdvertisement::ExtendedNonscannableDirected { adv_data } => { - RawAdvertisement { - kind: raw::BLE_GAP_ADV_TYPE_EXTENDED_CONNECTABLE_NONSCANNABLE_DIRECTED as u8, - adv_data: Some(adv_data), - scan_data: None, - } - } + ConnectableAdvertisement::ExtendedNonscannableDirected { adv_data } => RawAdvertisement { + kind: raw::BLE_GAP_ADV_TYPE_EXTENDED_CONNECTABLE_NONSCANNABLE_DIRECTED as u8, + adv_data: Some(adv_data), + scan_data: None, + }, } } } @@ -114,10 +101,7 @@ pub enum NonconnectableAdvertisement<'a> { impl<'a> From> for RawAdvertisement<'a> { fn from(val: NonconnectableAdvertisement<'a>) -> RawAdvertisement<'a> { match val { - NonconnectableAdvertisement::ScannableUndirected { - adv_data, - scan_data, - } => RawAdvertisement { + NonconnectableAdvertisement::ScannableUndirected { adv_data, scan_data } => RawAdvertisement { kind: raw::BLE_GAP_ADV_TYPE_NONCONNECTABLE_SCANNABLE_UNDIRECTED as _, adv_data: Some(adv_data), scan_data: Some(scan_data), @@ -128,40 +112,29 @@ impl<'a> From> for RawAdvertisement<'a> { scan_data: None, }, #[cfg(any(feature = "s132", feature = "s140"))] - NonconnectableAdvertisement::ExtendedScannableUndirected { - adv_data, - scan_data, - } => RawAdvertisement { + NonconnectableAdvertisement::ExtendedScannableUndirected { adv_data, scan_data } => RawAdvertisement { kind: raw::BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_SCANNABLE_UNDIRECTED as _, adv_data: Some(adv_data), scan_data: Some(scan_data), }, #[cfg(any(feature = "s132", feature = "s140"))] - NonconnectableAdvertisement::ExtendedScannableDirected { - adv_data, - scan_data, - } => RawAdvertisement { + NonconnectableAdvertisement::ExtendedScannableDirected { adv_data, scan_data } => RawAdvertisement { kind: raw::BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_SCANNABLE_DIRECTED as _, adv_data: Some(adv_data), scan_data: Some(scan_data), }, #[cfg(any(feature = "s132", feature = "s140"))] - NonconnectableAdvertisement::ExtendedNonscannableUndirected { adv_data } => { - RawAdvertisement { - kind: raw::BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED - as _, - adv_data: Some(adv_data), - scan_data: None, - } - } + NonconnectableAdvertisement::ExtendedNonscannableUndirected { adv_data } => RawAdvertisement { + kind: raw::BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED as _, + adv_data: Some(adv_data), + scan_data: None, + }, #[cfg(any(feature = "s132", feature = "s140"))] - NonconnectableAdvertisement::ExtendedNonscannableDirected { adv_data } => { - RawAdvertisement { - kind: raw::BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_DIRECTED as _, - adv_data: Some(adv_data), - scan_data: None, - } - } + NonconnectableAdvertisement::ExtendedNonscannableDirected { adv_data } => RawAdvertisement { + kind: raw::BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_DIRECTED as _, + adv_data: Some(adv_data), + scan_data: None, + }, } } } @@ -213,9 +186,7 @@ fn start_adv(adv: RawAdvertisement<'_>, config: &Config) -> Result<(), Advertise scan_rsp_data: map_data(adv.scan_data), }; - let ret = unsafe { - raw::sd_ble_gap_adv_set_configure(&mut ADV_HANDLE as _, &datas as _, &adv_params as _) - }; + let ret = unsafe { raw::sd_ble_gap_adv_set_configure(&mut ADV_HANDLE as _, &datas as _, &adv_params as _) }; RawError::convert(ret).map_err(|err| { warn!("sd_ble_gap_adv_set_configure err {:?}", err); err diff --git a/nrf-softdevice/src/ble/types.rs b/nrf-softdevice/src/ble/types.rs index 6011808..b426090 100644 --- a/nrf-softdevice/src/ble/types.rs +++ b/nrf-softdevice/src/ble/types.rs @@ -1,7 +1,6 @@ use core::mem; -use crate::raw; -use crate::RawError; +use crate::{raw, RawError}; #[repr(transparent)] #[derive(Copy, Clone)] diff --git a/nrf-softdevice/src/critical_section_impl.rs b/nrf-softdevice/src/critical_section_impl.rs index 828e102..59f9445 100644 --- a/nrf-softdevice/src/critical_section_impl.rs +++ b/nrf-softdevice/src/critical_section_impl.rs @@ -1,7 +1,8 @@ -use crate::pac::{Interrupt, NVIC}; use core::arch::asm; use core::sync::atomic::{compiler_fence, AtomicBool, Ordering}; +use crate::pac::{Interrupt, NVIC}; + #[cfg(any(feature = "nrf52810", feature = "nrf52811"))] const RESERVED_IRQS: u32 = (1 << (Interrupt::POWER_CLOCK as u8)) | (1 << (Interrupt::RADIO as u8)) diff --git a/nrf-softdevice/src/events.rs b/nrf-softdevice/src/events.rs index f4a397e..c9d4362 100644 --- a/nrf-softdevice/src/events.rs +++ b/nrf-softdevice/src/events.rs @@ -1,13 +1,13 @@ use core::convert::TryFrom; use core::mem::MaybeUninit; use core::task::Poll; + use embassy::waitqueue::AtomicWaker; use futures::future::poll_fn; use num_enum::{IntoPrimitive, TryFromPrimitive}; use crate::pac::interrupt; -use crate::raw; -use crate::RawError; +use crate::{raw, RawError}; static SWI2_WAKER: AtomicWaker = AtomicWaker::new(); diff --git a/nrf-softdevice/src/flash.rs b/nrf-softdevice/src/flash.rs index afee483..2ba2337 100644 --- a/nrf-softdevice/src/flash.rs +++ b/nrf-softdevice/src/flash.rs @@ -1,12 +1,12 @@ use core::future::Future; use core::marker::PhantomData; use core::sync::atomic::{AtomicBool, Ordering}; + use embedded_storage::nor_flash::{ErrorType, NorFlashError, NorFlashErrorKind, ReadNorFlash}; use embedded_storage_async::nor_flash::{AsyncNorFlash, AsyncReadNorFlash}; -use crate::raw; use crate::util::{DropBomb, Signal}; -use crate::{RawError, Softdevice}; +use crate::{raw, RawError, Softdevice}; #[derive(Copy, Clone, Debug, Eq, PartialEq)] #[cfg_attr(feature = "defmt", derive(defmt::Format))] @@ -51,9 +51,7 @@ impl Flash { panic!("nrf_softdevice::Softdevice::take_flash() called multiple times.") } - Flash { - _private: PhantomData, - } + Flash { _private: PhantomData } } } @@ -78,9 +76,7 @@ impl ReadNorFlash for Flash { // Reading is simple since SoC flash is memory-mapped :) // TODO check addr/len is in bounds. - data.copy_from_slice(unsafe { - core::slice::from_raw_parts(address as *const u8, data.len()) - }); + data.copy_from_slice(unsafe { core::slice::from_raw_parts(address as *const u8, data.len()) }); Ok(()) } diff --git a/nrf-softdevice/src/lib.rs b/nrf-softdevice/src/lib.rs index d018a36..e51112b 100644 --- a/nrf-softdevice/src/lib.rs +++ b/nrf-softdevice/src/lib.rs @@ -5,9 +5,7 @@ pub(crate) mod util; #[cfg(not(any(feature = "ble-central", feature = "ble-peripheral",)))] -compile_error!( - "You must activate at least one of the following features: ble-central, ble-peripheral" -); +compile_error!("You must activate at least one of the following features: ble-central, ble-peripheral"); #[cfg(not(any( feature = "s112", @@ -135,7 +133,6 @@ use nrf52832_pac as pac; use nrf52833_pac as pac; #[cfg(feature = "nrf52840")] use nrf52840_pac as pac; - #[cfg(feature = "s112")] pub use nrf_softdevice_s112 as raw; #[cfg(feature = "s113")] @@ -167,6 +164,5 @@ mod temperature; pub use temperature::temperature_celsius; mod random; -pub use random::random_bytes; - pub use nrf_softdevice_macro::*; +pub use random::random_bytes; diff --git a/nrf-softdevice/src/softdevice.rs b/nrf-softdevice/src/softdevice.rs index 282ba04..84248e8 100644 --- a/nrf-softdevice/src/softdevice.rs +++ b/nrf-softdevice/src/softdevice.rs @@ -1,11 +1,10 @@ use core::marker::PhantomData; use core::ptr; use core::sync::atomic::{AtomicBool, Ordering}; + use embassy::util::Forever; -use crate::raw; -use crate::RawError; -use crate::{pac, SocEvent}; +use crate::{pac, raw, RawError, SocEvent}; unsafe extern "C" fn fault_handler(id: u32, pc: u32, info: u32) { match (id, info) { @@ -148,9 +147,7 @@ impl Softdevice { &raw::ble_cfg_t { conn_cfg: raw::ble_conn_cfg_t { conn_cfg_tag: APP_CONN_CFG_TAG, - params: raw::ble_conn_cfg_t__bindgen_ty_1 { - gattc_conn_cfg: val, - }, + params: raw::ble_conn_cfg_t__bindgen_ty_1 { gattc_conn_cfg: val }, }, }, ); @@ -162,9 +159,7 @@ impl Softdevice { &raw::ble_cfg_t { conn_cfg: raw::ble_conn_cfg_t { conn_cfg_tag: APP_CONN_CFG_TAG, - params: raw::ble_conn_cfg_t__bindgen_ty_1 { - gatts_conn_cfg: val, - }, + params: raw::ble_conn_cfg_t__bindgen_ty_1 { gatts_conn_cfg: val }, }, }, ); @@ -177,9 +172,7 @@ impl Softdevice { &raw::ble_cfg_t { conn_cfg: raw::ble_conn_cfg_t { conn_cfg_tag: APP_CONN_CFG_TAG, - params: raw::ble_conn_cfg_t__bindgen_ty_1 { - l2cap_conn_cfg: val, - }, + params: raw::ble_conn_cfg_t__bindgen_ty_1 { l2cap_conn_cfg: val }, }, }, ); @@ -198,9 +191,7 @@ impl Softdevice { cfg_set( raw::BLE_GAP_CFGS_BLE_GAP_CFG_ROLE_COUNT, &raw::ble_cfg_t { - gap_cfg: raw::ble_gap_cfg_t { - role_count_cfg: val, - }, + gap_cfg: raw::ble_gap_cfg_t { role_count_cfg: val }, }, ); } @@ -209,9 +200,7 @@ impl Softdevice { cfg_set( raw::BLE_GAP_CFGS_BLE_GAP_CFG_DEVICE_NAME, &raw::ble_cfg_t { - gap_cfg: raw::ble_gap_cfg_t { - device_name_cfg: val, - }, + gap_cfg: raw::ble_gap_cfg_t { device_name_cfg: val }, }, ); } @@ -220,9 +209,7 @@ impl Softdevice { cfg_set( raw::BLE_GAP_CFGS_BLE_GAP_CFG_PPCP_INCL_CONFIG, &raw::ble_cfg_t { - gap_cfg: raw::ble_gap_cfg_t { - ppcp_include_cfg: val, - }, + gap_cfg: raw::ble_gap_cfg_t { ppcp_include_cfg: val }, }, ); } @@ -231,9 +218,7 @@ impl Softdevice { cfg_set( raw::BLE_GAP_CFGS_BLE_GAP_CFG_CAR_INCL_CONFIG, &raw::ble_cfg_t { - gap_cfg: raw::ble_gap_cfg_t { - car_include_cfg: val, - }, + gap_cfg: raw::ble_gap_cfg_t { car_include_cfg: val }, }, ); } @@ -241,9 +226,7 @@ impl Softdevice { cfg_set( raw::BLE_GATTS_CFGS_BLE_GATTS_CFG_SERVICE_CHANGED, &raw::ble_cfg_t { - gatts_cfg: raw::ble_gatts_cfg_t { - service_changed: val, - }, + gatts_cfg: raw::ble_gatts_cfg_t { service_changed: val }, }, ); } @@ -258,17 +241,17 @@ impl Softdevice { let mut wanted_app_ram_base = app_ram_base; let ret = unsafe { raw::sd_ble_enable(&mut wanted_app_ram_base as _) }; - info!( - "softdevice RAM: {:?} bytes", - wanted_app_ram_base - 0x20000000 - ); + info!("softdevice RAM: {:?} bytes", wanted_app_ram_base - 0x20000000); match RawError::convert(ret) { Ok(()) => {} Err(RawError::NoMem) => { if wanted_app_ram_base <= app_ram_base { panic!("selected configuration has too high RAM requirements.") } else { - panic!("too little RAM for softdevice. Change your app's RAM start address to {:x}", wanted_app_ram_base); + panic!( + "too little RAM for softdevice. Change your app's RAM start address to {:x}", + wanted_app_ram_base + ); } } Err(err) => panic!("sd_ble_enable err {:?}", err), diff --git a/nrf-softdevice/src/util/mod.rs b/nrf-softdevice/src/util/mod.rs index c341a1d..03492d3 100644 --- a/nrf-softdevice/src/util/mod.rs +++ b/nrf-softdevice/src/util/mod.rs @@ -32,10 +32,7 @@ pub(crate) unsafe fn get_flexarray( /// This function is a workaround for UB in __BindgenUnionField /// see https://github.com/rust-lang/rust-bindgen/issues/1892 /// see https://github.com/rust-lang/unsafe-code-guidelines/issues/134 -pub(crate) unsafe fn get_union_field( - orig_ptr: *const raw::ble_evt_t, - member: &raw::__BindgenUnionField, -) -> &T { +pub(crate) unsafe fn get_union_field(orig_ptr: *const raw::ble_evt_t, member: &raw::__BindgenUnionField) -> &T { let offs = member as *const _ as usize - orig_ptr as usize; let sanitized_ptr = (orig_ptr as *const u8).add(offs) as *const T; &*sanitized_ptr diff --git a/nrf-softdevice/src/util/portal.rs b/nrf-softdevice/src/util/portal.rs index bc6becd..92505a6 100644 --- a/nrf-softdevice/src/util/portal.rs +++ b/nrf-softdevice/src/util/portal.rs @@ -22,8 +22,7 @@ unsafe impl Sync for Portal {} fn assert_thread_mode() { assert!( - cortex_m::peripheral::SCB::vect_active() - == cortex_m::peripheral::scb::VectActive::ThreadMode, + cortex_m::peripheral::SCB::vect_active() == cortex_m::peripheral::scb::VectActive::ThreadMode, "portals are not usable from interrupts" ); } diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..3639f43 --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,3 @@ +group_imports = "StdExternalCrate" +imports_granularity = "Module" +max_width=120 \ No newline at end of file -- cgit v1.2.3