From fb68b8e7801bf0c6113e5106c087eabe3e2ae8fa Mon Sep 17 00:00:00 2001 From: Andrei Emeltchenko Date: Tue, 16 Feb 2016 12:23:29 +0200 Subject: [PATCH] drivers/nble: Enable NBLE GAP debug Use NBLE_DEBUG_GAP to enabled / disable GAP NBLE debug. Change-Id: Iefbb18e697d523137a101df00b02d46e209e7f14 Signed-off-by: Andrei Emeltchenko --- drivers/nble/Kconfig | 8 ++++++++ drivers/nble/gap.c | 7 ++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/nble/Kconfig b/drivers/nble/Kconfig index f4d16a7b4cc..7cb7e98daca 100644 --- a/drivers/nble/Kconfig +++ b/drivers/nble/Kconfig @@ -95,6 +95,14 @@ config BLUETOOTH_DEBUG_GATT This option enables debug support for the Bluetooth Generic Attribute Profile (GATT). +config NBLE_DEBUG_GAP + bool "NBLE Generic Access Profile (GAP) debug" + default n + help + This option enables debug support for the Bluetooth + Generic Access Profile (GAP) in the interfaces to the + Nordic chip. + endif # BLUETOOTH_DEBUG config NBLE_UART_ON_DEV_NAME diff --git a/drivers/nble/gap.c b/drivers/nble/gap.c index 045098c10b5..439632caaa4 100644 --- a/drivers/nble/gap.c +++ b/drivers/nble/gap.c @@ -28,6 +28,11 @@ #include "uart.h" #include "rpc.h" +#if !defined(CONFIG_NBLE_DEBUG_GAP) +#undef BT_DBG +#define BT_DBG(fmt, ...) +#endif + #define NBLE_SWDIO_PIN 6 #define NBLE_RESET_PIN NBLE_SWDIO_PIN #define NBLE_BTWAKE_PIN 5 @@ -38,7 +43,7 @@ static bt_le_scan_cb_t *scan_dev_found_cb; /* Local Bluetooth LE Device Address */ bt_addr_le_t nble_bdaddr; -#if defined(CONFIG_BLUETOOTH_DEBUG) +#if defined(CONFIG_NBLE_DEBUG_GAP) static const char *bt_addr_le_str(const bt_addr_le_t *addr) { static char str[BT_ADDR_LE_STR_LEN];