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

◆ ble_bas_client_init()

uint32_t ble_bas_client_init ( struct ble_bas_client * bas_client,
const struct ble_bas_client_config * bas_client_config )

#include <ble_bas_client.h>

Initialize the Battery Service Client module.

This function initializes the module and sets up database discovery to discover the Battery Service. After calling this function, call ble_db_discovery_start to start discovery once a link with a peer has been established.

Parameters
[out]bas_clientBattery Service Client structure.
[in]bas_client_configBattery Service configuration structure.
Return values
NRF_SUCCESSOn success.
NRF_ERROR_NULLIf bas_client or bas_client_config is NULL.
Returns
In addition, this function may return any error returned by the following functions: