summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]btif/include/btif_util.h1
-rwxr-xr-xbtif/src/btif_dm.c2
-rwxr-xr-x[-rw-r--r--]btif/src/btif_util.c33
3 files changed, 35 insertions, 1 deletions
diff --git a/btif/include/btif_util.h b/btif/include/btif_util.h
index 075194d..cfa7945 100644..100755
--- a/btif/include/btif_util.h
+++ b/btif/include/btif_util.h
@@ -86,6 +86,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_dm_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);
diff --git a/btif/src/btif_dm.c b/btif/src/btif_dm.c
index 31b6435..90131aa 100755
--- a/btif/src/btif_dm.c
+++ b/btif/src/btif_dm.c
@@ -1107,7 +1107,7 @@ static void btif_dm_upstreams_evt(UINT16 event, char* p_param)
uint32_t i;
bt_bdaddr_t bd_addr;
- BTIF_TRACE_EVENT1("btif_dm_upstreams_cback ev: %d", event);
+ BTIF_TRACE_EVENT1("btif_dm_upstreams_cback ev: %s", dump_dm_event(event));
switch (event)
{
diff --git a/btif/src/btif_util.c b/btif/src/btif_util.c
index 07f1896..fb2e792 100644..100755
--- a/btif/src/btif_util.c
+++ b/btif/src/btif_util.c
@@ -276,6 +276,39 @@ const char* dump_property_type(bt_property_type_t type)
}
}
+const char* dump_dm_event(UINT16 event)
+{
+ switch(event)
+ {
+ CASE_RETURN_STR(BTA_DM_ENABLE_EVT)
+ CASE_RETURN_STR(BTA_DM_DISABLE_EVT)
+ CASE_RETURN_STR(BTA_DM_PIN_REQ_EVT)
+ CASE_RETURN_STR(BTA_DM_AUTH_CMPL_EVT)
+ CASE_RETURN_STR(BTA_DM_AUTHORIZE_EVT)
+ CASE_RETURN_STR(BTA_DM_LINK_UP_EVT)
+ CASE_RETURN_STR(BTA_DM_LINK_DOWN_EVT)
+ CASE_RETURN_STR(BTA_DM_SIG_STRENGTH_EVT)
+ CASE_RETURN_STR(BTA_DM_BUSY_LEVEL_EVT)
+ CASE_RETURN_STR(BTA_DM_BOND_CANCEL_CMPL_EVT)
+ CASE_RETURN_STR(BTA_DM_SP_CFM_REQ_EVT)
+ CASE_RETURN_STR(BTA_DM_SP_KEY_NOTIF_EVT)
+ CASE_RETURN_STR(BTA_DM_SP_RMT_OOB_EVT)
+ CASE_RETURN_STR(BTA_DM_SP_KEYPRESS_EVT)
+ CASE_RETURN_STR(BTA_DM_ROLE_CHG_EVT)
+ CASE_RETURN_STR(BTA_DM_BLE_KEY_EVT)
+ CASE_RETURN_STR(BTA_DM_BLE_SEC_REQ_EVT)
+ CASE_RETURN_STR(BTA_DM_BLE_PASSKEY_NOTIF_EVT)
+ CASE_RETURN_STR(BTA_DM_BLE_PASSKEY_REQ_EVT)
+ CASE_RETURN_STR(BTA_DM_BLE_OOB_REQ_EVT)
+ CASE_RETURN_STR(BTA_DM_BLE_LOCAL_IR_EVT)
+ CASE_RETURN_STR(BTA_DM_BLE_LOCAL_ER_EVT)
+ CASE_RETURN_STR(BTA_DM_BLE_AUTH_CMPL_EVT)
+ CASE_RETURN_STR(BTA_DM_DEV_UNPAIRED_EVT)
+
+ default:
+ return "UNKNOWN DM EVENT";
+ }
+}
const char* dump_hf_event(UINT16 event)
{