[haiku-commits] r34999 - haiku/trunk/headers/private/bluetooth
- From: oliver.ruiz.dorantes@xxxxxxxxx
- To: haiku-commits@xxxxxxxxxxxxx
- Date: Mon, 11 Jan 2010 00:02:21 +0100 (CET)
Author: oruizdorantes
Date: 2010-01-11 00:02:21 +0100 (Mon, 11 Jan 2010)
New Revision: 34999
Changeset: http://dev.haiku-os.org/changeset/34999/haiku
Modified:
haiku/trunk/headers/private/bluetooth/l2cap.h
Log:
- Add macros to distingish between requests and responses
Modified: haiku/trunk/headers/private/bluetooth/l2cap.h
===================================================================
--- haiku/trunk/headers/private/bluetooth/l2cap.h 2010-01-10 22:57:21 UTC
(rev 34998)
+++ haiku/trunk/headers/private/bluetooth/l2cap.h 2010-01-10 23:02:21 UTC
(rev 34999)
@@ -37,8 +37,8 @@
#define htole32(x) (x)
#define HZ 1000000 // us per second TODO: move somewhere more generic
-#define bluetooth_l2cap_ertx_timeout (60*HZ)
-#define bluetooth_l2cap_rtx_timeout (300*HZ)
+#define bluetooth_l2cap_ertx_timeout (60 * HZ)
+#define bluetooth_l2cap_rtx_timeout (300 * HZ)
/*
* Channel IDs are assigned relative to the instance of L2CAP node, i.e.
@@ -60,9 +60,9 @@
* connection. So up to 254 (0xff - 0x01) L2CAP commands can be pending at the
* same time for the same connection.
*/
-#define L2CAP_NULL_IDENT 0x00 /* DO NOT USE THIS IDENT */
-#define L2CAP_FIRST_IDENT 0x01 /* dynamically alloc.
(start) */
-#define L2CAP_LAST_IDENT 0xff /* dynamically alloc. (end)
*/
+#define L2CAP_NULL_IDENT 0x00 /* DO NOT USE THIS IDENT */
+#define L2CAP_FIRST_IDENT 0x01 /* dynamically alloc. (start) */
+#define L2CAP_LAST_IDENT 0xff /* dynamically alloc. (end) */
/* L2CAP MTU */
@@ -131,11 +131,11 @@
#define L2CAP_OPT_QOS_SIZE sizeof(l2cap_flow_t)
/* 0x4 - 0xff - reserved for future use */
-#define L2CAP_CFG_IN (1 << 0) /* incoming path done */
-#define L2CAP_CFG_OUT (1 << 1) /* outgoing path done */
+#define L2CAP_CFG_IN (1 << 0) /* incoming path done */
+#define L2CAP_CFG_OUT (1 << 1) /* outgoing path done */
#define L2CAP_CFG_BOTH (L2CAP_CFG_IN | L2CAP_CFG_OUT)
-#define L2CAP_CFG_IN_SENT (1 << 2) /* L2CAP ConfigReq sent */
-#define L2CAP_CFG_OUT_SENT (1 << 3) /* ---/--- */
+#define L2CAP_CFG_IN_SENT (1 << 2) /* L2CAP ConfigReq sent
*/
+#define L2CAP_CFG_OUT_SENT (1 << 3) /* ---/--- */
/* L2CAP Information request type codes */
#define L2CAP_CONNLESS_MTU 0x0001
@@ -294,6 +294,10 @@
*/
} __attribute__ ((packed)) l2cap_info_rsp_cp;
+#define IS_SIGNAL_REQ(code) ((code & 1) == 0)
+#define IS_SIGNAL_RSP(code) ((code & 1) == 1)
+
+
typedef union {
/* L2CAP_CONNLESS_MTU */
struct {
Other related posts:
- » [haiku-commits] r34999 - haiku/trunk/headers/private/bluetooth - oliver . ruiz . dorantes