ret_code_t pm_peers_delete | ( | void | ) |
Function for deleting 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
- When there is no peer data in flash the PM_EVT_PEER_DELETE_SUCCEEDED event is sent synchronously.
- 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_SUCCESS If the deletion process was initiated successfully. NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized. NRF_ERROR_INTERNAL If an internal error occurred.