#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct __BindgenBitfieldUnit<Storage, Align> {
storage: Storage,
align: [Align; 0],
}
impl<Storage, Align> __BindgenBitfieldUnit<Storage, Align> {
#[inline]
pub const fn new(storage: Storage) -> Self {
Self { storage, align: [] }
}
}
impl<Storage, Align> __BindgenBitfieldUnit<Storage, Align>
where
Storage: AsRef<[u8]> + AsMut<[u8]>,
{
#[inline]
pub fn get_bit(&self, index: usize) -> bool {
debug_assert!(index / 8 < self.storage.as_ref().len());
let byte_index = index / 8;
let byte = self.storage.as_ref()[byte_index];
let bit_index = if cfg!(target_endian = "big") {
7 - (index % 8)
} else {
index % 8
};
let mask = 1 << bit_index;
byte & mask == mask
}
#[inline]
pub fn set_bit(&mut self, index: usize, val: bool) {
debug_assert!(index / 8 < self.storage.as_ref().len());
let byte_index = index / 8;
let byte = &mut self.storage.as_mut()[byte_index];
let bit_index = if cfg!(target_endian = "big") {
7 - (index % 8)
} else {
index % 8
};
let mask = 1 << bit_index;
if val {
*byte |= mask;
} else {
*byte &= !mask;
}
}
#[inline]
pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
let mut val = 0;
for i in 0..(bit_width as usize) {
if self.get_bit(i + bit_offset) {
let index = if cfg!(target_endian = "big") {
bit_width as usize - 1 - i
} else {
i
};
val |= 1 << index;
}
}
val
}
#[inline]
pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
for i in 0..(bit_width as usize) {
let mask = 1 << i;
let val_bit_is_set = val & mask == mask;
let index = if cfg!(target_endian = "big") {
bit_width as usize - 1 - i
} else {
i
};
self.set_bit(index + bit_offset, val_bit_is_set);
}
}
}
#[repr(C)]
#[derive(Default)]
pub struct __IncompleteArrayField<T>(::core::marker::PhantomData<T>, [T; 0]);
impl<T> __IncompleteArrayField<T> {
#[inline]
pub const fn new() -> Self {
__IncompleteArrayField(::core::marker::PhantomData, [])
}
#[inline]
pub fn as_ptr(&self) -> *const T {
self as *const _ as *const T
}
#[inline]
pub fn as_mut_ptr(&mut self) -> *mut T {
self as *mut _ as *mut T
}
#[inline]
pub unsafe fn as_slice(&self, len: usize) -> &[T] {
::core::slice::from_raw_parts(self.as_ptr(), len)
}
#[inline]
pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
::core::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
}
}
impl<T> ::core::fmt::Debug for __IncompleteArrayField<T> {
fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
fmt.write_str("__IncompleteArrayField")
}
}
pub const MYNEWT_VAL_TINYCRYPT_SYSINIT_STAGE: u32 = 200;
pub const MYNEWT_VAL_TINYCRYPT_UECC_RNG_TRNG_DEV_NAME: &'static [u8; 5usize] = b"trng\0";
pub const MYNEWT_VAL_TINYCRYPT_UECC_RNG_USE_TRNG: u32 = 0;
pub const MYNEWT_VAL_HAL_ENABLE_SOFTWARE_BREAKPOINTS: u32 = 1;
pub const MYNEWT_VAL_HAL_FLASH_VERIFY_BUF_SZ: u32 = 16;
pub const MYNEWT_VAL_HAL_FLASH_VERIFY_ERASES: u32 = 0;
pub const MYNEWT_VAL_HAL_FLASH_VERIFY_WRITES: u32 = 0;
pub const MYNEWT_VAL_HAL_SYSTEM_RESET_CB: u32 = 0;
pub const MYNEWT_VAL_FLOAT_USER: u32 = 0;
pub const MYNEWT_VAL_MSYS_1_BLOCK_COUNT: u32 = 12;
pub const MYNEWT_VAL_MSYS_1_BLOCK_SIZE: u32 = 292;
pub const MYNEWT_VAL_MSYS_1_SANITY_MIN_COUNT: u32 = 0;
pub const MYNEWT_VAL_MSYS_2_BLOCK_COUNT: u32 = 0;
pub const MYNEWT_VAL_MSYS_2_BLOCK_SIZE: u32 = 0;
pub const MYNEWT_VAL_MSYS_2_SANITY_MIN_COUNT: u32 = 0;
pub const MYNEWT_VAL_MSYS_SANITY_TIMEOUT: u32 = 60000;
pub const MYNEWT_VAL_OS_ASSERT_CB: u32 = 0;
pub const MYNEWT_VAL_OS_CLI: u32 = 0;
pub const MYNEWT_VAL_OS_COREDUMP: u32 = 0;
pub const MYNEWT_VAL_OS_CPUTIME_FREQ: u32 = 1000000;
pub const MYNEWT_VAL_OS_CPUTIME_TIMER_NUM: u32 = 0;
pub const MYNEWT_VAL_OS_CRASH_FILE_LINE: u32 = 0;
pub const MYNEWT_VAL_OS_CRASH_LOG: u32 = 0;
pub const MYNEWT_VAL_OS_CRASH_RESTORE_REGS: u32 = 0;
pub const MYNEWT_VAL_OS_CRASH_STACKTRACE: u32 = 0;
pub const MYNEWT_VAL_OS_CTX_SW_STACK_CHECK: u32 = 0;
pub const MYNEWT_VAL_OS_CTX_SW_STACK_GUARD: u32 = 4;
pub const MYNEWT_VAL_OS_DEBUG_MODE: u32 = 0;
pub const MYNEWT_VAL_OS_EVENTQ_DEBUG: u32 = 0;
pub const MYNEWT_VAL_OS_EVENTQ_MONITOR: u32 = 0;
pub const MYNEWT_VAL_OS_IDLE_TICKLESS_MS_MAX: u32 = 600000;
pub const MYNEWT_VAL_OS_IDLE_TICKLESS_MS_MIN: u32 = 100;
pub const MYNEWT_VAL_OS_MAIN_STACK_SIZE: u32 = 1024;
pub const MYNEWT_VAL_OS_MAIN_TASK_PRIO: u32 = 127;
pub const MYNEWT_VAL_OS_MAIN_TASK_SANITY_ITVL_MS: u32 = 0;
pub const MYNEWT_VAL_OS_MEMPOOL_CHECK: u32 = 0;
pub const MYNEWT_VAL_OS_MEMPOOL_GUARD: u32 = 0;
pub const MYNEWT_VAL_OS_MEMPOOL_POISON: u32 = 0;
pub const MYNEWT_VAL_OS_SCHEDULING: u32 = 1;
pub const MYNEWT_VAL_OS_SYSINIT_STAGE: u32 = 0;
pub const MYNEWT_VAL_OS_SYSVIEW: u32 = 0;
pub const MYNEWT_VAL_OS_SYSVIEW_TRACE_CALLOUT: u32 = 1;
pub const MYNEWT_VAL_OS_SYSVIEW_TRACE_EVENTQ: u32 = 1;
pub const MYNEWT_VAL_OS_SYSVIEW_TRACE_MBUF: u32 = 0;
pub const MYNEWT_VAL_OS_SYSVIEW_TRACE_MEMPOOL: u32 = 0;
pub const MYNEWT_VAL_OS_SYSVIEW_TRACE_MUTEX: u32 = 1;
pub const MYNEWT_VAL_OS_SYSVIEW_TRACE_SEM: u32 = 1;
pub const MYNEWT_VAL_OS_TASK_RUN_TIME_CPUTIME: u32 = 0;
pub const MYNEWT_VAL_OS_TIME_DEBUG: u32 = 0;
pub const MYNEWT_VAL_OS_WATCHDOG_MONITOR: u32 = 0;
pub const MYNEWT_VAL_SANITY_INTERVAL: u32 = 15000;
pub const MYNEWT_VAL_WATCHDOG_INTERVAL: u32 = 30000;
pub const MYNEWT_VAL_CONSOLE_UART_BAUD: u32 = 115200;
pub const MYNEWT_VAL_CONSOLE_UART_DEV: &'static [u8; 6usize] = b"uart0\0";
pub const MYNEWT_VAL_FLASH_MAP_MAX_AREAS: u32 = 10;
pub const MYNEWT_VAL_FLASH_MAP_SYSINIT_STAGE: u32 = 2;
pub const MYNEWT_VAL_DFLT_LOG_LVL: u32 = 1;
pub const MYNEWT_VAL_DFLT_LOG_MOD: u32 = 0;
pub const MYNEWT_VAL_LOG_GLOBAL_IDX: u32 = 1;
pub const MYNEWT_VAL_MODLOG_CONSOLE_DFLT: u32 = 1;
pub const MYNEWT_VAL_MODLOG_LOG_MACROS: u32 = 0;
pub const MYNEWT_VAL_MODLOG_MAX_MAPPINGS: u32 = 16;
pub const MYNEWT_VAL_MODLOG_MAX_PRINTF_LEN: u32 = 128;
pub const MYNEWT_VAL_MODLOG_SYSINIT_STAGE: u32 = 100;
pub const MYNEWT_VAL_LOG_CONSOLE: u32 = 1;
pub const MYNEWT_VAL_LOG_FCB: u32 = 0;
pub const MYNEWT_VAL_LOG_FCB_SLOT1: u32 = 0;
pub const MYNEWT_VAL_LOG_LEVEL: u32 = 255;
pub const MYNEWT_VAL_MFG_LOG_LVL: u32 = 15;
pub const MYNEWT_VAL_MFG_LOG_MODULE: u32 = 128;
pub const MYNEWT_VAL_MFG_MAX_MMRS: u32 = 2;
pub const MYNEWT_VAL_MFG_SYSINIT_STAGE: u32 = 100;
pub const MYNEWT_VAL_DEBUG_PANIC_ENABLED: u32 = 1;
pub const MYNEWT_VAL_SYSDOWN_CONSTRAIN_DOWN: u32 = 1;
pub const MYNEWT_VAL_SYSDOWN_PANIC_FILE_LINE: u32 = 0;
pub const MYNEWT_VAL_SYSDOWN_PANIC_MESSAGE: u32 = 0;
pub const MYNEWT_VAL_SYSDOWN_TIMEOUT_MS: u32 = 10000;
pub const MYNEWT_VAL_SYSINIT_CONSTRAIN_INIT: u32 = 1;
pub const MYNEWT_VAL_SYSINIT_PANIC_FILE_LINE: u32 = 0;
pub const MYNEWT_VAL_SYSINIT_PANIC_MESSAGE: u32 = 0;
pub const MYNEWT_VAL_RWLOCK_DEBUG: u32 = 0;
pub const MYNEWT_VAL_BLE_EXT_ADV: u32 = 0;
pub const MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE: u32 = 31;
pub const MYNEWT_VAL_BLE_ISO: u32 = 0;
pub const MYNEWT_VAL_BLE_ISO_TEST: u32 = 0;
pub const MYNEWT_VAL_BLE_MAX_CONNECTIONS: u32 = 1;
pub const MYNEWT_VAL_BLE_MAX_PERIODIC_SYNCS: u32 = 1;
pub const MYNEWT_VAL_BLE_MULTI_ADV_INSTANCES: u32 = 0;
pub const MYNEWT_VAL_BLE_PERIODIC_ADV: u32 = 0;
pub const MYNEWT_VAL_BLE_PERIODIC_ADV_SYNC_TRANSFER: u32 = 0;
pub const MYNEWT_VAL_BLE_ROLE_BROADCASTER: u32 = 1;
pub const MYNEWT_VAL_BLE_ROLE_CENTRAL: u32 = 1;
pub const MYNEWT_VAL_BLE_ROLE_OBSERVER: u32 = 1;
pub const MYNEWT_VAL_BLE_ROLE_PERIPHERAL: u32 = 1;
pub const MYNEWT_VAL_BLE_VERSION: u32 = 50;
pub const MYNEWT_VAL_BLE_WHITELIST: u32 = 1;
pub const MYNEWT_VAL_BLE_ATT_PREFERRED_MTU: u32 = 256;
pub const MYNEWT_VAL_BLE_ATT_SVR_FIND_INFO: u32 = 1;
pub const MYNEWT_VAL_BLE_ATT_SVR_FIND_TYPE: u32 = 1;
pub const MYNEWT_VAL_BLE_ATT_SVR_INDICATE: u32 = 1;
pub const MYNEWT_VAL_BLE_ATT_SVR_MAX_PREP_ENTRIES: u32 = 64;
pub const MYNEWT_VAL_BLE_ATT_SVR_NOTIFY: u32 = 1;
pub const MYNEWT_VAL_BLE_ATT_SVR_QUEUED_WRITE: u32 = 1;
pub const MYNEWT_VAL_BLE_ATT_SVR_QUEUED_WRITE_TMO: u32 = 30000;
pub const MYNEWT_VAL_BLE_ATT_SVR_READ: u32 = 1;
pub const MYNEWT_VAL_BLE_ATT_SVR_READ_BLOB: u32 = 1;
pub const MYNEWT_VAL_BLE_ATT_SVR_READ_GROUP_TYPE: u32 = 1;
pub const MYNEWT_VAL_BLE_ATT_SVR_READ_MULT: u32 = 1;
pub const MYNEWT_VAL_BLE_ATT_SVR_READ_TYPE: u32 = 1;
pub const MYNEWT_VAL_BLE_ATT_SVR_SIGNED_WRITE: u32 = 1;
pub const MYNEWT_VAL_BLE_ATT_SVR_WRITE: u32 = 1;
pub const MYNEWT_VAL_BLE_ATT_SVR_WRITE_NO_RSP: u32 = 1;
pub const MYNEWT_VAL_BLE_GAP_MAX_PENDING_CONN_PARAM_UPDATE: u32 = 1;
pub const MYNEWT_VAL_BLE_GATT_DISC_ALL_CHRS: u32 = 1;
pub const MYNEWT_VAL_BLE_GATT_DISC_ALL_DSCS: u32 = 1;
pub const MYNEWT_VAL_BLE_GATT_DISC_ALL_SVCS: u32 = 1;
pub const MYNEWT_VAL_BLE_GATT_DISC_CHR_UUID: u32 = 1;
pub const MYNEWT_VAL_BLE_GATT_DISC_SVC_UUID: u32 = 1;
pub const MYNEWT_VAL_BLE_GATT_FIND_INC_SVCS: u32 = 1;
pub const MYNEWT_VAL_BLE_GATT_INDICATE: u32 = 1;
pub const MYNEWT_VAL_BLE_GATT_MAX_PROCS: u32 = 4;
pub const MYNEWT_VAL_BLE_GATT_NOTIFY: u32 = 1;
pub const MYNEWT_VAL_BLE_GATT_READ: u32 = 1;
pub const MYNEWT_VAL_BLE_GATT_READ_LONG: u32 = 1;
pub const MYNEWT_VAL_BLE_GATT_READ_MAX_ATTRS: u32 = 8;
pub const MYNEWT_VAL_BLE_GATT_READ_MULT: u32 = 1;
pub const MYNEWT_VAL_BLE_GATT_READ_UUID: u32 = 1;
pub const MYNEWT_VAL_BLE_GATT_RESUME_RATE: u32 = 1000;
pub const MYNEWT_VAL_BLE_GATT_SIGNED_WRITE: u32 = 1;
pub const MYNEWT_VAL_BLE_GATT_WRITE: u32 = 1;
pub const MYNEWT_VAL_BLE_GATT_WRITE_LONG: u32 = 1;
pub const MYNEWT_VAL_BLE_GATT_WRITE_MAX_ATTRS: u32 = 4;
pub const MYNEWT_VAL_BLE_GATT_WRITE_NO_RSP: u32 = 1;
pub const MYNEWT_VAL_BLE_GATT_WRITE_RELIABLE: u32 = 1;
pub const MYNEWT_VAL_BLE_HOST: u32 = 1;
pub const MYNEWT_VAL_BLE_HS_AUTO_START: u32 = 1;
pub const MYNEWT_VAL_BLE_HS_DEBUG: u32 = 0;
pub const MYNEWT_VAL_BLE_HS_FLOW_CTRL: u32 = 0;
pub const MYNEWT_VAL_BLE_HS_FLOW_CTRL_ITVL: u32 = 1000;
pub const MYNEWT_VAL_BLE_HS_FLOW_CTRL_THRESH: u32 = 2;
pub const MYNEWT_VAL_BLE_HS_FLOW_CTRL_TX_ON_DISCONNECT: u32 = 0;
pub const MYNEWT_VAL_BLE_HS_LOG_LVL: u32 = 1;
pub const MYNEWT_VAL_BLE_HS_LOG_MOD: u32 = 4;
pub const MYNEWT_VAL_BLE_HS_PHONY_HCI_ACKS: u32 = 0;
pub const MYNEWT_VAL_BLE_HS_REQUIRE_OS: u32 = 1;
pub const MYNEWT_VAL_BLE_HS_STOP_ON_SHUTDOWN: u32 = 1;
pub const MYNEWT_VAL_BLE_HS_STOP_ON_SHUTDOWN_TIMEOUT: u32 = 2000;
pub const MYNEWT_VAL_BLE_HS_SYSINIT_STAGE: u32 = 200;
pub const MYNEWT_VAL_BLE_L2CAP_COC_MAX_NUM: u32 = 0;
pub const MYNEWT_VAL_BLE_L2CAP_COC_MPS: u32 = 284;
pub const MYNEWT_VAL_BLE_L2CAP_ENHANCED_COC: u32 = 0;
pub const MYNEWT_VAL_BLE_L2CAP_JOIN_RX_FRAGS: u32 = 1;
pub const MYNEWT_VAL_BLE_L2CAP_MAX_CHANS: u32 = 3;
pub const MYNEWT_VAL_BLE_L2CAP_RX_FRAG_TIMEOUT: u32 = 30000;
pub const MYNEWT_VAL_BLE_L2CAP_SIG_MAX_PROCS: u32 = 1;
pub const MYNEWT_VAL_BLE_MESH: u32 = 0;
pub const MYNEWT_VAL_BLE_MONITOR_CONSOLE_BUFFER_SIZE: u32 = 128;
pub const MYNEWT_VAL_BLE_MONITOR_RTT: u32 = 0;
pub const MYNEWT_VAL_BLE_MONITOR_RTT_BUFFERED: u32 = 1;
pub const MYNEWT_VAL_BLE_MONITOR_RTT_BUFFER_NAME: &'static [u8; 10usize] = b"btmonitor\0";
pub const MYNEWT_VAL_BLE_MONITOR_RTT_BUFFER_SIZE: u32 = 256;
pub const MYNEWT_VAL_BLE_MONITOR_UART: u32 = 0;
pub const MYNEWT_VAL_BLE_MONITOR_UART_BAUDRATE: u32 = 1000000;
pub const MYNEWT_VAL_BLE_MONITOR_UART_BUFFER_SIZE: u32 = 64;
pub const MYNEWT_VAL_BLE_MONITOR_UART_DEV: &'static [u8; 6usize] = b"uart0\0";
pub const MYNEWT_VAL_BLE_RPA_TIMEOUT: u32 = 300;
pub const MYNEWT_VAL_BLE_SM_BONDING: u32 = 0;
pub const MYNEWT_VAL_BLE_SM_KEYPRESS: u32 = 0;
pub const MYNEWT_VAL_BLE_SM_LEGACY: u32 = 1;
pub const MYNEWT_VAL_BLE_SM_MAX_PROCS: u32 = 1;
pub const MYNEWT_VAL_BLE_SM_MITM: u32 = 0;
pub const MYNEWT_VAL_BLE_SM_OOB_DATA_FLAG: u32 = 0;
pub const MYNEWT_VAL_BLE_SM_OUR_KEY_DIST: u32 = 0;
pub const MYNEWT_VAL_BLE_SM_SC: u32 = 0;
pub const MYNEWT_VAL_BLE_SM_SC_DEBUG_KEYS: u32 = 0;
pub const MYNEWT_VAL_BLE_SM_THEIR_KEY_DIST: u32 = 0;
pub const MYNEWT_VAL_BLE_STORE_MAX_BONDS: u32 = 3;
pub const MYNEWT_VAL_BLE_STORE_MAX_CCCDS: u32 = 8;
pub const MYNEWT_VAL_BLE_SVC_ANS_NEW_ALERT_CAT: u32 = 0;
pub const MYNEWT_VAL_BLE_SVC_ANS_SYSINIT_STAGE: u32 = 303;
pub const MYNEWT_VAL_BLE_SVC_ANS_UNR_ALERT_CAT: u32 = 0;
pub const MYNEWT_VAL_BLE_SVC_BAS_BATTERY_LEVEL_NOTIFY_ENABLE: u32 = 1;
pub const MYNEWT_VAL_BLE_SVC_BAS_BATTERY_LEVEL_READ_PERM: u32 = 0;
pub const MYNEWT_VAL_BLE_SVC_BAS_SYSINIT_STAGE: u32 = 303;
pub const MYNEWT_VAL_BLE_SVC_DIS_DEFAULT_READ_PERM: i32 = -1;
pub const MYNEWT_VAL_BLE_SVC_DIS_FIRMWARE_REVISION_READ_PERM: i32 = -1;
pub const MYNEWT_VAL_BLE_SVC_DIS_HARDWARE_REVISION_READ_PERM: i32 = -1;
pub const MYNEWT_VAL_BLE_SVC_DIS_MANUFACTURER_NAME_READ_PERM: i32 = -1;
pub const MYNEWT_VAL_BLE_SVC_DIS_MODEL_NUMBER_DEFAULT: &'static [u8; 21usize] =
b"Apache Mynewt NimBLE\0";
pub const MYNEWT_VAL_BLE_SVC_DIS_MODEL_NUMBER_READ_PERM: u32 = 0;
pub const MYNEWT_VAL_BLE_SVC_DIS_SERIAL_NUMBER_READ_PERM: i32 = -1;
pub const MYNEWT_VAL_BLE_SVC_DIS_SOFTWARE_REVISION_READ_PERM: i32 = -1;
pub const MYNEWT_VAL_BLE_SVC_DIS_SYSINIT_STAGE: u32 = 303;
pub const MYNEWT_VAL_BLE_SVC_DIS_SYSTEM_ID_READ_PERM: i32 = -1;
pub const MYNEWT_VAL_BLE_SVC_GAP_APPEARANCE: u32 = 0;
pub const MYNEWT_VAL_BLE_SVC_GAP_APPEARANCE_WRITE_PERM: i32 = -1;
pub const MYNEWT_VAL_BLE_SVC_GAP_CENTRAL_ADDRESS_RESOLUTION: i32 = -1;
pub const MYNEWT_VAL_BLE_SVC_GAP_DEVICE_NAME: &'static [u8; 7usize] = b"nimble\0";
pub const MYNEWT_VAL_BLE_SVC_GAP_DEVICE_NAME_MAX_LENGTH: u32 = 31;
pub const MYNEWT_VAL_BLE_SVC_GAP_DEVICE_NAME_WRITE_PERM: i32 = -1;
pub const MYNEWT_VAL_BLE_SVC_GAP_PPCP_MAX_CONN_INTERVAL: u32 = 0;
pub const MYNEWT_VAL_BLE_SVC_GAP_PPCP_MIN_CONN_INTERVAL: u32 = 0;
pub const MYNEWT_VAL_BLE_SVC_GAP_PPCP_SLAVE_LATENCY: u32 = 0;
pub const MYNEWT_VAL_BLE_SVC_GAP_PPCP_SUPERVISION_TMO: u32 = 0;
pub const MYNEWT_VAL_BLE_SVC_GAP_SYSINIT_STAGE: u32 = 301;
pub const MYNEWT_VAL_BLE_SVC_GATT_SYSINIT_STAGE: u32 = 302;
pub const MYNEWT_VAL_BLE_SVC_IAS_SYSINIT_STAGE: u32 = 303;
pub const MYNEWT_VAL_BLE_SVC_IPSS_SYSINIT_STAGE: u32 = 303;
pub const MYNEWT_VAL_BLE_SVC_LLS_SYSINIT_STAGE: u32 = 303;
pub const MYNEWT_VAL_BLE_SVC_TPS_SYSINIT_STAGE: u32 = 303;
pub const MYNEWT_VAL_BLE_ACL_BUF_COUNT: u32 = 24;
pub const MYNEWT_VAL_BLE_ACL_BUF_SIZE: u32 = 255;
pub const MYNEWT_VAL_BLE_HCI_ACL_OUT_COUNT: u32 = 12;
pub const MYNEWT_VAL_BLE_HCI_EVT_BUF_SIZE: u32 = 70;
pub const MYNEWT_VAL_BLE_HCI_EVT_HI_BUF_COUNT: u32 = 8;
pub const MYNEWT_VAL_BLE_HCI_EVT_LO_BUF_COUNT: u32 = 8;
pub const MYNEWT_VAL_BLE_SOCK_CLI_SYSINIT_STAGE: u32 = 500;
pub const MYNEWT_VAL_BLE_SOCK_LINUX_DEV: u32 = 0;
pub const MYNEWT_VAL_BLE_SOCK_STACK_SIZE: u32 = 80;
pub const MYNEWT_VAL_BLE_SOCK_TASK_PRIO: u32 = 9;
pub const MYNEWT_VAL_BLE_SOCK_TCP_PORT: u32 = 14433;
pub const MYNEWT_VAL_BLE_SOCK_USE_LINUX_BLUE: u32 = 0;
pub const MYNEWT_VAL_BLE_SOCK_USE_TCP: u32 = 1;
pub const MYNEWT_VAL_APP_NAME: &'static [u8; 10usize] = b"dummy_app\0";
pub const MYNEWT_VAL_APP_dummy_app: u32 = 1;
pub const MYNEWT_VAL_ARCH_NAME: &'static [u8; 6usize] = b"dummy\0";
pub const MYNEWT_VAL_ARCH_dummy: u32 = 1;
pub const MYNEWT_VAL_BSP_NAME: &'static [u8; 10usize] = b"dummy_bsp\0";
pub const MYNEWT_VAL_BSP_dummy_bsp: u32 = 1;
pub const MYNEWT_VAL_NEWT_FEATURE_LOGCFG: u32 = 1;
pub const MYNEWT_VAL_NEWT_FEATURE_SYSDOWN: u32 = 1;
pub const MYNEWT_VAL_TARGET_NAME: &'static [u8; 16usize] = b"porting_default\0";
pub const MYNEWT_VAL_TARGET_porting_default: u32 = 1;
pub const true_: u32 = 1;
pub const false_: u32 = 0;
pub const __bool_true_false_are_defined: u32 = 1;
pub const _STDINT_H: u32 = 1;
pub const _FEATURES_H: u32 = 1;
pub const _DEFAULT_SOURCE: u32 = 1;
pub const __GLIBC_USE_ISOC2X: u32 = 0;
pub const __USE_ISOC11: u32 = 1;
pub const __USE_ISOC99: u32 = 1;
pub const __USE_ISOC95: u32 = 1;
pub const __USE_POSIX_IMPLICITLY: u32 = 1;
pub const _POSIX_SOURCE: u32 = 1;
pub const _POSIX_C_SOURCE: u32 = 200809;
pub const __USE_POSIX: u32 = 1;
pub const __USE_POSIX2: u32 = 1;
pub const __USE_POSIX199309: u32 = 1;
pub const __USE_POSIX199506: u32 = 1;
pub const __USE_XOPEN2K: u32 = 1;
pub const __USE_XOPEN2K8: u32 = 1;
pub const _ATFILE_SOURCE: u32 = 1;
pub const __USE_MISC: u32 = 1;
pub const __USE_ATFILE: u32 = 1;
pub const __USE_FORTIFY_LEVEL: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
pub const _STDC_PREDEF_H: u32 = 1;
pub const __STDC_IEC_559__: u32 = 1;
pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
pub const __STDC_ISO_10646__: u32 = 201706;
pub const __GNU_LIBRARY__: u32 = 6;
pub const __GLIBC__: u32 = 2;
pub const __GLIBC_MINOR__: u32 = 31;
pub const _SYS_CDEFS_H: u32 = 1;
pub const __glibc_c99_flexarr_available: u32 = 1;
pub const __WORDSIZE: u32 = 64;
pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
pub const __SYSCALL_WORDSIZE: u32 = 64;
pub const __LONG_DOUBLE_USES_FLOAT128: u32 = 0;
pub const __HAVE_GENERIC_SELECTION: u32 = 1;
pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0;
pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
pub const _BITS_TYPES_H: u32 = 1;
pub const __TIMESIZE: u32 = 64;
pub const _BITS_TYPESIZES_H: u32 = 1;
pub const __OFF_T_MATCHES_OFF64_T: u32 = 1;
pub const __INO_T_MATCHES_INO64_T: u32 = 1;
pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1;
pub const __STATFS_MATCHES_STATFS64: u32 = 1;
pub const __FD_SETSIZE: u32 = 1024;
pub const _BITS_TIME64_H: u32 = 1;
pub const _BITS_WCHAR_H: u32 = 1;
pub const _BITS_STDINT_INTN_H: u32 = 1;
pub const _BITS_STDINT_UINTN_H: u32 = 1;
pub const INT8_MIN: i32 = -128;
pub const INT16_MIN: i32 = -32768;
pub const INT32_MIN: i32 = -2147483648;
pub const INT8_MAX: u32 = 127;
pub const INT16_MAX: u32 = 32767;
pub const INT32_MAX: u32 = 2147483647;
pub const UINT8_MAX: u32 = 255;
pub const UINT16_MAX: u32 = 65535;
pub const UINT32_MAX: u32 = 4294967295;
pub const INT_LEAST8_MIN: i32 = -128;
pub const INT_LEAST16_MIN: i32 = -32768;
pub const INT_LEAST32_MIN: i32 = -2147483648;
pub const INT_LEAST8_MAX: u32 = 127;
pub const INT_LEAST16_MAX: u32 = 32767;
pub const INT_LEAST32_MAX: u32 = 2147483647;
pub const UINT_LEAST8_MAX: u32 = 255;
pub const UINT_LEAST16_MAX: u32 = 65535;
pub const UINT_LEAST32_MAX: u32 = 4294967295;
pub const INT_FAST8_MIN: i32 = -128;
pub const INT_FAST16_MIN: i64 = -9223372036854775808;
pub const INT_FAST32_MIN: i64 = -9223372036854775808;
pub const INT_FAST8_MAX: u32 = 127;
pub const INT_FAST16_MAX: u64 = 9223372036854775807;
pub const INT_FAST32_MAX: u64 = 9223372036854775807;
pub const UINT_FAST8_MAX: u32 = 255;
pub const UINT_FAST16_MAX: i32 = -1;
pub const UINT_FAST32_MAX: i32 = -1;
pub const INTPTR_MIN: i64 = -9223372036854775808;
pub const INTPTR_MAX: u64 = 9223372036854775807;
pub const UINTPTR_MAX: i32 = -1;
pub const PTRDIFF_MIN: i64 = -9223372036854775808;
pub const PTRDIFF_MAX: u64 = 9223372036854775807;
pub const SIG_ATOMIC_MIN: i32 = -2147483648;
pub const SIG_ATOMIC_MAX: u32 = 2147483647;
pub const SIZE_MAX: i32 = -1;
pub const WINT_MIN: u32 = 0;
pub const WINT_MAX: u32 = 4294967295;
pub const BLE_NPL_OS_ALIGNMENT: u32 = 4;
pub const BLE_NPL_TIME_FOREVER: u32 = 4294967295;
pub const _INTTYPES_H: u32 = 1;
pub const ____gwchar_t_defined: u32 = 1;
pub const __PRI64_PREFIX: &'static [u8; 2usize] = b"l\0";
pub const __PRIPTR_PREFIX: &'static [u8; 2usize] = b"l\0";
pub const PRId8: &'static [u8; 2usize] = b"d\0";
pub const PRId16: &'static [u8; 2usize] = b"d\0";
pub const PRId32: &'static [u8; 2usize] = b"d\0";
pub const PRId64: &'static [u8; 3usize] = b"ld\0";
pub const PRIdLEAST8: &'static [u8; 2usize] = b"d\0";
pub const PRIdLEAST16: &'static [u8; 2usize] = b"d\0";
pub const PRIdLEAST32: &'static [u8; 2usize] = b"d\0";
pub const PRIdLEAST64: &'static [u8; 3usize] = b"ld\0";
pub const PRIdFAST8: &'static [u8; 2usize] = b"d\0";
pub const PRIdFAST16: &'static [u8; 3usize] = b"ld\0";
pub const PRIdFAST32: &'static [u8; 3usize] = b"ld\0";
pub const PRIdFAST64: &'static [u8; 3usize] = b"ld\0";
pub const PRIi8: &'static [u8; 2usize] = b"i\0";
pub const PRIi16: &'static [u8; 2usize] = b"i\0";
pub const PRIi32: &'static [u8; 2usize] = b"i\0";
pub const PRIi64: &'static [u8; 3usize] = b"li\0";
pub const PRIiLEAST8: &'static [u8; 2usize] = b"i\0";
pub const PRIiLEAST16: &'static [u8; 2usize] = b"i\0";
pub const PRIiLEAST32: &'static [u8; 2usize] = b"i\0";
pub const PRIiLEAST64: &'static [u8; 3usize] = b"li\0";
pub const PRIiFAST8: &'static [u8; 2usize] = b"i\0";
pub const PRIiFAST16: &'static [u8; 3usize] = b"li\0";
pub const PRIiFAST32: &'static [u8; 3usize] = b"li\0";
pub const PRIiFAST64: &'static [u8; 3usize] = b"li\0";
pub const PRIo8: &'static [u8; 2usize] = b"o\0";
pub const PRIo16: &'static [u8; 2usize] = b"o\0";
pub const PRIo32: &'static [u8; 2usize] = b"o\0";
pub const PRIo64: &'static [u8; 3usize] = b"lo\0";
pub const PRIoLEAST8: &'static [u8; 2usize] = b"o\0";
pub const PRIoLEAST16: &'static [u8; 2usize] = b"o\0";
pub const PRIoLEAST32: &'static [u8; 2usize] = b"o\0";
pub const PRIoLEAST64: &'static [u8; 3usize] = b"lo\0";
pub const PRIoFAST8: &'static [u8; 2usize] = b"o\0";
pub const PRIoFAST16: &'static [u8; 3usize] = b"lo\0";
pub const PRIoFAST32: &'static [u8; 3usize] = b"lo\0";
pub const PRIoFAST64: &'static [u8; 3usize] = b"lo\0";
pub const PRIu8: &'static [u8; 2usize] = b"u\0";
pub const PRIu16: &'static [u8; 2usize] = b"u\0";
pub const PRIu32: &'static [u8; 2usize] = b"u\0";
pub const PRIu64: &'static [u8; 3usize] = b"lu\0";
pub const PRIuLEAST8: &'static [u8; 2usize] = b"u\0";
pub const PRIuLEAST16: &'static [u8; 2usize] = b"u\0";
pub const PRIuLEAST32: &'static [u8; 2usize] = b"u\0";
pub const PRIuLEAST64: &'static [u8; 3usize] = b"lu\0";
pub const PRIuFAST8: &'static [u8; 2usize] = b"u\0";
pub const PRIuFAST16: &'static [u8; 3usize] = b"lu\0";
pub const PRIuFAST32: &'static [u8; 3usize] = b"lu\0";
pub const PRIuFAST64: &'static [u8; 3usize] = b"lu\0";
pub const PRIx8: &'static [u8; 2usize] = b"x\0";
pub const PRIx16: &'static [u8; 2usize] = b"x\0";
pub const PRIx32: &'static [u8; 2usize] = b"x\0";
pub const PRIx64: &'static [u8; 3usize] = b"lx\0";
pub const PRIxLEAST8: &'static [u8; 2usize] = b"x\0";
pub const PRIxLEAST16: &'static [u8; 2usize] = b"x\0";
pub const PRIxLEAST32: &'static [u8; 2usize] = b"x\0";
pub const PRIxLEAST64: &'static [u8; 3usize] = b"lx\0";
pub const PRIxFAST8: &'static [u8; 2usize] = b"x\0";
pub const PRIxFAST16: &'static [u8; 3usize] = b"lx\0";
pub const PRIxFAST32: &'static [u8; 3usize] = b"lx\0";
pub const PRIxFAST64: &'static [u8; 3usize] = b"lx\0";
pub const PRIX8: &'static [u8; 2usize] = b"X\0";
pub const PRIX16: &'static [u8; 2usize] = b"X\0";
pub const PRIX32: &'static [u8; 2usize] = b"X\0";
pub const PRIX64: &'static [u8; 3usize] = b"lX\0";
pub const PRIXLEAST8: &'static [u8; 2usize] = b"X\0";
pub const PRIXLEAST16: &'static [u8; 2usize] = b"X\0";
pub const PRIXLEAST32: &'static [u8; 2usize] = b"X\0";
pub const PRIXLEAST64: &'static [u8; 3usize] = b"lX\0";
pub const PRIXFAST8: &'static [u8; 2usize] = b"X\0";
pub const PRIXFAST16: &'static [u8; 3usize] = b"lX\0";
pub const PRIXFAST32: &'static [u8; 3usize] = b"lX\0";
pub const PRIXFAST64: &'static [u8; 3usize] = b"lX\0";
pub const PRIdMAX: &'static [u8; 3usize] = b"ld\0";
pub const PRIiMAX: &'static [u8; 3usize] = b"li\0";
pub const PRIoMAX: &'static [u8; 3usize] = b"lo\0";
pub const PRIuMAX: &'static [u8; 3usize] = b"lu\0";
pub const PRIxMAX: &'static [u8; 3usize] = b"lx\0";
pub const PRIXMAX: &'static [u8; 3usize] = b"lX\0";
pub const PRIdPTR: &'static [u8; 3usize] = b"ld\0";
pub const PRIiPTR: &'static [u8; 3usize] = b"li\0";
pub const PRIoPTR: &'static [u8; 3usize] = b"lo\0";
pub const PRIuPTR: &'static [u8; 3usize] = b"lu\0";
pub const PRIxPTR: &'static [u8; 3usize] = b"lx\0";
pub const PRIXPTR: &'static [u8; 3usize] = b"lX\0";
pub const SCNd8: &'static [u8; 4usize] = b"hhd\0";
pub const SCNd16: &'static [u8; 3usize] = b"hd\0";
pub const SCNd32: &'static [u8; 2usize] = b"d\0";
pub const SCNd64: &'static [u8; 3usize] = b"ld\0";
pub const SCNdLEAST8: &'static [u8; 4usize] = b"hhd\0";
pub const SCNdLEAST16: &'static [u8; 3usize] = b"hd\0";
pub const SCNdLEAST32: &'static [u8; 2usize] = b"d\0";
pub const SCNdLEAST64: &'static [u8; 3usize] = b"ld\0";
pub const SCNdFAST8: &'static [u8; 4usize] = b"hhd\0";
pub const SCNdFAST16: &'static [u8; 3usize] = b"ld\0";
pub const SCNdFAST32: &'static [u8; 3usize] = b"ld\0";
pub const SCNdFAST64: &'static [u8; 3usize] = b"ld\0";
pub const SCNi8: &'static [u8; 4usize] = b"hhi\0";
pub const SCNi16: &'static [u8; 3usize] = b"hi\0";
pub const SCNi32: &'static [u8; 2usize] = b"i\0";
pub const SCNi64: &'static [u8; 3usize] = b"li\0";
pub const SCNiLEAST8: &'static [u8; 4usize] = b"hhi\0";
pub const SCNiLEAST16: &'static [u8; 3usize] = b"hi\0";
pub const SCNiLEAST32: &'static [u8; 2usize] = b"i\0";
pub const SCNiLEAST64: &'static [u8; 3usize] = b"li\0";
pub const SCNiFAST8: &'static [u8; 4usize] = b"hhi\0";
pub const SCNiFAST16: &'static [u8; 3usize] = b"li\0";
pub const SCNiFAST32: &'static [u8; 3usize] = b"li\0";
pub const SCNiFAST64: &'static [u8; 3usize] = b"li\0";
pub const SCNu8: &'static [u8; 4usize] = b"hhu\0";
pub const SCNu16: &'static [u8; 3usize] = b"hu\0";
pub const SCNu32: &'static [u8; 2usize] = b"u\0";
pub const SCNu64: &'static [u8; 3usize] = b"lu\0";
pub const SCNuLEAST8: &'static [u8; 4usize] = b"hhu\0";
pub const SCNuLEAST16: &'static [u8; 3usize] = b"hu\0";
pub const SCNuLEAST32: &'static [u8; 2usize] = b"u\0";
pub const SCNuLEAST64: &'static [u8; 3usize] = b"lu\0";
pub const SCNuFAST8: &'static [u8; 4usize] = b"hhu\0";
pub const SCNuFAST16: &'static [u8; 3usize] = b"lu\0";
pub const SCNuFAST32: &'static [u8; 3usize] = b"lu\0";
pub const SCNuFAST64: &'static [u8; 3usize] = b"lu\0";
pub const SCNo8: &'static [u8; 4usize] = b"hho\0";
pub const SCNo16: &'static [u8; 3usize] = b"ho\0";
pub const SCNo32: &'static [u8; 2usize] = b"o\0";
pub const SCNo64: &'static [u8; 3usize] = b"lo\0";
pub const SCNoLEAST8: &'static [u8; 4usize] = b"hho\0";
pub const SCNoLEAST16: &'static [u8; 3usize] = b"ho\0";
pub const SCNoLEAST32: &'static [u8; 2usize] = b"o\0";
pub const SCNoLEAST64: &'static [u8; 3usize] = b"lo\0";
pub const SCNoFAST8: &'static [u8; 4usize] = b"hho\0";
pub const SCNoFAST16: &'static [u8; 3usize] = b"lo\0";
pub const SCNoFAST32: &'static [u8; 3usize] = b"lo\0";
pub const SCNoFAST64: &'static [u8; 3usize] = b"lo\0";
pub const SCNx8: &'static [u8; 4usize] = b"hhx\0";
pub const SCNx16: &'static [u8; 3usize] = b"hx\0";
pub const SCNx32: &'static [u8; 2usize] = b"x\0";
pub const SCNx64: &'static [u8; 3usize] = b"lx\0";
pub const SCNxLEAST8: &'static [u8; 4usize] = b"hhx\0";
pub const SCNxLEAST16: &'static [u8; 3usize] = b"hx\0";
pub const SCNxLEAST32: &'static [u8; 2usize] = b"x\0";
pub const SCNxLEAST64: &'static [u8; 3usize] = b"lx\0";
pub const SCNxFAST8: &'static [u8; 4usize] = b"hhx\0";
pub const SCNxFAST16: &'static [u8; 3usize] = b"lx\0";
pub const SCNxFAST32: &'static [u8; 3usize] = b"lx\0";
pub const SCNxFAST64: &'static [u8; 3usize] = b"lx\0";
pub const SCNdMAX: &'static [u8; 3usize] = b"ld\0";
pub const SCNiMAX: &'static [u8; 3usize] = b"li\0";
pub const SCNoMAX: &'static [u8; 3usize] = b"lo\0";
pub const SCNuMAX: &'static [u8; 3usize] = b"lu\0";
pub const SCNxMAX: &'static [u8; 3usize] = b"lx\0";
pub const SCNdPTR: &'static [u8; 3usize] = b"ld\0";
pub const SCNiPTR: &'static [u8; 3usize] = b"li\0";
pub const SCNoPTR: &'static [u8; 3usize] = b"lo\0";
pub const SCNuPTR: &'static [u8; 3usize] = b"lu\0";
pub const SCNxPTR: &'static [u8; 3usize] = b"lx\0";
pub const _STRING_H: u32 = 1;
pub const _BITS_TYPES_LOCALE_T_H: u32 = 1;
pub const _BITS_TYPES___LOCALE_T_H: u32 = 1;
pub const _STRINGS_H: u32 = 1;
pub const _ASSERT_H: u32 = 1;
pub const OS_ALIGNMENT: u32 = 4;
pub const OS_MEMPOOL_F_EXT: u32 = 1;
pub const OS_MEMPOOL_INFO_NAME_LEN: u32 = 32;
pub const BLE_ENC_BLOCK_SIZE: u32 = 16;
pub const BLE_ACL_MAX_PKT_SIZE: u32 = 255;
pub const BLE_MBUF_HDR_F_CONN_CREDIT: u32 = 32768;
pub const BLE_MBUF_HDR_F_IGNORED: u32 = 32768;
pub const BLE_MBUF_HDR_F_SCAN_REQ_TXD: u32 = 16384;
pub const BLE_MBUF_HDR_F_INITA_RESOLVED: u32 = 8192;
pub const BLE_MBUF_HDR_F_TARGETA_RESOLVED: u32 = 8192;
pub const BLE_MBUF_HDR_F_EXT_ADV_SEC: u32 = 4096;
pub const BLE_MBUF_HDR_F_EXT_ADV: u32 = 2048;
pub const BLE_MBUF_HDR_F_RESOLVED: u32 = 1024;
pub const BLE_MBUF_HDR_F_AUX_PTR_WAIT: u32 = 512;
pub const BLE_MBUF_HDR_F_AUX_INVALID: u32 = 256;
pub const BLE_MBUF_HDR_F_CRC_OK: u32 = 128;
pub const BLE_MBUF_HDR_F_DEVMATCH: u32 = 64;
pub const BLE_MBUF_HDR_F_MIC_FAILURE: u32 = 32;
pub const BLE_MBUF_HDR_F_SCAN_RSP_TXD: u32 = 16;
pub const BLE_MBUF_HDR_F_SCAN_RSP_RXD: u32 = 8;
pub const BLE_MBUF_HDR_F_RXSTATE_MASK: u32 = 7;
pub const BLE_MBUF_HS_HDR_LEN: u32 = 2;
pub const BLE_DEV_ADDR_LEN: u32 = 6;
pub const BLE_HW_ERR_DO_NOT_USE: u32 = 0;
pub const BLE_HW_ERR_HCI_SYNC_LOSS: u32 = 1;
pub const BLE_OWN_ADDR_PUBLIC: u32 = 0;
pub const BLE_OWN_ADDR_RANDOM: u32 = 1;
pub const BLE_OWN_ADDR_RPA_PUBLIC_DEFAULT: u32 = 2;
pub const BLE_OWN_ADDR_RPA_RANDOM_DEFAULT: u32 = 3;
pub const BLE_ADDR_PUBLIC: u32 = 0;
pub const BLE_ADDR_RANDOM: u32 = 1;
pub const BLE_ADDR_PUBLIC_ID: u32 = 2;
pub const BLE_ADDR_RANDOM_ID: u32 = 3;
pub const BLE_HCI_OPCODE_NOP: u32 = 0;
pub const BLE_HCI_OGF_LINK_CTRL: u32 = 1;
pub const BLE_HCI_OGF_LINK_POLICY: u32 = 2;
pub const BLE_HCI_OGF_CTLR_BASEBAND: u32 = 3;
pub const BLE_HCI_OGF_INFO_PARAMS: u32 = 4;
pub const BLE_HCI_OGF_STATUS_PARAMS: u32 = 5;
pub const BLE_HCI_OGF_TESTING: u32 = 6;
pub const BLE_HCI_OGF_LE: u32 = 8;
pub const BLE_HCI_OGF_VENDOR: u32 = 63;
pub const BLE_HCI_NUM_LE_CMDS: u32 = 79;
pub const BLE_HCI_OCF_DISCONNECT_CMD: u32 = 6;
pub const BLE_HCI_OCF_RD_REM_VER_INFO: u32 = 29;
pub const BLE_HCI_OCF_CB_SET_EVENT_MASK: u32 = 1;
pub const BLE_HCI_OCF_CB_RESET: u32 = 3;
pub const BLE_HCI_OCF_CB_READ_TX_PWR: u32 = 45;
pub const BLE_HCI_OCF_CB_SET_CTLR_TO_HOST_FC: u32 = 49;
pub const BLE_HCI_OCF_CB_HOST_BUF_SIZE: u32 = 51;
pub const BLE_HCI_OCF_CB_HOST_NUM_COMP_PKTS: u32 = 53;
pub const BLE_HCI_OCF_CB_SET_EVENT_MASK2: u32 = 99;
pub const BLE_HCI_OCF_CB_RD_AUTH_PYLD_TMO: u32 = 123;
pub const BLE_HCI_OCF_CB_WR_AUTH_PYLD_TMO: u32 = 124;
pub const BLE_HCI_OCF_IP_RD_LOCAL_VER: u32 = 1;
pub const BLE_HCI_OCF_IP_RD_LOC_SUPP_CMD: u32 = 2;
pub const BLE_HCI_OCF_IP_RD_LOC_SUPP_FEAT: u32 = 3;
pub const BLE_HCI_OCF_IP_RD_BUF_SIZE: u32 = 5;
pub const BLE_HCI_OCF_IP_RD_BD_ADDR: u32 = 9;
pub const BLE_HCI_OCF_RD_RSSI: u32 = 5;
pub const BLE_HCI_OCF_LE_SET_EVENT_MASK: u32 = 1;
pub const BLE_HCI_OCF_LE_RD_BUF_SIZE: u32 = 2;
pub const BLE_HCI_OCF_LE_RD_BUF_SIZE_V2: u32 = 96;
pub const BLE_HCI_OCF_LE_RD_LOC_SUPP_FEAT: u32 = 3;
pub const BLE_HCI_OCF_LE_SET_RAND_ADDR: u32 = 5;
pub const BLE_HCI_OCF_LE_SET_ADV_PARAMS: u32 = 6;
pub const BLE_HCI_OCF_LE_RD_ADV_CHAN_TXPWR: u32 = 7;
pub const BLE_HCI_OCF_LE_SET_ADV_DATA: u32 = 8;
pub const BLE_HCI_MAX_ADV_DATA_LEN: u32 = 31;
pub const BLE_HCI_OCF_LE_SET_SCAN_RSP_DATA: u32 = 9;
pub const BLE_HCI_MAX_SCAN_RSP_DATA_LEN: u32 = 31;
pub const BLE_HCI_OCF_LE_SET_ADV_ENABLE: u32 = 10;
pub const BLE_HCI_OCF_LE_SET_SCAN_PARAMS: u32 = 11;
pub const BLE_HCI_OCF_LE_SET_SCAN_ENABLE: u32 = 12;
pub const BLE_HCI_OCF_LE_CREATE_CONN: u32 = 13;
pub const BLE_HCI_OCF_LE_CREATE_CONN_CANCEL: u32 = 14;
pub const BLE_HCI_OCF_LE_RD_WHITE_LIST_SIZE: u32 = 15;
pub const BLE_HCI_OCF_LE_CLEAR_WHITE_LIST: u32 = 16;
pub const BLE_HCI_OCF_LE_ADD_WHITE_LIST: u32 = 17;
pub const BLE_HCI_OCF_LE_RMV_WHITE_LIST: u32 = 18;
pub const BLE_HCI_OCF_LE_CONN_UPDATE: u32 = 19;
pub const BLE_HCI_OCF_LE_SET_HOST_CHAN_CLASS: u32 = 20;
pub const BLE_HCI_OCF_LE_RD_CHAN_MAP: u32 = 21;
pub const BLE_HCI_OCF_LE_RD_REM_FEAT: u32 = 22;
pub const BLE_HCI_OCF_LE_ENCRYPT: u32 = 23;
pub const BLE_HCI_OCF_LE_RAND: u32 = 24;
pub const BLE_HCI_OCF_LE_START_ENCRYPT: u32 = 25;
pub const BLE_HCI_OCF_LE_LT_KEY_REQ_REPLY: u32 = 26;
pub const BLE_HCI_OCF_LE_LT_KEY_REQ_NEG_REPLY: u32 = 27;
pub const BLE_HCI_OCF_LE_RD_SUPP_STATES: u32 = 28;
pub const BLE_HCI_OCF_LE_RX_TEST: u32 = 29;
pub const BLE_HCI_OCF_LE_TX_TEST: u32 = 30;
pub const BLE_HCI_OCF_LE_TEST_END: u32 = 31;
pub const BLE_HCI_OCF_LE_REM_CONN_PARAM_RR: u32 = 32;
pub const BLE_HCI_OCF_LE_REM_CONN_PARAM_NRR: u32 = 33;
pub const BLE_HCI_OCF_LE_SET_DATA_LEN: u32 = 34;
pub const BLE_HCI_OCF_LE_RD_SUGG_DEF_DATA_LEN: u32 = 35;
pub const BLE_HCI_OCF_LE_WR_SUGG_DEF_DATA_LEN: u32 = 36;
pub const BLE_HCI_OCF_LE_RD_P256_PUBKEY: u32 = 37;
pub const BLE_HCI_OCF_LE_GEN_DHKEY: u32 = 38;
pub const BLE_HCI_OCF_LE_ADD_RESOLV_LIST: u32 = 39;
pub const BLE_HCI_OCF_LE_RMV_RESOLV_LIST: u32 = 40;
pub const BLE_HCI_OCF_LE_CLR_RESOLV_LIST: u32 = 41;
pub const BLE_HCI_OCF_LE_RD_RESOLV_LIST_SIZE: u32 = 42;
pub const BLE_HCI_OCF_LE_RD_PEER_RESOLV_ADDR: u32 = 43;
pub const BLE_HCI_OCF_LE_RD_LOCAL_RESOLV_ADDR: u32 = 44;
pub const BLE_HCI_OCF_LE_SET_ADDR_RES_EN: u32 = 45;
pub const BLE_HCI_OCF_LE_SET_RPA_TMO: u32 = 46;
pub const BLE_HCI_OCF_LE_RD_MAX_DATA_LEN: u32 = 47;
pub const BLE_HCI_OCF_LE_RD_PHY: u32 = 48;
pub const BLE_HCI_OCF_LE_SET_DEFAULT_PHY: u32 = 49;
pub const BLE_HCI_OCF_LE_SET_PHY: u32 = 50;
pub const BLE_HCI_OCF_LE_RX_TEST_V2: u32 = 51;
pub const BLE_HCI_OCF_LE_TX_TEST_V2: u32 = 52;
pub const BLE_HCI_OCF_LE_SET_ADV_SET_RND_ADDR: u32 = 53;
pub const BLE_HCI_OCF_LE_SET_EXT_ADV_PARAM: u32 = 54;
pub const BLE_HCI_OCF_LE_SET_EXT_ADV_DATA: u32 = 55;
pub const BLE_HCI_OCF_LE_SET_EXT_SCAN_RSP_DATA: u32 = 56;
pub const BLE_HCI_OCF_LE_SET_EXT_ADV_ENABLE: u32 = 57;
pub const BLE_HCI_OCF_LE_RD_MAX_ADV_DATA_LEN: u32 = 58;
pub const BLE_HCI_OCF_LE_RD_NUM_OF_ADV_SETS: u32 = 59;
pub const BLE_HCI_OCF_LE_REMOVE_ADV_SET: u32 = 60;
pub const BLE_HCI_OCF_LE_CLEAR_ADV_SETS: u32 = 61;
pub const BLE_HCI_OCF_LE_SET_PERIODIC_ADV_PARAMS: u32 = 62;
pub const BLE_HCI_OCF_LE_SET_PERIODIC_ADV_DATA: u32 = 63;
pub const BLE_HCI_OCF_LE_SET_PERIODIC_ADV_ENABLE: u32 = 64;
pub const BLE_HCI_OCF_LE_SET_EXT_SCAN_PARAM: u32 = 65;
pub const BLE_HCI_OCF_LE_SET_EXT_SCAN_ENABLE: u32 = 66;
pub const BLE_HCI_OCF_LE_EXT_CREATE_CONN: u32 = 67;
pub const BLE_HCI_LE_PERIODIC_ADV_CREATE_SYNC_OPT_FILTER: u32 = 1;
pub const BLE_HCI_LE_PERIODIC_ADV_CREATE_SYNC_OPT_DISABLED: u32 = 2;
pub const BLE_HCI_OCF_LE_PERIODIC_ADV_CREATE_SYNC: u32 = 68;
pub const BLE_HCI_OCF_LE_PERIODIC_ADV_CREATE_SYNC_CANCEL: u32 = 69;
pub const BLE_HCI_OCF_LE_PERIODIC_ADV_TERM_SYNC: u32 = 70;
pub const BLE_HCI_OCF_LE_ADD_DEV_TO_PERIODIC_ADV_LIST: u32 = 71;
pub const BLE_HCI_OCF_LE_REM_DEV_FROM_PERIODIC_ADV_LIST: u32 = 72;
pub const BLE_HCI_OCF_LE_CLEAR_PERIODIC_ADV_LIST: u32 = 73;
pub const BLE_HCI_OCF_LE_RD_PERIODIC_ADV_LIST_SIZE: u32 = 74;
pub const BLE_HCI_OCF_LE_RD_TRANSMIT_POWER: u32 = 75;
pub const BLE_HCI_OCF_LE_RD_RF_PATH_COMPENSATION: u32 = 76;
pub const BLE_HCI_OCF_LE_WR_RF_PATH_COMPENSATION: u32 = 77;
pub const BLE_HCI_OCF_LE_SET_PRIVACY_MODE: u32 = 78;
pub const BLE_HCI_OCF_LE_RX_TEST_V3: u32 = 79;
pub const BLE_HCI_OCF_LE_TX_TEST_V3: u32 = 80;
pub const BLE_HCI_OCF_LE_SET_CONNLESS_CTE_TX_PARAMS: u32 = 81;
pub const BLE_HCI_OCF_LE_SET_CONNLESS_CTE_TX_ENABLE: u32 = 82;
pub const BLE_HCI_OCF_LE_SET_CONNLESS_IQ_SAMPLING_ENABLE: u32 = 83;
pub const BLE_HCI_OCF_LE_SET_CONN_CTE_RX_PARAMS: u32 = 84;
pub const BLE_HCI_OCF_LE_SET_CONN_CTE_TX_PARAMS: u32 = 85;
pub const BLE_HCI_OCF_LE_SET_CONN_CTE_REQ_ENABLE: u32 = 86;
pub const BLE_HCI_OCF_LE_SET_CONN_CTE_RESP_ENABLE: u32 = 87;
pub const BLE_HCI_OCF_LE_RD_ANTENNA_INFO: u32 = 88;
pub const BLE_HCI_OCF_LE_PERIODIC_ADV_RECEIVE_ENABLE: u32 = 89;
pub const BLE_HCI_OCF_LE_PERIODIC_ADV_SYNC_TRANSFER: u32 = 90;
pub const BLE_HCI_OCF_LE_PERIODIC_ADV_SET_INFO_TRANSFER: u32 = 91;
pub const BLE_HCI_OCF_LE_PERIODIC_ADV_SYNC_TRANSFER_PARAMS: u32 = 92;
pub const BLE_HCI_OCF_LE_SET_DEFAULT_SYNC_TRANSFER_PARAMS: u32 = 93;
pub const BLE_HCI_OCF_LE_GENERATE_DHKEY_V2: u32 = 94;
pub const BLE_HCI_OCF_LE_MODIFY_SCA: u32 = 95;
pub const BLE_HCI_OCF_LE_REQ_PEER_SCA: u32 = 109;
pub const BLE_HCI_OCF_LE_SET_HOST_FEAT: u32 = 116;
pub const BLE_HCI_CTLR_TO_HOST_FC_OFF: u32 = 0;
pub const BLE_HCI_CTLR_TO_HOST_FC_ACL: u32 = 1;
pub const BLE_HCI_CTLR_TO_HOST_FC_SYNC: u32 = 2;
pub const BLE_HCI_CTLR_TO_HOST_FC_BOTH: u32 = 3;
pub const BLE_HCI_ADV_TYPE_ADV_IND: u32 = 0;
pub const BLE_HCI_ADV_TYPE_ADV_DIRECT_IND_HD: u32 = 1;
pub const BLE_HCI_ADV_TYPE_ADV_SCAN_IND: u32 = 2;
pub const BLE_HCI_ADV_TYPE_ADV_NONCONN_IND: u32 = 3;
pub const BLE_HCI_ADV_TYPE_ADV_DIRECT_IND_LD: u32 = 4;
pub const BLE_HCI_ADV_TYPE_MAX: u32 = 4;
pub const BLE_HCI_ADV_CONN_MASK: u32 = 1;
pub const BLE_HCI_ADV_SCAN_MASK: u32 = 2;
pub const BLE_HCI_ADV_DIRECT_MASK: u32 = 4;
pub const BLE_HCI_ADV_SCAN_RSP_MASK: u32 = 8;
pub const BLE_HCI_ADV_LEGACY_MASK: u32 = 16;
pub const BLE_HCI_ADV_DATA_STATUS_COMPLETE: u32 = 0;
pub const BLE_HCI_ADV_DATA_STATUS_INCOMPLETE: u32 = 32;
pub const BLE_HCI_ADV_DATA_STATUS_TRUNCATED: u32 = 64;
pub const BLE_HCI_ADV_DATA_STATUS_MASK: u32 = 96;
pub const BLE_HCI_ADV_OWN_ADDR_PUBLIC: u32 = 0;
pub const BLE_HCI_ADV_OWN_ADDR_RANDOM: u32 = 1;
pub const BLE_HCI_ADV_OWN_ADDR_PRIV_PUB: u32 = 2;
pub const BLE_HCI_ADV_OWN_ADDR_PRIV_RAND: u32 = 3;
pub const BLE_HCI_ADV_OWN_ADDR_MAX: u32 = 3;
pub const BLE_HCI_ADV_PEER_ADDR_PUBLIC: u32 = 0;
pub const BLE_HCI_ADV_PEER_ADDR_RANDOM: u32 = 1;
pub const BLE_HCI_ADV_PEER_ADDR_MAX: u32 = 1;
pub const BLE_HCI_ADV_CHAN_TXPWR_MIN: i32 = -20;
pub const BLE_HCI_ADV_CHAN_TXPWR_MAX: u32 = 10;
pub const BLE_HCI_CONN_PEER_ADDR_PUBLIC: u32 = 0;
pub const BLE_HCI_CONN_PEER_ADDR_RANDOM: u32 = 1;
pub const BLE_HCI_CONN_PEER_ADDR_PUBLIC_IDENT: u32 = 2;
pub const BLE_HCI_CONN_PEER_ADDR_RANDOM_IDENT: u32 = 3;
pub const BLE_HCI_CONN_PEER_ADDR_MAX: u32 = 3;
pub const BLE_HCI_ADV_FILT_NONE: u32 = 0;
pub const BLE_HCI_ADV_FILT_SCAN: u32 = 1;
pub const BLE_HCI_ADV_FILT_CONN: u32 = 2;
pub const BLE_HCI_ADV_FILT_BOTH: u32 = 3;
pub const BLE_HCI_ADV_FILT_MAX: u32 = 3;
pub const BLE_HCI_ADV_FILT_DEF: u32 = 0;
pub const BLE_HCI_ADV_ITVL: u32 = 625;
pub const BLE_HCI_ADV_ITVL_MIN: u32 = 32;
pub const BLE_HCI_ADV_ITVL_MAX: u32 = 16384;
pub const BLE_HCI_ADV_ITVL_NONCONN_MIN: u32 = 160;
pub const BLE_HCI_ADV_ITVL_DEF: u32 = 2048;
pub const BLE_HCI_ADV_CHANMASK_DEF: u32 = 7;
pub const BLE_HCI_SCAN_TYPE_PASSIVE: u32 = 0;
pub const BLE_HCI_SCAN_TYPE_ACTIVE: u32 = 1;
pub const BLE_HCI_SCAN_ITVL: u32 = 625;
pub const BLE_HCI_SCAN_ITVL_MIN: u32 = 4;
pub const BLE_HCI_SCAN_ITVL_MAX: u32 = 16384;
pub const BLE_HCI_SCAN_ITVL_DEF: u32 = 16;
pub const BLE_HCI_SCAN_WINDOW_MIN: u32 = 4;
pub const BLE_HCI_SCAN_WINDOW_MAX: u32 = 16384;
pub const BLE_HCI_SCAN_WINDOW_DEF: u32 = 16;
pub const BLE_HCI_SCAN_FILT_NO_WL: u32 = 0;
pub const BLE_HCI_SCAN_FILT_USE_WL: u32 = 1;
pub const BLE_HCI_SCAN_FILT_NO_WL_INITA: u32 = 2;
pub const BLE_HCI_SCAN_FILT_USE_WL_INITA: u32 = 3;
pub const BLE_HCI_SCAN_FILT_MAX: u32 = 3;
pub const BLE_HCI_ADD_WHITE_LIST_LEN: u32 = 7;
pub const BLE_HCI_RMV_WHITE_LIST_LEN: u32 = 7;
pub const BLE_HCI_CREATE_CONN_LEN: u32 = 25;
pub const BLE_HCI_CONN_ITVL: u32 = 1250;
pub const BLE_HCI_CONN_FILT_NO_WL: u32 = 0;
pub const BLE_HCI_CONN_FILT_USE_WL: u32 = 1;
pub const BLE_HCI_CONN_FILT_MAX: u32 = 1;
pub const BLE_HCI_CONN_ITVL_MIN: u32 = 6;
pub const BLE_HCI_CONN_ITVL_MAX: u32 = 3200;
pub const BLE_HCI_CONN_LATENCY_MIN: u32 = 0;
pub const BLE_HCI_CONN_LATENCY_MAX: u32 = 499;
pub const BLE_HCI_CONN_SPVN_TIMEOUT_MIN: u32 = 10;
pub const BLE_HCI_CONN_SPVN_TIMEOUT_MAX: u32 = 3200;
pub const BLE_HCI_CONN_SPVN_TMO_UNITS: u32 = 10;
pub const BLE_HCI_INITIATOR_FILT_POLICY_MAX: u32 = 1;
pub const BLE_HCI_CONN_PEER_ADDR_PUB_ID: u32 = 2;
pub const BLE_HCI_CONN_PEER_ADDR_RAND_ID: u32 = 3;
pub const BLE_HCI_SET_DATALEN_TX_OCTETS_MIN: u32 = 27;
pub const BLE_HCI_SET_DATALEN_TX_OCTETS_MAX: u32 = 251;
pub const BLE_HCI_SET_DATALEN_TX_TIME_MIN: u32 = 328;
pub const BLE_HCI_SET_DATALEN_TX_TIME_MAX: u32 = 17040;
pub const BLE_HCI_LE_PHY_1M: u32 = 1;
pub const BLE_HCI_LE_PHY_2M: u32 = 2;
pub const BLE_HCI_LE_PHY_CODED: u32 = 3;
pub const BLE_HCI_LE_PHY_NO_TX_PREF_MASK: u32 = 1;
pub const BLE_HCI_LE_PHY_NO_RX_PREF_MASK: u32 = 2;
pub const BLE_HCI_LE_PHY_1M_PREF_MASK: u32 = 1;
pub const BLE_HCI_LE_PHY_2M_PREF_MASK: u32 = 2;
pub const BLE_HCI_LE_PHY_CODED_PREF_MASK: u32 = 4;
pub const BLE_HCI_LE_PHY_PREF_MASK_ALL: u32 = 7;
pub const BLE_HCI_LE_PHY_CODED_ANY: u32 = 0;
pub const BLE_HCI_LE_PHY_CODED_S2_PREF: u32 = 1;
pub const BLE_HCI_LE_PHY_CODED_S8_PREF: u32 = 2;
pub const BLE_HCI_LE_PHY_CODED_S8: u32 = 3;
pub const BLE_HCI_LE_PHY_CODED_S2: u32 = 4;
pub const BLE_HCI_LE_SET_EXT_ADV_PROP_CONNECTABLE: u32 = 1;
pub const BLE_HCI_LE_SET_EXT_ADV_PROP_SCANNABLE: u32 = 2;
pub const BLE_HCI_LE_SET_EXT_ADV_PROP_DIRECTED: u32 = 4;
pub const BLE_HCI_LE_SET_EXT_ADV_PROP_HD_DIRECTED: u32 = 8;
pub const BLE_HCI_LE_SET_EXT_ADV_PROP_LEGACY: u32 = 16;
pub const BLE_HCI_LE_SET_EXT_ADV_PROP_ANON_ADV: u32 = 32;
pub const BLE_HCI_LE_SET_EXT_ADV_PROP_INC_TX_PWR: u32 = 64;
pub const BLE_HCI_LE_SET_EXT_ADV_PROP_MASK: u32 = 127;
pub const BLE_HCI_LE_SET_EXT_ADV_PROP_LEGACY_IND: u32 = 19;
pub const BLE_HCI_LE_SET_EXT_ADV_PROP_LEGACY_LD_DIR: u32 = 21;
pub const BLE_HCI_LE_SET_EXT_ADV_PROP_LEGACY_HD_DIR: u32 = 29;
pub const BLE_HCI_LE_SET_EXT_ADV_PROP_LEGACY_SCAN: u32 = 18;
pub const BLE_HCI_LE_SET_EXT_ADV_PROP_LEGACY_NONCONN: u32 = 16;
pub const BLE_HCI_MAX_EXT_ADV_DATA_LEN: u32 = 251;
pub const BLE_HCI_LE_SET_DATA_OPER_INT: u32 = 0;
pub const BLE_HCI_LE_SET_DATA_OPER_FIRST: u32 = 1;
pub const BLE_HCI_LE_SET_DATA_OPER_LAST: u32 = 2;
pub const BLE_HCI_LE_SET_DATA_OPER_COMPLETE: u32 = 3;
pub const BLE_HCI_LE_SET_DATA_OPER_UNCHANGED: u32 = 4;
pub const BLE_HCI_MAX_EXT_SCAN_RSP_DATA_LEN: u32 = 251;
pub const BLE_HCI_LE_SET_PERIODIC_ADV_PROP_INC_TX_PWR: u32 = 64;
pub const BLE_HCI_LE_SET_PERIODIC_ADV_PROP_MASK: u32 = 64;
pub const BLE_HCI_MAX_PERIODIC_ADV_DATA_LEN: u32 = 252;
pub const BLE_HCI_PERIODIC_DATA_STATUS_COMPLETE: u32 = 0;
pub const BLE_HCI_PERIODIC_DATA_STATUS_INCOMPLETE: u32 = 1;
pub const BLE_HCI_PERIODIC_DATA_STATUS_TRUNCATED: u32 = 2;
pub const BLE_HCI_PRIVACY_NETWORK: u32 = 0;
pub const BLE_HCI_PRIVACY_DEVICE: u32 = 1;
pub const BLE_HCI_EVCODE_INQUIRY_CMP: u32 = 1;
pub const BLE_HCI_EVCODE_INQUIRY_RESULT: u32 = 2;
pub const BLE_HCI_EVCODE_CONN_DONE: u32 = 3;
pub const BLE_HCI_EVCODE_CONN_REQUEST: u32 = 4;
pub const BLE_HCI_EVCODE_DISCONN_CMP: u32 = 5;
pub const BLE_HCI_EVCODE_AUTH_CMP: u32 = 6;
pub const BLE_HCI_EVCODE_REM_NAME_REQ_CMP: u32 = 7;
pub const BLE_HCI_EVCODE_ENCRYPT_CHG: u32 = 8;
pub const BLE_HCI_EVCODE_CHG_LINK_KEY_CMP: u32 = 9;
pub const BLE_HCI_EVCODE_MASTER_LINK_KEY_CMP: u32 = 10;
pub const BLE_HCI_EVCODE_RD_REM_SUPP_FEAT_CMP: u32 = 11;
pub const BLE_HCI_EVCODE_RD_REM_VER_INFO_CMP: u32 = 12;
pub const BLE_HCI_EVCODE_QOS_SETUP_CMP: u32 = 13;
pub const BLE_HCI_EVCODE_COMMAND_COMPLETE: u32 = 14;
pub const BLE_HCI_EVCODE_COMMAND_STATUS: u32 = 15;
pub const BLE_HCI_EVCODE_HW_ERROR: u32 = 16;
pub const BLE_HCI_EVCODE_NUM_COMP_PKTS: u32 = 19;
pub const BLE_HCI_EVCODE_MODE_CHANGE: u32 = 20;
pub const BLE_HCI_EVCODE_RETURN_LINK_KEYS: u32 = 21;
pub const BLE_HCI_EVCODE_PIN_CODE_REQ: u32 = 22;
pub const BLE_HCI_EVCODE_LINK_KEY_REQ: u32 = 23;
pub const BLE_HCI_EVCODE_LINK_KEY_NOTIFY: u32 = 24;
pub const BLE_HCI_EVCODE_LOOPBACK_CMD: u32 = 25;
pub const BLE_HCI_EVCODE_DATA_BUF_OVERFLOW: u32 = 26;
pub const BLE_HCI_EVCODE_MAX_SLOTS_CHG: u32 = 27;
pub const BLE_HCI_EVCODE_READ_CLK_OFF_COMP: u32 = 28;
pub const BLE_HCI_EVCODE_CONN_PKT_TYPE_CHG: u32 = 29;
pub const BLE_HCI_EVCODE_QOS_VIOLATION: u32 = 30;
pub const BLE_HCI_EVCODE_PSR_MODE_CHG: u32 = 32;
pub const BLE_HCI_EVCODE_FLOW_SPEC_COMP: u32 = 33;
pub const BLE_HCI_EVCODE_INQ_RESULT_RSSI: u32 = 34;
pub const BLE_HCI_EVCODE_READ_REM_EXT_FEAT: u32 = 35;
pub const BLE_HCI_EVCODE_SYNCH_CONN_COMP: u32 = 44;
pub const BLE_HCI_EVCODE_SYNCH_CONN_CHG: u32 = 45;
pub const BLE_HCI_EVCODE_SNIFF_SUBRATING: u32 = 46;
pub const BLE_HCI_EVCODE_EXT_INQ_RESULT: u32 = 47;
pub const BLE_HCI_EVCODE_ENC_KEY_REFRESH: u32 = 48;
pub const BLE_HCI_EVOCDE_IO_CAP_REQ: u32 = 49;
pub const BLE_HCI_EVCODE_IO_CAP_RSP: u32 = 50;
pub const BLE_HCI_EVCODE_USER_CONFIRM_REQ: u32 = 51;
pub const BLE_HCI_EVCODE_PASSKEY_REQ: u32 = 52;
pub const BLE_HCI_EVCODE_REM_OOB_DATA_REQ: u32 = 53;
pub const BLE_HCI_EVCODE_SIMPLE_PAIR_COMP: u32 = 54;
pub const BLE_HCI_EVCODE_LNK_SPVN_TMO_CHG: u32 = 56;
pub const BLE_HCI_EVCODE_ENH_FLUSH_COMP: u32 = 57;
pub const BLE_HCI_EVCODE_USER_PASSKEY_NOTIFY: u32 = 59;
pub const BLE_HCI_EVCODE_KEYPRESS_NOTIFY: u32 = 60;
pub const BLE_HCI_EVCODE_REM_HOST_SUPP_FEAT: u32 = 61;
pub const BLE_HCI_EVCODE_LE_META: u32 = 62;
pub const BLE_HCI_EVCODE_PHYS_LINK_COMP: u32 = 64;
pub const BLE_HCI_EVCODE_CHAN_SELECTED: u32 = 65;
pub const BLE_HCI_EVCODE_DISCONN_PHYS_LINK: u32 = 66;
pub const BLE_HCI_EVCODE_PHYS_LINK_LOSS_EARLY: u32 = 67;
pub const BLE_HCI_EVCODE_PHYS_LINK_RECOVERY: u32 = 68;
pub const BLE_HCI_EVCODE_LOGICAL_LINK_COMP: u32 = 69;
pub const BLE_HCI_EVCODE_DISCONN_LOGICAL_LINK: u32 = 70;
pub const BLE_HCI_EVCODE_FLOW_SPEC_MODE_COMP: u32 = 71;
pub const BLE_HCI_EVCODE_NUM_COMP_DATA_BLKS: u32 = 72;
pub const BLE_HCI_EVCODE_AMP_START_TEST: u32 = 73;
pub const BLE_HCI_EVOCDE_AMP_TEST_END: u32 = 74;
pub const BLE_HCI_EVOCDE_AMP_RCVR_REPORT: u32 = 75;
pub const BLE_HCI_EVCODE_SHORT_RANGE_MODE_CHG: u32 = 76;
pub const BLE_HCI_EVCODE_AMP_STATUS_CHG: u32 = 77;
pub const BLE_HCI_EVCODE_TRIG_CLK_CAPTURE: u32 = 78;
pub const BLE_HCI_EVCODE_SYNCH_TRAIN_COMP: u32 = 79;
pub const BLE_HCI_EVCODE_SYNCH_TRAIN_RCVD: u32 = 80;
pub const BLE_HCI_EVCODE_SLAVE_BCAST_RX: u32 = 81;
pub const BLE_HCI_EVCODE_SLAVE_BCAST_TMO: u32 = 82;
pub const BLE_HCI_EVCODE_TRUNC_PAGE_COMP: u32 = 83;
pub const BLE_HCI_EVCODE_SLAVE_PAGE_RSP_TMO: u32 = 84;
pub const BLE_HCI_EVCODE_SLAVE_BCAST_CHAN_MAP: u32 = 85;
pub const BLE_HCI_EVCODE_INQ_RSP_NOTIFY: u32 = 86;
pub const BLE_HCI_EVCODE_AUTH_PYLD_TMO: u32 = 87;
pub const BLE_HCI_EVCODE_SAM_STATUS_CHG: u32 = 88;
pub const BLE_HCI_EVCODE_VENDOR_DEBUG: u32 = 255;
pub const BLE_HCI_LE_SUBEV_CONN_COMPLETE: u32 = 1;
pub const BLE_HCI_LE_SUBEV_ADV_RPT: u32 = 2;
pub const BLE_HCI_LE_SUBEV_CONN_UPD_COMPLETE: u32 = 3;
pub const BLE_HCI_LE_SUBEV_RD_REM_USED_FEAT: u32 = 4;
pub const BLE_HCI_LE_SUBEV_LT_KEY_REQ: u32 = 5;
pub const BLE_HCI_LE_SUBEV_REM_CONN_PARM_REQ: u32 = 6;
pub const BLE_HCI_LE_SUBEV_DATA_LEN_CHG: u32 = 7;
pub const BLE_HCI_LE_SUBEV_RD_LOC_P256_PUBKEY: u32 = 8;
pub const BLE_HCI_LE_SUBEV_GEN_DHKEY_COMPLETE: u32 = 9;
pub const BLE_HCI_LE_SUBEV_ENH_CONN_COMPLETE: u32 = 10;
pub const BLE_HCI_LE_SUBEV_DIRECT_ADV_RPT: u32 = 11;
pub const BLE_HCI_LE_SUBEV_PHY_UPDATE_COMPLETE: u32 = 12;
pub const BLE_HCI_LE_SUBEV_EXT_ADV_RPT: u32 = 13;
pub const BLE_HCI_LE_SUBEV_PERIODIC_ADV_SYNC_ESTAB: u32 = 14;
pub const BLE_HCI_LE_SUBEV_PERIODIC_ADV_RPT: u32 = 15;
pub const BLE_HCI_LE_SUBEV_PERIODIC_ADV_SYNC_LOST: u32 = 16;
pub const BLE_HCI_LE_SUBEV_SCAN_TIMEOUT: u32 = 17;
pub const BLE_HCI_LE_SUBEV_ADV_SET_TERMINATED: u32 = 18;
pub const BLE_HCI_LE_SUBEV_SCAN_REQ_RCVD: u32 = 19;
pub const BLE_HCI_LE_SUBEV_CHAN_SEL_ALG: u32 = 20;
pub const BLE_HCI_LE_SUBEV_CONNLESS_IQ_RPT: u32 = 21;
pub const BLE_HCI_LE_SUBEV_CONN_IQ_RPT: u32 = 22;
pub const BLE_HCI_LE_SUBEV_CTE_REQ_FAILED: u32 = 23;
pub const BLE_HCI_LE_SUBEV_PERIODIC_ADV_SYNC_TRANSFER: u32 = 24;
pub const BLE_HCI_LE_SUBEV_CIS_ESTAB: u32 = 25;
pub const BLE_HCI_LE_SUBEV_CIS_REQUEST: u32 = 26;
pub const BLE_HCI_LE_SUBEV_BIG_COMP: u32 = 27;
pub const BLE_HCI_LE_SUBEV_BIG_TERMINATE_COMP: u32 = 28;
pub const BLE_HCI_LE_SUBEV_BIG_SYNC_ESTAB: u32 = 29;
pub const BLE_HCI_LE_SUBEV_BIG_SYNC_LOST: u32 = 30;
pub const BLE_HCI_LE_SUBEV_REQ_PEER_SCA_COMP: u32 = 31;
pub const BLE_HCI_LE_SUBEV_BIGINFO_ADV_REPORT: u32 = 34;
pub const BLE_HCI_EVENT_ACL_BUF_OVERFLOW: u32 = 1;
pub const BLE_HCI_ADV_RPT_EVTYPE_ADV_IND: u32 = 0;
pub const BLE_HCI_ADV_RPT_EVTYPE_DIR_IND: u32 = 1;
pub const BLE_HCI_ADV_RPT_EVTYPE_SCAN_IND: u32 = 2;
pub const BLE_HCI_ADV_RPT_EVTYPE_NONCONN_IND: u32 = 3;
pub const BLE_HCI_ADV_RPT_EVTYPE_SCAN_RSP: u32 = 4;
pub const BLE_HCI_LEGACY_ADV_EVTYPE_ADV_IND: u32 = 19;
pub const BLE_HCI_LEGACY_ADV_EVTYPE_ADV_DIRECT_IND: u32 = 21;
pub const BLE_HCI_LEGACY_ADV_EVTYPE_ADV_SCAN_IND: u32 = 18;
pub const BLE_HCI_LEGACY_ADV_EVTYPE_ADV_NONCON_IND: u32 = 16;
pub const BLE_HCI_LEGACY_ADV_EVTYPE_SCAN_RSP_ADV_IND: u32 = 27;
pub const BLE_HCI_LEGACY_ADV_EVTYPE_SCAN_RSP_ADV_SCAN_IND: u32 = 26;
pub const BLE_HCI_LE_CONN_COMPLETE_ROLE_MASTER: u32 = 0;
pub const BLE_HCI_LE_CONN_COMPLETE_ROLE_SLAVE: u32 = 1;
pub const BLE_HCI_LE_CONN_HANDLE_MAX: u32 = 3839;
pub const BLE_HCI_LE_ADV_RPT_NUM_RPTS_MIN: u32 = 1;
pub const BLE_HCI_LE_ADV_RPT_NUM_RPTS_MAX: u32 = 25;
pub const BLE_HCI_VER_BCS_1_0b: u32 = 0;
pub const BLE_HCI_VER_BCS_1_1: u32 = 1;
pub const BLE_HCI_VER_BCS_1_2: u32 = 2;
pub const BLE_HCI_VER_BCS_2_0_EDR: u32 = 3;
pub const BLE_HCI_VER_BCS_2_1_EDR: u32 = 4;
pub const BLE_HCI_VER_BCS_3_0_HCS: u32 = 5;
pub const BLE_HCI_VER_BCS_4_0: u32 = 6;
pub const BLE_HCI_VER_BCS_4_1: u32 = 7;
pub const BLE_HCI_VER_BCS_4_2: u32 = 8;
pub const BLE_HCI_VER_BCS_5_0: u32 = 9;
pub const BLE_HCI_VER_BCS_5_1: u32 = 10;
pub const BLE_HCI_VER_BCS_5_2: u32 = 11;
pub const BLE_LMP_VER_BCS_1_0b: u32 = 0;
pub const BLE_LMP_VER_BCS_1_1: u32 = 1;
pub const BLE_LMP_VER_BCS_1_2: u32 = 2;
pub const BLE_LMP_VER_BCS_2_0_EDR: u32 = 3;
pub const BLE_LMP_VER_BCS_2_1_EDR: u32 = 4;
pub const BLE_LMP_VER_BCS_3_0_HCS: u32 = 5;
pub const BLE_LMP_VER_BCS_4_0: u32 = 6;
pub const BLE_LMP_VER_BCS_4_1: u32 = 7;
pub const BLE_LMP_VER_BCS_4_2: u32 = 8;
pub const BLE_LMP_VER_BCS_5_0: u32 = 9;
pub const BLE_LMP_VER_BCS_5_1: u32 = 10;
pub const BLE_LMP_VER_BCS_5_2: u32 = 11;
pub const BLE_HCI_VER_BCS: u32 = 9;
pub const BLE_LMP_VER_BCS: u32 = 9;
pub const BLE_HCI_DATA_HDR_SZ: u32 = 4;
pub const BLE_HCI_PB_FIRST_NON_FLUSH: u32 = 0;
pub const BLE_HCI_PB_MIDDLE: u32 = 1;
pub const BLE_HCI_PB_FIRST_FLUSH: u32 = 2;
pub const BLE_HCI_PB_FULL: u32 = 3;
pub const BLE_ATT_UUID_PRIMARY_SERVICE: u32 = 10240;
pub const BLE_ATT_UUID_SECONDARY_SERVICE: u32 = 10241;
pub const BLE_ATT_UUID_INCLUDE: u32 = 10242;
pub const BLE_ATT_UUID_CHARACTERISTIC: u32 = 10243;
pub const BLE_ATT_ERR_INVALID_HANDLE: u32 = 1;
pub const BLE_ATT_ERR_READ_NOT_PERMITTED: u32 = 2;
pub const BLE_ATT_ERR_WRITE_NOT_PERMITTED: u32 = 3;
pub const BLE_ATT_ERR_INVALID_PDU: u32 = 4;
pub const BLE_ATT_ERR_INSUFFICIENT_AUTHEN: u32 = 5;
pub const BLE_ATT_ERR_REQ_NOT_SUPPORTED: u32 = 6;
pub const BLE_ATT_ERR_INVALID_OFFSET: u32 = 7;
pub const BLE_ATT_ERR_INSUFFICIENT_AUTHOR: u32 = 8;
pub const BLE_ATT_ERR_PREPARE_QUEUE_FULL: u32 = 9;
pub const BLE_ATT_ERR_ATTR_NOT_FOUND: u32 = 10;
pub const BLE_ATT_ERR_ATTR_NOT_LONG: u32 = 11;
pub const BLE_ATT_ERR_INSUFFICIENT_KEY_SZ: u32 = 12;
pub const BLE_ATT_ERR_INVALID_ATTR_VALUE_LEN: u32 = 13;
pub const BLE_ATT_ERR_UNLIKELY: u32 = 14;
pub const BLE_ATT_ERR_INSUFFICIENT_ENC: u32 = 15;
pub const BLE_ATT_ERR_UNSUPPORTED_GROUP: u32 = 16;
pub const BLE_ATT_ERR_INSUFFICIENT_RES: u32 = 17;
pub const BLE_ATT_OP_ERROR_RSP: u32 = 1;
pub const BLE_ATT_OP_MTU_REQ: u32 = 2;
pub const BLE_ATT_OP_MTU_RSP: u32 = 3;
pub const BLE_ATT_OP_FIND_INFO_REQ: u32 = 4;
pub const BLE_ATT_OP_FIND_INFO_RSP: u32 = 5;
pub const BLE_ATT_OP_FIND_TYPE_VALUE_REQ: u32 = 6;
pub const BLE_ATT_OP_FIND_TYPE_VALUE_RSP: u32 = 7;
pub const BLE_ATT_OP_READ_TYPE_REQ: u32 = 8;
pub const BLE_ATT_OP_READ_TYPE_RSP: u32 = 9;
pub const BLE_ATT_OP_READ_REQ: u32 = 10;
pub const BLE_ATT_OP_READ_RSP: u32 = 11;
pub const BLE_ATT_OP_READ_BLOB_REQ: u32 = 12;
pub const BLE_ATT_OP_READ_BLOB_RSP: u32 = 13;
pub const BLE_ATT_OP_READ_MULT_REQ: u32 = 14;
pub const BLE_ATT_OP_READ_MULT_RSP: u32 = 15;
pub const BLE_ATT_OP_READ_GROUP_TYPE_REQ: u32 = 16;
pub const BLE_ATT_OP_READ_GROUP_TYPE_RSP: u32 = 17;
pub const BLE_ATT_OP_WRITE_REQ: u32 = 18;
pub const BLE_ATT_OP_WRITE_RSP: u32 = 19;
pub const BLE_ATT_OP_PREP_WRITE_REQ: u32 = 22;
pub const BLE_ATT_OP_PREP_WRITE_RSP: u32 = 23;
pub const BLE_ATT_OP_EXEC_WRITE_REQ: u32 = 24;
pub const BLE_ATT_OP_EXEC_WRITE_RSP: u32 = 25;
pub const BLE_ATT_OP_NOTIFY_REQ: u32 = 27;
pub const BLE_ATT_OP_INDICATE_REQ: u32 = 29;
pub const BLE_ATT_OP_INDICATE_RSP: u32 = 30;
pub const BLE_ATT_OP_WRITE_CMD: u32 = 82;
pub const BLE_ATT_ATTR_MAX_LEN: u32 = 512;
pub const BLE_ATT_F_READ: u32 = 1;
pub const BLE_ATT_F_WRITE: u32 = 2;
pub const BLE_ATT_F_READ_ENC: u32 = 4;
pub const BLE_ATT_F_READ_AUTHEN: u32 = 8;
pub const BLE_ATT_F_READ_AUTHOR: u32 = 16;
pub const BLE_ATT_F_WRITE_ENC: u32 = 32;
pub const BLE_ATT_F_WRITE_AUTHEN: u32 = 64;
pub const BLE_ATT_F_WRITE_AUTHOR: u32 = 128;
pub const HA_FLAG_PERM_RW: u32 = 3;
pub const BLE_ATT_ACCESS_OP_READ: u32 = 1;
pub const BLE_ATT_ACCESS_OP_WRITE: u32 = 2;
pub const BLE_ATT_MTU_DFLT: u32 = 23;
pub const BLE_ATT_MTU_MAX: u32 = 527;
pub const BLE_EDDYSTONE_MAX_UUIDS16: u32 = 3;
pub const BLE_EDDYSTONE_URL_MAX_LEN: u32 = 17;
pub const BLE_EDDYSTONE_URL_SCHEME_HTTP_WWW: u32 = 0;
pub const BLE_EDDYSTONE_URL_SCHEME_HTTPS_WWW: u32 = 1;
pub const BLE_EDDYSTONE_URL_SCHEME_HTTP: u32 = 2;
pub const BLE_EDDYSTONE_URL_SCHEME_HTTPS: u32 = 3;
pub const BLE_EDDYSTONE_URL_SUFFIX_COM_SLASH: u32 = 0;
pub const BLE_EDDYSTONE_URL_SUFFIX_ORG_SLASH: u32 = 1;
pub const BLE_EDDYSTONE_URL_SUFFIX_EDU_SLASH: u32 = 2;
pub const BLE_EDDYSTONE_URL_SUFFIX_NET_SLASH: u32 = 3;
pub const BLE_EDDYSTONE_URL_SUFFIX_INFO_SLASH: u32 = 4;
pub const BLE_EDDYSTONE_URL_SUFFIX_BIZ_SLASH: u32 = 5;
pub const BLE_EDDYSTONE_URL_SUFFIX_GOV_SLASH: u32 = 6;
pub const BLE_EDDYSTONE_URL_SUFFIX_COM: u32 = 7;
pub const BLE_EDDYSTONE_URL_SUFFIX_ORG: u32 = 8;
pub const BLE_EDDYSTONE_URL_SUFFIX_EDU: u32 = 9;
pub const BLE_EDDYSTONE_URL_SUFFIX_NET: u32 = 10;
pub const BLE_EDDYSTONE_URL_SUFFIX_INFO: u32 = 11;
pub const BLE_EDDYSTONE_URL_SUFFIX_BIZ: u32 = 12;
pub const BLE_EDDYSTONE_URL_SUFFIX_GOV: u32 = 13;
pub const BLE_EDDYSTONE_URL_SUFFIX_NONE: u32 = 255;
pub const BLE_UUID_STR_LEN: u32 = 37;
pub const BLE_HS_ADV_MAX_SZ: u32 = 31;
pub const BLE_HS_ADV_MAX_FIELD_SZ: u32 = 29;
pub const BLE_HS_ADV_TYPE_FLAGS: u32 = 1;
pub const BLE_HS_ADV_TYPE_INCOMP_UUIDS16: u32 = 2;
pub const BLE_HS_ADV_TYPE_COMP_UUIDS16: u32 = 3;
pub const BLE_HS_ADV_TYPE_INCOMP_UUIDS32: u32 = 4;
pub const BLE_HS_ADV_TYPE_COMP_UUIDS32: u32 = 5;
pub const BLE_HS_ADV_TYPE_INCOMP_UUIDS128: u32 = 6;
pub const BLE_HS_ADV_TYPE_COMP_UUIDS128: u32 = 7;
pub const BLE_HS_ADV_TYPE_INCOMP_NAME: u32 = 8;
pub const BLE_HS_ADV_TYPE_COMP_NAME: u32 = 9;
pub const BLE_HS_ADV_TYPE_TX_PWR_LVL: u32 = 10;
pub const BLE_HS_ADV_TYPE_SLAVE_ITVL_RANGE: u32 = 18;
pub const BLE_HS_ADV_TYPE_SOL_UUIDS16: u32 = 20;
pub const BLE_HS_ADV_TYPE_SOL_UUIDS128: u32 = 21;
pub const BLE_HS_ADV_TYPE_SVC_DATA_UUID16: u32 = 22;
pub const BLE_HS_ADV_TYPE_PUBLIC_TGT_ADDR: u32 = 23;
pub const BLE_HS_ADV_TYPE_RANDOM_TGT_ADDR: u32 = 24;
pub const BLE_HS_ADV_TYPE_APPEARANCE: u32 = 25;
pub const BLE_HS_ADV_TYPE_ADV_ITVL: u32 = 26;
pub const BLE_HS_ADV_TYPE_SVC_DATA_UUID32: u32 = 32;
pub const BLE_HS_ADV_TYPE_SVC_DATA_UUID128: u32 = 33;
pub const BLE_HS_ADV_TYPE_URI: u32 = 36;
pub const BLE_HS_ADV_TYPE_MESH_PROV: u32 = 41;
pub const BLE_HS_ADV_TYPE_MESH_MESSAGE: u32 = 42;
pub const BLE_HS_ADV_TYPE_MESH_BEACON: u32 = 43;
pub const BLE_HS_ADV_TYPE_MFG_DATA: u32 = 255;
pub const BLE_HS_ADV_FLAGS_LEN: u32 = 1;
pub const BLE_HS_ADV_F_DISC_LTD: u32 = 1;
pub const BLE_HS_ADV_F_DISC_GEN: u32 = 2;
pub const BLE_HS_ADV_F_BREDR_UNSUP: u32 = 4;
pub const BLE_HS_ADV_TX_PWR_LVL_LEN: u32 = 1;
pub const BLE_HS_ADV_TX_PWR_LVL_AUTO: i32 = -128;
pub const BLE_HS_ADV_SLAVE_ITVL_RANGE_LEN: u32 = 4;
pub const BLE_HS_ADV_SVC_DATA_UUID16_MIN_LEN: u32 = 2;
pub const BLE_HS_ADV_PUBLIC_TGT_ADDR_ENTRY_LEN: u32 = 6;
pub const BLE_HS_ADV_APPEARANCE_LEN: u32 = 2;
pub const BLE_HS_ADV_ADV_ITVL_LEN: u32 = 2;
pub const BLE_HS_ADV_SVC_DATA_UUID32_MIN_LEN: u32 = 4;
pub const BLE_HS_ADV_SVC_DATA_UUID128_MIN_LEN: u32 = 16;
pub const BLE_GAP_DISC_DUR_DFLT: f64 = 10240.0;
pub const BLE_GAP_CONN_DUR_DFLT: u32 = 30000;
pub const BLE_GAP_CONN_PAUSE_CENTRAL: u32 = 1000;
pub const BLE_GAP_CONN_PAUSE_PERIPHERAL: u32 = 5000;
pub const BLE_GAP_ADV_DFLT_CHANNEL_MAP: u32 = 7;
pub const BLE_GAP_INITIAL_CONN_LATENCY: u32 = 0;
pub const BLE_GAP_INITIAL_SUPERVISION_TIMEOUT: u32 = 256;
pub const BLE_GAP_INITIAL_CONN_MIN_CE_LEN: u32 = 0;
pub const BLE_GAP_INITIAL_CONN_MAX_CE_LEN: u32 = 0;
pub const BLE_GAP_ROLE_MASTER: u32 = 0;
pub const BLE_GAP_ROLE_SLAVE: u32 = 1;
pub const BLE_GAP_EVENT_CONNECT: u32 = 0;
pub const BLE_GAP_EVENT_DISCONNECT: u32 = 1;
pub const BLE_GAP_EVENT_CONN_UPDATE: u32 = 3;
pub const BLE_GAP_EVENT_CONN_UPDATE_REQ: u32 = 4;
pub const BLE_GAP_EVENT_L2CAP_UPDATE_REQ: u32 = 5;
pub const BLE_GAP_EVENT_TERM_FAILURE: u32 = 6;
pub const BLE_GAP_EVENT_DISC: u32 = 7;
pub const BLE_GAP_EVENT_DISC_COMPLETE: u32 = 8;
pub const BLE_GAP_EVENT_ADV_COMPLETE: u32 = 9;
pub const BLE_GAP_EVENT_ENC_CHANGE: u32 = 10;
pub const BLE_GAP_EVENT_PASSKEY_ACTION: u32 = 11;
pub const BLE_GAP_EVENT_NOTIFY_RX: u32 = 12;
pub const BLE_GAP_EVENT_NOTIFY_TX: u32 = 13;
pub const BLE_GAP_EVENT_SUBSCRIBE: u32 = 14;
pub const BLE_GAP_EVENT_MTU: u32 = 15;
pub const BLE_GAP_EVENT_IDENTITY_RESOLVED: u32 = 16;
pub const BLE_GAP_EVENT_REPEAT_PAIRING: u32 = 17;
pub const BLE_GAP_EVENT_PHY_UPDATE_COMPLETE: u32 = 18;
pub const BLE_GAP_EVENT_EXT_DISC: u32 = 19;
pub const BLE_GAP_EVENT_PERIODIC_SYNC: u32 = 20;
pub const BLE_GAP_EVENT_PERIODIC_REPORT: u32 = 21;
pub const BLE_GAP_EVENT_PERIODIC_SYNC_LOST: u32 = 22;
pub const BLE_GAP_EVENT_SCAN_REQ_RCVD: u32 = 23;
pub const BLE_GAP_EVENT_PERIODIC_TRANSFER: u32 = 24;
pub const BLE_GAP_SUBSCRIBE_REASON_WRITE: u32 = 1;
pub const BLE_GAP_SUBSCRIBE_REASON_TERM: u32 = 2;
pub const BLE_GAP_SUBSCRIBE_REASON_RESTORE: u32 = 3;
pub const BLE_GAP_REPEAT_PAIRING_RETRY: u32 = 1;
pub const BLE_GAP_REPEAT_PAIRING_IGNORE: u32 = 2;
pub const BLE_GAP_CONN_MODE_NON: u32 = 0;
pub const BLE_GAP_CONN_MODE_DIR: u32 = 1;
pub const BLE_GAP_CONN_MODE_UND: u32 = 2;
pub const BLE_GAP_DISC_MODE_NON: u32 = 0;
pub const BLE_GAP_DISC_MODE_LTD: u32 = 1;
pub const BLE_GAP_DISC_MODE_GEN: u32 = 2;
pub const BLE_GAP_PRIVATE_MODE_NETWORK: u32 = 0;
pub const BLE_GAP_PRIVATE_MODE_DEVICE: u32 = 1;
pub const BLE_GAP_LE_PHY_1M: u32 = 1;
pub const BLE_GAP_LE_PHY_2M: u32 = 2;
pub const BLE_GAP_LE_PHY_CODED: u32 = 3;
pub const BLE_GAP_LE_PHY_1M_MASK: u32 = 1;
pub const BLE_GAP_LE_PHY_2M_MASK: u32 = 2;
pub const BLE_GAP_LE_PHY_CODED_MASK: u32 = 4;
pub const BLE_GAP_LE_PHY_ANY_MASK: u32 = 15;
pub const BLE_GAP_LE_PHY_CODED_ANY: u32 = 0;
pub const BLE_GAP_LE_PHY_CODED_S2: u32 = 1;
pub const BLE_GAP_LE_PHY_CODED_S8: u32 = 2;
pub const BLE_GATT_REGISTER_OP_SVC: u32 = 1;
pub const BLE_GATT_REGISTER_OP_CHR: u32 = 2;
pub const BLE_GATT_REGISTER_OP_DSC: u32 = 3;
pub const BLE_GATT_SVC_UUID16: u32 = 6145;
pub const BLE_GATT_DSC_CLT_CFG_UUID16: u32 = 10498;
pub const BLE_GATT_CHR_PROP_BROADCAST: u32 = 1;
pub const BLE_GATT_CHR_PROP_READ: u32 = 2;
pub const BLE_GATT_CHR_PROP_WRITE_NO_RSP: u32 = 4;
pub const BLE_GATT_CHR_PROP_WRITE: u32 = 8;
pub const BLE_GATT_CHR_PROP_NOTIFY: u32 = 16;
pub const BLE_GATT_CHR_PROP_INDICATE: u32 = 32;
pub const BLE_GATT_CHR_PROP_AUTH_SIGN_WRITE: u32 = 64;
pub const BLE_GATT_CHR_PROP_EXTENDED: u32 = 128;
pub const BLE_GATT_ACCESS_OP_READ_CHR: u32 = 0;
pub const BLE_GATT_ACCESS_OP_WRITE_CHR: u32 = 1;
pub const BLE_GATT_ACCESS_OP_READ_DSC: u32 = 2;
pub const BLE_GATT_ACCESS_OP_WRITE_DSC: u32 = 3;
pub const BLE_GATT_CHR_F_BROADCAST: u32 = 1;
pub const BLE_GATT_CHR_F_READ: u32 = 2;
pub const BLE_GATT_CHR_F_WRITE_NO_RSP: u32 = 4;
pub const BLE_GATT_CHR_F_WRITE: u32 = 8;
pub const BLE_GATT_CHR_F_NOTIFY: u32 = 16;
pub const BLE_GATT_CHR_F_INDICATE: u32 = 32;
pub const BLE_GATT_CHR_F_AUTH_SIGN_WRITE: u32 = 64;
pub const BLE_GATT_CHR_F_RELIABLE_WRITE: u32 = 128;
pub const BLE_GATT_CHR_F_AUX_WRITE: u32 = 256;
pub const BLE_GATT_CHR_F_READ_ENC: u32 = 512;
pub const BLE_GATT_CHR_F_READ_AUTHEN: u32 = 1024;
pub const BLE_GATT_CHR_F_READ_AUTHOR: u32 = 2048;
pub const BLE_GATT_CHR_F_WRITE_ENC: u32 = 4096;
pub const BLE_GATT_CHR_F_WRITE_AUTHEN: u32 = 8192;
pub const BLE_GATT_CHR_F_WRITE_AUTHOR: u32 = 16384;
pub const BLE_GATT_SVC_TYPE_END: u32 = 0;
pub const BLE_GATT_SVC_TYPE_PRIMARY: u32 = 1;
pub const BLE_GATT_SVC_TYPE_SECONDARY: u32 = 2;
pub const _STDIO_H: u32 = 1;
pub const __GNUC_VA_LIST: u32 = 1;
pub const _____fpos_t_defined: u32 = 1;
pub const ____mbstate_t_defined: u32 = 1;
pub const _____fpos64_t_defined: u32 = 1;
pub const ____FILE_defined: u32 = 1;
pub const __FILE_defined: u32 = 1;
pub const __struct_FILE_defined: u32 = 1;
pub const _IO_EOF_SEEN: u32 = 16;
pub const _IO_ERR_SEEN: u32 = 32;
pub const _IO_USER_LOCK: u32 = 32768;
pub const _IOFBF: u32 = 0;
pub const _IOLBF: u32 = 1;
pub const _IONBF: u32 = 2;
pub const BUFSIZ: u32 = 8192;
pub const EOF: i32 = -1;
pub const SEEK_SET: u32 = 0;
pub const SEEK_CUR: u32 = 1;
pub const SEEK_END: u32 = 2;
pub const P_tmpdir: &'static [u8; 5usize] = b"/tmp\0";
pub const _BITS_STDIO_LIM_H: u32 = 1;
pub const L_tmpnam: u32 = 20;
pub const TMP_MAX: u32 = 238328;
pub const FILENAME_MAX: u32 = 4096;
pub const L_ctermid: u32 = 9;
pub const FOPEN_MAX: u32 = 16;
pub const MODLOG_MODULE_DFLT: u32 = 255;
pub const LOG_LEVEL_DEBUG: u32 = 0;
pub const LOG_LEVEL_INFO: u32 = 1;
pub const LOG_LEVEL_WARN: u32 = 2;
pub const LOG_LEVEL_ERROR: u32 = 3;
pub const LOG_LEVEL_CRITICAL: u32 = 4;
pub const LOG_LEVEL_MAX: u32 = 15;
pub const BLE_L2CAP_CID_ATT: u32 = 4;
pub const BLE_L2CAP_CID_SIG: u32 = 5;
pub const BLE_L2CAP_CID_SM: u32 = 6;
pub const BLE_L2CAP_SIG_OP_REJECT: u32 = 1;
pub const BLE_L2CAP_SIG_OP_CONNECT_REQ: u32 = 2;
pub const BLE_L2CAP_SIG_OP_CONNECT_RSP: u32 = 3;
pub const BLE_L2CAP_SIG_OP_CONFIG_REQ: u32 = 4;
pub const BLE_L2CAP_SIG_OP_CONFIG_RSP: u32 = 5;
pub const BLE_L2CAP_SIG_OP_DISCONN_REQ: u32 = 6;
pub const BLE_L2CAP_SIG_OP_DISCONN_RSP: u32 = 7;
pub const BLE_L2CAP_SIG_OP_ECHO_REQ: u32 = 8;
pub const BLE_L2CAP_SIG_OP_ECHO_RSP: u32 = 9;
pub const BLE_L2CAP_SIG_OP_INFO_REQ: u32 = 10;
pub const BLE_L2CAP_SIG_OP_INFO_RSP: u32 = 11;
pub const BLE_L2CAP_SIG_OP_CREATE_CHAN_REQ: u32 = 12;
pub const BLE_L2CAP_SIG_OP_CREATE_CHAN_RSP: u32 = 13;
pub const BLE_L2CAP_SIG_OP_MOVE_CHAN_REQ: u32 = 14;
pub const BLE_L2CAP_SIG_OP_MOVE_CHAN_RSP: u32 = 15;
pub const BLE_L2CAP_SIG_OP_MOVE_CHAN_CONF_REQ: u32 = 16;
pub const BLE_L2CAP_SIG_OP_MOVE_CHAN_CONF_RSP: u32 = 17;
pub const BLE_L2CAP_SIG_OP_UPDATE_REQ: u32 = 18;
pub const BLE_L2CAP_SIG_OP_UPDATE_RSP: u32 = 19;
pub const BLE_L2CAP_SIG_OP_LE_CREDIT_CONNECT_REQ: u32 = 20;
pub const BLE_L2CAP_SIG_OP_LE_CREDIT_CONNECT_RSP: u32 = 21;
pub const BLE_L2CAP_SIG_OP_FLOW_CTRL_CREDIT: u32 = 22;
pub const BLE_L2CAP_SIG_OP_CREDIT_CONNECT_REQ: u32 = 23;
pub const BLE_L2CAP_SIG_OP_CREDIT_CONNECT_RSP: u32 = 24;
pub const BLE_L2CAP_SIG_OP_CREDIT_RECONFIG_REQ: u32 = 25;
pub const BLE_L2CAP_SIG_OP_CREDIT_RECONFIG_RSP: u32 = 26;
pub const BLE_L2CAP_SIG_OP_MAX: u32 = 27;
pub const BLE_L2CAP_SIG_ERR_CMD_NOT_UNDERSTOOD: u32 = 0;
pub const BLE_L2CAP_SIG_ERR_MTU_EXCEEDED: u32 = 1;
pub const BLE_L2CAP_SIG_ERR_INVALID_CID: u32 = 2;
pub const BLE_L2CAP_COC_ERR_CONNECTION_SUCCESS: u32 = 0;
pub const BLE_L2CAP_COC_ERR_UNKNOWN_LE_PSM: u32 = 2;
pub const BLE_L2CAP_COC_ERR_NO_RESOURCES: u32 = 4;
pub const BLE_L2CAP_COC_ERR_INSUFFICIENT_AUTHEN: u32 = 5;
pub const BLE_L2CAP_COC_ERR_INSUFFICIENT_AUTHOR: u32 = 6;
pub const BLE_L2CAP_COC_ERR_INSUFFICIENT_KEY_SZ: u32 = 7;
pub const BLE_L2CAP_COC_ERR_INSUFFICIENT_ENC: u32 = 8;
pub const BLE_L2CAP_COC_ERR_INVALID_SOURCE_CID: u32 = 9;
pub const BLE_L2CAP_COC_ERR_SOURCE_CID_ALREADY_USED: u32 = 10;
pub const BLE_L2CAP_COC_ERR_UNACCEPTABLE_PARAMETERS: u32 = 11;
pub const BLE_L2CAP_COC_ERR_INVALID_PARAMETERS: u32 = 12;
pub const BLE_L2CAP_ERR_RECONFIG_SUCCEED: u32 = 0;
pub const BLE_L2CAP_ERR_RECONFIG_REDUCTION_MTU_NOT_ALLOWED: u32 = 1;
pub const BLE_L2CAP_ERR_RECONFIG_REDUCTION_MPS_NOT_ALLOWED: u32 = 2;
pub const BLE_L2CAP_ERR_RECONFIG_INVALID_DCID: u32 = 3;
pub const BLE_L2CAP_ERR_RECONFIG_UNACCAPTED_PARAM: u32 = 4;
pub const BLE_L2CAP_EVENT_COC_CONNECTED: u32 = 0;
pub const BLE_L2CAP_EVENT_COC_DISCONNECTED: u32 = 1;
pub const BLE_L2CAP_EVENT_COC_ACCEPT: u32 = 2;
pub const BLE_L2CAP_EVENT_COC_DATA_RECEIVED: u32 = 3;
pub const BLE_L2CAP_EVENT_COC_TX_UNSTALLED: u32 = 4;
pub const BLE_L2CAP_EVENT_COC_RECONFIG_COMPLETED: u32 = 5;
pub const BLE_L2CAP_EVENT_COC_PEER_RECONFIGURED: u32 = 6;
pub const BLE_SM_ERR_PASSKEY: u32 = 1;
pub const BLE_SM_ERR_OOB: u32 = 2;
pub const BLE_SM_ERR_AUTHREQ: u32 = 3;
pub const BLE_SM_ERR_CONFIRM_MISMATCH: u32 = 4;
pub const BLE_SM_ERR_PAIR_NOT_SUPP: u32 = 5;
pub const BLE_SM_ERR_ENC_KEY_SZ: u32 = 6;
pub const BLE_SM_ERR_CMD_NOT_SUPP: u32 = 7;
pub const BLE_SM_ERR_UNSPECIFIED: u32 = 8;
pub const BLE_SM_ERR_REPEATED: u32 = 9;
pub const BLE_SM_ERR_INVAL: u32 = 10;
pub const BLE_SM_ERR_DHKEY: u32 = 11;
pub const BLE_SM_ERR_NUMCMP: u32 = 12;
pub const BLE_SM_ERR_ALREADY: u32 = 13;
pub const BLE_SM_ERR_CROSS_TRANS: u32 = 14;
pub const BLE_SM_ERR_MAX_PLUS_1: u32 = 15;
pub const BLE_SM_PAIR_ALG_JW: u32 = 0;
pub const BLE_SM_PAIR_ALG_PASSKEY: u32 = 1;
pub const BLE_SM_PAIR_ALG_OOB: u32 = 2;
pub const BLE_SM_PAIR_ALG_NUMCMP: u32 = 3;
pub const BLE_SM_PAIR_KEY_DIST_ENC: u32 = 1;
pub const BLE_SM_PAIR_KEY_DIST_ID: u32 = 2;
pub const BLE_SM_PAIR_KEY_DIST_SIGN: u32 = 4;
pub const BLE_SM_PAIR_KEY_DIST_LINK: u32 = 8;
pub const BLE_SM_PAIR_KEY_DIST_RESERVED: u32 = 240;
pub const BLE_SM_IO_CAP_DISP_ONLY: u32 = 0;
pub const BLE_SM_IO_CAP_DISP_YES_NO: u32 = 1;
pub const BLE_SM_IO_CAP_KEYBOARD_ONLY: u32 = 2;
pub const BLE_SM_IO_CAP_NO_IO: u32 = 3;
pub const BLE_SM_IO_CAP_KEYBOARD_DISP: u32 = 4;
pub const BLE_SM_IO_CAP_RESERVED: u32 = 5;
pub const BLE_SM_PAIR_OOB_NO: u32 = 0;
pub const BLE_SM_PAIR_OOB_YES: u32 = 1;
pub const BLE_SM_PAIR_OOB_RESERVED: u32 = 2;
pub const BLE_SM_PAIR_AUTHREQ_BOND: u32 = 1;
pub const BLE_SM_PAIR_AUTHREQ_MITM: u32 = 4;
pub const BLE_SM_PAIR_AUTHREQ_SC: u32 = 8;
pub const BLE_SM_PAIR_AUTHREQ_KEYPRESS: u32 = 16;
pub const BLE_SM_PAIR_AUTHREQ_RESERVED: u32 = 226;
pub const BLE_SM_PAIR_KEY_SZ_MIN: u32 = 7;
pub const BLE_SM_PAIR_KEY_SZ_MAX: u32 = 16;
pub const BLE_SM_IOACT_NONE: u32 = 0;
pub const BLE_SM_IOACT_OOB: u32 = 1;
pub const BLE_SM_IOACT_INPUT: u32 = 2;
pub const BLE_SM_IOACT_DISP: u32 = 3;
pub const BLE_SM_IOACT_NUMCMP: u32 = 4;
pub const BLE_SM_IOACT_OOB_SC: u32 = 5;
pub const BLE_SM_IOACT_MAX_PLUS_ONE: u32 = 6;
pub const BLE_STORE_OBJ_TYPE_OUR_SEC: u32 = 1;
pub const BLE_STORE_OBJ_TYPE_PEER_SEC: u32 = 2;
pub const BLE_STORE_OBJ_TYPE_CCCD: u32 = 3;
pub const BLE_STORE_EVENT_OVERFLOW: u32 = 1;
pub const BLE_STORE_EVENT_FULL: u32 = 2;
pub const BLE_HS_FOREVER: u32 = 2147483647;
pub const BLE_HS_CONN_HANDLE_NONE: u32 = 65535;
pub const BLE_HS_EAGAIN: u32 = 1;
pub const BLE_HS_EALREADY: u32 = 2;
pub const BLE_HS_EINVAL: u32 = 3;
pub const BLE_HS_EMSGSIZE: u32 = 4;
pub const BLE_HS_ENOENT: u32 = 5;
pub const BLE_HS_ENOMEM: u32 = 6;
pub const BLE_HS_ENOTCONN: u32 = 7;
pub const BLE_HS_ENOTSUP: u32 = 8;
pub const BLE_HS_EAPP: u32 = 9;
pub const BLE_HS_EBADDATA: u32 = 10;
pub const BLE_HS_EOS: u32 = 11;
pub const BLE_HS_ECONTROLLER: u32 = 12;
pub const BLE_HS_ETIMEOUT: u32 = 13;
pub const BLE_HS_EDONE: u32 = 14;
pub const BLE_HS_EBUSY: u32 = 15;
pub const BLE_HS_EREJECT: u32 = 16;
pub const BLE_HS_EUNKNOWN: u32 = 17;
pub const BLE_HS_EROLE: u32 = 18;
pub const BLE_HS_ETIMEOUT_HCI: u32 = 19;
pub const BLE_HS_ENOMEM_EVT: u32 = 20;
pub const BLE_HS_ENOADDR: u32 = 21;
pub const BLE_HS_ENOTSYNCED: u32 = 22;
pub const BLE_HS_EAUTHEN: u32 = 23;
pub const BLE_HS_EAUTHOR: u32 = 24;
pub const BLE_HS_EENCRYPT: u32 = 25;
pub const BLE_HS_EENCRYPT_KEY_SZ: u32 = 26;
pub const BLE_HS_ESTORE_CAP: u32 = 27;
pub const BLE_HS_ESTORE_FAIL: u32 = 28;
pub const BLE_HS_EPREEMPTED: u32 = 29;
pub const BLE_HS_EDISABLED: u32 = 30;
pub const BLE_HS_ESTALLED: u32 = 31;
pub const BLE_HS_ERR_ATT_BASE: u32 = 256;
pub const BLE_HS_ERR_HCI_BASE: u32 = 512;
pub const BLE_HS_ERR_L2C_BASE: u32 = 768;
pub const BLE_HS_ERR_SM_US_BASE: u32 = 1024;
pub const BLE_HS_ERR_SM_PEER_BASE: u32 = 1280;
pub const BLE_HS_ERR_HW_BASE: u32 = 1536;
pub const BLE_HS_IO_DISPLAY_ONLY: u32 = 0;
pub const BLE_HS_IO_DISPLAY_YESNO: u32 = 1;
pub const BLE_HS_IO_KEYBOARD_ONLY: u32 = 2;
pub const BLE_HS_IO_NO_INPUT_OUTPUT: u32 = 3;
pub const BLE_HS_IO_KEYBOARD_DISPLAY: u32 = 4;
pub const BLE_SVC_GAP_UUID16: u32 = 6144;
pub const BLE_SVC_GAP_CHR_UUID16_DEVICE_NAME: u32 = 10752;
pub const BLE_SVC_GAP_CHR_UUID16_APPEARANCE: u32 = 10753;
pub const BLE_SVC_GAP_CHR_UUID16_PERIPH_PREF_CONN_PARAMS: u32 = 10756;
pub const BLE_SVC_GAP_CHR_UUID16_CENTRAL_ADDRESS_RESOLUTION: u32 = 10918;
pub const BLE_SVC_GAP_APPEARANCE_GEN_UNKNOWN: u32 = 0;
pub const BLE_SVC_GAP_APPEARANCE_GEN_COMPUTER: u32 = 128;
pub const BLE_SVC_GAP_APPEARANCE_CYC_SPEED_AND_CADENCE_SENSOR: u32 = 1157;
pub type size_t = cty::c_ulong;
pub type wchar_t = cty::c_int;
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct max_align_t {
pub __clang_max_align_nonce1: cty::c_longlong,
pub __bindgen_padding_0: u64,
pub __clang_max_align_nonce2: u128,
}
#[test]
fn bindgen_test_layout_max_align_t() {
assert_eq!(
::core::mem::size_of::<max_align_t>(),
32usize,
concat!("Size of: ", stringify!(max_align_t))
);
assert_eq!(
::core::mem::align_of::<max_align_t>(),
16usize,
concat!("Alignment of ", stringify!(max_align_t))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<max_align_t>())).__clang_max_align_nonce1 as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(max_align_t),
"::",
stringify!(__clang_max_align_nonce1)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<max_align_t>())).__clang_max_align_nonce2 as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(max_align_t),
"::",
stringify!(__clang_max_align_nonce2)
)
);
}
pub type __u_char = cty::c_uchar;
pub type __u_short = cty::c_ushort;
pub type __u_int = cty::c_uint;
pub type __u_long = cty::c_ulong;
pub type __int8_t = cty::c_schar;
pub type __uint8_t = cty::c_uchar;
pub type __int16_t = cty::c_short;
pub type __uint16_t = cty::c_ushort;
pub type __int32_t = cty::c_int;
pub type __uint32_t = cty::c_uint;
pub type __int64_t = cty::c_long;
pub type __uint64_t = cty::c_ulong;
pub type __int_least8_t = __int8_t;
pub type __uint_least8_t = __uint8_t;
pub type __int_least16_t = __int16_t;
pub type __uint_least16_t = __uint16_t;
pub type __int_least32_t = __int32_t;
pub type __uint_least32_t = __uint32_t;
pub type __int_least64_t = __int64_t;
pub type __uint_least64_t = __uint64_t;
pub type __quad_t = cty::c_long;
pub type __u_quad_t = cty::c_ulong;
pub type __intmax_t = cty::c_long;
pub type __uintmax_t = cty::c_ulong;
pub type __dev_t = cty::c_ulong;
pub type __uid_t = cty::c_uint;
pub type __gid_t = cty::c_uint;
pub type __ino_t = cty::c_ulong;
pub type __ino64_t = cty::c_ulong;
pub type __mode_t = cty::c_uint;
pub type __nlink_t = cty::c_ulong;
pub type __off_t = cty::c_long;
pub type __off64_t = cty::c_long;
pub type __pid_t = cty::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __fsid_t {
pub __val: [cty::c_int; 2usize],
}
#[test]
fn bindgen_test_layout___fsid_t() {
assert_eq!(
::core::mem::size_of::<__fsid_t>(),
8usize,
concat!("Size of: ", stringify!(__fsid_t))
);
assert_eq!(
::core::mem::align_of::<__fsid_t>(),
4usize,
concat!("Alignment of ", stringify!(__fsid_t))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<__fsid_t>())).__val as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__fsid_t),
"::",
stringify!(__val)
)
);
}
pub type __clock_t = cty::c_long;
pub type __rlim_t = cty::c_ulong;
pub type __rlim64_t = cty::c_ulong;
pub type __id_t = cty::c_uint;
pub type __time_t = cty::c_long;
pub type __useconds_t = cty::c_uint;
pub type __suseconds_t = cty::c_long;
pub type __daddr_t = cty::c_int;
pub type __key_t = cty::c_int;
pub type __clockid_t = cty::c_int;
pub type __timer_t = *mut cty::c_void;
pub type __blksize_t = cty::c_long;
pub type __blkcnt_t = cty::c_long;
pub type __blkcnt64_t = cty::c_long;
pub type __fsblkcnt_t = cty::c_ulong;
pub type __fsblkcnt64_t = cty::c_ulong;
pub type __fsfilcnt_t = cty::c_ulong;
pub type __fsfilcnt64_t = cty::c_ulong;
pub type __fsword_t = cty::c_long;
pub type __ssize_t = cty::c_long;
pub type __syscall_slong_t = cty::c_long;
pub type __syscall_ulong_t = cty::c_ulong;
pub type __loff_t = __off64_t;
pub type __caddr_t = *mut cty::c_char;
pub type __intptr_t = cty::c_long;
pub type __socklen_t = cty::c_uint;
pub type __sig_atomic_t = cty::c_int;
pub type int_least8_t = __int_least8_t;
pub type int_least16_t = __int_least16_t;
pub type int_least32_t = __int_least32_t;
pub type int_least64_t = __int_least64_t;
pub type uint_least8_t = __uint_least8_t;
pub type uint_least16_t = __uint_least16_t;
pub type uint_least32_t = __uint_least32_t;
pub type uint_least64_t = __uint_least64_t;
pub type int_fast8_t = cty::c_schar;
pub type int_fast16_t = cty::c_long;
pub type int_fast32_t = cty::c_long;
pub type int_fast64_t = cty::c_long;
pub type uint_fast8_t = cty::c_uchar;
pub type uint_fast16_t = cty::c_ulong;
pub type uint_fast32_t = cty::c_ulong;
pub type uint_fast64_t = cty::c_ulong;
pub type intmax_t = __intmax_t;
pub type uintmax_t = __uintmax_t;
pub type ble_npl_event_fn = ::core::option::Option<unsafe extern "C" fn(ev: *mut ble_npl_event)>;
pub const ble_npl_error_BLE_NPL_OK: ble_npl_error = 0;
pub const ble_npl_error_BLE_NPL_ENOMEM: ble_npl_error = 1;
pub const ble_npl_error_BLE_NPL_EINVAL: ble_npl_error = 2;
pub const ble_npl_error_BLE_NPL_INVALID_PARAM: ble_npl_error = 3;
pub const ble_npl_error_BLE_NPL_MEM_NOT_ALIGNED: ble_npl_error = 4;
pub const ble_npl_error_BLE_NPL_BAD_MUTEX: ble_npl_error = 5;
pub const ble_npl_error_BLE_NPL_TIMEOUT: ble_npl_error = 6;
pub const ble_npl_error_BLE_NPL_ERR_IN_ISR: ble_npl_error = 7;
pub const ble_npl_error_BLE_NPL_ERR_PRIV: ble_npl_error = 8;
pub const ble_npl_error_BLE_NPL_OS_NOT_STARTED: ble_npl_error = 9;
pub const ble_npl_error_BLE_NPL_ENOENT: ble_npl_error = 10;
pub const ble_npl_error_BLE_NPL_EBUSY: ble_npl_error = 11;
pub const ble_npl_error_BLE_NPL_ERROR: ble_npl_error = 12;
pub type ble_npl_error = u32;
pub use self::ble_npl_error as ble_npl_error_t;
pub type ble_npl_time_t = u32;
pub type ble_npl_stime_t = i32;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_npl_event {
pub dummy: cty::c_int,
}
#[test]
fn bindgen_test_layout_ble_npl_event() {
assert_eq!(
::core::mem::size_of::<ble_npl_event>(),
4usize,
concat!("Size of: ", stringify!(ble_npl_event))
);
assert_eq!(
::core::mem::align_of::<ble_npl_event>(),
4usize,
concat!("Alignment of ", stringify!(ble_npl_event))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_npl_event>())).dummy as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_npl_event),
"::",
stringify!(dummy)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_npl_eventq {
pub dummy: cty::c_int,
}
#[test]
fn bindgen_test_layout_ble_npl_eventq() {
assert_eq!(
::core::mem::size_of::<ble_npl_eventq>(),
4usize,
concat!("Size of: ", stringify!(ble_npl_eventq))
);
assert_eq!(
::core::mem::align_of::<ble_npl_eventq>(),
4usize,
concat!("Alignment of ", stringify!(ble_npl_eventq))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_npl_eventq>())).dummy as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_npl_eventq),
"::",
stringify!(dummy)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_npl_callout {
pub dummy: cty::c_int,
}
#[test]
fn bindgen_test_layout_ble_npl_callout() {
assert_eq!(
::core::mem::size_of::<ble_npl_callout>(),
4usize,
concat!("Size of: ", stringify!(ble_npl_callout))
);
assert_eq!(
::core::mem::align_of::<ble_npl_callout>(),
4usize,
concat!("Alignment of ", stringify!(ble_npl_callout))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_npl_callout>())).dummy as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_npl_callout),
"::",
stringify!(dummy)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_npl_mutex {
pub dummy: cty::c_int,
}
#[test]
fn bindgen_test_layout_ble_npl_mutex() {
assert_eq!(
::core::mem::size_of::<ble_npl_mutex>(),
4usize,
concat!("Size of: ", stringify!(ble_npl_mutex))
);
assert_eq!(
::core::mem::align_of::<ble_npl_mutex>(),
4usize,
concat!("Alignment of ", stringify!(ble_npl_mutex))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_npl_mutex>())).dummy as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_npl_mutex),
"::",
stringify!(dummy)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_npl_sem {
pub dummy: cty::c_int,
}
#[test]
fn bindgen_test_layout_ble_npl_sem() {
assert_eq!(
::core::mem::size_of::<ble_npl_sem>(),
4usize,
concat!("Size of: ", stringify!(ble_npl_sem))
);
assert_eq!(
::core::mem::align_of::<ble_npl_sem>(),
4usize,
concat!("Alignment of ", stringify!(ble_npl_sem))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_npl_sem>())).dummy as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_npl_sem),
"::",
stringify!(dummy)
)
);
}
extern "C" {
pub fn ble_npl_os_started() -> bool;
}
extern "C" {
pub fn ble_npl_get_current_task_id() -> *mut cty::c_void;
}
extern "C" {
pub fn ble_npl_eventq_init(evq: *mut ble_npl_eventq);
}
extern "C" {
pub fn ble_npl_eventq_get(evq: *mut ble_npl_eventq, tmo: ble_npl_time_t) -> *mut ble_npl_event;
}
extern "C" {
pub fn ble_npl_eventq_put(evq: *mut ble_npl_eventq, ev: *mut ble_npl_event);
}
extern "C" {
pub fn ble_npl_eventq_remove(evq: *mut ble_npl_eventq, ev: *mut ble_npl_event);
}
extern "C" {
pub fn ble_npl_event_init(ev: *mut ble_npl_event, fn_: ble_npl_event_fn, arg: *mut cty::c_void);
}
extern "C" {
pub fn ble_npl_event_is_queued(ev: *mut ble_npl_event) -> bool;
}
extern "C" {
pub fn ble_npl_event_get_arg(ev: *mut ble_npl_event) -> *mut cty::c_void;
}
extern "C" {
pub fn ble_npl_event_set_arg(ev: *mut ble_npl_event, arg: *mut cty::c_void);
}
extern "C" {
pub fn ble_npl_eventq_is_empty(evq: *mut ble_npl_eventq) -> bool;
}
extern "C" {
pub fn ble_npl_event_run(ev: *mut ble_npl_event);
}
extern "C" {
pub fn ble_npl_mutex_init(mu: *mut ble_npl_mutex) -> ble_npl_error_t;
}
extern "C" {
pub fn ble_npl_mutex_pend(mu: *mut ble_npl_mutex, timeout: ble_npl_time_t) -> ble_npl_error_t;
}
extern "C" {
pub fn ble_npl_mutex_release(mu: *mut ble_npl_mutex) -> ble_npl_error_t;
}
extern "C" {
pub fn ble_npl_sem_init(sem: *mut ble_npl_sem, tokens: u16) -> ble_npl_error_t;
}
extern "C" {
pub fn ble_npl_sem_pend(sem: *mut ble_npl_sem, timeout: ble_npl_time_t) -> ble_npl_error_t;
}
extern "C" {
pub fn ble_npl_sem_release(sem: *mut ble_npl_sem) -> ble_npl_error_t;
}
extern "C" {
pub fn ble_npl_sem_get_count(sem: *mut ble_npl_sem) -> u16;
}
extern "C" {
pub fn ble_npl_callout_init(
co: *mut ble_npl_callout,
evq: *mut ble_npl_eventq,
ev_cb: ble_npl_event_fn,
ev_arg: *mut cty::c_void,
);
}
extern "C" {
pub fn ble_npl_callout_reset(
co: *mut ble_npl_callout,
ticks: ble_npl_time_t,
) -> ble_npl_error_t;
}
extern "C" {
pub fn ble_npl_callout_stop(co: *mut ble_npl_callout);
}
extern "C" {
pub fn ble_npl_callout_is_active(co: *mut ble_npl_callout) -> bool;
}
extern "C" {
pub fn ble_npl_callout_get_ticks(co: *mut ble_npl_callout) -> ble_npl_time_t;
}
extern "C" {
pub fn ble_npl_callout_remaining_ticks(
co: *mut ble_npl_callout,
time: ble_npl_time_t,
) -> ble_npl_time_t;
}
extern "C" {
pub fn ble_npl_callout_set_arg(co: *mut ble_npl_callout, arg: *mut cty::c_void);
}
extern "C" {
pub fn ble_npl_time_get() -> ble_npl_time_t;
}
extern "C" {
pub fn ble_npl_time_ms_to_ticks(ms: u32, out_ticks: *mut ble_npl_time_t) -> ble_npl_error_t;
}
extern "C" {
pub fn ble_npl_time_ticks_to_ms(ticks: ble_npl_time_t, out_ms: *mut u32) -> ble_npl_error_t;
}
extern "C" {
pub fn ble_npl_time_ms_to_ticks32(ms: u32) -> ble_npl_time_t;
}
extern "C" {
pub fn ble_npl_time_ticks_to_ms32(ticks: ble_npl_time_t) -> u32;
}
extern "C" {
pub fn ble_npl_time_delay(ticks: ble_npl_time_t);
}
extern "C" {
pub fn ble_npl_hw_enter_critical() -> u32;
}
extern "C" {
pub fn ble_npl_hw_exit_critical(ctx: u32);
}
extern "C" {
pub fn ble_npl_hw_is_in_critical() -> bool;
}
extern "C" {
pub fn nimble_port_init();
}
extern "C" {
pub fn nimble_port_run();
}
extern "C" {
pub fn nimble_port_get_dflt_eventq() -> *mut ble_npl_eventq;
}
pub type __gwchar_t = cty::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct imaxdiv_t {
pub quot: cty::c_long,
pub rem: cty::c_long,
}
#[test]
fn bindgen_test_layout_imaxdiv_t() {
assert_eq!(
::core::mem::size_of::<imaxdiv_t>(),
16usize,
concat!("Size of: ", stringify!(imaxdiv_t))
);
assert_eq!(
::core::mem::align_of::<imaxdiv_t>(),
8usize,
concat!("Alignment of ", stringify!(imaxdiv_t))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<imaxdiv_t>())).quot as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(imaxdiv_t),
"::",
stringify!(quot)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<imaxdiv_t>())).rem as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(imaxdiv_t),
"::",
stringify!(rem)
)
);
}
extern "C" {
pub fn imaxabs(__n: intmax_t) -> intmax_t;
}
extern "C" {
pub fn imaxdiv(__numer: intmax_t, __denom: intmax_t) -> imaxdiv_t;
}
extern "C" {
pub fn strtoimax(
__nptr: *const cty::c_char,
__endptr: *mut *mut cty::c_char,
__base: cty::c_int,
) -> intmax_t;
}
extern "C" {
pub fn strtoumax(
__nptr: *const cty::c_char,
__endptr: *mut *mut cty::c_char,
__base: cty::c_int,
) -> uintmax_t;
}
extern "C" {
pub fn wcstoimax(
__nptr: *const __gwchar_t,
__endptr: *mut *mut __gwchar_t,
__base: cty::c_int,
) -> intmax_t;
}
extern "C" {
pub fn wcstoumax(
__nptr: *const __gwchar_t,
__endptr: *mut *mut __gwchar_t,
__base: cty::c_int,
) -> uintmax_t;
}
extern "C" {
pub fn memcpy(
__dest: *mut cty::c_void,
__src: *const cty::c_void,
__n: cty::c_ulong,
) -> *mut cty::c_void;
}
extern "C" {
pub fn memmove(
__dest: *mut cty::c_void,
__src: *const cty::c_void,
__n: cty::c_ulong,
) -> *mut cty::c_void;
}
extern "C" {
pub fn memccpy(
__dest: *mut cty::c_void,
__src: *const cty::c_void,
__c: cty::c_int,
__n: cty::c_ulong,
) -> *mut cty::c_void;
}
extern "C" {
pub fn memset(__s: *mut cty::c_void, __c: cty::c_int, __n: cty::c_ulong) -> *mut cty::c_void;
}
extern "C" {
pub fn memcmp(
__s1: *const cty::c_void,
__s2: *const cty::c_void,
__n: cty::c_ulong,
) -> cty::c_int;
}
extern "C" {
pub fn memchr(__s: *const cty::c_void, __c: cty::c_int, __n: cty::c_ulong) -> *mut cty::c_void;
}
extern "C" {
pub fn strcpy(__dest: *mut cty::c_char, __src: *const cty::c_char) -> *mut cty::c_char;
}
extern "C" {
pub fn strncpy(
__dest: *mut cty::c_char,
__src: *const cty::c_char,
__n: cty::c_ulong,
) -> *mut cty::c_char;
}
extern "C" {
pub fn strcat(__dest: *mut cty::c_char, __src: *const cty::c_char) -> *mut cty::c_char;
}
extern "C" {
pub fn strncat(
__dest: *mut cty::c_char,
__src: *const cty::c_char,
__n: cty::c_ulong,
) -> *mut cty::c_char;
}
extern "C" {
pub fn strcmp(__s1: *const cty::c_char, __s2: *const cty::c_char) -> cty::c_int;
}
extern "C" {
pub fn strncmp(
__s1: *const cty::c_char,
__s2: *const cty::c_char,
__n: cty::c_ulong,
) -> cty::c_int;
}
extern "C" {
pub fn strcoll(__s1: *const cty::c_char, __s2: *const cty::c_char) -> cty::c_int;
}
extern "C" {
pub fn strxfrm(
__dest: *mut cty::c_char,
__src: *const cty::c_char,
__n: cty::c_ulong,
) -> cty::c_ulong;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __locale_struct {
pub __locales: [*mut __locale_data; 13usize],
pub __ctype_b: *const cty::c_ushort,
pub __ctype_tolower: *const cty::c_int,
pub __ctype_toupper: *const cty::c_int,
pub __names: [*const cty::c_char; 13usize],
}
#[test]
fn bindgen_test_layout___locale_struct() {
assert_eq!(
::core::mem::size_of::<__locale_struct>(),
232usize,
concat!("Size of: ", stringify!(__locale_struct))
);
assert_eq!(
::core::mem::align_of::<__locale_struct>(),
8usize,
concat!("Alignment of ", stringify!(__locale_struct))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<__locale_struct>())).__locales as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__locale_struct),
"::",
stringify!(__locales)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<__locale_struct>())).__ctype_b as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(__locale_struct),
"::",
stringify!(__ctype_b)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<__locale_struct>())).__ctype_tolower as *const _ as usize
},
112usize,
concat!(
"Offset of field: ",
stringify!(__locale_struct),
"::",
stringify!(__ctype_tolower)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<__locale_struct>())).__ctype_toupper as *const _ as usize
},
120usize,
concat!(
"Offset of field: ",
stringify!(__locale_struct),
"::",
stringify!(__ctype_toupper)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<__locale_struct>())).__names as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(__locale_struct),
"::",
stringify!(__names)
)
);
}
pub type __locale_t = *mut __locale_struct;
pub type locale_t = __locale_t;
extern "C" {
pub fn strcoll_l(
__s1: *const cty::c_char,
__s2: *const cty::c_char,
__l: locale_t,
) -> cty::c_int;
}
extern "C" {
pub fn strxfrm_l(
__dest: *mut cty::c_char,
__src: *const cty::c_char,
__n: size_t,
__l: locale_t,
) -> size_t;
}
extern "C" {
pub fn strdup(__s: *const cty::c_char) -> *mut cty::c_char;
}
extern "C" {
pub fn strndup(__string: *const cty::c_char, __n: cty::c_ulong) -> *mut cty::c_char;
}
extern "C" {
pub fn strchr(__s: *const cty::c_char, __c: cty::c_int) -> *mut cty::c_char;
}
extern "C" {
pub fn strrchr(__s: *const cty::c_char, __c: cty::c_int) -> *mut cty::c_char;
}
extern "C" {
pub fn strcspn(__s: *const cty::c_char, __reject: *const cty::c_char) -> cty::c_ulong;
}
extern "C" {
pub fn strspn(__s: *const cty::c_char, __accept: *const cty::c_char) -> cty::c_ulong;
}
extern "C" {
pub fn strpbrk(__s: *const cty::c_char, __accept: *const cty::c_char) -> *mut cty::c_char;
}
extern "C" {
pub fn strstr(__haystack: *const cty::c_char, __needle: *const cty::c_char)
-> *mut cty::c_char;
}
extern "C" {
pub fn strtok(__s: *mut cty::c_char, __delim: *const cty::c_char) -> *mut cty::c_char;
}
extern "C" {
pub fn __strtok_r(
__s: *mut cty::c_char,
__delim: *const cty::c_char,
__save_ptr: *mut *mut cty::c_char,
) -> *mut cty::c_char;
}
extern "C" {
pub fn strtok_r(
__s: *mut cty::c_char,
__delim: *const cty::c_char,
__save_ptr: *mut *mut cty::c_char,
) -> *mut cty::c_char;
}
extern "C" {
pub fn strlen(__s: *const cty::c_char) -> cty::c_ulong;
}
extern "C" {
pub fn strnlen(__string: *const cty::c_char, __maxlen: size_t) -> size_t;
}
extern "C" {
pub fn strerror(__errnum: cty::c_int) -> *mut cty::c_char;
}
extern "C" {
#[link_name = "\u{1}__xpg_strerror_r"]
pub fn strerror_r(
__errnum: cty::c_int,
__buf: *mut cty::c_char,
__buflen: size_t,
) -> cty::c_int;
}
extern "C" {
pub fn strerror_l(__errnum: cty::c_int, __l: locale_t) -> *mut cty::c_char;
}
extern "C" {
pub fn bcmp(
__s1: *const cty::c_void,
__s2: *const cty::c_void,
__n: cty::c_ulong,
) -> cty::c_int;
}
extern "C" {
pub fn bcopy(__src: *const cty::c_void, __dest: *mut cty::c_void, __n: size_t);
}
extern "C" {
pub fn bzero(__s: *mut cty::c_void, __n: cty::c_ulong);
}
extern "C" {
pub fn index(__s: *const cty::c_char, __c: cty::c_int) -> *mut cty::c_char;
}
extern "C" {
pub fn rindex(__s: *const cty::c_char, __c: cty::c_int) -> *mut cty::c_char;
}
extern "C" {
pub fn ffs(__i: cty::c_int) -> cty::c_int;
}
extern "C" {
pub fn ffsl(__l: cty::c_long) -> cty::c_int;
}
extern "C" {
pub fn ffsll(__ll: cty::c_longlong) -> cty::c_int;
}
extern "C" {
pub fn strcasecmp(__s1: *const cty::c_char, __s2: *const cty::c_char) -> cty::c_int;
}
extern "C" {
pub fn strncasecmp(
__s1: *const cty::c_char,
__s2: *const cty::c_char,
__n: cty::c_ulong,
) -> cty::c_int;
}
extern "C" {
pub fn strcasecmp_l(
__s1: *const cty::c_char,
__s2: *const cty::c_char,
__loc: locale_t,
) -> cty::c_int;
}
extern "C" {
pub fn strncasecmp_l(
__s1: *const cty::c_char,
__s2: *const cty::c_char,
__n: size_t,
__loc: locale_t,
) -> cty::c_int;
}
extern "C" {
pub fn explicit_bzero(__s: *mut cty::c_void, __n: size_t);
}
extern "C" {
pub fn strsep(
__stringp: *mut *mut cty::c_char,
__delim: *const cty::c_char,
) -> *mut cty::c_char;
}
extern "C" {
pub fn strsignal(__sig: cty::c_int) -> *mut cty::c_char;
}
extern "C" {
pub fn __stpcpy(__dest: *mut cty::c_char, __src: *const cty::c_char) -> *mut cty::c_char;
}
extern "C" {
pub fn stpcpy(__dest: *mut cty::c_char, __src: *const cty::c_char) -> *mut cty::c_char;
}
extern "C" {
pub fn __stpncpy(
__dest: *mut cty::c_char,
__src: *const cty::c_char,
__n: size_t,
) -> *mut cty::c_char;
}
extern "C" {
pub fn stpncpy(
__dest: *mut cty::c_char,
__src: *const cty::c_char,
__n: cty::c_ulong,
) -> *mut cty::c_char;
}
extern "C" {
pub fn __assert_fail(
__assertion: *const cty::c_char,
__file: *const cty::c_char,
__line: cty::c_uint,
__function: *const cty::c_char,
);
}
extern "C" {
pub fn __assert_perror_fail(
__errnum: cty::c_int,
__file: *const cty::c_char,
__line: cty::c_uint,
__function: *const cty::c_char,
);
}
extern "C" {
pub fn __assert(
__assertion: *const cty::c_char,
__file: *const cty::c_char,
__line: cty::c_int,
);
}
pub type os_sr_t = u32;
extern "C" {
pub fn put_le16(buf: *mut cty::c_void, x: u16);
}
extern "C" {
pub fn put_le24(buf: *mut cty::c_void, x: u32);
}
extern "C" {
pub fn put_le32(buf: *mut cty::c_void, x: u32);
}
extern "C" {
pub fn put_le64(buf: *mut cty::c_void, x: u64);
}
extern "C" {
pub fn get_le16(buf: *const cty::c_void) -> u16;
}
extern "C" {
pub fn get_le24(buf: *const cty::c_void) -> u32;
}
extern "C" {
pub fn get_le32(buf: *const cty::c_void) -> u32;
}
extern "C" {
pub fn get_le64(buf: *const cty::c_void) -> u64;
}
extern "C" {
pub fn put_be16(buf: *mut cty::c_void, x: u16);
}
extern "C" {
pub fn put_be24(buf: *mut cty::c_void, x: u32);
}
extern "C" {
pub fn put_be32(buf: *mut cty::c_void, x: u32);
}
extern "C" {
pub fn put_be64(buf: *mut cty::c_void, x: u64);
}
extern "C" {
pub fn get_be16(buf: *const cty::c_void) -> u16;
}
extern "C" {
pub fn get_be24(buf: *const cty::c_void) -> u32;
}
extern "C" {
pub fn get_be32(buf: *const cty::c_void) -> u32;
}
extern "C" {
pub fn get_be64(buf: *const cty::c_void) -> u64;
}
extern "C" {
pub fn swap_in_place(buf: *mut cty::c_void, len: cty::c_int);
}
extern "C" {
pub fn swap_buf(dst: *mut u8, src: *const u8, len: cty::c_int);
}
pub const os_error_OS_OK: os_error = 0;
pub const os_error_OS_ENOMEM: os_error = 1;
pub const os_error_OS_EINVAL: os_error = 2;
pub const os_error_OS_INVALID_PARM: os_error = 3;
pub const os_error_OS_MEM_NOT_ALIGNED: os_error = 4;
pub const os_error_OS_BAD_MUTEX: os_error = 5;
pub const os_error_OS_TIMEOUT: os_error = 6;
pub const os_error_OS_ERR_IN_ISR: os_error = 7;
pub const os_error_OS_ERR_PRIV: os_error = 8;
pub const os_error_OS_NOT_STARTED: os_error = 9;
pub const os_error_OS_ENOENT: os_error = 10;
pub const os_error_OS_EBUSY: os_error = 11;
pub const os_error_OS_ERROR: os_error = 12;
pub type os_error = u32;
pub use self::os_error as os_error_t;
#[doc = " A mbuf pool from which to allocate mbufs. This contains a pointer to the os"]
#[doc = " mempool to allocate mbufs out of, the total number of elements in the pool,"]
#[doc = " and the amount of \"user\" data in a non-packet header mbuf. The total pool"]
#[doc = " size, in bytes, should be:"]
#[doc = " os_mbuf_count * (omp_databuf_len + sizeof(struct os_mbuf))"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct os_mbuf_pool {
#[doc = " Total length of the databuf in each mbuf. This is the size of the"]
#[doc = " mempool block, minus the mbuf header"]
pub omp_databuf_len: u16,
#[doc = " The memory pool which to allocate mbufs out of"]
pub omp_pool: *mut os_mempool,
pub omp_next: os_mbuf_pool__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct os_mbuf_pool__bindgen_ty_1 {
pub stqe_next: *mut os_mbuf_pool,
}
#[test]
fn bindgen_test_layout_os_mbuf_pool__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<os_mbuf_pool__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(os_mbuf_pool__bindgen_ty_1))
);
assert_eq!(
::core::mem::align_of::<os_mbuf_pool__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(os_mbuf_pool__bindgen_ty_1))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<os_mbuf_pool__bindgen_ty_1>())).stqe_next as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(os_mbuf_pool__bindgen_ty_1),
"::",
stringify!(stqe_next)
)
);
}
#[test]
fn bindgen_test_layout_os_mbuf_pool() {
assert_eq!(
::core::mem::size_of::<os_mbuf_pool>(),
24usize,
concat!("Size of: ", stringify!(os_mbuf_pool))
);
assert_eq!(
::core::mem::align_of::<os_mbuf_pool>(),
8usize,
concat!("Alignment of ", stringify!(os_mbuf_pool))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mbuf_pool>())).omp_databuf_len as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(os_mbuf_pool),
"::",
stringify!(omp_databuf_len)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mbuf_pool>())).omp_pool as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(os_mbuf_pool),
"::",
stringify!(omp_pool)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mbuf_pool>())).omp_next as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(os_mbuf_pool),
"::",
stringify!(omp_next)
)
);
}
#[doc = " A packet header structure that preceeds the mbuf packet headers."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct os_mbuf_pkthdr {
#[doc = " Overall length of the packet."]
pub omp_len: u16,
#[doc = " Flags"]
pub omp_flags: u16,
pub omp_next: os_mbuf_pkthdr__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct os_mbuf_pkthdr__bindgen_ty_1 {
pub stqe_next: *mut os_mbuf_pkthdr,
}
#[test]
fn bindgen_test_layout_os_mbuf_pkthdr__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<os_mbuf_pkthdr__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(os_mbuf_pkthdr__bindgen_ty_1))
);
assert_eq!(
::core::mem::align_of::<os_mbuf_pkthdr__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(os_mbuf_pkthdr__bindgen_ty_1))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<os_mbuf_pkthdr__bindgen_ty_1>())).stqe_next as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(os_mbuf_pkthdr__bindgen_ty_1),
"::",
stringify!(stqe_next)
)
);
}
#[test]
fn bindgen_test_layout_os_mbuf_pkthdr() {
assert_eq!(
::core::mem::size_of::<os_mbuf_pkthdr>(),
16usize,
concat!("Size of: ", stringify!(os_mbuf_pkthdr))
);
assert_eq!(
::core::mem::align_of::<os_mbuf_pkthdr>(),
8usize,
concat!("Alignment of ", stringify!(os_mbuf_pkthdr))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mbuf_pkthdr>())).omp_len as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(os_mbuf_pkthdr),
"::",
stringify!(omp_len)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mbuf_pkthdr>())).omp_flags as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(os_mbuf_pkthdr),
"::",
stringify!(omp_flags)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mbuf_pkthdr>())).omp_next as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(os_mbuf_pkthdr),
"::",
stringify!(omp_next)
)
);
}
#[doc = " Chained memory buffer."]
#[repr(C)]
#[derive(Debug)]
pub struct os_mbuf {
#[doc = " Current pointer to data in the structure"]
pub om_data: *mut u8,
#[doc = " Flags associated with this buffer, see OS_MBUF_F_* defintions"]
pub om_flags: u8,
#[doc = " Length of packet header"]
pub om_pkthdr_len: u8,
#[doc = " Length of data in this buffer"]
pub om_len: u16,
#[doc = " The mbuf pool this mbuf was allocated out of"]
pub om_omp: *mut os_mbuf_pool,
pub om_next: os_mbuf__bindgen_ty_1,
#[doc = " Pointer to the beginning of the data, after this buffer"]
pub om_databuf: __IncompleteArrayField<u8>,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct os_mbuf__bindgen_ty_1 {
pub sle_next: *mut os_mbuf,
}
#[test]
fn bindgen_test_layout_os_mbuf__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<os_mbuf__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(os_mbuf__bindgen_ty_1))
);
assert_eq!(
::core::mem::align_of::<os_mbuf__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(os_mbuf__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mbuf__bindgen_ty_1>())).sle_next as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(os_mbuf__bindgen_ty_1),
"::",
stringify!(sle_next)
)
);
}
#[test]
fn bindgen_test_layout_os_mbuf() {
assert_eq!(
::core::mem::size_of::<os_mbuf>(),
32usize,
concat!("Size of: ", stringify!(os_mbuf))
);
assert_eq!(
::core::mem::align_of::<os_mbuf>(),
8usize,
concat!("Alignment of ", stringify!(os_mbuf))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mbuf>())).om_data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(os_mbuf),
"::",
stringify!(om_data)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mbuf>())).om_flags as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(os_mbuf),
"::",
stringify!(om_flags)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mbuf>())).om_pkthdr_len as *const _ as usize },
9usize,
concat!(
"Offset of field: ",
stringify!(os_mbuf),
"::",
stringify!(om_pkthdr_len)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mbuf>())).om_len as *const _ as usize },
10usize,
concat!(
"Offset of field: ",
stringify!(os_mbuf),
"::",
stringify!(om_len)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mbuf>())).om_omp as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(os_mbuf),
"::",
stringify!(om_omp)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mbuf>())).om_next as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(os_mbuf),
"::",
stringify!(om_next)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mbuf>())).om_databuf as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(os_mbuf),
"::",
stringify!(om_databuf)
)
);
}
#[doc = " Structure representing a queue of mbufs."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct os_mqueue {
pub mq_head: os_mqueue__bindgen_ty_1,
#[doc = " Event to post when new buffers are available on the queue."]
pub mq_ev: ble_npl_event,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct os_mqueue__bindgen_ty_1 {
pub stqh_first: *mut os_mbuf_pkthdr,
pub stqh_last: *mut *mut os_mbuf_pkthdr,
}
#[test]
fn bindgen_test_layout_os_mqueue__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<os_mqueue__bindgen_ty_1>(),
16usize,
concat!("Size of: ", stringify!(os_mqueue__bindgen_ty_1))
);
assert_eq!(
::core::mem::align_of::<os_mqueue__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(os_mqueue__bindgen_ty_1))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<os_mqueue__bindgen_ty_1>())).stqh_first as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(os_mqueue__bindgen_ty_1),
"::",
stringify!(stqh_first)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<os_mqueue__bindgen_ty_1>())).stqh_last as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(os_mqueue__bindgen_ty_1),
"::",
stringify!(stqh_last)
)
);
}
#[test]
fn bindgen_test_layout_os_mqueue() {
assert_eq!(
::core::mem::size_of::<os_mqueue>(),
24usize,
concat!("Size of: ", stringify!(os_mqueue))
);
assert_eq!(
::core::mem::align_of::<os_mqueue>(),
8usize,
concat!("Alignment of ", stringify!(os_mqueue))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mqueue>())).mq_head as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(os_mqueue),
"::",
stringify!(mq_head)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mqueue>())).mq_ev as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(os_mqueue),
"::",
stringify!(mq_ev)
)
);
}
extern "C" {
#[doc = " Initializes an mqueue. An mqueue is a queue of mbufs that ties to a"]
#[doc = " particular task's event queue. Mqueues form a helper API around a common"]
#[doc = " paradigm: wait on an event queue until at least one packet is available,"]
#[doc = " then process a queue of packets."]
#[doc = ""]
#[doc = " When mbufs are available on the queue, an event OS_EVENT_T_MQUEUE_DATA"]
#[doc = " will be posted to the task's mbuf queue."]
#[doc = ""]
#[doc = " @param mq The mqueue to initialize"]
#[doc = " @param ev_cb The callback to associate with the mqeueue"]
#[doc = " event. Typically, this callback pulls each"]
#[doc = " packet off the mqueue and processes them."]
#[doc = " @param arg The argument to associate with the mqueue event."]
#[doc = ""]
#[doc = " @return 0 on success, non-zero on failure."]
pub fn os_mqueue_init(
mq: *mut os_mqueue,
ev_cb: ble_npl_event_fn,
arg: *mut cty::c_void,
) -> cty::c_int;
}
extern "C" {
#[doc = " Remove and return a single mbuf from the mbuf queue. Does not block."]
#[doc = ""]
#[doc = " @param mq The mbuf queue to pull an element off of."]
#[doc = ""]
#[doc = " @return The next mbuf in the queue, or NULL if queue has no mbufs."]
pub fn os_mqueue_get(arg1: *mut os_mqueue) -> *mut os_mbuf;
}
extern "C" {
#[doc = " Adds a packet (i.e. packet header mbuf) to an mqueue. The event associated"]
#[doc = " with the mqueue gets posted to the specified eventq."]
#[doc = ""]
#[doc = " @param mq The mbuf queue to append the mbuf to."]
#[doc = " @param evq The event queue to post an event to."]
#[doc = " @param m The mbuf to append to the mbuf queue."]
#[doc = ""]
#[doc = " @return 0 on success, non-zero on failure."]
pub fn os_mqueue_put(
arg1: *mut os_mqueue,
arg2: *mut ble_npl_eventq,
arg3: *mut os_mbuf,
) -> cty::c_int;
}
extern "C" {
#[doc = " MSYS is a system level mbuf registry. Allows the system to share"]
#[doc = " packet buffers amongst the various networking stacks that can be running"]
#[doc = " simultaeneously."]
#[doc = ""]
#[doc = " Mbuf pools are created in the system initialization code, and then when"]
#[doc = " a mbuf is allocated out of msys, it will try and find the best fit based"]
#[doc = " upon estimated mbuf size."]
#[doc = ""]
#[doc = " os_msys_register() registers a mbuf pool with MSYS, and allows MSYS to"]
#[doc = " allocate mbufs out of it."]
#[doc = ""]
#[doc = " @param new_pool The pool to register with MSYS"]
#[doc = ""]
#[doc = " @return 0 on success, non-zero on failure"]
pub fn os_msys_register(arg1: *mut os_mbuf_pool) -> cty::c_int;
}
extern "C" {
#[doc = " Allocate a mbuf from msys. Based upon the data size requested,"]
#[doc = " os_msys_get() will choose the mbuf pool that has the best fit."]
#[doc = ""]
#[doc = " @param dsize The estimated size of the data being stored in the mbuf"]
#[doc = " @param leadingspace The amount of leadingspace to allocate in the mbuf"]
#[doc = ""]
#[doc = " @return A freshly allocated mbuf on success, NULL on failure."]
pub fn os_msys_get(dsize: u16, leadingspace: u16) -> *mut os_mbuf;
}
extern "C" {
#[doc = " De-registers all mbuf pools from msys."]
pub fn os_msys_reset();
}
extern "C" {
#[doc = " Allocate a packet header structure from the MSYS pool. See"]
#[doc = " os_msys_register() for a description of MSYS."]
#[doc = ""]
#[doc = " @param dsize The estimated size of the data being stored in the mbuf"]
#[doc = " @param user_hdr_len The length to allocate for the packet header structure"]
#[doc = ""]
#[doc = " @return A freshly allocated mbuf on success, NULL on failure."]
pub fn os_msys_get_pkthdr(dsize: u16, user_hdr_len: u16) -> *mut os_mbuf;
}
extern "C" {
#[doc = " Count the number of blocks in all the mbuf pools that are allocated."]
#[doc = ""]
#[doc = " @return total number of blocks allocated in Msys"]
pub fn os_msys_count() -> cty::c_int;
}
extern "C" {
#[doc = " Return the number of free blocks in Msys"]
#[doc = ""]
#[doc = " @return Number of free blocks available in Msys"]
pub fn os_msys_num_free() -> cty::c_int;
}
extern "C" {
#[doc = " Initialize a pool of mbufs."]
#[doc = ""]
#[doc = " @param omp The mbuf pool to initialize"]
#[doc = " @param mp The memory pool that will hold this mbuf pool"]
#[doc = " @param buf_len The length of the buffer itself."]
#[doc = " @param nbufs The number of buffers in the pool"]
#[doc = ""]
#[doc = " @return 0 on success, error code on failure."]
pub fn os_mbuf_pool_init(
arg1: *mut os_mbuf_pool,
mp: *mut os_mempool,
arg2: u16,
arg3: u16,
) -> cty::c_int;
}
extern "C" {
#[doc = " Get an mbuf from the mbuf pool. The mbuf is allocated, and initialized"]
#[doc = " prior to being returned."]
#[doc = ""]
#[doc = " @param omp The mbuf pool to return the packet from"]
#[doc = " @param leadingspace The amount of leadingspace to put before the data"]
#[doc = " section by default."]
#[doc = ""]
#[doc = " @return An initialized mbuf on success, and NULL on failure."]
pub fn os_mbuf_get(omp: *mut os_mbuf_pool, arg1: u16) -> *mut os_mbuf;
}
extern "C" {
#[doc = " Allocate a new packet header mbuf out of the os_mbuf_pool."]
#[doc = ""]
#[doc = " @param omp The mbuf pool to allocate out of"]
#[doc = " @param user_pkthdr_len The packet header length to reserve for the caller."]
#[doc = ""]
#[doc = " @return A freshly allocated mbuf on success, NULL on failure."]
pub fn os_mbuf_get_pkthdr(omp: *mut os_mbuf_pool, pkthdr_len: u8) -> *mut os_mbuf;
}
extern "C" {
#[doc = " Duplicate a chain of mbufs. Return the start of the duplicated chain."]
#[doc = ""]
#[doc = " @param omp The mbuf pool to duplicate out of"]
#[doc = " @param om The mbuf chain to duplicate"]
#[doc = ""]
#[doc = " @return A pointer to the new chain of mbufs"]
pub fn os_mbuf_dup(m: *mut os_mbuf) -> *mut os_mbuf;
}
extern "C" {
#[doc = " Locates the specified absolute offset within an mbuf chain. The offset"]
#[doc = " can be one past than the total length of the chain, but no greater."]
#[doc = ""]
#[doc = " @param om The start of the mbuf chain to seek within."]
#[doc = " @param off The absolute address to find."]
#[doc = " @param out_off On success, this points to the relative offset"]
#[doc = " within the returned mbuf."]
#[doc = ""]
#[doc = " @return The mbuf containing the specified offset on"]
#[doc = " success."]
#[doc = " NULL if the specified offset is out of bounds."]
pub fn os_mbuf_off(om: *const os_mbuf, off: cty::c_int, out_off: *mut u16) -> *mut os_mbuf;
}
extern "C" {
pub fn os_mbuf_copydata(
m: *const os_mbuf,
off: cty::c_int,
len: cty::c_int,
dst: *mut cty::c_void,
) -> cty::c_int;
}
extern "C" {
#[doc = " Append data onto a mbuf"]
#[doc = ""]
#[doc = " @param om The mbuf to append the data onto"]
#[doc = " @param data The data to append onto the mbuf"]
#[doc = " @param len The length of the data to append"]
#[doc = ""]
#[doc = " @return 0 on success, and an error code on failure"]
pub fn os_mbuf_append(m: *mut os_mbuf, arg1: *const cty::c_void, arg2: u16) -> cty::c_int;
}
extern "C" {
#[doc = " Reads data from one mbuf and appends it to another. On error, the specified"]
#[doc = " data range may be partially appended. Neither mbuf is required to contain"]
#[doc = " an mbuf packet header."]
#[doc = ""]
#[doc = " @param dst The mbuf to append to."]
#[doc = " @param src The mbuf to copy data from."]
#[doc = " @param src_off The absolute offset within the source mbuf"]
#[doc = " chain to read from."]
#[doc = " @param len The number of bytes to append."]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " OS_EINVAL if the specified range extends beyond"]
#[doc = " the end of the source mbuf chain."]
pub fn os_mbuf_appendfrom(
dst: *mut os_mbuf,
src: *const os_mbuf,
src_off: u16,
len: u16,
) -> cty::c_int;
}
extern "C" {
#[doc = " Release a mbuf back to the pool"]
#[doc = ""]
#[doc = " @param omp The Mbuf pool to release back to"]
#[doc = " @param om The Mbuf to release back to the pool"]
#[doc = ""]
#[doc = " @return 0 on success, -1 on failure"]
pub fn os_mbuf_free(mb: *mut os_mbuf) -> cty::c_int;
}
extern "C" {
#[doc = " Free a chain of mbufs"]
#[doc = ""]
#[doc = " @param omp The mbuf pool to free the chain of mbufs into"]
#[doc = " @param om The starting mbuf of the chain to free back into the pool"]
#[doc = ""]
#[doc = " @return 0 on success, -1 on failure"]
pub fn os_mbuf_free_chain(om: *mut os_mbuf) -> cty::c_int;
}
extern "C" {
#[doc = " Adjust the length of a mbuf, trimming either from the head or the tail"]
#[doc = " of the mbuf."]
#[doc = ""]
#[doc = " @param mp The mbuf chain to adjust"]
#[doc = " @param req_len The length to trim from the mbuf. If positive, trims"]
#[doc = " from the head of the mbuf, if negative, trims from the"]
#[doc = " tail of the mbuf."]
pub fn os_mbuf_adj(mp: *mut os_mbuf, req_len: cty::c_int);
}
extern "C" {
#[doc = " Performs a memory compare of the specified region of an mbuf chain against a"]
#[doc = " flat buffer."]
#[doc = ""]
#[doc = " @param om The start of the mbuf chain to compare."]
#[doc = " @param off The offset within the mbuf chain to start the"]
#[doc = " comparison."]
#[doc = " @param data The flat buffer to compare."]
#[doc = " @param len The length of the flat buffer."]
#[doc = ""]
#[doc = " @return 0 if both memory regions are identical;"]
#[doc = " A memcmp return code if there is a mismatch;"]
#[doc = " INT_MAX if the mbuf is too short."]
pub fn os_mbuf_cmpf(
om: *const os_mbuf,
off: cty::c_int,
data: *const cty::c_void,
len: cty::c_int,
) -> cty::c_int;
}
extern "C" {
#[doc = " Compares the contents of two mbuf chains. The ranges of the two chains to"]
#[doc = " be compared are specified via the two offset parameters and the len"]
#[doc = " parameter. Neither mbuf chain is required to contain a packet header."]
#[doc = ""]
#[doc = " @param om1 The first mbuf chain to compare."]
#[doc = " @param offset1 The absolute offset within om1 at which to"]
#[doc = " start the comparison."]
#[doc = " @param om2 The second mbuf chain to compare."]
#[doc = " @param offset2 The absolute offset within om2 at which to"]
#[doc = " start the comparison."]
#[doc = " @param len The number of bytes to compare."]
#[doc = ""]
#[doc = " @return 0 if both mbuf segments are identical;"]
#[doc = " A memcmp() return code if the segment contents"]
#[doc = " differ;"]
#[doc = " INT_MAX if a specified range extends beyond the"]
#[doc = " end of its corresponding mbuf chain."]
pub fn os_mbuf_cmpm(
om1: *const os_mbuf,
offset1: u16,
om2: *const os_mbuf,
offset2: u16,
len: u16,
) -> cty::c_int;
}
extern "C" {
#[doc = " Increases the length of an mbuf chain by adding data to the front. If there"]
#[doc = " is insufficient room in the leading mbuf, additional mbufs are allocated and"]
#[doc = " prepended as necessary. If this function fails to allocate an mbuf, the"]
#[doc = " entire chain is freed."]
#[doc = ""]
#[doc = " The specified mbuf chain does not need to contain a packet header."]
#[doc = ""]
#[doc = " @param omp The mbuf pool to allocate from."]
#[doc = " @param om The head of the mbuf chain."]
#[doc = " @param len The number of bytes to prepend."]
#[doc = ""]
#[doc = " @return The new head of the chain on success;"]
#[doc = " NULL on failure."]
pub fn os_mbuf_prepend(om: *mut os_mbuf, len: cty::c_int) -> *mut os_mbuf;
}
extern "C" {
#[doc = " Prepends a chunk of empty data to the specified mbuf chain and ensures the"]
#[doc = " chunk is contiguous. If either operation fails, the specified mbuf chain is"]
#[doc = " freed and NULL is returned."]
#[doc = ""]
#[doc = " @param om The mbuf chain to prepend to."]
#[doc = " @param len The number of bytes to prepend and pullup."]
#[doc = ""]
#[doc = " @return The modified mbuf on success;"]
#[doc = " NULL on failure (and the mbuf chain is freed)."]
pub fn os_mbuf_prepend_pullup(om: *mut os_mbuf, len: u16) -> *mut os_mbuf;
}
extern "C" {
#[doc = " Copies the contents of a flat buffer into an mbuf chain, starting at the"]
#[doc = " specified destination offset. If the mbuf is too small for the source data,"]
#[doc = " it is extended as necessary. If the destination mbuf contains a packet"]
#[doc = " header, the header length is updated."]
#[doc = ""]
#[doc = " @param omp The mbuf pool to allocate from."]
#[doc = " @param om The mbuf chain to copy into."]
#[doc = " @param off The offset within the chain to copy to."]
#[doc = " @param src The source buffer to copy from."]
#[doc = " @param len The number of bytes to copy."]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on failure."]
pub fn os_mbuf_copyinto(
om: *mut os_mbuf,
off: cty::c_int,
src: *const cty::c_void,
len: cty::c_int,
) -> cty::c_int;
}
extern "C" {
#[doc = " Attaches a second mbuf chain onto the end of the first. If the first chain"]
#[doc = " contains a packet header, the header's length is updated. If the second"]
#[doc = " chain has a packet header, its header is cleared."]
#[doc = ""]
#[doc = " @param first The mbuf chain being attached to."]
#[doc = " @param second The mbuf chain that gets attached."]
pub fn os_mbuf_concat(first: *mut os_mbuf, second: *mut os_mbuf);
}
extern "C" {
#[doc = " Increases the length of an mbuf chain by the specified amount. If there is"]
#[doc = " not sufficient room in the last buffer, a new buffer is allocated and"]
#[doc = " appended to the chain. It is an error to request more data than can fit in"]
#[doc = " a single buffer."]
#[doc = ""]
#[doc = " @param omp"]
#[doc = " @param om The head of the chain to extend."]
#[doc = " @param len The number of bytes to extend by."]
#[doc = ""]
#[doc = " @return A pointer to the new data on success;"]
#[doc = " NULL on failure."]
pub fn os_mbuf_extend(om: *mut os_mbuf, len: u16) -> *mut cty::c_void;
}
extern "C" {
#[doc = " Rearrange a mbuf chain so that len bytes are contiguous,"]
#[doc = " and in the data area of an mbuf (so that OS_MBUF_DATA() will"]
#[doc = " work on a structure of size len.) Returns the resulting"]
#[doc = " mbuf chain on success, free's it and returns NULL on failure."]
#[doc = ""]
#[doc = " If there is room, it will add up to \"max_protohdr - len\""]
#[doc = " extra bytes to the contiguous region, in an attempt to avoid being"]
#[doc = " called next time."]
#[doc = ""]
#[doc = " @param omp The mbuf pool to take the mbufs out of"]
#[doc = " @param om The mbuf chain to make contiguous"]
#[doc = " @param len The number of bytes in the chain to make contiguous"]
#[doc = ""]
#[doc = " @return The contiguous mbuf chain on success, NULL on failure."]
pub fn os_mbuf_pullup(om: *mut os_mbuf, len: u16) -> *mut os_mbuf;
}
extern "C" {
#[doc = " Removes and frees empty mbufs from the front of a chain. If the chain"]
#[doc = " contains a packet header, it is preserved."]
#[doc = ""]
#[doc = " @param om The mbuf chain to trim."]
#[doc = ""]
#[doc = " @return The head of the trimmed mbuf chain."]
pub fn os_mbuf_trim_front(om: *mut os_mbuf) -> *mut os_mbuf;
}
extern "C" {
#[doc = " Creates a single chained mbuf from m1 and m2 utilizing all"]
#[doc = " the available buffer space in all mbufs in the resulting"]
#[doc = " chain. In other words, ensures there is no leading space in"]
#[doc = " any mbuf in the resulting chain and trailing space only in"]
#[doc = " the last mbuf in the chain. Mbufs from either chain may be"]
#[doc = " freed if not needed. No mbufs are allocated. Note that mbufs"]
#[doc = " from m2 are added to the end of m1. If m1 has a packet"]
#[doc = " header, it is retained and length updated. If m2 has a packet"]
#[doc = " header it is discarded. If m1 is NULL, NULL is returned and"]
#[doc = " m2 is left untouched."]
#[doc = ""]
#[doc = " @param m1 Pointer to first mbuf chain to pack"]
#[doc = " @param m2 Pointer to second mbuf chain to pack"]
#[doc = ""]
#[doc = " @return struct os_mbuf* Pointer to resulting mbuf chain"]
pub fn os_mbuf_pack_chains(m1: *mut os_mbuf, m2: *mut os_mbuf) -> *mut os_mbuf;
}
#[doc = " A memory block structure. This simply contains a pointer to the free list"]
#[doc = " chain and is only used when the block is on the free list. When the block"]
#[doc = " has been removed from the free list the entire memory block is usable by the"]
#[doc = " caller."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct os_memblock {
pub mb_next: os_memblock__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct os_memblock__bindgen_ty_1 {
pub sle_next: *mut os_memblock,
}
#[test]
fn bindgen_test_layout_os_memblock__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<os_memblock__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(os_memblock__bindgen_ty_1))
);
assert_eq!(
::core::mem::align_of::<os_memblock__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(os_memblock__bindgen_ty_1))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<os_memblock__bindgen_ty_1>())).sle_next as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(os_memblock__bindgen_ty_1),
"::",
stringify!(sle_next)
)
);
}
#[test]
fn bindgen_test_layout_os_memblock() {
assert_eq!(
::core::mem::size_of::<os_memblock>(),
8usize,
concat!("Size of: ", stringify!(os_memblock))
);
assert_eq!(
::core::mem::align_of::<os_memblock>(),
8usize,
concat!("Alignment of ", stringify!(os_memblock))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_memblock>())).mb_next as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(os_memblock),
"::",
stringify!(mb_next)
)
);
}
#[doc = " Memory pool"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct os_mempool {
#[doc = " Size of the memory blocks, in bytes."]
pub mp_block_size: u32,
#[doc = " The number of memory blocks."]
pub mp_num_blocks: u16,
#[doc = " The number of free blocks left"]
pub mp_num_free: u16,
#[doc = " The lowest number of free blocks seen"]
pub mp_min_free: u16,
#[doc = " Bitmap of OS_MEMPOOL_F_[...] values."]
pub mp_flags: u8,
#[doc = " Address of memory buffer used by pool"]
pub mp_membuf_addr: usize,
pub mp_list: os_mempool__bindgen_ty_1,
pub __bindgen_anon_1: os_mempool__bindgen_ty_2,
#[doc = " Name for memory block"]
pub name: *mut cty::c_char,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct os_mempool__bindgen_ty_1 {
pub stqe_next: *mut os_mempool,
}
#[test]
fn bindgen_test_layout_os_mempool__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<os_mempool__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(os_mempool__bindgen_ty_1))
);
assert_eq!(
::core::mem::align_of::<os_mempool__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(os_mempool__bindgen_ty_1))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<os_mempool__bindgen_ty_1>())).stqe_next as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(os_mempool__bindgen_ty_1),
"::",
stringify!(stqe_next)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct os_mempool__bindgen_ty_2 {
pub slh_first: *mut os_memblock,
}
#[test]
fn bindgen_test_layout_os_mempool__bindgen_ty_2() {
assert_eq!(
::core::mem::size_of::<os_mempool__bindgen_ty_2>(),
8usize,
concat!("Size of: ", stringify!(os_mempool__bindgen_ty_2))
);
assert_eq!(
::core::mem::align_of::<os_mempool__bindgen_ty_2>(),
8usize,
concat!("Alignment of ", stringify!(os_mempool__bindgen_ty_2))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<os_mempool__bindgen_ty_2>())).slh_first as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(os_mempool__bindgen_ty_2),
"::",
stringify!(slh_first)
)
);
}
#[test]
fn bindgen_test_layout_os_mempool() {
assert_eq!(
::core::mem::size_of::<os_mempool>(),
48usize,
concat!("Size of: ", stringify!(os_mempool))
);
assert_eq!(
::core::mem::align_of::<os_mempool>(),
8usize,
concat!("Alignment of ", stringify!(os_mempool))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mempool>())).mp_block_size as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(os_mempool),
"::",
stringify!(mp_block_size)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mempool>())).mp_num_blocks as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(os_mempool),
"::",
stringify!(mp_num_blocks)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mempool>())).mp_num_free as *const _ as usize },
6usize,
concat!(
"Offset of field: ",
stringify!(os_mempool),
"::",
stringify!(mp_num_free)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mempool>())).mp_min_free as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(os_mempool),
"::",
stringify!(mp_min_free)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mempool>())).mp_flags as *const _ as usize },
10usize,
concat!(
"Offset of field: ",
stringify!(os_mempool),
"::",
stringify!(mp_flags)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mempool>())).mp_membuf_addr as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(os_mempool),
"::",
stringify!(mp_membuf_addr)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mempool>())).mp_list as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(os_mempool),
"::",
stringify!(mp_list)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mempool>())).name as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(os_mempool),
"::",
stringify!(name)
)
);
}
#[doc = " Block put callback function. If configured, this callback gets executed"]
#[doc = " whenever a block is freed to the corresponding extended mempool. Note: The"]
#[doc = " os_memblock_put() function calls this callback instead of freeing the block"]
#[doc = " itself. Therefore, it is the callback's responsibility to free the block"]
#[doc = " via a call to os_memblock_put_from_cb()."]
#[doc = ""]
#[doc = " @param ome The extended mempool that a block is being"]
#[doc = " freed back to."]
#[doc = " @param data The block being freed."]
#[doc = " @param arg Optional argument configured along with the"]
#[doc = " callback."]
#[doc = ""]
#[doc = " @return Indicates whether the block was successfully"]
#[doc = " freed. A non-zero value should only be"]
#[doc = " returned if the block was not successfully"]
#[doc = " released back to its pool."]
pub type os_mempool_put_fn = ::core::option::Option<
unsafe extern "C" fn(
ome: *mut os_mempool_ext,
data: *mut cty::c_void,
arg: *mut cty::c_void,
) -> os_error_t,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct os_mempool_ext {
pub mpe_mp: os_mempool,
pub mpe_put_cb: os_mempool_put_fn,
pub mpe_put_arg: *mut cty::c_void,
}
#[test]
fn bindgen_test_layout_os_mempool_ext() {
assert_eq!(
::core::mem::size_of::<os_mempool_ext>(),
64usize,
concat!("Size of: ", stringify!(os_mempool_ext))
);
assert_eq!(
::core::mem::align_of::<os_mempool_ext>(),
8usize,
concat!("Alignment of ", stringify!(os_mempool_ext))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mempool_ext>())).mpe_mp as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(os_mempool_ext),
"::",
stringify!(mpe_mp)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mempool_ext>())).mpe_put_cb as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(os_mempool_ext),
"::",
stringify!(mpe_put_cb)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mempool_ext>())).mpe_put_arg as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(os_mempool_ext),
"::",
stringify!(mpe_put_arg)
)
);
}
#[doc = " Information describing a memory pool, used to return OS information"]
#[doc = " to the management layer."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct os_mempool_info {
#[doc = " Size of the memory blocks in the pool"]
pub omi_block_size: cty::c_int,
#[doc = " Number of memory blocks in the pool"]
pub omi_num_blocks: cty::c_int,
#[doc = " Number of free memory blocks"]
pub omi_num_free: cty::c_int,
#[doc = " Minimum number of free memory blocks ever"]
pub omi_min_free: cty::c_int,
#[doc = " Name of the memory pool"]
pub omi_name: [cty::c_char; 32usize],
}
#[test]
fn bindgen_test_layout_os_mempool_info() {
assert_eq!(
::core::mem::size_of::<os_mempool_info>(),
48usize,
concat!("Size of: ", stringify!(os_mempool_info))
);
assert_eq!(
::core::mem::align_of::<os_mempool_info>(),
4usize,
concat!("Alignment of ", stringify!(os_mempool_info))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mempool_info>())).omi_block_size as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(os_mempool_info),
"::",
stringify!(omi_block_size)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mempool_info>())).omi_num_blocks as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(os_mempool_info),
"::",
stringify!(omi_num_blocks)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mempool_info>())).omi_num_free as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(os_mempool_info),
"::",
stringify!(omi_num_free)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mempool_info>())).omi_min_free as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(os_mempool_info),
"::",
stringify!(omi_min_free)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<os_mempool_info>())).omi_name as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(os_mempool_info),
"::",
stringify!(omi_name)
)
);
}
extern "C" {
#[doc = " Get information about the next system memory pool."]
#[doc = ""]
#[doc = " @param mempool The current memory pool, or NULL if starting iteration."]
#[doc = " @param info A pointer to the structure to return memory pool information"]
#[doc = " into."]
#[doc = ""]
#[doc = " @return The next memory pool in the list to get information about, or NULL"]
#[doc = " when at the last memory pool."]
pub fn os_mempool_info_get_next(
arg1: *mut os_mempool,
arg2: *mut os_mempool_info,
) -> *mut os_mempool;
}
pub type os_membuf_t = u32;
extern "C" {
#[doc = " Initialize a memory pool."]
#[doc = ""]
#[doc = " @param mp Pointer to a pointer to a mempool"]
#[doc = " @param blocks The number of blocks in the pool"]
#[doc = " @param blocks_size The size of the block, in bytes."]
#[doc = " @param membuf Pointer to memory to contain blocks."]
#[doc = " @param name Name of the pool."]
#[doc = ""]
#[doc = " @return os_error_t"]
pub fn os_mempool_init(
mp: *mut os_mempool,
blocks: u16,
block_size: u32,
membuf: *mut cty::c_void,
name: *mut cty::c_char,
) -> os_error_t;
}
extern "C" {
#[doc = " Initializes an extended memory pool. Extended attributes (e.g., callbacks)"]
#[doc = " are not specified when this function is called; they are assigned manually"]
#[doc = " after initialization."]
#[doc = ""]
#[doc = " @param mpe The extended memory pool to initialize."]
#[doc = " @param blocks The number of blocks in the pool."]
#[doc = " @param block_size The size of each block, in bytes."]
#[doc = " @param membuf Pointer to memory to contain blocks."]
#[doc = " @param name Name of the pool."]
#[doc = ""]
#[doc = " @return os_error_t"]
pub fn os_mempool_ext_init(
mpe: *mut os_mempool_ext,
blocks: u16,
block_size: u32,
membuf: *mut cty::c_void,
name: *mut cty::c_char,
) -> os_error_t;
}
extern "C" {
#[doc = " Clears a memory pool."]
#[doc = ""]
#[doc = " @param mp The mempool to clear."]
#[doc = ""]
#[doc = " @return os_error_t"]
pub fn os_mempool_clear(mp: *mut os_mempool) -> os_error_t;
}
extern "C" {
#[doc = " Performs an integrity check of the specified mempool. This function"]
#[doc = " attempts to detect memory corruption in the specified memory pool."]
#[doc = ""]
#[doc = " @param mp The mempool to check."]
#[doc = ""]
#[doc = " @return true if the memory pool passes the integrity"]
#[doc = " check;"]
#[doc = " false if the memory pool is corrupt."]
pub fn os_mempool_is_sane(mp: *const os_mempool) -> bool;
}
extern "C" {
#[doc = " Checks if a memory block was allocated from the specified mempool."]
#[doc = ""]
#[doc = " @param mp The mempool to check as parent."]
#[doc = " @param block_addr The memory block to check as child."]
#[doc = ""]
#[doc = " @return 0 if the block does not belong to the mempool;"]
#[doc = " 1 if the block does belong to the mempool."]
pub fn os_memblock_from(mp: *const os_mempool, block_addr: *const cty::c_void) -> cty::c_int;
}
extern "C" {
#[doc = " Get a memory block from a memory pool"]
#[doc = ""]
#[doc = " @param mp Pointer to the memory pool"]
#[doc = ""]
#[doc = " @return void* Pointer to block if available; NULL otherwise"]
pub fn os_memblock_get(mp: *mut os_mempool) -> *mut cty::c_void;
}
extern "C" {
#[doc = " Puts the memory block back into the pool, ignoring the put callback, if any."]
#[doc = " This function should only be called from a put callback to free a block"]
#[doc = " without causing infinite recursion."]
#[doc = ""]
#[doc = " @param mp Pointer to memory pool"]
#[doc = " @param block_addr Pointer to memory block"]
#[doc = ""]
#[doc = " @return os_error_t"]
pub fn os_memblock_put_from_cb(mp: *mut os_mempool, block_addr: *mut cty::c_void)
-> os_error_t;
}
extern "C" {
#[doc = " Puts the memory block back into the pool"]
#[doc = ""]
#[doc = " @param mp Pointer to memory pool"]
#[doc = " @param block_addr Pointer to memory block"]
#[doc = ""]
#[doc = " @return os_error_t"]
pub fn os_memblock_put(mp: *mut os_mempool, block_addr: *mut cty::c_void) -> os_error_t;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_encryption_block {
pub key: [u8; 16usize],
pub plain_text: [u8; 16usize],
pub cipher_text: [u8; 16usize],
}
#[test]
fn bindgen_test_layout_ble_encryption_block() {
assert_eq!(
::core::mem::size_of::<ble_encryption_block>(),
48usize,
concat!("Size of: ", stringify!(ble_encryption_block))
);
assert_eq!(
::core::mem::align_of::<ble_encryption_block>(),
1usize,
concat!("Alignment of ", stringify!(ble_encryption_block))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_encryption_block>())).key as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_encryption_block),
"::",
stringify!(key)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_encryption_block>())).plain_text as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(ble_encryption_block),
"::",
stringify!(plain_text)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_encryption_block>())).cipher_text as *const _ as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(ble_encryption_block),
"::",
stringify!(cipher_text)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_mbuf_hdr_rxinfo {
pub flags: u16,
pub channel: u8,
pub handle: u8,
pub rssi: i8,
pub phy: i8,
pub phy_mode: u8,
}
#[test]
fn bindgen_test_layout_ble_mbuf_hdr_rxinfo() {
assert_eq!(
::core::mem::size_of::<ble_mbuf_hdr_rxinfo>(),
8usize,
concat!("Size of: ", stringify!(ble_mbuf_hdr_rxinfo))
);
assert_eq!(
::core::mem::align_of::<ble_mbuf_hdr_rxinfo>(),
2usize,
concat!("Alignment of ", stringify!(ble_mbuf_hdr_rxinfo))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_mbuf_hdr_rxinfo>())).flags as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_mbuf_hdr_rxinfo),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_mbuf_hdr_rxinfo>())).channel as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(ble_mbuf_hdr_rxinfo),
"::",
stringify!(channel)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_mbuf_hdr_rxinfo>())).handle as *const _ as usize },
3usize,
concat!(
"Offset of field: ",
stringify!(ble_mbuf_hdr_rxinfo),
"::",
stringify!(handle)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_mbuf_hdr_rxinfo>())).rssi as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ble_mbuf_hdr_rxinfo),
"::",
stringify!(rssi)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_mbuf_hdr_rxinfo>())).phy as *const _ as usize },
5usize,
concat!(
"Offset of field: ",
stringify!(ble_mbuf_hdr_rxinfo),
"::",
stringify!(phy)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_mbuf_hdr_rxinfo>())).phy_mode as *const _ as usize },
6usize,
concat!(
"Offset of field: ",
stringify!(ble_mbuf_hdr_rxinfo),
"::",
stringify!(phy_mode)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_mbuf_hdr_txinfo {
pub flags: u8,
pub offset: u8,
pub pyld_len: u8,
pub hdr_byte: u8,
}
#[test]
fn bindgen_test_layout_ble_mbuf_hdr_txinfo() {
assert_eq!(
::core::mem::size_of::<ble_mbuf_hdr_txinfo>(),
4usize,
concat!("Size of: ", stringify!(ble_mbuf_hdr_txinfo))
);
assert_eq!(
::core::mem::align_of::<ble_mbuf_hdr_txinfo>(),
1usize,
concat!("Alignment of ", stringify!(ble_mbuf_hdr_txinfo))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_mbuf_hdr_txinfo>())).flags as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_mbuf_hdr_txinfo),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_mbuf_hdr_txinfo>())).offset as *const _ as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(ble_mbuf_hdr_txinfo),
"::",
stringify!(offset)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_mbuf_hdr_txinfo>())).pyld_len as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(ble_mbuf_hdr_txinfo),
"::",
stringify!(pyld_len)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_mbuf_hdr_txinfo>())).hdr_byte as *const _ as usize },
3usize,
concat!(
"Offset of field: ",
stringify!(ble_mbuf_hdr_txinfo),
"::",
stringify!(hdr_byte)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ble_mbuf_hdr {
pub __bindgen_anon_1: ble_mbuf_hdr__bindgen_ty_1,
pub beg_cputime: u32,
pub rem_usecs: u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ble_mbuf_hdr__bindgen_ty_1 {
pub rxinfo: ble_mbuf_hdr_rxinfo,
pub txinfo: ble_mbuf_hdr_txinfo,
_bindgen_union_align: [u16; 4usize],
}
#[test]
fn bindgen_test_layout_ble_mbuf_hdr__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<ble_mbuf_hdr__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(ble_mbuf_hdr__bindgen_ty_1))
);
assert_eq!(
::core::mem::align_of::<ble_mbuf_hdr__bindgen_ty_1>(),
2usize,
concat!("Alignment of ", stringify!(ble_mbuf_hdr__bindgen_ty_1))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_mbuf_hdr__bindgen_ty_1>())).rxinfo as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_mbuf_hdr__bindgen_ty_1),
"::",
stringify!(rxinfo)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_mbuf_hdr__bindgen_ty_1>())).txinfo as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_mbuf_hdr__bindgen_ty_1),
"::",
stringify!(txinfo)
)
);
}
#[test]
fn bindgen_test_layout_ble_mbuf_hdr() {
assert_eq!(
::core::mem::size_of::<ble_mbuf_hdr>(),
16usize,
concat!("Size of: ", stringify!(ble_mbuf_hdr))
);
assert_eq!(
::core::mem::align_of::<ble_mbuf_hdr>(),
4usize,
concat!("Alignment of ", stringify!(ble_mbuf_hdr))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_mbuf_hdr>())).beg_cputime as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(ble_mbuf_hdr),
"::",
stringify!(beg_cputime)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_mbuf_hdr>())).rem_usecs as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(ble_mbuf_hdr),
"::",
stringify!(rem_usecs)
)
);
}
extern "C" {
pub static mut g_dev_addr: [u8; 6usize];
}
extern "C" {
pub static mut g_random_addr: [u8; 6usize];
}
pub const ble_error_codes_BLE_ERR_SUCCESS: ble_error_codes = 0;
pub const ble_error_codes_BLE_ERR_UNKNOWN_HCI_CMD: ble_error_codes = 1;
pub const ble_error_codes_BLE_ERR_UNK_CONN_ID: ble_error_codes = 2;
pub const ble_error_codes_BLE_ERR_HW_FAIL: ble_error_codes = 3;
pub const ble_error_codes_BLE_ERR_PAGE_TMO: ble_error_codes = 4;
pub const ble_error_codes_BLE_ERR_AUTH_FAIL: ble_error_codes = 5;
pub const ble_error_codes_BLE_ERR_PINKEY_MISSING: ble_error_codes = 6;
pub const ble_error_codes_BLE_ERR_MEM_CAPACITY: ble_error_codes = 7;
pub const ble_error_codes_BLE_ERR_CONN_SPVN_TMO: ble_error_codes = 8;
pub const ble_error_codes_BLE_ERR_CONN_LIMIT: ble_error_codes = 9;
pub const ble_error_codes_BLE_ERR_SYNCH_CONN_LIMIT: ble_error_codes = 10;
pub const ble_error_codes_BLE_ERR_ACL_CONN_EXISTS: ble_error_codes = 11;
pub const ble_error_codes_BLE_ERR_CMD_DISALLOWED: ble_error_codes = 12;
pub const ble_error_codes_BLE_ERR_CONN_REJ_RESOURCES: ble_error_codes = 13;
pub const ble_error_codes_BLE_ERR_CONN_REJ_SECURITY: ble_error_codes = 14;
pub const ble_error_codes_BLE_ERR_CONN_REJ_BD_ADDR: ble_error_codes = 15;
pub const ble_error_codes_BLE_ERR_CONN_ACCEPT_TMO: ble_error_codes = 16;
pub const ble_error_codes_BLE_ERR_UNSUPPORTED: ble_error_codes = 17;
pub const ble_error_codes_BLE_ERR_INV_HCI_CMD_PARMS: ble_error_codes = 18;
pub const ble_error_codes_BLE_ERR_REM_USER_CONN_TERM: ble_error_codes = 19;
pub const ble_error_codes_BLE_ERR_RD_CONN_TERM_RESRCS: ble_error_codes = 20;
pub const ble_error_codes_BLE_ERR_RD_CONN_TERM_PWROFF: ble_error_codes = 21;
pub const ble_error_codes_BLE_ERR_CONN_TERM_LOCAL: ble_error_codes = 22;
pub const ble_error_codes_BLE_ERR_REPEATED_ATTEMPTS: ble_error_codes = 23;
pub const ble_error_codes_BLE_ERR_NO_PAIRING: ble_error_codes = 24;
pub const ble_error_codes_BLE_ERR_UNK_LMP: ble_error_codes = 25;
pub const ble_error_codes_BLE_ERR_UNSUPP_REM_FEATURE: ble_error_codes = 26;
pub const ble_error_codes_BLE_ERR_SCO_OFFSET: ble_error_codes = 27;
pub const ble_error_codes_BLE_ERR_SCO_ITVL: ble_error_codes = 28;
pub const ble_error_codes_BLE_ERR_SCO_AIR_MODE: ble_error_codes = 29;
pub const ble_error_codes_BLE_ERR_INV_LMP_LL_PARM: ble_error_codes = 30;
pub const ble_error_codes_BLE_ERR_UNSPECIFIED: ble_error_codes = 31;
pub const ble_error_codes_BLE_ERR_UNSUPP_LMP_LL_PARM: ble_error_codes = 32;
pub const ble_error_codes_BLE_ERR_NO_ROLE_CHANGE: ble_error_codes = 33;
pub const ble_error_codes_BLE_ERR_LMP_LL_RSP_TMO: ble_error_codes = 34;
pub const ble_error_codes_BLE_ERR_LMP_COLLISION: ble_error_codes = 35;
pub const ble_error_codes_BLE_ERR_LMP_PDU: ble_error_codes = 36;
pub const ble_error_codes_BLE_ERR_ENCRYPTION_MODE: ble_error_codes = 37;
pub const ble_error_codes_BLE_ERR_LINK_KEY_CHANGE: ble_error_codes = 38;
pub const ble_error_codes_BLE_ERR_UNSUPP_QOS: ble_error_codes = 39;
pub const ble_error_codes_BLE_ERR_INSTANT_PASSED: ble_error_codes = 40;
pub const ble_error_codes_BLE_ERR_UNIT_KEY_PAIRING: ble_error_codes = 41;
pub const ble_error_codes_BLE_ERR_DIFF_TRANS_COLL: ble_error_codes = 42;
pub const ble_error_codes_BLE_ERR_QOS_PARM: ble_error_codes = 44;
pub const ble_error_codes_BLE_ERR_QOS_REJECTED: ble_error_codes = 45;
pub const ble_error_codes_BLE_ERR_CHAN_CLASS: ble_error_codes = 46;
pub const ble_error_codes_BLE_ERR_INSUFFICIENT_SEC: ble_error_codes = 47;
pub const ble_error_codes_BLE_ERR_PARM_OUT_OF_RANGE: ble_error_codes = 48;
pub const ble_error_codes_BLE_ERR_PENDING_ROLE_SW: ble_error_codes = 50;
pub const ble_error_codes_BLE_ERR_RESERVED_SLOT: ble_error_codes = 52;
pub const ble_error_codes_BLE_ERR_ROLE_SW_FAIL: ble_error_codes = 53;
pub const ble_error_codes_BLE_ERR_INQ_RSP_TOO_BIG: ble_error_codes = 54;
pub const ble_error_codes_BLE_ERR_SEC_SIMPLE_PAIR: ble_error_codes = 55;
pub const ble_error_codes_BLE_ERR_HOST_BUSY_PAIR: ble_error_codes = 56;
pub const ble_error_codes_BLE_ERR_CONN_REJ_CHANNEL: ble_error_codes = 57;
pub const ble_error_codes_BLE_ERR_CTLR_BUSY: ble_error_codes = 58;
pub const ble_error_codes_BLE_ERR_CONN_PARMS: ble_error_codes = 59;
pub const ble_error_codes_BLE_ERR_DIR_ADV_TMO: ble_error_codes = 60;
pub const ble_error_codes_BLE_ERR_CONN_TERM_MIC: ble_error_codes = 61;
pub const ble_error_codes_BLE_ERR_CONN_ESTABLISHMENT: ble_error_codes = 62;
pub const ble_error_codes_BLE_ERR_MAC_CONN_FAIL: ble_error_codes = 63;
pub const ble_error_codes_BLE_ERR_COARSE_CLK_ADJ: ble_error_codes = 64;
pub const ble_error_codes_BLE_ERR_TYPE0_SUBMAP_NDEF: ble_error_codes = 65;
pub const ble_error_codes_BLE_ERR_UNK_ADV_INDENT: ble_error_codes = 66;
pub const ble_error_codes_BLE_ERR_LIMIT_REACHED: ble_error_codes = 67;
pub const ble_error_codes_BLE_ERR_OPERATION_CANCELLED: ble_error_codes = 68;
pub const ble_error_codes_BLE_ERR_PACKET_TOO_LONG: ble_error_codes = 69;
pub const ble_error_codes_BLE_ERR_MAX: ble_error_codes = 255;
pub type ble_error_codes = u32;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_addr_t {
pub type_: u8,
pub val: [u8; 6usize],
}
#[test]
fn bindgen_test_layout_ble_addr_t() {
assert_eq!(
::core::mem::size_of::<ble_addr_t>(),
7usize,
concat!("Size of: ", stringify!(ble_addr_t))
);
assert_eq!(
::core::mem::align_of::<ble_addr_t>(),
1usize,
concat!("Alignment of ", stringify!(ble_addr_t))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_addr_t>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_addr_t),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_addr_t>())).val as *const _ as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(ble_addr_t),
"::",
stringify!(val)
)
);
}
#[repr(C, packed)]
#[derive(Debug)]
pub struct ble_hci_cmd {
pub opcode: u16,
pub length: u8,
pub data: __IncompleteArrayField<u8>,
}
#[test]
fn bindgen_test_layout_ble_hci_cmd() {
assert_eq!(
::core::mem::size_of::<ble_hci_cmd>(),
3usize,
concat!("Size of: ", stringify!(ble_hci_cmd))
);
assert_eq!(
::core::mem::align_of::<ble_hci_cmd>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_cmd))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_cmd>())).opcode as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_cmd),
"::",
stringify!(opcode)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_cmd>())).length as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_cmd),
"::",
stringify!(length)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_cmd>())).data as *const _ as usize },
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_cmd),
"::",
stringify!(data)
)
);
}
#[repr(C, packed)]
#[derive(Debug)]
pub struct ble_hci_ev {
pub opcode: u8,
pub length: u8,
pub data: __IncompleteArrayField<u8>,
}
#[test]
fn bindgen_test_layout_ble_hci_ev() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev>(),
2usize,
concat!("Size of: ", stringify!(ble_hci_ev))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_ev))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_ev>())).opcode as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev),
"::",
stringify!(opcode)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_ev>())).length as *const _ as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev),
"::",
stringify!(length)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_ev>())).data as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev),
"::",
stringify!(data)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_lc_disconnect_cp {
pub conn_handle: u16,
pub reason: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_lc_disconnect_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_lc_disconnect_cp>(),
3usize,
concat!("Size of: ", stringify!(ble_hci_lc_disconnect_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_lc_disconnect_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_lc_disconnect_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_lc_disconnect_cp>())).conn_handle as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_lc_disconnect_cp),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_lc_disconnect_cp>())).reason as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_lc_disconnect_cp),
"::",
stringify!(reason)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_rd_rem_ver_info_cp {
pub conn_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_rd_rem_ver_info_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_rd_rem_ver_info_cp>(),
2usize,
concat!("Size of: ", stringify!(ble_hci_rd_rem_ver_info_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_rd_rem_ver_info_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_rd_rem_ver_info_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_rd_rem_ver_info_cp>())).conn_handle as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_rd_rem_ver_info_cp),
"::",
stringify!(conn_handle)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_cb_set_event_mask_cp {
pub event_mask: u64,
}
#[test]
fn bindgen_test_layout_ble_hci_cb_set_event_mask_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_cb_set_event_mask_cp>(),
8usize,
concat!("Size of: ", stringify!(ble_hci_cb_set_event_mask_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_cb_set_event_mask_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_cb_set_event_mask_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_cb_set_event_mask_cp>())).event_mask as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_cb_set_event_mask_cp),
"::",
stringify!(event_mask)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_cb_read_tx_pwr_cp {
pub conn_handle: u16,
pub type_: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_cb_read_tx_pwr_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_cb_read_tx_pwr_cp>(),
3usize,
concat!("Size of: ", stringify!(ble_hci_cb_read_tx_pwr_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_cb_read_tx_pwr_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_cb_read_tx_pwr_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_cb_read_tx_pwr_cp>())).conn_handle as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_cb_read_tx_pwr_cp),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_cb_read_tx_pwr_cp>())).type_ as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_cb_read_tx_pwr_cp),
"::",
stringify!(type_)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_cb_read_tx_pwr_rp {
pub conn_handle: u16,
pub tx_level: i8,
}
#[test]
fn bindgen_test_layout_ble_hci_cb_read_tx_pwr_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_cb_read_tx_pwr_rp>(),
3usize,
concat!("Size of: ", stringify!(ble_hci_cb_read_tx_pwr_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_cb_read_tx_pwr_rp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_cb_read_tx_pwr_rp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_cb_read_tx_pwr_rp>())).conn_handle as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_cb_read_tx_pwr_rp),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_cb_read_tx_pwr_rp>())).tx_level as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_cb_read_tx_pwr_rp),
"::",
stringify!(tx_level)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_cb_ctlr_to_host_fc_cp {
pub enable: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_cb_ctlr_to_host_fc_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_cb_ctlr_to_host_fc_cp>(),
1usize,
concat!("Size of: ", stringify!(ble_hci_cb_ctlr_to_host_fc_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_cb_ctlr_to_host_fc_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_cb_ctlr_to_host_fc_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_cb_ctlr_to_host_fc_cp>())).enable as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_cb_ctlr_to_host_fc_cp),
"::",
stringify!(enable)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_cb_host_buf_size_cp {
pub acl_data_len: u16,
pub sco_data_len: u8,
pub acl_num: u16,
pub sco_num: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_cb_host_buf_size_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_cb_host_buf_size_cp>(),
7usize,
concat!("Size of: ", stringify!(ble_hci_cb_host_buf_size_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_cb_host_buf_size_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_cb_host_buf_size_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_cb_host_buf_size_cp>())).acl_data_len as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_cb_host_buf_size_cp),
"::",
stringify!(acl_data_len)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_cb_host_buf_size_cp>())).sco_data_len as *const _
as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_cb_host_buf_size_cp),
"::",
stringify!(sco_data_len)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_cb_host_buf_size_cp>())).acl_num as *const _ as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_cb_host_buf_size_cp),
"::",
stringify!(acl_num)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_cb_host_buf_size_cp>())).sco_num as *const _ as usize
},
5usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_cb_host_buf_size_cp),
"::",
stringify!(sco_num)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_cb_host_num_comp_pkts_entry {
pub handle: u16,
pub count: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_cb_host_num_comp_pkts_entry() {
assert_eq!(
::core::mem::size_of::<ble_hci_cb_host_num_comp_pkts_entry>(),
4usize,
concat!("Size of: ", stringify!(ble_hci_cb_host_num_comp_pkts_entry))
);
assert_eq!(
::core::mem::align_of::<ble_hci_cb_host_num_comp_pkts_entry>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_cb_host_num_comp_pkts_entry)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_cb_host_num_comp_pkts_entry>())).handle as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_cb_host_num_comp_pkts_entry),
"::",
stringify!(handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_cb_host_num_comp_pkts_entry>())).count as *const _
as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_cb_host_num_comp_pkts_entry),
"::",
stringify!(count)
)
);
}
#[repr(C, packed)]
#[derive(Debug)]
pub struct ble_hci_cb_host_num_comp_pkts_cp {
pub handles: u8,
pub h: __IncompleteArrayField<ble_hci_cb_host_num_comp_pkts_entry>,
}
#[test]
fn bindgen_test_layout_ble_hci_cb_host_num_comp_pkts_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_cb_host_num_comp_pkts_cp>(),
1usize,
concat!("Size of: ", stringify!(ble_hci_cb_host_num_comp_pkts_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_cb_host_num_comp_pkts_cp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_cb_host_num_comp_pkts_cp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_cb_host_num_comp_pkts_cp>())).handles as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_cb_host_num_comp_pkts_cp),
"::",
stringify!(handles)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_cb_host_num_comp_pkts_cp>())).h as *const _ as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_cb_host_num_comp_pkts_cp),
"::",
stringify!(h)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_cb_set_event_mask2_cp {
pub event_mask2: u64,
}
#[test]
fn bindgen_test_layout_ble_hci_cb_set_event_mask2_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_cb_set_event_mask2_cp>(),
8usize,
concat!("Size of: ", stringify!(ble_hci_cb_set_event_mask2_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_cb_set_event_mask2_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_cb_set_event_mask2_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_cb_set_event_mask2_cp>())).event_mask2 as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_cb_set_event_mask2_cp),
"::",
stringify!(event_mask2)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_cb_rd_auth_pyld_tmo_cp {
pub conn_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_cb_rd_auth_pyld_tmo_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_cb_rd_auth_pyld_tmo_cp>(),
2usize,
concat!("Size of: ", stringify!(ble_hci_cb_rd_auth_pyld_tmo_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_cb_rd_auth_pyld_tmo_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_cb_rd_auth_pyld_tmo_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_cb_rd_auth_pyld_tmo_cp>())).conn_handle as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_cb_rd_auth_pyld_tmo_cp),
"::",
stringify!(conn_handle)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_cb_rd_auth_pyld_tmo_rp {
pub conn_handle: u16,
pub tmo: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_cb_rd_auth_pyld_tmo_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_cb_rd_auth_pyld_tmo_rp>(),
4usize,
concat!("Size of: ", stringify!(ble_hci_cb_rd_auth_pyld_tmo_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_cb_rd_auth_pyld_tmo_rp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_cb_rd_auth_pyld_tmo_rp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_cb_rd_auth_pyld_tmo_rp>())).conn_handle as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_cb_rd_auth_pyld_tmo_rp),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_cb_rd_auth_pyld_tmo_rp>())).tmo as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_cb_rd_auth_pyld_tmo_rp),
"::",
stringify!(tmo)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_cb_wr_auth_pyld_tmo_cp {
pub conn_handle: u16,
pub tmo: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_cb_wr_auth_pyld_tmo_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_cb_wr_auth_pyld_tmo_cp>(),
4usize,
concat!("Size of: ", stringify!(ble_hci_cb_wr_auth_pyld_tmo_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_cb_wr_auth_pyld_tmo_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_cb_wr_auth_pyld_tmo_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_cb_wr_auth_pyld_tmo_cp>())).conn_handle as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_cb_wr_auth_pyld_tmo_cp),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_cb_wr_auth_pyld_tmo_cp>())).tmo as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_cb_wr_auth_pyld_tmo_cp),
"::",
stringify!(tmo)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_cb_wr_auth_pyld_tmo_rp {
pub conn_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_cb_wr_auth_pyld_tmo_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_cb_wr_auth_pyld_tmo_rp>(),
2usize,
concat!("Size of: ", stringify!(ble_hci_cb_wr_auth_pyld_tmo_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_cb_wr_auth_pyld_tmo_rp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_cb_wr_auth_pyld_tmo_rp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_cb_wr_auth_pyld_tmo_rp>())).conn_handle as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_cb_wr_auth_pyld_tmo_rp),
"::",
stringify!(conn_handle)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ip_rd_local_ver_rp {
pub hci_ver: u8,
pub hci_rev: u16,
pub lmp_ver: u8,
pub manufacturer: u16,
pub lmp_subver: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_ip_rd_local_ver_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_ip_rd_local_ver_rp>(),
8usize,
concat!("Size of: ", stringify!(ble_hci_ip_rd_local_ver_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ip_rd_local_ver_rp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_ip_rd_local_ver_rp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ip_rd_local_ver_rp>())).hci_ver as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ip_rd_local_ver_rp),
"::",
stringify!(hci_ver)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ip_rd_local_ver_rp>())).hci_rev as *const _ as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ip_rd_local_ver_rp),
"::",
stringify!(hci_rev)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ip_rd_local_ver_rp>())).lmp_ver as *const _ as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ip_rd_local_ver_rp),
"::",
stringify!(lmp_ver)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ip_rd_local_ver_rp>())).manufacturer as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ip_rd_local_ver_rp),
"::",
stringify!(manufacturer)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ip_rd_local_ver_rp>())).lmp_subver as *const _ as usize
},
6usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ip_rd_local_ver_rp),
"::",
stringify!(lmp_subver)
)
);
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct ble_hci_ip_rd_loc_supp_cmd_rp {
pub commands: [u8; 64usize],
}
#[test]
fn bindgen_test_layout_ble_hci_ip_rd_loc_supp_cmd_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_ip_rd_loc_supp_cmd_rp>(),
64usize,
concat!("Size of: ", stringify!(ble_hci_ip_rd_loc_supp_cmd_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ip_rd_loc_supp_cmd_rp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_ip_rd_loc_supp_cmd_rp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ip_rd_loc_supp_cmd_rp>())).commands as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ip_rd_loc_supp_cmd_rp),
"::",
stringify!(commands)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ip_rd_loc_supp_feat_rp {
pub features: u64,
}
#[test]
fn bindgen_test_layout_ble_hci_ip_rd_loc_supp_feat_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_ip_rd_loc_supp_feat_rp>(),
8usize,
concat!("Size of: ", stringify!(ble_hci_ip_rd_loc_supp_feat_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ip_rd_loc_supp_feat_rp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_ip_rd_loc_supp_feat_rp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ip_rd_loc_supp_feat_rp>())).features as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ip_rd_loc_supp_feat_rp),
"::",
stringify!(features)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ip_rd_buf_size_rp {
pub acl_data_len: u16,
pub sco_data_len: u8,
pub acl_num: u16,
pub sco_num: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_ip_rd_buf_size_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_ip_rd_buf_size_rp>(),
7usize,
concat!("Size of: ", stringify!(ble_hci_ip_rd_buf_size_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ip_rd_buf_size_rp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_ip_rd_buf_size_rp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ip_rd_buf_size_rp>())).acl_data_len as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ip_rd_buf_size_rp),
"::",
stringify!(acl_data_len)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ip_rd_buf_size_rp>())).sco_data_len as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ip_rd_buf_size_rp),
"::",
stringify!(sco_data_len)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ip_rd_buf_size_rp>())).acl_num as *const _ as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ip_rd_buf_size_rp),
"::",
stringify!(acl_num)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ip_rd_buf_size_rp>())).sco_num as *const _ as usize
},
5usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ip_rd_buf_size_rp),
"::",
stringify!(sco_num)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ip_rd_bd_addr_rp {
pub addr: [u8; 6usize],
}
#[test]
fn bindgen_test_layout_ble_hci_ip_rd_bd_addr_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_ip_rd_bd_addr_rp>(),
6usize,
concat!("Size of: ", stringify!(ble_hci_ip_rd_bd_addr_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ip_rd_bd_addr_rp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_ip_rd_bd_addr_rp))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_ip_rd_bd_addr_rp>())).addr as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ip_rd_bd_addr_rp),
"::",
stringify!(addr)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_rd_rssi_cp {
pub handle: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_rd_rssi_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_rd_rssi_cp>(),
2usize,
concat!("Size of: ", stringify!(ble_hci_rd_rssi_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_rd_rssi_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_rd_rssi_cp))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_rd_rssi_cp>())).handle as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_rd_rssi_cp),
"::",
stringify!(handle)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_rd_rssi_rp {
pub handle: u16,
pub rssi: i8,
}
#[test]
fn bindgen_test_layout_ble_hci_rd_rssi_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_rd_rssi_rp>(),
3usize,
concat!("Size of: ", stringify!(ble_hci_rd_rssi_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_rd_rssi_rp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_rd_rssi_rp))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_rd_rssi_rp>())).handle as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_rd_rssi_rp),
"::",
stringify!(handle)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_rd_rssi_rp>())).rssi as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_rd_rssi_rp),
"::",
stringify!(rssi)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_set_event_mask_cp {
pub event_mask: u64,
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_event_mask_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_event_mask_cp>(),
8usize,
concat!("Size of: ", stringify!(ble_hci_le_set_event_mask_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_event_mask_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_set_event_mask_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_event_mask_cp>())).event_mask as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_event_mask_cp),
"::",
stringify!(event_mask)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rd_buf_size_rp {
pub data_len: u16,
pub data_packets: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_rd_buf_size_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rd_buf_size_rp>(),
3usize,
concat!("Size of: ", stringify!(ble_hci_le_rd_buf_size_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rd_buf_size_rp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_rd_buf_size_rp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_buf_size_rp>())).data_len as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_buf_size_rp),
"::",
stringify!(data_len)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_buf_size_rp>())).data_packets as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_buf_size_rp),
"::",
stringify!(data_packets)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rd_buf_size_v2_rp {
pub data_len: u16,
pub data_packets: u8,
pub iso_data_len: u16,
pub iso_data_packets: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_rd_buf_size_v2_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rd_buf_size_v2_rp>(),
6usize,
concat!("Size of: ", stringify!(ble_hci_le_rd_buf_size_v2_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rd_buf_size_v2_rp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_rd_buf_size_v2_rp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_buf_size_v2_rp>())).data_len as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_buf_size_v2_rp),
"::",
stringify!(data_len)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_buf_size_v2_rp>())).data_packets as *const _
as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_buf_size_v2_rp),
"::",
stringify!(data_packets)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_buf_size_v2_rp>())).iso_data_len as *const _
as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_buf_size_v2_rp),
"::",
stringify!(iso_data_len)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_buf_size_v2_rp>())).iso_data_packets as *const _
as usize
},
5usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_buf_size_v2_rp),
"::",
stringify!(iso_data_packets)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rd_loc_supp_feat_rp {
pub features: u64,
}
#[test]
fn bindgen_test_layout_ble_hci_le_rd_loc_supp_feat_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rd_loc_supp_feat_rp>(),
8usize,
concat!("Size of: ", stringify!(ble_hci_le_rd_loc_supp_feat_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rd_loc_supp_feat_rp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_rd_loc_supp_feat_rp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_loc_supp_feat_rp>())).features as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_loc_supp_feat_rp),
"::",
stringify!(features)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_set_rand_addr_cp {
pub addr: [u8; 6usize],
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_rand_addr_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_rand_addr_cp>(),
6usize,
concat!("Size of: ", stringify!(ble_hci_le_set_rand_addr_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_rand_addr_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_set_rand_addr_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_rand_addr_cp>())).addr as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_rand_addr_cp),
"::",
stringify!(addr)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_set_adv_params_cp {
pub min_interval: u16,
pub max_interval: u16,
pub type_: u8,
pub own_addr_type: u8,
pub peer_addr_type: u8,
pub peer_addr: [u8; 6usize],
pub chan_map: u8,
pub filter_policy: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_adv_params_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_adv_params_cp>(),
15usize,
concat!("Size of: ", stringify!(ble_hci_le_set_adv_params_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_adv_params_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_set_adv_params_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_adv_params_cp>())).min_interval as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_adv_params_cp),
"::",
stringify!(min_interval)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_adv_params_cp>())).max_interval as *const _
as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_adv_params_cp),
"::",
stringify!(max_interval)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_adv_params_cp>())).type_ as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_adv_params_cp),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_adv_params_cp>())).own_addr_type as *const _
as usize
},
5usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_adv_params_cp),
"::",
stringify!(own_addr_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_adv_params_cp>())).peer_addr_type as *const _
as usize
},
6usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_adv_params_cp),
"::",
stringify!(peer_addr_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_adv_params_cp>())).peer_addr as *const _ as usize
},
7usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_adv_params_cp),
"::",
stringify!(peer_addr)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_adv_params_cp>())).chan_map as *const _ as usize
},
13usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_adv_params_cp),
"::",
stringify!(chan_map)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_adv_params_cp>())).filter_policy as *const _
as usize
},
14usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_adv_params_cp),
"::",
stringify!(filter_policy)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rd_adv_chan_txpwr_rp {
pub power_level: i8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_rd_adv_chan_txpwr_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rd_adv_chan_txpwr_rp>(),
1usize,
concat!("Size of: ", stringify!(ble_hci_le_rd_adv_chan_txpwr_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rd_adv_chan_txpwr_rp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_rd_adv_chan_txpwr_rp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_adv_chan_txpwr_rp>())).power_level as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_adv_chan_txpwr_rp),
"::",
stringify!(power_level)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_set_adv_data_cp {
pub adv_data_len: u8,
pub adv_data: [u8; 31usize],
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_adv_data_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_adv_data_cp>(),
32usize,
concat!("Size of: ", stringify!(ble_hci_le_set_adv_data_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_adv_data_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_set_adv_data_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_adv_data_cp>())).adv_data_len as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_adv_data_cp),
"::",
stringify!(adv_data_len)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_adv_data_cp>())).adv_data as *const _ as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_adv_data_cp),
"::",
stringify!(adv_data)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_set_scan_rsp_data_cp {
pub scan_rsp_len: u8,
pub scan_rsp: [u8; 31usize],
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_scan_rsp_data_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_scan_rsp_data_cp>(),
32usize,
concat!("Size of: ", stringify!(ble_hci_le_set_scan_rsp_data_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_scan_rsp_data_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_set_scan_rsp_data_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_scan_rsp_data_cp>())).scan_rsp_len as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_scan_rsp_data_cp),
"::",
stringify!(scan_rsp_len)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_scan_rsp_data_cp>())).scan_rsp as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_scan_rsp_data_cp),
"::",
stringify!(scan_rsp)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_set_adv_enable_cp {
pub enable: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_adv_enable_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_adv_enable_cp>(),
1usize,
concat!("Size of: ", stringify!(ble_hci_le_set_adv_enable_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_adv_enable_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_set_adv_enable_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_adv_enable_cp>())).enable as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_adv_enable_cp),
"::",
stringify!(enable)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_set_scan_params_cp {
pub scan_type: u8,
pub scan_itvl: u16,
pub scan_window: u16,
pub own_addr_type: u8,
pub filter_policy: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_scan_params_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_scan_params_cp>(),
7usize,
concat!("Size of: ", stringify!(ble_hci_le_set_scan_params_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_scan_params_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_set_scan_params_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_scan_params_cp>())).scan_type as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_scan_params_cp),
"::",
stringify!(scan_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_scan_params_cp>())).scan_itvl as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_scan_params_cp),
"::",
stringify!(scan_itvl)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_scan_params_cp>())).scan_window as *const _
as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_scan_params_cp),
"::",
stringify!(scan_window)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_scan_params_cp>())).own_addr_type as *const _
as usize
},
5usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_scan_params_cp),
"::",
stringify!(own_addr_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_scan_params_cp>())).filter_policy as *const _
as usize
},
6usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_scan_params_cp),
"::",
stringify!(filter_policy)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_set_scan_enable_cp {
pub enable: u8,
pub filter_duplicates: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_scan_enable_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_scan_enable_cp>(),
2usize,
concat!("Size of: ", stringify!(ble_hci_le_set_scan_enable_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_scan_enable_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_set_scan_enable_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_scan_enable_cp>())).enable as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_scan_enable_cp),
"::",
stringify!(enable)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_scan_enable_cp>())).filter_duplicates as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_scan_enable_cp),
"::",
stringify!(filter_duplicates)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_create_conn_cp {
pub scan_itvl: u16,
pub scan_window: u16,
pub filter_policy: u8,
pub peer_addr_type: u8,
pub peer_addr: [u8; 6usize],
pub own_addr_type: u8,
pub min_conn_itvl: u16,
pub max_conn_itvl: u16,
pub conn_latency: u16,
pub tmo: u16,
pub min_ce: u16,
pub max_ce: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_create_conn_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_create_conn_cp>(),
25usize,
concat!("Size of: ", stringify!(ble_hci_le_create_conn_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_create_conn_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_create_conn_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_create_conn_cp>())).scan_itvl as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_create_conn_cp),
"::",
stringify!(scan_itvl)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_create_conn_cp>())).scan_window as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_create_conn_cp),
"::",
stringify!(scan_window)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_create_conn_cp>())).filter_policy as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_create_conn_cp),
"::",
stringify!(filter_policy)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_create_conn_cp>())).peer_addr_type as *const _
as usize
},
5usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_create_conn_cp),
"::",
stringify!(peer_addr_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_create_conn_cp>())).peer_addr as *const _ as usize
},
6usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_create_conn_cp),
"::",
stringify!(peer_addr)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_create_conn_cp>())).own_addr_type as *const _
as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_create_conn_cp),
"::",
stringify!(own_addr_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_create_conn_cp>())).min_conn_itvl as *const _
as usize
},
13usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_create_conn_cp),
"::",
stringify!(min_conn_itvl)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_create_conn_cp>())).max_conn_itvl as *const _
as usize
},
15usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_create_conn_cp),
"::",
stringify!(max_conn_itvl)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_create_conn_cp>())).conn_latency as *const _ as usize
},
17usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_create_conn_cp),
"::",
stringify!(conn_latency)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_le_create_conn_cp>())).tmo as *const _ as usize },
19usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_create_conn_cp),
"::",
stringify!(tmo)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_create_conn_cp>())).min_ce as *const _ as usize
},
21usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_create_conn_cp),
"::",
stringify!(min_ce)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_create_conn_cp>())).max_ce as *const _ as usize
},
23usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_create_conn_cp),
"::",
stringify!(max_ce)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rd_white_list_rp {
pub size: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_rd_white_list_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rd_white_list_rp>(),
1usize,
concat!("Size of: ", stringify!(ble_hci_le_rd_white_list_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rd_white_list_rp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_rd_white_list_rp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_white_list_rp>())).size as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_white_list_rp),
"::",
stringify!(size)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_add_whte_list_cp {
pub addr_type: u8,
pub addr: [u8; 6usize],
}
#[test]
fn bindgen_test_layout_ble_hci_le_add_whte_list_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_add_whte_list_cp>(),
7usize,
concat!("Size of: ", stringify!(ble_hci_le_add_whte_list_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_add_whte_list_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_add_whte_list_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_add_whte_list_cp>())).addr_type as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_add_whte_list_cp),
"::",
stringify!(addr_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_add_whte_list_cp>())).addr as *const _ as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_add_whte_list_cp),
"::",
stringify!(addr)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rmv_white_list_cp {
pub addr_type: u8,
pub addr: [u8; 6usize],
}
#[test]
fn bindgen_test_layout_ble_hci_le_rmv_white_list_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rmv_white_list_cp>(),
7usize,
concat!("Size of: ", stringify!(ble_hci_le_rmv_white_list_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rmv_white_list_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_rmv_white_list_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rmv_white_list_cp>())).addr_type as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rmv_white_list_cp),
"::",
stringify!(addr_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rmv_white_list_cp>())).addr as *const _ as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rmv_white_list_cp),
"::",
stringify!(addr)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_conn_update_cp {
pub conn_handle: u16,
pub conn_itvl_min: u16,
pub conn_itvl_max: u16,
pub conn_latency: u16,
pub supervision_timeout: u16,
pub min_ce_len: u16,
pub max_ce_len: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_conn_update_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_conn_update_cp>(),
14usize,
concat!("Size of: ", stringify!(ble_hci_le_conn_update_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_conn_update_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_conn_update_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_conn_update_cp>())).conn_handle as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_conn_update_cp),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_conn_update_cp>())).conn_itvl_min as *const _
as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_conn_update_cp),
"::",
stringify!(conn_itvl_min)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_conn_update_cp>())).conn_itvl_max as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_conn_update_cp),
"::",
stringify!(conn_itvl_max)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_conn_update_cp>())).conn_latency as *const _ as usize
},
6usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_conn_update_cp),
"::",
stringify!(conn_latency)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_conn_update_cp>())).supervision_timeout as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_conn_update_cp),
"::",
stringify!(supervision_timeout)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_conn_update_cp>())).min_ce_len as *const _ as usize
},
10usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_conn_update_cp),
"::",
stringify!(min_ce_len)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_conn_update_cp>())).max_ce_len as *const _ as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_conn_update_cp),
"::",
stringify!(max_ce_len)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_set_host_chan_class_cp {
pub chan_map: [u8; 5usize],
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_host_chan_class_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_host_chan_class_cp>(),
5usize,
concat!("Size of: ", stringify!(ble_hci_le_set_host_chan_class_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_host_chan_class_cp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_set_host_chan_class_cp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_host_chan_class_cp>())).chan_map as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_host_chan_class_cp),
"::",
stringify!(chan_map)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rd_chan_map_cp {
pub conn_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_rd_chan_map_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rd_chan_map_cp>(),
2usize,
concat!("Size of: ", stringify!(ble_hci_le_rd_chan_map_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rd_chan_map_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_rd_chan_map_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_chan_map_cp>())).conn_handle as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_chan_map_cp),
"::",
stringify!(conn_handle)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rd_chan_map_rp {
pub conn_handle: u16,
pub chan_map: [u8; 5usize],
}
#[test]
fn bindgen_test_layout_ble_hci_le_rd_chan_map_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rd_chan_map_rp>(),
7usize,
concat!("Size of: ", stringify!(ble_hci_le_rd_chan_map_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rd_chan_map_rp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_rd_chan_map_rp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_chan_map_rp>())).conn_handle as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_chan_map_rp),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_chan_map_rp>())).chan_map as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_chan_map_rp),
"::",
stringify!(chan_map)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rd_rem_feat_cp {
pub conn_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_rd_rem_feat_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rd_rem_feat_cp>(),
2usize,
concat!("Size of: ", stringify!(ble_hci_le_rd_rem_feat_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rd_rem_feat_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_rd_rem_feat_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_rem_feat_cp>())).conn_handle as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_rem_feat_cp),
"::",
stringify!(conn_handle)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_encrypt_cp {
pub key: [u8; 16usize],
pub data: [u8; 16usize],
}
#[test]
fn bindgen_test_layout_ble_hci_le_encrypt_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_encrypt_cp>(),
32usize,
concat!("Size of: ", stringify!(ble_hci_le_encrypt_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_encrypt_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_encrypt_cp))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_le_encrypt_cp>())).key as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_encrypt_cp),
"::",
stringify!(key)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_le_encrypt_cp>())).data as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_encrypt_cp),
"::",
stringify!(data)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_encrypt_rp {
pub data: [u8; 16usize],
}
#[test]
fn bindgen_test_layout_ble_hci_le_encrypt_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_encrypt_rp>(),
16usize,
concat!("Size of: ", stringify!(ble_hci_le_encrypt_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_encrypt_rp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_encrypt_rp))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_le_encrypt_rp>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_encrypt_rp),
"::",
stringify!(data)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rand_rp {
pub random_number: u64,
}
#[test]
fn bindgen_test_layout_ble_hci_le_rand_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rand_rp>(),
8usize,
concat!("Size of: ", stringify!(ble_hci_le_rand_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rand_rp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_rand_rp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rand_rp>())).random_number as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rand_rp),
"::",
stringify!(random_number)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_start_encrypt_cp {
pub conn_handle: u16,
pub rand: u64,
pub div: u16,
pub ltk: [u8; 16usize],
}
#[test]
fn bindgen_test_layout_ble_hci_le_start_encrypt_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_start_encrypt_cp>(),
28usize,
concat!("Size of: ", stringify!(ble_hci_le_start_encrypt_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_start_encrypt_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_start_encrypt_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_start_encrypt_cp>())).conn_handle as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_start_encrypt_cp),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_start_encrypt_cp>())).rand as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_start_encrypt_cp),
"::",
stringify!(rand)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_start_encrypt_cp>())).div as *const _ as usize
},
10usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_start_encrypt_cp),
"::",
stringify!(div)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_start_encrypt_cp>())).ltk as *const _ as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_start_encrypt_cp),
"::",
stringify!(ltk)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_lt_key_req_reply_cp {
pub conn_handle: u16,
pub ltk: [u8; 16usize],
}
#[test]
fn bindgen_test_layout_ble_hci_le_lt_key_req_reply_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_lt_key_req_reply_cp>(),
18usize,
concat!("Size of: ", stringify!(ble_hci_le_lt_key_req_reply_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_lt_key_req_reply_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_lt_key_req_reply_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_lt_key_req_reply_cp>())).conn_handle as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_lt_key_req_reply_cp),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_lt_key_req_reply_cp>())).ltk as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_lt_key_req_reply_cp),
"::",
stringify!(ltk)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_lt_key_req_reply_rp {
pub conn_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_lt_key_req_reply_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_lt_key_req_reply_rp>(),
2usize,
concat!("Size of: ", stringify!(ble_hci_le_lt_key_req_reply_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_lt_key_req_reply_rp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_lt_key_req_reply_rp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_lt_key_req_reply_rp>())).conn_handle as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_lt_key_req_reply_rp),
"::",
stringify!(conn_handle)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_lt_key_req_neg_reply_cp {
pub conn_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_lt_key_req_neg_reply_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_lt_key_req_neg_reply_cp>(),
2usize,
concat!("Size of: ", stringify!(ble_hci_le_lt_key_req_neg_reply_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_lt_key_req_neg_reply_cp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_lt_key_req_neg_reply_cp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_lt_key_req_neg_reply_cp>())).conn_handle as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_lt_key_req_neg_reply_cp),
"::",
stringify!(conn_handle)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_lt_key_req_neg_reply_rp {
pub conn_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_lt_key_req_neg_reply_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_lt_key_req_neg_reply_rp>(),
2usize,
concat!("Size of: ", stringify!(ble_hci_le_lt_key_req_neg_reply_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_lt_key_req_neg_reply_rp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_lt_key_req_neg_reply_rp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_lt_key_req_neg_reply_rp>())).conn_handle as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_lt_key_req_neg_reply_rp),
"::",
stringify!(conn_handle)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rd_supp_states_rp {
pub states: u64,
}
#[test]
fn bindgen_test_layout_ble_hci_le_rd_supp_states_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rd_supp_states_rp>(),
8usize,
concat!("Size of: ", stringify!(ble_hci_le_rd_supp_states_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rd_supp_states_rp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_rd_supp_states_rp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_supp_states_rp>())).states as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_supp_states_rp),
"::",
stringify!(states)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rx_test_cp {
pub rx_chan: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_rx_test_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rx_test_cp>(),
1usize,
concat!("Size of: ", stringify!(ble_hci_le_rx_test_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rx_test_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_rx_test_cp))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_le_rx_test_cp>())).rx_chan as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rx_test_cp),
"::",
stringify!(rx_chan)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_tx_test_cp {
pub tx_chan: u8,
pub test_data_len: u8,
pub payload: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_tx_test_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_tx_test_cp>(),
3usize,
concat!("Size of: ", stringify!(ble_hci_le_tx_test_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_tx_test_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_tx_test_cp))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_le_tx_test_cp>())).tx_chan as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_tx_test_cp),
"::",
stringify!(tx_chan)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_tx_test_cp>())).test_data_len as *const _ as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_tx_test_cp),
"::",
stringify!(test_data_len)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_le_tx_test_cp>())).payload as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_tx_test_cp),
"::",
stringify!(payload)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_test_end_rp {
pub num_packets: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_test_end_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_test_end_rp>(),
2usize,
concat!("Size of: ", stringify!(ble_hci_le_test_end_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_test_end_rp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_test_end_rp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_test_end_rp>())).num_packets as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_test_end_rp),
"::",
stringify!(num_packets)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rem_conn_param_rr_cp {
pub conn_handle: u16,
pub conn_itvl_min: u16,
pub conn_itvl_max: u16,
pub conn_latency: u16,
pub supervision_timeout: u16,
pub min_ce: u16,
pub max_ce: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_rem_conn_param_rr_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rem_conn_param_rr_cp>(),
14usize,
concat!("Size of: ", stringify!(ble_hci_le_rem_conn_param_rr_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rem_conn_param_rr_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_rem_conn_param_rr_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rem_conn_param_rr_cp>())).conn_handle as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rem_conn_param_rr_cp),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rem_conn_param_rr_cp>())).conn_itvl_min as *const _
as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rem_conn_param_rr_cp),
"::",
stringify!(conn_itvl_min)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rem_conn_param_rr_cp>())).conn_itvl_max as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rem_conn_param_rr_cp),
"::",
stringify!(conn_itvl_max)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rem_conn_param_rr_cp>())).conn_latency as *const _
as usize
},
6usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rem_conn_param_rr_cp),
"::",
stringify!(conn_latency)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rem_conn_param_rr_cp>())).supervision_timeout
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rem_conn_param_rr_cp),
"::",
stringify!(supervision_timeout)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rem_conn_param_rr_cp>())).min_ce as *const _ as usize
},
10usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rem_conn_param_rr_cp),
"::",
stringify!(min_ce)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rem_conn_param_rr_cp>())).max_ce as *const _ as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rem_conn_param_rr_cp),
"::",
stringify!(max_ce)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rem_conn_param_rr_rp {
pub conn_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_rem_conn_param_rr_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rem_conn_param_rr_rp>(),
2usize,
concat!("Size of: ", stringify!(ble_hci_le_rem_conn_param_rr_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rem_conn_param_rr_rp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_rem_conn_param_rr_rp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rem_conn_param_rr_rp>())).conn_handle as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rem_conn_param_rr_rp),
"::",
stringify!(conn_handle)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rem_conn_params_nrr_cp {
pub conn_handle: u16,
pub reason: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_rem_conn_params_nrr_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rem_conn_params_nrr_cp>(),
3usize,
concat!("Size of: ", stringify!(ble_hci_le_rem_conn_params_nrr_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rem_conn_params_nrr_cp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_rem_conn_params_nrr_cp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rem_conn_params_nrr_cp>())).conn_handle as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rem_conn_params_nrr_cp),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rem_conn_params_nrr_cp>())).reason as *const _
as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rem_conn_params_nrr_cp),
"::",
stringify!(reason)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rem_conn_params_nrr_rp {
pub conn_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_rem_conn_params_nrr_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rem_conn_params_nrr_rp>(),
2usize,
concat!("Size of: ", stringify!(ble_hci_le_rem_conn_params_nrr_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rem_conn_params_nrr_rp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_rem_conn_params_nrr_rp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rem_conn_params_nrr_rp>())).conn_handle as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rem_conn_params_nrr_rp),
"::",
stringify!(conn_handle)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_set_data_len_cp {
pub conn_handle: u16,
pub tx_octets: u16,
pub tx_time: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_data_len_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_data_len_cp>(),
6usize,
concat!("Size of: ", stringify!(ble_hci_le_set_data_len_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_data_len_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_set_data_len_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_data_len_cp>())).conn_handle as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_data_len_cp),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_data_len_cp>())).tx_octets as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_data_len_cp),
"::",
stringify!(tx_octets)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_data_len_cp>())).tx_time as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_data_len_cp),
"::",
stringify!(tx_time)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_set_data_len_rp {
pub conn_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_data_len_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_data_len_rp>(),
2usize,
concat!("Size of: ", stringify!(ble_hci_le_set_data_len_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_data_len_rp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_set_data_len_rp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_data_len_rp>())).conn_handle as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_data_len_rp),
"::",
stringify!(conn_handle)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rd_sugg_def_data_len_rp {
pub max_tx_octets: u16,
pub max_tx_time: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_rd_sugg_def_data_len_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rd_sugg_def_data_len_rp>(),
4usize,
concat!("Size of: ", stringify!(ble_hci_le_rd_sugg_def_data_len_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rd_sugg_def_data_len_rp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_rd_sugg_def_data_len_rp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_sugg_def_data_len_rp>())).max_tx_octets
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_sugg_def_data_len_rp),
"::",
stringify!(max_tx_octets)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_sugg_def_data_len_rp>())).max_tx_time as *const _
as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_sugg_def_data_len_rp),
"::",
stringify!(max_tx_time)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_wr_sugg_def_data_len_cp {
pub max_tx_octets: u16,
pub max_tx_time: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_wr_sugg_def_data_len_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_wr_sugg_def_data_len_cp>(),
4usize,
concat!("Size of: ", stringify!(ble_hci_le_wr_sugg_def_data_len_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_wr_sugg_def_data_len_cp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_wr_sugg_def_data_len_cp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_wr_sugg_def_data_len_cp>())).max_tx_octets
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_wr_sugg_def_data_len_cp),
"::",
stringify!(max_tx_octets)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_wr_sugg_def_data_len_cp>())).max_tx_time as *const _
as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_wr_sugg_def_data_len_cp),
"::",
stringify!(max_tx_time)
)
);
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct ble_hci_le_gen_dhkey_cp {
pub pkey: [u8; 64usize],
}
#[test]
fn bindgen_test_layout_ble_hci_le_gen_dhkey_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_gen_dhkey_cp>(),
64usize,
concat!("Size of: ", stringify!(ble_hci_le_gen_dhkey_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_gen_dhkey_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_gen_dhkey_cp))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_le_gen_dhkey_cp>())).pkey as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_gen_dhkey_cp),
"::",
stringify!(pkey)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_add_resolv_list_cp {
pub peer_addr_type: u8,
pub peer_id_addr: [u8; 6usize],
pub peer_irk: [u8; 16usize],
pub local_irk: [u8; 16usize],
}
#[test]
fn bindgen_test_layout_ble_hci_le_add_resolv_list_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_add_resolv_list_cp>(),
39usize,
concat!("Size of: ", stringify!(ble_hci_le_add_resolv_list_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_add_resolv_list_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_add_resolv_list_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_add_resolv_list_cp>())).peer_addr_type as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_add_resolv_list_cp),
"::",
stringify!(peer_addr_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_add_resolv_list_cp>())).peer_id_addr as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_add_resolv_list_cp),
"::",
stringify!(peer_id_addr)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_add_resolv_list_cp>())).peer_irk as *const _ as usize
},
7usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_add_resolv_list_cp),
"::",
stringify!(peer_irk)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_add_resolv_list_cp>())).local_irk as *const _
as usize
},
23usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_add_resolv_list_cp),
"::",
stringify!(local_irk)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rmv_resolve_list_cp {
pub peer_addr_type: u8,
pub peer_id_addr: [u8; 6usize],
}
#[test]
fn bindgen_test_layout_ble_hci_le_rmv_resolve_list_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rmv_resolve_list_cp>(),
7usize,
concat!("Size of: ", stringify!(ble_hci_le_rmv_resolve_list_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rmv_resolve_list_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_rmv_resolve_list_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rmv_resolve_list_cp>())).peer_addr_type as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rmv_resolve_list_cp),
"::",
stringify!(peer_addr_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rmv_resolve_list_cp>())).peer_id_addr as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rmv_resolve_list_cp),
"::",
stringify!(peer_id_addr)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rd_resolv_list_size_rp {
pub size: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_rd_resolv_list_size_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rd_resolv_list_size_rp>(),
1usize,
concat!("Size of: ", stringify!(ble_hci_le_rd_resolv_list_size_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rd_resolv_list_size_rp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_rd_resolv_list_size_rp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_resolv_list_size_rp>())).size as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_resolv_list_size_rp),
"::",
stringify!(size)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rd_peer_recolv_addr_cp {
pub peer_addr_type: u8,
pub peer_id_addr: [u8; 6usize],
}
#[test]
fn bindgen_test_layout_ble_hci_le_rd_peer_recolv_addr_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rd_peer_recolv_addr_cp>(),
7usize,
concat!("Size of: ", stringify!(ble_hci_le_rd_peer_recolv_addr_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rd_peer_recolv_addr_cp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_rd_peer_recolv_addr_cp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_peer_recolv_addr_cp>())).peer_addr_type
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_peer_recolv_addr_cp),
"::",
stringify!(peer_addr_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_peer_recolv_addr_cp>())).peer_id_addr as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_peer_recolv_addr_cp),
"::",
stringify!(peer_id_addr)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rd_peer_recolv_addr_rp {
pub rpa: [u8; 6usize],
}
#[test]
fn bindgen_test_layout_ble_hci_le_rd_peer_recolv_addr_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rd_peer_recolv_addr_rp>(),
6usize,
concat!("Size of: ", stringify!(ble_hci_le_rd_peer_recolv_addr_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rd_peer_recolv_addr_rp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_rd_peer_recolv_addr_rp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_peer_recolv_addr_rp>())).rpa as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_peer_recolv_addr_rp),
"::",
stringify!(rpa)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rd_local_recolv_addr_cp {
pub peer_addr_type: u8,
pub peer_id_addr: [u8; 6usize],
}
#[test]
fn bindgen_test_layout_ble_hci_le_rd_local_recolv_addr_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rd_local_recolv_addr_cp>(),
7usize,
concat!("Size of: ", stringify!(ble_hci_le_rd_local_recolv_addr_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rd_local_recolv_addr_cp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_rd_local_recolv_addr_cp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_local_recolv_addr_cp>())).peer_addr_type
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_local_recolv_addr_cp),
"::",
stringify!(peer_addr_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_local_recolv_addr_cp>())).peer_id_addr as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_local_recolv_addr_cp),
"::",
stringify!(peer_id_addr)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rd_local_recolv_addr_rp {
pub rpa: [u8; 6usize],
}
#[test]
fn bindgen_test_layout_ble_hci_le_rd_local_recolv_addr_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rd_local_recolv_addr_rp>(),
6usize,
concat!("Size of: ", stringify!(ble_hci_le_rd_local_recolv_addr_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rd_local_recolv_addr_rp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_rd_local_recolv_addr_rp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_local_recolv_addr_rp>())).rpa as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_local_recolv_addr_rp),
"::",
stringify!(rpa)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_set_addr_res_en_cp {
pub enable: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_addr_res_en_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_addr_res_en_cp>(),
1usize,
concat!("Size of: ", stringify!(ble_hci_le_set_addr_res_en_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_addr_res_en_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_set_addr_res_en_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_addr_res_en_cp>())).enable as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_addr_res_en_cp),
"::",
stringify!(enable)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_set_rpa_tmo_cp {
pub rpa_timeout: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_rpa_tmo_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_rpa_tmo_cp>(),
2usize,
concat!("Size of: ", stringify!(ble_hci_le_set_rpa_tmo_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_rpa_tmo_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_set_rpa_tmo_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_rpa_tmo_cp>())).rpa_timeout as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_rpa_tmo_cp),
"::",
stringify!(rpa_timeout)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rd_max_data_len_rp {
pub max_tx_octests: u16,
pub max_tx_time: u16,
pub max_rx_octests: u16,
pub max_rx_time: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_rd_max_data_len_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rd_max_data_len_rp>(),
8usize,
concat!("Size of: ", stringify!(ble_hci_le_rd_max_data_len_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rd_max_data_len_rp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_rd_max_data_len_rp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_max_data_len_rp>())).max_tx_octests as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_max_data_len_rp),
"::",
stringify!(max_tx_octests)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_max_data_len_rp>())).max_tx_time as *const _
as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_max_data_len_rp),
"::",
stringify!(max_tx_time)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_max_data_len_rp>())).max_rx_octests as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_max_data_len_rp),
"::",
stringify!(max_rx_octests)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_max_data_len_rp>())).max_rx_time as *const _
as usize
},
6usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_max_data_len_rp),
"::",
stringify!(max_rx_time)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rd_phy_cp {
pub conn_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_rd_phy_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rd_phy_cp>(),
2usize,
concat!("Size of: ", stringify!(ble_hci_le_rd_phy_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rd_phy_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_rd_phy_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_phy_cp>())).conn_handle as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_phy_cp),
"::",
stringify!(conn_handle)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rd_phy_rp {
pub conn_handle: u16,
pub tx_phy: u8,
pub rx_phy: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_rd_phy_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rd_phy_rp>(),
4usize,
concat!("Size of: ", stringify!(ble_hci_le_rd_phy_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rd_phy_rp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_rd_phy_rp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_phy_rp>())).conn_handle as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_phy_rp),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_le_rd_phy_rp>())).tx_phy as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_phy_rp),
"::",
stringify!(tx_phy)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_le_rd_phy_rp>())).rx_phy as *const _ as usize },
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_phy_rp),
"::",
stringify!(rx_phy)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_set_default_phy_cp {
pub all_phys: u8,
pub tx_phys: u8,
pub rx_phys: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_default_phy_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_default_phy_cp>(),
3usize,
concat!("Size of: ", stringify!(ble_hci_le_set_default_phy_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_default_phy_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_set_default_phy_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_default_phy_cp>())).all_phys as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_default_phy_cp),
"::",
stringify!(all_phys)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_default_phy_cp>())).tx_phys as *const _ as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_default_phy_cp),
"::",
stringify!(tx_phys)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_default_phy_cp>())).rx_phys as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_default_phy_cp),
"::",
stringify!(rx_phys)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_set_phy_cp {
pub conn_handle: u16,
pub all_phys: u8,
pub tx_phys: u8,
pub rx_phys: u8,
pub phy_options: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_phy_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_phy_cp>(),
7usize,
concat!("Size of: ", stringify!(ble_hci_le_set_phy_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_phy_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_set_phy_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_phy_cp>())).conn_handle as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_phy_cp),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_le_set_phy_cp>())).all_phys as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_phy_cp),
"::",
stringify!(all_phys)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_le_set_phy_cp>())).tx_phys as *const _ as usize },
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_phy_cp),
"::",
stringify!(tx_phys)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_le_set_phy_cp>())).rx_phys as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_phy_cp),
"::",
stringify!(rx_phys)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_phy_cp>())).phy_options as *const _ as usize
},
5usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_phy_cp),
"::",
stringify!(phy_options)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rx_test_v2_cp {
pub rx_chan: u8,
pub phy: u8,
pub index: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_rx_test_v2_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rx_test_v2_cp>(),
3usize,
concat!("Size of: ", stringify!(ble_hci_le_rx_test_v2_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rx_test_v2_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_rx_test_v2_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rx_test_v2_cp>())).rx_chan as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rx_test_v2_cp),
"::",
stringify!(rx_chan)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_le_rx_test_v2_cp>())).phy as *const _ as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rx_test_v2_cp),
"::",
stringify!(phy)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_le_rx_test_v2_cp>())).index as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rx_test_v2_cp),
"::",
stringify!(index)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_tx_test_v2_cp {
pub tx_chan: u8,
pub test_data_len: u8,
pub payload: u8,
pub phy: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_tx_test_v2_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_tx_test_v2_cp>(),
4usize,
concat!("Size of: ", stringify!(ble_hci_le_tx_test_v2_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_tx_test_v2_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_tx_test_v2_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_tx_test_v2_cp>())).tx_chan as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_tx_test_v2_cp),
"::",
stringify!(tx_chan)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_tx_test_v2_cp>())).test_data_len as *const _ as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_tx_test_v2_cp),
"::",
stringify!(test_data_len)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_tx_test_v2_cp>())).payload as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_tx_test_v2_cp),
"::",
stringify!(payload)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_le_tx_test_v2_cp>())).phy as *const _ as usize },
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_tx_test_v2_cp),
"::",
stringify!(phy)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_set_adv_set_rnd_addr_cp {
pub adv_handle: u8,
pub addr: [u8; 6usize],
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_adv_set_rnd_addr_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_adv_set_rnd_addr_cp>(),
7usize,
concat!("Size of: ", stringify!(ble_hci_le_set_adv_set_rnd_addr_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_adv_set_rnd_addr_cp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_set_adv_set_rnd_addr_cp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_adv_set_rnd_addr_cp>())).adv_handle as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_adv_set_rnd_addr_cp),
"::",
stringify!(adv_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_adv_set_rnd_addr_cp>())).addr as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_adv_set_rnd_addr_cp),
"::",
stringify!(addr)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_set_ext_adv_params_cp {
pub adv_handle: u8,
pub props: u16,
pub pri_itvl_min: [u8; 3usize],
pub pri_itvl_max: [u8; 3usize],
pub pri_chan_map: u8,
pub own_addr_type: u8,
pub peer_addr_type: u8,
pub peer_addr: [u8; 6usize],
pub filter_policy: u8,
pub tx_power: i8,
pub pri_phy: u8,
pub sec_max_skip: u8,
pub sec_phy: u8,
pub sid: u8,
pub scan_req_notif: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_ext_adv_params_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_ext_adv_params_cp>(),
25usize,
concat!("Size of: ", stringify!(ble_hci_le_set_ext_adv_params_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_ext_adv_params_cp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_set_ext_adv_params_cp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_adv_params_cp>())).adv_handle as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_adv_params_cp),
"::",
stringify!(adv_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_adv_params_cp>())).props as *const _ as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_adv_params_cp),
"::",
stringify!(props)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_adv_params_cp>())).pri_itvl_min as *const _
as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_adv_params_cp),
"::",
stringify!(pri_itvl_min)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_adv_params_cp>())).pri_itvl_max as *const _
as usize
},
6usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_adv_params_cp),
"::",
stringify!(pri_itvl_max)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_adv_params_cp>())).pri_chan_map as *const _
as usize
},
9usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_adv_params_cp),
"::",
stringify!(pri_chan_map)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_adv_params_cp>())).own_addr_type as *const _
as usize
},
10usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_adv_params_cp),
"::",
stringify!(own_addr_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_adv_params_cp>())).peer_addr_type as *const _
as usize
},
11usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_adv_params_cp),
"::",
stringify!(peer_addr_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_adv_params_cp>())).peer_addr as *const _
as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_adv_params_cp),
"::",
stringify!(peer_addr)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_adv_params_cp>())).filter_policy as *const _
as usize
},
18usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_adv_params_cp),
"::",
stringify!(filter_policy)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_adv_params_cp>())).tx_power as *const _
as usize
},
19usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_adv_params_cp),
"::",
stringify!(tx_power)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_adv_params_cp>())).pri_phy as *const _
as usize
},
20usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_adv_params_cp),
"::",
stringify!(pri_phy)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_adv_params_cp>())).sec_max_skip as *const _
as usize
},
21usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_adv_params_cp),
"::",
stringify!(sec_max_skip)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_adv_params_cp>())).sec_phy as *const _
as usize
},
22usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_adv_params_cp),
"::",
stringify!(sec_phy)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_adv_params_cp>())).sid as *const _ as usize
},
23usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_adv_params_cp),
"::",
stringify!(sid)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_adv_params_cp>())).scan_req_notif as *const _
as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_adv_params_cp),
"::",
stringify!(scan_req_notif)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_set_ext_adv_params_rp {
pub tx_power: i8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_ext_adv_params_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_ext_adv_params_rp>(),
1usize,
concat!("Size of: ", stringify!(ble_hci_le_set_ext_adv_params_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_ext_adv_params_rp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_set_ext_adv_params_rp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_adv_params_rp>())).tx_power as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_adv_params_rp),
"::",
stringify!(tx_power)
)
);
}
#[repr(C, packed)]
#[derive(Debug)]
pub struct ble_hci_le_set_ext_adv_data_cp {
pub adv_handle: u8,
pub operation: u8,
pub fragment_pref: u8,
pub adv_data_len: u8,
pub adv_data: __IncompleteArrayField<u8>,
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_ext_adv_data_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_ext_adv_data_cp>(),
4usize,
concat!("Size of: ", stringify!(ble_hci_le_set_ext_adv_data_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_ext_adv_data_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_set_ext_adv_data_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_adv_data_cp>())).adv_handle as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_adv_data_cp),
"::",
stringify!(adv_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_adv_data_cp>())).operation as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_adv_data_cp),
"::",
stringify!(operation)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_adv_data_cp>())).fragment_pref as *const _
as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_adv_data_cp),
"::",
stringify!(fragment_pref)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_adv_data_cp>())).adv_data_len as *const _
as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_adv_data_cp),
"::",
stringify!(adv_data_len)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_adv_data_cp>())).adv_data as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_adv_data_cp),
"::",
stringify!(adv_data)
)
);
}
#[repr(C, packed)]
#[derive(Debug)]
pub struct ble_hci_le_set_ext_scan_rsp_data_cp {
pub adv_handle: u8,
pub operation: u8,
pub fragment_pref: u8,
pub scan_rsp_len: u8,
pub scan_rsp: __IncompleteArrayField<u8>,
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_ext_scan_rsp_data_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_ext_scan_rsp_data_cp>(),
4usize,
concat!("Size of: ", stringify!(ble_hci_le_set_ext_scan_rsp_data_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_ext_scan_rsp_data_cp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_set_ext_scan_rsp_data_cp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_scan_rsp_data_cp>())).adv_handle as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_scan_rsp_data_cp),
"::",
stringify!(adv_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_scan_rsp_data_cp>())).operation as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_scan_rsp_data_cp),
"::",
stringify!(operation)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_scan_rsp_data_cp>())).fragment_pref
as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_scan_rsp_data_cp),
"::",
stringify!(fragment_pref)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_scan_rsp_data_cp>())).scan_rsp_len
as *const _ as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_scan_rsp_data_cp),
"::",
stringify!(scan_rsp_len)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_scan_rsp_data_cp>())).scan_rsp as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_scan_rsp_data_cp),
"::",
stringify!(scan_rsp)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct adv_set {
pub adv_handle: u8,
pub duration: u16,
pub max_events: u8,
}
#[test]
fn bindgen_test_layout_adv_set() {
assert_eq!(
::core::mem::size_of::<adv_set>(),
4usize,
concat!("Size of: ", stringify!(adv_set))
);
assert_eq!(
::core::mem::align_of::<adv_set>(),
1usize,
concat!("Alignment of ", stringify!(adv_set))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<adv_set>())).adv_handle as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(adv_set),
"::",
stringify!(adv_handle)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<adv_set>())).duration as *const _ as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(adv_set),
"::",
stringify!(duration)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<adv_set>())).max_events as *const _ as usize },
3usize,
concat!(
"Offset of field: ",
stringify!(adv_set),
"::",
stringify!(max_events)
)
);
}
#[repr(C, packed)]
#[derive(Debug)]
pub struct ble_hci_le_set_ext_adv_enable_cp {
pub enable: u8,
pub num_sets: u8,
pub sets: __IncompleteArrayField<adv_set>,
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_ext_adv_enable_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_ext_adv_enable_cp>(),
2usize,
concat!("Size of: ", stringify!(ble_hci_le_set_ext_adv_enable_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_ext_adv_enable_cp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_set_ext_adv_enable_cp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_adv_enable_cp>())).enable as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_adv_enable_cp),
"::",
stringify!(enable)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_adv_enable_cp>())).num_sets as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_adv_enable_cp),
"::",
stringify!(num_sets)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_adv_enable_cp>())).sets as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_adv_enable_cp),
"::",
stringify!(sets)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rd_max_adv_data_len_rp {
pub max_adv_data_len: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_rd_max_adv_data_len_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rd_max_adv_data_len_rp>(),
2usize,
concat!("Size of: ", stringify!(ble_hci_le_rd_max_adv_data_len_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rd_max_adv_data_len_rp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_rd_max_adv_data_len_rp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_max_adv_data_len_rp>())).max_adv_data_len
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_max_adv_data_len_rp),
"::",
stringify!(max_adv_data_len)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rd_num_of_adv_sets_rp {
pub num_sets: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_rd_num_of_adv_sets_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rd_num_of_adv_sets_rp>(),
1usize,
concat!("Size of: ", stringify!(ble_hci_le_rd_num_of_adv_sets_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rd_num_of_adv_sets_rp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_rd_num_of_adv_sets_rp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_num_of_adv_sets_rp>())).num_sets as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_num_of_adv_sets_rp),
"::",
stringify!(num_sets)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_remove_adv_set_cp {
pub adv_handle: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_remove_adv_set_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_remove_adv_set_cp>(),
1usize,
concat!("Size of: ", stringify!(ble_hci_le_remove_adv_set_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_remove_adv_set_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_remove_adv_set_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_remove_adv_set_cp>())).adv_handle as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_remove_adv_set_cp),
"::",
stringify!(adv_handle)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_set_periodic_adv_params_cp {
pub adv_handle: u8,
pub min_itvl: u16,
pub max_itvl: u16,
pub props: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_periodic_adv_params_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_periodic_adv_params_cp>(),
7usize,
concat!(
"Size of: ",
stringify!(ble_hci_le_set_periodic_adv_params_cp)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_periodic_adv_params_cp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_set_periodic_adv_params_cp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_periodic_adv_params_cp>())).adv_handle
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_periodic_adv_params_cp),
"::",
stringify!(adv_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_periodic_adv_params_cp>())).min_itvl as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_periodic_adv_params_cp),
"::",
stringify!(min_itvl)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_periodic_adv_params_cp>())).max_itvl as *const _
as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_periodic_adv_params_cp),
"::",
stringify!(max_itvl)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_periodic_adv_params_cp>())).props as *const _
as usize
},
5usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_periodic_adv_params_cp),
"::",
stringify!(props)
)
);
}
#[repr(C, packed)]
#[derive(Debug)]
pub struct ble_hci_le_set_periodic_adv_data_cp {
pub adv_handle: u8,
pub operation: u8,
pub adv_data_len: u8,
pub adv_data: __IncompleteArrayField<u8>,
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_periodic_adv_data_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_periodic_adv_data_cp>(),
3usize,
concat!("Size of: ", stringify!(ble_hci_le_set_periodic_adv_data_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_periodic_adv_data_cp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_set_periodic_adv_data_cp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_periodic_adv_data_cp>())).adv_handle as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_periodic_adv_data_cp),
"::",
stringify!(adv_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_periodic_adv_data_cp>())).operation as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_periodic_adv_data_cp),
"::",
stringify!(operation)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_periodic_adv_data_cp>())).adv_data_len
as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_periodic_adv_data_cp),
"::",
stringify!(adv_data_len)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_periodic_adv_data_cp>())).adv_data as *const _
as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_periodic_adv_data_cp),
"::",
stringify!(adv_data)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_set_periodic_adv_enable_cp {
pub enable: u8,
pub adv_handle: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_periodic_adv_enable_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_periodic_adv_enable_cp>(),
2usize,
concat!(
"Size of: ",
stringify!(ble_hci_le_set_periodic_adv_enable_cp)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_periodic_adv_enable_cp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_set_periodic_adv_enable_cp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_periodic_adv_enable_cp>())).enable as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_periodic_adv_enable_cp),
"::",
stringify!(enable)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_periodic_adv_enable_cp>())).adv_handle
as *const _ as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_periodic_adv_enable_cp),
"::",
stringify!(adv_handle)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct scan_params {
pub type_: u8,
pub itvl: u16,
pub window: u16,
}
#[test]
fn bindgen_test_layout_scan_params() {
assert_eq!(
::core::mem::size_of::<scan_params>(),
5usize,
concat!("Size of: ", stringify!(scan_params))
);
assert_eq!(
::core::mem::align_of::<scan_params>(),
1usize,
concat!("Alignment of ", stringify!(scan_params))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<scan_params>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(scan_params),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<scan_params>())).itvl as *const _ as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(scan_params),
"::",
stringify!(itvl)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<scan_params>())).window as *const _ as usize },
3usize,
concat!(
"Offset of field: ",
stringify!(scan_params),
"::",
stringify!(window)
)
);
}
#[repr(C, packed)]
#[derive(Debug)]
pub struct ble_hci_le_set_ext_scan_params_cp {
pub own_addr_type: u8,
pub filter_policy: u8,
pub phys: u8,
pub scans: __IncompleteArrayField<scan_params>,
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_ext_scan_params_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_ext_scan_params_cp>(),
3usize,
concat!("Size of: ", stringify!(ble_hci_le_set_ext_scan_params_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_ext_scan_params_cp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_set_ext_scan_params_cp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_scan_params_cp>())).own_addr_type as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_scan_params_cp),
"::",
stringify!(own_addr_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_scan_params_cp>())).filter_policy as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_scan_params_cp),
"::",
stringify!(filter_policy)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_scan_params_cp>())).phys as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_scan_params_cp),
"::",
stringify!(phys)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_scan_params_cp>())).scans as *const _
as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_scan_params_cp),
"::",
stringify!(scans)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_set_ext_scan_enable_cp {
pub enable: u8,
pub filter_dup: u8,
pub duration: u16,
pub period: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_ext_scan_enable_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_ext_scan_enable_cp>(),
6usize,
concat!("Size of: ", stringify!(ble_hci_le_set_ext_scan_enable_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_ext_scan_enable_cp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_set_ext_scan_enable_cp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_scan_enable_cp>())).enable as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_scan_enable_cp),
"::",
stringify!(enable)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_scan_enable_cp>())).filter_dup as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_scan_enable_cp),
"::",
stringify!(filter_dup)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_scan_enable_cp>())).duration as *const _
as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_scan_enable_cp),
"::",
stringify!(duration)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_ext_scan_enable_cp>())).period as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_ext_scan_enable_cp),
"::",
stringify!(period)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct conn_params {
pub scan_itvl: u16,
pub scan_window: u16,
pub conn_min_itvl: u16,
pub conn_max_itvl: u16,
pub conn_latency: u16,
pub supervision_timeout: u16,
pub min_ce: u16,
pub max_ce: u16,
}
#[test]
fn bindgen_test_layout_conn_params() {
assert_eq!(
::core::mem::size_of::<conn_params>(),
16usize,
concat!("Size of: ", stringify!(conn_params))
);
assert_eq!(
::core::mem::align_of::<conn_params>(),
1usize,
concat!("Alignment of ", stringify!(conn_params))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<conn_params>())).scan_itvl as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(conn_params),
"::",
stringify!(scan_itvl)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<conn_params>())).scan_window as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(conn_params),
"::",
stringify!(scan_window)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<conn_params>())).conn_min_itvl as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(conn_params),
"::",
stringify!(conn_min_itvl)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<conn_params>())).conn_max_itvl as *const _ as usize },
6usize,
concat!(
"Offset of field: ",
stringify!(conn_params),
"::",
stringify!(conn_max_itvl)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<conn_params>())).conn_latency as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(conn_params),
"::",
stringify!(conn_latency)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<conn_params>())).supervision_timeout as *const _ as usize
},
10usize,
concat!(
"Offset of field: ",
stringify!(conn_params),
"::",
stringify!(supervision_timeout)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<conn_params>())).min_ce as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(conn_params),
"::",
stringify!(min_ce)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<conn_params>())).max_ce as *const _ as usize },
14usize,
concat!(
"Offset of field: ",
stringify!(conn_params),
"::",
stringify!(max_ce)
)
);
}
#[repr(C, packed)]
#[derive(Debug)]
pub struct ble_hci_le_ext_create_conn_cp {
pub filter_policy: u8,
pub own_addr_type: u8,
pub peer_addr_type: u8,
pub peer_addr: [u8; 6usize],
pub init_phy_mask: u8,
pub conn_params: __IncompleteArrayField<conn_params>,
}
#[test]
fn bindgen_test_layout_ble_hci_le_ext_create_conn_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_ext_create_conn_cp>(),
10usize,
concat!("Size of: ", stringify!(ble_hci_le_ext_create_conn_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_ext_create_conn_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_ext_create_conn_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_ext_create_conn_cp>())).filter_policy as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_ext_create_conn_cp),
"::",
stringify!(filter_policy)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_ext_create_conn_cp>())).own_addr_type as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_ext_create_conn_cp),
"::",
stringify!(own_addr_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_ext_create_conn_cp>())).peer_addr_type as *const _
as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_ext_create_conn_cp),
"::",
stringify!(peer_addr_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_ext_create_conn_cp>())).peer_addr as *const _
as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_ext_create_conn_cp),
"::",
stringify!(peer_addr)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_ext_create_conn_cp>())).init_phy_mask as *const _
as usize
},
9usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_ext_create_conn_cp),
"::",
stringify!(init_phy_mask)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_ext_create_conn_cp>())).conn_params as *const _
as usize
},
10usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_ext_create_conn_cp),
"::",
stringify!(conn_params)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_periodic_adv_create_sync_cp {
pub options: u8,
pub sid: u8,
pub peer_addr_type: u8,
pub peer_addr: [u8; 6usize],
pub skip: u16,
pub sync_timeout: u16,
pub sync_cte_type: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_periodic_adv_create_sync_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_periodic_adv_create_sync_cp>(),
14usize,
concat!(
"Size of: ",
stringify!(ble_hci_le_periodic_adv_create_sync_cp)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_periodic_adv_create_sync_cp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_periodic_adv_create_sync_cp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_periodic_adv_create_sync_cp>())).options as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_periodic_adv_create_sync_cp),
"::",
stringify!(options)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_periodic_adv_create_sync_cp>())).sid as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_periodic_adv_create_sync_cp),
"::",
stringify!(sid)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_periodic_adv_create_sync_cp>())).peer_addr_type
as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_periodic_adv_create_sync_cp),
"::",
stringify!(peer_addr_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_periodic_adv_create_sync_cp>())).peer_addr
as *const _ as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_periodic_adv_create_sync_cp),
"::",
stringify!(peer_addr)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_periodic_adv_create_sync_cp>())).skip as *const _
as usize
},
9usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_periodic_adv_create_sync_cp),
"::",
stringify!(skip)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_periodic_adv_create_sync_cp>())).sync_timeout
as *const _ as usize
},
11usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_periodic_adv_create_sync_cp),
"::",
stringify!(sync_timeout)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_periodic_adv_create_sync_cp>())).sync_cte_type
as *const _ as usize
},
13usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_periodic_adv_create_sync_cp),
"::",
stringify!(sync_cte_type)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_periodic_adv_term_sync_cp {
pub sync_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_periodic_adv_term_sync_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_periodic_adv_term_sync_cp>(),
2usize,
concat!(
"Size of: ",
stringify!(ble_hci_le_periodic_adv_term_sync_cp)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_periodic_adv_term_sync_cp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_periodic_adv_term_sync_cp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_periodic_adv_term_sync_cp>())).sync_handle
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_periodic_adv_term_sync_cp),
"::",
stringify!(sync_handle)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_add_dev_to_periodic_adv_list_cp {
pub peer_addr_type: u8,
pub peer_addr: [u8; 6usize],
pub sid: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_add_dev_to_periodic_adv_list_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_add_dev_to_periodic_adv_list_cp>(),
8usize,
concat!(
"Size of: ",
stringify!(ble_hci_le_add_dev_to_periodic_adv_list_cp)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_add_dev_to_periodic_adv_list_cp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_add_dev_to_periodic_adv_list_cp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_add_dev_to_periodic_adv_list_cp>())).peer_addr_type
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_add_dev_to_periodic_adv_list_cp),
"::",
stringify!(peer_addr_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_add_dev_to_periodic_adv_list_cp>())).peer_addr
as *const _ as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_add_dev_to_periodic_adv_list_cp),
"::",
stringify!(peer_addr)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_add_dev_to_periodic_adv_list_cp>())).sid as *const _
as usize
},
7usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_add_dev_to_periodic_adv_list_cp),
"::",
stringify!(sid)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rem_dev_from_periodic_adv_list_cp {
pub peer_addr_type: u8,
pub peer_addr: [u8; 6usize],
pub sid: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_rem_dev_from_periodic_adv_list_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rem_dev_from_periodic_adv_list_cp>(),
8usize,
concat!(
"Size of: ",
stringify!(ble_hci_le_rem_dev_from_periodic_adv_list_cp)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rem_dev_from_periodic_adv_list_cp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_rem_dev_from_periodic_adv_list_cp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rem_dev_from_periodic_adv_list_cp>())).peer_addr_type
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rem_dev_from_periodic_adv_list_cp),
"::",
stringify!(peer_addr_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rem_dev_from_periodic_adv_list_cp>())).peer_addr
as *const _ as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rem_dev_from_periodic_adv_list_cp),
"::",
stringify!(peer_addr)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rem_dev_from_periodic_adv_list_cp>())).sid
as *const _ as usize
},
7usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rem_dev_from_periodic_adv_list_cp),
"::",
stringify!(sid)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rd_periodic_adv_list_size_rp {
pub list_size: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_rd_periodic_adv_list_size_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rd_periodic_adv_list_size_rp>(),
1usize,
concat!(
"Size of: ",
stringify!(ble_hci_le_rd_periodic_adv_list_size_rp)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rd_periodic_adv_list_size_rp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_rd_periodic_adv_list_size_rp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_periodic_adv_list_size_rp>())).list_size
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_periodic_adv_list_size_rp),
"::",
stringify!(list_size)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rd_transmit_power_rp {
pub min_tx_power: i8,
pub max_tx_power: i8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_rd_transmit_power_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rd_transmit_power_rp>(),
2usize,
concat!("Size of: ", stringify!(ble_hci_le_rd_transmit_power_rp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rd_transmit_power_rp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_rd_transmit_power_rp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_transmit_power_rp>())).min_tx_power as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_transmit_power_rp),
"::",
stringify!(min_tx_power)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_transmit_power_rp>())).max_tx_power as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_transmit_power_rp),
"::",
stringify!(max_tx_power)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_rd_rf_path_compensation_rp {
pub tx_path_compensation: i16,
pub rx_path_compensation: i16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_rd_rf_path_compensation_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_rd_rf_path_compensation_rp>(),
4usize,
concat!(
"Size of: ",
stringify!(ble_hci_le_rd_rf_path_compensation_rp)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_rd_rf_path_compensation_rp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_rd_rf_path_compensation_rp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_rf_path_compensation_rp>())).tx_path_compensation
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_rf_path_compensation_rp),
"::",
stringify!(tx_path_compensation)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_rd_rf_path_compensation_rp>())).rx_path_compensation
as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_rd_rf_path_compensation_rp),
"::",
stringify!(rx_path_compensation)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_wr_rf_path_compensation_cp {
pub tx_path_compensation: i16,
pub rx_path_compensation: i16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_wr_rf_path_compensation_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_wr_rf_path_compensation_cp>(),
4usize,
concat!(
"Size of: ",
stringify!(ble_hci_le_wr_rf_path_compensation_cp)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_wr_rf_path_compensation_cp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_wr_rf_path_compensation_cp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_wr_rf_path_compensation_cp>())).tx_path_compensation
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_wr_rf_path_compensation_cp),
"::",
stringify!(tx_path_compensation)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_wr_rf_path_compensation_cp>())).rx_path_compensation
as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_wr_rf_path_compensation_cp),
"::",
stringify!(rx_path_compensation)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_set_privacy_mode_cp {
pub peer_id_addr_type: u8,
pub peer_id_addr: [u8; 6usize],
pub mode: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_privacy_mode_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_privacy_mode_cp>(),
8usize,
concat!("Size of: ", stringify!(ble_hci_le_set_privacy_mode_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_privacy_mode_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_set_privacy_mode_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_privacy_mode_cp>())).peer_id_addr_type
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_privacy_mode_cp),
"::",
stringify!(peer_id_addr_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_privacy_mode_cp>())).peer_id_addr as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_privacy_mode_cp),
"::",
stringify!(peer_id_addr)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_privacy_mode_cp>())).mode as *const _ as usize
},
7usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_privacy_mode_cp),
"::",
stringify!(mode)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_periodic_adv_receive_enable_cp {
pub sync_handle: u16,
pub enable: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_periodic_adv_receive_enable_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_periodic_adv_receive_enable_cp>(),
3usize,
concat!(
"Size of: ",
stringify!(ble_hci_le_periodic_adv_receive_enable_cp)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_periodic_adv_receive_enable_cp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_periodic_adv_receive_enable_cp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_periodic_adv_receive_enable_cp>())).sync_handle
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_periodic_adv_receive_enable_cp),
"::",
stringify!(sync_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_periodic_adv_receive_enable_cp>())).enable
as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_periodic_adv_receive_enable_cp),
"::",
stringify!(enable)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_periodic_adv_sync_transfer_cp {
pub conn_handle: u16,
pub service_data: u16,
pub sync_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_periodic_adv_sync_transfer_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_periodic_adv_sync_transfer_cp>(),
6usize,
concat!(
"Size of: ",
stringify!(ble_hci_le_periodic_adv_sync_transfer_cp)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_periodic_adv_sync_transfer_cp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_periodic_adv_sync_transfer_cp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_periodic_adv_sync_transfer_cp>())).conn_handle
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_periodic_adv_sync_transfer_cp),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_periodic_adv_sync_transfer_cp>())).service_data
as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_periodic_adv_sync_transfer_cp),
"::",
stringify!(service_data)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_periodic_adv_sync_transfer_cp>())).sync_handle
as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_periodic_adv_sync_transfer_cp),
"::",
stringify!(sync_handle)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_periodic_adv_sync_transfer_rp {
pub conn_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_periodic_adv_sync_transfer_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_periodic_adv_sync_transfer_rp>(),
2usize,
concat!(
"Size of: ",
stringify!(ble_hci_le_periodic_adv_sync_transfer_rp)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_periodic_adv_sync_transfer_rp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_periodic_adv_sync_transfer_rp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_periodic_adv_sync_transfer_rp>())).conn_handle
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_periodic_adv_sync_transfer_rp),
"::",
stringify!(conn_handle)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_periodic_adv_set_info_transfer_cp {
pub conn_handle: u16,
pub service_data: u16,
pub adv_handle: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_periodic_adv_set_info_transfer_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_periodic_adv_set_info_transfer_cp>(),
5usize,
concat!(
"Size of: ",
stringify!(ble_hci_le_periodic_adv_set_info_transfer_cp)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_periodic_adv_set_info_transfer_cp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_periodic_adv_set_info_transfer_cp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_periodic_adv_set_info_transfer_cp>())).conn_handle
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_periodic_adv_set_info_transfer_cp),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_periodic_adv_set_info_transfer_cp>())).service_data
as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_periodic_adv_set_info_transfer_cp),
"::",
stringify!(service_data)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_periodic_adv_set_info_transfer_cp>())).adv_handle
as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_periodic_adv_set_info_transfer_cp),
"::",
stringify!(adv_handle)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_periodic_adv_set_info_transfer_rp {
pub conn_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_periodic_adv_set_info_transfer_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_periodic_adv_set_info_transfer_rp>(),
2usize,
concat!(
"Size of: ",
stringify!(ble_hci_le_periodic_adv_set_info_transfer_rp)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_periodic_adv_set_info_transfer_rp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_periodic_adv_set_info_transfer_rp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_periodic_adv_set_info_transfer_rp>())).conn_handle
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_periodic_adv_set_info_transfer_rp),
"::",
stringify!(conn_handle)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_periodic_adv_sync_transfer_params_cp {
pub conn_handle: u16,
pub mode: u8,
pub skip: u16,
pub sync_timeout: u16,
pub sync_cte_type: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_periodic_adv_sync_transfer_params_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_periodic_adv_sync_transfer_params_cp>(),
8usize,
concat!(
"Size of: ",
stringify!(ble_hci_le_periodic_adv_sync_transfer_params_cp)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_periodic_adv_sync_transfer_params_cp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_periodic_adv_sync_transfer_params_cp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_periodic_adv_sync_transfer_params_cp>())).conn_handle
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_periodic_adv_sync_transfer_params_cp),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_periodic_adv_sync_transfer_params_cp>())).mode
as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_periodic_adv_sync_transfer_params_cp),
"::",
stringify!(mode)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_periodic_adv_sync_transfer_params_cp>())).skip
as *const _ as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_periodic_adv_sync_transfer_params_cp),
"::",
stringify!(skip)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_periodic_adv_sync_transfer_params_cp>()))
.sync_timeout as *const _ as usize
},
5usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_periodic_adv_sync_transfer_params_cp),
"::",
stringify!(sync_timeout)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_periodic_adv_sync_transfer_params_cp>()))
.sync_cte_type as *const _ as usize
},
7usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_periodic_adv_sync_transfer_params_cp),
"::",
stringify!(sync_cte_type)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_periodic_adv_sync_transfer_params_rp {
pub conn_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_periodic_adv_sync_transfer_params_rp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_periodic_adv_sync_transfer_params_rp>(),
2usize,
concat!(
"Size of: ",
stringify!(ble_hci_le_periodic_adv_sync_transfer_params_rp)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_periodic_adv_sync_transfer_params_rp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_periodic_adv_sync_transfer_params_rp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_periodic_adv_sync_transfer_params_rp>())).conn_handle
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_periodic_adv_sync_transfer_params_rp),
"::",
stringify!(conn_handle)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_set_default_periodic_sync_transfer_params_cp {
pub mode: u8,
pub skip: u16,
pub sync_timeout: u16,
pub sync_cte_type: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_default_periodic_sync_transfer_params_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_default_periodic_sync_transfer_params_cp>(),
6usize,
concat!(
"Size of: ",
stringify!(ble_hci_le_set_default_periodic_sync_transfer_params_cp)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_default_periodic_sync_transfer_params_cp>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_le_set_default_periodic_sync_transfer_params_cp)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_default_periodic_sync_transfer_params_cp>()))
.mode as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_default_periodic_sync_transfer_params_cp),
"::",
stringify!(mode)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_default_periodic_sync_transfer_params_cp>()))
.skip as *const _ as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_default_periodic_sync_transfer_params_cp),
"::",
stringify!(skip)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_default_periodic_sync_transfer_params_cp>()))
.sync_timeout as *const _ as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_default_periodic_sync_transfer_params_cp),
"::",
stringify!(sync_timeout)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_default_periodic_sync_transfer_params_cp>()))
.sync_cte_type as *const _ as usize
},
5usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_default_periodic_sync_transfer_params_cp),
"::",
stringify!(sync_cte_type)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_request_peer_sca_cp {
pub conn_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_le_request_peer_sca_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_request_peer_sca_cp>(),
2usize,
concat!("Size of: ", stringify!(ble_hci_le_request_peer_sca_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_request_peer_sca_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_request_peer_sca_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_request_peer_sca_cp>())).conn_handle as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_request_peer_sca_cp),
"::",
stringify!(conn_handle)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_le_set_host_feat_cp {
pub bit_num: u8,
pub val: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_le_set_host_feat_cp() {
assert_eq!(
::core::mem::size_of::<ble_hci_le_set_host_feat_cp>(),
2usize,
concat!("Size of: ", stringify!(ble_hci_le_set_host_feat_cp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_le_set_host_feat_cp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_le_set_host_feat_cp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_host_feat_cp>())).bit_num as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_host_feat_cp),
"::",
stringify!(bit_num)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_le_set_host_feat_cp>())).val as *const _ as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_le_set_host_feat_cp),
"::",
stringify!(val)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_disconn_cmp {
pub status: u8,
pub conn_handle: u16,
pub reason: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_disconn_cmp() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_disconn_cmp>(),
4usize,
concat!("Size of: ", stringify!(ble_hci_ev_disconn_cmp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_disconn_cmp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_ev_disconn_cmp))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_ev_disconn_cmp>())).status as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_disconn_cmp),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_disconn_cmp>())).conn_handle as *const _ as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_disconn_cmp),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_ev_disconn_cmp>())).reason as *const _ as usize },
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_disconn_cmp),
"::",
stringify!(reason)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_enrypt_chg {
pub status: u8,
pub connection_handle: u16,
pub enabled: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_enrypt_chg() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_enrypt_chg>(),
4usize,
concat!("Size of: ", stringify!(ble_hci_ev_enrypt_chg))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_enrypt_chg>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_ev_enrypt_chg))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_ev_enrypt_chg>())).status as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_enrypt_chg),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_enrypt_chg>())).connection_handle as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_enrypt_chg),
"::",
stringify!(connection_handle)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_ev_enrypt_chg>())).enabled as *const _ as usize },
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_enrypt_chg),
"::",
stringify!(enabled)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_rd_rem_ver_info_cmp {
pub status: u8,
pub conn_handle: u16,
pub version: u8,
pub manufacturer: u16,
pub subversion: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_rd_rem_ver_info_cmp() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_rd_rem_ver_info_cmp>(),
8usize,
concat!("Size of: ", stringify!(ble_hci_ev_rd_rem_ver_info_cmp))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_rd_rem_ver_info_cmp>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_ev_rd_rem_ver_info_cmp))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_rd_rem_ver_info_cmp>())).status as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_rd_rem_ver_info_cmp),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_rd_rem_ver_info_cmp>())).conn_handle as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_rd_rem_ver_info_cmp),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_rd_rem_ver_info_cmp>())).version as *const _ as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_rd_rem_ver_info_cmp),
"::",
stringify!(version)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_rd_rem_ver_info_cmp>())).manufacturer as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_rd_rem_ver_info_cmp),
"::",
stringify!(manufacturer)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_rd_rem_ver_info_cmp>())).subversion as *const _
as usize
},
6usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_rd_rem_ver_info_cmp),
"::",
stringify!(subversion)
)
);
}
#[repr(C, packed)]
#[derive(Debug)]
pub struct ble_hci_ev_command_complete {
pub num_packets: u8,
pub opcode: u16,
pub status: u8,
pub return_params: __IncompleteArrayField<u8>,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_command_complete() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_command_complete>(),
4usize,
concat!("Size of: ", stringify!(ble_hci_ev_command_complete))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_command_complete>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_ev_command_complete))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_command_complete>())).num_packets as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_command_complete),
"::",
stringify!(num_packets)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_command_complete>())).opcode as *const _ as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_command_complete),
"::",
stringify!(opcode)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_command_complete>())).status as *const _ as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_command_complete),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_command_complete>())).return_params as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_command_complete),
"::",
stringify!(return_params)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_command_complete_nop {
pub num_packets: u8,
pub opcode: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_command_complete_nop() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_command_complete_nop>(),
3usize,
concat!("Size of: ", stringify!(ble_hci_ev_command_complete_nop))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_command_complete_nop>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_ev_command_complete_nop))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_command_complete_nop>())).num_packets as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_command_complete_nop),
"::",
stringify!(num_packets)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_command_complete_nop>())).opcode as *const _ as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_command_complete_nop),
"::",
stringify!(opcode)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_command_status {
pub status: u8,
pub num_packets: u8,
pub opcode: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_command_status() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_command_status>(),
4usize,
concat!("Size of: ", stringify!(ble_hci_ev_command_status))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_command_status>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_ev_command_status))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_command_status>())).status as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_command_status),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_command_status>())).num_packets as *const _ as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_command_status),
"::",
stringify!(num_packets)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_command_status>())).opcode as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_command_status),
"::",
stringify!(opcode)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_hw_error {
pub hw_code: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_hw_error() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_hw_error>(),
1usize,
concat!("Size of: ", stringify!(ble_hci_ev_hw_error))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_hw_error>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_ev_hw_error))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_ev_hw_error>())).hw_code as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_hw_error),
"::",
stringify!(hw_code)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct comp_pkt {
pub handle: u16,
pub packets: u16,
}
#[test]
fn bindgen_test_layout_comp_pkt() {
assert_eq!(
::core::mem::size_of::<comp_pkt>(),
4usize,
concat!("Size of: ", stringify!(comp_pkt))
);
assert_eq!(
::core::mem::align_of::<comp_pkt>(),
1usize,
concat!("Alignment of ", stringify!(comp_pkt))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<comp_pkt>())).handle as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(comp_pkt),
"::",
stringify!(handle)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<comp_pkt>())).packets as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(comp_pkt),
"::",
stringify!(packets)
)
);
}
#[repr(C, packed)]
#[derive(Debug)]
pub struct ble_hci_ev_num_comp_pkts {
pub count: u8,
pub completed: __IncompleteArrayField<comp_pkt>,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_num_comp_pkts() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_num_comp_pkts>(),
1usize,
concat!("Size of: ", stringify!(ble_hci_ev_num_comp_pkts))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_num_comp_pkts>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_ev_num_comp_pkts))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_ev_num_comp_pkts>())).count as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_num_comp_pkts),
"::",
stringify!(count)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_num_comp_pkts>())).completed as *const _ as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_num_comp_pkts),
"::",
stringify!(completed)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_data_buf_overflow {
pub link_type: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_data_buf_overflow() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_data_buf_overflow>(),
1usize,
concat!("Size of: ", stringify!(ble_hci_ev_data_buf_overflow))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_data_buf_overflow>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_ev_data_buf_overflow))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_data_buf_overflow>())).link_type as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_data_buf_overflow),
"::",
stringify!(link_type)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_enc_key_refresh {
pub status: u8,
pub conn_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_enc_key_refresh() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_enc_key_refresh>(),
3usize,
concat!("Size of: ", stringify!(ble_hci_ev_enc_key_refresh))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_enc_key_refresh>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_ev_enc_key_refresh))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_enc_key_refresh>())).status as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_enc_key_refresh),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_enc_key_refresh>())).conn_handle as *const _ as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_enc_key_refresh),
"::",
stringify!(conn_handle)
)
);
}
#[repr(C, packed)]
#[derive(Debug)]
pub struct ble_hci_ev_le_meta {
pub subevent: u8,
pub data: __IncompleteArrayField<u8>,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_meta() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_meta>(),
1usize,
concat!("Size of: ", stringify!(ble_hci_ev_le_meta))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_meta>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_ev_le_meta))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_ev_le_meta>())).subevent as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_meta),
"::",
stringify!(subevent)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_ev_le_meta>())).data as *const _ as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_meta),
"::",
stringify!(data)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_auth_pyld_tmo {
pub conn_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_auth_pyld_tmo() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_auth_pyld_tmo>(),
2usize,
concat!("Size of: ", stringify!(ble_hci_ev_auth_pyld_tmo))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_auth_pyld_tmo>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_ev_auth_pyld_tmo))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_auth_pyld_tmo>())).conn_handle as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_auth_pyld_tmo),
"::",
stringify!(conn_handle)
)
);
}
#[repr(C, packed)]
#[derive(Debug)]
pub struct ble_hci_ev_vendor_debug {
pub id: u8,
pub data: __IncompleteArrayField<u8>,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_vendor_debug() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_vendor_debug>(),
1usize,
concat!("Size of: ", stringify!(ble_hci_ev_vendor_debug))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_vendor_debug>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_ev_vendor_debug))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_ev_vendor_debug>())).id as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_vendor_debug),
"::",
stringify!(id)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hci_ev_vendor_debug>())).data as *const _ as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_vendor_debug),
"::",
stringify!(data)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_le_subev_conn_complete {
pub subev_code: u8,
pub status: u8,
pub conn_handle: u16,
pub role: u8,
pub peer_addr_type: u8,
pub peer_addr: [u8; 6usize],
pub conn_itvl: u16,
pub conn_latency: u16,
pub supervision_timeout: u16,
pub mca: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_conn_complete() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_conn_complete>(),
19usize,
concat!("Size of: ", stringify!(ble_hci_ev_le_subev_conn_complete))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_conn_complete>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_ev_le_subev_conn_complete)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_conn_complete>())).subev_code as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_conn_complete),
"::",
stringify!(subev_code)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_conn_complete>())).status as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_conn_complete),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_conn_complete>())).conn_handle as *const _
as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_conn_complete),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_conn_complete>())).role as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_conn_complete),
"::",
stringify!(role)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_conn_complete>())).peer_addr_type
as *const _ as usize
},
5usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_conn_complete),
"::",
stringify!(peer_addr_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_conn_complete>())).peer_addr as *const _
as usize
},
6usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_conn_complete),
"::",
stringify!(peer_addr)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_conn_complete>())).conn_itvl as *const _
as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_conn_complete),
"::",
stringify!(conn_itvl)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_conn_complete>())).conn_latency as *const _
as usize
},
14usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_conn_complete),
"::",
stringify!(conn_latency)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_conn_complete>())).supervision_timeout
as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_conn_complete),
"::",
stringify!(supervision_timeout)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_conn_complete>())).mca as *const _ as usize
},
18usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_conn_complete),
"::",
stringify!(mca)
)
);
}
#[repr(C, packed)]
#[derive(Debug)]
pub struct adv_report {
pub type_: u8,
pub addr_type: u8,
pub addr: [u8; 6usize],
pub data_len: u8,
pub data: __IncompleteArrayField<u8>,
}
#[test]
fn bindgen_test_layout_adv_report() {
assert_eq!(
::core::mem::size_of::<adv_report>(),
9usize,
concat!("Size of: ", stringify!(adv_report))
);
assert_eq!(
::core::mem::align_of::<adv_report>(),
1usize,
concat!("Alignment of ", stringify!(adv_report))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<adv_report>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(adv_report),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<adv_report>())).addr_type as *const _ as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(adv_report),
"::",
stringify!(addr_type)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<adv_report>())).addr as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(adv_report),
"::",
stringify!(addr)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<adv_report>())).data_len as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(adv_report),
"::",
stringify!(data_len)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<adv_report>())).data as *const _ as usize },
9usize,
concat!(
"Offset of field: ",
stringify!(adv_report),
"::",
stringify!(data)
)
);
}
#[repr(C, packed)]
#[derive(Debug)]
pub struct ble_hci_ev_le_subev_adv_rpt {
pub subev_code: u8,
pub num_reports: u8,
pub reports: __IncompleteArrayField<adv_report>,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_adv_rpt() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_adv_rpt>(),
2usize,
concat!("Size of: ", stringify!(ble_hci_ev_le_subev_adv_rpt))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_adv_rpt>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_ev_le_subev_adv_rpt))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_adv_rpt>())).subev_code as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_adv_rpt),
"::",
stringify!(subev_code)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_adv_rpt>())).num_reports as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_adv_rpt),
"::",
stringify!(num_reports)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_adv_rpt>())).reports as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_adv_rpt),
"::",
stringify!(reports)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_le_subev_conn_upd_complete {
pub subev_code: u8,
pub status: u8,
pub conn_handle: u16,
pub conn_itvl: u16,
pub conn_latency: u16,
pub supervision_timeout: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_conn_upd_complete() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_conn_upd_complete>(),
10usize,
concat!(
"Size of: ",
stringify!(ble_hci_ev_le_subev_conn_upd_complete)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_conn_upd_complete>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_ev_le_subev_conn_upd_complete)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_conn_upd_complete>())).subev_code
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_conn_upd_complete),
"::",
stringify!(subev_code)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_conn_upd_complete>())).status as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_conn_upd_complete),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_conn_upd_complete>())).conn_handle
as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_conn_upd_complete),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_conn_upd_complete>())).conn_itvl as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_conn_upd_complete),
"::",
stringify!(conn_itvl)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_conn_upd_complete>())).conn_latency
as *const _ as usize
},
6usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_conn_upd_complete),
"::",
stringify!(conn_latency)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_conn_upd_complete>())).supervision_timeout
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_conn_upd_complete),
"::",
stringify!(supervision_timeout)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_le_subev_rd_rem_used_feat {
pub subev_code: u8,
pub status: u8,
pub conn_handle: u16,
pub features: [u8; 8usize],
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_rd_rem_used_feat() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_rd_rem_used_feat>(),
12usize,
concat!(
"Size of: ",
stringify!(ble_hci_ev_le_subev_rd_rem_used_feat)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_rd_rem_used_feat>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_ev_le_subev_rd_rem_used_feat)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_rd_rem_used_feat>())).subev_code as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_rd_rem_used_feat),
"::",
stringify!(subev_code)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_rd_rem_used_feat>())).status as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_rd_rem_used_feat),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_rd_rem_used_feat>())).conn_handle
as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_rd_rem_used_feat),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_rd_rem_used_feat>())).features as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_rd_rem_used_feat),
"::",
stringify!(features)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_le_subev_lt_key_req {
pub subev_code: u8,
pub conn_handle: u16,
pub rand: u64,
pub div: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_lt_key_req() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_lt_key_req>(),
13usize,
concat!("Size of: ", stringify!(ble_hci_ev_le_subev_lt_key_req))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_lt_key_req>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_ev_le_subev_lt_key_req))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_lt_key_req>())).subev_code as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_lt_key_req),
"::",
stringify!(subev_code)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_lt_key_req>())).conn_handle as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_lt_key_req),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_lt_key_req>())).rand as *const _ as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_lt_key_req),
"::",
stringify!(rand)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_lt_key_req>())).div as *const _ as usize
},
11usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_lt_key_req),
"::",
stringify!(div)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_le_subev_rem_conn_param_req {
pub subev_code: u8,
pub conn_handle: u16,
pub min_interval: u16,
pub max_interval: u16,
pub latency: u16,
pub timeout: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_rem_conn_param_req() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_rem_conn_param_req>(),
11usize,
concat!(
"Size of: ",
stringify!(ble_hci_ev_le_subev_rem_conn_param_req)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_rem_conn_param_req>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_ev_le_subev_rem_conn_param_req)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_rem_conn_param_req>())).subev_code
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_rem_conn_param_req),
"::",
stringify!(subev_code)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_rem_conn_param_req>())).conn_handle
as *const _ as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_rem_conn_param_req),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_rem_conn_param_req>())).min_interval
as *const _ as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_rem_conn_param_req),
"::",
stringify!(min_interval)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_rem_conn_param_req>())).max_interval
as *const _ as usize
},
5usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_rem_conn_param_req),
"::",
stringify!(max_interval)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_rem_conn_param_req>())).latency as *const _
as usize
},
7usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_rem_conn_param_req),
"::",
stringify!(latency)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_rem_conn_param_req>())).timeout as *const _
as usize
},
9usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_rem_conn_param_req),
"::",
stringify!(timeout)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_le_subev_data_len_chg {
pub subev_code: u8,
pub conn_handle: u16,
pub max_tx_octets: u16,
pub max_tx_time: u16,
pub max_rx_octets: u16,
pub max_rx_time: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_data_len_chg() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_data_len_chg>(),
11usize,
concat!("Size of: ", stringify!(ble_hci_ev_le_subev_data_len_chg))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_data_len_chg>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_ev_le_subev_data_len_chg)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_data_len_chg>())).subev_code as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_data_len_chg),
"::",
stringify!(subev_code)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_data_len_chg>())).conn_handle as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_data_len_chg),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_data_len_chg>())).max_tx_octets as *const _
as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_data_len_chg),
"::",
stringify!(max_tx_octets)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_data_len_chg>())).max_tx_time as *const _
as usize
},
5usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_data_len_chg),
"::",
stringify!(max_tx_time)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_data_len_chg>())).max_rx_octets as *const _
as usize
},
7usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_data_len_chg),
"::",
stringify!(max_rx_octets)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_data_len_chg>())).max_rx_time as *const _
as usize
},
9usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_data_len_chg),
"::",
stringify!(max_rx_time)
)
);
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct ble_hci_ev_le_subev_rd_loc_p256_pubkey {
pub subev_code: u8,
pub status: u8,
pub public_key: [u8; 64usize],
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_rd_loc_p256_pubkey() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_rd_loc_p256_pubkey>(),
66usize,
concat!(
"Size of: ",
stringify!(ble_hci_ev_le_subev_rd_loc_p256_pubkey)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_rd_loc_p256_pubkey>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_ev_le_subev_rd_loc_p256_pubkey)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_rd_loc_p256_pubkey>())).subev_code
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_rd_loc_p256_pubkey),
"::",
stringify!(subev_code)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_rd_loc_p256_pubkey>())).status as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_rd_loc_p256_pubkey),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_rd_loc_p256_pubkey>())).public_key
as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_rd_loc_p256_pubkey),
"::",
stringify!(public_key)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_le_subev_gen_dhkey_complete {
pub subev_code: u8,
pub status: u8,
pub dh_key: [u8; 32usize],
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_gen_dhkey_complete() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_gen_dhkey_complete>(),
34usize,
concat!(
"Size of: ",
stringify!(ble_hci_ev_le_subev_gen_dhkey_complete)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_gen_dhkey_complete>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_ev_le_subev_gen_dhkey_complete)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_gen_dhkey_complete>())).subev_code
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_gen_dhkey_complete),
"::",
stringify!(subev_code)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_gen_dhkey_complete>())).status as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_gen_dhkey_complete),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_gen_dhkey_complete>())).dh_key as *const _
as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_gen_dhkey_complete),
"::",
stringify!(dh_key)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_le_subev_enh_conn_complete {
pub subev_code: u8,
pub status: u8,
pub conn_handle: u16,
pub role: u8,
pub peer_addr_type: u8,
pub peer_addr: [u8; 6usize],
pub local_rpa: [u8; 6usize],
pub peer_rpa: [u8; 6usize],
pub conn_itvl: u16,
pub conn_latency: u16,
pub supervision_timeout: u16,
pub mca: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_enh_conn_complete() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_enh_conn_complete>(),
31usize,
concat!(
"Size of: ",
stringify!(ble_hci_ev_le_subev_enh_conn_complete)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_enh_conn_complete>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_ev_le_subev_enh_conn_complete)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_enh_conn_complete>())).subev_code
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_enh_conn_complete),
"::",
stringify!(subev_code)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_enh_conn_complete>())).status as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_enh_conn_complete),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_enh_conn_complete>())).conn_handle
as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_enh_conn_complete),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_enh_conn_complete>())).role as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_enh_conn_complete),
"::",
stringify!(role)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_enh_conn_complete>())).peer_addr_type
as *const _ as usize
},
5usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_enh_conn_complete),
"::",
stringify!(peer_addr_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_enh_conn_complete>())).peer_addr as *const _
as usize
},
6usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_enh_conn_complete),
"::",
stringify!(peer_addr)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_enh_conn_complete>())).local_rpa as *const _
as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_enh_conn_complete),
"::",
stringify!(local_rpa)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_enh_conn_complete>())).peer_rpa as *const _
as usize
},
18usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_enh_conn_complete),
"::",
stringify!(peer_rpa)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_enh_conn_complete>())).conn_itvl as *const _
as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_enh_conn_complete),
"::",
stringify!(conn_itvl)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_enh_conn_complete>())).conn_latency
as *const _ as usize
},
26usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_enh_conn_complete),
"::",
stringify!(conn_latency)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_enh_conn_complete>())).supervision_timeout
as *const _ as usize
},
28usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_enh_conn_complete),
"::",
stringify!(supervision_timeout)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_enh_conn_complete>())).mca as *const _
as usize
},
30usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_enh_conn_complete),
"::",
stringify!(mca)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct dir_adv_report {
pub type_: u8,
pub addr_type: u8,
pub addr: [u8; 6usize],
pub dir_addr_type: u8,
pub dir_addr: [u8; 6usize],
pub rssi: i8,
}
#[test]
fn bindgen_test_layout_dir_adv_report() {
assert_eq!(
::core::mem::size_of::<dir_adv_report>(),
16usize,
concat!("Size of: ", stringify!(dir_adv_report))
);
assert_eq!(
::core::mem::align_of::<dir_adv_report>(),
1usize,
concat!("Alignment of ", stringify!(dir_adv_report))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<dir_adv_report>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(dir_adv_report),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<dir_adv_report>())).addr_type as *const _ as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(dir_adv_report),
"::",
stringify!(addr_type)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<dir_adv_report>())).addr as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(dir_adv_report),
"::",
stringify!(addr)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<dir_adv_report>())).dir_addr_type as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(dir_adv_report),
"::",
stringify!(dir_addr_type)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<dir_adv_report>())).dir_addr as *const _ as usize },
9usize,
concat!(
"Offset of field: ",
stringify!(dir_adv_report),
"::",
stringify!(dir_addr)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<dir_adv_report>())).rssi as *const _ as usize },
15usize,
concat!(
"Offset of field: ",
stringify!(dir_adv_report),
"::",
stringify!(rssi)
)
);
}
#[repr(C, packed)]
#[derive(Debug)]
pub struct ble_hci_ev_le_subev_direct_adv_rpt {
pub subev_code: u8,
pub num_reports: u8,
pub reports: __IncompleteArrayField<dir_adv_report>,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_direct_adv_rpt() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_direct_adv_rpt>(),
2usize,
concat!("Size of: ", stringify!(ble_hci_ev_le_subev_direct_adv_rpt))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_direct_adv_rpt>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_ev_le_subev_direct_adv_rpt)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_direct_adv_rpt>())).subev_code as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_direct_adv_rpt),
"::",
stringify!(subev_code)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_direct_adv_rpt>())).num_reports as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_direct_adv_rpt),
"::",
stringify!(num_reports)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_direct_adv_rpt>())).reports as *const _
as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_direct_adv_rpt),
"::",
stringify!(reports)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_le_subev_phy_update_complete {
pub subev_code: u8,
pub status: u8,
pub conn_handle: u16,
pub tx_phy: u8,
pub rx_phy: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_phy_update_complete() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_phy_update_complete>(),
6usize,
concat!(
"Size of: ",
stringify!(ble_hci_ev_le_subev_phy_update_complete)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_phy_update_complete>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_ev_le_subev_phy_update_complete)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_phy_update_complete>())).subev_code
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_phy_update_complete),
"::",
stringify!(subev_code)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_phy_update_complete>())).status as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_phy_update_complete),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_phy_update_complete>())).conn_handle
as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_phy_update_complete),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_phy_update_complete>())).tx_phy as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_phy_update_complete),
"::",
stringify!(tx_phy)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_phy_update_complete>())).rx_phy as *const _
as usize
},
5usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_phy_update_complete),
"::",
stringify!(rx_phy)
)
);
}
#[repr(C, packed)]
#[derive(Debug)]
pub struct ext_adv_report {
pub evt_type: u16,
pub addr_type: u8,
pub addr: [u8; 6usize],
pub pri_phy: u8,
pub sec_phy: u8,
pub sid: u8,
pub tx_power: i8,
pub rssi: i8,
pub periodic_itvl: u16,
pub dir_addr_type: u8,
pub dir_addr: [u8; 6usize],
pub data_len: u8,
pub data: __IncompleteArrayField<u8>,
}
#[test]
fn bindgen_test_layout_ext_adv_report() {
assert_eq!(
::core::mem::size_of::<ext_adv_report>(),
24usize,
concat!("Size of: ", stringify!(ext_adv_report))
);
assert_eq!(
::core::mem::align_of::<ext_adv_report>(),
1usize,
concat!("Alignment of ", stringify!(ext_adv_report))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ext_adv_report>())).evt_type as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ext_adv_report),
"::",
stringify!(evt_type)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ext_adv_report>())).addr_type as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(ext_adv_report),
"::",
stringify!(addr_type)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ext_adv_report>())).addr as *const _ as usize },
3usize,
concat!(
"Offset of field: ",
stringify!(ext_adv_report),
"::",
stringify!(addr)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ext_adv_report>())).pri_phy as *const _ as usize },
9usize,
concat!(
"Offset of field: ",
stringify!(ext_adv_report),
"::",
stringify!(pri_phy)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ext_adv_report>())).sec_phy as *const _ as usize },
10usize,
concat!(
"Offset of field: ",
stringify!(ext_adv_report),
"::",
stringify!(sec_phy)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ext_adv_report>())).sid as *const _ as usize },
11usize,
concat!(
"Offset of field: ",
stringify!(ext_adv_report),
"::",
stringify!(sid)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ext_adv_report>())).tx_power as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(ext_adv_report),
"::",
stringify!(tx_power)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ext_adv_report>())).rssi as *const _ as usize },
13usize,
concat!(
"Offset of field: ",
stringify!(ext_adv_report),
"::",
stringify!(rssi)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ext_adv_report>())).periodic_itvl as *const _ as usize },
14usize,
concat!(
"Offset of field: ",
stringify!(ext_adv_report),
"::",
stringify!(periodic_itvl)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ext_adv_report>())).dir_addr_type as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(ext_adv_report),
"::",
stringify!(dir_addr_type)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ext_adv_report>())).dir_addr as *const _ as usize },
17usize,
concat!(
"Offset of field: ",
stringify!(ext_adv_report),
"::",
stringify!(dir_addr)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ext_adv_report>())).data_len as *const _ as usize },
23usize,
concat!(
"Offset of field: ",
stringify!(ext_adv_report),
"::",
stringify!(data_len)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ext_adv_report>())).data as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(ext_adv_report),
"::",
stringify!(data)
)
);
}
#[repr(C, packed)]
#[derive(Debug)]
pub struct ble_hci_ev_le_subev_ext_adv_rpt {
pub subev_code: u8,
pub num_reports: u8,
pub reports: __IncompleteArrayField<ext_adv_report>,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_ext_adv_rpt() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_ext_adv_rpt>(),
2usize,
concat!("Size of: ", stringify!(ble_hci_ev_le_subev_ext_adv_rpt))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_ext_adv_rpt>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_ev_le_subev_ext_adv_rpt))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_ext_adv_rpt>())).subev_code as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_ext_adv_rpt),
"::",
stringify!(subev_code)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_ext_adv_rpt>())).num_reports as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_ext_adv_rpt),
"::",
stringify!(num_reports)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_ext_adv_rpt>())).reports as *const _
as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_ext_adv_rpt),
"::",
stringify!(reports)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_le_subev_periodic_adv_sync_estab {
pub subev_code: u8,
pub status: u8,
pub sync_handle: u16,
pub sid: u8,
pub peer_addr_type: u8,
pub peer_addr: [u8; 6usize],
pub phy: u8,
pub interval: u16,
pub aca: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_periodic_adv_sync_estab() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_periodic_adv_sync_estab>(),
16usize,
concat!(
"Size of: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_sync_estab)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_periodic_adv_sync_estab>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_ev_le_subev_periodic_adv_sync_estab)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_sync_estab>())).subev_code
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_sync_estab),
"::",
stringify!(subev_code)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_sync_estab>())).status
as *const _ as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_sync_estab),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_sync_estab>())).sync_handle
as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_sync_estab),
"::",
stringify!(sync_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_sync_estab>())).sid as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_sync_estab),
"::",
stringify!(sid)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_sync_estab>())).peer_addr_type
as *const _ as usize
},
5usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_sync_estab),
"::",
stringify!(peer_addr_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_sync_estab>())).peer_addr
as *const _ as usize
},
6usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_sync_estab),
"::",
stringify!(peer_addr)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_sync_estab>())).phy as *const _
as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_sync_estab),
"::",
stringify!(phy)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_sync_estab>())).interval
as *const _ as usize
},
13usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_sync_estab),
"::",
stringify!(interval)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_sync_estab>())).aca as *const _
as usize
},
15usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_sync_estab),
"::",
stringify!(aca)
)
);
}
#[repr(C, packed)]
#[derive(Debug)]
pub struct ble_hci_ev_le_subev_periodic_adv_rpt {
pub subev_code: u8,
pub sync_handle: u16,
pub tx_power: i8,
pub rssi: i8,
pub cte_type: u8,
pub data_status: u8,
pub data_len: u8,
pub data: __IncompleteArrayField<u8>,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_periodic_adv_rpt() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_periodic_adv_rpt>(),
8usize,
concat!(
"Size of: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_rpt)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_periodic_adv_rpt>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_ev_le_subev_periodic_adv_rpt)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_rpt>())).subev_code as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_rpt),
"::",
stringify!(subev_code)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_rpt>())).sync_handle
as *const _ as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_rpt),
"::",
stringify!(sync_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_rpt>())).tx_power as *const _
as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_rpt),
"::",
stringify!(tx_power)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_rpt>())).rssi as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_rpt),
"::",
stringify!(rssi)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_rpt>())).cte_type as *const _
as usize
},
5usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_rpt),
"::",
stringify!(cte_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_rpt>())).data_status
as *const _ as usize
},
6usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_rpt),
"::",
stringify!(data_status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_rpt>())).data_len as *const _
as usize
},
7usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_rpt),
"::",
stringify!(data_len)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_rpt>())).data as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_rpt),
"::",
stringify!(data)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_le_subev_periodic_adv_sync_lost {
pub subev_code: u8,
pub sync_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_periodic_adv_sync_lost() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_periodic_adv_sync_lost>(),
3usize,
concat!(
"Size of: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_sync_lost)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_periodic_adv_sync_lost>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_ev_le_subev_periodic_adv_sync_lost)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_sync_lost>())).subev_code
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_sync_lost),
"::",
stringify!(subev_code)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_sync_lost>())).sync_handle
as *const _ as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_sync_lost),
"::",
stringify!(sync_handle)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_le_subev_scan_timeout {
pub subev_code: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_scan_timeout() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_scan_timeout>(),
1usize,
concat!("Size of: ", stringify!(ble_hci_ev_le_subev_scan_timeout))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_scan_timeout>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_ev_le_subev_scan_timeout)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_scan_timeout>())).subev_code as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_scan_timeout),
"::",
stringify!(subev_code)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_le_subev_adv_set_terminated {
pub subev_code: u8,
pub status: u8,
pub adv_handle: u8,
pub conn_handle: u16,
pub num_events: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_adv_set_terminated() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_adv_set_terminated>(),
6usize,
concat!(
"Size of: ",
stringify!(ble_hci_ev_le_subev_adv_set_terminated)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_adv_set_terminated>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_ev_le_subev_adv_set_terminated)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_adv_set_terminated>())).subev_code
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_adv_set_terminated),
"::",
stringify!(subev_code)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_adv_set_terminated>())).status as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_adv_set_terminated),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_adv_set_terminated>())).adv_handle
as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_adv_set_terminated),
"::",
stringify!(adv_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_adv_set_terminated>())).conn_handle
as *const _ as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_adv_set_terminated),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_adv_set_terminated>())).num_events
as *const _ as usize
},
5usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_adv_set_terminated),
"::",
stringify!(num_events)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_le_subev_scan_req_rcvd {
pub subev_code: u8,
pub adv_handle: u8,
pub peer_addr_type: u8,
pub peer_addr: [u8; 6usize],
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_scan_req_rcvd() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_scan_req_rcvd>(),
9usize,
concat!("Size of: ", stringify!(ble_hci_ev_le_subev_scan_req_rcvd))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_scan_req_rcvd>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_ev_le_subev_scan_req_rcvd)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_scan_req_rcvd>())).subev_code as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_scan_req_rcvd),
"::",
stringify!(subev_code)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_scan_req_rcvd>())).adv_handle as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_scan_req_rcvd),
"::",
stringify!(adv_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_scan_req_rcvd>())).peer_addr_type
as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_scan_req_rcvd),
"::",
stringify!(peer_addr_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_scan_req_rcvd>())).peer_addr as *const _
as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_scan_req_rcvd),
"::",
stringify!(peer_addr)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_le_subev_chan_sel_alg {
pub subev_code: u8,
pub conn_handle: u16,
pub csa: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_chan_sel_alg() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_chan_sel_alg>(),
4usize,
concat!("Size of: ", stringify!(ble_hci_ev_le_subev_chan_sel_alg))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_chan_sel_alg>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_ev_le_subev_chan_sel_alg)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_chan_sel_alg>())).subev_code as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_chan_sel_alg),
"::",
stringify!(subev_code)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_chan_sel_alg>())).conn_handle as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_chan_sel_alg),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_chan_sel_alg>())).csa as *const _ as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_chan_sel_alg),
"::",
stringify!(csa)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_le_subev_periodic_adv_sync_transfer {
pub subev_code: u8,
pub status: u8,
pub conn_handle: u16,
pub service_data: u16,
pub sync_handle: u16,
pub sid: u8,
pub peer_addr_type: u8,
pub peer_addr: [u8; 6usize],
pub phy: u8,
pub interval: u16,
pub aca: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_periodic_adv_sync_transfer() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_periodic_adv_sync_transfer>(),
20usize,
concat!(
"Size of: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_sync_transfer)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_periodic_adv_sync_transfer>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_ev_le_subev_periodic_adv_sync_transfer)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_sync_transfer>())).subev_code
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_sync_transfer),
"::",
stringify!(subev_code)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_sync_transfer>())).status
as *const _ as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_sync_transfer),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_sync_transfer>())).conn_handle
as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_sync_transfer),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_sync_transfer>())).service_data
as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_sync_transfer),
"::",
stringify!(service_data)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_sync_transfer>())).sync_handle
as *const _ as usize
},
6usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_sync_transfer),
"::",
stringify!(sync_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_sync_transfer>())).sid
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_sync_transfer),
"::",
stringify!(sid)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_sync_transfer>()))
.peer_addr_type as *const _ as usize
},
9usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_sync_transfer),
"::",
stringify!(peer_addr_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_sync_transfer>())).peer_addr
as *const _ as usize
},
10usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_sync_transfer),
"::",
stringify!(peer_addr)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_sync_transfer>())).phy
as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_sync_transfer),
"::",
stringify!(phy)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_sync_transfer>())).interval
as *const _ as usize
},
17usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_sync_transfer),
"::",
stringify!(interval)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_periodic_adv_sync_transfer>())).aca
as *const _ as usize
},
19usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_periodic_adv_sync_transfer),
"::",
stringify!(aca)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_le_subev_cis_established {
pub subev_code: u8,
pub status: u8,
pub cis_handle: u16,
pub cig_sync_delay: [u8; 3usize],
pub cis_sync_delay: [u8; 3usize],
pub trans_latency_mtos: [u8; 3usize],
pub trans_latency_stom: [u8; 3usize],
pub phy_mtos: u8,
pub phy_stom: u8,
pub nse: u8,
pub bn_mtos: u8,
pub bn_stom: u8,
pub ft_mtos: u8,
pub ft_stom: u8,
pub max_pdu_mtos: u16,
pub max_pdu_stom: u16,
pub iso_interval: u16,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_cis_established() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_cis_established>(),
29usize,
concat!("Size of: ", stringify!(ble_hci_ev_le_subev_cis_established))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_cis_established>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_ev_le_subev_cis_established)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_cis_established>())).subev_code as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_cis_established),
"::",
stringify!(subev_code)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_cis_established>())).status as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_cis_established),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_cis_established>())).cis_handle as *const _
as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_cis_established),
"::",
stringify!(cis_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_cis_established>())).cig_sync_delay
as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_cis_established),
"::",
stringify!(cig_sync_delay)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_cis_established>())).cis_sync_delay
as *const _ as usize
},
7usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_cis_established),
"::",
stringify!(cis_sync_delay)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_cis_established>())).trans_latency_mtos
as *const _ as usize
},
10usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_cis_established),
"::",
stringify!(trans_latency_mtos)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_cis_established>())).trans_latency_stom
as *const _ as usize
},
13usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_cis_established),
"::",
stringify!(trans_latency_stom)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_cis_established>())).phy_mtos as *const _
as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_cis_established),
"::",
stringify!(phy_mtos)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_cis_established>())).phy_stom as *const _
as usize
},
17usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_cis_established),
"::",
stringify!(phy_stom)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_cis_established>())).nse as *const _
as usize
},
18usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_cis_established),
"::",
stringify!(nse)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_cis_established>())).bn_mtos as *const _
as usize
},
19usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_cis_established),
"::",
stringify!(bn_mtos)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_cis_established>())).bn_stom as *const _
as usize
},
20usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_cis_established),
"::",
stringify!(bn_stom)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_cis_established>())).ft_mtos as *const _
as usize
},
21usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_cis_established),
"::",
stringify!(ft_mtos)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_cis_established>())).ft_stom as *const _
as usize
},
22usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_cis_established),
"::",
stringify!(ft_stom)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_cis_established>())).max_pdu_mtos
as *const _ as usize
},
23usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_cis_established),
"::",
stringify!(max_pdu_mtos)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_cis_established>())).max_pdu_stom
as *const _ as usize
},
25usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_cis_established),
"::",
stringify!(max_pdu_stom)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_cis_established>())).iso_interval
as *const _ as usize
},
27usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_cis_established),
"::",
stringify!(iso_interval)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_le_subev_cis_request {
pub subev_code: u8,
pub conn_handle: u16,
pub cis_handle: u16,
pub cig_id: u8,
pub cis_id: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_cis_request() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_cis_request>(),
7usize,
concat!("Size of: ", stringify!(ble_hci_ev_le_subev_cis_request))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_cis_request>(),
1usize,
concat!("Alignment of ", stringify!(ble_hci_ev_le_subev_cis_request))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_cis_request>())).subev_code as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_cis_request),
"::",
stringify!(subev_code)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_cis_request>())).conn_handle as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_cis_request),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_cis_request>())).cis_handle as *const _
as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_cis_request),
"::",
stringify!(cis_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_cis_request>())).cig_id as *const _ as usize
},
5usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_cis_request),
"::",
stringify!(cig_id)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_cis_request>())).cis_id as *const _ as usize
},
6usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_cis_request),
"::",
stringify!(cis_id)
)
);
}
#[repr(C, packed)]
#[derive(Debug)]
pub struct ble_hci_ev_le_subev_big_complete {
pub subev_code: u8,
pub status: u8,
pub big_handle: u8,
pub big_sync_delay: [u8; 3usize],
pub transport_latency: [u8; 3usize],
pub phy: u8,
pub nse: u8,
pub bn: u8,
pub pto: u8,
pub irc: u8,
pub max_pdu: u16,
pub iso_interval: u16,
pub bis_cnt: u8,
pub bis: __IncompleteArrayField<u16>,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_big_complete() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_big_complete>(),
19usize,
concat!("Size of: ", stringify!(ble_hci_ev_le_subev_big_complete))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_big_complete>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_ev_le_subev_big_complete)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_complete>())).subev_code as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_complete),
"::",
stringify!(subev_code)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_complete>())).status as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_complete),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_complete>())).big_handle as *const _
as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_complete),
"::",
stringify!(big_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_complete>())).big_sync_delay as *const _
as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_complete),
"::",
stringify!(big_sync_delay)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_complete>())).transport_latency
as *const _ as usize
},
6usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_complete),
"::",
stringify!(transport_latency)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_complete>())).phy as *const _ as usize
},
9usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_complete),
"::",
stringify!(phy)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_complete>())).nse as *const _ as usize
},
10usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_complete),
"::",
stringify!(nse)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_complete>())).bn as *const _ as usize
},
11usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_complete),
"::",
stringify!(bn)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_complete>())).pto as *const _ as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_complete),
"::",
stringify!(pto)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_complete>())).irc as *const _ as usize
},
13usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_complete),
"::",
stringify!(irc)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_complete>())).max_pdu as *const _
as usize
},
14usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_complete),
"::",
stringify!(max_pdu)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_complete>())).iso_interval as *const _
as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_complete),
"::",
stringify!(iso_interval)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_complete>())).bis_cnt as *const _
as usize
},
18usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_complete),
"::",
stringify!(bis_cnt)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_complete>())).bis as *const _ as usize
},
19usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_complete),
"::",
stringify!(bis)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_le_subev_big_terminate_complete {
pub subev_code: u8,
pub big_handle: u8,
pub reason: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_big_terminate_complete() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_big_terminate_complete>(),
3usize,
concat!(
"Size of: ",
stringify!(ble_hci_ev_le_subev_big_terminate_complete)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_big_terminate_complete>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_ev_le_subev_big_terminate_complete)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_terminate_complete>())).subev_code
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_terminate_complete),
"::",
stringify!(subev_code)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_terminate_complete>())).big_handle
as *const _ as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_terminate_complete),
"::",
stringify!(big_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_terminate_complete>())).reason
as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_terminate_complete),
"::",
stringify!(reason)
)
);
}
#[repr(C, packed)]
#[derive(Debug)]
pub struct ble_hci_ev_le_subev_big_sync_established {
pub subev_code: u8,
pub status: u8,
pub big_handle: u8,
pub transport_latency: [u8; 3usize],
pub nse: u8,
pub bn: u8,
pub pto: u8,
pub irc: u8,
pub max_pdu: u16,
pub iso_interval: u16,
pub bis_cnt: u8,
pub bis_handles: __IncompleteArrayField<u16>,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_big_sync_established() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_big_sync_established>(),
15usize,
concat!(
"Size of: ",
stringify!(ble_hci_ev_le_subev_big_sync_established)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_big_sync_established>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_ev_le_subev_big_sync_established)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_sync_established>())).subev_code
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_sync_established),
"::",
stringify!(subev_code)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_sync_established>())).status as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_sync_established),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_sync_established>())).big_handle
as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_sync_established),
"::",
stringify!(big_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_sync_established>())).transport_latency
as *const _ as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_sync_established),
"::",
stringify!(transport_latency)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_sync_established>())).nse as *const _
as usize
},
6usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_sync_established),
"::",
stringify!(nse)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_sync_established>())).bn as *const _
as usize
},
7usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_sync_established),
"::",
stringify!(bn)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_sync_established>())).pto as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_sync_established),
"::",
stringify!(pto)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_sync_established>())).irc as *const _
as usize
},
9usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_sync_established),
"::",
stringify!(irc)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_sync_established>())).max_pdu
as *const _ as usize
},
10usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_sync_established),
"::",
stringify!(max_pdu)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_sync_established>())).iso_interval
as *const _ as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_sync_established),
"::",
stringify!(iso_interval)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_sync_established>())).bis_cnt
as *const _ as usize
},
14usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_sync_established),
"::",
stringify!(bis_cnt)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_sync_established>())).bis_handles
as *const _ as usize
},
15usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_sync_established),
"::",
stringify!(bis_handles)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_le_subev_big_sync_lost {
pub subev_code: u8,
pub big_handle: u8,
pub reason: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_big_sync_lost() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_big_sync_lost>(),
3usize,
concat!("Size of: ", stringify!(ble_hci_ev_le_subev_big_sync_lost))
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_big_sync_lost>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_ev_le_subev_big_sync_lost)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_sync_lost>())).subev_code as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_sync_lost),
"::",
stringify!(subev_code)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_sync_lost>())).big_handle as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_sync_lost),
"::",
stringify!(big_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_big_sync_lost>())).reason as *const _
as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_big_sync_lost),
"::",
stringify!(reason)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_le_subev_peer_sca_complete {
pub subev_code: u8,
pub status: u8,
pub conn_handle: u16,
pub sca: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_peer_sca_complete() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_peer_sca_complete>(),
5usize,
concat!(
"Size of: ",
stringify!(ble_hci_ev_le_subev_peer_sca_complete)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_peer_sca_complete>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_ev_le_subev_peer_sca_complete)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_peer_sca_complete>())).subev_code
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_peer_sca_complete),
"::",
stringify!(subev_code)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_peer_sca_complete>())).status as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_peer_sca_complete),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_peer_sca_complete>())).conn_handle
as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_peer_sca_complete),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_peer_sca_complete>())).sca as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_peer_sca_complete),
"::",
stringify!(sca)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hci_ev_le_subev_biginfo_adv_report {
pub subev_code: u8,
pub sync_handle: u16,
pub bis_cnt: u8,
pub nse: u8,
pub iso_interval: u16,
pub bn: u8,
pub pto: u8,
pub irc: u8,
pub max_pdu: u16,
pub sdu_interval: [u8; 3usize],
pub max_sdu: u16,
pub phy: u8,
pub framing: u8,
pub encryption: u8,
}
#[test]
fn bindgen_test_layout_ble_hci_ev_le_subev_biginfo_adv_report() {
assert_eq!(
::core::mem::size_of::<ble_hci_ev_le_subev_biginfo_adv_report>(),
20usize,
concat!(
"Size of: ",
stringify!(ble_hci_ev_le_subev_biginfo_adv_report)
)
);
assert_eq!(
::core::mem::align_of::<ble_hci_ev_le_subev_biginfo_adv_report>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_hci_ev_le_subev_biginfo_adv_report)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_biginfo_adv_report>())).subev_code
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_biginfo_adv_report),
"::",
stringify!(subev_code)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_biginfo_adv_report>())).sync_handle
as *const _ as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_biginfo_adv_report),
"::",
stringify!(sync_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_biginfo_adv_report>())).bis_cnt as *const _
as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_biginfo_adv_report),
"::",
stringify!(bis_cnt)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_biginfo_adv_report>())).nse as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_biginfo_adv_report),
"::",
stringify!(nse)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_biginfo_adv_report>())).iso_interval
as *const _ as usize
},
5usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_biginfo_adv_report),
"::",
stringify!(iso_interval)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_biginfo_adv_report>())).bn as *const _
as usize
},
7usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_biginfo_adv_report),
"::",
stringify!(bn)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_biginfo_adv_report>())).pto as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_biginfo_adv_report),
"::",
stringify!(pto)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_biginfo_adv_report>())).irc as *const _
as usize
},
9usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_biginfo_adv_report),
"::",
stringify!(irc)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_biginfo_adv_report>())).max_pdu as *const _
as usize
},
10usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_biginfo_adv_report),
"::",
stringify!(max_pdu)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_biginfo_adv_report>())).sdu_interval
as *const _ as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_biginfo_adv_report),
"::",
stringify!(sdu_interval)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_biginfo_adv_report>())).max_sdu as *const _
as usize
},
15usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_biginfo_adv_report),
"::",
stringify!(max_sdu)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_biginfo_adv_report>())).phy as *const _
as usize
},
17usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_biginfo_adv_report),
"::",
stringify!(phy)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_biginfo_adv_report>())).framing as *const _
as usize
},
18usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_biginfo_adv_report),
"::",
stringify!(framing)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hci_ev_le_subev_biginfo_adv_report>())).encryption
as *const _ as usize
},
19usize,
concat!(
"Offset of field: ",
stringify!(ble_hci_ev_le_subev_biginfo_adv_report),
"::",
stringify!(encryption)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hci_data_hdr {
pub hdh_handle_pb_bc: u16,
pub hdh_len: u16,
}
#[test]
fn bindgen_test_layout_hci_data_hdr() {
assert_eq!(
::core::mem::size_of::<hci_data_hdr>(),
4usize,
concat!("Size of: ", stringify!(hci_data_hdr))
);
assert_eq!(
::core::mem::align_of::<hci_data_hdr>(),
2usize,
concat!("Alignment of ", stringify!(hci_data_hdr))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<hci_data_hdr>())).hdh_handle_pb_bc as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hci_data_hdr),
"::",
stringify!(hdh_handle_pb_bc)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<hci_data_hdr>())).hdh_len as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(hci_data_hdr),
"::",
stringify!(hdh_len)
)
);
}
extern "C" {
#[doc = " Reads a locally registered attribute. If the specified attribute handle"]
#[doc = " corresponds to a GATT characteristic value or descriptor, the read is"]
#[doc = " performed by calling the registered GATT access callback."]
#[doc = ""]
#[doc = " @param attr_handle The 16-bit handle of the attribute to read."]
#[doc = " @param out_om On success, this is made to point to a"]
#[doc = " newly-allocated mbuf containing the"]
#[doc = " attribute data read."]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " NimBLE host ATT return code if the attribute"]
#[doc = " access callback reports failure;"]
#[doc = " NimBLE host core return code on unexpected"]
#[doc = " error."]
pub fn ble_att_svr_read_local(attr_handle: u16, out_om: *mut *mut os_mbuf) -> cty::c_int;
}
extern "C" {
#[doc = " Writes a locally registered attribute. This function consumes the supplied"]
#[doc = " mbuf regardless of the outcome. If the specified attribute handle"]
#[doc = " corresponds to a GATT characteristic value or descriptor, the write is"]
#[doc = " performed by calling the registered GATT access callback."]
#[doc = ""]
#[doc = " @param attr_handle The 16-bit handle of the attribute to write."]
#[doc = " @param om The value to write to the attribute."]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " NimBLE host ATT return code if the attribute"]
#[doc = " access callback reports failure;"]
#[doc = " NimBLE host core return code on unexpected"]
#[doc = " error."]
pub fn ble_att_svr_write_local(attr_handle: u16, om: *mut os_mbuf) -> cty::c_int;
}
extern "C" {
#[doc = " Retrieves the ATT MTU of the specified connection. If an MTU exchange for"]
#[doc = " this connection has occurred, the MTU is the lower of the two peers'"]
#[doc = " preferred values. Otherwise, the MTU is the default value of 23."]
#[doc = ""]
#[doc = " @param conn_handle The handle of the connection to query."]
#[doc = ""]
#[doc = " @return The specified connection's ATT MTU, or 0 if"]
#[doc = " there is no such connection."]
pub fn ble_att_mtu(conn_handle: u16) -> u16;
}
extern "C" {
#[doc = " Retrieves the preferred ATT MTU. This is the value indicated by the device"]
#[doc = " during an ATT MTU exchange."]
#[doc = ""]
#[doc = " @return The preferred ATT MTU."]
pub fn ble_att_preferred_mtu() -> u16;
}
extern "C" {
#[doc = " Sets the preferred ATT MTU; the device will indicate this value in all"]
#[doc = " subsequent ATT MTU exchanges. The ATT MTU of a connection is equal to the"]
#[doc = " lower of the two peers' preferred MTU values. The ATT MTU is what dictates"]
#[doc = " the maximum size of any message sent during a GATT procedure."]
#[doc = ""]
#[doc = " The specified MTU must be within the following range: [23, BLE_ATT_MTU_MAX]."]
#[doc = " 23 is a minimum imposed by the Bluetooth specification; BLE_ATT_MTU_MAX is a"]
#[doc = " NimBLE compile-time setting."]
#[doc = ""]
#[doc = " @param mtu The preferred ATT MTU."]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " BLE_HS_EINVAL if the specified value is not"]
#[doc = " within the allowed range."]
pub fn ble_att_set_preferred_mtu(mtu: u16) -> cty::c_int;
}
extern "C" {
#[doc = " Configures the device to advertise Eddystone UID beacons."]
#[doc = ""]
#[doc = " @param adv_fields The base advertisement fields to transform into"]
#[doc = " an eddystone beacon. All configured fields"]
#[doc = " are preserved; you probably want to clear"]
#[doc = " this struct before calling this function."]
#[doc = " @param uid The 16-byte UID to advertise."]
#[doc = " @param measured_power The Measured Power (RSSI value at 0 Meter)."]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " BLE_HS_EBUSY if advertising is in progress;"]
#[doc = " BLE_HS_EMSGSIZE if the specified data is too"]
#[doc = " large to fit in an advertisement;"]
#[doc = " Other nonzero on failure."]
pub fn ble_eddystone_set_adv_data_uid(
adv_fields: *mut ble_hs_adv_fields,
uid: *mut cty::c_void,
measured_power: i8,
) -> cty::c_int;
}
extern "C" {
#[doc = " Configures the device to advertise Eddystone URL beacons."]
#[doc = ""]
#[doc = " @param adv_fields The base advertisement fields to transform into"]
#[doc = " an eddystone beacon. All configured fields"]
#[doc = " are preserved; you probably want to clear"]
#[doc = " this struct before calling this function."]
#[doc = " @param url_scheme The prefix of the URL; one of the"]
#[doc = " BLE_EDDYSTONE_URL_SCHEME values."]
#[doc = " @param url_body The middle of the URL. Don't include the"]
#[doc = " suffix if there is a suitable suffix code."]
#[doc = " @param url_body_len The string length of the url_body argument."]
#[doc = " @param url_suffix The suffix of the URL; one of the"]
#[doc = " BLE_EDDYSTONE_URL_SUFFIX values; use"]
#[doc = " BLE_EDDYSTONE_URL_SUFFIX_NONE if the suffix"]
#[doc = " is embedded in the body argument."]
#[doc = " @param measured_power The Measured Power (RSSI value at 0 Meter)."]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " BLE_HS_EBUSY if advertising is in progress;"]
#[doc = " BLE_HS_EMSGSIZE if the specified data is too"]
#[doc = " large to fit in an advertisement;"]
#[doc = " Other nonzero on failure."]
pub fn ble_eddystone_set_adv_data_url(
adv_fields: *mut ble_hs_adv_fields,
url_scheme: u8,
url_body: *mut cty::c_char,
url_body_len: u8,
suffix: u8,
measured_power: i8,
) -> cty::c_int;
}
#[doc = " 16-bit UUID (BT SIG assigned)"]
pub const BLE_UUID_TYPE_16: _bindgen_ty_1 = 16;
#[doc = " 32-bit UUID (BT SIG assigned)"]
pub const BLE_UUID_TYPE_32: _bindgen_ty_1 = 32;
#[doc = " 128-bit UUID"]
pub const BLE_UUID_TYPE_128: _bindgen_ty_1 = 128;
#[doc = " Type of UUID"]
pub type _bindgen_ty_1 = u32;
#[doc = " Generic UUID type, to be used only as a pointer"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_uuid_t {
#[doc = " Type of the UUID"]
pub type_: u8,
}
#[test]
fn bindgen_test_layout_ble_uuid_t() {
assert_eq!(
::core::mem::size_of::<ble_uuid_t>(),
1usize,
concat!("Size of: ", stringify!(ble_uuid_t))
);
assert_eq!(
::core::mem::align_of::<ble_uuid_t>(),
1usize,
concat!("Alignment of ", stringify!(ble_uuid_t))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_uuid_t>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_uuid_t),
"::",
stringify!(type_)
)
);
}
#[doc = " 16-bit UUID"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_uuid16_t {
pub u: ble_uuid_t,
pub value: u16,
}
#[test]
fn bindgen_test_layout_ble_uuid16_t() {
assert_eq!(
::core::mem::size_of::<ble_uuid16_t>(),
4usize,
concat!("Size of: ", stringify!(ble_uuid16_t))
);
assert_eq!(
::core::mem::align_of::<ble_uuid16_t>(),
2usize,
concat!("Alignment of ", stringify!(ble_uuid16_t))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_uuid16_t>())).u as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_uuid16_t),
"::",
stringify!(u)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_uuid16_t>())).value as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(ble_uuid16_t),
"::",
stringify!(value)
)
);
}
#[doc = " 32-bit UUID"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_uuid32_t {
pub u: ble_uuid_t,
pub value: u32,
}
#[test]
fn bindgen_test_layout_ble_uuid32_t() {
assert_eq!(
::core::mem::size_of::<ble_uuid32_t>(),
8usize,
concat!("Size of: ", stringify!(ble_uuid32_t))
);
assert_eq!(
::core::mem::align_of::<ble_uuid32_t>(),
4usize,
concat!("Alignment of ", stringify!(ble_uuid32_t))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_uuid32_t>())).u as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_uuid32_t),
"::",
stringify!(u)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_uuid32_t>())).value as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ble_uuid32_t),
"::",
stringify!(value)
)
);
}
#[doc = " 128-bit UUID"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_uuid128_t {
pub u: ble_uuid_t,
pub value: [u8; 16usize],
}
#[test]
fn bindgen_test_layout_ble_uuid128_t() {
assert_eq!(
::core::mem::size_of::<ble_uuid128_t>(),
17usize,
concat!("Size of: ", stringify!(ble_uuid128_t))
);
assert_eq!(
::core::mem::align_of::<ble_uuid128_t>(),
1usize,
concat!("Alignment of ", stringify!(ble_uuid128_t))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_uuid128_t>())).u as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_uuid128_t),
"::",
stringify!(u)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_uuid128_t>())).value as *const _ as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(ble_uuid128_t),
"::",
stringify!(value)
)
);
}
#[doc = " Universal UUID type, to be used for any-UUID static allocation"]
#[repr(C)]
#[derive(Copy, Clone)]
pub union ble_uuid_any_t {
pub u: ble_uuid_t,
pub u16: ble_uuid16_t,
pub u32: ble_uuid32_t,
pub u128: ble_uuid128_t,
_bindgen_union_align: [u32; 5usize],
}
#[test]
fn bindgen_test_layout_ble_uuid_any_t() {
assert_eq!(
::core::mem::size_of::<ble_uuid_any_t>(),
20usize,
concat!("Size of: ", stringify!(ble_uuid_any_t))
);
assert_eq!(
::core::mem::align_of::<ble_uuid_any_t>(),
4usize,
concat!("Alignment of ", stringify!(ble_uuid_any_t))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_uuid_any_t>())).u as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_uuid_any_t),
"::",
stringify!(u)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_uuid_any_t>())).u16 as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_uuid_any_t),
"::",
stringify!(u16)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_uuid_any_t>())).u32 as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_uuid_any_t),
"::",
stringify!(u32)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_uuid_any_t>())).u128 as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_uuid_any_t),
"::",
stringify!(u128)
)
);
}
extern "C" {
#[doc = " @brief Constructs a UUID object from a byte array."]
#[doc = ""]
#[doc = " @param uuid On success, this gets populated with the constructed UUID."]
#[doc = " @param buf The source buffer to parse."]
#[doc = " @param len The size of the buffer, in bytes."]
#[doc = ""]
#[doc = " @return 0 on success, BLE_HS_EINVAL if the source buffer does not contain"]
#[doc = " a valid UUID."]
pub fn ble_uuid_init_from_buf(
uuid: *mut ble_uuid_any_t,
buf: *const cty::c_void,
len: size_t,
) -> cty::c_int;
}
extern "C" {
#[doc = " @brief Compares two Bluetooth UUIDs."]
#[doc = ""]
#[doc = " @param uuid1 The first UUID to compare."]
#[doc = " @param uuid2 The second UUID to compare."]
#[doc = ""]
#[doc = " @return 0 if the two UUIDs are equal, nonzero if the UUIDs differ."]
pub fn ble_uuid_cmp(uuid1: *const ble_uuid_t, uuid2: *const ble_uuid_t) -> cty::c_int;
}
extern "C" {
#[doc = " @brief Copy Bluetooth UUID"]
#[doc = ""]
#[doc = " @param dst Destination UUID."]
#[doc = " @param src Source UUID."]
pub fn ble_uuid_copy(dst: *mut ble_uuid_any_t, src: *const ble_uuid_t);
}
extern "C" {
#[doc = " @brief Converts the specified UUID to its string representation."]
#[doc = ""]
#[doc = " Example string representations:"]
#[doc = " o 16-bit: 0x1234"]
#[doc = " o 32-bit: 0x12345678"]
#[doc = " o 128-bit: 12345678-1234-1234-1234-123456789abc"]
#[doc = ""]
#[doc = " @param uuid The source UUID to convert."]
#[doc = " @param dst The destination buffer."]
#[doc = ""]
#[doc = " @return A pointer to the supplied destination buffer."]
pub fn ble_uuid_to_str(uuid: *const ble_uuid_t, dst: *mut cty::c_char) -> *mut cty::c_char;
}
extern "C" {
#[doc = " @brief Converts the specified 16-bit UUID to a uint16_t."]
#[doc = ""]
#[doc = " @param uuid The source UUID to convert."]
#[doc = ""]
#[doc = " @return The converted integer on success, NULL if the specified UUID is"]
#[doc = " not 16 bits."]
pub fn ble_uuid_u16(uuid: *const ble_uuid_t) -> u16;
}
#[repr(C)]
#[derive(Debug)]
pub struct ble_hs_adv_field {
pub length: u8,
pub type_: u8,
pub value: __IncompleteArrayField<u8>,
}
#[test]
fn bindgen_test_layout_ble_hs_adv_field() {
assert_eq!(
::core::mem::size_of::<ble_hs_adv_field>(),
2usize,
concat!("Size of: ", stringify!(ble_hs_adv_field))
);
assert_eq!(
::core::mem::align_of::<ble_hs_adv_field>(),
1usize,
concat!("Alignment of ", stringify!(ble_hs_adv_field))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_adv_field>())).length as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_adv_field),
"::",
stringify!(length)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_adv_field>())).type_ as *const _ as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_adv_field),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_adv_field>())).value as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_adv_field),
"::",
stringify!(value)
)
);
}
pub type ble_hs_adv_parse_func_t = ::core::option::Option<
unsafe extern "C" fn(arg1: *const ble_hs_adv_field, arg2: *mut cty::c_void) -> cty::c_int,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hs_adv_fields {
#[doc = " 0x01 - Flags."]
pub flags: u8,
#[doc = " 0x02,0x03 - 16-bit service class UUIDs."]
pub uuids16: *const ble_uuid16_t,
pub num_uuids16: u8,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
#[doc = " 0x04,0x05 - 32-bit service class UUIDs."]
pub uuids32: *const ble_uuid32_t,
pub num_uuids32: u8,
pub _bitfield_2: __BindgenBitfieldUnit<[u8; 1usize], u8>,
#[doc = " 0x06,0x07 - 128-bit service class UUIDs."]
pub uuids128: *const ble_uuid128_t,
pub num_uuids128: u8,
pub _bitfield_3: __BindgenBitfieldUnit<[u8; 1usize], u8>,
#[doc = " 0x08,0x09 - Local name."]
pub name: *const u8,
pub name_len: u8,
pub _bitfield_4: __BindgenBitfieldUnit<[u8; 1usize], u8>,
#[doc = " 0x0a - Tx power level."]
pub tx_pwr_lvl: i8,
pub _bitfield_5: __BindgenBitfieldUnit<[u8; 1usize], u8>,
#[doc = " 0x0d - Slave connection interval range."]
pub slave_itvl_range: *const u8,
#[doc = " 0x16 - Service data - 16-bit UUID."]
pub svc_data_uuid16: *const u8,
pub svc_data_uuid16_len: u8,
#[doc = " 0x17 - Public target address."]
pub public_tgt_addr: *const u8,
pub num_public_tgt_addrs: u8,
#[doc = " 0x19 - Appearance."]
pub appearance: u16,
pub _bitfield_6: __BindgenBitfieldUnit<[u8; 1usize], u8>,
#[doc = " 0x1a - Advertising interval."]
pub adv_itvl: u16,
pub _bitfield_7: __BindgenBitfieldUnit<[u8; 1usize], u8>,
#[doc = " 0x20 - Service data - 32-bit UUID."]
pub svc_data_uuid32: *const u8,
pub svc_data_uuid32_len: u8,
#[doc = " 0x21 - Service data - 128-bit UUID."]
pub svc_data_uuid128: *const u8,
pub svc_data_uuid128_len: u8,
#[doc = " 0x24 - URI."]
pub uri: *const u8,
pub uri_len: u8,
#[doc = " 0xff - Manufacturer specific data."]
pub mfg_data: *const u8,
pub mfg_data_len: u8,
}
#[test]
fn bindgen_test_layout_ble_hs_adv_fields() {
assert_eq!(
::core::mem::size_of::<ble_hs_adv_fields>(),
184usize,
concat!("Size of: ", stringify!(ble_hs_adv_fields))
);
assert_eq!(
::core::mem::align_of::<ble_hs_adv_fields>(),
8usize,
concat!("Alignment of ", stringify!(ble_hs_adv_fields))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_adv_fields>())).flags as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_adv_fields),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_adv_fields>())).uuids16 as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_adv_fields),
"::",
stringify!(uuids16)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_adv_fields>())).num_uuids16 as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_adv_fields),
"::",
stringify!(num_uuids16)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_adv_fields>())).uuids32 as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_adv_fields),
"::",
stringify!(uuids32)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_adv_fields>())).num_uuids32 as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_adv_fields),
"::",
stringify!(num_uuids32)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_adv_fields>())).uuids128 as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_adv_fields),
"::",
stringify!(uuids128)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_adv_fields>())).num_uuids128 as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_adv_fields),
"::",
stringify!(num_uuids128)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_adv_fields>())).name as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_adv_fields),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_adv_fields>())).name_len as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_adv_fields),
"::",
stringify!(name_len)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_adv_fields>())).tx_pwr_lvl as *const _ as usize },
66usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_adv_fields),
"::",
stringify!(tx_pwr_lvl)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hs_adv_fields>())).slave_itvl_range as *const _ as usize
},
72usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_adv_fields),
"::",
stringify!(slave_itvl_range)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hs_adv_fields>())).svc_data_uuid16 as *const _ as usize
},
80usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_adv_fields),
"::",
stringify!(svc_data_uuid16)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hs_adv_fields>())).svc_data_uuid16_len as *const _ as usize
},
88usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_adv_fields),
"::",
stringify!(svc_data_uuid16_len)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hs_adv_fields>())).public_tgt_addr as *const _ as usize
},
96usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_adv_fields),
"::",
stringify!(public_tgt_addr)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hs_adv_fields>())).num_public_tgt_addrs as *const _ as usize
},
104usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_adv_fields),
"::",
stringify!(num_public_tgt_addrs)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_adv_fields>())).appearance as *const _ as usize },
106usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_adv_fields),
"::",
stringify!(appearance)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_adv_fields>())).adv_itvl as *const _ as usize },
110usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_adv_fields),
"::",
stringify!(adv_itvl)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hs_adv_fields>())).svc_data_uuid32 as *const _ as usize
},
120usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_adv_fields),
"::",
stringify!(svc_data_uuid32)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hs_adv_fields>())).svc_data_uuid32_len as *const _ as usize
},
128usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_adv_fields),
"::",
stringify!(svc_data_uuid32_len)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hs_adv_fields>())).svc_data_uuid128 as *const _ as usize
},
136usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_adv_fields),
"::",
stringify!(svc_data_uuid128)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hs_adv_fields>())).svc_data_uuid128_len as *const _ as usize
},
144usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_adv_fields),
"::",
stringify!(svc_data_uuid128_len)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_adv_fields>())).uri as *const _ as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_adv_fields),
"::",
stringify!(uri)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_adv_fields>())).uri_len as *const _ as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_adv_fields),
"::",
stringify!(uri_len)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_adv_fields>())).mfg_data as *const _ as usize },
168usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_adv_fields),
"::",
stringify!(mfg_data)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_adv_fields>())).mfg_data_len as *const _ as usize },
176usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_adv_fields),
"::",
stringify!(mfg_data_len)
)
);
}
impl ble_hs_adv_fields {
#[inline]
pub fn uuids16_is_complete(&self) -> cty::c_uint {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
}
#[inline]
pub fn set_uuids16_is_complete(&mut self, val: cty::c_uint) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
uuids16_is_complete: cty::c_uint,
) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let uuids16_is_complete: u32 = unsafe { ::core::mem::transmute(uuids16_is_complete) };
uuids16_is_complete as u64
});
__bindgen_bitfield_unit
}
#[inline]
pub fn uuids32_is_complete(&self) -> cty::c_uint {
unsafe { ::core::mem::transmute(self._bitfield_2.get(0usize, 1u8) as u32) }
}
#[inline]
pub fn set_uuids32_is_complete(&mut self, val: cty::c_uint) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_2.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_2(
uuids32_is_complete: cty::c_uint,
) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let uuids32_is_complete: u32 = unsafe { ::core::mem::transmute(uuids32_is_complete) };
uuids32_is_complete as u64
});
__bindgen_bitfield_unit
}
#[inline]
pub fn uuids128_is_complete(&self) -> cty::c_uint {
unsafe { ::core::mem::transmute(self._bitfield_3.get(0usize, 1u8) as u32) }
}
#[inline]
pub fn set_uuids128_is_complete(&mut self, val: cty::c_uint) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_3.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_3(
uuids128_is_complete: cty::c_uint,
) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let uuids128_is_complete: u32 = unsafe { ::core::mem::transmute(uuids128_is_complete) };
uuids128_is_complete as u64
});
__bindgen_bitfield_unit
}
#[inline]
pub fn name_is_complete(&self) -> cty::c_uint {
unsafe { ::core::mem::transmute(self._bitfield_4.get(0usize, 1u8) as u32) }
}
#[inline]
pub fn set_name_is_complete(&mut self, val: cty::c_uint) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_4.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_4(
name_is_complete: cty::c_uint,
) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let name_is_complete: u32 = unsafe { ::core::mem::transmute(name_is_complete) };
name_is_complete as u64
});
__bindgen_bitfield_unit
}
#[inline]
pub fn tx_pwr_lvl_is_present(&self) -> cty::c_uint {
unsafe { ::core::mem::transmute(self._bitfield_5.get(0usize, 1u8) as u32) }
}
#[inline]
pub fn set_tx_pwr_lvl_is_present(&mut self, val: cty::c_uint) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_5.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_5(
tx_pwr_lvl_is_present: cty::c_uint,
) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let tx_pwr_lvl_is_present: u32 =
unsafe { ::core::mem::transmute(tx_pwr_lvl_is_present) };
tx_pwr_lvl_is_present as u64
});
__bindgen_bitfield_unit
}
#[inline]
pub fn appearance_is_present(&self) -> cty::c_uint {
unsafe { ::core::mem::transmute(self._bitfield_6.get(0usize, 1u8) as u32) }
}
#[inline]
pub fn set_appearance_is_present(&mut self, val: cty::c_uint) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_6.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_6(
appearance_is_present: cty::c_uint,
) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let appearance_is_present: u32 =
unsafe { ::core::mem::transmute(appearance_is_present) };
appearance_is_present as u64
});
__bindgen_bitfield_unit
}
#[inline]
pub fn adv_itvl_is_present(&self) -> cty::c_uint {
unsafe { ::core::mem::transmute(self._bitfield_7.get(0usize, 1u8) as u32) }
}
#[inline]
pub fn set_adv_itvl_is_present(&mut self, val: cty::c_uint) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_7.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_7(
adv_itvl_is_present: cty::c_uint,
) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let adv_itvl_is_present: u32 = unsafe { ::core::mem::transmute(adv_itvl_is_present) };
adv_itvl_is_present as u64
});
__bindgen_bitfield_unit
}
}
extern "C" {
pub fn ble_hs_adv_set_fields_mbuf(
adv_fields: *const ble_hs_adv_fields,
om: *mut os_mbuf,
) -> cty::c_int;
}
extern "C" {
pub fn ble_hs_adv_set_fields(
adv_fields: *const ble_hs_adv_fields,
dst: *mut u8,
dst_len: *mut u8,
max_len: u8,
) -> cty::c_int;
}
extern "C" {
pub fn ble_hs_adv_parse_fields(
adv_fields: *mut ble_hs_adv_fields,
src: *const u8,
src_len: u8,
) -> cty::c_int;
}
extern "C" {
pub fn ble_hs_adv_parse(
data: *const u8,
length: u8,
func: ble_hs_adv_parse_func_t,
user_data: *mut cty::c_void,
) -> cty::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hci_le_conn_complete {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hci_conn_update {
_unused: [u8; 0],
}
#[doc = " Connection security state"]
#[repr(C)]
#[repr(align(4))]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_sec_state {
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
pub __bindgen_padding_0: [u8; 3usize],
}
#[test]
fn bindgen_test_layout_ble_gap_sec_state() {
assert_eq!(
::core::mem::size_of::<ble_gap_sec_state>(),
4usize,
concat!("Size of: ", stringify!(ble_gap_sec_state))
);
assert_eq!(
::core::mem::align_of::<ble_gap_sec_state>(),
4usize,
concat!("Alignment of ", stringify!(ble_gap_sec_state))
);
}
impl ble_gap_sec_state {
#[inline]
pub fn encrypted(&self) -> cty::c_uint {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
}
#[inline]
pub fn set_encrypted(&mut self, val: cty::c_uint) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn authenticated(&self) -> cty::c_uint {
unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
}
#[inline]
pub fn set_authenticated(&mut self, val: cty::c_uint) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(1usize, 1u8, val as u64)
}
}
#[inline]
pub fn bonded(&self) -> cty::c_uint {
unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) }
}
#[inline]
pub fn set_bonded(&mut self, val: cty::c_uint) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(2usize, 1u8, val as u64)
}
}
#[inline]
pub fn key_size(&self) -> cty::c_uint {
unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 5u8) as u32) }
}
#[inline]
pub fn set_key_size(&mut self, val: cty::c_uint) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(3usize, 5u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
encrypted: cty::c_uint,
authenticated: cty::c_uint,
bonded: cty::c_uint,
key_size: cty::c_uint,
) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let encrypted: u32 = unsafe { ::core::mem::transmute(encrypted) };
encrypted as u64
});
__bindgen_bitfield_unit.set(1usize, 1u8, {
let authenticated: u32 = unsafe { ::core::mem::transmute(authenticated) };
authenticated as u64
});
__bindgen_bitfield_unit.set(2usize, 1u8, {
let bonded: u32 = unsafe { ::core::mem::transmute(bonded) };
bonded as u64
});
__bindgen_bitfield_unit.set(3usize, 5u8, {
let key_size: u32 = unsafe { ::core::mem::transmute(key_size) };
key_size as u64
});
__bindgen_bitfield_unit
}
}
#[doc = " Advertising parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_adv_params {
#[doc = " Advertising mode. Can be one of following constants:"]
#[doc = " - BLE_GAP_CONN_MODE_NON (non-connectable; 3.C.9.3.2)."]
#[doc = " - BLE_GAP_CONN_MODE_DIR (directed-connectable; 3.C.9.3.3)."]
#[doc = " - BLE_GAP_CONN_MODE_UND (undirected-connectable; 3.C.9.3.4)."]
pub conn_mode: u8,
#[doc = " Discoverable mode. Can be one of following constants:"]
#[doc = " - BLE_GAP_DISC_MODE_NON (non-discoverable; 3.C.9.2.2)."]
#[doc = " - BLE_GAP_DISC_MODE_LTD (limited-discoverable; 3.C.9.2.3)."]
#[doc = " - BLE_GAP_DISC_MODE_GEN (general-discoverable; 3.C.9.2.4)."]
pub disc_mode: u8,
#[doc = " Minimum advertising interval, if 0 stack use sane defaults"]
pub itvl_min: u16,
#[doc = " Maximum advertising interval, if 0 stack use sane defaults"]
pub itvl_max: u16,
#[doc = " Advertising channel map , if 0 stack use sane defaults"]
pub channel_map: u8,
#[doc = " Advertising Filter policy"]
pub filter_policy: u8,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
pub __bindgen_padding_0: u8,
}
#[test]
fn bindgen_test_layout_ble_gap_adv_params() {
assert_eq!(
::core::mem::size_of::<ble_gap_adv_params>(),
10usize,
concat!("Size of: ", stringify!(ble_gap_adv_params))
);
assert_eq!(
::core::mem::align_of::<ble_gap_adv_params>(),
2usize,
concat!("Alignment of ", stringify!(ble_gap_adv_params))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_adv_params>())).conn_mode as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_adv_params),
"::",
stringify!(conn_mode)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_adv_params>())).disc_mode as *const _ as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_adv_params),
"::",
stringify!(disc_mode)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_adv_params>())).itvl_min as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_adv_params),
"::",
stringify!(itvl_min)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_adv_params>())).itvl_max as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_adv_params),
"::",
stringify!(itvl_max)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_adv_params>())).channel_map as *const _ as usize },
6usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_adv_params),
"::",
stringify!(channel_map)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_adv_params>())).filter_policy as *const _ as usize
},
7usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_adv_params),
"::",
stringify!(filter_policy)
)
);
}
impl ble_gap_adv_params {
#[inline]
pub fn high_duty_cycle(&self) -> u8 {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
}
#[inline]
pub fn set_high_duty_cycle(&mut self, val: u8) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(high_duty_cycle: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let high_duty_cycle: u8 = unsafe { ::core::mem::transmute(high_duty_cycle) };
high_duty_cycle as u64
});
__bindgen_bitfield_unit
}
}
#[doc = " @brief Connection descriptor"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_conn_desc {
#[doc = " Connection security state"]
pub sec_state: ble_gap_sec_state,
#[doc = " Local identity address"]
pub our_id_addr: ble_addr_t,
#[doc = " Peer identity address"]
pub peer_id_addr: ble_addr_t,
#[doc = " Local over-the-air address"]
pub our_ota_addr: ble_addr_t,
#[doc = " Peer over-the-air address"]
pub peer_ota_addr: ble_addr_t,
#[doc = " Connection handle"]
pub conn_handle: u16,
#[doc = " Connection interval"]
pub conn_itvl: u16,
#[doc = " Connection latency"]
pub conn_latency: u16,
#[doc = " Connection supervision timeout"]
pub supervision_timeout: u16,
#[doc = " Connection Role"]
#[doc = " Possible values BLE_GAP_ROLE_SLAVE or BLE_GAP_ROLE_MASTER"]
pub role: u8,
#[doc = " Master clock accuracy"]
pub master_clock_accuracy: u8,
}
#[test]
fn bindgen_test_layout_ble_gap_conn_desc() {
assert_eq!(
::core::mem::size_of::<ble_gap_conn_desc>(),
44usize,
concat!("Size of: ", stringify!(ble_gap_conn_desc))
);
assert_eq!(
::core::mem::align_of::<ble_gap_conn_desc>(),
4usize,
concat!("Alignment of ", stringify!(ble_gap_conn_desc))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_conn_desc>())).sec_state as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_conn_desc),
"::",
stringify!(sec_state)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_conn_desc>())).our_id_addr as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_conn_desc),
"::",
stringify!(our_id_addr)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_conn_desc>())).peer_id_addr as *const _ as usize },
11usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_conn_desc),
"::",
stringify!(peer_id_addr)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_conn_desc>())).our_ota_addr as *const _ as usize },
18usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_conn_desc),
"::",
stringify!(our_ota_addr)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_conn_desc>())).peer_ota_addr as *const _ as usize
},
25usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_conn_desc),
"::",
stringify!(peer_ota_addr)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_conn_desc>())).conn_handle as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_conn_desc),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_conn_desc>())).conn_itvl as *const _ as usize },
34usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_conn_desc),
"::",
stringify!(conn_itvl)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_conn_desc>())).conn_latency as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_conn_desc),
"::",
stringify!(conn_latency)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_conn_desc>())).supervision_timeout as *const _ as usize
},
38usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_conn_desc),
"::",
stringify!(supervision_timeout)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_conn_desc>())).role as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_conn_desc),
"::",
stringify!(role)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_conn_desc>())).master_clock_accuracy as *const _
as usize
},
41usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_conn_desc),
"::",
stringify!(master_clock_accuracy)
)
);
}
#[doc = " @brief Connection parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_conn_params {
#[doc = " Scan interval in 0.625ms units"]
pub scan_itvl: u16,
#[doc = " Scan window in 0.625ms units"]
pub scan_window: u16,
#[doc = " Minimum value for connection interval in 1.25ms units"]
pub itvl_min: u16,
#[doc = " Maximum value for connection interval in 1.25ms units"]
pub itvl_max: u16,
#[doc = " Connection latency"]
pub latency: u16,
#[doc = " Supervision timeout in 10ms units"]
pub supervision_timeout: u16,
#[doc = " Minimum length of connection event in 0.625ms units"]
pub min_ce_len: u16,
#[doc = " Maximum length of connection event in 0.625ms units"]
pub max_ce_len: u16,
}
#[test]
fn bindgen_test_layout_ble_gap_conn_params() {
assert_eq!(
::core::mem::size_of::<ble_gap_conn_params>(),
16usize,
concat!("Size of: ", stringify!(ble_gap_conn_params))
);
assert_eq!(
::core::mem::align_of::<ble_gap_conn_params>(),
2usize,
concat!("Alignment of ", stringify!(ble_gap_conn_params))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_conn_params>())).scan_itvl as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_conn_params),
"::",
stringify!(scan_itvl)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_conn_params>())).scan_window as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_conn_params),
"::",
stringify!(scan_window)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_conn_params>())).itvl_min as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_conn_params),
"::",
stringify!(itvl_min)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_conn_params>())).itvl_max as *const _ as usize },
6usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_conn_params),
"::",
stringify!(itvl_max)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_conn_params>())).latency as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_conn_params),
"::",
stringify!(latency)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_conn_params>())).supervision_timeout as *const _
as usize
},
10usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_conn_params),
"::",
stringify!(supervision_timeout)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_conn_params>())).min_ce_len as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_conn_params),
"::",
stringify!(min_ce_len)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_conn_params>())).max_ce_len as *const _ as usize },
14usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_conn_params),
"::",
stringify!(max_ce_len)
)
);
}
#[doc = " @brief Extended discovery parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_ext_disc_params {
#[doc = " Scan interval in 0.625ms units"]
pub itvl: u16,
#[doc = " Scan window in 0.625ms units"]
pub window: u16,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
pub __bindgen_padding_0: u8,
}
#[test]
fn bindgen_test_layout_ble_gap_ext_disc_params() {
assert_eq!(
::core::mem::size_of::<ble_gap_ext_disc_params>(),
6usize,
concat!("Size of: ", stringify!(ble_gap_ext_disc_params))
);
assert_eq!(
::core::mem::align_of::<ble_gap_ext_disc_params>(),
2usize,
concat!("Alignment of ", stringify!(ble_gap_ext_disc_params))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_ext_disc_params>())).itvl as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_ext_disc_params),
"::",
stringify!(itvl)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_ext_disc_params>())).window as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_ext_disc_params),
"::",
stringify!(window)
)
);
}
impl ble_gap_ext_disc_params {
#[inline]
pub fn passive(&self) -> u8 {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
}
#[inline]
pub fn set_passive(&mut self, val: u8) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(passive: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let passive: u8 = unsafe { ::core::mem::transmute(passive) };
passive as u64
});
__bindgen_bitfield_unit
}
}
#[doc = " @brief Discovery parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_disc_params {
#[doc = " Scan interval in 0.625ms units"]
pub itvl: u16,
#[doc = " Scan window in 0.625ms units"]
pub window: u16,
#[doc = " Scan filter policy"]
pub filter_policy: u8,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
}
#[test]
fn bindgen_test_layout_ble_gap_disc_params() {
assert_eq!(
::core::mem::size_of::<ble_gap_disc_params>(),
6usize,
concat!("Size of: ", stringify!(ble_gap_disc_params))
);
assert_eq!(
::core::mem::align_of::<ble_gap_disc_params>(),
2usize,
concat!("Alignment of ", stringify!(ble_gap_disc_params))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_disc_params>())).itvl as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_disc_params),
"::",
stringify!(itvl)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_disc_params>())).window as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_disc_params),
"::",
stringify!(window)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_disc_params>())).filter_policy as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_disc_params),
"::",
stringify!(filter_policy)
)
);
}
impl ble_gap_disc_params {
#[inline]
pub fn limited(&self) -> u8 {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
}
#[inline]
pub fn set_limited(&mut self, val: u8) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn passive(&self) -> u8 {
unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) }
}
#[inline]
pub fn set_passive(&mut self, val: u8) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(1usize, 1u8, val as u64)
}
}
#[inline]
pub fn filter_duplicates(&self) -> u8 {
unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u8) }
}
#[inline]
pub fn set_filter_duplicates(&mut self, val: u8) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(2usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
limited: u8,
passive: u8,
filter_duplicates: u8,
) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let limited: u8 = unsafe { ::core::mem::transmute(limited) };
limited as u64
});
__bindgen_bitfield_unit.set(1usize, 1u8, {
let passive: u8 = unsafe { ::core::mem::transmute(passive) };
passive as u64
});
__bindgen_bitfield_unit.set(2usize, 1u8, {
let filter_duplicates: u8 = unsafe { ::core::mem::transmute(filter_duplicates) };
filter_duplicates as u64
});
__bindgen_bitfield_unit
}
}
#[doc = " @brief Connection parameters update parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_upd_params {
#[doc = " Minimum value for connection interval in 1.25ms units"]
pub itvl_min: u16,
#[doc = " Maximum value for connection interval in 1.25ms units"]
pub itvl_max: u16,
#[doc = " Connection latency"]
pub latency: u16,
#[doc = " Supervision timeout in 10ms units"]
pub supervision_timeout: u16,
#[doc = " Minimum length of connection event in 0.625ms units"]
pub min_ce_len: u16,
#[doc = " Maximum length of connection event in 0.625ms units"]
pub max_ce_len: u16,
}
#[test]
fn bindgen_test_layout_ble_gap_upd_params() {
assert_eq!(
::core::mem::size_of::<ble_gap_upd_params>(),
12usize,
concat!("Size of: ", stringify!(ble_gap_upd_params))
);
assert_eq!(
::core::mem::align_of::<ble_gap_upd_params>(),
2usize,
concat!("Alignment of ", stringify!(ble_gap_upd_params))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_upd_params>())).itvl_min as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_upd_params),
"::",
stringify!(itvl_min)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_upd_params>())).itvl_max as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_upd_params),
"::",
stringify!(itvl_max)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_upd_params>())).latency as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_upd_params),
"::",
stringify!(latency)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_upd_params>())).supervision_timeout as *const _ as usize
},
6usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_upd_params),
"::",
stringify!(supervision_timeout)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_upd_params>())).min_ce_len as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_upd_params),
"::",
stringify!(min_ce_len)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_upd_params>())).max_ce_len as *const _ as usize },
10usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_upd_params),
"::",
stringify!(max_ce_len)
)
);
}
#[doc = " @brief Passkey query"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_passkey_params {
#[doc = " Passkey action, can be one of following constants:"]
#[doc = " - BLE_SM_IOACT_NONE"]
#[doc = " - BLE_SM_IOACT_OOB"]
#[doc = " - BLE_SM_IOACT_INPUT"]
#[doc = " - BLE_SM_IOACT_DISP"]
#[doc = " - BLE_SM_IOACT_NUMCMP"]
pub action: u8,
#[doc = " Passkey to compare, valid for BLE_SM_IOACT_NUMCMP action"]
pub numcmp: u32,
}
#[test]
fn bindgen_test_layout_ble_gap_passkey_params() {
assert_eq!(
::core::mem::size_of::<ble_gap_passkey_params>(),
8usize,
concat!("Size of: ", stringify!(ble_gap_passkey_params))
);
assert_eq!(
::core::mem::align_of::<ble_gap_passkey_params>(),
4usize,
concat!("Alignment of ", stringify!(ble_gap_passkey_params))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_passkey_params>())).action as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_passkey_params),
"::",
stringify!(action)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_passkey_params>())).numcmp as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_passkey_params),
"::",
stringify!(numcmp)
)
);
}
#[doc = " @brief Advertising report"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_disc_desc {
#[doc = " Advertising PDU type. Can be one of following constants:"]
#[doc = " - BLE_HCI_ADV_RPT_EVTYPE_ADV_IND"]
#[doc = " - BLE_HCI_ADV_RPT_EVTYPE_DIR_IND"]
#[doc = " - BLE_HCI_ADV_RPT_EVTYPE_SCAN_IND"]
#[doc = " - BLE_HCI_ADV_RPT_EVTYPE_NONCONN_IND"]
#[doc = " - BLE_HCI_ADV_RPT_EVTYPE_SCAN_RSP"]
pub event_type: u8,
#[doc = " Advertising Data length"]
pub length_data: u8,
#[doc = " Advertiser address"]
pub addr: ble_addr_t,
#[doc = " Received signal strength indication in dBm (127 if unavailable)"]
pub rssi: i8,
#[doc = " Advertising data"]
pub data: *const u8,
#[doc = " Directed advertising address. Valid for BLE_HCI_ADV_RPT_EVTYPE_DIR_IND"]
#[doc = " event type (BLE_ADDR_ANY otherwise)."]
pub direct_addr: ble_addr_t,
}
#[test]
fn bindgen_test_layout_ble_gap_disc_desc() {
assert_eq!(
::core::mem::size_of::<ble_gap_disc_desc>(),
32usize,
concat!("Size of: ", stringify!(ble_gap_disc_desc))
);
assert_eq!(
::core::mem::align_of::<ble_gap_disc_desc>(),
8usize,
concat!("Alignment of ", stringify!(ble_gap_disc_desc))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_disc_desc>())).event_type as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_disc_desc),
"::",
stringify!(event_type)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_disc_desc>())).length_data as *const _ as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_disc_desc),
"::",
stringify!(length_data)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_disc_desc>())).addr as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_disc_desc),
"::",
stringify!(addr)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_disc_desc>())).rssi as *const _ as usize },
9usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_disc_desc),
"::",
stringify!(rssi)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_disc_desc>())).data as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_disc_desc),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_disc_desc>())).direct_addr as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_disc_desc),
"::",
stringify!(direct_addr)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_repeat_pairing {
#[doc = " The handle of the relevant connection."]
pub conn_handle: u16,
#[doc = " Properties of the existing bond."]
pub cur_key_size: u8,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
#[doc = " Properties of the imminent secure link if the pairing procedure is"]
#[doc = " allowed to continue."]
pub new_key_size: u8,
pub _bitfield_2: __BindgenBitfieldUnit<[u8; 1usize], u8>,
}
#[test]
fn bindgen_test_layout_ble_gap_repeat_pairing() {
assert_eq!(
::core::mem::size_of::<ble_gap_repeat_pairing>(),
6usize,
concat!("Size of: ", stringify!(ble_gap_repeat_pairing))
);
assert_eq!(
::core::mem::align_of::<ble_gap_repeat_pairing>(),
2usize,
concat!("Alignment of ", stringify!(ble_gap_repeat_pairing))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_repeat_pairing>())).conn_handle as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_repeat_pairing),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_repeat_pairing>())).cur_key_size as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_repeat_pairing),
"::",
stringify!(cur_key_size)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_repeat_pairing>())).new_key_size as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_repeat_pairing),
"::",
stringify!(new_key_size)
)
);
}
impl ble_gap_repeat_pairing {
#[inline]
pub fn cur_authenticated(&self) -> u8 {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
}
#[inline]
pub fn set_cur_authenticated(&mut self, val: u8) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn cur_sc(&self) -> u8 {
unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) }
}
#[inline]
pub fn set_cur_sc(&mut self, val: u8) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(1usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
cur_authenticated: u8,
cur_sc: u8,
) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let cur_authenticated: u8 = unsafe { ::core::mem::transmute(cur_authenticated) };
cur_authenticated as u64
});
__bindgen_bitfield_unit.set(1usize, 1u8, {
let cur_sc: u8 = unsafe { ::core::mem::transmute(cur_sc) };
cur_sc as u64
});
__bindgen_bitfield_unit
}
#[inline]
pub fn new_authenticated(&self) -> u8 {
unsafe { ::core::mem::transmute(self._bitfield_2.get(0usize, 1u8) as u8) }
}
#[inline]
pub fn set_new_authenticated(&mut self, val: u8) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_2.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_sc(&self) -> u8 {
unsafe { ::core::mem::transmute(self._bitfield_2.get(1usize, 1u8) as u8) }
}
#[inline]
pub fn set_new_sc(&mut self, val: u8) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_2.set(1usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bonding(&self) -> u8 {
unsafe { ::core::mem::transmute(self._bitfield_2.get(2usize, 1u8) as u8) }
}
#[inline]
pub fn set_new_bonding(&mut self, val: u8) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_2.set(2usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_2(
new_authenticated: u8,
new_sc: u8,
new_bonding: u8,
) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let new_authenticated: u8 = unsafe { ::core::mem::transmute(new_authenticated) };
new_authenticated as u64
});
__bindgen_bitfield_unit.set(1usize, 1u8, {
let new_sc: u8 = unsafe { ::core::mem::transmute(new_sc) };
new_sc as u64
});
__bindgen_bitfield_unit.set(2usize, 1u8, {
let new_bonding: u8 = unsafe { ::core::mem::transmute(new_bonding) };
new_bonding as u64
});
__bindgen_bitfield_unit
}
}
#[doc = " Represents a GAP-related event. When such an event occurs, the host"]
#[doc = " notifies the application by passing an instance of this structure to an"]
#[doc = " application-specified callback."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ble_gap_event {
#[doc = " Indicates the type of GAP event that occurred. This is one of the"]
#[doc = " BLE_GAP_EVENT codes."]
pub type_: u8,
pub __bindgen_anon_1: ble_gap_event__bindgen_ty_1,
}
#[doc = " A discriminated union containing additional details concerning the GAP"]
#[doc = " event. The 'type' field indicates which member of the union is valid."]
#[repr(C)]
#[derive(Copy, Clone)]
pub union ble_gap_event__bindgen_ty_1 {
pub connect: ble_gap_event__bindgen_ty_1__bindgen_ty_1,
pub disconnect: ble_gap_event__bindgen_ty_1__bindgen_ty_2,
#[doc = " Represents an advertising report received during a discovery"]
#[doc = " procedure. Valid for the following event types:"]
#[doc = " o BLE_GAP_EVENT_DISC"]
pub disc: ble_gap_disc_desc,
pub disc_complete: ble_gap_event__bindgen_ty_1__bindgen_ty_3,
pub adv_complete: ble_gap_event__bindgen_ty_1__bindgen_ty_4,
pub conn_update: ble_gap_event__bindgen_ty_1__bindgen_ty_5,
pub conn_update_req: ble_gap_event__bindgen_ty_1__bindgen_ty_6,
pub term_failure: ble_gap_event__bindgen_ty_1__bindgen_ty_7,
pub enc_change: ble_gap_event__bindgen_ty_1__bindgen_ty_8,
pub passkey: ble_gap_event__bindgen_ty_1__bindgen_ty_9,
pub notify_rx: ble_gap_event__bindgen_ty_1__bindgen_ty_10,
pub notify_tx: ble_gap_event__bindgen_ty_1__bindgen_ty_11,
pub subscribe: ble_gap_event__bindgen_ty_1__bindgen_ty_12,
pub mtu: ble_gap_event__bindgen_ty_1__bindgen_ty_13,
pub identity_resolved: ble_gap_event__bindgen_ty_1__bindgen_ty_14,
#[doc = " Represents a peer's attempt to pair despite a bond already existing."]
#[doc = " The application has two options for handling this event type:"]
#[doc = " o Retry: Return BLE_GAP_REPEAT_PAIRING_RETRY after deleting the"]
#[doc = " conflicting bond. The stack will verify the bond has"]
#[doc = " been deleted and continue the pairing procedure. If"]
#[doc = " the bond is still present, this event will be reported"]
#[doc = " again."]
#[doc = " o Ignore: Return BLE_GAP_REPEAT_PAIRING_IGNORE. The stack will"]
#[doc = " silently ignore the pairing request."]
#[doc = ""]
#[doc = " Valid for the following event types:"]
#[doc = " o BLE_GAP_EVENT_REPEAT_PAIRING"]
pub repeat_pairing: ble_gap_repeat_pairing,
pub phy_updated: ble_gap_event__bindgen_ty_1__bindgen_ty_15,
_bindgen_union_align: [u64; 6usize],
}
#[doc = " Represents a connection attempt. Valid for the following event"]
#[doc = " types:"]
#[doc = " o BLE_GAP_EVENT_CONNECT"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_event__bindgen_ty_1__bindgen_ty_1 {
#[doc = " The status of the connection attempt;"]
#[doc = " o 0: the connection was successfully established."]
#[doc = " o BLE host error code: the connection attempt failed for"]
#[doc = " the specified reason."]
pub status: cty::c_int,
#[doc = " The handle of the relevant connection."]
pub conn_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_gap_event__bindgen_ty_1__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::core::mem::align_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_1>(),
4usize,
concat!(
"Alignment of ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_1>())).status
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_1>())).conn_handle
as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(conn_handle)
)
);
}
#[doc = " Represents a terminated connection. Valid for the following event"]
#[doc = " types:"]
#[doc = " o BLE_GAP_EVENT_DISCONNECT"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_event__bindgen_ty_1__bindgen_ty_2 {
#[doc = " A BLE host return code indicating the reason for the"]
#[doc = " disconnect."]
pub reason: cty::c_int,
#[doc = " Information about the connection prior to termination."]
pub conn: ble_gap_conn_desc,
}
#[test]
fn bindgen_test_layout_ble_gap_event__bindgen_ty_1__bindgen_ty_2() {
assert_eq!(
::core::mem::size_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_2>(),
48usize,
concat!(
"Size of: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
::core::mem::align_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_2>(),
4usize,
concat!(
"Alignment of ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_2>())).reason
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(reason)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_2>())).conn as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(conn)
)
);
}
#[doc = " Represents a completed discovery procedure. Valid for the following"]
#[doc = " event types:"]
#[doc = " o BLE_GAP_EVENT_DISC_COMPLETE"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_event__bindgen_ty_1__bindgen_ty_3 {
#[doc = " The reason the discovery procedure stopped. Typical reason"]
#[doc = " codes are:"]
#[doc = " o 0: Duration expired."]
#[doc = " o BLE_HS_EPREEMPTED: Host aborted procedure to configure a"]
#[doc = " peer's identity."]
pub reason: cty::c_int,
}
#[test]
fn bindgen_test_layout_ble_gap_event__bindgen_ty_1__bindgen_ty_3() {
assert_eq!(
::core::mem::size_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_3>(),
4usize,
concat!(
"Size of: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
::core::mem::align_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_3>(),
4usize,
concat!(
"Alignment of ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_3>())).reason
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(reason)
)
);
}
#[doc = " Represents a completed advertise procedure. Valid for the following"]
#[doc = " event types:"]
#[doc = " o BLE_GAP_EVENT_ADV_COMPLETE"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_event__bindgen_ty_1__bindgen_ty_4 {
#[doc = " The reason the advertise procedure stopped. Typical reason"]
#[doc = " codes are:"]
#[doc = " o 0: Terminated due to connection."]
#[doc = " o BLE_HS_ETIMEOUT: Duration expired."]
#[doc = " o BLE_HS_EPREEMPTED: Host aborted procedure to configure a"]
#[doc = " peer's identity."]
pub reason: cty::c_int,
}
#[test]
fn bindgen_test_layout_ble_gap_event__bindgen_ty_1__bindgen_ty_4() {
assert_eq!(
::core::mem::size_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_4>(),
4usize,
concat!(
"Size of: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_4)
)
);
assert_eq!(
::core::mem::align_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_4>(),
4usize,
concat!(
"Alignment of ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_4)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_4>())).reason
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_4),
"::",
stringify!(reason)
)
);
}
#[doc = " Represents an attempt to update a connection's parameters. If the"]
#[doc = " attempt was successful, the connection's descriptor reflects the"]
#[doc = " updated parameters."]
#[doc = ""]
#[doc = " Valid for the following event types:"]
#[doc = " o BLE_GAP_EVENT_CONN_UPDATE"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_event__bindgen_ty_1__bindgen_ty_5 {
#[doc = " The result of the connection update attempt;"]
#[doc = " o 0: the connection was successfully updated."]
#[doc = " o BLE host error code: the connection update attempt failed"]
#[doc = " for the specified reason."]
pub status: cty::c_int,
#[doc = " The handle of the relevant connection."]
pub conn_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_gap_event__bindgen_ty_1__bindgen_ty_5() {
assert_eq!(
::core::mem::size_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_5>(),
8usize,
concat!(
"Size of: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_5)
)
);
assert_eq!(
::core::mem::align_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_5>(),
4usize,
concat!(
"Alignment of ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_5)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_5>())).status
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_5),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_5>())).conn_handle
as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_5),
"::",
stringify!(conn_handle)
)
);
}
#[doc = " Represents a peer's request to update the connection parameters."]
#[doc = " This event is generated when a peer performs any of the following"]
#[doc = " procedures:"]
#[doc = " o L2CAP Connection Parameter Update Procedure"]
#[doc = " o Link-Layer Connection Parameters Request Procedure"]
#[doc = ""]
#[doc = " To reject the request, return a non-zero HCI error code. The value"]
#[doc = " returned is the reject reason given to the controller."]
#[doc = ""]
#[doc = " Valid for the following event types:"]
#[doc = " o BLE_GAP_EVENT_L2CAP_UPDATE_REQ"]
#[doc = " o BLE_GAP_EVENT_CONN_UPDATE_REQ"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_event__bindgen_ty_1__bindgen_ty_6 {
#[doc = " Indicates the connection parameters that the peer would like to"]
#[doc = " use."]
pub peer_params: *const ble_gap_upd_params,
#[doc = " Indicates the connection parameters that the local device would"]
#[doc = " like to use. The application callback should fill this in. By"]
#[doc = " default, this struct contains the requested parameters (i.e.,"]
#[doc = " it is a copy of 'peer_params')."]
pub self_params: *mut ble_gap_upd_params,
#[doc = " The handle of the relevant connection."]
pub conn_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_gap_event__bindgen_ty_1__bindgen_ty_6() {
assert_eq!(
::core::mem::size_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_6>(),
24usize,
concat!(
"Size of: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_6)
)
);
assert_eq!(
::core::mem::align_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_6>(),
8usize,
concat!(
"Alignment of ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_6)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_6>())).peer_params
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_6),
"::",
stringify!(peer_params)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_6>())).self_params
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_6),
"::",
stringify!(self_params)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_6>())).conn_handle
as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_6),
"::",
stringify!(conn_handle)
)
);
}
#[doc = " Represents a failed attempt to terminate an established connection."]
#[doc = " Valid for the following event types:"]
#[doc = " o BLE_GAP_EVENT_TERM_FAILURE"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_event__bindgen_ty_1__bindgen_ty_7 {
#[doc = " A BLE host return code indicating the reason for the failure."]
pub status: cty::c_int,
#[doc = " The handle of the relevant connection."]
pub conn_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_gap_event__bindgen_ty_1__bindgen_ty_7() {
assert_eq!(
::core::mem::size_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_7>(),
8usize,
concat!(
"Size of: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_7)
)
);
assert_eq!(
::core::mem::align_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_7>(),
4usize,
concat!(
"Alignment of ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_7)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_7>())).status
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_7),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_7>())).conn_handle
as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_7),
"::",
stringify!(conn_handle)
)
);
}
#[doc = " Represents an attempt to change the encrypted state of a"]
#[doc = " connection. If the attempt was successful, the connection"]
#[doc = " descriptor reflects the updated encrypted state."]
#[doc = ""]
#[doc = " Valid for the following event types:"]
#[doc = " o BLE_GAP_EVENT_ENC_CHANGE"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_event__bindgen_ty_1__bindgen_ty_8 {
#[doc = " Indicates the result of the encryption state change attempt;"]
#[doc = " o 0: the encrypted state was successfully updated;"]
#[doc = " o BLE host error code: the encryption state change attempt"]
#[doc = " failed for the specified reason."]
pub status: cty::c_int,
#[doc = " The handle of the relevant connection."]
pub conn_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_gap_event__bindgen_ty_1__bindgen_ty_8() {
assert_eq!(
::core::mem::size_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_8>(),
8usize,
concat!(
"Size of: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_8)
)
);
assert_eq!(
::core::mem::align_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_8>(),
4usize,
concat!(
"Alignment of ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_8)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_8>())).status
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_8),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_8>())).conn_handle
as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_8),
"::",
stringify!(conn_handle)
)
);
}
#[doc = " Represents a passkey query needed to complete a pairing procedure."]
#[doc = ""]
#[doc = " Valid for the following event types:"]
#[doc = " o BLE_GAP_EVENT_PASSKEY_ACTION"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_event__bindgen_ty_1__bindgen_ty_9 {
#[doc = " Contains details about the passkey query."]
pub params: ble_gap_passkey_params,
#[doc = " The handle of the relevant connection."]
pub conn_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_gap_event__bindgen_ty_1__bindgen_ty_9() {
assert_eq!(
::core::mem::size_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_9>(),
12usize,
concat!(
"Size of: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_9)
)
);
assert_eq!(
::core::mem::align_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_9>(),
4usize,
concat!(
"Alignment of ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_9)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_9>())).params
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_9),
"::",
stringify!(params)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_9>())).conn_handle
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_9),
"::",
stringify!(conn_handle)
)
);
}
#[doc = " Represents a received ATT notification or indication."]
#[doc = ""]
#[doc = " Valid for the following event types:"]
#[doc = " o BLE_GAP_EVENT_NOTIFY_RX"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_event__bindgen_ty_1__bindgen_ty_10 {
#[doc = " The contents of the notification or indication. If the"]
#[doc = " application wishes to retain this mbuf for later use, it must"]
#[doc = " set this pointer to NULL to prevent the stack from freeing it."]
pub om: *mut os_mbuf,
#[doc = " The handle of the relevant ATT attribute."]
pub attr_handle: u16,
#[doc = " The handle of the relevant connection."]
pub conn_handle: u16,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
pub __bindgen_padding_0: [u8; 3usize],
}
#[test]
fn bindgen_test_layout_ble_gap_event__bindgen_ty_1__bindgen_ty_10() {
assert_eq!(
::core::mem::size_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_10>(),
16usize,
concat!(
"Size of: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_10)
)
);
assert_eq!(
::core::mem::align_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_10>(),
8usize,
concat!(
"Alignment of ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_10)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_10>())).om as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_10),
"::",
stringify!(om)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_10>())).attr_handle
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_10),
"::",
stringify!(attr_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_10>())).conn_handle
as *const _ as usize
},
10usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_10),
"::",
stringify!(conn_handle)
)
);
}
impl ble_gap_event__bindgen_ty_1__bindgen_ty_10 {
#[inline]
pub fn indication(&self) -> u8 {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
}
#[inline]
pub fn set_indication(&mut self, val: u8) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(indication: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let indication: u8 = unsafe { ::core::mem::transmute(indication) };
indication as u64
});
__bindgen_bitfield_unit
}
}
#[doc = " Represents a transmitted ATT notification or indication, or a"]
#[doc = " completed indication transaction."]
#[doc = ""]
#[doc = " Valid for the following event types:"]
#[doc = " o BLE_GAP_EVENT_NOTIFY_TX"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_event__bindgen_ty_1__bindgen_ty_11 {
#[doc = " The status of the notification or indication transaction;"]
#[doc = " o 0: Command successfully sent;"]
#[doc = " o BLE_HS_EDONE: Confirmation (indication ack) received;"]
#[doc = " o BLE_HS_ETIMEOUT: Confirmation (indication ack) never"]
#[doc = " received;"]
#[doc = " o Other return code: Error."]
pub status: cty::c_int,
#[doc = " The handle of the relevant connection."]
pub conn_handle: u16,
#[doc = " The handle of the relevant characteristic value."]
pub attr_handle: u16,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
pub __bindgen_padding_0: [u8; 3usize],
}
#[test]
fn bindgen_test_layout_ble_gap_event__bindgen_ty_1__bindgen_ty_11() {
assert_eq!(
::core::mem::size_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_11>(),
12usize,
concat!(
"Size of: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_11)
)
);
assert_eq!(
::core::mem::align_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_11>(),
4usize,
concat!(
"Alignment of ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_11)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_11>())).status
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_11),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_11>())).conn_handle
as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_11),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_11>())).attr_handle
as *const _ as usize
},
6usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_11),
"::",
stringify!(attr_handle)
)
);
}
impl ble_gap_event__bindgen_ty_1__bindgen_ty_11 {
#[inline]
pub fn indication(&self) -> u8 {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
}
#[inline]
pub fn set_indication(&mut self, val: u8) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(indication: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let indication: u8 = unsafe { ::core::mem::transmute(indication) };
indication as u64
});
__bindgen_bitfield_unit
}
}
#[doc = " Represents a state change in a peer's subscription status. In this"]
#[doc = " comment, the term \"update\" is used to refer to either a notification"]
#[doc = " or an indication. This event is triggered by any of the following"]
#[doc = " occurrences:"]
#[doc = " o Peer enables or disables updates via a CCCD write."]
#[doc = " o Connection is about to be terminated and the peer is"]
#[doc = " subscribed to updates."]
#[doc = " o Peer is now subscribed to updates after its state was restored"]
#[doc = " from persistence. This happens when bonding is restored."]
#[doc = ""]
#[doc = " Valid for the following event types:"]
#[doc = " o BLE_GAP_EVENT_SUBSCRIBE"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_event__bindgen_ty_1__bindgen_ty_12 {
#[doc = " The handle of the relevant connection."]
pub conn_handle: u16,
#[doc = " The value handle of the relevant characteristic."]
pub attr_handle: u16,
#[doc = " One of the BLE_GAP_SUBSCRIBE_REASON codes."]
pub reason: u8,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
}
#[test]
fn bindgen_test_layout_ble_gap_event__bindgen_ty_1__bindgen_ty_12() {
assert_eq!(
::core::mem::size_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_12>(),
6usize,
concat!(
"Size of: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_12)
)
);
assert_eq!(
::core::mem::align_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_12>(),
2usize,
concat!(
"Alignment of ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_12)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_12>())).conn_handle
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_12),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_12>())).attr_handle
as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_12),
"::",
stringify!(attr_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_12>())).reason
as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_12),
"::",
stringify!(reason)
)
);
}
impl ble_gap_event__bindgen_ty_1__bindgen_ty_12 {
#[inline]
pub fn prev_notify(&self) -> u8 {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
}
#[inline]
pub fn set_prev_notify(&mut self, val: u8) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn cur_notify(&self) -> u8 {
unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) }
}
#[inline]
pub fn set_cur_notify(&mut self, val: u8) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(1usize, 1u8, val as u64)
}
}
#[inline]
pub fn prev_indicate(&self) -> u8 {
unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u8) }
}
#[inline]
pub fn set_prev_indicate(&mut self, val: u8) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(2usize, 1u8, val as u64)
}
}
#[inline]
pub fn cur_indicate(&self) -> u8 {
unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) }
}
#[inline]
pub fn set_cur_indicate(&mut self, val: u8) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(3usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
prev_notify: u8,
cur_notify: u8,
prev_indicate: u8,
cur_indicate: u8,
) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let prev_notify: u8 = unsafe { ::core::mem::transmute(prev_notify) };
prev_notify as u64
});
__bindgen_bitfield_unit.set(1usize, 1u8, {
let cur_notify: u8 = unsafe { ::core::mem::transmute(cur_notify) };
cur_notify as u64
});
__bindgen_bitfield_unit.set(2usize, 1u8, {
let prev_indicate: u8 = unsafe { ::core::mem::transmute(prev_indicate) };
prev_indicate as u64
});
__bindgen_bitfield_unit.set(3usize, 1u8, {
let cur_indicate: u8 = unsafe { ::core::mem::transmute(cur_indicate) };
cur_indicate as u64
});
__bindgen_bitfield_unit
}
}
#[doc = " Represents a change in an L2CAP channel's MTU."]
#[doc = ""]
#[doc = " Valid for the following event types:"]
#[doc = " o BLE_GAP_EVENT_MTU"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_event__bindgen_ty_1__bindgen_ty_13 {
#[doc = " The handle of the relevant connection."]
pub conn_handle: u16,
#[doc = " Indicates the channel whose MTU has been updated; either"]
#[doc = " BLE_L2CAP_CID_ATT or the ID of a connection-oriented channel."]
pub channel_id: u16,
pub value: u16,
}
#[test]
fn bindgen_test_layout_ble_gap_event__bindgen_ty_1__bindgen_ty_13() {
assert_eq!(
::core::mem::size_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_13>(),
6usize,
concat!(
"Size of: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_13)
)
);
assert_eq!(
::core::mem::align_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_13>(),
2usize,
concat!(
"Alignment of ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_13)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_13>())).conn_handle
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_13),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_13>())).channel_id
as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_13),
"::",
stringify!(channel_id)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_13>())).value
as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_13),
"::",
stringify!(value)
)
);
}
#[doc = " Represents a change in peer's identity. This is issued after"]
#[doc = " successful pairing when Identity Address Information was received."]
#[doc = ""]
#[doc = " Valid for the following event types:"]
#[doc = " o BLE_GAP_EVENT_IDENTITY_RESOLVED"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_event__bindgen_ty_1__bindgen_ty_14 {
#[doc = " The handle of the relevant connection."]
pub conn_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_gap_event__bindgen_ty_1__bindgen_ty_14() {
assert_eq!(
::core::mem::size_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_14>(),
2usize,
concat!(
"Size of: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_14)
)
);
assert_eq!(
::core::mem::align_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_14>(),
2usize,
concat!(
"Alignment of ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_14)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_14>())).conn_handle
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_14),
"::",
stringify!(conn_handle)
)
);
}
#[doc = " Represents a change of PHY. This is issue after successful"]
#[doc = " change on PHY."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_event__bindgen_ty_1__bindgen_ty_15 {
pub status: cty::c_int,
pub conn_handle: u16,
#[doc = " Indicates enabled TX/RX PHY. Possible values:"]
#[doc = " o BLE_GAP_LE_PHY_1M"]
#[doc = " o BLE_GAP_LE_PHY_2M"]
#[doc = " o BLE_GAP_LE_PHY_CODED"]
pub tx_phy: u8,
pub rx_phy: u8,
}
#[test]
fn bindgen_test_layout_ble_gap_event__bindgen_ty_1__bindgen_ty_15() {
assert_eq!(
::core::mem::size_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_15>(),
8usize,
concat!(
"Size of: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_15)
)
);
assert_eq!(
::core::mem::align_of::<ble_gap_event__bindgen_ty_1__bindgen_ty_15>(),
4usize,
concat!(
"Alignment of ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_15)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_15>())).status
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_15),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_15>())).conn_handle
as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_15),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_15>())).tx_phy
as *const _ as usize
},
6usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_15),
"::",
stringify!(tx_phy)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1__bindgen_ty_15>())).rx_phy
as *const _ as usize
},
7usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1__bindgen_ty_15),
"::",
stringify!(rx_phy)
)
);
}
#[test]
fn bindgen_test_layout_ble_gap_event__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<ble_gap_event__bindgen_ty_1>(),
48usize,
concat!("Size of: ", stringify!(ble_gap_event__bindgen_ty_1))
);
assert_eq!(
::core::mem::align_of::<ble_gap_event__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(ble_gap_event__bindgen_ty_1))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1>())).connect as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1),
"::",
stringify!(connect)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1>())).disconnect as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1),
"::",
stringify!(disconnect)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1>())).disc as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1),
"::",
stringify!(disc)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1>())).disc_complete as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1),
"::",
stringify!(disc_complete)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1>())).adv_complete as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1),
"::",
stringify!(adv_complete)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1>())).conn_update as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1),
"::",
stringify!(conn_update)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1>())).conn_update_req as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1),
"::",
stringify!(conn_update_req)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1>())).term_failure as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1),
"::",
stringify!(term_failure)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1>())).enc_change as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1),
"::",
stringify!(enc_change)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1>())).passkey as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1),
"::",
stringify!(passkey)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1>())).notify_rx as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1),
"::",
stringify!(notify_rx)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1>())).notify_tx as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1),
"::",
stringify!(notify_tx)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1>())).subscribe as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1),
"::",
stringify!(subscribe)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1>())).mtu as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1),
"::",
stringify!(mtu)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1>())).identity_resolved as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1),
"::",
stringify!(identity_resolved)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1>())).repeat_pairing as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1),
"::",
stringify!(repeat_pairing)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event__bindgen_ty_1>())).phy_updated as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event__bindgen_ty_1),
"::",
stringify!(phy_updated)
)
);
}
#[test]
fn bindgen_test_layout_ble_gap_event() {
assert_eq!(
::core::mem::size_of::<ble_gap_event>(),
56usize,
concat!("Size of: ", stringify!(ble_gap_event))
);
assert_eq!(
::core::mem::align_of::<ble_gap_event>(),
8usize,
concat!("Alignment of ", stringify!(ble_gap_event))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_event>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event),
"::",
stringify!(type_)
)
);
}
pub type ble_gap_event_fn = ::core::option::Option<
unsafe extern "C" fn(event: *mut ble_gap_event, arg: *mut cty::c_void) -> cty::c_int,
>;
extern "C" {
#[doc = " Searches for a connection with the specified handle. If a matching"]
#[doc = " connection is found, the supplied connection descriptor is filled"]
#[doc = " correspondingly."]
#[doc = ""]
#[doc = " @param handle The connection handle to search for."]
#[doc = " @param out_desc On success, this is populated with information relating to"]
#[doc = " the matching connection. Pass NULL if you don't need this"]
#[doc = " information."]
#[doc = ""]
#[doc = " @return 0 on success, BLE_HS_ENOTCONN if no matching connection was"]
#[doc = " found."]
pub fn ble_gap_conn_find(handle: u16, out_desc: *mut ble_gap_conn_desc) -> cty::c_int;
}
extern "C" {
#[doc = " Searches for a connection with a peer with the specified address."]
#[doc = " If a matching connection is found, the supplied connection descriptor"]
#[doc = " is filled correspondingly."]
#[doc = ""]
#[doc = " @param addr The ble address of a connected peer device to search for."]
#[doc = " @param out_desc On success, this is populated with information relating to"]
#[doc = " the matching connection. Pass NULL if you don't need this"]
#[doc = " information."]
#[doc = ""]
#[doc = " @return 0 on success, BLE_HS_ENOTCONN if no matching connection was"]
#[doc = " found."]
pub fn ble_gap_conn_find_by_addr(
addr: *const ble_addr_t,
out_desc: *mut ble_gap_conn_desc,
) -> cty::c_int;
}
extern "C" {
#[doc = " Configures a connection to use the specified GAP event callback. A"]
#[doc = " connection's GAP event callback is first specified when the connection is"]
#[doc = " created, either via advertising or initiation. This function replaces the"]
#[doc = " callback that was last configured."]
#[doc = ""]
#[doc = " @param conn_handle The handle of the connection to configure."]
#[doc = " @param cb The callback to associate with the connection."]
#[doc = " @param cb_arg An optional argument that the callback receives."]
#[doc = ""]
#[doc = " @return 0 on success, BLE_HS_ENOTCONN if there is no connection"]
#[doc = " with the specified handle."]
pub fn ble_gap_set_event_cb(
conn_handle: u16,
cb: ble_gap_event_fn,
cb_arg: *mut cty::c_void,
) -> cty::c_int;
}
extern "C" {
#[doc = " @brief Start advertising"]
#[doc = ""]
#[doc = " This function configures and start advertising procedure."]
#[doc = ""]
#[doc = " @param own_addr_type The type of address the stack should use for itself."]
#[doc = " Valid values are:"]
#[doc = " - BLE_OWN_ADDR_PUBLIC"]
#[doc = " - BLE_OWN_ADDR_RANDOM"]
#[doc = " - BLE_OWN_ADDR_RPA_PUBLIC_DEFAULT"]
#[doc = " - BLE_OWN_ADDR_RPA_RANDOM_DEFAULT"]
#[doc = " @param direct_addr The peer's address for directed advertising. This"]
#[doc = " parameter shall be non-NULL if directed advertising is"]
#[doc = " being used."]
#[doc = " @param duration_ms The duration of the advertisement procedure. On"]
#[doc = " expiration, the procedure ends and a"]
#[doc = " BLE_GAP_EVENT_ADV_COMPLETE event is reported. Units are"]
#[doc = " milliseconds. Specify BLE_HS_FOREVER for no expiration."]
#[doc = " @param adv_params Additional arguments specifying the particulars of the"]
#[doc = " advertising procedure."]
#[doc = " @param cb The callback to associate with this advertising"]
#[doc = " procedure. If advertising ends, the event is reported"]
#[doc = " through this callback. If advertising results in a"]
#[doc = " connection, the connection inherits this callback as its"]
#[doc = " event-reporting mechanism."]
#[doc = " @param cb_arg The optional argument to pass to the callback function."]
#[doc = ""]
#[doc = " @return 0 on success, error code on failure."]
pub fn ble_gap_adv_start(
own_addr_type: u8,
direct_addr: *const ble_addr_t,
duration_ms: i32,
adv_params: *const ble_gap_adv_params,
cb: ble_gap_event_fn,
cb_arg: *mut cty::c_void,
) -> cty::c_int;
}
extern "C" {
#[doc = " Stops the currently-active advertising procedure. A success return"]
#[doc = " code indicates that advertising has been fully aborted and a new advertising"]
#[doc = " procedure can be initiated immediately."]
#[doc = ""]
#[doc = " NOTE: If the caller is running in the same task as the NimBLE host, or if it"]
#[doc = " is running in a higher priority task than that of the host, care must be"]
#[doc = " taken when restarting advertising. Under these conditions, the following is"]
#[doc = " *not* a reliable method to restart advertising:"]
#[doc = " ble_gap_adv_stop()"]
#[doc = " ble_gap_adv_start()"]
#[doc = ""]
#[doc = " Instead, the call to `ble_gap_adv_start()` must be made in a separate event"]
#[doc = " context. That is, `ble_gap_adv_start()` must be called asynchronously by"]
#[doc = " enqueueing an event on the current task's event queue. See"]
#[doc = " https://github.com/apache/mynewt-nimble/pull/211 for more information."]
#[doc = ""]
#[doc = " @return 0 on success, BLE_HS_EALREADY if there is no active advertising"]
#[doc = " procedure, other error code on failure."]
pub fn ble_gap_adv_stop() -> cty::c_int;
}
extern "C" {
#[doc = " Indicates whether an advertisement procedure is currently in progress."]
#[doc = ""]
#[doc = " @return 0 if no advertisement procedure in progress, 1 otherwise."]
pub fn ble_gap_adv_active() -> cty::c_int;
}
extern "C" {
#[doc = " Configures the data to include in subsequent advertisements."]
#[doc = ""]
#[doc = " @param data Buffer containing the advertising data."]
#[doc = " @param data_len The size of the advertising data, in bytes."]
#[doc = ""]
#[doc = " @return 0 on succes, BLE_HS_EBUSY if advertising is in progress,"]
#[doc = " other error code on failure."]
pub fn ble_gap_adv_set_data(data: *const u8, data_len: cty::c_int) -> cty::c_int;
}
extern "C" {
#[doc = " Configures the data to include in subsequent scan responses."]
#[doc = ""]
#[doc = " @param data Buffer containing the scan response data."]
#[doc = " @param data_len The size of the response data, in bytes."]
#[doc = ""]
#[doc = " @return 0 on succes, BLE_HS_EBUSY if advertising is in progress,"]
#[doc = " other error code on failure."]
pub fn ble_gap_adv_rsp_set_data(data: *const u8, data_len: cty::c_int) -> cty::c_int;
}
extern "C" {
#[doc = " Configures the fields to include in subsequent advertisements. This is a"]
#[doc = " convenience wrapper for ble_gap_adv_set_data()."]
#[doc = ""]
#[doc = " @param adv_fields Specifies the advertisement data."]
#[doc = ""]
#[doc = " @return 0 on success,"]
#[doc = " BLE_HS_EBUSY if advertising is in progress,"]
#[doc = " BLE_HS_EMSGSIZE if the specified data is too large to"]
#[doc = " fit in an advertisement,"]
#[doc = " other error code on failure."]
pub fn ble_gap_adv_set_fields(rsp_fields: *const ble_hs_adv_fields) -> cty::c_int;
}
extern "C" {
#[doc = " Configures the fields to include in subsequent scan responses. This is a"]
#[doc = " convenience wrapper for ble_gap_adv_rsp_set_data()."]
#[doc = ""]
#[doc = " @param adv_fields Specifies the scan response data."]
#[doc = ""]
#[doc = " @return 0 on success,"]
#[doc = " BLE_HS_EBUSY if advertising is in progress,"]
#[doc = " BLE_HS_EMSGSIZE if the specified data is too large to"]
#[doc = " fit in a scan response,"]
#[doc = " other error code on failure."]
pub fn ble_gap_adv_rsp_set_fields(rsp_fields: *const ble_hs_adv_fields) -> cty::c_int;
}
extern "C" {
#[doc = " Performs the Limited or General Discovery Procedures."]
#[doc = ""]
#[doc = " @param own_addr_type The type of address the stack should use for"]
#[doc = " itself when sending scan requests. Valid"]
#[doc = " values are:"]
#[doc = " - BLE_ADDR_TYPE_PUBLIC"]
#[doc = " - BLE_ADDR_TYPE_RANDOM"]
#[doc = " - BLE_ADDR_TYPE_RPA_PUB_DEFAULT"]
#[doc = " - BLE_ADDR_TYPE_RPA_RND_DEFAULT"]
#[doc = " This parameter is ignored unless active"]
#[doc = " scanning is being used."]
#[doc = " @param duration_ms The duration of the discovery procedure."]
#[doc = " On expiration, the procedure ends and a"]
#[doc = " BLE_GAP_EVENT_DISC_COMPLETE event is"]
#[doc = " reported. Units are milliseconds. Specify"]
#[doc = " BLE_HS_FOREVER for no expiration. Specify"]
#[doc = " 0 to use stack defaults."]
#[doc = " @param disc_params Additional arguments specifying the particulars"]
#[doc = " of the discovery procedure."]
#[doc = " @param cb The callback to associate with this discovery"]
#[doc = " procedure. Advertising reports and"]
#[doc = " discovery termination events are reported"]
#[doc = " through this callback."]
#[doc = " @param cb_arg The optional argument to pass to the callback"]
#[doc = " function."]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on failure."]
pub fn ble_gap_disc(
own_addr_type: u8,
duration_ms: i32,
disc_params: *const ble_gap_disc_params,
cb: ble_gap_event_fn,
cb_arg: *mut cty::c_void,
) -> cty::c_int;
}
extern "C" {
#[doc = " Performs the Limited or General Extended Discovery Procedures."]
#[doc = ""]
#[doc = " @param own_addr_type The type of address the stack should use for"]
#[doc = " itself when sending scan requests. Valid"]
#[doc = " values are:"]
#[doc = " - BLE_ADDR_TYPE_PUBLIC"]
#[doc = " - BLE_ADDR_TYPE_RANDOM"]
#[doc = " - BLE_ADDR_TYPE_RPA_PUB_DEFAULT"]
#[doc = " - BLE_ADDR_TYPE_RPA_RND_DEFAULT"]
#[doc = " This parameter is ignored unless active"]
#[doc = " scanning is being used."]
#[doc = " @param duration The duration of the discovery procedure."]
#[doc = " On expiration, if period is set to 0, the"]
#[doc = " procedure ends and a"]
#[doc = " BLE_GAP_EVENT_DISC_COMPLETE event is"]
#[doc = " reported. Units are 10 milliseconds."]
#[doc = " Specify 0 for no expiration."]
#[doc = " @param period Time interval from when the Controller started"]
#[doc = " its last Scan Duration until it begins the"]
#[doc = " subsequent Scan Duration. Specify 0 to scan"]
#[doc = " continuously. Units are 1.28 second."]
#[doc = " @param limited If limited discovery procedure should be used."]
#[doc = " @param uncoded_params Additional arguments specifying the particulars"]
#[doc = " of the discovery procedure for uncoded PHY."]
#[doc = " If NULL is provided no scan is performed for"]
#[doc = " this PHY."]
#[doc = " @param coded_params Additional arguments specifying the particulars"]
#[doc = " of the discovery procedure for coded PHY."]
#[doc = " If NULL is provided no scan is performed for"]
#[doc = " this PHY."]
#[doc = " @param cb The callback to associate with this discovery"]
#[doc = " procedure. Advertising reports and discovery"]
#[doc = " termination events are reported through this"]
#[doc = " callback."]
#[doc = " @param cb_arg The optional argument to pass to the callback"]
#[doc = " function."]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on failure."]
pub fn ble_gap_ext_disc(
own_addr_type: u8,
duration: u16,
period: u16,
filter_duplicates: u8,
filter_policy: u8,
limited: u8,
uncoded_params: *const ble_gap_ext_disc_params,
coded_params: *const ble_gap_ext_disc_params,
cb: ble_gap_event_fn,
cb_arg: *mut cty::c_void,
) -> cty::c_int;
}
extern "C" {
#[doc = " Cancels the discovery procedure currently in progress. A success return"]
#[doc = " code indicates that scanning has been fully aborted; a new discovery or"]
#[doc = " connect procedure can be initiated immediately."]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " BLE_HS_EALREADY if there is no discovery"]
#[doc = " procedure to cancel;"]
#[doc = " Other nonzero on unexpected error."]
pub fn ble_gap_disc_cancel() -> cty::c_int;
}
extern "C" {
#[doc = " Indicates whether a discovery procedure is currently in progress."]
#[doc = ""]
#[doc = " @return 0: No discovery procedure in progress;"]
#[doc = " 1: Discovery procedure in progress."]
pub fn ble_gap_disc_active() -> cty::c_int;
}
extern "C" {
#[doc = " Initiates a connect procedure."]
#[doc = ""]
#[doc = " @param own_addr_type The type of address the stack should use for"]
#[doc = " itself during connection establishment."]
#[doc = " - BLE_OWN_ADDR_PUBLIC"]
#[doc = " - BLE_OWN_ADDR_RANDOM"]
#[doc = " - BLE_OWN_ADDR_RPA_PUBLIC_DEFAULT"]
#[doc = " - BLE_OWN_ADDR_RPA_RANDOM_DEFAULT"]
#[doc = " @param peer_addr The address of the peer to connect to."]
#[doc = " If this parameter is NULL, the white list"]
#[doc = " is used."]
#[doc = " @param duration_ms The duration of the discovery procedure."]
#[doc = " On expiration, the procedure ends and a"]
#[doc = " BLE_GAP_EVENT_DISC_COMPLETE event is"]
#[doc = " reported. Units are milliseconds."]
#[doc = " @param conn_params Additional arguments specifying the particulars"]
#[doc = " of the connect procedure. Specify null for"]
#[doc = " default values."]
#[doc = " @param cb The callback to associate with this connect"]
#[doc = " procedure. When the connect procedure"]
#[doc = " completes, the result is reported through"]
#[doc = " this callback. If the connect procedure"]
#[doc = " succeeds, the connection inherits this"]
#[doc = " callback as its event-reporting mechanism."]
#[doc = " @param cb_arg The optional argument to pass to the callback"]
#[doc = " function."]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " BLE_HS_EALREADY if a connection attempt is"]
#[doc = " already in progress;"]
#[doc = " BLE_HS_EBUSY if initiating a connection is not"]
#[doc = " possible because scanning is in progress;"]
#[doc = " BLE_HS_EDONE if the specified peer is already"]
#[doc = " connected;"]
#[doc = " Other nonzero on error."]
pub fn ble_gap_connect(
own_addr_type: u8,
peer_addr: *const ble_addr_t,
duration_ms: i32,
params: *const ble_gap_conn_params,
cb: ble_gap_event_fn,
cb_arg: *mut cty::c_void,
) -> cty::c_int;
}
extern "C" {
#[doc = " Initiates an extended connect procedure."]
#[doc = ""]
#[doc = " @param own_addr_type The type of address the stack should use for"]
#[doc = " itself during connection establishment."]
#[doc = " - BLE_OWN_ADDR_PUBLIC"]
#[doc = " - BLE_OWN_ADDR_RANDOM"]
#[doc = " - BLE_OWN_ADDR_RPA_PUBLIC_DEFAULT"]
#[doc = " - BLE_OWN_ADDR_RPA_RANDOM_DEFAULT"]
#[doc = " @param peer_addr The address of the peer to connect to."]
#[doc = " If this parameter is NULL, the white list"]
#[doc = " is used."]
#[doc = " @param duration_ms The duration of the discovery procedure."]
#[doc = " On expiration, the procedure ends and a"]
#[doc = " BLE_GAP_EVENT_DISC_COMPLETE event is"]
#[doc = " reported. Units are milliseconds."]
#[doc = " @param phy_mask Define on which PHYs connection attempt should"]
#[doc = " be done"]
#[doc = " @param phy_1m_conn_params Additional arguments specifying the"]
#[doc = " particulars of the connect procedure. When"]
#[doc = " BLE_GAP_LE_PHY_1M_MASK is set in phy_mask"]
#[doc = " this parameter can be specify to null for"]
#[doc = " default values."]
#[doc = " @param phy_2m_conn_params Additional arguments specifying the"]
#[doc = " particulars of the connect procedure. When"]
#[doc = " BLE_GAP_LE_PHY_2M_MASK is set in phy_mask"]
#[doc = " this parameter can be specify to null for"]
#[doc = " default values."]
#[doc = " @param phy_coded_conn_params Additional arguments specifying the"]
#[doc = " particulars of the connect procedure. When"]
#[doc = " BLE_GAP_LE_PHY_CODED_MASK is set in"]
#[doc = " phy_mask this parameter can be specify to"]
#[doc = " null for default values."]
#[doc = " @param cb The callback to associate with this connect"]
#[doc = " procedure. When the connect procedure"]
#[doc = " completes, the result is reported through"]
#[doc = " this callback. If the connect procedure"]
#[doc = " succeeds, the connection inherits this"]
#[doc = " callback as its event-reporting mechanism."]
#[doc = " @param cb_arg The optional argument to pass to the callback"]
#[doc = " function."]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " BLE_HS_EALREADY if a connection attempt is"]
#[doc = " already in progress;"]
#[doc = " BLE_HS_EBUSY if initiating a connection is not"]
#[doc = " possible because scanning is in progress;"]
#[doc = " BLE_HS_EDONE if the specified peer is already"]
#[doc = " connected;"]
#[doc = " Other nonzero on error."]
pub fn ble_gap_ext_connect(
own_addr_type: u8,
peer_addr: *const ble_addr_t,
duration_ms: i32,
phy_mask: u8,
phy_1m_conn_params: *const ble_gap_conn_params,
phy_2m_conn_params: *const ble_gap_conn_params,
phy_coded_conn_params: *const ble_gap_conn_params,
cb: ble_gap_event_fn,
cb_arg: *mut cty::c_void,
) -> cty::c_int;
}
extern "C" {
#[doc = " Aborts a connect procedure in progress."]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " BLE_HS_EALREADY if there is no active connect"]
#[doc = " procedure."]
#[doc = " Other nonzero on error."]
pub fn ble_gap_conn_cancel() -> cty::c_int;
}
extern "C" {
#[doc = " Indicates whether a connect procedure is currently in progress."]
#[doc = ""]
#[doc = " @return 0: No connect procedure in progress;"]
#[doc = " 1: Connect procedure in progress."]
pub fn ble_gap_conn_active() -> cty::c_int;
}
extern "C" {
#[doc = " Terminates an established connection."]
#[doc = ""]
#[doc = " @param conn_handle The handle corresponding to the connection to"]
#[doc = " terminate."]
#[doc = " @param hci_reason The HCI error code to indicate as the reason"]
#[doc = " for termination."]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " BLE_HS_ENOTCONN if there is no connection with"]
#[doc = " the specified handle;"]
#[doc = " Other nonzero on failure."]
pub fn ble_gap_terminate(conn_handle: u16, hci_reason: u8) -> cty::c_int;
}
extern "C" {
#[doc = " Overwrites the controller's white list with the specified contents."]
#[doc = ""]
#[doc = " @param addrs The entries to write to the white list."]
#[doc = " @param white_list_count The number of entries in the white list."]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on failure."]
pub fn ble_gap_wl_set(addrs: *const ble_addr_t, white_list_count: u8) -> cty::c_int;
}
extern "C" {
#[doc = " Initiates a connection parameter update procedure."]
#[doc = ""]
#[doc = " @param conn_handle The handle corresponding to the connection to"]
#[doc = " update."]
#[doc = " @param params The connection parameters to attempt to update"]
#[doc = " to."]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " BLE_HS_ENOTCONN if the there is no connection"]
#[doc = " with the specified handle;"]
#[doc = " BLE_HS_EALREADY if a connection update"]
#[doc = " procedure for this connection is already in"]
#[doc = " progress;"]
#[doc = " BLE_HS_EINVAL if requested parameters are"]
#[doc = " invalid;"]
#[doc = " Other nonzero on error."]
pub fn ble_gap_update_params(conn_handle: u16, params: *const ble_gap_upd_params)
-> cty::c_int;
}
extern "C" {
#[doc = " Initiates the GAP security procedure."]
#[doc = ""]
#[doc = " Depending on connection role and stored security information this function"]
#[doc = " will start appropriate security procedure (pairing or encryption)."]
#[doc = ""]
#[doc = " @param conn_handle The handle corresponding to the connection to"]
#[doc = " secure."]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " BLE_HS_ENOTCONN if the there is no connection"]
#[doc = " with the specified handle;"]
#[doc = " BLE_HS_EALREADY if an security procedure for"]
#[doc = " this connection is already in progress;"]
#[doc = " Other nonzero on error."]
pub fn ble_gap_security_initiate(conn_handle: u16) -> cty::c_int;
}
extern "C" {
#[doc = " Initiates the GAP pairing procedure as a master. This is for testing only and"]
#[doc = " should not be used by application. Use ble_gap_security_initiate() instead."]
#[doc = ""]
#[doc = " @param conn_handle The handle corresponding to the connection to"]
#[doc = " start pairing on."]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " BLE_HS_ENOTCONN if the there is no connection"]
#[doc = " with the specified handle;"]
#[doc = " BLE_HS_EALREADY if an pairing procedure for"]
#[doc = " this connection is already in progress;"]
#[doc = " Other nonzero on error."]
pub fn ble_gap_pair_initiate(conn_handle: u16) -> cty::c_int;
}
extern "C" {
#[doc = " Initiates the GAP encryption procedure as a master. This is for testing only"]
#[doc = " and should not be used by application. Use ble_gap_security_initiate()"]
#[doc = " instead."]
#[doc = ""]
#[doc = " @param conn_handle The handle corresponding to the connection to"]
#[doc = " start encryption."]
#[doc = " @param key_size Encryption key size"]
#[doc = " @param ltk Long Term Key to be used for encryption."]
#[doc = " @param udiv Encryption Diversifier for LTK"]
#[doc = " @param rand_val Random Value for EDIV and LTK"]
#[doc = " @param auth If LTK provided is authenticated."]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " BLE_HS_ENOTCONN if the there is no connection"]
#[doc = " with the specified handle;"]
#[doc = " BLE_HS_EALREADY if an encryption procedure for"]
#[doc = " this connection is already in progress;"]
#[doc = " Other nonzero on error."]
pub fn ble_gap_encryption_initiate(
conn_handle: u16,
key_size: u8,
ltk: *const u8,
ediv: u16,
rand_val: u64,
auth: cty::c_int,
) -> cty::c_int;
}
extern "C" {
#[doc = " Retrieves the most-recently measured RSSI for the specified connection. A"]
#[doc = " connection's RSSI is updated whenever a data channel PDU is received."]
#[doc = ""]
#[doc = " @param conn_handle Specifies the connection to query."]
#[doc = " @param out_rssi On success, the retrieved RSSI is written here."]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " A BLE host HCI return code if the controller"]
#[doc = " rejected the request;"]
#[doc = " A BLE host core return code on unexpected"]
#[doc = " error."]
pub fn ble_gap_conn_rssi(conn_handle: u16, out_rssi: *mut i8) -> cty::c_int;
}
extern "C" {
#[doc = " Unpairs a device with the specified address. The keys related to that peer"]
#[doc = " device are removed from storage and peer address is removed from the resolve"]
#[doc = " list from the controller. If a peer is connected, the connection is terminated."]
#[doc = ""]
#[doc = " @param peer_addr Address of the device to be unpaired"]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " A BLE host HCI return code if the controller"]
#[doc = " rejected the request;"]
#[doc = " A BLE host core return code on unexpected"]
#[doc = " error."]
pub fn ble_gap_unpair(peer_addr: *const ble_addr_t) -> cty::c_int;
}
extern "C" {
#[doc = " Unpairs the oldest bonded peer device. The keys related to that peer"]
#[doc = " device are removed from storage and peer address is removed from the resolve"]
#[doc = " list from the controller. If a peer is connected, the connection is terminated."]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " A BLE host HCI return code if the controller"]
#[doc = " rejected the request;"]
#[doc = " A BLE host core return code on unexpected"]
#[doc = " error."]
pub fn ble_gap_unpair_oldest_peer() -> cty::c_int;
}
extern "C" {
#[doc = " Similar to `ble_gap_unpair_oldest_peer()`, except it makes sure that the"]
#[doc = " peer received in input parameters is not deleted."]
#[doc = ""]
#[doc = " @param peer_addr Address of the peer (not to be deleted)"]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " A BLE host HCI return code if the controller"]
#[doc = " rejected the request;"]
#[doc = " A BLE host core return code on unexpected"]
#[doc = " error."]
pub fn ble_gap_unpair_oldest_except(peer_addr: *const ble_addr_t) -> cty::c_int;
}
extern "C" {
#[doc = " Set privacy mode for specified peer device"]
#[doc = ""]
#[doc = " @param peer_addr Peer device address"]
#[doc = " @param priv_mode Privacy mode to be used. Can be one of following"]
#[doc = " constants:"]
#[doc = " - BLE_GAP_PRIVATE_MODE_NETWORK"]
#[doc = " - BLE_GAP_PRIVATE_MODE_DEVICE"]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on failure."]
pub fn ble_gap_set_priv_mode(peer_addr: *const ble_addr_t, priv_mode: u8) -> cty::c_int;
}
extern "C" {
#[doc = " Read PHYs used for specified connection."]
#[doc = ""]
#[doc = " On success output parameters are filled with information about used PHY type."]
#[doc = ""]
#[doc = " @param conn_handle Connection handle"]
#[doc = " @param tx_phy TX PHY used. Can be one of following constants:"]
#[doc = " - BLE_GAP_LE_PHY_1M"]
#[doc = " - BLE_GAP_LE_PHY_2M"]
#[doc = " - BLE_GAP_LE_PHY_CODED"]
#[doc = " @param rx_phy RX PHY used. Can be one of following constants:"]
#[doc = " - BLE_GAP_LE_PHY_1M"]
#[doc = " - BLE_GAP_LE_PHY_2M"]
#[doc = " - BLE_GAP_LE_PHY_CODED"]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on failure."]
pub fn ble_gap_read_le_phy(conn_handle: u16, tx_phy: *mut u8, rx_phy: *mut u8) -> cty::c_int;
}
extern "C" {
#[doc = " Set preferred default PHYs to be used for connections."]
#[doc = ""]
#[doc = " @params tx_phys_mask Preferred TX PHY. Can be mask of following"]
#[doc = " constants:"]
#[doc = " - BLE_GAP_LE_PHY_1M_MASK"]
#[doc = " - BLE_GAP_LE_PHY_2M_MASK"]
#[doc = " - BLE_GAP_LE_PHY_CODED_MASK"]
#[doc = " - BLE_GAP_LE_PHY_ANY_MASK"]
#[doc = " @params rx_phys_mask Preferred RX PHY. Can be mask of following"]
#[doc = " constants:"]
#[doc = " - BLE_GAP_LE_PHY_1M_MASK"]
#[doc = " - BLE_GAP_LE_PHY_2M_MASK"]
#[doc = " - BLE_GAP_LE_PHY_CODED_MASK"]
#[doc = " - BLE_GAP_LE_PHY_ANY_MASK"]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on failure."]
pub fn ble_gap_set_prefered_default_le_phy(tx_phys_mask: u8, rx_phys_mask: u8) -> cty::c_int;
}
extern "C" {
#[doc = " Set preferred PHYs to be used for connection."]
#[doc = ""]
#[doc = " @param conn_handle Connection handle"]
#[doc = " @params tx_phys_mask Preferred TX PHY. Can be mask of following"]
#[doc = " constants:"]
#[doc = " - BLE_GAP_LE_PHY_1M_MASK"]
#[doc = " - BLE_GAP_LE_PHY_2M_MASK"]
#[doc = " - BLE_GAP_LE_PHY_CODED_MASK"]
#[doc = " - BLE_GAP_LE_PHY_ANY_MASK"]
#[doc = " @params rx_phys_mask Preferred RX PHY. Can be mask of following"]
#[doc = " constants:"]
#[doc = " - BLE_GAP_LE_PHY_1M_MASK"]
#[doc = " - BLE_GAP_LE_PHY_2M_MASK"]
#[doc = " - BLE_GAP_LE_PHY_CODED_MASK"]
#[doc = " - BLE_GAP_LE_PHY_ANY_MASK"]
#[doc = " @param phy_opts Additional PHY options. Valid values are:"]
#[doc = " - BLE_GAP_LE_PHY_CODED_ANY"]
#[doc = " - BLE_GAP_LE_PHY_CODED_S2"]
#[doc = " - BLE_GAP_LE_PHY_CODED_S8"]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on failure."]
pub fn ble_gap_set_prefered_le_phy(
conn_handle: u16,
tx_phys_mask: u8,
rx_phys_mask: u8,
phy_opts: u16,
) -> cty::c_int;
}
#[doc = " Event listener structure"]
#[doc = ""]
#[doc = " This should be used as an opaque structure and not modified manually."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_event_listener {
pub fn_: ble_gap_event_fn,
pub arg: *mut cty::c_void,
pub link: ble_gap_event_listener__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_event_listener__bindgen_ty_1 {
pub sle_next: *mut ble_gap_event_listener,
}
#[test]
fn bindgen_test_layout_ble_gap_event_listener__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<ble_gap_event_listener__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(ble_gap_event_listener__bindgen_ty_1)
)
);
assert_eq!(
::core::mem::align_of::<ble_gap_event_listener__bindgen_ty_1>(),
8usize,
concat!(
"Alignment of ",
stringify!(ble_gap_event_listener__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gap_event_listener__bindgen_ty_1>())).sle_next as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event_listener__bindgen_ty_1),
"::",
stringify!(sle_next)
)
);
}
#[test]
fn bindgen_test_layout_ble_gap_event_listener() {
assert_eq!(
::core::mem::size_of::<ble_gap_event_listener>(),
24usize,
concat!("Size of: ", stringify!(ble_gap_event_listener))
);
assert_eq!(
::core::mem::align_of::<ble_gap_event_listener>(),
8usize,
concat!("Alignment of ", stringify!(ble_gap_event_listener))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_event_listener>())).fn_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event_listener),
"::",
stringify!(fn_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_event_listener>())).arg as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event_listener),
"::",
stringify!(arg)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gap_event_listener>())).link as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(ble_gap_event_listener),
"::",
stringify!(link)
)
);
}
extern "C" {
#[doc = " Registers listener for GAP events"]
#[doc = ""]
#[doc = " On success listener structure will be initialized automatically and does not"]
#[doc = " need to be initialized prior to calling this function. To change callback"]
#[doc = " and/or argument unregister listener first and register it again."]
#[doc = ""]
#[doc = " @param listener Listener structure"]
#[doc = " @param fn Callback function"]
#[doc = " @param arg Callback argument"]
#[doc = ""]
#[doc = " @return 0 on success"]
#[doc = " BLE_HS_EINVAL if no callback is specified"]
#[doc = " BLE_HS_EALREADY if listener is already registered"]
pub fn ble_gap_event_listener_register(
listener: *mut ble_gap_event_listener,
fn_: ble_gap_event_fn,
arg: *mut cty::c_void,
) -> cty::c_int;
}
extern "C" {
#[doc = " Unregisters listener for GAP events"]
#[doc = ""]
#[doc = " @param listener Listener structure"]
#[doc = ""]
#[doc = " @return 0 on success"]
#[doc = " BLE_HS_ENOENT if listener was not registered"]
pub fn ble_gap_event_listener_unregister(listener: *mut ble_gap_event_listener) -> cty::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hs_conn {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_att_error_rsp {
_unused: [u8; 0],
}
#[doc = " @client."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatt_error {
pub status: u16,
pub att_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_gatt_error() {
assert_eq!(
::core::mem::size_of::<ble_gatt_error>(),
4usize,
concat!("Size of: ", stringify!(ble_gatt_error))
);
assert_eq!(
::core::mem::align_of::<ble_gatt_error>(),
2usize,
concat!("Alignment of ", stringify!(ble_gatt_error))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_error>())).status as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_error),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_error>())).att_handle as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_error),
"::",
stringify!(att_handle)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ble_gatt_svc {
pub start_handle: u16,
pub end_handle: u16,
pub uuid: ble_uuid_any_t,
}
#[test]
fn bindgen_test_layout_ble_gatt_svc() {
assert_eq!(
::core::mem::size_of::<ble_gatt_svc>(),
24usize,
concat!("Size of: ", stringify!(ble_gatt_svc))
);
assert_eq!(
::core::mem::align_of::<ble_gatt_svc>(),
4usize,
concat!("Alignment of ", stringify!(ble_gatt_svc))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_svc>())).start_handle as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_svc),
"::",
stringify!(start_handle)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_svc>())).end_handle as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_svc),
"::",
stringify!(end_handle)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_svc>())).uuid as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_svc),
"::",
stringify!(uuid)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatt_attr {
pub handle: u16,
pub offset: u16,
pub om: *mut os_mbuf,
}
#[test]
fn bindgen_test_layout_ble_gatt_attr() {
assert_eq!(
::core::mem::size_of::<ble_gatt_attr>(),
16usize,
concat!("Size of: ", stringify!(ble_gatt_attr))
);
assert_eq!(
::core::mem::align_of::<ble_gatt_attr>(),
8usize,
concat!("Alignment of ", stringify!(ble_gatt_attr))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_attr>())).handle as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_attr),
"::",
stringify!(handle)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_attr>())).offset as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_attr),
"::",
stringify!(offset)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_attr>())).om as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_attr),
"::",
stringify!(om)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ble_gatt_chr {
pub def_handle: u16,
pub val_handle: u16,
pub properties: u8,
pub uuid: ble_uuid_any_t,
}
#[test]
fn bindgen_test_layout_ble_gatt_chr() {
assert_eq!(
::core::mem::size_of::<ble_gatt_chr>(),
28usize,
concat!("Size of: ", stringify!(ble_gatt_chr))
);
assert_eq!(
::core::mem::align_of::<ble_gatt_chr>(),
4usize,
concat!("Alignment of ", stringify!(ble_gatt_chr))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_chr>())).def_handle as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_chr),
"::",
stringify!(def_handle)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_chr>())).val_handle as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_chr),
"::",
stringify!(val_handle)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_chr>())).properties as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_chr),
"::",
stringify!(properties)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_chr>())).uuid as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_chr),
"::",
stringify!(uuid)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ble_gatt_dsc {
pub handle: u16,
pub uuid: ble_uuid_any_t,
}
#[test]
fn bindgen_test_layout_ble_gatt_dsc() {
assert_eq!(
::core::mem::size_of::<ble_gatt_dsc>(),
24usize,
concat!("Size of: ", stringify!(ble_gatt_dsc))
);
assert_eq!(
::core::mem::align_of::<ble_gatt_dsc>(),
4usize,
concat!("Alignment of ", stringify!(ble_gatt_dsc))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_dsc>())).handle as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_dsc),
"::",
stringify!(handle)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_dsc>())).uuid as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_dsc),
"::",
stringify!(uuid)
)
);
}
pub type ble_gatt_mtu_fn = ::core::option::Option<
unsafe extern "C" fn(
conn_handle: u16,
error: *const ble_gatt_error,
mtu: u16,
arg: *mut cty::c_void,
) -> cty::c_int,
>;
pub type ble_gatt_disc_svc_fn = ::core::option::Option<
unsafe extern "C" fn(
conn_handle: u16,
error: *const ble_gatt_error,
service: *const ble_gatt_svc,
arg: *mut cty::c_void,
) -> cty::c_int,
>;
#[doc = " The host will free the attribute mbuf automatically after the callback is"]
#[doc = " executed. The application can take ownership of the mbuf and prevent it"]
#[doc = " from being freed by assigning NULL to attr->om."]
pub type ble_gatt_attr_fn = ::core::option::Option<
unsafe extern "C" fn(
conn_handle: u16,
error: *const ble_gatt_error,
attr: *mut ble_gatt_attr,
arg: *mut cty::c_void,
) -> cty::c_int,
>;
#[doc = " The host will free the attribute mbufs automatically after the callback is"]
#[doc = " executed. The application can take ownership of the mbufs and prevent them"]
#[doc = " from being freed by assigning NULL to each attribute's om field."]
pub type ble_gatt_reliable_attr_fn = ::core::option::Option<
unsafe extern "C" fn(
conn_handle: u16,
error: *const ble_gatt_error,
attrs: *mut ble_gatt_attr,
num_attrs: u8,
arg: *mut cty::c_void,
) -> cty::c_int,
>;
pub type ble_gatt_chr_fn = ::core::option::Option<
unsafe extern "C" fn(
conn_handle: u16,
error: *const ble_gatt_error,
chr: *const ble_gatt_chr,
arg: *mut cty::c_void,
) -> cty::c_int,
>;
pub type ble_gatt_dsc_fn = ::core::option::Option<
unsafe extern "C" fn(
conn_handle: u16,
error: *const ble_gatt_error,
chr_val_handle: u16,
dsc: *const ble_gatt_dsc,
arg: *mut cty::c_void,
) -> cty::c_int,
>;
extern "C" {
#[doc = " Initiates GATT procedure: Exchange MTU."]
#[doc = ""]
#[doc = " @param conn_handle The connection over which to execute the"]
#[doc = " procedure."]
#[doc = " @param cb The function to call to report procedure status"]
#[doc = " updates; null for no callback."]
#[doc = " @param cb_arg The optional argument to pass to the callback"]
#[doc = " function."]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on failure."]
pub fn ble_gattc_exchange_mtu(
conn_handle: u16,
cb: ble_gatt_mtu_fn,
cb_arg: *mut cty::c_void,
) -> cty::c_int;
}
extern "C" {
#[doc = " Initiates GATT procedure: Discover All Primary Services."]
#[doc = ""]
#[doc = " @param conn_handle The connection over which to execute the"]
#[doc = " procedure."]
#[doc = " @param cb The function to call to report procedure status"]
#[doc = " updates; null for no callback."]
#[doc = " @param cb_arg The optional argument to pass to the callback"]
#[doc = " function."]
pub fn ble_gattc_disc_all_svcs(
conn_handle: u16,
cb: ble_gatt_disc_svc_fn,
cb_arg: *mut cty::c_void,
) -> cty::c_int;
}
extern "C" {
#[doc = " Initiates GATT procedure: Discover Primary Service by Service UUID."]
#[doc = ""]
#[doc = " @param conn_handle The connection over which to execute the"]
#[doc = " procedure."]
#[doc = " @param service_uuid128 The 128-bit UUID of the service to discover."]
#[doc = " @param cb The function to call to report procedure status"]
#[doc = " updates; null for no callback."]
#[doc = " @param cb_arg The optional argument to pass to the callback"]
#[doc = " function."]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on failure."]
pub fn ble_gattc_disc_svc_by_uuid(
conn_handle: u16,
uuid: *const ble_uuid_t,
cb: ble_gatt_disc_svc_fn,
cb_arg: *mut cty::c_void,
) -> cty::c_int;
}
extern "C" {
#[doc = " Initiates GATT procedure: Find Included Services."]
#[doc = ""]
#[doc = " @param conn_handle The connection over which to execute the"]
#[doc = " procedure."]
#[doc = " @param start_handle The handle to begin the search at (generally"]
#[doc = " the service definition handle)."]
#[doc = " @param end_handle The handle to end the search at (generally the"]
#[doc = " last handle in the service)."]
#[doc = " @param cb The function to call to report procedure status"]
#[doc = " updates; null for no callback."]
#[doc = " @param cb_arg The optional argument to pass to the callback"]
#[doc = " function."]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on failure."]
pub fn ble_gattc_find_inc_svcs(
conn_handle: u16,
start_handle: u16,
end_handle: u16,
cb: ble_gatt_disc_svc_fn,
cb_arg: *mut cty::c_void,
) -> cty::c_int;
}
extern "C" {
#[doc = " Initiates GATT procedure: Discover All Characteristics of a Service."]
#[doc = ""]
#[doc = " @param conn_handle The connection over which to execute the"]
#[doc = " procedure."]
#[doc = " @param start_handle The handle to begin the search at (generally"]
#[doc = " the service definition handle)."]
#[doc = " @param end_handle The handle to end the search at (generally the"]
#[doc = " last handle in the service)."]
#[doc = " @param cb The function to call to report procedure status"]
#[doc = " updates; null for no callback."]
#[doc = " @param cb_arg The optional argument to pass to the callback"]
#[doc = " function."]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on failure."]
pub fn ble_gattc_disc_all_chrs(
conn_handle: u16,
start_handle: u16,
end_handle: u16,
cb: ble_gatt_chr_fn,
cb_arg: *mut cty::c_void,
) -> cty::c_int;
}
extern "C" {
#[doc = " Initiates GATT procedure: Discover Characteristics by UUID."]
#[doc = ""]
#[doc = " @param conn_handle The connection over which to execute the"]
#[doc = " procedure."]
#[doc = " @param start_handle The handle to begin the search at (generally"]
#[doc = " the service definition handle)."]
#[doc = " @param end_handle The handle to end the search at (generally the"]
#[doc = " last handle in the service)."]
#[doc = " @param chr_uuid128 The 128-bit UUID of the characteristic to"]
#[doc = " discover."]
#[doc = " @param cb The function to call to report procedure status"]
#[doc = " updates; null for no callback."]
#[doc = " @param cb_arg The optional argument to pass to the callback"]
#[doc = " function."]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on failure."]
pub fn ble_gattc_disc_chrs_by_uuid(
conn_handle: u16,
start_handle: u16,
end_handle: u16,
uuid: *const ble_uuid_t,
cb: ble_gatt_chr_fn,
cb_arg: *mut cty::c_void,
) -> cty::c_int;
}
extern "C" {
#[doc = " Initiates GATT procedure: Discover All Characteristic Descriptors."]
#[doc = ""]
#[doc = " @param conn_handle The connection over which to execute the"]
#[doc = " procedure."]
#[doc = " @param chr_val_handle The handle of the characteristic value"]
#[doc = " attribute."]
#[doc = " @param chr_end_handle The last handle in the characteristic"]
#[doc = " definition."]
#[doc = " @param cb The function to call to report procedure status"]
#[doc = " updates; null for no callback."]
#[doc = " @param cb_arg The optional argument to pass to the callback"]
#[doc = " function."]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on failure."]
pub fn ble_gattc_disc_all_dscs(
conn_handle: u16,
start_handle: u16,
end_handle: u16,
cb: ble_gatt_dsc_fn,
cb_arg: *mut cty::c_void,
) -> cty::c_int;
}
extern "C" {
#[doc = " Initiates GATT procedure: Read Characteristic Value."]
#[doc = ""]
#[doc = " @param conn_handle The connection over which to execute the"]
#[doc = " procedure."]
#[doc = " @param attr_handle The handle of the characteristic value to read."]
#[doc = " @param cb The function to call to report procedure status"]
#[doc = " updates; null for no callback."]
#[doc = " @param cb_arg The optional argument to pass to the callback"]
#[doc = " function."]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on failure."]
pub fn ble_gattc_read(
conn_handle: u16,
attr_handle: u16,
cb: ble_gatt_attr_fn,
cb_arg: *mut cty::c_void,
) -> cty::c_int;
}
extern "C" {
#[doc = " Initiates GATT procedure: Read Using Characteristic UUID."]
#[doc = ""]
#[doc = " @param conn_handle The connection over which to execute the"]
#[doc = " procedure."]
#[doc = " @param start_handle The first handle to search (generally the"]
#[doc = " handle of the service definition)."]
#[doc = " @param end_handle The last handle to search (generally the"]
#[doc = " last handle in the service definition)."]
#[doc = " @param cb The function to call to report procedure status"]
#[doc = " updates; null for no callback."]
#[doc = " @param cb_arg The optional argument to pass to the callback"]
#[doc = " function."]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on failure."]
pub fn ble_gattc_read_by_uuid(
conn_handle: u16,
start_handle: u16,
end_handle: u16,
uuid: *const ble_uuid_t,
cb: ble_gatt_attr_fn,
cb_arg: *mut cty::c_void,
) -> cty::c_int;
}
extern "C" {
#[doc = " Initiates GATT procedure: Read Long Characteristic Values."]
#[doc = ""]
#[doc = " @param conn_handle The connection over which to execute the"]
#[doc = " procedure."]
#[doc = " @param handle The handle of the characteristic value to read."]
#[doc = " @param cb The function to call to report procedure status"]
#[doc = " updates; null for no callback."]
#[doc = " @param cb_arg The optional argument to pass to the callback"]
#[doc = " function."]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on failure."]
pub fn ble_gattc_read_long(
conn_handle: u16,
handle: u16,
offset: u16,
cb: ble_gatt_attr_fn,
cb_arg: *mut cty::c_void,
) -> cty::c_int;
}
extern "C" {
#[doc = " Initiates GATT procedure: Read Multiple Characteristic Values."]
#[doc = ""]
#[doc = " @param conn_handle The connection over which to execute the"]
#[doc = " procedure."]
#[doc = " @param handles An array of 16-bit attribute handles to read."]
#[doc = " @param num_handles The number of entries in the \"handles\" array."]
#[doc = " @param cb The function to call to report procedure status"]
#[doc = " updates; null for no callback."]
#[doc = " @param cb_arg The optional argument to pass to the callback"]
#[doc = " function."]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on failure."]
pub fn ble_gattc_read_mult(
conn_handle: u16,
handles: *const u16,
num_handles: u8,
cb: ble_gatt_attr_fn,
cb_arg: *mut cty::c_void,
) -> cty::c_int;
}
extern "C" {
#[doc = " Initiates GATT procedure: Write Without Response. This function consumes"]
#[doc = " the supplied mbuf regardless of the outcome."]
#[doc = ""]
#[doc = " @param conn_handle The connection over which to execute the"]
#[doc = " procedure."]
#[doc = " @param attr_handle The handle of the characteristic value to write"]
#[doc = " to."]
#[doc = " @param txom The value to write to the characteristic."]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on failure."]
pub fn ble_gattc_write_no_rsp(
conn_handle: u16,
attr_handle: u16,
om: *mut os_mbuf,
) -> cty::c_int;
}
extern "C" {
#[doc = " Initiates GATT procedure: Write Without Response. This function consumes"]
#[doc = " the supplied mbuf regardless of the outcome."]
#[doc = ""]
#[doc = " @param conn_handle The connection over which to execute the"]
#[doc = " procedure."]
#[doc = " @param attr_handle The handle of the characteristic value to write"]
#[doc = " to."]
#[doc = " @param value The value to write to the characteristic."]
#[doc = " @param value_len The number of bytes to write."]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on failure."]
pub fn ble_gattc_write_no_rsp_flat(
conn_handle: u16,
attr_handle: u16,
data: *const cty::c_void,
data_len: u16,
) -> cty::c_int;
}
extern "C" {
#[doc = " Initiates GATT procedure: Write Characteristic Value. This function"]
#[doc = " consumes the supplied mbuf regardless of the outcome."]
#[doc = ""]
#[doc = " @param conn_handle The connection over which to execute the"]
#[doc = " procedure."]
#[doc = " @param attr_handle The handle of the characteristic value to write"]
#[doc = " to."]
#[doc = " @param txom The value to write to the characteristic."]
#[doc = " @param cb The function to call to report procedure status"]
#[doc = " updates; null for no callback."]
#[doc = " @param cb_arg The optional argument to pass to the callback"]
#[doc = " function."]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on failure."]
pub fn ble_gattc_write(
conn_handle: u16,
attr_handle: u16,
om: *mut os_mbuf,
cb: ble_gatt_attr_fn,
cb_arg: *mut cty::c_void,
) -> cty::c_int;
}
extern "C" {
#[doc = " Initiates GATT procedure: Write Characteristic Value (flat buffer version)."]
#[doc = ""]
#[doc = " @param conn_handle The connection over which to execute the"]
#[doc = " procedure."]
#[doc = " @param attr_handle The handle of the characteristic value to write"]
#[doc = " to."]
#[doc = " @param value The value to write to the characteristic."]
#[doc = " @param value_len The number of bytes to write."]
#[doc = " @param cb The function to call to report procedure status"]
#[doc = " updates; null for no callback."]
#[doc = " @param cb_arg The optional argument to pass to the callback"]
#[doc = " function."]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on failure."]
pub fn ble_gattc_write_flat(
conn_handle: u16,
attr_handle: u16,
data: *const cty::c_void,
data_len: u16,
cb: ble_gatt_attr_fn,
cb_arg: *mut cty::c_void,
) -> cty::c_int;
}
extern "C" {
#[doc = " Initiates GATT procedure: Write Long Characteristic Values. This function"]
#[doc = " consumes the supplied mbuf regardless of the outcome."]
#[doc = ""]
#[doc = " @param conn_handle The connection over which to execute the"]
#[doc = " procedure."]
#[doc = " @param attr_handle The handle of the characteristic value to write"]
#[doc = " to."]
#[doc = " @param txom The value to write to the characteristic."]
#[doc = " @param cb The function to call to report procedure status"]
#[doc = " updates; null for no callback."]
#[doc = " @param cb_arg The optional argument to pass to the callback"]
#[doc = " function."]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on failure."]
pub fn ble_gattc_write_long(
conn_handle: u16,
attr_handle: u16,
offset: u16,
om: *mut os_mbuf,
cb: ble_gatt_attr_fn,
cb_arg: *mut cty::c_void,
) -> cty::c_int;
}
extern "C" {
#[doc = " Initiates GATT procedure: Reliable Writes. This function consumes the"]
#[doc = " supplied mbufs regardless of the outcome."]
#[doc = ""]
#[doc = " @param conn_handle The connection over which to execute the"]
#[doc = " procedure."]
#[doc = " @param attrs An array of attribute descriptors; specifies"]
#[doc = " which characteristics to write to and what"]
#[doc = " data to write to them. The mbuf pointer in"]
#[doc = " each attribute is set to NULL by this"]
#[doc = " function."]
#[doc = " @param num_attrs The number of characteristics to write; equal"]
#[doc = " to the number of elements in the 'attrs'"]
#[doc = " array."]
#[doc = " @param cb The function to call to report procedure status"]
#[doc = " updates; null for no callback."]
#[doc = " @param cb_arg The optional argument to pass to the callback"]
#[doc = " function."]
pub fn ble_gattc_write_reliable(
conn_handle: u16,
attrs: *mut ble_gatt_attr,
num_attrs: cty::c_int,
cb: ble_gatt_reliable_attr_fn,
cb_arg: *mut cty::c_void,
) -> cty::c_int;
}
extern "C" {
#[doc = " Sends a \"free-form\" characteristic notification. This function consumes the"]
#[doc = " supplied mbuf regardless of the outcome."]
#[doc = ""]
#[doc = " @param conn_handle The connection over which to execute the"]
#[doc = " procedure."]
#[doc = " @param chr_val_handle The attribute handle to indicate in the"]
#[doc = " outgoing notification."]
#[doc = " @param txom The value to write to the characteristic."]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on failure."]
pub fn ble_gattc_notify_custom(
conn_handle: u16,
att_handle: u16,
om: *mut os_mbuf,
) -> cty::c_int;
}
extern "C" {
#[doc = " Sends a characteristic notification. The content of the message is read"]
#[doc = " from the specified characteristic."]
#[doc = ""]
#[doc = " @param conn_handle The connection over which to execute the"]
#[doc = " procedure."]
#[doc = " @param chr_val_handle The value attribute handle of the"]
#[doc = " characteristic to include in the outgoing"]
#[doc = " notification."]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on failure."]
pub fn ble_gattc_notify(conn_handle: u16, chr_val_handle: u16) -> cty::c_int;
}
extern "C" {
#[doc = " Sends a \"free-form\" characteristic indication. The provided mbuf contains"]
#[doc = " the indication payload. This function consumes the supplied mbuf regardless"]
#[doc = " of the outcome."]
#[doc = ""]
#[doc = " @param conn_handle The connection over which to execute the"]
#[doc = " procedure."]
#[doc = " @param chr_val_handle The value attribute handle of the"]
#[doc = " characteristic to include in the outgoing"]
#[doc = " indication."]
#[doc = " @param txom The data to include in the indication."]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on failure."]
pub fn ble_gattc_indicate_custom(
conn_handle: u16,
chr_val_handle: u16,
txom: *mut os_mbuf,
) -> cty::c_int;
}
extern "C" {
#[doc = " Sends a characteristic indication. The content of the message is read from"]
#[doc = " the specified characteristic."]
#[doc = ""]
#[doc = " @param conn_handle The connection over which to execute the"]
#[doc = " procedure."]
#[doc = " @param chr_val_handle The value attribute handle of the"]
#[doc = " characteristic to include in the outgoing"]
#[doc = " indication."]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on failure."]
pub fn ble_gattc_indicate(conn_handle: u16, chr_val_handle: u16) -> cty::c_int;
}
extern "C" {
pub fn ble_gattc_init() -> cty::c_int;
}
pub type ble_gatt_access_fn = ::core::option::Option<
unsafe extern "C" fn(
conn_handle: u16,
attr_handle: u16,
ctxt: *mut ble_gatt_access_ctxt,
arg: *mut cty::c_void,
) -> cty::c_int,
>;
pub type ble_gatt_chr_flags = u16;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatt_chr_def {
#[doc = " Pointer to characteristic UUID; use BLE_UUIDxx_DECLARE macros to declare"]
#[doc = " proper UUID; NULL if there are no more characteristics in the service."]
pub uuid: *const ble_uuid_t,
#[doc = " Callback that gets executed when this characteristic is read or"]
#[doc = " written."]
pub access_cb: ble_gatt_access_fn,
#[doc = " Optional argument for callback."]
pub arg: *mut cty::c_void,
#[doc = " Array of this characteristic's descriptors. NULL if no descriptors."]
#[doc = " Do not include CCCD; it gets added automatically if this"]
#[doc = " characteristic's notify or indicate flag is set."]
pub descriptors: *mut ble_gatt_dsc_def,
#[doc = " Specifies the set of permitted operations for this characteristic."]
pub flags: ble_gatt_chr_flags,
#[doc = " Specifies minimum required key size to access this characteristic."]
pub min_key_size: u8,
#[doc = " At registration time, this is filled in with the characteristic's value"]
#[doc = " attribute handle."]
pub val_handle: *mut u16,
}
#[test]
fn bindgen_test_layout_ble_gatt_chr_def() {
assert_eq!(
::core::mem::size_of::<ble_gatt_chr_def>(),
48usize,
concat!("Size of: ", stringify!(ble_gatt_chr_def))
);
assert_eq!(
::core::mem::align_of::<ble_gatt_chr_def>(),
8usize,
concat!("Alignment of ", stringify!(ble_gatt_chr_def))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_chr_def>())).uuid as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_chr_def),
"::",
stringify!(uuid)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_chr_def>())).access_cb as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_chr_def),
"::",
stringify!(access_cb)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_chr_def>())).arg as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_chr_def),
"::",
stringify!(arg)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_chr_def>())).descriptors as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_chr_def),
"::",
stringify!(descriptors)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_chr_def>())).flags as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_chr_def),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_chr_def>())).min_key_size as *const _ as usize },
34usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_chr_def),
"::",
stringify!(min_key_size)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_chr_def>())).val_handle as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_chr_def),
"::",
stringify!(val_handle)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatt_svc_def {
#[doc = " One of the following:"]
#[doc = " o BLE_GATT_SVC_TYPE_PRIMARY - primary service"]
#[doc = " o BLE_GATT_SVC_TYPE_SECONDARY - secondary service"]
#[doc = " o 0 - No more services in this array."]
pub type_: u8,
#[doc = " Pointer to service UUID; use BLE_UUIDxx_DECLARE macros to declare"]
#[doc = " proper UUID; NULL if there are no more characteristics in the service."]
pub uuid: *const ble_uuid_t,
#[doc = " Array of pointers to other service definitions. These services are"]
#[doc = " reported as \"included services\" during service discovery. Terminate the"]
#[doc = " array with NULL."]
pub includes: *mut *const ble_gatt_svc_def,
#[doc = " Array of characteristic definitions corresponding to characteristics"]
#[doc = " belonging to this service."]
pub characteristics: *const ble_gatt_chr_def,
}
#[test]
fn bindgen_test_layout_ble_gatt_svc_def() {
assert_eq!(
::core::mem::size_of::<ble_gatt_svc_def>(),
32usize,
concat!("Size of: ", stringify!(ble_gatt_svc_def))
);
assert_eq!(
::core::mem::align_of::<ble_gatt_svc_def>(),
8usize,
concat!("Alignment of ", stringify!(ble_gatt_svc_def))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_svc_def>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_svc_def),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_svc_def>())).uuid as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_svc_def),
"::",
stringify!(uuid)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_svc_def>())).includes as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_svc_def),
"::",
stringify!(includes)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gatt_svc_def>())).characteristics as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_svc_def),
"::",
stringify!(characteristics)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatt_dsc_def {
#[doc = " Pointer to descriptor UUID; use BLE_UUIDxx_DECLARE macros to declare"]
#[doc = " proper UUID; NULL if there are no more characteristics in the service."]
pub uuid: *const ble_uuid_t,
#[doc = " Specifies the set of permitted operations for this descriptor."]
pub att_flags: u8,
#[doc = " Specifies minimum required key size to access this descriptor."]
pub min_key_size: u8,
#[doc = " Callback that gets executed when the descriptor is read or written."]
pub access_cb: ble_gatt_access_fn,
#[doc = " Optional argument for callback."]
pub arg: *mut cty::c_void,
}
#[test]
fn bindgen_test_layout_ble_gatt_dsc_def() {
assert_eq!(
::core::mem::size_of::<ble_gatt_dsc_def>(),
32usize,
concat!("Size of: ", stringify!(ble_gatt_dsc_def))
);
assert_eq!(
::core::mem::align_of::<ble_gatt_dsc_def>(),
8usize,
concat!("Alignment of ", stringify!(ble_gatt_dsc_def))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_dsc_def>())).uuid as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_dsc_def),
"::",
stringify!(uuid)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_dsc_def>())).att_flags as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_dsc_def),
"::",
stringify!(att_flags)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_dsc_def>())).min_key_size as *const _ as usize },
9usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_dsc_def),
"::",
stringify!(min_key_size)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_dsc_def>())).access_cb as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_dsc_def),
"::",
stringify!(access_cb)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_dsc_def>())).arg as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_dsc_def),
"::",
stringify!(arg)
)
);
}
#[doc = " @server."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ble_gatt_access_ctxt {
#[doc = " Indicates the gatt operation being performed. This is equal to one of"]
#[doc = " the following values:"]
#[doc = " o BLE_GATT_ACCESS_OP_READ_CHR"]
#[doc = " o BLE_GATT_ACCESS_OP_WRITE_CHR"]
#[doc = " o BLE_GATT_ACCESS_OP_READ_DSC"]
#[doc = " o BLE_GATT_ACCESS_OP_WRITE_DSC"]
pub op: u8,
#[doc = " A container for the GATT access data."]
#[doc = " o For reads: The application populates this with the value of the"]
#[doc = " characteristic or descriptor being read."]
#[doc = " o For writes: This is already populated with the value being written"]
#[doc = " by the peer. If the application wishes to retain this mbuf for"]
#[doc = " later use, the access callback must set this pointer to NULL to"]
#[doc = " prevent the stack from freeing it."]
pub om: *mut os_mbuf,
pub __bindgen_anon_1: ble_gatt_access_ctxt__bindgen_ty_1,
}
#[doc = " The GATT operation being performed dictates which field in this union is"]
#[doc = " valid. If a characteristic is being accessed, the chr field is valid."]
#[doc = " Otherwise a descriptor is being accessed, in which case the dsc field"]
#[doc = " is valid."]
#[repr(C)]
#[derive(Copy, Clone)]
pub union ble_gatt_access_ctxt__bindgen_ty_1 {
#[doc = " The characteristic definition corresponding to the characteristic"]
#[doc = " being accessed. This is what the app registered at startup."]
pub chr: *const ble_gatt_chr_def,
#[doc = " The descriptor definition corresponding to the descriptor being"]
#[doc = " accessed. This is what the app registered at startup."]
pub dsc: *const ble_gatt_dsc_def,
_bindgen_union_align: u64,
}
#[test]
fn bindgen_test_layout_ble_gatt_access_ctxt__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<ble_gatt_access_ctxt__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(ble_gatt_access_ctxt__bindgen_ty_1))
);
assert_eq!(
::core::mem::align_of::<ble_gatt_access_ctxt__bindgen_ty_1>(),
8usize,
concat!(
"Alignment of ",
stringify!(ble_gatt_access_ctxt__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gatt_access_ctxt__bindgen_ty_1>())).chr as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_access_ctxt__bindgen_ty_1),
"::",
stringify!(chr)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gatt_access_ctxt__bindgen_ty_1>())).dsc as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_access_ctxt__bindgen_ty_1),
"::",
stringify!(dsc)
)
);
}
#[test]
fn bindgen_test_layout_ble_gatt_access_ctxt() {
assert_eq!(
::core::mem::size_of::<ble_gatt_access_ctxt>(),
24usize,
concat!("Size of: ", stringify!(ble_gatt_access_ctxt))
);
assert_eq!(
::core::mem::align_of::<ble_gatt_access_ctxt>(),
8usize,
concat!("Alignment of ", stringify!(ble_gatt_access_ctxt))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_access_ctxt>())).op as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_access_ctxt),
"::",
stringify!(op)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_access_ctxt>())).om as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_access_ctxt),
"::",
stringify!(om)
)
);
}
#[doc = " Context passed to the registration callback; represents the GATT service,"]
#[doc = " characteristic, or descriptor being registered."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ble_gatt_register_ctxt {
#[doc = " Indicates the gatt registration operation just performed. This is"]
#[doc = " equal to one of the following values:"]
#[doc = " o BLE_GATT_REGISTER_OP_SVC"]
#[doc = " o BLE_GATT_REGISTER_OP_CHR"]
#[doc = " o BLE_GATT_REGISTER_OP_DSC"]
pub op: u8,
pub __bindgen_anon_1: ble_gatt_register_ctxt__bindgen_ty_1,
}
#[doc = " The value of the op field determines which field in this union is valid."]
#[repr(C)]
#[derive(Copy, Clone)]
pub union ble_gatt_register_ctxt__bindgen_ty_1 {
pub svc: ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_1,
pub chr: ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_2,
pub dsc: ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_3,
_bindgen_union_align: [u64; 4usize],
}
#[doc = " Service; valid if op == BLE_GATT_REGISTER_OP_SVC."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_1 {
#[doc = " The ATT handle of the service definition attribute."]
pub handle: u16,
#[doc = " The service definition representing the service being"]
#[doc = " registered."]
pub svc_def: *const ble_gatt_svc_def,
}
#[test]
fn bindgen_test_layout_ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_1>(),
16usize,
concat!(
"Size of: ",
stringify!(ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::core::mem::align_of::<ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_1>(),
8usize,
concat!(
"Alignment of ",
stringify!(ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_1>())).handle
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_1>())).svc_def
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(svc_def)
)
);
}
#[doc = " Characteristic; valid if op == BLE_GATT_REGISTER_OP_CHR."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_2 {
#[doc = " The ATT handle of the characteristic definition attribute."]
pub def_handle: u16,
#[doc = " The ATT handle of the characteristic value attribute."]
pub val_handle: u16,
#[doc = " The characteristic definition representing the characteristic"]
#[doc = " being registered."]
pub chr_def: *const ble_gatt_chr_def,
#[doc = " The service definition corresponding to the characteristic's"]
#[doc = " parent service."]
pub svc_def: *const ble_gatt_svc_def,
}
#[test]
fn bindgen_test_layout_ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_2() {
assert_eq!(
::core::mem::size_of::<ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_2>(),
24usize,
concat!(
"Size of: ",
stringify!(ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
::core::mem::align_of::<ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_2>(),
8usize,
concat!(
"Alignment of ",
stringify!(ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_2>()))
.def_handle as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(def_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_2>()))
.val_handle as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(val_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_2>())).chr_def
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(chr_def)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_2>())).svc_def
as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(svc_def)
)
);
}
#[doc = " Descriptor; valid if op == BLE_GATT_REGISTER_OP_DSC."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_3 {
#[doc = " The ATT handle of the descriptor definition attribute."]
pub handle: u16,
#[doc = " The descriptor definition corresponding to the descriptor being"]
#[doc = " registered."]
pub dsc_def: *const ble_gatt_dsc_def,
#[doc = " The characteristic definition corresponding to the descriptor's"]
#[doc = " parent characteristic."]
pub chr_def: *const ble_gatt_chr_def,
#[doc = " The service definition corresponding to the descriptor's"]
#[doc = " grandparent service"]
pub svc_def: *const ble_gatt_svc_def,
}
#[test]
fn bindgen_test_layout_ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_3() {
assert_eq!(
::core::mem::size_of::<ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_3>(),
32usize,
concat!(
"Size of: ",
stringify!(ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
::core::mem::align_of::<ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_3>(),
8usize,
concat!(
"Alignment of ",
stringify!(ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_3>())).handle
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_3>())).dsc_def
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(dsc_def)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_3>())).chr_def
as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(chr_def)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_3>())).svc_def
as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_register_ctxt__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(svc_def)
)
);
}
#[test]
fn bindgen_test_layout_ble_gatt_register_ctxt__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<ble_gatt_register_ctxt__bindgen_ty_1>(),
32usize,
concat!(
"Size of: ",
stringify!(ble_gatt_register_ctxt__bindgen_ty_1)
)
);
assert_eq!(
::core::mem::align_of::<ble_gatt_register_ctxt__bindgen_ty_1>(),
8usize,
concat!(
"Alignment of ",
stringify!(ble_gatt_register_ctxt__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gatt_register_ctxt__bindgen_ty_1>())).svc as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_register_ctxt__bindgen_ty_1),
"::",
stringify!(svc)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gatt_register_ctxt__bindgen_ty_1>())).chr as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_register_ctxt__bindgen_ty_1),
"::",
stringify!(chr)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_gatt_register_ctxt__bindgen_ty_1>())).dsc as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_register_ctxt__bindgen_ty_1),
"::",
stringify!(dsc)
)
);
}
#[test]
fn bindgen_test_layout_ble_gatt_register_ctxt() {
assert_eq!(
::core::mem::size_of::<ble_gatt_register_ctxt>(),
40usize,
concat!("Size of: ", stringify!(ble_gatt_register_ctxt))
);
assert_eq!(
::core::mem::align_of::<ble_gatt_register_ctxt>(),
8usize,
concat!("Alignment of ", stringify!(ble_gatt_register_ctxt))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_gatt_register_ctxt>())).op as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_gatt_register_ctxt),
"::",
stringify!(op)
)
);
}
pub type ble_gatt_register_fn = ::core::option::Option<
unsafe extern "C" fn(ctxt: *mut ble_gatt_register_ctxt, arg: *mut cty::c_void),
>;
extern "C" {
#[doc = " Queues a set of service definitions for registration. All services queued"]
#[doc = " in this manner get registered when ble_gatts_start() is called."]
#[doc = ""]
#[doc = " @param svcs An array of service definitions to queue for"]
#[doc = " registration. This array must be"]
#[doc = " terminated with an entry whose 'type'"]
#[doc = " equals 0."]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " BLE_HS_ENOMEM on heap exhaustion."]
pub fn ble_gatts_add_svcs(svcs: *const ble_gatt_svc_def) -> cty::c_int;
}
extern "C" {
#[doc = " Set visibility of local GATT service. Invisible services are not removed"]
#[doc = " from database but are not discoverable by peer devices. Service Changed"]
#[doc = " should be handled by application when needed by calling"]
#[doc = " ble_svc_gatt_changed()."]
#[doc = ""]
#[doc = " @param handle Handle of service"]
#[doc = " @param visible non-zero if service should be visible"]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " BLE_HS_ENOENT if service wasn't found."]
pub fn ble_gatts_svc_set_visibility(handle: u16, visible: cty::c_int) -> cty::c_int;
}
extern "C" {
#[doc = " Adjusts a host configuration object's settings to accommodate the specified"]
#[doc = " service definition array. This function adds the counts to the appropriate"]
#[doc = " fields in the supplied configuration object without clearing them first, so"]
#[doc = " it can be called repeatedly with different inputs to calculate totals. Be"]
#[doc = " sure to zero the GATT server settings prior to the first call to this"]
#[doc = " function."]
#[doc = ""]
#[doc = " @param defs The service array containing the resource"]
#[doc = " definitions to be counted."]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " BLE_HS_EINVAL if the svcs array contains an"]
#[doc = " invalid resource definition."]
pub fn ble_gatts_count_cfg(defs: *const ble_gatt_svc_def) -> cty::c_int;
}
extern "C" {
#[doc = " Send notification (or indication) to any connected devices that have"]
#[doc = " subscribed for notification (or indication) for specified characteristic."]
#[doc = ""]
#[doc = " @param chr_val_handle Characteristic value handle"]
pub fn ble_gatts_chr_updated(chr_val_handle: u16);
}
extern "C" {
#[doc = " Retrieves the attribute handle associated with a local GATT service."]
#[doc = ""]
#[doc = " @param uuid The UUID of the service to look up."]
#[doc = " @param out_handle On success, populated with the handle of the"]
#[doc = " service attribute. Pass null if you don't"]
#[doc = " need this value."]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " BLE_HS_ENOENT if the specified service could"]
#[doc = " not be found."]
pub fn ble_gatts_find_svc(uuid: *const ble_uuid_t, out_handle: *mut u16) -> cty::c_int;
}
extern "C" {
#[doc = " Retrieves the pair of attribute handles associated with a local GATT"]
#[doc = " characteristic."]
#[doc = ""]
#[doc = " @param svc_uuid The UUID of the parent service."]
#[doc = " @param chr_uuid The UUID of the characteristic to look up."]
#[doc = " @param out_def_handle On success, populated with the handle"]
#[doc = " of the characteristic definition attribute."]
#[doc = " Pass null if you don't need this value."]
#[doc = " @param out_val_handle On success, populated with the handle"]
#[doc = " of the characteristic value attribute."]
#[doc = " Pass null if you don't need this value."]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " BLE_HS_ENOENT if the specified service or"]
#[doc = " characteristic could not be found."]
pub fn ble_gatts_find_chr(
svc_uuid: *const ble_uuid_t,
chr_uuid: *const ble_uuid_t,
out_def_handle: *mut u16,
out_val_handle: *mut u16,
) -> cty::c_int;
}
extern "C" {
#[doc = " Retrieves the attribute handle associated with a local GATT descriptor."]
#[doc = ""]
#[doc = " @param svc_uuid The UUID of the grandparent service."]
#[doc = " @param chr_uuid The UUID of the parent characteristic."]
#[doc = " @param dsc_uuid The UUID of the descriptor ro look up."]
#[doc = " @param out_handle On success, populated with the handle"]
#[doc = " of the descriptor attribute. Pass null if"]
#[doc = " you don't need this value."]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " BLE_HS_ENOENT if the specified service,"]
#[doc = " characteristic, or descriptor could not be"]
#[doc = " found."]
pub fn ble_gatts_find_dsc(
svc_uuid: *const ble_uuid_t,
chr_uuid: *const ble_uuid_t,
dsc_uuid: *const ble_uuid_t,
out_dsc_handle: *mut u16,
) -> cty::c_int;
}
pub type ble_gatt_svc_foreach_fn = ::core::option::Option<
unsafe extern "C" fn(
svc: *const ble_gatt_svc_def,
handle: u16,
end_group_handle: u16,
arg: *mut cty::c_void,
),
>;
extern "C" {
#[doc = " Prints dump of local GATT database. This is useful to log local state of"]
#[doc = " database in human readable form."]
pub fn ble_gatts_show_local();
}
extern "C" {
#[doc = " Resets the GATT server to its initial state. On success, this function"]
#[doc = " removes all supported services, characteristics, and descriptors. This"]
#[doc = " function requires that:"]
#[doc = " o No peers are connected, and"]
#[doc = " o No GAP operations are active (advertise, discover, or connect)."]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " BLE_HS_EBUSY if the GATT server could not be"]
#[doc = " reset due to existing connections or active"]
#[doc = " GAP procedures."]
pub fn ble_gatts_reset() -> cty::c_int;
}
extern "C" {
#[doc = " Makes all registered services available to peers. This function gets called"]
#[doc = " automatically by the NimBLE host on startup; manual calls are only necessary"]
#[doc = " for replacing the set of supported services with a new one. This function"]
#[doc = " requires that:"]
#[doc = " o No peers are connected, and"]
#[doc = " o No GAP operations are active (advertise, discover, or connect)."]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " A BLE host core return code on unexpected"]
#[doc = " error."]
pub fn ble_gatts_start() -> cty::c_int;
}
extern "C" {
#[doc = " Generates a new random address. This function does not configure the device"]
#[doc = " with the new address; the caller can use the address in subsequent"]
#[doc = " operations."]
#[doc = ""]
#[doc = " @param nrpa The type of random address to generate:"]
#[doc = " 0: static"]
#[doc = " 1: non-resolvable private"]
#[doc = " @param out_addr On success, the generated address gets written"]
#[doc = " here."]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on failure."]
pub fn ble_hs_id_gen_rnd(nrpa: cty::c_int, out_addr: *mut ble_addr_t) -> cty::c_int;
}
extern "C" {
#[doc = " Sets the device's random address. The address type (static vs."]
#[doc = " non-resolvable private) is inferred from the most-significant byte of the"]
#[doc = " address. The address is specified in host byte order (little-endian!)."]
#[doc = ""]
#[doc = " @param rnd_addr The random address to set."]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " BLE_HS_EINVAL if the specified address is not a"]
#[doc = " valid static random or non-resolvable"]
#[doc = " private address."]
#[doc = " Other nonzero on error."]
pub fn ble_hs_id_set_rnd(rnd_addr: *const u8) -> cty::c_int;
}
extern "C" {
#[doc = " Retrieves one of the device's identity addresses. The device can have two"]
#[doc = " identity addresses: one public and one random. The id_addr_type argument"]
#[doc = " specifies which of these two addresses to retrieve."]
#[doc = ""]
#[doc = " @param id_addr_type The type of identity address to retrieve."]
#[doc = " Valid values are:"]
#[doc = " o BLE_ADDR_PUBLIC"]
#[doc = " o BLE_ADDR_RANDOM"]
#[doc = " @param out_id_addr On success, the requested identity address is"]
#[doc = " copied into this buffer. The buffer must"]
#[doc = " be at least six bytes in size. Pass NULL"]
#[doc = " if you do not require this information."]
#[doc = " @param out_is_nrpa On success, the pointed-to value indicates"]
#[doc = " whether the retrieved address is a"]
#[doc = " non-resolvable private address. Pass NULL"]
#[doc = " if you do not require this information."]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " BLE_HS_EINVAL if an invalid address type was"]
#[doc = " specified;"]
#[doc = " BLE_HS_ENOADDR if the device does not have an"]
#[doc = " identity address of the requested type;"]
#[doc = " Other BLE host core code on error."]
pub fn ble_hs_id_copy_addr(
id_addr_type: u8,
out_id_addr: *mut u8,
out_is_nrpa: *mut cty::c_int,
) -> cty::c_int;
}
extern "C" {
#[doc = " Determines the best address type to use for automatic address type"]
#[doc = " resolution. Calculation of the best address type is done as follows:"]
#[doc = ""]
#[doc = " if privacy requested:"]
#[doc = " if we have a random static address:"]
#[doc = " --> RPA with static random ID"]
#[doc = " else"]
#[doc = " --> RPA with public ID"]
#[doc = " end"]
#[doc = " else"]
#[doc = " if we have a random static address:"]
#[doc = " --> random static address"]
#[doc = " else"]
#[doc = " --> public address"]
#[doc = " end"]
#[doc = " end"]
#[doc = ""]
#[doc = " @param privacy (0/1) Whether to use a private address."]
#[doc = " @param out_addr_type On success, the \"own addr type\" code gets"]
#[doc = " written here."]
#[doc = ""]
#[doc = " @return 0 if an address type was successfully inferred."]
#[doc = " BLE_HS_ENOADDR if the device does not have a"]
#[doc = " suitable address."]
#[doc = " Other BLE host core code on error."]
pub fn ble_hs_id_infer_auto(privacy: cty::c_int, out_addr_type: *mut u8) -> cty::c_int;
}
extern "C" {
#[doc = " Queries the controller for the channel map used with the specified"]
#[doc = " connection. The channel map is represented as an array of five bytes, with"]
#[doc = " each bit corresponding to an individual channel. The array is interpreted"]
#[doc = " as little-endian, such that:"]
#[doc = " map[0] & 0x01 --> Channel 0."]
#[doc = " map[0] & 0x02 --> Channel 1."]
#[doc = " ..."]
#[doc = " map[1] & 0x01 --> Channel 8."]
#[doc = ""]
#[doc = " As there are 37 channels, only the first 37 bits get written."]
#[doc = ""]
#[doc = " If a bit is 1, the corresponding channel is used. Otherwise, the channel is"]
#[doc = " unused."]
#[doc = ""]
#[doc = " @param conn_handle The handle of the connection whose channel map"]
#[doc = " is being read."]
#[doc = " @param out_chan_map On success, the retrieved channel map gets"]
#[doc = " written here. This buffer must have a size"]
#[doc = " >= 5 bytes."]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " A BLE host HCI return code if the controller"]
#[doc = " rejected the request;"]
#[doc = " A BLE host core return code on unexpected"]
#[doc = " error."]
pub fn ble_hs_hci_read_chan_map(conn_handle: u16, out_chan_map: *mut u8) -> cty::c_int;
}
extern "C" {
#[doc = " Instructs the controller to use the specified channel map. The channel map"]
#[doc = " is represented as an array of five bytes, with each bit corresponding to an"]
#[doc = " individual channel. The array is interpreted as little-endian, such that:"]
#[doc = " map[0] & 0x01 --> Channel 0."]
#[doc = " map[0] & 0x02 --> Channel 1."]
#[doc = " ..."]
#[doc = " map[1] & 0x01 --> Channel 8."]
#[doc = ""]
#[doc = " As there are 37 channels, only the first 37 bits should be written are used."]
#[doc = ""]
#[doc = " If a bit is 1, the corresponding channel can be used. Otherwise, the"]
#[doc = " channel should not be used."]
#[doc = ""]
#[doc = " @param chan_map The channel map to configure. This buffer"]
#[doc = " should have a size of 5 bytes."]
#[doc = ""]
#[doc = " @return 0 on success;"]
#[doc = " A BLE host HCI return code if the controller"]
#[doc = " rejected the request;"]
#[doc = " A BLE host core return code on unexpected"]
#[doc = " error."]
pub fn ble_hs_hci_set_chan_class(chan_map: *const u8) -> cty::c_int;
}
pub type va_list = __builtin_va_list;
pub type __gnuc_va_list = __builtin_va_list;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __mbstate_t {
pub __count: cty::c_int,
pub __value: __mbstate_t__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union __mbstate_t__bindgen_ty_1 {
pub __wch: cty::c_uint,
pub __wchb: [cty::c_char; 4usize],
_bindgen_union_align: u32,
}
#[test]
fn bindgen_test_layout___mbstate_t__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<__mbstate_t__bindgen_ty_1>(),
4usize,
concat!("Size of: ", stringify!(__mbstate_t__bindgen_ty_1))
);
assert_eq!(
::core::mem::align_of::<__mbstate_t__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(__mbstate_t__bindgen_ty_1))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<__mbstate_t__bindgen_ty_1>())).__wch as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(__mbstate_t__bindgen_ty_1),
"::",
stringify!(__wch)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<__mbstate_t__bindgen_ty_1>())).__wchb as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(__mbstate_t__bindgen_ty_1),
"::",
stringify!(__wchb)
)
);
}
#[test]
fn bindgen_test_layout___mbstate_t() {
assert_eq!(
::core::mem::size_of::<__mbstate_t>(),
8usize,
concat!("Size of: ", stringify!(__mbstate_t))
);
assert_eq!(
::core::mem::align_of::<__mbstate_t>(),
4usize,
concat!("Alignment of ", stringify!(__mbstate_t))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<__mbstate_t>())).__count as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__mbstate_t),
"::",
stringify!(__count)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<__mbstate_t>())).__value as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(__mbstate_t),
"::",
stringify!(__value)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _G_fpos_t {
pub __pos: __off_t,
pub __state: __mbstate_t,
}
#[test]
fn bindgen_test_layout__G_fpos_t() {
assert_eq!(
::core::mem::size_of::<_G_fpos_t>(),
16usize,
concat!("Size of: ", stringify!(_G_fpos_t))
);
assert_eq!(
::core::mem::align_of::<_G_fpos_t>(),
8usize,
concat!("Alignment of ", stringify!(_G_fpos_t))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_G_fpos_t>())).__pos as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_G_fpos_t),
"::",
stringify!(__pos)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_G_fpos_t>())).__state as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_G_fpos_t),
"::",
stringify!(__state)
)
);
}
pub type __fpos_t = _G_fpos_t;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _G_fpos64_t {
pub __pos: __off64_t,
pub __state: __mbstate_t,
}
#[test]
fn bindgen_test_layout__G_fpos64_t() {
assert_eq!(
::core::mem::size_of::<_G_fpos64_t>(),
16usize,
concat!("Size of: ", stringify!(_G_fpos64_t))
);
assert_eq!(
::core::mem::align_of::<_G_fpos64_t>(),
8usize,
concat!("Alignment of ", stringify!(_G_fpos64_t))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_G_fpos64_t>())).__pos as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_G_fpos64_t),
"::",
stringify!(__pos)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_G_fpos64_t>())).__state as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_G_fpos64_t),
"::",
stringify!(__state)
)
);
}
pub type __fpos64_t = _G_fpos64_t;
pub type __FILE = _IO_FILE;
pub type FILE = _IO_FILE;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_marker {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_codecvt {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_wide_data {
_unused: [u8; 0],
}
pub type _IO_lock_t = cty::c_void;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_FILE {
pub _flags: cty::c_int,
pub _IO_read_ptr: *mut cty::c_char,
pub _IO_read_end: *mut cty::c_char,
pub _IO_read_base: *mut cty::c_char,
pub _IO_write_base: *mut cty::c_char,
pub _IO_write_ptr: *mut cty::c_char,
pub _IO_write_end: *mut cty::c_char,
pub _IO_buf_base: *mut cty::c_char,
pub _IO_buf_end: *mut cty::c_char,
pub _IO_save_base: *mut cty::c_char,
pub _IO_backup_base: *mut cty::c_char,
pub _IO_save_end: *mut cty::c_char,
pub _markers: *mut _IO_marker,
pub _chain: *mut _IO_FILE,
pub _fileno: cty::c_int,
pub _flags2: cty::c_int,
pub _old_offset: __off_t,
pub _cur_column: cty::c_ushort,
pub _vtable_offset: cty::c_schar,
pub _shortbuf: [cty::c_char; 1usize],
pub _lock: *mut _IO_lock_t,
pub _offset: __off64_t,
pub _codecvt: *mut _IO_codecvt,
pub _wide_data: *mut _IO_wide_data,
pub _freeres_list: *mut _IO_FILE,
pub _freeres_buf: *mut cty::c_void,
pub __pad5: size_t,
pub _mode: cty::c_int,
pub _unused2: [cty::c_char; 20usize],
}
#[test]
fn bindgen_test_layout__IO_FILE() {
assert_eq!(
::core::mem::size_of::<_IO_FILE>(),
216usize,
concat!("Size of: ", stringify!(_IO_FILE))
);
assert_eq!(
::core::mem::align_of::<_IO_FILE>(),
8usize,
concat!("Alignment of ", stringify!(_IO_FILE))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._flags as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_flags)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._IO_read_ptr as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_read_ptr)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._IO_read_end as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_read_end)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._IO_read_base as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_read_base)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._IO_write_base as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_write_base)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._IO_write_ptr as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_write_ptr)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._IO_write_end as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_write_end)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._IO_buf_base as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_buf_base)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._IO_buf_end as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_buf_end)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._IO_save_base as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_save_base)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._IO_backup_base as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_backup_base)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._IO_save_end as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_save_end)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._markers as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_markers)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._chain as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_chain)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._fileno as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_fileno)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._flags2 as *const _ as usize },
116usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_flags2)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._old_offset as *const _ as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_old_offset)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._cur_column as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_cur_column)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._vtable_offset as *const _ as usize },
130usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_vtable_offset)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._shortbuf as *const _ as usize },
131usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_shortbuf)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._lock as *const _ as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_lock)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._offset as *const _ as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_offset)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._codecvt as *const _ as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_codecvt)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._wide_data as *const _ as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_wide_data)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._freeres_list as *const _ as usize },
168usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_freeres_list)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._freeres_buf as *const _ as usize },
176usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_freeres_buf)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>())).__pad5 as *const _ as usize },
184usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(__pad5)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._mode as *const _ as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_mode)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._unused2 as *const _ as usize },
196usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_unused2)
)
);
}
pub type off_t = __off_t;
pub type ssize_t = __ssize_t;
pub type fpos_t = __fpos_t;
extern "C" {
pub static mut stdin: *mut FILE;
}
extern "C" {
pub static mut stdout: *mut FILE;
}
extern "C" {
pub static mut stderr: *mut FILE;
}
extern "C" {
pub fn remove(__filename: *const cty::c_char) -> cty::c_int;
}
extern "C" {
pub fn rename(__old: *const cty::c_char, __new: *const cty::c_char) -> cty::c_int;
}
extern "C" {
pub fn renameat(
__oldfd: cty::c_int,
__old: *const cty::c_char,
__newfd: cty::c_int,
__new: *const cty::c_char,
) -> cty::c_int;
}
extern "C" {
pub fn tmpfile() -> *mut FILE;
}
extern "C" {
pub fn tmpnam(__s: *mut cty::c_char) -> *mut cty::c_char;
}
extern "C" {
pub fn tmpnam_r(__s: *mut cty::c_char) -> *mut cty::c_char;
}
extern "C" {
pub fn tempnam(__dir: *const cty::c_char, __pfx: *const cty::c_char) -> *mut cty::c_char;
}
extern "C" {
pub fn fclose(__stream: *mut FILE) -> cty::c_int;
}
extern "C" {
pub fn fflush(__stream: *mut FILE) -> cty::c_int;
}
extern "C" {
pub fn fflush_unlocked(__stream: *mut FILE) -> cty::c_int;
}
extern "C" {
pub fn fopen(__filename: *const cty::c_char, __modes: *const cty::c_char) -> *mut FILE;
}
extern "C" {
pub fn freopen(
__filename: *const cty::c_char,
__modes: *const cty::c_char,
__stream: *mut FILE,
) -> *mut FILE;
}
extern "C" {
pub fn fdopen(__fd: cty::c_int, __modes: *const cty::c_char) -> *mut FILE;
}
extern "C" {
pub fn fmemopen(__s: *mut cty::c_void, __len: size_t, __modes: *const cty::c_char)
-> *mut FILE;
}
extern "C" {
pub fn open_memstream(__bufloc: *mut *mut cty::c_char, __sizeloc: *mut size_t) -> *mut FILE;
}
extern "C" {
pub fn setbuf(__stream: *mut FILE, __buf: *mut cty::c_char);
}
extern "C" {
pub fn setvbuf(
__stream: *mut FILE,
__buf: *mut cty::c_char,
__modes: cty::c_int,
__n: size_t,
) -> cty::c_int;
}
extern "C" {
pub fn setbuffer(__stream: *mut FILE, __buf: *mut cty::c_char, __size: size_t);
}
extern "C" {
pub fn setlinebuf(__stream: *mut FILE);
}
extern "C" {
pub fn fprintf(__stream: *mut FILE, __format: *const cty::c_char, ...) -> cty::c_int;
}
extern "C" {
pub fn printf(__format: *const cty::c_char, ...) -> cty::c_int;
}
extern "C" {
pub fn sprintf(__s: *mut cty::c_char, __format: *const cty::c_char, ...) -> cty::c_int;
}
extern "C" {
pub fn vfprintf(
__s: *mut FILE,
__format: *const cty::c_char,
__arg: *mut __va_list_tag,
) -> cty::c_int;
}
extern "C" {
pub fn vprintf(__format: *const cty::c_char, __arg: *mut __va_list_tag) -> cty::c_int;
}
extern "C" {
pub fn vsprintf(
__s: *mut cty::c_char,
__format: *const cty::c_char,
__arg: *mut __va_list_tag,
) -> cty::c_int;
}
extern "C" {
pub fn snprintf(
__s: *mut cty::c_char,
__maxlen: cty::c_ulong,
__format: *const cty::c_char,
...
) -> cty::c_int;
}
extern "C" {
pub fn vsnprintf(
__s: *mut cty::c_char,
__maxlen: cty::c_ulong,
__format: *const cty::c_char,
__arg: *mut __va_list_tag,
) -> cty::c_int;
}
extern "C" {
pub fn vdprintf(
__fd: cty::c_int,
__fmt: *const cty::c_char,
__arg: *mut __va_list_tag,
) -> cty::c_int;
}
extern "C" {
pub fn dprintf(__fd: cty::c_int, __fmt: *const cty::c_char, ...) -> cty::c_int;
}
extern "C" {
pub fn fscanf(__stream: *mut FILE, __format: *const cty::c_char, ...) -> cty::c_int;
}
extern "C" {
pub fn scanf(__format: *const cty::c_char, ...) -> cty::c_int;
}
extern "C" {
pub fn sscanf(__s: *const cty::c_char, __format: *const cty::c_char, ...) -> cty::c_int;
}
extern "C" {
#[link_name = "\u{1}__isoc99_fscanf"]
pub fn fscanf1(__stream: *mut FILE, __format: *const cty::c_char, ...) -> cty::c_int;
}
extern "C" {
#[link_name = "\u{1}__isoc99_scanf"]
pub fn scanf1(__format: *const cty::c_char, ...) -> cty::c_int;
}
extern "C" {
#[link_name = "\u{1}__isoc99_sscanf"]
pub fn sscanf1(__s: *const cty::c_char, __format: *const cty::c_char, ...) -> cty::c_int;
}
extern "C" {
pub fn vfscanf(
__s: *mut FILE,
__format: *const cty::c_char,
__arg: *mut __va_list_tag,
) -> cty::c_int;
}
extern "C" {
pub fn vscanf(__format: *const cty::c_char, __arg: *mut __va_list_tag) -> cty::c_int;
}
extern "C" {
pub fn vsscanf(
__s: *const cty::c_char,
__format: *const cty::c_char,
__arg: *mut __va_list_tag,
) -> cty::c_int;
}
extern "C" {
#[link_name = "\u{1}__isoc99_vfscanf"]
pub fn vfscanf1(
__s: *mut FILE,
__format: *const cty::c_char,
__arg: *mut __va_list_tag,
) -> cty::c_int;
}
extern "C" {
#[link_name = "\u{1}__isoc99_vscanf"]
pub fn vscanf1(__format: *const cty::c_char, __arg: *mut __va_list_tag) -> cty::c_int;
}
extern "C" {
#[link_name = "\u{1}__isoc99_vsscanf"]
pub fn vsscanf1(
__s: *const cty::c_char,
__format: *const cty::c_char,
__arg: *mut __va_list_tag,
) -> cty::c_int;
}
extern "C" {
pub fn fgetc(__stream: *mut FILE) -> cty::c_int;
}
extern "C" {
pub fn getc(__stream: *mut FILE) -> cty::c_int;
}
extern "C" {
pub fn getchar() -> cty::c_int;
}
extern "C" {
pub fn getc_unlocked(__stream: *mut FILE) -> cty::c_int;
}
extern "C" {
pub fn getchar_unlocked() -> cty::c_int;
}
extern "C" {
pub fn fgetc_unlocked(__stream: *mut FILE) -> cty::c_int;
}
extern "C" {
pub fn fputc(__c: cty::c_int, __stream: *mut FILE) -> cty::c_int;
}
extern "C" {
pub fn putc(__c: cty::c_int, __stream: *mut FILE) -> cty::c_int;
}
extern "C" {
pub fn putchar(__c: cty::c_int) -> cty::c_int;
}
extern "C" {
pub fn fputc_unlocked(__c: cty::c_int, __stream: *mut FILE) -> cty::c_int;
}
extern "C" {
pub fn putc_unlocked(__c: cty::c_int, __stream: *mut FILE) -> cty::c_int;
}
extern "C" {
pub fn putchar_unlocked(__c: cty::c_int) -> cty::c_int;
}
extern "C" {
pub fn getw(__stream: *mut FILE) -> cty::c_int;
}
extern "C" {
pub fn putw(__w: cty::c_int, __stream: *mut FILE) -> cty::c_int;
}
extern "C" {
pub fn fgets(__s: *mut cty::c_char, __n: cty::c_int, __stream: *mut FILE) -> *mut cty::c_char;
}
extern "C" {
pub fn __getdelim(
__lineptr: *mut *mut cty::c_char,
__n: *mut size_t,
__delimiter: cty::c_int,
__stream: *mut FILE,
) -> __ssize_t;
}
extern "C" {
pub fn getdelim(
__lineptr: *mut *mut cty::c_char,
__n: *mut size_t,
__delimiter: cty::c_int,
__stream: *mut FILE,
) -> __ssize_t;
}
extern "C" {
pub fn getline(
__lineptr: *mut *mut cty::c_char,
__n: *mut size_t,
__stream: *mut FILE,
) -> __ssize_t;
}
extern "C" {
pub fn fputs(__s: *const cty::c_char, __stream: *mut FILE) -> cty::c_int;
}
extern "C" {
pub fn puts(__s: *const cty::c_char) -> cty::c_int;
}
extern "C" {
pub fn ungetc(__c: cty::c_int, __stream: *mut FILE) -> cty::c_int;
}
extern "C" {
pub fn fread(
__ptr: *mut cty::c_void,
__size: cty::c_ulong,
__n: cty::c_ulong,
__stream: *mut FILE,
) -> cty::c_ulong;
}
extern "C" {
pub fn fwrite(
__ptr: *const cty::c_void,
__size: cty::c_ulong,
__n: cty::c_ulong,
__s: *mut FILE,
) -> cty::c_ulong;
}
extern "C" {
pub fn fread_unlocked(
__ptr: *mut cty::c_void,
__size: size_t,
__n: size_t,
__stream: *mut FILE,
) -> size_t;
}
extern "C" {
pub fn fwrite_unlocked(
__ptr: *const cty::c_void,
__size: size_t,
__n: size_t,
__stream: *mut FILE,
) -> size_t;
}
extern "C" {
pub fn fseek(__stream: *mut FILE, __off: cty::c_long, __whence: cty::c_int) -> cty::c_int;
}
extern "C" {
pub fn ftell(__stream: *mut FILE) -> cty::c_long;
}
extern "C" {
pub fn rewind(__stream: *mut FILE);
}
extern "C" {
pub fn fseeko(__stream: *mut FILE, __off: __off_t, __whence: cty::c_int) -> cty::c_int;
}
extern "C" {
pub fn ftello(__stream: *mut FILE) -> __off_t;
}
extern "C" {
pub fn fgetpos(__stream: *mut FILE, __pos: *mut fpos_t) -> cty::c_int;
}
extern "C" {
pub fn fsetpos(__stream: *mut FILE, __pos: *const fpos_t) -> cty::c_int;
}
extern "C" {
pub fn clearerr(__stream: *mut FILE);
}
extern "C" {
pub fn feof(__stream: *mut FILE) -> cty::c_int;
}
extern "C" {
pub fn ferror(__stream: *mut FILE) -> cty::c_int;
}
extern "C" {
pub fn clearerr_unlocked(__stream: *mut FILE);
}
extern "C" {
pub fn feof_unlocked(__stream: *mut FILE) -> cty::c_int;
}
extern "C" {
pub fn ferror_unlocked(__stream: *mut FILE) -> cty::c_int;
}
extern "C" {
pub fn perror(__s: *const cty::c_char);
}
extern "C" {
pub static mut sys_nerr: cty::c_int;
}
extern "C" {
pub static mut sys_errlist: [*const cty::c_char; 0usize];
}
extern "C" {
pub fn fileno(__stream: *mut FILE) -> cty::c_int;
}
extern "C" {
pub fn fileno_unlocked(__stream: *mut FILE) -> cty::c_int;
}
extern "C" {
pub fn popen(__command: *const cty::c_char, __modes: *const cty::c_char) -> *mut FILE;
}
extern "C" {
pub fn pclose(__stream: *mut FILE) -> cty::c_int;
}
extern "C" {
pub fn ctermid(__s: *mut cty::c_char) -> *mut cty::c_char;
}
extern "C" {
pub fn flockfile(__stream: *mut FILE);
}
extern "C" {
pub fn ftrylockfile(__stream: *mut FILE) -> cty::c_int;
}
extern "C" {
pub fn funlockfile(__stream: *mut FILE);
}
extern "C" {
pub fn __uflow(arg1: *mut FILE) -> cty::c_int;
}
extern "C" {
pub fn __overflow(arg1: *mut FILE, arg2: cty::c_int) -> cty::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct log {}
#[test]
fn bindgen_test_layout_log() {
assert_eq!(
::core::mem::size_of::<log>(),
0usize,
concat!("Size of: ", stringify!(log))
);
assert_eq!(
::core::mem::align_of::<log>(),
1usize,
concat!("Alignment of ", stringify!(log))
);
}
extern "C" {
pub fn ble_hs_log_mbuf(om: *const os_mbuf);
}
extern "C" {
pub fn ble_hs_log_flat_buf(data: *const cty::c_void, len: cty::c_int);
}
extern "C" {
#[doc = " Allocates an mbuf suitable for an ATT command packet. The resulting packet"]
#[doc = " has sufficient leading space for:"]
#[doc = " - ACL data header"]
#[doc = " - L2CAP B-frame header"]
#[doc = " - Largest ATT command base (prepare write request / response)."]
#[doc = ""]
#[doc = " @return An empty mbuf on success, NULL on error."]
pub fn ble_hs_mbuf_att_pkt() -> *mut os_mbuf;
}
extern "C" {
#[doc = " Allocates an mbuf and fills it with the contents of the specified flat"]
#[doc = " buffer."]
#[doc = ""]
#[doc = " @param buf The flat buffer to copy from."]
#[doc = " @param len The length of the flat buffer."]
#[doc = ""]
#[doc = " @return A newly-allocated mbuf on success, NULL on error."]
pub fn ble_hs_mbuf_from_flat(buf: *const cty::c_void, len: u16) -> *mut os_mbuf;
}
extern "C" {
#[doc = " Copies the contents of an mbuf into the specified flat buffer. If the flat"]
#[doc = " buffer is too small to contain the mbuf's contents, it is filled to capacity"]
#[doc = " and BLE_HS_EMSGSIZE is returned."]
#[doc = ""]
#[doc = " @param om The mbuf to copy from."]
#[doc = " @param flat The destination flat buffer."]
#[doc = " @param max_len The size of the flat buffer."]
#[doc = " @param out_copy_len The number of bytes actually copied gets written here."]
#[doc = ""]
#[doc = " @return 0 on success or BLE host core return code on error."]
pub fn ble_hs_mbuf_to_flat(
om: *const os_mbuf,
flat: *mut cty::c_void,
max_len: u16,
out_copy_len: *mut u16,
) -> cty::c_int;
}
#[doc = " @typedef ble_hs_stop_fn"]
#[doc = " @brief Callback function; reports the result of a host stop procedure."]
#[doc = ""]
#[doc = " @param status The result of the host stop procedure. One of"]
#[doc = " the HAL_RESET_[...] codes or an"]
#[doc = " implementation-defined value."]
#[doc = " @param arg Optional argument specified when the stop"]
#[doc = " procedure was initiated."]
#[doc = ""]
pub type ble_hs_stop_fn =
::core::option::Option<unsafe extern "C" fn(status: cty::c_int, arg: *mut cty::c_void)>;
#[doc = " @brief Used to report the result of a stop procedure."]
#[doc = ""]
#[doc = " This should be used as an opaque structure and not modified manually."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hs_stop_listener {
pub fn_: ble_hs_stop_fn,
pub arg: *mut cty::c_void,
pub link: ble_hs_stop_listener__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hs_stop_listener__bindgen_ty_1 {
pub sle_next: *mut ble_hs_stop_listener,
}
#[test]
fn bindgen_test_layout_ble_hs_stop_listener__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<ble_hs_stop_listener__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(ble_hs_stop_listener__bindgen_ty_1))
);
assert_eq!(
::core::mem::align_of::<ble_hs_stop_listener__bindgen_ty_1>(),
8usize,
concat!(
"Alignment of ",
stringify!(ble_hs_stop_listener__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_hs_stop_listener__bindgen_ty_1>())).sle_next as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_stop_listener__bindgen_ty_1),
"::",
stringify!(sle_next)
)
);
}
#[test]
fn bindgen_test_layout_ble_hs_stop_listener() {
assert_eq!(
::core::mem::size_of::<ble_hs_stop_listener>(),
24usize,
concat!("Size of: ", stringify!(ble_hs_stop_listener))
);
assert_eq!(
::core::mem::align_of::<ble_hs_stop_listener>(),
8usize,
concat!("Alignment of ", stringify!(ble_hs_stop_listener))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_stop_listener>())).fn_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_stop_listener),
"::",
stringify!(fn_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_stop_listener>())).arg as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_stop_listener),
"::",
stringify!(arg)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_stop_listener>())).link as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_stop_listener),
"::",
stringify!(link)
)
);
}
extern "C" {
#[doc = " @brief Stops the BLE host."]
#[doc = ""]
#[doc = " Aborts all active GAP procedures and terminates all open connections."]
#[doc = " Connection termination is performed asynchronously, so this function's"]
#[doc = " result is reported via the provided listener."]
#[doc = ""]
#[doc = " @param listener A listener to populate. This object's initial"]
#[doc = " value doesn't matter, but its lifetime must"]
#[doc = " extend until the stop procedure completes."]
#[doc = " @param fn The callback to execute when the stop procedure"]
#[doc = " completes."]
#[doc = " @param arg Optional argument to pass to the callback."]
#[doc = ""]
#[doc = " @return 0: Stop procedure successfully initiated."]
#[doc = " BLE_HS_EBUSY: Stop procedure already in"]
#[doc = " progress; the provided callback gets called"]
#[doc = " when the procedure completes."]
#[doc = " BLE_HS_EALREADY: Host already stopped; the"]
#[doc = " provided callback does *not* get called."]
pub fn ble_hs_stop(
listener: *mut ble_hs_stop_listener,
fn_: ble_hs_stop_fn,
arg: *mut cty::c_void,
) -> cty::c_int;
}
extern "C" {
pub fn ble_ibeacon_set_adv_data(
uuid128: *mut cty::c_void,
major: u16,
minor: u16,
measured_power: i8,
) -> cty::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_l2cap_sig_update_req {
_unused: [u8; 0],
}
pub type ble_l2cap_sig_update_fn = ::core::option::Option<
unsafe extern "C" fn(conn_handle: u16, status: cty::c_int, arg: *mut cty::c_void),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_l2cap_sig_update_params {
pub itvl_min: u16,
pub itvl_max: u16,
pub slave_latency: u16,
pub timeout_multiplier: u16,
}
#[test]
fn bindgen_test_layout_ble_l2cap_sig_update_params() {
assert_eq!(
::core::mem::size_of::<ble_l2cap_sig_update_params>(),
8usize,
concat!("Size of: ", stringify!(ble_l2cap_sig_update_params))
);
assert_eq!(
::core::mem::align_of::<ble_l2cap_sig_update_params>(),
2usize,
concat!("Alignment of ", stringify!(ble_l2cap_sig_update_params))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_sig_update_params>())).itvl_min as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_sig_update_params),
"::",
stringify!(itvl_min)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_sig_update_params>())).itvl_max as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_sig_update_params),
"::",
stringify!(itvl_max)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_sig_update_params>())).slave_latency as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_sig_update_params),
"::",
stringify!(slave_latency)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_sig_update_params>())).timeout_multiplier as *const _
as usize
},
6usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_sig_update_params),
"::",
stringify!(timeout_multiplier)
)
);
}
extern "C" {
pub fn ble_l2cap_sig_update(
conn_handle: u16,
params: *mut ble_l2cap_sig_update_params,
cb: ble_l2cap_sig_update_fn,
cb_arg: *mut cty::c_void,
) -> cty::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_l2cap_chan {
_unused: [u8; 0],
}
#[doc = " Represents a L2CAP-related event."]
#[doc = " When such an event occurs, the host notifies the application by passing an"]
#[doc = " instance of this structure to an application-specified callback."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ble_l2cap_event {
#[doc = " Indicates the type of L2CAP event that occurred. This is one of the"]
#[doc = " BLE_L2CAP_EVENT codes."]
pub type_: u8,
pub __bindgen_anon_1: ble_l2cap_event__bindgen_ty_1,
}
#[doc = " A discriminated union containing additional details concerning the L2CAP"]
#[doc = " event. The 'type' field indicates which member of the union is valid."]
#[repr(C)]
#[derive(Copy, Clone)]
pub union ble_l2cap_event__bindgen_ty_1 {
pub connect: ble_l2cap_event__bindgen_ty_1__bindgen_ty_1,
pub disconnect: ble_l2cap_event__bindgen_ty_1__bindgen_ty_2,
pub accept: ble_l2cap_event__bindgen_ty_1__bindgen_ty_3,
pub receive: ble_l2cap_event__bindgen_ty_1__bindgen_ty_4,
pub tx_unstalled: ble_l2cap_event__bindgen_ty_1__bindgen_ty_5,
pub reconfigured: ble_l2cap_event__bindgen_ty_1__bindgen_ty_6,
_bindgen_union_align: [u64; 3usize],
}
#[doc = " Represents a connection attempt. Valid for the following event"]
#[doc = " types:"]
#[doc = " o BLE_L2CAP_EVENT_COC_CONNECTED"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_l2cap_event__bindgen_ty_1__bindgen_ty_1 {
#[doc = " The status of the connection attempt;"]
#[doc = " o 0: the connection was successfully established."]
#[doc = " o BLE host error code: the connection attempt failed for"]
#[doc = " the specified reason."]
pub status: cty::c_int,
#[doc = " Connection handle of the relevant connection"]
pub conn_handle: u16,
#[doc = " The L2CAP channel of the relevant L2CAP connection."]
pub chan: *mut ble_l2cap_chan,
}
#[test]
fn bindgen_test_layout_ble_l2cap_event__bindgen_ty_1__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_1>(),
16usize,
concat!(
"Size of: ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::core::mem::align_of::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_1>(),
8usize,
concat!(
"Alignment of ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_1>())).status
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_1>())).conn_handle
as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_1>())).chan
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(chan)
)
);
}
#[doc = " Represents a terminated connection. Valid for the following event"]
#[doc = " types:"]
#[doc = " o BLE_L2CAP_EVENT_COC_DISCONNECTED"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_l2cap_event__bindgen_ty_1__bindgen_ty_2 {
#[doc = " Connection handle of the relevant connection"]
pub conn_handle: u16,
#[doc = " Information about the L2CAP connection prior to termination."]
pub chan: *mut ble_l2cap_chan,
}
#[test]
fn bindgen_test_layout_ble_l2cap_event__bindgen_ty_1__bindgen_ty_2() {
assert_eq!(
::core::mem::size_of::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_2>(),
16usize,
concat!(
"Size of: ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
::core::mem::align_of::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_2>(),
8usize,
concat!(
"Alignment of ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_2>())).conn_handle
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_2>())).chan
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(chan)
)
);
}
#[doc = " Represents connection accept. Valid for the following event"]
#[doc = " types:"]
#[doc = " o BLE_L2CAP_EVENT_COC_ACCEPT"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_l2cap_event__bindgen_ty_1__bindgen_ty_3 {
#[doc = " Connection handle of the relevant connection"]
pub conn_handle: u16,
#[doc = " MTU supported by peer device on the channel"]
pub peer_sdu_size: u16,
#[doc = " The L2CAP channel of the relevant L2CAP connection."]
pub chan: *mut ble_l2cap_chan,
}
#[test]
fn bindgen_test_layout_ble_l2cap_event__bindgen_ty_1__bindgen_ty_3() {
assert_eq!(
::core::mem::size_of::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_3>(),
16usize,
concat!(
"Size of: ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
::core::mem::align_of::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_3>(),
8usize,
concat!(
"Alignment of ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_3>())).conn_handle
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_3>())).peer_sdu_size
as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(peer_sdu_size)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_3>())).chan
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(chan)
)
);
}
#[doc = " Represents received data. Valid for the following event"]
#[doc = " types:"]
#[doc = " o BLE_L2CAP_EVENT_COC_DATA_RECEIVED"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_l2cap_event__bindgen_ty_1__bindgen_ty_4 {
#[doc = " Connection handle of the relevant connection"]
pub conn_handle: u16,
#[doc = " The L2CAP channel of the relevant L2CAP connection."]
pub chan: *mut ble_l2cap_chan,
#[doc = " The mbuf with received SDU."]
pub sdu_rx: *mut os_mbuf,
}
#[test]
fn bindgen_test_layout_ble_l2cap_event__bindgen_ty_1__bindgen_ty_4() {
assert_eq!(
::core::mem::size_of::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_4>(),
24usize,
concat!(
"Size of: ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_4)
)
);
assert_eq!(
::core::mem::align_of::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_4>(),
8usize,
concat!(
"Alignment of ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_4)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_4>())).conn_handle
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_4),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_4>())).chan
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_4),
"::",
stringify!(chan)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_4>())).sdu_rx
as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_4),
"::",
stringify!(sdu_rx)
)
);
}
#[doc = " Represents tx_unstalled data. Valid for the following event"]
#[doc = " types:"]
#[doc = " o BLE_L2CAP_EVENT_COC_TX_UNSTALLED"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_l2cap_event__bindgen_ty_1__bindgen_ty_5 {
#[doc = " Connection handle of the relevant connection"]
pub conn_handle: u16,
#[doc = " The L2CAP channel of the relevant L2CAP connection."]
pub chan: *mut ble_l2cap_chan,
#[doc = " The status of the send attempt which was stalled due to"]
#[doc = " lack of credits; This can be non zero only if there"]
#[doc = " is an issue with memory allocation for following SDU fragments."]
#[doc = " In such a case last SDU has been partially sent to peer device"]
#[doc = " and it is up to application to decide how to handle it."]
pub status: cty::c_int,
}
#[test]
fn bindgen_test_layout_ble_l2cap_event__bindgen_ty_1__bindgen_ty_5() {
assert_eq!(
::core::mem::size_of::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_5>(),
24usize,
concat!(
"Size of: ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_5)
)
);
assert_eq!(
::core::mem::align_of::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_5>(),
8usize,
concat!(
"Alignment of ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_5)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_5>())).conn_handle
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_5),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_5>())).chan
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_5),
"::",
stringify!(chan)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_5>())).status
as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_5),
"::",
stringify!(status)
)
);
}
#[doc = " Represents reconfiguration done. Valid for the following event"]
#[doc = " types:"]
#[doc = " o BLE_L2CAP_EVENT_COC_RECONFIG_COMPLETED"]
#[doc = " o BLE_L2CAP_EVENT_COC_PEER_RECONFIGURED"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_l2cap_event__bindgen_ty_1__bindgen_ty_6 {
#[doc = " The status of the reconfiguration attempt;"]
#[doc = " o 0: the reconfiguration was successfully done."]
#[doc = " o BLE host error code: the reconfiguration attempt failed for"]
#[doc = " the specified reason."]
pub status: cty::c_int,
#[doc = " Connection handle of the relevant connection"]
pub conn_handle: u16,
#[doc = " The L2CAP channel of the relevant L2CAP connection."]
pub chan: *mut ble_l2cap_chan,
}
#[test]
fn bindgen_test_layout_ble_l2cap_event__bindgen_ty_1__bindgen_ty_6() {
assert_eq!(
::core::mem::size_of::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_6>(),
16usize,
concat!(
"Size of: ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_6)
)
);
assert_eq!(
::core::mem::align_of::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_6>(),
8usize,
concat!(
"Alignment of ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_6)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_6>())).status
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_6),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_6>())).conn_handle
as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_6),
"::",
stringify!(conn_handle)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_event__bindgen_ty_1__bindgen_ty_6>())).chan
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_event__bindgen_ty_1__bindgen_ty_6),
"::",
stringify!(chan)
)
);
}
#[test]
fn bindgen_test_layout_ble_l2cap_event__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<ble_l2cap_event__bindgen_ty_1>(),
24usize,
concat!("Size of: ", stringify!(ble_l2cap_event__bindgen_ty_1))
);
assert_eq!(
::core::mem::align_of::<ble_l2cap_event__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(ble_l2cap_event__bindgen_ty_1))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_event__bindgen_ty_1>())).connect as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_event__bindgen_ty_1),
"::",
stringify!(connect)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_event__bindgen_ty_1>())).disconnect as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_event__bindgen_ty_1),
"::",
stringify!(disconnect)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_event__bindgen_ty_1>())).accept as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_event__bindgen_ty_1),
"::",
stringify!(accept)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_event__bindgen_ty_1>())).receive as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_event__bindgen_ty_1),
"::",
stringify!(receive)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_event__bindgen_ty_1>())).tx_unstalled as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_event__bindgen_ty_1),
"::",
stringify!(tx_unstalled)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_event__bindgen_ty_1>())).reconfigured as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_event__bindgen_ty_1),
"::",
stringify!(reconfigured)
)
);
}
#[test]
fn bindgen_test_layout_ble_l2cap_event() {
assert_eq!(
::core::mem::size_of::<ble_l2cap_event>(),
32usize,
concat!("Size of: ", stringify!(ble_l2cap_event))
);
assert_eq!(
::core::mem::align_of::<ble_l2cap_event>(),
8usize,
concat!("Alignment of ", stringify!(ble_l2cap_event))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_l2cap_event>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_event),
"::",
stringify!(type_)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_l2cap_chan_info {
pub scid: u16,
pub dcid: u16,
pub our_l2cap_mtu: u16,
pub peer_l2cap_mtu: u16,
pub psm: u16,
pub our_coc_mtu: u16,
pub peer_coc_mtu: u16,
}
#[test]
fn bindgen_test_layout_ble_l2cap_chan_info() {
assert_eq!(
::core::mem::size_of::<ble_l2cap_chan_info>(),
14usize,
concat!("Size of: ", stringify!(ble_l2cap_chan_info))
);
assert_eq!(
::core::mem::align_of::<ble_l2cap_chan_info>(),
2usize,
concat!("Alignment of ", stringify!(ble_l2cap_chan_info))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_l2cap_chan_info>())).scid as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_chan_info),
"::",
stringify!(scid)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_l2cap_chan_info>())).dcid as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_chan_info),
"::",
stringify!(dcid)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_chan_info>())).our_l2cap_mtu as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_chan_info),
"::",
stringify!(our_l2cap_mtu)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_chan_info>())).peer_l2cap_mtu as *const _ as usize
},
6usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_chan_info),
"::",
stringify!(peer_l2cap_mtu)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_l2cap_chan_info>())).psm as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_chan_info),
"::",
stringify!(psm)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_chan_info>())).our_coc_mtu as *const _ as usize
},
10usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_chan_info),
"::",
stringify!(our_coc_mtu)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_l2cap_chan_info>())).peer_coc_mtu as *const _ as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(ble_l2cap_chan_info),
"::",
stringify!(peer_coc_mtu)
)
);
}
pub type ble_l2cap_event_fn = ::core::option::Option<
unsafe extern "C" fn(event: *mut ble_l2cap_event, arg: *mut cty::c_void) -> cty::c_int,
>;
extern "C" {
pub fn ble_l2cap_get_conn_handle(chan: *mut ble_l2cap_chan) -> u16;
}
extern "C" {
pub fn ble_l2cap_create_server(
psm: u16,
mtu: u16,
cb: ble_l2cap_event_fn,
cb_arg: *mut cty::c_void,
) -> cty::c_int;
}
extern "C" {
pub fn ble_l2cap_connect(
conn_handle: u16,
psm: u16,
mtu: u16,
sdu_rx: *mut os_mbuf,
cb: ble_l2cap_event_fn,
cb_arg: *mut cty::c_void,
) -> cty::c_int;
}
extern "C" {
pub fn ble_l2cap_disconnect(chan: *mut ble_l2cap_chan) -> cty::c_int;
}
extern "C" {
pub fn ble_l2cap_send(chan: *mut ble_l2cap_chan, sdu_tx: *mut os_mbuf) -> cty::c_int;
}
extern "C" {
pub fn ble_l2cap_recv_ready(chan: *mut ble_l2cap_chan, sdu_rx: *mut os_mbuf) -> cty::c_int;
}
extern "C" {
pub fn ble_l2cap_get_chan_info(
chan: *mut ble_l2cap_chan,
chan_info: *mut ble_l2cap_chan_info,
) -> cty::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_sm_sc_oob_data {
#[doc = " Random Number."]
pub r: [u8; 16usize],
#[doc = " Confirm Value."]
pub c: [u8; 16usize],
}
#[test]
fn bindgen_test_layout_ble_sm_sc_oob_data() {
assert_eq!(
::core::mem::size_of::<ble_sm_sc_oob_data>(),
32usize,
concat!("Size of: ", stringify!(ble_sm_sc_oob_data))
);
assert_eq!(
::core::mem::align_of::<ble_sm_sc_oob_data>(),
1usize,
concat!("Alignment of ", stringify!(ble_sm_sc_oob_data))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_sm_sc_oob_data>())).r as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_sm_sc_oob_data),
"::",
stringify!(r)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_sm_sc_oob_data>())).c as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(ble_sm_sc_oob_data),
"::",
stringify!(c)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ble_sm_io {
pub action: u8,
pub __bindgen_anon_1: ble_sm_io__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ble_sm_io__bindgen_ty_1 {
pub passkey: u32,
pub oob: [u8; 16usize],
pub numcmp_accept: u8,
pub oob_sc_data: ble_sm_io__bindgen_ty_1__bindgen_ty_1,
_bindgen_union_align: [u64; 2usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_sm_io__bindgen_ty_1__bindgen_ty_1 {
pub local: *mut ble_sm_sc_oob_data,
pub remote: *mut ble_sm_sc_oob_data,
}
#[test]
fn bindgen_test_layout_ble_sm_io__bindgen_ty_1__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<ble_sm_io__bindgen_ty_1__bindgen_ty_1>(),
16usize,
concat!(
"Size of: ",
stringify!(ble_sm_io__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::core::mem::align_of::<ble_sm_io__bindgen_ty_1__bindgen_ty_1>(),
8usize,
concat!(
"Alignment of ",
stringify!(ble_sm_io__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_sm_io__bindgen_ty_1__bindgen_ty_1>())).local as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_sm_io__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(local)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_sm_io__bindgen_ty_1__bindgen_ty_1>())).remote as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(ble_sm_io__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(remote)
)
);
}
#[test]
fn bindgen_test_layout_ble_sm_io__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<ble_sm_io__bindgen_ty_1>(),
16usize,
concat!("Size of: ", stringify!(ble_sm_io__bindgen_ty_1))
);
assert_eq!(
::core::mem::align_of::<ble_sm_io__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(ble_sm_io__bindgen_ty_1))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_sm_io__bindgen_ty_1>())).passkey as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_sm_io__bindgen_ty_1),
"::",
stringify!(passkey)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_sm_io__bindgen_ty_1>())).oob as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_sm_io__bindgen_ty_1),
"::",
stringify!(oob)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_sm_io__bindgen_ty_1>())).numcmp_accept as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_sm_io__bindgen_ty_1),
"::",
stringify!(numcmp_accept)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_sm_io__bindgen_ty_1>())).oob_sc_data as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_sm_io__bindgen_ty_1),
"::",
stringify!(oob_sc_data)
)
);
}
#[test]
fn bindgen_test_layout_ble_sm_io() {
assert_eq!(
::core::mem::size_of::<ble_sm_io>(),
24usize,
concat!("Size of: ", stringify!(ble_sm_io))
);
assert_eq!(
::core::mem::align_of::<ble_sm_io>(),
8usize,
concat!("Alignment of ", stringify!(ble_sm_io))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_sm_io>())).action as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_sm_io),
"::",
stringify!(action)
)
);
}
extern "C" {
pub fn ble_sm_sc_oob_generate_data(oob_data: *mut ble_sm_sc_oob_data) -> cty::c_int;
}
extern "C" {
pub fn ble_sm_inject_io(conn_handle: u16, pkey: *mut ble_sm_io) -> cty::c_int;
}
#[doc = " Used as a key for lookups of security material. This struct corresponds to"]
#[doc = " the following store object types:"]
#[doc = " o BLE_STORE_OBJ_TYPE_OUR_SEC"]
#[doc = " o BLE_STORE_OBJ_TYPE_PEER_SEC"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_store_key_sec {
#[doc = " Key by peer identity address;"]
#[doc = " peer_addr=BLE_ADDR_NONE means don't key off peer."]
pub peer_addr: ble_addr_t,
#[doc = " Key by ediv; ediv_rand_present=0 means don't key off ediv."]
pub ediv: u16,
#[doc = " Key by rand_num; ediv_rand_present=0 means don't key off rand_num."]
pub rand_num: u64,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
#[doc = " Number of results to skip; 0 means retrieve the first match."]
pub idx: u8,
}
#[test]
fn bindgen_test_layout_ble_store_key_sec() {
assert_eq!(
::core::mem::size_of::<ble_store_key_sec>(),
32usize,
concat!("Size of: ", stringify!(ble_store_key_sec))
);
assert_eq!(
::core::mem::align_of::<ble_store_key_sec>(),
8usize,
concat!("Alignment of ", stringify!(ble_store_key_sec))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_store_key_sec>())).peer_addr as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_store_key_sec),
"::",
stringify!(peer_addr)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_store_key_sec>())).ediv as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(ble_store_key_sec),
"::",
stringify!(ediv)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_store_key_sec>())).rand_num as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(ble_store_key_sec),
"::",
stringify!(rand_num)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_store_key_sec>())).idx as *const _ as usize },
25usize,
concat!(
"Offset of field: ",
stringify!(ble_store_key_sec),
"::",
stringify!(idx)
)
);
}
impl ble_store_key_sec {
#[inline]
pub fn ediv_rand_present(&self) -> cty::c_uint {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
}
#[inline]
pub fn set_ediv_rand_present(&mut self, val: cty::c_uint) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
ediv_rand_present: cty::c_uint,
) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let ediv_rand_present: u32 = unsafe { ::core::mem::transmute(ediv_rand_present) };
ediv_rand_present as u64
});
__bindgen_bitfield_unit
}
}
#[doc = " Represents stored security material. This struct corresponds to the"]
#[doc = " following store object types:"]
#[doc = " o BLE_STORE_OBJ_TYPE_OUR_SEC"]
#[doc = " o BLE_STORE_OBJ_TYPE_PEER_SEC"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_store_value_sec {
pub peer_addr: ble_addr_t,
pub key_size: u8,
pub ediv: u16,
pub rand_num: u64,
pub ltk: [u8; 16usize],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
pub irk: [u8; 16usize],
pub _bitfield_2: __BindgenBitfieldUnit<[u8; 1usize], u8>,
pub csrk: [u8; 16usize],
pub _bitfield_3: __BindgenBitfieldUnit<[u8; 1usize], u8>,
pub __bindgen_padding_0: [u8; 5usize],
}
#[test]
fn bindgen_test_layout_ble_store_value_sec() {
assert_eq!(
::core::mem::size_of::<ble_store_value_sec>(),
80usize,
concat!("Size of: ", stringify!(ble_store_value_sec))
);
assert_eq!(
::core::mem::align_of::<ble_store_value_sec>(),
8usize,
concat!("Alignment of ", stringify!(ble_store_value_sec))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_store_value_sec>())).peer_addr as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_store_value_sec),
"::",
stringify!(peer_addr)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_store_value_sec>())).key_size as *const _ as usize },
7usize,
concat!(
"Offset of field: ",
stringify!(ble_store_value_sec),
"::",
stringify!(key_size)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_store_value_sec>())).ediv as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(ble_store_value_sec),
"::",
stringify!(ediv)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_store_value_sec>())).rand_num as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(ble_store_value_sec),
"::",
stringify!(rand_num)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_store_value_sec>())).ltk as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(ble_store_value_sec),
"::",
stringify!(ltk)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_store_value_sec>())).irk as *const _ as usize },
41usize,
concat!(
"Offset of field: ",
stringify!(ble_store_value_sec),
"::",
stringify!(irk)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_store_value_sec>())).csrk as *const _ as usize },
58usize,
concat!(
"Offset of field: ",
stringify!(ble_store_value_sec),
"::",
stringify!(csrk)
)
);
}
impl ble_store_value_sec {
#[inline]
pub fn ltk_present(&self) -> u8 {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
}
#[inline]
pub fn set_ltk_present(&mut self, val: u8) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(ltk_present: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let ltk_present: u8 = unsafe { ::core::mem::transmute(ltk_present) };
ltk_present as u64
});
__bindgen_bitfield_unit
}
#[inline]
pub fn irk_present(&self) -> u8 {
unsafe { ::core::mem::transmute(self._bitfield_2.get(0usize, 1u8) as u8) }
}
#[inline]
pub fn set_irk_present(&mut self, val: u8) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_2.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_2(irk_present: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let irk_present: u8 = unsafe { ::core::mem::transmute(irk_present) };
irk_present as u64
});
__bindgen_bitfield_unit
}
#[inline]
pub fn csrk_present(&self) -> u8 {
unsafe { ::core::mem::transmute(self._bitfield_3.get(0usize, 1u8) as u8) }
}
#[inline]
pub fn set_csrk_present(&mut self, val: u8) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_3.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn authenticated(&self) -> cty::c_uint {
unsafe { ::core::mem::transmute(self._bitfield_3.get(1usize, 1u8) as u32) }
}
#[inline]
pub fn set_authenticated(&mut self, val: cty::c_uint) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_3.set(1usize, 1u8, val as u64)
}
}
#[inline]
pub fn sc(&self) -> u8 {
unsafe { ::core::mem::transmute(self._bitfield_3.get(2usize, 1u8) as u8) }
}
#[inline]
pub fn set_sc(&mut self, val: u8) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_3.set(2usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_3(
csrk_present: u8,
authenticated: cty::c_uint,
sc: u8,
) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let csrk_present: u8 = unsafe { ::core::mem::transmute(csrk_present) };
csrk_present as u64
});
__bindgen_bitfield_unit.set(1usize, 1u8, {
let authenticated: u32 = unsafe { ::core::mem::transmute(authenticated) };
authenticated as u64
});
__bindgen_bitfield_unit.set(2usize, 1u8, {
let sc: u8 = unsafe { ::core::mem::transmute(sc) };
sc as u64
});
__bindgen_bitfield_unit
}
}
#[doc = " Used as a key for lookups of stored client characteristic configuration"]
#[doc = " descriptors (CCCDs). This struct corresponds to the BLE_STORE_OBJ_TYPE_CCCD"]
#[doc = " store object type."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_store_key_cccd {
#[doc = " Key by peer identity address;"]
#[doc = " peer_addr=BLE_ADDR_NONE means don't key off peer."]
pub peer_addr: ble_addr_t,
#[doc = " Key by characteristic value handle;"]
#[doc = " chr_val_handle=0 means don't key off characteristic handle."]
pub chr_val_handle: u16,
#[doc = " Number of results to skip; 0 means retrieve the first match."]
pub idx: u8,
}
#[test]
fn bindgen_test_layout_ble_store_key_cccd() {
assert_eq!(
::core::mem::size_of::<ble_store_key_cccd>(),
12usize,
concat!("Size of: ", stringify!(ble_store_key_cccd))
);
assert_eq!(
::core::mem::align_of::<ble_store_key_cccd>(),
2usize,
concat!("Alignment of ", stringify!(ble_store_key_cccd))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_store_key_cccd>())).peer_addr as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_store_key_cccd),
"::",
stringify!(peer_addr)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_store_key_cccd>())).chr_val_handle as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(ble_store_key_cccd),
"::",
stringify!(chr_val_handle)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_store_key_cccd>())).idx as *const _ as usize },
10usize,
concat!(
"Offset of field: ",
stringify!(ble_store_key_cccd),
"::",
stringify!(idx)
)
);
}
#[doc = " Represents a stored client characteristic configuration descriptor (CCCD)."]
#[doc = " This struct corresponds to the BLE_STORE_OBJ_TYPE_CCCD store object type."]
#[repr(C)]
#[repr(align(4))]
#[derive(Debug, Copy, Clone)]
pub struct ble_store_value_cccd {
pub peer_addr: ble_addr_t,
pub chr_val_handle: u16,
pub flags: u16,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
pub __bindgen_padding_0: [u8; 3usize],
}
#[test]
fn bindgen_test_layout_ble_store_value_cccd() {
assert_eq!(
::core::mem::size_of::<ble_store_value_cccd>(),
16usize,
concat!("Size of: ", stringify!(ble_store_value_cccd))
);
assert_eq!(
::core::mem::align_of::<ble_store_value_cccd>(),
4usize,
concat!("Alignment of ", stringify!(ble_store_value_cccd))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_store_value_cccd>())).peer_addr as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_store_value_cccd),
"::",
stringify!(peer_addr)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_store_value_cccd>())).chr_val_handle as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(ble_store_value_cccd),
"::",
stringify!(chr_val_handle)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_store_value_cccd>())).flags as *const _ as usize },
10usize,
concat!(
"Offset of field: ",
stringify!(ble_store_value_cccd),
"::",
stringify!(flags)
)
);
}
impl ble_store_value_cccd {
#[inline]
pub fn value_changed(&self) -> cty::c_uint {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
}
#[inline]
pub fn set_value_changed(&mut self, val: cty::c_uint) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(value_changed: cty::c_uint) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let value_changed: u32 = unsafe { ::core::mem::transmute(value_changed) };
value_changed as u64
});
__bindgen_bitfield_unit
}
}
#[doc = " Used as a key for store lookups. This union must be accompanied by an"]
#[doc = " object type code to indicate which field is valid."]
#[repr(C)]
#[derive(Copy, Clone)]
pub union ble_store_key {
pub sec: ble_store_key_sec,
pub cccd: ble_store_key_cccd,
_bindgen_union_align: [u64; 4usize],
}
#[test]
fn bindgen_test_layout_ble_store_key() {
assert_eq!(
::core::mem::size_of::<ble_store_key>(),
32usize,
concat!("Size of: ", stringify!(ble_store_key))
);
assert_eq!(
::core::mem::align_of::<ble_store_key>(),
8usize,
concat!("Alignment of ", stringify!(ble_store_key))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_store_key>())).sec as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_store_key),
"::",
stringify!(sec)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_store_key>())).cccd as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_store_key),
"::",
stringify!(cccd)
)
);
}
#[doc = " Represents stored data. This union must be accompanied by an object type"]
#[doc = " code to indicate which field is valid."]
#[repr(C)]
#[derive(Copy, Clone)]
pub union ble_store_value {
pub sec: ble_store_value_sec,
pub cccd: ble_store_value_cccd,
_bindgen_union_align: [u64; 10usize],
}
#[test]
fn bindgen_test_layout_ble_store_value() {
assert_eq!(
::core::mem::size_of::<ble_store_value>(),
80usize,
concat!("Size of: ", stringify!(ble_store_value))
);
assert_eq!(
::core::mem::align_of::<ble_store_value>(),
8usize,
concat!("Alignment of ", stringify!(ble_store_value))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_store_value>())).sec as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_store_value),
"::",
stringify!(sec)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_store_value>())).cccd as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_store_value),
"::",
stringify!(cccd)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ble_store_status_event {
#[doc = " The type of event being reported; one of the BLE_STORE_EVENT_TYPE_[...]"]
#[doc = " codes."]
pub event_code: cty::c_int,
pub __bindgen_anon_1: ble_store_status_event__bindgen_ty_1,
}
#[doc = " Additional data related to the event; the valid field is inferred from"]
#[doc = " the obj_type,event_code pair."]
#[repr(C)]
#[derive(Copy, Clone)]
pub union ble_store_status_event__bindgen_ty_1 {
pub overflow: ble_store_status_event__bindgen_ty_1__bindgen_ty_1,
pub full: ble_store_status_event__bindgen_ty_1__bindgen_ty_2,
_bindgen_union_align: [u64; 2usize],
}
#[doc = " Represents a write that failed due to storage exhaustion. Valid for"]
#[doc = " the following event types:"]
#[doc = " o BLE_STORE_EVENT_OVERFLOW"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_store_status_event__bindgen_ty_1__bindgen_ty_1 {
#[doc = " The type of object that failed to be written."]
pub obj_type: cty::c_int,
#[doc = " The object that failed to be written."]
pub value: *const ble_store_value,
}
#[test]
fn bindgen_test_layout_ble_store_status_event__bindgen_ty_1__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<ble_store_status_event__bindgen_ty_1__bindgen_ty_1>(),
16usize,
concat!(
"Size of: ",
stringify!(ble_store_status_event__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::core::mem::align_of::<ble_store_status_event__bindgen_ty_1__bindgen_ty_1>(),
8usize,
concat!(
"Alignment of ",
stringify!(ble_store_status_event__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_store_status_event__bindgen_ty_1__bindgen_ty_1>())).obj_type
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_store_status_event__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(obj_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_store_status_event__bindgen_ty_1__bindgen_ty_1>())).value
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(ble_store_status_event__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(value)
)
);
}
#[doc = " Represents the possibility that a scheduled write will fail due to"]
#[doc = " storage exhaustion. Valid for the following event types:"]
#[doc = " o BLE_STORE_EVENT_FULL"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_store_status_event__bindgen_ty_1__bindgen_ty_2 {
#[doc = " The type of object that may fail to be written."]
pub obj_type: cty::c_int,
#[doc = " The handle of the connection which prompted the write."]
pub conn_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_store_status_event__bindgen_ty_1__bindgen_ty_2() {
assert_eq!(
::core::mem::size_of::<ble_store_status_event__bindgen_ty_1__bindgen_ty_2>(),
8usize,
concat!(
"Size of: ",
stringify!(ble_store_status_event__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
::core::mem::align_of::<ble_store_status_event__bindgen_ty_1__bindgen_ty_2>(),
4usize,
concat!(
"Alignment of ",
stringify!(ble_store_status_event__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_store_status_event__bindgen_ty_1__bindgen_ty_2>())).obj_type
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_store_status_event__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(obj_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_store_status_event__bindgen_ty_1__bindgen_ty_2>()))
.conn_handle as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(ble_store_status_event__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(conn_handle)
)
);
}
#[test]
fn bindgen_test_layout_ble_store_status_event__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<ble_store_status_event__bindgen_ty_1>(),
16usize,
concat!(
"Size of: ",
stringify!(ble_store_status_event__bindgen_ty_1)
)
);
assert_eq!(
::core::mem::align_of::<ble_store_status_event__bindgen_ty_1>(),
8usize,
concat!(
"Alignment of ",
stringify!(ble_store_status_event__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_store_status_event__bindgen_ty_1>())).overflow as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_store_status_event__bindgen_ty_1),
"::",
stringify!(overflow)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_store_status_event__bindgen_ty_1>())).full as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_store_status_event__bindgen_ty_1),
"::",
stringify!(full)
)
);
}
#[test]
fn bindgen_test_layout_ble_store_status_event() {
assert_eq!(
::core::mem::size_of::<ble_store_status_event>(),
24usize,
concat!("Size of: ", stringify!(ble_store_status_event))
);
assert_eq!(
::core::mem::align_of::<ble_store_status_event>(),
8usize,
concat!("Alignment of ", stringify!(ble_store_status_event))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<ble_store_status_event>())).event_code as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(ble_store_status_event),
"::",
stringify!(event_code)
)
);
}
#[doc = " Searches the store for an object matching the specified criteria. If a"]
#[doc = " match is found, it is read from the store and the dst parameter is populated"]
#[doc = " with the retrieved object."]
#[doc = ""]
#[doc = " @param obj_type The type of object to search for; one of the"]
#[doc = " BLE_STORE_OBJ_TYPE_[...] codes."]
#[doc = " @param key Specifies properties of the object to search"]
#[doc = " for. An object is retrieved if it matches"]
#[doc = " these criteria."]
#[doc = " @param dst On success, this is populated with the"]
#[doc = " retrieved object."]
#[doc = ""]
#[doc = " @return 0 if an object was successfully retreived;"]
#[doc = " BLE_HS_ENOENT if no matching object was found;"]
#[doc = " Other nonzero on error."]
pub type ble_store_read_fn = ::core::option::Option<
unsafe extern "C" fn(
obj_type: cty::c_int,
key: *const ble_store_key,
dst: *mut ble_store_value,
) -> cty::c_int,
>;
#[doc = " Writes the specified object to the store. If an object with the same"]
#[doc = " identity is already in the store, it is replaced. If the store lacks"]
#[doc = " sufficient capacity to write the object, this function may remove previously"]
#[doc = " stored values to make room."]
#[doc = ""]
#[doc = " @param obj_type The type of object being written; one of the"]
#[doc = " BLE_STORE_OBJ_TYPE_[...] codes."]
#[doc = " @param val The object to persist."]
#[doc = ""]
#[doc = " @return 0 if the object was successfully written;"]
#[doc = " Other nonzero on error."]
pub type ble_store_write_fn = ::core::option::Option<
unsafe extern "C" fn(obj_type: cty::c_int, val: *const ble_store_value) -> cty::c_int,
>;
#[doc = " Searches the store for the first object matching the specified criteria. If"]
#[doc = " a match is found, it is deleted from the store."]
#[doc = ""]
#[doc = " @param obj_type The type of object to delete; one of the"]
#[doc = " BLE_STORE_OBJ_TYPE_[...] codes."]
#[doc = " @param key Specifies properties of the object to search"]
#[doc = " for. An object is deleted if it matches"]
#[doc = " these criteria."]
#[doc = " @return 0 if an object was successfully retrieved;"]
#[doc = " BLE_HS_ENOENT if no matching object was found;"]
#[doc = " Other nonzero on error."]
pub type ble_store_delete_fn = ::core::option::Option<
unsafe extern "C" fn(obj_type: cty::c_int, key: *const ble_store_key) -> cty::c_int,
>;
#[doc = " Indicates an inability to perform a store operation. This callback should"]
#[doc = " do one of two things:"]
#[doc = " o Address the problem and return 0, indicating that the store operation"]
#[doc = " should proceed."]
#[doc = " o Return nonzero to indicate that the store operation should be aborted."]
#[doc = ""]
#[doc = " @param event Describes the store event being reported."]
#[doc = " @param arg Optional user argument."]
#[doc = ""]
#[doc = " @return 0 if the store operation should proceed;"]
#[doc = " nonzero if the store operation should be"]
#[doc = " aborted."]
pub type ble_store_status_fn = ::core::option::Option<
unsafe extern "C" fn(event: *mut ble_store_status_event, arg: *mut cty::c_void) -> cty::c_int,
>;
extern "C" {
pub fn ble_store_read(
obj_type: cty::c_int,
key: *const ble_store_key,
val: *mut ble_store_value,
) -> cty::c_int;
}
extern "C" {
pub fn ble_store_write(obj_type: cty::c_int, val: *const ble_store_value) -> cty::c_int;
}
extern "C" {
pub fn ble_store_delete(obj_type: cty::c_int, key: *const ble_store_key) -> cty::c_int;
}
extern "C" {
pub fn ble_store_overflow_event(
obj_type: cty::c_int,
value: *const ble_store_value,
) -> cty::c_int;
}
extern "C" {
pub fn ble_store_full_event(obj_type: cty::c_int, conn_handle: u16) -> cty::c_int;
}
extern "C" {
pub fn ble_store_read_our_sec(
key_sec: *const ble_store_key_sec,
value_sec: *mut ble_store_value_sec,
) -> cty::c_int;
}
extern "C" {
pub fn ble_store_write_our_sec(value_sec: *const ble_store_value_sec) -> cty::c_int;
}
extern "C" {
pub fn ble_store_delete_our_sec(key_sec: *const ble_store_key_sec) -> cty::c_int;
}
extern "C" {
pub fn ble_store_read_peer_sec(
key_sec: *const ble_store_key_sec,
value_sec: *mut ble_store_value_sec,
) -> cty::c_int;
}
extern "C" {
pub fn ble_store_write_peer_sec(value_sec: *const ble_store_value_sec) -> cty::c_int;
}
extern "C" {
pub fn ble_store_delete_peer_sec(key_sec: *const ble_store_key_sec) -> cty::c_int;
}
extern "C" {
pub fn ble_store_read_cccd(
key: *const ble_store_key_cccd,
out_value: *mut ble_store_value_cccd,
) -> cty::c_int;
}
extern "C" {
pub fn ble_store_write_cccd(value: *const ble_store_value_cccd) -> cty::c_int;
}
extern "C" {
pub fn ble_store_delete_cccd(key: *const ble_store_key_cccd) -> cty::c_int;
}
extern "C" {
pub fn ble_store_key_from_value_sec(
out_key: *mut ble_store_key_sec,
value: *const ble_store_value_sec,
);
}
extern "C" {
pub fn ble_store_key_from_value_cccd(
out_key: *mut ble_store_key_cccd,
value: *const ble_store_value_cccd,
);
}
extern "C" {
pub fn ble_store_key_from_value(
obj_type: cty::c_int,
out_key: *mut ble_store_key,
value: *const ble_store_value,
);
}
pub type ble_store_iterator_fn = ::core::option::Option<
unsafe extern "C" fn(
obj_type: cty::c_int,
val: *mut ble_store_value,
cookie: *mut cty::c_void,
) -> cty::c_int,
>;
extern "C" {
pub fn ble_store_iterate(
obj_type: cty::c_int,
callback: ble_store_iterator_fn,
cookie: *mut cty::c_void,
) -> cty::c_int;
}
extern "C" {
pub fn ble_store_clear() -> cty::c_int;
}
extern "C" {
#[doc = " Utility functions."]
pub fn ble_store_util_bonded_peers(
out_peer_id_addrs: *mut ble_addr_t,
out_num_peers: *mut cty::c_int,
max_peers: cty::c_int,
) -> cty::c_int;
}
extern "C" {
pub fn ble_store_util_delete_all(type_: cty::c_int, key: *const ble_store_key) -> cty::c_int;
}
extern "C" {
pub fn ble_store_util_delete_peer(peer_id_addr: *const ble_addr_t) -> cty::c_int;
}
extern "C" {
pub fn ble_store_util_delete_oldest_peer() -> cty::c_int;
}
extern "C" {
pub fn ble_store_util_count(type_: cty::c_int, out_count: *mut cty::c_int) -> cty::c_int;
}
extern "C" {
pub fn ble_store_util_status_rr(
event: *mut ble_store_status_event,
arg: *mut cty::c_void,
) -> cty::c_int;
}
#[doc = " @brief Stack reset callback"]
#[doc = ""]
#[doc = " @param reason Reason code for reset"]
pub type ble_hs_reset_fn = ::core::option::Option<unsafe extern "C" fn(reason: cty::c_int)>;
#[doc = " @brief Stack sync callback"]
pub type ble_hs_sync_fn = ::core::option::Option<unsafe extern "C" fn()>;
#[doc = " @brief Bluetooth Host main configuration structure"]
#[doc = ""]
#[doc = " Those can be used by application to configure stack."]
#[doc = ""]
#[doc = " The only reason Security Manager (sm_ members) is configurable at runtime is"]
#[doc = " to simplify security testing. Defaults for those are configured by selecting"]
#[doc = " proper options in application's syscfg."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_hs_cfg {
#[doc = " An optional callback that gets executed upon registration of each GATT"]
#[doc = " resource (service, characteristic, or descriptor)."]
pub gatts_register_cb: ble_gatt_register_fn,
#[doc = " An optional argument that gets passed to the GATT registration"]
#[doc = " callback."]
pub gatts_register_arg: *mut cty::c_void,
#[doc = " Security Manager Local Input Output Capabilities"]
pub sm_io_cap: u8,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
#[doc = " @brief Security Manager Local Key Distribution Mask"]
pub sm_our_key_dist: u8,
#[doc = " @brief Security Manager Remote Key Distribution Mask"]
pub sm_their_key_dist: u8,
#[doc = " @brief Stack reset callback"]
#[doc = ""]
#[doc = " This callback is executed when the host resets itself and the controller"]
#[doc = " due to fatal error."]
pub reset_cb: ble_hs_reset_fn,
#[doc = " @brief Stack sync callback"]
#[doc = ""]
#[doc = " This callback is executed when the host and controller become synced."]
#[doc = " This happens at startup and after a reset."]
pub sync_cb: ble_hs_sync_fn,
#[doc = " Storage Read callback handles read of security material"]
pub store_read_cb: ble_store_read_fn,
#[doc = " Storage Write callback handles write of security material"]
pub store_write_cb: ble_store_write_fn,
#[doc = " Storage Delete callback handles deletion of security material"]
pub store_delete_cb: ble_store_delete_fn,
#[doc = " @brief Storage Status callback."]
#[doc = ""]
#[doc = " This callback gets executed when a persistence operation cannot be"]
#[doc = " performed or a persistence failure is imminent. For example, if is"]
#[doc = " insufficient storage capacity for a record to be persisted, this"]
#[doc = " function gets called to give the application the opportunity to make"]
#[doc = " room."]
pub store_status_cb: ble_store_status_fn,
#[doc = " An optional argument that gets passed to the storage status callback."]
pub store_status_arg: *mut cty::c_void,
}
#[test]
fn bindgen_test_layout_ble_hs_cfg() {
assert_eq!(
::core::mem::size_of::<ble_hs_cfg>(),
80usize,
concat!("Size of: ", stringify!(ble_hs_cfg))
);
assert_eq!(
::core::mem::align_of::<ble_hs_cfg>(),
8usize,
concat!("Alignment of ", stringify!(ble_hs_cfg))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_cfg>())).gatts_register_cb as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_cfg),
"::",
stringify!(gatts_register_cb)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_cfg>())).gatts_register_arg as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_cfg),
"::",
stringify!(gatts_register_arg)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_cfg>())).sm_io_cap as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_cfg),
"::",
stringify!(sm_io_cap)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_cfg>())).sm_our_key_dist as *const _ as usize },
18usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_cfg),
"::",
stringify!(sm_our_key_dist)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_cfg>())).sm_their_key_dist as *const _ as usize },
19usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_cfg),
"::",
stringify!(sm_their_key_dist)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_cfg>())).reset_cb as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_cfg),
"::",
stringify!(reset_cb)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_cfg>())).sync_cb as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_cfg),
"::",
stringify!(sync_cb)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_cfg>())).store_read_cb as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_cfg),
"::",
stringify!(store_read_cb)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_cfg>())).store_write_cb as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_cfg),
"::",
stringify!(store_write_cb)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_cfg>())).store_delete_cb as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_cfg),
"::",
stringify!(store_delete_cb)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_cfg>())).store_status_cb as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_cfg),
"::",
stringify!(store_status_cb)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<ble_hs_cfg>())).store_status_arg as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(ble_hs_cfg),
"::",
stringify!(store_status_arg)
)
);
}
impl ble_hs_cfg {
#[inline]
pub fn sm_oob_data_flag(&self) -> cty::c_uint {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
}
#[inline]
pub fn set_sm_oob_data_flag(&mut self, val: cty::c_uint) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn sm_bonding(&self) -> cty::c_uint {
unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
}
#[inline]
pub fn set_sm_bonding(&mut self, val: cty::c_uint) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(1usize, 1u8, val as u64)
}
}
#[inline]
pub fn sm_mitm(&self) -> cty::c_uint {
unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) }
}
#[inline]
pub fn set_sm_mitm(&mut self, val: cty::c_uint) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(2usize, 1u8, val as u64)
}
}
#[inline]
pub fn sm_sc(&self) -> cty::c_uint {
unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) }
}
#[inline]
pub fn set_sm_sc(&mut self, val: cty::c_uint) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(3usize, 1u8, val as u64)
}
}
#[inline]
pub fn sm_keypress(&self) -> cty::c_uint {
unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) }
}
#[inline]
pub fn set_sm_keypress(&mut self, val: cty::c_uint) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(4usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
sm_oob_data_flag: cty::c_uint,
sm_bonding: cty::c_uint,
sm_mitm: cty::c_uint,
sm_sc: cty::c_uint,
sm_keypress: cty::c_uint,
) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let sm_oob_data_flag: u32 = unsafe { ::core::mem::transmute(sm_oob_data_flag) };
sm_oob_data_flag as u64
});
__bindgen_bitfield_unit.set(1usize, 1u8, {
let sm_bonding: u32 = unsafe { ::core::mem::transmute(sm_bonding) };
sm_bonding as u64
});
__bindgen_bitfield_unit.set(2usize, 1u8, {
let sm_mitm: u32 = unsafe { ::core::mem::transmute(sm_mitm) };
sm_mitm as u64
});
__bindgen_bitfield_unit.set(3usize, 1u8, {
let sm_sc: u32 = unsafe { ::core::mem::transmute(sm_sc) };
sm_sc as u64
});
__bindgen_bitfield_unit.set(4usize, 1u8, {
let sm_keypress: u32 = unsafe { ::core::mem::transmute(sm_keypress) };
sm_keypress as u64
});
__bindgen_bitfield_unit
}
}
extern "C" {
pub static mut ble_hs_cfg: ble_hs_cfg;
}
extern "C" {
#[doc = " @brief Indicates whether the host is enabled. The host is enabled if it is"]
#[doc = " starting or fully started. It is disabled if it is stopping or stopped."]
#[doc = ""]
#[doc = " @return 1 if the host is enabled;"]
#[doc = " 0 if the host is disabled."]
pub fn ble_hs_is_enabled() -> cty::c_int;
}
extern "C" {
#[doc = " Indicates whether the host has synchronized with the controller."]
#[doc = " Synchronization must occur before any host procedures can be performed."]
#[doc = ""]
#[doc = " @return 1 if the host and controller are in sync;"]
#[doc = " 0 if the host and controller are out of sync."]
pub fn ble_hs_synced() -> cty::c_int;
}
extern "C" {
#[doc = " Synchronizes the host with the controller by sending a sequence of HCI"]
#[doc = " commands. This function must be called before any other host functionality"]
#[doc = " is used, but it must be called after both the host and controller are"]
#[doc = " initialized. Typically, the host-parent-task calls this function at the top"]
#[doc = " of its task routine. This function must only be called in the host parent"]
#[doc = " task. A safe alternative for starting the stack from any task is to call"]
#[doc = " `ble_hs_sched_start()`."]
#[doc = ""]
#[doc = " If the host fails to synchronize with the controller (if the controller is"]
#[doc = " not fully booted, for example), the host will attempt to resynchronize every"]
#[doc = " 100 ms. For this reason, an error return code is not necessarily fatal."]
#[doc = ""]
#[doc = " @return 0 on success; nonzero on error."]
pub fn ble_hs_start() -> cty::c_int;
}
extern "C" {
#[doc = " Enqueues a host start event to the default event queue. The actual host"]
#[doc = " startup is performed in the host parent task, but using the default queue"]
#[doc = " here ensures the event won't run until the end of main() when this is"]
#[doc = " called during system initialization. This allows the application to"]
#[doc = " configure the host package in the meantime."]
#[doc = ""]
#[doc = " If auto-start is disabled, the application should use this function to start"]
#[doc = " the BLE stack. This function can be called at any time as long as the host"]
#[doc = " is stopped. When the host successfully starts, the application is notified"]
#[doc = " via the ble_hs_cfg.sync_cb callback."]
pub fn ble_hs_sched_start();
}
extern "C" {
#[doc = " Causes the host to reset the NimBLE stack as soon as possible. The"]
#[doc = " application is notified when the reset occurs via the host reset callback."]
#[doc = ""]
#[doc = " @param reason The host error code that gets passed to the reset callback."]
pub fn ble_hs_sched_reset(reason: cty::c_int);
}
extern "C" {
#[doc = " Designates the specified event queue for NimBLE host work. By default, the"]
#[doc = " host uses the default event queue and runs in the main task. This function"]
#[doc = " is useful if you want the host to run in a different task."]
#[doc = ""]
#[doc = " @param evq The event queue to use for host work."]
pub fn ble_hs_evq_set(evq: *mut ble_npl_eventq);
}
extern "C" {
#[doc = " Initializes the NimBLE host. This function must be called before the OS is"]
#[doc = " started. The NimBLE stack requires an application task to function. One"]
#[doc = " application task in particular is designated as the \"host parent task\". In"]
#[doc = " addition to application-specific work, the host parent task does work for"]
#[doc = " NimBLE by processing events generated by the host."]
pub fn ble_hs_init();
}
extern "C" {
#[doc = " @brief Called when the system is shutting down. Stops the BLE host."]
#[doc = ""]
#[doc = " @param reason The reason for the shutdown. One of the"]
#[doc = " HAL_RESET_[...] codes or an"]
#[doc = " implementation-defined value."]
#[doc = ""]
#[doc = " @return SYSDOWN_IN_PROGRESS."]
pub fn ble_hs_shutdown(reason: cty::c_int) -> cty::c_int;
}
pub type ble_svc_gap_chr_changed_fn = ::core::option::Option<unsafe extern "C" fn(uuid: u16)>;
extern "C" {
pub fn ble_svc_gap_set_chr_changed_cb(cb: ble_svc_gap_chr_changed_fn);
}
extern "C" {
pub fn ble_svc_gap_device_name() -> *const cty::c_char;
}
extern "C" {
pub fn ble_svc_gap_device_name_set(name: *const cty::c_char) -> cty::c_int;
}
extern "C" {
pub fn ble_svc_gap_device_appearance() -> u16;
}
extern "C" {
pub fn ble_svc_gap_device_appearance_set(appearance: u16) -> cty::c_int;
}
extern "C" {
pub fn ble_svc_gap_init();
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __locale_data {
pub _address: u8,
}
pub type __builtin_va_list = [__va_list_tag; 1usize];
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __va_list_tag {
pub gp_offset: cty::c_uint,
pub fp_offset: cty::c_uint,
pub overflow_arg_area: *mut cty::c_void,
pub reg_save_area: *mut cty::c_void,
}
#[test]
fn bindgen_test_layout___va_list_tag() {
assert_eq!(
::core::mem::size_of::<__va_list_tag>(),
24usize,
concat!("Size of: ", stringify!(__va_list_tag))
);
assert_eq!(
::core::mem::align_of::<__va_list_tag>(),
8usize,
concat!("Alignment of ", stringify!(__va_list_tag))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<__va_list_tag>())).gp_offset as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__va_list_tag),
"::",
stringify!(gp_offset)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<__va_list_tag>())).fp_offset as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(__va_list_tag),
"::",
stringify!(fp_offset)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<__va_list_tag>())).overflow_arg_area as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(__va_list_tag),
"::",
stringify!(overflow_arg_area)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<__va_list_tag>())).reg_save_area as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(__va_list_tag),
"::",
stringify!(reg_save_area)
)
);
}