1 /** @file
2  *  @brief Bluetooth shell functions
3  *
4  *  This is not to be included by the application.
5  */
6 
7 /*
8  * Copyright (c) 2017 Intel Corporation
9  *
10  * SPDX-License-Identifier: Apache-2.0
11  */
12 
13 #ifndef __BT_H
14 #define __BT_H
15 #include <stddef.h>
16 #include <stdint.h>
17 
18 #include <zephyr/autoconf.h>
19 #include <zephyr/bluetooth/bluetooth.h>
20 #include <zephyr/net_buf.h>
21 #include <sys/types.h>
22 
23 extern struct bt_conn *default_conn;
24 
25 bool passes_scan_filter(const struct bt_le_scan_recv_info *info, const struct net_buf_simple *buf);
26 
27 #if defined(CONFIG_BT_ISO)
28 extern struct bt_iso_chan iso_chan;
29 #endif /* CONFIG_BT_ISO */
30 
31 #if defined(CONFIG_BT_EXT_ADV)
32 extern uint8_t selected_adv;
33 extern struct bt_le_ext_adv *adv_sets[CONFIG_BT_EXT_ADV_MAX_ADV_SET];
34 #if defined(CONFIG_BT_PER_ADV_SYNC)
35 extern size_t selected_per_adv_sync;
36 extern struct bt_le_per_adv_sync *per_adv_syncs[CONFIG_BT_PER_ADV_SYNC_MAX];
37 #endif /* CONFIG_BT_PER_ADV_SYNC */
38 #endif /* CONFIG_BT_EXT_ADV */
39 
40 void conn_addr_str(struct bt_conn *conn, char *addr, size_t len);
41 
42 /**
43  * @brief Compares two strings without case sensitivity
44  *
45  * @param substr The substring
46  * @param str The string to find the substring in
47  *
48  * @return true if @substr is a substring of @p, else false
49  */
50 bool is_substring(const char *substr, const char *str);
51 
52 #endif /* __BT_H */
53