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

◆ ble_bas_client_handles_assign()

uint32_t ble_bas_client_handles_assign ( struct ble_bas_client * bas_client,
uint16_t conn_handle,
const struct ble_bas_client_handles * peer_handles )

#include <ble_bas_client.h>

Assign client handles to the BAS Client instance.

Call this function when a link has been established with a peer to associate the link to this instance of the module. This makes it possible to handle several links and associate each link to a particular instance of this module. The connection handle and attribute handles are provided from the discovery event BLE_BAS_CLIENT_EVT_DISCOVERY_COMPLETE.

Parameters
[in]bas_clientBattery client structure instance for associating the link.
[in]conn_handleConnection handle associated with the given Battery Client instance.
[in]peer_handlesAttribute handles on the BAS server you want this BAS client to interact with.
Return values
NRF_SUCCESSOn success.
NRF_ERROR_NULLIf bas_client is NULL.
Returns
In addition, this function may return any error returned by the following functions: