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];