Skip to content

Commit 1e1ef2e

Browse files
committed
[nrf fromtree] bluetooth: buf: Convert bt_buf_type enum to bitmask
This allows to combine several types in a single value. Signed-off-by: Pavel Vasilyev <[email protected]> (cherry picked from commit bd9a1ce)
1 parent 10d629d commit 1e1ef2e

File tree

1 file changed

+8
-8
lines changed
  • include/zephyr/bluetooth

1 file changed

+8
-8
lines changed

include/zephyr/bluetooth/buf.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,22 @@
2828
extern "C" {
2929
#endif
3030

31-
/** Possible types of buffers passed around the Bluetooth stack */
31+
/** Possible types of buffers passed around the Bluetooth stack in a form of bitmask. */
3232
enum bt_buf_type {
3333
/** HCI command */
34-
BT_BUF_CMD,
34+
BT_BUF_CMD = BIT(0),
3535
/** HCI event */
36-
BT_BUF_EVT,
36+
BT_BUF_EVT = BIT(1),
3737
/** Outgoing ACL data */
38-
BT_BUF_ACL_OUT,
38+
BT_BUF_ACL_OUT = BIT(2),
3939
/** Incoming ACL data */
40-
BT_BUF_ACL_IN,
40+
BT_BUF_ACL_IN = BIT(3),
4141
/** Outgoing ISO data */
42-
BT_BUF_ISO_OUT,
42+
BT_BUF_ISO_OUT = BIT(4),
4343
/** Incoming ISO data */
44-
BT_BUF_ISO_IN,
44+
BT_BUF_ISO_IN = BIT(5),
4545
/** H:4 data */
46-
BT_BUF_H4,
46+
BT_BUF_H4 = BIT(6),
4747
};
4848

4949
/** @brief This is a base type for bt_buf user data. */

0 commit comments

Comments
 (0)