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

◆ ble_nus_client_handles_assign()

uint32_t ble_nus_client_handles_assign ( struct ble_nus_client * nus_client,
uint16_t conn_handle,
const struct ble_nus_client_handles * peer_handles )

#include <ble_nus_client.h>

Assign handles to this instance of the service.

This function must be called by the application when a link has been established with a peer to associate the link to this instance of the service. This makes it possible to handle several links and associate each link to a particular instance of this service. The connection handle and attribute handles are provided from the discovery event BLE_NUS_CLIENT_EVT_DISCOVERY_COMPLETE.

Parameters
[in]nus_clientNUS client structure instance to associate with the handles.
[in]conn_handleConnection handle to associated with the given NUS Instance.
[in]peer_handlesAttribute handles on the NUS server to interact with.
Return values
NRF_SUCCESSOn success.
NRF_ERROR_NULLIf nus_client or peer_handles is NULL.
Returns
In addition, this function may return any error returned by the following functions:
  • nrf_ble_gq_item_add()