diff --git a/subsys/bluetooth/Kconfig b/subsys/bluetooth/Kconfig index a8bb69aaecb..a42fe42fc8a 100644 --- a/subsys/bluetooth/Kconfig +++ b/subsys/bluetooth/Kconfig @@ -98,6 +98,7 @@ config BLUETOOTH_CONTROLLER_TO_HOST_UART_DEV_NAME source "subsys/bluetooth/common/Kconfig" source "subsys/bluetooth/host/Kconfig" source "subsys/bluetooth/controller/Kconfig" +source "subsys/bluetooth/shell/Kconfig" endif # BLUETOOTH_HCI endif # BLUETOOTH diff --git a/subsys/bluetooth/Makefile b/subsys/bluetooth/Makefile index 7474566a2fb..526118049d5 100644 --- a/subsys/bluetooth/Makefile +++ b/subsys/bluetooth/Makefile @@ -1,3 +1,4 @@ obj-y += common/ +obj-y += shell/ obj-$(CONFIG_BLUETOOTH_HCI) += host/ obj-$(CONFIG_BLUETOOTH_CONTROLLER) += controller/ diff --git a/subsys/bluetooth/shell/Kconfig b/subsys/bluetooth/shell/Kconfig new file mode 100644 index 00000000000..a9145a11098 --- /dev/null +++ b/subsys/bluetooth/shell/Kconfig @@ -0,0 +1,15 @@ +# Kconfig - Shell configuration options + +# +# Copyright (c) 2017 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# + +config BLUETOOTH_SHELL + bool "Enable Bluetooth shell" + default n + select CONSOLE_SHELL + help + Activate shell module that provides Bluetooth commands to the + console. diff --git a/subsys/bluetooth/shell/Makefile b/subsys/bluetooth/shell/Makefile new file mode 100644 index 00000000000..d999573ab2e --- /dev/null +++ b/subsys/bluetooth/shell/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_BLUETOOTH_SHELL) += bt.o diff --git a/subsys/bluetooth/shell/bt.c b/subsys/bluetooth/shell/bt.c new file mode 100644 index 00000000000..1c3e36f4da3 --- /dev/null +++ b/subsys/bluetooth/shell/bt.c @@ -0,0 +1,23 @@ +/** @file + * @brief Bluetooth shell module + * + * Provide some Bluetooth shell commands that can be useful to applications. + */ + +/* + * Copyright (c) 2017 Intel Corporation + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include +#include + +#define BT_SHELL_MODULE "bt" + +static struct shell_cmd bt_commands[] = { + { NULL, NULL, NULL } +}; + +SHELL_REGISTER(BT_SHELL_MODULE, bt_commands);