Bluetooth: GATT Introduce BT_GATT_CCC_MAX helper define

The worst-case maximum number of CCC entries we need is actually
MAX_CONN + MAX_PAIRED. Provide a helper define for it and use it
whenever appropriate.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2017-07-04 16:46:13 +03:00 committed by Johan Hedberg
commit 30beef9419
11 changed files with 14 additions and 11 deletions

View file

@ -485,6 +485,9 @@ ssize_t bt_gatt_attr_read_chrc(struct bt_conn *conn,
.properties = _props, }),\
}
#define BT_GATT_CCC_MAX (CONFIG_BLUETOOTH_MAX_PAIRED + \
CONFIG_BLUETOOTH_MAX_CONN)
/** @brief GATT CCC configuration entry. */
struct bt_gatt_ccc_cfg {
/** Config valid flag. */