Bluetooth: Shell: Restructure shell files
Moves around the shell files so that they are placed nearer to the features they expose access to. A few changes as possible has been made. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
parent
cb304318df
commit
bf897cf941
54 changed files with 96 additions and 122 deletions
|
@ -345,9 +345,6 @@ Bluetooth controller:
|
||||||
- subsys/bluetooth/common/
|
- subsys/bluetooth/common/
|
||||||
- subsys/bluetooth/controller/
|
- subsys/bluetooth/controller/
|
||||||
- subsys/bluetooth/crypto/
|
- subsys/bluetooth/crypto/
|
||||||
- subsys/bluetooth/shell/ll.c
|
|
||||||
- subsys/bluetooth/shell/ll.h
|
|
||||||
- subsys/bluetooth/shell/ticker.c
|
|
||||||
- tests/bluetooth/controller/
|
- tests/bluetooth/controller/
|
||||||
- tests/bsim/bluetooth/ll/
|
- tests/bsim/bluetooth/ll/
|
||||||
labels:
|
labels:
|
||||||
|
@ -376,7 +373,6 @@ Bluetooth Host:
|
||||||
- subsys/bluetooth/host/
|
- subsys/bluetooth/host/
|
||||||
- subsys/bluetooth/lib/
|
- subsys/bluetooth/lib/
|
||||||
- subsys/bluetooth/services/
|
- subsys/bluetooth/services/
|
||||||
- subsys/bluetooth/shell/
|
|
||||||
- subsys/bluetooth/CMakeLists.txt
|
- subsys/bluetooth/CMakeLists.txt
|
||||||
- subsys/bluetooth/Kconfig*
|
- subsys/bluetooth/Kconfig*
|
||||||
- tests/bluetooth/
|
- tests/bluetooth/
|
||||||
|
@ -404,14 +400,10 @@ Bluetooth Host:
|
||||||
- samples/bluetooth/tmap*/
|
- samples/bluetooth/tmap*/
|
||||||
- samples/bluetooth/iso_*/
|
- samples/bluetooth/iso_*/
|
||||||
- samples/bluetooth/mesh*/
|
- samples/bluetooth/mesh*/
|
||||||
- subsys/bluetooth/shell/bredr.c
|
|
||||||
- subsys/bluetooth/shell/iso.c
|
|
||||||
- subsys/bluetooth/shell/ll.c
|
|
||||||
- subsys/bluetooth/shell/ll.h
|
|
||||||
- subsys/bluetooth/shell/ticker.c
|
|
||||||
- subsys/bluetooth/Kconfig.iso
|
- subsys/bluetooth/Kconfig.iso
|
||||||
- subsys/bluetooth/host/iso.c
|
- subsys/bluetooth/host/iso.c
|
||||||
- subsys/bluetooth/host/iso_internal.h
|
- subsys/bluetooth/host/iso_internal.h
|
||||||
|
- subsys/bluetooth/host/shell/iso.c
|
||||||
- tests/bluetooth/audio/
|
- tests/bluetooth/audio/
|
||||||
- tests/bluetooth/controller/
|
- tests/bluetooth/controller/
|
||||||
- tests/bluetooth/mesh*/
|
- tests/bluetooth/mesh*/
|
||||||
|
@ -503,7 +495,6 @@ Bluetooth Classic:
|
||||||
files:
|
files:
|
||||||
- subsys/bluetooth/common/
|
- subsys/bluetooth/common/
|
||||||
- subsys/bluetooth/host/classic/
|
- subsys/bluetooth/host/classic/
|
||||||
- subsys/bluetooth/shell/bredr.c
|
|
||||||
- include/zephyr/bluetooth/classic/
|
- include/zephyr/bluetooth/classic/
|
||||||
labels:
|
labels:
|
||||||
- "area: Bluetooth Classic"
|
- "area: Bluetooth Classic"
|
||||||
|
@ -521,10 +512,10 @@ Bluetooth ISO:
|
||||||
- include/zephyr/bluetooth/iso.h
|
- include/zephyr/bluetooth/iso.h
|
||||||
- doc/connectivity/bluetooth/api/shell/iso.rst
|
- doc/connectivity/bluetooth/api/shell/iso.rst
|
||||||
- samples/bluetooth/iso_*/
|
- samples/bluetooth/iso_*/
|
||||||
- subsys/bluetooth/shell/iso.c
|
|
||||||
- subsys/bluetooth/Kconfig.iso
|
- subsys/bluetooth/Kconfig.iso
|
||||||
- subsys/bluetooth/host/iso.c
|
- subsys/bluetooth/host/iso.c
|
||||||
- subsys/bluetooth/host/iso_internal.h
|
- subsys/bluetooth/host/iso_internal.h
|
||||||
|
- subsys/bluetooth/host/shell/iso.c
|
||||||
labels:
|
labels:
|
||||||
- "area: Bluetooth ISO"
|
- "area: Bluetooth ISO"
|
||||||
- "area: Bluetooth"
|
- "area: Bluetooth"
|
||||||
|
|
|
@ -6,7 +6,6 @@ target_include_directories(subsys__bluetooth INTERFACE ${CMAKE_CURRENT_SOURCE_DI
|
||||||
|
|
||||||
add_subdirectory(common)
|
add_subdirectory(common)
|
||||||
add_subdirectory_ifdef(CONFIG_BT_HCI host)
|
add_subdirectory_ifdef(CONFIG_BT_HCI host)
|
||||||
add_subdirectory_ifdef(CONFIG_BT_SHELL shell)
|
|
||||||
add_subdirectory_ifdef(CONFIG_BT_CONN services)
|
add_subdirectory_ifdef(CONFIG_BT_CONN services)
|
||||||
add_subdirectory_ifdef(CONFIG_BT_MESH mesh)
|
add_subdirectory_ifdef(CONFIG_BT_MESH mesh)
|
||||||
add_subdirectory_ifdef(CONFIG_BT_AUDIO audio)
|
add_subdirectory_ifdef(CONFIG_BT_AUDIO audio)
|
||||||
|
|
|
@ -202,11 +202,18 @@ rsource "Kconfig.iso"
|
||||||
rsource "common/Kconfig"
|
rsource "common/Kconfig"
|
||||||
rsource "host/Kconfig"
|
rsource "host/Kconfig"
|
||||||
rsource "controller/Kconfig"
|
rsource "controller/Kconfig"
|
||||||
rsource "shell/Kconfig"
|
|
||||||
rsource "crypto/Kconfig"
|
rsource "crypto/Kconfig"
|
||||||
rsource "lib/Kconfig"
|
rsource "lib/Kconfig"
|
||||||
rsource "Kconfig.logging"
|
rsource "Kconfig.logging"
|
||||||
|
|
||||||
|
config BT_SHELL
|
||||||
|
bool "Bluetooth shell"
|
||||||
|
select SHELL
|
||||||
|
select BT_TICKER_NEXT_SLOT_GET if BT_LL_SW_SPLIT
|
||||||
|
help
|
||||||
|
Activate shell module that provides Bluetooth commands to the
|
||||||
|
console.
|
||||||
|
|
||||||
config BT_USE_PSA_API
|
config BT_USE_PSA_API
|
||||||
bool "Use PSA APIs instead of TinyCrypt for crypto operations"
|
bool "Use PSA APIs instead of TinyCrypt for crypto operations"
|
||||||
depends on BT_CRYPTO || BT_HOST_CRYPTO || BT_ECC
|
depends on BT_CRYPTO || BT_HOST_CRYPTO || BT_ECC
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include <zephyr/sys/util_macro.h>
|
#include <zephyr/sys/util_macro.h>
|
||||||
#include <zephyr/sys_clock.h>
|
#include <zephyr/sys_clock.h>
|
||||||
|
|
||||||
#include "shell/bt.h"
|
#include "host/shell/bt.h"
|
||||||
|
|
||||||
#define SHELL_PRINT_INDENT_LEVEL_SIZE 2
|
#define SHELL_PRINT_INDENT_LEVEL_SIZE 2
|
||||||
#define MAX_CODEC_FRAMES_PER_SDU 4U
|
#define MAX_CODEC_FRAMES_PER_SDU 4U
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
#include <zephyr/sys/util_macro.h>
|
#include <zephyr/sys/util_macro.h>
|
||||||
#include <zephyr/sys_clock.h>
|
#include <zephyr/sys_clock.h>
|
||||||
|
|
||||||
#include "shell/bt.h"
|
#include "host/shell/bt.h"
|
||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
|
|
||||||
/* Determines if we can initiate streaming */
|
/* Determines if we can initiate streaming */
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include <zephyr/sys/util_macro.h>
|
#include <zephyr/sys/util_macro.h>
|
||||||
#include <zephyr/types.h>
|
#include <zephyr/types.h>
|
||||||
|
|
||||||
#include "shell/bt.h"
|
#include "host/shell/bt.h"
|
||||||
#include "../../host/hci_core.h"
|
#include "../../host/hci_core.h"
|
||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#include <zephyr/types.h>
|
#include <zephyr/types.h>
|
||||||
|
|
||||||
#include <audio/bap_internal.h>
|
#include <audio/bap_internal.h>
|
||||||
#include "shell/bt.h"
|
#include "host/shell/bt.h"
|
||||||
|
|
||||||
#define PA_SYNC_INTERVAL_TO_TIMEOUT_RATIO 20 /* Set the timeout relative to interval */
|
#define PA_SYNC_INTERVAL_TO_TIMEOUT_RATIO 20 /* Set the timeout relative to interval */
|
||||||
#define PA_SYNC_SKIP 5
|
#define PA_SYNC_SKIP 5
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include <zephyr/bluetooth/gatt.h>
|
#include <zephyr/bluetooth/gatt.h>
|
||||||
#include <zephyr/bluetooth/bluetooth.h>
|
#include <zephyr/bluetooth/bluetooth.h>
|
||||||
#include <zephyr/bluetooth/audio/cap.h>
|
#include <zephyr/bluetooth/audio/cap.h>
|
||||||
#include "shell/bt.h"
|
#include "host/shell/bt.h"
|
||||||
|
|
||||||
static size_t ad_cap_announcement_data_add(struct bt_data data[], size_t data_size)
|
static size_t ad_cap_announcement_data_add(struct bt_data data[], size_t data_size)
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include <zephyr/sys/util.h>
|
#include <zephyr/sys/util.h>
|
||||||
#include <zephyr/types.h>
|
#include <zephyr/types.h>
|
||||||
|
|
||||||
#include "shell/bt.h"
|
#include "host/shell/bt.h"
|
||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
|
|
||||||
static void cap_discover_cb(struct bt_conn *conn, int err,
|
static void cap_discover_cb(struct bt_conn *conn, int err,
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#include <zephyr/bluetooth/bluetooth.h>
|
#include <zephyr/bluetooth/bluetooth.h>
|
||||||
#include <zephyr/bluetooth/audio/cap.h>
|
#include <zephyr/bluetooth/audio/cap.h>
|
||||||
|
|
||||||
#include "shell/bt.h"
|
#include "host/shell/bt.h"
|
||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
|
|
||||||
#if defined(CONFIG_BT_BAP_UNICAST_CLIENT)
|
#if defined(CONFIG_BT_BAP_UNICAST_CLIENT)
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#include <zephyr/types.h>
|
#include <zephyr/types.h>
|
||||||
#include <zephyr/shell/shell.h>
|
#include <zephyr/shell/shell.h>
|
||||||
|
|
||||||
#include "shell/bt.h"
|
#include "host/shell/bt.h"
|
||||||
|
|
||||||
static uint8_t members_found;
|
static uint8_t members_found;
|
||||||
static struct k_work_delayable discover_members_timer;
|
static struct k_work_delayable discover_members_timer;
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include <zephyr/types.h>
|
#include <zephyr/types.h>
|
||||||
#include <zephyr/shell/shell.h>
|
#include <zephyr/shell/shell.h>
|
||||||
|
|
||||||
#include "shell/bt.h"
|
#include "host/shell/bt.h"
|
||||||
|
|
||||||
extern const struct shell *ctx_shell;
|
extern const struct shell *ctx_shell;
|
||||||
struct bt_csip_set_member_svc_inst *svc_inst;
|
struct bt_csip_set_member_svc_inst *svc_inst;
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include <zephyr/sys/util.h>
|
#include <zephyr/sys/util.h>
|
||||||
#include <zephyr/sys/util_macro.h>
|
#include <zephyr/sys/util_macro.h>
|
||||||
|
|
||||||
#include "shell/bt.h"
|
#include "host/shell/bt.h"
|
||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
|
|
||||||
#define UNICAST_SINK_SUPPORTED (CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT > 0)
|
#define UNICAST_SINK_SUPPORTED (CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT > 0)
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#include <zephyr/shell/shell.h>
|
#include <zephyr/shell/shell.h>
|
||||||
#include <zephyr/shell/shell_string_conv.h>
|
#include <zephyr/shell/shell_string_conv.h>
|
||||||
|
|
||||||
#include "shell/bt.h"
|
#include "host/shell/bt.h"
|
||||||
|
|
||||||
static int preset_select(uint8_t index, bool sync)
|
static int preset_select(uint8_t index, bool sync)
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#include <zephyr/kernel.h>
|
#include <zephyr/kernel.h>
|
||||||
#include <zephyr/shell/shell_string_conv.h>
|
#include <zephyr/shell/shell_string_conv.h>
|
||||||
|
|
||||||
#include "shell/bt.h"
|
#include "host/shell/bt.h"
|
||||||
|
|
||||||
static struct bt_has *inst;
|
static struct bt_has *inst;
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include <zephyr/shell/shell_string_conv.h>
|
#include <zephyr/shell/shell_string_conv.h>
|
||||||
#include <zephyr/sys/util.h>
|
#include <zephyr/sys/util.h>
|
||||||
|
|
||||||
#include "shell/bt.h"
|
#include "host/shell/bt.h"
|
||||||
|
|
||||||
#include "../media_proxy_internal.h"
|
#include "../media_proxy_internal.h"
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
#include "../media_proxy_internal.h" /* For MPL_NO_TRACK_ID - TODO: Fix */
|
#include "../media_proxy_internal.h" /* For MPL_NO_TRACK_ID - TODO: Fix */
|
||||||
|
|
||||||
#include "shell/bt.h"
|
#include "host/shell/bt.h"
|
||||||
|
|
||||||
LOG_MODULE_REGISTER(bt_media_controller_shell, CONFIG_BT_MCS_LOG_LEVEL);
|
LOG_MODULE_REGISTER(bt_media_controller_shell, CONFIG_BT_MCS_LOG_LEVEL);
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include <zephyr/shell/shell_string_conv.h>
|
#include <zephyr/shell/shell_string_conv.h>
|
||||||
#include <zephyr/types.h>
|
#include <zephyr/types.h>
|
||||||
|
|
||||||
#include "shell/bt.h"
|
#include "host/shell/bt.h"
|
||||||
|
|
||||||
static struct bt_micp_mic_ctlr *micp_mic_ctlr;
|
static struct bt_micp_mic_ctlr *micp_mic_ctlr;
|
||||||
#if defined(CONFIG_BT_MICP_MIC_CTLR_AICS)
|
#if defined(CONFIG_BT_MICP_MIC_CTLR_AICS)
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include <zephyr/sys/util.h>
|
#include <zephyr/sys/util.h>
|
||||||
#include <zephyr/types.h>
|
#include <zephyr/types.h>
|
||||||
|
|
||||||
#include "shell/bt.h"
|
#include "host/shell/bt.h"
|
||||||
|
|
||||||
static void micp_mic_dev_mute_cb(uint8_t mute)
|
static void micp_mic_dev_mute_cb(uint8_t mute)
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include <zephyr/shell/shell.h>
|
#include <zephyr/shell/shell.h>
|
||||||
#include <zephyr/shell/shell_string_conv.h>
|
#include <zephyr/shell/shell_string_conv.h>
|
||||||
|
|
||||||
#include "shell/bt.h"
|
#include "host/shell/bt.h"
|
||||||
|
|
||||||
#include "../mpl_internal.h"
|
#include "../mpl_internal.h"
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include <zephyr/sys/__assert.h>
|
#include <zephyr/sys/__assert.h>
|
||||||
#include <zephyr/sys/util.h>
|
#include <zephyr/sys/util.h>
|
||||||
|
|
||||||
#include "shell/bt.h"
|
#include "host/shell/bt.h"
|
||||||
|
|
||||||
#define PBS_DEMO 'P', 'B', 'P'
|
#define PBS_DEMO 'P', 'B', 'P'
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include <zephyr/shell/shell_string_conv.h>
|
#include <zephyr/shell/shell_string_conv.h>
|
||||||
#include <zephyr/sys/util_macro.h>
|
#include <zephyr/sys/util_macro.h>
|
||||||
|
|
||||||
#include "shell/bt.h"
|
#include "host/shell/bt.h"
|
||||||
|
|
||||||
static struct bt_conn *tbs_authorized_conn;
|
static struct bt_conn *tbs_authorized_conn;
|
||||||
static bool cbs_registered;
|
static bool cbs_registered;
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include <zephyr/sys/util.h>
|
#include <zephyr/sys/util.h>
|
||||||
#include <zephyr/types.h>
|
#include <zephyr/types.h>
|
||||||
|
|
||||||
#include "shell/bt.h"
|
#include "host/shell/bt.h"
|
||||||
|
|
||||||
static int cmd_tbs_client_discover(const struct shell *sh, size_t argc,
|
static int cmd_tbs_client_discover(const struct shell *sh, size_t argc,
|
||||||
char *argv[])
|
char *argv[])
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include <zephyr/shell/shell.h>
|
#include <zephyr/shell/shell.h>
|
||||||
#include <zephyr/sys/util.h>
|
#include <zephyr/sys/util.h>
|
||||||
|
|
||||||
#include "shell/bt.h"
|
#include "host/shell/bt.h"
|
||||||
|
|
||||||
static int cmd_tmap_init(const struct shell *sh, size_t argc, char **argv)
|
static int cmd_tmap_init(const struct shell *sh, size_t argc, char **argv)
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include <zephyr/sys/util.h>
|
#include <zephyr/sys/util.h>
|
||||||
#include <zephyr/types.h>
|
#include <zephyr/types.h>
|
||||||
|
|
||||||
#include "shell/bt.h"
|
#include "host/shell/bt.h"
|
||||||
|
|
||||||
static struct bt_vcp_vol_ctlr *vcp_vol_ctlr;
|
static struct bt_vcp_vol_ctlr *vcp_vol_ctlr;
|
||||||
static struct bt_vcp_included vcp_included;
|
static struct bt_vcp_included vcp_included;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <zephyr/sys/util.h>
|
#include <zephyr/sys/util.h>
|
||||||
#include <zephyr/sys/util_macro.h>
|
#include <zephyr/sys/util_macro.h>
|
||||||
|
|
||||||
#include "shell/bt.h"
|
#include "host/shell/bt.h"
|
||||||
|
|
||||||
static struct bt_vcp_included vcp_included;
|
static struct bt_vcp_included vcp_included;
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,11 @@ endif()
|
||||||
zephyr_library()
|
zephyr_library()
|
||||||
zephyr_library_link_libraries(subsys__bluetooth)
|
zephyr_library_link_libraries(subsys__bluetooth)
|
||||||
|
|
||||||
|
if(CONFIG_BT_SHELL AND CONFIG_BT_LL_SW_SPLIT)
|
||||||
|
add_subdirectory(ticker/shell)
|
||||||
|
add_subdirectory(ll_sw/shell)
|
||||||
|
endif()
|
||||||
|
|
||||||
zephyr_library_sources(
|
zephyr_library_sources(
|
||||||
util/mem.c
|
util/mem.c
|
||||||
util/memq.c
|
util/memq.c
|
||||||
|
|
5
subsys/bluetooth/controller/ll_sw/shell/CMakeLists.txt
Normal file
5
subsys/bluetooth/controller/ll_sw/shell/CMakeLists.txt
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
zephyr_library()
|
||||||
|
zephyr_library_sources_ifdef(CONFIG_BT_LL_SW_SPLIT ll.c)
|
||||||
|
zephyr_include_directories(${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/nordic)
|
|
@ -19,10 +19,10 @@
|
||||||
|
|
||||||
#include <zephyr/shell/shell.h>
|
#include <zephyr/shell/shell.h>
|
||||||
|
|
||||||
#include "../controller/util/memq.h"
|
#include "controller/util/memq.h"
|
||||||
#include "../controller/include/ll.h"
|
#include "controller/include/ll.h"
|
||||||
|
|
||||||
#include "bt.h"
|
#include "host/shell/bt.h"
|
||||||
|
|
||||||
int cmd_ll_addr_read(const struct shell *sh, size_t argc, char *argv[])
|
int cmd_ll_addr_read(const struct shell *sh, size_t argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
@ -123,7 +123,7 @@ int cmd_test_end(const struct shell *sh, size_t argc, char *argv[])
|
||||||
#endif /* CONFIG_BT_CTLR_DTM */
|
#endif /* CONFIG_BT_CTLR_DTM */
|
||||||
|
|
||||||
#if defined(CONFIG_BT_CTLR_ADV_EXT)
|
#if defined(CONFIG_BT_CTLR_ADV_EXT)
|
||||||
#include "../controller/ll_sw/lll.h"
|
#include "controller/ll_sw/lll.h"
|
||||||
|
|
||||||
#if defined(CONFIG_BT_BROADCASTER)
|
#if defined(CONFIG_BT_BROADCASTER)
|
||||||
#define OWN_ADDR_TYPE 1
|
#define OWN_ADDR_TYPE 1
|
5
subsys/bluetooth/controller/ticker/shell/CMakeLists.txt
Normal file
5
subsys/bluetooth/controller/ticker/shell/CMakeLists.txt
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
zephyr_library()
|
||||||
|
zephyr_library_sources(ticker.c)
|
||||||
|
zephyr_include_directories(${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/nordic)
|
|
@ -16,10 +16,10 @@
|
||||||
|
|
||||||
#include <zephyr/shell/shell.h>
|
#include <zephyr/shell/shell.h>
|
||||||
|
|
||||||
#include "../controller/util/memq.h"
|
#include "controller/util/memq.h"
|
||||||
#include "../controller/util/mayfly.h"
|
#include "controller/util/mayfly.h"
|
||||||
#include "../controller/hal/ticker.h"
|
#include "controller/hal/ticker.h"
|
||||||
#include "../controller/ticker/ticker.h"
|
#include "controller/ticker/ticker.h"
|
||||||
|
|
||||||
#if defined(CONFIG_BT_MAX_CONN)
|
#if defined(CONFIG_BT_MAX_CONN)
|
||||||
#define TICKERS_MAX (CONFIG_BT_MAX_CONN + 2)
|
#define TICKERS_MAX (CONFIG_BT_MAX_CONN + 2)
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
#define TICKERS_MAX 2
|
#define TICKERS_MAX 2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "bt.h"
|
#include "host/shell/bt.h"
|
||||||
|
|
||||||
static void ticker_op_done(uint32_t err, void *context)
|
static void ticker_op_done(uint32_t err, void *context)
|
||||||
{
|
{
|
|
@ -4,6 +4,7 @@ zephyr_library()
|
||||||
zephyr_library_link_libraries(subsys__bluetooth)
|
zephyr_library_link_libraries(subsys__bluetooth)
|
||||||
|
|
||||||
add_subdirectory_ifdef(CONFIG_BT_CLASSIC classic)
|
add_subdirectory_ifdef(CONFIG_BT_CLASSIC classic)
|
||||||
|
add_subdirectory_ifdef(CONFIG_BT_SHELL shell)
|
||||||
|
|
||||||
zephyr_library_sources_ifdef(CONFIG_BT_HCI_RAW hci_raw.c hci_common.c)
|
zephyr_library_sources_ifdef(CONFIG_BT_HCI_RAW hci_raw.c hci_common.c)
|
||||||
zephyr_library_sources_ifdef(CONFIG_BT_MONITOR monitor.c)
|
zephyr_library_sources_ifdef(CONFIG_BT_MONITOR monitor.c)
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
add_subdirectory_ifdef(CONFIG_BT_SHELL shell)
|
||||||
|
|
||||||
zephyr_library()
|
zephyr_library()
|
||||||
zephyr_library_link_libraries(subsys__bluetooth)
|
zephyr_library_link_libraries(subsys__bluetooth)
|
||||||
|
|
||||||
|
|
6
subsys/bluetooth/host/classic/shell/CMakeLists.txt
Normal file
6
subsys/bluetooth/host/classic/shell/CMakeLists.txt
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
zephyr_library()
|
||||||
|
zephyr_library_sources(bredr.c)
|
||||||
|
zephyr_library_sources_ifdef(CONFIG_BT_RFCOMM rfcomm.c)
|
||||||
|
zephyr_library_sources_ifdef(CONFIG_BT_A2DP a2dp.c)
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
#include <zephyr/shell/shell.h>
|
#include <zephyr/shell/shell.h>
|
||||||
|
|
||||||
#include "bt.h"
|
#include "host/shell/bt.h"
|
||||||
|
|
||||||
struct bt_a2dp *default_a2dp;
|
struct bt_a2dp *default_a2dp;
|
||||||
static uint8_t a2dp_sink_sdp_registered;
|
static uint8_t a2dp_sink_sdp_registered;
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
#include <zephyr/shell/shell.h>
|
#include <zephyr/shell/shell.h>
|
||||||
|
|
||||||
#include "bt.h"
|
#include "host/shell/bt.h"
|
||||||
|
|
||||||
#if defined(CONFIG_BT_CONN)
|
#if defined(CONFIG_BT_CONN)
|
||||||
/* Connection context for BR/EDR legacy pairing in sec mode 3 */
|
/* Connection context for BR/EDR legacy pairing in sec mode 3 */
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
#include <zephyr/shell/shell.h>
|
#include <zephyr/shell/shell.h>
|
||||||
|
|
||||||
#include "bt.h"
|
#include "host/shell/bt.h"
|
||||||
|
|
||||||
#define DATA_MTU 48
|
#define DATA_MTU 48
|
||||||
|
|
8
subsys/bluetooth/host/shell/CMakeLists.txt
Normal file
8
subsys/bluetooth/host/shell/CMakeLists.txt
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
zephyr_library()
|
||||||
|
zephyr_library_sources(bt.c)
|
||||||
|
zephyr_library_sources_ifdef(CONFIG_BT_CONN gatt.c)
|
||||||
|
zephyr_library_sources_ifdef(CONFIG_BT_L2CAP_DYNAMIC_CHANNEL l2cap.c)
|
||||||
|
zephyr_library_sources_ifdef(CONFIG_BT_ISO iso.c)
|
||||||
|
zephyr_library_sources_ifdef(CONFIG_BT_CHANNEL_SOUNDING cs.c)
|
|
@ -36,10 +36,10 @@
|
||||||
|
|
||||||
#include <zephyr/shell/shell.h>
|
#include <zephyr/shell/shell.h>
|
||||||
|
|
||||||
#include "bt.h"
|
#include "audio/shell/audio.h"
|
||||||
#include "ll.h"
|
#include "controller/ll_sw/shell/ll.h"
|
||||||
#include "hci.h"
|
#include "host/shell/bt.h"
|
||||||
#include "../audio/shell/audio.h"
|
#include "mesh/shell/hci.h"
|
||||||
|
|
||||||
static bool no_settings_load;
|
static bool no_settings_load;
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
#include <zephyr/shell/shell.h>
|
#include <zephyr/shell/shell.h>
|
||||||
|
|
||||||
#include "bt.h"
|
#include "host/shell/bt.h"
|
||||||
|
|
||||||
#if defined(CONFIG_BT_GATT_CLIENT) || defined(CONFIG_BT_GATT_DYNAMIC_DB)
|
#if defined(CONFIG_BT_GATT_CLIENT) || defined(CONFIG_BT_GATT_DYNAMIC_DB)
|
||||||
extern uint8_t selected_id;
|
extern uint8_t selected_id;
|
|
@ -22,7 +22,7 @@
|
||||||
#include <zephyr/bluetooth/conn.h>
|
#include <zephyr/bluetooth/conn.h>
|
||||||
#include <zephyr/bluetooth/iso.h>
|
#include <zephyr/bluetooth/iso.h>
|
||||||
|
|
||||||
#include "bt.h"
|
#include "host/shell/bt.h"
|
||||||
|
|
||||||
#if defined(CONFIG_BT_ISO_TX)
|
#if defined(CONFIG_BT_ISO_TX)
|
||||||
#define DEFAULT_IO_QOS \
|
#define DEFAULT_IO_QOS \
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
#include <zephyr/shell/shell.h>
|
#include <zephyr/shell/shell.h>
|
||||||
|
|
||||||
#include "bt.h"
|
#include "host/shell/bt.h"
|
||||||
|
|
||||||
#define CREDITS 10
|
#define CREDITS 10
|
||||||
#define DATA_MTU (23 * CREDITS)
|
#define DATA_MTU (23 * CREDITS)
|
|
@ -36,3 +36,5 @@ zephyr_library_sources_ifdef(CONFIG_BT_MESH_OD_PRIV_PROXY_CLI od_priv_proxy.c)
|
||||||
zephyr_library_sources_ifdef(CONFIG_BT_MESH_SOL_PDU_RPL_CLI sol_pdu_rpl.c)
|
zephyr_library_sources_ifdef(CONFIG_BT_MESH_SOL_PDU_RPL_CLI sol_pdu_rpl.c)
|
||||||
|
|
||||||
zephyr_library_sources_ifdef(CONFIG_BT_MESH_SHELL_BRG_CFG_CLI brg_cfg.c)
|
zephyr_library_sources_ifdef(CONFIG_BT_MESH_SHELL_BRG_CFG_CLI brg_cfg.c)
|
||||||
|
|
||||||
|
zephyr_library_sources_ifdef(CONFIG_BT_HCI_MESH_EXT hci.c)
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
add_subdirectory_ifdef(CONFIG_BT_SHELL shell)
|
||||||
|
|
||||||
zephyr_sources_ifdef(
|
zephyr_sources_ifdef(
|
||||||
CONFIG_BT_IAS
|
CONFIG_BT_IAS
|
||||||
ias.c)
|
ias.c)
|
||||||
|
|
5
subsys/bluetooth/services/ias/shell/CMakeLists.txt
Normal file
5
subsys/bluetooth/services/ias/shell/CMakeLists.txt
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
zephyr_library()
|
||||||
|
zephyr_library_sources_ifdef(CONFIG_BT_IAS ias.c)
|
||||||
|
zephyr_library_sources_ifdef(CONFIG_BT_IAS_CLIENT ias_client.c)
|
|
@ -7,7 +7,6 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "bt.h"
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <zephyr/types.h>
|
#include <zephyr/types.h>
|
||||||
#include <zephyr/bluetooth/conn.h>
|
#include <zephyr/bluetooth/conn.h>
|
||||||
|
@ -18,6 +17,8 @@
|
||||||
#include <zephyr/bluetooth/bluetooth.h>
|
#include <zephyr/bluetooth/bluetooth.h>
|
||||||
#include <zephyr/bluetooth/services/ias.h>
|
#include <zephyr/bluetooth/services/ias.h>
|
||||||
|
|
||||||
|
#include "host/shell/bt.h"
|
||||||
|
|
||||||
extern const struct shell *ctx_shell;
|
extern const struct shell *ctx_shell;
|
||||||
|
|
||||||
static void alert_stop(void)
|
static void alert_stop(void)
|
|
@ -15,7 +15,7 @@
|
||||||
#include <zephyr/bluetooth/bluetooth.h>
|
#include <zephyr/bluetooth/bluetooth.h>
|
||||||
#include <zephyr/bluetooth/services/ias.h>
|
#include <zephyr/bluetooth/services/ias.h>
|
||||||
|
|
||||||
#include "bt.h"
|
#include "host/shell/bt.h"
|
||||||
|
|
||||||
extern const struct shell *ctx_shell;
|
extern const struct shell *ctx_shell;
|
||||||
|
|
|
@ -1,53 +0,0 @@
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
zephyr_library()
|
|
||||||
zephyr_library_sources(
|
|
||||||
bt.c
|
|
||||||
hci.c
|
|
||||||
)
|
|
||||||
zephyr_library_sources_ifdef(
|
|
||||||
CONFIG_BT_CONN
|
|
||||||
gatt.c
|
|
||||||
)
|
|
||||||
zephyr_library_sources_ifdef(
|
|
||||||
CONFIG_BT_CLASSIC
|
|
||||||
bredr.c
|
|
||||||
)
|
|
||||||
zephyr_library_sources_ifdef(
|
|
||||||
CONFIG_BT_L2CAP_DYNAMIC_CHANNEL
|
|
||||||
l2cap.c
|
|
||||||
)
|
|
||||||
zephyr_library_sources_ifdef(
|
|
||||||
CONFIG_BT_RFCOMM
|
|
||||||
rfcomm.c
|
|
||||||
)
|
|
||||||
zephyr_library_sources_ifdef(
|
|
||||||
CONFIG_BT_A2DP
|
|
||||||
a2dp.c
|
|
||||||
)
|
|
||||||
zephyr_library_sources_ifdef(
|
|
||||||
CONFIG_BT_ISO
|
|
||||||
iso.c
|
|
||||||
)
|
|
||||||
zephyr_library_sources_ifdef(
|
|
||||||
CONFIG_BT_CHANNEL_SOUNDING
|
|
||||||
cs.c
|
|
||||||
)
|
|
||||||
zephyr_library_sources_ifdef(
|
|
||||||
CONFIG_BT_IAS
|
|
||||||
ias.c
|
|
||||||
)
|
|
||||||
zephyr_library_sources_ifdef(
|
|
||||||
CONFIG_BT_IAS_CLIENT
|
|
||||||
ias_client.c
|
|
||||||
)
|
|
||||||
|
|
||||||
if(CONFIG_BT_CTLR AND CONFIG_BT_LL_SW_SPLIT)
|
|
||||||
zephyr_library_sources(
|
|
||||||
ll.c
|
|
||||||
ticker.c
|
|
||||||
)
|
|
||||||
zephyr_include_directories(
|
|
||||||
${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/nordic
|
|
||||||
)
|
|
||||||
endif()
|
|
|
@ -1,12 +0,0 @@
|
||||||
# Shell configuration options
|
|
||||||
|
|
||||||
# Copyright (c) 2017 Intel Corporation
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
config BT_SHELL
|
|
||||||
bool "Bluetooth shell"
|
|
||||||
select SHELL
|
|
||||||
select BT_TICKER_NEXT_SLOT_GET if BT_LL_SW_SPLIT
|
|
||||||
help
|
|
||||||
Activate shell module that provides Bluetooth commands to the
|
|
||||||
console.
|
|
Loading…
Add table
Add a link
Reference in a new issue