Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d37ff6f
include: bluetooth: peer_manager: place const before storage type
anhmolt Oct 20, 2025
8dd756a
lib: peer_manager: Log peers delete successful as info and not error
anhmolt Sep 23, 2025
853e362
lib: peer_manager: use uint16_t in place of pm_peer_id_t
anhmolt Oct 16, 2025
aeb56f8
lib: peer_manager: use uint32_t in place of pm_store_token_t
anhmolt Oct 16, 2025
8754caa
lib: peer_manager: use uint16_t in place of pm_sec_error_code_t
anhmolt Oct 16, 2025
8947b36
lib: peer_manager: remove ble_gatt_db typedefs
anhmolt Oct 20, 2025
e87a166
lib: peer_manager: remove typedef for peer_id_list_skip enum
anhmolt Oct 20, 2025
eec64ee
lib: peer_manager: remove typedef for pm_peer_data_id enum
anhmolt Oct 20, 2025
7ddcd8e
lib: peer_manager: remove typedef for pm_conn_sec_procedure enum
anhmolt Oct 20, 2025
d85617d
lib: peer_manager: remove typedef for pm_conn_sec_config struct
anhmolt Oct 20, 2025
d9ec184
lib: peer_manager: remove typedef for pm_peer_data_bonding struct
anhmolt Oct 20, 2025
5abfdfc
lib: peer_manager: remove typedef for pm_peer_data_local_gatt_db struct
anhmolt Oct 20, 2025
d9c4914
lib: peer_manager: remove typedef pm_privacy_params_t
anhmolt Oct 20, 2025
d89904d
lib: peer_manager: remove typedef for pm_conn_sec_status struct
anhmolt Oct 20, 2025
fcde01b
lib: peer_manager: remove typedef for pm_evt_id enum
anhmolt Oct 20, 2025
61a7a4a
lib: peer_manager: remove typedef for params of pm_evt_t
anhmolt Oct 20, 2025
ce43394
lib: peer_manager: remove typedef for pm_evt struct
anhmolt Oct 20, 2025
03f3ed5
lib: peer_manager: remove internal typedefs for structs and enums
anhmolt Oct 20, 2025
c41318c
lib: peer_manager: move const keyword before storage type
anhmolt Oct 20, 2025
2c0a464
lib: peer_manager: rework mutex/atomic in gatt_cache_manager
anhmolt Oct 20, 2025
533b4d2
lib: peer_manager: remove sdk_macros
anhmolt Oct 21, 2025
e341bfa
lib: peer_manager: id_manager: wrong wlist_addr_cnt input value
anhmolt Oct 21, 2025
461e9da
lib: peer_manager: remove NRF_PM_DEBUG_CHECK and use assert
anhmolt Oct 21, 2025
a586516
lib: peer_manager: small include header cleanup
anhmolt Oct 21, 2025
e1cc066
lib: peer_manager: fixes for PM_HANDLER_SEC_DELAY_MS greater than zero
anhmolt Oct 13, 2025
882b5cf
lib: peer_manager: cleanup pm handler sec delay functionality
anhmolt Oct 21, 2025
6b040e8
lib: peer_manager: remove hungarian notation in internal module files
anhmolt Oct 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions doc/nrf-bm/libraries/bluetooth/ble_peer_manager.rst
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ The handlers can be provided to the :c:func:`pm_register` function directly, or

.. code-block:: c

