Topics

[RFC 2/3] Bluetooth: Kconfig: Add BLUETOOTH_DEBUG_TIMER


Luiz Augusto von Dentz
 

From: Luiz Augusto von Dentz <luiz.von.dentz(a)intel.com>

This adds BLUETOOTH_DEBUG_TIMER which can be used to enable debug for the
bt_timer related APIs.

Change-Id: I630de79339a831c060a8d81be6a49841af9f2587
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz(a)intel.com>
---
net/bluetooth/Kconfig | 8 ++++++++
net/bluetooth/timer.c | 5 +++++
2 files changed, 13 insertions(+)

diff --git a/net/bluetooth/Kconfig b/net/bluetooth/Kconfig
index 2d703e3..ee1057f 100644
--- a/net/bluetooth/Kconfig
+++ b/net/bluetooth/Kconfig
@@ -343,6 +343,14 @@ config BLUETOOTH_DEBUG_GATT
This option enables debug support for the Bluetooth
Generic Attribute Profile (GATT).

+config BLUETOOTH_DEBUG_TIMER
+ bool "Bluetooth Timer Fiber debug"
+ depends on BLUETOOTH_CONN
+ default n
+ help
+ This option enables debug support for the Bluetooth
+ Timer Fiber.
+
endif # BLUETOOTH_DEBUG

config BLUETOOTH_BREDR
diff --git a/net/bluetooth/timer.c b/net/bluetooth/timer.c
index 608ee4f..6967a2c 100644
--- a/net/bluetooth/timer.c
+++ b/net/bluetooth/timer.c
@@ -29,6 +29,11 @@

#include "timer.h"

+#if !defined(CONFIG_BLUETOOTH_DEBUG_TIMER)
+#undef BT_DBG
+#define BT_DBG(fmt, ...)
+#endif
+
struct timer_queue {
struct bt_timer_queue tq;

--
2.5.5