From c9502bbe71f71ec9074b25254f2436ecb7af3bab Mon Sep 17 00:00:00 2001 From: Oliver Ruiz Dorantes Date: Wed, 6 Feb 2008 17:57:29 +0000 Subject: [PATCH] Added macros to parse port code, cointaining the event git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23897 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/os/bluetooth/HCI/btHCI_transport.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/headers/os/bluetooth/HCI/btHCI_transport.h b/headers/os/bluetooth/HCI/btHCI_transport.h index 32b22c47fd..6284a01d42 100644 --- a/headers/os/bluetooth/HCI/btHCI_transport.h +++ b/headers/os/bluetooth/HCI/btHCI_transport.h @@ -85,6 +85,9 @@ typedef struct bt_hci_device { #define GET_HCI_ID (1<<3) #define PACK_PORTCODE(type,hid,data) ((type&0xFF)<<24|(hid&0xFF)<<16|(data&0xFFFF)) +#define GET_PORTCODE_TYPE(code) ((code&0xFF000000)>>24) +#define GET_PORTCODE_HID(code) ((code&0x00FF0000)>>16) +#define GET_PORTCODE_DATA(code) ((code&0x0000FFFF)) /* Port drivers can use to send information (1 for all for at moment refer to ioctl GET_NOTIFICATION_PORT)*/