diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2016-04-20 17:46:09 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2016-04-20 17:46:09 +0300 |
commit | 560956c54d5f641762e6741ff48e68bb724a3204 (patch) | |
tree | 01fae4f0e34dcf60e65e924943c15c18fa8f1385 | |
parent | 5cec79e4c85ec5a54080a9bc923ff06cccc07b59 (diff) |
Bluetooth: Kconfig: Split debug selection into a choice
This prepares for adding other debug types besides the printf-style
logging to the console.
Change-Id: Ic2ed305192491734da991c4f61fdaace03fd60f2
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
-rw-r--r-- | drivers/bluetooth/nble/Kconfig | 5 | ||||
-rw-r--r-- | net/bluetooth/Kconfig | 29 | ||||
-rw-r--r-- | samples/bluetooth/beacon/prj.conf | 2 | ||||
-rw-r--r-- | samples/bluetooth/beacon/prj_nble.conf | 2 | ||||
-rw-r--r-- | samples/bluetooth/central_hr/prj.conf | 2 | ||||
-rw-r--r-- | samples/bluetooth/ipsp/prj_nimble.conf | 2 | ||||
-rw-r--r-- | samples/bluetooth/peripheral/prj.conf | 2 | ||||
-rw-r--r-- | samples/bluetooth/peripheral/prj_nble.conf | 2 | ||||
-rw-r--r-- | samples/bluetooth/peripheral_esp/prj_nble.conf | 2 | ||||
-rw-r--r-- | samples/bluetooth/peripheral_hr/prj.conf | 2 | ||||
-rw-r--r-- | samples/bluetooth/peripheral_hr/prj_nble.conf | 2 | ||||
-rw-r--r-- | samples/net/echo_client/prj_bt.conf | 2 | ||||
-rw-r--r-- | samples/net/echo_server/prj_bt.conf | 2 | ||||
-rw-r--r-- | tests/bluetooth/init/prj.conf | 2 | ||||
-rw-r--r-- | tests/bluetooth/init/prj_17.conf | 2 | ||||
-rw-r--r-- | tests/bluetooth/init/prj_h5.conf | 2 | ||||
-rw-r--r-- | tests/bluetooth/shell/prj.conf | 2 | ||||
-rw-r--r-- | tests/bluetooth/shell/prj_nble.conf | 2 | ||||
-rw-r--r-- | tests/bluetooth/shell/prj_nimble.conf | 2 | ||||
-rw-r--r-- | tests/bluetooth/test_bluetooth/prj.conf | 2 | ||||
-rw-r--r-- | tests/bluetooth/tester/prj.conf | 2 |
21 files changed, 44 insertions, 28 deletions
diff --git a/drivers/bluetooth/nble/Kconfig b/drivers/bluetooth/nble/Kconfig index 42d6d5833..7fd432dea 100644 --- a/drivers/bluetooth/nble/Kconfig +++ b/drivers/bluetooth/nble/Kconfig @@ -65,11 +65,6 @@ config BLUETOOTH_MAX_PAIRED int default 7 -config BLUETOOTH_DEBUG - bool "Enable Debug" - default n - select STDOUT_CONSOLE - config BLUETOOTH_RX_STACK_SIZE int "Size of the receiving fiber stack" default 1024 diff --git a/net/bluetooth/Kconfig b/net/bluetooth/Kconfig index 2ffb0e065..8bf6830bb 100644 --- a/net/bluetooth/Kconfig +++ b/net/bluetooth/Kconfig @@ -253,21 +253,42 @@ endif # BLUETOOTH_CONN endif # BLUETOOTH_LE -config BLUETOOTH_DEBUG - bool "Bluetooth debug support" - select STDOUT_CONSOLE +config BLUETOOTH_DEBUG + bool default n + +choice + prompt "Bluetooth debug type" + depends on BLUETOOTH + default BLUETOOTH_DEBUG_NONE + +config BLUETOOTH_DEBUG_NONE + bool "No debug log" + help + Select this to disable all Bluetooth debug logs. + +config BLUETOOTH_DEBUG_STDOUT + bool "Normal printf-style to console" + select BLUETOOTH_DEBUG + select STDOUT_CONSOLE help This option enables Bluetooth debug going to standard serial console. -if BLUETOOTH_DEBUG + +endchoice + +if BLUETOOTH_DEBUG_STDOUT + config BLUETOOTH_DEBUG_COLOR bool "Use colored logs" default y help Use color in the logs. This requires an ANSI capable terminal. +endif # BLUETOOTH_DEBUG_STDOUT + +if BLUETOOTH_DEBUG config BLUETOOTH_DEBUG_HCI_CORE bool "Bluetooth HCI core debug" depends on BLUETOOTH_STACK_HCI diff --git a/samples/bluetooth/beacon/prj.conf b/samples/bluetooth/beacon/prj.conf index 2016bddd5..6cf967b6d 100644 --- a/samples/bluetooth/beacon/prj.conf +++ b/samples/bluetooth/beacon/prj.conf @@ -1,3 +1,3 @@ CONFIG_BLUETOOTH=y CONFIG_BLUETOOTH_LE=y -CONFIG_BLUETOOTH_DEBUG=y +CONFIG_BLUETOOTH_DEBUG_STDOUT=y diff --git a/samples/bluetooth/beacon/prj_nble.conf b/samples/bluetooth/beacon/prj_nble.conf index e1e31a871..774b770b0 100644 --- a/samples/bluetooth/beacon/prj_nble.conf +++ b/samples/bluetooth/beacon/prj_nble.conf @@ -2,4 +2,4 @@ CONFIG_BLUETOOTH=y CONFIG_BLUETOOTH_STACK_NBLE=y CONFIG_NBLE=y CONFIG_ARC_INIT=n -CONFIG_BLUETOOTH_DEBUG=y +CONFIG_BLUETOOTH_DEBUG_STDOUT=y diff --git a/samples/bluetooth/central_hr/prj.conf b/samples/bluetooth/central_hr/prj.conf index cb629dafb..1e3e3d3da 100644 --- a/samples/bluetooth/central_hr/prj.conf +++ b/samples/bluetooth/central_hr/prj.conf @@ -1,6 +1,6 @@ CONFIG_BLUETOOTH=y CONFIG_BLUETOOTH_LE=y -CONFIG_BLUETOOTH_DEBUG=y +CONFIG_BLUETOOTH_DEBUG_STDOUT=y CONFIG_BLUETOOTH_CENTRAL=y CONFIG_BLUETOOTH_SMP=y CONFIG_BLUETOOTH_GATT_CLIENT=y diff --git a/samples/bluetooth/ipsp/prj_nimble.conf b/samples/bluetooth/ipsp/prj_nimble.conf index 7913cd9d8..3941673db 100644 --- a/samples/bluetooth/ipsp/prj_nimble.conf +++ b/samples/bluetooth/ipsp/prj_nimble.conf @@ -4,4 +4,4 @@ CONFIG_NETWORKING_WITH_BT=y CONFIG_IP_BUF_RX_SIZE=5 CONFIG_IP_BUF_TX_SIZE=3 CONFIG_ARC_INIT=n -CONFIG_BLUETOOTH_DEBUG=y +CONFIG_BLUETOOTH_DEBUG_STDOUT=y diff --git a/samples/bluetooth/peripheral/prj.conf b/samples/bluetooth/peripheral/prj.conf index f0714235a..6790f4926 100644 --- a/samples/bluetooth/peripheral/prj.conf +++ b/samples/bluetooth/peripheral/prj.conf @@ -1,6 +1,6 @@ CONFIG_BLUETOOTH=y CONFIG_BLUETOOTH_LE=y -CONFIG_BLUETOOTH_DEBUG=y +CONFIG_BLUETOOTH_DEBUG_STDOUT=y CONFIG_BLUETOOTH_SMP=y CONFIG_BLUETOOTH_SIGNING=y CONFIG_BLUETOOTH_PERIPHERAL=y diff --git a/samples/bluetooth/peripheral/prj_nble.conf b/samples/bluetooth/peripheral/prj_nble.conf index e1e31a871..774b770b0 100644 --- a/samples/bluetooth/peripheral/prj_nble.conf +++ b/samples/bluetooth/peripheral/prj_nble.conf @@ -2,4 +2,4 @@ CONFIG_BLUETOOTH=y CONFIG_BLUETOOTH_STACK_NBLE=y CONFIG_NBLE=y CONFIG_ARC_INIT=n -CONFIG_BLUETOOTH_DEBUG=y +CONFIG_BLUETOOTH_DEBUG_STDOUT=y diff --git a/samples/bluetooth/peripheral_esp/prj_nble.conf b/samples/bluetooth/peripheral_esp/prj_nble.conf index e1e31a871..774b770b0 100644 --- a/samples/bluetooth/peripheral_esp/prj_nble.conf +++ b/samples/bluetooth/peripheral_esp/prj_nble.conf @@ -2,4 +2,4 @@ CONFIG_BLUETOOTH=y CONFIG_BLUETOOTH_STACK_NBLE=y CONFIG_NBLE=y CONFIG_ARC_INIT=n -CONFIG_BLUETOOTH_DEBUG=y +CONFIG_BLUETOOTH_DEBUG_STDOUT=y diff --git a/samples/bluetooth/peripheral_hr/prj.conf b/samples/bluetooth/peripheral_hr/prj.conf index 0738e8b62..3bd942ffe 100644 --- a/samples/bluetooth/peripheral_hr/prj.conf +++ b/samples/bluetooth/peripheral_hr/prj.conf @@ -1,6 +1,6 @@ CONFIG_BLUETOOTH=y CONFIG_BLUETOOTH_LE=y -CONFIG_BLUETOOTH_DEBUG=y +CONFIG_BLUETOOTH_DEBUG_STDOUT=y CONFIG_BLUETOOTH_SMP=y CONFIG_BLUETOOTH_PERIPHERAL=y CONFIG_BLUETOOTH_GATT_DYNAMIC_DB=y diff --git a/samples/bluetooth/peripheral_hr/prj_nble.conf b/samples/bluetooth/peripheral_hr/prj_nble.conf index e1e31a871..774b770b0 100644 --- a/samples/bluetooth/peripheral_hr/prj_nble.conf +++ b/samples/bluetooth/peripheral_hr/prj_nble.conf @@ -2,4 +2,4 @@ CONFIG_BLUETOOTH=y CONFIG_BLUETOOTH_STACK_NBLE=y CONFIG_NBLE=y CONFIG_ARC_INIT=n -CONFIG_BLUETOOTH_DEBUG=y +CONFIG_BLUETOOTH_DEBUG_STDOUT=y diff --git a/samples/net/echo_client/prj_bt.conf b/samples/net/echo_client/prj_bt.conf index d976641fd..39bb5d72f 100644 --- a/samples/net/echo_client/prj_bt.conf +++ b/samples/net/echo_client/prj_bt.conf @@ -1,7 +1,7 @@ CONFIG_TEST_RANDOM_GENERATOR=y CONFIG_BLUETOOTH=y CONFIG_BLUETOOTH_LE=y -CONFIG_BLUETOOTH_DEBUG=y +CONFIG_BLUETOOTH_DEBUG_STDOUT=y CONFIG_BLUETOOTH_SMP=y CONFIG_BLUETOOTH_SIGNING=y CONFIG_BLUETOOTH_PERIPHERAL=y diff --git a/samples/net/echo_server/prj_bt.conf b/samples/net/echo_server/prj_bt.conf index b9c347e21..d39267b6c 100644 --- a/samples/net/echo_server/prj_bt.conf +++ b/samples/net/echo_server/prj_bt.conf @@ -1,6 +1,6 @@ CONFIG_BLUETOOTH=y CONFIG_BLUETOOTH_LE=y -CONFIG_BLUETOOTH_DEBUG=y +CONFIG_BLUETOOTH_DEBUG_STDOUT=y CONFIG_BLUETOOTH_DEBUG_L2CAP=y CONFIG_BLUETOOTH_SMP=y CONFIG_BLUETOOTH_SIGNING=y diff --git a/tests/bluetooth/init/prj.conf b/tests/bluetooth/init/prj.conf index 2016bddd5..6cf967b6d 100644 --- a/tests/bluetooth/init/prj.conf +++ b/tests/bluetooth/init/prj.conf @@ -1,3 +1,3 @@ CONFIG_BLUETOOTH=y CONFIG_BLUETOOTH_LE=y -CONFIG_BLUETOOTH_DEBUG=y +CONFIG_BLUETOOTH_DEBUG_STDOUT=y diff --git a/tests/bluetooth/init/prj_17.conf b/tests/bluetooth/init/prj_17.conf index 8f196aa86..0763bc3f3 100644 --- a/tests/bluetooth/init/prj_17.conf +++ b/tests/bluetooth/init/prj_17.conf @@ -10,7 +10,7 @@ CONFIG_BLUETOOTH_USE_DEBUG_KEYS=y CONFIG_BLUETOOTH_L2CAP_DYNAMIC_CHANNEL=y CONFIG_BLUETOOTH_GATT_DYNAMIC_DB=y CONFIG_BLUETOOTH_GATT_CLIENT=y -CONFIG_BLUETOOTH_DEBUG=y +CONFIG_BLUETOOTH_DEBUG_STDOUT=y CONFIG_BLUETOOTH_DEBUG_HCI_CORE=y CONFIG_BLUETOOTH_DEBUG_CONN=y CONFIG_BLUETOOTH_DEBUG_KEYS=y diff --git a/tests/bluetooth/init/prj_h5.conf b/tests/bluetooth/init/prj_h5.conf index e96ed8efc..68674225c 100644 --- a/tests/bluetooth/init/prj_h5.conf +++ b/tests/bluetooth/init/prj_h5.conf @@ -1,4 +1,4 @@ CONFIG_BLUETOOTH=y CONFIG_BLUETOOTH_H5=y CONFIG_BLUETOOTH_LE=y -CONFIG_BLUETOOTH_DEBUG=y +CONFIG_BLUETOOTH_DEBUG_STDOUT=y diff --git a/tests/bluetooth/shell/prj.conf b/tests/bluetooth/shell/prj.conf index ddeee9111..f3ce40b58 100644 --- a/tests/bluetooth/shell/prj.conf +++ b/tests/bluetooth/shell/prj.conf @@ -3,7 +3,7 @@ CONFIG_BLUETOOTH=y CONFIG_BLUETOOTH_LE=y CONFIG_BLUETOOTH_BREDR=y CONFIG_CONSOLE_HANDLER=y -CONFIG_BLUETOOTH_DEBUG=y +CONFIG_BLUETOOTH_DEBUG_STDOUT=y CONFIG_BLUETOOTH_CENTRAL=y CONFIG_BLUETOOTH_PERIPHERAL=y CONFIG_BLUETOOTH_PRIVACY=y diff --git a/tests/bluetooth/shell/prj_nble.conf b/tests/bluetooth/shell/prj_nble.conf index 95e5d7449..642036669 100644 --- a/tests/bluetooth/shell/prj_nble.conf +++ b/tests/bluetooth/shell/prj_nble.conf @@ -6,4 +6,4 @@ CONFIG_NBLE=y CONFIG_ARC_INIT=n CONFIG_CONSOLE_HANDLER=y CONFIG_CONSOLE_HANDLER_SHELL=y -CONFIG_BLUETOOTH_DEBUG=y +CONFIG_BLUETOOTH_DEBUG_STDOUT=y diff --git a/tests/bluetooth/shell/prj_nimble.conf b/tests/bluetooth/shell/prj_nimble.conf index 2d02b482d..732239051 100644 --- a/tests/bluetooth/shell/prj_nimble.conf +++ b/tests/bluetooth/shell/prj_nimble.conf @@ -2,7 +2,7 @@ CONFIG_MINIMAL_LIBC_EXTENDED=y CONFIG_BLUETOOTH=y CONFIG_BLUETOOTH_LE=y CONFIG_CONSOLE_HANDLER=y -CONFIG_BLUETOOTH_DEBUG=y +CONFIG_BLUETOOTH_DEBUG_STDOUT=y CONFIG_BLUETOOTH_CENTRAL=y CONFIG_BLUETOOTH_PERIPHERAL=y CONFIG_BLUETOOTH_PRIVACY=y diff --git a/tests/bluetooth/test_bluetooth/prj.conf b/tests/bluetooth/test_bluetooth/prj.conf index 67e07cfcf..afd3716e8 100644 --- a/tests/bluetooth/test_bluetooth/prj.conf +++ b/tests/bluetooth/test_bluetooth/prj.conf @@ -4,5 +4,5 @@ CONFIG_TEST_RANDOM_GENERATOR=y CONFIG_BLUETOOTH=y CONFIG_BLUETOOTH_LE=y CONFIG_BLUETOOTH_NO_DRIVER=y -CONFIG_BLUETOOTH_DEBUG=y +CONFIG_BLUETOOTH_DEBUG_STDOUT=y CONFIG_UART_INTERRUPT_DRIVEN=n diff --git a/tests/bluetooth/tester/prj.conf b/tests/bluetooth/tester/prj.conf index 617e07ccc..bf32cd7ab 100644 --- a/tests/bluetooth/tester/prj.conf +++ b/tests/bluetooth/tester/prj.conf @@ -8,7 +8,7 @@ CONFIG_BLUETOOTH_SMP=y CONFIG_BLUETOOTH_SIGNING=y CONFIG_BLUETOOTH_GATT_DYNAMIC_DB=y CONFIG_BLUETOOTH_GATT_CLIENT=y -CONFIG_BLUETOOTH_DEBUG=y +CONFIG_BLUETOOTH_DEBUG_STDOUT=y CONFIG_BLUETOOTH_DEBUG_HCI_CORE=y CONFIG_BLUETOOTH_DEBUG_BUF=y CONFIG_BLUETOOTH_DEBUG_CONN=y |