nrf-softdevice-s140

Crates

git

Versions

default

Flavors

#[repr(C)]
pub struct ble_gap_scan_params_t { pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1], u8>, pub scan_phys: u8, pub interval: u16, pub window: u16, pub timeout: u16, pub channel_mask: ble_gap_ch_mask_t, }
Expand description

@brief GAP scanning parameters.

Fields§

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

< Bitfield of PHYs to scan on. If set to @ref BLE_GAP_PHY_AUTO, scan_phys will default to @ref BLE_GAP_PHY_1MBPS.

  • If @ref ble_gap_scan_params_t::extended is set to 0, the only supported PHY is @ref BLE_GAP_PHY_1MBPS.
  • When used with @ref sd_ble_gap_scan_start, the bitfield indicates the PHYs the scanner will use for scanning on primary advertising channels. The scanner will accept @ref BLE_GAP_PHYS_SUPPORTED as secondary advertising channel PHYs.
  • When used with @ref sd_ble_gap_connect, the bitfield indicates the PHYs the initiator will use for scanning on primary advertising channels. The initiator will accept connections initiated on either of the @ref BLE_GAP_PHYS_SUPPORTED PHYs. If scan_phys contains @ref BLE_GAP_PHY_1MBPS and/or @ref BLE_GAP_PHY_2MBPS, the primary scan PHY is @ref BLE_GAP_PHY_1MBPS. If scan_phys also contains @ref BLE_GAP_PHY_CODED, the primary scan PHY will also contain @ref BLE_GAP_PHY_CODED. If the only scan PHY is @ref BLE_GAP_PHY_CODED, the primary scan PHY is @ref BLE_GAP_PHY_CODED only.
§interval: u16

< Scan interval in 625 us units. @sa BLE_GAP_SCAN_INTERVALS.

§window: u16

< Scan window in 625 us units. @sa BLE_GAP_SCAN_WINDOW. If scan_phys contains both @ref BLE_GAP_PHY_1MBPS and @ref BLE_GAP_PHY_CODED interval shall be larger than or equal to twice the scan window.

§timeout: u16

< Scan timeout in 10 ms units. @sa BLE_GAP_SCAN_TIMEOUT.

§channel_mask: ble_gap_ch_mask_t

< Channel mask for primary and secondary advertising channels. At least one of the primary channels, that is channel index 37-39, must be set to 0. Masking away secondary channels is not supported.

Implementations§

source§

impl ble_gap_scan_params_t

source

pub fn extended(&self) -> u8

source

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

source

pub fn report_incomplete_evts(&self) -> u8

source

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

source

pub fn active(&self) -> u8

source

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

source

pub fn filter_policy(&self) -> u8

source

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

source

pub fn new_bitfield_1(
extended: u8,
report_incomplete_evts: u8,
active: u8,
filter_policy: u8
) -> __BindgenBitfieldUnit<[u8; 1], u8>

Trait Implementations§

source§

impl Clone for ble_gap_scan_params_t

source§

fn clone(&self) -> ble_gap_scan_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_scan_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_scan_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.