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:
parent
41b1c956cc
commit
1c4561925c
5 changed files with 41 additions and 0 deletions
|
@ -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
|
||||||
|
|
|
@ -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/
|
||||||
|
|
15
subsys/bluetooth/shell/Kconfig
Normal file
15
subsys/bluetooth/shell/Kconfig
Normal 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.
|
1
subsys/bluetooth/shell/Makefile
Normal file
1
subsys/bluetooth/shell/Makefile
Normal file
|
@ -0,0 +1 @@
|
||||||
|
obj-$(CONFIG_BLUETOOTH_SHELL) += bt.o
|
23
subsys/bluetooth/shell/bt.c
Normal file
23
subsys/bluetooth/shell/bt.c
Normal 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);
|
Loading…
Add table
Add a link
Reference in a new issue