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

◆ pm_allow_list_set()

uint32_t pm_allow_list_set ( const uint16_t * peers,
uint32_t peer_cnt )

#include <peer_manager.h>

Set or clear the allow list.

To clear the current allow list, pass either NULL as peers or zero as peer_cnt.

Parameters
[in]peersThe peers to add to the allow list. Pass NULL to clear the current allow list.
[in]peer_cntThe number of peers to add to the allow list. The number must not be greater than BLE_GAP_WHITELIST_ADDR_MAX_COUNT. Pass zero to clear the current allow list.
Return values
NRF_SUCCESSIf the allow list was successfully set or cleared.
BLE_ERROR_GAP_WHITELIST_IN_USEIf an allow list is already in use and cannot be set.
BLE_ERROR_GAP_INVALID_BLE_ADDRIf a peer in peers has an address that cannot be added to the allow list.
NRF_ERROR_NOT_FOUNDIf any of the peers in peers cannot be found.
NRF_ERROR_DATA_SIZEIf peer_cnt is greater than BLE_GAP_WHITELIST_ADDR_MAX_COUNT.
NRF_ERROR_INVALID_STATEIf the Peer Manager is not initialized.