Skip to content

Commit 1efd817

Browse files
Thalleykartben
authored andcommitted
Bluetooth: Shell: Add missing includes for all BT host shell files
Added missing includes and fixed typos in the files. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
1 parent 4a0ddbe commit 1efd817

File tree

6 files changed

+76
-45
lines changed

6 files changed

+76
-45
lines changed

subsys/bluetooth/host/shell/bt.c

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,46 @@
1212
*/
1313

1414
#include <errno.h>
15-
#include <zephyr/autoconf.h>
16-
#include <zephyr/bluetooth/audio/bap.h>
17-
#include <zephyr/bluetooth/gap.h>
18-
#include <zephyr/types.h>
19-
#include <ctype.h>
2015
#include <stddef.h>
16+
#include <stdint.h>
2117
#include <stdlib.h>
2218
#include <string.h>
2319
#include <strings.h>
24-
#include <zephyr/sys/printk.h>
25-
#include <zephyr/sys/byteorder.h>
26-
#include <zephyr/sys/util.h>
27-
#include <zephyr/sys/util_macro.h>
28-
#include <zephyr/kernel.h>
29-
30-
#include <zephyr/settings/settings.h>
20+
#include <sys/types.h>
3121

32-
#include <zephyr/bluetooth/hci.h>
22+
#include <zephyr/autoconf.h>
23+
#include <zephyr/bluetooth/addr.h>
24+
#include <zephyr/bluetooth/audio/bap.h>
3325
#include <zephyr/bluetooth/bluetooth.h>
34-
#include <zephyr/bluetooth/conn.h>
3526
#include <zephyr/bluetooth/classic/rfcomm.h>
3627
#include <zephyr/bluetooth/classic/sdp.h>
37-
#include <zephyr/bluetooth/iso.h>
28+
#include <zephyr/bluetooth/conn.h>
3829
#include <zephyr/bluetooth/ead.h>
39-
30+
#include <zephyr/bluetooth/gap.h>
31+
#include <zephyr/bluetooth/hci.h>
32+
#include <zephyr/bluetooth/hci_types.h>
33+
#include <zephyr/bluetooth/iso.h>
34+
#include <zephyr/bluetooth/uuid.h>
35+
#include <zephyr/kernel.h>
36+
#include <zephyr/net_buf.h>
37+
#include <zephyr/settings/settings.h>
4038
#include <zephyr/shell/shell.h>
41-
#include "common/bt_shell_private.h"
39+
#include <zephyr/shell/shell_string_conv.h>
40+
#include <zephyr/shell/shell_types.h>
41+
#include <zephyr/sys/__assert.h>
42+
#include <zephyr/sys/atomic.h>
43+
#include <zephyr/sys/printk.h>
44+
#include <zephyr/sys/byteorder.h>
45+
#include <zephyr/sys/util.h>
46+
#include <zephyr/sys/util_macro.h>
47+
#include <zephyr/toolchain.h>
48+
#include <zephyr/types.h>
4249

4350
#include "audio/shell/audio.h"
51+
#include "common/bt_shell_private.h"
52+
#if defined(CONFIG_BT_LL_SW_SPLIT)
4453
#include "controller/ll_sw/shell/ll.h"
54+
#endif /* CONFIG_BT_LL_SW_SPLIT */
4555
#include "host/shell/bt.h"
4656
#include "mesh/shell/hci.h"
4757

subsys/bluetooth/host/shell/bt.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@
1212

1313
#ifndef __BT_H
1414
#define __BT_H
15+
#include <stddef.h>
16+
#include <stdint.h>
1517

18+
#include <zephyr/autoconf.h>
1619
#include <zephyr/bluetooth/bluetooth.h>
20+
#include <zephyr/net_buf.h>
1721
#include <sys/types.h>
1822

1923
extern struct bt_conn *default_conn;

subsys/bluetooth/host/shell/cs.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,26 @@
99
* SPDX-License-Identifier: Apache-2.0
1010
*/
1111

12+
#include <errno.h>
1213
#include <stdlib.h>
1314
#include <stdbool.h>
1415
#include <stdint.h>
15-
#include <zephyr/kernel.h>
16-
#include <zephyr/shell/shell.h>
17-
#include <zephyr/sys/byteorder.h>
18-
#include <zephyr/sys/util.h>
16+
#include <string.h>
1917

2018
#include <zephyr/bluetooth/hci.h>
2119
#include <zephyr/bluetooth/bluetooth.h>
2220
#include <zephyr/bluetooth/conn.h>
21+
#include <zephyr/bluetooth/hci_types.h>
2322
#include <zephyr/bluetooth/iso.h>
2423
#include <zephyr/bluetooth/cs.h>
25-
#include <errno.h>
24+
#include <zephyr/kernel.h>
25+
#include <zephyr/shell/shell.h>
26+
#include <zephyr/shell/shell_string_conv.h>
27+
#include <zephyr/sys/byteorder.h>
28+
#include <zephyr/sys/util.h>
2629

27-
#include "host/shell/bt.h"
2830
#include "common/bt_shell_private.h"
31+
#include "host/shell/bt.h"
2932

