Skip to content

Commit

Permalink
[nrf fromtree] bluetooth: buf: Convert bt_buf_type enum to bitmask
Browse files Browse the repository at this point in the history
This allows to combine several types in a single value.

Signed-off-by: Pavel Vasilyev <[email protected]>
(cherry picked from commit bd9a1ce)
  • Loading branch information
PavelVPV authored and jukkar committed Dec 20, 2024
1 parent 657e1a3 commit e9cc271
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions include/zephyr/bluetooth/buf.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,22 @@
extern "C" {
#endif

/** Possible types of buffers passed around the Bluetooth stack */
/** Possible types of buffers passed around the Bluetooth stack in a form of bitmask. */
enum bt_buf_type {
/** HCI command */
BT_BUF_CMD,
BT_BUF_CMD = BIT(0),
/** HCI event */
BT_BUF_EVT,
BT_BUF_EVT = BIT(1),
/** Outgoing ACL data */
BT_BUF_ACL_OUT,
BT_BUF_ACL_OUT = BIT(2),
/** Incoming ACL data */
BT_BUF_ACL_IN,
BT_BUF_ACL_IN = BIT(3),
/** Outgoing ISO data */
BT_BUF_ISO_OUT,
BT_BUF_ISO_OUT = BIT(4),
/** Incoming ISO data */
BT_BUF_ISO_IN,
BT_BUF_ISO_IN = BIT(5),
/** H:4 data */
BT_BUF_H4,
BT_BUF_H4 = BIT(6),
};

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

0 comments on commit e9cc271

Please sign in to comment.