static void pm_evt_handler(pm_evt_t const *p_evt)
static void pm_evt_handler(const struct pm_evt *p_evt)
{
pm_handler_on_pm_evt(p_evt);
pm_handler_disconnect_on_sec_failure(p_evt);
Expand Down Expand Up @@ -349,7 +349,7 @@ The store operation is finished when either the :c:enum:`PM_EVT_PEER_DATA_UPDATE
.. code-block:: c

uint32_t err;
pm_store_token_t store_token;
uint32_t store_token;

err = pm_peer_data_remote_db_store(peer_id, array_of_services, number_of_services, &store_token);
if (err != NRF_ERROR_BUSY) {
Expand All @@ -362,7 +362,7 @@ The :c:func:`pm_peer_data_store` function can also be used directly, as in the f
.. code-block:: c

uint32_t err;
pm_store_token_t store_token;
uint32_t store_token;

err = pm_peer_data_store(peer_id, PM_PEER_DATA_ID_GATT_REMOTE, array_of_services, number_of_services, &store_token);
if (err != NRF_ERROR_BUSY) {
Expand All @@ -382,9 +382,9 @@ The following example shows how to use the :c:func:`pm_whitelist_set` function t
{
/* Fetch a list of peer IDs from Peer Manager and whitelist them. */

pm_peer_id_t peer_ids[8] = {PM_PEER_ID_INVALID};
uint16_t peer_ids[8] = {PM_PEER_ID_INVALID};
uint32_t n_peer_ids = 0;
pm_peer_id_t peer_id = pm_next_peer_id_get(PM_PEER_ID_INVALID);
uint16_t peer_id = pm_next_peer_id_get(PM_PEER_ID_INVALID);

while((peer_id != PM_PEER_ID_INVALID) && (n_peer_ids < 8)) {
peer_ids[n_peer_ids++] = peer_id;
Expand Down
24 changes: 24 additions & 0 deletions doc/nrf-bm/release_notes/release_notes_changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,30 @@ Libraries
* The ``CONFIG_PM_LESC_ENABLED`` Kconfig option is renamed to :kconfig:option:`CONFIG_PM_LESC`.
* The ``CONFIG_PM_RA_PROTECTION_ENABLED`` Kconfig option is renamed to :kconfig:option:`CONFIG_PM_RA_PROTECTION`.
* The :kconfig:option:`CONFIG_PM_SERVICE_CHANGED` Kconfig option to depend on the :kconfig:option:`CONFIG_NRF_SDH_BLE_SERVICE_CHANGED` Kconfig option.
* All instances of ``pm_peer_id_t`` to ``uint16_t`` and removed the ``pm_peer_id_t`` type.
* All instances of ``pm_store_token_t`` to ``uint32_t`` and removed the ``pm_store_token_t`` type.
* All instances of ``pm_sec_error_code_t`` to ``uint16_t`` and removed the ``pm_sec_error_code_t`` type.
* All instances of ``ble_gatt_db_src_t`` to :c:struct:`ble_gatt_db_srv` and removed the ``ble_gatt_db_src_t`` type.
* All instances of ``ble_gatt_db_char_t`` to :c:struct:`ble_gatt_db_char` and removed the ``ble_gatt_db_char_t`` type.
* All instances of ``pm_peer_id_list_skip_t`` to :c:enum:`pm_peer_id_list_skip` and removed the ``pm_peer_id_list_skip_t`` type.
* All instances of ``pm_peer_data_id_t`` to :c:enum:`pm_peer_data_id` and removed the ``pm_peer_data_id_t`` type.
* All instances of ``pm_conn_sec_procedure_t`` to :c:enum:`pm_conn_sec_procedure` and removed the ``pm_conn_sec_procedure_t`` type.
* All instances of ``pm_conn_sec_config_t`` to :c:struct:`pm_conn_sec_config` and removed the ``pm_conn_sec_config_t`` type.
* All instances of ``pm_peer_data_bonding_t`` to :c:struct:`pm_peer_data_bonding` and removed the ``pm_peer_data_bonding_t`` type.
* All instances of ``pm_peer_data_local_gatt_db_t`` to :c:struct:`pm_peer_data_local_gatt_db` and removed the ``pm_peer_data_local_gatt_db_t`` type.
* All instances of ``pm_privacy_params_t`` to :c:type:`ble_gap_privacy_params_t` and removed the ``pm_privacy_params_t`` type.
* All instances of ``pm_conn_sec_status_t`` to :c:struct:`pm_conn_sec_status` and removed the ``pm_conn_sec_status_t`` type.
* All instances of ``pm_evt_id_t`` to :c:enum:`pm_evt_id` and removed the ``pm_evt_id_t`` type.
* All instances of ``pm_conn_config_req_evt_t`` to :c:struct:`pm_conn_config_req_evt` and removed the ``pm_conn_config_req_evt_t`` type.
* All instances of ``pm_conn_sec_start_evt_t`` to :c:struct:`pm_conn_sec_start_evt` and removed the ``pm_conn_sec_start_evt_t`` type.
* All instances of ``pm_conn_secured_evt_t`` to :c:struct:`pm_conn_secured_evt` and removed the ``pm_conn_secured_evt_t`` type.
* All instances of ``pm_conn_secure_failed_evt_t`` to :c:struct:`pm_conn_secure_failed_evt` and removed the ``pm_conn_secure_failed_evt_t`` type.
* All instances of ``pm_conn_sec_params_req_evt_t`` to :c:struct:`pm_conn_sec_params_req_evt` and removed the ``pm_conn_sec_params_req_evt_t`` type.
* All instances of ``pm_peer_data_op_t`` to :c:enum:`pm_peer_data_op` and removed the ``pm_peer_data_op_t`` type.
* All instances of ``pm_peer_data_update_succeeded_evt_t`` to :c:struct:`pm_peer_data_update_succeeded_evt` and removed the ``pm_peer_data_update_succeeded_evt_t`` type.
* All instances of ``pm_peer_data_update_failed_t`` to :c:struct:`pm_peer_data_update_failed` and removed the ``pm_peer_data_update_failed_t`` type.
* All instances of ``pm_failure_evt_t`` to :c:struct:`pm_failure_evt` and removed the ``pm_failure_evt_t`` type.
* All instances of ``pm_evt_t`` to :c:struct:`pm_evt` and removed the ``pm_evt_t`` type.

Samples
=======
Expand Down
10 changes: 5 additions & 5 deletions include/bm/bluetooth/peer_manager/ble_gatt_db.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ extern "C" {
/**
* @brief Structure for holding the characteristic and the handle of its CCCD present on a server.
*/
typedef struct {
struct ble_gatt_db_char {
/** @brief Structure containing information about the characteristic. */
ble_gattc_char_t characteristic;
/**
Expand All @@ -55,13 +55,13 @@ typedef struct {
* descriptor is not present at the server.
*/
uint16_t report_ref_handle;
} ble_gatt_db_char_t;
};

/**
* @brief Structure for holding information about the service and the characteristics present on a
* server.
*/
typedef struct {
struct ble_gatt_db_srv {
/** @brief UUID of the service. */
ble_uuid_t srv_uuid;
/** @brief Number of characteristics present in the service. */
Expand All @@ -72,8 +72,8 @@ typedef struct {
* @brief Array of information related to the characteristics present in the service.
* This list can extend further than one.
*/
ble_gatt_db_char_t charateristics[BLE_GATT_DB_MAX_CHARS];
} ble_gatt_db_srv_t;
struct ble_gatt_db_char charateristics[BLE_GATT_DB_MAX_CHARS];
};

#ifdef __cplusplus
}
Expand Down
78 changes: 39 additions & 39 deletions include/bm/bluetooth/peer_manager/peer_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extern "C" {
#endif

/** @brief Peer list filtrations. They determine which peer ID will be added to list. */
typedef enum {
enum pm_peer_id_list_skip {
/** @brief Add all peers. */
PM_PEER_ID_LIST_ALL_ID,
/** @brief Add only peers with an ID address (static address). */
Expand All @@ -49,7 +49,7 @@ typedef enum {
PM_PEER_ID_LIST_SKIP_NO_CAR = 1 << 2,
/** @brief All above filters applied. */
PM_PEER_ID_LIST_SKIP_ALL = PM_PEER_ID_LIST_SKIP_NO_IRK | PM_PEER_ID_LIST_SKIP_NO_CAR
} pm_peer_id_list_skip_t;
};

/**
* @brief Initialize the Peer Manager.
Expand Down Expand Up @@ -154,20 +154,20 @@ uint32_t pm_conn_secure(uint16_t conn_handle, bool force_repairing);
* @retval NRF_SUCCESS If the reply was successful.
* @retval NRF_ERROR_NULL If @p context was NULL.
*/
uint32_t pm_conn_exclude(uint16_t conn_handle, void const *context);
uint32_t pm_conn_exclude(uint16_t conn_handle, const void *context);

/**
* @brief Provide a security configuration for a link.
*
* @details This function is optional, and must be called in reply to a @ref
* PM_EVT_CONN_SEC_CONFIG_REQ event, before the Peer Manager event handler returns. If it
* is not called in time, a default configuration is used. See @ref pm_conn_sec_config_t
* is not called in time, a default configuration is used. See @ref pm_conn_sec_config
* for the value of the default.
*
* @param[in] conn_handle The connection to set the configuration for.
* @param[in] conn_sec_config The configuration.
*/
void pm_conn_sec_config_reply(uint16_t conn_handle, pm_conn_sec_config_t *conn_sec_config);
void pm_conn_sec_config_reply(uint16_t conn_handle, struct pm_conn_sec_config *conn_sec_config);

/**
* @brief Provide security parameters for a link.
Expand Down Expand Up @@ -215,7 +215,7 @@ void pm_local_database_has_changed(void);
* @retval NRF_ERROR_NULL If @p conn_sec_status was NULL.
* @retval NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized.
*/
uint32_t pm_conn_sec_status_get(uint16_t conn_handle, pm_conn_sec_status_t *conn_sec_status);
uint32_t pm_conn_sec_status_get(uint16_t conn_handle, struct pm_conn_sec_status *conn_sec_status);

/**
* @brief Compare the security status of a connection against a baseline.
Expand All @@ -228,7 +228,7 @@ uint32_t pm_conn_sec_status_get(uint16_t conn_handle, pm_conn_sec_status_t *conn
* @retval false If the security status of the connection does not fulfill the baseline, or could
* not be retrieved.
*/
bool pm_sec_is_sufficient(uint16_t conn_handle, pm_conn_sec_status_t *sec_status_req);
bool pm_sec_is_sufficient(uint16_t conn_handle, struct pm_conn_sec_status *sec_status_req);

/**
* @brief Specify the public key to use for LESC operations.
Expand Down Expand Up @@ -276,7 +276,7 @@ uint32_t pm_lesc_public_key_set(ble_gap_lesc_p256_pk_t *public_key);
* @ref BLE_GAP_WHITELIST_ADDR_MAX_COUNT.
* @retval NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized.
*/
uint32_t pm_whitelist_set(const pm_peer_id_t *peers, uint32_t peer_cnt);
uint32_t pm_whitelist_set(const uint16_t *peers, uint32_t peer_cnt);

/**
* @brief Retrieve the previously set whitelist.
Expand Down Expand Up @@ -336,7 +336,7 @@ uint32_t pm_whitelist_get(ble_gap_addr_t *addrs, uint32_t *addr_cnt, ble_gap_irk
* @retval NRF_ERROR_NOT_SUPPORTED If using a SoftDevice that does not support
* device identities.
*/
uint32_t pm_device_identities_list_set(const pm_peer_id_t *peers, uint32_t peer_cnt);
uint32_t pm_device_identities_list_set(const uint16_t *peers, uint32_t peer_cnt);

/**
* @brief Set the local Bluetooth identity address.
Expand Down Expand Up @@ -406,7 +406,7 @@ uint32_t pm_id_addr_get(ble_gap_addr_t *addr);
* privacy are enabled.
* @retval NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized.
*/
uint32_t pm_privacy_set(const pm_privacy_params_t *privacy_params);
uint32_t pm_privacy_set(const ble_gap_privacy_params_t *privacy_params);

/**
* @brief Retrieve privacy settings.
Expand All @@ -420,7 +420,7 @@ uint32_t pm_privacy_set(const pm_privacy_params_t *privacy_params);
* NULL.
* @retval NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized.
*/
uint32_t pm_privacy_get(pm_privacy_params_t *privacy_params);
uint32_t pm_privacy_get(ble_gap_privacy_params_t *privacy_params);

/**
* @brief Resolve a resolvable address with an identity resolution key (IRK).
Expand All @@ -446,7 +446,7 @@ bool pm_address_resolve(const ble_gap_addr_t *addr, const ble_gap_irk_t *irk);
* @retval NRF_ERROR_NULL If @p conn_handle was NULL.
* @retval NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized.
*/
uint32_t pm_conn_handle_get(pm_peer_id_t peer_id, uint16_t *conn_handle);
uint32_t pm_conn_handle_get(uint16_t peer_id, uint16_t *conn_handle);

/**
* @brief Retrieve the ID of a peer, given its connection handle.
Expand All @@ -459,7 +459,7 @@ uint32_t pm_conn_handle_get(pm_peer_id_t peer_id, uint16_t *conn_handle);
* @retval NRF_ERROR_NULL If @p peer_id was NULL.
* @retval NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized.
*/
uint32_t pm_peer_id_get(uint16_t conn_handle, pm_peer_id_t *peer_id);
uint32_t pm_peer_id_get(uint16_t conn_handle, uint16_t *peer_id);

/**
* @brief Retrieve a filtered list of peer IDs.
Expand All @@ -484,8 +484,8 @@ uint32_t pm_peer_id_get(uint16_t conn_handle, pm_peer_id_t *peer_id);
* @retval NRF_ERROR_NULL If @p peer_list or @p list_size were NULL.
* @retval NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized.
*/
uint32_t pm_peer_id_list(pm_peer_id_t *peer_list, uint32_t *const list_size,
pm_peer_id_t first_peer_id, pm_peer_id_list_skip_t skip_id);
uint32_t pm_peer_id_list(uint16_t *peer_list, uint32_t *const list_size,
uint16_t first_peer_id, enum pm_peer_id_list_skip skip_id);

/**
* @brief Get the next peer ID in the sequence of all used peer IDs.
Expand All @@ -502,7 +502,7 @@ uint32_t pm_peer_id_list(pm_peer_id_t *peer_list, uint32_t *const list_size,
* next peer ID is the first used peer ID. If @p prev_peer_id was the last
* used peer ID, the function returns @ref PM_PEER_ID_INVALID.
*/
pm_peer_id_t pm_next_peer_id_get(pm_peer_id_t prev_peer_id);
uint16_t pm_next_peer_id_get(uint16_t prev_peer_id);

/**
* @brief Query the number of valid peer IDs that are available.
Expand Down Expand Up @@ -533,7 +533,7 @@ uint32_t pm_peer_count(void);
* @param[in] peer_id Peer ID to get data for.
* @param[in] data_id Which type of data to read.
* @param[out] data Where to put the retrieved data. The documentation for
* @ref pm_peer_data_id_t specifies what data type each data ID is stored as.
* @ref pm_peer_data_id specifies what data type each data ID is stored as.
* @param[in,out] len In: The length in bytes of @p data.
* Out: The length in bytes of the read data, if the read was successful.
*
Expand All @@ -549,27 +549,27 @@ uint32_t pm_peer_count(void);
* bytes) when storing.
* @retval NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized.
*/
uint32_t pm_peer_data_load(pm_peer_id_t peer_id, pm_peer_data_id_t data_id, void *data,
uint32_t pm_peer_data_load(uint16_t peer_id, enum pm_peer_data_id data_id, void *data,
uint32_t *len);

/**
* @brief Read a peer's bonding data (@ref PM_PEER_DATA_ID_BONDING).
* @details See @ref pm_peer_data_load for parameters and return values.
*/
uint32_t pm_peer_data_bonding_load(pm_peer_id_t peer_id, pm_peer_data_bonding_t *data);
uint32_t pm_peer_data_bonding_load(uint16_t peer_id, struct pm_peer_data_bonding *data);

/**
* @brief Read a peer's remote DB values. (@ref PM_PEER_DATA_ID_GATT_REMOTE).
* @details See @ref pm_peer_data_load for parameters and return values.
*/
uint32_t pm_peer_data_remote_db_load(pm_peer_id_t peer_id, ble_gatt_db_srv_t *data,
uint32_t pm_peer_data_remote_db_load(uint16_t peer_id, struct ble_gatt_db_srv *data,
uint32_t *len);

/**
* @brief Read a peer's application data. (@ref PM_PEER_DATA_ID_APPLICATION).
* @details See @ref pm_peer_data_load for parameters and return values.
*/
uint32_t pm_peer_data_app_data_load(pm_peer_id_t peer_id, void *data, uint32_t *len);
uint32_t pm_peer_data_app_data_load(uint16_t peer_id, void *data, uint32_t *len);
/** @} */

/**
Expand All @@ -590,7 +590,7 @@ uint32_t pm_peer_data_app_data_load(pm_peer_id_t peer_id, void *data, uint32_t *
*
* @param[in] peer_id Peer ID to set data for.
* @param[in] data_id The type of data to set.
* @param[in] data New value to set. The documentation for @ref pm_peer_data_id_t specifies
* @param[in] data New value to set. The documentation for @ref pm_peer_data_id specifies
* what data type each data ID should be stored as.
* @param[in] len The length in bytes of @p data.
* @param[out] token A token that identifies this particular store operation. The token can be
Expand All @@ -609,32 +609,32 @@ uint32_t pm_peer_data_app_data_load(pm_peer_id_t peer_id, void *data, uint32_t *
* so duplicate entries are avoided.
* @retval NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized.
*/
uint32_t pm_peer_data_store(pm_peer_id_t peer_id, pm_peer_data_id_t data_id, const void *data,
uint32_t len, pm_store_token_t *token);
uint32_t pm_peer_data_store(uint16_t peer_id, enum pm_peer_data_id data_id, const void *data,
uint32_t len, uint32_t *token);

/**
* @brief Set or update a peer's bonding data (@ref PM_PEER_DATA_ID_BONDING).
*
* @details See @ref pm_peer_data_store for parameters and return values.
*/
uint32_t pm_peer_data_bonding_store(pm_peer_id_t peer_id, const pm_peer_data_bonding_t *data,
pm_store_token_t *token);
uint32_t pm_peer_data_bonding_store(uint16_t peer_id, const struct pm_peer_data_bonding *data,
uint32_t *token);

/**
* @brief Set or update a peer's remote DB values. (@ref PM_PEER_DATA_ID_GATT_REMOTE).
*
* @details See @ref pm_peer_data_store for parameters and return values.
*/
uint32_t pm_peer_data_remote_db_store(pm_peer_id_t peer_id, const ble_gatt_db_srv_t *data,
uint32_t len, pm_store_token_t *token);
uint32_t pm_peer_data_remote_db_store(uint16_t peer_id, const struct ble_gatt_db_srv *data,
uint32_t len, uint32_t *token);

/**
* @brief Set or update a peer's application data. (@ref PM_PEER_DATA_ID_APPLICATION).
*
* @details See @ref pm_peer_data_store for parameters and return values.
*/
uint32_t pm_peer_data_app_data_store(pm_peer_id_t peer_id, const void *data, uint32_t len,
pm_store_token_t *token);
uint32_t pm_peer_data_app_data_store(uint16_t peer_id, const void *data, uint32_t len,
uint32_t *token);
/** @} */

/**
Expand Down Expand Up @@ -664,7 +664,7 @@ uint32_t pm_peer_data_app_data_store(pm_peer_id_t peer_id, const void *data, uin
* @retval NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized.
* @retval NRF_ERROR_INTERNAL If an internal error occurred.
*/
uint32_t pm_peer_data_delete(pm_peer_id_t peer_id, pm_peer_data_id_t data_id);
uint32_t pm_peer_data_delete(uint16_t peer_id, enum pm_peer_data_id data_id);

/**
* @brief Manually add a peer to the non-volatile storage.
Expand All @@ -690,8 +690,8 @@ uint32_t pm_peer_data_delete(pm_peer_id_t peer_id, pm_peer_data_id_t data_id);
* @retval NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized.
* @retval NRF_ERROR_INTERNAL If an internal error occurred.
*/
uint32_t pm_peer_new(pm_peer_id_t *new_peer_id, pm_peer_data_bonding_t *bonding_data,
pm_store_token_t *token);
uint32_t pm_peer_new(uint16_t *new_peer_id, struct pm_peer_data_bonding *bonding_data,
uint32_t *token);

/**
* @brief Delete all data stored for a peer and free the peer ID.
Expand All @@ -712,7 +712,7 @@ uint32_t pm_peer_new(pm_peer_id_t *new_peer_id, pm_peer_data_bonding_t *bonding_
* @retval NRF_ERROR_INVALID_PARAM If the peer ID was not valid.
* @retval NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized.
*/
uint32_t pm_peer_delete(pm_peer_id_t peer_id);
uint32_t pm_peer_delete(uint16_t peer_id);

/**
* @brief Delete all data stored for all peers.
Expand Down Expand Up @@ -767,8 +767,8 @@ uint32_t pm_peers_delete(void);
* @retval NRF_ERROR_NOT_SUPPORTED If the peer rank functionality has been disabled via the
* @c CONFIG_PM_PEER_RANKS Kconfig option.
*/
uint32_t pm_peer_ranks_get(pm_peer_id_t *highest_ranked_peer, uint32_t *highest_rank,
pm_peer_id_t *lowest_ranked_peer, uint32_t *lowest_rank);
uint32_t pm_peer_ranks_get(uint16_t *highest_ranked_peer, uint32_t *highest_rank,
uint16_t *lowest_ranked_peer, uint32_t *lowest_rank);

/**
* @brief Update the rank of a peer to be the highest among all stored peers.
Expand All @@ -782,8 +782,8 @@ uint32_t pm_peer_ranks_get(pm_peer_id_t *highest_ranked_peer, uint32_t *highest_
* @ref pm_peer_ranks_get.
*
* @note The @ref PM_EVT_PEER_DATA_UPDATE_SUCCEEDED event can arrive before the function returns if
* the peer is already ranked highest. In this case, the @ref
* pm_peer_data_update_succeeded_evt_t.flash_changed flag in the event will be false.
* the peer is already ranked highest. In this case, the flash_changed flag in the
* @ref pm_peer_data_update_succeeded_evt event will be false.
*
* @param[in] peer_id The peer to rank highest.
*
Expand All @@ -802,7 +802,7 @@ uint32_t pm_peer_ranks_get(pm_peer_id_t *highest_ranked_peer, uint32_t *highest_
* @retval NRF_ERROR_NOT_SUPPORTED If peer rank functionality has been disabled via the
* @c CONFIG_PM_PEER_RANKS Kconfig option.
*/
uint32_t pm_peer_rank_highest(pm_peer_id_t peer_id);
uint32_t pm_peer_rank_highest(uint16_t peer_id);

/** @} */

Expand Down
Loading