Skip to content

Commit 4a0ddbe

Browse files
Thalleykartben
authored andcommitted
include: Bluetooth: Add missing includes for all BT host files
Added missing includes and fixed typos in the header files for Bluetooth. There is one exception in hci_vs.h where `struct arch_esf` is still missing an include, but that is because that is only specific for ARM. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
1 parent ecabcf5 commit 4a0ddbe

File tree

17 files changed

+70
-21
lines changed

17 files changed

+70
-21
lines changed

include/zephyr/bluetooth/att.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@
1717
* @{
1818
*/
1919

20-
#include <zephyr/sys/slist.h>
20+
#include <stdint.h>
21+
#include <stddef.h>
22+
2123
#include <zephyr/bluetooth/conn.h>
24+
#include <zephyr/sys/slist.h>
25+
#include <zephyr/sys/util_macro.h>
2226

2327
#ifdef __cplusplus
2428
extern "C" {
@@ -118,6 +122,8 @@ extern "C" {
118122
#if defined(CONFIG_BT_ATT_ERR_TO_STR)
119123
const char *bt_att_err_to_str(uint8_t att_err);
120124
#else
125+
#include <zephyr/toolchain.h>
126+
121127
static inline const char *bt_att_err_to_str(uint8_t att_err)
122128
{
123129
ARG_UNUSED(att_err);
@@ -143,7 +149,7 @@ int bt_eatt_reconfigure(struct bt_conn *conn, uint16_t mtu);
143149
* may be created.
144150
*
145151
* @param conn The connection to send the request on
146-
* @param num_channels The number of Enhanced ATT beares to request.
152+
* @param num_channels The number of Enhanced ATT bearers to request.
147153
* Must be in the range 1 - @kconfig{CONFIG_BT_EATT_MAX}, inclusive.
148154
*
149155
* @return 0 in case of success or negative value in case of error.

include/zephyr/bluetooth/bluetooth.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,15 @@
3131
#include <stdint.h>
3232
#include <string.h>
3333

34-
#include <zephyr/sys/util.h>
35-
#include <zephyr/net_buf.h>
3634
#include <zephyr/bluetooth/gap.h>
3735
#include <zephyr/bluetooth/addr.h>
3836
#include <zephyr/bluetooth/crypto.h>
3937
#include <zephyr/bluetooth/classic/classic.h>
38+
#include <zephyr/net_buf.h>
39+
#include <zephyr/sys/slist.h>
40+
#include <zephyr/sys/util.h>
41+
#include <zephyr/sys/util_macro.h>
42+
#include <zephyr/toolchain.h>
4043

4144
#ifdef __cplusplus
4245
extern "C" {
@@ -241,7 +244,7 @@ struct bt_le_ext_adv_cb {
241244
*
242245
* This callback notifies the application that the RPA validity of the advertising set has
243246
* expired. The user can use this callback to synchronize the advertising payload update
244-
* with the RPA rotation by for example envoking @ref bt_le_ext_adv_set_data upon callback.
247+
* with the RPA rotation by for example invoking @ref bt_le_ext_adv_set_data upon callback.
245248
*
246249
* If RPA sharing is enabled (see @kconfig{CONFIG_BT_RPA_SHARING}) and this RPA expired
247250
* callback of any adv-sets belonging to same adv id returns false, then adv-sets will

include/zephyr/bluetooth/buf.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,17 @@
1818
* @{
1919
*/
2020

21+
#include <stddef.h>
2122
#include <stdint.h>
2223

23-
#include <zephyr/net_buf.h>
24+
#include <zephyr/autoconf.h>
2425
#include <zephyr/bluetooth/hci.h>
26+
#include <zephyr/bluetooth/hci_types.h>
27+
#include <zephyr/net_buf.h>
2528
#include <zephyr/sys/util.h>
29+
#include <zephyr/sys/util_macro.h>
30+
#include <zephyr/sys_clock.h>
31+
#include <zephyr/toolchain.h>
2632

2733
#ifdef __cplusplus
2834
extern "C" {

include/zephyr/bluetooth/conn.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,16 @@
2121
#include <stdbool.h>
2222
#include <stdint.h>
2323

24-
#include <zephyr/bluetooth/bluetooth.h>
25-
#include <zephyr/bluetooth/hci_types.h>
2624
#include <zephyr/bluetooth/addr.h>
27-
#include <zephyr/bluetooth/gap.h>
25+
#include <zephyr/bluetooth/bluetooth.h>
2826
#include <zephyr/bluetooth/direction.h>
27+
#include <zephyr/bluetooth/gap.h>
28+
#include <zephyr/bluetooth/hci_types.h>
29+
#include <zephyr/net_buf.h>
2930
#include <zephyr/sys/iterable_sections.h>
31+
#include <zephyr/sys/slist.h>
32+
#include <zephyr/sys/util_macro.h>
33+
#include <zephyr/toolchain.h>
3034

3135
#ifdef __cplusplus
3236
extern "C" {
@@ -1559,7 +1563,7 @@ enum bt_conn_le_cs_procedure_enable_state {
15591563
BT_CONN_LE_CS_PROCEDURES_ENABLED = BT_HCI_OP_LE_CS_PROCEDURES_ENABLED,
15601564
};
15611565

1562-
/** CS Test Tone Antennna Config Selection.
1566+
/** CS Test Tone Antenna Config Selection.
15631567
*
15641568
* These enum values are indices in the following table, where N_AP is the maximum
15651569
* number of antenna paths (in the range [1, 4]).

include/zephyr/bluetooth/crypto.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
*/
2020

2121
#include <stdbool.h>
22+
#include <stddef.h>
2223
#include <stdint.h>
2324

2425
#ifdef __cplusplus

include/zephyr/bluetooth/cs.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
#include <zephyr/bluetooth/hci_types.h>
2424
#include <zephyr/bluetooth/conn.h>
25+
#include <zephyr/net_buf.h>
26+
#include <zephyr/sys/util_macro.h>
2527

2628
#ifdef __cplusplus
2729
extern "C" {

include/zephyr/bluetooth/direction.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010
#include <stdint.h>
1111

12+
#include <zephyr/bluetooth/bluetooth.h>
13+
#include <zephyr/sys/util_macro.h>
14+
1215
/** Constant Tone Extension (CTE) types. */
1316
enum bt_df_cte_type {
1417
/** Convenience value for purposes where non of CTE types is allowed. */

include/zephyr/bluetooth/ead.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
#ifndef ZEPHYR_INCLUDE_BLUETOOTH_EAD_H_
99
#define ZEPHYR_INCLUDE_BLUETOOTH_EAD_H_
1010

11-
#include <zephyr/kernel.h>
1211
#include <zephyr/bluetooth/bluetooth.h>
12+
#include <zephyr/kernel.h>
1313

1414
#ifdef __cplusplus
1515
extern "C" {

include/zephyr/bluetooth/gap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
#ifndef ZEPHYR_INCLUDE_BLUETOOTH_GAP_H_
1212
#define ZEPHYR_INCLUDE_BLUETOOTH_GAP_H_
1313

14-
#include <zephyr/sys/util_macro.h>
1514
#include <zephyr/bluetooth/byteorder.h>
15+
#include <zephyr/sys/util_macro.h>
1616

1717
#ifdef __cplusplus
1818
extern "C" {

include/zephyr/bluetooth/gatt.h

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,21 @@
2222

2323
#include <stdint.h>
2424
#include <stddef.h>
25+
#include <string.h>
2526

2627
#include <sys/types.h>
2728

28-
#include <zephyr/sys/slist.h>
29-
#include <zephyr/sys/util.h>
29+
#include <zephyr/autoconf.h>
30+
#include <zephyr/bluetooth/addr.h>
3031
#include <zephyr/bluetooth/conn.h>
3132
#include <zephyr/bluetooth/uuid.h>
3233
#include <zephyr/bluetooth/att.h>
34+
#include <zephyr/sys/atomic.h>
3335
#include <zephyr/sys/iterable_sections.h>
36+
#include <zephyr/sys/slist.h>
37+
#include <zephyr/sys/util.h>
38+
#include <zephyr/sys/util_macro.h>
39+
#include <zephyr/toolchain.h>
3440

3541
#ifdef __cplusplus
3642
extern "C" {
@@ -229,7 +235,7 @@ struct bt_gatt_attr {
229235
* GATT Characteristic Presentation Format descriptor as
230236
* specified in Core Specification 3.G.3.3.3.5.
231237
*
232-
* You can define a new Attirubute Type for your application specific
238+
* You can define a new Attribute Type for your application specific
233239
* use by generating a new UUID for it.
234240
*/
235241
const struct bt_uuid *uuid;
@@ -956,7 +962,7 @@ ssize_t bt_gatt_attr_read_chrc(struct bt_conn *conn,
956962
const struct bt_gatt_attr *attr, void *buf,
957963
uint16_t len, uint16_t offset);
958964

959-
/** @brief Gatt Characterisitc Initialization Macro.
965+
/** @brief Gatt Characteristic Initialization Macro.
960966
*
961967
* Helper macro used within the @ref BT_GATT_CHARACTERISTIC macro in the GATT attribute declaration
962968
* to set the attribute user data.

0 commit comments

Comments
 (0)