Skip to content

Commit bf897cf

Browse files
Thalleynashif
authored andcommitted
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 <[email protected]>
1 parent cb30431 commit bf897cf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+96
-122
lines changed

MAINTAINERS.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,6 @@ Bluetooth controller:
345345
- subsys/bluetooth/common/
346346
- subsys/bluetooth/controller/
347347
- subsys/bluetooth/crypto/
348-
- subsys/bluetooth/shell/ll.c
349-
- subsys/bluetooth/shell/ll.h
350-
- subsys/bluetooth/shell/ticker.c
351348
- tests/bluetooth/controller/
352349
- tests/bsim/bluetooth/ll/
353350
labels:
@@ -376,7 +373,6 @@ Bluetooth Host:
376373
- subsys/bluetooth/host/
377374
- subsys/bluetooth/lib/
378375
- subsys/bluetooth/services/
379-
- subsys/bluetooth/shell/
380376
- subsys/bluetooth/CMakeLists.txt
381377
- subsys/bluetooth/Kconfig*
382378
- tests/bluetooth/
@@ -404,14 +400,10 @@ Bluetooth Host:
404400
- samples/bluetooth/tmap*/
405401
- samples/bluetooth/iso_*/
406402
- samples/bluetooth/mesh*/
407-
- subsys/bluetooth/shell/bredr.c
408-
- subsys/bluetooth/shell/iso.c
409-
- subsys/bluetooth/shell/ll.c
410-
- subsys/bluetooth/shell/ll.h
411-
- subsys/bluetooth/shell/ticker.c
412403
- subsys/bluetooth/Kconfig.iso
413404
- subsys/bluetooth/host/iso.c
414405
- subsys/bluetooth/host/iso_internal.h
406+
- subsys/bluetooth/host/shell/iso.c
415407
- tests/bluetooth/audio/
416408
- tests/bluetooth/controller/
417409
- tests/bluetooth/mesh*/
@@ -503,7 +495,6 @@ Bluetooth Classic:
503495
files:
504496
- subsys/bluetooth/common/
505497
- subsys/bluetooth/host/classic/
506-
- subsys/bluetooth/shell/bredr.c
507498
- include/zephyr/bluetooth/classic/
508499
labels:
509500
- "area: Bluetooth Classic"
@@ -521,10 +512,10 @@ Bluetooth ISO:
521512
- include/zephyr/bluetooth/iso.h
522513
- doc/connectivity/bluetooth/api/shell/iso.rst
523514
- samples/bluetooth/iso_*/
524-
- subsys/bluetooth/shell/iso.c
525515
- subsys/bluetooth/Kconfig.iso
526516
- subsys/bluetooth/host/iso.c
527517
- subsys/bluetooth/host/iso_internal.h
518+
- subsys/bluetooth/host/shell/iso.c
528519
labels:
529520
- "area: Bluetooth ISO"
530521
- "area: Bluetooth"

subsys/bluetooth/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ target_include_directories(subsys__bluetooth INTERFACE ${CMAKE_CURRENT_SOURCE_DI
66

77
add_subdirectory(common)
88
add_subdirectory_ifdef(CONFIG_BT_HCI host)
9-
add_subdirectory_ifdef(CONFIG_BT_SHELL shell)
109
add_subdirectory_ifdef(CONFIG_BT_CONN services)
1110
add_subdirectory_ifdef(CONFIG_BT_MESH mesh)
1211
add_subdirectory_ifdef(CONFIG_BT_AUDIO audio)

subsys/bluetooth/Kconfig

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,18 @@ rsource "Kconfig.iso"
202202
rsource "common/Kconfig"
203203
rsource "host/Kconfig"
204204
rsource "controller/Kconfig"
205-
rsource "shell/Kconfig"
206205
rsource "crypto/Kconfig"
207206
rsource "lib/Kconfig"
208207
rsource "Kconfig.logging"
209208

209+
config BT_SHELL
210+
bool "Bluetooth shell"
211+
select SHELL
212+
select BT_TICKER_NEXT_SLOT_GET if BT_LL_SW_SPLIT
213+
help
214+
Activate shell module that provides Bluetooth commands to the
215+
console.
216+
210217
config BT_USE_PSA_API
211218
bool "Use PSA APIs instead of TinyCrypt for crypto operations"
212219
depends on BT_CRYPTO || BT_HOST_CRYPTO || BT_ECC

subsys/bluetooth/audio/shell/audio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include <zephyr/sys/util_macro.h>
3333
#include <zephyr/sys_clock.h>
3434

35-
#include "shell/bt.h"
35+
#include "host/shell/bt.h"
3636

3737
#define SHELL_PRINT_INDENT_LEVEL_SIZE 2
3838
#define MAX_CODEC_FRAMES_PER_SDU 4U

subsys/bluetooth/audio/shell/bap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
#include <zephyr/sys/util_macro.h>
4848
#include <zephyr/sys_clock.h>
4949

50-
#include "shell/bt.h"
50+
#include "host/shell/bt.h"
5151
#include "audio.h"
5252

5353
/* Determines if we can initiate streaming */

subsys/bluetooth/audio/shell/bap_broadcast_assistant.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include <zephyr/sys/util_macro.h>
3333
#include <zephyr/types.h>
3434

35-
#include "shell/bt.h"
35+
#include "host/shell/bt.h"
3636
#include "../../host/hci_core.h"
3737
#include "audio.h"
3838

subsys/bluetooth/audio/shell/bap_scan_delegator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include <zephyr/types.h>
3232

3333
#include <audio/bap_internal.h>
34-
#include "shell/bt.h"
34+
#include "host/shell/bt.h"
3535

3636
#define PA_SYNC_INTERVAL_TO_TIMEOUT_RATIO 20 /* Set the timeout relative to interval */
3737
#define PA_SYNC_SKIP 5

subsys/bluetooth/audio/shell/cap_acceptor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include <zephyr/bluetooth/gatt.h>
2828
#include <zephyr/bluetooth/bluetooth.h>
2929
#include <zephyr/bluetooth/audio/cap.h>
30-
#include "shell/bt.h"
30+
#include "host/shell/bt.h"
3131

3232
static size_t ad_cap_announcement_data_add(struct bt_data data[], size_t data_size)
3333
{

subsys/bluetooth/audio/shell/cap_commander.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include <zephyr/sys/util.h>
2222
#include <zephyr/types.h>
2323

24-
#include "shell/bt.h"
24+
#include "host/shell/bt.h"
2525
#include "audio.h"
2626

2727
static void cap_discover_cb(struct bt_conn *conn, int err,

subsys/bluetooth/audio/shell/cap_initiator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#include <zephyr/bluetooth/bluetooth.h>
3434
#include <zephyr/bluetooth/audio/cap.h>
3535

36-
#include "shell/bt.h"
36+
#include "host/shell/bt.h"
3737
#include "audio.h"
3838

3939
#if defined(CONFIG_BT_BAP_UNICAST_CLIENT)

0 commit comments

Comments
 (0)