ble_gatts_count_cfg

int
ble_gatts_count_cfg(const struct ble_gatt_svc_def *defs)

Description

Adjusts a host configuration object's settings to accommodate the specified service definition array. This function adds the counts to the appropriate fields in the supplied configuration object without clearing them first, so it can be called repeatedly with different inputs to calculate totals. Be sure to zero the GATT server settings prior to the first call to this function.

Parameters

ParameterDescription
defsThe service array containing the resource definitions to be counted.
cfgThe resource counts are accumulated in this configuration object.

Returned values

ValueCondition
0Success.
BLE_HS_EINVALThe svcs array contains an invalid resource definition.