nrf-softdevice-s112

Crates

git

Versions

default

Flavors

#[repr(C)]
pub struct ble_gap_adv_params_t { pub properties: ble_gap_adv_properties_t, pub p_peer_addr: *const ble_gap_addr_t, pub interval: u32, pub duration: u16, pub max_adv_evts: u8, pub channel_mask: ble_gap_ch_mask_t, pub filter_policy: u8, pub primary_phy: u8, pub secondary_phy: u8, pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1], u8>, }
Expand description

@brief GAP advertising parameters.

Fields§

§properties: ble_gap_adv_properties_t

< The properties of the advertising events.

§p_peer_addr: *const ble_gap_addr_t

< Address of a known peer.

  • When privacy is enabled and the local device uses @ref BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE addresses, the device identity list is searched for a matching entry. If the local IRK for that device identity is set, the local IRK for that device will be used to generate the advertiser address field in the advertising packet.
  • If @ref ble_gap_adv_properties_t::type is directed, this must be set to the targeted scanner or initiator. If the peer address is in the device identity list, the peer IRK for that device will be used to generate @ref BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE target addresses used in the advertising event PDUs.
§interval: u32

< Advertising interval in 625 us units. @sa BLE_GAP_ADV_INTERVALS. @note If @ref ble_gap_adv_properties_t::type is set to @ref BLE_GAP_ADV_TYPE_CONNECTABLE_NONSCANNABLE_DIRECTED_HIGH_DUTY_CYCLE advertising, this parameter is ignored.

§duration: u16

< Advertising duration in 10 ms units. When timeout is reached, an event of type @ref BLE_GAP_EVT_ADV_SET_TERMINATED is raised. @sa BLE_GAP_ADV_TIMEOUT_VALUES. @note The SoftDevice will always complete at least one advertising event even if the duration is set too low.

§max_adv_evts: u8

< Maximum advertising events that shall be sent prior to disabling advertising. Setting the value to 0 disables the limitation. When the count of advertising events specified by this parameter (if not 0) is reached, advertising will be automatically stopped and an event of type @ref BLE_GAP_EVT_ADV_SET_TERMINATED is raised @note If @ref ble_gap_adv_properties_t::type is set to @ref BLE_GAP_ADV_TYPE_CONNECTABLE_NONSCANNABLE_DIRECTED_HIGH_DUTY_CYCLE, this parameter is ignored.

§channel_mask: ble_gap_ch_mask_t

< Channel mask for primary channels. At least one of the primary channels, that is channel index 37-39, must be used.

§filter_policy: u8

< Filter Policy. @sa BLE_GAP_ADV_FILTER_POLICIES.

§primary_phy: u8

< Indicates the PHY on which the primary advertising channel packets are transmitted. If set to @ref BLE_GAP_PHY_AUTO, @ref BLE_GAP_PHY_1MBPS will be used. The only supported value by this SoftDevice is @ref BLE_GAP_PHY_1MBPS.

§secondary_phy: u8

< This field is ignored on this SoftDevice.

§_bitfield_1: __BindgenBitfieldUnit<[u8; 1], u8>

Implementations§

source§

impl ble_gap_adv_params_t

source

pub fn set_id(&self) -> u8

source

pub fn set_set_id(&mut self, val: u8)

source

pub fn scan_req_notification(&self) -> u8

source

pub fn set_scan_req_notification(&mut self, val: u8)

source

pub fn new_bitfield_1(
set_id: u8,
scan_req_notification: u8
) -> __BindgenBitfieldUnit<[u8; 1], u8>

Trait Implementations§

source§

impl Clone for ble_gap_adv_params_t

source§

fn clone(&self) -> ble_gap_adv_params_t

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_gap_adv_params_t

source§

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

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

impl Copy for ble_gap_adv_params_t

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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 Twhere
U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.