riot_sys::bindgen

Function ble_gap_disc

Source
pub unsafe extern "C" 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 c_void,
) -> c_int
Expand description

Performs the Limited or General Discovery Procedures.

@param own_addr_type The type of address the stack should use for itself when sending scan requests. Valid values are: - BLE_ADDR_TYPE_PUBLIC - BLE_ADDR_TYPE_RANDOM - BLE_ADDR_TYPE_RPA_PUB_DEFAULT - BLE_ADDR_TYPE_RPA_RND_DEFAULT This parameter is ignored unless active scanning is being used. @param duration_ms The duration of the discovery procedure. On expiration, the procedure ends and a BLE_GAP_EVENT_DISC_COMPLETE event is reported. Units are milliseconds. Specify BLE_HS_FOREVER for no expiration. Specify 0 to use stack defaults. @param disc_params Additional arguments specifying the particulars of the discovery procedure. @param cb The callback to associate with this discovery procedure. Advertising reports and discovery termination events are reported through this callback. @param cb_arg The optional argument to pass to the callback function.

@return 0 on success; nonzero on failure.