nRF Connect SDK Bare Metal API 2.0.99
Loading...
Searching...
No Matches

◆ ble_scan_filters_enable()

uint32_t ble_scan_filters_enable ( struct ble_scan * scan,
uint8_t mode,
bool match_all )

#include <ble_scan.h>

Enable filtering.

Available when CONFIG_BLE_SCAN_FILTER is enabled. The filters can be combined with each other. For example, you can enable one filter or several filters. For example, (BLE_SCAN_NAME_FILTER | BLE_SCAN_UUID_FILTER) enables UUID and name filters.

Parameters
[in,out]scanScan library instance.
[in]modeFilter mode: Filter types.
[in]match_allIf this flag is set, all types of enabled filters must be matched before generating BLE_SCAN_EVT_FILTER_MATCH to the main application. Otherwise, it is enough to match one filter to trigger the filter match event.
Return values
NRF_SUCCESSIf the filters are enabled successfully.
NRF_ERROR_INVALID_PARAMIf the filter mode is invalid.
NRF_ERROR_NULLIf a NULL pointer is passed as input.
Returns
In addition, this function may return any error returned by the following SoftDevice functions: