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

◆ pm_peers_delete()

uint32_t pm_peers_delete ( void )

#include <peer_manager.h>

Delete all data stored for all peers.

This function sends either a PM_EVT_PEERS_DELETE_SUCCEEDED or a PM_EVT_PEERS_DELETE_FAILED event. In addition, a PM_EVT_PEER_DELETE_SUCCEEDED or PM_EVT_PEER_DELETE_FAILED event is sent for each deleted peer.

Note
If there is no peer data in storage the PM_EVT_PEER_DELETE_SUCCEEDED event is sent synchronously before returning.
Warning
Use this function only when not connected or connectable. If a peer is or becomes connected or a PM_PEER_DATA_FUNCTIONS function is used during this procedure (until the success or failure event happens), the behavior is undefined.
Return values
NRF_SUCCESSIf the deletion process was initiated successfully.
NRF_ERROR_INVALID_STATEIf the Peer Manager is not initialized.
NRF_ERROR_INTERNALIf an internal error occurred.