ble_gatts_count_resources() function
Accumulates counts of each resource type required by the specified service definition array. This function is generally used to calculate some host configuration values prior to initialization. This function adds the counts to the appropriate fields in the supplied ble_gatt_resources object without clearing them first, so it can be called repeatedly with different inputs to calculate totals. Be sure to zero the resource struct prior to the first call to this function.
Arguments
svcs
The service array containing the resource definitions to be counted.
res
The resource counts are accumulated in this struct.
Return value
0 on success; BLE_HS_EINVAL if the svcs array contains an invalid resource definition.