Bluetooth: GATT: Fix undefined symbols

Change fixes build issues for configurations without Bluetooth.

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
This commit is contained in:
Marek Pieta 2021-04-07 09:27:25 +02:00 committed by Carles Cufí
commit cc21ff5a8c
2 changed files with 6 additions and 2 deletions

View file

@ -622,10 +622,12 @@ ssize_t bt_gatt_attr_read_chrc(struct bt_conn *conn,
})), \
BT_GATT_ATTRIBUTE(_uuid, _perm, _read, _write, _value)
#if IS_ENABLED(CONFIG_BT_SETTINGS_CCC_LAZY_LOADING)
#if defined(CONFIG_BT_SETTINGS_CCC_LAZY_LOADING)
#define BT_GATT_CCC_MAX (CONFIG_BT_MAX_CONN)
#else
#elif defined(CONFIG_BT_CONN)
#define BT_GATT_CCC_MAX (CONFIG_BT_MAX_PAIRED + CONFIG_BT_MAX_CONN)
#else
#define BT_GATT_CCC_MAX 0
#endif
/** @brief GATT CCC configuration entry. */

View file

@ -206,6 +206,7 @@ config BT_SETTINGS
if BT_SETTINGS
config BT_SETTINGS_CCC_LAZY_LOADING
bool "Load CCC values from settings when peer connects"
depends on BT_CONN
default y
help
Load Client Configuration Characteristic setting right after a bonded
@ -215,6 +216,7 @@ config BT_SETTINGS_CCC_LAZY_LOADING
config BT_SETTINGS_CCC_STORE_ON_WRITE
bool "Store CCC value immediately after it has been written"
depends on BT_CONN
help
Store Client Configuration Characteristic value right after it has
been updated.