riot_sys

Struct ble_hs_cfg

Source
#[repr(C)]
pub struct ble_hs_cfg {
Show 14 fields pub gatts_register_cb: ble_gatt_register_fn, pub gatts_register_arg: *mut c_void, pub sm_io_cap: u8, pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1]>, pub sm_our_key_dist: u8, pub sm_their_key_dist: u8, pub reset_cb: ble_hs_reset_fn, pub sync_cb: ble_hs_sync_fn, pub store_read_cb: ble_store_read_fn, pub store_write_cb: ble_store_write_fn, pub store_delete_cb: ble_store_delete_fn, pub store_status_cb: ble_store_status_fn, pub store_status_arg: *mut c_void,
}
Expand description

@brief Bluetooth Host main configuration structure

Those can be used by application to configure stack.

The only reason Security Manager (sm_ members) is configurable at runtime is to simplify security testing. Defaults for those are configured by selecting proper options in application’s syscfg.

Fields§

§gatts_register_cb: ble_gatt_register_fn

An optional callback that gets executed upon registration of each GATT resource (service, characteristic, or descriptor).

§gatts_register_arg: *mut c_void

An optional argument that gets passed to the GATT registration callback.

§sm_io_cap: u8

Security Manager Local Input Output Capabilities

§_bitfield_align_1: [u8; 0]§_bitfield_1: __BindgenBitfieldUnit<[u8; 1]>§sm_our_key_dist: u8

@brief Security Manager Local Key Distribution Mask

§sm_their_key_dist: u8

@brief Security Manager Remote Key Distribution Mask

§reset_cb: ble_hs_reset_fn

@brief Stack reset callback

This callback is executed when the host resets itself and the controller due to fatal error.

§sync_cb: ble_hs_sync_fn

@brief Stack sync callback

This callback is executed when the host and controller become synced. This happens at startup and after a reset.

§store_read_cb: ble_store_read_fn

Storage Read callback handles read of security material

§store_write_cb: ble_store_write_fn

Storage Write callback handles write of security material

§store_delete_cb: ble_store_delete_fn

Storage Delete callback handles deletion of security material

§store_status_cb: ble_store_status_fn

@brief Storage Status callback.

This callback gets executed when a persistence operation cannot be performed or a persistence failure is imminent. For example, if is insufficient storage capacity for a record to be persisted, this function gets called to give the application the opportunity to make room.

§store_status_arg: *mut c_void

An optional argument that gets passed to the storage status callback.

Implementations§

Source§

impl ble_hs_cfg

Source

pub fn sm_oob_data_flag(&self) -> c_uint

Source

pub fn set_sm_oob_data_flag(&mut self, val: c_uint)

Source

pub fn sm_bonding(&self) -> c_uint

Source

pub fn set_sm_bonding(&mut self, val: c_uint)

Source

pub fn sm_mitm(&self) -> c_uint

Source

pub fn set_sm_mitm(&mut self, val: c_uint)

Source

pub fn sm_sc(&self) -> c_uint

Source

pub fn set_sm_sc(&mut self, val: c_uint)

Source

pub fn sm_keypress(&self) -> c_uint

Source

pub fn set_sm_keypress(&mut self, val: c_uint)

Source

pub fn new_bitfield_1( sm_oob_data_flag: c_uint, sm_bonding: c_uint, sm_mitm: c_uint, sm_sc: c_uint, sm_keypress: c_uint, ) -> __BindgenBitfieldUnit<[u8; 1]>

Trait Implementations§

Source§

impl Clone for ble_hs_cfg

Source§

fn clone(&self) -> ble_hs_cfg

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ble_hs_cfg

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ble_hs_cfg

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Copy for ble_hs_cfg

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 40 bytes