bluetooth: shell: move bt_shell_private.c to common folder

Relocated `bt_shell_private.c` to the `common` folder to enable
independent use between `BT_SHELL` and `BT_MESH_SHELL`.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
This commit is contained in:
Pisit Sawangvonganan 2025-01-03 15:16:31 +07:00 committed by Benjamin Cabé
parent c705551a8c
commit eeda631ee5
11 changed files with 12 additions and 9 deletions

View file

@ -236,6 +236,7 @@ rsource "Kconfig.logging"
config BT_SHELL
bool "Bluetooth shell"
select SHELL
select BT_PRIVATE_SHELL
select BT_TICKER_NEXT_SLOT_GET if BT_LL_SW_SPLIT
help
Activate shell module that provides Bluetooth commands to the

View file

@ -7,5 +7,6 @@ zephyr_library_sources(dummy.c)
zephyr_library_sources(bt_str.c)
zephyr_library_sources_ifdef(CONFIG_BT_RPA rpa.c)
zephyr_library_sources_ifdef(CONFIG_BT_PRIVATE_SHELL bt_shell_private.c)
zephyr_library_link_libraries(subsys__bluetooth)

View file

@ -244,6 +244,10 @@ config BT_RPA
bool
depends on BT_HOST_CRYPTO || BT_CTLR_CRYPTO
config BT_PRIVATE_SHELL
bool
default n
config BT_ASSERT
bool "Custom Bluetooth assert implementation"
default y

View file

@ -1,10 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
zephyr_library()
zephyr_library_sources(
bt.c
bt_shell_private.c
)
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)

View file

@ -35,7 +35,7 @@
#include <zephyr/bluetooth/ead.h>
#include <zephyr/shell/shell.h>
#include "bt_shell_private.h"
#include "common/bt_shell_private.h"
#include "audio/shell/audio.h"
#include "controller/ll_sw/shell/ll.h"

View file

@ -25,7 +25,7 @@
#include <errno.h>
#include "host/shell/bt.h"
#include "host/shell/bt_shell_private.h"
#include "common/bt_shell_private.h"
static int check_cs_sync_antenna_selection_input(uint16_t input)
{

View file

@ -27,7 +27,7 @@
#include <zephyr/shell/shell.h>
#include "host/shell/bt.h"
#include "host/shell/bt_shell_private.h"
#include "common/bt_shell_private.h"
#if defined(CONFIG_BT_GATT_CLIENT) || defined(CONFIG_BT_GATT_DYNAMIC_DB)
extern uint8_t selected_id;

View file

@ -23,7 +23,7 @@
#include <zephyr/bluetooth/iso.h>
#include "host/shell/bt.h"
#include "host/shell/bt_shell_private.h"
#include "common/bt_shell_private.h"
#if defined(CONFIG_BT_ISO_TX)
#define DEFAULT_IO_QOS \

View file

@ -30,7 +30,7 @@
#include <zephyr/shell/shell.h>
#include "host/shell/bt.h"
#include "host/shell/bt_shell_private.h"
#include "common/bt_shell_private.h"
#define CREDITS 10
#define DATA_MTU (23 * CREDITS)