![]() |
nRF Connect SDK Bare Metal API 2.0.99
|
| 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.
| [in,out] | scan | Scan library instance. |
| [in] | mode | Filter mode: Filter types. |
| [in] | match_all | If 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. |
| NRF_SUCCESS | If the filters are enabled successfully. |
| NRF_ERROR_INVALID_PARAM | If the filter mode is invalid. |
| NRF_ERROR_NULL | If a NULL pointer is passed as input. |