Skip to content

Commit e71c4a7

Browse files
committed
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 <[email protected]>
1 parent 3e9addf commit e71c4a7

File tree

11 files changed

+12
-9
lines changed

11 files changed

+12
-9
lines changed

subsys/bluetooth/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ rsource "Kconfig.logging"
236236
config BT_SHELL
237237
bool "Bluetooth shell"
238238
select SHELL
239+
select BT_PRIVATE_SHELL
239240
select BT_TICKER_NEXT_SLOT_GET if BT_LL_SW_SPLIT
240241
help
241242
Activate shell module that provides Bluetooth commands to the

subsys/bluetooth/common/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ zephyr_library_sources(dummy.c)
77
zephyr_library_sources(bt_str.c)
88

99
zephyr_library_sources_ifdef(CONFIG_BT_RPA rpa.c)
10+
zephyr_library_sources_ifdef(CONFIG_BT_PRIVATE_SHELL bt_shell_private.c)
1011

1112
zephyr_library_link_libraries(subsys__bluetooth)

subsys/bluetooth/common/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,10 @@ config BT_RPA
244244
bool
245245
depends on BT_HOST_CRYPTO || BT_CTLR_CRYPTO
246246

247+
config BT_PRIVATE_SHELL
248+
bool
249+
default n
250+
247251
config BT_ASSERT
248252
bool "Custom Bluetooth assert implementation"
249253
default y

subsys/bluetooth/host/shell/CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
# SPDX-License-Identifier: Apache-2.0
22

33
zephyr_library()
4-
zephyr_library_sources(
5-
bt.c
6-
bt_shell_private.c
7-
)
4+
zephyr_library_sources(bt.c)
85
zephyr_library_sources_ifdef(CONFIG_BT_CONN gatt.c)
96
zephyr_library_sources_ifdef(CONFIG_BT_L2CAP_DYNAMIC_CHANNEL l2cap.c)
107
zephyr_library_sources_ifdef(CONFIG_BT_ISO iso.c)

subsys/bluetooth/host/shell/bt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include <zephyr/bluetooth/ead.h>
3636

3737
#include <zephyr/shell/shell.h>
38-
#include "bt_shell_private.h"
38+
#include "common/bt_shell_private.h"
3939

4040
#include "audio/shell/audio.h"
4141
#include "controller/ll_sw/shell/ll.h"

subsys/bluetooth/host/shell/cs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include <errno.h>
2626

2727
#include "host/shell/bt.h"
28-
#include "host/shell/bt_shell_private.h"
28+
#include "common/bt_shell_private.h"
2929

3030
static int check_cs_sync_antenna_selection_input(uint16_t input)
3131
{

subsys/bluetooth/host/shell/gatt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include <zephyr/shell/shell.h>
2828

2929
#include "host/shell/bt.h"
30-
#include "host/shell/bt_shell_private.h"
30+
#include "common/bt_shell_private.h"
3131

3232
#if defined(CONFIG_BT_GATT_CLIENT) || defined(CONFIG_BT_GATT_DYNAMIC_DB)
3333
extern uint8_t selected_id;

subsys/bluetooth/host/shell/iso.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include <zephyr/bluetooth/iso.h>
2424

2525
#include "host/shell/bt.h"
26-
#include "host/shell/bt_shell_private.h"
26+
#include "common/bt_shell_private.h"
2727

2828
#if defined(CONFIG_BT_ISO_TX)
2929
#define DEFAULT_IO_QOS \

0 commit comments

Comments
 (0)