Bluetooth: Add GATT debug config option

Add a GATT debug config option to be able to limit the debug logs only
to the GATT submodule.

Change-Id: Ie486c9125070f32506547f981c704eaf3e9f2377
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2015-05-25 13:57:29 +03:00 committed by Anas Nashif
commit 8620ff3e0c
2 changed files with 14 additions and 0 deletions

View file

@ -124,6 +124,15 @@ config BLUETOOTH_DEBUG_ATT
This option enables debug support for the Bluetooth
Attribute Protocol (ATT).
config BLUETOOTH_DEBUG_GATT
bool
prompt "Bluetooth Generic Attribute Profile (GATT) debug"
depends on BLUETOOTH_DEBUG
default n
help
This option enables debug support for the Bluetooth
Generic Attribute Profile (GATT).
config BLUETOOTH_UART
bool
prompt "Bluetooth UART driver"

View file

@ -43,6 +43,11 @@
#include <bluetooth/uuid.h>
#include <bluetooth/gatt.h>
#if !defined(CONFIG_BLUETOOTH_DEBUG_GATT)
#undef BT_DBG
#define BT_DBG(fmt, ...)
#endif
static const struct bt_gatt_attr *db = NULL;
static size_t attr_count = 0;