summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPriti Aghera <paghera@broadcom.com>2012-03-22 11:51:08 -0700
committerMatthew Xie <mattx@google.com>2012-07-14 11:19:14 -0700
commitc01f69a35563261eca49bd2083afd7064790940d (patch)
treeab42ef0ba2a5f9d86b6b972aa3f9143148e72b30
parent146738bdcf0accdbd5d865440f86152d2430812d (diff)
downloadexternal_bluetooth_bluedroid-c01f69a35563261eca49bd2083afd7064790940d.zip
external_bluetooth_bluedroid-c01f69a35563261eca49bd2083afd7064790940d.tar.gz
external_bluetooth_bluedroid-c01f69a35563261eca49bd2083afd7064790940d.tar.bz2
HID-Host:Fixed white space issue and power management issue
Included more code to support mouse connectiona and reconnection Signed-off-by: Priti Aghera <paghera@broadcom.com> Change-Id: I1e20997e85eda5919f20a069131e580bcbb0ca63
-rw-r--r--bta/hh/bta_hh_api.c1
-rw-r--r--bta/hh/bta_hh_utils.c3
-rw-r--r--btif/co/bta_hh_co.c378
-rw-r--r--btif/include/btif_common.h4
-rw-r--r--btif/include/btif_hh.h123
-rw-r--r--btif/include/btif_util.h1
-rwxr-xr-x[-rw-r--r--]btif/src/bluetooth.c9
-rw-r--r--btif/src/btif_dm.c208
-rw-r--r--btif/src/btif_hh.c1419
-rw-r--r--btif/src/btif_storage.c29
-rwxr-xr-x[-rw-r--r--]btif/src/btif_util.c24
-rw-r--r--include/bt_trace.h3052
-rw-r--r--include/buildcfg_maguro.h6
-rwxr-xr-xmain/Android.mk6
-rw-r--r--stack/btm/btm_pm.c2
-rwxr-xr-x[-rw-r--r--]stack/l2cap/l2c_link.c8
-rwxr-xr-x[-rw-r--r--]stack/l2cap/l2c_utils.c0
17 files changed, 3715 insertions, 1558 deletions
diff --git a/bta/hh/bta_hh_api.c b/bta/hh/bta_hh_api.c
index 73e37a7..b1af978 100644
--- a/bta/hh/bta_hh_api.c
+++ b/bta/hh/bta_hh_api.c
@@ -52,6 +52,7 @@ void BTA_HhEnable(tBTA_SEC sec_mask, BOOLEAN ucd_enabled, tBTA_HH_CBACK *p_cback
bta_sys_register(BTA_ID_HH, &bta_hh_reg);
GKI_sched_unlock();
+ APPL_TRACE_ERROR0("Calling BTA_HhEnable");
p_buf = (tBTA_HH_API_ENABLE *)GKI_getbuf((UINT16)sizeof(tBTA_HH_API_ENABLE));
if (p_buf != NULL)
diff --git a/bta/hh/bta_hh_utils.c b/bta/hh/bta_hh_utils.c
index 18ff0c3..2b68c56 100644
--- a/bta/hh/bta_hh_utils.c
+++ b/bta/hh/bta_hh_utils.c
@@ -11,7 +11,8 @@
#include <string.h>
#include "bt_target.h"
-#if defined(HL_INCLUDED) && (HL_INCLUDED == TRUE)
+#if defined(BTA_HH_INCLUDED) && (BTA_HH_INCLUDED == TRUE)
+
#include "bta_hh_int.h"
diff --git a/btif/co/bta_hh_co.c b/btif/co/bta_hh_co.c
new file mode 100644
index 0000000..cf7970f
--- /dev/null
+++ b/btif/co/bta_hh_co.c
@@ -0,0 +1,378 @@
+/************************************************************************************
+ *
+ * Copyright (C) 2009-2012 Broadcom Corporation
+ *
+ * This program is the proprietary software of Broadcom Corporation and/or its
+ * licensors, and may only be used, duplicated, modified or distributed
+ * pursuant to the terms and conditions of a separate, written license
+ * agreement executed between you and Broadcom (an "Authorized License").
+ * Except as set forth in an Authorized License, Broadcom grants no license
+ * (express or implied), right to use, or waiver of any kind with respect to
+ * the Software, and Broadcom expressly reserves all rights in and to the
+ * Software and all intellectual property rights therein.
+ * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS
+ * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE
+ * ALL USE OF THE SOFTWARE.
+ *
+ * Except as expressly set forth in the Authorized License,
+ *
+ * 1. This program, including its structure, sequence and organization,
+ * constitutes the valuable trade secrets of Broadcom, and you shall
+ * use all reasonable efforts to protect the confidentiality thereof,
+ * and to use this information only in connection with your use of
+ * Broadcom integrated circuit products.
+ *
+ * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED
+ * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES,
+ * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY,
+ * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY
+ * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY,
+ * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES,
+ * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR
+ * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT
+ * OF USE OR PERFORMANCE OF THE SOFTWARE.
+ *
+ * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR
+ * ITS LICENSORS BE LIABLE FOR
+ * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY
+ * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO
+ * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM
+ * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR
+ * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE
+ * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE
+ * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF
+ * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY.
+ *
+ ************************************************************************************/
+
+//#if (defined(BTA_HH_INCLUDED) && (BTA_HH_INCLUDED == TRUE))
+
+#include <ctype.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdint.h>
+#include <errno.h>
+#include "btif_hh.h"
+
+#include "bta_api.h"
+#include "bta_hh_api.h"
+
+
+
+#define UINT8 uint8_t
+#define UINT16 uint16_t
+#if (defined(HH_USE_BTHID) && (HH_USE_BTHID == TRUE))
+
+
+#define BTHID_HID_INFO 1
+#define LOG_TAG "BTA_HH_CO"
+#define BTHID_MAX_DEV_NAME_LEN 128
+#define BTHID_MAX_DSCP_BUF_LEN 884
+
+typedef struct BTHID_CONTROL
+{
+ int dscp_len;
+ char dscp_buf[BTHID_MAX_DSCP_BUF_LEN];
+ char dev_name[BTHID_MAX_DEV_NAME_LEN];
+ unsigned short vendor_id;
+ unsigned short product_id;
+ unsigned short version;
+ unsigned short ctry_code;
+} tBTHID_CONTROL;
+
+#else
+
+#endif
+
+static UINT8 HID_REPORT_START[] = {1,0,0};
+#define HID_REPORT_CAPSLOCK 0x39
+#define HID_REPORT_NUMLOCK 0x53
+#define HID_REPORT_SCROLLLOCK 0x47
+static int saved_keyevents =0;
+
+static void process_rpt_keys_with_state(UINT8 dev_handle, UINT8 *p_rpt, UINT16 len)
+{
+/*
+ --TODO
+ */
+}
+
+/*******************************************************************************
+**
+** Function bta_hh_co_open
+**
+** Description When connection is opened, this call-out function is executed
+** by HH to do platform specific initialization.
+**
+** Returns void.
+*******************************************************************************/
+void bta_hh_co_open(UINT8 dev_handle, UINT8 sub_class, tBTA_HH_ATTR_MASK attr_mask,
+ UINT8 app_id)
+{
+ UINT32 i;
+ btif_hh_device_t *p_dev = NULL;
+
+ BTIF_TRACE_WARNING5("%s: dev_handle = %d, subclass = 0x%02X, attr_mask = 0x%04X, app_id = %d",
+ __FUNCTION__, dev_handle, sub_class, attr_mask, app_id);
+
+ if (dev_handle == BTA_HH_INVALID_HANDLE) {
+ BTIF_TRACE_WARNING2("%s: Oops, dev_handle (%d) is invalid...", __FUNCTION__, dev_handle);
+ return;
+ }
+
+ for (i = 0; i < BTIF_HH_MAX_HID; i++) {
+ p_dev = &btif_hh_cb.devices[i];
+ if (p_dev->dev_status != BTHH_CONN_STATE_UNKNOWN && p_dev->dev_handle == dev_handle) {
+ // We found a device with the same handle. Must be a device reconnected.
+ BTIF_TRACE_WARNING2("%s: Found an existing device with the same handle. dev_status = %d",
+ __FUNCTION__, p_dev->dev_status);
+ BTIF_TRACE_WARNING6("%s: bd_addr = [%02X:%02X:%02X:%02X:%02X:]", __FUNCTION__,
+ p_dev->bd_addr.address[0], p_dev->bd_addr.address[1], p_dev->bd_addr.address[2],
+ p_dev->bd_addr.address[3], p_dev->bd_addr.address[4]);
+ BTIF_TRACE_WARNING4("%s: attr_mask = 0x%04x, sub_class = 0x%02x, app_id = %d", __FUNCTION__,
+ p_dev->attr_mask, p_dev->sub_class, p_dev->app_id);
+
+ if(p_dev->fd<0) {
+ p_dev->fd = open("/dev/bthid", O_RDWR);
+ BTIF_TRACE_WARNING2("%s: bthid fd = %d", __FUNCTION__, p_dev->fd);
+ }
+
+ break;
+ }
+ p_dev = NULL;
+ }
+
+ if (p_dev == NULL) {
+ // Did not find a device reconnection case. Find an empty slot now.
+ for (i = 0; i < BTIF_HH_MAX_HID; i++) {
+ if (btif_hh_cb.devices[i].dev_status == BTHH_CONN_STATE_UNKNOWN) {
+ p_dev = &btif_hh_cb.devices[i];
+ p_dev->dev_handle = dev_handle;
+ p_dev->attr_mask = attr_mask;
+ p_dev->sub_class = sub_class;
+ p_dev->app_id = app_id;
+
+ btif_hh_cb.device_num++;
+
+ #if (defined(HH_USE_BTHID) && (HH_USE_BTHID == TRUE))
+ // This is a new device,open the bthid driver now.
+ p_dev->fd = open("/dev/bthid", O_RDWR);
+ BTIF_TRACE_WARNING3("%s: bthid fd = %d, errno=%d", __FUNCTION__, p_dev->fd,errno);
+ #endif
+ break;
+ }
+ }
+ }
+
+ if (p_dev == NULL) {
+ BTIF_TRACE_WARNING1("%s: Error: too many HID devices are connected", __FUNCTION__);
+ return;
+ }
+
+ p_dev->dev_status = BTHH_CONN_STATE_CONNECTED;
+ BTIF_TRACE_WARNING2("%s: Return device status %d", __FUNCTION__, p_dev->dev_status);
+}
+
+
+/*******************************************************************************
+**
+** Function bta_hh_co_close
+**
+** Description When connection is closed, this call-out function is executed
+** by HH to do platform specific finalization.
+**
+** Parameters dev_handle - device handle
+** app_id - application id
+**
+** Returns void.
+*******************************************************************************/
+void bta_hh_co_close(UINT8 dev_handle, UINT8 app_id)
+{
+ BTIF_TRACE_WARNING3("%s: dev_handle = %d, app_id = %d", __FUNCTION__, dev_handle, app_id);
+}
+
+
+/*******************************************************************************
+**
+** Function bta_hh_co_data
+**
+** Description This function is executed by BTA when HID host receive a data
+** report.
+**
+** Parameters dev_handle - device handle
+** *p_rpt - pointer to the report data
+** len - length of report data
+** mode - Hid host Protocol Mode
+** sub_clas - Device Subclass
+** app_id - application id
+**
+** Returns void
+*******************************************************************************/
+void bta_hh_co_data(UINT8 dev_handle, UINT8 *p_rpt, UINT16 len, tBTA_HH_PROTO_MODE mode,
+ UINT8 sub_class, UINT8 ctry_code, BD_ADDR peer_addr, UINT8 app_id)
+{
+ btif_hh_device_t *p_dev;
+ //tBTA_HH_BOOT_RPT rpt;
+
+ BTIF_TRACE_WARNING6("%s: dev_handle = %d, subclass = 0x%02X, mode = %d, "
+ "ctry_code = %d, app_id = %d",
+ __FUNCTION__, dev_handle, sub_class, mode, ctry_code, app_id);
+
+
+ // Verbose logging
+ /*
+ int i;
+ for (i =0; i < len;i++) {
+ LOGV("%s: %x",__FUNCTION__, p_rpt[i]);
+ }
+ */
+
+ p_dev = btif_hh_find_connected_dev_by_handle(dev_handle);
+ if (p_dev == NULL) {
+ BTIF_TRACE_WARNING2("%s: Error: unknown HID device handle %d", __FUNCTION__, dev_handle);
+ return;
+ }
+
+#if (defined(HH_USE_BTHID) && (HH_USE_BTHID == TRUE))
+ // Send the HID report to the kernel.
+ if (p_dev->fd >= 0) {
+ BTIF_TRACE_WARNING3("%s: fd = %d, len = %d", __FUNCTION__, p_dev->fd, len);
+ /* TODO: keystate
+ if (app_id == BTAPP_HH_APP_ID_KB) {
+ process_rpt_keys_with_state(dev_handle,p_rpt,len);
+ }
+ */
+ write(p_dev->fd, p_rpt, len);
+ }
+ else {
+ BTIF_TRACE_WARNING3("%s: Error: fd = %d, len = %d", __FUNCTION__, p_dev->fd, len);
+ }
+#else
+
+ switch (app_id) {
+ case BTAPP_HH_APP_ID_KB:
+ case BTAPP_HH_APP_ID_MI:
+ if (mode == BTA_HH_PROTO_BOOT_MODE) {
+ // Call utility function to parse the boot mode report
+ BTA_HhParseBootRpt(&rpt, p_rpt, len);
+
+ switch (rpt.dev_type) {
+
+ case BTA_HH_KEYBD_RPT_ID: // HID keyboard
+ /* Process the keypress by looking up the key conversion table
+ * which could be different from language to language.
+ * Application can pass in different key conversion table depend on
+ * the keyboard language. For undefined country code or English
+ * keyboard, use the default key conversion table
+ *
+ * We only use default conversion table here, ignore the language
+ * and the country code.
+ */
+ process_keyboard_rpt(p_dev, &rpt.data_rpt.keybd_rpt);
+ break;
+
+ case BTA_HH_MOUSE_RPT_ID: // HID mouse
+ process_mouse_rpt(&rpt.data_rpt.mice_rpt);
+ break;
+
+ default:
+ BTIF_TRACE_WARNING4("%s: Unknown boot-mode HID report(%d) \"%s\", dev_type = %d",
+ __FUNCTION__, len, p_rpt, rpt.dev_type);
+ //LOGI("%s: %x %x %x %x %x %x %x",
+ // __FUNCTION__, p_rpt[0], p_rpt[1], p_rpt[2], p_rpt[3], p_rpt[4],
+ // p_rpt[5], p_rpt[6]);
+ break;
+ }
+ }
+ else {
+ BTIF_TRACE_WARNING4("%s: Unsupported HID mode %d rpt(%d) \"%s\"",
+ __FUNCTION__, mode, len, p_rpt);
+ }
+ break;
+
+ default:
+ BTIF_TRACE_WARNING4("%s: Unknown HID report app_id %d rpt(%d) \"%s\"",
+ __FUNCTION__, app_id, len, p_rpt);
+ break;
+ }
+
+#endif // (defined(HH_USE_BTHID) && (HH_USE_BTHID == TRUE))
+}
+
+
+/*******************************************************************************
+**
+** Function bta_hh_co_send_hid_info
+**
+** Description This function is called in btapp_hh.c to process DSCP received.
+**
+** Parameters dev_handle - device handle
+** dscp_len - report descriptor length
+** *p_dscp - report descriptor
+**
+** Returns void
+*******************************************************************************/
+void bta_hh_co_send_hid_info(btif_hh_device_t *p_dev, char *dev_name, UINT16 vendor_id,
+ UINT16 product_id, UINT16 version, UINT8 ctry_code,
+ int dscp_len, UINT8 *p_dscp)
+{
+#if (defined(HH_USE_BTHID) && (HH_USE_BTHID == TRUE))
+ int result;
+ tBTHID_CONTROL ctrl;
+#endif
+
+ /*
+ int i;
+ for (i = 0; i < dscp_len; i += 16) {
+ LOGI("%02X %02X %02X %02X %02X %02X %02X %02X "
+ "%02X %02X %02X %02X %02X %02X %02X %02X",
+ p_dscp[i], p_dscp[i+1], p_dscp[i+2], p_dscp[i+3],
+ p_dscp[i+4], p_dscp[i+5], p_dscp[i+6], p_dscp[i+7],
+ p_dscp[i+8], p_dscp[i+9], p_dscp[i+10], p_dscp[i+11],
+ p_dscp[i+12], p_dscp[i+13], p_dscp[i+14], p_dscp[i+15]);
+ }
+ */
+
+#if (defined(HH_USE_BTHID) && (HH_USE_BTHID == TRUE))
+ if (p_dev->fd < 0) {
+ BTIF_TRACE_WARNING3("%s: Error: fd = %d, dscp_len = %d", __FUNCTION__, p_dev->fd, dscp_len);
+ return;
+ }
+
+ if (dscp_len > BTHID_MAX_DSCP_BUF_LEN) {
+ BTIF_TRACE_WARNING2("%s: Error: HID report descriptor is too large. dscp_len = %d", __FUNCTION__, dscp_len);
+ return;
+ }
+
+ BTIF_TRACE_WARNING4("%s: fd = %d, name = [%s], dscp_len = %d", __FUNCTION__, p_dev->fd, dev_name, dscp_len);
+ BTIF_TRACE_WARNING5("%s: vendor_id = 0x%04x, product_id = 0x%04x, version= 0x%04x, ctry_code=0x%02x",
+ __FUNCTION__, vendor_id, product_id, version, ctry_code);
+
+ memset(&ctrl, 0, sizeof(tBTHID_CONTROL));
+
+ ctrl.dscp_len = dscp_len;
+ memcpy(ctrl.dscp_buf, p_dscp, dscp_len);
+ strncpy(ctrl.dev_name, dev_name, BTHID_MAX_DEV_NAME_LEN - 1);
+ ctrl.vendor_id = vendor_id;
+ ctrl.product_id = product_id;
+ ctrl.version = version;
+ ctrl.ctry_code = ctry_code;
+
+ BTIF_TRACE_WARNING1("%s: send ioctl", __FUNCTION__);
+
+ result = ioctl(p_dev->fd, BTHID_HID_INFO, &ctrl);
+
+ BTIF_TRACE_WARNING4("%s: fd = %d, dscp_len = %d, result = %d", __FUNCTION__, p_dev->fd, dscp_len, result);
+
+ if (result != 0) {
+ BTIF_TRACE_WARNING2("%s: Error: failed to send DSCP, result = %d", __FUNCTION__, result);
+
+ /* The HID report descriptor is corrupted. Close the driver. */
+ close(p_dev->fd);
+ p_dev->fd = -1;
+ }
+#endif
+}
+
+
diff --git a/btif/include/btif_common.h b/btif/include/btif_common.h
index 48ed00f..ec3f4f3 100644
--- a/btif/include/btif_common.h
+++ b/btif/include/btif_common.h
@@ -135,7 +135,9 @@ enum
BTIF_DM_CB_START = BTIF_SIG_CB_START(BTIF_DM),
BTIF_DM_CB_DISCOVERY_STARTED, /* Discovery has started */
- BTIF_DM_CB_BONDING_STARTED, /* Bonding process has started */
+ BTIF_DM_CB_CREATE_BOND, /* Create bond */
+ BTIF_DM_CB_REMOVE_BOND, /*Remove bond */
+ BTIF_DM_CB_HID_REMOTE_NAME, /* Remote name callback for HID device */
};
/************************************************************************************
diff --git a/btif/include/btif_hh.h b/btif/include/btif_hh.h
new file mode 100644
index 0000000..0f26b71
--- /dev/null
+++ b/btif/include/btif_hh.h
@@ -0,0 +1,123 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2009-2012 Broadcom Corporation
+ *
+ * This program is the proprietary software of Broadcom Corporation and/or its
+ * licensors, and may only be used, duplicated, modified or distributed
+ * pursuant to the terms and conditions of a separate, written license
+ * agreement executed between you and Broadcom (an "Authorized License").
+ * Except as set forth in an Authorized License, Broadcom grants no license
+ * (express or implied), right to use, or waiver of any kind with respect to
+ * the Software, and Broadcom expressly reserves all rights in and to the
+ * Software and all intellectual property rights therein.
+ * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS
+ * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE
+ * ALL USE OF THE SOFTWARE.
+ *
+ * Except as expressly set forth in the Authorized License,
+ *
+ * 1. This program, including its structure, sequence and organization,
+ * constitutes the valuable trade secrets of Broadcom, and you shall
+ * use all reasonable efforts to protect the confidentiality thereof,
+ * and to use this information only in connection with your use of
+ * Broadcom integrated circuit products.
+ *
+ * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED
+ * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES,
+ * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY,
+ * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY
+ * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY,
+ * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES,
+ * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR
+ * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING
+ * OUT OF USE OR PERFORMANCE OF THE SOFTWARE.
+ *
+ * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM
+ * OR ITS LICENSORS BE LIABLE FOR
+ * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY
+ * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO
+ * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM
+ * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR
+ * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE
+ * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE
+ * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF
+ * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY.
+ *
+ *****************************************************************************/
+
+/*****************************************************************************
+**
+** Name: btif_hh.h
+**
+** Description:
+**
+******************************************************************************/
+
+
+#ifndef BTIF_HH_H
+#define BTIF_HH_H
+
+#include <hardware/bluetooth.h>
+#include <hardware/bt_hh.h>
+#include <stdint.h>
+#include "bta_hh_api.h"
+
+
+#define BTIF_HH_MAX_HID 8
+#define BTIF_HH_MAX_ADDED_DEV 32
+
+typedef struct
+{
+ bthh_connection_state_t dev_status;
+ UINT8 dev_handle;
+ bt_bdaddr_t bd_addr;
+ tBTA_HH_ATTR_MASK attr_mask;
+ UINT8 sub_class;
+ UINT8 app_id;
+ int fd;
+ BT_HDR *p_buf;
+} btif_hh_device_t;
+
+//Control block to maintain properties of devices
+typedef struct
+{
+ UINT8 dev_handle;
+ bt_bdaddr_t bd_addr;
+ tBTA_HH_ATTR_MASK attr_mask;
+} btif_hh_added_device_t;
+
+typedef enum
+{
+ BTIF_HH_DISABLED = 0,
+ BTIF_HH_ENABLED,
+ BTIF_HH_DISABLING,
+ BTIF_HH_DEV_UNKNOWN,
+ BTIF_HH_DEV_PAIRED,
+ BTIF_HH_DEV_CONNECTED
+} BTIF_HH_STATUS;
+
+// BTIF-HH control block to maintain added devices and current connected hid device
+typedef struct
+{
+ BTIF_HH_STATUS status;
+ BOOLEAN mouse_pairing;
+ bt_bdaddr_t mouse_pairing_bda;
+ btif_hh_device_t devices[BTIF_HH_MAX_HID];
+ UINT32 device_num;
+ btif_hh_added_device_t added_devices[BTIF_HH_MAX_ADDED_DEV];
+ btif_hh_device_t *p_curr_dev;
+} btif_hh_cb_t;
+
+extern btif_hh_cb_t btif_hh_cb;
+
+extern btif_hh_device_t *btif_hh_find_connected_dev_by_handle(UINT8 handle);
+extern void btif_hh_update_keyevents(UINT8 dev_handle, int keyevents);
+extern void btif_hh_mouse_pairing(bt_bdaddr_t bd_addr);
+extern void btif_hh_clear_mouse_pairing(bt_bdaddr_t bd_addr);
+extern void btif_hh_remove_device(bt_bdaddr_t bd_addr);
+BOOLEAN btif_hh_add_added_dev(bt_bdaddr_t bda, tBTA_HH_ATTR_MASK attr_mask);
+
+
+
+#endif
+
diff --git a/btif/include/btif_util.h b/btif/include/btif_util.h
index 2688b09..05b7e76 100644
--- a/btif/include/btif_util.h
+++ b/btif/include/btif_util.h
@@ -87,6 +87,7 @@ typedef char bdstr_t[18];
const char* dump_bt_status(bt_status_t status);
const char* dump_dm_search_event(UINT16 event);
const char* dump_hf_event(UINT16 event);
+const char* dump_hh_event(UINT16 event);
const char* dump_hf_conn_state(UINT16 event);
const char* dump_hf_call_state(bthf_call_state_t call_state);
const char* dump_property_type(bt_property_type_t type);
diff --git a/btif/src/bluetooth.c b/btif/src/bluetooth.c
index 2480e28..df6c635 100644..100755
--- a/btif/src/bluetooth.c
+++ b/btif/src/bluetooth.c
@@ -60,6 +60,8 @@
#include <hardware/bluetooth.h>
#include <hardware/bt_hf.h>
#include <hardware/bt_av.h>
+#include <hardware/bt_hh.h>
+
#define LOG_NDDEBUG 0
#define LOG_TAG "bluedroid"
@@ -96,6 +98,10 @@ bt_callbacks_t *bt_hal_cbacks = NULL;
extern bthf_interface_t *btif_hf_get_interface();
/* advanced audio profile */
extern btav_interface_t *btif_av_get_interface();
+/* hid host profile */
+extern bthh_interface_t *btif_hh_get_interface();
+
+
/************************************************************************************
** Functions
@@ -311,7 +317,8 @@ static const void* get_profile_interface (const char *profile_id)
if (is_profile(profile_id, BT_PROFILE_ADVANCED_AUDIO_ID))
return btif_av_get_interface();
-
+ if (is_profile(profile_id, BT_PROFILE_HIDHOST_ID))
+ return btif_hh_get_interface();
return NULL;
}
diff --git a/btif/src/btif_dm.c b/btif/src/btif_dm.c
index fa0330e..6210a5f 100644
--- a/btif/src/btif_dm.c
+++ b/btif/src/btif_dm.c
@@ -68,12 +68,16 @@
#include "btif_api.h"
#include "btif_util.h"
#include "btif_storage.h"
+#include "btif_hh.h"
/******************************************************************************
** Constants & Macros
******************************************************************************/
#define COD_UNCLASSIFIED ((0x1F) << 8)
+#define COD_HID_KEYBOARD 0x0540
+#define COD_HID_POINTING 0x0580
+#define COD_HID_COMBO 0x05C0
#define BTIF_DM_DEFAULT_INQ_MAX_RESULTS 0
#define BTIF_DM_DEFAULT_INQ_MAX_DURATION 10
@@ -92,6 +96,9 @@ typedef struct {
******************************************************************************/
static btif_dm_pairing_cb_t pairing_cb;
static bt_status_t btif_dm_get_remote_services(bt_bdaddr_t *remote_addr);
+static void btif_dm_generic_evt(UINT16 event, char* p_param);
+static void btif_dm_cb_create_bond(bt_bdaddr_t *bd_addr);
+static void btif_dm_cb_hid_remote_name(tBTM_REMOTE_DEV_NAME *p_remote_name);
/******************************************************************************
** Externs
@@ -99,6 +106,8 @@ static bt_status_t btif_dm_get_remote_services(bt_bdaddr_t *remote_addr);
extern UINT16 bta_service_id_to_uuid_lkup_tbl [BTA_MAX_SERVICE_ID];
extern bt_status_t btif_hf_execute_service(BOOLEAN b_enable);
extern bt_status_t btif_av_execute_service(BOOLEAN b_enable);
+extern bt_status_t btif_hh_execute_service(BOOLEAN b_enable);
+
/******************************************************************************
** Functions
@@ -118,6 +127,11 @@ bt_status_t btif_in_execute_service_request(tBTA_SERVICE_ID service_id,
{
btif_av_execute_service(b_enable);
}break;
+ case BTA_HID_SERVICE_ID:
+ {
+ btif_hh_execute_service(b_enable);
+ }
+
default:
BTIF_TRACE_ERROR1("%s: Unknown service being enabled", __FUNCTION__);
return BT_STATUS_FAIL;
@@ -207,6 +221,23 @@ static BOOLEAN check_cached_remote_name(tBTA_DM_SEARCH *p_search_data,
return FALSE;
}
+BOOLEAN check_cod(const bt_bdaddr_t *remote_bdaddr, uint32_t cod)
+{
+ uint32_t remote_cod;
+ bt_property_t prop_name;
+
+ /* check if we already have it in our btif_storage cache */
+ BTIF_STORAGE_FILL_PROPERTY(&prop_name, BT_PROPERTY_CLASS_OF_DEVICE,
+ sizeof(uint32_t), &remote_cod);
+ if (btif_storage_get_remote_device_property((bt_bdaddr_t *)remote_bdaddr, &prop_name) == BT_STATUS_SUCCESS)
+ {
+ if ((remote_cod & 0x7ff) == cod)
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
static void bond_state_changed(bt_status_t status, bt_bdaddr_t *bd_addr, bt_bond_state_t state)
{
/* Send bonding state only once - based on outgoing/incoming we may receive duplicates */
@@ -228,6 +259,140 @@ static void bond_state_changed(bt_status_t status, bt_bdaddr_t *bd_addr, bt_bond
/*******************************************************************************
**
+** Function hid_remote_name_cback
+**
+** Description Remote name callback for HID device. Called in stack context
+** Special handling for HID devices
+**
+** Returns void
+**
+*******************************************************************************/
+static void hid_remote_name_cback(void *p_param)
+{
+ BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+
+ btif_transfer_context(btif_dm_generic_evt, BTIF_DM_CB_HID_REMOTE_NAME,
+ (char *)p_param, sizeof(tBTM_REMOTE_DEV_NAME), NULL);
+}
+
+/*******************************************************************************
+**
+** Function btif_dm_cb_hid_remote_name
+**
+** Description Remote name callback for HID device. Called in btif context
+** Special handling for HID devices
+**
+** Returns void
+**
+*******************************************************************************/
+static void btif_dm_cb_hid_remote_name(tBTM_REMOTE_DEV_NAME *p_remote_name)
+{
+ BTIF_TRACE_DEBUG3("%s: status=%d pairing_cb.state=%d", __FUNCTION__, p_remote_name->status, pairing_cb.state);
+ if (pairing_cb.state == BT_BOND_STATE_BONDING)
+ {
+ bt_bdaddr_t remote_bd;
+
+ bdcpy(remote_bd.address, pairing_cb.bd_addr);
+
+ if (p_remote_name->status == BTM_SUCCESS)
+ {
+ bond_state_changed(BT_STATUS_SUCCESS, &remote_bd, BT_BOND_STATE_BONDED);
+ //btif_hh_mouse_pairing(remote_bd);
+ }
+ else
+ bond_state_changed(BT_STATUS_FAIL, &remote_bd, BT_BOND_STATE_NONE);
+ }
+}
+
+/*******************************************************************************
+**
+** Function btif_dm_cb_create_bond
+**
+** Description Create bond initiated from the BTIF thread context
+** Special handling for HID devices
+**
+** Returns void
+**
+*******************************************************************************/
+static void btif_dm_cb_create_bond(bt_bdaddr_t *bd_addr)
+{
+ bond_state_changed(BT_STATUS_SUCCESS, bd_addr, BT_BOND_STATE_BONDING);
+
+ /* TODO:
+ ** 1. Check if ACL is already up with this device
+ ** 2. Disable unpaired devices from connecting while we are bonding
+ ** 3. special handling for HID devices
+ */
+ if (check_cod(bd_addr, COD_HID_POINTING))
+ {
+ /* For HID mouse, no pairing required. Hence we fake the pairing process
+ * by retrieving the remote device name.
+ */
+ BTIF_TRACE_DEBUG0("Create bond for hid mouse");
+ tBTM_STATUS status;
+ BD_ADDR bda;
+ bdcpy(bda, bd_addr->address);
+
+ BTIF_TRACE_DEBUG1("%s: Bypass bonding for HID Mouse", __FUNCTION__);
+ status = BTM_ReadRemoteDeviceName(bda, hid_remote_name_cback);
+
+ if (status != BTM_CMD_STARTED)
+ {
+ BTIF_TRACE_DEBUG2("%s: status = %d", __FUNCTION__, status);
+ bond_state_changed(BT_STATUS_FAIL, bd_addr, BT_BOND_STATE_NONE);
+ return;
+ }
+ /* Trigger SDP on the device */
+ BTIF_TRACE_DEBUG1("%s:Starting SDP", __FUNCTION__);
+ btif_dm_get_remote_services(bd_addr);
+ }
+ else
+ {
+ BTA_DmBond ((UINT8 *)bd_addr->address);
+ }
+
+}
+
+/*******************************************************************************
+**
+** Function btif_dm_cb_remove_bond
+**
+** Description remove bond initiated from the BTIF thread context
+** Special handling for HID devices
+**
+** Returns void
+**
+*******************************************************************************/
+static void btif_dm_cb_remove_bond(bt_bdaddr_t *bd_addr)
+{
+ bdstr_t bdstr;
+ /*special handling for HID devices */
+#if (defined(BTA_HH_INCLUDED) && (BTA_HH_INCLUDED == TRUE))
+ if (check_cod(bd_addr, COD_HID_POINTING )) {
+ btif_hh_remove_device(*bd_addr);
+ //todo
+ //virtual_unplug(bd_addr);
+ bond_state_changed(BT_STATUS_SUCCESS, bd_addr, BT_BOND_STATE_NONE);
+ return;
+ }
+ else if (check_cod(bd_addr, COD_HID_KEYBOARD)|| check_cod(bd_addr, COD_HID_COMBO)) {
+ btif_hh_remove_device(*bd_addr);
+ }
+#endif
+ if (BTA_DmRemoveDevice((UINT8 *)bd_addr->address) == BTA_SUCCESS)
+ {
+ BTIF_TRACE_DEBUG1("Successfully removed bonding with device: %s",
+ bd2str((bt_bdaddr_t *)bd_addr, &bdstr));
+ }
+ else
+ BTIF_TRACE_DEBUG1("Removed bonding with device failed: %s",
+ bd2str((bt_bdaddr_t *)bd_addr, &bdstr));
+
+
+}
+
+/*******************************************************************************
+**
** Function search_devices_copy_cb
**
** Description Deep copy callback for search devices event
@@ -840,9 +1005,21 @@ static void btif_dm_generic_evt(UINT16 event, char* p_param)
}
break;
- case BTIF_DM_CB_BONDING_STARTED:
+ case BTIF_DM_CB_CREATE_BOND:
+ {
+ btif_dm_cb_create_bond((bt_bdaddr_t *)p_param);
+ }
+ break;
+
+ case BTIF_DM_CB_REMOVE_BOND:
{
- bond_state_changed(BT_STATUS_SUCCESS, (bt_bdaddr_t *)p_param, BT_BOND_STATE_BONDING);
+ btif_dm_cb_remove_bond((bt_bdaddr_t *)p_param);
+ }
+ break;
+
+ case BTIF_DM_CB_HID_REMOTE_NAME:
+ {
+ btif_dm_cb_hid_remote_name((tBTM_REMOTE_DEV_NAME *)p_param);
}
break;
@@ -1029,16 +1206,8 @@ bt_status_t btif_dm_create_bond(const bt_bdaddr_t *bd_addr)
if (pairing_cb.state != BT_BOND_STATE_NONE)
return BT_STATUS_BUSY;
- /* TODO:
- ** 1. Check if ACL is already up with this device
- ** 2. Disable unpaired devices from connecting while we are bonding
- ** 3. special handling for HID devices
- */
-
- BTA_DmBond ((UINT8 *)bd_addr->address);
-
- /* Invoke the discovery_started callback */
- btif_transfer_context(btif_dm_generic_evt, BTIF_DM_CB_BONDING_STARTED, (char *)bd_addr, sizeof(bt_bdaddr_t), NULL);
+ btif_transfer_context(btif_dm_generic_evt, BTIF_DM_CB_CREATE_BOND,
+ (char *)bd_addr, sizeof(bt_bdaddr_t), NULL);
return BT_STATUS_SUCCESS;
}
@@ -1083,18 +1252,9 @@ bt_status_t btif_dm_remove_bond(const bt_bdaddr_t *bd_addr)
bdstr_t bdstr;
BTIF_TRACE_EVENT2("%s: bd_addr=%s", __FUNCTION__, bd2str((bt_bdaddr_t *)bd_addr, &bdstr));
+ btif_transfer_context(btif_dm_generic_evt, BTIF_DM_CB_REMOVE_BOND,
+ (char *)bd_addr, sizeof(bt_bdaddr_t), NULL);
- /* TODO: special handling for HID devices */
- if (BTA_DmRemoveDevice((UINT8 *)bd_addr->address) == BTA_SUCCESS)
- {
- BTIF_TRACE_DEBUG1("Successfully removed bonding with device: %s",
- bd2str((bt_bdaddr_t *)bd_addr, &bdstr));
-
- }
- else
- {
- return BT_STATUS_FAIL;
- }
return BT_STATUS_SUCCESS;
}
@@ -1259,7 +1419,7 @@ void btif_dm_execute_service_request(UINT16 event, char *p_param)
bt_property_t property;
bt_uuid_t local_uuids[BT_MAX_NUM_UUIDS];
/* Now send the UUID_PROPERTY_CHANGED event to the upper layer */
- BTIF_STORAGE_FILL_PROPERTY(&property, BT_PROPERTY_UUIDS,
+ BTIF_STORAGE_FILL_PROPERTY(&property, BT_PROPERTY_UUIDS,
sizeof(local_uuids), local_uuids);
btif_storage_get_adapter_property(&property);
HAL_CBACK(bt_hal_cbacks, adapter_properties_cb,
diff --git a/btif/src/btif_hh.c b/btif/src/btif_hh.c
new file mode 100644
index 0000000..cdc80f5
--- /dev/null
+++ b/btif/src/btif_hh.c
@@ -0,0 +1,1419 @@
+/************************************************************************************
+ *
+ * Copyright (C) 2009-2012 Broadcom Corporation
+ *
+ * This program is the proprietary software of Broadcom Corporation and/or its
+ * licensors, and may only be used, duplicated, modified or distributed
+ * pursuant to the terms and conditions of a separate, written license
+ * agreement executed between you and Broadcom (an "Authorized License").
+ * Except as set forth in an Authorized License, Broadcom grants no license
+ * (express or implied), right to use, or waiver of any kind with respect to
+ * the Software, and Broadcom expressly reserves all rights in and to the
+ * Software and all intellectual property rights therein.
+ * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS
+ * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE
+ * ALL USE OF THE SOFTWARE.
+ *
+ * Except as expressly set forth in the Authorized License,
+ *
+ * 1. This program, including its structure, sequence and organization,
+ * constitutes the valuable trade secrets of Broadcom, and you shall
+ * use all reasonable efforts to protect the confidentiality thereof,
+ * and to use this information only in connection with your use of
+ * Broadcom integrated circuit products.
+ *
+ * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED
+ * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES,
+ * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY,
+ * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY
+ * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY,
+ * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES,
+ * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR
+ * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT
+ * OF USE OR PERFORMANCE OF THE SOFTWARE.
+ *
+ * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR
+ * ITS LICENSORS BE LIABLE FOR
+ * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY
+ * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO
+ * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM
+ * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR
+ * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE
+ * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE
+ * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF
+ * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY.
+ *
+ ************************************************************************************/
+
+/************************************************************************************
+ *
+ * Filename: btif_hh.c
+ *
+ * Description: HID Host Profile Bluetooth Interface
+ *
+ *
+ ***********************************************************************************/
+#include <hardware/bluetooth.h>
+#include <hardware/bt_hh.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+
+#define LOG_TAG "BTIF_HH"
+
+#include "bta_api.h"
+#include "bta_hh_api.h"
+#include "bd.h"
+#include "btif_storage.h"
+
+
+
+
+
+#include "btif_common.h"
+#include "btif_util.h"
+#include "btif_hh.h"
+#include "gki.h"
+#include "l2c_api.h"
+
+
+#define BTIF_HH_APP_ID_MI 0x01
+#define BTIF_HH_APP_ID_KB 0x02
+
+#define COD_HID_KEYBOARD 0x0540
+#define COD_HID_POINTING 0x0580
+#define COD_HID_COMBO 0x05C0
+
+#define KEYSTATE_FILEPATH "/data/misc/bluedroid/bt_hh_ks" //keep this in sync with HID host jni
+
+#define HID_REPORT_CAPSLOCK 0x39
+#define HID_REPORT_NUMLOCK 0x53
+#define HID_REPORT_SCROLLLOCK 0x47
+
+#define MAX_KEYSTATES 3
+#define KEYSTATE_MASK_NUMLOCK 0x01
+#define KEYSTATE_MASK_CAPSLOCK 0x02
+#define KEYSTATE_MASK_SCROLLLOCK 0x04
+
+
+extern const int BT_UID;
+extern const int BT_GID;
+static int btif_hh_prev_keyevents=0; //The previous key events
+static int btif_hh_keylockstates=0; //The current key state of each key
+
+#define BTIF_HH_ID_1 0
+#define BTIF_HH_DEV_DISCONNECTED 3
+
+
+#ifndef BTUI_HH_SECURITY
+#define BTUI_HH_SECURITY (BTA_SEC_AUTHENTICATE | BTA_SEC_ENCRYPT)
+#endif
+
+#ifndef BTUI_HH_MOUSE_SECURITY
+#define BTUI_HH_MOUSE_SECURITY (BTA_SEC_NONE)
+#endif
+
+/* HH request events */
+typedef enum
+{
+ BTIF_HH_CONNECT_REQ_EVT = 0,
+ BTIF_HH_DISCONNECT_REQ_EVT
+} btif_hh_req_evt_t;
+
+
+/************************************************************************************
+** Constants & Macros
+************************************************************************************/
+#define BTIF_HH_SERVICES (BTA_HID_SERVICE_MASK)
+
+
+
+/************************************************************************************
+** Local type definitions
+************************************************************************************/
+
+/************************************************************************************
+** Static variables
+************************************************************************************/
+btif_hh_cb_t btif_hh_cb;
+static bthh_callbacks_t *bt_hh_callbacks = NULL;
+
+#define CHECK_BTHH_INIT() if (bt_hh_callbacks == NULL)\
+ {\
+ BTIF_TRACE_WARNING1("BTHH: %s: BTHH not initialized", __FUNCTION__);\
+ return BT_STATUS_NOT_READY;\
+ }\
+ else\
+ {\
+ BTIF_TRACE_EVENT1("BTHH: %s", __FUNCTION__);\
+ }
+
+
+
+/************************************************************************************
+** Static functions
+************************************************************************************/
+
+/************************************************************************************
+** Externs
+************************************************************************************/
+
+extern bt_status_t btif_dm_remove_bond(const bt_bdaddr_t *bd_addr);
+extern void bta_hh_co_send_hid_info(btif_hh_device_t *p_dev, char *dev_name, UINT16 vendor_id,
+ UINT16 product_id, UINT16 version, UINT8 ctry_code,
+ int dscp_len, UINT8 *p_dscp);
+extern BOOLEAN check_cod(const bt_bdaddr_t *remote_bdaddr, uint32_t cod);
+
+extern int scru_ascii_2_hex(char *p_ascii, int len, UINT8 *p_hex);
+
+/************************************************************************************
+** Functions
+************************************************************************************/
+/*******************************************************************************
+**
+** Function btif_hh_find_dev_by_handle
+**
+** Description Return the device pointer of the specified device handle
+**
+** Returns Device entry pointer in the device table
+*******************************************************************************/
+static btif_hh_device_t *btif_hh_find_dev_by_handle(UINT8 handle)
+{
+ UINT32 i;
+ // LOGV("%s: handle = %d", __FUNCTION__, handle);
+ for (i = 0; i < BTIF_HH_MAX_HID; i++) {
+ if (btif_hh_cb.devices[i].dev_status != BTHH_CONN_STATE_UNKNOWN &&
+ btif_hh_cb.devices[i].dev_handle == handle)
+ {
+ return &btif_hh_cb.devices[i];
+ }
+ }
+ return NULL;
+}
+
+
+/*******************************************************************************
+**
+** Function btif_hh_find_connected_dev_by_handle
+**
+** Description Return the connected device pointer of the specified device handle
+**
+** Returns Device entry pointer in the device table
+*******************************************************************************/
+btif_hh_device_t *btif_hh_find_connected_dev_by_handle(UINT8 handle)
+{
+ UINT32 i;
+ BTIF_TRACE_WARNING2("%s: handle = %d", __FUNCTION__, handle);
+ for (i = 0; i < BTIF_HH_MAX_HID; i++) {
+ if (btif_hh_cb.devices[i].dev_status == BTHH_CONN_STATE_CONNECTED &&
+ btif_hh_cb.devices[i].dev_handle == handle)
+ {
+ return &btif_hh_cb.devices[i];
+ }
+ }
+ return NULL;
+}
+
+/*******************************************************************************
+**
+** Function btif_hh_find_dev_by_bda
+**
+** Description Return the device pointer of the specified bt_bdaddr_t.
+**
+** Returns Device entry pointer in the device table
+*******************************************************************************/
+static btif_hh_device_t *btif_hh_find_dev_by_bda(bt_bdaddr_t *bd_addr)
+{
+ UINT32 i;
+ BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ for (i = 0; i < BTIF_HH_MAX_HID; i++) {
+ if (btif_hh_cb.devices[i].dev_status != BTHH_CONN_STATE_UNKNOWN &&
+ memcmp(&(btif_hh_cb.devices[i].bd_addr), bd_addr, BD_ADDR_LEN) == 0)
+ {
+ return &btif_hh_cb.devices[i];
+ }
+ }
+ return NULL;
+}
+
+/*******************************************************************************
+**
+** Function btif_hh_find_connected_dev_by_bda
+**
+** Description Return the connected device pointer of the specified bt_bdaddr_t.
+**
+** Returns Device entry pointer in the device table
+*******************************************************************************/
+static btif_hh_device_t *btif_hh_find_connected_dev_by_bda(bt_bdaddr_t *bd_addr)
+{
+ UINT32 i;
+ BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ for (i = 0; i < BTIF_HH_MAX_HID; i++) {
+ if (btif_hh_cb.devices[i].dev_status == BTHH_CONN_STATE_CONNECTED &&
+ memcmp(&(btif_hh_cb.devices[i].bd_addr), bd_addr, BD_ADDR_LEN) == 0)
+ {
+ return &btif_hh_cb.devices[i];
+ }
+ }
+ return NULL;
+}
+
+static void btif_hh_update_keyboard_lockstates(btif_hh_device_t *p_dev)
+{
+ UINT8 len = 2; //reportid + 1 byte report
+}
+
+/*******************************************************************************
+**
+** Function btif_hh_update_keyevents
+**
+** Description Called by bta_co_hh.c when a key with a
+** lock state is pressed OR released.
+**
+** Returns void
+*******************************************************************************/
+void btif_hh_update_keyevents(UINT8 dev_handle, int keyevents)
+{
+ int keys_pressed_released;
+
+ BTIF_TRACE_DEBUG4("%s, dev_handle %d, previous keyevents 0x%x, current keyevents 0x%x",
+ __FUNCTION__, dev_handle, btif_hh_prev_keyevents,keyevents);
+
+ //Determines which keys have been pressed and released
+ //Bit set ==> key pressed
+ //Bit unset ==> key no longer pressed
+ //A key was pressed and released if bit from previous event was set
+ //And current bit is not set. We detect this by bitwise anding prev
+ //key event with the XOR of prev keyevents and the current key events.
+ keys_pressed_released = (btif_hh_prev_keyevents) &
+ (btif_hh_prev_keyevents ^ keyevents);
+ BTIF_TRACE_DEBUG2("%s, keys_pressed_released 0x%x", __FUNCTION__,keys_pressed_released);
+
+ //Set the prev_keyevents to the most recent key events.
+ btif_hh_prev_keyevents = keyevents;
+
+
+ if (keys_pressed_released)
+ {
+ //Determine state of the keys. (Caps/num/scroll engaged or not)
+ btif_hh_keylockstates = btif_hh_keylockstates ^ keys_pressed_released;
+
+ BTIF_TRACE_WARNING3("%s, keys_pressed_released 0x%x, btif_hh_keylockstates 0x%x",
+ __FUNCTION__,keys_pressed_released,btif_hh_keylockstates);
+
+ // btapp_hh_write_keylockstates();
+ // btapp_hh_update_all_keyboard_lockstates();
+ }
+}
+
+/*******************************************************************************
+**
+** Function btif_hh_add_added_dev
+**
+** Description Add a new device to the added device list.
+**
+** Returns TRUE if add successfully, otherwise FALSE.
+*******************************************************************************/
+BOOLEAN btif_hh_add_added_dev(bt_bdaddr_t bda, tBTA_HH_ATTR_MASK attr_mask)
+{
+ int i;
+ for (i = 0; i < BTIF_HH_MAX_ADDED_DEV; i++) {
+ if (memcmp(&(btif_hh_cb.added_devices[i].bd_addr), &bda, BD_ADDR_LEN) == 0) {
+ BTIF_TRACE_WARNING6(" Device %02X:%02X:%02X:%02X:%02X:%02X already added",
+ bda.address[0], bda.address[1], bda.address[2], bda.address[3], bda.address[4], bda.address[5]);
+ return FALSE;
+ }
+ }
+ for (i = 0; i < BTIF_HH_MAX_ADDED_DEV; i++) {
+ if (btif_hh_cb.added_devices[i].bd_addr.address[0] == 0 &&
+ btif_hh_cb.added_devices[i].bd_addr.address[1] == 0 &&
+ btif_hh_cb.added_devices[i].bd_addr.address[2] == 0 &&
+ btif_hh_cb.added_devices[i].bd_addr.address[3] == 0 &&
+ btif_hh_cb.added_devices[i].bd_addr.address[4] == 0 &&
+ btif_hh_cb.added_devices[i].bd_addr.address[5] == 0)
+ {
+ BTIF_TRACE_WARNING6(" Added device %02X:%02X:%02X:%02X:%02X:%02X",
+ bda.address[0], bda.address[1], bda.address[2], bda.address[3], bda.address[4], bda.address[5]);
+ memcpy(&(btif_hh_cb.added_devices[i].bd_addr), &bda, BD_ADDR_LEN);
+ btif_hh_cb.added_devices[i].dev_handle = BTA_HH_INVALID_HANDLE;
+ btif_hh_cb.added_devices[i].attr_mask = attr_mask;
+ return TRUE;
+ }
+ }
+
+ BTIF_TRACE_WARNING1("%s: Error, out of space to add device",__FUNCTION__);
+ return FALSE;
+}
+
+/*******************************************************************************
+ **
+ ** Function btif_hh_remove_device
+ **
+ ** Description Remove an added device from the stack.
+ **
+ ** Returns void
+ *******************************************************************************/
+void btif_hh_remove_device(bt_bdaddr_t bd_addr)
+{
+ int i;
+ btif_hh_device_t *p_dev;
+ btif_hh_added_device_t *p_added_dev;
+
+ LOGI("%s: bda = %02x:%02x:%02x:%02x:%02x:%02x", __FUNCTION__,
+ bd_addr.address[0], bd_addr.address[1], bd_addr.address[2], bd_addr.address[3], bd_addr.address[4], bd_addr.address[5]);
+
+ for (i = 0; i < BTIF_HH_MAX_ADDED_DEV; i++) {
+ p_added_dev = &btif_hh_cb.added_devices[i];
+ if (memcmp(&(p_added_dev->bd_addr),&bd_addr, 6) == 0) {
+ BTA_HhRemoveDev(p_added_dev->dev_handle);
+
+ memset(&(p_added_dev->bd_addr), 0, 6);
+ p_added_dev->dev_handle = BTA_HH_INVALID_HANDLE;
+ break;
+ }
+ }
+
+ p_dev = btif_hh_find_dev_by_bda(&bd_addr);
+ if (p_dev == NULL) {
+ BTIF_TRACE_WARNING6(" Oops, can't find device [%02x:%02x:%02x:%02x:%02x:%02x]",
+ bd_addr.address[0], bd_addr.address[1], bd_addr.address[2], bd_addr.address[3], bd_addr.address[4], bd_addr.address[5]);
+ return;
+ }
+
+ p_dev->dev_status = BTIF_HH_DEV_UNKNOWN;
+ p_dev->dev_handle = BTA_HH_INVALID_HANDLE;
+ if (btif_hh_cb.device_num > 0) {
+ btif_hh_cb.device_num--;
+ }
+ else {
+ BTIF_TRACE_WARNING1("%s: device_num = 0", __FUNCTION__);
+ }
+ if (p_dev->p_buf != NULL) {
+ GKI_freebuf(p_dev->p_buf);
+ p_dev->p_buf = NULL;
+ }
+
+#if (defined(HH_USE_BTHID) && (HH_USE_BTHID == TRUE))
+ BTIF_TRACE_DEBUG2("%s: bthid fd = %d", __FUNCTION__, p_dev->fd);
+ if (p_dev->fd >= 0) {
+ close(p_dev->fd);
+ p_dev->fd = -1;
+ }
+#endif /* (defined(HH_USE_BTHID) && (HH_USE_BTHID == TRUE)) */
+}
+
+
+BOOLEAN btif_hh_copy_hid_info(tBTA_HH_DEV_DSCP_INFO* dest , tBTA_HH_DEV_DSCP_INFO* src)
+{
+ dest->descriptor.dl_len = 0;
+ if (src->descriptor.dl_len >0)
+ {
+ dest->descriptor.dsc_list = (UINT8 *) GKI_getbuf(src->descriptor.dl_len);
+ if (dest->descriptor.dsc_list == NULL)
+ {
+ BTIF_TRACE_WARNING1("%s: Failed to allocate DSCP for CB", __FUNCTION__);
+ return FALSE;
+ }
+ }
+ memcpy(dest->descriptor.dsc_list, src->descriptor.dsc_list, src->descriptor.dl_len);
+ dest->descriptor.dl_len = src->descriptor.dl_len;
+ dest->vendor_id = src->vendor_id;
+ dest->product_id = src->product_id;
+ dest->version = src->version;
+ dest->ctry_code = src->ctry_code;
+ return TRUE;
+}
+
+/*******************************************************************************
+ **
+ ** Function btif_hh_mouse_pairing
+ **
+ ** Description btif_dm uses this method to inform btif_hh that the mouse
+ ** did fake pairing. A mouse is virtually plugged (paired)
+ ** dircetly by connecting. If the connection is failed, we need
+ ** remove the bonding.
+ ** Returns void
+ *******************************************************************************/
+void btif_hh_mouse_pairing(bt_bdaddr_t bd_addr)
+{
+ BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ if (btif_hh_cb.status != BTIF_HH_ENABLED) {
+ BTIF_TRACE_ERROR2("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status);
+ return;
+ }
+
+ btif_hh_cb.mouse_pairing = TRUE;
+ memcpy(&(btif_hh_cb.mouse_pairing_bda), &bd_addr, BD_ADDR_LEN);
+}
+
+
+/*******************************************************************************
+ **
+ ** Function btif_hh_clear_mouse_pairing
+ **
+ ** Description btif_dm uses this method to check whether device disconnected
+ ** is perform pairing. If yes, remove the bonding.
+ ** Returns void
+ *******************************************************************************/
+void btif_hh_clear_mouse_pairing(bt_bdaddr_t bd_addr)
+{
+ BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ if (btif_hh_cb.mouse_pairing) {
+ BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ if (memcmp(&(btif_hh_cb.mouse_pairing_bda), &bd_addr, BD_ADDR_LEN) == 0) {
+ btif_hh_cb.mouse_pairing = FALSE;
+ //TODO: Send signal
+ // SIG_HH_VUP
+ }
+ }
+}
+
+/*****************************************************************************
+** Section name (Group of functions)
+*****************************************************************************/
+
+/*****************************************************************************
+**
+** btif hh api functions (no context switch)
+**
+*****************************************************************************/
+
+
+/*******************************************************************************
+**
+** Function btif_hh_upstreams_evt
+**
+** Description Executes HH UPSTREAMS events in btif context
+**
+** Returns void
+**
+*******************************************************************************/
+static void btif_hh_upstreams_evt(UINT16 event, char* p_param)
+{
+ tBTA_HH *p_data = (tBTA_HH *)p_param;
+ bdstr_t bdstr;
+ btif_hh_device_t *p_dev = NULL;
+ int len;
+
+ BTIF_TRACE_DEBUG2("%s: event=%s", __FUNCTION__, dump_hh_event(event));
+
+ switch (event)
+ {
+ case BTA_HH_ENABLE_EVT:
+ BTIF_TRACE_DEBUG2("%s: BTA_HH_ENABLE_EVT: status =%d",__FUNCTION__, p_data->status);
+ if (p_data->status == BTA_HH_OK) {
+ btif_hh_cb.status = BTIF_HH_ENABLED;
+ BTIF_TRACE_DEBUG1("%s--Loading added devices",__FUNCTION__);
+ //TODO:
+ //btif_storage_load_bonded_hid_info();
+ }
+ else {
+ btif_hh_cb.status = BTIF_HH_DISABLED;
+ BTIF_TRACE_WARNING1("BTA_HH_ENABLE_EVT: Error, HH enabling failed, status = %d", p_data->status);
+ }
+ break;
+
+ case BTA_HH_DISABLE_EVT:
+ btif_hh_cb.status = BTIF_HH_DISABLED;
+ if (p_data->status != BTA_HH_OK) {
+ BTIF_TRACE_WARNING1("BTA_HH_DISABLE_EVT: Error, HH disabling failed, status = %d", p_data->status);
+ }
+ break;
+
+ case BTA_HH_OPEN_EVT:
+ BTIF_TRACE_WARNING3("%s: BTA_HH_OPN_EVT: handle=%d, status =%d",__FUNCTION__, p_data->conn.handle, p_data->conn.status);
+ if (p_data->conn.status == BTA_HH_OK) {
+ p_dev = btif_hh_find_connected_dev_by_handle(p_data->conn.handle);
+ if (p_dev == NULL) {
+ BTIF_TRACE_WARNING1("BTA_HH_OPEN_EVT: Error, cannot find device with handle %d", p_data->conn.handle);
+
+ // The connect request must come from device side and exceeded the connected
+ // HID device number.
+ BTA_HhClose(p_data->conn.handle);
+ HAL_CBACK(bt_hh_callbacks, connection_state_cb, (bt_bdaddr_t*) &p_data->conn.bda,BTHH_CONN_STATE_DISCONNECTED);
+ }
+ else if (p_dev->fd < 0) {
+ BTIF_TRACE_WARNING0("BTA_HH_OPEN_EVT: Error, failed to find the bthid driver...");
+ BTA_HhClose(p_data->conn.handle);
+ p_dev->dev_status = BTHH_CONN_STATE_FAILED_NO_BTHID_DRIVER;
+ HAL_CBACK(bt_hh_callbacks, connection_state_cb,&(p_dev->bd_addr), p_dev->dev_status);
+ if (btif_hh_cb.mouse_pairing &&
+ memcmp(&(btif_hh_cb.mouse_pairing_bda), p_data->conn.bda, BD_ADDR_LEN) == 0){
+ BTIF_TRACE_DEBUG0("OPEN_EVT: Mouse pairing");
+ // VUP the device
+ btif_hh_cb.mouse_pairing = FALSE;
+ //BTA_HhSendCtrl(p_dev->dev_handle, BTA_HH_CTRL_VIRTUAL_CABLE_UNPLUG);
+ }
+ }
+ else {
+ BTIF_TRACE_WARNING1("BTA_HH_OPEN_EVT: Found device...Getting dscp info for handle ... %d",p_data->conn.handle);
+ memcpy(&(p_dev->bd_addr), p_data->conn.bda, BD_ADDR_LEN);
+ //BTA_HhSetIdle(p_data->conn.handle, 0);
+ btif_hh_cb.p_curr_dev = btif_hh_find_connected_dev_by_handle(p_data->conn.handle);
+ BTA_HhGetDscpInfo(p_data->conn.handle);
+ p_dev->dev_status = BTHH_CONN_STATE_CONNECTED;
+ HAL_CBACK(bt_hh_callbacks, connection_state_cb,&(p_dev->bd_addr), p_dev->dev_status);
+ if (btif_hh_cb.mouse_pairing &&
+ memcmp(&(btif_hh_cb.mouse_pairing_bda), p_data->conn.bda, BD_ADDR_LEN) == 0){
+ btif_hh_cb.mouse_pairing = FALSE;
+ }
+ }
+ }
+ else {
+ bt_bdaddr_t *bdaddr = (bt_bdaddr_t*)p_data->conn.bda;
+ HAL_CBACK(bt_hh_callbacks, connection_state_cb, (bt_bdaddr_t*) &p_data->conn.bda,BTHH_CONN_STATE_DISCONNECTED);
+ if (btif_hh_cb.mouse_pairing &&
+ memcmp(&(btif_hh_cb.mouse_pairing_bda), p_data->conn.bda, BD_ADDR_LEN) == 0)
+ {
+ BTIF_TRACE_WARNING0("BTA_HH_OPEN_EVT: Mouse paired but connectio failed. Remove bonding...");
+ btif_hh_cb.mouse_pairing = FALSE;
+ //TODO remove bonding
+ //btif_dm_cb_remove_bond(bdaddr);
+ HAL_CBACK(bt_hh_callbacks, virtual_unplug_cb,bdaddr,BTHH_CONN_STATE_DISCONNECTED);
+ }
+ }
+ break;
+ case BTA_HH_CLOSE_EVT:
+ BTIF_TRACE_DEBUG2("BTA_HH_CLOSE_EVT: status = %d, handle = %d",
+ p_data->dev_status.status, p_data->dev_status.handle);
+ p_dev = btif_hh_find_connected_dev_by_handle(p_data->dev_status.handle);
+ if (p_dev != NULL) {
+#if (defined(HH_USE_BTHID) && (HH_USE_BTHID == TRUE))
+ BTIF_TRACE_DEBUG2("%s: bthid fd = %d", __FUNCTION__, p_dev->fd);
+ if (p_dev->fd >= 0){
+ UINT8 hidreport[9];
+ memset(hidreport,0,9);
+ hidreport[0]=1;
+ write(p_dev->fd, hidreport, 9);
+ }
+#endif
+ p_dev->dev_status = BTHH_CONN_STATE_DISCONNECTED;
+ HAL_CBACK(bt_hh_callbacks, connection_state_cb,&(p_dev->bd_addr), p_dev->dev_status);
+ BTIF_TRACE_DEBUG2("%s: Closing bthid.ko fd = %d", __FUNCTION__, p_dev->fd);
+ close(p_dev->fd);
+ p_dev->fd = -1;
+ }
+ else {
+ BTIF_TRACE_WARNING1("Error: cannot find device with handle %d", p_data->dev_status.handle);
+ }
+ break;
+ case BTA_HH_GET_RPT_EVT:
+ BTIF_TRACE_DEBUG2("BTA_HH_GET_RPT_EVT: status = %d, handle = %d",
+ p_data->hs_data.status, p_data->hs_data.handle);
+ break;
+
+ case BTA_HH_SET_RPT_EVT:
+ BTIF_TRACE_DEBUG2("BTA_HH_SET_RPT_EVT: status = %d, handle = %d",
+ p_data->dev_status.status, p_data->dev_status.handle);
+ p_dev = btif_hh_find_connected_dev_by_handle(p_data->dev_status.handle);
+ if (p_dev != NULL && p_dev->p_buf != NULL) {
+ BTIF_TRACE_DEBUG0("Freeing buffer..." );
+ GKI_freebuf(p_dev->p_buf);
+ p_dev->p_buf = NULL;
+ }
+ break;
+
+ case BTA_HH_GET_PROTO_EVT:
+ BTIF_TRACE_WARNING4("BTA_HH_GET_PROTO_EVT: status = %d, handle = %d, proto = [%d], %s",
+ p_data->hs_data.status, p_data->hs_data.handle,
+ p_data->hs_data.rsp_data.proto_mode,
+ (p_data->hs_data.rsp_data.proto_mode == BTA_HH_PROTO_RPT_MODE) ? "Report Mode" :
+ (p_data->hs_data.rsp_data.proto_mode == BTA_HH_PROTO_BOOT_MODE) ? "Boot Mode" : "Unsupported");
+ break;
+
+ case BTA_HH_SET_PROTO_EVT:
+ BTIF_TRACE_DEBUG2("BTA_HH_SET_PROTO_EVT: status = %d, handle = %d",
+ p_data->dev_status.status, p_data->dev_status.handle);
+ break;
+ /*
+ case BTA_HH_GET_IDLE_EVT:
+ BTIF_TRACE_DEBUG3("BTA_HH_GET_IDLE_EVT: handle = %d, status = %d, rate = %d",
+ p_data->hs_data.handle, p_data->hs_data.status,
+ p_data->hs_data.rsp_data.idle_rate);
+ break;
+
+ case BTA_HH_SET_IDLE_EVT:
+ BTIF_TRACE_DEBUG2("BTA_HH_SET_IDLE_EVT: status = %d, handle = %d",
+ p_data->dev_status.status, p_data->dev_status.handle);
+ btif_hh_cb.p_curr_dev = btif_hh_find_connected_dev_by_handle(p_data->dev_status.handle);
+ BTA_HhGetDscpInfo(p_data->dev_status.handle);
+ break;
+ */
+
+ case BTA_HH_GET_DSCP_EVT:
+ BTIF_TRACE_WARNING2("BTA_HH_GET_DSCP_EVT: status = %d, handle = %d",
+ p_data->dev_status.status, p_data->dev_status.handle);
+ len = p_data->dscp_info.descriptor.dl_len;
+ BTIF_TRACE_DEBUG1("BTA_HH_GET_DSCP_EVT: len = %d", len);
+ p_dev = btif_hh_cb.p_curr_dev;
+ if (p_dev == NULL) {
+ BTIF_TRACE_ERROR0("BTA_HH_GET_DSCP_EVT: No HID device is currently connected");
+ return;
+ }
+
+#if (defined(HH_USE_BTHID) && (HH_USE_BTHID == TRUE))
+ if (p_dev->fd < 0) {
+ LOGE("BTA_HH_GET_DSCP_EVT: Error, failed to find the bthid driver...");
+ return;
+ }
+#endif
+ {
+ char *cached_name = NULL;
+ char name[] = "Broadcom Bluetooth HID";
+ if (cached_name == NULL) {
+ cached_name = name;
+ }
+
+ BTIF_TRACE_WARNING2("%s: name = %s", __FUNCTION__, cached_name);
+
+ bta_hh_co_send_hid_info(p_dev, cached_name,
+ p_data->dscp_info.vendor_id, p_data->dscp_info.product_id,
+ p_data->dscp_info.version, p_data->dscp_info.ctry_code,
+ len, p_data->dscp_info.descriptor.dsc_list);
+ if (btif_hh_add_added_dev(p_dev->bd_addr, p_dev->attr_mask)) {
+ BD_ADDR bda;
+ bdcpy(bda, p_dev->bd_addr.address);
+ tBTA_HH_DEV_DSCP_INFO dscp_info;
+ bt_status_t ret;
+ bdcpy(bda, p_dev->bd_addr.address);
+ btif_hh_copy_hid_info(&dscp_info, &p_data->dscp_info);
+ BTIF_TRACE_DEBUG6("BTA_HH_GET_DSCP_EVT:bda = %02x:%02x:%02x:%02x:%02x:%02x",
+ p_dev->bd_addr.address[0], p_dev->bd_addr.address[1], p_dev->bd_addr.address[2],
+ p_dev->bd_addr.address[3], p_dev->bd_addr.address[4], p_dev->bd_addr.address[5]);
+
+ BTIF_TRACE_DEBUG6("BTA_HH_GET_DSCP_EVT:bda2 = %02x:%02x:%02x:%02x:%02x:%02x",
+ bda[0], bda[1], bda[2],
+ bda[3], bda[4], bda[5]);
+
+ BTIF_TRACE_WARNING0("BTA_HH_GET_DSCP_EVT: Calling add device");
+ BTIF_TRACE_WARNING1("BTA_HH_GET_DSCP_EVT: attr_mask %d", p_dev->attr_mask);
+ BTIF_TRACE_WARNING1("BTA_HH_GET_DSCP_EVT: sub_class %d", p_dev->sub_class);
+ BTIF_TRACE_WARNING1("BTA_HH_GET_DSCP_EVT: app_id %d", p_dev->app_id);
+ BTIF_TRACE_WARNING2("BTA_HH_GET_DSCP_EVT:desc_len=%d, dscp_info %d",len,&dscp_info);
+ BTIF_TRACE_DEBUG4("BTA_HH_GET_DSCP_EVT:country_code=%d,dscp_len=%d,version_id=%d,product_id=%d",
+ dscp_info.ctry_code,
+ dscp_info.descriptor.dl_len,
+ dscp_info.vendor_id,dscp_info.product_id);
+ BTA_HhAddDev(bda, p_dev->attr_mask,p_dev->sub_class,p_dev->app_id, dscp_info);
+ //TODO write hid info to nvram
+ /*
+ ret = btif_storage_add_hid_device_info(&(p_dev->bd_addr), p_dev->attr_mask,p_dev->sub_class,p_dev->app_id,
+ p_data->dscp_info.vendor_id, p_data->dscp_info.product_id,
+ p_data->dscp_info.version, p_data->dscp_info.ctry_code,
+ len, p_data->dscp_info.descriptor.dsc_list);
+
+ ASSERTC(ret == BT_STATUS_SUCCESS, "storing hid info failed", ret);*/
+ BTIF_TRACE_WARNING0("BTA_HH_GET_DSCP_EVT: Called add device");
+
+ //Free buffer created for dscp_info;
+ if (dscp_info.descriptor.dl_len >0 && dscp_info.descriptor.dsc_list != NULL)
+ {
+ GKI_freebuf(dscp_info.descriptor.dsc_list);
+ dscp_info.descriptor.dsc_list = NULL;
+ dscp_info.descriptor.dl_len=0;
+ }
+
+
+
+ //TODO:SEND hid info signal
+ //Sync HID Keyboard lockstates
+ // btif_hh_sync_lockstate_reconnect(p_dev);
+ //End Sync HID Keyboard lockstates
+ }
+ else {
+ //Device already added.
+ BTIF_TRACE_WARNING1("%s: Device already added ",__FUNCTION__);
+ }
+ }
+ break;
+
+ case BTA_HH_ADD_DEV_EVT:
+ BTIF_TRACE_WARNING2("BTA_HH_ADD_DEV_EVT: status = %d, handle = %d",p_data->dev_info.status, p_data->dev_info.handle);
+ int i;
+ for (i = 0; i < BTIF_HH_MAX_ADDED_DEV; i++) {
+ if (memcmp(btif_hh_cb.added_devices[i].bd_addr.address, p_data->dev_info.bda, 6) == 0) {
+ if (p_data->dev_info.status == BTA_HH_OK) {
+ btif_hh_cb.added_devices[i].dev_handle = p_data->dev_info.handle;
+ }
+ else {
+ memset(btif_hh_cb.added_devices[i].bd_addr.address, 0, 6);
+ btif_hh_cb.added_devices[i].dev_handle = BTA_HH_INVALID_HANDLE;
+ }
+ break;
+ }
+ }
+ break;
+ case BTA_HH_RMV_DEV_EVT:
+ BTIF_TRACE_DEBUG2("BTA_HH_RMV_DEV_EVT: status = %d, handle = %d",
+ p_data->dev_info.status, p_data->dev_info.handle);
+ BTIF_TRACE_DEBUG6("BTA_HH_RMV_DEV_EVT:bda = %02x:%02x:%02x:%02x:%02x:%02x",
+ p_data->dev_info.bda[0], p_data->dev_info.bda[1], p_data->dev_info.bda[2],
+ p_data->dev_info.bda[3], p_data->dev_info.bda[4], p_data->dev_info.bda[5]);
+ break;
+
+ case BTA_HH_VC_UNPLUG_EVT:
+ LOGI("BTA_HH_VC_UNPLUG_EVT: status = %d, handle = %d",
+ p_data->dev_status.status, p_data->dev_status.handle);
+ p_dev = btif_hh_find_connected_dev_by_handle(p_data->dev_status.handle);
+ if (p_dev != NULL) {
+ //TODO:
+ //SEND COnnection signal and VUP signal
+ if (btif_hh_cb.mouse_pairing &&
+ memcmp(&(btif_hh_cb.mouse_pairing_bda), &(p_dev->bd_addr), BD_ADDR_LEN) == 0)
+ {
+ btif_hh_cb.mouse_pairing = FALSE;
+ }
+ }
+ break;
+
+ case BTA_HH_API_ERR_EVT :
+ LOGI("BTA_HH API_ERR");
+ break;
+
+
+
+ default:
+ BTIF_TRACE_WARNING2("%s: Unhandled event: %d", __FUNCTION__, event);
+ break;
+ }
+}
+
+/*******************************************************************************
+**
+** Function bte_hh_evt
+**
+** Description Switches context from BTE to BTIF for all HH events
+**
+** Returns void
+**
+*******************************************************************************/
+
+static void bte_hh_evt(tBTA_HH_EVT event, tBTA_HH *p_data)
+{
+ bt_status_t status;
+ int param_len = 0;
+
+ if (BTA_HH_ENABLE_EVT == event)
+ param_len = sizeof(tBTA_HH_STATUS);
+ else if (BTA_HH_OPEN_EVT == event)
+ param_len = sizeof(tBTA_HH_CONN);
+ else if (BTA_HH_DISABLE_EVT == event)
+ param_len = sizeof(tBTA_HH_STATUS);
+ else if (BTA_HH_CLOSE_EVT == event)
+ param_len = sizeof(tBTA_HH_CBDATA);
+ else if (BTA_HH_GET_DSCP_EVT == event)
+ param_len = sizeof(tBTA_HH_DEV_DSCP_INFO);
+ else if ((BTA_HH_GET_PROTO_EVT == event) || (BTA_HH_GET_RPT_EVT == event) )//|| (BTA_HH_GET_IDLE_EVT == event))
+ param_len = sizeof(tBTA_HH_HSDATA);
+ else if ((BTA_HH_SET_PROTO_EVT == event) || (BTA_HH_SET_RPT_EVT == event) || (BTA_HH_VC_UNPLUG_EVT == event)) //|| (BTA_HH_SET_IDLE_EVT == event))
+ param_len = sizeof(tBTA_HH_CBDATA);
+ else if ((BTA_HH_ADD_DEV_EVT == event) || (BTA_HH_RMV_DEV_EVT == event) )
+ param_len = sizeof(tBTA_HH_DEV_INFO);
+ else if (BTA_HH_API_ERR_EVT == event)
+ param_len = 0;
+ /* switch context to btif task context (copy full union size for convenience) */
+ status = btif_transfer_context(btif_hh_upstreams_evt, (uint16_t)event, (void*)p_data, param_len, NULL);
+
+ /* catch any failed context transfers */
+ ASSERTC(status == BT_STATUS_SUCCESS, "context transfer failed", status);
+}
+
+/*******************************************************************************
+**
+** Function btif_hh_handle_evt
+**
+** Description Switches context for immediate callback
+**
+** Returns void
+**
+*******************************************************************************/
+
+static void btif_hh_handle_evt(UINT16 event, char *p_param)
+{
+ bt_bdaddr_t *bd_addr = (bt_bdaddr_t*)p_param;
+ BTIF_TRACE_EVENT2("%s: event=%d", __FUNCTION__, event);
+ switch(event)
+ {
+ case BTIF_HH_CONNECT_REQ_EVT:
+ {
+ HAL_CBACK(bt_hh_callbacks, connection_state_cb,bd_addr,BTHH_CONN_STATE_CONNECTING);
+ }
+ break;
+ case BTIF_HH_DISCONNECT_REQ_EVT:
+ {
+ BTIF_TRACE_EVENT2("%s: event=%d", __FUNCTION__, event);
+ HAL_CBACK(bt_hh_callbacks, connection_state_cb,bd_addr,BTHH_CONN_STATE_DISCONNECTING);
+ }
+ break;
+
+ default:
+ {
+ BTIF_TRACE_WARNING2("%s : Unknown event 0x%x", __FUNCTION__, event);
+ }
+ break;
+ }
+}
+
+
+/*******************************************************************************
+**
+** Function btif_hh_init
+**
+** Description initializes the hh interface
+**
+** Returns bt_status_t
+**
+*******************************************************************************/
+static bt_status_t init( bthh_callbacks_t* callbacks )
+{
+ UINT32 i;
+ BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+
+ bt_hh_callbacks = callbacks;
+ memset(&btif_hh_cb, 0, sizeof(btif_hh_cb));
+ for (i = 0; i < BTIF_HH_MAX_HID; i++){
+ btif_hh_cb.devices[i].dev_status = BTHH_CONN_STATE_UNKNOWN;
+ }
+ /* Invoke the enable service API to the core to set the appropriate service_id */
+ btif_enable_service(BTA_HID_SERVICE_ID);
+ return BT_STATUS_SUCCESS;
+}
+
+/*******************************************************************************
+**
+** Function connect
+**
+** Description connect to hid device
+**
+** Returns bt_status_t
+**
+*******************************************************************************/
+static bt_status_t connect( bt_bdaddr_t *bd_addr)
+{
+ btif_hh_device_t *dev;
+ btif_hh_added_device_t *added_dev = NULL;
+ char bda_str[20];
+ int i;
+ BD_ADDR *bda = (BD_ADDR*)bd_addr;
+ tBTA_HH_CONN conn;
+ CHECK_BTHH_INIT();
+ BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ dev = btif_hh_find_dev_by_bda(bd_addr);
+ sprintf(bda_str, "%02X:%02X:%02X:%02X:%02X:%02X",
+ (*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
+ if (dev == NULL && btif_hh_cb.device_num >= BTIF_HH_MAX_HID) {
+ // No space for more HID device now.
+ BTIF_TRACE_WARNING2("%s: Error, exceeded the maximum supported HID device number %d",
+ __FUNCTION__, BTIF_HH_MAX_HID);
+ return BT_STATUS_FAIL;
+ }
+
+ for (i = 0; i < BTIF_HH_MAX_ADDED_DEV; i++) {
+ if (memcmp(&(btif_hh_cb.added_devices[i].bd_addr), bd_addr, BD_ADDR_LEN) == 0) {
+ added_dev = &btif_hh_cb.added_devices[i];
+ BTIF_TRACE_WARNING3("%s: Device %s already added, attr_mask = 0x%x",
+ __FUNCTION__, bda_str, added_dev->attr_mask);
+ }
+ }
+
+ if (added_dev != NULL) {
+ if (added_dev->dev_handle == BTA_HH_INVALID_HANDLE) {
+ // No space for more HID device now.
+ LOGE("%s: Error, device %s added but addition failed", __FUNCTION__, bda_str);
+ memset(&(added_dev->bd_addr), 0, 6);
+ added_dev->dev_handle = BTA_HH_INVALID_HANDLE;
+ return BT_STATUS_FAIL;
+ }
+ }
+ if (added_dev == NULL ||
+ (added_dev->attr_mask & HID_NORMALLY_CONNECTABLE) != 0 ||
+ (added_dev->attr_mask & HID_RECONN_INIT) == 0)
+ {
+ tBTA_SEC sec_mask = BTUI_HH_SECURITY;
+ if (check_cod(bd_addr, COD_HID_POINTING)){
+ sec_mask = BTUI_HH_MOUSE_SECURITY;
+ }
+ BTA_HhOpen(*bda, BTA_HH_PROTO_RPT_MODE, sec_mask);
+ //return BT_STATUS_SUCCESS;
+ return btif_transfer_context(btif_hh_handle_evt, BTIF_HH_CONNECT_REQ_EVT,
+ (char*)bd_addr, sizeof(bt_bdaddr_t), NULL);
+ }
+ else {
+ // This device shall be connected from the host side.
+ LOGI("%s: Error, device %s can only be reconnected from device side",
+ __FUNCTION__, bda_str);
+ //TODO
+ /* if ((remote_class & BT_DEV_CLASS_MASK) == BT_DEV_CLASS_HID_POINTING) {
+ //SIG_HH_CONNECTION, *bda, HH_CONN_STATUS_FAILED_MOUSE_FROM_HOST);
+ }
+ else {
+ // SIG_HH_CONNECTION, *bda, HH_CONN_STATUS_FAILED_KBD_FROM_HOST);
+ }*/
+ }
+
+ return BT_STATUS_BUSY;
+}
+
+/*******************************************************************************
+**
+** Function disconnect
+**
+** Description disconnect from hid device
+**
+** Returns bt_status_t
+**
+*******************************************************************************/
+static bt_status_t disconnect( bt_bdaddr_t *bd_addr )
+{
+ CHECK_BTHH_INIT();
+ btif_hh_device_t *p_dev;
+
+
+ if (btif_hh_cb.status != BTIF_HH_ENABLED)
+ {
+ BTIF_TRACE_WARNING2("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status);
+ return BT_STATUS_FAIL;
+ }
+
+ p_dev = btif_hh_find_connected_dev_by_bda(bd_addr);
+ if (p_dev != NULL)
+ {
+ BTA_HhClose(p_dev->dev_handle);
+ return btif_transfer_context(btif_hh_handle_evt, BTIF_HH_DISCONNECT_REQ_EVT,
+ (char*)bd_addr, sizeof(bt_bdaddr_t), NULL);
+ }
+ else
+ {
+ BTIF_TRACE_WARNING1("%s: Error, device not opened.", __FUNCTION__);
+ return BT_STATUS_FAIL;
+ }
+}
+
+/*******************************************************************************
+**
+** Function virtual_unplug
+**
+** Description Virtual UnPlug (VUP) the specified HID device.
+**
+** Returns bt_status_t
+**
+*******************************************************************************/
+static bt_status_t virtual_unplug (bt_bdaddr_t *bd_addr)
+{
+ CHECK_BTHH_INIT();
+ btif_hh_device_t *p_dev;
+ char bd_str[18];
+ sprintf(bd_str, "%02X:%02X:%02X:%02X:%02X:%02X",
+ bd_addr->address[0], bd_addr->address[1], bd_addr->address[2], bd_addr->address[3],
+ bd_addr->address[4], bd_addr->address[5]);
+ if (btif_hh_cb.status != BTIF_HH_ENABLED)
+ {
+ BTIF_TRACE_ERROR2("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status);
+ return BT_STATUS_FAIL;
+ }
+
+ p_dev = btif_hh_find_dev_by_bda(bd_addr);
+ if (p_dev != NULL)
+ {
+ BTA_HhSendCtrl(p_dev->dev_handle, BTA_HH_CTRL_VIRTUAL_CABLE_UNPLUG);
+ return BT_STATUS_FAIL;
+ }
+ else {
+ BTIF_TRACE_ERROR2("%s: Error, device %s not opened.", __FUNCTION__, bd_str);
+ return BT_STATUS_FAIL;
+ }
+
+ return BT_STATUS_SUCCESS;
+}
+
+/*******************************************************************************
+**
+** Function set_info
+**
+** Description Set the HID device descriptor for the specified HID device.
+**
+** Returns bt_status_t
+**
+*******************************************************************************/
+static bt_status_t set_info (bt_bdaddr_t *bd_addr, bthh_hid_info_t hid_info )
+{
+ CHECK_BTHH_INIT();
+ tBTA_HH_DEV_DSCP_INFO dscp_info;
+ BD_ADDR* bda = (BD_ADDR*) bd_addr;
+
+ BTIF_TRACE_DEBUG6("addr = %02X:%02X:%02X:%02X:%02X:%02X",
+ (*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
+ BTIF_TRACE_DEBUG6("%s: sub_class = 0x%02x, app_id = %d, vendor_id = 0x%04x, "
+ "product_id = 0x%04x, version= 0x%04x",
+ __FUNCTION__, hid_info.sub_class,
+ hid_info.app_id, hid_info.vendor_id, hid_info.product_id,
+ hid_info.version);
+
+ if (btif_hh_cb.status != BTIF_HH_ENABLED)
+ {
+ BTIF_TRACE_ERROR2("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status);
+ return BT_STATUS_FAIL;
+ }
+
+ dscp_info.vendor_id = hid_info.vendor_id;
+ dscp_info.product_id = hid_info.product_id;
+ dscp_info.version = hid_info.version;
+ dscp_info.ctry_code = hid_info.ctry_code;
+
+ dscp_info.descriptor.dl_len = hid_info.dl_len;
+ dscp_info.descriptor.dsc_list = (UINT8 *) GKI_getbuf(dscp_info.descriptor.dl_len);
+ if (dscp_info.descriptor.dsc_list == NULL)
+ {
+ LOGE("%s: Failed to allocate DSCP for CB", __FUNCTION__);
+ return BT_STATUS_FAIL;
+ }
+ memcpy(dscp_info.descriptor.dsc_list, &(hid_info.dsc_list), hid_info.dl_len);
+
+ if (btif_hh_add_added_dev(*bd_addr, hid_info.attr_mask))
+ {
+ BTA_HhAddDev(*bda, hid_info.attr_mask, hid_info.sub_class,
+ hid_info.app_id, dscp_info);
+ }
+
+ GKI_freebuf(dscp_info.descriptor.dsc_list);
+
+ return BT_STATUS_SUCCESS;
+}
+
+/*******************************************************************************
+**
+** Function get_protocol
+**
+** Description Get the HID proto mode.
+**
+** Returns bt_status_t
+**
+*******************************************************************************/
+static bt_status_t get_protocol (bt_bdaddr_t *bd_addr, bthh_protocol_mode_t protocolMode)
+{
+ CHECK_BTHH_INIT();
+ btif_hh_device_t *p_dev;
+ BD_ADDR* bda = (BD_ADDR*) bd_addr;
+
+ BTIF_TRACE_DEBUG6(" addr = %02X:%02X:%02X:%02X:%02X:%02X",
+ (*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
+
+ if (btif_hh_cb.status != BTIF_HH_ENABLED) {
+ BTIF_TRACE_ERROR2("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status);
+ return BT_STATUS_FAIL;
+ }
+
+ p_dev = btif_hh_find_connected_dev_by_bda(bd_addr);
+ if (p_dev != NULL) {
+ BTA_HhGetProtoMode(p_dev->dev_handle);
+ }
+ else {
+ return BT_STATUS_FAIL;
+ }
+ return BT_STATUS_SUCCESS;
+}
+
+/*******************************************************************************
+**
+** Function set_protocol
+**
+** Description Set the HID proto mode.
+**
+** Returns bt_status_t
+**
+*******************************************************************************/
+static bt_status_t set_protocol (bt_bdaddr_t *bd_addr, bthh_protocol_mode_t protocolMode)
+{
+ CHECK_BTHH_INIT();
+ btif_hh_device_t *p_dev;
+ UINT8 proto_mode = protocolMode;
+ BD_ADDR* bda = (BD_ADDR*) bd_addr;
+
+ BTIF_TRACE_DEBUG2("%s:proto_mode = %d", __FUNCTION__,protocolMode);
+
+ BTIF_TRACE_DEBUG6("addr = %02X:%02X:%02X:%02X:%02X:%02X",
+ (*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
+
+ if (btif_hh_cb.status != BTIF_HH_ENABLED) {
+ BTIF_TRACE_ERROR2("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status);
+ return BT_STATUS_FAIL;
+ }
+
+ p_dev = btif_hh_find_connected_dev_by_bda(bd_addr);
+ if (p_dev == NULL) {
+ BTIF_TRACE_WARNING6(" Error, device %02X:%02X:%02X:%02X:%02X:%02X not opened.",
+ (*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
+ return BT_STATUS_FAIL;
+ }
+ else if (protocolMode != BTA_HH_PROTO_RPT_MODE && protocolMode != BTA_HH_PROTO_BOOT_MODE) {
+ BTIF_TRACE_WARNING2("s: Error, device proto_mode = %d.", __FUNCTION__, proto_mode);
+ return BT_STATUS_FAIL;
+ }
+ else {
+ BTA_HhSetProtoMode(p_dev->dev_handle, protocolMode);
+ }
+
+
+ return BT_STATUS_SUCCESS;
+}
+
+/*******************************************************************************
+**
+** Function get_report
+**
+** Description Send a GET_REPORT to HID device.
+**
+** Returns bt_status_t
+**
+*******************************************************************************/
+static bt_status_t get_report (bt_bdaddr_t *bd_addr, bthh_report_type_t reportType, uint8_t reportId, int bufferSize)
+{
+ CHECK_BTHH_INIT();
+ btif_hh_device_t *p_dev;
+ BD_ADDR* bda = (BD_ADDR*) bd_addr;
+
+ BTIF_TRACE_DEBUG4("%s:proto_mode = %dr_type = %d, rpt_id = %d, buf_size = %d", __FUNCTION__,
+ reportType, reportId, bufferSize);
+
+ BTIF_TRACE_DEBUG6("addr = %02X:%02X:%02X:%02X:%02X:%02X",
+ (*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
+
+ if (btif_hh_cb.status != BTIF_HH_ENABLED) {
+ BTIF_TRACE_ERROR2("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status);
+ return BT_STATUS_FAIL;
+ }
+
+
+ p_dev = btif_hh_find_connected_dev_by_bda(bd_addr);
+ if (p_dev == NULL) {
+ BTIF_TRACE_ERROR6("%s: Error, device %02X:%02X:%02X:%02X:%02X:%02X not opened.",
+ (*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
+ return BT_STATUS_FAIL;
+ }
+ else if (reportType <= BTA_HH_RPTT_RESRV || reportType > BTA_HH_RPTT_FEATURE) {
+ BTIF_TRACE_ERROR6(" Error, device %02X:%02X:%02X:%02X:%02X:%02X not opened.",
+ (*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
+ return BT_STATUS_FAIL;
+ }
+ else {
+ BTA_HhGetReport(p_dev->dev_handle, reportType,
+ reportId, bufferSize);
+ }
+
+ return BT_STATUS_SUCCESS;
+}
+
+/*******************************************************************************
+**
+** Function set_report
+**
+** Description Send a SET_REPORT to HID device.
+**
+** Returns bt_status_t
+**
+*******************************************************************************/
+static bt_status_t set_report (bt_bdaddr_t *bd_addr, bthh_report_type_t reportType, char* report)
+{
+ CHECK_BTHH_INIT();
+ btif_hh_device_t *p_dev;
+ BD_ADDR* bda = (BD_ADDR*) bd_addr;
+
+ BTIF_TRACE_DEBUG2("%s:reportType = %d", __FUNCTION__,reportType);
+
+ BTIF_TRACE_DEBUG6("addr = %02X:%02X:%02X:%02X:%02X:%02X",
+ (*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
+
+
+ if (btif_hh_cb.status != BTIF_HH_ENABLED) {
+ BTIF_TRACE_ERROR2("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status);
+ return BT_STATUS_FAIL;
+ }
+
+ p_dev = btif_hh_find_connected_dev_by_bda(bd_addr);
+ if (p_dev == NULL) {
+ BTIF_TRACE_ERROR6("%s: Error, device %02X:%02X:%02X:%02X:%02X:%02X not opened.",
+ (*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
+ return BT_STATUS_FAIL;
+ }
+ else if (reportType <= BTA_HH_RPTT_RESRV || reportType > BTA_HH_RPTT_FEATURE) {
+ BTIF_TRACE_ERROR6(" Error, device %02X:%02X:%02X:%02X:%02X:%02X not opened.",
+ (*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
+ return BT_STATUS_FAIL;
+ }
+ else {
+ int hex_bytes_filled;
+ UINT8 hexbuf[200];
+ UINT16 len = (strlen(report) + 1) / 2;
+
+ if (p_dev->p_buf != NULL) {
+ GKI_freebuf(p_dev->p_buf);
+ }
+ p_dev->p_buf = GKI_getbuf((UINT16) (len + BTA_HH_MIN_OFFSET + sizeof(BT_HDR)));
+ if (p_dev->p_buf == NULL) {
+ BTIF_TRACE_ERROR2("%s: Error, failed to allocate RPT buffer, len = %d", __FUNCTION__, len);
+ return BT_STATUS_FAIL;
+ }
+
+ p_dev->p_buf->len = len;
+ p_dev->p_buf->offset = BTA_HH_MIN_OFFSET;
+
+ /* Build a SetReport data buffer */
+ memset(hexbuf, 0, 200);
+ //TODO
+ /*hex_bytes_filled = scru_ascii_2_hex(report, len, hexbuf);
+ LOGI("Hex bytes filled, hex value: %d", hex_bytes_filled);
+
+ if (hex_bytes_filled) {
+ UINT8* pbuf_data;
+ pbuf_data = (UINT8*) (p_dev->p_buf + 1) + p_dev->p_buf->offset;
+ memcpy(pbuf_data, hexbuf, hex_bytes_filled);
+ BTA_HhSetReport(p_dev->dev_handle, reportType, p_dev->p_buf);
+ }*/
+ return BT_STATUS_SUCCESS;
+ }
+
+
+}
+
+/*******************************************************************************
+**
+** Function send_data
+**
+** Description Send a SEND_DATA to HID device.
+**
+** Returns bt_status_t
+**
+*******************************************************************************/
+static bt_status_t send_data (bt_bdaddr_t *bd_addr, char* data)
+{
+ CHECK_BTHH_INIT();
+ btif_hh_device_t *p_dev;
+ BD_ADDR* bda = (BD_ADDR*) bd_addr;
+
+ BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+
+ BTIF_TRACE_DEBUG6("addr = %02X:%02X:%02X:%02X:%02X:%02X",
+ (*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
+
+ if (btif_hh_cb.status != BTIF_HH_ENABLED) {
+ BTIF_TRACE_ERROR2("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status);
+ return BT_STATUS_FAIL;
+ }
+
+ p_dev = btif_hh_find_connected_dev_by_bda(bd_addr);
+ if (p_dev == NULL) {
+ BTIF_TRACE_ERROR6("%s: Error, device %02X:%02X:%02X:%02X:%02X:%02X not opened.",
+ (*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
+ return BT_STATUS_FAIL;
+ }
+
+ else {
+ int hex_bytes_filled;
+ UINT8 hexbuf[200];
+ UINT16 len = (strlen(data) + 1) / 2;
+
+ if (p_dev->p_buf != NULL) {
+ GKI_freebuf(p_dev->p_buf);
+ }
+ p_dev->p_buf = GKI_getbuf((UINT16) (len + BTA_HH_MIN_OFFSET + sizeof(BT_HDR)));
+ if (p_dev->p_buf == NULL) {
+ BTIF_TRACE_ERROR2("%s: Error, failed to allocate RPT buffer, len = %d", __FUNCTION__, len);
+ return BT_STATUS_FAIL;
+ }
+
+ p_dev->p_buf->len = len;
+ p_dev->p_buf->offset = BTA_HH_MIN_OFFSET;
+
+ /* Build a SetReport data buffer */
+ memset(hexbuf, 0, 200);
+ //TODO
+ /*
+ hex_bytes_filled = scru_ascii_2_hex(data, len, hexbuf);
+ BTIF_TRACE_ERROR2("Hex bytes filled, hex value: %d, %d", hex_bytes_filled, len);
+
+ if (hex_bytes_filled) {
+ UINT8* pbuf_data;
+ pbuf_data = (UINT8*) (p_dev->p_buf + 1) + p_dev->p_buf->offset;
+ memcpy(pbuf_data, hexbuf, hex_bytes_filled);
+ BTA_HhSendData(p_dev->dev_handle, *bda, p_dev->p_buf);
+ return BT_STATUS_SUCCESS;
+ }*/
+
+ }
+ return BT_STATUS_FAIL;
+}
+
+
+/*******************************************************************************
+**
+** Function cleanup
+**
+** Description Closes the HH interface
+**
+** Returns bt_status_t
+**
+*******************************************************************************/
+static void cleanup( void )
+{
+ BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+
+ if (bt_hh_callbacks)
+ {
+ btif_disable_service(BTA_HID_SERVICE_ID);
+ bt_hh_callbacks = NULL;
+ }
+}
+
+static const bthh_interface_t bthhInterface = {
+ sizeof(bt_interface_t),
+ init,
+ connect,
+ disconnect,
+ virtual_unplug,
+ set_info,
+ get_protocol,
+ set_protocol,
+ get_report,
+ set_report,
+ send_data,
+ cleanup,
+};
+
+/*******************************************************************************
+**
+** Function btif_hh_execute_service
+**
+** Description Initializes/Shuts down the service
+**
+** Returns BT_STATUS_SUCCESS on success, BT_STATUS_FAIL otherwise
+**
+*******************************************************************************/
+bt_status_t btif_hh_execute_service(BOOLEAN b_enable)
+{
+ if (b_enable)
+ {
+ /* Enable and register with BTA-HH */
+ BTA_HhEnable(BTA_SEC_NONE, FALSE, bte_hh_evt);
+ }
+ else {
+ /* Disable HH */
+ BTA_HhDisable();
+ }
+ return BT_STATUS_SUCCESS;
+}
+
+/*******************************************************************************
+**
+** Function btif_hh_get_interface
+**
+** Description Get the hh callback interface
+**
+** Returns bthh_interface_t
+**
+*******************************************************************************/
+const bthh_interface_t *btif_hh_get_interface()
+{
+ BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ return &bthhInterface;
+}
diff --git a/btif/src/btif_storage.c b/btif/src/btif_storage.c
index 956bcb4..2e2d0a5 100644
--- a/btif/src/btif_storage.c
+++ b/btif/src/btif_storage.c
@@ -108,6 +108,9 @@
#include "btif_util.h"
#include "unv.h"
#include "bd.h"
+#include "gki.h"
+#include "bta_hh_api.h"
+#include "btif_hh.h"
/************************************************************************************
** Constants & Macros
@@ -123,6 +126,7 @@
#define BTIF_STORAGE_PATH_REMOTE_LINKKEYS "remote_linkkeys"
#define BTIF_STORAGE_PATH_REMOTE_ALIASES "remote_aliases"
#define BTIF_STORAGE_PATH_REMOTE_SERVICES "remote_services"
+#define BTIF_STORAGE_PATH_REMOTE_HIDINFO "hid_info"
#define BTIF_STORAGE_KEY_ADAPTER_NAME "name"
#define BTIF_STORAGE_KEY_ADAPTER_SCANMODE "scan_mode"
@@ -153,6 +157,7 @@
#define STORAGE_REMOTE_LINKKEYS_ENTRY_SIZE (LINK_KEY_LEN*2 + 1 + 2 + 1 + 2)
+
/* currently remote services is the potentially largest entry */
#define BTIF_STORAGE_MAX_LINE_SZ BTIF_REMOTE_SERVICES_ENTRY_SIZE_MAX
@@ -525,6 +530,29 @@ static bt_status_t btif_in_fetch_bonded_devices(btif_bonded_devices_t *p_bonded_
return BT_STATUS_SUCCESS;
}
+static int hex_str_to_int(const char* str, int size)
+{
+ int n = 0;
+ char c = *str++;
+ while (size-- != 0) {
+ n <<= 4;
+ if (c >= '0' && c <= '9')
+ {
+ n |= c - '0';
+ }
+ else if (c >= 'a' && c <= 'z')
+ {
+ n |= c - 'a' + 10;
+ }
+ else { // (c >= 'A' && c <= 'Z')
+ n |= c - 'A' + 10;
+ }
+
+ c = *str++;
+ }
+ return n;
+}
+
/************************************************************************************
** Externs
@@ -1059,3 +1087,4 @@ bt_status_t btif_storage_load_bonded_devices(void)
}
return BT_STATUS_SUCCESS;
}
+
diff --git a/btif/src/btif_util.c b/btif/src/btif_util.c
index a1a5d97..f5c06f8 100644..100755
--- a/btif/src/btif_util.c
+++ b/btif/src/btif_util.c
@@ -73,6 +73,8 @@
#include "btif_dm.h"
#include "btif_util.h"
#include "bta_ag_api.h"
+#include "bta_hh_api.h"
+
/************************************************************************************
@@ -269,6 +271,28 @@ const char* dump_hf_event(UINT16 event)
}
}
+const char* dump_hh_event(UINT16 event)
+{
+ switch(event)
+ {
+ CASE_RETURN_STR(BTA_HH_ENABLE_EVT)
+ CASE_RETURN_STR(BTA_HH_DISABLE_EVT)
+ CASE_RETURN_STR(BTA_HH_OPEN_EVT)
+ CASE_RETURN_STR(BTA_HH_CLOSE_EVT)
+ CASE_RETURN_STR(BTA_HH_GET_DSCP_EVT)
+ CASE_RETURN_STR(BTA_HH_GET_PROTO_EVT)
+ CASE_RETURN_STR(BTA_HH_GET_RPT_EVT)
+ CASE_RETURN_STR(BTA_HH_SET_PROTO_EVT)
+ CASE_RETURN_STR(BTA_HH_SET_RPT_EVT)
+ CASE_RETURN_STR(BTA_HH_VC_UNPLUG_EVT)
+ CASE_RETURN_STR(BTA_HH_ADD_DEV_EVT)
+ CASE_RETURN_STR(BTA_HH_RMV_DEV_EVT)
+ CASE_RETURN_STR(BTA_HH_API_ERR_EVT)
+ default:
+ return "UNKNOWN MSG ID";
+ }
+}
+
const char* dump_hf_conn_state(UINT16 event)
{
diff --git a/include/bt_trace.h b/include/bt_trace.h
index f9b9707..a5372d0 100644
--- a/include/bt_trace.h
+++ b/include/bt_trace.h
@@ -41,12 +41,12 @@
#define BTTRC_ID_STK_BNEP 14
#define BTTRC_ID_STK_BPP 15
#define BTTRC_ID_STK_BTM_ACL 16
-#define BTTRC_ID_STK_BTM_PM 17
-#define BTTRC_ID_STK_BTM_DEV_CTRL 18
-#define BTTRC_ID_STK_BTM_SVC_DSC 19
-#define BTTRC_ID_STK_BTM_INQ 20
-#define BTTRC_ID_STK_BTM_SCO 21
-#define BTTRC_ID_STK_BTM_SEC 22
+#define BTTRC_ID_STK_BTM_PM 17
+#define BTTRC_ID_STK_BTM_DEV_CTRL 18
+#define BTTRC_ID_STK_BTM_SVC_DSC 19
+#define BTTRC_ID_STK_BTM_INQ 20
+#define BTTRC_ID_STK_BTM_SCO 21
+#define BTTRC_ID_STK_BTM_SEC 22
#define BTTRC_ID_STK_DUN 23
#define BTTRC_ID_STK_HID 24
#define BTTRC_ID_STK_HSP2 25
@@ -213,37 +213,37 @@ EXPORT_API extern void BTTRC_StackTrace1(tBTTRC_LAYER_ID layer_id,
EXPORT_API extern void BTTRC_StackTrace2(tBTTRC_LAYER_ID layer_id,
tBTTRC_TYPE type,
UINT16 token,
- tBTTRC_PARAM_TYPE p1_type, UINT32 p1_val,
+ tBTTRC_PARAM_TYPE p1_type, UINT32 p1_val,
tBTTRC_PARAM_TYPE p2_type, UINT32 p2_val);
EXPORT_API extern void BTTRC_StackTrace3(tBTTRC_LAYER_ID layer_id,
tBTTRC_TYPE type,
UINT16 token,
- tBTTRC_PARAM_TYPE p1_type, UINT32 p1_val,
+ tBTTRC_PARAM_TYPE p1_type, UINT32 p1_val,
tBTTRC_PARAM_TYPE p2_type, UINT32 p2_val,
tBTTRC_PARAM_TYPE p3_type, UINT32 p3_val);
EXPORT_API extern void BTTRC_StackTrace4(tBTTRC_LAYER_ID layer_id,
tBTTRC_TYPE type,
UINT16 token,
- tBTTRC_PARAM_TYPE p1_type, UINT32 p1_val,
+ tBTTRC_PARAM_TYPE p1_type, UINT32 p1_val,
tBTTRC_PARAM_TYPE p2_type, UINT32 p2_val,
- tBTTRC_PARAM_TYPE p3_type, UINT32 p3_val,
+ tBTTRC_PARAM_TYPE p3_type, UINT32 p3_val,
tBTTRC_PARAM_TYPE p4_type, UINT32 p4_val);
EXPORT_API extern void BTTRC_StackTrace5(tBTTRC_LAYER_ID layer_id,
tBTTRC_TYPE type,
UINT16 token,
- tBTTRC_PARAM_TYPE p1_type, UINT32 p1_val,
+ tBTTRC_PARAM_TYPE p1_type, UINT32 p1_val,
tBTTRC_PARAM_TYPE p2_type, UINT32 p2_val,
- tBTTRC_PARAM_TYPE p3_type, UINT32 p3_val,
- tBTTRC_PARAM_TYPE p4_type, UINT32 p4_val,
+ tBTTRC_PARAM_TYPE p3_type, UINT32 p3_val,
+ tBTTRC_PARAM_TYPE p4_type, UINT32 p4_val,
tBTTRC_PARAM_TYPE p5_type, UINT32 p5_val);
EXPORT_API extern void BTTRC_StackTrace6(tBTTRC_LAYER_ID layer_id,
tBTTRC_TYPE type,
UINT16 token,
- tBTTRC_PARAM_TYPE p1_type, UINT32 p1_val,
+ tBTTRC_PARAM_TYPE p1_type, UINT32 p1_val,
tBTTRC_PARAM_TYPE p2_type, UINT32 p2_val,
- tBTTRC_PARAM_TYPE p3_type, UINT32 p3_val,
- tBTTRC_PARAM_TYPE p4_type, UINT32 p4_val,
- tBTTRC_PARAM_TYPE p5_type, UINT32 p5_val,
+ tBTTRC_PARAM_TYPE p3_type, UINT32 p3_val,
+ tBTTRC_PARAM_TYPE p4_type, UINT32 p4_val,
+ tBTTRC_PARAM_TYPE p5_type, UINT32 p5_val,
tBTTRC_PARAM_TYPE p6_type, UINT32 p6_val);
// btla-specific ++
@@ -1615,13 +1615,13 @@ EXPORT_API extern void BTTRC_StackTrace6(tBTTRC_LAYER_ID layer_id,
#define NFA_TRACE_DEBUG5(m,p1,p2,p3,p4,p5) {if (nfa_sys_cb.trace_level >= BT_TRACE_LEVEL_DEBUG) BT_TRACE_5(TRACE_LAYER_NFA, TRACE_TYPE_DEBUG, m,p1,p2,p3,p4,p5);}
#define NFA_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6) {if (nfa_sys_cb.trace_level >= BT_TRACE_LEVEL_DEBUG) BT_TRACE_6(TRACE_LAYER_NFA, TRACE_TYPE_DEBUG, m,p1,p2,p3,p4,p5,p6);}
-#define MMI_TRACE_0(m)
-#define MMI_TRACE_1(m,p1)
-#define MMI_TRACE_2(m,p1,p2)
-#define MMI_TRACE_3(m,p1,p2,p3)
-#define MMI_TRACE_4(m,p1,p2,p3,p4)
-#define MMI_TRACE_5(m,p1,p2,p3,p4,p5)
-#define MMI_TRACE_6(m,p1,p2,p3,p4,p5,p6)
+#define MMI_TRACE_0(m)
+#define MMI_TRACE_1(m,p1)
+#define MMI_TRACE_2(m,p1,p2)
+#define MMI_TRACE_3(m,p1,p2,p3)
+#define MMI_TRACE_4(m,p1,p2,p3,p4)
+#define MMI_TRACE_5(m,p1,p2,p3,p4,p5)
+#define MMI_TRACE_6(m,p1,p2,p3,p4,p5,p6)
#define MMI_DEBUG_0(m) BT_TRACE_0(TRACE_LAYER_HID, TRACE_TYPE_DEBUG, m)
#define MMI_DEBUG_1(m,p1) BT_TRACE_1(TRACE_LAYER_HID, TRACE_TYPE_DEBUG, m,p1)
@@ -1651,7 +1651,7 @@ EXPORT_API extern void BTTRC_StackTrace6(tBTTRC_LAYER_ID layer_id,
/* hid mouse module traces */
-#define MSKB_TRACE_0(m) MMI_Echo(m)
+#define MSKB_TRACE_0(m) MMI_Echo(m)
#define MSKB_TRACE_1(m,p1) MMI_Echo(m,p1)
#define MSKB_TRACE_2(m,p1,p2) MMI_Echo(m,p1,p2)
#define MSKB_TRACE_3(m,p1,p2,p3) MMI_Echo(m,p1,p2,p3)
@@ -1659,7 +1659,7 @@ EXPORT_API extern void BTTRC_StackTrace6(tBTTRC_LAYER_ID layer_id,
#define MSKB_TRACE_5(m,p1,p2,p3,p4,p5) MMI_Echo(m,p1,p2,p3,p4,p5)
#define MSKB_TRACE_6(m,p1,p2,p3,p4,p5,p6) MMI_Echo(m,p1,p2,p3,p4,p5,p6)
-#define MSKB_DEBUG_0(m) MMI_Echo(m)
+#define MSKB_DEBUG_0(m) MMI_Echo(m)
#define MSKB_DEBUG_1(m,p1) MMI_Echo(m,p1)
#define MSKB_DEBUG_2(m,p1,p2) MMI_Echo(m,p1,p2)
#define MSKB_DEBUG_3(m,p1,p2,p3) MMI_Echo(m,p1,p2,p3)
@@ -1667,7 +1667,7 @@ EXPORT_API extern void BTTRC_StackTrace6(tBTTRC_LAYER_ID layer_id,
#define MSKB_DEBUG_5(m,p1,p2,p3,p4,p5) MMI_Echo(m,p1,p2,p3,p4,p5)
#define MSKB_DEBUG_6(m,p1,p2,p3,p4,p5,p6) MMI_Echo(m,p1,p2,p3,p4,p5,p6)
-#define MSKB_ERROR_0(m) MMI_Echo(m)
+#define MSKB_ERROR_0(m) MMI_Echo(m)
#define MSKB_ERROR_1(m,p1) MMI_Echo(m,p1)
#define MSKB_ERROR_2(m,p1,p2) MMI_Echo(m,p1,p2)
#define MSKB_ERROR_3(m,p1,p2,p3) MMI_Echo(m,p1,p2,p3)
@@ -2566,863 +2566,863 @@ EXPORT_API extern void BTTRC_StackTrace6(tBTTRC_LAYER_ID layer_id,
/* Define tracing for the HCI unit
*/
-#define HCI_TRACE_ERROR0(m)
-#define HCI_TRACE_ERROR1(m,p1)
-#define HCI_TRACE_ERROR2(m,p1,p2)
-#define HCI_TRACE_ERROR3(m,p1,p2,p3)
-#define HCI_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define HCI_TRACE_ERROR0(m)
+#define HCI_TRACE_ERROR1(m,p1)
+#define HCI_TRACE_ERROR2(m,p1,p2)
+#define HCI_TRACE_ERROR3(m,p1,p2,p3)
+#define HCI_TRACE_ERROR4(m,p1,p2,p3,p4)
#define HCI_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
#define HCI_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-#define HCI_TRACE_WARNING0(m)
-#define HCI_TRACE_WARNING1(m,p1)
-#define HCI_TRACE_WARNING2(m,p1,p2)
-#define HCI_TRACE_WARNING3(m,p1,p2,p3)
-#define HCI_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define HCI_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define HCI_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define HCI_TRACE_EVENT0(m)
-#define HCI_TRACE_EVENT1(m,p1)
-#define HCI_TRACE_EVENT2(m,p1,p2)
-#define HCI_TRACE_EVENT3(m,p1,p2,p3)
-#define HCI_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define HCI_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define HCI_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define HCI_TRACE_DEBUG0(m)
-#define HCI_TRACE_DEBUG1(m,p1)
-#define HCI_TRACE_DEBUG2(m,p1,p2)
-#define HCI_TRACE_DEBUG3(m,p1,p2,p3)
-#define HCI_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define HCI_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define HCI_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+#define HCI_TRACE_WARNING0(m)
+#define HCI_TRACE_WARNING1(m,p1)
+#define HCI_TRACE_WARNING2(m,p1,p2)
+#define HCI_TRACE_WARNING3(m,p1,p2,p3)
+#define HCI_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define HCI_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define HCI_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
+
+#define HCI_TRACE_EVENT0(m)
+#define HCI_TRACE_EVENT1(m,p1)
+#define HCI_TRACE_EVENT2(m,p1,p2)
+#define HCI_TRACE_EVENT3(m,p1,p2,p3)
+#define HCI_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define HCI_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define HCI_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define HCI_TRACE_DEBUG0(m)
+#define HCI_TRACE_DEBUG1(m,p1)
+#define HCI_TRACE_DEBUG2(m,p1,p2)
+#define HCI_TRACE_DEBUG3(m,p1,p2,p3)
+#define HCI_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define HCI_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define HCI_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
/* Define tracing for BTM
*/
-#define BTM_TRACE_ERROR0(m)
-#define BTM_TRACE_ERROR1(m,p1)
-#define BTM_TRACE_ERROR2(m,p1,p2)
-#define BTM_TRACE_ERROR3(m,p1,p2,p3)
-#define BTM_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define BTM_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define BTM_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define BTM_TRACE_WARNING0(m)
-#define BTM_TRACE_WARNING1(m,p1)
-#define BTM_TRACE_WARNING2(m,p1,p2)
-#define BTM_TRACE_WARNING3(m,p1,p2,p3)
-#define BTM_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define BTM_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define BTM_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define BTM_TRACE_API0(m)
-#define BTM_TRACE_API1(m,p1)
-#define BTM_TRACE_API2(m,p1,p2)
-#define BTM_TRACE_API3(m,p1,p2,p3)
-#define BTM_TRACE_API4(m,p1,p2,p3,p4)
-#define BTM_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define BTM_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
-
-#define BTM_TRACE_EVENT0(m)
-#define BTM_TRACE_EVENT1(m,p1)
-#define BTM_TRACE_EVENT2(m,p1,p2)
-#define BTM_TRACE_EVENT3(m,p1,p2,p3)
-#define BTM_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define BTM_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define BTM_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define BTM_TRACE_DEBUG0(m)
-#define BTM_TRACE_DEBUG1(m,p1)
-#define BTM_TRACE_DEBUG2(m,p1,p2)
-#define BTM_TRACE_DEBUG3(m,p1,p2,p3)
-#define BTM_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define BTM_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define BTM_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+#define BTM_TRACE_ERROR0(m)
+#define BTM_TRACE_ERROR1(m,p1)
+#define BTM_TRACE_ERROR2(m,p1,p2)
+#define BTM_TRACE_ERROR3(m,p1,p2,p3)
+#define BTM_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define BTM_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define BTM_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define BTM_TRACE_WARNING0(m)
+#define BTM_TRACE_WARNING1(m,p1)
+#define BTM_TRACE_WARNING2(m,p1,p2)
+#define BTM_TRACE_WARNING3(m,p1,p2,p3)
+#define BTM_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define BTM_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define BTM_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
+
+#define BTM_TRACE_API0(m)
+#define BTM_TRACE_API1(m,p1)
+#define BTM_TRACE_API2(m,p1,p2)
+#define BTM_TRACE_API3(m,p1,p2,p3)
+#define BTM_TRACE_API4(m,p1,p2,p3,p4)
+#define BTM_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define BTM_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+
+#define BTM_TRACE_EVENT0(m)
+#define BTM_TRACE_EVENT1(m,p1)
+#define BTM_TRACE_EVENT2(m,p1,p2)
+#define BTM_TRACE_EVENT3(m,p1,p2,p3)
+#define BTM_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define BTM_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define BTM_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define BTM_TRACE_DEBUG0(m)
+#define BTM_TRACE_DEBUG1(m,p1)
+#define BTM_TRACE_DEBUG2(m,p1,p2)
+#define BTM_TRACE_DEBUG3(m,p1,p2,p3)
+#define BTM_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define BTM_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define BTM_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
/* Define tracing for the L2CAP unit
*/
-#define L2CAP_TRACE_ERROR0(m)
-#define L2CAP_TRACE_ERROR1(m,p1)
-#define L2CAP_TRACE_ERROR2(m,p1,p2)
-#define L2CAP_TRACE_ERROR3(m,p1,p2,p3)
-#define L2CAP_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define L2CAP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define L2CAP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define L2CAP_TRACE_WARNING0(m)
-#define L2CAP_TRACE_WARNING1(m,p1)
-#define L2CAP_TRACE_WARNING2(m,p1,p2)
-#define L2CAP_TRACE_WARNING3(m,p1,p2,p3)
-#define L2CAP_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define L2CAP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define L2CAP_TRACE_ERROR0(m)
+#define L2CAP_TRACE_ERROR1(m,p1)
+#define L2CAP_TRACE_ERROR2(m,p1,p2)
+#define L2CAP_TRACE_ERROR3(m,p1,p2,p3)
+#define L2CAP_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define L2CAP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define L2CAP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define L2CAP_TRACE_WARNING0(m)
+#define L2CAP_TRACE_WARNING1(m,p1)
+#define L2CAP_TRACE_WARNING2(m,p1,p2)
+#define L2CAP_TRACE_WARNING3(m,p1,p2,p3)
+#define L2CAP_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define L2CAP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
#define L2CAP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-#define L2CAP_TRACE_API0(m)
-#define L2CAP_TRACE_API1(m,p1)
-#define L2CAP_TRACE_API2(m,p1,p2)
-#define L2CAP_TRACE_API3(m,p1,p2,p3)
-#define L2CAP_TRACE_API4(m,p1,p2,p3,p4)
-#define L2CAP_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define L2CAP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
-
-#define L2CAP_TRACE_EVENT0(m)
-#define L2CAP_TRACE_EVENT1(m,p1)
-#define L2CAP_TRACE_EVENT2(m,p1,p2)
-#define L2CAP_TRACE_EVENT3(m,p1,p2,p3)
-#define L2CAP_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define L2CAP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define L2CAP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define L2CAP_TRACE_DEBUG0(m)
-#define L2CAP_TRACE_DEBUG1(m,p1)
-#define L2CAP_TRACE_DEBUG2(m,p1,p2)
-#define L2CAP_TRACE_DEBUG3(m,p1,p2,p3)
-#define L2CAP_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define L2CAP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define L2CAP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+#define L2CAP_TRACE_API0(m)
+#define L2CAP_TRACE_API1(m,p1)
+#define L2CAP_TRACE_API2(m,p1,p2)
+#define L2CAP_TRACE_API3(m,p1,p2,p3)
+#define L2CAP_TRACE_API4(m,p1,p2,p3,p4)
+#define L2CAP_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define L2CAP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+
+#define L2CAP_TRACE_EVENT0(m)
+#define L2CAP_TRACE_EVENT1(m,p1)
+#define L2CAP_TRACE_EVENT2(m,p1,p2)
+#define L2CAP_TRACE_EVENT3(m,p1,p2,p3)
+#define L2CAP_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define L2CAP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define L2CAP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define L2CAP_TRACE_DEBUG0(m)
+#define L2CAP_TRACE_DEBUG1(m,p1)
+#define L2CAP_TRACE_DEBUG2(m,p1,p2)
+#define L2CAP_TRACE_DEBUG3(m,p1,p2,p3)
+#define L2CAP_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define L2CAP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define L2CAP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
/* Define tracing for the LLCP unit
*/
-#define LLCP_TRACE_ERROR0(m)
-#define LLCP_TRACE_ERROR1(m,p1)
-#define LLCP_TRACE_ERROR2(m,p1,p2)
-#define LLCP_TRACE_ERROR3(m,p1,p2,p3)
-#define LLCP_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define LLCP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define LLCP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define LLCP_TRACE_WARNING0(m)
-#define LLCP_TRACE_WARNING1(m,p1)
-#define LLCP_TRACE_WARNING2(m,p1,p2)
-#define LLCP_TRACE_WARNING3(m,p1,p2,p3)
-#define LLCP_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define LLCP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define LLCP_TRACE_ERROR0(m)
+#define LLCP_TRACE_ERROR1(m,p1)
+#define LLCP_TRACE_ERROR2(m,p1,p2)
+#define LLCP_TRACE_ERROR3(m,p1,p2,p3)
+#define LLCP_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define LLCP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define LLCP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define LLCP_TRACE_WARNING0(m)
+#define LLCP_TRACE_WARNING1(m,p1)
+#define LLCP_TRACE_WARNING2(m,p1,p2)
+#define LLCP_TRACE_WARNING3(m,p1,p2,p3)
+#define LLCP_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define LLCP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
#define LLCP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-#define LLCP_TRACE_API0(m)
-#define LLCP_TRACE_API1(m,p1)
-#define LLCP_TRACE_API2(m,p1,p2)
-#define LLCP_TRACE_API3(m,p1,p2,p3)
-#define LLCP_TRACE_API4(m,p1,p2,p3,p4)
-#define LLCP_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define LLCP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
-
-#define LLCP_TRACE_EVENT0(m)
-#define LLCP_TRACE_EVENT1(m,p1)
-#define LLCP_TRACE_EVENT2(m,p1,p2)
-#define LLCP_TRACE_EVENT3(m,p1,p2,p3)
-#define LLCP_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define LLCP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define LLCP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define LLCP_TRACE_DEBUG0(m)
-#define LLCP_TRACE_DEBUG1(m,p1)
-#define LLCP_TRACE_DEBUG2(m,p1,p2)
-#define LLCP_TRACE_DEBUG3(m,p1,p2,p3)
-#define LLCP_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define LLCP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define LLCP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+#define LLCP_TRACE_API0(m)
+#define LLCP_TRACE_API1(m,p1)
+#define LLCP_TRACE_API2(m,p1,p2)
+#define LLCP_TRACE_API3(m,p1,p2,p3)
+#define LLCP_TRACE_API4(m,p1,p2,p3,p4)
+#define LLCP_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define LLCP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+
+#define LLCP_TRACE_EVENT0(m)
+#define LLCP_TRACE_EVENT1(m,p1)
+#define LLCP_TRACE_EVENT2(m,p1,p2)
+#define LLCP_TRACE_EVENT3(m,p1,p2,p3)
+#define LLCP_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define LLCP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define LLCP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define LLCP_TRACE_DEBUG0(m)
+#define LLCP_TRACE_DEBUG1(m,p1)
+#define LLCP_TRACE_DEBUG2(m,p1,p2)
+#define LLCP_TRACE_DEBUG3(m,p1,p2,p3)
+#define LLCP_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define LLCP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define LLCP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
/* Define tracing for the SDP unit
*/
-#define SDP_TRACE_ERROR0(m)
-#define SDP_TRACE_ERROR1(m,p1)
-#define SDP_TRACE_ERROR2(m,p1,p2)
-#define SDP_TRACE_ERROR3(m,p1,p2,p3)
-#define SDP_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define SDP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define SDP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define SDP_TRACE_WARNING0(m)
-#define SDP_TRACE_WARNING1(m,p1)
-#define SDP_TRACE_WARNING2(m,p1,p2)
-#define SDP_TRACE_WARNING3(m,p1,p2,p3)
-#define SDP_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define SDP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define SDP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define SDP_TRACE_API0(m)
-#define SDP_TRACE_API1(m,p1)
-#define SDP_TRACE_API2(m,p1,p2)
-#define SDP_TRACE_API3(m,p1,p2,p3)
-#define SDP_TRACE_API4(m,p1,p2,p3,p4)
-#define SDP_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define SDP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
-
-#define SDP_TRACE_EVENT0(m)
-#define SDP_TRACE_EVENT1(m,p1)
-#define SDP_TRACE_EVENT2(m,p1,p2)
-#define SDP_TRACE_EVENT3(m,p1,p2,p3)
-#define SDP_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define SDP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define SDP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define SDP_TRACE_DEBUG0(m)
-#define SDP_TRACE_DEBUG1(m,p1)
-#define SDP_TRACE_DEBUG2(m,p1,p2)
-#define SDP_TRACE_DEBUG3(m,p1,p2,p3)
-#define SDP_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define SDP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define SDP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+#define SDP_TRACE_ERROR0(m)
+#define SDP_TRACE_ERROR1(m,p1)
+#define SDP_TRACE_ERROR2(m,p1,p2)
+#define SDP_TRACE_ERROR3(m,p1,p2,p3)
+#define SDP_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define SDP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define SDP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define SDP_TRACE_WARNING0(m)
+#define SDP_TRACE_WARNING1(m,p1)
+#define SDP_TRACE_WARNING2(m,p1,p2)
+#define SDP_TRACE_WARNING3(m,p1,p2,p3)
+#define SDP_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define SDP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define SDP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
+
+#define SDP_TRACE_API0(m)
+#define SDP_TRACE_API1(m,p1)
+#define SDP_TRACE_API2(m,p1,p2)
+#define SDP_TRACE_API3(m,p1,p2,p3)
+#define SDP_TRACE_API4(m,p1,p2,p3,p4)
+#define SDP_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define SDP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+
+#define SDP_TRACE_EVENT0(m)
+#define SDP_TRACE_EVENT1(m,p1)
+#define SDP_TRACE_EVENT2(m,p1,p2)
+#define SDP_TRACE_EVENT3(m,p1,p2,p3)
+#define SDP_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define SDP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define SDP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define SDP_TRACE_DEBUG0(m)
+#define SDP_TRACE_DEBUG1(m,p1)
+#define SDP_TRACE_DEBUG2(m,p1,p2)
+#define SDP_TRACE_DEBUG3(m,p1,p2,p3)
+#define SDP_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define SDP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define SDP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
/* Define tracing for the RFCOMM unit
*/
-#define RFCOMM_TRACE_ERROR0(m)
-#define RFCOMM_TRACE_ERROR1(m,p1)
-#define RFCOMM_TRACE_ERROR2(m,p1,p2)
-#define RFCOMM_TRACE_ERROR3(m,p1,p2,p3)
-#define RFCOMM_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define RFCOMM_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define RFCOMM_TRACE_ERROR0(m)
+#define RFCOMM_TRACE_ERROR1(m,p1)
+#define RFCOMM_TRACE_ERROR2(m,p1,p2)
+#define RFCOMM_TRACE_ERROR3(m,p1,p2,p3)
+#define RFCOMM_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define RFCOMM_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
#define RFCOMM_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-#define RFCOMM_TRACE_WARNING0(m)
-#define RFCOMM_TRACE_WARNING1(m,p1)
-#define RFCOMM_TRACE_WARNING2(m,p1,p2)
-#define RFCOMM_TRACE_WARNING3(m,p1,p2,p3)
-#define RFCOMM_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define RFCOMM_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define RFCOMM_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define RFCOMM_TRACE_API0(m)
-#define RFCOMM_TRACE_API1(m,p1)
-#define RFCOMM_TRACE_API2(m,p1,p2)
-#define RFCOMM_TRACE_API3(m,p1,p2,p3)
-#define RFCOMM_TRACE_API4(m,p1,p2,p3,p4)
-#define RFCOMM_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define RFCOMM_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
-
-#define RFCOMM_TRACE_EVENT0(m)
-#define RFCOMM_TRACE_EVENT1(m,p1)
-#define RFCOMM_TRACE_EVENT2(m,p1,p2)
-#define RFCOMM_TRACE_EVENT3(m,p1,p2,p3)
-#define RFCOMM_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define RFCOMM_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define RFCOMM_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define RFCOMM_TRACE_DEBUG0(m)
-#define RFCOMM_TRACE_DEBUG1(m,p1)
-#define RFCOMM_TRACE_DEBUG2(m,p1,p2)
-#define RFCOMM_TRACE_DEBUG3(m,p1,p2,p3)
-#define RFCOMM_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define RFCOMM_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define RFCOMM_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+#define RFCOMM_TRACE_WARNING0(m)
+#define RFCOMM_TRACE_WARNING1(m,p1)
+#define RFCOMM_TRACE_WARNING2(m,p1,p2)
+#define RFCOMM_TRACE_WARNING3(m,p1,p2,p3)
+#define RFCOMM_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define RFCOMM_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define RFCOMM_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
+
+#define RFCOMM_TRACE_API0(m)
+#define RFCOMM_TRACE_API1(m,p1)
+#define RFCOMM_TRACE_API2(m,p1,p2)
+#define RFCOMM_TRACE_API3(m,p1,p2,p3)
+#define RFCOMM_TRACE_API4(m,p1,p2,p3,p4)
+#define RFCOMM_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define RFCOMM_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+
+#define RFCOMM_TRACE_EVENT0(m)
+#define RFCOMM_TRACE_EVENT1(m,p1)
+#define RFCOMM_TRACE_EVENT2(m,p1,p2)
+#define RFCOMM_TRACE_EVENT3(m,p1,p2,p3)
+#define RFCOMM_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define RFCOMM_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define RFCOMM_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define RFCOMM_TRACE_DEBUG0(m)
+#define RFCOMM_TRACE_DEBUG1(m,p1)
+#define RFCOMM_TRACE_DEBUG2(m,p1,p2)
+#define RFCOMM_TRACE_DEBUG3(m,p1,p2,p3)
+#define RFCOMM_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define RFCOMM_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define RFCOMM_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
/* Define tracing for Serial Port Profile
*/
-#define SPP_TRACE_ERROR0(m)
-#define SPP_TRACE_ERROR1(m,p1)
-#define SPP_TRACE_ERROR2(m,p1,p2)
-#define SPP_TRACE_ERROR3(m,p1,p2,p3)
-#define SPP_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define SPP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define SPP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define SPP_TRACE_WARNING0(m)
-#define SPP_TRACE_WARNING1(m,p1)
-#define SPP_TRACE_WARNING2(m,p1,p2)
-#define SPP_TRACE_WARNING3(m,p1,p2,p3)
-#define SPP_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define SPP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define SPP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define SPP_TRACE_EVENT0(m)
-#define SPP_TRACE_EVENT1(m,p1)
-#define SPP_TRACE_EVENT2(m,p1,p2)
-#define SPP_TRACE_EVENT3(m,p1,p2,p3)
-#define SPP_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define SPP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define SPP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define SPP_TRACE_API0(m)
-#define SPP_TRACE_API1(m,p1)
-#define SPP_TRACE_API2(m,p1,p2)
-#define SPP_TRACE_API3(m,p1,p2,p3)
-#define SPP_TRACE_API4(m,p1,p2,p3,p4)
-#define SPP_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define SPP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
-
-#define SPP_TRACE_DEBUG0(m)
-#define SPP_TRACE_DEBUG1(m,p1)
-#define SPP_TRACE_DEBUG2(m,p1,p2)
-#define SPP_TRACE_DEBUG3(m,p1,p2,p3)
-#define SPP_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define SPP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define SPP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+#define SPP_TRACE_ERROR0(m)
+#define SPP_TRACE_ERROR1(m,p1)
+#define SPP_TRACE_ERROR2(m,p1,p2)
+#define SPP_TRACE_ERROR3(m,p1,p2,p3)
+#define SPP_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define SPP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define SPP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define SPP_TRACE_WARNING0(m)
+#define SPP_TRACE_WARNING1(m,p1)
+#define SPP_TRACE_WARNING2(m,p1,p2)
+#define SPP_TRACE_WARNING3(m,p1,p2,p3)
+#define SPP_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define SPP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define SPP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
+
+#define SPP_TRACE_EVENT0(m)
+#define SPP_TRACE_EVENT1(m,p1)
+#define SPP_TRACE_EVENT2(m,p1,p2)
+#define SPP_TRACE_EVENT3(m,p1,p2,p3)
+#define SPP_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define SPP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define SPP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define SPP_TRACE_API0(m)
+#define SPP_TRACE_API1(m,p1)
+#define SPP_TRACE_API2(m,p1,p2)
+#define SPP_TRACE_API3(m,p1,p2,p3)
+#define SPP_TRACE_API4(m,p1,p2,p3,p4)
+#define SPP_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define SPP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+
+#define SPP_TRACE_DEBUG0(m)
+#define SPP_TRACE_DEBUG1(m,p1)
+#define SPP_TRACE_DEBUG2(m,p1,p2)
+#define SPP_TRACE_DEBUG3(m,p1,p2,p3)
+#define SPP_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define SPP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define SPP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
/* Generic Access Profile traces */
-#define GAP_TRACE_ERROR0(m)
-#define GAP_TRACE_ERROR1(m,p1)
-#define GAP_TRACE_ERROR2(m,p1,p2)
-#define GAP_TRACE_ERROR3(m,p1,p2,p3)
-#define GAP_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define GAP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define GAP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define GAP_TRACE_EVENT0(m)
-#define GAP_TRACE_EVENT1(m,p1)
-#define GAP_TRACE_EVENT2(m,p1,p2)
-#define GAP_TRACE_EVENT3(m,p1,p2,p3)
-#define GAP_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define GAP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define GAP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define GAP_TRACE_API0(m)
-#define GAP_TRACE_API1(m,p1)
-#define GAP_TRACE_API2(m,p1,p2)
-#define GAP_TRACE_API3(m,p1,p2,p3)
-#define GAP_TRACE_API4(m,p1,p2,p3,p4)
-#define GAP_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define GAP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
-
-#define GAP_TRACE_WARNING0(m)
-#define GAP_TRACE_WARNING1(m,p1)
-#define GAP_TRACE_WARNING2(m,p1,p2)
-#define GAP_TRACE_WARNING3(m,p1,p2,p3)
-#define GAP_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define GAP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define GAP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-
+#define GAP_TRACE_ERROR0(m)
+#define GAP_TRACE_ERROR1(m,p1)
+#define GAP_TRACE_ERROR2(m,p1,p2)
+#define GAP_TRACE_ERROR3(m,p1,p2,p3)
+#define GAP_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define GAP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define GAP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define GAP_TRACE_EVENT0(m)
+#define GAP_TRACE_EVENT1(m,p1)
+#define GAP_TRACE_EVENT2(m,p1,p2)
+#define GAP_TRACE_EVENT3(m,p1,p2,p3)
+#define GAP_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define GAP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define GAP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define GAP_TRACE_API0(m)
+#define GAP_TRACE_API1(m,p1)
+#define GAP_TRACE_API2(m,p1,p2)
+#define GAP_TRACE_API3(m,p1,p2,p3)
+#define GAP_TRACE_API4(m,p1,p2,p3,p4)
+#define GAP_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define GAP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+
+#define GAP_TRACE_WARNING0(m)
+#define GAP_TRACE_WARNING1(m,p1)
+#define GAP_TRACE_WARNING2(m,p1,p2)
+#define GAP_TRACE_WARNING3(m,p1,p2,p3)
+#define GAP_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define GAP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define GAP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
+
+
/* Define tracing for OBX
*/
-#define OBX_TRACE_ERROR0(m)
-#define OBX_TRACE_ERROR1(m,p1)
-#define OBX_TRACE_ERROR2(m,p1,p2)
-#define OBX_TRACE_ERROR3(m,p1,p2,p3)
-#define OBX_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define OBX_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define OBX_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define OBX_TRACE_WARNING0(m)
-#define OBX_TRACE_WARNING1(m,p1)
-#define OBX_TRACE_WARNING2(m,p1,p2)
-#define OBX_TRACE_WARNING3(m,p1,p2,p3)
-#define OBX_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define OBX_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define OBX_TRACE_ERROR0(m)
+#define OBX_TRACE_ERROR1(m,p1)
+#define OBX_TRACE_ERROR2(m,p1,p2)
+#define OBX_TRACE_ERROR3(m,p1,p2,p3)
+#define OBX_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define OBX_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define OBX_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define OBX_TRACE_WARNING0(m)
+#define OBX_TRACE_WARNING1(m,p1)
+#define OBX_TRACE_WARNING2(m,p1,p2)
+#define OBX_TRACE_WARNING3(m,p1,p2,p3)
+#define OBX_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define OBX_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
#define OBX_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-#define OBX_TRACE_EVENT0(m)
-#define OBX_TRACE_EVENT1(m,p1)
-#define OBX_TRACE_EVENT2(m,p1,p2)
-#define OBX_TRACE_EVENT3(m,p1,p2,p3)
-#define OBX_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define OBX_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define OBX_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define OBX_TRACE_DEBUG0(m)
-#define OBX_TRACE_DEBUG1(m,p1)
-#define OBX_TRACE_DEBUG2(m,p1,p2)
-#define OBX_TRACE_DEBUG3(m,p1,p2,p3)
-#define OBX_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define OBX_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define OBX_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
-
-#define OBX_TRACE_API0(m)
-#define OBX_TRACE_API1(m,p1)
-#define OBX_TRACE_API2(m,p1,p2)
-#define OBX_TRACE_API3(m,p1,p2,p3)
-#define OBX_TRACE_API4(m,p1,p2,p3,p4)
-#define OBX_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define OBX_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+#define OBX_TRACE_EVENT0(m)
+#define OBX_TRACE_EVENT1(m,p1)
+#define OBX_TRACE_EVENT2(m,p1,p2)
+#define OBX_TRACE_EVENT3(m,p1,p2,p3)
+#define OBX_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define OBX_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define OBX_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define OBX_TRACE_DEBUG0(m)
+#define OBX_TRACE_DEBUG1(m,p1)
+#define OBX_TRACE_DEBUG2(m,p1,p2)
+#define OBX_TRACE_DEBUG3(m,p1,p2,p3)
+#define OBX_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define OBX_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define OBX_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+
+#define OBX_TRACE_API0(m)
+#define OBX_TRACE_API1(m,p1)
+#define OBX_TRACE_API2(m,p1,p2)
+#define OBX_TRACE_API3(m,p1,p2,p3)
+#define OBX_TRACE_API4(m,p1,p2,p3,p4)
+#define OBX_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define OBX_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
/* Define tracing for GOEP application profiles
*/
-#define GOEP_TRACE_ERROR0(m)
-#define GOEP_TRACE_ERROR1(m,p1)
-#define GOEP_TRACE_ERROR2(m,p1,p2)
-#define GOEP_TRACE_ERROR3(m,p1,p2,p3)
-#define GOEP_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define GOEP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define GOEP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define GOEP_TRACE_WARNING0(m)
-#define GOEP_TRACE_WARNING1(m,p1)
-#define GOEP_TRACE_WARNING2(m,p1,p2)
-#define GOEP_TRACE_WARNING3(m,p1,p2,p3)
-#define GOEP_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define GOEP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define GOEP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define GOEP_TRACE_EVENT0(m)
-#define GOEP_TRACE_EVENT1(m,p1)
-#define GOEP_TRACE_EVENT2(m,p1,p2)
-#define GOEP_TRACE_EVENT3(m,p1,p2,p3)
-#define GOEP_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define GOEP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define GOEP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define GOEP_TRACE_DEBUG0(m)
-#define GOEP_TRACE_DEBUG1(m,p1)
-#define GOEP_TRACE_DEBUG2(m,p1,p2)
-#define GOEP_TRACE_DEBUG3(m,p1,p2,p3)
-#define GOEP_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define GOEP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
-
-#define GOEP_TRACE_API0(m)
-#define GOEP_TRACE_API1(m,p1)
-#define GOEP_TRACE_API2(m,p1,p2)
-#define GOEP_TRACE_API3(m,p1,p2,p3)
-#define GOEP_TRACE_API4(m,p1,p2,p3,p4)
-#define GOEP_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define GOEP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+#define GOEP_TRACE_ERROR0(m)
+#define GOEP_TRACE_ERROR1(m,p1)
+#define GOEP_TRACE_ERROR2(m,p1,p2)
+#define GOEP_TRACE_ERROR3(m,p1,p2,p3)
+#define GOEP_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define GOEP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define GOEP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define GOEP_TRACE_WARNING0(m)
+#define GOEP_TRACE_WARNING1(m,p1)
+#define GOEP_TRACE_WARNING2(m,p1,p2)
+#define GOEP_TRACE_WARNING3(m,p1,p2,p3)
+#define GOEP_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define GOEP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define GOEP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
+
+#define GOEP_TRACE_EVENT0(m)
+#define GOEP_TRACE_EVENT1(m,p1)
+#define GOEP_TRACE_EVENT2(m,p1,p2)
+#define GOEP_TRACE_EVENT3(m,p1,p2,p3)
+#define GOEP_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define GOEP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define GOEP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define GOEP_TRACE_DEBUG0(m)
+#define GOEP_TRACE_DEBUG1(m,p1)
+#define GOEP_TRACE_DEBUG2(m,p1,p2)
+#define GOEP_TRACE_DEBUG3(m,p1,p2,p3)
+#define GOEP_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define GOEP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+
+#define GOEP_TRACE_API0(m)
+#define GOEP_TRACE_API1(m,p1)
+#define GOEP_TRACE_API2(m,p1,p2)
+#define GOEP_TRACE_API3(m,p1,p2,p3)
+#define GOEP_TRACE_API4(m,p1,p2,p3,p4)
+#define GOEP_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define GOEP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
/* Define tracing for the BPP profile
*/
-#define BPP_TRACE_ERROR0(m)
-#define BPP_TRACE_ERROR1(m,p1)
-#define BPP_TRACE_ERROR2(m,p1,p2)
-#define BPP_TRACE_ERROR3(m,p1,p2,p3)
-#define BPP_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define BPP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define BPP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define BPP_TRACE_WARNING0(m)
-#define BPP_TRACE_WARNING1(m,p1)
-#define BPP_TRACE_WARNING2(m,p1,p2)
-#define BPP_TRACE_WARNING3(m,p1,p2,p3)
-#define BPP_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define BPP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define BPP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define BPP_TRACE_EVENT0(m)
-#define BPP_TRACE_EVENT1(m,p1)
-#define BPP_TRACE_EVENT2(m,p1,p2)
-#define BPP_TRACE_EVENT3(m,p1,p2,p3)
-#define BPP_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define BPP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define BPP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define BPP_TRACE_DEBUG0(m)
-#define BPP_TRACE_DEBUG1(m,p1)
-#define BPP_TRACE_DEBUG2(m,p1,p2)
-#define BPP_TRACE_DEBUG3(m,p1,p2,p3)
-#define BPP_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define BPP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define BPP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
-
-#define BPP_TRACE_API0(m)
-#define BPP_TRACE_API1(m,p1)
-#define BPP_TRACE_API2(m,p1,p2)
-#define BPP_TRACE_API3(m,p1,p2,p3)
-#define BPP_TRACE_API4(m,p1,p2,p3,p4)
-#define BPP_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define BPP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+#define BPP_TRACE_ERROR0(m)
+#define BPP_TRACE_ERROR1(m,p1)
+#define BPP_TRACE_ERROR2(m,p1,p2)
+#define BPP_TRACE_ERROR3(m,p1,p2,p3)
+#define BPP_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define BPP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define BPP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define BPP_TRACE_WARNING0(m)
+#define BPP_TRACE_WARNING1(m,p1)
+#define BPP_TRACE_WARNING2(m,p1,p2)
+#define BPP_TRACE_WARNING3(m,p1,p2,p3)
+#define BPP_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define BPP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define BPP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
+
+#define BPP_TRACE_EVENT0(m)
+#define BPP_TRACE_EVENT1(m,p1)
+#define BPP_TRACE_EVENT2(m,p1,p2)
+#define BPP_TRACE_EVENT3(m,p1,p2,p3)
+#define BPP_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define BPP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define BPP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define BPP_TRACE_DEBUG0(m)
+#define BPP_TRACE_DEBUG1(m,p1)
+#define BPP_TRACE_DEBUG2(m,p1,p2)
+#define BPP_TRACE_DEBUG3(m,p1,p2,p3)
+#define BPP_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define BPP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define BPP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+
+#define BPP_TRACE_API0(m)
+#define BPP_TRACE_API1(m,p1)
+#define BPP_TRACE_API2(m,p1,p2)
+#define BPP_TRACE_API3(m,p1,p2,p3)
+#define BPP_TRACE_API4(m,p1,p2,p3,p4)
+#define BPP_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define BPP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
/* Define tracing for the BIP profile
*/
-#define BIP_TRACE_ERROR0(m)
-#define BIP_TRACE_ERROR1(m,p1)
-#define BIP_TRACE_ERROR2(m,p1,p2)
-#define BIP_TRACE_ERROR3(m,p1,p2,p3)
-#define BIP_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define BIP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define BIP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define BIP_TRACE_WARNING0(m)
-#define BIP_TRACE_WARNING1(m,p1)
-#define BIP_TRACE_WARNING2(m,p1,p2)
-#define BIP_TRACE_WARNING3(m,p1,p2,p3)
+#define BIP_TRACE_ERROR0(m)
+#define BIP_TRACE_ERROR1(m,p1)
+#define BIP_TRACE_ERROR2(m,p1,p2)
+#define BIP_TRACE_ERROR3(m,p1,p2,p3)
+#define BIP_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define BIP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define BIP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define BIP_TRACE_WARNING0(m)
+#define BIP_TRACE_WARNING1(m,p1)
+#define BIP_TRACE_WARNING2(m,p1,p2)
+#define BIP_TRACE_WARNING3(m,p1,p2,p3)
#define BIP_TRACE_WARNING4(m,p1,p2,p3,p4)
#define BIP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define BIP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define BIP_TRACE_EVENT0(m)
-#define BIP_TRACE_EVENT1(m,p1)
-#define BIP_TRACE_EVENT2(m,p1,p2)
-#define BIP_TRACE_EVENT3(m,p1,p2,p3)
-#define BIP_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define BIP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define BIP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define BIP_TRACE_DEBUG0(m)
-#define BIP_TRACE_DEBUG1(m,p1)
-#define BIP_TRACE_DEBUG2(m,p1,p2)
-#define BIP_TRACE_DEBUG3(m,p1,p2,p3)
-#define BIP_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define BIP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define BIP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
-
-#define BIP_TRACE_API0(m)
-#define BIP_TRACE_API1(m,p1)
-#define BIP_TRACE_API2(m,p1,p2)
-#define BIP_TRACE_API3(m,p1,p2,p3)
-#define BIP_TRACE_API4(m,p1,p2,p3,p4)
-#define BIP_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define BIP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+#define BIP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
+
+#define BIP_TRACE_EVENT0(m)
+#define BIP_TRACE_EVENT1(m,p1)
+#define BIP_TRACE_EVENT2(m,p1,p2)
+#define BIP_TRACE_EVENT3(m,p1,p2,p3)
+#define BIP_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define BIP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define BIP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define BIP_TRACE_DEBUG0(m)
+#define BIP_TRACE_DEBUG1(m,p1)
+#define BIP_TRACE_DEBUG2(m,p1,p2)
+#define BIP_TRACE_DEBUG3(m,p1,p2,p3)
+#define BIP_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define BIP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define BIP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+
+#define BIP_TRACE_API0(m)
+#define BIP_TRACE_API1(m,p1)
+#define BIP_TRACE_API2(m,p1,p2)
+#define BIP_TRACE_API3(m,p1,p2,p3)
+#define BIP_TRACE_API4(m,p1,p2,p3,p4)
+#define BIP_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define BIP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
/* Define tracing for TCS
*/
-#define TCS_TRACE_ERROR0(m)
-#define TCS_TRACE_ERROR1(m,p1)
-#define TCS_TRACE_ERROR2(m,p1,p2)
-#define TCS_TRACE_ERROR3(m,p1,p2,p3)
-#define TCS_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define TCS_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define TCS_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define TCS_TRACE_WARNING0(m)
-#define TCS_TRACE_WARNING1(m,p1)
-#define TCS_TRACE_WARNING2(m,p1,p2)
-#define TCS_TRACE_WARNING3(m,p1,p2,p3)
-#define TCS_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define TCS_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define TCS_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define TCS_TRACE_EVENT0(m)
-#define TCS_TRACE_EVENT1(m,p1)
-#define TCS_TRACE_EVENT2(m,p1,p2)
-#define TCS_TRACE_EVENT3(m,p1,p2,p3)
-#define TCS_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define TCS_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define TCS_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define TCS_TRACE_DEBUG0(m)
-#define TCS_TRACE_DEBUG1(m,p1)
-#define TCS_TRACE_DEBUG2(m,p1,p2)
-#define TCS_TRACE_DEBUG3(m,p1,p2,p3)
-#define TCS_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define TCS_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define TCS_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
-
-#define TCS_TRACE_API0(m)
-#define TCS_TRACE_API1(m,p1)
-#define TCS_TRACE_API2(m,p1,p2)
-#define TCS_TRACE_API3(m,p1,p2,p3)
-#define TCS_TRACE_API4(m,p1,p2,p3,p4)
-#define TCS_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define TCS_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+#define TCS_TRACE_ERROR0(m)
+#define TCS_TRACE_ERROR1(m,p1)
+#define TCS_TRACE_ERROR2(m,p1,p2)
+#define TCS_TRACE_ERROR3(m,p1,p2,p3)
+#define TCS_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define TCS_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define TCS_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define TCS_TRACE_WARNING0(m)
+#define TCS_TRACE_WARNING1(m,p1)
+#define TCS_TRACE_WARNING2(m,p1,p2)
+#define TCS_TRACE_WARNING3(m,p1,p2,p3)
+#define TCS_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define TCS_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define TCS_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
+
+#define TCS_TRACE_EVENT0(m)
+#define TCS_TRACE_EVENT1(m,p1)
+#define TCS_TRACE_EVENT2(m,p1,p2)
+#define TCS_TRACE_EVENT3(m,p1,p2,p3)
+#define TCS_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define TCS_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define TCS_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define TCS_TRACE_DEBUG0(m)
+#define TCS_TRACE_DEBUG1(m,p1)
+#define TCS_TRACE_DEBUG2(m,p1,p2)
+#define TCS_TRACE_DEBUG3(m,p1,p2,p3)
+#define TCS_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define TCS_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define TCS_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+
+#define TCS_TRACE_API0(m)
+#define TCS_TRACE_API1(m,p1)
+#define TCS_TRACE_API2(m,p1,p2)
+#define TCS_TRACE_API3(m,p1,p2,p3)
+#define TCS_TRACE_API4(m,p1,p2,p3,p4)
+#define TCS_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define TCS_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
/* Define tracing for ICP
*/
-#define ICP_TRACE_ERROR0(m)
+#define ICP_TRACE_ERROR0(m)
#define ICP_TRACE_ERROR1(m,p1)
-#define ICP_TRACE_ERROR2(m,p1,p2)
-#define ICP_TRACE_ERROR3(m,p1,p2,p3)
-#define ICP_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define ICP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define ICP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define ICP_TRACE_WARNING0(m)
-#define ICP_TRACE_WARNING1(m,p1)
-#define ICP_TRACE_WARNING2(m,p1,p2)
-#define ICP_TRACE_WARNING3(m,p1,p2,p3)
-#define ICP_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define ICP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define ICP_TRACE_ERROR2(m,p1,p2)
+#define ICP_TRACE_ERROR3(m,p1,p2,p3)
+#define ICP_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define ICP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define ICP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define ICP_TRACE_WARNING0(m)
+#define ICP_TRACE_WARNING1(m,p1)
+#define ICP_TRACE_WARNING2(m,p1,p2)
+#define ICP_TRACE_WARNING3(m,p1,p2,p3)
+#define ICP_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define ICP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
#define ICP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-#define ICP_TRACE_EVENT0(m)
-#define ICP_TRACE_EVENT1(m,p1)
-#define ICP_TRACE_EVENT2(m,p1,p2)
-#define ICP_TRACE_EVENT3(m,p1,p2,p3)
-#define ICP_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define ICP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define ICP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define ICP_TRACE_DEBUG0(m)
-#define ICP_TRACE_DEBUG1(m,p1)
-#define ICP_TRACE_DEBUG2(m,p1,p2)
-#define ICP_TRACE_DEBUG3(m,p1,p2,p3)
-#define ICP_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define ICP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define ICP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
-
-#define ICP_TRACE_API0(m)
-#define ICP_TRACE_API1(m,p1)
-#define ICP_TRACE_API2(m,p1,p2)
-#define ICP_TRACE_API3(m,p1,p2,p3)
-#define ICP_TRACE_API4(m,p1,p2,p3,p4)
-#define ICP_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define ICP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+#define ICP_TRACE_EVENT0(m)
+#define ICP_TRACE_EVENT1(m,p1)
+#define ICP_TRACE_EVENT2(m,p1,p2)
+#define ICP_TRACE_EVENT3(m,p1,p2,p3)
+#define ICP_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define ICP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define ICP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define ICP_TRACE_DEBUG0(m)
+#define ICP_TRACE_DEBUG1(m,p1)
+#define ICP_TRACE_DEBUG2(m,p1,p2)
+#define ICP_TRACE_DEBUG3(m,p1,p2,p3)
+#define ICP_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define ICP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define ICP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+
+#define ICP_TRACE_API0(m)
+#define ICP_TRACE_API1(m,p1)
+#define ICP_TRACE_API2(m,p1,p2)
+#define ICP_TRACE_API3(m,p1,p2,p3)
+#define ICP_TRACE_API4(m,p1,p2,p3,p4)
+#define ICP_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define ICP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
/* Define tracing for CTP
*/
-#define CTP_TRACE_ERROR0(m)
+#define CTP_TRACE_ERROR0(m)
#define CTP_TRACE_ERROR1(m,p1)
-#define CTP_TRACE_ERROR2(m,p1,p2)
-#define CTP_TRACE_ERROR3(m,p1,p2,p3)
-#define CTP_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define CTP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define CTP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define CTP_TRACE_WARNING0(m)
-#define CTP_TRACE_WARNING1(m,p1)
-#define CTP_TRACE_WARNING2(m,p1,p2)
-#define CTP_TRACE_WARNING3(m,p1,p2,p3)
-#define CTP_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define CTP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define CTP_TRACE_ERROR2(m,p1,p2)
+#define CTP_TRACE_ERROR3(m,p1,p2,p3)
+#define CTP_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define CTP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define CTP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define CTP_TRACE_WARNING0(m)
+#define CTP_TRACE_WARNING1(m,p1)
+#define CTP_TRACE_WARNING2(m,p1,p2)
+#define CTP_TRACE_WARNING3(m,p1,p2,p3)
+#define CTP_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define CTP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
#define CTP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-#define CTP_TRACE_EVENT0(m)
-#define CTP_TRACE_EVENT1(m,p1)
-#define CTP_TRACE_EVENT2(m,p1,p2)
-#define CTP_TRACE_EVENT3(m,p1,p2,p3)
-#define CTP_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define CTP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define CTP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define CTP_TRACE_DEBUG0(m)
-#define CTP_TRACE_DEBUG1(m,p1)
-#define CTP_TRACE_DEBUG2(m,p1,p2)
-#define CTP_TRACE_DEBUG3(m,p1,p2,p3)
-#define CTP_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define CTP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define CTP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
-
-#define CTP_TRACE_API0(m)
-#define CTP_TRACE_API1(m,p1)
-#define CTP_TRACE_API2(m,p1,p2)
-#define CTP_TRACE_API3(m,p1,p2,p3)
-#define CTP_TRACE_API4(m,p1,p2,p3,p4)
-#define CTP_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define CTP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+#define CTP_TRACE_EVENT0(m)
+#define CTP_TRACE_EVENT1(m,p1)
+#define CTP_TRACE_EVENT2(m,p1,p2)
+#define CTP_TRACE_EVENT3(m,p1,p2,p3)
+#define CTP_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define CTP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define CTP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define CTP_TRACE_DEBUG0(m)
+#define CTP_TRACE_DEBUG1(m,p1)
+#define CTP_TRACE_DEBUG2(m,p1,p2)
+#define CTP_TRACE_DEBUG3(m,p1,p2,p3)
+#define CTP_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define CTP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define CTP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+
+#define CTP_TRACE_API0(m)
+#define CTP_TRACE_API1(m,p1)
+#define CTP_TRACE_API2(m,p1,p2)
+#define CTP_TRACE_API3(m,p1,p2,p3)
+#define CTP_TRACE_API4(m,p1,p2,p3,p4)
+#define CTP_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define CTP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
/* define traces for headset profile */
-#define HSP2_TRACE_ERROR0(pcb,m)
-#define HSP2_TRACE_ERROR1(pcb,m,p1)
-#define HSP2_TRACE_ERROR2(pcb,m,p1,p2)
-#define HSP2_TRACE_ERROR3(pcb,m,p1,p2,p3)
-#define HSP2_TRACE_ERROR4(pcb,m,p1,p2,p3,p4)
-#define HSP2_TRACE_ERROR5(pcb,m,p1,p2,p3,p4,p5)
-#define HSP2_TRACE_ERROR6(pcb,m,p1,p2,p3,p4,p5,p6)
-
-#define HSP2_TRACE_WARNING0(pcb,m)
-#define HSP2_TRACE_WARNING1(pcb,m,p1)
-#define HSP2_TRACE_WARNING2(pcb,m,p1,p2)
-#define HSP2_TRACE_WARNING3(pcb,m,p1,p2,p3)
-#define HSP2_TRACE_WARNING4(pcb,m,p1,p2,p3,p4)
-#define HSP2_TRACE_WARNING5(pcb,m,p1,p2,p3,p4,p5)
-#define HSP2_TRACE_WARNING6(pcb,m,p1,p2,p3,p4,p5,p6)
-
-#define HSP2_TRACE_API0(pcb,m)
-#define HSP2_TRACE_API1(pcb,m,p1)
-#define HSP2_TRACE_API2(pcb,m,p1,p2)
-#define HSP2_TRACE_API3(pcb,m,p1,p2,p3)
-#define HSP2_TRACE_API4(pcb,m,p1,p2,p3,p4)
-#define HSP2_TRACE_API5(pcb,m,p1,p2,p3,p4,p5)
-#define HSP2_TRACE_API6(pcb,m,p1,p2,p3,p4,p5,p6)
-
-#define HSP2_TRACE_EVENT0(pcb,m)
-#define HSP2_TRACE_EVENT1(pcb,m,p1)
-#define HSP2_TRACE_EVENT2(pcb,m,p1,p2)
-#define HSP2_TRACE_EVENT3(pcb,m,p1,p2,p3)
-#define HSP2_TRACE_EVENT4(pcb,m,p1,p2,p3,p4)
-#define HSP2_TRACE_EVENT5(pcb,m,p1,p2,p3,p4,p5)
-#define HSP2_TRACE_EVENT6(pcb,m,p1,p2,p3,p4,p5,p6)
-
-#define HSP2_TRACE_DEBUG0(pcb,m)
-#define HSP2_TRACE_DEBUG1(pcb,m,p1)
-#define HSP2_TRACE_DEBUG2(pcb,m,p1,p2)
-#define HSP2_TRACE_DEBUG3(pcb,m,p1,p2,p3)
-#define HSP2_TRACE_DEBUG4(pcb,m,p1,p2,p3,p4)
-#define HSP2_TRACE_DEBUG5(pcb,m,p1,p2,p3,p4,p5)
-#define HSP2_TRACE_DEBUG6(pcb,m,p1,p2,p3,p4,p5,p6)
+#define HSP2_TRACE_ERROR0(pcb,m)
+#define HSP2_TRACE_ERROR1(pcb,m,p1)
+#define HSP2_TRACE_ERROR2(pcb,m,p1,p2)
+#define HSP2_TRACE_ERROR3(pcb,m,p1,p2,p3)
+#define HSP2_TRACE_ERROR4(pcb,m,p1,p2,p3,p4)
+#define HSP2_TRACE_ERROR5(pcb,m,p1,p2,p3,p4,p5)
+#define HSP2_TRACE_ERROR6(pcb,m,p1,p2,p3,p4,p5,p6)
+
+#define HSP2_TRACE_WARNING0(pcb,m)
+#define HSP2_TRACE_WARNING1(pcb,m,p1)
+#define HSP2_TRACE_WARNING2(pcb,m,p1,p2)
+#define HSP2_TRACE_WARNING3(pcb,m,p1,p2,p3)
+#define HSP2_TRACE_WARNING4(pcb,m,p1,p2,p3,p4)
+#define HSP2_TRACE_WARNING5(pcb,m,p1,p2,p3,p4,p5)
+#define HSP2_TRACE_WARNING6(pcb,m,p1,p2,p3,p4,p5,p6)
+
+#define HSP2_TRACE_API0(pcb,m)
+#define HSP2_TRACE_API1(pcb,m,p1)
+#define HSP2_TRACE_API2(pcb,m,p1,p2)
+#define HSP2_TRACE_API3(pcb,m,p1,p2,p3)
+#define HSP2_TRACE_API4(pcb,m,p1,p2,p3,p4)
+#define HSP2_TRACE_API5(pcb,m,p1,p2,p3,p4,p5)
+#define HSP2_TRACE_API6(pcb,m,p1,p2,p3,p4,p5,p6)
+
+#define HSP2_TRACE_EVENT0(pcb,m)
+#define HSP2_TRACE_EVENT1(pcb,m,p1)
+#define HSP2_TRACE_EVENT2(pcb,m,p1,p2)
+#define HSP2_TRACE_EVENT3(pcb,m,p1,p2,p3)
+#define HSP2_TRACE_EVENT4(pcb,m,p1,p2,p3,p4)
+#define HSP2_TRACE_EVENT5(pcb,m,p1,p2,p3,p4,p5)
+#define HSP2_TRACE_EVENT6(pcb,m,p1,p2,p3,p4,p5,p6)
+
+#define HSP2_TRACE_DEBUG0(pcb,m)
+#define HSP2_TRACE_DEBUG1(pcb,m,p1)
+#define HSP2_TRACE_DEBUG2(pcb,m,p1,p2)
+#define HSP2_TRACE_DEBUG3(pcb,m,p1,p2,p3)
+#define HSP2_TRACE_DEBUG4(pcb,m,p1,p2,p3,p4)
+#define HSP2_TRACE_DEBUG5(pcb,m,p1,p2,p3,p4,p5)
+#define HSP2_TRACE_DEBUG6(pcb,m,p1,p2,p3,p4,p5,p6)
/* Define tracing for the NFC unit
*/
-#define NFC_TRACE_ERROR0(m)
-#define NFC_TRACE_ERROR1(m,p1)
-#define NFC_TRACE_ERROR2(m,p1,p2)
-#define NFC_TRACE_ERROR3(m,p1,p2,p3)
-#define NFC_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define NFC_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define NFC_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define NFC_TRACE_WARNING0(m)
-#define NFC_TRACE_WARNING1(m,p1)
-#define NFC_TRACE_WARNING2(m,p1,p2)
-#define NFC_TRACE_WARNING3(m,p1,p2,p3)
-#define NFC_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define NFC_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define NFC_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define NFC_TRACE_API0(m)
-#define NFC_TRACE_API1(m,p1)
-#define NFC_TRACE_API2(m,p1,p2)
-#define NFC_TRACE_API3(m,p1,p2,p3)
-#define NFC_TRACE_API4(m,p1,p2,p3,p4)
-#define NFC_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define NFC_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
-
-#define NFC_TRACE_EVENT0(m)
-#define NFC_TRACE_EVENT1(m,p1)
-#define NFC_TRACE_EVENT2(m,p1,p2)
-#define NFC_TRACE_EVENT3(m,p1,p2,p3)
-#define NFC_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define NFC_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define NFC_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define NFC_TRACE_DEBUG0(m)
-#define NFC_TRACE_DEBUG1(m,p1)
-#define NFC_TRACE_DEBUG2(m,p1,p2)
-#define NFC_TRACE_DEBUG3(m,p1,p2,p3)
-#define NFC_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define NFC_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define NFC_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
-
-#define NCI_TRACE_ERROR0(m)
-#define NCI_TRACE_ERROR1(m,p1)
-#define NCI_TRACE_ERROR2(m,p1,p2)
-#define NCI_TRACE_ERROR3(m,p1,p2,p3)
-#define NCI_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define NCI_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define NCI_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define NCI_TRACE_WARNING0(m)
-#define NCI_TRACE_WARNING1(m,p1)
-#define NCI_TRACE_WARNING2(m,p1,p2)
-#define NCI_TRACE_WARNING3(m,p1,p2,p3)
-#define NCI_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define NCI_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define NCI_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define NCI_TRACE_API0(m)
-#define NCI_TRACE_API1(m,p1)
-#define NCI_TRACE_API2(m,p1,p2)
-#define NCI_TRACE_API3(m,p1,p2,p3)
-#define NCI_TRACE_API4(m,p1,p2,p3,p4)
-#define NCI_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define NCI_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
-
-#define NCI_TRACE_EVENT0(m)
-#define NCI_TRACE_EVENT1(m,p1)
-#define NCI_TRACE_EVENT2(m,p1,p2)
-#define NCI_TRACE_EVENT3(m,p1,p2,p3)
-#define NCI_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define NCI_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define NCI_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define NCI_TRACE_DEBUG0(m)
-#define NCI_TRACE_DEBUG1(m,p1)
-#define NCI_TRACE_DEBUG2(m,p1,p2)
-#define NCI_TRACE_DEBUG3(m,p1,p2,p3)
-#define NCI_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define NCI_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define NCI_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
-
-#define RW_TRACE_ERROR0(m)
-#define RW_TRACE_ERROR1(m,p1)
-#define RW_TRACE_ERROR2(m,p1,p2)
-#define RW_TRACE_ERROR3(m,p1,p2,p3)
-#define RW_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define RW_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define RW_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define RW_TRACE_WARNING0(m)
-#define RW_TRACE_WARNING1(m,p1)
-#define RW_TRACE_WARNING2(m,p1,p2)
-#define RW_TRACE_WARNING3(m,p1,p2,p3)
-#define RW_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define RW_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define NFC_TRACE_ERROR0(m)
+#define NFC_TRACE_ERROR1(m,p1)
+#define NFC_TRACE_ERROR2(m,p1,p2)
+#define NFC_TRACE_ERROR3(m,p1,p2,p3)
+#define NFC_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define NFC_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define NFC_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define NFC_TRACE_WARNING0(m)
+#define NFC_TRACE_WARNING1(m,p1)
+#define NFC_TRACE_WARNING2(m,p1,p2)
+#define NFC_TRACE_WARNING3(m,p1,p2,p3)
+#define NFC_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define NFC_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define NFC_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
+
+#define NFC_TRACE_API0(m)
+#define NFC_TRACE_API1(m,p1)
+#define NFC_TRACE_API2(m,p1,p2)
+#define NFC_TRACE_API3(m,p1,p2,p3)
+#define NFC_TRACE_API4(m,p1,p2,p3,p4)
+#define NFC_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define NFC_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+
+#define NFC_TRACE_EVENT0(m)
+#define NFC_TRACE_EVENT1(m,p1)
+#define NFC_TRACE_EVENT2(m,p1,p2)
+#define NFC_TRACE_EVENT3(m,p1,p2,p3)
+#define NFC_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define NFC_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define NFC_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define NFC_TRACE_DEBUG0(m)
+#define NFC_TRACE_DEBUG1(m,p1)
+#define NFC_TRACE_DEBUG2(m,p1,p2)
+#define NFC_TRACE_DEBUG3(m,p1,p2,p3)
+#define NFC_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define NFC_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define NFC_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+
+#define NCI_TRACE_ERROR0(m)
+#define NCI_TRACE_ERROR1(m,p1)
+#define NCI_TRACE_ERROR2(m,p1,p2)
+#define NCI_TRACE_ERROR3(m,p1,p2,p3)
+#define NCI_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define NCI_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define NCI_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define NCI_TRACE_WARNING0(m)
+#define NCI_TRACE_WARNING1(m,p1)
+#define NCI_TRACE_WARNING2(m,p1,p2)
+#define NCI_TRACE_WARNING3(m,p1,p2,p3)
+#define NCI_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define NCI_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define NCI_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
+
+#define NCI_TRACE_API0(m)
+#define NCI_TRACE_API1(m,p1)
+#define NCI_TRACE_API2(m,p1,p2)
+#define NCI_TRACE_API3(m,p1,p2,p3)
+#define NCI_TRACE_API4(m,p1,p2,p3,p4)
+#define NCI_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define NCI_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+
+#define NCI_TRACE_EVENT0(m)
+#define NCI_TRACE_EVENT1(m,p1)
+#define NCI_TRACE_EVENT2(m,p1,p2)
+#define NCI_TRACE_EVENT3(m,p1,p2,p3)
+#define NCI_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define NCI_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define NCI_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define NCI_TRACE_DEBUG0(m)
+#define NCI_TRACE_DEBUG1(m,p1)
+#define NCI_TRACE_DEBUG2(m,p1,p2)
+#define NCI_TRACE_DEBUG3(m,p1,p2,p3)
+#define NCI_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define NCI_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define NCI_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+
+#define RW_TRACE_ERROR0(m)
+#define RW_TRACE_ERROR1(m,p1)
+#define RW_TRACE_ERROR2(m,p1,p2)
+#define RW_TRACE_ERROR3(m,p1,p2,p3)
+#define RW_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define RW_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define RW_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define RW_TRACE_WARNING0(m)
+#define RW_TRACE_WARNING1(m,p1)
+#define RW_TRACE_WARNING2(m,p1,p2)
+#define RW_TRACE_WARNING3(m,p1,p2,p3)
+#define RW_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define RW_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
#define RW_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6) }
-#define RW_TRACE_API0(m)
-#define RW_TRACE_API1(m,p1)
-#define RW_TRACE_API2(m,p1,p2)
-#define RW_TRACE_API3(m,p1,p2,p3)
-#define RW_TRACE_API4(m,p1,p2,p3,p4)
-#define RW_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define RW_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
-
-#define RW_TRACE_EVENT0(m)
-#define RW_TRACE_EVENT1(m,p1)
-#define RW_TRACE_EVENT2(m,p1,p2)
-#define RW_TRACE_EVENT3(m,p1,p2,p3)
-#define RW_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define RW_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define RW_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define RW_TRACE_DEBUG0(m)
-#define RW_TRACE_DEBUG1(m,p1)
-#define RW_TRACE_DEBUG2(m,p1,p2)
-#define RW_TRACE_DEBUG3(m,p1,p2,p3)
-#define RW_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define RW_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define RW_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
-
-#define CE_TRACE_ERROR0(m)
-#define CE_TRACE_ERROR1(m,p1)
-#define CE_TRACE_ERROR2(m,p1,p2)
-#define CE_TRACE_ERROR3(m,p1,p2,p3)
-#define CE_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define CE_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define CE_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define CE_TRACE_WARNING0(m)
-#define CE_TRACE_WARNING1(m,p1)
-#define CE_TRACE_WARNING2(m,p1,p2)
-#define CE_TRACE_WARNING3(m,p1,p2,p3)
-#define CE_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define CE_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define CE_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define CE_TRACE_API0(m)
-#define CE_TRACE_API1(m,p1)
-#define CE_TRACE_API2(m,p1,p2)
-#define CE_TRACE_API3(m,p1,p2,p3)
-#define CE_TRACE_API4(m,p1,p2,p3,p4)
-#define CE_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define CE_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
-
-#define CE_TRACE_EVENT0(m)
-#define CE_TRACE_EVENT1(m,p1)
-#define CE_TRACE_EVENT2(m,p1,p2)
-#define CE_TRACE_EVENT3(m,p1,p2,p3)
-#define CE_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define CE_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define CE_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define CE_TRACE_DEBUG0(m)
-#define CE_TRACE_DEBUG1(m,p1)
-#define CE_TRACE_DEBUG2(m,p1,p2)
-#define CE_TRACE_DEBUG3(m,p1,p2,p3)
-#define CE_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define CE_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define CE_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
-
-#define NDEF_TRACE_ERROR0(m)
-#define NDEF_TRACE_ERROR1(m,p1)
-#define NDEF_TRACE_ERROR2(m,p1,p2)
-#define NDEF_TRACE_ERROR3(m,p1,p2,p3)
-#define NDEF_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define NDEF_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define NDEF_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define NDEF_TRACE_WARNING0(m)
-#define NDEF_TRACE_WARNING1(m,p1)
-#define NDEF_TRACE_WARNING2(m,p1,p2)
-#define NDEF_TRACE_WARNING3(m,p1,p2,p3)
-#define NDEF_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define NDEF_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define NDEF_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define NDEF_TRACE_API0(m)
-#define NDEF_TRACE_API1(m,p1)
-#define NDEF_TRACE_API2(m,p1,p2)
-#define NDEF_TRACE_API3(m,p1,p2,p3)
-#define NDEF_TRACE_API4(m,p1,p2,p3,p4)
-#define NDEF_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define NDEF_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
-
-#define NDEF_TRACE_EVENT0(m)
-#define NDEF_TRACE_EVENT1(m,p1)
-#define NDEF_TRACE_EVENT2(m,p1,p2)
-#define NDEF_TRACE_EVENT3(m,p1,p2,p3)
-#define NDEF_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define NDEF_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define NDEF_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define NDEF_TRACE_DEBUG0(m)
-#define NDEF_TRACE_DEBUG1(m,p1)
-#define NDEF_TRACE_DEBUG2(m,p1,p2)
-#define NDEF_TRACE_DEBUG3(m,p1,p2,p3)
-#define NDEF_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define NDEF_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define NDEF_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+#define RW_TRACE_API0(m)
+#define RW_TRACE_API1(m,p1)
+#define RW_TRACE_API2(m,p1,p2)
+#define RW_TRACE_API3(m,p1,p2,p3)
+#define RW_TRACE_API4(m,p1,p2,p3,p4)
+#define RW_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define RW_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+
+#define RW_TRACE_EVENT0(m)
+#define RW_TRACE_EVENT1(m,p1)
+#define RW_TRACE_EVENT2(m,p1,p2)
+#define RW_TRACE_EVENT3(m,p1,p2,p3)
+#define RW_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define RW_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define RW_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define RW_TRACE_DEBUG0(m)
+#define RW_TRACE_DEBUG1(m,p1)
+#define RW_TRACE_DEBUG2(m,p1,p2)
+#define RW_TRACE_DEBUG3(m,p1,p2,p3)
+#define RW_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define RW_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define RW_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+
+#define CE_TRACE_ERROR0(m)
+#define CE_TRACE_ERROR1(m,p1)
+#define CE_TRACE_ERROR2(m,p1,p2)
+#define CE_TRACE_ERROR3(m,p1,p2,p3)
+#define CE_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define CE_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define CE_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define CE_TRACE_WARNING0(m)
+#define CE_TRACE_WARNING1(m,p1)
+#define CE_TRACE_WARNING2(m,p1,p2)
+#define CE_TRACE_WARNING3(m,p1,p2,p3)
+#define CE_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define CE_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define CE_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
+
+#define CE_TRACE_API0(m)
+#define CE_TRACE_API1(m,p1)
+#define CE_TRACE_API2(m,p1,p2)
+#define CE_TRACE_API3(m,p1,p2,p3)
+#define CE_TRACE_API4(m,p1,p2,p3,p4)
+#define CE_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define CE_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+
+#define CE_TRACE_EVENT0(m)
+#define CE_TRACE_EVENT1(m,p1)
+#define CE_TRACE_EVENT2(m,p1,p2)
+#define CE_TRACE_EVENT3(m,p1,p2,p3)
+#define CE_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define CE_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define CE_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define CE_TRACE_DEBUG0(m)
+#define CE_TRACE_DEBUG1(m,p1)
+#define CE_TRACE_DEBUG2(m,p1,p2)
+#define CE_TRACE_DEBUG3(m,p1,p2,p3)
+#define CE_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define CE_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define CE_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+
+#define NDEF_TRACE_ERROR0(m)
+#define NDEF_TRACE_ERROR1(m,p1)
+#define NDEF_TRACE_ERROR2(m,p1,p2)
+#define NDEF_TRACE_ERROR3(m,p1,p2,p3)
+#define NDEF_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define NDEF_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define NDEF_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define NDEF_TRACE_WARNING0(m)
+#define NDEF_TRACE_WARNING1(m,p1)
+#define NDEF_TRACE_WARNING2(m,p1,p2)
+#define NDEF_TRACE_WARNING3(m,p1,p2,p3)
+#define NDEF_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define NDEF_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define NDEF_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
+
+#define NDEF_TRACE_API0(m)
+#define NDEF_TRACE_API1(m,p1)
+#define NDEF_TRACE_API2(m,p1,p2)
+#define NDEF_TRACE_API3(m,p1,p2,p3)
+#define NDEF_TRACE_API4(m,p1,p2,p3,p4)
+#define NDEF_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define NDEF_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+
+#define NDEF_TRACE_EVENT0(m)
+#define NDEF_TRACE_EVENT1(m,p1)
+#define NDEF_TRACE_EVENT2(m,p1,p2)
+#define NDEF_TRACE_EVENT3(m,p1,p2,p3)
+#define NDEF_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define NDEF_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define NDEF_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define NDEF_TRACE_DEBUG0(m)
+#define NDEF_TRACE_DEBUG1(m,p1)
+#define NDEF_TRACE_DEBUG2(m,p1,p2)
+#define NDEF_TRACE_DEBUG3(m,p1,p2,p3)
+#define NDEF_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define NDEF_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define NDEF_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
/* Define tracing for the NFA unit
*/
@@ -3468,255 +3468,255 @@ EXPORT_API extern void BTTRC_StackTrace6(tBTTRC_LAYER_ID layer_id,
/* define traces for HID Host */
-#define HIDH_TRACE_ERROR0(m)
-#define HIDH_TRACE_ERROR1(m,p1)
-#define HIDH_TRACE_ERROR2(m,p1,p2)
-#define HIDH_TRACE_ERROR3(m,p1,p2,p3)
-#define HIDH_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define HIDH_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define HIDH_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define HIDH_TRACE_WARNING0(m)
-#define HIDH_TRACE_WARNING1(m,p1)
-#define HIDH_TRACE_WARNING2(m,p1,p2)
-#define HIDH_TRACE_WARNING3(m,p1,p2,p3)
-#define HIDH_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define HIDH_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define HIDH_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define HIDH_TRACE_API0(m)
-#define HIDH_TRACE_API1(m,p1)
-#define HIDH_TRACE_API2(m,p1,p2)
-#define HIDH_TRACE_API3(m,p1,p2,p3)
-#define HIDH_TRACE_API4(m,p1,p2,p3,p4)
-#define HIDH_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define HIDH_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
-
-#define HIDH_TRACE_EVENT0(m)
-#define HIDH_TRACE_EVENT1(m,p1)
-#define HIDH_TRACE_EVENT2(m,p1,p2)
-#define HIDH_TRACE_EVENT3(m,p1,p2,p3)
-#define HIDH_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define HIDH_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define HIDH_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define HIDH_TRACE_DEBUG0(m)
-#define HIDH_TRACE_DEBUG1(m,p1)
-#define HIDH_TRACE_DEBUG2(m,p1,p2)
-#define HIDH_TRACE_DEBUG3(m,p1,p2,p3)
-#define HIDH_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define HIDH_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define HIDH_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+#define HIDH_TRACE_ERROR0(m)
+#define HIDH_TRACE_ERROR1(m,p1)
+#define HIDH_TRACE_ERROR2(m,p1,p2)
+#define HIDH_TRACE_ERROR3(m,p1,p2,p3)
+#define HIDH_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define HIDH_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define HIDH_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define HIDH_TRACE_WARNING0(m)
+#define HIDH_TRACE_WARNING1(m,p1)
+#define HIDH_TRACE_WARNING2(m,p1,p2)
+#define HIDH_TRACE_WARNING3(m,p1,p2,p3)
+#define HIDH_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define HIDH_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define HIDH_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
+
+#define HIDH_TRACE_API0(m)
+#define HIDH_TRACE_API1(m,p1)
+#define HIDH_TRACE_API2(m,p1,p2)
+#define HIDH_TRACE_API3(m,p1,p2,p3)
+#define HIDH_TRACE_API4(m,p1,p2,p3,p4)
+#define HIDH_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define HIDH_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+
+#define HIDH_TRACE_EVENT0(m)
+#define HIDH_TRACE_EVENT1(m,p1)
+#define HIDH_TRACE_EVENT2(m,p1,p2)
+#define HIDH_TRACE_EVENT3(m,p1,p2,p3)
+#define HIDH_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define HIDH_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define HIDH_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define HIDH_TRACE_DEBUG0(m)
+#define HIDH_TRACE_DEBUG1(m,p1)
+#define HIDH_TRACE_DEBUG2(m,p1,p2)
+#define HIDH_TRACE_DEBUG3(m,p1,p2,p3)
+#define HIDH_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define HIDH_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define HIDH_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
/* define traces for HID Device */
-#define HIDD_TRACE_ERROR0(m)
-#define HIDD_TRACE_ERROR1(m,p1)
-#define HIDD_TRACE_ERROR2(m,p1,p2)
-#define HIDD_TRACE_ERROR3(m,p1,p2,p3)
-#define HIDD_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define HIDD_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define HIDD_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define HIDD_TRACE_WARNING0(m)
-#define HIDD_TRACE_WARNING1(m,p1)
-#define HIDD_TRACE_WARNING2(m,p1,p2)
-#define HIDD_TRACE_WARNING3(m,p1,p2,p3)
-#define HIDD_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define HIDD_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define HIDD_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define HIDD_TRACE_API0(m)
-#define HIDD_TRACE_API1(m,p1)
-#define HIDD_TRACE_API2(m,p1,p2)
-#define HIDD_TRACE_API3(m,p1,p2,p3)
-#define HIDD_TRACE_API4(m,p1,p2,p3,p4)
-#define HIDD_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define HIDD_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
-
-#define HIDD_TRACE_EVENT0(m)
-#define HIDD_TRACE_EVENT1(m,p1)
-#define HIDD_TRACE_EVENT2(m,p1,p2)
-#define HIDD_TRACE_EVENT3(m,p1,p2,p3)
-#define HIDD_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define HIDD_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define HIDD_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define HIDD_TRACE_DEBUG0(m)
-#define HIDD_TRACE_DEBUG1(m,p1)
-#define HIDD_TRACE_DEBUG2(m,p1,p2)
-#define HIDD_TRACE_DEBUG3(m,p1,p2,p3)
-#define HIDD_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define HIDD_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define HIDD_TRACE_ERROR0(m)
+#define HIDD_TRACE_ERROR1(m,p1)
+#define HIDD_TRACE_ERROR2(m,p1,p2)
+#define HIDD_TRACE_ERROR3(m,p1,p2,p3)
+#define HIDD_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define HIDD_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define HIDD_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define HIDD_TRACE_WARNING0(m)
+#define HIDD_TRACE_WARNING1(m,p1)
+#define HIDD_TRACE_WARNING2(m,p1,p2)
+#define HIDD_TRACE_WARNING3(m,p1,p2,p3)
+#define HIDD_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define HIDD_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define HIDD_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
+
+#define HIDD_TRACE_API0(m)
+#define HIDD_TRACE_API1(m,p1)
+#define HIDD_TRACE_API2(m,p1,p2)
+#define HIDD_TRACE_API3(m,p1,p2,p3)
+#define HIDD_TRACE_API4(m,p1,p2,p3,p4)
+#define HIDD_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define HIDD_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+
+#define HIDD_TRACE_EVENT0(m)
+#define HIDD_TRACE_EVENT1(m,p1)
+#define HIDD_TRACE_EVENT2(m,p1,p2)
+#define HIDD_TRACE_EVENT3(m,p1,p2,p3)
+#define HIDD_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define HIDD_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define HIDD_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define HIDD_TRACE_DEBUG0(m)
+#define HIDD_TRACE_DEBUG1(m,p1)
+#define HIDD_TRACE_DEBUG2(m,p1,p2)
+#define HIDD_TRACE_DEBUG3(m,p1,p2,p3)
+#define HIDD_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define HIDD_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
#define HIDD_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
/* define traces for DUN */
-#define DUN_TRACE_ERROR0(m)
-#define DUN_TRACE_ERROR1(m,p1)
-#define DUN_TRACE_ERROR2(m,p1,p2)
-#define DUN_TRACE_ERROR3(m,p1,p2,p3)
-#define DUN_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define DUN_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define DUN_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define DUN_TRACE_WARNING0(m)
-#define DUN_TRACE_WARNING1(m,p1)
-#define DUN_TRACE_WARNING2(m,p1,p2)
-#define DUN_TRACE_WARNING3(m,p1,p2,p3)
-#define DUN_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define DUN_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define DUN_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define DUN_TRACE_API0(m)
-#define DUN_TRACE_API1(m,p1)
-#define DUN_TRACE_API2(m,p1,p2)
-#define DUN_TRACE_API3(m,p1,p2,p3)
-#define DUN_TRACE_API4(m,p1,p2,p3,p4)
-#define DUN_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define DUN_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
-
-#define DUN_TRACE_EVENT0(m)
-#define DUN_TRACE_EVENT1(m,p1)
-#define DUN_TRACE_EVENT2(m,p1,p2)
-#define DUN_TRACE_EVENT3(m,p1,p2,p3)
-#define DUN_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define DUN_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define DUN_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define DUN_TRACE_DEBUG0(m)
-#define DUN_TRACE_DEBUG1(m,p1)
-#define DUN_TRACE_DEBUG2(m,p1,p2)
-#define DUN_TRACE_DEBUG3(m,p1,p2,p3)
-#define DUN_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define DUN_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define DUN_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+#define DUN_TRACE_ERROR0(m)
+#define DUN_TRACE_ERROR1(m,p1)
+#define DUN_TRACE_ERROR2(m,p1,p2)
+#define DUN_TRACE_ERROR3(m,p1,p2,p3)
+#define DUN_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define DUN_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define DUN_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define DUN_TRACE_WARNING0(m)
+#define DUN_TRACE_WARNING1(m,p1)
+#define DUN_TRACE_WARNING2(m,p1,p2)
+#define DUN_TRACE_WARNING3(m,p1,p2,p3)
+#define DUN_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define DUN_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define DUN_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
+
+#define DUN_TRACE_API0(m)
+#define DUN_TRACE_API1(m,p1)
+#define DUN_TRACE_API2(m,p1,p2)
+#define DUN_TRACE_API3(m,p1,p2,p3)
+#define DUN_TRACE_API4(m,p1,p2,p3,p4)
+#define DUN_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define DUN_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+
+#define DUN_TRACE_EVENT0(m)
+#define DUN_TRACE_EVENT1(m,p1)
+#define DUN_TRACE_EVENT2(m,p1,p2)
+#define DUN_TRACE_EVENT3(m,p1,p2,p3)
+#define DUN_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define DUN_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define DUN_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define DUN_TRACE_DEBUG0(m)
+#define DUN_TRACE_DEBUG1(m,p1)
+#define DUN_TRACE_DEBUG2(m,p1,p2)
+#define DUN_TRACE_DEBUG3(m,p1,p2,p3)
+#define DUN_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define DUN_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define DUN_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
/* define traces for HCRP */
-#define HCRP_TRACE_ERROR0(m)
-#define HCRP_TRACE_ERROR1(m,p1)
-#define HCRP_TRACE_ERROR2(m,p1,p2)
-#define HCRP_TRACE_ERROR3(m,p1,p2,p3)
-#define HCRP_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define HCRP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define HCRP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define HCRP_TRACE_WARNING0(m)
-#define HCRP_TRACE_WARNING1(m,p1)
-#define HCRP_TRACE_WARNING2(m,p1,p2)
-#define HCRP_TRACE_WARNING3(m,p1,p2,p3)
-#define HCRP_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define HCRP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define HCRP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define HCRP_TRACE_API0(m)
-#define HCRP_TRACE_API1(m,p1)
-#define HCRP_TRACE_API2(m,p1,p2)
-#define HCRP_TRACE_API3(m,p1,p2,p3)
-#define HCRP_TRACE_API4(m,p1,p2,p3,p4)
-#define HCRP_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define HCRP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
-
-#define HCRP_TRACE_EVENT0(m)
-#define HCRP_TRACE_EVENT1(m,p1)
-#define HCRP_TRACE_EVENT2(m,p1,p2)
-#define HCRP_TRACE_EVENT3(m,p1,p2,p3)
-#define HCRP_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define HCRP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define HCRP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define HCRP_TRACE_DEBUG0(m)
-#define HCRP_TRACE_DEBUG1(m,p1)
-#define HCRP_TRACE_DEBUG2(m,p1,p2)
-#define HCRP_TRACE_DEBUG3(m,p1,p2,p3)
-#define HCRP_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define HCRP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define HCRP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+#define HCRP_TRACE_ERROR0(m)
+#define HCRP_TRACE_ERROR1(m,p1)
+#define HCRP_TRACE_ERROR2(m,p1,p2)
+#define HCRP_TRACE_ERROR3(m,p1,p2,p3)
+#define HCRP_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define HCRP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define HCRP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define HCRP_TRACE_WARNING0(m)
+#define HCRP_TRACE_WARNING1(m,p1)
+#define HCRP_TRACE_WARNING2(m,p1,p2)
+#define HCRP_TRACE_WARNING3(m,p1,p2,p3)
+#define HCRP_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define HCRP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define HCRP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
+
+#define HCRP_TRACE_API0(m)
+#define HCRP_TRACE_API1(m,p1)
+#define HCRP_TRACE_API2(m,p1,p2)
+#define HCRP_TRACE_API3(m,p1,p2,p3)
+#define HCRP_TRACE_API4(m,p1,p2,p3,p4)
+#define HCRP_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define HCRP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+
+#define HCRP_TRACE_EVENT0(m)
+#define HCRP_TRACE_EVENT1(m,p1)
+#define HCRP_TRACE_EVENT2(m,p1,p2)
+#define HCRP_TRACE_EVENT3(m,p1,p2,p3)
+#define HCRP_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define HCRP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define HCRP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define HCRP_TRACE_DEBUG0(m)
+#define HCRP_TRACE_DEBUG1(m,p1)
+#define HCRP_TRACE_DEBUG2(m,p1,p2)
+#define HCRP_TRACE_DEBUG3(m,p1,p2,p3)
+#define HCRP_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define HCRP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define HCRP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
/* define traces for HCRP */
-#define HCRPM_TRACE_ERROR0(m)
-#define HCRPM_TRACE_ERROR1(m,p1)
-#define HCRPM_TRACE_ERROR2(m,p1,p2)
-#define HCRPM_TRACE_ERROR3(m,p1,p2,p3)
-#define HCRPM_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define HCRPM_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define HCRPM_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define HCRPM_TRACE_WARNING0(m)
-#define HCRPM_TRACE_WARNING1(m,p1)
-#define HCRPM_TRACE_WARNING2(m,p1,p2)
-#define HCRPM_TRACE_WARNING3(m,p1,p2,p3)
-#define HCRPM_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define HCRPM_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define HCRPM_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define HCRPM_TRACE_API0(m)
-#define HCRPM_TRACE_API1(m,p1)
-#define HCRPM_TRACE_API2(m,p1,p2)
-#define HCRPM_TRACE_API3(m,p1,p2,p3)
-#define HCRPM_TRACE_API4(m,p1,p2,p3,p4)
-#define HCRPM_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define HCRPM_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
-
-#define HCRPM_TRACE_EVENT0(m)
-#define HCRPM_TRACE_EVENT1(m,p1)
-#define HCRPM_TRACE_EVENT2(m,p1,p2)
-#define HCRPM_TRACE_EVENT3(m,p1,p2,p3)
-#define HCRPM_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define HCRPM_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define HCRPM_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define HCRPM_TRACE_DEBUG0(m)
-#define HCRPM_TRACE_DEBUG1(m,p1)
-#define HCRPM_TRACE_DEBUG2(m,p1,p2)
-#define HCRPM_TRACE_DEBUG3(m,p1,p2,p3)
-#define HCRPM_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define HCRPM_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define HCRPM_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+#define HCRPM_TRACE_ERROR0(m)
+#define HCRPM_TRACE_ERROR1(m,p1)
+#define HCRPM_TRACE_ERROR2(m,p1,p2)
+#define HCRPM_TRACE_ERROR3(m,p1,p2,p3)
+#define HCRPM_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define HCRPM_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define HCRPM_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define HCRPM_TRACE_WARNING0(m)
+#define HCRPM_TRACE_WARNING1(m,p1)
+#define HCRPM_TRACE_WARNING2(m,p1,p2)
+#define HCRPM_TRACE_WARNING3(m,p1,p2,p3)
+#define HCRPM_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define HCRPM_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define HCRPM_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
+
+#define HCRPM_TRACE_API0(m)
+#define HCRPM_TRACE_API1(m,p1)
+#define HCRPM_TRACE_API2(m,p1,p2)
+#define HCRPM_TRACE_API3(m,p1,p2,p3)
+#define HCRPM_TRACE_API4(m,p1,p2,p3,p4)
+#define HCRPM_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define HCRPM_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+
+#define HCRPM_TRACE_EVENT0(m)
+#define HCRPM_TRACE_EVENT1(m,p1)
+#define HCRPM_TRACE_EVENT2(m,p1,p2)
+#define HCRPM_TRACE_EVENT3(m,p1,p2,p3)
+#define HCRPM_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define HCRPM_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define HCRPM_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define HCRPM_TRACE_DEBUG0(m)
+#define HCRPM_TRACE_DEBUG1(m,p1)
+#define HCRPM_TRACE_DEBUG2(m,p1,p2)
+#define HCRPM_TRACE_DEBUG3(m,p1,p2,p3)
+#define HCRPM_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define HCRPM_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define HCRPM_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
/* define traces for RPC */
-#define RPC_TRACE_ERROR0(m)
-#define RPC_TRACE_ERROR1(m,p1)
-#define RPC_TRACE_ERROR2(m,p1,p2)
-#define RPC_TRACE_ERROR3(m,p1,p2,p3)
-#define RPC_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define RPC_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define RPC_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define RPC_TRACE_WARNING0(m)
-#define RPC_TRACE_WARNING1(m,p1)
-#define RPC_TRACE_WARNING2(m,p1,p2)
-#define RPC_TRACE_WARNING3(m,p1,p2,p3)
-#define RPC_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define RPC_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define RPC_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define RPC_TRACE_API0(m)
-#define RPC_TRACE_API1(m,p1)
-#define RPC_TRACE_API2(m,p1,p2)
-#define RPC_TRACE_API3(m,p1,p2,p3)
-#define RPC_TRACE_API4(m,p1,p2,p3,p4)
-#define RPC_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define RPC_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
-
-#define RPC_TRACE_EVENT0(m)
-#define RPC_TRACE_EVENT1(m,p1)
-#define RPC_TRACE_EVENT2(m,p1,p2)
-#define RPC_TRACE_EVENT3(m,p1,p2,p3)
-#define RPC_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define RPC_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define RPC_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define RPC_TRACE_DEBUG0(m)
-#define RPC_TRACE_DEBUG1(m,p1)
-#define RPC_TRACE_DEBUG2(m,p1,p2)
-#define RPC_TRACE_DEBUG3(m,p1,p2,p3)
-#define RPC_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define RPC_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define RPC_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+#define RPC_TRACE_ERROR0(m)
+#define RPC_TRACE_ERROR1(m,p1)
+#define RPC_TRACE_ERROR2(m,p1,p2)
+#define RPC_TRACE_ERROR3(m,p1,p2,p3)
+#define RPC_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define RPC_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define RPC_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define RPC_TRACE_WARNING0(m)
+#define RPC_TRACE_WARNING1(m,p1)
+#define RPC_TRACE_WARNING2(m,p1,p2)
+#define RPC_TRACE_WARNING3(m,p1,p2,p3)
+#define RPC_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define RPC_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define RPC_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
+
+#define RPC_TRACE_API0(m)
+#define RPC_TRACE_API1(m,p1)
+#define RPC_TRACE_API2(m,p1,p2)
+#define RPC_TRACE_API3(m,p1,p2,p3)
+#define RPC_TRACE_API4(m,p1,p2,p3,p4)
+#define RPC_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define RPC_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+
+#define RPC_TRACE_EVENT0(m)
+#define RPC_TRACE_EVENT1(m,p1)
+#define RPC_TRACE_EVENT2(m,p1,p2)
+#define RPC_TRACE_EVENT3(m,p1,p2,p3)
+#define RPC_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define RPC_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define RPC_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define RPC_TRACE_DEBUG0(m)
+#define RPC_TRACE_DEBUG1(m,p1)
+#define RPC_TRACE_DEBUG2(m,p1,p2)
+#define RPC_TRACE_DEBUG3(m,p1,p2,p3)
+#define RPC_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define RPC_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define RPC_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
/* define traces for BNEP */
@@ -3770,21 +3770,21 @@ EXPORT_API extern void BTTRC_StackTrace6(tBTTRC_LAYER_ID layer_id,
#define MSKB_TRACE_5(m,p1,p2,p3,p4,p5)
#define MSKB_TRACE_6(m,p1,p2,p3,p4,p5,p6)
-#define MSKB_DEBUG_0(m)
-#define MSKB_DEBUG_1(m,p1)
-#define MSKB_DEBUG_2(m,p1,p2)
-#define MSKB_DEBUG_3(m,p1,p2,p3)
-#define MSKB_DEBUG_4(m,p1,p2,p3,p4)
-#define MSKB_DEBUG_5(m,p1,p2,p3,p4,p5)
-#define MSKB_DEBUG_6(m,p1,p2,p3,p4,p5,p6)
-
-#define MSKB_ERROR_0(m)
-#define MSKB_ERROR_1(m,p1)
-#define MSKB_ERROR_2(m,p1,p2)
-#define MSKB_ERROR_3(m,p1,p2,p3)
-#define MSKB_ERROR_4(m,p1,p2,p3,p4)
-#define MSKB_ERROR_5(m,p1,p2,p3,p4,p5)
-#define MSKB_ERROR_6(m,p1,p2,p3,p4,p5,p6)
+#define MSKB_DEBUG_0(m)
+#define MSKB_DEBUG_1(m,p1)
+#define MSKB_DEBUG_2(m,p1,p2)
+#define MSKB_DEBUG_3(m,p1,p2,p3)
+#define MSKB_DEBUG_4(m,p1,p2,p3,p4)
+#define MSKB_DEBUG_5(m,p1,p2,p3,p4,p5)
+#define MSKB_DEBUG_6(m,p1,p2,p3,p4,p5,p6)
+
+#define MSKB_ERROR_0(m)
+#define MSKB_ERROR_1(m,p1)
+#define MSKB_ERROR_2(m,p1,p2)
+#define MSKB_ERROR_3(m,p1,p2,p3)
+#define MSKB_ERROR_4(m,p1,p2,p3,p4)
+#define MSKB_ERROR_5(m,p1,p2,p3,p4,p5)
+#define MSKB_ERROR_6(m,p1,p2,p3,p4,p5,p6)
/* define traces for PAN */
@@ -3872,87 +3872,87 @@ EXPORT_API extern void BTTRC_StackTrace6(tBTTRC_LAYER_ID layer_id,
/* Define tracing for the OPP profile
*/
-#define OPP_TRACE_ERROR0(m)
-#define OPP_TRACE_ERROR1(m,p1)
-#define OPP_TRACE_ERROR2(m,p1,p2)
-#define OPP_TRACE_ERROR3(m,p1,p2,p3)
-#define OPP_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define OPP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define OPP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define OPP_TRACE_WARNING0(m)
-#define OPP_TRACE_WARNING1(m,p1)
-#define OPP_TRACE_WARNING2(m,p1,p2)
-#define OPP_TRACE_WARNING3(m,p1,p2,p3)
-#define OPP_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define OPP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define OPP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define OPP_TRACE_EVENT0(m)
-#define OPP_TRACE_EVENT1(m,p1)
-#define OPP_TRACE_EVENT2(m,p1,p2)
-#define OPP_TRACE_EVENT3(m,p1,p2,p3)
-#define OPP_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define OPP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define OPP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define OPP_TRACE_DEBUG0(m)
-#define OPP_TRACE_DEBUG1(m,p1)
-#define OPP_TRACE_DEBUG2(m,p1,p2)
-#define OPP_TRACE_DEBUG3(m,p1,p2,p3)
-#define OPP_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define OPP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define OPP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
-
-#define OPP_TRACE_API0(m)
-#define OPP_TRACE_API1(m,p1)
-#define OPP_TRACE_API2(m,p1,p2)
-#define OPP_TRACE_API3(m,p1,p2,p3)
-#define OPP_TRACE_API4(m,p1,p2,p3,p4)
-#define OPP_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define OPP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+#define OPP_TRACE_ERROR0(m)
+#define OPP_TRACE_ERROR1(m,p1)
+#define OPP_TRACE_ERROR2(m,p1,p2)
+#define OPP_TRACE_ERROR3(m,p1,p2,p3)
+#define OPP_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define OPP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define OPP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define OPP_TRACE_WARNING0(m)
+#define OPP_TRACE_WARNING1(m,p1)
+#define OPP_TRACE_WARNING2(m,p1,p2)
+#define OPP_TRACE_WARNING3(m,p1,p2,p3)
+#define OPP_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define OPP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define OPP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
+
+#define OPP_TRACE_EVENT0(m)
+#define OPP_TRACE_EVENT1(m,p1)
+#define OPP_TRACE_EVENT2(m,p1,p2)
+#define OPP_TRACE_EVENT3(m,p1,p2,p3)
+#define OPP_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define OPP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define OPP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define OPP_TRACE_DEBUG0(m)
+#define OPP_TRACE_DEBUG1(m,p1)
+#define OPP_TRACE_DEBUG2(m,p1,p2)
+#define OPP_TRACE_DEBUG3(m,p1,p2,p3)
+#define OPP_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define OPP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define OPP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+
+#define OPP_TRACE_API0(m)
+#define OPP_TRACE_API1(m,p1)
+#define OPP_TRACE_API2(m,p1,p2)
+#define OPP_TRACE_API3(m,p1,p2,p3)
+#define OPP_TRACE_API4(m,p1,p2,p3,p4)
+#define OPP_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define OPP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
/* Define tracing for the FTP profile
*/
-#define FTP_TRACE_ERROR0(m)
-#define FTP_TRACE_ERROR1(m,p1)
-#define FTP_TRACE_ERROR2(m,p1,p2)
-#define FTP_TRACE_ERROR3(m,p1,p2,p3)
-#define FTP_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define FTP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define FTP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define FTP_TRACE_WARNING0(m)
-#define FTP_TRACE_WARNING1(m,p1)
-#define FTP_TRACE_WARNING2(m,p1,p2)
-#define FTP_TRACE_WARNING3(m,p1,p2,p3)
-#define FTP_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define FTP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define FTP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define FTP_TRACE_EVENT0(m)
-#define FTP_TRACE_EVENT1(m,p1)
-#define FTP_TRACE_EVENT2(m,p1,p2)
-#define FTP_TRACE_EVENT3(m,p1,p2,p3)
-#define FTP_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define FTP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define FTP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define FTP_TRACE_DEBUG0(m)
-#define FTP_TRACE_DEBUG1(m,p1)
-#define FTP_TRACE_DEBUG2(m,p1,p2)
-#define FTP_TRACE_DEBUG3(m,p1,p2,p3)
-#define FTP_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define FTP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define FTP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
-
-#define FTP_TRACE_API0(m)
-#define FTP_TRACE_API1(m,p1)
-#define FTP_TRACE_API2(m,p1,p2)
-#define FTP_TRACE_API3(m,p1,p2,p3)
-#define FTP_TRACE_API4(m,p1,p2,p3,p4)
-#define FTP_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define FTP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+#define FTP_TRACE_ERROR0(m)
+#define FTP_TRACE_ERROR1(m,p1)
+#define FTP_TRACE_ERROR2(m,p1,p2)
+#define FTP_TRACE_ERROR3(m,p1,p2,p3)
+#define FTP_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define FTP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define FTP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define FTP_TRACE_WARNING0(m)
+#define FTP_TRACE_WARNING1(m,p1)
+#define FTP_TRACE_WARNING2(m,p1,p2)
+#define FTP_TRACE_WARNING3(m,p1,p2,p3)
+#define FTP_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define FTP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define FTP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
+
+#define FTP_TRACE_EVENT0(m)
+#define FTP_TRACE_EVENT1(m,p1)
+#define FTP_TRACE_EVENT2(m,p1,p2)
+#define FTP_TRACE_EVENT3(m,p1,p2,p3)
+#define FTP_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define FTP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define FTP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define FTP_TRACE_DEBUG0(m)
+#define FTP_TRACE_DEBUG1(m,p1)
+#define FTP_TRACE_DEBUG2(m,p1,p2)
+#define FTP_TRACE_DEBUG3(m,p1,p2,p3)
+#define FTP_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define FTP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define FTP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+
+#define FTP_TRACE_API0(m)
+#define FTP_TRACE_API1(m,p1)
+#define FTP_TRACE_API2(m,p1,p2)
+#define FTP_TRACE_API3(m,p1,p2,p3)
+#define FTP_TRACE_API4(m,p1,p2,p3,p4)
+#define FTP_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define FTP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
/* Define tracing for the A2DP profile
@@ -4042,145 +4042,145 @@ EXPORT_API extern void BTTRC_StackTrace6(tBTTRC_LAYER_ID layer_id,
/* Define tracing for the LM unit
*/
-#define LMP_TRACE_ERROR0(m)
-#define LMP_TRACE_ERROR1(m,p1)
-#define LMP_TRACE_ERROR2(m,p1,p2)
-#define LMP_TRACE_ERROR3(m,p1,p2,p3)
-#define LMP_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define LMP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define LMP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define LMP_TRACE_WARNING0(m)
-#define LMP_TRACE_WARNING1(m,p1)
-#define LMP_TRACE_WARNING2(m,p1,p2)
-#define LMP_TRACE_WARNING3(m,p1,p2,p3)
-#define LMP_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define LMP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define LMP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define LMP_TRACE_EVENT0(m)
-#define LMP_TRACE_EVENT1(m,p1)
-#define LMP_TRACE_EVENT2(m,p1,p2)
-#define LMP_TRACE_EVENT3(m,p1,p2,p3)
-#define LMP_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define LMP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define LMP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define LMP_TRACE_DEBUG0(m)
-#define LMP_TRACE_DEBUG1(m,p1)
-#define LMP_TRACE_DEBUG2(m,p1,p2)
-#define LMP_TRACE_DEBUG3(m,p1,p2,p3)
-#define LMP_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define LMP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define LMP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+#define LMP_TRACE_ERROR0(m)
+#define LMP_TRACE_ERROR1(m,p1)
+#define LMP_TRACE_ERROR2(m,p1,p2)
+#define LMP_TRACE_ERROR3(m,p1,p2,p3)
+#define LMP_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define LMP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define LMP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define LMP_TRACE_WARNING0(m)
+#define LMP_TRACE_WARNING1(m,p1)
+#define LMP_TRACE_WARNING2(m,p1,p2)
+#define LMP_TRACE_WARNING3(m,p1,p2,p3)
+#define LMP_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define LMP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define LMP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
+
+#define LMP_TRACE_EVENT0(m)
+#define LMP_TRACE_EVENT1(m,p1)
+#define LMP_TRACE_EVENT2(m,p1,p2)
+#define LMP_TRACE_EVENT3(m,p1,p2,p3)
+#define LMP_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define LMP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define LMP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define LMP_TRACE_DEBUG0(m)
+#define LMP_TRACE_DEBUG1(m,p1)
+#define LMP_TRACE_DEBUG2(m,p1,p2)
+#define LMP_TRACE_DEBUG3(m,p1,p2,p3)
+#define LMP_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define LMP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define LMP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
/* Define tracing for the LC unit
*/
-#define LC_TRACE_ERROR0(m)
-#define LC_TRACE_ERROR1(m,p1)
-#define LC_TRACE_ERROR2(m,p1,p2)
-#define LC_TRACE_ERROR3(m,p1,p2,p3)
-#define LC_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define LC_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define LC_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define LC_TRACE_WARNING0(m)
-#define LC_TRACE_WARNING1(m,p1)
-#define LC_TRACE_WARNING2(m,p1,p2)
-#define LC_TRACE_WARNING3(m,p1,p2,p3)
-#define LC_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define LC_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define LC_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define LC_TRACE_EVENT0(m)
-#define LC_TRACE_EVENT1(m,p1)
-#define LC_TRACE_EVENT2(m,p1,p2)
-#define LC_TRACE_EVENT3(m,p1,p2,p3)
-#define LC_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define LC_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define LC_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define LC_TRACE_DEBUG0(m)
-#define LC_TRACE_DEBUG1(m,p1)
-#define LC_TRACE_DEBUG2(m,p1,p2)
-#define LC_TRACE_DEBUG3(m,p1,p2,p3)
-#define LC_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define LC_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define LC_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
-
-#define SDA_TRACE_ERROR0(m)
-#define SDA_TRACE_ERROR1(m,p1)
-#define SDA_TRACE_ERROR2(m,p1,p2)
-#define SDA_TRACE_ERROR3(m,p1,p2,p3)
-#define SDA_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define SDA_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define SDA_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define SDA_TRACE_WARNING0(m)
-#define SDA_TRACE_WARNING1(m,p1)
-#define SDA_TRACE_WARNING2(m,p1,p2)
-#define SDA_TRACE_WARNING3(m,p1,p2,p3)
-#define SDA_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define SDA_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define SDA_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define SDA_TRACE_EVENT0(m)
-#define SDA_TRACE_EVENT1(m,p1)
-#define SDA_TRACE_EVENT2(m,p1,p2)
-#define SDA_TRACE_EVENT3(m,p1,p2,p3)
-#define SDA_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define SDA_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define SDA_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define SDA_TRACE_DEBUG0(m)
-#define SDA_TRACE_DEBUG1(m,p1)
-#define SDA_TRACE_DEBUG2(m,p1,p2)
-#define SDA_TRACE_DEBUG3(m,p1,p2,p3)
-#define SDA_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define SDA_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define SDA_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+#define LC_TRACE_ERROR0(m)
+#define LC_TRACE_ERROR1(m,p1)
+#define LC_TRACE_ERROR2(m,p1,p2)
+#define LC_TRACE_ERROR3(m,p1,p2,p3)
+#define LC_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define LC_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define LC_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define LC_TRACE_WARNING0(m)
+#define LC_TRACE_WARNING1(m,p1)
+#define LC_TRACE_WARNING2(m,p1,p2)
+#define LC_TRACE_WARNING3(m,p1,p2,p3)
+#define LC_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define LC_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define LC_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
+
+#define LC_TRACE_EVENT0(m)
+#define LC_TRACE_EVENT1(m,p1)
+#define LC_TRACE_EVENT2(m,p1,p2)
+#define LC_TRACE_EVENT3(m,p1,p2,p3)
+#define LC_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define LC_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define LC_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define LC_TRACE_DEBUG0(m)
+#define LC_TRACE_DEBUG1(m,p1)
+#define LC_TRACE_DEBUG2(m,p1,p2)
+#define LC_TRACE_DEBUG3(m,p1,p2,p3)
+#define LC_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define LC_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define LC_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+
+#define SDA_TRACE_ERROR0(m)
+#define SDA_TRACE_ERROR1(m,p1)
+#define SDA_TRACE_ERROR2(m,p1,p2)
+#define SDA_TRACE_ERROR3(m,p1,p2,p3)
+#define SDA_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define SDA_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define SDA_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define SDA_TRACE_WARNING0(m)
+#define SDA_TRACE_WARNING1(m,p1)
+#define SDA_TRACE_WARNING2(m,p1,p2)
+#define SDA_TRACE_WARNING3(m,p1,p2,p3)
+#define SDA_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define SDA_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define SDA_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
+
+#define SDA_TRACE_EVENT0(m)
+#define SDA_TRACE_EVENT1(m,p1)
+#define SDA_TRACE_EVENT2(m,p1,p2)
+#define SDA_TRACE_EVENT3(m,p1,p2,p3)
+#define SDA_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define SDA_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define SDA_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define SDA_TRACE_DEBUG0(m)
+#define SDA_TRACE_DEBUG1(m,p1)
+#define SDA_TRACE_DEBUG2(m,p1,p2)
+#define SDA_TRACE_DEBUG3(m,p1,p2,p3)
+#define SDA_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define SDA_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define SDA_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
/* AVDTP
*/
-#define AVDT_TRACE_ERROR0(m)
-#define AVDT_TRACE_ERROR1(m,p1)
-#define AVDT_TRACE_ERROR2(m,p1,p2)
-#define AVDT_TRACE_ERROR3(m,p1,p2,p3)
-#define AVDT_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define AVDT_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define AVDT_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define AVDT_TRACE_WARNING0(m)
-#define AVDT_TRACE_WARNING1(m,p1)
-#define AVDT_TRACE_WARNING2(m,p1,p2)
-#define AVDT_TRACE_WARNING3(m,p1,p2,p3)
-#define AVDT_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define AVDT_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define AVDT_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define AVDT_TRACE_EVENT0(m)
-#define AVDT_TRACE_EVENT1(m,p1)
-#define AVDT_TRACE_EVENT2(m,p1,p2)
-#define AVDT_TRACE_EVENT3(m,p1,p2,p3)
-#define AVDT_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define AVDT_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define AVDT_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define AVDT_TRACE_DEBUG0(m)
-#define AVDT_TRACE_DEBUG1(m,p1)
-#define AVDT_TRACE_DEBUG2(m,p1,p2)
-#define AVDT_TRACE_DEBUG3(m,p1,p2,p3)
-#define AVDT_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define AVDT_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define AVDT_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
-
-#define AVDT_TRACE_API0(m)
-#define AVDT_TRACE_API1(m,p1)
-#define AVDT_TRACE_API2(m,p1,p2)
-#define AVDT_TRACE_API3(m,p1,p2,p3)
-#define AVDT_TRACE_API4(m,p1,p2,p3,p4)
-#define AVDT_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define AVDT_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+#define AVDT_TRACE_ERROR0(m)
+#define AVDT_TRACE_ERROR1(m,p1)
+#define AVDT_TRACE_ERROR2(m,p1,p2)
+#define AVDT_TRACE_ERROR3(m,p1,p2,p3)
+#define AVDT_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define AVDT_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define AVDT_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define AVDT_TRACE_WARNING0(m)
+#define AVDT_TRACE_WARNING1(m,p1)
+#define AVDT_TRACE_WARNING2(m,p1,p2)
+#define AVDT_TRACE_WARNING3(m,p1,p2,p3)
+#define AVDT_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define AVDT_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define AVDT_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
+
+#define AVDT_TRACE_EVENT0(m)
+#define AVDT_TRACE_EVENT1(m,p1)
+#define AVDT_TRACE_EVENT2(m,p1,p2)
+#define AVDT_TRACE_EVENT3(m,p1,p2,p3)
+#define AVDT_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define AVDT_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define AVDT_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define AVDT_TRACE_DEBUG0(m)
+#define AVDT_TRACE_DEBUG1(m,p1)
+#define AVDT_TRACE_DEBUG2(m,p1,p2)
+#define AVDT_TRACE_DEBUG3(m,p1,p2,p3)
+#define AVDT_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define AVDT_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define AVDT_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+
+#define AVDT_TRACE_API0(m)
+#define AVDT_TRACE_API1(m,p1)
+#define AVDT_TRACE_API2(m,p1,p2)
+#define AVDT_TRACE_API3(m,p1,p2,p3)
+#define AVDT_TRACE_API4(m,p1,p2,p3,p4)
+#define AVDT_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define AVDT_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
/* Define tracing for the AVCTP protocol
*/
@@ -4269,171 +4269,171 @@ EXPORT_API extern void BTTRC_StackTrace6(tBTTRC_LAYER_ID layer_id,
/* MCAP
*/
-#define MCA_TRACE_ERROR0(m)
-#define MCA_TRACE_ERROR1(m,p1)
-#define MCA_TRACE_ERROR2(m,p1,p2)
-#define MCA_TRACE_ERROR3(m,p1,p2,p3)
-#define MCA_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define MCA_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define MCA_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define MCA_TRACE_WARNING0(m)
-#define MCA_TRACE_WARNING1(m,p1)
-#define MCA_TRACE_WARNING2(m,p1,p2)
-#define MCA_TRACE_WARNING3(m,p1,p2,p3)
-#define MCA_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define MCA_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define MCA_TRACE_ERROR0(m)
+#define MCA_TRACE_ERROR1(m,p1)
+#define MCA_TRACE_ERROR2(m,p1,p2)
+#define MCA_TRACE_ERROR3(m,p1,p2,p3)
+#define MCA_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define MCA_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define MCA_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define MCA_TRACE_WARNING0(m)
+#define MCA_TRACE_WARNING1(m,p1)
+#define MCA_TRACE_WARNING2(m,p1,p2)
+#define MCA_TRACE_WARNING3(m,p1,p2,p3)
+#define MCA_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define MCA_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
#define MCA_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-#define MCA_TRACE_EVENT0(m)
-#define MCA_TRACE_EVENT1(m,p1)
-#define MCA_TRACE_EVENT2(m,p1,p2)
-#define MCA_TRACE_EVENT3(m,p1,p2,p3)
-#define MCA_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define MCA_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define MCA_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define MCA_TRACE_DEBUG0(m)
-#define MCA_TRACE_DEBUG1(m,p1)
-#define MCA_TRACE_DEBUG2(m,p1,p2)
-#define MCA_TRACE_DEBUG3(m,p1,p2,p3)
-#define MCA_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define MCA_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define MCA_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
-
-#define MCA_TRACE_API0(m)
-#define MCA_TRACE_API1(m,p1)
-#define MCA_TRACE_API2(m,p1,p2)
-#define MCA_TRACE_API3(m,p1,p2,p3)
-#define MCA_TRACE_API4(m,p1,p2,p3,p4)
-#define MCA_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define MCA_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+#define MCA_TRACE_EVENT0(m)
+#define MCA_TRACE_EVENT1(m,p1)
+#define MCA_TRACE_EVENT2(m,p1,p2)
+#define MCA_TRACE_EVENT3(m,p1,p2,p3)
+#define MCA_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define MCA_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define MCA_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define MCA_TRACE_DEBUG0(m)
+#define MCA_TRACE_DEBUG1(m,p1)
+#define MCA_TRACE_DEBUG2(m,p1,p2)
+#define MCA_TRACE_DEBUG3(m,p1,p2,p3)
+#define MCA_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define MCA_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define MCA_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+
+#define MCA_TRACE_API0(m)
+#define MCA_TRACE_API1(m,p1)
+#define MCA_TRACE_API2(m,p1,p2)
+#define MCA_TRACE_API3(m,p1,p2,p3)
+#define MCA_TRACE_API4(m,p1,p2,p3,p4)
+#define MCA_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define MCA_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
/* Define tracing for the AMP unit
*/
-#define AMP_TRACE_ERROR0(m)
-#define AMP_TRACE_ERROR1(m,p1)
-#define AMP_TRACE_ERROR2(m,p1,p2)
-#define AMP_TRACE_ERROR3(m,p1,p2,p3)
-#define AMP_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define AMP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define AMP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define AMP_TRACE_WARNING0(m)
-#define AMP_TRACE_WARNING1(m,p1)
-#define AMP_TRACE_WARNING2(m,p1,p2)
-#define AMP_TRACE_WARNING3(m,p1,p2,p3)
-#define AMP_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define AMP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define AMP_TRACE_ERROR0(m)
+#define AMP_TRACE_ERROR1(m,p1)
+#define AMP_TRACE_ERROR2(m,p1,p2)
+#define AMP_TRACE_ERROR3(m,p1,p2,p3)
+#define AMP_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define AMP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define AMP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define AMP_TRACE_WARNING0(m)
+#define AMP_TRACE_WARNING1(m,p1)
+#define AMP_TRACE_WARNING2(m,p1,p2)
+#define AMP_TRACE_WARNING3(m,p1,p2,p3)
+#define AMP_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define AMP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
#define AMP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-#define AMP_TRACE_API0(m)
-#define AMP_TRACE_API1(m,p1)
-#define AMP_TRACE_API2(m,p1,p2)
-#define AMP_TRACE_API3(m,p1,p2,p3)
-#define AMP_TRACE_API4(m,p1,p2,p3,p4)
-#define AMP_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define AMP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
-
-#define AMP_TRACE_EVENT0(m)
-#define AMP_TRACE_EVENT1(m,p1)
-#define AMP_TRACE_EVENT2(m,p1,p2)
-#define AMP_TRACE_EVENT3(m,p1,p2,p3)
-#define AMP_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define AMP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define AMP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define AMP_TRACE_DEBUG0(m)
-#define AMP_TRACE_DEBUG1(m,p1)
-#define AMP_TRACE_DEBUG2(m,p1,p2)
-#define AMP_TRACE_DEBUG3(m,p1,p2,p3)
-#define AMP_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define AMP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define AMP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+#define AMP_TRACE_API0(m)
+#define AMP_TRACE_API1(m,p1)
+#define AMP_TRACE_API2(m,p1,p2)
+#define AMP_TRACE_API3(m,p1,p2,p3)
+#define AMP_TRACE_API4(m,p1,p2,p3,p4)
+#define AMP_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define AMP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+
+#define AMP_TRACE_EVENT0(m)
+#define AMP_TRACE_EVENT1(m,p1)
+#define AMP_TRACE_EVENT2(m,p1,p2)
+#define AMP_TRACE_EVENT3(m,p1,p2,p3)
+#define AMP_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define AMP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define AMP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define AMP_TRACE_DEBUG0(m)
+#define AMP_TRACE_DEBUG1(m,p1)
+#define AMP_TRACE_DEBUG2(m,p1,p2)
+#define AMP_TRACE_DEBUG3(m,p1,p2,p3)
+#define AMP_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define AMP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define AMP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
/* Define tracing for the GATT
*/
-#define GATT_TRACE_ERROR0(m)
-#define GATT_TRACE_ERROR1(m,p1)
-#define GATT_TRACE_ERROR2(m,p1,p2)
-#define GATT_TRACE_ERROR3(m,p1,p2,p3)
-#define GATT_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define GATT_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define GATT_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define GATT_TRACE_WARNING0(m)
-#define GATT_TRACE_WARNING1(m,p1)
-#define GATT_TRACE_WARNING2(m,p1,p2)
-#define GATT_TRACE_WARNING3(m,p1,p2,p3)
-#define GATT_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define GATT_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define GATT_TRACE_ERROR0(m)
+#define GATT_TRACE_ERROR1(m,p1)
+#define GATT_TRACE_ERROR2(m,p1,p2)
+#define GATT_TRACE_ERROR3(m,p1,p2,p3)
+#define GATT_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define GATT_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define GATT_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define GATT_TRACE_WARNING0(m)
+#define GATT_TRACE_WARNING1(m,p1)
+#define GATT_TRACE_WARNING2(m,p1,p2)
+#define GATT_TRACE_WARNING3(m,p1,p2,p3)
+#define GATT_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define GATT_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
#define GATT_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-#define GATT_TRACE_API0(m)
-#define GATT_TRACE_API1(m,p1)
-#define GATT_TRACE_API2(m,p1,p2)
-#define GATT_TRACE_API3(m,p1,p2,p3)
-#define GATT_TRACE_API4(m,p1,p2,p3,p4)
-#define GATT_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define GATT_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
-
-#define GATT_TRACE_EVENT0(m)
-#define GATT_TRACE_EVENT1(m,p1)
-#define GATT_TRACE_EVENT2(m,p1,p2)
-#define GATT_TRACE_EVENT3(m,p1,p2,p3)
-#define GATT_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define GATT_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define GATT_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define GATT_TRACE_DEBUG0(m)
-#define GATT_TRACE_DEBUG1(m,p1)
-#define GATT_TRACE_DEBUG2(m,p1,p2)
-#define GATT_TRACE_DEBUG3(m,p1,p2,p3)
-#define GATT_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define GATT_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define GATT_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+#define GATT_TRACE_API0(m)
+#define GATT_TRACE_API1(m,p1)
+#define GATT_TRACE_API2(m,p1,p2)
+#define GATT_TRACE_API3(m,p1,p2,p3)
+#define GATT_TRACE_API4(m,p1,p2,p3,p4)
+#define GATT_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define GATT_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+
+#define GATT_TRACE_EVENT0(m)
+#define GATT_TRACE_EVENT1(m,p1)
+#define GATT_TRACE_EVENT2(m,p1,p2)
+#define GATT_TRACE_EVENT3(m,p1,p2,p3)
+#define GATT_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define GATT_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define GATT_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define GATT_TRACE_DEBUG0(m)
+#define GATT_TRACE_DEBUG1(m,p1)
+#define GATT_TRACE_DEBUG2(m,p1,p2)
+#define GATT_TRACE_DEBUG3(m,p1,p2,p3)
+#define GATT_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define GATT_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define GATT_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
/* Define tracing for the SMP unit
*/
-#define SMP_TRACE_ERROR0(m)
-#define SMP_TRACE_ERROR1(m,p1)
-#define SMP_TRACE_ERROR2(m,p1,p2)
-#define SMP_TRACE_ERROR3(m,p1,p2,p3)
-#define SMP_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define SMP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define SMP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define SMP_TRACE_WARNING0(m)
-#define SMP_TRACE_WARNING1(m,p1)
-#define SMP_TRACE_WARNING2(m,p1,p2)
-#define SMP_TRACE_WARNING3(m,p1,p2,p3)
-#define SMP_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define SMP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define SMP_TRACE_ERROR0(m)
+#define SMP_TRACE_ERROR1(m,p1)
+#define SMP_TRACE_ERROR2(m,p1,p2)
+#define SMP_TRACE_ERROR3(m,p1,p2,p3)
+#define SMP_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define SMP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define SMP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define SMP_TRACE_WARNING0(m)
+#define SMP_TRACE_WARNING1(m,p1)
+#define SMP_TRACE_WARNING2(m,p1,p2)
+#define SMP_TRACE_WARNING3(m,p1,p2,p3)
+#define SMP_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define SMP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
#define SMP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-#define SMP_TRACE_API0(m)
-#define SMP_TRACE_API1(m,p1)
-#define SMP_TRACE_API2(m,p1,p2)
-#define SMP_TRACE_API3(m,p1,p2,p3)
-#define SMP_TRACE_API4(m,p1,p2,p3,p4)
-#define SMP_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define SMP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
-
-#define SMP_TRACE_EVENT0(m)
-#define SMP_TRACE_EVENT1(m,p1)
-#define SMP_TRACE_EVENT2(m,p1,p2)
-#define SMP_TRACE_EVENT3(m,p1,p2,p3)
-#define SMP_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define SMP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define SMP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define SMP_TRACE_DEBUG0(m)
-#define SMP_TRACE_DEBUG1(m,p1)
-#define SMP_TRACE_DEBUG2(m,p1,p2)
-#define SMP_TRACE_DEBUG3(m,p1,p2,p3)
-#define SMP_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define SMP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define SMP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+#define SMP_TRACE_API0(m)
+#define SMP_TRACE_API1(m,p1)
+#define SMP_TRACE_API2(m,p1,p2)
+#define SMP_TRACE_API3(m,p1,p2,p3)
+#define SMP_TRACE_API4(m,p1,p2,p3,p4)
+#define SMP_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define SMP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+
+#define SMP_TRACE_EVENT0(m)
+#define SMP_TRACE_EVENT1(m,p1)
+#define SMP_TRACE_EVENT2(m,p1,p2)
+#define SMP_TRACE_EVENT3(m,p1,p2,p3)
+#define SMP_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define SMP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define SMP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define SMP_TRACE_DEBUG0(m)
+#define SMP_TRACE_DEBUG1(m,p1)
+#define SMP_TRACE_DEBUG2(m,p1,p2)
+#define SMP_TRACE_DEBUG3(m,p1,p2,p3)
+#define SMP_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define SMP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define SMP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
#endif
@@ -4529,54 +4529,62 @@ extern UINT8 btif_trace_level;
#else
/* define traces for Application */
-#define BTIF_TRACE_ERROR0(m)
-#define BTIF_TRACE_ERROR1(m,p1)
-#define BTIF_TRACE_ERROR2(m,p1,p2)
-#define BTIF_TRACE_ERROR3(m,p1,p2,p3)
-#define BTIF_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define BTIF_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define BTIF_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define BTIF_TRACE_WARNING0(m)
-#define BTIF_TRACE_WARNING1(m,p1)
-#define BTIF_TRACE_WARNING2(m,p1,p2)
-#define BTIF_TRACE_WARNING3(m,p1,p2,p3)
-#define BTIF_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define BTIF_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define BTIF_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define BTIF_TRACE_API0(m)
-#define BTIF_TRACE_API1(m,p1)
-#define BTIF_TRACE_API2(m,p1,p2)
-#define BTIF_TRACE_API3(m,p1,p2,p3)
-#define BTIF_TRACE_API4(m,p1,p2,p3,p4)
-#define BTIF_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define BTIF_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
-
-#define BTIF_TRACE_EVENT0(m)
-#define BTIF_TRACE_EVENT1(m,p1)
-#define BTIF_TRACE_EVENT2(m,p1,p2)
-#define BTIF_TRACE_EVENT3(m,p1,p2,p3)
-#define BTIF_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define BTIF_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define BTIF_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define BTIF_TRACE_DEBUG0(m)
-#define BTIF_TRACE_DEBUG1(m,p1)
-#define BTIF_TRACE_DEBUG2(m,p1,p2)
-#define BTIF_TRACE_DEBUG3(m,p1,p2,p3)
-#define BTIF_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define BTIF_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define BTIF_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
-
-
-#define BTIF_TRACE_VERBOSE0(m)
-#define BTIF_TRACE_VERBOSE1(m,p1)
-#define BTIF_TRACE_VERBOSE2(m,p1,p2)
-#define BTIF_TRACE_VERBOSE3(m,p1,p2,p3)
-#define BTIF_TRACE_VERBOSE4(m,p1,p2,p3,p4)
-#define BTIF_TRACE_VERBOSE5(m,p1,p2,p3,p4,p5)
-#define BTIF_TRACE_VERBOSE6(m,p1,p2,p3,p4,p5,p6)
+#define BTIF_TRACE_ERROR0(m)
+#define BTIF_TRACE_ERROR1(m,p1)
+#define BTIF_TRACE_ERROR2(m,p1,p2)
+#define BTIF_TRACE_ERROR3(m,p1,p2,p3)
+#define BTIF_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define BTIF_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define BTIF_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+#define BTIF_TRACE_ERROR7(m,p1,p2,p3,p4,p5,p6,p7)
+
+
+#define BTIF_TRACE_WARNING0(m)
+#define BTIF_TRACE_WARNING1(m,p1)
+#define BTIF_TRACE_WARNING2(m,p1,p2)
+#define BTIF_TRACE_WARNING3(m,p1,p2,p3)
+#define BTIF_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define BTIF_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define BTIF_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
+#define BTIF_TRACE_WARNING7(m,p1,p2,p3,p4,p5,p6,p7)
+
+
+#define BTIF_TRACE_API0(m)
+#define BTIF_TRACE_API1(m,p1)
+#define BTIF_TRACE_API2(m,p1,p2)
+#define BTIF_TRACE_API3(m,p1,p2,p3)
+#define BTIF_TRACE_API4(m,p1,p2,p3,p4)
+#define BTIF_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define BTIF_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+
+#define BTIF_TRACE_EVENT0(m)
+#define BTIF_TRACE_EVENT1(m,p1)
+#define BTIF_TRACE_EVENT2(m,p1,p2)
+#define BTIF_TRACE_EVENT3(m,p1,p2,p3)
+#define BTIF_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define BTIF_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define BTIF_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define BTIF_TRACE_DEBUG0(m)
+#define BTIF_TRACE_DEBUG1(m,p1)
+#define BTIF_TRACE_DEBUG2(m,p1,p2)
+#define BTIF_TRACE_DEBUG3(m,p1,p2,p3)
+#define BTIF_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define BTIF_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define BTIF_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+#define BTIF_TRACE_DEBUG7(m,p1,p2,p3,p4,p5,p6,p7)
+#define BTIF_TRACE_DEBUG8(m,p1,p2,p3,p4,p5,p6,p7,p8)
+
+
+
+
+#define BTIF_TRACE_VERBOSE0(m)
+#define BTIF_TRACE_VERBOSE1(m,p1)
+#define BTIF_TRACE_VERBOSE2(m,p1,p2)
+#define BTIF_TRACE_VERBOSE3(m,p1,p2,p3)
+#define BTIF_TRACE_VERBOSE4(m,p1,p2,p3,p4)
+#define BTIF_TRACE_VERBOSE5(m,p1,p2,p3,p4,p5)
+#define BTIF_TRACE_VERBOSE6(m,p1,p2,p3,p4,p5,p6)
#endif
@@ -4656,45 +4664,45 @@ extern UINT8 btif_trace_level;
#else
/* define traces for Application */
-#define APPL_TRACE_ERROR0(m)
-#define APPL_TRACE_ERROR1(m,p1)
-#define APPL_TRACE_ERROR2(m,p1,p2)
-#define APPL_TRACE_ERROR3(m,p1,p2,p3)
-#define APPL_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define APPL_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define APPL_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define APPL_TRACE_WARNING0(m)
-#define APPL_TRACE_WARNING1(m,p1)
-#define APPL_TRACE_WARNING2(m,p1,p2)
-#define APPL_TRACE_WARNING3(m,p1,p2,p3)
-#define APPL_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define APPL_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define APPL_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define APPL_TRACE_API0(m)
-#define APPL_TRACE_API1(m,p1)
-#define APPL_TRACE_API2(m,p1,p2)
-#define APPL_TRACE_API3(m,p1,p2,p3)
-#define APPL_TRACE_API4(m,p1,p2,p3,p4)
-#define APPL_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define APPL_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
-
-#define APPL_TRACE_EVENT0(m)
-#define APPL_TRACE_EVENT1(m,p1)
-#define APPL_TRACE_EVENT2(m,p1,p2)
-#define APPL_TRACE_EVENT3(m,p1,p2,p3)
-#define APPL_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define APPL_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define APPL_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define APPL_TRACE_DEBUG0(m)
-#define APPL_TRACE_DEBUG1(m,p1)
-#define APPL_TRACE_DEBUG2(m,p1,p2)
-#define APPL_TRACE_DEBUG3(m,p1,p2,p3)
-#define APPL_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define APPL_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define APPL_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+#define APPL_TRACE_ERROR0(m)
+#define APPL_TRACE_ERROR1(m,p1)
+#define APPL_TRACE_ERROR2(m,p1,p2)
+#define APPL_TRACE_ERROR3(m,p1,p2,p3)
+#define APPL_TRACE_ERROR4(m,p1,p2,p3,p4)
+#define APPL_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
+#define APPL_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
+
+#define APPL_TRACE_WARNING0(m)
+#define APPL_TRACE_WARNING1(m,p1)
+#define APPL_TRACE_WARNING2(m,p1,p2)
+#define APPL_TRACE_WARNING3(m,p1,p2,p3)
+#define APPL_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define APPL_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define APPL_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
+
+#define APPL_TRACE_API0(m)
+#define APPL_TRACE_API1(m,p1)
+#define APPL_TRACE_API2(m,p1,p2)
+#define APPL_TRACE_API3(m,p1,p2,p3)
+#define APPL_TRACE_API4(m,p1,p2,p3,p4)
+#define APPL_TRACE_API5(m,p1,p2,p3,p4,p5)
+#define APPL_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
+
+#define APPL_TRACE_EVENT0(m)
+#define APPL_TRACE_EVENT1(m,p1)
+#define APPL_TRACE_EVENT2(m,p1,p2)
+#define APPL_TRACE_EVENT3(m,p1,p2,p3)
+#define APPL_TRACE_EVENT4(m,p1,p2,p3,p4)
+#define APPL_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
+#define APPL_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
+
+#define APPL_TRACE_DEBUG0(m)
+#define APPL_TRACE_DEBUG1(m,p1)
+#define APPL_TRACE_DEBUG2(m,p1,p2)
+#define APPL_TRACE_DEBUG3(m,p1,p2,p3)
+#define APPL_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define APPL_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define APPL_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
#endif
@@ -4720,7 +4728,7 @@ extern UINT8 btif_trace_level;
#if defined(DRV_DEBUG_MSG) && (DRV_DEBUG_MSG == TRUE)
/* Driver Trace macros
*/
-#define DRV_TRACE_WARNING0(m) APPL_TRACE_WARNING0(m)
+#define DRV_TRACE_WARNING0(m) APPL_TRACE_WARNING0(m)
#define DRV_TRACE_WARNING1(m,p1) APPL_TRACE_WARNING1(m,p1)
#define DRV_TRACE_WARNING2(m,p1,p2) APPL_TRACE_WARNING2(m,p1,p2)
#define DRV_TRACE_WARNING3(m,p1,p2,p3) APPL_TRACE_WARNING3(m,p1,p2,p3)
@@ -4730,16 +4738,16 @@ extern UINT8 btif_trace_level;
#else
/* Driver Trace macros
*/
-#define DRV_TRACE_WARNING0(m)
-#define DRV_TRACE_WARNING1(m,p1)
-#define DRV_TRACE_WARNING2(m,p1,p2)
-#define DRV_TRACE_WARNING3(m,p1,p2,p3)
-#define DRV_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define DRV_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
+#define DRV_TRACE_WARNING0(m)
+#define DRV_TRACE_WARNING1(m,p1)
+#define DRV_TRACE_WARNING2(m,p1,p2)
+#define DRV_TRACE_WARNING3(m,p1,p2,p3)
+#define DRV_TRACE_WARNING4(m,p1,p2,p3,p4)
+#define DRV_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
#define DRV_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
#endif
-#define DRV_TRACE_ERROR0(m) APPL_TRACE_ERROR0(m)
+#define DRV_TRACE_ERROR0(m) APPL_TRACE_ERROR0(m)
#define DRV_TRACE_ERROR1(m,p1) APPL_TRACE_ERROR1(m,p1)
#define DRV_TRACE_ERROR2(m,p1,p2) APPL_TRACE_ERROR2(m,p1,p2)
#define DRV_TRACE_ERROR3(m,p1,p2,p3) APPL_TRACE_ERROR3(m,p1,p2,p3)
@@ -4749,12 +4757,12 @@ extern UINT8 btif_trace_level;
/* Driver Trace macros
*/
-#define DRV_TRACE_DEBUG0(m) APPL_TRACE_DEBUG0(m)
-#define DRV_TRACE_DEBUG1(m,p1) APPL_TRACE_DEBUG1(m,p1)
-#define DRV_TRACE_DEBUG2(m,p1,p2) APPL_TRACE_DEBUG2(m,p1,p2)
-#define DRV_TRACE_DEBUG3(m,p1,p2,p3) APPL_TRACE_DEBUG3(m,p1,p2,p3)
-#define DRV_TRACE_DEBUG4(m,p1,p2,p3,p4) APPL_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define DRV_TRACE_DEBUG5(m,p1,p2,p3,p4,p5) APPL_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
+#define DRV_TRACE_DEBUG0(m) APPL_TRACE_DEBUG0(m)
+#define DRV_TRACE_DEBUG1(m,p1) APPL_TRACE_DEBUG1(m,p1)
+#define DRV_TRACE_DEBUG2(m,p1,p2) APPL_TRACE_DEBUG2(m,p1,p2)
+#define DRV_TRACE_DEBUG3(m,p1,p2,p3) APPL_TRACE_DEBUG3(m,p1,p2,p3)
+#define DRV_TRACE_DEBUG4(m,p1,p2,p3,p4) APPL_TRACE_DEBUG4(m,p1,p2,p3,p4)
+#define DRV_TRACE_DEBUG5(m,p1,p2,p3,p4,p5) APPL_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
#define DRV_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6) APPL_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
diff --git a/include/buildcfg_maguro.h b/include/buildcfg_maguro.h
index 196c792..310af2d 100644
--- a/include/buildcfg_maguro.h
+++ b/include/buildcfg_maguro.h
@@ -84,7 +84,7 @@
#define ANT_INCLUDED FALSE
#define SAP_SERVER_INCLUDED FALSE
#define HID_DEV_INCLUDED FALSE
-#define HID_HOST_INCLUDED FALSE
+#define HID_HOST_INCLUDED TRUE
#define BLE_INCLUDED FALSE
#define BTM_BLE_CONFORMANCE_TESTING FALSE
#define ATT_INCLUDED FALSE
@@ -124,8 +124,8 @@
#define BTA_FS_INCLUDED TRUE
#define BTA_AC_INCLUDED FALSE
#define BTA_HD_INCLUDED FALSE
-#define BTA_HH_INCLUDED FALSE
-#define HH_USE_BTHID FALSE
+#define BTA_HH_INCLUDED TRUE
+#define HH_USE_BTHID TRUE
#define BTA_AR_INCLUDED TRUE
#define BTA_AV_INCLUDED TRUE
#define BTA_PBS_INCLUDED FALSE
diff --git a/main/Android.mk b/main/Android.mk
index 45859e4..eb8a880 100755
--- a/main/Android.mk
+++ b/main/Android.mk
@@ -27,7 +27,8 @@ LOCAL_SRC_FILES += \
../btif/src/btif_hf.c \
../btif/src/btif_av.c \
../btif/src/btif_rc.c \
- ../btif/src/btif_media_task.c
+ ../btif/src/btif_media_task.c \
+ ../btif/src/btif_hh.c
# callouts
LOCAL_SRC_FILES+= \
@@ -35,7 +36,8 @@ LOCAL_SRC_FILES+= \
../btif/co/bta_fs_co.c \
../btif/co/bta_ag_co.c \
../btif/co/bta_dm_co.c \
- ../btif/co/bta_av_co.c
+ ../btif/co/bta_av_co.c \
+ ../btif/co/bta_hh_co.c
# sbc encoder
LOCAL_SRC_FILES+= \
diff --git a/stack/btm/btm_pm.c b/stack/btm/btm_pm.c
index 169a1b3..afe7275 100644
--- a/stack/btm/btm_pm.c
+++ b/stack/btm/btm_pm.c
@@ -842,7 +842,7 @@ void btm_pm_proc_mode_change (UINT8 hci_status, UINT16 hci_handle, UINT8 mode, U
BTM_TRACE_DEBUG0 ("btm mode change to active; check l2c_link for outgoing packets");
l2c_link_check_send_pkts (p_lcb, NULL, NULL);
- btu_stop_timer (&p_lcb->timer_entry);
+ //btu_stop_timer (&p_lcb->timer_entry);
}
/* notify registered parties */
diff --git a/stack/l2cap/l2c_link.c b/stack/l2cap/l2c_link.c
index d0899aa..daaf2a7 100644..100755
--- a/stack/l2cap/l2c_link.c
+++ b/stack/l2cap/l2c_link.c
@@ -1040,14 +1040,15 @@ BOOLEAN l2c_link_check_power_mode (tL2C_LCB *p_lcb)
/* check power mode */
if (BTM_ReadPowerMode(p_lcb->remote_bd_addr, &mode) == BTM_SUCCESS)
{
+ /*
if ( mode == BTM_PM_MD_PARK )
{
L2CAP_TRACE_DEBUG1 ("LCB(0x%x) is in park mode", p_lcb->handle);
-/* Coverity:
+// Coverity:
// FALSE-POSITIVE error from Coverity test tool. Please do NOT remove following comment.
// coverity[uninit_use_in_call] False-positive: setting the mode to BTM_PM_MD_ACTIVE only uses settings.mode
the other data members of tBTM_PM_PWR_MD are ignored
-*/
+
memset((void*)&pm, 0, sizeof(pm));
pm.mode = BTM_PM_MD_ACTIVE;
BTM_SetPowerMode(BTM_PM_SET_ONLY_ID, p_lcb->remote_bd_addr, &pm);
@@ -1055,7 +1056,8 @@ BOOLEAN l2c_link_check_power_mode (tL2C_LCB *p_lcb)
BTU_TTYPE_L2CAP_LINK, L2CAP_WAIT_UNPARK_TOUT);
return TRUE;
}
- else if ( mode == BTM_PM_STS_PENDING )
+ */
+ if ( mode == BTM_PM_STS_PENDING )
{
L2CAP_TRACE_DEBUG1 ("LCB(0x%x) is in PM pending state", p_lcb->handle);
diff --git a/stack/l2cap/l2c_utils.c b/stack/l2cap/l2c_utils.c
index 0c1fb60..0c1fb60 100644..100755
--- a/stack/l2cap/l2c_utils.c
+++ b/stack/l2cap/l2c_utils.c