3033
static int check_cs_sync_antenna_selection_input(uint16_t input)
3134
{

subsys/bluetooth/host/shell/gatt.c

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,28 @@
1010
*/
1111

1212
#include <errno.h>
13-
#include <zephyr/types.h>
1413
#include <stddef.h>
1514
#include <stdint.h>
1615
#include <stdlib.h>
1716
#include <string.h>
18-
#include <zephyr/shell/shell_string_conv.h>
19-
#include <zephyr/sys/byteorder.h>
20-
#include <zephyr/sys/util.h>
21-
#include <zephyr/kernel.h>
2217

18+
#include <zephyr/bluetooth/addr.h>
19+
#include <zephyr/bluetooth/att.h>
2320
#include <zephyr/bluetooth/bluetooth.h>
2421
#include <zephyr/bluetooth/conn.h>
2522
#include <zephyr/bluetooth/gatt.h>
26-
23+
#include <zephyr/bluetooth/uuid.h>
24+
#include <zephyr/kernel.h>
2725
#include <zephyr/shell/shell.h>
26+
#include <zephyr/shell/shell_string_conv.h>
27+
#include <zephyr/sys/__assert.h>
28+
#include <zephyr/sys/byteorder.h>
29+
#include <zephyr/sys/time_units.h>
30+
#include <zephyr/sys/util.h>
31+
#include <sys/types.h>
2832

29-
#include "host/shell/bt.h"
3033
#include "common/bt_shell_private.h"
34+
#include "host/shell/bt.h"
3135

3236
#if defined(CONFIG_BT_GATT_CLIENT) || defined(CONFIG_BT_GATT_DYNAMIC_DB)
3337
extern uint8_t selected_id;
@@ -1013,7 +1017,7 @@ static void notify_cb(struct bt_conn *conn, void *user_data)
10131017
{
10141018
const struct shell *sh = user_data;
10151019

1016-
shell_print(sh, "Nofication sent to conn %p", conn);
1020+
shell_print(sh, "Notification sent to conn %p", conn);
10171021
}
10181022
static int cmd_notify_mult(const struct shell *sh, size_t argc, char *argv[])
10191023
{

subsys/bluetooth/host/shell/iso.c

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,26 @@
99
*
1010
* SPDX-License-Identifier: Apache-2.0
1111
*/
12-
12+
#include <errno.h>
1313
#include <stddef.h>
14+
#include <stdint.h>
1415
#include <stdlib.h>
15-
#include <ctype.h>
16-
#include <zephyr/bluetooth/hci_types.h>
17-
#include <zephyr/kernel.h>
18-
#include <zephyr/shell/shell.h>
19-
#include <zephyr/sys/byteorder.h>
20-
#include <zephyr/sys/util.h>
16+
#include <string.h>
2117

18+
#include <zephyr/bluetooth/gap.h>
2219
#include <zephyr/bluetooth/hci.h>
2320
#include <zephyr/bluetooth/bluetooth.h>
2421
#include <zephyr/bluetooth/conn.h>
22+
#include <zephyr/bluetooth/hci_types.h>
2523
#include <zephyr/bluetooth/iso.h>
24+
#include <zephyr/kernel.h>
25+
#include <zephyr/net_buf.h>
26+
#include <zephyr/shell/shell.h>
27+
#include <zephyr/shell/shell_string_conv.h>
28+
#include <zephyr/sys/byteorder.h>
29+
#include <zephyr/sys/time_units.h>
30+
#include <zephyr/sys/util.h>
31+
#include <zephyr/sys/util_macro.h>
2632

2733
#include "host/shell/bt.h"
2834
#include "common/bt_shell_private.h"

subsys/bluetooth/host/shell/l2cap.c

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,30 @@
1111
*/
1212

1313
#include <errno.h>
14-
#include <zephyr/types.h>
1514
#include <stddef.h>
15+
#include <stdint.h>
1616
#include <stdlib.h>
1717
#include <string.h>
18-
#include <zephyr/sys/byteorder.h>
19-
#include <zephyr/kernel.h>
20-
21-
#include <zephyr/settings/settings.h>
2218

2319
#include <zephyr/bluetooth/hci.h>
2420
#include <zephyr/bluetooth/bluetooth.h>
2521
#include <zephyr/bluetooth/conn.h>
22+
#include <zephyr/bluetooth/hci_types.h>
2623
#include <zephyr/bluetooth/l2cap.h>
2724
#include <zephyr/bluetooth/classic/rfcomm.h>
2825
#include <zephyr/bluetooth/classic/sdp.h>
29-
26+
#include <zephyr/net_buf.h>
27+
#include <zephyr/settings/settings.h>
3028
#include <zephyr/shell/shell.h>
29+
#include <zephyr/shell/shell_string_conv.h>
30+
#include <zephyr/sys/atomic_types.h>
31+
#include <zephyr/sys/byteorder.h>
32+
#include <zephyr/kernel.h>
33+
#include <zephyr/sys/time_units.h>
34+
#include <zephyr/sys/util.h>
3135

32-
#include "host/shell/bt.h"
3336
#include "common/bt_shell_private.h"
37+
#include "host/shell/bt.h"
3438

3539
#define CREDITS 10
3640
#define DATA_MTU (23 * CREDITS)

0 commit comments

Comments
 (0)