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

◆ ble_bas_init()

uint32_t ble_bas_init ( struct ble_bas * bas,
const struct ble_bas_config * bas_config )

#include <ble_bas.h>

Initialize the battery service.

Parameters
basBattery service.
bas_configBattery service configuration.
Return values
NRF_SUCCESSOn success.
NRF_ERROR_NULLIf bas or bas_config are NULL.
Returns
In addition, this function may return any error returned by the following SoftDevice functions:
  • sd_ble_gatts_service_add()
  • sd_ble_gatts_characteristic_add()
  • sd_ble_gatts_descriptor_add()