Skip to content

Commit 363c4d1

Browse files
joerchanjhedberg
authored andcommitted
Bluetooth: HCI: Add utility to extract PB and BC flags from data header
Add utility to extract the flags Packet Boundary and Broadcast to the hci.h together with the rest of the ACL data header definitions. Signed-off-by: Joakim Andersson <[email protected]>
1 parent dfed64c commit 363c4d1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

include/bluetooth/hci.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,15 @@ struct bt_hci_evt_hdr {
3939
#define BT_ACL_START_NO_FLUSH 0x00
4040
#define BT_ACL_CONT 0x01
4141
#define BT_ACL_START 0x02
42+
#define BT_ACL_COMPLETE 0x03
4243

43-
#define bt_acl_handle(h) ((h) & 0x0fff)
44+
#define BT_ACL_POINT_TO_POINT 0x00
45+
#define BT_ACL_BROADCAST 0x01
46+
47+
#define bt_acl_handle(h) ((h) & BIT_MASK(12))
4448
#define bt_acl_flags(h) ((h) >> 12)
49+
#define bt_acl_flags_pb(f) ((f) & BIT_MASK(2))
50+
#define bt_acl_flags_bc(f) ((f) >> 2)
4551
#define bt_acl_handle_pack(h, f) ((h) | ((f) << 12))
4652

4753
struct bt_hci_acl_hdr {

0 commit comments

Comments
 (0)