Shell: Add initial code for bt shell module

This adds the config option and files of the bt shell module.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
Luiz Augusto von Dentz 2017-05-22 10:17:22 +03:00 committed by Johan Hedberg
commit 1c4561925c
5 changed files with 41 additions and 0 deletions

View file

@ -98,6 +98,7 @@ config BLUETOOTH_CONTROLLER_TO_HOST_UART_DEV_NAME
source "subsys/bluetooth/common/Kconfig" source "subsys/bluetooth/common/Kconfig"
source "subsys/bluetooth/host/Kconfig" source "subsys/bluetooth/host/Kconfig"
source "subsys/bluetooth/controller/Kconfig" source "subsys/bluetooth/controller/Kconfig"
source "subsys/bluetooth/shell/Kconfig"
endif # BLUETOOTH_HCI endif # BLUETOOTH_HCI
endif # BLUETOOTH endif # BLUETOOTH

View file

@ -1,3 +1,4 @@
obj-y += common/ obj-y += common/
obj-y += shell/
obj-$(CONFIG_BLUETOOTH_HCI) += host/ obj-$(CONFIG_BLUETOOTH_HCI) += host/
obj-$(CONFIG_BLUETOOTH_CONTROLLER) += controller/ obj-$(CONFIG_BLUETOOTH_CONTROLLER) += controller/

View file

@ -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.

View file

@ -0,0 +1 @@
obj-$(CONFIG_BLUETOOTH_SHELL) += bt.o

View file

@ -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 <zephyr.h>
#include <stdlib.h>
#include <shell/shell.h>
#define BT_SHELL_MODULE "bt"
static struct shell_cmd bt_commands[] = {
{ NULL, NULL, NULL }
};
SHELL_REGISTER(BT_SHELL_MODULE, bt_commands);