summaryrefslogtreecommitdiffstats
path: root/bta
diff options
context:
space:
mode:
Diffstat (limited to 'bta')
-rw-r--r--bta/ag/bta_ag_act.c64
-rw-r--r--bta/ag/bta_ag_api.c24
-rw-r--r--bta/ag/bta_ag_at.c16
-rw-r--r--bta/ag/bta_ag_at.h6
-rw-r--r--bta/ag/bta_ag_ci.c10
-rw-r--r--[-rwxr-xr-x]bta/ag/bta_ag_cmd.c256
-rw-r--r--[-rwxr-xr-x]bta/ag/bta_ag_int.h8
-rw-r--r--bta/ag/bta_ag_main.c92
-rw-r--r--bta/ag/bta_ag_rfc.c30
-rw-r--r--bta/ag/bta_ag_sco.c138
-rw-r--r--[-rwxr-xr-x]bta/ag/bta_ag_sdp.c34
-rw-r--r--bta/ar/bta_ar.c26
-rw-r--r--bta/av/bta_av_aact.c264
-rw-r--r--bta/av/bta_av_act.c60
-rw-r--r--bta/av/bta_av_api.c10
-rw-r--r--bta/av/bta_av_cfg.c10
-rw-r--r--bta/av/bta_av_ci.c6
-rw-r--r--bta/av/bta_av_int.h16
-rw-r--r--bta/av/bta_av_main.c48
-rw-r--r--bta/av/bta_av_sbc.c34
-rw-r--r--bta/av/bta_av_ssm.c20
-rw-r--r--[-rwxr-xr-x]bta/dm/bta_dm_act.c526
-rw-r--r--[-rwxr-xr-x]bta/dm/bta_dm_api.c0
-rw-r--r--bta/dm/bta_dm_cfg.c20
-rw-r--r--bta/dm/bta_dm_ci.c20
-rw-r--r--[-rwxr-xr-x]bta/dm/bta_dm_int.h86
-rw-r--r--bta/dm/bta_dm_main.c20
-rw-r--r--[-rwxr-xr-x]bta/dm/bta_dm_pm.c116
-rw-r--r--bta/dm/bta_dm_sco.c68
-rw-r--r--bta/fs/bta_fs_cfg.c2
-rw-r--r--bta/fs/bta_fs_ci.c22
-rw-r--r--bta/gatt/bta_gattc_act.c296
-rw-r--r--bta/gatt/bta_gattc_api.c222
-rw-r--r--bta/gatt/bta_gattc_cache.c282
-rw-r--r--bta/gatt/bta_gattc_ci.c14
-rw-r--r--bta/gatt/bta_gattc_int.h44
-rw-r--r--bta/gatt/bta_gattc_main.c28
-rw-r--r--bta/gatt/bta_gattc_utils.c58
-rw-r--r--bta/gatt/bta_gatts_act.c92
-rw-r--r--bta/gatt/bta_gatts_api.c62
-rw-r--r--bta/gatt/bta_gatts_int.h18
-rw-r--r--bta/gatt/bta_gatts_main.c14
-rw-r--r--bta/gatt/bta_gatts_utils.c14
-rw-r--r--[-rwxr-xr-x]bta/hh/bta_hh_act.c204
-rw-r--r--bta/hh/bta_hh_api.c56
-rw-r--r--bta/hh/bta_hh_int.h30
-rw-r--r--bta/hh/bta_hh_main.c38
-rw-r--r--bta/hh/bta_hh_utils.c4
-rw-r--r--bta/hl/bta_hl_api.c86
-rw-r--r--bta/hl/bta_hl_ci.c34
-rw-r--r--bta/hl/bta_hl_int.h248
-rw-r--r--bta/hl/bta_hl_main.c166
-rw-r--r--bta/hl/bta_hl_sdp.c32
-rw-r--r--bta/hl/bta_hl_utils.c618
-rw-r--r--bta/include/bd.h10
-rw-r--r--bta/include/bta_ag_api.h24
-rw-r--r--bta/include/bta_ag_ci.h12
-rw-r--r--bta/include/bta_ag_co.h16
-rw-r--r--bta/include/bta_api.h278
-rw-r--r--bta/include/bta_ar_api.h6
-rw-r--r--bta/include/bta_av_api.h42
-rw-r--r--bta/include/bta_av_ci.h4
-rw-r--r--bta/include/bta_av_co.h52
-rw-r--r--bta/include/bta_dm_ci.h8
-rw-r--r--bta/include/bta_dm_co.h50
-rw-r--r--bta/include/bta_fs_api.h2
-rw-r--r--bta/include/bta_fs_ci.h22
-rw-r--r--bta/include/bta_fs_co.h52
-rw-r--r--bta/include/bta_gatt_api.h290
-rw-r--r--bta/include/bta_gattc_ci.h18
-rw-r--r--bta/include/bta_gattc_co.h18
-rw-r--r--bta/include/bta_gatts_co.h12
-rw-r--r--[-rwxr-xr-x]bta/include/bta_hh_api.h86
-rw-r--r--bta/include/bta_hh_co.h16
-rw-r--r--bta/include/bta_hl_ci.h24
-rw-r--r--bta/include/bta_hl_co.h98
-rw-r--r--bta/include/bta_pan_api.h18
-rw-r--r--bta/include/bta_pan_ci.h38
-rw-r--r--bta/include/bta_pan_co.h28
-rw-r--r--bta/include/bta_sys_ci.h8
-rw-r--r--bta/include/bta_sys_co.h4
-rw-r--r--bta/include/utl.h18
-rw-r--r--bta/pan/bta_pan_api.c18
-rw-r--r--bta/pan/bta_pan_ci.c46
-rw-r--r--bta/pan/bta_pan_int.h4
-rw-r--r--bta/pan/bta_pan_main.c30
-rw-r--r--bta/sys/bd.c10
-rw-r--r--bta/sys/bta_sys.h10
-rw-r--r--bta/sys/bta_sys_ci.c16
-rw-r--r--bta/sys/bta_sys_conn.c52
-rw-r--r--bta/sys/bta_sys_main.c98
-rw-r--r--bta/sys/ptim.c2
-rw-r--r--bta/sys/utl.c20
93 files changed, 3136 insertions, 3136 deletions
diff --git a/bta/ag/bta_ag_act.c b/bta/ag/bta_ag_act.c
index de59aa5..ef7542f 100644
--- a/bta/ag/bta_ag_act.c
+++ b/bta/ag/bta_ag_act.c
@@ -39,11 +39,11 @@ const UINT16 bta_ag_uuid[BTA_AG_NUM_IDX] =
const UINT8 bta_ag_sec_id[BTA_AG_NUM_IDX] =
{
- BTM_SEC_SERVICE_HEADSET_AG,
+ BTM_SEC_SERVICE_HEADSET_AG,
BTM_SEC_SERVICE_AG_HANDSFREE
};
-const tBTA_SERVICE_ID bta_ag_svc_id[BTA_AG_NUM_IDX] =
+const tBTA_SERVICE_ID bta_ag_svc_id[BTA_AG_NUM_IDX] =
{
BTA_HSP_SERVICE_ID,
BTA_HFP_SERVICE_ID
@@ -53,7 +53,7 @@ const tBTA_SERVICE_MASK bta_ag_svc_mask[BTA_AG_NUM_IDX] =
{
BTA_HSP_SERVICE_MASK,
BTA_HFP_SERVICE_MASK
-};
+};
typedef void (*tBTA_AG_ATCMD_CBACK)(tBTA_AG_SCB *p_scb, UINT16 cmd, UINT8 arg_type,
char *p_arg, INT16 int_arg);
@@ -69,7 +69,7 @@ const tBTA_AG_ATCMD_CBACK bta_ag_at_cback_tbl[BTA_AG_NUM_IDX] =
** Function bta_ag_cback_open
**
** Description Send open callback event to application.
-**
+**
**
** Returns void
**
@@ -93,7 +93,7 @@ static void bta_ag_cback_open(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data, tBTA_AG_
bdcpy(open.bd_addr, p_scb->peer_addr);
}
- (*bta_ag_cb.p_cback)(BTA_AG_OPEN_EVT, (tBTA_AG *) &open);
+ (*bta_ag_cb.p_cback)(BTA_AG_OPEN_EVT, (tBTA_AG *) &open);
}
/*******************************************************************************
@@ -102,7 +102,7 @@ static void bta_ag_cback_open(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data, tBTA_AG_
**
** Description This function initializes values of the AG cb and sets up
** the SDP record for the services.
-**
+**
**
** Returns void
**
@@ -136,7 +136,7 @@ void bta_ag_register(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
**
** Description This function removes the sdp records, closes the RFCOMM
** servers, and deallocates the service control block.
-**
+**
**
** Returns void
**
@@ -161,7 +161,7 @@ void bta_ag_deregister(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
** Function bta_ag_start_dereg
**
** Description Start a deregister event.
-**
+**
**
** Returns void
**
@@ -180,7 +180,7 @@ void bta_ag_start_dereg(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
** Function bta_ag_start_open
**
** Description This starts an AG open.
-**
+**
**
** Returns void
**
@@ -222,7 +222,7 @@ void bta_ag_start_open(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
** Function bta_ag_disc_int_res
**
** Description This function handles a discovery result when initiator.
-**
+**
**
** Returns void
**
@@ -290,7 +290,7 @@ void bta_ag_disc_int_res(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
** Function bta_ag_disc_acp_res
**
** Description This function handles a discovery result when acceptor.
-**
+**
**
** Returns void
**
@@ -314,7 +314,7 @@ void bta_ag_disc_acp_res(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
** Function bta_ag_disc_fail
**
** Description This function handles a discovery failure.
-**
+**
**
** Returns void
**
@@ -323,7 +323,7 @@ void bta_ag_disc_fail(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
{
/* reopen registered servers */
bta_ag_start_servers(p_scb, p_scb->reg_services);
-
+
/* reinitialize stuff */
/* call open cback w. failure */
@@ -351,7 +351,7 @@ void bta_ag_open_fail(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
** Function bta_ag_rfc_fail
**
** Description RFCOMM connection failed.
-**
+**
**
** Returns void
**
@@ -372,7 +372,7 @@ void bta_ag_rfc_fail(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
/* reopen registered servers */
bta_ag_start_servers(p_scb, p_scb->reg_services);
-
+
/* call open cback w. failure */
bta_ag_cback_open(p_scb, NULL, BTA_AG_FAIL_RFCOMM);
}
@@ -382,7 +382,7 @@ void bta_ag_rfc_fail(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
** Function bta_ag_rfc_close
**
** Description RFCOMM connection closed.
-**
+**
**
** Returns void
**
@@ -448,7 +448,7 @@ void bta_ag_rfc_close(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
/* Make sure SCO state is BTA_AG_SCO_SHUTDOWN_ST */
bta_ag_sco_shutdown(p_scb, NULL);
-
+
/* Check if all the SLCs are down */
for (i = 0; i < BTA_AG_NUM_SCB; i++)
{
@@ -460,7 +460,7 @@ void bta_ag_rfc_close(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
{
bta_sys_sco_unuse(BTA_ID_AG, p_scb->app_id, p_scb->peer_addr);
}
-
+
}
/* else close port and deallocate scb */
else
@@ -475,7 +475,7 @@ void bta_ag_rfc_close(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
** Function bta_ag_rfc_open
**
** Description Handle RFCOMM channel open.
-**
+**
**
** Returns void
**
@@ -521,7 +521,7 @@ void bta_ag_rfc_open(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
** Function bta_ag_rfc_acp_open
**
** Description Handle RFCOMM channel open when accepting connection.
-**
+**
**
** Returns void
**
@@ -545,7 +545,7 @@ void bta_ag_rfc_acp_open(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
{
APPL_TRACE_DEBUG1 ("bta_ag_rfc_acp_open error PORT_CheckConnection returned status %d", status);
}
-
+
/* Collision Handling */
for (i = 0, ag_scb = &bta_ag_cb.scb[0]; i < BTA_AG_NUM_SCB; i++, ag_scb++)
{
@@ -554,7 +554,7 @@ void bta_ag_rfc_acp_open(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
/* stop collision timer */
ag_scb->colli_tmr_on = FALSE;
bta_sys_stop_timer (&ag_scb->colli_timer);
-
+
if (bdcmp (dev_addr, ag_scb->peer_addr) == 0)
{
/* If incoming and outgoing device are same, nothing more to do. */
@@ -579,7 +579,7 @@ void bta_ag_rfc_acp_open(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
}
bdcpy (p_scb->peer_addr, dev_addr);
-
+
/* determine connected service from port handle */
for (i = 0; i < BTA_AG_NUM_IDX; i++)
{
@@ -615,7 +615,7 @@ void bta_ag_rfc_acp_open(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
** Function bta_ag_rfc_data
**
** Description Read and process data from RFCOMM.
-**
+**
**
** Returns void
**
@@ -626,7 +626,7 @@ void bta_ag_rfc_data(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
char buf[BTA_AG_RFC_READ_MAX];
memset(buf, 0, BTA_AG_RFC_READ_MAX);
-
+
/* do the following */
for(;;)
{
@@ -658,7 +658,7 @@ void bta_ag_rfc_data(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
** Function bta_ag_start_close
**
** Description Start the process of closing SCO and RFCOMM connection.
-**
+**
**
** Returns void
**
@@ -689,7 +689,7 @@ void bta_ag_start_close(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
** Function bta_ag_post_sco_open
**
** Description Perform post-SCO open action, if any
-**
+**
**
** Returns void
**
@@ -718,7 +718,7 @@ void bta_ag_post_sco_open(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
** Function bta_ag_post_sco_close
**
** Description Perform post-SCO close action, if any
-**
+**
**
** Returns void
**
@@ -742,7 +742,7 @@ void bta_ag_post_sco_close(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
p_scb->post_sco = BTA_AG_POST_SCO_NONE;
break;
- case BTA_AG_POST_SCO_CALL_END:
+ case BTA_AG_POST_SCO_CALL_END:
bta_ag_send_call_inds(p_scb, BTA_AG_END_CALL_RES);
p_scb->post_sco = BTA_AG_POST_SCO_NONE;
break;
@@ -775,7 +775,7 @@ void bta_ag_post_sco_close(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
** Function bta_ag_svc_conn_open
**
** Description Service level connection opened
-**
+**
**
** Returns void
**
@@ -809,7 +809,7 @@ void bta_ag_svc_conn_open(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
bta_sys_sco_use(BTA_ID_AG, p_scb->app_id, p_scb->peer_addr);
}
- (*bta_ag_cb.p_cback)(BTA_AG_CONN_EVT, (tBTA_AG *) &evt);
+ (*bta_ag_cb.p_cback)(BTA_AG_CONN_EVT, (tBTA_AG *) &evt);
}
}
@@ -827,7 +827,7 @@ void bta_ag_ci_rx_data(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
UINT16 len;
tBTA_AG_CI_RX_WRITE *p_rx_write_msg = (tBTA_AG_CI_RX_WRITE *)p_data;
char *p_data_area = (char *)(p_rx_write_msg+1); /* Point to data area after header */
-
+
/* send to RFCOMM */
PORT_WriteData(p_scb->conn_handle, p_data_area, strlen(p_data_area), &len);
}
diff --git a/bta/ag/bta_ag_api.c b/bta/ag/bta_ag_api.c
index d2e38e2..f20e4d9 100644
--- a/bta/ag/bta_ag_api.c
+++ b/bta/ag/bta_ag_api.c
@@ -33,7 +33,7 @@ static const tBTA_SYS_REG bta_ag_reg =
**
** Function BTA_AgEnable
**
-** Description Enable the audio gateway service. When the enable
+** Description Enable the audio gateway service. When the enable
** operation is complete the callback function will be
** called with a BTA_AG_ENABLE_EVT. This function must
** be called before other function in the AG API are
@@ -71,7 +71,7 @@ tBTA_STATUS BTA_AgEnable(tBTA_AG_PARSE_MODE parse_mode, tBTA_AG_CBACK *p_cback)
}
return BTA_SUCCESS;
-
+
}
/*******************************************************************************
@@ -79,7 +79,7 @@ tBTA_STATUS BTA_AgEnable(tBTA_AG_PARSE_MODE parse_mode, tBTA_AG_CBACK *p_cback)
** Function BTA_AgDisable
**
** Description Disable the audio gateway service
-**
+**
**
** Returns void
**
@@ -139,7 +139,7 @@ void BTA_AgRegister(tBTA_SERVICE_MASK services, tBTA_SEC sec_mask,tBTA_AG_FEAT f
** Function BTA_AgDeregister
**
** Description Deregister an audio gateway service.
-**
+**
**
** Returns void
**
@@ -164,7 +164,7 @@ void BTA_AgDeregister(UINT16 handle)
** When connection is open callback function is called
** with a BTA_AG_OPEN_EVT. Only the data connection is
** opened. The audio connection is not opened.
-**
+**
**
** Returns void
**
@@ -190,7 +190,7 @@ void BTA_AgOpen(UINT16 handle, BD_ADDR bd_addr, tBTA_SEC sec_mask, tBTA_SERVICE_
**
** Description Close the current connection to a headset or a handsfree
** Any current audio connection will also be closed.
-**
+**
**
** Returns void
**
@@ -213,7 +213,7 @@ void BTA_AgClose(UINT16 handle)
**
** Description Opens an audio connection to the currently connected
** headset or hnadsfree.
-**
+**
**
** Returns void
**
@@ -236,7 +236,7 @@ void BTA_AgAudioOpen(UINT16 handle)
**
** Description Close the currently active audio connection to a headset
** or hnadsfree. The data connection remains open
-**
+**
**
** Returns void
**
@@ -259,7 +259,7 @@ void BTA_AgAudioClose(UINT16 handle)
** Function BTA_AgResult
**
** Description Send an AT result code to a headset or hands-free device.
-** This function is only used when the AG parse mode is set
+** This function is only used when the AG parse mode is set
** to BTA_AG_PARSE.
**
**
@@ -287,9 +287,9 @@ void BTA_AgResult(UINT16 handle, tBTA_AG_RES result, tBTA_AG_RES_DATA *p_data)
**
** Function BTA_AgSetCodec
**
-** Description Specify the codec type to be used for the subsequent
-** audio connection.
-**
+** Description Specify the codec type to be used for the subsequent
+** audio connection.
+**
**
**
** Returns void
diff --git a/bta/ag/bta_ag_at.c b/bta/ag/bta_ag_at.c
index 4d3bcac..21609df 100644
--- a/bta/ag/bta_ag_at.c
+++ b/bta/ag/bta_ag_at.c
@@ -23,7 +23,7 @@
** Function bta_ag_at_init
**
** Description Initialize the AT command parser control block.
-**
+**
**
** Returns void
**
@@ -41,7 +41,7 @@ void bta_ag_at_init(tBTA_AG_AT_CB *p_cb)
** Description Re-initialize the AT command parser control block. This
** function resets the AT command parser state and frees
** any GKI buffer.
-**
+**
**
** Returns void
**
@@ -62,7 +62,7 @@ void bta_ag_at_reinit(tBTA_AG_AT_CB *p_cb)
** Description Parse AT commands. This function will take the input
** character string and parse it for AT commands according to
** the AT command table passed in the control block.
-**
+**
**
** Returns void
**
@@ -138,7 +138,7 @@ void bta_ag_process_at(tBTA_AG_AT_CB *p_cb)
}
else
{
-
+
(*p_cb->p_cmd_cback)(p_cb->p_user, idx, arg_type, p_arg, int_arg);
}
}
@@ -167,7 +167,7 @@ void bta_ag_process_at(tBTA_AG_AT_CB *p_cb)
** Description Parse AT commands. This function will take the input
** character string and parse it for AT commands according to
** the AT command table passed in the control block.
-**
+**
**
** Returns void
**
@@ -193,7 +193,7 @@ void bta_ag_at_parse(tBTA_AG_AT_CB *p_cb, char *p_buf, UINT16 len)
i++;
continue;
}
-
+
p_cb->p_cmd_buf[p_cb->cmd_pos] = p_buf[i++];
if ( p_cb->p_cmd_buf[p_cb->cmd_pos] == '\r' || p_cb->p_cmd_buf[p_cb->cmd_pos] == '\n')
{
@@ -209,8 +209,8 @@ void bta_ag_at_parse(tBTA_AG_AT_CB *p_cb, char *p_buf, UINT16 len)
}
p_cb->cmd_pos = 0;
-
- }
+
+ }
else if( p_cb->p_cmd_buf[p_cb->cmd_pos] == 0x1A || p_cb->p_cmd_buf[p_cb->cmd_pos] == 0x1B )
{
p_cb->p_cmd_buf[++p_cb->cmd_pos] = 0;
diff --git a/bta/ag/bta_ag_at.h b/bta/ag/bta_ag_at.h
index 2bdd6ae..53a60d7 100644
--- a/bta/ag/bta_ag_at.h
+++ b/bta/ag/bta_ag_at.h
@@ -69,7 +69,7 @@ typedef struct
** Function bta_ag_at_init
**
** Description Initialize the AT command parser control block.
-**
+**
**
** Returns void
**
@@ -83,7 +83,7 @@ extern void bta_ag_at_init(tBTA_AG_AT_CB *p_cb);
** Description Re-initialize the AT command parser control block. This
** function resets the AT command parser state and frees
** any GKI buffer.
-**
+**
**
** Returns void
**
@@ -97,7 +97,7 @@ extern void bta_ag_at_reinit(tBTA_AG_AT_CB *p_cb);
** Description Parse AT commands. This function will take the input
** character string and parse it for AT commands according to
** the AT command table passed in the control block.
-**
+**
**
** Returns void
**
diff --git a/bta/ag/bta_ag_ci.c b/bta/ag/bta_ag_ci.c
index bbd1a55..5aa11fe 100644
--- a/bta/ag/bta_ag_ci.c
+++ b/bta/ag/bta_ag_ci.c
@@ -21,11 +21,11 @@
**
** Function bta_ag_ci_rx_write
**
-** Description This function is called to send data to the AG when the AG
+** Description This function is called to send data to the AG when the AG
** is configured for AT command pass-through. The function
-** copies data to an event buffer and sends it.
+** copies data to an event buffer and sends it.
**
-** Returns void
+** Returns void
**
******************************************************************************/
void bta_ag_ci_rx_write(UINT16 handle, char *p_data, UINT16 len)
@@ -66,11 +66,11 @@ void bta_ag_ci_rx_write(UINT16 handle, char *p_data, UINT16 len)
**
** Function bta_ag_ci_slc_ready
**
-** Description This function is called to notify AG that SLC is up at
+** Description This function is called to notify AG that SLC is up at
** the application. This funcion is only used when the app
** is running in pass-through mode.
**
-** Returns void
+** Returns void
**
******************************************************************************/
void bta_ag_ci_slc_ready(UINT16 handle)
diff --git a/bta/ag/bta_ag_cmd.c b/bta/ag/bta_ag_cmd.c
index 0ee5153..f3d5714 100755..100644
--- a/bta/ag/bta_ag_cmd.c
+++ b/bta/ag/bta_ag_cmd.c
@@ -32,13 +32,13 @@
/* clip type constants */
-#define BTA_AG_CLIP_TYPE_MIN 128
-#define BTA_AG_CLIP_TYPE_MAX 175
+#define BTA_AG_CLIP_TYPE_MIN 128
+#define BTA_AG_CLIP_TYPE_MAX 175
#define BTA_AG_CLIP_TYPE_DEFAULT 129
#define BTA_AG_CLIP_TYPE_VOIP 255
#if defined(BTA_AG_MULTI_RESULT_INCLUDED) && (BTA_AG_MULTI_RESULT_INCLUDED == TRUE)
-#define BTA_AG_AT_MULTI_LEN 2
+#define BTA_AG_AT_MULTI_LEN 2
#define AT_SET_RES_CB(res_cb, c, p, i) {res_cb.code = c; res_cb.p_arg = p; res_cb.int_arg = i;}
/* type for AT result code block */
@@ -61,24 +61,24 @@ typedef struct
enum
{
BTA_AG_HS_CMD_CKPD,
- BTA_AG_HS_CMD_VGS,
+ BTA_AG_HS_CMD_VGS,
BTA_AG_HS_CMD_VGM
};
/* enumeration of HFP AT commands matches HFP command interpreter table */
enum
{
- BTA_AG_HF_CMD_A,
- BTA_AG_HF_CMD_D,
- BTA_AG_HF_CMD_VGS,
- BTA_AG_HF_CMD_VGM,
+ BTA_AG_HF_CMD_A,
+ BTA_AG_HF_CMD_D,
+ BTA_AG_HF_CMD_VGS,
+ BTA_AG_HF_CMD_VGM,
BTA_AG_HF_CMD_CCWA,
BTA_AG_HF_CMD_CHLD,
BTA_AG_HF_CMD_CHUP,
BTA_AG_HF_CMD_CIND,
BTA_AG_HF_CMD_CLIP,
BTA_AG_HF_CMD_CMER,
- BTA_AG_HF_CMD_VTS,
+ BTA_AG_HF_CMD_VTS,
BTA_AG_HF_CMD_BINP,
BTA_AG_HF_CMD_BLDN,
BTA_AG_HF_CMD_BVRA,
@@ -180,7 +180,7 @@ enum
};
#if defined(BTA_HSP_RESULT_REPLACE_COLON) && (BTA_HSP_RESULT_REPLACE_COLON == TRUE)
-#define COLON_IDX_4_VGSVGM 4
+#define COLON_IDX_4_VGSVGM 4
#endif
/* AT result code constant table (Indexed by result code) */
const tBTA_AG_RESULT bta_ag_result_tbl[] =
@@ -216,7 +216,7 @@ const tBTA_AG_AT_CMD *bta_ag_at_tbl[BTA_AG_NUM_IDX] =
/* callback event lookup table for HSP */
const tBTA_AG_EVT bta_ag_hsp_cb_evt[] =
-{
+{
BTA_AG_AT_CKPD_EVT, /* BTA_AG_HS_CMD_CKPD */
BTA_AG_SPK_EVT, /* BTA_AG_HS_CMD_VGS */
BTA_AG_MIC_EVT /* BTA_AG_HS_CMD_VGM */
@@ -226,16 +226,16 @@ const tBTA_AG_EVT bta_ag_hsp_cb_evt[] =
const tBTA_AG_EVT bta_ag_hfp_cb_evt[] =
{
BTA_AG_AT_A_EVT, /* BTA_AG_HF_CMD_A */
- BTA_AG_AT_D_EVT, /* BTA_AG_HF_CMD_D */
- BTA_AG_SPK_EVT, /* BTA_AG_HF_CMD_VGS */
- BTA_AG_MIC_EVT, /* BTA_AG_HF_CMD_VGM */
+ BTA_AG_AT_D_EVT, /* BTA_AG_HF_CMD_D */
+ BTA_AG_SPK_EVT, /* BTA_AG_HF_CMD_VGS */
+ BTA_AG_MIC_EVT, /* BTA_AG_HF_CMD_VGM */
0, /* BTA_AG_HF_CMD_CCWA */
BTA_AG_AT_CHLD_EVT, /* BTA_AG_HF_CMD_CHLD */
BTA_AG_AT_CHUP_EVT, /* BTA_AG_HF_CMD_CHUP */
BTA_AG_AT_CIND_EVT, /* BTA_AG_HF_CMD_CIND */
0, /* BTA_AG_HF_CMD_CLIP */
0, /* BTA_AG_HF_CMD_CMER */
- BTA_AG_AT_VTS_EVT, /* BTA_AG_HF_CMD_VTS */
+ BTA_AG_AT_VTS_EVT, /* BTA_AG_HF_CMD_VTS */
BTA_AG_AT_BINP_EVT, /* BTA_AG_HF_CMD_BINP */
BTA_AG_AT_BLDN_EVT, /* BTA_AG_HF_CMD_BLDN */
BTA_AG_AT_BVRA_EVT, /* BTA_AG_HF_CMD_BVRA */
@@ -256,60 +256,60 @@ const tBTA_AG_EVT bta_ag_hfp_cb_evt[] =
/* translation of API result code values to internal values */
const UINT8 bta_ag_trans_result[] =
{
- BTA_AG_RES_VGS, /* BTA_AG_SPK_RES */
- BTA_AG_RES_VGM, /* BTA_AG_MIC_RES */
- BTA_AG_RES_BSIR, /* BTA_AG_INBAND_RING_RES */
- BTA_AG_RES_CIND, /* BTA_AG_CIND_RES */
- BTA_AG_RES_BINP, /* BTA_AG_BINP_RES */
- BTA_AG_RES_CIEV, /* BTA_AG_IND_RES */
- BTA_AG_RES_BVRA, /* BTA_AG_BVRA_RES */
- BTA_AG_RES_CNUM, /* BTA_AG_CNUM_RES */
- BTA_AG_RES_BTRH, /* BTA_AG_BTRH_RES */
- BTA_AG_RES_CLCC, /* BTA_AG_CLCC_RES */
- BTA_AG_RES_COPS, /* BTA_AG_COPS_RES */
- 0, /* BTA_AG_IN_CALL_RES */
- 0, /* BTA_AG_IN_CALL_CONN_RES */
- BTA_AG_RES_CCWA, /* BTA_AG_CALL_WAIT_RES */
- 0, /* BTA_AG_OUT_CALL_ORIG_RES */
+ BTA_AG_RES_VGS, /* BTA_AG_SPK_RES */
+ BTA_AG_RES_VGM, /* BTA_AG_MIC_RES */
+ BTA_AG_RES_BSIR, /* BTA_AG_INBAND_RING_RES */
+ BTA_AG_RES_CIND, /* BTA_AG_CIND_RES */
+ BTA_AG_RES_BINP, /* BTA_AG_BINP_RES */
+ BTA_AG_RES_CIEV, /* BTA_AG_IND_RES */
+ BTA_AG_RES_BVRA, /* BTA_AG_BVRA_RES */
+ BTA_AG_RES_CNUM, /* BTA_AG_CNUM_RES */
+ BTA_AG_RES_BTRH, /* BTA_AG_BTRH_RES */
+ BTA_AG_RES_CLCC, /* BTA_AG_CLCC_RES */
+ BTA_AG_RES_COPS, /* BTA_AG_COPS_RES */
+ 0, /* BTA_AG_IN_CALL_RES */
+ 0, /* BTA_AG_IN_CALL_CONN_RES */
+ BTA_AG_RES_CCWA, /* BTA_AG_CALL_WAIT_RES */
+ 0, /* BTA_AG_OUT_CALL_ORIG_RES */
0, /* BTA_AG_OUT_CALL_ALERT_RES */
- 0, /* BTA_AG_OUT_CALL_CONN_RES */
- 0, /* BTA_AG_CALL_CANCEL_RES */
- 0, /* BTA_AG_END_CALL_RES */
- 0, /* BTA_AG_IN_CALL_HELD_RES */
+ 0, /* BTA_AG_OUT_CALL_CONN_RES */
+ 0, /* BTA_AG_CALL_CANCEL_RES */
+ 0, /* BTA_AG_END_CALL_RES */
+ 0, /* BTA_AG_IN_CALL_HELD_RES */
BTA_AG_RES_UNAT /* BTA_AG_UNAT_RES */
};
/* callsetup indicator value lookup table */
const UINT8 bta_ag_callsetup_ind_tbl[] =
{
- 0, /* BTA_AG_SPK_RES */
- 0, /* BTA_AG_MIC_RES */
- 0, /* BTA_AG_INBAND_RING_RES */
- 0, /* BTA_AG_CIND_RES */
- 0, /* BTA_AG_BINP_RES */
- 0, /* BTA_AG_IND_RES */
- 0, /* BTA_AG_BVRA_RES */
- 0, /* BTA_AG_CNUM_RES */
- 0, /* BTA_AG_BTRH_RES */
- 0, /* BTA_AG_CLCC_RES */
- 0, /* BTA_AG_COPS_RES */
- BTA_AG_CALLSETUP_INCOMING, /* BTA_AG_IN_CALL_RES */
- BTA_AG_CALLSETUP_NONE, /* BTA_AG_IN_CALL_CONN_RES */
- BTA_AG_CALLSETUP_INCOMING, /* BTA_AG_CALL_WAIT_RES */
- BTA_AG_CALLSETUP_OUTGOING, /* BTA_AG_OUT_CALL_ORIG_RES */
+ 0, /* BTA_AG_SPK_RES */
+ 0, /* BTA_AG_MIC_RES */
+ 0, /* BTA_AG_INBAND_RING_RES */
+ 0, /* BTA_AG_CIND_RES */
+ 0, /* BTA_AG_BINP_RES */
+ 0, /* BTA_AG_IND_RES */
+ 0, /* BTA_AG_BVRA_RES */
+ 0, /* BTA_AG_CNUM_RES */
+ 0, /* BTA_AG_BTRH_RES */
+ 0, /* BTA_AG_CLCC_RES */
+ 0, /* BTA_AG_COPS_RES */
+ BTA_AG_CALLSETUP_INCOMING, /* BTA_AG_IN_CALL_RES */
+ BTA_AG_CALLSETUP_NONE, /* BTA_AG_IN_CALL_CONN_RES */
+ BTA_AG_CALLSETUP_INCOMING, /* BTA_AG_CALL_WAIT_RES */
+ BTA_AG_CALLSETUP_OUTGOING, /* BTA_AG_OUT_CALL_ORIG_RES */
BTA_AG_CALLSETUP_ALERTING, /* BTA_AG_OUT_CALL_ALERT_RES */
- BTA_AG_CALLSETUP_NONE, /* BTA_AG_OUT_CALL_CONN_RES */
- BTA_AG_CALLSETUP_NONE, /* BTA_AG_CALL_CANCEL_RES */
- BTA_AG_CALLSETUP_NONE, /* BTA_AG_END_CALL_RES */
- BTA_AG_CALLSETUP_NONE /* BTA_AG_IN_CALL_HELD_RES */
-};
+ BTA_AG_CALLSETUP_NONE, /* BTA_AG_OUT_CALL_CONN_RES */
+ BTA_AG_CALLSETUP_NONE, /* BTA_AG_CALL_CANCEL_RES */
+ BTA_AG_CALLSETUP_NONE, /* BTA_AG_END_CALL_RES */
+ BTA_AG_CALLSETUP_NONE /* BTA_AG_IN_CALL_HELD_RES */
+};
/*******************************************************************************
**
** Function bta_ag_send_result
**
** Description Send an AT result code.
-**
+**
**
** Returns void
**
@@ -342,13 +342,13 @@ static void bta_ag_send_result(tBTA_AG_SCB *p_scb, UINT8 code, char *p_arg,
{
#if defined(BTA_AG_RESULT_DEBUG) && (BTA_AG_RESULT_DEBUG == TRUE)
APPL_TRACE_DEBUG0("[HSP] ':'symbol is changed as '=' for HSP compatibility");
- #endif
+ #endif
*(p+COLON_IDX_4_VGSVGM) = '=';
}
break;
}
}
-#endif
+#endif
p += strlen(bta_ag_result_tbl[code].p_res);
/* copy argument if any */
@@ -368,7 +368,7 @@ static void bta_ag_send_result(tBTA_AG_SCB *p_scb, UINT8 code, char *p_arg,
#if defined(BTA_AG_RESULT_DEBUG) && (BTA_AG_RESULT_DEBUG == TRUE)
APPL_TRACE_DEBUG1("bta_ag_send_result: %s", buf);
-#endif
+#endif
/* send to RFCOMM */
PORT_WriteData(p_scb->conn_handle, buf, (UINT16) (p - buf), &len);
@@ -380,7 +380,7 @@ static void bta_ag_send_result(tBTA_AG_SCB *p_scb, UINT8 code, char *p_arg,
** Function bta_ag_send_multi_result
**
** Description Send multiple AT result codes.
-**
+**
**
** Returns void
**
@@ -397,7 +397,7 @@ static void bta_ag_send_multi_result(tBTA_AG_SCB *p_scb, tBTA_AG_MULTI_RESULT_CB
APPL_TRACE_DEBUG0("m_res_cb is NULL or num_result is out of range.");
return;
}
-
+
#if defined(BTA_AG_RESULT_DEBUG) && (BTA_AG_RESULT_DEBUG == TRUE)
memset(buf, NULL, sizeof(buf));
#endif
@@ -407,11 +407,11 @@ static void bta_ag_send_multi_result(tBTA_AG_SCB *p_scb, tBTA_AG_MULTI_RESULT_CB
/* init with \r\n */
*p++ = '\r';
*p++ = '\n';
-
+
/* copy result code string */
BCM_STRCPY_S(p, sizeof(buf), bta_ag_result_tbl[m_res_cb->res_cb[res_idx].code].p_res);
p += strlen(bta_ag_result_tbl[m_res_cb->res_cb[res_idx].code].p_res);
-
+
/* copy argument if any */
if (bta_ag_result_tbl[m_res_cb->res_cb[res_idx].code].fmt == BTA_AG_RES_FMT_INT)
{
@@ -422,17 +422,17 @@ static void bta_ag_send_multi_result(tBTA_AG_SCB *p_scb, tBTA_AG_MULTI_RESULT_CB
BCM_STRCPY_S(p, sizeof(buf), m_res_cb->res_cb[res_idx].p_arg);
p += strlen(m_res_cb->res_cb[res_idx].p_arg);
}
-
+
/* finish with \r\n */
*p++ = '\r';
*p++ = '\n';
-
+
res_idx++;
}
#if defined(BTA_AG_RESULT_DEBUG) && (BTA_AG_RESULT_DEBUG == TRUE)
APPL_TRACE_DEBUG1("send_result: %s", buf);
-#endif
+#endif
/* send to RFCOMM */
PORT_WriteData(p_scb->conn_handle, buf, (UINT16) (p - buf), &len);
@@ -444,7 +444,7 @@ static void bta_ag_send_multi_result(tBTA_AG_SCB *p_scb, tBTA_AG_MULTI_RESULT_CB
** Function bta_ag_send_ok
**
** Description Send an OK result code.
-**
+**
**
** Returns void
**
@@ -460,7 +460,7 @@ static void bta_ag_send_ok(tBTA_AG_SCB *p_scb)
**
** Description Send an ERROR result code.
** errcode - used to send verbose errocode
-**
+**
**
** Returns void
**
@@ -479,7 +479,7 @@ static void bta_ag_send_error(tBTA_AG_SCB *p_scb, INT16 errcode)
** Function bta_ag_send_ind
**
** Description Send an indicator CIEV result code.
-**
+**
**
** Returns void
**
@@ -565,7 +565,7 @@ static void bta_ag_send_ind(tBTA_AG_SCB *p_scb, UINT16 id, UINT16 value, BOOLEAN
** Function bta_ag_parse_cmer
**
** Description Parse AT+CMER parameter string.
-**
+**
**
** Returns TRUE if parsed ok, FALSE otherwise.
**
@@ -610,7 +610,7 @@ static BOOLEAN bta_ag_parse_cmer(char *p_s, BOOLEAN *p_enabled)
** Function bta_ag_parse_chld
**
** Description Parse AT+CHLD parameter string.
-**
+**
**
** Returns Returns idx (1-7), or 0 if ECC not enabled or idx doesn't exist
**
@@ -627,7 +627,7 @@ static UINT8 bta_ag_parse_chld(tBTA_AG_SCB *p_scb, char *p_s)
if (idx != -1 && idx < 255)
retval = (UINT8)idx;
}
-
+
return (retval);
}
@@ -637,7 +637,7 @@ static UINT8 bta_ag_parse_chld(tBTA_AG_SCB *p_scb, char *p_s)
** Function bta_ag_parse_bac
**
** Description Parse AT+BAC parameter string.
-**
+**
** Returns Returns bitmap of supported codecs.
**
*******************************************************************************/
@@ -649,7 +649,7 @@ static tBTA_AG_PEER_CODEC bta_ag_parse_bac(tBTA_AG_SCB *p_scb, char *p_s)
char *p;
while(p_s)
- {
+ {
/* skip to comma delimiter */
for(p = p_s; *p != ',' && *p != 0; p++);
@@ -688,7 +688,7 @@ static tBTA_AG_PEER_CODEC bta_ag_parse_bac(tBTA_AG_SCB *p_scb, char *p_s)
**
** Description Process the unat response data and remove extra carriage return
** and line feed
-**
+**
**
** Returns void
**
@@ -703,33 +703,33 @@ static void bta_ag_process_unat_res(char *unat_result)
char trim_data[BTA_AG_AT_MAX_LEN];
-
+
str_leng = strlen(unat_result);
/* If no extra CR and LF, just return */
if(str_leng < 4)
return;
-
- /* Remove the carriage return and left feed */
- while(unat_result[0] =='\r' && unat_result[1] =='\n'
+
+ /* Remove the carriage return and left feed */
+ while(unat_result[0] =='\r' && unat_result[1] =='\n'
&& unat_result[str_leng-2] =='\r' && unat_result[str_leng-1] =='\n')
{
pairs_of_nl_cr = 1;
for (i=0;i<(str_leng-4*pairs_of_nl_cr);i++)
{
trim_data[j++] = unat_result[i+pairs_of_nl_cr*2];
- }
+ }
/* Add EOF */
trim_data[j] = '\0';
str_leng = str_leng - 4;
BCM_STRNCPY_S(unat_result, BTA_AG_AT_MAX_LEN+1, trim_data,str_leng+1);
i=0;
j=0;
-
+
if(str_leng <4)
return;
-
-
+
+
}
return;
}
@@ -740,7 +740,7 @@ static void bta_ag_process_unat_res(char *unat_result)
** Function bta_ag_inband_enabled
**
** Description Determine whether in-band ring can be used.
-**
+**
**
** Returns void
**
@@ -763,7 +763,7 @@ BOOLEAN bta_ag_inband_enabled(tBTA_AG_SCB *p_scb)
** Function bta_ag_send_call_inds
**
** Description Send call and callsetup indicators.
-**
+**
**
** Returns void
**
@@ -780,7 +780,7 @@ void bta_ag_send_call_inds(tBTA_AG_SCB *p_scb, tBTA_AG_RES result)
{
call = BTA_AG_CALL_INACTIVE;
}
- else if (result == BTA_AG_IN_CALL_CONN_RES || result == BTA_AG_OUT_CALL_CONN_RES
+ else if (result == BTA_AG_IN_CALL_CONN_RES || result == BTA_AG_OUT_CALL_CONN_RES
|| result == BTA_AG_IN_CALL_HELD_RES)
{
call = BTA_AG_CALL_ACTIVE;
@@ -800,7 +800,7 @@ void bta_ag_send_call_inds(tBTA_AG_SCB *p_scb, tBTA_AG_RES result)
** Function bta_ag_at_hsp_cback
**
** Description AT command processing callback for HSP.
-**
+**
**
** Returns void
**
@@ -808,7 +808,7 @@ void bta_ag_send_call_inds(tBTA_AG_SCB *p_scb, tBTA_AG_RES result)
void bta_ag_at_hsp_cback(tBTA_AG_SCB *p_scb, UINT16 cmd, UINT8 arg_type,
char *p_arg, INT16 int_arg)
{
- tBTA_AG_VAL val;
+ tBTA_AG_VAL val;
APPL_TRACE_DEBUG4("AT cmd:%d arg_type:%d arg:%d arg:%s", cmd, arg_type,
int_arg, p_arg);
@@ -831,7 +831,7 @@ void bta_ag_at_hsp_cback(tBTA_AG_SCB *p_scb, UINT16 cmd, UINT8 arg_type,
** Function bta_ag_at_hfp_cback
**
** Description AT command processing callback for HFP.
-**
+**
**
** Returns void
**
@@ -839,7 +839,7 @@ void bta_ag_at_hsp_cback(tBTA_AG_SCB *p_scb, UINT16 cmd, UINT8 arg_type,
void bta_ag_at_hfp_cback(tBTA_AG_SCB *p_scb, UINT16 cmd, UINT8 arg_type,
char *p_arg, INT16 int_arg)
{
- tBTA_AG_VAL val;
+ tBTA_AG_VAL val;
tBTA_AG_EVT event;
tBTA_AG_SCB *ag_scb;
UINT32 i, ind_id;
@@ -862,8 +862,8 @@ void bta_ag_at_hfp_cback(tBTA_AG_SCB *p_scb, UINT16 cmd, UINT8 arg_type,
switch (cmd)
{
case BTA_AG_HF_CMD_A:
- case BTA_AG_HF_CMD_VGS:
- case BTA_AG_HF_CMD_VGM:
+ case BTA_AG_HF_CMD_VGS:
+ case BTA_AG_HF_CMD_VGM:
case BTA_AG_HF_CMD_CHUP:
case BTA_AG_HF_CMD_CBC:
/* send OK */
@@ -871,7 +871,7 @@ void bta_ag_at_hfp_cback(tBTA_AG_SCB *p_scb, UINT16 cmd, UINT8 arg_type,
break;
case BTA_AG_HF_CMD_BLDN:
- /* Do not send OK, App will send error or OK depending on
+ /* Do not send OK, App will send error or OK depending on
** last dial number enabled or not */
break;
@@ -937,7 +937,7 @@ void bta_ag_at_hfp_cback(tBTA_AG_SCB *p_scb, UINT16 cmd, UINT8 arg_type,
/* if service level conn. not already open, now it's open */
bta_ag_svc_conn_open(p_scb, NULL);
-
+
}
else
{
@@ -947,7 +947,7 @@ void bta_ag_at_hfp_cback(tBTA_AG_SCB *p_scb, UINT16 cmd, UINT8 arg_type,
{
/* we do not support ECC, but HF is sending us a CHLD with call index*/
event = 0;
- bta_ag_send_error(p_scb, BTA_AG_ERR_OP_NOT_SUPPORTED);
+ bta_ag_send_error(p_scb, BTA_AG_ERR_OP_NOT_SUPPORTED);
}
else
@@ -957,19 +957,19 @@ void bta_ag_at_hfp_cback(tBTA_AG_SCB *p_scb, UINT16 cmd, UINT8 arg_type,
** Application will set it back to 1
** callheld indicator will be sent across to the peer. */
if(val.str[0] == '2')
- {
+ {
for (i = 0, ag_scb = &bta_ag_cb.scb[0]; i < BTA_AG_NUM_SCB; i++, ag_scb++)
{
if (ag_scb->in_use)
{
- if((ag_scb->call_ind == BTA_AG_CALL_ACTIVE)
+ if((ag_scb->call_ind == BTA_AG_CALL_ACTIVE)
&& (ag_scb->callsetup_ind == BTA_AG_CALLSETUP_NONE))
ag_scb->callheld_ind = BTA_AG_CALLHELD_NOACTIVE + 1;
}
}
}
}
-
+
/* Do not send OK. Let app decide after parsing the val str */
/* bta_ag_send_ok(p_scb); */
}
@@ -1165,7 +1165,7 @@ void bta_ag_at_hfp_cback(tBTA_AG_SCB *p_scb, UINT16 cmd, UINT8 arg_type,
bta_ag_send_error(p_scb, BTA_AG_ERR_OP_NOT_SUPPORTED);
}
break;
-
+
#if (BTM_WBS_INCLUDED == TRUE )
case BTA_AG_HF_CMD_BAC:
bta_ag_send_ok(p_scb);
@@ -1184,7 +1184,7 @@ void bta_ag_at_hfp_cback(tBTA_AG_SCB *p_scb, UINT16 cmd, UINT8 arg_type,
else
{
p_scb->sco_codec = UUID_CODEC_CVSD;
- APPL_TRACE_DEBUG0("Received AT+BAC, updating sco codec to CVSD");
+ APPL_TRACE_DEBUG0("Received AT+BAC, updating sco codec to CVSD");
}
/* Received BAC while in codec negotiation. */
@@ -1223,7 +1223,7 @@ void bta_ag_at_hfp_cback(tBTA_AG_SCB *p_scb, UINT16 cmd, UINT8 arg_type,
bta_ag_sco_codec_nego(p_scb, TRUE);
else
bta_ag_sco_codec_nego(p_scb, FALSE);
-
+
bta_ag_send_ok(p_scb);
break;
@@ -1249,14 +1249,14 @@ void bta_ag_at_hfp_cback(tBTA_AG_SCB *p_scb, UINT16 cmd, UINT8 arg_type,
** Function bta_ag_at_err_cback
**
** Description AT command parser error callback.
-**
+**
**
** Returns void
**
*******************************************************************************/
void bta_ag_at_err_cback(tBTA_AG_SCB *p_scb, BOOLEAN unknown, char *p_arg)
{
- tBTA_AG_VAL val;
+ tBTA_AG_VAL val;
if(unknown && (!strlen(p_arg)))
{
@@ -1286,7 +1286,7 @@ void bta_ag_at_err_cback(tBTA_AG_SCB *p_scb, BOOLEAN unknown, char *p_arg)
** Function bta_ag_hsp_result
**
** Description Handle API result for HSP connections.
-**
+**
**
** Returns void
**
@@ -1322,7 +1322,7 @@ void bta_ag_hsp_result(tBTA_AG_SCB *p_scb, tBTA_AG_API_RESULT *p_result)
p_scb->post_sco = BTA_AG_POST_SCO_NONE;
else
p_scb->post_sco = BTA_AG_POST_SCO_RING;
-
+
bta_ag_sco_open(p_scb, (tBTA_AG_DATA *) p_result);
}
break;
@@ -1350,11 +1350,11 @@ void bta_ag_hsp_result(tBTA_AG_SCB *p_scb, tBTA_AG_API_RESULT *p_result)
}
break;
- case BTA_AG_END_CALL_RES:
+ case BTA_AG_END_CALL_RES:
/* stop ring timer */
bta_sys_stop_timer(&p_scb->act_timer);
-
- /* close sco */
+
+ /* close sco */
if ((bta_ag_sco_is_open(p_scb) || bta_ag_sco_is_opening(p_scb)) && !(p_scb->features & BTA_AG_FEAT_NOSCO))
{
bta_ag_sco_close(p_scb, (tBTA_AG_DATA *) p_result);
@@ -1399,7 +1399,7 @@ void bta_ag_hsp_result(tBTA_AG_SCB *p_scb, tBTA_AG_API_RESULT *p_result)
** Function bta_ag_hfp_result
**
** Description Handle API result for HFP connections.
-**
+**
**
** Returns void
**
@@ -1420,7 +1420,7 @@ void bta_ag_hfp_result(tBTA_AG_SCB *p_scb, tBTA_AG_API_RESULT *p_result)
case BTA_AG_IN_CALL_RES:
/* tell sys to stop av if any */
bta_sys_sco_use(BTA_ID_AG, p_scb->app_id, p_scb->peer_addr);
-
+
/* store caller id string.
* append type info at the end.
* make sure a valid type info is passed.
@@ -1495,9 +1495,9 @@ void bta_ag_hfp_result(tBTA_AG_SCB *p_scb, tBTA_AG_API_RESULT *p_result)
bta_sys_stop_timer(&p_scb->act_timer);
bta_ag_send_call_inds(p_scb, p_result->result);
-
+
break;
-
+
case BTA_AG_OUT_CALL_ORIG_RES:
/* if sco open and we need to close it, close sco first
** then send indicators; else send indicators now
@@ -1552,7 +1552,7 @@ void bta_ag_hfp_result(tBTA_AG_SCB *p_scb, tBTA_AG_API_RESULT *p_result)
bta_ag_send_call_inds(p_scb, p_result->result);
break;
- case BTA_AG_END_CALL_RES:
+ case BTA_AG_END_CALL_RES:
/* stop ring timer */
bta_sys_stop_timer(&p_scb->act_timer);
@@ -1571,7 +1571,7 @@ void bta_ag_hfp_result(tBTA_AG_SCB *p_scb, tBTA_AG_API_RESULT *p_result)
else
{
bta_ag_send_call_inds(p_scb, p_result->result);
-
+
/* if av got suspended by this call, let it resume. */
bta_sys_sco_unuse(BTA_ID_AG, p_scb->app_id, p_scb->peer_addr);
}
@@ -1580,7 +1580,7 @@ void bta_ag_hfp_result(tBTA_AG_SCB *p_scb, tBTA_AG_API_RESULT *p_result)
case BTA_AG_INBAND_RING_RES:
p_scb->inband_enabled = p_result->data.state;
APPL_TRACE_DEBUG1("inband_enabled set to %d", p_scb->inband_enabled);
- bta_ag_send_result(p_scb, code, NULL, p_result->data.state);
+ bta_ag_send_result(p_scb, code, NULL, p_result->data.state);
break;
case BTA_AG_CIND_RES:
@@ -1593,12 +1593,12 @@ void bta_ag_hfp_result(tBTA_AG_SCB *p_scb, tBTA_AG_API_RESULT *p_result)
p_scb->battchg_ind = p_result->data.str[10] - '0';
APPL_TRACE_DEBUG2("cind call:%d callsetup:%d", p_scb->call_ind, p_scb->callsetup_ind);
- bta_ag_send_result(p_scb, code, p_result->data.str, 0);
- bta_ag_send_ok(p_scb);
+ bta_ag_send_result(p_scb, code, p_result->data.str, 0);
+ bta_ag_send_ok(p_scb);
break;
case BTA_AG_BINP_RES:
- case BTA_AG_CNUM_RES:
+ case BTA_AG_CNUM_RES:
case BTA_AG_CLCC_RES:
case BTA_AG_COPS_RES:
if (p_result->data.ok_flag != BTA_AG_OK_ERROR)
@@ -1617,7 +1617,7 @@ void bta_ag_hfp_result(tBTA_AG_SCB *p_scb, tBTA_AG_API_RESULT *p_result)
}
break;
-
+
case BTA_AG_UNAT_RES:
if (p_result->data.ok_flag != BTA_AG_OK_ERROR)
{
@@ -1650,7 +1650,7 @@ void bta_ag_hfp_result(tBTA_AG_SCB *p_scb, tBTA_AG_API_RESULT *p_result)
break;
case BTA_AG_BVRA_RES:
- bta_ag_send_result(p_scb, code, NULL, p_result->data.state);
+ bta_ag_send_result(p_scb, code, NULL, p_result->data.state);
break;
case BTA_AG_BTRH_RES:
@@ -1659,7 +1659,7 @@ void bta_ag_hfp_result(tBTA_AG_SCB *p_scb, tBTA_AG_API_RESULT *p_result)
/* Don't respond to read if not in response & hold state */
if (p_result->data.num != BTA_AG_BTRH_NO_RESP)
{
- bta_ag_send_result(p_scb, code, NULL, p_result->data.num);
+ bta_ag_send_result(p_scb, code, NULL, p_result->data.num);
}
/* In case of a response to a read request we need to send OK */
@@ -1683,7 +1683,7 @@ void bta_ag_hfp_result(tBTA_AG_SCB *p_scb, tBTA_AG_API_RESULT *p_result)
** Function bta_ag_result
**
** Description Handle API result.
-**
+**
**
** Returns void
**
@@ -1705,7 +1705,7 @@ void bta_ag_result(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
** Function bta_ag_setcodec
**
** Description Handle API SetCodec
-**
+**
**
** Returns void
**
@@ -1714,10 +1714,10 @@ void bta_ag_setcodec(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
{
#if (BTM_WBS_INCLUDED == TRUE )
tBTA_AG_PEER_CODEC codec_type = p_data->api_setcodec.codec;
-
+
/* Check if the requested codec type is valid */
if((codec_type != BTA_AG_CODEC_NONE) &&
- (codec_type != BTA_AG_CODEC_CVSD) &&
+ (codec_type != BTA_AG_CODEC_CVSD) &&
(codec_type != BTA_AG_CODEC_MSBC))
{
APPL_TRACE_ERROR1("bta_ag_setcodec error: unsupported codec type %d", codec_type);
@@ -1744,7 +1744,7 @@ void bta_ag_setcodec(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
** Function bta_ag_send_bcs
**
** Description Send +BCS AT command to peer.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1781,7 +1781,7 @@ void bta_ag_send_bcs(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
** Function bta_ag_send_ring
**
** Description Send RING result code to peer.
-**
+**
**
** Returns void
**
@@ -1794,11 +1794,11 @@ void bta_ag_send_ring(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
if (p_scb->conn_service == BTA_AG_HFP && p_scb->clip_enabled && p_scb->clip[0] != 0)
{
memset(&m_res_cb, NULL, sizeof(tBTA_AG_MULTI_RESULT_CB));
-
+
m_res_cb.num_result = 2;
AT_SET_RES_CB(m_res_cb.res_cb[0], BTA_AG_RES_RING, NULL, 0)
AT_SET_RES_CB(m_res_cb.res_cb[1], BTA_AG_RES_CLIP, p_scb->clip, 0)
-
+
bta_ag_send_multi_result(p_scb, &m_res_cb);
}
else
diff --git a/bta/ag/bta_ag_int.h b/bta/ag/bta_ag_int.h
index d953156..0830c64 100755..100644
--- a/bta/ag/bta_ag_int.h
+++ b/bta/ag/bta_ag_int.h
@@ -283,14 +283,14 @@ typedef struct
typedef struct
{
tBTM_ESCO_CONN_REQ_EVT_DATA conn_data; /* SCO data for pending conn request */
- tBTA_AG_SCB *p_curr_scb; /* SCB associated with SCO connection */
- tBTA_AG_SCB *p_xfer_scb; /* SCB associated with SCO transfer */
+ tBTA_AG_SCB *p_curr_scb; /* SCB associated with SCO connection */
+ tBTA_AG_SCB *p_xfer_scb; /* SCB associated with SCO transfer */
UINT16 cur_idx; /* SCO handle */
UINT8 state; /* SCO state variable */
BOOLEAN param_updated; /* if params were updated to non-default */
tBTM_ESCO_PARAMS params; /* ESCO parameters */
} tBTA_AG_SCO_CB;
-
+
/* type for AG control block */
typedef struct
@@ -336,7 +336,7 @@ extern BOOLEAN bta_ag_other_scb_open(tBTA_AG_SCB *p_curr_scb);
extern tBTA_AG_SCB *bta_ag_get_other_idle_scb (tBTA_AG_SCB *p_curr_scb);
extern void bta_ag_sm_execute(tBTA_AG_SCB *p_scb, UINT16 event, tBTA_AG_DATA *p_data);
extern BOOLEAN bta_ag_hdl_event(BT_HDR *p_msg);
-extern void bta_ag_collision_cback (tBTA_SYS_CONN_STATUS status, UINT8 id,
+extern void bta_ag_collision_cback (tBTA_SYS_CONN_STATUS status, UINT8 id,
UINT8 app_id, BD_ADDR peer_addr);
extern void bta_ag_resume_open (tBTA_AG_SCB *p_scb);
diff --git a/bta/ag/bta_ag_main.c b/bta/ag/bta_ag_main.c
index 1a3bf71..cf98201 100644
--- a/bta/ag/bta_ag_main.c
+++ b/bta/ag/bta_ag_main.c
@@ -41,10 +41,10 @@ enum
/* state machine action enumeration list */
enum
{
- BTA_AG_REGISTER,
+ BTA_AG_REGISTER,
BTA_AG_DEREGISTER,
BTA_AG_START_OPEN,
- BTA_AG_RFC_DO_OPEN,
+ BTA_AG_RFC_DO_OPEN,
BTA_AG_RFC_DO_CLOSE,
BTA_AG_START_DEREG,
BTA_AG_START_CLOSE,
@@ -55,7 +55,7 @@ enum
BTA_AG_RFC_FAIL,
BTA_AG_RFC_DATA,
BTA_AG_DISC_INT_RES,
- BTA_AG_DISC_FAIL,
+ BTA_AG_DISC_FAIL,
BTA_AG_DISC_ACP_RES,
BTA_AG_FREE_DB,
BTA_AG_SCO_CONN_OPEN,
@@ -66,7 +66,7 @@ enum
BTA_AG_SCO_SHUTDOWN,
BTA_AG_POST_SCO_OPEN,
BTA_AG_POST_SCO_CLOSE,
- BTA_AG_SVC_CONN_OPEN,
+ BTA_AG_SVC_CONN_OPEN,
BTA_AG_RESULT,
BTA_AG_SETCODEC,
BTA_AG_SEND_RING,
@@ -84,10 +84,10 @@ typedef void (*tBTA_AG_ACTION)(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data);
/* action functions */
const tBTA_AG_ACTION bta_ag_action[] =
{
- bta_ag_register,
+ bta_ag_register,
bta_ag_deregister,
bta_ag_start_open,
- bta_ag_rfc_do_open,
+ bta_ag_rfc_do_open,
bta_ag_rfc_do_close,
bta_ag_start_dereg,
bta_ag_start_close,
@@ -98,7 +98,7 @@ const tBTA_AG_ACTION bta_ag_action[] =
bta_ag_rfc_fail,
bta_ag_rfc_data,
bta_ag_disc_int_res,
- bta_ag_disc_fail,
+ bta_ag_disc_fail,
bta_ag_disc_acp_res,
bta_ag_free_db,
bta_ag_sco_conn_open,
@@ -265,9 +265,9 @@ tBTA_AG_CB bta_ag_cb;
** Function bta_ag_timer_cback
**
** Description AG timer callback.
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
static void bta_ag_timer_cback(void *p)
@@ -288,7 +288,7 @@ static void bta_ag_timer_cback(void *p)
** Function bta_ag_scb_alloc
**
** Description Allocate an AG service control block.
-**
+**
**
** Returns pointer to the scb, or NULL if none could be allocated.
**
@@ -314,7 +314,7 @@ static tBTA_AG_SCB *bta_ag_scb_alloc(void)
break;
}
}
-
+
if (i == BTA_AG_NUM_SCB)
{
/* out of scbs */
@@ -329,7 +329,7 @@ static tBTA_AG_SCB *bta_ag_scb_alloc(void)
** Function bta_ag_scb_dealloc
**
** Description Deallocate a service control block.
-**
+**
**
** Returns void
**
@@ -338,15 +338,15 @@ void bta_ag_scb_dealloc(tBTA_AG_SCB *p_scb)
{
UINT8 idx;
BOOLEAN allocated = FALSE;
-
+
APPL_TRACE_DEBUG1("bta_ag_scb_dealloc %d", bta_ag_scb_to_idx(p_scb));
-
+
/* stop timers */
bta_sys_stop_timer(&p_scb->act_timer);
#if (BTM_WBS_INCLUDED == TRUE)
bta_sys_stop_timer(&p_scb->cn_timer);
#endif
-
+
/* initialize control block */
memset(p_scb, 0, sizeof(tBTA_AG_SCB));
p_scb->sco_idx = BTM_INVALID_SCO_INDEX;
@@ -368,7 +368,7 @@ void bta_ag_scb_dealloc(tBTA_AG_SCB *p_scb)
(*bta_ag_cb.p_cback)(BTA_AG_DISABLE_EVT, NULL);
}
}
-
+
}
/*******************************************************************************
@@ -376,7 +376,7 @@ void bta_ag_scb_dealloc(tBTA_AG_SCB *p_scb)
** Function bta_ag_scb_to_idx
**
** Description Given a pointer to an scb, return its index.
-**
+**
**
** Returns Index of scb.
**
@@ -392,7 +392,7 @@ UINT16 bta_ag_scb_to_idx(tBTA_AG_SCB *p_scb)
** Function bta_ag_scb_by_idx
**
** Description Given an scb index return pointer to scb.
-**
+**
**
** Returns Pointer to scb or NULL if not allocated.
**
@@ -424,7 +424,7 @@ tBTA_AG_SCB *bta_ag_scb_by_idx(UINT16 idx)
** Function bta_ag_service_to_idx
**
** Description Given a BTA service mask convert to profile index.
-**
+**
**
** Returns Profile ndex of scb.
**
@@ -446,7 +446,7 @@ UINT8 bta_ag_service_to_idx(tBTA_SERVICE_MASK services)
** Function bta_ag_idx_by_bdaddr
**
** Description Find SCB associated with peer BD address.
-**
+**
**
** Returns Index of SCB or zero if none found.
**
@@ -468,7 +468,7 @@ UINT16 bta_ag_idx_by_bdaddr(BD_ADDR peer_addr)
}
/* no scb found */
- APPL_TRACE_WARNING0("No ag scb for peer addr");
+ APPL_TRACE_WARNING0("No ag scb for peer addr");
return 0;
}
@@ -477,7 +477,7 @@ UINT16 bta_ag_idx_by_bdaddr(BD_ADDR peer_addr)
** Function bta_ag_other_scb_open
**
** Description Check whether any other scb is in open state.
-**
+**
**
** Returns TRUE if another scb is in open state, FALSE otherwise.
**
@@ -496,7 +496,7 @@ BOOLEAN bta_ag_other_scb_open(tBTA_AG_SCB *p_curr_scb)
}
/* no other scb found */
- APPL_TRACE_DEBUG0("No other ag scb open");
+ APPL_TRACE_DEBUG0("No other ag scb open");
return FALSE;
}
@@ -505,7 +505,7 @@ BOOLEAN bta_ag_other_scb_open(tBTA_AG_SCB *p_curr_scb)
** Function bta_ag_get_other_idle_scb
**
** Description Return other scb if it is in INIT st.
-**
+**
**
** Returns Pointer to other scb if INIT st, NULL otherwise.
**
@@ -524,7 +524,7 @@ tBTA_AG_SCB *bta_ag_get_other_idle_scb (tBTA_AG_SCB *p_curr_scb)
}
/* no other scb found */
- APPL_TRACE_DEBUG0("bta_ag_get_other_idle_scb: No idle AG scb");
+ APPL_TRACE_DEBUG0("bta_ag_get_other_idle_scb: No idle AG scb");
return NULL;
}
@@ -533,9 +533,9 @@ tBTA_AG_SCB *bta_ag_get_other_idle_scb (tBTA_AG_SCB *p_curr_scb)
** Function bta_ag_colli_timer_cback
**
** Description AG connection collision timer callback
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
static void bta_ag_colli_timer_cback (TIMER_LIST_ENT *p_tle)
@@ -564,12 +564,12 @@ static void bta_ag_colli_timer_cback (TIMER_LIST_ENT *p_tle)
** Function bta_ag_collision_cback
**
** Description Get notified about collision.
-**
+**
**
** Returns void
**
*******************************************************************************/
-void bta_ag_collision_cback (tBTA_SYS_CONN_STATUS status, UINT8 id,
+void bta_ag_collision_cback (tBTA_SYS_CONN_STATUS status, UINT8 id,
UINT8 app_id, BD_ADDR peer_addr)
{
UINT16 handle;
@@ -578,7 +578,7 @@ void bta_ag_collision_cback (tBTA_SYS_CONN_STATUS status, UINT8 id,
/* Check if we have opening scb for the peer device. */
handle = bta_ag_idx_by_bdaddr (peer_addr);
p_scb = bta_ag_scb_by_idx (handle);
-
+
if (p_scb && (p_scb->state == BTA_AG_OPENING_ST))
{
if (id == BTA_ID_SYS) /* ACL collision */
@@ -593,9 +593,9 @@ void bta_ag_collision_cback (tBTA_SYS_CONN_STATUS status, UINT8 id,
{
APPL_TRACE_WARNING0 ("AG found collision (\?\?\?) ...");
}
-
+
p_scb->state = BTA_AG_INIT_ST;
-
+
/* Cancel SDP if it had been started. */
if(p_scb->p_disc_db)
{
@@ -614,7 +614,7 @@ void bta_ag_collision_cback (tBTA_SYS_CONN_STATUS status, UINT8 id,
bta_sys_start_timer(&p_scb->colli_timer, 0, BTA_AG_COLLISION_TIMER);
p_scb->colli_tmr_on = TRUE;
}
-
+
}
/*******************************************************************************
@@ -622,7 +622,7 @@ void bta_ag_collision_cback (tBTA_SYS_CONN_STATUS status, UINT8 id,
** Function bta_ag_resume_open
**
** Description Resume opening process.
-**
+**
**
** Returns void
**
@@ -651,7 +651,7 @@ void bta_ag_resume_open (tBTA_AG_SCB *p_scb)
** Function bta_ag_api_enable
**
** Description Handle an API enable event.
-**
+**
**
** Returns void
**
@@ -669,7 +669,7 @@ static void bta_ag_api_enable(tBTA_AG_DATA *p_data)
bta_ag_co_init();
bta_sys_collision_register (BTA_ID_AG, bta_ag_collision_cback);
-
+
/* call callback with enable event */
(*bta_ag_cb.p_cback)(BTA_AG_ENABLE_EVT, NULL);
}
@@ -679,7 +679,7 @@ static void bta_ag_api_enable(tBTA_AG_DATA *p_data)
** Function bta_ag_api_disable
**
** Description Handle an API disable event.
-**
+**
**
** Returns void
**
@@ -696,12 +696,12 @@ static void bta_ag_api_disable(tBTA_AG_DATA *p_data)
APPL_TRACE_ERROR0("BTA AG is already disabled, ignoring ...");
return;
}
-
+
/* De-register with BTA system manager */
GKI_sched_lock();
bta_sys_deregister(BTA_ID_AG);
GKI_sched_unlock();
-
+
for (i = 0; i < BTA_AG_NUM_SCB; i++, p_scb++)
{
if (p_scb->in_use)
@@ -725,7 +725,7 @@ static void bta_ag_api_disable(tBTA_AG_DATA *p_data)
** Function bta_ag_api_register
**
** Description Handle an API event registers a new service.
-**
+**
**
** Returns void
**
@@ -752,7 +752,7 @@ static void bta_ag_api_register(tBTA_AG_DATA *p_data)
** Function bta_ag_api_result
**
** Description Handle an API result event.
-**
+**
**
** Returns void
**
@@ -786,7 +786,7 @@ static void bta_ag_api_result(tBTA_AG_DATA *p_data)
** Function bta_ag_sm_execute
**
** Description State machine event handling function for AG
-**
+**
**
** Returns void
**
@@ -806,7 +806,7 @@ void bta_ag_sm_execute(tBTA_AG_SCB *p_scb, UINT16 event, tBTA_AG_DATA *p_data)
{
APPL_TRACE_EVENT5("AG evt (hdl 0x%04x): State %d (%s), Event 0x%04x (%s)",
bta_ag_scb_to_idx(p_scb),
- p_scb->state, bta_ag_state_str(p_scb->state),
+ p_scb->state, bta_ag_state_str(p_scb->state),
event, bta_ag_evt_str(event, p_data->api_result.result));
}
#else
@@ -819,7 +819,7 @@ void bta_ag_sm_execute(tBTA_AG_SCB *p_scb, UINT16 event, tBTA_AG_DATA *p_data)
{
APPL_TRACE_ERROR0("AG evt out of range, ignoring...");
return;
- }
+ }
/* look up the state table for the current state */
state_table = bta_ag_st_tbl[p_scb->state];
@@ -855,7 +855,7 @@ void bta_ag_sm_execute(tBTA_AG_SCB *p_scb, UINT16 event, tBTA_AG_DATA *p_data)
** Function bta_ag_hdl_event
**
** Description Data gateway main event handling function.
-**
+**
**
** Returns BOOLEAN
**
@@ -894,7 +894,7 @@ BOOLEAN bta_ag_hdl_event(BT_HDR *p_msg)
}
break;
}
- return TRUE;
+ return TRUE;
}
#if BTA_AG_DEBUG == TRUE
diff --git a/bta/ag/bta_ag_rfc.c b/bta/ag/bta_ag_rfc.c
index bccb2cf..a26a89b 100644
--- a/bta/ag/bta_ag_rfc.c
+++ b/bta/ag/bta_ag_rfc.c
@@ -2,7 +2,7 @@
**
** Name: bta_ag_rfc.c
**
-** Description: This file contains the audio gateway functions
+** Description: This file contains the audio gateway functions
** controlling the RFCOMM connections.
**
** Copyright (c) 2004-2008, Broadcom Corp., All Rights Reserved.
@@ -67,7 +67,7 @@ const tBTA_AG_DATA_CBACK bta_ag_data_cback_tbl[] =
** Function bta_ag_port_cback
**
** Description RFCOMM Port callback
-**
+**
**
** Returns void
**
@@ -101,7 +101,7 @@ static void bta_ag_port_cback(UINT32 code, UINT16 port_handle, UINT16 handle)
** Function bta_ag_mgmt_cback
**
** Description RFCOMM management callback
-**
+**
**
** Returns void
**
@@ -116,7 +116,7 @@ static void bta_ag_mgmt_cback(UINT32 code, UINT16 port_handle, UINT16 handle)
APPL_TRACE_DEBUG3("ag_mgmt_cback : code = %d, port_handle = %d, handle = %d",
code, port_handle, handle);
-
+
if ((p_scb = bta_ag_scb_by_idx(handle)) != NULL)
{
/* ignore close event for port handles other than connected handle */
@@ -175,7 +175,7 @@ static void bta_ag_mgmt_cback(UINT32 code, UINT16 port_handle, UINT16 handle)
** Function bta_ag_data_cback
**
** Description RFCOMM data callback
-**
+**
**
** Returns void
**
@@ -194,7 +194,7 @@ static int bta_ag_data_cback(UINT16 port_handle, void *p_data, UINT16 len, UINT1
**
** Description RFCOMM callback functions. This is an easy way to
** distinguish scb from the callback.
-**
+**
**
** Returns void
**
@@ -212,7 +212,7 @@ void bta_ag_port_cback_3(UINT32 code, UINT16 handle) {bta_ag_port_cback(code, ha
**
** Description RFCOMM data callback functions. This is an easy way to
** distinguish scb from the callback.
-**
+**
**
** Returns void
**
@@ -235,7 +235,7 @@ int bta_ag_data_cback_3(UINT16 port_handle, void *p_data, UINT16 len)
** Function bta_ag_setup_port
**
** Description Setup RFCOMM port for use by AG.
-**
+**
**
** Returns void
**
@@ -249,7 +249,7 @@ void bta_ag_setup_port(tBTA_AG_SCB *p_scb, UINT16 handle)
{
PORT_SetDataCallback(handle, bta_ag_data_cback_tbl[i]);
}
-
+
PORT_SetEventMask(handle, BTA_AG_PORT_EV_MASK);
PORT_SetEventCallback(handle, bta_ag_port_cback_tbl[i]);
}
@@ -259,7 +259,7 @@ void bta_ag_setup_port(tBTA_AG_SCB *p_scb, UINT16 handle)
** Function bta_ag_start_servers
**
** Description Setup RFCOMM servers for use by AG.
-**
+**
**
** Returns void
**
@@ -300,7 +300,7 @@ void bta_ag_start_servers(tBTA_AG_SCB *p_scb, tBTA_SERVICE_MASK services)
** Function bta_ag_close_servers
**
** Description Close RFCOMM servers port for use by AG.
-**
+**
**
** Returns void
**
@@ -326,7 +326,7 @@ void bta_ag_close_servers(tBTA_AG_SCB *p_scb, tBTA_SERVICE_MASK services)
** Function bta_ag_is_server_closed
**
** Description Returns TRUE if all servers are closed.
-**
+**
**
** Returns TRUE if all servers are closed, FALSE otherwise
**
@@ -350,7 +350,7 @@ BOOLEAN bta_ag_is_server_closed (tBTA_AG_SCB *p_scb)
** Function bta_ag_rfc_do_open
**
** Description Open an RFCOMM connection to the peer device.
-**
+**
**
** Returns void
**
@@ -379,7 +379,7 @@ void bta_ag_rfc_do_open(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
** Function bta_ag_rfc_do_close
**
** Description Close RFCOMM connection.
-**
+**
**
** Returns void
**
@@ -396,7 +396,7 @@ void bta_ag_rfc_do_close(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
{
/* Close API was called while AG is in Opening state. */
/* Need to trigger the state machine to send callback to the app */
- /* and move back to INIT state. */
+ /* and move back to INIT state. */
if ((p_buf = (tBTA_AG_RFC *) GKI_getbuf(sizeof(tBTA_AG_RFC))) != NULL)
{
p_buf->hdr.event = BTA_AG_RFC_CLOSE_EVT;
diff --git a/bta/ag/bta_ag_sco.c b/bta/ag/bta_ag_sco.c
index 021b96c..dd3a971 100644
--- a/bta/ag/bta_ag_sco.c
+++ b/bta/ag/bta_ag_sco.c
@@ -13,7 +13,7 @@
#include "bta_api.h"
#include "bta_ag_api.h"
#include "bta_ag_co.h"
-#if (BTM_SCO_HCI_INCLUDED == TRUE )
+#if (BTM_SCO_HCI_INCLUDED == TRUE )
#include "bta_dm_co.h"
#endif
#include "bta_ag_int.h"
@@ -112,7 +112,7 @@ static const tBTM_ESCO_PARAMS bta_ag_esco_params =
** Function bta_ag_sco_conn_cback
**
** Description BTM SCO connection callback.
-**
+**
**
** Returns void
**
@@ -148,7 +148,7 @@ static void bta_ag_sco_conn_cback(UINT16 sco_idx)
}
}
/* no match found; disconnect sco, init sco variables */
- else
+ else
{
bta_ag_cb.sco.p_curr_scb = NULL;
bta_ag_cb.sco.state = BTA_AG_SCO_SHUTDOWN_ST;
@@ -161,7 +161,7 @@ static void bta_ag_sco_conn_cback(UINT16 sco_idx)
** Function bta_ag_sco_disc_cback
**
** Description BTM SCO disconnection callback.
-**
+**
**
** Returns void
**
@@ -192,10 +192,10 @@ static void bta_ag_sco_disc_cback(UINT16 sco_idx)
if (handle != 0)
{
-#if (BTM_SCO_HCI_INCLUDED == TRUE )
+#if (BTM_SCO_HCI_INCLUDED == TRUE )
tBTM_STATUS status = BTM_ConfigScoPath(BTM_SCO_ROUTE_PCM, NULL, NULL, TRUE);
APPL_TRACE_DEBUG1("bta_ag_sco_disc_cback sco close config status = %d", status);
- /* SCO clean up here */
+ /* SCO clean up here */
bta_dm_sco_co_close();
#endif
@@ -225,7 +225,7 @@ static void bta_ag_sco_disc_cback(UINT16 sco_idx)
}
}
/* no match found */
- else
+ else
{
APPL_TRACE_DEBUG0("no scb for ag_sco_disc_cback");
@@ -255,7 +255,7 @@ static void bta_ag_sco_read_cback (UINT16 sco_inx, BT_HDR *p_data, tBTM_SCO_DATA
{
APPL_TRACE_DEBUG1("bta_ag_sco_read_cback: status(%d)", status);
}
-
+
/* Callout function must free the data. */
bta_dm_sco_co_in_data (p_data, status);
}
@@ -279,10 +279,10 @@ static BOOLEAN bta_ag_remove_sco(tBTA_AG_SCB *p_scb, BOOLEAN only_active)
{
if (!only_active || p_scb->sco_idx == bta_ag_cb.sco.cur_idx)
{
- status = BTM_RemoveSco(p_scb->sco_idx);
+ status = BTM_RemoveSco(p_scb->sco_idx);
APPL_TRACE_DEBUG2("ag remove sco: inx 0x%04x, status:0x%x", p_scb->sco_idx, status);
-
+
if (status == BTM_CMD_STARTED)
{
/* Sco is connected; set current control block */
@@ -324,13 +324,13 @@ static void bta_ag_esco_connreq_cback(tBTM_ESCO_EVT event, tBTM_ESCO_EVT_DATA *p
((p_scb = bta_ag_scb_by_idx(handle)) != NULL) && p_scb->svc_conn)
{
p_scb->sco_idx = sco_inx;
-
+
/* If no other SCO active, allow this one */
if (!bta_ag_cb.sco.p_curr_scb)
{
APPL_TRACE_EVENT1("bta_ag_esco_connreq_cback: Accept Conn Request (sco_inx 0x%04x)", sco_inx);
bta_ag_sco_conn_rsp(p_scb, &p_data->conn_evt);
-
+
bta_ag_cb.sco.state = BTA_AG_SCO_OPENING_ST;
bta_ag_cb.sco.p_curr_scb = p_scb;
bta_ag_cb.sco.cur_idx = p_scb->sco_idx;
@@ -364,7 +364,7 @@ static void bta_ag_esco_connreq_cback(tBTM_ESCO_EVT event, tBTM_ESCO_EVT_DATA *p
{
APPL_TRACE_EVENT5("eSCO change event (inx %d): rtrans %d, rxlen %d, txlen %d, txint %d",
p_data->chg_evt.sco_inx,
- p_data->chg_evt.retrans_window, p_data->chg_evt.rx_pkt_len,
+ p_data->chg_evt.retrans_window, p_data->chg_evt.rx_pkt_len,
p_data->chg_evt.tx_pkt_len, p_data->chg_evt.tx_interval);
}
}
@@ -374,7 +374,7 @@ static void bta_ag_esco_connreq_cback(tBTM_ESCO_EVT event, tBTM_ESCO_EVT_DATA *p
** Function bta_ag_cback_sco
**
** Description Call application callback function with SCO event.
-**
+**
**
** Returns void
**
@@ -394,8 +394,8 @@ static void bta_ag_cback_sco(tBTA_AG_SCB *p_scb, UINT8 event)
**
** Function bta_ag_create_sco
**
-** Description
-**
+** Description
+**
**
** Returns void
**
@@ -418,13 +418,13 @@ static void bta_ag_create_sco(tBTA_AG_SCB *p_scb, BOOLEAN is_orig)
/* Make sure this sco handle is not already in use */
if (p_scb->sco_idx != BTM_INVALID_SCO_INDEX)
{
- APPL_TRACE_WARNING1("bta_ag_create_sco: Index 0x%04x Already In Use!",
+ APPL_TRACE_WARNING1("bta_ag_create_sco: Index 0x%04x Already In Use!",
p_scb->sco_idx);
return;
}
#if (BTM_WBS_INCLUDED == TRUE )
- if ((p_scb->sco_codec == BTM_SCO_CODEC_MSBC) &&
+ if ((p_scb->sco_codec == BTM_SCO_CODEC_MSBC) &&
!p_scb->codec_fallback &&
!p_scb->retry_with_sco_only)
esco_codec = BTM_SCO_CODEC_MSBC;
@@ -439,9 +439,9 @@ static void bta_ag_create_sco(tBTA_AG_SCB *p_scb, BOOLEAN is_orig)
if (esco_codec == BTM_SCO_CODEC_MSBC)
codec_index = esco_codec - 1;
-
+
params = bta_ag_esco_params[codec_index];
-#else
+#else
params = bta_ag_esco_params;
#endif
@@ -453,7 +453,7 @@ static void bta_ag_create_sco(tBTA_AG_SCB *p_scb, BOOLEAN is_orig)
#if (BTM_WBS_INCLUDED == TRUE)
if (!codec_index) /* For non-WBS */
#endif
- {
+ {
/* Use the application packet types (5 slot EV packets not allowed) */
params.packet_types = p_bta_ag_cfg->sco_pkt_types |
BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 |
@@ -468,10 +468,10 @@ static void bta_ag_create_sco(tBTA_AG_SCB *p_scb, BOOLEAN is_orig)
/* Need to find out from SIG if HSP can use eSCO; for now use SCO */
if (p_scb->conn_service == BTA_AG_HFP && p_scb->peer_version >= HFP_VERSION_1_5 && !p_scb->retry_with_sco_only)
{
-
+
BTM_SetEScoMode(BTM_LINK_TYPE_ESCO, &params);
/* If ESCO or EDR ESCO, retry with SCO only in case of failure */
- if((params.packet_types & BTM_ESCO_LINK_ONLY_MASK)
+ if((params.packet_types & BTM_ESCO_LINK_ONLY_MASK)
||!((params.packet_types & ~(BTM_ESCO_LINK_ONLY_MASK | BTM_SCO_LINK_ONLY_MASK)) ^ BTA_AG_NO_EDR_ESCO))
{
#if (BTM_WBS_INCLUDED == TRUE )
@@ -485,7 +485,7 @@ static void bta_ag_create_sco(tBTA_AG_SCB *p_scb, BOOLEAN is_orig)
p_scb->retry_with_sco_only = FALSE;
APPL_TRACE_API0("Setting retry_with_sco_only to FALSE");
}
-#else
+#else
p_scb->retry_with_sco_only = TRUE;
APPL_TRACE_API0("Setting retry_with_sco_only to TRUE");
#endif
@@ -496,7 +496,7 @@ static void bta_ag_create_sco(tBTA_AG_SCB *p_scb, BOOLEAN is_orig)
if(p_scb->retry_with_sco_only)
APPL_TRACE_API0("retrying with SCO only");
p_scb->retry_with_sco_only = FALSE;
-
+
BTM_SetEScoMode(BTM_LINK_TYPE_SCO, &params);
}
@@ -518,7 +518,7 @@ static void bta_ag_create_sco(tBTA_AG_SCB *p_scb, BOOLEAN is_orig)
sco_route = bta_dm_sco_co_init(pcm_sample_rate, pcm_sample_rate, &codec_info, p_scb->app_id);
#endif
-
+
#if (BTM_WBS_INCLUDED == TRUE )
if (esco_codec == BTA_AG_CODEC_MSBC)
{
@@ -534,7 +534,7 @@ static void bta_ag_create_sco(tBTA_AG_SCB *p_scb, BOOLEAN is_orig)
if (esco_codec == BTA_AG_CODEC_MSBC)
BTM_WriteVoiceSettings (BTM_VOICE_SETTING_TRANS);
else
- BTM_WriteVoiceSettings (BTM_VOICE_SETTING_CVSD);
+ BTM_WriteVoiceSettings (BTM_VOICE_SETTING_CVSD);
/* save the current codec because sco_codec can be updated while SCO is open. */
p_scb->inuse_codec = esco_codec;
@@ -575,10 +575,10 @@ static void bta_ag_create_sco(tBTA_AG_SCB *p_scb, BOOLEAN is_orig)
**
** Function bta_ag_cn_timer_cback
**
-** Description
-**
+** Description
+**
**
-** Returns void
+** Returns void
**
*******************************************************************************/
static void bta_ag_cn_timer_cback (TIMER_LIST_ENT *p_tle)
@@ -613,7 +613,7 @@ static void bta_ag_cn_timer_cback (TIMER_LIST_ENT *p_tle)
void bta_ag_codec_negotiate(tBTA_AG_SCB *p_scb)
{
bta_ag_cb.sco.p_curr_scb = p_scb;
-
+
if (p_scb->codec_updated || p_scb->codec_fallback)
{
/* Change the power mode to Active until sco open is completed. */
@@ -639,8 +639,8 @@ void bta_ag_codec_negotiate(tBTA_AG_SCB *p_scb)
**
** Function bta_ag_sco_event
**
-** Description
-**
+** Description
+**
**
** Returns void
**
@@ -659,7 +659,7 @@ static void bta_ag_sco_event(tBTA_AG_SCB *p_scb, UINT8 event)
APPL_TRACE_EVENT5("BTA ag sco evt (hdl 0x%04x): State %d (%s), Event %d (%s)",
p_scb->sco_idx,
- p_sco->state, bta_ag_sco_state_str(p_sco->state),
+ p_sco->state, bta_ag_sco_state_str(p_sco->state),
event, bta_ag_sco_evt_str(event));
#else
APPL_TRACE_EVENT3("BTA ag sco evt (hdl 0x%04x): State %d, Event %d",
@@ -758,7 +758,7 @@ static void bta_ag_sco_event(tBTA_AG_SCB *p_scb, UINT8 event)
break;
}
break;
-
+
#if (BTM_WBS_INCLUDED == TRUE )
case BTA_AG_SCO_CODEC_ST:
switch (event)
@@ -938,7 +938,7 @@ static void bta_ag_sco_event(tBTA_AG_SCB *p_scb, UINT8 event)
bta_ag_create_sco(p_scb, FALSE); /* Back into listen mode */
/* Accept sco connection with xfer scb */
- bta_ag_sco_conn_rsp(p_sco->p_xfer_scb, &p_sco->conn_data);
+ bta_ag_sco_conn_rsp(p_sco->p_xfer_scb, &p_sco->conn_data);
p_sco->state = BTA_AG_SCO_OPENING_ST;
p_sco->p_curr_scb = p_sco->p_xfer_scb;
p_sco->cur_idx = p_sco->p_xfer_scb->sco_idx;
@@ -1067,7 +1067,7 @@ static void bta_ag_sco_event(tBTA_AG_SCB *p_scb, UINT8 event)
/* start codec negotiation */
p_sco->state = BTA_AG_SCO_CODEC_ST;
p_cn_scb = p_scb;
-#else
+#else
/* open sco connection */
bta_ag_create_sco(p_scb, TRUE);
p_sco->state = BTA_AG_SCO_OPENING_ST;
@@ -1092,7 +1092,7 @@ static void bta_ag_sco_event(tBTA_AG_SCB *p_scb, UINT8 event)
switch (event)
{
case BTA_AG_SCO_CONN_OPEN_E:
- /* close sco connection so headset can be transferred
+ /* close sco connection so headset can be transferred
Probably entered this state from "opening state" */
bta_ag_remove_sco(p_scb, TRUE);
break;
@@ -1123,7 +1123,7 @@ static void bta_ag_sco_event(tBTA_AG_SCB *p_scb, UINT8 event)
p_sco->state = BTA_AG_SCO_CODEC_ST;
p_cn_scb = p_sco->p_xfer_scb;
p_sco->p_xfer_scb = NULL;
-#else
+#else
/* create sco connection to peer */
bta_ag_create_sco(p_sco->p_xfer_scb, TRUE);
p_sco->p_xfer_scb = NULL;
@@ -1193,7 +1193,7 @@ static void bta_ag_sco_event(tBTA_AG_SCB *p_scb, UINT8 event)
break;
}
break;
-
+
default:
break;
}
@@ -1220,7 +1220,7 @@ static void bta_ag_sco_event(tBTA_AG_SCB *p_scb, UINT8 event)
** Function bta_ag_sco_is_open
**
** Description Check if sco is open for this scb.
-**
+**
**
** Returns TRUE if sco open for this scb, FALSE otherwise.
**
@@ -1236,7 +1236,7 @@ BOOLEAN bta_ag_sco_is_open(tBTA_AG_SCB *p_scb)
** Function bta_ag_sco_is_opening
**
** Description Check if sco is in Opening state.
-**
+**
**
** Returns TRUE if sco is in Opening state for this scb, FALSE otherwise.
**
@@ -1244,7 +1244,7 @@ BOOLEAN bta_ag_sco_is_open(tBTA_AG_SCB *p_scb)
BOOLEAN bta_ag_sco_is_opening(tBTA_AG_SCB *p_scb)
{
#if (BTM_WBS_INCLUDED == TRUE )
- return (((bta_ag_cb.sco.state == BTA_AG_SCO_OPENING_ST) ||
+ return (((bta_ag_cb.sco.state == BTA_AG_SCO_OPENING_ST) ||
(bta_ag_cb.sco.state == BTA_AG_SCO_OPENING_ST)) &&
(bta_ag_cb.sco.p_curr_scb == p_scb));
#else
@@ -1257,8 +1257,8 @@ BOOLEAN bta_ag_sco_is_opening(tBTA_AG_SCB *p_scb)
**
** Function bta_ag_sco_listen
**
-** Description
-**
+** Description
+**
**
** Returns void
**
@@ -1272,8 +1272,8 @@ void bta_ag_sco_listen(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
**
** Function bta_ag_sco_open
**
-** Description
-**
+** Description
+**
**
** Returns void
**
@@ -1300,8 +1300,8 @@ void bta_ag_sco_open(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
**
** Function bta_ag_sco_close
**
-** Description
-**
+** Description
+**
**
** Returns void
**
@@ -1309,7 +1309,7 @@ void bta_ag_sco_open(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
void bta_ag_sco_close(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
{
/* if scb is in use */
-#if (BTM_WBS_INCLUDED == TRUE )
+#if (BTM_WBS_INCLUDED == TRUE )
/* sco_idx is not allocated in SCO_CODEC_ST, we still need to move to listening state. */
if ((p_scb->sco_idx != BTM_INVALID_SCO_INDEX) || (bta_ag_cb.sco.state == BTA_AG_SCO_CODEC_ST))
#else
@@ -1327,8 +1327,8 @@ void bta_ag_sco_close(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
**
** Function bta_ag_sco_codec_nego
**
-** Description
-**
+** Description
+**
**
** Returns void
**
@@ -1339,7 +1339,7 @@ void bta_ag_sco_codec_nego(tBTA_AG_SCB *p_scb, BOOLEAN result)
{
/* Subsequent sco connection will skip codec negotiation */
p_scb->codec_updated = FALSE;
-
+
bta_ag_sco_event(p_scb, BTA_AG_SCO_CN_DONE_E);
}
else /* codec negotiation failed */
@@ -1351,8 +1351,8 @@ void bta_ag_sco_codec_nego(tBTA_AG_SCB *p_scb, BOOLEAN result)
**
** Function bta_ag_sco_shutdown
**
-** Description
-**
+** Description
+**
**
** Returns void
**
@@ -1366,8 +1366,8 @@ void bta_ag_sco_shutdown(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
**
** Function bta_ag_sco_conn_open
**
-** Description
-**
+** Description
+**
**
** Returns void
**
@@ -1395,8 +1395,8 @@ void bta_ag_sco_conn_open(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
**
** Function bta_ag_sco_conn_close
**
-** Description
-**
+** Description
+**
**
** Returns void
**
@@ -1428,7 +1428,7 @@ void bta_ag_sco_conn_close(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
bta_ag_create_sco(p_scb, TRUE);
}
#endif
- else
+ else
{
/* Indicate if the closing of audio is because of transfer */
if (bta_ag_cb.sco.p_xfer_scb)
@@ -1452,14 +1452,14 @@ void bta_ag_sco_conn_close(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
bta_ag_cback_sco(p_scb, BTA_AG_AUDIO_CLOSE_EVT);
}
p_scb->retry_with_sco_only = FALSE;
-}
+}
/*******************************************************************************
**
** Function bta_ag_sco_conn_rsp
**
** Description Process the SCO connection request
-**
+**
**
** Returns void
**
@@ -1500,7 +1500,7 @@ void bta_ag_sco_conn_rsp(tBTA_AG_SCB *p_scb, tBTM_ESCO_CONN_REQ_EVT_DATA *p_data
}
else /* Allow controller to use all types available except 5-slot EDR */
{
- resp.packet_types = (BTM_SCO_LINK_ALL_PKT_MASK |
+ resp.packet_types = (BTM_SCO_LINK_ALL_PKT_MASK |
BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 |
BTM_SCO_PKT_TYPES_MASK_NO_3_EV5);
}
@@ -1521,10 +1521,10 @@ void bta_ag_sco_conn_rsp(tBTA_AG_SCB *p_scb, tBTM_ESCO_CONN_REQ_EVT_DATA *p_data
pcm_sample_rate = BTA_DM_SCO_SAMP_RATE_8K;
/* initialize SCO setup, no voice setting for AG, data rate <==> sample rate */
- BTM_ConfigScoPath(bta_dm_sco_co_init(pcm_sample_rate, pcm_sample_rate, &codec_info, p_scb->app_id),
+ BTM_ConfigScoPath(bta_dm_sco_co_init(pcm_sample_rate, pcm_sample_rate, &codec_info, p_scb->app_id),
bta_ag_sco_read_cback, NULL, TRUE);
#endif
- }
+ }
else
hci_status = HCI_ERR_HOST_REJECT_DEVICE;
@@ -1532,7 +1532,7 @@ void bta_ag_sco_conn_rsp(tBTA_AG_SCB *p_scb, tBTM_ESCO_CONN_REQ_EVT_DATA *p_data
/* If SCO open was initiated from HS, it must be CVSD */
p_scb->inuse_codec = BTA_AG_CODEC_NONE;
#endif
-
+
BTM_EScoConnRsp(p_data->sco_inx, hci_status, &resp);
}
@@ -1541,14 +1541,14 @@ void bta_ag_sco_conn_rsp(tBTA_AG_SCB *p_scb, tBTM_ESCO_CONN_REQ_EVT_DATA *p_data
** Function bta_ag_ci_sco_data
**
** Description Process the SCO data ready callin event
-**
+**
**
** Returns void
**
*******************************************************************************/
void bta_ag_ci_sco_data(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
{
-#if (BTM_SCO_HCI_INCLUDED == TRUE )
+#if (BTM_SCO_HCI_INCLUDED == TRUE )
bta_ag_sco_event(p_scb, BTA_AG_SCO_CI_DATA_E);
#endif
}
@@ -1558,7 +1558,7 @@ void bta_ag_ci_sco_data(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
** Function bta_ag_set_esco_param
**
** Description Update esco parameters from script wrapper.
-**
+**
**
** Returns void
**
diff --git a/bta/ag/bta_ag_sdp.c b/bta/ag/bta_ag_sdp.c
index 6b7a5ce..770cc8c 100755..100644
--- a/bta/ag/bta_ag_sdp.c
+++ b/bta/ag/bta_ag_sdp.c
@@ -2,7 +2,7 @@
**
** Name: bta_ag_sdp.c
**
-** Description: This file contains the audio gateway functions
+** Description: This file contains the audio gateway functions
** performing SDP operations.
**
** Copyright (c) 2003-2005, Broadcom Corp., All Rights Reserved.
@@ -49,7 +49,7 @@ const tBTA_AG_SDP_CBACK bta_ag_sdp_cback_tbl[] =
** Function bta_ag_sdp_cback
**
** Description SDP callback function.
-**
+**
**
** Returns void
**
@@ -89,9 +89,9 @@ static void bta_ag_sdp_cback(UINT16 status, UINT8 idx)
** Function bta_ag_sdp_cback_1 to 3
**
** Description SDP callback functions. Since there is no way to
-** distinguish scb from the callback we need separate
+** distinguish scb from the callback we need separate
** callbacks for each scb.
-**
+**
**
** Returns void
**
@@ -127,14 +127,14 @@ BOOLEAN bta_ag_add_record(UINT16 service_uuid, char *p_service_name, UINT8 scn,
UINT8 buf[2];
APPL_TRACE_DEBUG1("bta_ag_add_record uuid: %x", service_uuid);
-
+
memset( proto_elem_list, 0 , BTA_AG_NUM_PROTO_ELEMS*sizeof(tSDP_PROTOCOL_ELEM));
/* add the protocol element sequence */
proto_elem_list[0].protocol_uuid = UUID_PROTOCOL_L2CAP;
proto_elem_list[0].num_params = 0;
proto_elem_list[1].protocol_uuid = UUID_PROTOCOL_RFCOMM;
- proto_elem_list[1].num_params = 1;
+ proto_elem_list[1].num_params = 1;
proto_elem_list[1].params[0] = scn;
result &= SDP_AddProtocolList(sdp_handle, BTA_AG_NUM_PROTO_ELEMS, proto_elem_list);
@@ -172,13 +172,13 @@ BOOLEAN bta_ag_add_record(UINT16 service_uuid, char *p_service_name, UINT8 scn,
if (features & BTA_AG_FEAT_CODEC)
codec_supported = TRUE;
-
+
features &= BTA_AG_SDP_FEAT_SPEC;
/* Codec bit position is different in SDP and in BRSF */
if (codec_supported)
features |= 0x0020;
-
+
UINT16_TO_BE_FIELD(buf, features);
result &= SDP_AddAttribute(sdp_handle, ATTR_ID_SUPPORTED_FEATURES, UINT_DESC_TYPE, 2, buf);
}
@@ -194,7 +194,7 @@ BOOLEAN bta_ag_add_record(UINT16 service_uuid, char *p_service_name, UINT8 scn,
** Function bta_ag_create_records
**
** Description Create SDP records for registered services.
-**
+**
**
** Returns void
**
@@ -224,7 +224,7 @@ void bta_ag_create_records(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
}
p_scb->hsp_version = HSP_VERSION_1_2;
-
+
}
/*******************************************************************************
@@ -232,7 +232,7 @@ void bta_ag_create_records(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
** Function bta_ag_del_records
**
** Description Delete SDP records for any registered services.
-**
+**
**
** Returns void
**
@@ -256,7 +256,7 @@ void bta_ag_del_records(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
{
others |= p->reg_services;
}
- }
+ }
others >>= BTA_HSP_SERVICE_ID;
services = p_scb->reg_services >> BTA_HSP_SERVICE_ID;
@@ -284,7 +284,7 @@ void bta_ag_del_records(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
**
** Description Process SDP discovery results to find requested attributes
** for requested service.
-**
+**
**
** Returns TRUE if results found, FALSE otherwise.
**
@@ -311,7 +311,7 @@ BOOLEAN bta_ag_sdp_find_attr(tBTA_AG_SCB *p_scb, tBTA_SERVICE_MASK service)
{
return result;
}
-
+
/* loop through all records we found */
while (TRUE)
{
@@ -384,7 +384,7 @@ BOOLEAN bta_ag_sdp_find_attr(tBTA_AG_SCB *p_scb, tBTA_SERVICE_MASK service)
** Function bta_ag_do_disc
**
** Description Do service discovery.
-**
+**
**
** Returns void
**
@@ -422,7 +422,7 @@ void bta_ag_do_disc(tBTA_AG_SCB *p_scb, tBTA_SERVICE_MASK service)
attr_list[0] = ATTR_ID_SERVICE_CLASS_ID_LIST;
attr_list[1] = ATTR_ID_PROTOCOL_DESC_LIST;
attr_list[2] = ATTR_ID_BT_PROFILE_DESC_LIST;
- attr_list[3] = ATTR_ID_REMOTE_AUDIO_VOLUME_CONTROL;
+ attr_list[3] = ATTR_ID_REMOTE_AUDIO_VOLUME_CONTROL;
num_attr = 4;
uuid_list[0].uu.uuid16 = UUID_SERVCLASS_HEADSET; /* Legacy from HSP v1.0 */
@@ -472,7 +472,7 @@ void bta_ag_do_disc(tBTA_AG_SCB *p_scb, tBTA_SERVICE_MASK service)
** Function bta_ag_free_db
**
** Description Free discovery database.
-**
+**
**
** Returns void
**
diff --git a/bta/ar/bta_ar.c b/bta/ar/bta_ar.c
index b3e897c..767e046 100644
--- a/bta/ar/bta_ar.c
+++ b/bta/ar/bta_ar.c
@@ -24,7 +24,7 @@ tBTA_AR_CB bta_ar_cb;
**
** Function bta_ar_id
**
-** Description This function maps sys_id to ar id mask.
+** Description This function maps sys_id to ar id mask.
**
** Returns void
**
@@ -36,7 +36,7 @@ static UINT8 bta_ar_id(tBTA_SYS_ID sys_id)
{
mask = BTA_AR_AV_MASK;
}
- else if (sys_id == BTA_ID_AVK)
+ else if (sys_id == BTA_ID_AVK)
{
mask = BTA_AR_AVK_MASK;
}
@@ -48,7 +48,7 @@ static UINT8 bta_ar_id(tBTA_SYS_ID sys_id)
**
** Function bta_ar_init
**
-** Description This function is called to register to AVDTP.
+** Description This function is called to register to AVDTP.
**
** Returns void
**
@@ -63,7 +63,7 @@ void bta_ar_init(void)
**
** Function bta_ar_reg_avdt
**
-** Description This function is called to register to AVDTP.
+** Description This function is called to register to AVDTP.
**
** Returns void
**
@@ -95,21 +95,21 @@ void bta_ar_reg_avdt(tAVDT_REG *p_reg, tAVDT_CTRL_CBACK *p_cback, tBTA_SYS_ID sy
bta_ar_cb.p_av_conn_cback = p_cback;
mask = BTA_AR_AV_MASK;
}
- else if (sys_id == BTA_ID_AVK)
+ else if (sys_id == BTA_ID_AVK)
{
bta_ar_cb.p_avk_conn_cback = p_cback;
mask = BTA_AR_AVK_MASK;
}
#if (BTA_AR_DEBUG == TRUE)
- else
- {
+ else
+ {
APPL_TRACE_ERROR1("bta_ar_reg_avdt: the registration is from wrong sys_id:%d", sys_id);
}
#endif
if (mask)
{
- if (bta_ar_cb.avdt_registered == 0)
+ if (bta_ar_cb.avdt_registered == 0)
{
AVDT_Register(p_reg, bta_ar_avdt_cback);
}
@@ -121,7 +121,7 @@ void bta_ar_reg_avdt(tAVDT_REG *p_reg, tAVDT_CTRL_CBACK *p_cback, tBTA_SYS_ID sy
**
** Function bta_ar_dereg_avdt
**
-** Description This function is called to de-register from AVDTP.
+** Description This function is called to de-register from AVDTP.
**
** Returns void
**
@@ -135,7 +135,7 @@ void bta_ar_dereg_avdt(tBTA_SYS_ID sys_id)
bta_ar_cb.p_av_conn_cback = NULL;
mask = BTA_AR_AV_MASK;
}
- else if (sys_id == BTA_ID_AVK)
+ else if (sys_id == BTA_ID_AVK)
{
bta_ar_cb.p_avk_conn_cback = NULL;
mask = BTA_AR_AVK_MASK;
@@ -170,7 +170,7 @@ void bta_ar_avdt_conn(tBTA_SYS_ID sys_id, BD_ADDR bd_addr)
(*bta_ar_cb.p_avk_conn_cback)(0, bd_addr, event, &data);
}
}
- else if (sys_id == BTA_ID_AVK)
+ else if (sys_id == BTA_ID_AVK)
{
if (bta_ar_cb.p_av_conn_cback)
{
@@ -194,7 +194,7 @@ void bta_ar_reg_avct(UINT16 mtu, UINT16 mtu_br, UINT8 sec_mask, tBTA_SYS_ID sys_
if (mask)
{
- if (bta_ar_cb.avct_registered == 0)
+ if (bta_ar_cb.avct_registered == 0)
{
AVCT_Register(mtu, mtu_br, sec_mask);
}
@@ -230,7 +230,7 @@ void bta_ar_dereg_avct(tBTA_SYS_ID sys_id)
** Returns void
**
******************************************************************************/
-void bta_ar_reg_avrc(UINT16 service_uuid, char *service_name, char *provider_name,
+void bta_ar_reg_avrc(UINT16 service_uuid, char *service_name, char *provider_name,
UINT16 categories, tBTA_SYS_ID sys_id)
{
UINT8 mask = bta_ar_id (sys_id);
diff --git a/bta/av/bta_av_aact.c b/bta/av/bta_av_aact.c
index c6ce55a..c5234a6 100644
--- a/bta/av/bta_av_aact.c
+++ b/bta/av/bta_av_aact.c
@@ -74,46 +74,46 @@ const tBTA_AV_CO_FUNCTS bta_av_a2d_cos =
/* ssm action functions for audio stream */
const tBTA_AV_SACT bta_av_a2d_action[] =
{
- bta_av_do_disc_a2d, /* BTA_AV_DO_DISC */
- bta_av_cleanup, /* BTA_AV_CLEANUP */
- bta_av_free_sdb, /* BTA_AV_FREE_SDB */
- bta_av_config_ind, /* BTA_AV_CONFIG_IND */
- bta_av_disconnect_req, /* BTA_AV_DISCONNECT_REQ */
- bta_av_security_req, /* BTA_AV_SECURITY_REQ */
- bta_av_security_rsp, /* BTA_AV_SECURITY_RSP */
- bta_av_setconfig_rsp, /* BTA_AV_SETCONFIG_RSP */
+ bta_av_do_disc_a2d, /* BTA_AV_DO_DISC */
+ bta_av_cleanup, /* BTA_AV_CLEANUP */
+ bta_av_free_sdb, /* BTA_AV_FREE_SDB */
+ bta_av_config_ind, /* BTA_AV_CONFIG_IND */
+ bta_av_disconnect_req, /* BTA_AV_DISCONNECT_REQ */
+ bta_av_security_req, /* BTA_AV_SECURITY_REQ */
+ bta_av_security_rsp, /* BTA_AV_SECURITY_RSP */
+ bta_av_setconfig_rsp, /* BTA_AV_SETCONFIG_RSP */
bta_av_st_rc_timer, /* BTA_AV_ST_RC_TIMER */
- bta_av_str_opened, /* BTA_AV_STR_OPENED */
- bta_av_security_ind, /* BTA_AV_SECURITY_IND */
- bta_av_security_cfm, /* BTA_AV_SECURITY_CFM */
- bta_av_do_close, /* BTA_AV_DO_CLOSE */
- bta_av_connect_req, /* BTA_AV_CONNECT_REQ */
- bta_av_sdp_failed, /* BTA_AV_SDP_FAILED */
- bta_av_disc_results, /* BTA_AV_DISC_RESULTS */
- bta_av_disc_res_as_acp, /* BTA_AV_DISC_RES_AS_ACP */
- bta_av_open_failed, /* BTA_AV_OPEN_FAILED */
- bta_av_getcap_results, /* BTA_AV_GETCAP_RESULTS */
- bta_av_setconfig_rej, /* BTA_AV_SETCONFIG_REJ */
- bta_av_discover_req, /* BTA_AV_DISCOVER_REQ */
- bta_av_conn_failed, /* BTA_AV_CONN_FAILED */
- bta_av_do_start, /* BTA_AV_DO_START */
- bta_av_str_stopped, /* BTA_AV_STR_STOPPED */
- bta_av_reconfig, /* BTA_AV_RECONFIG */
- bta_av_data_path, /* BTA_AV_DATA_PATH */
- bta_av_start_ok, /* BTA_AV_START_OK */
- bta_av_start_failed, /* BTA_AV_START_FAILED */
- bta_av_str_closed, /* BTA_AV_STR_CLOSED */
- bta_av_clr_cong, /* BTA_AV_CLR_CONG */
- bta_av_suspend_cfm, /* BTA_AV_SUSPEND_CFM */
- bta_av_rcfg_str_ok, /* BTA_AV_RCFG_STR_OK */
- bta_av_rcfg_failed, /* BTA_AV_RCFG_FAILED */
- bta_av_rcfg_connect, /* BTA_AV_RCFG_CONNECT */
- bta_av_rcfg_discntd, /* BTA_AV_RCFG_DISCNTD */
- bta_av_suspend_cont, /* BTA_AV_SUSPEND_CONT */
- bta_av_rcfg_cfm, /* BTA_AV_RCFG_CFM */
- bta_av_rcfg_open, /* BTA_AV_RCFG_OPEN */
- bta_av_security_rej, /* BTA_AV_SECURITY_REJ */
- bta_av_open_rc, /* BTA_AV_OPEN_RC */
+ bta_av_str_opened, /* BTA_AV_STR_OPENED */
+ bta_av_security_ind, /* BTA_AV_SECURITY_IND */
+ bta_av_security_cfm, /* BTA_AV_SECURITY_CFM */
+ bta_av_do_close, /* BTA_AV_DO_CLOSE */
+ bta_av_connect_req, /* BTA_AV_CONNECT_REQ */
+ bta_av_sdp_failed, /* BTA_AV_SDP_FAILED */
+ bta_av_disc_results, /* BTA_AV_DISC_RESULTS */
+ bta_av_disc_res_as_acp, /* BTA_AV_DISC_RES_AS_ACP */
+ bta_av_open_failed, /* BTA_AV_OPEN_FAILED */
+ bta_av_getcap_results, /* BTA_AV_GETCAP_RESULTS */
+ bta_av_setconfig_rej, /* BTA_AV_SETCONFIG_REJ */
+ bta_av_discover_req, /* BTA_AV_DISCOVER_REQ */
+ bta_av_conn_failed, /* BTA_AV_CONN_FAILED */
+ bta_av_do_start, /* BTA_AV_DO_START */
+ bta_av_str_stopped, /* BTA_AV_STR_STOPPED */
+ bta_av_reconfig, /* BTA_AV_RECONFIG */
+ bta_av_data_path, /* BTA_AV_DATA_PATH */
+ bta_av_start_ok, /* BTA_AV_START_OK */
+ bta_av_start_failed, /* BTA_AV_START_FAILED */
+ bta_av_str_closed, /* BTA_AV_STR_CLOSED */
+ bta_av_clr_cong, /* BTA_AV_CLR_CONG */
+ bta_av_suspend_cfm, /* BTA_AV_SUSPEND_CFM */
+ bta_av_rcfg_str_ok, /* BTA_AV_RCFG_STR_OK */
+ bta_av_rcfg_failed, /* BTA_AV_RCFG_FAILED */
+ bta_av_rcfg_connect, /* BTA_AV_RCFG_CONNECT */
+ bta_av_rcfg_discntd, /* BTA_AV_RCFG_DISCNTD */
+ bta_av_suspend_cont, /* BTA_AV_SUSPEND_CONT */
+ bta_av_rcfg_cfm, /* BTA_AV_RCFG_CFM */
+ bta_av_rcfg_open, /* BTA_AV_RCFG_OPEN */
+ bta_av_security_rej, /* BTA_AV_SECURITY_REJ */
+ bta_av_open_rc, /* BTA_AV_OPEN_RC */
bta_av_chk_2nd_start, /* BTA_AV_CHK_2ND_START */
bta_av_save_caps, /* BTA_AV_SAVE_CAPS */
bta_av_set_use_rc, /* BTA_AV_SET_USE_RC */
@@ -127,54 +127,54 @@ const tBTA_AV_SACT bta_av_a2d_action[] =
/* these tables translate AVDT events to SSM events */
static const UINT16 bta_av_stream_evt_ok[] = {
- BTA_AV_STR_DISC_OK_EVT, /* AVDT_DISCOVER_CFM_EVT */
- BTA_AV_STR_GETCAP_OK_EVT, /* AVDT_GETCAP_CFM_EVT */
- BTA_AV_STR_OPEN_OK_EVT, /* AVDT_OPEN_CFM_EVT */
- BTA_AV_STR_OPEN_OK_EVT, /* AVDT_OPEN_IND_EVT */
- BTA_AV_STR_CONFIG_IND_EVT, /* AVDT_CONFIG_IND_EVT */
- BTA_AV_STR_START_OK_EVT, /* AVDT_START_CFM_EVT */
- BTA_AV_STR_START_OK_EVT, /* AVDT_START_IND_EVT */
- BTA_AV_STR_SUSPEND_CFM_EVT, /* AVDT_SUSPEND_CFM_EVT */
- BTA_AV_STR_SUSPEND_CFM_EVT, /* AVDT_SUSPEND_IND_EVT */
- BTA_AV_STR_CLOSE_EVT, /* AVDT_CLOSE_CFM_EVT */
- BTA_AV_STR_CLOSE_EVT, /* AVDT_CLOSE_IND_EVT */
- BTA_AV_STR_RECONFIG_CFM_EVT, /* AVDT_RECONFIG_CFM_EVT */
- 0, /* AVDT_RECONFIG_IND_EVT */
- BTA_AV_STR_SECURITY_CFM_EVT, /* AVDT_SECURITY_CFM_EVT */
- BTA_AV_STR_SECURITY_IND_EVT, /* AVDT_SECURITY_IND_EVT */
+ BTA_AV_STR_DISC_OK_EVT, /* AVDT_DISCOVER_CFM_EVT */
+ BTA_AV_STR_GETCAP_OK_EVT, /* AVDT_GETCAP_CFM_EVT */
+ BTA_AV_STR_OPEN_OK_EVT, /* AVDT_OPEN_CFM_EVT */
+ BTA_AV_STR_OPEN_OK_EVT, /* AVDT_OPEN_IND_EVT */
+ BTA_AV_STR_CONFIG_IND_EVT, /* AVDT_CONFIG_IND_EVT */
+ BTA_AV_STR_START_OK_EVT, /* AVDT_START_CFM_EVT */
+ BTA_AV_STR_START_OK_EVT, /* AVDT_START_IND_EVT */
+ BTA_AV_STR_SUSPEND_CFM_EVT, /* AVDT_SUSPEND_CFM_EVT */
+ BTA_AV_STR_SUSPEND_CFM_EVT, /* AVDT_SUSPEND_IND_EVT */
+ BTA_AV_STR_CLOSE_EVT, /* AVDT_CLOSE_CFM_EVT */
+ BTA_AV_STR_CLOSE_EVT, /* AVDT_CLOSE_IND_EVT */
+ BTA_AV_STR_RECONFIG_CFM_EVT, /* AVDT_RECONFIG_CFM_EVT */
+ 0, /* AVDT_RECONFIG_IND_EVT */
+ BTA_AV_STR_SECURITY_CFM_EVT, /* AVDT_SECURITY_CFM_EVT */
+ BTA_AV_STR_SECURITY_IND_EVT, /* AVDT_SECURITY_IND_EVT */
BTA_AV_STR_WRITE_CFM_EVT, /* AVDT_WRITE_CFM_EVT */
BTA_AV_AVDT_CONNECT_EVT, /* AVDT_CONNECT_IND_EVT */
BTA_AV_AVDT_DISCONNECT_EVT, /* AVDT_DISCONNECT_IND_EVT */
#if (AVDT_REPORTING == TRUE)
- BTA_AV_AVDT_RPT_CONN_EVT, /* AVDT_REPORT_CONN_EVT */
- BTA_AV_AVDT_RPT_CONN_EVT, /* AVDT_REPORT_DISCONN_EVT */
+ BTA_AV_AVDT_RPT_CONN_EVT, /* AVDT_REPORT_CONN_EVT */
+ BTA_AV_AVDT_RPT_CONN_EVT, /* AVDT_REPORT_DISCONN_EVT */
#endif
BTA_AV_AVDT_DELAY_RPT_EVT, /* AVDT_DELAY_REPORT_EVT */
0 /* AVDT_DELAY_REPORT_CFM_EVT */
};
static const UINT16 bta_av_stream_evt_fail[] = {
- BTA_AV_STR_DISC_FAIL_EVT, /* AVDT_DISCOVER_CFM_EVT */
- BTA_AV_STR_GETCAP_FAIL_EVT, /* AVDT_GETCAP_CFM_EVT */
- BTA_AV_STR_OPEN_FAIL_EVT, /* AVDT_OPEN_CFM_EVT */
- BTA_AV_STR_OPEN_OK_EVT, /* AVDT_OPEN_IND_EVT */
- BTA_AV_STR_CONFIG_IND_EVT, /* AVDT_CONFIG_IND_EVT */
- BTA_AV_STR_START_FAIL_EVT, /* AVDT_START_CFM_EVT */
- BTA_AV_STR_START_OK_EVT, /* AVDT_START_IND_EVT */
- BTA_AV_STR_SUSPEND_CFM_EVT, /* AVDT_SUSPEND_CFM_EVT */
- BTA_AV_STR_SUSPEND_CFM_EVT, /* AVDT_SUSPEND_IND_EVT */
- BTA_AV_STR_CLOSE_EVT, /* AVDT_CLOSE_CFM_EVT */
- BTA_AV_STR_CLOSE_EVT, /* AVDT_CLOSE_IND_EVT */
- BTA_AV_STR_RECONFIG_CFM_EVT, /* AVDT_RECONFIG_CFM_EVT */
- 0, /* AVDT_RECONFIG_IND_EVT */
- BTA_AV_STR_SECURITY_CFM_EVT, /* AVDT_SECURITY_CFM_EVT */
- BTA_AV_STR_SECURITY_IND_EVT, /* AVDT_SECURITY_IND_EVT */
+ BTA_AV_STR_DISC_FAIL_EVT, /* AVDT_DISCOVER_CFM_EVT */
+ BTA_AV_STR_GETCAP_FAIL_EVT, /* AVDT_GETCAP_CFM_EVT */
+ BTA_AV_STR_OPEN_FAIL_EVT, /* AVDT_OPEN_CFM_EVT */
+ BTA_AV_STR_OPEN_OK_EVT, /* AVDT_OPEN_IND_EVT */
+ BTA_AV_STR_CONFIG_IND_EVT, /* AVDT_CONFIG_IND_EVT */
+ BTA_AV_STR_START_FAIL_EVT, /* AVDT_START_CFM_EVT */
+ BTA_AV_STR_START_OK_EVT, /* AVDT_START_IND_EVT */
+ BTA_AV_STR_SUSPEND_CFM_EVT, /* AVDT_SUSPEND_CFM_EVT */
+ BTA_AV_STR_SUSPEND_CFM_EVT, /* AVDT_SUSPEND_IND_EVT */
+ BTA_AV_STR_CLOSE_EVT, /* AVDT_CLOSE_CFM_EVT */
+ BTA_AV_STR_CLOSE_EVT, /* AVDT_CLOSE_IND_EVT */
+ BTA_AV_STR_RECONFIG_CFM_EVT, /* AVDT_RECONFIG_CFM_EVT */
+ 0, /* AVDT_RECONFIG_IND_EVT */
+ BTA_AV_STR_SECURITY_CFM_EVT, /* AVDT_SECURITY_CFM_EVT */
+ BTA_AV_STR_SECURITY_IND_EVT, /* AVDT_SECURITY_IND_EVT */
BTA_AV_STR_WRITE_CFM_EVT, /* AVDT_WRITE_CFM_EVT */
BTA_AV_AVDT_CONNECT_EVT, /* AVDT_CONNECT_IND_EVT */
BTA_AV_AVDT_DISCONNECT_EVT, /* AVDT_DISCONNECT_IND_EVT */
#if (AVDT_REPORTING == TRUE)
- BTA_AV_AVDT_RPT_CONN_EVT, /* AVDT_REPORT_CONN_EVT */
- BTA_AV_AVDT_RPT_CONN_EVT, /* AVDT_REPORT_DISCONN_EVT */
+ BTA_AV_AVDT_RPT_CONN_EVT, /* AVDT_REPORT_CONN_EVT */
+ BTA_AV_AVDT_RPT_CONN_EVT, /* AVDT_REPORT_DISCONN_EVT */
#endif
BTA_AV_AVDT_DELAY_RPT_EVT, /* AVDT_DELAY_REPORT_EVT */
0 /* AVDT_DELAY_REPORT_CFM_EVT */
@@ -199,7 +199,7 @@ tAVDT_CTRL_CBACK * const bta_av_dt_cback[] =
{
bta_av_stream0_cback
,bta_av_stream1_cback
-#if BTA_AV_NUM_STRS > 2
+#if BTA_AV_NUM_STRS > 2
,bta_av_stream2_cback
#endif
#if BTA_AV_NUM_STRS > 3
@@ -218,8 +218,8 @@ tAVDT_CTRL_CBACK * const bta_av_dt_cback[] =
** Function bta_av_save_addr
**
** Description copy the bd_addr and maybe reset the supported flags
-**
-**
+**
+**
** Returns void
**
*******************************************************************************/
@@ -247,7 +247,7 @@ static void bta_av_save_addr(tBTA_AV_SCB *p_scb, const BD_ADDR b)
** Description start the AVRC timer if no RC connection & CT is supported &
** RC is used or
** as ACP (we do not really know if we want AVRC)
-**
+**
** Returns void
**
*******************************************************************************/
@@ -275,7 +275,7 @@ void bta_av_st_rc_timer(tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
**
** Description The function gets the capabilities of the next available
** stream found in the discovery results.
-**
+**
** Returns TRUE if we sent request to AVDT, FALSE otherwise.
**
*******************************************************************************/
@@ -288,8 +288,8 @@ static BOOLEAN bta_av_next_getcap(tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
for (i = p_scb->sep_info_idx; i < p_scb->num_seps; i++)
{
/* steam not in use, is a sink, and is the right media type (audio/video) */
- if ((p_scb->sep_info[i].in_use == FALSE) &&
- (p_scb->sep_info[i].tsep == AVDT_TSEP_SNK) &&
+ if ((p_scb->sep_info[i].in_use == FALSE) &&
+ (p_scb->sep_info[i].tsep == AVDT_TSEP_SNK) &&
(p_scb->sep_info[i].media_type == p_scb->media_type))
{
p_scb->sep_info_idx = i;
@@ -319,7 +319,7 @@ static BOOLEAN bta_av_next_getcap(tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
break;
}
}
-
+
/* if no streams available then stream open fails */
if (!sent_cmd)
{
@@ -327,7 +327,7 @@ static BOOLEAN bta_av_next_getcap(tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
}
return sent_cmd;
-
+
}
/*******************************************************************************
@@ -335,7 +335,7 @@ static BOOLEAN bta_av_next_getcap(tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
** Function bta_av_proc_stream_evt
**
** Description Utility function to compose stream events.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -359,7 +359,7 @@ void bta_av_proc_stream_evt(UINT8 handle, BD_ADDR bd_addr, UINT8 event, tAVDT_CT
p_data->security_cfm.len : BTA_AV_SECURITY_MAX_LEN;
}
}
-
+
if (p_scb && (p_msg = (tBTA_AV_STR_MSG *) GKI_getbuf((UINT16) (sizeof(tBTA_AV_STR_MSG) + sec_len))) != NULL)
{
@@ -382,17 +382,17 @@ void bta_av_proc_stream_evt(UINT8 handle, BD_ADDR bd_addr, UINT8 event, tAVDT_CT
switch (event)
{
case AVDT_CONFIG_IND_EVT:
- /* We might have 2 SEP signallings(A2DP + VDP) with one peer device on one L2CAP.
- * If we already have a signalling connection with the bd_addr and the streaming
- * SST is at INIT state, change it to INCOMING state to handle the signalling
+ /* We might have 2 SEP signallings(A2DP + VDP) with one peer device on one L2CAP.
+ * If we already have a signalling connection with the bd_addr and the streaming
+ * SST is at INIT state, change it to INCOMING state to handle the signalling
* from the 2nd SEP. */
if ((bta_av_find_lcb(bd_addr, BTA_AV_LCB_FIND) != NULL) && (bta_av_is_scb_init(p_scb)))
{
bta_av_set_scb_sst_incoming (p_scb);
-
- /* When ACP_CONNECT_EVT was received, we put first available scb to incoming state.
- * Later when we receive AVDT_CONFIG_IND_EVT, we use a new p_scb and set its state to
- * incoming which we do it above.
+
+ /* When ACP_CONNECT_EVT was received, we put first available scb to incoming state.
+ * Later when we receive AVDT_CONFIG_IND_EVT, we use a new p_scb and set its state to
+ * incoming which we do it above.
* We also have to set the old p_scb state to init to be used later */
for (xx = 0; xx < BTA_AV_NUM_STRS; xx++)
{
@@ -412,12 +412,12 @@ void bta_av_proc_stream_evt(UINT8 handle, BD_ADDR bd_addr, UINT8 event, tAVDT_CT
break;
case AVDT_SECURITY_IND_EVT:
- p_msg->msg.security_ind.p_data = (UINT8 *) (p_msg + 1);
+ p_msg->msg.security_ind.p_data = (UINT8 *) (p_msg + 1);
memcpy(p_msg->msg.security_ind.p_data, p_data->security_ind.p_data, sec_len);
break;
-
+
case AVDT_SECURITY_CFM_EVT:
- p_msg->msg.security_cfm.p_data = (UINT8 *) (p_msg + 1);
+ p_msg->msg.security_cfm.p_data = (UINT8 *) (p_msg + 1);
if (p_data->hdr.err_code == 0)
{
memcpy(p_msg->msg.security_cfm.p_data, p_data->security_cfm.p_data, sec_len);
@@ -467,7 +467,7 @@ void bta_av_proc_stream_evt(UINT8 handle, BD_ADDR bd_addr, UINT8 event, tAVDT_CT
** Function bta_av_stream0_cback
**
** Description This is the AVDTP callback function for stream events.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -482,7 +482,7 @@ static void bta_av_stream0_cback(UINT8 handle, BD_ADDR bd_addr, UINT8 event, tAV
** Function bta_av_stream1_cback
**
** Description This is the AVDTP callback function for stream events.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -498,7 +498,7 @@ static void bta_av_stream1_cback(UINT8 handle, BD_ADDR bd_addr, UINT8 event, tAV
** Function bta_av_stream2_cback
**
** Description This is the AVDTP callback function for stream events.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -515,7 +515,7 @@ static void bta_av_stream2_cback(UINT8 handle, BD_ADDR bd_addr, UINT8 event, tAV
** Function bta_av_stream3_cback
**
** Description This is the AVDTP callback function for stream events.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -531,7 +531,7 @@ static void bta_av_stream3_cback(UINT8 handle, BD_ADDR bd_addr, UINT8 event, tAV
** Function bta_av_stream4_cback
**
** Description This is the AVDTP callback function for stream events.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -548,7 +548,7 @@ static void bta_av_stream4_cback(UINT8 handle, BD_ADDR bd_addr, UINT8 event, tAV
** Function bta_av_stream5_cback
**
** Description This is the AVDTP callback function for stream events.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -585,8 +585,8 @@ static void bta_av_a2d_sdp_cback(BOOLEAN found, tA2D_Service *p_service)
p_scb->avdt_version = p_service->avdt_version;
else
p_scb->avdt_version = 0x00;
-
- p_msg->hdr.layer_specific = bta_av_cb.handle;
+
+ p_msg->hdr.layer_specific = bta_av_cb.handle;
bta_sys_sendmsg(p_msg);
}
else
@@ -601,8 +601,8 @@ static void bta_av_a2d_sdp_cback(BOOLEAN found, tA2D_Service *p_service)
** Function bta_av_adjust_seps_idx
**
** Description adjust the sep_idx
-**
-** Returns
+**
+** Returns
**
*******************************************************************************/
static void bta_av_adjust_seps_idx(tBTA_AV_SCB *p_scb)
@@ -682,7 +682,7 @@ void bta_av_switch_role (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
** Function bta_av_role_res
**
** Description Handle the role changed event
-**
+**
**
** Returns void
**
@@ -727,7 +727,7 @@ void bta_av_role_res (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
{
p_scb->role &= ~BTA_AV_ROLE_START_INT;
p_scb->wait &= ~BTA_AV_WAIT_ROLE_SW_BITS;
-
+
if (p_data->role_res.hci_status != HCI_SUCCESS)
{
/* Open failed because of role switch. */
@@ -749,7 +749,7 @@ void bta_av_role_res (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
APPL_TRACE_WARNING2 ("Unexpected role switch event: q_tag = %d wait = %d", p_scb->q_tag, p_scb->wait);
}
}
-
+
APPL_TRACE_DEBUG2("wait:x%x, role:x%x", p_scb->wait, p_scb->role);
}
@@ -789,7 +789,7 @@ void bta_av_do_disc_a2d (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
p_data->api_open.use_rc, p_data->api_open.switch_res, bta_av_cb.audio_open_cnt);
memcpy (&(p_scb->open_api), &(p_data->api_open), sizeof(tBTA_AV_API_OPEN));
-
+
switch(p_data->api_open.switch_res)
{
case BTA_AV_RS_NONE:
@@ -984,7 +984,7 @@ void bta_av_config_ind (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
bta_sys_stop_timer(&bta_av_cb.acp_sig_tmr);
/* if no codec parameters in configuration, fail */
- if ((p_evt_cfg->num_codec == 0) ||
+ if ((p_evt_cfg->num_codec == 0) ||
/* or the peer requests for a service we do not support */
((psc_mask != p_scb->cfg.psc_mask) &&
(psc_mask != (p_scb->cfg.psc_mask&~AVDT_PSC_DELAY_RPT))) )
@@ -1147,7 +1147,7 @@ void bta_av_setconfig_rsp (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
APPL_TRACE_DEBUG2("sep_info[%d] SEID: %d", i, p_seid[i-1]);
/* initialize the sep_info[] to get capabilities */
p_scb->sep_info[i].in_use = FALSE;
- p_scb->sep_info[i].tsep = AVDT_TSEP_SNK;
+ p_scb->sep_info[i].tsep = AVDT_TSEP_SNK;
p_scb->sep_info[i].media_type = p_scb->media_type;
p_scb->sep_info[i].seid = p_seid[i-1];
}
@@ -1195,14 +1195,14 @@ void bta_av_str_opened (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
memset(&p_scb->q_info, 0, sizeof(tBTA_AV_Q_INFO));
p_scb->l2c_bufs = 0;
- p_scb->p_cos->open(p_scb->hndl,
+ p_scb->p_cos->open(p_scb->hndl,
p_scb->codec_type, p_scb->cfg.codec_info, mtu);
{
/* TODO check if other audio channel is open.
* If yes, check if reconfig is needed
* Rigt now we do not do this kind of checking.
- * BTA-AV is INT for 2nd audio connection.
+ * BTA-AV is INT for 2nd audio connection.
* The application needs to make sure the current codec_info is proper.
* If one audio connection is open and another SNK attempts to connect to AV,
* the connection will be rejected.
@@ -1305,7 +1305,7 @@ void bta_av_do_close (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
/* stop stream if started */
if (p_scb->co_started)
{
- bta_av_str_stopped(p_scb, NULL);
+ bta_av_str_stopped(p_scb, NULL);
}
bta_sys_stop_timer(&bta_av_cb.sig_tmr);
@@ -1346,7 +1346,7 @@ void bta_av_connect_req (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
APPL_TRACE_EVENT1("bta_av_connect_req: coll_mask = 0x%2X", p_scb->coll_mask);
return;
}
-
+
AVDT_ConnectReq(p_scb->peer_addr, p_scb->sec_mask, bta_av_dt_cback[p_scb->hdi]);
}
@@ -1363,7 +1363,7 @@ void bta_av_sdp_failed (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
{
if (!p_scb->open_status)
p_scb->open_status = BTA_AV_FAIL_SDP;
-
+
utl_freebuf((void **) &p_scb->p_disc_db);
bta_av_str_closed(p_scb, p_data);
}
@@ -1389,8 +1389,8 @@ void bta_av_disc_results (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
for (i = 0; i < p_scb->num_seps; i++)
{
/* steam not in use, is a sink, and is audio */
- if ((p_scb->sep_info[i].in_use == FALSE) &&
- (p_scb->sep_info[i].tsep == AVDT_TSEP_SNK) &&
+ if ((p_scb->sep_info[i].in_use == FALSE) &&
+ (p_scb->sep_info[i].tsep == AVDT_TSEP_SNK) &&
(p_scb->sep_info[i].media_type == p_scb->media_type))
{
num_snks++;
@@ -1399,7 +1399,7 @@ void bta_av_disc_results (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
p_scb->p_cos->disc_res(p_scb->hndl, p_scb->num_seps, num_snks, p_scb->peer_addr);
p_scb->num_disc_snks = num_snks;
-
+
/* if we got any */
if (p_scb->num_seps > 0)
{
@@ -1439,7 +1439,7 @@ void bta_av_disc_res_as_acp (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
for (i = 0; i < p_scb->num_seps; i++)
{
/* steam is a sink, and is audio */
- if ((p_scb->sep_info[i].tsep == AVDT_TSEP_SNK) &&
+ if ((p_scb->sep_info[i].tsep == AVDT_TSEP_SNK) &&
(p_scb->sep_info[i].media_type == p_scb->media_type))
{
p_scb->sep_info[i].in_use = FALSE;
@@ -1449,7 +1449,7 @@ void bta_av_disc_res_as_acp (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
p_scb->p_cos->disc_res(p_scb->hndl, p_scb->num_seps, num_snks, p_scb->peer_addr);
p_scb->num_disc_snks = num_snks;
-
+
/* if we got any */
if (p_scb->num_seps > 0)
{
@@ -1703,7 +1703,7 @@ void bta_av_do_start (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
}
/* disallow role switch during streaming, only if we are the master role
- * i.e. allow role switch, if we are slave.
+ * i.e. allow role switch, if we are slave.
* It would not hurt us, if the peer device wants us to be master */
if ((BTM_GetRole (p_scb->peer_addr, &cur_role) == BTM_SUCCESS) &&
(cur_role == BTM_ROLE_MASTER) )
@@ -1744,7 +1744,7 @@ void bta_av_str_stopped (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
BT_HDR *p_buf;
UINT8 policy = HCI_ENABLE_SNIFF_MODE;
- APPL_TRACE_ERROR2("bta_av_str_stopped:audio_open_cnt=%d, p_data %x",
+ APPL_TRACE_ERROR2("bta_av_str_stopped:audio_open_cnt=%d, p_data %x",
bta_av_cb.audio_open_cnt, p_data);
bta_sys_idle(BTA_ID_AV, bta_av_cb.audio_open_cnt, p_scb->peer_addr);
@@ -1883,7 +1883,7 @@ void bta_av_reconfig (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
L2CA_FlushChannel (p_scb->l2c_cid, L2CAP_FLUSH_CHANS_ALL);
AVDT_CloseReq(p_scb->avdt_handle);
-
+
}
}
@@ -2105,7 +2105,7 @@ void bta_av_start_ok (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
p_scb->p_cos->start(p_scb->hndl, p_scb->codec_type);
p_scb->co_started = TRUE;
- APPL_TRACE_DEBUG3("bta_av_start_ok suspending: %d, role:x%x, init %d",
+ APPL_TRACE_DEBUG3("bta_av_start_ok suspending: %d, role:x%x, init %d",
suspend, p_scb->role, initiator);
start.suspending = suspend;
@@ -2146,7 +2146,7 @@ void bta_av_start_failed (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
{
/* if start failed, clear role */
p_scb->role &= ~BTA_AV_ROLE_START_INT;
-
+
bta_sys_idle(BTA_ID_AV, bta_av_cb.audio_open_cnt, p_scb->peer_addr);
start.chnl = p_scb->chnl;
start.status = BTA_AV_FAIL;
@@ -2161,7 +2161,7 @@ void bta_av_start_failed (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
/*******************************************************************************
**
-** Function bta_av_str_closed
+** Function bta_av_str_closed
**
** Description Stream closed.
**
@@ -2254,7 +2254,7 @@ void bta_av_suspend_cfm (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
APPL_TRACE_DEBUG2 ("bta_av_suspend_cfm:audio_open_cnt = %d, err_code = %d",
bta_av_cb.audio_open_cnt, err_code);
-
+
suspend_rsp.status = BTA_AV_SUCCESS;
if(err_code)
{
@@ -2434,7 +2434,7 @@ void bta_av_rcfg_discntd (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
**
** Function bta_av_suspend_cont
**
-** Description received the suspend response.
+** Description received the suspend response.
** continue to reconfigure the stream
**
** Returns void
@@ -2471,7 +2471,7 @@ void bta_av_suspend_cont (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
{
APPL_TRACE_DEBUG0("bta_av_suspend_cont calling AVDT_ReconfigReq");
/* reconfig the stream */
-
+
AVDT_ReconfigReq(p_scb->avdt_handle, p_scb->p_cap);
p_scb->p_cap->psc_mask = p_scb->cur_psc_mask;
}
@@ -2527,7 +2527,7 @@ void bta_av_rcfg_open (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
{
/* Need to update call-out module so that it will be ready for discover */
p_scb->p_cos->stop(p_scb->hndl, p_scb->codec_type);
-
+
/* send avdtp discover request */
AVDT_DiscoverReq(p_scb->peer_addr, p_scb->sep_info, BTA_AV_NUM_SEPS, bta_av_dt_cback[p_scb->hdi]);
}
@@ -2544,7 +2544,7 @@ void bta_av_rcfg_open (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
AVDT_OpenReq(p_scb->avdt_handle, p_scb->peer_addr,
p_scb->sep_info[p_scb->sep_info_idx].seid, p_scb->p_cap);
}
-
+
}
/*******************************************************************************
@@ -2708,7 +2708,7 @@ void bta_av_open_at_inc (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
/* We need to switch to INIT state and start opening connection. */
p_scb->coll_mask = 0;
bta_av_set_scb_sst_init (p_scb);
-
+
if ((p_buf = (tBTA_AV_API_OPEN *) GKI_getbuf(sizeof(tBTA_AV_API_OPEN))) != NULL)
{
memcpy(p_buf, &(p_scb->open_api), sizeof(tBTA_AV_API_OPEN));
diff --git a/bta/av/bta_av_act.c b/bta/av/bta_av_act.c
index 4693a6e..a8f255d 100644
--- a/bta/av/bta_av_act.c
+++ b/bta/av/bta_av_act.c
@@ -181,7 +181,7 @@ static void bta_av_avrc_sdp_cback(UINT16 status)
** Function bta_av_rc_ctrl_cback
**
** Description AVRCP control callback.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -197,7 +197,7 @@ static void bta_av_rc_ctrl_cback(UINT8 handle, UINT8 event, UINT16 result, BD_AD
#endif
if (event == AVRC_OPEN_IND_EVT)
{
- /* save handle of opened connection
+ /* save handle of opened connection
bta_av_cb.rc_handle = handle;*/
msg_event = BTA_AV_AVRC_OPEN_EVT;
@@ -225,7 +225,7 @@ static void bta_av_rc_ctrl_cback(UINT8 handle, UINT8 event, UINT16 result, BD_AD
** Function bta_av_rc_msg_cback
**
** Description AVRCP message callback.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -306,15 +306,15 @@ UINT8 bta_av_rc_create(tBTA_AV_CB *p_cb, UINT8 role, UINT8 shdl, UINT8 lidx)
ccb.p_ctrl_cback = bta_av_rc_ctrl_cback;
ccb.p_msg_cback = bta_av_rc_msg_cback;
- ccb.company_id = p_bta_av_cfg->company_id;
- ccb.conn = role;
+ ccb.company_id = p_bta_av_cfg->company_id;
+ ccb.conn = role;
/* note: BTA_AV_FEAT_RCTG = AVRC_CT_TARGET, BTA_AV_FEAT_RCCT = AVRC_CT_CONTROL */
ccb.control = p_cb->features & (BTA_AV_FEAT_RCTG | BTA_AV_FEAT_RCCT | AVRC_CT_PASSIVE);
if (AVRC_Open(&rc_handle, &ccb, bda) != AVRC_SUCCESS)
return BTA_AV_RC_HANDLE_NONE;
-
+
i = rc_handle;
p_rcb = &p_cb->rcb[i];
@@ -322,7 +322,7 @@ UINT8 bta_av_rc_create(tBTA_AV_CB *p_cb, UINT8 role, UINT8 shdl, UINT8 lidx)
{
APPL_TRACE_ERROR1("bta_av_rc_create found duplicated handle:%d", rc_handle);
}
-
+
p_rcb->handle = rc_handle;
p_rcb->status = status;
p_rcb->shdl = shdl;
@@ -346,7 +346,7 @@ UINT8 bta_av_rc_create(tBTA_AV_CB *p_cb, UINT8 role, UINT8 shdl, UINT8 lidx)
** Function bta_av_valid_group_navi_msg
**
** Description Check if it is Group Navigation Msg for Metadata
-**
+**
** Returns BTA_AV_RSP_ACCEPT or BTA_AV_RSP_NOT_IMPL.
**
*******************************************************************************/
@@ -356,7 +356,7 @@ static tBTA_AV_CODE bta_av_group_navi_supported(UINT8 len, UINT8 *p_data)
UINT8 *p_ptr = p_data;
UINT16 u16;
UINT32 u32;
-
+
if (p_bta_av_cfg->avrc_group && len == BTA_GROUP_NAVI_MSG_OP_DATA_LEN)
{
BTA_AV_BE_STREAM_TO_CO_ID(u32, p_ptr);
@@ -379,7 +379,7 @@ static tBTA_AV_CODE bta_av_group_navi_supported(UINT8 len, UINT8 *p_data)
** Function bta_av_op_supported
**
** Description Check if remote control operation is supported.
-**
+**
** Returns BTA_AV_RSP_ACCEPT of supported, BTA_AV_RSP_NOT_IMPL if not.
**
*******************************************************************************/
@@ -409,7 +409,7 @@ static tBTA_AV_CODE bta_av_op_supported(tBTA_AV_RC rc_id)
** Function bta_av_find_lcb
**
** Description Given BD_addr, find the associated LCB.
-**
+**
** Returns NULL, if not found.
**
*******************************************************************************/
@@ -613,7 +613,7 @@ void bta_av_rc_vendor_rsp(tBTA_AV_CB *p_cb, tBTA_AV_DATA *p_data)
}
/*******************************************************************************
-**
+**
** Function bta_av_rc_meta_rsp
**
** Description Send an AVRCP metadata/advanced control command/response.
@@ -643,7 +643,7 @@ void bta_av_rc_meta_rsp(tBTA_AV_CB *p_cb, tBTA_AV_DATA *p_data)
}
/*******************************************************************************
-**
+**
** Function bta_av_rc_free_rsp
**
** Description free an AVRCP metadata command buffer.
@@ -657,7 +657,7 @@ void bta_av_rc_free_rsp (tBTA_AV_CB *p_cb, tBTA_AV_DATA *p_data)
}
/*******************************************************************************
-**
+**
** Function bta_av_rc_meta_req
**
** Description Send an AVRCP metadata command.
@@ -738,7 +738,7 @@ tBTA_AV_EVT bta_av_proc_meta_cmd(tAVRC_RESPONSE *p_rc_rsp, tBTA_AV_RC_MSG *p_ms
/* reject it */
evt=0;
p_vendor->hdr.ctype = BTA_AV_RSP_NOT_IMPL;
- AVRC_VendorRsp(p_msg->handle, p_msg->label, &p_msg->msg.vendor);
+ AVRC_VendorRsp(p_msg->handle, p_msg->label, &p_msg->msg.vendor);
}
else
{
@@ -824,7 +824,7 @@ void bta_av_rc_msg(tBTA_AV_CB *p_cb, tBTA_AV_DATA *p_data)
}
else
{
- p_data->rc_msg.msg.hdr.ctype = bta_av_op_supported(p_data->rc_msg.msg.pass.op_id);
+ p_data->rc_msg.msg.hdr.ctype = bta_av_op_supported(p_data->rc_msg.msg.pass.op_id);
}
/* send response */
@@ -853,7 +853,7 @@ void bta_av_rc_msg(tBTA_AV_CB *p_cb, tBTA_AV_DATA *p_data)
av.remote_rsp.rsp_code = p_data->rc_msg.msg.hdr.ctype;
av.remote_rsp.label = p_data->rc_msg.label;
}
- /* must be a bad ctype -> reject*/
+ /* must be a bad ctype -> reject*/
else
{
p_data->rc_msg.msg.hdr.ctype = BTA_AV_RSP_REJ;
@@ -871,20 +871,20 @@ void bta_av_rc_msg(tBTA_AV_CB *p_cb, tBTA_AV_DATA *p_data)
av.vendor_cmd.len = p_vendor->vendor_len;
/* if configured to support vendor specific and it's a command */
- if ((p_cb->features & BTA_AV_FEAT_VENDOR) &&
+ if ((p_cb->features & BTA_AV_FEAT_VENDOR) &&
p_data->rc_msg.msg.hdr.ctype <= AVRC_CMD_GEN_INQ)
{
evt = BTA_AV_VENDOR_CMD_EVT;
}
/* else if configured to support vendor specific and it's a response */
- else if ((p_cb->features & BTA_AV_FEAT_VENDOR) &&
+ else if ((p_cb->features & BTA_AV_FEAT_VENDOR) &&
p_data->rc_msg.msg.hdr.ctype >= AVRC_RSP_ACCEPT)
{
evt = BTA_AV_VENDOR_RSP_EVT;
}
/* else if not configured to support vendor specific and it's a command */
- else if (!(p_cb->features & BTA_AV_FEAT_VENDOR) &&
+ else if (!(p_cb->features & BTA_AV_FEAT_VENDOR) &&
p_data->rc_msg.msg.hdr.ctype <= AVRC_CMD_GEN_INQ)
{
if(p_data->rc_msg.msg.vendor.p_vendor_data[0] == AVRC_PDU_INVALID)
@@ -1170,7 +1170,7 @@ void bta_av_conn_chg(tBTA_AV_DATA *p_data)
/* clear the conned mask for this channel */
p_cb->conn_audio &= ~mask;
p_cb->conn_video &= ~mask;
- if(p_scb)
+ if(p_scb)
{
/* the stream is closed.
* clear the peer address, so it would not mess up the AVRCP for the next round of operation */
@@ -1332,7 +1332,7 @@ void bta_av_sig_chg(tBTA_AV_DATA *p_data)
AVDT_DisconnectReq (p_data->str_msg.bd_addr, NULL);
return;
}
-
+
p_lcb = &p_cb->lcb[xx];
p_lcb->lidx = xx + 1;
bdcpy(p_lcb->addr, p_data->str_msg.bd_addr);
@@ -1352,8 +1352,8 @@ void bta_av_sig_chg(tBTA_AV_DATA *p_data)
p_cb->p_scb[xx]->use_rc = TRUE; /* allowing RC for incoming connection */
bta_av_ssm_execute(p_cb->p_scb[xx], BTA_AV_ACP_CONNECT_EVT, p_data);
- /* The Pending Event should be sent as soon as the L2CAP signalling channel
- * is set up, which is NOW. Earlier this was done only after
+ /* The Pending Event should be sent as soon as the L2CAP signalling channel
+ * is set up, which is NOW. Earlier this was done only after
* BTA_AV_SIG_TIME_VAL milliseconds.
* The following function shall send the event and start the recurring timer
*/
@@ -1443,20 +1443,20 @@ void bta_av_sig_timer(tBTA_AV_DATA *p_data)
** Description Process the timeout when SRC is accepting connection
** and SNK did not start signalling.
**
-** Returns void
+** Returns void
**
*******************************************************************************/
static void bta_av_acp_sig_timer_cback (TIMER_LIST_ENT *p_tle)
{
UINT8 inx = (UINT8)p_tle->param;
- tBTA_AV_CB *p_cb = &bta_av_cb;
+ tBTA_AV_CB *p_cb = &bta_av_cb;
tBTA_AV_SCB *p_scb = p_cb->p_scb[inx];
tBTA_AV_API_OPEN *p_buf;
if (p_scb)
{
APPL_TRACE_DEBUG1("bta_av_acp_sig_timer_cback, coll_mask = 0x%02X", p_scb->coll_mask);
-
+
if (p_scb->coll_mask & BTA_AV_COLL_INC_TMR)
{
p_scb->coll_mask &= ~BTA_AV_COLL_INC_TMR;
@@ -1486,7 +1486,7 @@ static void bta_av_acp_sig_timer_cback (TIMER_LIST_ENT *p_tle)
if (p_scb->coll_mask & BTA_AV_COLL_API_CALLED)
{
p_scb->coll_mask &= ~BTA_AV_COLL_API_CALLED;
-
+
/* BTA_AV_API_OPEN_EVT */
if ((p_buf = (tBTA_AV_API_OPEN *) GKI_getbuf(sizeof(tBTA_AV_API_OPEN))) != NULL)
{
@@ -1494,7 +1494,7 @@ static void bta_av_acp_sig_timer_cback (TIMER_LIST_ENT *p_tle)
bta_sys_sendmsg(p_buf);
}
}
- }
+ }
}
}
}
@@ -1538,7 +1538,7 @@ tBTA_AV_FEAT bta_av_check_peer_features (UINT16 service_uuid)
{
peer_features |= BTA_AV_FEAT_RCTG;
}
- }
+ }
if (( SDP_FindAttributeInRec(p_rec, ATTR_ID_BT_PROFILE_DESC_LIST)) != NULL)
{
diff --git a/bta/av/bta_av_api.c b/bta/av/bta_av_api.c
index 762692f..496f185 100644
--- a/bta/av/bta_av_api.c
+++ b/bta/av/bta_av_api.c
@@ -3,7 +3,7 @@
** Name: bta_av_api.c
**
** Description: This is the implementation of the API for the advanced
-** audio/video (AV) subsystem of BTA, Widcomm's Bluetooth
+** audio/video (AV) subsystem of BTA, Widcomm's Bluetooth
** application layer for mobile phones.
**
** Copyright (c) 2011, Broadcom Corp., All Rights Reserved.
@@ -36,7 +36,7 @@ static const tBTA_SYS_REG bta_av_reg =
**
** Function BTA_AvEnable
**
-** Description Enable the advanced audio/video service. When the enable
+** Description Enable the advanced audio/video service. When the enable
** operation is complete the callback function will be
** called with a BTA_AV_ENABLE_EVT. This function must
** be called before other function in the AV API are
@@ -89,7 +89,7 @@ void BTA_AvDisable(void)
**
** Function BTA_AvRegister
**
-** Description Register the audio or video service to stack. When the
+** Description Register the audio or video service to stack. When the
** operation is complete the callback function will be
** called with a BTA_AV_REGISTER_EVT. This function must
** be called before AVDT stream is open.
@@ -324,7 +324,7 @@ void BTA_AvProtectReq(tBTA_AV_HNDL hndl, UINT8 *p_data, UINT16 len)
** Function BTA_AvProtectRsp
**
** Description Send a content protection response. This function must
-** be called if a BTA_AV_PROTECT_REQ_EVT is received.
+** be called if a BTA_AV_PROTECT_REQ_EVT is received.
** This function can only be used if AV is enabled with
** feature BTA_AV_FEAT_PROTECT.
**
@@ -424,7 +424,7 @@ void BTA_AvVendorCmd(UINT8 rc_handle, UINT8 label, tBTA_AV_CODE cmd_code, UINT8
** Function BTA_AvVendorRsp
**
** Description Send a vendor dependent remote control response.
-** This function must be called if a BTA_AV_VENDOR_CMD_EVT
+** This function must be called if a BTA_AV_VENDOR_CMD_EVT
** is received. This function can only be used if AV is
** enabled with feature BTA_AV_FEAT_VENDOR.
**
diff --git a/bta/av/bta_av_cfg.c b/bta/av/bta_av_cfg.c
index ebd8bd1..5f89a75 100644
--- a/bta/av/bta_av_cfg.c
+++ b/bta/av/bta_av_cfg.c
@@ -63,7 +63,7 @@ const UINT8 bta_av_meta_caps_evt_ids[] = {
};
#ifndef BTA_AV_NUM_RC_EVT_IDS
#define BTA_AV_NUM_RC_EVT_IDS (sizeof(bta_av_meta_caps_evt_ids) / sizeof(bta_av_meta_caps_evt_ids[0]))
-#endif /* BTA_AV_NUM_RC_EVT_IDS */
+#endif /* BTA_AV_NUM_RC_EVT_IDS */
#else /* !ANDROID_APP_INCLUDED */
@@ -147,7 +147,7 @@ const UINT16 bta_av_rc_id[] =
8=PAGE_DOWN */
#if (BTA_AV_RC_PASS_RSP_CODE == BTA_AV_RSP_INTERIM)
- /* btui_app provides an example of how to leave the decision of rejecting a command or not
+ /* btui_app provides an example of how to leave the decision of rejecting a command or not
* based on which media player is currently addressed (this is only applicable for AVRCP 1.4 or later)
* If the decision is per player for a particular rc_id, the related bit is clear (not set) */
0x0070, /* bit mask: 0=POWER, 1=VOL_UP, 2=VOL_DOWN, 3=MUTE,
@@ -167,7 +167,7 @@ const UINT16 bta_av_rc_id[] =
12=BACKWARD */
#endif
#endif
-
+
0x0000, /* bit mask: 0=ANGLE, 1=SUBPICT */
0, /* not used */
@@ -195,14 +195,14 @@ const UINT16 bta_av_rc_id_ac[] =
4=INPUT_SEL, 5=DISP_INFO, 6=HELP, 7=PAGE_UP,
8=PAGE_DOWN */
- /* btui_app provides an example of how to leave the decision of rejecting a command or not
+ /* btui_app provides an example of how to leave the decision of rejecting a command or not
* based on which media player is currently addressed (this is only applicable for AVRCP 1.4 or later)
* If the decision is per player for a particular rc_id, the related bit is set */
0x1800, /* bit mask: 0=POWER, 1=VOL_UP, 2=VOL_DOWN, 3=MUTE,
4=PLAY, 5=STOP, 6=PAUSE, 7=RECORD,
8=REWIND, 9=FAST_FOR, 10=EJECT, 11=FORWARD,
12=BACKWARD */
-
+
0x0000, /* bit mask: 0=ANGLE, 1=SUBPICT */
0, /* not used */
diff --git a/bta/av/bta_av_ci.c b/bta/av/bta_av_ci.c
index c182948..1aa3751 100644
--- a/bta/av/bta_av_ci.c
+++ b/bta/av/bta_av_ci.c
@@ -3,7 +3,7 @@
** Name: bta_av_ci.c
**
** Description: This is the implementation file for advanced audio/video
-** call-in functions.
+** call-in functions.
**
** Copyright (c) 2005, Widcomm Inc., All Rights Reserved.
** Widcomm Bluetooth Core. Proprietary and confidential.
@@ -26,7 +26,7 @@
** should call bta_av_co_audio_src_data_path() or
** bta_av_co_video_src_data_path().
**
-** Returns void
+** Returns void
**
*******************************************************************************/
void bta_av_ci_src_data_ready(tBTA_AV_CHNL chnl)
@@ -51,7 +51,7 @@ void bta_av_ci_src_data_ready(tBTA_AV_CHNL chnl)
** AVDT_SUCCESS if the codec configuration is ok,
** otherwise error.
**
-** Returns void
+** Returns void
**
*******************************************************************************/
void bta_av_ci_setconfig(tBTA_AV_HNDL hndl, UINT8 err_code, UINT8 category,
diff --git a/bta/av/bta_av_int.h b/bta/av/bta_av_int.h
index 41fb565..b8d3e21 100644
--- a/bta/av/bta_av_int.h
+++ b/bta/av/bta_av_int.h
@@ -48,17 +48,17 @@ enum
BTA_AV_SRC_DATA_READY_EVT,
BTA_AV_CI_SETCONFIG_OK_EVT,
BTA_AV_CI_SETCONFIG_FAIL_EVT,
- BTA_AV_SDP_DISC_OK_EVT,
+ BTA_AV_SDP_DISC_OK_EVT,
BTA_AV_SDP_DISC_FAIL_EVT,
- BTA_AV_STR_DISC_OK_EVT,
+ BTA_AV_STR_DISC_OK_EVT,
BTA_AV_STR_DISC_FAIL_EVT,
BTA_AV_STR_GETCAP_OK_EVT,
BTA_AV_STR_GETCAP_FAIL_EVT,
- BTA_AV_STR_OPEN_OK_EVT,
+ BTA_AV_STR_OPEN_OK_EVT,
BTA_AV_STR_OPEN_FAIL_EVT,
BTA_AV_STR_START_OK_EVT,
BTA_AV_STR_START_FAIL_EVT,
- BTA_AV_STR_CLOSE_EVT,
+ BTA_AV_STR_CLOSE_EVT,
BTA_AV_STR_CONFIG_IND_EVT,
BTA_AV_STR_SECURITY_IND_EVT,
BTA_AV_STR_SECURITY_CFM_EVT,
@@ -66,7 +66,7 @@ enum
BTA_AV_STR_SUSPEND_CFM_EVT,
BTA_AV_STR_RECONFIG_CFM_EVT,
BTA_AV_AVRC_TIMER_EVT,
- BTA_AV_AVDT_CONNECT_EVT,
+ BTA_AV_AVDT_CONNECT_EVT,
BTA_AV_AVDT_DISCONNECT_EVT,
BTA_AV_ROLE_CHANGE_EVT,
BTA_AV_AVDT_DELAY_RPT_EVT,
@@ -85,7 +85,7 @@ enum
BTA_AV_CONN_CHG_EVT,
BTA_AV_DEREG_COMP_EVT,
#if (AVDT_REPORTING == TRUE)
- BTA_AV_AVDT_RPT_CONN_EVT,
+ BTA_AV_AVDT_RPT_CONN_EVT,
#endif
BTA_AV_API_START_EVT, /* the following 2 events must be in the same order as the *AP_*EVT */
BTA_AV_API_STOP_EVT
@@ -154,8 +154,8 @@ typedef UINT8 (*tBTA_AV_CO_GETCFG) (tBTA_AV_HNDL hndl, tBTA_AV_CODEC codec_type,
typedef void (*tBTA_AV_CO_SETCFG) (tBTA_AV_HNDL hndl, tBTA_AV_CODEC codec_type,
UINT8 *p_codec_info, UINT8 seid, BD_ADDR addr,
UINT8 num_protect, UINT8 *p_protect_info);
-typedef void (*tBTA_AV_CO_OPEN) (tBTA_AV_HNDL hndl,
- tBTA_AV_CODEC codec_type, UINT8 *p_codec_info,
+typedef void (*tBTA_AV_CO_OPEN) (tBTA_AV_HNDL hndl,
+ tBTA_AV_CODEC codec_type, UINT8 *p_codec_info,
UINT16 mtu);
typedef void (*tBTA_AV_CO_CLOSE) (tBTA_AV_HNDL hndl, tBTA_AV_CODEC codec_type, UINT16 mtu);
typedef void (*tBTA_AV_CO_START) (tBTA_AV_HNDL hndl, tBTA_AV_CODEC codec_type);
diff --git a/bta/av/bta_av_main.c b/bta/av/bta_av_main.c
index ebf11b4..6c835fa 100644
--- a/bta/av/bta_av_main.c
+++ b/bta/av/bta_av_main.c
@@ -224,7 +224,7 @@ static void bta_av_timer_cback(void *p_tle)
** Function bta_av_api_enable
**
** Description Handle an API enable event.
-**
+**
**
** Returns void
**
@@ -399,9 +399,9 @@ void bta_av_conn_cback(UINT8 handle, BD_ADDR bd_addr, UINT8 event, tAVDT_CTRL *p
#endif
if (/*((p_scb && (p_scb->role & BTA_AV_ROLE_AD_ACP)) ||
-
+
//(AVDT_CONNECT_IND_EVT == event && AVDT_ACP == p_data->hdr.err_param))
-
+
(AVDT_CONNECT_IND_EVT == event))&& */
(p_msg = (tBTA_AV_STR_MSG *) GKI_getbuf((UINT16) (sizeof(tBTA_AV_STR_MSG)))) != NULL)
{
@@ -505,10 +505,10 @@ static void bta_av_api_register(tBTA_AV_DATA *p_data)
/* register with no authorization; let AVDTP use authorization instead */
#if( defined BTA_AR_INCLUDED ) && (BTA_AR_INCLUDED == TRUE)
#if (BTA_AV_WITH_AVCTP_AUTHORIZATION == TRUE)
- bta_ar_reg_avct(p_bta_av_cfg->avrc_mtu, p_bta_av_cfg->avrc_br_mtu,
+ bta_ar_reg_avct(p_bta_av_cfg->avrc_mtu, p_bta_av_cfg->avrc_br_mtu,
bta_av_cb.sec_mask, BTA_ID_AV);
#else
- bta_ar_reg_avct(p_bta_av_cfg->avrc_mtu, p_bta_av_cfg->avrc_br_mtu,
+ bta_ar_reg_avct(p_bta_av_cfg->avrc_mtu, p_bta_av_cfg->avrc_br_mtu,
(UINT8)(bta_av_cb.sec_mask & (~BTA_SEC_AUTHORIZE)), BTA_ID_AV);
#endif
@@ -526,13 +526,13 @@ static void bta_av_api_register(tBTA_AV_DATA *p_data)
/* memset(&cs.cfg,0,sizeof(tAVDT_CFG)); */
cs.cfg.num_codec = 1;
cs.tsep = AVDT_TSEP_SRC;
-
+
/*
* memset of cs takes care setting call back pointers to null.
cs.p_data_cback = NULL;
cs.p_report_cback = NULL;
*/
- cs.nsc_mask = AVDT_NSC_RECONFIG |
+ cs.nsc_mask = AVDT_NSC_RECONFIG |
((bta_av_cb.features & BTA_AV_FEAT_PROTECT) ? 0 : AVDT_NSC_SECURITY);
APPL_TRACE_DEBUG1("nsc_mask: 0x%x", cs.nsc_mask);
@@ -609,10 +609,10 @@ static void bta_av_api_register(tBTA_AV_DATA *p_data)
{
#if( defined BTA_AR_INCLUDED ) && (BTA_AR_INCLUDED == TRUE)
#if (BTA_AV_WITH_AVCTP_AUTHORIZATION == TRUE)
- bta_ar_reg_avct(p_bta_av_cfg->avrc_mtu, p_bta_av_cfg->avrc_br_mtu,
+ bta_ar_reg_avct(p_bta_av_cfg->avrc_mtu, p_bta_av_cfg->avrc_br_mtu,
bta_av_cb.sec_mask, BTA_ID_AV);
#else
- bta_ar_reg_avct(p_bta_av_cfg->avrc_mtu, p_bta_av_cfg->avrc_br_mtu,
+ bta_ar_reg_avct(p_bta_av_cfg->avrc_mtu, p_bta_av_cfg->avrc_br_mtu,
(UINT8)(bta_av_cb.sec_mask & (~BTA_SEC_AUTHORIZE)), BTA_ID_AV);
#endif
#endif
@@ -646,7 +646,7 @@ static void bta_av_api_register(tBTA_AV_DATA *p_data)
** Function bta_av_api_deregister
**
** Description de-register a channel
-**
+**
**
** Returns void
**
@@ -671,7 +671,7 @@ void bta_av_api_deregister(tBTA_AV_DATA *p_data)
** Function bta_av_ci_data
**
** Description forward the BTA_AV_CI_SRC_DATA_READY_EVT to stream state machine
-**
+**
**
** Returns void
**
@@ -682,7 +682,7 @@ static void bta_av_ci_data(tBTA_AV_DATA *p_data)
int i;
UINT8 chnl = (UINT8)p_data->hdr.layer_specific;
- for( i=0; i < BTA_AV_NUM_STRS; i++ )
+ for( i=0; i < BTA_AV_NUM_STRS; i++ )
{
p_scb = bta_av_cb.p_scb[i];
@@ -714,7 +714,7 @@ static void bta_av_rpc_conn(tBTA_AV_DATA *p_data)
** Function bta_av_api_to_ssm
**
** Description forward the API request to stream state machine
-**
+**
**
** Returns void
**
@@ -734,7 +734,7 @@ static void bta_av_api_to_ssm(tBTA_AV_DATA *p_data)
**
** Function bta_av_chk_start
**
-** Description if this is audio channel, check if more than one audio
+** Description if this is audio channel, check if more than one audio
** channel is connected & already started.
**
** Returns TRUE, if need api_start
@@ -801,7 +801,7 @@ void bta_av_restore_switch (void)
}
break;
}
- }
+ }
}
/*******************************************************************************
@@ -853,7 +853,7 @@ static void bta_av_sys_rs_cback (tBTA_SYS_CONN_STATUS status,UINT8 id, UINT8 app
(cur_role == BTM_ROLE_SLAVE) )
{
bta_sys_set_policy(BTA_ID_AV, HCI_ENABLE_MASTER_SLAVE_SWITCH, peer_addr);
- }
+ }
/* if BTA_AvOpen() was called for other device, which caused the role switch of the peer_addr, */
/* we need to continue opening process for the BTA_AvOpen(). */
@@ -883,7 +883,7 @@ static void bta_av_sys_rs_cback (tBTA_SYS_CONN_STATUS status,UINT8 id, UINT8 app
** Function bta_av_sco_chg_cback
**
** Description receive & process the SCO connection up/down event from sys.
-** call setup also triggers this callback, to suspend av before sco
+** call setup also triggers this callback, to suspend av before sco
** activity happens, or to resume av once call ends.
**
** Returns void
@@ -929,7 +929,7 @@ static void bta_av_sco_chg_cback(tBTA_SYS_CONN_STATUS status, UINT8 id, UINT8
{
APPL_TRACE_DEBUG1("starting scb:%d", i);
bta_av_ssm_execute(p_scb, BTA_AV_AP_START_EVT, NULL);
- }
+ }
}
}
}
@@ -1025,7 +1025,7 @@ BOOLEAN bta_av_link_role_ok(tBTA_AV_SCB *p_scb, UINT8 bits)
**
** Function bta_av_chk_mtu
**
-** Description if this is audio channel, check if more than one audio
+** Description if this is audio channel, check if more than one audio
** channel is connected.
**
** Returns The smallest mtu of the connected audio channels
@@ -1122,7 +1122,7 @@ void bta_av_dup_audio_buf(tBTA_AV_SCB *p_scb, BT_HDR *p_buf)
** Function bta_av_sm_execute
**
** Description State machine event handling function for AV
-**
+**
**
** Returns void
**
@@ -1161,7 +1161,7 @@ void bta_av_sm_execute(tBTA_AV_CB *p_cb, UINT16 event, tBTA_AV_DATA *p_data)
** Function bta_av_hdl_event
**
** Description Advanced audio/video main event handling function.
-**
+**
**
** Returns BOOLEAN
**
@@ -1203,7 +1203,7 @@ BOOLEAN bta_av_hdl_event(BT_HDR *p_msg)
bta_av_ssm_execute( bta_av_hndl_to_scb(p_msg->layer_specific),
p_msg->event, (tBTA_AV_DATA *) p_msg);
}
- return TRUE;
+ return TRUE;
}
@@ -1215,7 +1215,7 @@ BOOLEAN bta_av_hdl_event(BT_HDR *p_msg)
**
** Function bta_av_st_code
**
-** Description
+** Description
**
** Returns char *
**
@@ -1233,7 +1233,7 @@ static char *bta_av_st_code(UINT8 state)
**
** Function bta_av_evt_code
**
-** Description
+** Description
**
** Returns char *
**
diff --git a/bta/av/bta_av_sbc.c b/bta/av/bta_av_sbc.c
index ba11752..6142e9a 100644
--- a/bta/av/bta_av_sbc.c
+++ b/bta/av/bta_av_sbc.c
@@ -43,7 +43,7 @@ tBTA_AV_SBC_UPS_CB bta_av_sbc_ups_cb;
** dst_sps: samples per second (converted audio data)
** bits: number of bits per pcm sample
** n_channels: number of channels (i.e. mono(1), stereo(2)...)
-**
+**
** Returns none
**
*******************************************************************************/
@@ -89,7 +89,7 @@ void bta_av_sbc_init_up_sample (UINT32 src_sps, UINT32 dst_sps, UINT16 bits, UIN
**
** Function bta_av_sbc_up_sample
**
-** Description Given the source (p_src) audio data and
+** Description Given the source (p_src) audio data and
** source speed (src_sps, samples per second),
** This function converts it to audio data in the desired format
**
@@ -134,7 +134,7 @@ int bta_av_sbc_up_sample (void *p_src, void *p_dst,
**
** Function bta_av_sbc_up_sample_16s (16bits-stereo)
**
-** Description Given the source (p_src) audio data and
+** Description Given the source (p_src) audio data and
** source speed (src_sps, samples per second),
** This function converts it to audio data in the desired format
**
@@ -142,7 +142,7 @@ int bta_av_sbc_up_sample (void *p_src, void *p_dst,
** p_dst: the data buffer to hold the converted audio data
** src_samples: The number of source samples (in uint of 4 bytes)
** dst_samples: The size of p_dst (in uint of 4 bytes)
-**
+**
** Returns The number of bytes used in p_dst
** The number of bytes used in p_src (in *p_ret)
**
@@ -197,7 +197,7 @@ int bta_av_sbc_up_sample_16s (void *p_src, void *p_dst,
**
** Function bta_av_sbc_up_sample_16m (16bits-mono)
**
-** Description Given the source (p_src) audio data and
+** Description Given the source (p_src) audio data and
** source speed (src_sps, samples per second),
** This function converts it to audio data in the desired format
**
@@ -205,7 +205,7 @@ int bta_av_sbc_up_sample_16s (void *p_src, void *p_dst,
** p_dst: the data buffer to hold the converted audio data
** src_samples: The number of source samples (in uint of 2 bytes)
** dst_samples: The size of p_dst (in uint of 2 bytes)
-**
+**
** Returns The number of bytes used in p_dst
** The number of bytes used in p_src (in *p_ret)
**
@@ -262,7 +262,7 @@ int bta_av_sbc_up_sample_16m (void *p_src, void *p_dst,
**
** Function bta_av_sbc_up_sample_8s (8bits-stereo)
**
-** Description Given the source (p_src) audio data and
+** Description Given the source (p_src) audio data and
** source speed (src_sps, samples per second),
** This function converts it to audio data in the desired format
**
@@ -270,7 +270,7 @@ int bta_av_sbc_up_sample_16m (void *p_src, void *p_dst,
** p_dst: the data buffer to hold the converted audio data
** src_samples: The number of source samples (in uint of 2 bytes)
** dst_samples: The size of p_dst (in uint of 2 bytes)
-**
+**
** Returns The number of bytes used in p_dst
** The number of bytes used in p_src (in *p_ret)
**
@@ -331,7 +331,7 @@ int bta_av_sbc_up_sample_8s (void *p_src, void *p_dst,
**
** Function bta_av_sbc_up_sample_8m (8bits-mono)
**
-** Description Given the source (p_src) audio data and
+** Description Given the source (p_src) audio data and
** source speed (src_sps, samples per second),
** This function converts it to audio data in the desired format
**
@@ -339,7 +339,7 @@ int bta_av_sbc_up_sample_8s (void *p_src, void *p_dst,
** p_dst: the data buffer to hold the converted audio data
** src_samples: The number of source samples (number of bytes)
** dst_samples: The size of p_dst (number of bytes)
-**
+**
** Returns The number of bytes used in p_dst
** The number of bytes used in p_src (in *p_ret)
**
@@ -398,12 +398,12 @@ int bta_av_sbc_up_sample_8m (void *p_src, void *p_dst,
**
** Description Determine the preferred SBC codec configuration for the
** given codec capabilities. The function is passed the
-** preferred codec configuration and the peer codec
+** preferred codec configuration and the peer codec
** capabilities for the stream. The function attempts to
** match the preferred capabilities with the configuration
** as best it can. The resulting codec configuration is
** returned in the same memory used for the capabilities.
-**
+**
** Returns 0 if ok, nonzero if error.
** Codec configuration in p_cap.
**
@@ -429,7 +429,7 @@ UINT8 bta_av_sbc_cfg_for_cap(UINT8 *p_peer, tA2D_SBC_CIE *p_cap, tA2D_SBC_CIE *p
APPL_TRACE_ERROR1("bta_av_sbc_cfg_for_cap: ch_mode(0x%02X) not supported", p_pref->ch_mode);
return A2D_FAIL;
}
-
+
/* Check if the peer supports our sampling freq */
if (peer_cie.samp_freq & p_pref->samp_freq)
{
@@ -500,7 +500,7 @@ UINT8 bta_av_sbc_cfg_for_cap(UINT8 *p_peer, tA2D_SBC_CIE *p_cap, tA2D_SBC_CIE *p
**
** Description This function checks whether an SBC codec configuration
** is allowable for the given codec capabilities.
-**
+**
** Returns 0 if ok, nonzero if error.
**
*******************************************************************************/
@@ -517,7 +517,7 @@ UINT8 bta_av_sbc_cfg_in_cap(UINT8 *p_cfg, tA2D_SBC_CIE *p_cap)
/* verify that each parameter is in range */
- /* sampling frequency */
+ /* sampling frequency */
if ((cfg_cie.samp_freq & p_cap->samp_freq) == 0)
{
status = A2D_NS_SAMP_FREQ;
@@ -551,7 +551,7 @@ UINT8 bta_av_sbc_cfg_in_cap(UINT8 *p_cfg, tA2D_SBC_CIE *p_cap)
else if (cfg_cie.min_bitpool < p_cap->min_bitpool)
{
status = A2D_NS_MIN_BITPOOL;
- }
+ }
return status;
}
@@ -561,7 +561,7 @@ UINT8 bta_av_sbc_cfg_in_cap(UINT8 *p_cfg, tA2D_SBC_CIE *p_cap)
** Function bta_av_sbc_bld_hdr
**
** Description This function builds the packet header for MPF1.
-**
+**
** Returns void
**
*******************************************************************************/
diff --git a/bta/av/bta_av_ssm.c b/bta/av/bta_av_ssm.c
index 9e74881..f1132d9 100644
--- a/bta/av/bta_av_ssm.c
+++ b/bta/av/bta_av_ssm.c
@@ -135,7 +135,7 @@ static const UINT8 bta_av_sst_init[][BTA_AV_NUM_COLS] =
/* AVDT_DELAY_RPT_EVT */ {BTA_AV_SIGNORE, BTA_AV_SIGNORE, BTA_AV_INIT_SST },
/* ACP_CONNECT_EVT */ {BTA_AV_SIGNORE, BTA_AV_SIGNORE, BTA_AV_INCOMING_SST }
};
-
+
/* state table for incoming state */
static const UINT8 bta_av_sst_incoming[][BTA_AV_NUM_COLS] =
{
@@ -361,7 +361,7 @@ static char *bta_av_sst_code(UINT8 state);
** Function bta_av_is_rcfg_sst
**
** Description Check if stream state machine is in reconfig state.
-**
+**
**
** Returns TRUE if stream state machine is in reconfig state.
**
@@ -384,7 +384,7 @@ BOOLEAN bta_av_is_rcfg_sst (tBTA_AV_SCB *p_scb)
** Function bta_av_ssm_execute
**
** Description Stream state machine event handling function for AV
-**
+**
**
** Returns void
**
@@ -456,7 +456,7 @@ void bta_av_ssm_execute(tBTA_AV_SCB *p_scb, UINT16 event, tBTA_AV_DATA *p_data)
** Function bta_av_is_scb_opening
**
** Description Returns TRUE is scb is in opening state.
-**
+**
**
** Returns TRUE if scb is in opening state.
**
@@ -464,7 +464,7 @@ void bta_av_ssm_execute(tBTA_AV_SCB *p_scb, UINT16 event, tBTA_AV_DATA *p_data)
BOOLEAN bta_av_is_scb_opening (tBTA_AV_SCB *p_scb)
{
BOOLEAN is_opening = FALSE;
-
+
if (p_scb)
{
if (p_scb->state == BTA_AV_OPENING_SST)
@@ -479,7 +479,7 @@ BOOLEAN bta_av_is_scb_opening (tBTA_AV_SCB *p_scb)
** Function bta_av_is_scb_incoming
**
** Description Returns TRUE is scb is in incoming state.
-**
+**
**
** Returns TRUE if scb is in incoming state.
**
@@ -487,7 +487,7 @@ BOOLEAN bta_av_is_scb_opening (tBTA_AV_SCB *p_scb)
BOOLEAN bta_av_is_scb_incoming (tBTA_AV_SCB *p_scb)
{
BOOLEAN is_incoming = FALSE;
-
+
if (p_scb)
{
if (p_scb->state == BTA_AV_INCOMING_SST)
@@ -520,7 +520,7 @@ void bta_av_set_scb_sst_init (tBTA_AV_SCB *p_scb)
** Function bta_av_is_scb_init
**
** Description Returns TRUE is scb is in init state.
-**
+**
**
** Returns TRUE if scb is in incoming state.
**
@@ -528,7 +528,7 @@ void bta_av_set_scb_sst_init (tBTA_AV_SCB *p_scb)
BOOLEAN bta_av_is_scb_init (tBTA_AV_SCB *p_scb)
{
BOOLEAN is_init = FALSE;
-
+
if (p_scb)
{
if (p_scb->state == BTA_AV_INIT_SST)
@@ -564,7 +564,7 @@ void bta_av_set_scb_sst_incoming (tBTA_AV_SCB *p_scb)
**
** Function bta_av_sst_code
**
-** Description
+** Description
**
** Returns char *
**
diff --git a/bta/dm/bta_dm_act.c b/bta/dm/bta_dm_act.c
index c087dc8..f43f8f0 100755..100644
--- a/bta/dm/bta_dm_act.c
+++ b/bta/dm/bta_dm_act.c
@@ -131,10 +131,10 @@ const UINT16 bta_service_id_to_uuid_lkup_tbl [BTA_MAX_SERVICE_ID] =
};
/*
- * NOTE : The number of element in bta_service_id_to_btm_srv_id_lkup_tbl should be matching with
+ * NOTE : The number of element in bta_service_id_to_btm_srv_id_lkup_tbl should be matching with
* the value BTA_MAX_SERVICE_ID in bta_api.h
*
- * i.e., If you add new Service ID for BTA, the correct security ID of the new service
+ * i.e., If you add new Service ID for BTA, the correct security ID of the new service
* from Security service definitions (btm_api.h) should be added to this lookup table.
*/
const UINT32 bta_service_id_to_btm_srv_id_lkup_tbl [BTA_MAX_SERVICE_ID] =
@@ -188,9 +188,9 @@ const tBTM_APPL_INFO bta_security =
#else
NULL
#endif
-#if BLE_INCLUDED == TRUE
+#if BLE_INCLUDED == TRUE
#if SMP_INCLUDED == TRUE
- ,&bta_dm_ble_smp_cback
+ ,&bta_dm_ble_smp_cback
#endif
,&bta_dm_ble_id_key_cback
#endif
@@ -216,9 +216,9 @@ UINT8 g_disc_raw_data_buf[MAX_DISC_RAW_DATA_BUF];
** Function bta_dm_app_ready_timer_cback
**
** Description allow sending EIR to controller
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
#if ( BTM_EIR_SERVER_INCLUDED == TRUE )&&(BTA_EIR_CANNED_UUID_LIST != TRUE)
@@ -234,10 +234,10 @@ static void bta_dm_app_ready_timer_cback (TIMER_LIST_ENT *p_tle)
**
** Function bta_dm_enable
**
-** Description Initialises the BT device manager
-**
+** Description Initialises the BT device manager
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_dm_enable(tBTA_DM_MSG *p_data)
@@ -245,11 +245,11 @@ void bta_dm_enable(tBTA_DM_MSG *p_data)
tBTA_SYS_HW_MSG *sys_enable_event;
tBTA_DM_SEC sec_event;
-
+
/* if already in use, return an error */
if( bta_dm_cb.is_bta_dm_active == TRUE )
{
- APPL_TRACE_WARNING0("bta_dm_enable - device already started by another application");
+ APPL_TRACE_WARNING0("bta_dm_enable - device already started by another application");
memset(&sec_event.enable, 0, sizeof ( tBTA_DM_ENABLE ));
sec_event.enable.status = BTA_FAILURE;
if( p_data->enable.p_sec_cback != NULL )
@@ -260,11 +260,11 @@ void bta_dm_enable(tBTA_DM_MSG *p_data)
/* first, register our callback to SYS HW manager */
bta_sys_hw_register( BTA_SYS_HW_BLUETOOTH, bta_dm_sys_hw_cback );
-
- /* make sure security callback is saved - if no callback, do not erase the previous one,
+
+ /* make sure security callback is saved - if no callback, do not erase the previous one,
it could be an error recovery mechanism */
- if( p_data->enable.p_sec_cback != NULL )
- bta_dm_cb.p_sec_cback = p_data->enable.p_sec_cback;
+ if( p_data->enable.p_sec_cback != NULL )
+ bta_dm_cb.p_sec_cback = p_data->enable.p_sec_cback;
/* notify BTA DM is now active */
bta_dm_cb.is_bta_dm_active = TRUE;
@@ -272,14 +272,14 @@ void bta_dm_enable(tBTA_DM_MSG *p_data)
if ((sys_enable_event = (tBTA_SYS_HW_MSG *) GKI_getbuf(sizeof(tBTA_SYS_HW_MSG))) != NULL)
{
sys_enable_event->hdr.event = BTA_SYS_API_ENABLE_EVT;
- sys_enable_event->hw_module = BTA_SYS_HW_BLUETOOTH;
-
+ sys_enable_event->hw_module = BTA_SYS_HW_BLUETOOTH;
+
bta_sys_sendmsg(sys_enable_event);
}
-
+
}
@@ -289,9 +289,9 @@ void bta_dm_enable(tBTA_DM_MSG *p_data)
** Function bta_dm_sys_hw_cback
**
** Description callback register to SYS to get HW status updates
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
static void bta_dm_sys_hw_cback( tBTA_SYS_HW_EVT status )
@@ -305,9 +305,9 @@ static void bta_dm_sys_hw_cback( tBTA_SYS_HW_EVT status )
tBT_UUID app_uuid = {LEN_UUID_128,{0}};
#endif
APPL_TRACE_DEBUG1(" bta_dm_sys_hw_cback with event: %i" , status );
-
+
if( status == BTA_SYS_HW_OFF_EVT )
- {
+ {
if( bta_dm_cb.p_sec_cback != NULL )
bta_dm_cb.p_sec_cback(BTA_DM_DISABLE_EVT, NULL);
@@ -321,7 +321,7 @@ static void bta_dm_sys_hw_cback( tBTA_SYS_HW_EVT status )
}
else
if( status == BTA_SYS_HW_ON_EVT )
- {
+ {
/* make sure we unregister, so that we don't motified again if another module starts */
bta_sys_hw_unregister( BTA_SYS_HW_BLUETOOTH);
@@ -332,15 +332,15 @@ static void bta_dm_sys_hw_cback( tBTA_SYS_HW_EVT status )
/* and retrieve the callback */
bta_dm_cb.p_sec_cback=temp_cback;
bta_dm_cb.is_bta_dm_active = TRUE;
-
- /* hw is ready, go on with BTA DM initialization */
+
+ /* hw is ready, go on with BTA DM initialization */
memset(&bta_dm_search_cb, 0x00, sizeof(bta_dm_search_cb));
memset(&bta_dm_conn_srvcs, 0x00, sizeof(bta_dm_conn_srvcs));
memset(&bta_dm_di_cb, 0, sizeof(tBTA_DM_DI_CB));
-
+
memcpy(dev_class, bta_dm_cfg.dev_class, sizeof(dev_class));
BTM_SetDeviceClass (dev_class);
-
+
#if (defined BLE_INCLUDED && BLE_INCLUDED == TRUE)
/* load BLE local information: ID keys, ER if available */
bta_dm_co_ble_load_local_keys(&key_mask, er, &id_key);
@@ -377,7 +377,7 @@ static void bta_dm_sys_hw_cback( tBTA_SYS_HW_EVT status )
BTM_ReadLocalDeviceNameFromController((tBTM_CMPL_CB *)bta_dm_local_name_cback);
bta_sys_rm_register((tBTA_SYS_CONN_CBACK*)bta_dm_rm_cback);
-
+
/* initialize bluetooth low power manager */
bta_dm_init_pm();
@@ -404,7 +404,7 @@ static void bta_dm_sys_hw_cback( tBTA_SYS_HW_EVT status )
if (WBT_ExtCreateRecord())
WBT_ExtAddPinCode();
#endif
-#endif
+#endif
}
else
APPL_TRACE_DEBUG0(" --- ignored event");
@@ -416,17 +416,17 @@ static void bta_dm_sys_hw_cback( tBTA_SYS_HW_EVT status )
**
** Function bta_dm_disable
**
-** Description Disables the BT device manager
-**
+** Description Disables the BT device manager
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_dm_disable (tBTA_DM_MSG *p_data)
{
/* Set l2cap idle timeout to 0 (so BTE immediately disconnects ACL link after last channel is closed) */
L2CA_SetIdleTimeoutByBdAddr((UINT8 *)BT_BD_ANY, 0);
-
+
/* disable all active subsystems */
bta_sys_disable(BTA_SYS_HW_BLUETOOTH);
@@ -436,17 +436,17 @@ void bta_dm_disable (tBTA_DM_MSG *p_data)
bta_dm_disable_pm();
bta_dm_cb.disabling = TRUE;
-
+
bta_dm_search_cancel(NULL);
if(BTM_GetNumAclLinks()==0)
- {
+ {
/* Earlier there used to be a 1-second timer to fire this callback.
* Doesn't look like it is needed. */
bta_dm_disable_conn_down_timer_cback(NULL);
}
else
- {
+ {
bta_dm_cb.disable_timer.p_cback = (TIMER_CBACK*)&bta_dm_disable_timer_cback;
bta_sys_start_timer(&bta_dm_cb.disable_timer, 0, 5000);
}
@@ -459,10 +459,10 @@ void bta_dm_disable (tBTA_DM_MSG *p_data)
**
** Description Called if the disable timer expires
** Used to close ACL connections which are still active
-**
-**
**
-** Returns void
+**
+**
+** Returns void
**
*******************************************************************************/
static void bta_dm_disable_timer_cback (TIMER_LIST_ENT *p_tle)
@@ -484,7 +484,7 @@ static void bta_dm_disable_timer_cback (TIMER_LIST_ENT *p_tle)
else
{
bta_dm_cb.disabling = FALSE;
-
+
bta_sys_remove_uuid(UUID_SERVCLASS_PNP_INFORMATION);
bta_dm_cb.p_sec_cback(BTA_DM_DISABLE_EVT, NULL);
}
@@ -498,9 +498,9 @@ static void bta_dm_disable_timer_cback (TIMER_LIST_ENT *p_tle)
** Function bta_dm_set_dev_name
**
** Description Sets local device name
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_dm_set_dev_name (tBTA_DM_MSG *p_data)
@@ -517,9 +517,9 @@ void bta_dm_set_dev_name (tBTA_DM_MSG *p_data)
** Function bta_dm_set_visibility
**
** Description Sets discoverability, connectability and pairability
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_dm_set_visibility (tBTA_DM_MSG *p_data)
@@ -534,7 +534,7 @@ void bta_dm_set_visibility (tBTA_DM_MSG *p_data)
if (p_data->set_visibility.conn_mode != BTA_DM_IGNORE)
BTM_SetConnectability((UINT8)p_data->set_visibility.conn_mode,
- bta_dm_cb.page_scan_window,
+ bta_dm_cb.page_scan_window,
bta_dm_cb.page_scan_interval);
/* Send False or True if not ignore */
@@ -573,9 +573,9 @@ void bta_dm_set_visibility (tBTA_DM_MSG *p_data)
** Description This function sets the AFH first and
** last disable channel, so channels within
** that range are disabled.
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_dm_set_afhchannels (tBTA_DM_MSG *p_data)
@@ -590,9 +590,9 @@ void bta_dm_set_afhchannels (tBTA_DM_MSG *p_data)
** Function bta_dm_vendor_spec_command
**
** Description Send a vendor specific command to the controller
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_dm_vendor_spec_command (tBTA_DM_MSG *p_data)
@@ -609,9 +609,9 @@ void bta_dm_vendor_spec_command (tBTA_DM_MSG *p_data)
** Function bta_dm_tx_inqpower
**
** Description write inquiry tx power.
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_dm_tx_inqpower(tBTA_DM_MSG *p_data)
@@ -669,7 +669,7 @@ void bta_dm_remove_device (tBTA_DM_MSG *p_data)
**
** Function bta_dm_add_device
**
-** Description This function adds a Link Key to an security database entry.
+** Description This function adds a Link Key to an security database entry.
** It is normally called during host startup to restore all required information
** stored in the NVRAM.
****
@@ -724,9 +724,9 @@ void bta_dm_add_device (tBTA_DM_MSG *p_data)
** Function bta_dm_bond
**
** Description Bonds with peer device
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_dm_bond (tBTA_DM_MSG *p_data)
@@ -735,7 +735,7 @@ void bta_dm_bond (tBTA_DM_MSG *p_data)
tBTA_DM_SEC sec_event;
char *p_name;
- status = BTM_SecBond ( p_data->bond.bd_addr, 0, NULL, 0 );
+ status = BTM_SecBond ( p_data->bond.bd_addr, 0, NULL, 0 );
if (bta_dm_cb.p_sec_cback && (status != BTM_CMD_STARTED))
{
@@ -767,9 +767,9 @@ void bta_dm_bond (tBTA_DM_MSG *p_data)
** Function bta_dm_bond_cancel
**
** Description Cancels bonding with a peer device
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_dm_bond_cancel (tBTA_DM_MSG *p_data)
@@ -794,9 +794,9 @@ void bta_dm_bond_cancel (tBTA_DM_MSG *p_data)
** Function bta_dm_pin_reply
**
** Description Send the pin_reply to a request from BTM
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_dm_pin_reply (tBTA_DM_MSG *p_data)
@@ -823,7 +823,7 @@ void bta_dm_pin_reply (tBTA_DM_MSG *p_data)
else
{
BTM_PINCodeReply(p_data->pin_reply.bd_addr, BTM_NOT_AUTHORIZED, 0, NULL, trusted_mask );
- }
+ }
}
@@ -834,7 +834,7 @@ void bta_dm_pin_reply (tBTA_DM_MSG *p_data)
** Description remove/set link policy mask.
** wake the link, is sniff/park is removed
**
-** Returns void
+** Returns void
**
*******************************************************************************/
void bta_dm_link_policy (tBTA_DM_MSG *p_data)
@@ -873,7 +873,7 @@ void bta_dm_link_policy (tBTA_DM_MSG *p_data)
**
** Description process the link policy changes
**
-** Returns void
+** Returns void
**
*******************************************************************************/
static void bta_dm_policy_cback(tBTA_SYS_CONN_STATUS status, UINT8 id, UINT8 app_id, BD_ADDR peer_addr)
@@ -937,14 +937,14 @@ static void bta_dm_policy_cback(tBTA_SYS_CONN_STATUS status, UINT8 id, UINT8 app
** Function bta_dm_auth_reply
**
** Description Send the authorization reply to a request from BTM
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_dm_auth_reply (tBTA_DM_MSG *p_data)
{
-
+
UINT32 trusted_mask[BTM_SEC_SERVICE_ARRAY_SIZE];
UINT8 btm_mask_index = 0;
UINT32 * current_trusted_mask;
@@ -985,10 +985,10 @@ void bta_dm_auth_reply (tBTA_DM_MSG *p_data)
**
** Function bta_dm_confirm
**
-** Description Send the user confirm request reply in response to a
-** request from BTM
+** Description Send the user confirm request reply in response to a
+** request from BTM
**
-** Returns void
+** Returns void
**
*******************************************************************************/
void bta_dm_confirm(tBTA_DM_MSG *p_data)
@@ -1006,7 +1006,7 @@ void bta_dm_confirm(tBTA_DM_MSG *p_data)
**
** Description Send the passkey cancel from SP initiator by sending a negative
** passkey request replyreply.
-** Returns void
+** Returns void
**
*******************************************************************************/
#if (BTM_LOCAL_IO_CAPS != BTM_IO_CAP_NONE)
@@ -1022,7 +1022,7 @@ void bta_dm_passkey_cancel(tBTA_DM_MSG *p_data)
**
** Description Retrieve the OOB data from the local LM
**
-** Returns void
+** Returns void
**
*******************************************************************************/
#if (BTM_OOB_INCLUDED == TRUE)
@@ -1037,7 +1037,7 @@ void bta_dm_loc_oob(tBTA_DM_MSG *p_data)
**
** Description respond to the IO capabilities request from BTM
**
-** Returns void
+** Returns void
**
*******************************************************************************/
void bta_dm_ci_io_req_act(tBTA_DM_MSG *p_data)
@@ -1054,9 +1054,9 @@ void bta_dm_ci_io_req_act(tBTA_DM_MSG *p_data)
** Function bta_dm_ci_rmt_oob_act
**
** Description respond to the OOB data request for the remote device from BTM
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_dm_ci_rmt_oob_act(tBTA_DM_MSG *p_data)
@@ -1074,10 +1074,10 @@ void bta_dm_ci_rmt_oob_act(tBTA_DM_MSG *p_data)
**
** Function bta_dm_search_start
**
-** Description Starts an inquiry
-**
+** Description Starts an inquiry
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_dm_search_start (tBTA_DM_MSG *p_data)
@@ -1116,7 +1116,7 @@ void bta_dm_search_start (tBTA_DM_MSG *p_data)
bta_dm_inq_cmpl_cb ((void *)&result);
return;
}
-// bta_dm_search_cb.p_srvc_uuid = (tBT_UUID *)GKI_getbuf(len);
+// bta_dm_search_cb.p_srvc_uuid = (tBT_UUID *)GKI_getbuf(len);
memcpy(bta_dm_search_cb.p_srvc_uuid, p_data->search.p_uuid, len);
}
@@ -1125,8 +1125,8 @@ void bta_dm_search_start (tBTA_DM_MSG *p_data)
else
p_data->search.inq_params.mode |= BTM_BLE_GENERAL_INQUIRY;
#endif
- result.status = BTM_StartInquiry( (tBTM_INQ_PARMS*)&p_data->search.inq_params,
- bta_dm_inq_results_cb,
+ result.status = BTM_StartInquiry( (tBTM_INQ_PARMS*)&p_data->search.inq_params,
+ bta_dm_inq_results_cb,
(tBTM_CMPL_CB*) bta_dm_inq_cmpl_cb);
APPL_TRACE_EVENT1("bta_dm_search_start status=%d", result.status);
@@ -1143,9 +1143,9 @@ void bta_dm_search_start (tBTA_DM_MSG *p_data)
** Function bta_dm_search_cancel
**
** Description Cancels an ongoing search for devices
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_dm_search_cancel (tBTA_DM_MSG *p_data)
@@ -1184,9 +1184,9 @@ void bta_dm_search_cancel (tBTA_DM_MSG *p_data)
** Function bta_dm_discover
**
** Description Discovers services on a remote device
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_dm_discover (tBTA_DM_MSG *p_data)
@@ -1194,7 +1194,7 @@ void bta_dm_discover (tBTA_DM_MSG *p_data)
#if BLE_INCLUDED == TRUE && BTA_GATT_INCLUDED == TRUE
UINT16 len = (UINT16)(sizeof(tBT_UUID) * p_data->discover.num_uuid);
#endif
- APPL_TRACE_EVENT2("bta_dm_discover services_to_search=0x%04X, sdp_search=%d",
+ APPL_TRACE_EVENT2("bta_dm_discover services_to_search=0x%04X, sdp_search=%d",
p_data->discover.services, p_data->discover.sdp_search);
/* save the search condition */
@@ -1262,9 +1262,9 @@ void bta_dm_di_disc_cmpl(tBTA_DM_MSG *p_data)
** Function bta_dm_di_disc_callback
**
** Description This function queries a remote device for DI information.
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
static void bta_dm_di_disc_callback(UINT16 result)
@@ -1285,9 +1285,9 @@ static void bta_dm_di_disc_callback(UINT16 result)
** Function bta_dm_di_disc
**
** Description This function queries a remote device for DI information.
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_dm_di_disc (tBTA_DM_MSG *p_data)
@@ -1301,7 +1301,7 @@ void bta_dm_di_disc (tBTA_DM_MSG *p_data)
if((bta_dm_search_cb.p_sdp_db = (tSDP_DISCOVERY_DB *)GKI_getbuf(BTA_DM_SDP_DB_SIZE)) != NULL)
{
- if ( SDP_DiDiscover(bta_dm_search_cb.peer_bdaddr, p_data->di_disc.p_sdp_db,
+ if ( SDP_DiDiscover(bta_dm_search_cb.peer_bdaddr, p_data->di_disc.p_sdp_db,
p_data->di_disc.len, bta_dm_di_disc_callback) == SDP_SUCCESS)
{
result = BTA_SUCCESS;
@@ -1311,8 +1311,8 @@ void bta_dm_di_disc (tBTA_DM_MSG *p_data)
{
APPL_TRACE_ERROR0("No buffer to start DI discovery");
}
-
- if ( result == BTA_FAILURE &&
+
+ if ( result == BTA_FAILURE &&
(p_msg = (tBTA_DM_MSG *) GKI_getbuf(sizeof(tBTA_DM_MSG))) != NULL)
{
p_msg->hdr.event = BTA_DM_SEARCH_CMPL_EVT;
@@ -1485,7 +1485,7 @@ void bta_dm_sdp_result (tBTA_DM_MSG *p_data)
UINT8 uuid_list[32][MAX_UUID_SIZE]; // assuming a max of 32 services
if((p_data->sdp_event.sdp_result == SDP_SUCCESS)
- || (p_data->sdp_event.sdp_result == SDP_NO_RECS_MATCH)
+ || (p_data->sdp_event.sdp_result == SDP_NO_RECS_MATCH)
|| (p_data->sdp_event.sdp_result == SDP_DB_FULL))
{
APPL_TRACE_DEBUG1("sdp_result::0x%x", p_data->sdp_event.sdp_result);
@@ -1495,15 +1495,15 @@ void bta_dm_sdp_result (tBTA_DM_MSG *p_data)
service_found = FALSE;
p_sdp_rec = NULL;
if( bta_dm_search_cb.service_index == (BTA_USER_SERVICE_ID+1) )
- {
+ {
p_sdp_rec = SDP_FindServiceUUIDInDb(bta_dm_search_cb.p_sdp_db, &bta_dm_search_cb.uuid, p_sdp_rec);
if (p_sdp_rec && SDP_FindProtocolListElemInRec(p_sdp_rec, UUID_PROTOCOL_RFCOMM, &pe))
- {
- bta_dm_search_cb.peer_scn = (UINT8) pe.params[0];
+ {
+ bta_dm_search_cb.peer_scn = (UINT8) pe.params[0];
scn_found = TRUE;
}
- }
+ }
else
{
service = bta_service_id_to_uuid_lkup_tbl[bta_dm_search_cb.service_index-1];
@@ -1521,7 +1521,7 @@ void bta_dm_sdp_result (tBTA_DM_MSG *p_data)
}
/* all GATT based services */
- do
+ do
{
/* find a service record, report it */
p_sdp_rec = SDP_FindServiceInDb(bta_dm_search_cb.p_sdp_db,
@@ -1535,7 +1535,7 @@ void bta_dm_sdp_result (tBTA_DM_MSG *p_data)
BCM_STRNCPY_S((char*)result.disc_ble_res.bd_name, sizeof(BD_NAME), bta_dm_get_remname(), (BD_NAME_LEN-1));
result.disc_ble_res.service.len = service_uuid.len;
result.disc_ble_res.service.uu.uuid16 = service_uuid.uu.uuid16;
-
+
bta_dm_search_cb.p_search_cback(BTA_DM_DISC_BLE_RES_EVT, &result);
}
}
@@ -1548,7 +1548,7 @@ void bta_dm_sdp_result (tBTA_DM_MSG *p_data)
else
#endif
{
- /* SDP_DB_FULL means some records with the
+ /* SDP_DB_FULL means some records with the
required attributes were received */
if(((p_data->sdp_event.sdp_result == SDP_DB_FULL) &&
bta_dm_search_cb.services != BTA_ALL_SERVICE_MASK) ||
@@ -1583,7 +1583,7 @@ void bta_dm_sdp_result (tBTA_DM_MSG *p_data)
}
}
- if(bta_dm_search_cb.services == BTA_ALL_SERVICE_MASK &&
+ if(bta_dm_search_cb.services == BTA_ALL_SERVICE_MASK &&
bta_dm_search_cb.services_to_search == 0)
{
#if BLE_INCLUDED == TRUE && BTA_GATT_INCLUDED == TRUE
@@ -1600,7 +1600,7 @@ void bta_dm_sdp_result (tBTA_DM_MSG *p_data)
break;
}
- while(bta_dm_search_cb.service_index <= BTA_MAX_SERVICE_ID);
+ while(bta_dm_search_cb.service_index <= BTA_MAX_SERVICE_ID);
// GKI_freebuf(bta_dm_search_cb.p_sdp_db);
// bta_dm_search_cb.p_sdp_db = NULL;
@@ -1661,26 +1661,26 @@ void bta_dm_sdp_result (tBTA_DM_MSG *p_data)
//copy the raw_data to the discovery result structure
//
APPL_TRACE_DEBUG2("bta_dm_sdp_result (raw_data used = 0x%x raw_data_ptr = 0x%x)\r\n",bta_dm_search_cb.p_sdp_db->raw_used, bta_dm_search_cb.p_sdp_db->raw_data);
-
+
if ( bta_dm_search_cb.p_sdp_db != NULL && bta_dm_search_cb.p_sdp_db->raw_used != 0 &&
bta_dm_search_cb.p_sdp_db->raw_data != NULL) {
-
+
p_msg->disc_result.result.disc_res.p_raw_data = GKI_getbuf(bta_dm_search_cb.p_sdp_db->raw_used);
if ( NULL != p_msg->disc_result.result.disc_res.p_raw_data ) {
- memcpy( p_msg->disc_result.result.disc_res.p_raw_data,
- bta_dm_search_cb.p_sdp_db->raw_data,
+ memcpy( p_msg->disc_result.result.disc_res.p_raw_data,
+ bta_dm_search_cb.p_sdp_db->raw_data,
bta_dm_search_cb.p_sdp_db->raw_used );
-
- p_msg->disc_result.result.disc_res.raw_data_size =
+
+ p_msg->disc_result.result.disc_res.raw_data_size =
bta_dm_search_cb.p_sdp_db->raw_used;
-
+
} else {
APPL_TRACE_DEBUG1("bta_dm_sdp_result GKI Alloc failed to allocate %d bytes !!\r\n",bta_dm_search_cb.p_sdp_db->raw_used);
}
-
+
bta_dm_search_cb.p_sdp_db->raw_data = NULL; //no need to free this - it is a global assigned.
bta_dm_search_cb.p_sdp_db->raw_used = 0;
- bta_dm_search_cb.p_sdp_db->raw_size = 0;
+ bta_dm_search_cb.p_sdp_db->raw_size = 0;
}
else {
APPL_TRACE_DEBUG0("bta_dm_sdp_result raw data size is 0 or raw_data is null!!\r\n");
@@ -1688,9 +1688,9 @@ void bta_dm_sdp_result (tBTA_DM_MSG *p_data)
/* Done with p_sdp_db. Free it */
bta_dm_free_sdp_db(NULL);
p_msg->disc_result.result.disc_res.services = bta_dm_search_cb.services_found;
-
+
//Piggy back the SCN over result field
- if( scn_found )
+ if( scn_found )
{
p_msg->disc_result.result.disc_res.result = (3 + bta_dm_search_cb.peer_scn);
p_msg->disc_result.result.disc_res.services |= BTA_USER_SERVICE_MASK;
@@ -1805,8 +1805,8 @@ void bta_dm_disc_result (tBTA_DM_MSG *p_data)
*******************************************************************************/
void bta_dm_search_result (tBTA_DM_MSG *p_data)
{
- APPL_TRACE_DEBUG2("bta_dm_search_result searching:0x%04x, result:0x%04x",
- bta_dm_search_cb.services,
+ APPL_TRACE_DEBUG2("bta_dm_search_result searching:0x%04x, result:0x%04x",
+ bta_dm_search_cb.services,
p_data->disc_result.result.disc_res.services);
/* call back if application wants name discovery or found services that application is searching */
@@ -1840,9 +1840,9 @@ void bta_dm_search_result (tBTA_DM_MSG *p_data)
** Function bta_dm_search_timer_cback
**
** Description Called when ACL disconnect time is over
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
static void bta_dm_search_timer_cback (TIMER_LIST_ENT *p_tle)
@@ -1861,7 +1861,7 @@ static void bta_dm_search_timer_cback (TIMER_LIST_ENT *p_tle)
**
** Function bta_dm_free_sdp_db
**
-** Description Frees SDP data base
+** Description Frees SDP data base
**
** Returns void
**
@@ -1955,7 +1955,7 @@ void bta_dm_search_cancel_cmpl (tBTA_DM_MSG *p_data)
**
** Function bta_dm_search_cancel_transac_cmpl
**
-** Description Current Service Discovery or remote name procedure is
+** Description Current Service Discovery or remote name procedure is
** completed after search cancellation
**
** Returns void
@@ -1978,7 +1978,7 @@ void bta_dm_search_cancel_transac_cmpl(tBTA_DM_MSG *p_data)
**
** Function bta_dm_search_cancel_notify
**
-** Description Notify application that search has been cancelled
+** Description Notify application that search has been cancelled
**
** Returns void
**
@@ -2018,16 +2018,16 @@ static void bta_dm_find_services ( BD_ADDR bd_addr)
UINT16 attr_list[] = {ATTR_ID_SERVICE_CLASS_ID_LIST, ATTR_ID_EXT_BRCM_VERSION};
UINT16 num_attrs = 1;
tBTA_DM_MSG *p_msg;
-
+
memset (&uuid, 0, sizeof(tSDP_UUID));
while(bta_dm_search_cb.service_index < BTA_MAX_SERVICE_ID)
{
- if( bta_dm_search_cb.services_to_search
+ if( bta_dm_search_cb.services_to_search
& (tBTA_SERVICE_MASK)(BTA_SERVICE_ID_TO_SERVICE_MASK(bta_dm_search_cb.service_index)))
{
if((bta_dm_search_cb.p_sdp_db = (tSDP_DISCOVERY_DB *)GKI_getbuf(BTA_DM_SDP_DB_SIZE)) != NULL)
- {
+ {
APPL_TRACE_DEBUG1("bta_dm_search_cb.services = %04x***********", bta_dm_search_cb.services);
/* try to search all services by search based on L2CAP UUID */
if(bta_dm_search_cb.services == BTA_ALL_SERVICE_MASK )
@@ -2050,11 +2050,11 @@ static void bta_dm_find_services ( BD_ADDR bd_addr)
/* for LE only profile */
if (bta_dm_search_cb.service_index == BTA_BLE_SERVICE_ID)
{
- if (bta_dm_search_cb.uuid_to_search > 0 && bta_dm_search_cb.p_srvc_uuid)
+ if (bta_dm_search_cb.uuid_to_search > 0 && bta_dm_search_cb.p_srvc_uuid)
{
- memcpy(&uuid,
+ memcpy(&uuid,
(const void *)(bta_dm_search_cb.p_srvc_uuid + \
- bta_dm_search_cb.num_uuid - bta_dm_search_cb.uuid_to_search),
+ bta_dm_search_cb.num_uuid - bta_dm_search_cb.uuid_to_search),
sizeof(tBT_UUID));
bta_dm_search_cb.uuid_to_search -- ;
@@ -2066,7 +2066,7 @@ static void bta_dm_find_services ( BD_ADDR bd_addr)
if (bta_dm_search_cb.uuid_to_search == 0)
bta_dm_search_cb.services_to_search &=
(tBTA_SERVICE_MASK)(~(BTA_SERVICE_ID_TO_SERVICE_MASK(bta_dm_search_cb.service_index)));
-
+
}
else
#endif
@@ -2077,7 +2077,7 @@ static void bta_dm_find_services ( BD_ADDR bd_addr)
uuid.uu.uuid16 = bta_service_id_to_uuid_lkup_tbl[bta_dm_search_cb.service_index];
}
}
-
+
if (uuid.len == 0)
uuid.len = LEN_UUID_16;
@@ -2097,13 +2097,13 @@ static void bta_dm_find_services ( BD_ADDR bd_addr)
APPL_TRACE_ERROR1("****************search UUID = %04x***********", uuid.uu.uuid16);
//SDP_InitDiscoveryDb (bta_dm_search_cb.p_sdp_db, BTA_DM_SDP_DB_SIZE, 1, &uuid, num_attrs, attr_list);
SDP_InitDiscoveryDb (bta_dm_search_cb.p_sdp_db, BTA_DM_SDP_DB_SIZE, 1, &uuid, 0, NULL);
-
+
memset(g_disc_raw_data_buf, 0, sizeof(g_disc_raw_data_buf));
bta_dm_search_cb.p_sdp_db->raw_data = g_disc_raw_data_buf;
-
+
bta_dm_search_cb.p_sdp_db->raw_size = MAX_DISC_RAW_DATA_BUF;
-
+
if (!SDP_ServiceSearchAttributeRequest (bd_addr, bta_dm_search_cb.p_sdp_db, &bta_dm_sdp_callback))
{
/* if discovery not successful with this device
@@ -2219,7 +2219,7 @@ static void bta_dm_discover_device(BD_ADDR remote_bd_addr)
bta_dm_search_cb.p_btm_inq_info
);
if ( bta_dm_search_cb.p_btm_inq_info ) {
-
+
APPL_TRACE_DEBUG1("bta_dm_discover_device appl_knows_rem_name %d",
bta_dm_search_cb.p_btm_inq_info->appl_knows_rem_name
);
@@ -2275,7 +2275,7 @@ static void bta_dm_discover_device(BD_ADDR remote_bd_addr)
bta_dm_search_cb.wait_disc = TRUE;
#if (BLE_INCLUDED == TRUE && (defined BTA_GATT_INCLUDED) && (BTA_GATT_INCLUDED == TRUE))
- if ( bta_dm_search_cb.p_btm_inq_info )
+ if ( bta_dm_search_cb.p_btm_inq_info )
{
APPL_TRACE_DEBUG3("bta_dm_discover_device p_btm_inq_info 0x%x results.device_type 0x%x services_to_search 0x%x",
bta_dm_search_cb.p_btm_inq_info,
@@ -2290,16 +2290,16 @@ static void bta_dm_discover_device(BD_ADDR remote_bd_addr)
if ( bta_dm_search_cb.p_btm_inq_info != NULL &&
bta_dm_search_cb.p_btm_inq_info->results.device_type == BT_DEVICE_TYPE_BLE &&
(bta_dm_search_cb.services_to_search & BTA_BLE_SERVICE_MASK))*/
- {
+ {
if (bta_dm_search_cb.services_to_search & BTA_BLE_SERVICE_MASK)
{
//set the raw data buffer here
memset(g_disc_raw_data_buf, 0, sizeof(g_disc_raw_data_buf));
bta_dm_search_cb.p_ble_rawdata = g_disc_raw_data_buf;
-
+
bta_dm_search_cb.ble_raw_size = MAX_DISC_RAW_DATA_BUF;
bta_dm_search_cb.ble_raw_used = 0;
-
+
/* start GATT for service discovery */
btm_dm_start_gatt_discovery(bta_dm_search_cb.peer_bdaddr);
return;
@@ -2362,7 +2362,7 @@ static void bta_dm_sdp_callback (UINT16 sdp_status)
**
** Function bta_dm_inq_results_cb
**
-** Description Inquiry results callback from BTM
+** Description Inquiry results callback from BTM
**
** Returns void
**
@@ -2396,20 +2396,20 @@ static void bta_dm_inq_results_cb (tBTM_INQ_RESULTS *p_inq, UINT8 *p_eir)
result.inq_res.remt_name_not_required = FALSE;
}
-
+
if(bta_dm_search_cb.p_search_cback)
bta_dm_search_cb.p_search_cback(BTA_DM_INQ_RES_EVT, &result);
if(p_inq_info)
{
- /* application indicates if it knows the remote name, inside the callback
+ /* application indicates if it knows the remote name, inside the callback
copy that to the inquiry data base*/
if(result.inq_res.remt_name_not_required)
p_inq_info->appl_knows_rem_name = TRUE;
}
-
+
}
@@ -2417,7 +2417,7 @@ static void bta_dm_inq_results_cb (tBTM_INQ_RESULTS *p_inq, UINT8 *p_eir)
**
** Function bta_dm_inq_cmpl_cb
**
-** Description Inquiry complete callback from BTM
+** Description Inquiry complete callback from BTM
**
** Returns void
**
@@ -2443,7 +2443,7 @@ static void bta_dm_inq_cmpl_cb (void * p_result)
**
** Function bta_dm_service_search_remname_cback
**
-** Description Remote name call back from BTM during service discovery
+** Description Remote name call back from BTM during service discovery
**
** Returns void
**
@@ -2533,7 +2533,7 @@ static void bta_dm_remname_cback (tBTM_REMOTE_DEV_NAME *p_remote_name)
**
** Function bta_dm_authorize_cback
**
-** Description cback requesting authorization
+** Description cback requesting authorization
**
** Returns void
**
@@ -2593,7 +2593,7 @@ static UINT8 bta_dm_authorize_cback (BD_ADDR bd_addr, DEV_CLASS dev_class, BD_NA
**
** Function bta_dm_pinname_cback
**
-** Description Callback requesting pin_key
+** Description Callback requesting pin_key
**
** Returns void
**
@@ -2656,7 +2656,7 @@ static void bta_dm_pinname_cback (void *p_data)
**
** Function bta_dm_pin_cback
**
-** Description Callback requesting pin_key
+** Description Callback requesting pin_key
**
** Returns void
**
@@ -2705,7 +2705,7 @@ static UINT8 bta_dm_link_key_request_cback (BD_ADDR bd_addr, LINK_KEY key)
/* Application passes all link key to
BTM during initialization using add_device
API. If BTM doesn't have the link key in it's
- data base, that's because application doesn't
+ data base, that's because application doesn't
it */
return BTM_NOT_AUTHORIZED;
@@ -2750,7 +2750,7 @@ static UINT8 bta_dm_new_link_key_cback(BD_ADDR bd_addr, DEV_CLASS dev_class,
memcpy(p_auth_cmpl->key, key, LINK_KEY_LEN);
sec_event.auth_cmpl.fail_reason = HCI_SUCCESS;
-
+
if(bta_dm_cb.p_sec_cback)
{
bta_dm_cb.p_sec_cback(event, &sec_event);
@@ -2795,9 +2795,9 @@ static UINT8 bta_dm_authentication_complete_cback(BD_ADDR bd_addr, DEV_CLASS dev
if(bta_dm_cb.p_sec_cback)
{
bta_dm_cb.p_sec_cback(BTA_DM_AUTH_CMPL_EVT, &sec_event);
- }
+ }
}
-
+
return BTM_SUCCESS;
}
@@ -2851,7 +2851,7 @@ static UINT8 bta_dm_sp_cback (tBTM_SP_EVT event, tBTM_SP_EVT_DATA *p_data)
sec_event.cfm_req.rmt_io_caps = p_data->cfm_req.rmt_io_caps;
/* continue to next case */
#if (BTM_LOCAL_IO_CAPS != BTM_IO_CAP_NONE)
- /* Passkey entry mode, mobile device with output capability is very
+ /* Passkey entry mode, mobile device with output capability is very
unlikely to receive key request, so skip this event */
/*case BTM_SP_KEY_REQ_EVT: */
case BTM_SP_KEY_NOTIF_EVT:
@@ -2906,7 +2906,7 @@ static UINT8 bta_dm_sp_cback (tBTM_SP_EVT event, tBTM_SP_EVT_DATA *p_data)
break;
#endif
case BTM_SP_COMPLT_EVT:
- /* do not report this event - handled by link_key_callback or auth_complete_callback */
+ /* do not report this event - handled by link_key_callback or auth_complete_callback */
break;
case BTM_SP_KEYPRESS_EVT:
@@ -2931,9 +2931,9 @@ static UINT8 bta_dm_sp_cback (tBTM_SP_EVT event, tBTM_SP_EVT_DATA *p_data)
** Function bta_dm_local_name_cback
**
** Description Callback from btm after local name is read
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
static void bta_dm_local_name_cback(UINT8 *p_name)
@@ -2952,9 +2952,9 @@ static void bta_dm_local_name_cback(UINT8 *p_name)
** Function bta_dm_signal_strength
**
** Description Callback from btm after local bdaddr is read
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_dm_signal_strength(tBTA_DM_MSG *p_data)
@@ -2977,9 +2977,9 @@ void bta_dm_signal_strength(tBTA_DM_MSG *p_data)
** Function bta_dm_signal_strength_timer_cback
**
** Description Periodic timer callback to read signal strength
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
static void bta_dm_signal_strength_timer_cback (TIMER_LIST_ENT *p_tle)
@@ -3011,7 +3011,7 @@ static void bta_dm_signal_strength_timer_cback (TIMER_LIST_ENT *p_tle)
bta_sys_start_timer(&bta_dm_cb.signal_strength_timer, 0, (UINT32)1000*bta_dm_cb.signal_strength_period);
}
}
-
+
#if (defined(BTM_BUSY_LEVEL_CHANGE_INCLUDED) && BTM_BUSY_LEVEL_CHANGE_INCLUDED == TRUE)
/*******************************************************************************
@@ -3019,9 +3019,9 @@ static void bta_dm_signal_strength_timer_cback (TIMER_LIST_ENT *p_tle)
** Function bta_dm_bl_change_cback
**
** Description Callback from btm when acl connection goes up or down
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
static void bta_dm_bl_change_cback (tBTM_BL_EVENT_DATA *p_data)
@@ -3033,7 +3033,7 @@ static void bta_dm_bl_change_cback (tBTM_BL_EVENT_DATA *p_data)
{
p_msg->event = p_data->event;
p_msg->is_new = FALSE;
-
+
switch(p_msg->event)
{
case BTM_BL_CONN_EVT:
@@ -3060,7 +3060,7 @@ static void bta_dm_bl_change_cback (tBTM_BL_EVENT_DATA *p_data)
bta_sys_sendmsg(p_msg);
}
-
+
}
#else
@@ -3069,9 +3069,9 @@ static void bta_dm_bl_change_cback (tBTM_BL_EVENT_DATA *p_data)
** Function bta_dm_acl_change_cback
**
** Description Callback from btm when acl connection goes up or down
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
static void bta_dm_acl_change_cback (BD_ADDR p_bda, DEV_CLASS p_dc, BD_NAME p_bdn,
@@ -3096,7 +3096,7 @@ static void bta_dm_acl_change_cback (BD_ADDR p_bda, DEV_CLASS p_dc, BD_NAME p_bd
bta_sys_sendmsg(p_msg);
}
-
+
}
#endif
/*******************************************************************************
@@ -3105,7 +3105,7 @@ static void bta_dm_acl_change_cback (BD_ADDR p_bda, DEV_CLASS p_dc, BD_NAME p_bd
**
** Description Receives the role switch complete event
**
-** Returns
+** Returns
**
*******************************************************************************/
static void bta_dm_rs_cback (tBTM_ROLE_SWITCH_CMPL *p1)
@@ -3165,9 +3165,9 @@ static BOOLEAN bta_dm_check_av(UINT16 event)
** Function bta_dm_acl_change
**
** Description Process BTA_DM_ACL_CHANGE_EVT
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_dm_acl_change(tBTA_DM_MSG *p_data)
@@ -3232,7 +3232,7 @@ void bta_dm_acl_change(tBTA_DM_MSG *p_data)
bta_sys_notify_role_chg(p_data->acl_change.bd_addr, p_data->acl_change.new_role, p_data->acl_change.hci_status);
bdcpy(conn.role_chg.bd_addr, p_bda);
conn.role_chg.new_role = (UINT8) p_data->acl_change.new_role;
- if( bta_dm_cb.p_sec_cback )
+ if( bta_dm_cb.p_sec_cback )
bta_dm_cb.p_sec_cback(BTA_DM_ROLE_CHG_EVT, &conn);
}
return;
@@ -3251,7 +3251,7 @@ void bta_dm_acl_change(tBTA_DM_MSG *p_data)
for(i=0; i<bta_dm_cb.device_list.count; i++)
{
if(!bdcmp( bta_dm_cb.device_list.peer_device[i].peer_bdaddr, p_bda))
- break;
+ break;
}
@@ -3273,7 +3273,7 @@ void bta_dm_acl_change(tBTA_DM_MSG *p_data)
bta_dm_cb.device_list.peer_device[i].info = BTA_DM_DI_USE_SSR;
}
APPL_TRACE_WARNING1("info:x%x", bta_dm_cb.device_list.peer_device[i].info);
- if( bta_dm_cb.p_sec_cback )
+ if( bta_dm_cb.p_sec_cback )
bta_dm_cb.p_sec_cback(BTA_DM_LINK_UP_EVT, &conn);
}
@@ -3282,7 +3282,7 @@ void bta_dm_acl_change(tBTA_DM_MSG *p_data)
for(i=0; i<bta_dm_cb.device_list.count; i++)
{
if(bdcmp( bta_dm_cb.device_list.peer_device[i].peer_bdaddr, p_bda))
- continue;
+ continue;
if( bta_dm_cb.device_list.peer_device[i].conn_state == BTA_DM_UNPAIRING )
{
@@ -3325,13 +3325,13 @@ void bta_dm_acl_change(tBTA_DM_MSG *p_data)
bdcpy(conn.link_down.bd_addr, p_bda);
conn.link_down.status = (UINT8) btm_get_acl_disc_reason_code();
- if( bta_dm_cb.p_sec_cback )
+ if( bta_dm_cb.p_sec_cback )
{
bta_dm_cb.p_sec_cback(BTA_DM_LINK_DOWN_EVT, &conn);
if( issue_unpair_cb )
bta_dm_cb.p_sec_cback(BTA_DM_DEV_UNPAIRED_EVT, &conn);
}
- }
+ }
bta_dm_adjust_roles(TRUE);
}
@@ -3341,9 +3341,9 @@ void bta_dm_acl_change(tBTA_DM_MSG *p_data)
** Function bta_dm_disable_conn_down_timer_cback
**
** Description Sends disable event to application
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
static void bta_dm_disable_conn_down_timer_cback (TIMER_LIST_ENT *p_tle)
@@ -3357,12 +3357,12 @@ static void bta_dm_disable_conn_down_timer_cback (TIMER_LIST_ENT *p_tle)
if ((sys_enable_event = (tBTA_SYS_HW_MSG *) GKI_getbuf(sizeof(tBTA_SYS_HW_MSG))) != NULL)
{
sys_enable_event->hdr.event = BTA_SYS_API_DISABLE_EVT;
- sys_enable_event->hw_module = BTA_SYS_HW_BLUETOOTH;
+ sys_enable_event->hw_module = BTA_SYS_HW_BLUETOOTH;
bta_sys_sendmsg(sys_enable_event);
}
bta_dm_cb.disabling = FALSE;
-
+
}
/*******************************************************************************
@@ -3370,9 +3370,9 @@ static void bta_dm_disable_conn_down_timer_cback (TIMER_LIST_ENT *p_tle)
** Function bta_dm_rssi_cback
**
** Description Callback from btm with rssi values
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
static void bta_dm_rssi_cback (tBTM_RSSI_RESULTS *p_result)
@@ -3385,7 +3385,7 @@ static void bta_dm_rssi_cback (tBTM_RSSI_RESULTS *p_result)
bdcpy(sec_event.sig_strength.bd_addr, p_result->rem_bda);
sec_event.sig_strength.mask = BTA_SIG_STRENGTH_RSSI_MASK;
sec_event.sig_strength.rssi_value = p_result->rssi;
- if( bta_dm_cb.p_sec_cback!= NULL )
+ if( bta_dm_cb.p_sec_cback!= NULL )
bta_dm_cb.p_sec_cback(BTA_DM_SIG_STRENGTH_EVT, &sec_event);
}
@@ -3396,9 +3396,9 @@ static void bta_dm_rssi_cback (tBTM_RSSI_RESULTS *p_result)
** Function bta_dm_link_quality_cback
**
** Description Callback from btm with link quality value
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
static void bta_dm_link_quality_cback (tBTM_LINK_QUALITY_RESULTS *p_result)
@@ -3412,7 +3412,7 @@ static void bta_dm_link_quality_cback (tBTM_LINK_QUALITY_RESULTS *p_result)
bdcpy(sec_event.sig_strength.bd_addr, p_result->rem_bda);
sec_event.sig_strength.mask = BTA_SIG_STRENGTH_LINK_QUALITY_MASK;
sec_event.sig_strength.link_quality_value = p_result->link_quality;
- if( bta_dm_cb.p_sec_cback!= NULL )
+ if( bta_dm_cb.p_sec_cback!= NULL )
bta_dm_cb.p_sec_cback(BTA_DM_SIG_STRENGTH_EVT, &sec_event);
}
@@ -3423,9 +3423,9 @@ static void bta_dm_link_quality_cback (tBTM_LINK_QUALITY_RESULTS *p_result)
** Function bta_dm_rm_cback
**
** Description Role management callback from sys
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
static void bta_dm_rm_cback(tBTA_SYS_CONN_STATUS status, UINT8 id, UINT8 app_id, BD_ADDR peer_addr)
@@ -3461,7 +3461,7 @@ static void bta_dm_rm_cback(tBTA_SYS_CONN_STATUS status, UINT8 id, UINT8 app_id,
}
}
-
+
}
if((BTA_ID_AV == id)||(BTA_ID_AVK ==id))
@@ -3546,10 +3546,10 @@ static void bta_dm_delay_role_switch_cback(TIMER_LIST_ENT *p_tle)
**
** Function bta_dm_adjust_roles
**
-** Description Adjust roles
-**
+** Description Adjust roles
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
static void bta_dm_adjust_roles(BOOLEAN delay_role_switch)
@@ -3632,7 +3632,7 @@ static void bta_dm_adjust_roles(BOOLEAN delay_role_switch)
**
** Function bta_dm_get_remname
**
-** Description Returns a pointer to the remote name stored in the DM control
+** Description Returns a pointer to the remote name stored in the DM control
** block if it exists, or from the BTM memory.
**
** Returns char * - Pointer to the remote device name
@@ -3672,7 +3672,7 @@ static void bta_dm_bond_cancel_complete_cback(tBTM_STATUS result)
if(bta_dm_cb.p_sec_cback)
{
bta_dm_cb.p_sec_cback(BTA_DM_BOND_CANCEL_CMPL_EVT, &sec_event);
- }
+ }
}
#if ( BTM_EIR_SERVER_INCLUDED == TRUE )
@@ -3681,7 +3681,7 @@ static void bta_dm_bond_cancel_complete_cback(tBTM_STATUS result)
**
** Function bta_dm_update_eir_uuid
**
-** Description
+** Description
**
**
*******************************************************************************/
@@ -3749,7 +3749,7 @@ void bta_dm_update_eir_uuid (tBTA_DM_MSG *p_data)
**
** Function bta_dm_set_eir_config
**
-** Description
+** Description
**
**
*******************************************************************************/
@@ -3798,7 +3798,7 @@ static void bta_dm_set_eir (char *local_name)
UINT8 num_uuid;
UINT8 data_type;
UINT8 local_name_len;
-
+
/* wait until complete to disable */
if (bta_dm_cb.disable_timer.in_use)
return;
@@ -3829,7 +3829,7 @@ static void bta_dm_set_eir (char *local_name)
memset(p, 0x00, HCI_EXT_INQ_RESPONSE_LEN );
APPL_TRACE_DEBUG0("BTA is generating EIR");
-
+
if( local_name )
local_name_len = strlen( local_name );
else
@@ -3845,11 +3845,11 @@ static void bta_dm_set_eir (char *local_name)
num_uuid = p_bta_dm_eir_cfg->bta_dm_eir_uuid16_len/LEN_UUID_16;
#else
max_num_uuid = (free_eir_length - 2)/LEN_UUID_16;
- data_type = BTM_GetEirSupportedServices( bta_dm_cb.eir_uuid, &p,
+ data_type = BTM_GetEirSupportedServices( bta_dm_cb.eir_uuid, &p,
max_num_uuid, &num_uuid );
p = (UINT8 *)p_buf + BTM_HCI_EIR_OFFSET; /* reset p */
#endif
-
+
/* if UUID doesn't fit remaing space, shorten local name */
if ( local_name_len > (free_eir_length - 4 - num_uuid*LEN_UUID_16))
{
@@ -3860,7 +3860,7 @@ static void bta_dm_set_eir (char *local_name)
else
data_type = BTM_EIR_COMPLETE_LOCAL_NAME_TYPE;
}
-
+
UINT8_TO_STREAM(p, local_name_len + 1);
UINT8_TO_STREAM(p, data_type);
memcpy(p, local_name, local_name_len);
@@ -4013,7 +4013,7 @@ static void bta_dm_set_eir (char *local_name)
{
UINT8_TO_STREAM(p, p_bta_dm_eir_cfg->bta_dm_eir_flag_len + 1);
UINT8_TO_STREAM(p, BTM_EIR_FLAGS_TYPE);
- memcpy(p, p_bta_dm_eir_cfg->bta_dm_eir_flags,
+ memcpy(p, p_bta_dm_eir_cfg->bta_dm_eir_flags,
p_bta_dm_eir_cfg->bta_dm_eir_flag_len);
p += p_bta_dm_eir_cfg->bta_dm_eir_flag_len;
free_eir_length -= p_bta_dm_eir_cfg->bta_dm_eir_flag_len + 2;
@@ -4038,7 +4038,7 @@ static void bta_dm_set_eir (char *local_name)
UINT8_TO_STREAM(p, p_bta_dm_eir_cfg->bta_dm_eir_manufac_spec_len + 1);
UINT8_TO_STREAM(p, BTM_EIR_MANUFACTURER_SPECIFIC_TYPE);
- memcpy(p, p_bta_dm_eir_cfg->bta_dm_eir_manufac_spec,
+ memcpy(p, p_bta_dm_eir_cfg->bta_dm_eir_manufac_spec,
p_bta_dm_eir_cfg->bta_dm_eir_manufac_spec_len);
p += p_bta_dm_eir_cfg->bta_dm_eir_manufac_spec_len;
free_eir_length -= p_bta_dm_eir_cfg->bta_dm_eir_manufac_spec_len + 2;
@@ -4089,14 +4089,14 @@ static void bta_dm_eir_search_services( tBTM_INQ_RESULTS *p_result,
while(service_index < BTA_MAX_SERVICE_ID)
#endif
{
- if( *p_services_to_search
+ if( *p_services_to_search
& (tBTA_SERVICE_MASK)(BTA_SERVICE_ID_TO_SERVICE_MASK(service_index)))
{
- result = BTM_HasInquiryEirService( p_result,
+ result = BTM_HasInquiryEirService( p_result,
bta_service_id_to_uuid_lkup_tbl[service_index] );
/* Searching for HSP v1.2 only device */
- if ((result != BTM_EIR_FOUND) &&
+ if ((result != BTM_EIR_FOUND) &&
(bta_service_id_to_uuid_lkup_tbl[service_index] == UUID_SERVCLASS_HEADSET))
{
result = BTM_HasInquiryEirService (p_result, UUID_SERVCLASS_HEADSET_HS);
@@ -4138,7 +4138,7 @@ static void bta_dm_eir_search_services( tBTM_INQ_RESULTS *p_result,
**
** Function bta_dm_eir_update_uuid
**
-** Description This function adds or removes service UUID in EIR database.
+** Description This function adds or removes service UUID in EIR database.
**
** Returns None
**
@@ -4165,7 +4165,7 @@ void bta_dm_eir_update_uuid(UINT16 uuid16, BOOLEAN adding)
bta_dm_set_eir (NULL);
APPL_TRACE_EVENT2("bta_dm_eir_update_uuid UUID bit mask=0x%08X %08X",
- bta_dm_cb.eir_uuid[1], bta_dm_cb.eir_uuid[0] );
+ bta_dm_cb.eir_uuid[1], bta_dm_cb.eir_uuid[0] );
}
#endif
@@ -4173,10 +4173,10 @@ void bta_dm_eir_update_uuid(UINT16 uuid16, BOOLEAN adding)
**
** Function bta_dm_enable_test_mode
**
-** Description enable test mode
-**
+** Description enable test mode
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_dm_enable_test_mode(tBTA_DM_MSG *p_data)
@@ -4188,10 +4188,10 @@ void bta_dm_enable_test_mode(tBTA_DM_MSG *p_data)
**
** Function bta_dm_disable_test_mode
**
-** Description disable test mode
-**
+** Description disable test mode
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_dm_disable_test_mode(tBTA_DM_MSG *p_data)
@@ -4225,7 +4225,7 @@ void bta_dm_execute_callback(tBTA_DM_MSG *p_data)
**
** Description link encryption complete callback.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
void bta_dm_encrypt_cback(BD_ADDR bd_addr, void *p_ref_data, tBTM_STATUS result)
@@ -4294,10 +4294,10 @@ void bta_dm_set_encryption (tBTA_DM_MSG *p_data)
**
** Function bta_dm_set_afh_channels
**
-** Description set afh channels
-**
+** Description set afh channels
+**
**
-** Returns void
+** Returns void
**
*******************************************************************************/
void bta_dm_set_afh_channels(tBTA_DM_MSG * p_data)
@@ -4308,12 +4308,12 @@ void bta_dm_set_afh_channels(tBTA_DM_MSG * p_data)
/*******************************************************************************
**
-** Function bta_dm_set_afh_channel_assesment
+** Function bta_dm_set_afh_channel_assesment
**
** Description set afh channel assesment
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
@@ -4329,9 +4329,9 @@ void bta_dm_set_afh_channel_assesment (tBTA_DM_MSG * p_data)
** Function bta_dm_ble_smp_cback
**
** Description Callback for BLE SMP
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
static UINT8 bta_dm_ble_smp_cback (tBTM_LE_EVT event, BD_ADDR bda, tBTM_LE_EVT_DATA *p_data)
@@ -4351,9 +4351,9 @@ static UINT8 bta_dm_ble_smp_cback (tBTM_LE_EVT event, BD_ADDR bda, tBTM_LE_EVT_D
bta_dm_co_ble_io_req(bda,
&p_data->io_req.io_cap,
&p_data->io_req.oob_data,
- &p_data->io_req.auth_req,
- &p_data->io_req.max_key_size,
- &p_data->io_req.init_keys,
+ &p_data->io_req.auth_req,
+ &p_data->io_req.max_key_size,
+ &p_data->io_req.init_keys,
&p_data->io_req.resp_keys);
#endif
#if BTM_OOB_INCLUDED == FALSE
@@ -4421,9 +4421,9 @@ static UINT8 bta_dm_ble_smp_cback (tBTM_LE_EVT event, BD_ADDR bda, tBTM_LE_EVT_D
** Function bta_dm_ble_id_key_cback
**
** Description Callback for BLE local ID keys
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
static void bta_dm_ble_id_key_cback (UINT8 key_type, tBTM_BLE_LOCAL_KEYS *p_key)
@@ -4457,18 +4457,18 @@ static void bta_dm_ble_id_key_cback (UINT8 key_type, tBTM_BLE_LOCAL_KEYS *p_key)
**
** Function bta_dm_add_blekey
**
-** Description This function adds an BLE Key to an security database entry.
+** Description This function adds an BLE Key to an security database entry.
** This function shall only be called AFTER BTA_DmAddBleDevice has been called.
** It is normally called during host startup to restore all required information
** stored in the NVRAM.
**
-** Parameters:
+** Parameters:
**
*******************************************************************************/
void bta_dm_add_blekey (tBTA_DM_MSG *p_data)
{
- if (!BTM_SecAddBleKey (p_data->add_ble_key.bd_addr,
- (tBTM_LE_KEY_VALUE *)&p_data->add_ble_key.blekey,
+ if (!BTM_SecAddBleKey (p_data->add_ble_key.bd_addr,
+ (tBTM_LE_KEY_VALUE *)&p_data->add_ble_key.blekey,
p_data->add_ble_key.key_type))
{
APPL_TRACE_ERROR2 ("BTA_DM: Error adding BLE Key for device %08x%04x",
@@ -4482,22 +4482,22 @@ void bta_dm_add_blekey (tBTA_DM_MSG *p_data)
**
** Function bta_dm_add_ble_device
**
-** Description This function adds an BLE device to an security database entry.
+** Description This function adds an BLE device to an security database entry.
** It is normally called during host startup to restore all required information
** stored in the NVRAM.
**
-** Parameters:
+** Parameters:
**
*******************************************************************************/
void bta_dm_add_ble_device (tBTA_DM_MSG *p_data)
{
- if (!BTM_SecAddBleDevice (p_data->add_ble_device.bd_addr, NULL,
- p_data->add_ble_device.dev_type ,
+ if (!BTM_SecAddBleDevice (p_data->add_ble_device.bd_addr, NULL,
+ p_data->add_ble_device.dev_type ,
p_data->add_ble_device.addr_type))
{
APPL_TRACE_ERROR2 ("BTA_DM: Error adding BLE Device for device %08x%04x",
(p_data->add_ble_device.bd_addr[0]<<24)+(p_data->add_ble_device.bd_addr[1]<<16)+ \
- (p_data->add_ble_device.bd_addr[2]<<8)+p_data->add_ble_device.bd_addr[3],
+ (p_data->add_ble_device.bd_addr[2]<<8)+p_data->add_ble_device.bd_addr[3],
(p_data->add_ble_device.bd_addr[4]<<8)+p_data->add_ble_device.bd_addr[5]);
}
}
@@ -4506,11 +4506,11 @@ void bta_dm_add_ble_device (tBTA_DM_MSG *p_data)
**
** Function bta_dm_add_ble_device
**
-** Description This function adds an BLE device to an security database entry.
+** Description This function adds an BLE device to an security database entry.
** It is normally called during host startup to restore all required information
** stored in the NVRAM.
**
-** Parameters:
+** Parameters:
**
*******************************************************************************/
void bta_dm_ble_passkey_reply (tBTA_DM_MSG *p_data)
@@ -4523,7 +4523,7 @@ void bta_dm_ble_passkey_reply (tBTA_DM_MSG *p_data)
else
{
BTM_BlePasskeyReply(p_data->ble_passkey_reply.bd_addr, BTM_NOT_AUTHORIZED, p_data->ble_passkey_reply.passkey);
- }
+ }
}
@@ -4533,7 +4533,7 @@ void bta_dm_ble_passkey_reply (tBTA_DM_MSG *p_data)
**
** Description This function grant SMP security request access.
**
-** Parameters:
+** Parameters:
**
*******************************************************************************/
void bta_dm_security_grant (tBTA_DM_MSG *p_data)
@@ -4547,12 +4547,12 @@ void bta_dm_security_grant (tBTA_DM_MSG *p_data)
**
** Description This function set the BLE background connection type
**
-** Parameters:
+** Parameters:
**
*******************************************************************************/
void bta_dm_ble_set_bg_conn_type (tBTA_DM_MSG *p_data)
{
- BTM_BleSetBgConnType(p_data->ble_set_bd_conn_type.bg_conn_type,
+ BTM_BleSetBgConnType(p_data->ble_set_bd_conn_type.bg_conn_type,
p_data->ble_set_bd_conn_type.p_select_cback);
}
@@ -4562,7 +4562,7 @@ void bta_dm_ble_set_bg_conn_type (tBTA_DM_MSG *p_data)
**
** Description This function set the preferred connection parameters.
**
-** Parameters:
+** Parameters:
**
*******************************************************************************/
void bta_dm_ble_set_conn_params (tBTA_DM_MSG *p_data)
@@ -4580,14 +4580,14 @@ void bta_dm_ble_set_conn_params (tBTA_DM_MSG *p_data)
**
** Description This function set the preferred connection scan parameters.
**
-** Parameters:
+** Parameters:
**
*******************************************************************************/
void bta_dm_ble_set_scan_params (tBTA_DM_MSG *p_data)
{
BTM_BleSetConnScanParams(p_data->ble_set_scan_params.scan_int,
p_data->ble_set_scan_params.scan_window);
-}
+}
#if ((defined BTA_GATT_INCLUDED) && (BTA_GATT_INCLUDED == TRUE))
@@ -4597,15 +4597,15 @@ void bta_dm_ble_set_scan_params (tBTA_DM_MSG *p_data)
**
** Description This function starts a GATT service search request.
**
-** Parameters:
+** Parameters:
**
*******************************************************************************/
static void btm_dm_start_disc_gatt_services (UINT16 conn_id)
{
- tBT_UUID *p_uuid = bta_dm_search_cb.p_srvc_uuid +
- bta_dm_search_cb.num_uuid - bta_dm_search_cb.uuid_to_search;
+ tBT_UUID *p_uuid = bta_dm_search_cb.p_srvc_uuid +
+ bta_dm_search_cb.num_uuid - bta_dm_search_cb.uuid_to_search;
- p_uuid = bta_dm_search_cb.p_srvc_uuid +
+ p_uuid = bta_dm_search_cb.p_srvc_uuid +
bta_dm_search_cb.num_uuid - bta_dm_search_cb.uuid_to_search;
/* always search for all services */
@@ -4618,20 +4618,20 @@ static void btm_dm_start_disc_gatt_services (UINT16 conn_id)
**
** Description This function process the GATT service search result.
**
-** Parameters:
+** Parameters:
**
*******************************************************************************/
static void bta_dm_gatt_disc_result(tBTA_GATT_ID service_id)
{
tBTA_DM_SEARCH result;
-
+
/*
* This logic will not work for gatt case. We are checking against the bluetooth profiles here
* just copy the GATTID in raw data field and send it across.
*/
- if ( bta_dm_search_cb.ble_raw_used + sizeof(tBTA_GATT_ID) < bta_dm_search_cb.ble_raw_size )
+ if ( bta_dm_search_cb.ble_raw_used + sizeof(tBTA_GATT_ID) < bta_dm_search_cb.ble_raw_size )
{
APPL_TRACE_DEBUG3("ADDING BLE SERVICE uuid=0x%x, ble_ptr = 0x%x, ble_raw_used = 0x%x", service_id.uuid.uu.uuid16,bta_dm_search_cb.p_ble_rawdata,bta_dm_search_cb.ble_raw_used);
@@ -4640,12 +4640,12 @@ static void bta_dm_gatt_disc_result(tBTA_GATT_ID service_id)
bta_dm_search_cb.ble_raw_used += sizeof(service_id);
- }
+ }
else
{
APPL_TRACE_ERROR3("%s out of room to accomodate more service ids ble_raw_size = %d ble_raw_used = %d", __FUNCTION__,bta_dm_search_cb.ble_raw_size, bta_dm_search_cb.ble_raw_used );
}
-
+
APPL_TRACE_ERROR1("bta_dm_gatt_disc_result serivce_id len=%d ", service_id.uuid.len);
if ( bta_dm_search_cb.state != BTA_DM_SEARCH_IDLE)
{
@@ -4665,7 +4665,7 @@ static void bta_dm_gatt_disc_result(tBTA_GATT_ID service_id)
**
** Description This function process the GATT service search complete.
**
-** Parameters:
+** Parameters:
**
*******************************************************************************/
static void bta_dm_gatt_disc_complete(UINT16 conn_id, tBTA_GATT_STATUS status)
@@ -4701,11 +4701,11 @@ static void bta_dm_gatt_disc_complete(UINT16 conn_id, tBTA_GATT_STATUS status)
if ( bta_dm_search_cb.ble_raw_used > 0 )
{
p_msg->disc_result.result.disc_res.p_raw_data = GKI_getbuf(bta_dm_search_cb.ble_raw_used);
-
- memcpy( p_msg->disc_result.result.disc_res.p_raw_data,
+
+ memcpy( p_msg->disc_result.result.disc_res.p_raw_data,
bta_dm_search_cb.p_ble_rawdata,
bta_dm_search_cb.ble_raw_used );
-
+
p_msg->disc_result.result.disc_res.raw_data_size = bta_dm_search_cb.ble_raw_used;
}
else
@@ -4732,7 +4732,7 @@ static void bta_dm_gatt_disc_complete(UINT16 conn_id, tBTA_GATT_STATUS status)
** Description This is GATT initiate the service search by open a GATT connection
** first.
**
-** Parameters:
+** Parameters:
**
*******************************************************************************/
void btm_dm_start_gatt_discovery (BD_ADDR bd_addr)
@@ -4747,7 +4747,7 @@ void btm_dm_start_gatt_discovery (BD_ADDR bd_addr)
**
** Description This is GATT cancel the GATT service search.
**
-** Parameters:
+** Parameters:
**
*******************************************************************************/
static void bta_dm_cancel_gatt_discovery(BD_ADDR bd_addr)
@@ -4766,25 +4766,25 @@ static void bta_dm_cancel_gatt_discovery(BD_ADDR bd_addr)
**
** Description process BTA_GATTC_OPEN_EVT in DM.
**
-** Parameters:
+** Parameters:
**
*******************************************************************************/
void bta_dm_proc_open_evt(tBTA_GATTC_OPEN *p_data)
{
UINT8 *p1;
- UINT8 *p2;
+ UINT8 *p2;
p1 = bta_dm_search_cb.peer_bdaddr;
p2 = p_data->remote_bda;
- APPL_TRACE_DEBUG5("DM Search state= %d search_cb.peer_dbaddr: [%08x%04x] connected_bda= [%08x%04x] ",
+ APPL_TRACE_DEBUG5("DM Search state= %d search_cb.peer_dbaddr: [%08x%04x] connected_bda= [%08x%04x] ",
bta_dm_search_cb.state,
((p1[0])<<24)+((p1[1])<<16)+((p1[2])<<8)+(p1[3]),
((p1[4])<<8)+ p1[5],
((p2[0])<<24)+((p2[1])<<16)+((p2[2])<<8)+(p2[3]),
((p2[4])<<8)+ p2[5]);
- APPL_TRACE_DEBUG3("BTA_GATTC_OPEN_EVT conn_id = %d client_if=%d status = %d" ,
+ APPL_TRACE_DEBUG3("BTA_GATTC_OPEN_EVT conn_id = %d client_if=%d status = %d" ,
p_data->conn_id,
p_data->client_if,
p_data->status);
@@ -4807,7 +4807,7 @@ void bta_dm_proc_open_evt(tBTA_GATTC_OPEN *p_data)
**
** Description This is GATT client callback function used in DM.
**
-** Parameters:
+** Parameters:
**
*******************************************************************************/
static void bta_dm_gattc_callback(tBTA_GATTC_EVT event, tBTA_GATTC *p_data)
diff --git a/bta/dm/bta_dm_api.c b/bta/dm/bta_dm_api.c
index cbf80ae..cbf80ae 100755..100644
--- a/bta/dm/bta_dm_api.c
+++ b/bta/dm/bta_dm_api.c
diff --git a/bta/dm/bta_dm_cfg.c b/bta/dm/bta_dm_cfg.c
index f0f7ac9..9e2bf31 100644
--- a/bta/dm/bta_dm_cfg.c
+++ b/bta/dm/bta_dm_cfg.c
@@ -17,13 +17,13 @@
#ifndef BTA_DM_COD
-/*
+/*
* major : COD_MAJOR_PHONE
* minor : COD_MINOR_SMART_PHONE
* svc : None, will be set as each profile registers
*
*/
-
+
#define BTA_DM_COD {0x52, BTM_COD_MAJOR_PHONE, BTM_COD_MINOR_SMART_PHONE}
#endif
@@ -61,7 +61,7 @@ const tBTA_DM_CFG bta_dm_cfg =
/* link supervision timeout in 625uS*/
BTA_DM_LINK_TIMEOUT,
/* TRUE to avoid scatternet when av is streaming (be the master) */
- TRUE
+ TRUE
};
#ifndef BTA_DM_SCATTERNET
@@ -81,13 +81,13 @@ const tBTA_DM_CFG bta_dm_cfg =
#define BTA_DM_NUM_RM_ENTRY 4
-/* appids for PAN used by insight sample application
+/* appids for PAN used by insight sample application
these have to be same as defined in btui_int.h */
#define BTUI_PAN_ID_PANU 0
#define BTUI_PAN_ID_NAP 1
#define BTUI_PAN_ID_GN 2
-/* First element is always for SYS:
+/* First element is always for SYS:
app_id = # of entries table, cfg is
device scatternet support */
const tBTA_DM_RM bta_dm_rm_cfg[] =
@@ -175,7 +175,7 @@ tBTA_DM_PM_TYPE_QUALIFIER tBTA_DM_PM_SPEC bta_dm_pm_spec[BTA_DM_NUM_PM_SPEC] =
{{BTA_DM_PM_RETRY, 5000}, {BTA_DM_PM_NO_ACTION, 0}} /* mode change retry */
}
},
-
+
/* DG */
{
(BTA_DM_PM_ACTIVE), /* no power saving mode allowed */
@@ -374,16 +374,16 @@ tBTM_PM_PWR_MD *p_bta_dm_pm_md = (tBTM_PM_PWR_MD *)&bta_dm_pm_md;
**
** When BTM_EIR_DEFAULT_FEC_REQUIRED is TRUE,
** 1 to 17 bytes, DM1 is used and most robust.
-** 18 to 121 bytes, DM3 is used but impacts inquiry scan time with large number
+** 18 to 121 bytes, DM3 is used but impacts inquiry scan time with large number
** of devices.(almost double with 150 users)
-** 122 to 224 bytes, DM5 is used but cause quite big performance loss even with
+** 122 to 224 bytes, DM5 is used but cause quite big performance loss even with
** small number of users. so it is not recommended.
** 225 to 240 bytes, DH5 is used without FEC but it not recommended.
** (same reason of DM5)
**
** When BTM_EIR_DEFAULT_FEC_REQUIRED is FALSE,
** 1 to 27 bytes, DH1 is used but only robust at short range.
-** 28 to 183 bytes, DH3 is used but only robust at short range and impacts inquiry
+** 28 to 183 bytes, DH3 is used but only robust at short range and impacts inquiry
** scan time with large number of devices.
** 184 to 240 bytes, DH5 is used but it not recommended.
*/
@@ -399,7 +399,7 @@ const UINT8 bta_dm_eir_uuid16_list[] = { 0x08, 0x11, /* Headset */
#endif
/* Extended Inquiry Response */
-const tBTA_DM_EIR_CONF bta_dm_eir_cfg =
+const tBTA_DM_EIR_CONF bta_dm_eir_cfg =
{
50, /* minimum length of local name when it is shortened */
/* if length of local name is longer than this and EIR has not enough */
diff --git a/bta/dm/bta_dm_ci.c b/bta/dm/bta_dm_ci.c
index b003cbe..c9e979a 100644
--- a/bta/dm/bta_dm_ci.c
+++ b/bta/dm/bta_dm_ci.c
@@ -28,15 +28,15 @@
** bta_dm_co_io_req(), if *p_oob_data to BTA_OOB_UNKNOWN
** by bta_dm_co_io_req().
**
-** Returns void
+** Returns void
**
*******************************************************************************/
void bta_dm_ci_io_req(BD_ADDR bd_addr, tBTA_IO_CAP io_cap, tBTA_OOB_DATA oob_data,
tBTA_AUTH_REQ auth_req)
{
- tBTA_DM_CI_IO_REQ *p_msg;
-
+ tBTA_DM_CI_IO_REQ *p_msg;
+
if ((p_msg = (tBTA_DM_CI_IO_REQ *) GKI_getbuf(sizeof(tBTA_DM_CI_IO_REQ))) != NULL)
{
p_msg->hdr.event = BTA_DM_CI_IO_REQ_EVT;
@@ -56,13 +56,13 @@ void bta_dm_ci_io_req(BD_ADDR bd_addr, tBTA_IO_CAP io_cap, tBTA_OOB_DATA oob_dat
** bta_dm_co_rmt_oob() to provide the OOB data associated
** with the remote device.
**
-** Returns void
+** Returns void
**
*******************************************************************************/
void bta_dm_ci_rmt_oob(BOOLEAN accept, BD_ADDR bd_addr, BT_OCTET16 c, BT_OCTET16 r)
{
- tBTA_DM_CI_RMT_OOB *p_msg;
-
+ tBTA_DM_CI_RMT_OOB *p_msg;
+
if ((p_msg = (tBTA_DM_CI_RMT_OOB *) GKI_getbuf(sizeof(tBTA_DM_CI_RMT_OOB))) != NULL)
{
p_msg->hdr.event = BTA_DM_CI_RMT_OOB_EVT;
@@ -80,15 +80,15 @@ void bta_dm_ci_rmt_oob(BOOLEAN accept, BD_ADDR bd_addr, BT_OCTET16 c, BT_OCTET16
**
** Function bta_dm_sco_ci_data_ready
**
-** Description This function sends an event to indicating that the phone
-** has SCO data ready.
+** Description This function sends an event to indicating that the phone
+** has SCO data ready.
**
** Parameters event: is obtained from bta_dm_sco_co_open() function, which
** is the BTA event we want to send back to BTA module
** when there is encoded data ready.
-** sco_handle: is the BTA sco handle which indicate a specific
+** sco_handle: is the BTA sco handle which indicate a specific
** SCO connection.
-** Returns void
+** Returns void
**
*******************************************************************************/
void bta_dm_sco_ci_data_ready(UINT16 event, UINT16 sco_handle)
diff --git a/bta/dm/bta_dm_int.h b/bta/dm/bta_dm_int.h
index 0d8dc6a..e470008 100755..100644
--- a/bta/dm/bta_dm_int.h
+++ b/bta/dm/bta_dm_int.h
@@ -120,21 +120,21 @@ enum
/* data type for BTA_DM_API_ENABLE_EVT */
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
tBTA_DM_SEC_CBACK *p_sec_cback;
} tBTA_DM_API_ENABLE;
/* data type for BTA_DM_API_SET_NAME_EVT */
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
char name[BD_NAME_LEN];
} tBTA_DM_API_SET_NAME;
/* data type for BTA_DM_API_SET_VISIBILITY_EVT */
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
tBTA_DM_DISC disc_mode;
tBTA_DM_CONN conn_mode;
UINT8 pair_mode;
@@ -147,12 +147,12 @@ typedef struct
BT_HDR hdr;
UINT8 first;
UINT8 last;
-} tBTA_DM_API_SET_AFH_CHANNELS_EVT;
+} tBTA_DM_API_SET_AFH_CHANNELS_EVT;
/* data type for BTA_DM_API_VENDOR_SPECIFIC_COMMAND_EVT */
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
UINT16 opcode;
UINT8 param_len;
UINT8 *p_param_buf;
@@ -171,7 +171,7 @@ typedef UINT8 tBTA_DM_RS_RES;
/* data type for BTA_DM_API_SEARCH_EVT */
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
tBTA_DM_INQ inq_params;
tBTA_SERVICE_MASK services;
tBTA_DM_SEARCH_CBACK * p_cback;
@@ -185,7 +185,7 @@ typedef struct
/* data type for BTA_DM_API_DISCOVER_EVT */
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
BD_ADDR bd_addr;
tBTA_SERVICE_MASK services;
tBTA_DM_SEARCH_CBACK * p_cback;
@@ -200,7 +200,7 @@ typedef struct
/* data type for BTA_DM_API_DI_DISC_EVT */
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
BD_ADDR bd_addr;
tBTA_DISCOVERY_DB *p_sdp_db;
UINT32 len;
@@ -210,7 +210,7 @@ typedef struct
/* data type for BTA_DM_API_BOND_EVT */
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
BD_ADDR bd_addr;
} tBTA_DM_API_BOND;
@@ -224,7 +224,7 @@ typedef struct
/* data type for BTA_DM_API_PIN_REPLY_EVT */
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
BD_ADDR bd_addr;
BOOLEAN accept;
UINT8 pin_len;
@@ -234,7 +234,7 @@ typedef struct
/* data type for BTA_DM_API_LINK_POLICY_EVT */
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
BD_ADDR bd_addr;
UINT16 policy_mask;
BOOLEAN set;
@@ -243,7 +243,7 @@ typedef struct
/* data type for BTA_DM_API_AUTH_REPLY_EVT */
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
BD_ADDR bd_addr;
tBTA_SERVICE_ID service;
tBTA_AUTH_RESP response;
@@ -252,13 +252,13 @@ typedef struct
/* data type for BTA_DM_API_LOC_OOB_EVT */
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
} tBTA_DM_API_LOC_OOB;
/* data type for BTA_DM_API_CONFIRM_EVT */
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
BD_ADDR bd_addr;
BOOLEAN accept;
} tBTA_DM_API_CONFIRM;
@@ -266,14 +266,14 @@ typedef struct
/* data type for BTA_DM_API_PASKY_CANCEL_EVT*/
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
BD_ADDR bd_addr;
} tBTA_DM_API_PASKY_CANCEL;
/* data type for BTA_DM_CI_IO_REQ_EVT */
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
BD_ADDR bd_addr;
tBTA_IO_CAP io_cap;
tBTA_OOB_DATA oob_data;
@@ -283,7 +283,7 @@ typedef struct
/* data type for BTA_DM_CI_RMT_OOB_EVT */
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
BD_ADDR bd_addr;
BT_OCTET16 c;
BT_OCTET16 r;
@@ -293,14 +293,14 @@ typedef struct
/* data type for BTA_DM_REMT_NAME_EVT */
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
tBTA_DM_SEARCH result;
} tBTA_DM_REM_NAME;
/* data type for tBTA_DM_DISC_RESULT */
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
tBTA_DM_SEARCH result;
} tBTA_DM_DISC_RESULT;
@@ -308,22 +308,22 @@ typedef struct
/* data type for BTA_DM_INQUIRY_CMPL_EVT */
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
UINT8 num;
} tBTA_DM_INQUIRY_CMPL;
/* data type for BTA_DM_SDP_RESULT_EVT */
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
UINT16 sdp_result;
} tBTA_DM_SDP_RESULT;
/* data type for BTA_API_DM_SIG_STRENGTH_EVT */
typedef struct
{
- BT_HDR hdr;
- tBTA_SIG_STRENGTH_MASK mask;
+ BT_HDR hdr;
+ tBTA_SIG_STRENGTH_MASK mask;
UINT16 period;
BOOLEAN start;
} tBTA_API_DM_SIG_STRENGTH;
@@ -331,14 +331,14 @@ typedef struct
/* data type for tBTA_API_DM_TX_INQPWR */
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
INT8 tx_power;
}tBTA_API_DM_TX_INQPWR;
/* data type for BTA_DM_ACL_CHANGE_EVT */
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
tBTM_BL_EVENT event;
UINT8 busy_level;
BOOLEAN is_new;
@@ -395,15 +395,15 @@ typedef struct
/* data type for BTA_DM_API_EXECUTE_CBACK_EVT */
typedef struct
{
- BT_HDR hdr;
- void * p_param;
+ BT_HDR hdr;
+ void * p_param;
tBTA_DM_EXEC_CBACK *p_exec_cback;
} tBTA_DM_API_EXECUTE_CBACK;
/* data type for tBTA_DM_API_SET_ENCRYPTION */
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
tBTA_DM_ENCRYPT_CBACK *p_callback;
tBTA_DM_BLE_SEC_ACT sec_act;
BD_ADDR bd_addr;
@@ -415,7 +415,7 @@ typedef struct
BT_HDR hdr;
BD_ADDR bd_addr;
tBTA_LE_KEY_VALUE blekey;
- tBTA_LE_KEY_TYPE key_type;
+ tBTA_LE_KEY_TYPE key_type;
}tBTA_DM_API_ADD_BLEKEY;
@@ -423,8 +423,8 @@ typedef struct
{
BT_HDR hdr;
BD_ADDR bd_addr;
- tBT_DEVICE_TYPE dev_type ;
- tBLE_ADDR_TYPE addr_type;
+ tBT_DEVICE_TYPE dev_type ;
+ tBLE_ADDR_TYPE addr_type;
}tBTA_DM_API_ADD_BLE_DEVICE;
@@ -502,9 +502,9 @@ typedef struct
typedef union
{
/* GKI event buffer header */
- BT_HDR hdr;
+ BT_HDR hdr;
tBTA_DM_API_ENABLE enable;
-
+
tBTA_DM_API_SET_NAME set_name;
tBTA_DM_API_SET_VISIBILITY set_visibility;
@@ -646,9 +646,9 @@ typedef struct
} tBTA_DM_CONNECTED_SRVCS;
-typedef struct
+typedef struct
{
- TIMER_LIST_ENT timer;
+ TIMER_LIST_ENT timer;
BD_ADDR peer_bdaddr;
BOOLEAN in_use;
@@ -890,19 +890,19 @@ extern void bta_dm_search_sm_disable( void );
extern void bta_dm_enable (tBTA_DM_MSG *p_data);
-extern void bta_dm_disable (tBTA_DM_MSG *p_data);
+extern void bta_dm_disable (tBTA_DM_MSG *p_data);
extern void bta_dm_set_dev_name (tBTA_DM_MSG *p_data);
extern void bta_dm_set_visibility (tBTA_DM_MSG *p_data);
extern void bta_dm_set_afhchannels (tBTA_DM_MSG *p_data);
extern void bta_dm_vendor_spec_command(tBTA_DM_MSG *p_data);
-extern void bta_dm_bond (tBTA_DM_MSG *p_data);
+extern void bta_dm_bond (tBTA_DM_MSG *p_data);
extern void bta_dm_bond_cancel (tBTA_DM_MSG *p_data);
-extern void bta_dm_pin_reply (tBTA_DM_MSG *p_data);
+extern void bta_dm_pin_reply (tBTA_DM_MSG *p_data);
extern void bta_dm_link_policy (tBTA_DM_MSG *p_data);
-extern void bta_dm_auth_reply (tBTA_DM_MSG *p_data);
+extern void bta_dm_auth_reply (tBTA_DM_MSG *p_data);
extern void bta_dm_signal_strength(tBTA_DM_MSG *p_data);
extern void bta_dm_tx_inqpower(tBTA_DM_MSG *p_data);
-extern void bta_dm_acl_change(tBTA_DM_MSG *p_data);
+extern void bta_dm_acl_change(tBTA_DM_MSG *p_data);
extern void bta_dm_add_device (tBTA_DM_MSG *p_data);
extern void bta_dm_remove_device (tBTA_DM_MSG *p_data);
@@ -932,10 +932,10 @@ extern void bta_dm_ci_rmt_oob_act(tBTA_DM_MSG *p_data);
extern void bta_dm_init_pm(void);
extern void bta_dm_disable_pm(void);
-extern void bta_dm_search_start (tBTA_DM_MSG *p_data);
+extern void bta_dm_search_start (tBTA_DM_MSG *p_data);
extern void bta_dm_search_cancel (tBTA_DM_MSG *p_data);
-extern void bta_dm_discover (tBTA_DM_MSG *p_data);
-extern void bta_dm_di_disc (tBTA_DM_MSG *p_data);
+extern void bta_dm_discover (tBTA_DM_MSG *p_data);
+extern void bta_dm_di_disc (tBTA_DM_MSG *p_data);
extern void bta_dm_inq_cmpl (tBTA_DM_MSG *p_data);
extern void bta_dm_rmt_name (tBTA_DM_MSG *p_data);
extern void bta_dm_sdp_result (tBTA_DM_MSG *p_data);
diff --git a/bta/dm/bta_dm_main.c b/bta/dm/bta_dm_main.c
index 38bf0af..c2b8608 100644
--- a/bta/dm/bta_dm_main.c
+++ b/bta/dm/bta_dm_main.c
@@ -37,7 +37,7 @@ const tBTA_DM_ACTION bta_dm_action[] =
/* device manager local device API events */
bta_dm_enable, /* 0 BTA_DM_API_ENABLE_EVT */
- bta_dm_disable, /* 1 BTA_DM_API_DISABLE_EVT */
+ bta_dm_disable, /* 1 BTA_DM_API_DISABLE_EVT */
bta_dm_set_dev_name, /* 2 BTA_DM_API_SET_NAME_EVT */
bta_dm_set_visibility, /* 3 BTA_DM_API_SET_VISIBILITY_EVT */
bta_dm_set_afhchannels, /* 4 BTA_DM_API_SET_AFH_CHANNELS_EVT */
@@ -103,7 +103,7 @@ const tBTA_DM_ACTION bta_dm_action[] =
enum
{
BTA_DM_API_SEARCH, /* 0 bta_dm_search_start */
- BTA_DM_API_SEARCH_CANCEL, /* 1 bta_dm_search_cancel */
+ BTA_DM_API_SEARCH_CANCEL, /* 1 bta_dm_search_cancel */
BTA_DM_API_DISCOVER, /* 2 bta_dm_discover */
BTA_DM_INQUIRY_CMPL, /* 3 bta_dm_inq_cmpl */
BTA_DM_REMT_NAME, /* 4 bta_dm_rmt_name */
@@ -129,7 +129,7 @@ const tBTA_DM_ACTION bta_dm_search_action[] =
{
bta_dm_search_start, /* 0 BTA_DM_API_SEARCH */
- bta_dm_search_cancel, /* 1 BTA_DM_API_SEARCH_CANCEL */
+ bta_dm_search_cancel, /* 1 BTA_DM_API_SEARCH_CANCEL */
bta_dm_discover, /* 2 BTA_DM_API_DISCOVER */
bta_dm_inq_cmpl, /* 3 BTA_DM_INQUIRY_CMPL */
bta_dm_rmt_name, /* 4 BTA_DM_REMT_NAME */
@@ -238,7 +238,7 @@ const tBTA_DM_ST_TBL bta_dm_search_st_tbl[] = {
** Function bta_dm_sm_disable
**
** Description unregister BTA DM
-**
+**
**
** Returns void
**
@@ -254,7 +254,7 @@ void bta_dm_sm_disable( )
** Function bta_dm_sm_execute
**
** Description State machine event handling function for DM
-**
+**
**
** Returns void
**
@@ -270,7 +270,7 @@ BOOLEAN bta_dm_sm_execute(BT_HDR *p_msg)
{
(*bta_dm_action[event])( (tBTA_DM_MSG*) p_msg);
}
-
+
return TRUE;
}
@@ -279,7 +279,7 @@ BOOLEAN bta_dm_sm_execute(BT_HDR *p_msg)
** Function bta_dm_sm_search_disable
**
** Description unregister BTA SEARCH DM
-**
+**
**
** Returns void
**
@@ -287,7 +287,7 @@ BOOLEAN bta_dm_sm_execute(BT_HDR *p_msg)
void bta_dm_search_sm_disable( )
{
bta_sys_deregister( BTA_ID_DM_SEARCH );
-
+
}
@@ -296,7 +296,7 @@ void bta_dm_search_sm_disable( )
** Function bta_dm_search_sm_execute
**
** Description State machine event handling function for DM
-**
+**
**
** Returns void
**
@@ -307,7 +307,7 @@ BOOLEAN bta_dm_search_sm_execute(BT_HDR *p_msg)
UINT8 action;
int i;
- APPL_TRACE_EVENT2("bta_dm_search_sm_execute state:%d, event:0x%x",
+ APPL_TRACE_EVENT2("bta_dm_search_sm_execute state:%d, event:0x%x",
bta_dm_search_cb.state, p_msg->event);
/* look up the state table for the current state */
diff --git a/bta/dm/bta_dm_pm.c b/bta/dm/bta_dm_pm.c
index 1b75b11..afd4735 100755..100644
--- a/bta/dm/bta_dm_pm.c
+++ b/bta/dm/bta_dm_pm.c
@@ -41,10 +41,10 @@ tBTA_DM_CONNECTED_SRVCS bta_dm_conn_srvcs;
**
** Function bta_dm_init_pm
**
-** Description Initialises the BT low power manager
-**
+** Description Initialises the BT low power manager
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_dm_init_pm(void)
@@ -73,9 +73,9 @@ void bta_dm_init_pm(void)
** Function bta_dm_disable_pm
**
** Description Disable PM
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_dm_disable_pm(void)
@@ -94,17 +94,17 @@ void bta_dm_disable_pm(void)
bta_sys_stop_timer(&bta_dm_cb.pm_timer[i].timer);
bta_dm_cb.pm_timer[i].in_use = FALSE;
}
- }
-}
+ }
+}
/*******************************************************************************
**
** Function bta_dm_pm_stop_timer
**
** Description stop a PM timer
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
static void bta_dm_pm_stop_timer(BD_ADDR peer_addr)
@@ -117,7 +117,7 @@ static void bta_dm_pm_stop_timer(BD_ADDR peer_addr)
if(bta_dm_cb.pm_timer[i].in_use && !bdcmp(bta_dm_cb.pm_timer[i].peer_bdaddr, peer_addr))
{
APPL_TRACE_WARNING1("stop dm_pm_timer:%d", i);
- bta_sys_stop_timer(&bta_dm_cb.pm_timer[i].timer);
+ bta_sys_stop_timer(&bta_dm_cb.pm_timer[i].timer);
bta_dm_cb.pm_timer[i].in_use = FALSE;
break;
}
@@ -130,9 +130,9 @@ static void bta_dm_pm_stop_timer(BD_ADDR peer_addr)
** Function bta_dm_pm_cback
**
** Description Conn change callback from sys for low power management
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
static void bta_dm_pm_cback(tBTA_SYS_CONN_STATUS status, UINT8 id, UINT8 app_id, BD_ADDR peer_addr)
@@ -165,7 +165,7 @@ static void bta_dm_pm_cback(tBTA_SYS_CONN_STATUS status, UINT8 id, UINT8 app_id,
for(i=1; i<=p_bta_dm_pm_cfg[0].app_id; i++)
{
- if((p_bta_dm_pm_cfg[i].id == id)
+ if((p_bta_dm_pm_cfg[i].id == id)
&& ((p_bta_dm_pm_cfg[i].app_id == BTA_ALL_APP_ID ) || (p_bta_dm_pm_cfg[i].app_id == app_id )))
break;
@@ -199,10 +199,10 @@ static void bta_dm_pm_cback(tBTA_SYS_CONN_STATUS status, UINT8 id, UINT8 app_id,
{
/* check if an entry already present */
if((bta_dm_conn_srvcs.conn_srvc[j].id == id)
- && (bta_dm_conn_srvcs.conn_srvc[j].app_id == app_id )
- && !bdcmp(bta_dm_conn_srvcs.conn_srvc[j].peer_bdaddr, peer_addr))
+ && (bta_dm_conn_srvcs.conn_srvc[j].app_id == app_id )
+ && !bdcmp(bta_dm_conn_srvcs.conn_srvc[j].peer_bdaddr, peer_addr))
break;
-
+
}
/* if subsystem has no more preference on the power mode remove
@@ -219,7 +219,7 @@ static void bta_dm_pm_cback(tBTA_SYS_CONN_STATUS status, UINT8 id, UINT8 app_id,
memcpy(&bta_dm_conn_srvcs.conn_srvc[j], &bta_dm_conn_srvcs.conn_srvc[j+1], sizeof(bta_dm_conn_srvcs.conn_srvc[j]));
- }
+ }
}
else
{
@@ -267,12 +267,12 @@ static void bta_dm_pm_cback(tBTA_SYS_CONN_STATUS status, UINT8 id, UINT8 app_id,
bta_dm_pm_set_mode(peer_addr, FALSE);
- /* perform the HID link workaround if needed
+ /* perform the HID link workaround if needed
** 1. If SCO up/down event is received OR
- ** 2. If HID connection open is received and SCO is already active.
+ ** 2. If HID connection open is received and SCO is already active.
** This will handle the case where HID connects when SCO already active
*/
- if ( (btm_status == BTM_SUCCESS) &&
+ if ( (btm_status == BTM_SUCCESS) &&
( ((status == BTA_SYS_SCO_OPEN) || (status == BTA_SYS_SCO_CLOSE)) ||
((status == BTA_SYS_CONN_OPEN) && (id == BTA_ID_HH) && bta_dm_pm_is_sco_active()) ) )
{
@@ -293,9 +293,9 @@ static void bta_dm_pm_cback(tBTA_SYS_CONN_STATUS status, UINT8 id, UINT8 app_id,
** Function bta_dm_pm_set_mode
**
** Description Set the power mode for the device
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
static void bta_dm_pm_set_mode(BD_ADDR peer_addr, BOOLEAN timed_out )
@@ -335,7 +335,7 @@ static void bta_dm_pm_set_mode(BD_ADDR peer_addr, BOOLEAN timed_out )
/* p_bta_dm_pm_cfg[0].app_id is the number of entries */
for(j=1; j<=p_bta_dm_pm_cfg[0].app_id; j++)
{
- if((p_bta_dm_pm_cfg[j].id == p_srvcs->id)
+ if((p_bta_dm_pm_cfg[j].id == p_srvcs->id)
&& ((p_bta_dm_pm_cfg[j].app_id == BTA_ALL_APP_ID ) ||
(p_bta_dm_pm_cfg[j].app_id == p_srvcs->app_id)))
break;
@@ -413,7 +413,7 @@ static void bta_dm_pm_set_mode(BD_ADDR peer_addr, BOOLEAN timed_out )
bta_sys_start_timer(&bta_dm_cb.pm_timer[i].timer, 0, timeout);
APPL_TRACE_WARNING2("start dm_pm_timer:%d, %d", i, timeout);
return;
-
+
}
}
@@ -466,9 +466,9 @@ static void bta_dm_pm_set_mode(BD_ADDR peer_addr, BOOLEAN timed_out )
** Function bta_ag_pm_park
**
** Description Switch to park mode.
-**
**
-** Returns TRUE if park attempted, FALSE otherwise.
+**
+** Returns TRUE if park attempted, FALSE otherwise.
**
*******************************************************************************/
static BOOLEAN bta_dm_pm_park(BD_ADDR peer_addr)
@@ -493,9 +493,9 @@ static BOOLEAN bta_dm_pm_park(BD_ADDR peer_addr)
** Function bta_ag_pm_sniff
**
** Description Switch to sniff mode.
-**
**
-** Returns TRUE if sniff attempted, FALSE otherwise.
+**
+** Returns TRUE if sniff attempted, FALSE otherwise.
**
*******************************************************************************/
static BOOLEAN bta_dm_pm_sniff(tBTA_DM_PEER_DEVICE *p_peer_dev, UINT8 index)
@@ -509,7 +509,7 @@ static BOOLEAN bta_dm_pm_sniff(tBTA_DM_PEER_DEVICE *p_peer_dev, UINT8 index)
#if (BTM_SSR_INCLUDED == TRUE)
APPL_TRACE_DEBUG3("bta_dm_pm_sniff cur:%d, idx:%d, info:x%x", mode, index, p_peer_dev->info);
if (mode != BTM_PM_MD_SNIFF ||
- (HCI_SNIFF_SUB_RATE_SUPPORTED(BTM_ReadLocalFeatures ()) &&
+ (HCI_SNIFF_SUB_RATE_SUPPORTED(BTM_ReadLocalFeatures ()) &&
HCI_SNIFF_SUB_RATE_SUPPORTED(BTM_ReadRemoteFeatures (p_peer_dev->peer_bdaddr)) &&
!(p_peer_dev->info & BTA_DM_DI_USE_SSR)))
#else
@@ -553,7 +553,7 @@ static BOOLEAN bta_dm_pm_sniff(tBTA_DM_PEER_DEVICE *p_peer_dev, UINT8 index)
**
** Description checks and sends SSR parameters
**
-** Returns void
+** Returns void
**
*******************************************************************************/
#if (BTM_SSR_INCLUDED == TRUE)
@@ -572,7 +572,7 @@ static void bta_dm_pm_ssr(BD_ADDR peer_addr)
for(j=1; j<=p_bta_dm_pm_cfg[0].app_id; j++)
{
/* find the associated p_bta_dm_pm_cfg */
- if((p_bta_dm_pm_cfg[j].id == bta_dm_conn_srvcs.conn_srvc[i].id)
+ if((p_bta_dm_pm_cfg[j].id == bta_dm_conn_srvcs.conn_srvc[i].id)
&& ((p_bta_dm_pm_cfg[j].app_id == BTA_ALL_APP_ID )
|| (p_bta_dm_pm_cfg[j].app_id == bta_dm_conn_srvcs.conn_srvc[i].app_id)))
{
@@ -586,7 +586,7 @@ static void bta_dm_pm_ssr(BD_ADDR peer_addr)
p_spec_cur = &p_bta_dm_ssr_spec[p_bta_dm_pm_spec[p_bta_dm_pm_cfg[j].spec_idx].ssr];
p_spec = &p_bta_dm_ssr_spec[ssr];
- if (p_spec_cur->max_lat < p_spec->max_lat ||
+ if (p_spec_cur->max_lat < p_spec->max_lat ||
(ssr == BTA_DM_PM_SSR0 && p_bta_dm_pm_spec[p_bta_dm_pm_cfg[j].spec_idx].ssr != BTA_DM_PM_SSR0))
{
ssr = p_bta_dm_pm_spec[p_bta_dm_pm_cfg[j].spec_idx].ssr;
@@ -609,9 +609,9 @@ static void bta_dm_pm_ssr(BD_ADDR peer_addr)
** Function bta_dm_ssr_cfg_cback
**
** Description Conn change callback from sys for low power management
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
static void bta_dm_ssr_cfg_cback(UINT8 id, UINT8 app_id,
@@ -623,7 +623,7 @@ static void bta_dm_ssr_cfg_cback(UINT8 id, UINT8 app_id,
for(i=1; i<=p_bta_dm_pm_cfg[0].app_id; i++)
{
- if((p_bta_dm_pm_cfg[i].id == id)
+ if((p_bta_dm_pm_cfg[i].id == id)
&& ((p_bta_dm_pm_cfg[i].app_id == BTA_ALL_APP_ID ) || (p_bta_dm_pm_cfg[i].app_id == app_id )))
break;
@@ -633,9 +633,9 @@ static void bta_dm_ssr_cfg_cback(UINT8 id, UINT8 app_id,
return;
index = p_bta_dm_pm_spec[p_bta_dm_pm_cfg[i].spec_idx].ssr;
-
+
APPL_TRACE_DEBUG2("SSR parameter changed to: max_latency: %d min_tout: %d", max_lat, min_rmt_to);
-
+
p_spec = &p_bta_dm_ssr_spec[index];
p_spec->max_lat = max_lat;
p_spec->min_rmt_to = min_rmt_to;
@@ -648,9 +648,9 @@ static void bta_dm_ssr_cfg_cback(UINT8 id, UINT8 app_id,
** Function bta_dm_pm_active
**
** Description Brings connection to active mode
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_dm_pm_active(BD_ADDR peer_addr)
@@ -672,9 +672,9 @@ void bta_dm_pm_active(BD_ADDR peer_addr)
** Function bta_dm_pm_btm_cback
**
** Description BTM power manager callback.
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
static void bta_dm_pm_btm_cback(BD_ADDR bd_addr, tBTM_PM_STATUS status, UINT16 value, UINT8 hci_status)
@@ -697,9 +697,9 @@ static void bta_dm_pm_btm_cback(BD_ADDR bd_addr, tBTM_PM_STATUS status, UINT16 v
** Function bta_dm_pm_timer_cback
**
** Description Power management timer callback.
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
static void bta_dm_pm_timer_cback(void *p_tle)
@@ -714,14 +714,14 @@ static void bta_dm_pm_timer_cback(void *p_tle)
if(bta_dm_cb.pm_timer[i].in_use)
{
-
+
if(&bta_dm_cb.pm_timer[i].timer == (TIMER_LIST_ENT*) p_tle)
{
APPL_TRACE_WARNING1("dm_pm_timer expires %d", i);
bta_dm_cb.pm_timer[i].in_use = FALSE;
break;
}
-
+
}
}
@@ -746,9 +746,9 @@ static void bta_dm_pm_timer_cback(void *p_tle)
** Function bta_dm_pm_btm_status
**
** Description Process pm status event from btm
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_dm_pm_btm_status(tBTA_DM_MSG *p_data)
@@ -776,7 +776,7 @@ void bta_dm_pm_btm_status(tBTA_DM_MSG *p_data)
if(p_dev->pm_mode_attempted &(BTA_DM_PM_PARK | BTA_DM_PM_SNIFF))
{
- p_dev->pm_mode_failed
+ p_dev->pm_mode_failed
|= ((BTA_DM_PM_PARK | BTA_DM_PM_SNIFF) & p_dev->pm_mode_attempted);
bta_dm_pm_stop_timer(p_data->pm_status.bd_addr);
bta_dm_pm_set_mode(p_data->pm_status.bd_addr, FALSE);
@@ -801,7 +801,7 @@ void bta_dm_pm_btm_status(tBTA_DM_MSG *p_data)
case BTM_PM_STS_PARK:
case BTM_PM_STS_HOLD:
/* save the previous low power mode - for SSR.
- * SSR parameters are sent to controller on "conn open".
+ * SSR parameters are sent to controller on "conn open".
* the numbers stay good until park/hold/detach */
if(p_dev->info & BTA_DM_DI_USE_SSR)
p_dev->prev_low = p_data->pm_status.status;
@@ -839,9 +839,9 @@ void bta_dm_pm_btm_status(tBTA_DM_MSG *p_data)
** Function bta_dm_pm_timer
**
** Description Process pm timer event from btm
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_dm_pm_timer(tBTA_DM_MSG *p_data)
@@ -872,7 +872,7 @@ tBTA_DM_PEER_DEVICE * bta_dm_find_peer_device(BD_ADDR peer_addr)
if(!bdcmp( bta_dm_cb.device_list.peer_device[i].peer_bdaddr, peer_addr))
{
p_dev = &bta_dm_cb.device_list.peer_device[i];
- break;
+ break;
}
}
@@ -892,7 +892,7 @@ static BOOLEAN bta_dm_pm_is_sco_active ()
{
int j;
BOOLEAN bScoActive = FALSE;
-
+
for(j=0; j<bta_dm_conn_srvcs.count ; j++)
{
/* check if an entry already present */
@@ -921,14 +921,14 @@ static BOOLEAN bta_dm_pm_is_sco_active ()
static void bta_dm_pm_hid_check(BOOLEAN bScoActive)
{
int j;
-
+
/* if HID is active, disable the link policy */
for(j=0; j<bta_dm_conn_srvcs.count ; j++)
{
/* check if an entry already present */
- if(bta_dm_conn_srvcs.conn_srvc[j].id == BTA_ID_HH )
+ if(bta_dm_conn_srvcs.conn_srvc[j].id == BTA_ID_HH )
{
- APPL_TRACE_DEBUG2 ("SCO status change(Active: %d), modify HID link policy. state: %d",
+ APPL_TRACE_DEBUG2 ("SCO status change(Active: %d), modify HID link policy. state: %d",
bScoActive, bta_dm_conn_srvcs.conn_srvc[j].state);
bta_dm_pm_set_sniff_policy( bta_dm_find_peer_device(bta_dm_conn_srvcs.conn_srvc[j].peer_bdaddr), bScoActive);
@@ -955,12 +955,12 @@ static void bta_dm_pm_set_sniff_policy(tBTA_DM_PEER_DEVICE *p_dev, BOOLEAN bDisa
if (!p_dev)
return;
-
+
if (bDisable)
{
policy_setting = bta_dm_cb.cur_policy &
(HCI_ENABLE_MASTER_SLAVE_SWITCH |
- HCI_ENABLE_HOLD_MODE |
+ HCI_ENABLE_HOLD_MODE |
HCI_ENABLE_PARK_MODE);
}
diff --git a/bta/dm/bta_dm_sco.c b/bta/dm/bta_dm_sco.c
index 7ad840a..773adaf 100644
--- a/bta/dm/bta_dm_sco.c
+++ b/bta/dm/bta_dm_sco.c
@@ -2,12 +2,12 @@
**
** Name: bta_dm_sco.c
**
-** Description: This file contains the down sampling utility to convert PCM
-** samples in 16k/32k/48k/44.1k/22050/11025 sampling rate into
-** 8K/16bits samples required for SCO channel format. One API
-** function isprovided and only possible to be used when
+** Description: This file contains the down sampling utility to convert PCM
+** samples in 16k/32k/48k/44.1k/22050/11025 sampling rate into
+** 8K/16bits samples required for SCO channel format. One API
+** function isprovided and only possible to be used when
** transmitting SCO data is sent via HCI interface.
-**
+**
** Original code took from BTW/CE.
**
** Copyright (c) 2003-2007, Broadcom Corp., All Rights Reserved.
@@ -20,11 +20,11 @@
#if (BTM_SCO_HCI_INCLUDED == TRUE)
-#ifndef BTA_DM_SCO_DEBUG
+#ifndef BTA_DM_SCO_DEBUG
#define BTA_DM_SCO_DEBUG FALSE
#endif
/*****************************************************************************
-** Constants
+** Constants
*****************************************************************************/
#define BTA_DM_PCM_OVERLAP_SIZE 48
@@ -37,18 +37,18 @@
** Data types for PCM Resampling utility
*****************************************************************************/
-typedef INT32 (*PCONVERT_TO_BT_FILTERED) (UINT8 *pSrc, void *pDst, UINT32 dwSrcSamples,
+typedef INT32 (*PCONVERT_TO_BT_FILTERED) (UINT8 *pSrc, void *pDst, UINT32 dwSrcSamples,
UINT32 dwSrcSps,INT32 *pLastCurPos, UINT8 *pOverlapArea);
-typedef INT32 (*PCONVERT_TO_BT_NOFILTER) (void *pSrc, void *pDst, UINT32 dwSrcSamples,
+typedef INT32 (*PCONVERT_TO_BT_NOFILTER) (void *pSrc, void *pDst, UINT32 dwSrcSamples,
UINT32 dwSrcSps);
typedef struct
{
UINT8 overlap_area[BTA_DM_PCM_OVERLAP_SIZE * 4];
UINT32 cur_pos; /* current position */
UINT32 src_sps; /* samples per second (source audio data) */
- PCONVERT_TO_BT_FILTERED filter; /* the action function to do the
+ PCONVERT_TO_BT_FILTERED filter; /* the action function to do the
conversion 44100, 22050, 11025*/
- PCONVERT_TO_BT_NOFILTER nofilter; /* the action function to do
+ PCONVERT_TO_BT_NOFILTER nofilter; /* the action function to do
the conversion 48000, 32000, 16000*/
UINT32 bits; /* number of bits per pcm sample */
UINT32 n_channels; /* number of channels (i.e. mono(1), stereo(2)...) */
@@ -228,7 +228,7 @@ tBTA_DM_PCM_RESAMPLE_CB bta_dm_pcm_cb;
/*****************************************************************************
** Local Function
*****************************************************************************/
-INT32 Convert_8M_ToBT_Filtered (UINT8 *pSrc, void *pDst, UINT32 dwSrcSamples,
+INT32 Convert_8M_ToBT_Filtered (UINT8 *pSrc, void *pDst, UINT32 dwSrcSamples,
UINT32 dwSrcSps, INT32 *pLastCurPos, UINT8 *pOverlapArea)
{
INT32 CurrentPos = *pLastCurPos;
@@ -314,7 +314,7 @@ INT32 Convert_8M_ToBT_NoFilter (void *pSrc, void *pDst, UINT32 dwSrcSamples, UIN
#define SRC_CHANNELS 1
#define SRC_SAMPLE(x) pS[x]
-INT32 Convert_16M_ToBT_Filtered (UINT8 *pSrc, void *pDst, UINT32 dwSrcSamples,
+INT32 Convert_16M_ToBT_Filtered (UINT8 *pSrc, void *pDst, UINT32 dwSrcSamples,
UINT32 dwSrcSps, INT32 *pLastCurPos, UINT8 *pOverlapArea)
{
INT32 CurrentPos = *pLastCurPos;
@@ -391,7 +391,7 @@ INT32 Convert_16M_ToBT_NoFilter (void *pSrc, void *pDst, UINT32 dwSrcSamples, UI
#define SRC_CHANNELS 2
#define SRC_SAMPLE(x) ((((pS[x * 2] - 0x80) << 8) + ((pS[(x * 2) + 1] - 0x80) << 8)) >> 1)
-INT32 Convert_8S_ToBT_Filtered (UINT8 *pSrc, void *pDst, UINT32 dwSrcSamples,
+INT32 Convert_8S_ToBT_Filtered (UINT8 *pSrc, void *pDst, UINT32 dwSrcSamples,
UINT32 dwSrcSps, INT32 *pLastCurPos, UINT8 *pOverlapArea)
{
INT32 CurrentPos = *pLastCurPos;
@@ -488,14 +488,14 @@ INT32 Convert_8S_ToBT_NoFilter (void *pSrc, void *pDst, UINT32 dwSrcSamples, UIN
#define SRC_CHANNELS 2
#define SRC_SAMPLE(x) ((pS[x * 2] + pS[(x * 2) + 1]) >> 1)
-INT32 Convert_16S_ToBT_Filtered (UINT8 *pSrc, void *pDst, UINT32 dwSrcSamples,
+INT32 Convert_16S_ToBT_Filtered (UINT8 *pSrc, void *pDst, UINT32 dwSrcSamples,
UINT32 dwSrcSps, INT32 *pLastCurPos, UINT8 *pOverlapArea)
{
INT32 CurrentPos = *pLastCurPos;
SRC_TYPE *pIn, *pInEnd;
SRC_TYPE *pOv, *pOvEnd;
INT16 *psBtOut = (INT16 *)pDst;
-
+
memcpy (pOverlapArea + (BTA_DM_PCM_OVERLAP_SIZE * 2), pSrc, BTA_DM_PCM_OVERLAP_SIZE * 2);
pOv = (SRC_TYPE *)(pOverlapArea + BTA_DM_PCM_OVERLAP_SIZE);
@@ -534,7 +534,7 @@ INT32 Convert_16S_ToBT_NoFilter (void *pSrc, void *pDst, UINT32 dwSrcSamples, UI
INT16 *psSrc = (INT16 *)pSrc;
INT16 *psDst = (INT16 *)pDst;
INT16 sWorker;
-
+
// start at dwSpsSrc / 2, decrement by 8000
//
CurrentPos = (dwSrcSps >> 1);
@@ -568,11 +568,11 @@ INT32 Convert_16S_ToBT_NoFilter (void *pSrc, void *pDst, UINT32 dwSrcSamples, UI
**
** Description initialize the down sample converter.
**
-** src_sps: original samples per second (source audio data)
+** src_sps: original samples per second (source audio data)
** (ex. 44100, 48000)
** bits: number of bits per pcm sample (16)
** n_channels: number of channels (i.e. mono(1), stereo(2)...)
-**
+**
** Returns none
**
*******************************************************************************/
@@ -584,14 +584,14 @@ void BTA_DmPcmInitSamples (UINT32 src_sps, UINT32 bits, UINT32 n_channels)
p_cb->src_sps = src_sps;
p_cb->bits = bits;
p_cb->n_channels = n_channels;
- p_cb->sample_size = 2;
- p_cb->divisor = 2;
+ p_cb->sample_size = 2;
+ p_cb->divisor = 2;
memset(p_cb->overlap_area, 0, sizeof(p_cb->overlap_area) );
- if ((src_sps == BTA_DM_PCM_SMPL_RATE_44100) ||
- (src_sps == BTA_DM_PCM_SMPL_RATE_22050) ||
- (src_sps == BTA_DM_PCM_SMPL_RATE_11025))
+ if ((src_sps == BTA_DM_PCM_SMPL_RATE_44100) ||
+ (src_sps == BTA_DM_PCM_SMPL_RATE_22050) ||
+ (src_sps == BTA_DM_PCM_SMPL_RATE_11025))
p_cb->can_be_filtered = 1;
else
p_cb->can_be_filtered = 0;
@@ -606,7 +606,7 @@ void BTA_DmPcmInitSamples (UINT32 src_sps, UINT32 bits, UINT32 n_channels)
{
p_cb->filter = (PCONVERT_TO_BT_FILTERED) Convert_8M_ToBT_Filtered;
p_cb->nofilter = (PCONVERT_TO_BT_NOFILTER) Convert_8M_ToBT_NoFilter;
- p_cb->divisor = 1;
+ p_cb->divisor = 1;
}
else
{
@@ -616,7 +616,7 @@ void BTA_DmPcmInitSamples (UINT32 src_sps, UINT32 bits, UINT32 n_channels)
}
else
{
- /* stereo */
+ /* stereo */
if(bits == 8)
{
p_cb->filter = (PCONVERT_TO_BT_FILTERED) Convert_8S_ToBT_Filtered;
@@ -652,26 +652,26 @@ void BTA_DmPcmInitSamples (UINT32 src_sps, UINT32 bits, UINT32 n_channels)
** in_bytes: Length of the input PCM sample buffer in byte.
** p_dst: pointer to the buffer which is to be used to store
** the converted PCM samples.
-**
+**
**
** Returns INT32: number of samples converted.
-**
+**
**************************************************************************************/
INT32 BTA_DmPcmResample (void *p_src, UINT32 in_bytes, void *p_dst)
{
- UINT32 out_sample;
+ UINT32 out_sample;
#if BTA_DM_SCO_DEBUG
APPL_TRACE_DEBUG1("bta_pcm_resample : insamples %d", (in_bytes / bta_dm_pcm_cb.divisor));
-#endif
+#endif
if(bta_dm_pcm_cb.can_be_filtered)
{
- out_sample = (*bta_dm_pcm_cb.filter) (p_src, p_dst, (in_bytes / bta_dm_pcm_cb.divisor),
+ out_sample = (*bta_dm_pcm_cb.filter) (p_src, p_dst, (in_bytes / bta_dm_pcm_cb.divisor),
bta_dm_pcm_cb.src_sps, (INT32 *) &bta_dm_pcm_cb.cur_pos, bta_dm_pcm_cb.overlap_area);
}
- else
+ else
{
- out_sample = (*bta_dm_pcm_cb.nofilter) (p_src, p_dst,
+ out_sample = (*bta_dm_pcm_cb.nofilter) (p_src, p_dst,
(in_bytes / bta_dm_pcm_cb.divisor), bta_dm_pcm_cb.src_sps);
}
@@ -679,6 +679,6 @@ INT32 BTA_DmPcmResample (void *p_src, UINT32 in_bytes, void *p_dst)
APPL_TRACE_DEBUG1("bta_pcm_resample : outsamples %d", out_sample);
#endif
- return (out_sample * bta_dm_pcm_cb.sample_size);
+ return (out_sample * bta_dm_pcm_cb.sample_size);
}
#endif
diff --git a/bta/fs/bta_fs_cfg.c b/bta/fs/bta_fs_cfg.c
index fc18863..c60d8d2 100644
--- a/bta/fs/bta_fs_cfg.c
+++ b/bta/fs/bta_fs_cfg.c
@@ -31,7 +31,7 @@ const tBTA_FS_CFG bta_fs_cfg =
{
BTA_FS_FILE_LEN,
BTA_FS_PATH_LEN,
- BTA_FS_PATH_SEPARATOR
+ BTA_FS_PATH_SEPARATOR
};
tBTA_FS_CFG *p_bta_fs_cfg = (tBTA_FS_CFG *)&bta_fs_cfg;
diff --git a/bta/fs/bta_fs_ci.c b/bta/fs/bta_fs_ci.c
index d6e52b4..f59d8d7 100644
--- a/bta/fs/bta_fs_ci.c
+++ b/bta/fs/bta_fs_ci.c
@@ -21,7 +21,7 @@
**
** Function bta_fs_ci_write
**
-** Description This function sends an event to IO indicating the phone
+** Description This function sends an event to IO indicating the phone
** has written the number of bytes specified in the call-out
** function, bta_fs_co_write(), and is ready for more data.
** This function is used to control the TX data flow.
@@ -32,7 +32,7 @@
** bta_fs_ci_open call-in function.
** status - BTA_FS_CO_OK or BTA_FS_CO_FAIL
**
-** Returns void
+** Returns void
**
*******************************************************************************/
void bta_fs_ci_write(int fd, tBTA_FS_CO_STATUS status, UINT16 evt)
@@ -58,7 +58,7 @@ void bta_fs_ci_write(int fd, tBTA_FS_CO_STATUS status, UINT16 evt)
** bta_fs_co_read() call-out function. It should only be called
** when the requested number of bytes has been read in, or after
** the end of the file has been detected.
-**
+**
** Parameters fd - file descriptor passed to the stack in the
** bta_fs_ci_open call-in function.
** num_bytes_read - number of bytes read into the buffer
@@ -67,7 +67,7 @@ void bta_fs_ci_write(int fd, tBTA_FS_CO_STATUS status, UINT16 evt)
** BTA_FS_CO_EOF if the end of file has been reached,
** BTA_FS_CO_FAIL if an error has occurred.
**
-** Returns void
+** Returns void
**
*******************************************************************************/
void bta_fs_ci_read(int fd, UINT16 num_bytes_read, tBTA_FS_CO_STATUS status, UINT16 evt)
@@ -91,7 +91,7 @@ void bta_fs_ci_read(int fd, UINT16 num_bytes_read, tBTA_FS_CO_STATUS status, UIN
**
** Description This function sends an event to BTA indicating the phone has
** finished opening a file for reading or writing.
-**
+**
** Parameters fd - file descriptor passed to the stack in the
** bta_fs_ci_open call-in function.
** status - BTA_FS_CO_OK if file was opened in mode specified
@@ -103,7 +103,7 @@ void bta_fs_ci_read(int fd, UINT16 num_bytes_read, tBTA_FS_CO_STATUS status, UIN
** evt - Used Internally by BTA -> MUST be same value passed
** in call-out function.
**
-** Returns void
+** Returns void
**
*******************************************************************************/
void bta_fs_ci_open(int fd, tBTA_FS_CO_STATUS status, UINT32 file_size, UINT16 evt)
@@ -133,7 +133,7 @@ void bta_fs_ci_open(int fd, tBTA_FS_CO_STATUS status, UINT32 file_size, UINT16 e
** BTA_FS_CO_EODIR if no more entries (p_entry is ignored).
** BTA_FS_CO_FAIL if any errors have occurred.
**
-** Returns void
+** Returns void
**
*******************************************************************************/
void bta_fs_ci_direntry(tBTA_FS_CO_STATUS status, UINT16 evt)
@@ -164,7 +164,7 @@ void bta_fs_ci_direntry(tBTA_FS_CO_STATUS status, UINT16 evt)
** evt - Used Internally by BTA -> MUST be same value passed
** in call-out function.
**
-** Returns void
+** Returns void
**
*******************************************************************************/
void bta_fs_ci_resume (BD_ADDR_PTR p_addr, UINT8 *p_sess_info,
@@ -206,7 +206,7 @@ void bta_fs_ci_resume (BD_ADDR_PTR p_addr, UINT8 *p_sess_info,
** evt - Used Internally by BTA -> MUST be same value passed
** in call-out function.
**
-** Returns void
+** Returns void
**
*******************************************************************************/
void bta_fs_ci_action(tBTA_FS_CO_STATUS status, UINT16 evt)
@@ -228,7 +228,7 @@ void bta_fs_ci_action(tBTA_FS_CO_STATUS status, UINT16 evt)
**
** Description This function sends an event to BTA indicating the phone has
** finished opening a file for reading or writing on resume.
-**
+**
** Parameters fd - file descriptor passed to the stack in the
** bta_fs_ci_open call-in function.
** status - BTA_FS_CO_OK if file was opened in mode specified
@@ -241,7 +241,7 @@ void bta_fs_ci_action(tBTA_FS_CO_STATUS status, UINT16 evt)
** evt - Used Internally by BTA -> MUST be same value passed
** in call-out function.
**
-** Returns void
+** Returns void
**
*******************************************************************************/
void bta_fs_ci_resume_op(int fd, tBTA_FS_CO_STATUS status, const char *p_file,
diff --git a/bta/gatt/bta_gattc_act.c b/bta/gatt/bta_gattc_act.c
index ce0c209..48e839a 100644
--- a/bta/gatt/bta_gattc_act.c
+++ b/bta/gatt/bta_gattc_act.c
@@ -2,7 +2,7 @@
**
** Name: bta_gattc_act.c
**
-** Description: This file contains the GATT client action
+** Description: This file contains the GATT client action
** functions for the state machine.
**
** Copyright (c) 2003-2011, Broadcom Corp., All Rights Reserved.
@@ -29,10 +29,10 @@
/*****************************************************************************
** Constants
*****************************************************************************/
-static void bta_gattc_conn_cback(tGATT_IF gattc_if, BD_ADDR bda, UINT16 conn_id,
+static void bta_gattc_conn_cback(tGATT_IF gattc_if, BD_ADDR bda, UINT16 conn_id,
BOOLEAN connected, tGATT_DISCONN_REASON reason);
-static void bta_gattc_cmpl_cback(UINT16 conn_id, tGATTC_OPTYPE op, tGATT_STATUS status,
+static void bta_gattc_cmpl_cback(UINT16 conn_id, tGATTC_OPTYPE op, tGATT_STATUS status,
tGATT_CL_COMPLETE *p_data);
static tGATT_CBACK bta_gattc_cl_cback =
@@ -74,7 +74,7 @@ static const char *bta_gattc_op_code_name[] =
** Function bta_gattc_register
**
** Description Register a GATT client application with BTA.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -82,7 +82,7 @@ void bta_gattc_register(tBTA_GATTC_CB *p_cb, tBTA_GATTC_DATA *p_data)
{
tBTA_GATTC cb_data;
UINT8 i;
- tBT_UUID *p_app_uuid = &p_data->api_reg.app_uuid;
+ tBT_UUID *p_app_uuid = &p_data->api_reg.app_uuid;
tBTA_GATTC_INT_START_IF *p_buf;
@@ -108,7 +108,7 @@ void bta_gattc_register(tBTA_GATTC_CB *p_cb, tBTA_GATTC_DATA *p_data)
// btla-specific ++
memcpy(&(cb_data.reg_oper.app_uuid),p_app_uuid,sizeof(tBT_UUID));
// btla-specific --
-
+
cb_data.reg_oper.status = BTA_GATT_OK;
if ((p_buf = (tBTA_GATTC_INT_START_IF *) GKI_getbuf(sizeof(tBTA_GATTC_INT_START_IF))) != NULL)
@@ -161,7 +161,7 @@ void bta_gattc_start_if(tBTA_GATTC_CB *p_cb, tBTA_GATTC_DATA *p_msg)
** Function bta_gattc_deregister_cmpl
**
** Description De-Register a GATT client application with BTA completed.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -190,7 +190,7 @@ void bta_gattc_int_deregister_cmpl(tBTA_GATTC_RCB *p_clreg, tBTA_GATTC_IF client
** Function bta_gattc_deregister_cmpl
**
** Description De-Register a GATT client application with BTA completed.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -218,7 +218,7 @@ void bta_gattc_deregister_cmpl(tBTA_GATTC_RCB *p_clreg, tBTA_GATTC_IF client_if)
** Function bta_gattc_deregister
**
** Description De-Register a GATT client application with BTA.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -248,7 +248,7 @@ void bta_gattc_int_deregister(tBTA_GATTC_CB *p_cb, tBTA_GATTC_DATA *p_data)
else
{
APPL_TRACE_ERROR1("bta_gattc_int_deregister Deregister Failed, unknown client_if: %d", p_data->int_dereg.client_if);
- }
+ }
}
@@ -257,7 +257,7 @@ void bta_gattc_int_deregister(tBTA_GATTC_CB *p_cb, tBTA_GATTC_DATA *p_data)
** Function bta_gattc_deregister
**
** Description De-Register a GATT client application with BTA.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -279,8 +279,8 @@ void bta_gattc_deregister(tBTA_GATTC_CB *p_cb, tBTA_GATTC_DATA *p_data)
p_clreg->dereg_pending = TRUE;
buf.event = BTA_GATTC_API_CLOSE_EVT;
- buf.layer_specific = p_cb->clcb[i].bta_conn_id;
- bta_gattc_close(&p_cb->clcb[i], (tBTA_GATTC_DATA *)&buf) ;
+ buf.layer_specific = p_cb->clcb[i].bta_conn_id;
+ bta_gattc_close(&p_cb->clcb[i], (tBTA_GATTC_DATA *)&buf) ;
}
}
}
@@ -290,14 +290,14 @@ void bta_gattc_deregister(tBTA_GATTC_CB *p_cb, tBTA_GATTC_DATA *p_data)
else
{
APPL_TRACE_ERROR1("bta_gattc_deregister Deregister Failed, unknown client_if: %d", p_data->api_dereg.client_if);
- }
+ }
}
/*******************************************************************************
**
** Function bta_gattc_process_api_open
**
-** Description process connect API request.
-**
+** Description process connect API request.
+**
** Returns void
**
*******************************************************************************/
@@ -320,8 +320,8 @@ void bta_gattc_process_api_open (tBTA_GATTC_CB *p_cb, tBTA_GATTC_DATA * p_msg)
{
APPL_TRACE_ERROR0("No resources to open a new connection.");
- bta_gattc_send_open_cback(p_clreg,
- BTA_GATT_NO_RESOURCES,
+ bta_gattc_send_open_cback(p_clreg,
+ BTA_GATT_NO_RESOURCES,
p_msg->api_conn.remote_bda,
BTA_GATT_INVALID_CONN_ID);
}
@@ -333,7 +333,7 @@ void bta_gattc_process_api_open (tBTA_GATTC_CB *p_cb, tBTA_GATTC_DATA * p_msg)
}
else
{
- APPL_TRACE_ERROR1("bta_gattc_process_api_open Failed, unknown client_if: %d",
+ APPL_TRACE_ERROR1("bta_gattc_process_api_open Failed, unknown client_if: %d",
p_msg->api_conn.client_if);
}
}
@@ -341,8 +341,8 @@ void bta_gattc_process_api_open (tBTA_GATTC_CB *p_cb, tBTA_GATTC_DATA * p_msg)
**
** Function bta_gattc_process_api_open_cancel
**
-** Description process connect API request.
-**
+** Description process connect API request.
+**
** Returns void
**
*******************************************************************************/
@@ -383,8 +383,8 @@ void bta_gattc_process_api_open_cancel (tBTA_GATTC_CB *p_cb, tBTA_GATTC_DATA * p
**
** Function bta_gattc_cancel_open_error
**
-** Description
-**
+** Description
+**
** Returns void
**
*******************************************************************************/
@@ -400,8 +400,8 @@ void bta_gattc_cancel_open_error(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_dat
**
** Function bta_gattc_open_error
**
-** Description
-**
+** Description
+**
** Returns void
**
*******************************************************************************/
@@ -409,8 +409,8 @@ void bta_gattc_open_error(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
{
APPL_TRACE_ERROR0("Connection already opened. wrong state");
- bta_gattc_send_open_cback(p_clcb->p_rcb,
- BTA_GATT_ALREADY_OPEN,
+ bta_gattc_send_open_cback(p_clcb->p_rcb,
+ BTA_GATT_ALREADY_OPEN,
p_clcb->bda,
p_clcb->bta_conn_id);
}
@@ -418,8 +418,8 @@ void bta_gattc_open_error(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
**
** Function bta_gattc_open_fail
**
-** Description
-**
+** Description
+**
** Returns void
**
*******************************************************************************/
@@ -435,14 +435,14 @@ void bta_gattc_open_fail(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
** Function bta_gattc_open
**
** Description Process API connection function.
-**
+**
** Returns void
**
*******************************************************************************/
void bta_gattc_open(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
{
tBTA_GATTC_DATA gattc_data;
-
+
/* open/hold a connection */
if (!GATT_Connect(p_clcb->p_rcb->client_if, p_data->api_conn.remote_bda, TRUE))
{
@@ -453,10 +453,10 @@ void bta_gattc_open(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
else
{
/* a connected remote device */
- if (GATT_GetConnIdIfConnected(p_clcb->p_rcb->client_if,
- p_data->api_conn.remote_bda,
+ if (GATT_GetConnIdIfConnected(p_clcb->p_rcb->client_if,
+ p_data->api_conn.remote_bda,
&p_clcb->bta_conn_id))
- {
+ {
gattc_data.hdr.layer_specific = p_clcb->bta_conn_id;
bta_gattc_sm_execute(p_clcb, BTA_GATTC_INT_CONN_EVT, &gattc_data);
@@ -469,7 +469,7 @@ void bta_gattc_open(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
** Function bta_gattc_init_bk_conn
**
** Description Process API Open for a background connection
-**
+**
** Returns void
**
*******************************************************************************/
@@ -486,19 +486,19 @@ void bta_gattc_init_bk_conn(tBTA_GATTC_API_OPEN *p_data, tBTA_GATTC_RCB *p_clreg
if (!GATT_Connect(p_data->client_if, p_data->remote_bda, FALSE))
{
status = BTA_GATT_ERROR;
- APPL_TRACE_ERROR0("bta_gattc_init_bk_conn failed");
+ APPL_TRACE_ERROR0("bta_gattc_init_bk_conn failed");
}
else
{
status = BTA_GATT_OK;
/* if is a connected remote device */
- if (GATT_GetConnIdIfConnected(p_data->client_if,
- p_data->remote_bda,
+ if (GATT_GetConnIdIfConnected(p_data->client_if,
+ p_data->remote_bda,
&conn_id))
- {
+ {
if ((p_clcb = bta_gattc_clcb_alloc(p_data->client_if, p_data->remote_bda)) != NULL)
- {
+ {
gattc_data.hdr.layer_specific = p_clcb->bta_conn_id = conn_id;
/* open connection */
@@ -508,7 +508,7 @@ void bta_gattc_init_bk_conn(tBTA_GATTC_API_OPEN *p_data, tBTA_GATTC_RCB *p_clreg
}
}
}
-
+
/* open failure, report OPEN_EVT */
if (status != BTA_GATT_OK)
{
@@ -520,7 +520,7 @@ void bta_gattc_init_bk_conn(tBTA_GATTC_API_OPEN *p_data, tBTA_GATTC_RCB *p_clreg
** Function bta_gattc_cancel_bk_conn
**
** Description Process API Cancel Open for a background connection
-**
+**
** Returns void
**
*******************************************************************************/
@@ -542,7 +542,7 @@ void bta_gattc_cancel_bk_conn(tBTA_GATTC_API_CANCEL_OPEN *p_data)
}
}
p_clreg = bta_gattc_cl_get_regcb(p_data->client_if);
-
+
if (p_clreg && p_clreg->p_cback)
{
(*p_clreg->p_cback)(BTA_GATTC_CANCEL_OPEN_EVT, (tBTA_GATTC *)&status);
@@ -553,8 +553,8 @@ void bta_gattc_cancel_bk_conn(tBTA_GATTC_API_CANCEL_OPEN *p_data)
**
** Function bta_gattc_int_cancel_open_ok
**
-** Description
-**
+** Description
+**
** Returns void
**
*******************************************************************************/
@@ -574,8 +574,8 @@ void bta_gattc_cancel_open_ok(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
**
** Function bta_gattc_cancel_open
**
-** Description
-**
+** Description
+**
** Returns void
**
*******************************************************************************/
@@ -600,7 +600,7 @@ void bta_gattc_cancel_open(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
** Function bta_gattc_conn
**
** Description receive connection callback from stack
-**
+**
** Returns void
**
*******************************************************************************/
@@ -628,8 +628,8 @@ void bta_gattc_conn(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
else /* cache is building */
p_clcb->state = BTA_GATTC_DISCOVER_ST;
}
-
- else
+
+ else
{
/* a pending service handle change indication */
if (p_clcb->p_srcb->srvc_hdl_chg)
@@ -639,23 +639,23 @@ void bta_gattc_conn(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
bta_gattc_sm_execute(p_clcb, BTA_GATTC_INT_DISCOVER_EVT, NULL);
}
}
-
+
if (p_clcb->p_rcb)
- {
- bta_gattc_send_open_cback(p_clcb->p_rcb,
- BTA_GATT_OK,
- p_clcb->bda,
- p_clcb->bta_conn_id);
+ {
+ bta_gattc_send_open_cback(p_clcb->p_rcb,
+ BTA_GATT_OK,
+ p_clcb->bda,
+ p_clcb->bta_conn_id);
}
}
}
-
+
/*******************************************************************************
**
** Function bta_gattc_close_fail
**
** Description close a connection.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -681,7 +681,7 @@ void bta_gattc_close_fail(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
** Function bta_gattc_api_close
**
** Description close a GATTC connection.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -692,10 +692,10 @@ void bta_gattc_close(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
tBTA_GATTC cb_data;
APPL_TRACE_DEBUG1("bta_gattc_close conn_id=%d",p_clcb->bta_conn_id);
-
+
if (p_data->hdr.event == BTA_GATTC_API_CLOSE_EVT)
p_clcb->status = GATT_Disconnect(p_clcb->bta_conn_id);
-
+
cb_data.close.client_if = p_clcb->p_rcb->client_if;
cb_data.close.conn_id = p_clcb->bta_conn_id;
cb_data.close.status = p_clcb->status;
@@ -721,7 +721,7 @@ void bta_gattc_close(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
{
bta_gattc_deregister_cmpl(p_clreg, p_clreg->client_if);
}
-
+
}
/*******************************************************************************
@@ -729,7 +729,7 @@ void bta_gattc_close(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
** Function bta_gattc_reset_discover_st
**
** Description when a SRCB finished discovery, tell all related clcb.
-**
+**
** Returns None.
**
*******************************************************************************/
@@ -750,9 +750,9 @@ void bta_gattc_reset_discover_st(tBTA_GATTC_SERV *p_srcb)
**
** Function bta_gattc_set_discover_st
**
-** Description when a SRCB start discovery, tell all related clcb and set
+** Description when a SRCB start discovery, tell all related clcb and set
** the state.
-**
+**
** Returns None.
**
*******************************************************************************/
@@ -777,7 +777,7 @@ void bta_gattc_set_discover_st(tBTA_GATTC_SERV *p_srcb)
** Function bta_gattc_start_discover
**
** Description Start a discovery on server.
-**
+**
** Returns None.
**
*******************************************************************************/
@@ -789,7 +789,7 @@ void bta_gattc_start_discover(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
if (p_clcb->p_q_cmd != NULL && p_clcb->auto_update == BTA_GATTC_NO_SCHEDULE &&
p_clcb->p_srcb->state == BTA_GATTC_SERV_IDLE)
{
- p_clcb->auto_update = BTA_GATTC_DISC_WAITING;
+ p_clcb->auto_update = BTA_GATTC_DISC_WAITING;
p_clcb->state = BTA_GATTC_CONN_ST; /* set clcb state */
}
else /* no pending operation, start discovery right away */
@@ -823,7 +823,7 @@ void bta_gattc_start_discover(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
** Function bta_gattc_disc_cmpl
**
** Description discovery on server is finished
-**
+**
** Returns None.
**
*******************************************************************************/
@@ -856,7 +856,7 @@ void bta_gattc_disc_cmpl(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
** Function bta_gattc_read
**
** Description Read an attribute
-**
+**
** Returns None.
**
*******************************************************************************/
@@ -901,7 +901,7 @@ void bta_gattc_read(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
** Function bta_gattc_read_multi
**
** Description read multiple
-**
+**
** Returns None.
*********************************************************************************/
void bta_gattc_read_multi(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
@@ -910,7 +910,7 @@ void bta_gattc_read_multi(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
tBTA_GATT_STATUS status = BTA_GATT_OK;
tGATT_READ_PARAM read_param;
tBTA_GATTC_OP_CMPL op_cmpl;
- tBTA_GATTC_ATTR_ID *p_id;
+ tBTA_GATTC_ATTR_ID *p_id;
tBT_UUID dummy_uuid;
if (bta_gattc_enqueue(p_clcb, p_data))
@@ -975,7 +975,7 @@ void bta_gattc_read_multi(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
** Function bta_gattc_write
**
** Description Write an attribute
-**
+**
** Returns None.
**
*******************************************************************************/
@@ -1026,7 +1026,7 @@ void bta_gattc_write(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
** Function bta_gattc_execute
**
** Description send execute write
-**
+**
** Returns None.
*********************************************************************************/
void bta_gattc_execute(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
@@ -1056,13 +1056,13 @@ void bta_gattc_execute(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
** Function bta_gattc_confirm
**
** Description send handle value confirmation
-**
+**
** Returns None.
**
*******************************************************************************/
void bta_gattc_confirm(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
{
- UINT16 handle;
+ UINT16 handle;
tBT_UUID null_uuid = {0};
if ((handle = bta_gattc_id2handle(p_clcb->p_srcb,
@@ -1086,7 +1086,7 @@ void bta_gattc_confirm(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
** Function bta_gattc_read_cmpl
**
** Description read complete
-**
+**
** Returns None.
**
*******************************************************************************/
@@ -1103,10 +1103,10 @@ void bta_gattc_read_cmpl(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_OP_CMPL *p_data)
if (p_data->p_cmpl != NULL && p_data->status == BTA_GATT_OK)
{
- if (bta_gattc_handle2id(p_clcb->p_srcb,
- p_data->p_cmpl->att_value.handle,
- &cb_data.read.srvc_id,
- &cb_data.read.char_id,
+ if (bta_gattc_handle2id(p_clcb->p_srcb,
+ p_data->p_cmpl->att_value.handle,
+ &cb_data.read.srvc_id,
+ &cb_data.read.char_id,
&cb_data.read.descr_type) == FALSE)
{
cb_data.read.status = BTA_GATT_INTERNAL_ERROR;
@@ -1115,11 +1115,11 @@ void bta_gattc_read_cmpl(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_OP_CMPL *p_data)
else
{
cb_data.read.status = bta_gattc_pack_read_cb_data(p_clcb->p_srcb,
- cb_data.read.descr_type,
- &p_data->p_cmpl->att_value,
+ cb_data.read.descr_type,
+ &p_data->p_cmpl->att_value,
&read_value);
cb_data.read.p_value = &read_value;
- }
+ }
}
else
{
@@ -1141,7 +1141,7 @@ void bta_gattc_read_cmpl(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_OP_CMPL *p_data)
** Function bta_gattc_write_cmpl
**
** Description read complete
-**
+**
** Returns None.
**
*******************************************************************************/
@@ -1154,8 +1154,8 @@ void bta_gattc_write_cmpl(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_OP_CMPL *p_data)
if (p_data->p_cmpl != NULL)
{
- bta_gattc_handle2id(p_clcb->p_srcb, p_data->p_cmpl->handle,
- &cb_data.write.srvc_id, &cb_data.write.char_id,
+ bta_gattc_handle2id(p_clcb->p_srcb, p_data->p_cmpl->handle,
+ &cb_data.write.srvc_id, &cb_data.write.char_id,
&cb_data.write.descr_type);
}
else
@@ -1188,7 +1188,7 @@ void bta_gattc_write_cmpl(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_OP_CMPL *p_data)
** Function bta_gattc_exec_cmpl
**
** Description execute write complete
-**
+**
** Returns None.
**
*******************************************************************************/
@@ -1202,7 +1202,7 @@ void bta_gattc_exec_cmpl(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_OP_CMPL *p_data)
/* execute complete, callback */
cb_data.exec_cmpl.conn_id = p_clcb->bta_conn_id;
- cb_data.exec_cmpl.status = p_data->status;
+ cb_data.exec_cmpl.status = p_data->status;
( *p_clcb->p_rcb->p_cback)(BTA_GATTC_EXEC_EVT, &cb_data);
@@ -1214,7 +1214,7 @@ void bta_gattc_exec_cmpl(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_OP_CMPL *p_data)
** Function bta_gattc_op_cmpl
**
** Description operation completed.
-**
+**
** Returns None.
**
*******************************************************************************/
@@ -1242,11 +1242,11 @@ void bta_gattc_op_cmpl(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
if ( mapped_op > GATTC_OPTYPE_INDICATION) mapped_op = 0;
#if (BT_TRACE_VERBOSE == TRUE)
- APPL_TRACE_ERROR3("expect op:(%s :0x%04x), receive unexpected operation (%s).",
- bta_gattc_op_code_name[mapped_op] , p_clcb->p_q_cmd->hdr.event,
+ APPL_TRACE_ERROR3("expect op:(%s :0x%04x), receive unexpected operation (%s).",
+ bta_gattc_op_code_name[mapped_op] , p_clcb->p_q_cmd->hdr.event,
bta_gattc_op_code_name[op]);
#else
- APPL_TRACE_ERROR3("expect op:(%u :0x%04x), receive unexpected operation (%u).",
+ APPL_TRACE_ERROR3("expect op:(%u :0x%04x), receive unexpected operation (%u).",
mapped_op , p_clcb->p_q_cmd->hdr.event, op);
#endif
return;
@@ -1255,8 +1255,8 @@ void bta_gattc_op_cmpl(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
/* service handle change void the response, discard it */
if (p_clcb->auto_update == BTA_GATTC_DISC_WAITING)
{
- p_clcb->auto_update = BTA_GATTC_REQ_WAITING;
- bta_gattc_sm_execute(p_clcb, BTA_GATTC_INT_DISCOVER_EVT, NULL);
+ p_clcb->auto_update = BTA_GATTC_REQ_WAITING;
+ bta_gattc_sm_execute(p_clcb, BTA_GATTC_INT_DISCOVER_EVT, NULL);
}
else if (op == GATTC_OPTYPE_READ)
bta_gattc_read_cmpl(p_clcb, &p_data->op_cmpl);
@@ -1267,7 +1267,7 @@ void bta_gattc_op_cmpl(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
else if (op == GATTC_OPTYPE_EXE_WRITE)
bta_gattc_exec_cmpl(p_clcb, &p_data->op_cmpl);
/*
- else if (op == GATTC_OPTYPE_CONFIG) // API to be added
+ else if (op == GATTC_OPTYPE_CONFIG) // API to be added
{
}
*/
@@ -1278,13 +1278,13 @@ void bta_gattc_op_cmpl(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
** Function bta_gattc_op_cmpl
**
** Description operation completed.
-**
+**
** Returns None.
**
*******************************************************************************/
void bta_gattc_ignore_op_cmpl(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
{
- /* receive op complete when discovery is started, ignore the response,
+ /* receive op complete when discovery is started, ignore the response,
and wait for discovery finish and resent */
APPL_TRACE_DEBUG1("bta_gattc_ignore_op_cmpl op = %d", p_data->hdr.layer_specific);
@@ -1294,7 +1294,7 @@ void bta_gattc_ignore_op_cmpl(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
** Function bta_gattc_search
**
** Description start a search in the local server cache
-**
+**
** Returns None.
**
*******************************************************************************/
@@ -1321,7 +1321,7 @@ void bta_gattc_search(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
**
** Description enqueue a command into control block, usually because discovery
** operation is busy.
-**
+**
** Returns None.
**
*******************************************************************************/
@@ -1334,7 +1334,7 @@ void bta_gattc_q_cmd(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
** Function bta_gattc_cache_open
**
** Description open a NV cache for loading
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1343,7 +1343,7 @@ void bta_gattc_cache_open(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
bta_gattc_set_discover_st(p_clcb->p_srcb);
APPL_TRACE_DEBUG1("bta_gattc_cache_open conn_id=%d",p_clcb->bta_conn_id);
- bta_gattc_co_cache_open(p_clcb->p_srcb->server_bda, BTA_GATTC_CI_CACHE_OPEN_EVT,
+ bta_gattc_co_cache_open(p_clcb->p_srcb->server_bda, BTA_GATTC_CI_CACHE_OPEN_EVT,
p_clcb->bta_conn_id, FALSE);
}
/*******************************************************************************
@@ -1351,7 +1351,7 @@ void bta_gattc_cache_open(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
** Function bta_gattc_start_load
**
** Description start cache loading by sending callout open cache
-**
+**
** Returns None.
**
*******************************************************************************/
@@ -1364,8 +1364,8 @@ void bta_gattc_ci_open(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
if (p_data->ci_open.status == BTA_GATT_OK)
{
p_clcb->p_srcb->attr_index = 0;
- bta_gattc_co_cache_load(p_clcb->p_srcb->server_bda,
- BTA_GATTC_CI_CACHE_LOAD_EVT,
+ bta_gattc_co_cache_load(p_clcb->p_srcb->server_bda,
+ BTA_GATTC_CI_CACHE_LOAD_EVT,
p_clcb->p_srcb->attr_index,
p_clcb->bta_conn_id);
}
@@ -1398,7 +1398,7 @@ void bta_gattc_ci_open(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
** Function bta_gattc_ci_load
**
** Description cache loading received.
-**
+**
** Returns None.
**
*******************************************************************************/
@@ -1409,8 +1409,8 @@ void bta_gattc_ci_load(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
p_clcb->bta_conn_id, p_data->ci_load.status );
bta_gattc_co_cache_close(p_clcb->p_srcb->server_bda, 0);
- if ((p_data->ci_load.status == BTA_GATT_OK ||
- p_data->ci_load.status == BTA_GATT_MORE) &&
+ if ((p_data->ci_load.status == BTA_GATT_OK ||
+ p_data->ci_load.status == BTA_GATT_MORE) &&
p_data->ci_load.num_attr > 0)
{
bta_gattc_rebuild_cache(p_clcb->p_srcb, p_data->ci_load.num_attr, p_data->ci_load.attr, p_clcb->p_srcb->attr_index);
@@ -1425,9 +1425,9 @@ void bta_gattc_ci_load(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
{
p_clcb->p_srcb->attr_index += p_data->ci_load.num_attr;
- bta_gattc_co_cache_load(p_clcb->p_srcb->server_bda,
- BTA_GATTC_CI_CACHE_LOAD_EVT,
- p_clcb->p_srcb->attr_index,
+ bta_gattc_co_cache_load(p_clcb->p_srcb->server_bda,
+ BTA_GATTC_CI_CACHE_LOAD_EVT,
+ p_clcb->p_srcb->attr_index,
p_clcb->bta_conn_id);
}
}
@@ -1443,7 +1443,7 @@ void bta_gattc_ci_load(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
** Function bta_gattc_ci_load
**
** Description cache loading received.
-**
+**
** Returns None.
**
*******************************************************************************/
@@ -1455,7 +1455,7 @@ void bta_gattc_ci_save(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
if (!bta_gattc_cache_save(p_clcb->p_srcb, p_clcb->bta_conn_id))
{
p_clcb->p_srcb->attr_index = 0;
- bta_gattc_co_cache_close(p_clcb->p_srcb->server_bda, 0);
+ bta_gattc_co_cache_close(p_clcb->p_srcb->server_bda, 0);
bta_gattc_reset_discover_st(p_clcb->p_srcb);
}
}
@@ -1465,7 +1465,7 @@ void bta_gattc_ci_save(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
** Function bta_gattc_fail
**
** Description report API call failure back to apps
-**
+**
** Returns None.
**
*******************************************************************************/
@@ -1482,17 +1482,17 @@ void bta_gattc_fail(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
** bta_gattc_cmpl_cback
**
** Description callback functions to GATT client stack.
-**
+**
** Returns void
**
*******************************************************************************/
-static void bta_gattc_conn_cback(tGATT_IF gattc_if, BD_ADDR bda, UINT16 conn_id,
+static void bta_gattc_conn_cback(tGATT_IF gattc_if, BD_ADDR bda, UINT16 conn_id,
BOOLEAN connected, tGATT_DISCONN_REASON reason)
{
BT_HDR *p_buf;
tBTA_GATTC_CLCB *p_clcb = NULL;
- APPL_TRACE_DEBUG4("bta_gattc_conn_cback: cif = %d connected = %d conn_id = %d reaosn = 0x%04x",
+ APPL_TRACE_DEBUG4("bta_gattc_conn_cback: cif = %d connected = %d conn_id = %d reaosn = 0x%04x",
gattc_if, connected, conn_id, reason);
if (connected)
@@ -1500,7 +1500,7 @@ static void bta_gattc_conn_cback(tGATT_IF gattc_if, BD_ADDR bda, UINT16 conn_id,
/* outgoing connection : locate a logic channel */
if ((p_clcb = bta_gattc_find_clcb_by_cif(gattc_if, bda)) == NULL)
{
-
+
#if BLE_INCLUDED == TRUE
/* for a background connection */
if (L2CA_GetBleConnRole(bda)== HCI_ROLE_MASTER &&
@@ -1554,15 +1554,15 @@ static void bta_gattc_conn_cback(tGATT_IF gattc_if, BD_ADDR bda, UINT16 conn_id,
** Function bta_gattc_process_srvc_chg_ind
**
** Description process service change indication.
-**
+**
** Returns None.
**
*******************************************************************************/
-BOOLEAN bta_gattc_process_srvc_chg_ind(UINT16 conn_id,
+BOOLEAN bta_gattc_process_srvc_chg_ind(UINT16 conn_id,
tBTA_GATTC_RCB *p_clrcb,
- tBTA_GATTC_SERV *p_srcb,
- tBTA_GATTC_CLCB *p_clcb,
- tBTA_GATTC_NOTIFY *p_notify,
+ tBTA_GATTC_SERV *p_srcb,
+ tBTA_GATTC_CLCB *p_clcb,
+ tBTA_GATTC_NOTIFY *p_notify,
UINT16 handle)
{
tBT_UUID gattp_uuid, srvc_chg_uuid;
@@ -1587,12 +1587,12 @@ BOOLEAN bta_gattc_process_srvc_chg_ind(UINT16 conn_id,
if ( ++ p_srcb->update_count == bta_gattc_num_reg_app())
{
/* not an opened connection; or connection busy */
- /* search for first available clcb and start discovery */
+ /* search for first available clcb and start discovery */
if (p_clcb == NULL || (p_clcb && p_clcb->p_q_cmd != NULL))
{
for (i = 0 ; i < BTA_GATTC_CLCB_MAX; i ++)
{
- if (bta_gattc_cb.clcb[i].in_use &&
+ if (bta_gattc_cb.clcb[i].in_use &&
bta_gattc_cb.clcb[i].p_srcb == p_srcb &&
bta_gattc_cb.clcb[i].p_q_cmd == NULL)
{
@@ -1603,18 +1603,18 @@ BOOLEAN bta_gattc_process_srvc_chg_ind(UINT16 conn_id,
}
/* send confirmation here if this is an indication, it should always be */
GATTC_SendHandleValueConfirm(conn_id, handle);
-
+
/* if connection available, refresh cache by doing discovery now */
if (p_clcb != NULL)
bta_gattc_sm_execute(p_clcb, BTA_GATTC_INT_DISCOVER_EVT, NULL);
- }
+ }
/* notify applicationf or service change */
if (p_clrcb->p_cback != NULL)
{
APPL_TRACE_ERROR0("bta_gattc_process_srvc_chg_ind 2");
(* p_clrcb->p_cback)(BTA_GATTC_SRVC_CHG_EVT, (tBTA_GATTC *)p_srcb->server_bda);
}
-
+
}
return processed;
@@ -1625,17 +1625,17 @@ BOOLEAN bta_gattc_process_srvc_chg_ind(UINT16 conn_id,
** Function bta_gattc_proc_other_indication
**
** Description process all non-service change indication/notification.
-**
+**
** Returns None.
**
*******************************************************************************/
-void bta_gattc_proc_other_indication(tBTA_GATTC_CLCB *p_clcb, UINT8 op,
+void bta_gattc_proc_other_indication(tBTA_GATTC_CLCB *p_clcb, UINT8 op,
tGATT_CL_COMPLETE *p_data,
tBTA_GATTC_NOTIFY *p_notify)
{
APPL_TRACE_DEBUG2("bta_gattc_proc_other_indication check \
- p_data->att_value.handle=%d p_data->handle=%d",
- p_data->att_value.handle, p_data->handle);
+ p_data->att_value.handle=%d p_data->handle=%d",
+ p_data->att_value.handle, p_data->handle);
APPL_TRACE_DEBUG1("is_notify", p_notify->is_notify);
p_notify->is_notify = (op == GATTC_OPTYPE_INDICATION) ? FALSE : TRUE;
@@ -1646,20 +1646,20 @@ void bta_gattc_proc_other_indication(tBTA_GATTC_CLCB *p_clcb, UINT8 op,
if (p_clcb->p_rcb->p_cback)
(*p_clcb->p_rcb->p_cback)(BTA_GATTC_NOTIF_EVT, (tBTA_GATTC *)p_notify);
-
+
}
/*******************************************************************************
**
** Function bta_gattc_process_indicate
**
** Description process indication/notification.
-**
+**
** Returns None.
**
*******************************************************************************/
void bta_gattc_process_indicate(UINT16 conn_id, tGATTC_OPTYPE op, tGATT_CL_COMPLETE *p_data)
{
- UINT16 handle = p_data->att_value.handle;
+ UINT16 handle = p_data->att_value.handle;
tBTA_GATTC_CLCB *p_clcb ;
tBTA_GATTC_RCB *p_clrcb = NULL;
tBTA_GATTC_SERV *p_srcb = NULL;
@@ -1687,9 +1687,9 @@ void bta_gattc_process_indicate(UINT16 conn_id, tGATTC_OPTYPE op, tGATT_CL_COMPL
p_clcb = bta_gattc_find_clcb_by_conn_id(conn_id);
- if (bta_gattc_handle2id(p_srcb, handle,
- &notify.char_id.srvc_id,
- &notify.char_id.char_id,
+ if (bta_gattc_handle2id(p_srcb, handle,
+ &notify.char_id.srvc_id,
+ &notify.char_id.char_id,
&notify.descr_type))
{
/* if non-service change indication/notification, forward to application */
@@ -1706,8 +1706,8 @@ void bta_gattc_process_indicate(UINT16 conn_id, tGATTC_OPTYPE op, tGATT_CL_COMPL
p_clcb->bta_conn_id = conn_id;
/* send connection event */
- bta_gattc_send_open_cback(p_clrcb,
- BTA_GATT_OK,
+ bta_gattc_send_open_cback(p_clrcb,
+ BTA_GATT_OK,
remote_bda,
conn_id);
}
@@ -1717,17 +1717,17 @@ void bta_gattc_process_indicate(UINT16 conn_id, tGATTC_OPTYPE op, tGATT_CL_COMPL
}
}
- if (p_clcb != NULL)
- bta_gattc_proc_other_indication(p_clcb, op, p_data, &notify);
+ if (p_clcb != NULL)
+ bta_gattc_proc_other_indication(p_clcb, op, p_data, &notify);
}
/* no one intersted and need ack? */
else if (op == GATTC_OPTYPE_INDICATION)
{
- APPL_TRACE_DEBUG0("no one interested, ack now");
- GATTC_SendHandleValueConfirm(conn_id, handle);
+ APPL_TRACE_DEBUG0("no one interested, ack now");
+ GATTC_SendHandleValueConfirm(conn_id, handle);
}
}
- }
+ }
else
{
APPL_TRACE_ERROR1("Indi/Notif for Unknown handle[0x%04x], can not find in local cache.", handle);
@@ -1739,18 +1739,18 @@ void bta_gattc_process_indicate(UINT16 conn_id, tGATTC_OPTYPE op, tGATT_CL_COMPL
** Function bta_gattc_cmpl_cback
**
** Description client operation complete callback register with BTE GATT.
-**
+**
** Returns None.
**
*******************************************************************************/
-static void bta_gattc_cmpl_cback(UINT16 conn_id, tGATTC_OPTYPE op, tGATT_STATUS status,
+static void bta_gattc_cmpl_cback(UINT16 conn_id, tGATTC_OPTYPE op, tGATT_STATUS status,
tGATT_CL_COMPLETE *p_data)
{
tBTA_GATTC_CLCB *p_clcb ;
tBTA_GATTC_OP_CMPL *p_buf;
UINT16 len = sizeof(tBTA_GATTC_OP_CMPL) + sizeof(tGATT_CL_COMPLETE);
- APPL_TRACE_DEBUG3("bta_gattc_cmpl_cback: conn_id = %d op = %d status = %d",
+ APPL_TRACE_DEBUG3("bta_gattc_cmpl_cback: conn_id = %d op = %d status = %d",
conn_id, op, status);
/* notification and indication processed right away */
@@ -1761,7 +1761,7 @@ static void bta_gattc_cmpl_cback(UINT16 conn_id, tGATTC_OPTYPE op, tGATT_STATUS
}
/* for all other operation, not expected if w/o connection */
else if ((p_clcb = bta_gattc_find_clcb_by_conn_id(conn_id)) == NULL)
- {
+ {
APPL_TRACE_ERROR1("bta_gattc_cmpl_cback unknown conn_id = %d, ignore data", conn_id);
return;
}
diff --git a/bta/gatt/bta_gattc_api.c b/bta/gatt/bta_gattc_api.c
index 4a87ddf..5472600 100644
--- a/bta/gatt/bta_gattc_api.c
+++ b/bta/gatt/bta_gattc_api.c
@@ -2,7 +2,7 @@
**
** Name: bta_gattc_api.c
**
-** Description: This is the implementation of the API for GATT module
+** Description: This is the implementation of the API for GATT module
** of BTA.
**
** Copyright (c) 2010-2011, Broadcom Corp., All Rights Reserved.
@@ -11,7 +11,7 @@
*****************************************************************************/
#include "bt_target.h"
-
+
#if defined(BTA_GATT_INCLUDED) && (BTA_GATT_INCLUDED == TRUE)
#include <string.h>
@@ -34,13 +34,13 @@ static const tBTA_SYS_REG bta_gatt_reg =
**
** Function BTA_GATTC_AppRegister
**
-** Description This function is called to register application callbacks
+** Description This function is called to register application callbacks
** with BTA GATTC module.
**
** Parameters p_app_uuid - applicaiton UUID
** p_client_cb - pointer to the application callback function.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
void BTA_GATTC_AppRegister(tBT_UUID *p_app_uuid, tBTA_GATTC_CBACK *p_client_cb)
@@ -68,12 +68,12 @@ void BTA_GATTC_AppRegister(tBT_UUID *p_app_uuid, tBTA_GATTC_CBACK *p_client_cb)
**
** Function BTA_GATTC_AppDeregister
**
-** Description This function is called to deregister an application
+** Description This function is called to deregister an application
** from BTA GATTC module.
**
** Parameters client_if - client interface identifier.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
void BTA_GATTC_AppDeregister(tBTA_GATTC_IF client_if)
@@ -95,7 +95,7 @@ void BTA_GATTC_AppDeregister(tBTA_GATTC_IF client_if)
**
** Description Open a direct connection or add a background auto connection
** bd address
-**
+**
** Parameters client_if: server interface.
** remote_bda: remote device BD address.
** is_direct: direct connection or background auto connection
@@ -127,7 +127,7 @@ void BTA_GATTC_Open(tBTA_GATTC_IF client_if, BD_ADDR remote_bda, BOOLEAN is_dire
**
** Description Cancel a direct open connection or remove a background auto connection
** bd address
-**
+**
** Parameters client_if: server interface.
** remote_bda: remote device BD address.
** is_direct: direct connection or background auto connection
@@ -157,7 +157,7 @@ void BTA_GATTC_CancelOpen(tBTA_GATTC_IF client_if, BD_ADDR remote_bda, BOOLEAN i
** Function BTA_GATTC_Close
**
** Description Close a connection to a GATT server.
-**
+**
** Parameters conn_id: connectino ID to be closed.
**
** Returns void
@@ -182,16 +182,16 @@ void BTA_GATTC_Close(UINT16 conn_id)
**
** Function BTA_GATTC_ServiceSearchRequest
**
-** Description This function is called to request a GATT service discovery
+** Description This function is called to request a GATT service discovery
** on a GATT server. This function report service search result
** by a callback event, and followed by a service search complete
** event.
**
-** Parameters conn_id: connection ID.
+** Parameters conn_id: connection ID.
** p_srvc_uuid: a UUID of the service application is interested in.
** If Null, discover for all services.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
void BTA_GATTC_ServiceSearchRequest (UINT16 conn_id, tBT_UUID *p_srvc_uuid)
@@ -223,19 +223,19 @@ void BTA_GATTC_ServiceSearchRequest (UINT16 conn_id, tBT_UUID *p_srvc_uuid)
** Description This function is called to find the first charatceristic of the
** service on the given server.
**
-** Parameters conn_id: connection ID which identify the server.
+** Parameters conn_id: connection ID which identify the server.
** p_srvc_id: the service ID of which the characteristic is belonged to.
** p_char_uuid_cond: Characteristic UUID, if NULL find the first available
-** characteristic.
-** p_char_result: output parameter which will store the GATT
+** characteristic.
+** p_char_result: output parameter which will store the GATT
** characteristic ID.
** p_property: output parameter to carry the characteristic property.
**
-** Returns returns status.
+** Returns returns status.
**
*******************************************************************************/
-tBTA_GATT_STATUS BTA_GATTC_GetFirstChar (UINT16 conn_id, tBTA_GATT_SRVC_ID *p_srvc_id,
- tBT_UUID *p_char_uuid_cond,
+tBTA_GATT_STATUS BTA_GATTC_GetFirstChar (UINT16 conn_id, tBTA_GATT_SRVC_ID *p_srvc_id,
+ tBT_UUID *p_char_uuid_cond,
tBTA_GATTC_CHAR_ID *p_char_result,
tBTA_GATT_CHAR_PROP *p_property)
{
@@ -244,8 +244,8 @@ tBTA_GATT_STATUS BTA_GATTC_GetFirstChar (UINT16 conn_id, tBTA_GATT_SRVC_ID *p_s
if (!p_srvc_id || !p_char_result)
return BTA_GATT_ILLEGAL_PARAMETER;
- if ((status = bta_gattc_query_cache(conn_id, BTA_GATTC_ATTR_TYPE_CHAR, p_srvc_id, NULL,
- p_char_uuid_cond, &p_char_result->char_id, p_property))
+ if ((status = bta_gattc_query_cache(conn_id, BTA_GATTC_ATTR_TYPE_CHAR, p_srvc_id, NULL,
+ p_char_uuid_cond, &p_char_result->char_id, p_property))
== BTA_GATT_OK)
{
memcpy(&p_char_result->srvc_id, p_srvc_id, sizeof(tBTA_GATT_SRVC_ID));
@@ -261,21 +261,21 @@ tBTA_GATT_STATUS BTA_GATTC_GetFirstChar (UINT16 conn_id, tBTA_GATT_SRVC_ID *p_s
** Description This function is called to find the next charatceristic of the
** service on the given server.
**
-** Parameters conn_id: connection ID which identify the server.
-** p_start_char_id: start the characteristic search from the next record
+** Parameters conn_id: connection ID which identify the server.
+** p_start_char_id: start the characteristic search from the next record
** after the one identified by char_id.
** p_char_uuid_cond: Characteristic UUID, if NULL find the first available
-** characteristic.
-** p_char_result: output parameter which will store the GATT
-** characteristic ID.
+** characteristic.
+** p_char_result: output parameter which will store the GATT
+** characteristic ID.
** p_property: output parameter to carry the characteristic property.
**
-** Returns returns status.
+** Returns returns status.
**
*******************************************************************************/
-tBTA_GATT_STATUS BTA_GATTC_GetNextChar (UINT16 conn_id,
+tBTA_GATT_STATUS BTA_GATTC_GetNextChar (UINT16 conn_id,
tBTA_GATTC_CHAR_ID *p_start_char_id,
- tBT_UUID *p_char_uuid_cond,
+ tBT_UUID *p_char_uuid_cond,
tBTA_GATTC_CHAR_ID *p_char_result,
tBTA_GATT_CHAR_PROP *p_property)
{
@@ -284,12 +284,12 @@ tBTA_GATT_STATUS BTA_GATTC_GetNextChar (UINT16 conn_id,
if (!p_start_char_id || !p_char_result)
return BTA_GATT_ILLEGAL_PARAMETER;
- if ((status = bta_gattc_query_cache(conn_id, BTA_GATTC_ATTR_TYPE_CHAR,
+ if ((status = bta_gattc_query_cache(conn_id, BTA_GATTC_ATTR_TYPE_CHAR,
&p_start_char_id->srvc_id,
&p_start_char_id->char_id,
- p_char_uuid_cond,
+ p_char_uuid_cond,
&p_char_result->char_id,
- p_property))
+ p_property))
== BTA_GATT_OK)
{
memcpy(&p_char_result->srvc_id, &p_start_char_id->srvc_id, sizeof(tBTA_GATT_SRVC_ID));
@@ -305,18 +305,18 @@ tBTA_GATT_STATUS BTA_GATTC_GetNextChar (UINT16 conn_id,
** Description This function is called to find the first charatceristic descriptor of the
** charatceristic on the given server.
**
-** Parameters conn_id: connection ID which identify the server.
+** Parameters conn_id: connection ID which identify the server.
** p_char_id: the characteristic ID of which the descriptor is belonged to.
** p_descr_uuid_cond: Characteristic Descr UUID, if NULL find the first available
-** characteristic.
-** p_descr_result: output parameter which will store the GATT
+** characteristic.
+** p_descr_result: output parameter which will store the GATT
** characteristic descriptor ID.
**
-** Returns returns status.
+** Returns returns status.
**
*******************************************************************************/
-tBTA_GATT_STATUS BTA_GATTC_GetFirstCharDescr (UINT16 conn_id, tBTA_GATTC_CHAR_ID *p_char_id,
- tBT_UUID *p_descr_uuid_cond,
+tBTA_GATT_STATUS BTA_GATTC_GetFirstCharDescr (UINT16 conn_id, tBTA_GATTC_CHAR_ID *p_char_id,
+ tBT_UUID *p_descr_uuid_cond,
tBTA_GATTC_CHAR_DESCR_ID *p_descr_result)
{
tBTA_GATT_STATUS status;
@@ -326,13 +326,13 @@ tBTA_GATT_STATUS BTA_GATTC_GetFirstCharDescr (UINT16 conn_id, tBTA_GATTC_CHAR_I
memset(p_descr_result, 0, sizeof(tBTA_GATTC_CHAR_DESCR_ID));
- if ((status = bta_gattc_query_cache(conn_id,
- BTA_GATTC_ATTR_TYPE_CHAR_DESCR,
- &p_char_id->srvc_id,
- &p_char_id->char_id,
- p_descr_uuid_cond,
- &p_descr_result->char_id.char_id,
- NULL))
+ if ((status = bta_gattc_query_cache(conn_id,
+ BTA_GATTC_ATTR_TYPE_CHAR_DESCR,
+ &p_char_id->srvc_id,
+ &p_char_id->char_id,
+ p_descr_uuid_cond,
+ &p_descr_result->char_id.char_id,
+ NULL))
== BTA_GATT_OK)
{
memcpy(&p_descr_result->descr_type, &p_descr_result->char_id.char_id.uuid, sizeof(tBT_UUID));
@@ -349,20 +349,20 @@ tBTA_GATT_STATUS BTA_GATTC_GetFirstCharDescr (UINT16 conn_id, tBTA_GATTC_CHAR_I
** Description This function is called to find the next charatceristic of the
** service on the given server.
**
-** Parameters conn_id: connection ID which identify the server.
-** p_start_descr_id: start the characteristic search from the next record
+** Parameters conn_id: connection ID which identify the server.
+** p_start_descr_id: start the characteristic search from the next record
** after the one identified by p_start_descr_id.
-** p_descr_uuid_cond: Characteristic descriptor UUID, if NULL find
-** the first available characteristic descriptor.
-** p_descr_result: output parameter which will store the GATT
-** characteristic descriptor ID.
+** p_descr_uuid_cond: Characteristic descriptor UUID, if NULL find
+** the first available characteristic descriptor.
+** p_descr_result: output parameter which will store the GATT
+** characteristic descriptor ID.
**
-** Returns returns status.
+** Returns returns status.
**
*******************************************************************************/
-tBTA_GATT_STATUS BTA_GATTC_GetNextCharDescr (UINT16 conn_id,
+tBTA_GATT_STATUS BTA_GATTC_GetNextCharDescr (UINT16 conn_id,
tBTA_GATTC_CHAR_DESCR_ID *p_start_descr_id,
- tBT_UUID *p_descr_uuid_cond,
+ tBT_UUID *p_descr_uuid_cond,
tBTA_GATTC_CHAR_DESCR_ID *p_descr_result)
{
tBTA_GATT_STATUS status;
@@ -372,18 +372,18 @@ tBTA_GATT_STATUS BTA_GATTC_GetNextCharDescr (UINT16 conn_id,
memset(p_descr_result, 0, sizeof(tBTA_GATTC_CHAR_DESCR_ID));
- if ((status = bta_gattc_query_cache(conn_id, BTA_GATTC_ATTR_TYPE_CHAR_DESCR,
+ if ((status = bta_gattc_query_cache(conn_id, BTA_GATTC_ATTR_TYPE_CHAR_DESCR,
&p_start_descr_id->char_id.srvc_id,
&p_start_descr_id->char_id.char_id,
- p_descr_uuid_cond,
+ p_descr_uuid_cond,
&p_descr_result->char_id.char_id,
- (void *)&p_start_descr_id->descr_type))
+ (void *)&p_start_descr_id->descr_type))
== BTA_GATT_OK)
{
memcpy(&p_descr_result->descr_type, &p_descr_result->char_id.char_id.uuid, sizeof(tBT_UUID));
memcpy(&p_descr_result->char_id, p_start_descr_id, sizeof(tBTA_GATTC_CHAR_ID));
}
-
+
return status;
}
@@ -395,14 +395,14 @@ tBTA_GATT_STATUS BTA_GATTC_GetNextCharDescr (UINT16 conn_id,
** Description This function is called to find the first included service of the
** service on the given server.
**
-** Parameters conn_id: connection ID which identify the server.
-** p_srvc_id: the service ID of which the characteristic is belonged to.
+** Parameters conn_id: connection ID which identify the server.
+** p_srvc_id: the service ID of which the characteristic is belonged to.
** p_uuid_cond: Characteristic UUID, if NULL find the first available
-** characteristic.
-** p_result: output parameter which will store the GATT ID
+** characteristic.
+** p_result: output parameter which will store the GATT ID
** of the included service found.
**
-** Returns returns status.
+** Returns returns status.
**
*******************************************************************************/
tBTA_GATT_STATUS BTA_GATTC_GetFirstIncludedService(UINT16 conn_id, tBTA_GATT_SRVC_ID *p_srvc_id,
@@ -413,13 +413,13 @@ tBTA_GATT_STATUS BTA_GATTC_GetFirstIncludedService(UINT16 conn_id, tBTA_GATT_SR
if (!p_srvc_id || !p_result)
return BTA_GATT_ILLEGAL_PARAMETER;
- if ((status = bta_gattc_query_cache(conn_id,
- BTA_GATTC_ATTR_TYPE_INCL_SRVC,
+ if ((status = bta_gattc_query_cache(conn_id,
+ BTA_GATTC_ATTR_TYPE_INCL_SRVC,
p_srvc_id,
NULL,
- p_uuid_cond,
+ p_uuid_cond,
&p_result->incl_svc_id.id,
- (tBTA_GATT_CHAR_PROP *)&p_result->incl_svc_id.is_primary))
+ (tBTA_GATT_CHAR_PROP *)&p_result->incl_svc_id.is_primary))
== BTA_GATT_OK)
{
memcpy(&p_result->srvc_id, p_srvc_id, sizeof(tBTA_GATT_SRVC_ID));
@@ -434,20 +434,20 @@ tBTA_GATT_STATUS BTA_GATTC_GetFirstIncludedService(UINT16 conn_id, tBTA_GATT_SR
** Description This function is called to find the next included service of the
** service on the given server.
**
-** Parameters conn_id: connection ID which identify the server.
-** p_start_id: start the search from the next record
-** after the one identified by p_start_id.
+** Parameters conn_id: connection ID which identify the server.
+** p_start_id: start the search from the next record
+** after the one identified by p_start_id.
** p_uuid_cond: Included service UUID, if NULL find the first available
-** included service.
-** p_result: output parameter which will store the GATT ID
+** included service.
+** p_result: output parameter which will store the GATT ID
** of the included service found.
**
-** Returns returns status.
+** Returns returns status.
**
*******************************************************************************/
-tBTA_GATT_STATUS BTA_GATTC_GetNextIncludedService(UINT16 conn_id,
+tBTA_GATT_STATUS BTA_GATTC_GetNextIncludedService(UINT16 conn_id,
tBTA_GATTC_INCL_SVC_ID *p_start_id,
- tBT_UUID *p_uuid_cond,
+ tBT_UUID *p_uuid_cond,
tBTA_GATTC_INCL_SVC_ID *p_result)
{
tBTA_GATT_STATUS status;
@@ -455,13 +455,13 @@ tBTA_GATT_STATUS BTA_GATTC_GetNextIncludedService(UINT16 conn_id,
if (!p_start_id || !p_result)
return BTA_GATT_ILLEGAL_PARAMETER;
- if ((status = bta_gattc_query_cache(conn_id,
- BTA_GATTC_ATTR_TYPE_INCL_SRVC,
+ if ((status = bta_gattc_query_cache(conn_id,
+ BTA_GATTC_ATTR_TYPE_INCL_SRVC,
&p_start_id->srvc_id,
&p_start_id->incl_svc_id.id,
- p_uuid_cond,
+ p_uuid_cond,
&p_result->incl_svc_id.id,
- (tBTA_GATT_CHAR_PROP *)&p_result->incl_svc_id.is_primary))
+ (tBTA_GATT_CHAR_PROP *)&p_result->incl_svc_id.is_primary))
== BTA_GATT_OK)
{
memcpy(&p_result->srvc_id, &p_start_id->srvc_id, sizeof(tBTA_GATT_SRVC_ID));
@@ -480,10 +480,10 @@ tBTA_GATT_STATUS BTA_GATTC_GetNextIncludedService(UINT16 conn_id,
** Parameters conn_id - connectino ID.
** p_char_id - characteritic ID to read.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
-void BTA_GATTC_ReadCharacteristic(UINT16 conn_id, tBTA_GATTC_CHAR_ID *p_char_id,
+void BTA_GATTC_ReadCharacteristic(UINT16 conn_id, tBTA_GATTC_CHAR_ID *p_char_id,
tBTA_GATT_AUTH_REQ auth_req)
{
tBTA_GATTC_API_READ *p_buf;
@@ -513,10 +513,10 @@ void BTA_GATTC_ReadCharacteristic(UINT16 conn_id, tBTA_GATTC_CHAR_ID *p_char_id,
** Parameters conn_id - connection ID.
** p_char_descr_id - characteritic descriptor ID to read.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
-void BTA_GATTC_ReadCharDescr (UINT16 conn_id,
+void BTA_GATTC_ReadCharDescr (UINT16 conn_id,
tBTA_GATTC_CHAR_DESCR_ID *p_descr_id,
tBTA_GATT_AUTH_REQ auth_req)
{
@@ -549,7 +549,7 @@ void BTA_GATTC_ReadCharDescr (UINT16 conn_id,
** Parameters conn_id - connectino ID.
** p_read_multi - pointer to the read multiple parameter.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
void BTA_GATTC_ReadMultiple(UINT16 conn_id, tBTA_GATTC_MULTI *p_read_multi,
@@ -557,7 +557,7 @@ void BTA_GATTC_ReadMultiple(UINT16 conn_id, tBTA_GATTC_MULTI *p_read_multi,
{
tBTA_GATTC_API_READ_MULTI *p_buf;
tBTA_GATTC_ATTR_ID *p_value;
- UINT16 len = (UINT16)(sizeof(tBTA_GATTC_API_READ_MULTI) +
+ UINT16 len = (UINT16)(sizeof(tBTA_GATTC_API_READ_MULTI) +
p_read_multi->num_attr * sizeof(tBTA_GATTC_ATTR_ID));
UINT8 i;
@@ -598,11 +598,11 @@ void BTA_GATTC_ReadMultiple(UINT16 conn_id, tBTA_GATTC_MULTI *p_read_multi,
** len: length of the data to be written.
** p_value - the value to be written.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
-void BTA_GATTC_WriteCharValue ( UINT16 conn_id,
- tBTA_GATTC_CHAR_ID *p_char_id,
+void BTA_GATTC_WriteCharValue ( UINT16 conn_id,
+ tBTA_GATTC_CHAR_ID *p_char_id,
tBTA_GATTC_WRITE_TYPE write_type,
UINT16 len,
UINT8 *p_value,
@@ -645,16 +645,16 @@ void BTA_GATTC_WriteCharValue ( UINT16 conn_id,
** write_type - write type.
** p_value - the value to be written.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
-void BTA_GATTC_WriteCharDescr (UINT16 conn_id,
- tBTA_GATTC_CHAR_DESCR_ID *p_char_descr_id,
+void BTA_GATTC_WriteCharDescr (UINT16 conn_id,
+ tBTA_GATTC_CHAR_DESCR_ID *p_char_descr_id,
tBTA_GATTC_WRITE_TYPE write_type,
tBTA_GATT_UNFMT *p_data,
tBTA_GATT_AUTH_REQ auth_req)
{
- tBTA_GATTC_API_WRITE *p_buf;
+ tBTA_GATTC_API_WRITE *p_buf;
UINT16 len = sizeof(tBTA_GATTC_API_WRITE) + p_data->len;
if ((p_buf = (tBTA_GATTC_API_WRITE *) GKI_getbuf(len)) != NULL)
@@ -695,10 +695,10 @@ void BTA_GATTC_WriteCharDescr (UINT16 conn_id,
** len: length of the data to be written.
** p_value - the value to be written.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
-void BTA_GATTC_PrepareWrite (UINT16 conn_id, tBTA_GATTC_CHAR_ID *p_char_id,
+void BTA_GATTC_PrepareWrite (UINT16 conn_id, tBTA_GATTC_CHAR_ID *p_char_id,
UINT16 offset, UINT16 len, UINT8 *p_value,
tBTA_GATT_AUTH_REQ auth_req)
{
@@ -739,7 +739,7 @@ void BTA_GATTC_PrepareWrite (UINT16 conn_id, tBTA_GATTC_CHAR_ID *p_char_id,
** Parameters conn_id - connection ID.
** is_execute - execute or cancel.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
void BTA_GATTC_ExecuteWrite (UINT16 conn_id, BOOLEAN is_execute)
@@ -769,15 +769,15 @@ void BTA_GATTC_ExecuteWrite (UINT16 conn_id, BOOLEAN is_execute)
** Parameters conn_id - connection ID.
** p_char_id - characteristic ID to confirm.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
void BTA_GATTC_SendIndConfirm (UINT16 conn_id, tBTA_GATTC_CHAR_ID *p_char_id)
{
- tBTA_GATTC_API_CONFIRM *p_buf;
+ tBTA_GATTC_API_CONFIRM *p_buf;
- APPL_TRACE_API3("BTA_GATTC_SendIndConfirm conn_id=%d service uuid1=0x%x char uuid=0x%x",
- conn_id, p_char_id->srvc_id.id.uuid.uu.uuid16, p_char_id->char_id.uuid.uu.uuid16); //toto
+ APPL_TRACE_API3("BTA_GATTC_SendIndConfirm conn_id=%d service uuid1=0x%x char uuid=0x%x",
+ conn_id, p_char_id->srvc_id.id.uuid.uu.uuid16, p_char_id->char_id.uuid.uu.uuid16); //toto
if ((p_buf = (tBTA_GATTC_API_CONFIRM *) GKI_getbuf(sizeof(tBTA_GATTC_API_CONFIRM))) != NULL)
{
@@ -805,11 +805,11 @@ void BTA_GATTC_SendIndConfirm (UINT16 conn_id, tBTA_GATTC_CHAR_ID *p_char_id)
** bda - target GATT server.
** p_char_id - pointer to GATT characteristic ID.
**
-** Returns OK if registration succeed, otherwise failed.
+** Returns OK if registration succeed, otherwise failed.
**
*******************************************************************************/
-tBTA_GATT_STATUS BTA_GATTC_RegisterForNotifications (tBTA_GATTC_IF client_if,
- BD_ADDR bda,
+tBTA_GATT_STATUS BTA_GATTC_RegisterForNotifications (tBTA_GATTC_IF client_if,
+ BD_ADDR bda,
tBTA_GATTC_CHAR_ID *p_char_id)
{
tBTA_GATTC_RCB *p_clreg;
@@ -822,7 +822,7 @@ tBTA_GATT_STATUS BTA_GATTC_RegisterForNotifications (tBTA_GATTC_IF client_if,
return status;
}
- /* lock other GKI task */
+ /* lock other GKI task */
GKI_sched_lock();
if ((p_clreg = bta_gattc_cl_get_regcb(client_if)) != NULL)
@@ -850,11 +850,11 @@ tBTA_GATT_STATUS BTA_GATTC_RegisterForNotifications (tBTA_GATTC_IF client_if,
else
{
APPL_TRACE_ERROR1("Client_if: %d Not Registered", client_if);
- }
+ }
GKI_sched_unlock();
- return status;
+ return status;
}
/*******************************************************************************
@@ -867,11 +867,11 @@ tBTA_GATT_STATUS BTA_GATTC_RegisterForNotifications (tBTA_GATTC_IF client_if,
** bda - target GATT server.
** p_char_id - pointer to GATT characteristic ID.
**
-** Returns OK if deregistration succeed, otherwise failed.
+** Returns OK if deregistration succeed, otherwise failed.
**
*******************************************************************************/
-tBTA_GATT_STATUS BTA_GATTC_DeregisterForNotifications (tBTA_GATTC_IF client_if,
- BD_ADDR bda,
+tBTA_GATT_STATUS BTA_GATTC_DeregisterForNotifications (tBTA_GATTC_IF client_if,
+ BD_ADDR bda,
tBTA_GATTC_CHAR_ID *p_char_id)
{
tBTA_GATTC_RCB *p_clreg;
@@ -884,7 +884,7 @@ tBTA_GATT_STATUS BTA_GATTC_DeregisterForNotifications (tBTA_GATTC_IF client_if,
return status;
}
- /* lock other GKI task */
+ /* lock other GKI task */
GKI_sched_lock();
if ((p_clreg = bta_gattc_cl_get_regcb(client_if)) != NULL)
@@ -907,16 +907,16 @@ tBTA_GATT_STATUS BTA_GATTC_DeregisterForNotifications (tBTA_GATTC_IF client_if,
status = BTA_GATT_ERROR;
APPL_TRACE_ERROR0("registration not found");
- }
+ }
}
else
{
APPL_TRACE_ERROR1("Client_if: %d Not Registered", client_if);
- }
+ }
GKI_sched_unlock();
- return status;
+ return status;
}
#endif /* BTA_GATT_INCLUDED */
diff --git a/bta/gatt/bta_gattc_cache.c b/bta/gatt/bta_gattc_cache.c
index 7234598..4d2e00a 100644
--- a/bta/gatt/bta_gattc_cache.c
+++ b/bta/gatt/bta_gattc_cache.c
@@ -2,7 +2,7 @@
**
** Name: bta_gattc_cache.c
**
-** Description: This file contains the GATT client discovery
+** Description: This file contains the GATT client discovery
** procedures and cache related functions.
**
** Copyright (c) 2003-2011, Broadcom Corp., All Rights Reserved.
@@ -33,7 +33,7 @@ static tBTA_GATT_STATUS bta_gattc_sdp_service_disc(UINT16 conn_id, tBTA_GATTC_SE
*****************************************************************************/
#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
-static char *bta_gattc_attr_type[] =
+static char *bta_gattc_attr_type[] =
{
"I", /* Included Service */
"C", /* Characteristic */
@@ -52,7 +52,7 @@ static char *bta_gattc_attr_type[] =
*******************************************************************************/
static void bta_gattc_display_cache_server(tBTA_GATTC_CACHE *p_cache)
{
- UINT8 i = 0, j;
+ UINT8 i = 0, j;
tBTA_GATTC_CACHE *p_cur_srvc = p_cache;
tBTA_GATTC_CACHE_ATTR *p_attr;
@@ -60,10 +60,10 @@ static void bta_gattc_display_cache_server(tBTA_GATTC_CACHE *p_cache)
while (p_cur_srvc)
{
- APPL_TRACE_ERROR6("Service[%d]: handle[%d ~ %d] %s[0x%04x] inst[%d]",
- i, p_cur_srvc->s_handle, p_cur_srvc->e_handle,
- ((p_cur_srvc->service_uuid.id.uuid.len == 2) ? "uuid16" : "uuid128"),
- p_cur_srvc->service_uuid.id.uuid.uu.uuid16,
+ APPL_TRACE_ERROR6("Service[%d]: handle[%d ~ %d] %s[0x%04x] inst[%d]",
+ i, p_cur_srvc->s_handle, p_cur_srvc->e_handle,
+ ((p_cur_srvc->service_uuid.id.uuid.len == 2) ? "uuid16" : "uuid128"),
+ p_cur_srvc->service_uuid.id.uuid.uu.uuid16,
p_cur_srvc->service_uuid.id.inst_id);
i ++;
@@ -72,7 +72,7 @@ static void bta_gattc_display_cache_server(tBTA_GATTC_CACHE *p_cache)
for (j = 0; p_attr; j ++ )
{
APPL_TRACE_ERROR6("\t Attr[0x%04x] handle[%d] uuid[0x%04x] inst[%d] type[%s] prop[0x%1x]",
- j + 1, p_attr->attr_handle, p_attr->p_uuid->uuid16, p_attr->inst_id,
+ j + 1, p_attr->attr_handle, p_attr->p_uuid->uuid16, p_attr->inst_id,
bta_gattc_attr_type[p_attr->attr_type], p_attr->property);
p_attr = p_attr->p_next;
@@ -95,7 +95,7 @@ static void bta_gattc_display_cache_server(tBTA_GATTC_CACHE *p_cache)
*******************************************************************************/
static void bta_gattc_display_explore_record(tBTA_GATTC_ATTR_REC *p_rec, UINT8 num_rec)
{
- UINT8 i;
+ UINT8 i;
tBTA_GATTC_ATTR_REC *pp = p_rec;
APPL_TRACE_ERROR0("<================Start Explore Queue =============>");
@@ -116,7 +116,7 @@ static void bta_gattc_display_explore_record(tBTA_GATTC_ATTR_REC *p_rec, UINT8 n
** Function bta_gattc_alloc_cache_buf
**
** Description Allocate a GKI buffer for database cache.
-**
+**
** Returns status
**
*******************************************************************************/
@@ -149,7 +149,7 @@ BT_HDR *bta_gattc_alloc_cache_buf(tBTA_GATTC_SERV *p_srvc_cb)
** Function bta_gattc_init_cache
**
** Description Initialize the database cache and discovery related resources.
-**
+**
** Returns status
**
*******************************************************************************/
@@ -170,8 +170,8 @@ tBTA_GATT_STATUS bta_gattc_init_cache(tBTA_GATTC_SERV *p_srvc_cb)
else
{
p_srvc_cb->total_srvc = 0;
- p_srvc_cb->cur_srvc_idx =
- p_srvc_cb->cur_char_idx =
+ p_srvc_cb->cur_srvc_idx =
+ p_srvc_cb->cur_char_idx =
p_srvc_cb->next_avail_idx = 0;
if (bta_gattc_alloc_cache_buf(p_srvc_cb) == NULL)
@@ -245,13 +245,13 @@ static UINT8 bta_gattc_get_char_inst_id(tBTA_GATTC_CACHE *p_service_cache, tBT_U
** Function bta_gattc_add_srvc_to_cache
**
** Description Add a service into database cache.
-**
+**
** Returns status
**
*******************************************************************************/
-static tBTA_GATT_STATUS bta_gattc_add_srvc_to_cache(tBTA_GATTC_SERV *p_srvc_cb,
+static tBTA_GATT_STATUS bta_gattc_add_srvc_to_cache(tBTA_GATTC_SERV *p_srvc_cb,
UINT16 s_handle, UINT16 e_handle,
- tBT_UUID *p_uuid,
+ tBT_UUID *p_uuid,
BOOLEAN is_primary, UINT8 srvc_inst)
{
tBTA_GATTC_CACHE *p_new_srvc = NULL;
@@ -274,7 +274,7 @@ static tBTA_GATT_STATUS bta_gattc_add_srvc_to_cache(tBTA_GATTC_SERV *p_srvc_cb,
p_new_srvc->e_handle = e_handle;
p_new_srvc->service_uuid.is_primary = is_primary;
memcpy(&p_new_srvc->service_uuid.id.uuid, p_uuid, sizeof(tBT_UUID));
- p_new_srvc->service_uuid.id.inst_id = srvc_inst;
+ p_new_srvc->service_uuid.id.inst_id = srvc_inst;
p_new_srvc->p_next = NULL;
if (p_srvc_cb->p_cur_srvc != NULL)
@@ -301,13 +301,13 @@ static tBTA_GATT_STATUS bta_gattc_add_srvc_to_cache(tBTA_GATTC_SERV *p_srvc_cb,
** Function bta_gattc_add_attr_to_cache
**
** Description Add an attribute into database cache buffer.
-**
+**
** Returns status
**
*******************************************************************************/
-static tBTA_GATT_STATUS bta_gattc_add_attr_to_cache(tBTA_GATTC_SERV *p_srvc_cb,
- UINT16 handle,
- tBT_UUID *p_uuid,
+static tBTA_GATT_STATUS bta_gattc_add_attr_to_cache(tBTA_GATTC_SERV *p_srvc_cb,
+ UINT16 handle,
+ tBT_UUID *p_uuid,
UINT8 property,
tBTA_GATTC_ATTR_TYPE type)
{
@@ -368,7 +368,7 @@ static tBTA_GATT_STATUS bta_gattc_add_attr_to_cache(tBTA_GATTC_SERV *p_srvc_cb,
p_srvc_cb->p_cur_srvc->p_last_attr = p_attr;
-#if 0
+#if 0
//#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
bta_gattc_display_cache_server(p_srvc_cb->p_srvc_cache);
#endif
@@ -410,7 +410,7 @@ void bta_gattc_get_disc_range(tBTA_GATTC_SERV *p_srvc_cb, UINT16 *p_s_hdl, UINT1
** Function bta_gattc_discover_pri_service
**
** Description Start primary service discovery
-**
+**
** Returns status of the operation.
**
*******************************************************************************/
@@ -434,7 +434,7 @@ tBTA_GATT_STATUS bta_gattc_discover_pri_service(UINT16 conn_id, tBTA_GATTC_SERV
** Function bta_gattc_discover_procedure
**
** Description Start a particular type of discovery procedure on server.
-**
+**
** Returns status of the operation.
**
*******************************************************************************/
@@ -448,7 +448,7 @@ tBTA_GATT_STATUS bta_gattc_discover_procedure(UINT16 conn_id, tBTA_GATTC_SERV *p
if (disc_type == GATT_DISC_SRVC_ALL || disc_type == GATT_DISC_SRVC_BY_UUID)
{
param.s_handle = 1;
- param.e_handle = 0xFFFF;
+ param.e_handle = 0xFFFF;
}
else
{
@@ -472,7 +472,7 @@ tBTA_GATT_STATUS bta_gattc_discover_procedure(UINT16 conn_id, tBTA_GATTC_SERV *p
** Function bta_gattc_start_disc_include_srvc
**
** Description Start discovery for included service
-**
+**
** Returns status of the operation.
**
*******************************************************************************/
@@ -487,7 +487,7 @@ tBTA_GATT_STATUS bta_gattc_start_disc_include_srvc(UINT16 conn_id, tBTA_GATTC_SE
** Function bta_gattc_start_disc_char
**
** Description Start discovery for characteristic
-**
+**
** Returns status of the operation.
**
*******************************************************************************/
@@ -504,7 +504,7 @@ tBTA_GATT_STATUS bta_gattc_start_disc_char(UINT16 conn_id, tBTA_GATTC_SERV *p_sr
** Function bta_gattc_start_disc_char_dscp
**
** Description Start discovery for characteristic descriptor
-**
+**
** Returns none.
**
*******************************************************************************/
@@ -521,7 +521,7 @@ void bta_gattc_start_disc_char_dscp(UINT16 conn_id, tBTA_GATTC_SERV *p_srvc_cb)
** Function bta_gattc_explore_srvc
**
** Description process the service discovery complete event
-**
+**
** Returns status
**
*******************************************************************************/
@@ -543,10 +543,10 @@ static void bta_gattc_explore_srvc(UINT16 conn_id, tBTA_GATTC_SERV *p_srvc_cb)
if (p_srvc_cb->cur_srvc_idx < p_srvc_cb->total_srvc)
{
/* add the first service into cache */
- if (bta_gattc_add_srvc_to_cache (p_srvc_cb,
- p_rec->s_handle,
- p_rec->e_handle,
- &p_rec->uuid,
+ if (bta_gattc_add_srvc_to_cache (p_srvc_cb,
+ p_rec->s_handle,
+ p_rec->e_handle,
+ &p_rec->uuid,
p_rec->is_primary,
p_rec->srvc_inst_id) == 0)
{
@@ -563,7 +563,7 @@ static void bta_gattc_explore_srvc(UINT16 conn_id, tBTA_GATTC_SERV *p_srvc_cb)
#endif
/* save cache to NV */
p_clcb->p_srcb->state = BTA_GATTC_SERV_SAVE;
- bta_gattc_co_cache_open(p_srvc_cb->server_bda, BTA_GATTC_CI_CACHE_OPEN_EVT,
+ bta_gattc_co_cache_open(p_srvc_cb->server_bda, BTA_GATTC_CI_CACHE_OPEN_EVT,
conn_id, TRUE);
//bta_gattc_sm_execute(p_clcb, BTA_GATTC_DISCOVER_CMPL_EVT, NULL);
}
@@ -572,7 +572,7 @@ static void bta_gattc_explore_srvc(UINT16 conn_id, tBTA_GATTC_SERV *p_srvc_cb)
** Function bta_gattc_incl_srvc_disc_cmpl
**
** Description process the relationship discovery complete event
-**
+**
** Returns status
**
*******************************************************************************/
@@ -588,7 +588,7 @@ static void bta_gattc_incl_srvc_disc_cmpl(UINT16 conn_id, tBTA_GATTC_SERV *p_srv
** Function bta_gattc_char_disc_cmpl
**
** Description process the characteristic discovery complete event
-**
+**
** Returns status
**
*******************************************************************************/
@@ -602,10 +602,10 @@ static void bta_gattc_char_disc_cmpl(UINT16 conn_id, tBTA_GATTC_SERV *p_srvc_cb)
if (p_srvc_cb->total_char > 0)
{
/* add the first characteristic into cache */
- bta_gattc_add_attr_to_cache (p_srvc_cb,
- p_rec->s_handle,
+ bta_gattc_add_attr_to_cache (p_srvc_cb,
+ p_rec->s_handle,
&p_rec->uuid,
- p_rec->property,
+ p_rec->property,
BTA_GATTC_ATTR_TYPE_CHAR);
/* start discoverying characteristic descriptor , if failed, disc for next char*/
@@ -613,7 +613,7 @@ static void bta_gattc_char_disc_cmpl(UINT16 conn_id, tBTA_GATTC_SERV *p_srvc_cb)
}
else /* otherwise start with next service */
{
- p_srvc_cb->cur_srvc_idx ++;
+ p_srvc_cb->cur_srvc_idx ++;
bta_gattc_explore_srvc (conn_id, p_srvc_cb);
}
@@ -623,7 +623,7 @@ static void bta_gattc_char_disc_cmpl(UINT16 conn_id, tBTA_GATTC_SERV *p_srvc_cb)
** Function bta_gattc_char_dscpt_disc_cmpl
**
** Description process the char descriptor discovery complete event
-**
+**
** Returns status
**
*******************************************************************************/
@@ -635,10 +635,10 @@ static void bta_gattc_char_dscpt_disc_cmpl(UINT16 conn_id, tBTA_GATTC_SERV *p_sr
{
p_rec = p_srvc_cb->p_srvc_list + (++ p_srvc_cb->cur_char_idx);
/* add the next characteristic into cache */
- bta_gattc_add_attr_to_cache (p_srvc_cb,
- p_rec->s_handle,
- &p_rec->uuid,
- p_rec->property,
+ bta_gattc_add_attr_to_cache (p_srvc_cb,
+ p_rec->s_handle,
+ &p_rec->uuid,
+ p_rec->property,
BTA_GATTC_ATTR_TYPE_CHAR);
/* start discoverying next characteristic for char descriptor */
@@ -650,12 +650,12 @@ static void bta_gattc_char_dscpt_disc_cmpl(UINT16 conn_id, tBTA_GATTC_SERV *p_sr
#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
APPL_TRACE_ERROR0("all char has been explored");
#endif
- p_srvc_cb->cur_srvc_idx ++;
+ p_srvc_cb->cur_srvc_idx ++;
bta_gattc_explore_srvc (conn_id, p_srvc_cb);
}
}
-static BOOLEAN bta_gattc_srvc_in_list(tBTA_GATTC_SERV *p_srvc_cb, UINT16 s_handle,
+static BOOLEAN bta_gattc_srvc_in_list(tBTA_GATTC_SERV *p_srvc_cb, UINT16 s_handle,
UINT16 e_handle, tBT_UUID uuid)
{
tBTA_GATTC_ATTR_REC *p_rec = NULL;
@@ -672,7 +672,7 @@ static BOOLEAN bta_gattc_srvc_in_list(tBTA_GATTC_SERV *p_srvc_cb, UINT16 s_handl
for (i = 0; i < p_srvc_cb->next_avail_idx; i ++)
{
p_rec = p_srvc_cb->p_srvc_list + i;
-
+
/* a new service should not have any overlap with other service handle range */
if (p_rec->s_handle == s_handle || p_rec->e_handle == e_handle)
{
@@ -688,12 +688,12 @@ static BOOLEAN bta_gattc_srvc_in_list(tBTA_GATTC_SERV *p_srvc_cb, UINT16 s_handl
** Function bta_gattc_add_srvc_to_list
**
** Description Add a service into explore pending list
-**
+**
** Returns status
**
*******************************************************************************/
-static tBTA_GATT_STATUS bta_gattc_add_srvc_to_list(tBTA_GATTC_SERV *p_srvc_cb,
- UINT16 s_handle, UINT16 e_handle,
+static tBTA_GATT_STATUS bta_gattc_add_srvc_to_list(tBTA_GATTC_SERV *p_srvc_cb,
+ UINT16 s_handle, UINT16 e_handle,
tBT_UUID uuid, BOOLEAN is_primary)
{
tBTA_GATTC_ATTR_REC *p_rec = NULL;
@@ -705,13 +705,13 @@ static tBTA_GATT_STATUS bta_gattc_add_srvc_to_list(tBTA_GATTC_SERV *p_srvc_cb,
p_srvc_cb->total_srvc ++;
- APPL_TRACE_DEBUG2("bta_gattc_add_srvc_to_list handle = %d, service type = 0x%04x",
+ APPL_TRACE_DEBUG2("bta_gattc_add_srvc_to_list handle = %d, service type = 0x%04x",
s_handle, uuid.uu.uuid16);
p_rec->s_handle = s_handle;
p_rec->e_handle = e_handle;
p_rec->is_primary = is_primary;
- p_rec->srvc_inst_id = bta_gattc_get_srvc_inst_id(p_srvc_cb, uuid);
+ p_rec->srvc_inst_id = bta_gattc_get_srvc_inst_id(p_srvc_cb, uuid);
memcpy(&p_rec->uuid, &uuid, sizeof(tBT_UUID));
p_srvc_cb->next_avail_idx ++;
@@ -730,12 +730,12 @@ static tBTA_GATT_STATUS bta_gattc_add_srvc_to_list(tBTA_GATTC_SERV *p_srvc_cb,
** Function bta_gattc_add_char_to_list
**
** Description Add a characteristic into explore pending list
-**
+**
** Returns status
**
*******************************************************************************/
-static tBTA_GATT_STATUS bta_gattc_add_char_to_list(tBTA_GATTC_SERV *p_srvc_cb,
- UINT16 decl_handle, UINT16 value_handle,
+static tBTA_GATT_STATUS bta_gattc_add_char_to_list(tBTA_GATTC_SERV *p_srvc_cb,
+ UINT16 decl_handle, UINT16 value_handle,
tBT_UUID uuid, UINT8 property)
{
tBTA_GATTC_ATTR_REC *p_rec = NULL;
@@ -794,7 +794,7 @@ void bta_gattc_sdp_callback (UINT16 sdp_status)
if(((sdp_status == SDP_SUCCESS) || (sdp_status == SDP_DB_FULL)) && p_srvc_cb != NULL)
{
- do
+ do
{
/* find a service record, report it */
p_sdp_rec = SDP_FindServiceInDb(bta_gattc_cb.p_sdp_db,
@@ -810,7 +810,7 @@ void bta_gattc_sdp_callback (UINT16 sdp_status)
end_handle = (UINT16) pe.params[1];
#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
- APPL_TRACE_EVENT3("Found ATT service [0x%04x] handle[0x%04x ~ 0x%04x]",
+ APPL_TRACE_EVENT3("Found ATT service [0x%04x] handle[0x%04x ~ 0x%04x]",
service_uuid.uu.uuid16, start_handle, end_handle);
#endif
@@ -818,9 +818,9 @@ void bta_gattc_sdp_callback (UINT16 sdp_status)
p_srvc_cb != NULL)
{
/* discover services result, add services into a service list */
- bta_gattc_add_srvc_to_list(p_srvc_cb,
- start_handle,
- end_handle,
+ bta_gattc_add_srvc_to_list(p_srvc_cb,
+ start_handle,
+ end_handle,
service_uuid,
TRUE);
}
@@ -829,7 +829,7 @@ void bta_gattc_sdp_callback (UINT16 sdp_status)
APPL_TRACE_ERROR2("invalid start_handle = %d end_handle = %d", start_handle, end_handle);
}
}
-
+
}
}
@@ -862,7 +862,7 @@ static tBTA_GATT_STATUS bta_gattc_sdp_service_disc(UINT16 conn_id, tBTA_GATTC_SE
tSDP_UUID uuid;
UINT16 num_attrs = 2;
UINT16 attr_list[2];
- tBTA_GATT_STATUS status = BTA_GATT_ERROR;
+ tBTA_GATT_STATUS status = BTA_GATT_ERROR;
memset (&uuid, 0, sizeof(tSDP_UUID));
@@ -870,7 +870,7 @@ static tBTA_GATT_STATUS bta_gattc_sdp_service_disc(UINT16 conn_id, tBTA_GATTC_SE
uuid.uu.uuid16 = UUID_PROTOCOL_ATT;
if((bta_gattc_cb.p_sdp_db = (tSDP_DISCOVERY_DB *)GKI_getbuf(BTA_GATT_SDP_DB_SIZE)) != NULL)
- {
+ {
attr_list[0] = ATTR_ID_SERVICE_CLASS_ID_LIST;
attr_list[1] = ATTR_ID_PROTOCOL_DESC_LIST;
@@ -895,7 +895,7 @@ static tBTA_GATT_STATUS bta_gattc_sdp_service_disc(UINT16 conn_id, tBTA_GATTC_SE
** bta_gattc_disc_cmpl_cback
**
** Description callback functions to GATT client stack.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -912,17 +912,17 @@ void bta_gattc_disc_res_cback (UINT16 conn_id, tGATT_DISC_TYPE disc_type, tGATT_
{
case GATT_DISC_SRVC_ALL:
/* discover services result, add services into a service list */
- bta_gattc_add_srvc_to_list(p_srvc_cb,
- p_data->handle,
- p_data->value.group_value.e_handle,
+ bta_gattc_add_srvc_to_list(p_srvc_cb,
+ p_data->handle,
+ p_data->value.group_value.e_handle,
p_data->value.group_value.service_type,
TRUE);
break;
case GATT_DISC_SRVC_BY_UUID:
- bta_gattc_add_srvc_to_list(p_srvc_cb,
- p_data->handle,
- p_data->value.handle,
+ bta_gattc_add_srvc_to_list(p_srvc_cb,
+ p_data->handle,
+ p_data->value.handle,
p_data->type,
TRUE);
break;
@@ -931,20 +931,20 @@ void bta_gattc_disc_res_cback (UINT16 conn_id, tGATT_DISC_TYPE disc_type, tGATT_
/* add included service into service list if it's secondary or it never showed up
in the primary service search */
pri_srvc = bta_gattc_srvc_in_list(p_srvc_cb,
- p_data->value.incl_service.s_handle,
+ p_data->value.incl_service.s_handle,
p_data->value.incl_service.e_handle,
p_data->value.incl_service.service_type);
if (!pri_srvc)
- bta_gattc_add_srvc_to_list(p_srvc_cb,
- p_data->value.incl_service.s_handle,
- p_data->value.incl_service.e_handle,
+ bta_gattc_add_srvc_to_list(p_srvc_cb,
+ p_data->value.incl_service.s_handle,
+ p_data->value.incl_service.e_handle,
p_data->value.incl_service.service_type,
FALSE);
/* add into database */
- bta_gattc_add_attr_to_cache(p_srvc_cb,
- p_data->handle,
- &p_data->value.incl_service.service_type,
+ bta_gattc_add_attr_to_cache(p_srvc_cb,
+ p_data->handle,
+ &p_data->value.incl_service.service_type,
pri_srvc,
BTA_GATTC_ATTR_TYPE_INCL_SRVC);
break;
@@ -1008,7 +1008,7 @@ void bta_gattc_disc_cmpl_cback (UINT16 conn_id, tGATT_DISC_TYPE disc_type, tGATT
** Returns the handle mapped. 0 if not found.
**
*******************************************************************************/
-UINT16 bta_gattc_id2handle(tBTA_GATTC_SERV *p_srcb, tBTA_GATT_SRVC_ID *p_service_id,
+UINT16 bta_gattc_id2handle(tBTA_GATTC_SERV *p_srcb, tBTA_GATT_SRVC_ID *p_service_id,
tBTA_GATT_ID *p_char_id, tBT_UUID descr_uuid)
{
tBTA_GATTC_CACHE *p_cache = p_srcb->p_srvc_cache;
@@ -1021,8 +1021,8 @@ UINT16 bta_gattc_id2handle(tBTA_GATTC_SERV *p_srcb, tBTA_GATT_SRVC_ID *p_service
while (p_cache && !done)
{
#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
- APPL_TRACE_DEBUG3("Service: handle[%d] uuid[0x%04x] inst[%d]",
- p_cache->s_handle, p_cache->service_uuid.id.uuid.uu.uuid16,
+ APPL_TRACE_DEBUG3("Service: handle[%d] uuid[0x%04x] inst[%d]",
+ p_cache->s_handle, p_cache->service_uuid.id.uuid.uu.uuid16,
p_cache->service_uuid.id.inst_id);
#endif
p_attr = p_cache->p_attr;
@@ -1036,7 +1036,7 @@ UINT16 bta_gattc_id2handle(tBTA_GATTC_SERV *p_srcb, tBTA_GATT_SRVC_ID *p_service
#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
APPL_TRACE_DEBUG5("\t Attr[0x%04x] handle[0x%04x] uuid[0x%04x] inst[%d] type[%d]",
j + 1, p_attr->attr_handle, p_attr->p_uuid->uuid16, p_attr->inst_id, p_attr->attr_type);
-#endif
+#endif
bta_gattc_pack_attr_uuid(p_attr, &attr_uuid);
if (bta_gattc_uuid_compare(p_char_id->uuid, attr_uuid, TRUE) &&
@@ -1119,8 +1119,8 @@ BOOLEAN bta_gattc_handle2id(tBTA_GATTC_SERV *p_srcb, UINT16 handle, tBTA_GATT_SR
while (p_cache)
{
#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
- APPL_TRACE_DEBUG3("Service: handle[%d] uuid[0x%04x] inst[%d]",
- p_cache->s_handle, p_cache->service_uuid.id.uuid.uu.uuid16,
+ APPL_TRACE_DEBUG3("Service: handle[%d] uuid[0x%04x] inst[%d]",
+ p_cache->s_handle, p_cache->service_uuid.id.uuid.uu.uuid16,
p_cache->service_uuid.id.inst_id);
#endif
/* a service found */
@@ -1138,7 +1138,7 @@ BOOLEAN bta_gattc_handle2id(tBTA_GATTC_SERV *p_srcb, UINT16 handle, tBTA_GATT_SR
{
#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
APPL_TRACE_DEBUG5("\t Attr[0x%04x] handle[0x%04x] uuid[0x%04x] inst[%d] type[%d]",
- j + 1, p_attr->attr_handle, p_attr->p_uuid->uuid16, p_attr->inst_id, p_attr->attr_type);
+ j + 1, p_attr->attr_handle, p_attr->p_uuid->uuid16, p_attr->inst_id, p_attr->attr_type);
#endif
if (p_attr->attr_type == BTA_GATTC_ATTR_TYPE_CHAR)
p_char = p_attr;
@@ -1150,7 +1150,7 @@ BOOLEAN bta_gattc_handle2id(tBTA_GATTC_SERV *p_srcb, UINT16 handle, tBTA_GATT_SR
if (p_attr->attr_type == BTA_GATTC_ATTR_TYPE_CHAR_DESCR)
{
bta_gattc_pack_attr_uuid(p_attr, p_descr_type);
-
+
if (p_char != NULL)
{
bta_gattc_pack_attr_uuid(p_char, &p_char_id->uuid);
@@ -1191,14 +1191,14 @@ void bta_gattc_search_service(tBTA_GATTC_CLCB *p_clcb, tBT_UUID uuid)
{
tBTA_GATTC_SERV *p_srcb = p_clcb->p_srcb;
tBTA_GATTC_CACHE *p_cache = p_srcb->p_srvc_cache;
- tBTA_GATTC cb_data;
+ tBTA_GATTC cb_data;
while (p_cache)
{
if (bta_gattc_uuid_compare(uuid, p_cache->service_uuid.id.uuid, FALSE))
{
//#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
- APPL_TRACE_DEBUG3("found service [0x%04x], inst[%d] handle [%d]",
+ APPL_TRACE_DEBUG3("found service [0x%04x], inst[%d] handle [%d]",
p_cache->service_uuid.id.uuid.uu.uuid16,
p_cache->service_uuid.id.inst_id,
p_cache->s_handle);
@@ -1208,10 +1208,10 @@ void bta_gattc_search_service(tBTA_GATTC_CLCB *p_clcb, tBT_UUID uuid)
memset(&cb_data, 0, sizeof(tBTA_GATTC));
cb_data.srvc_res.conn_id = p_clcb->bta_conn_id;
- memcpy(&cb_data.srvc_res.service_uuid, &p_cache->service_uuid ,sizeof(tBTA_GATT_SRVC_ID));
+ memcpy(&cb_data.srvc_res.service_uuid, &p_cache->service_uuid ,sizeof(tBTA_GATT_SRVC_ID));
(* p_clcb->p_rcb->p_cback)(BTA_GATTC_SEARCH_RES_EVT, &cb_data);
- //todo (tBTA_GATTC *)&p_cache->service_uuid);
+ //todo (tBTA_GATTC *)&p_cache->service_uuid);
}
}
p_cache = p_cache->p_next;
@@ -1226,16 +1226,16 @@ void bta_gattc_search_service(tBTA_GATTC_CLCB *p_clcb, tBT_UUID uuid)
** Parameter p_result: output parameter to store the characteristic/
** included service GATT ID.
**
-** Returns GATT_ERROR is no recording found. BTA_GATT_OK if record found.
+** Returns GATT_ERROR is no recording found. BTA_GATT_OK if record found.
**
*******************************************************************************/
-static tBTA_GATT_STATUS bta_gattc_find_record(tBTA_GATTC_SERV *p_srcb,
- tBTA_GATTC_ATTR_TYPE attr_type,
- tBTA_GATT_SRVC_ID *p_service_id,
- tBTA_GATT_ID *p_start_rec,
+static tBTA_GATT_STATUS bta_gattc_find_record(tBTA_GATTC_SERV *p_srcb,
+ tBTA_GATTC_ATTR_TYPE attr_type,
+ tBTA_GATT_SRVC_ID *p_service_id,
+ tBTA_GATT_ID *p_start_rec,
tBT_UUID * p_uuid_cond,
tBTA_GATT_ID *p_result,
- void *p_param)
+ void *p_param)
{
tBTA_GATTC_CACHE *p_cache = p_srcb->p_srvc_cache;
tBTA_GATT_STATUS status = BTA_GATT_ERROR;
@@ -1254,7 +1254,7 @@ static tBTA_GATT_STATUS bta_gattc_find_record(tBTA_GATTC_SERV *p_srcb,
p_service_id->is_primary == p_cache->service_uuid.is_primary)
{
#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
- APPL_TRACE_DEBUG2("found matching service [0x%04x], inst[%d]",
+ APPL_TRACE_DEBUG2("found matching service [0x%04x], inst[%d]",
p_cache->service_uuid.id.uuid.uu.uuid16,
p_cache->service_uuid.id.inst_id);
#endif
@@ -1264,9 +1264,9 @@ static tBTA_GATT_STATUS bta_gattc_find_record(tBTA_GATTC_SERV *p_srcb,
{
#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
APPL_TRACE_DEBUG5("\t Attr[%d] handle[0x%04x] uuid[0x%04x] inst[%d] type[%d]",
- j + 1, p_attr->attr_handle,
- p_attr->p_uuid->uuid16,
- p_attr->inst_id,
+ j + 1, p_attr->attr_handle,
+ p_attr->p_uuid->uuid16,
+ p_attr->inst_id,
p_attr->attr_type);
#endif
bta_gattc_pack_attr_uuid(p_attr, &p_result->uuid);
@@ -1276,7 +1276,7 @@ static tBTA_GATT_STATUS bta_gattc_find_record(tBTA_GATTC_SERV *p_srcb,
/* find the starting record first */
if (bta_gattc_uuid_compare(p_start_rec->uuid, p_result->uuid, FALSE) &&
p_start_rec->inst_id == p_attr->inst_id &&
- (attr_type == p_attr->attr_type ||
+ (attr_type == p_attr->attr_type ||
/* find descriptor would look for characteristic first */
(attr_type == BTA_GATTC_ATTR_TYPE_CHAR_DESCR && p_attr->attr_type == BTA_GATTC_ATTR_TYPE_CHAR)))
{
@@ -1296,7 +1296,7 @@ static tBTA_GATT_STATUS bta_gattc_find_record(tBTA_GATTC_SERV *p_srcb,
{
break;
}
- else
+ else
{
if (start_descr.len != 0 && !descr_found)
{
@@ -1321,7 +1321,7 @@ static tBTA_GATT_STATUS bta_gattc_find_record(tBTA_GATTC_SERV *p_srcb,
if (bta_gattc_uuid_compare(uuid_cond, p_result->uuid, FALSE) &&
attr_type == p_attr->attr_type)
{
-
+
APPL_TRACE_DEBUG0("found char handle mapping characteristic");
p_result->inst_id = p_attr->inst_id;
@@ -1345,7 +1345,7 @@ static tBTA_GATT_STATUS bta_gattc_find_record(tBTA_GATTC_SERV *p_srcb,
{
APPL_TRACE_ERROR0("In the given service, can not find matching record");
}
- break;
+ break;
}
p_cache = p_cache->p_next;
@@ -1360,30 +1360,30 @@ static tBTA_GATT_STATUS bta_gattc_find_record(tBTA_GATTC_SERV *p_srcb,
**
** Description search local cache for matching attribute record.
**
-** Parameters conn_id: connection ID which identify the server.
+** Parameters conn_id: connection ID which identify the server.
** p_srvc_id: the service ID of which the characteristic is belonged to.
-** *p_start_rec: start the search from the next record
+** *p_start_rec: start the search from the next record
** after the one identified by *p_start_rec.
** p_uuid_cond: UUID, if NULL find the first available
-** characteristic/included service.
-** p_output: output parameter which will store the GATT ID
+** characteristic/included service.
+** p_output: output parameter which will store the GATT ID
** of the characteristic /included service found.
**
-** Returns BTA_GATT_ERROR is no recording found. BTA_GATT_OK if record found.
+** Returns BTA_GATT_ERROR is no recording found. BTA_GATT_OK if record found.
**
*******************************************************************************/
-tBTA_GATT_STATUS bta_gattc_query_cache(UINT16 conn_id,
- tBTA_GATTC_ATTR_TYPE query_type,
- tBTA_GATT_SRVC_ID *p_srvc_id,
+tBTA_GATT_STATUS bta_gattc_query_cache(UINT16 conn_id,
+ tBTA_GATTC_ATTR_TYPE query_type,
+ tBTA_GATT_SRVC_ID *p_srvc_id,
tBTA_GATT_ID *p_start_rec,
- tBT_UUID *p_uuid_cond,
+ tBT_UUID *p_uuid_cond,
tBTA_GATT_ID *p_output,
void *p_param)
{
tBTA_GATTC_CLCB *p_clcb = bta_gattc_find_clcb_by_conn_id(conn_id);
tBTA_GATT_STATUS status = BTA_GATT_ILLEGAL_PARAMETER;
- /* lock other GKI task */
+ /* lock other GKI task */
GKI_sched_lock();
APPL_TRACE_DEBUG0("bta_gattc_query_cache");
@@ -1392,15 +1392,15 @@ tBTA_GATT_STATUS bta_gattc_query_cache(UINT16 conn_id,
{
if (p_clcb->state == BTA_GATTC_CONN_ST)
{
- if (p_clcb->p_srcb &&
+ if (p_clcb->p_srcb &&
!p_clcb->p_srcb->p_srvc_list && /* no active discovery */
p_clcb->p_srcb->p_srvc_cache)
{
- status = bta_gattc_find_record(p_clcb->p_srcb,
- query_type,
- p_srvc_id,
- p_start_rec,
- p_uuid_cond,
+ status = bta_gattc_find_record(p_clcb->p_srcb,
+ query_type,
+ p_srvc_id,
+ p_start_rec,
+ p_uuid_cond,
p_output,
p_param);
}
@@ -1420,7 +1420,7 @@ tBTA_GATT_STATUS bta_gattc_query_cache(UINT16 conn_id,
else
{
APPL_TRACE_ERROR1("Unknown conn ID: %d", conn_id);
- }
+ }
GKI_sched_unlock();
return status;
@@ -1432,12 +1432,12 @@ tBTA_GATT_STATUS bta_gattc_query_cache(UINT16 conn_id,
**
** Description rebuild server cache from NV cache.
**
-** Parameters
+** Parameters
**
** Returns None.
**
*******************************************************************************/
-void bta_gattc_rebuild_cache(tBTA_GATTC_SERV *p_srvc_cb, UINT16 num_attr,
+void bta_gattc_rebuild_cache(tBTA_GATTC_SERV *p_srvc_cb, UINT16 num_attr,
tBTA_GATTC_NV_ATTR *p_attr, UINT16 attr_index)
{
/* first attribute loading, initialize buffer */
@@ -1462,10 +1462,10 @@ void bta_gattc_rebuild_cache(tBTA_GATTC_SERV *p_srvc_cb, UINT16 num_attr,
switch (p_attr->attr_type)
{
case BTA_GATTC_ATTR_TYPE_SRVC:
- bta_gattc_add_srvc_to_cache(p_srvc_cb,
- p_attr->s_handle,
- p_attr->e_handle,
- &p_attr->uuid,
+ bta_gattc_add_srvc_to_cache(p_srvc_cb,
+ p_attr->s_handle,
+ p_attr->e_handle,
+ &p_attr->uuid,
p_attr->is_primary,
p_attr->id);
break;
@@ -1473,12 +1473,12 @@ void bta_gattc_rebuild_cache(tBTA_GATTC_SERV *p_srvc_cb, UINT16 num_attr,
case BTA_GATTC_ATTR_TYPE_CHAR:
case BTA_GATTC_ATTR_TYPE_CHAR_DESCR:
case BTA_GATTC_ATTR_TYPE_INCL_SRVC:
- bta_gattc_add_attr_to_cache(p_srvc_cb,
- p_attr->s_handle,
- &p_attr->uuid,
- p_attr->prop,
+ bta_gattc_add_attr_to_cache(p_srvc_cb,
+ p_attr->s_handle,
+ &p_attr->uuid,
+ p_attr->prop,
p_attr->attr_type);
- break;
+ break;
}
p_attr ++;
num_attr --;
@@ -1489,12 +1489,12 @@ void bta_gattc_rebuild_cache(tBTA_GATTC_SERV *p_srvc_cb, UINT16 num_attr,
**
** Function bta_gattc_fill_nv_attr
**
-** Description fill a NV attribute entry value
+** Description fill a NV attribute entry value
**
** Returns None.
**
*******************************************************************************/
-void bta_gattc_fill_nv_attr(tBTA_GATTC_NV_ATTR *p_attr, UINT8 type, UINT16 s_handle,
+void bta_gattc_fill_nv_attr(tBTA_GATTC_NV_ATTR *p_attr, UINT8 type, UINT16 s_handle,
UINT16 e_handle, UINT8 id, tBT_UUID uuid, UINT8 prop, BOOLEAN is_primary)
{
p_attr->s_handle = s_handle;
@@ -1527,13 +1527,13 @@ BOOLEAN bta_gattc_cache_save(tBTA_GATTC_SERV *p_srvc_cb, UINT16 conn_id)
while (p_cur_srvc && i < BTA_GATTC_NV_LOAD_MAX)
{
if (offset ++ >= p_srvc_cb->attr_index)
- {
+ {
bta_gattc_fill_nv_attr(&nv_attr[i++],
BTA_GATTC_ATTR_TYPE_SRVC,
- p_cur_srvc->s_handle,
- p_cur_srvc->e_handle,
+ p_cur_srvc->s_handle,
+ p_cur_srvc->e_handle,
p_cur_srvc->service_uuid.id.inst_id,
- p_cur_srvc->service_uuid.id.uuid,
+ p_cur_srvc->service_uuid.id.uuid,
0,
p_cur_srvc->service_uuid.is_primary);
}
@@ -1555,10 +1555,10 @@ BOOLEAN bta_gattc_cache_save(tBTA_GATTC_SERV *p_srvc_cb, UINT16 conn_id)
bta_gattc_fill_nv_attr(&nv_attr[i++],
p_attr->attr_type,
- p_attr->attr_handle,
+ p_attr->attr_handle,
0,
p_attr->inst_id,
- uuid,
+ uuid,
p_attr->property,
FALSE);
}
@@ -1568,7 +1568,7 @@ BOOLEAN bta_gattc_cache_save(tBTA_GATTC_SERV *p_srvc_cb, UINT16 conn_id)
if (i > 0)
{
- bta_gattc_co_cache_save(p_srvc_cb->server_bda, BTA_GATTC_CI_CACHE_SAVE_EVT, i,
+ bta_gattc_co_cache_save(p_srvc_cb->server_bda, BTA_GATTC_CI_CACHE_SAVE_EVT, i,
nv_attr, p_srvc_cb->attr_index, conn_id);
p_srvc_cb->attr_index += i;
diff --git a/bta/gatt/bta_gattc_ci.c b/bta/gatt/bta_gattc_ci.c
index f5b4f41..ddca776 100644
--- a/bta/gatt/bta_gattc_ci.c
+++ b/bta/gatt/bta_gattc_ci.c
@@ -33,7 +33,7 @@
** status - BTA_GATT_OK if full buffer of data,
** BTA_GATT_FAIL if an error has occurred.
**
-** Returns void
+** Returns void
**
*******************************************************************************/
void bta_gattc_ci_cache_open(BD_ADDR server_bda, UINT16 evt, tBTA_GATT_STATUS status,
@@ -57,18 +57,18 @@ void bta_gattc_ci_cache_open(BD_ADDR server_bda, UINT16 evt, tBTA_GATT_STATUS st
**
** Description This function sends an event to BTA indicating the phone has
** load the servere cache and ready to send it to the stack.
-**
+**
** Parameters server_bda - server BDA of this cache.
** num_bytes_read - number of bytes read into the buffer
** specified in the read callout-function.
** status - BTA_GATT_OK if full buffer of data,
** BTA_GATT_FAIL if an error has occurred.
**
-** Returns void
+** Returns void
**
*******************************************************************************/
-void bta_gattc_ci_cache_load(BD_ADDR server_bda, UINT16 evt, UINT16 num_attr,
- tBTA_GATTC_NV_ATTR *p_attr, tBTA_GATT_STATUS status,
+void bta_gattc_ci_cache_load(BD_ADDR server_bda, UINT16 evt, UINT16 num_attr,
+ tBTA_GATTC_NV_ATTR *p_attr, tBTA_GATT_STATUS status,
UINT16 conn_id)
{
tBTA_GATTC_CI_LOAD *p_evt;
@@ -98,14 +98,14 @@ void bta_gattc_ci_cache_load(BD_ADDR server_bda, UINT16 evt, UINT16 num_attr,
**
** Description This function sends an event to BTA indicating the phone has
** save the servere cache.
-**
+**
** Parameters server_bda - server BDA of this cache.
** evt - callin event code.
** status - BTA_GATT_OK if full buffer of data,
** BTA_GATT_ERROR if an error has occurred.
*8 conn_id - for this NV operation for.
**
-** Returns void
+** Returns void
**
*******************************************************************************/
void bta_gattc_ci_cache_save(BD_ADDR server_bda, UINT16 evt, tBTA_GATT_STATUS status,
diff --git a/bta/gatt/bta_gattc_int.h b/bta/gatt/bta_gattc_int.h
index 4ae7697..6753b93 100644
--- a/bta/gatt/bta_gattc_int.h
+++ b/bta/gatt/bta_gattc_int.h
@@ -26,7 +26,7 @@
enum
{
BTA_GATTC_API_OPEN_EVT = BTA_SYS_EVT_START(BTA_ID_GATTC),
- BTA_GATTC_INT_OPEN_FAIL_EVT,
+ BTA_GATTC_INT_OPEN_FAIL_EVT,
BTA_GATTC_API_CANCEL_OPEN_EVT,
BTA_GATTC_INT_CANCEL_OPEN_OK_EVT,
@@ -40,11 +40,11 @@ enum
BTA_GATTC_API_CONFIRM_EVT,
BTA_GATTC_API_READ_MULTI_EVT,
- BTA_GATTC_INT_CONN_EVT,
+ BTA_GATTC_INT_CONN_EVT,
BTA_GATTC_INT_DISCOVER_EVT,
BTA_GATTC_DISCOVER_CMPL_EVT,
BTA_GATTC_OP_CMPL_EVT,
- BTA_GATTC_INT_DISCONN_EVT,
+ BTA_GATTC_INT_DISCONN_EVT,
/* for cache loading/saving */
BTA_GATTC_START_CACHE_EVT,
@@ -61,12 +61,12 @@ enum
typedef UINT16 tBTA_GATTC_INT_EVT;
/* max client application GATTC can support */
-#ifndef BTA_GATTC_CL_MAX
+#ifndef BTA_GATTC_CL_MAX
#define BTA_GATTC_CL_MAX 4
#endif
/* max known devices GATTC can support */
-#ifndef BTA_GATTC_KNOWN_SR_MAX
+#ifndef BTA_GATTC_KNOWN_SR_MAX
#define BTA_GATTC_KNOWN_SR_MAX 4
#endif
@@ -87,7 +87,7 @@ typedef struct
typedef struct
{
BT_HDR hdr;
- tBTA_GATTC_IF client_if;
+ tBTA_GATTC_IF client_if;
}tBTA_GATTC_INT_START_IF;
typedef tBTA_GATTC_INT_START_IF tBTA_GATTC_API_DEREG;
@@ -145,7 +145,7 @@ typedef struct
BT_HDR hdr;
UINT8 op_code;
tGATT_STATUS status;
- tBTA_GATTC_CMPL *p_cmpl;
+ tBTA_GATTC_CMPL *p_cmpl;
}tBTA_GATTC_OP_CMPL;
typedef struct
@@ -178,10 +178,10 @@ typedef union
tBTA_GATTC_OP_CMPL op_cmpl;
tBTA_GATTC_CI_EVT ci_open;
tBTA_GATTC_CI_EVT ci_save;
- tBTA_GATTC_CI_LOAD ci_load;
+ tBTA_GATTC_CI_LOAD ci_load;
- tBTA_GATTC_INT_START_IF int_start_if;
- tBTA_GATTC_INT_DEREG int_dereg;
+ tBTA_GATTC_INT_START_IF int_start_if;
+ tBTA_GATTC_INT_DEREG int_dereg;
} tBTA_GATTC_DATA;
@@ -213,9 +213,9 @@ typedef struct gattc_svc_cache
tBTA_GATT_SRVC_ID service_uuid;
tBTA_GATTC_CACHE_ATTR *p_attr;
tBTA_GATTC_CACHE_ATTR *p_last_attr;
- UINT16 s_handle;
+ UINT16 s_handle;
UINT16 e_handle;
- struct gattc_svc_cache *p_next;
+ struct gattc_svc_cache *p_next;
// btla-specific ++
} __attribute__((packed)) tBTA_GATTC_CACHE;
// btla-specific --
@@ -308,7 +308,7 @@ typedef struct
UINT16 bta_conn_id; /* client channel ID, unique for clcb */
BD_ADDR bda;
tBTA_GATTC_RCB *p_rcb; /* pointer to the registration CB */
- tBTA_GATTC_SERV *p_srcb; /* server cache CB */
+ tBTA_GATTC_SERV *p_srcb; /* server cache CB */
tBTA_GATTC_DATA *p_q_cmd; /* command in queue waiting for execution */
#define BTA_GATTC_NO_SCHEDULE 0
@@ -346,10 +346,10 @@ typedef struct
tBTA_GATTC_CLCB clcb[BTA_GATTC_CLCB_MAX];
tBTA_GATTC_SERV known_server[BTA_GATTC_KNOWN_SR_MAX];
-
+
tSDP_DISCOVERY_DB *p_sdp_db;
UINT16 sdp_conn_id;
-}tBTA_GATTC_CB;
+}tBTA_GATTC_CB;
/*****************************************************************************
** Global data
@@ -405,16 +405,16 @@ extern void bta_gattc_read_multi(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_dat
extern void bta_gattc_ci_open(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data);
extern void bta_gattc_ci_load(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data);
extern void bta_gattc_ci_close(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data);
-extern void bta_gattc_ci_save(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data);
-extern void bta_gattc_cache_open(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data);
+extern void bta_gattc_ci_save(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data);
+extern void bta_gattc_cache_open(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data);
extern void bta_gattc_ignore_op_cmpl(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data);
extern void bta_gattc_init_bk_conn(tBTA_GATTC_API_OPEN *p_data, tBTA_GATTC_RCB *p_clreg);
extern void bta_gattc_cancel_bk_conn(tBTA_GATTC_API_CANCEL_OPEN *p_data);
-extern void bta_gattc_send_open_cback( tBTA_GATTC_RCB *p_clreg, tBTA_GATT_STATUS status,
+extern void bta_gattc_send_open_cback( tBTA_GATTC_RCB *p_clreg, tBTA_GATT_STATUS status,
BD_ADDR remote_bda, UINT16 conn_id);
/* utility functions */
-extern tBTA_GATTC_CLCB * bta_gattc_find_clcb_by_cif (UINT8 client_if, BD_ADDR remote_bda); //todo
+extern tBTA_GATTC_CLCB * bta_gattc_find_clcb_by_cif (UINT8 client_if, BD_ADDR remote_bda); //todo
extern tBTA_GATTC_CLCB * bta_gattc_find_clcb_by_conn_id (UINT16 conn_id);
extern tBTA_GATTC_CLCB * bta_gattc_clcb_alloc(tBTA_GATTC_IF client_if, BD_ADDR remote_bda);
extern void bta_gattc_clcb_dealloc(tBTA_GATTC_CLCB *p_clcb);
@@ -442,9 +442,9 @@ extern void bta_gattc_disc_cmpl_cback (UINT16 conn_id, tGATT_DISC_TYPE disc_type
extern tBTA_GATT_STATUS bta_gattc_discover_procedure(UINT16 conn_id, tBTA_GATTC_SERV *p_server_cb, UINT8 disc_type);
extern tBTA_GATT_STATUS bta_gattc_discover_pri_service(UINT16 conn_id, tBTA_GATTC_SERV *p_server_cb, UINT8 disc_type);
extern void bta_gattc_search_service(tBTA_GATTC_CLCB *p_clcb, tBT_UUID uuid);
-extern tBTA_GATT_STATUS bta_gattc_query_cache(UINT16 conn_id, UINT8 query_type, tBTA_GATT_SRVC_ID *p_srvc_id,
- tBTA_GATT_ID *p_start_rec,tBT_UUID *p_uuid_cond,
- tBTA_GATT_ID *p_output, void *p_property);
+extern tBTA_GATT_STATUS bta_gattc_query_cache(UINT16 conn_id, UINT8 query_type, tBTA_GATT_SRVC_ID *p_srvc_id,
+ tBTA_GATT_ID *p_start_rec,tBT_UUID *p_uuid_cond,
+ tBTA_GATT_ID *p_output, void *p_property);
extern tBTA_GATT_STATUS bta_gattc_init_cache(tBTA_GATTC_SERV *p_srvc_cb);
extern void bta_gattc_rebuild_cache(tBTA_GATTC_SERV *p_srcv, UINT16 num_attr, tBTA_GATTC_NV_ATTR *p_attr, UINT16 attr_index);
extern BOOLEAN bta_gattc_cache_save(tBTA_GATTC_SERV *p_srvc_cb, UINT16 conn_id);
diff --git a/bta/gatt/bta_gattc_main.c b/bta/gatt/bta_gattc_main.c
index 5016c46..b068a61 100644
--- a/bta/gatt/bta_gattc_main.c
+++ b/bta/gatt/bta_gattc_main.c
@@ -2,7 +2,7 @@
**
** Name: bta_gattc_main.c
**
-** Description: This file contains the GATT client main functions
+** Description: This file contains the GATT client main functions
** and state machine.
**
** Copyright (c) 2003-2009, Broadcom Corp., All Rights Reserved.
@@ -33,7 +33,7 @@ enum
//BTA_GATTC_OPEN_FAIL_IN_CONN, //<--- need to remove this?
BTA_GATTC_OPEN_ERROR,
BTA_GATTC_CANCEL_OPEN,
- BTA_GATTC_CANCEL_OPEN_OK,
+ BTA_GATTC_CANCEL_OPEN_OK,
BTA_GATTC_CANCEL_OPEN_ERROR,
BTA_GATTC_CONN,
BTA_GATTC_START_DISCOVER,
@@ -72,7 +72,7 @@ const tBTA_GATTC_ACTION bta_gattc_action[] =
bta_gattc_cancel_open,
bta_gattc_cancel_open_ok,
bta_gattc_cancel_open_error,
- bta_gattc_conn,
+ bta_gattc_conn,
bta_gattc_start_discover,
bta_gattc_disc_cmpl,
@@ -85,7 +85,7 @@ const tBTA_GATTC_ACTION bta_gattc_action[] =
bta_gattc_op_cmpl,
bta_gattc_search,
bta_gattc_fail,
- bta_gattc_confirm,
+ bta_gattc_confirm,
bta_gattc_execute,
bta_gattc_read_multi,
bta_gattc_ci_open,
@@ -126,7 +126,7 @@ static const UINT8 bta_gattc_st_idle[][BTA_GATTC_NUM_COLS] =
/* BTA_GATTC_INT_DISCONN_EVT */ {BTA_GATTC_IGNORE, BTA_GATTC_IDLE_ST},
-/* ===> for cache loading, saving */
+/* ===> for cache loading, saving */
/* BTA_GATTC_START_CACHE_EVT */ {BTA_GATTC_IGNORE, BTA_GATTC_IDLE_ST},
/* BTA_GATTC_CI_CACHE_OPEN_EVT */ {BTA_GATTC_IGNORE, BTA_GATTC_IDLE_ST},
/* BTA_GATTC_CI_CACHE_LOAD_EVT */ {BTA_GATTC_IGNORE, BTA_GATTC_IDLE_ST},
@@ -172,7 +172,7 @@ static const UINT8 bta_gattc_st_connected[][BTA_GATTC_NUM_COLS] =
/* BTA_GATTC_API_OPEN_EVT */ {BTA_GATTC_OPEN_ERROR, BTA_GATTC_CONN_ST},
/* BTA_GATTC_INT_OPEN_FAIL_EVT */ {BTA_GATTC_IGNORE, BTA_GATTC_CONN_ST},
/* BTA_GATTC_API_CANCEL_OPEN_EVT */ {BTA_GATTC_CANCEL_OPEN_ERROR, BTA_GATTC_CONN_ST},
-/* BTA_GATTC_INT_CANCEL_OPEN_OK_EVT */ {BTA_GATTC_IGNORE, BTA_GATTC_CONN_ST},
+/* BTA_GATTC_INT_CANCEL_OPEN_OK_EVT */ {BTA_GATTC_IGNORE, BTA_GATTC_CONN_ST},
/* BTA_GATTC_API_READ_EVT */ {BTA_GATTC_READ, BTA_GATTC_CONN_ST},
/* BTA_GATTC_API_WRITE_EVT */ {BTA_GATTC_WRITE, BTA_GATTC_CONN_ST},
@@ -190,7 +190,7 @@ static const UINT8 bta_gattc_st_connected[][BTA_GATTC_NUM_COLS] =
/* BTA_GATTC_INT_DISCONN_EVT */ {BTA_GATTC_CLOSE, BTA_GATTC_IDLE_ST},
-/* ===> for cache loading, saving */
+/* ===> for cache loading, saving */
/* BTA_GATTC_START_CACHE_EVT */ {BTA_GATTC_CACHE_OPEN, BTA_GATTC_DISCOVER_ST},
/* BTA_GATTC_CI_CACHE_OPEN_EVT */ {BTA_GATTC_IGNORE, BTA_GATTC_CONN_ST},
/* BTA_GATTC_CI_CACHE_LOAD_EVT */ {BTA_GATTC_IGNORE, BTA_GATTC_CONN_ST},
@@ -204,7 +204,7 @@ static const UINT8 bta_gattc_st_discover[][BTA_GATTC_NUM_COLS] =
/* BTA_GATTC_API_OPEN_EVT */ {BTA_GATTC_OPEN_ERROR, BTA_GATTC_DISCOVER_ST},
/* BTA_GATTC_INT_OPEN_FAIL_EVT */ {BTA_GATTC_IGNORE, BTA_GATTC_DISCOVER_ST},
/* BTA_GATTC_API_CANCEL_OPEN_EVT */ {BTA_GATTC_CANCEL_OPEN_ERROR, BTA_GATTC_DISCOVER_ST},
-/* BTA_GATTC_INT_CANCEL_OPEN_OK_EVT */ {BTA_GATTC_FAIL, BTA_GATTC_DISCOVER_ST},
+/* BTA_GATTC_INT_CANCEL_OPEN_OK_EVT */ {BTA_GATTC_FAIL, BTA_GATTC_DISCOVER_ST},
/* BTA_GATTC_API_READ_EVT */ {BTA_GATTC_Q_CMD, BTA_GATTC_DISCOVER_ST},
/* BTA_GATTC_API_WRITE_EVT */ {BTA_GATTC_Q_CMD, BTA_GATTC_DISCOVER_ST},
@@ -217,11 +217,11 @@ static const UINT8 bta_gattc_st_discover[][BTA_GATTC_NUM_COLS] =
/* BTA_GATTC_API_READ_MULTI_EVT */ {BTA_GATTC_Q_CMD, BTA_GATTC_DISCOVER_ST},
/* BTA_GATTC_INT_CONN_EVT */ {BTA_GATTC_IGNORE, BTA_GATTC_DISCOVER_ST},
/* BTA_GATTC_INT_DISCOVER_EVT */ {BTA_GATTC_START_DISCOVER, BTA_GATTC_DISCOVER_ST},
-/* BTA_GATTC_DISCOVER_CMPL_EVT */ {BTA_GATTC_DISC_CMPL, BTA_GATTC_CONN_ST},
+/* BTA_GATTC_DISCOVER_CMPL_EVT */ {BTA_GATTC_DISC_CMPL, BTA_GATTC_CONN_ST},
/* BTA_GATTC_OP_CMPL_EVT */ {BTA_GATTC_IGNORE_OP_CMPL, BTA_GATTC_DISCOVER_ST},
/* BTA_GATTC_INT_DISCONN_EVT */ {BTA_GATTC_CLOSE, BTA_GATTC_IDLE_ST},
-/* ===> for cache loading, saving */
+/* ===> for cache loading, saving */
/* BTA_GATTC_START_CACHE_EVT */ {BTA_GATTC_IGNORE, BTA_GATTC_DISCOVER_ST},
/* BTA_GATTC_CI_CACHE_OPEN_EVT */ {BTA_GATTC_CI_OPEN, BTA_GATTC_DISCOVER_ST},
/* BTA_GATTC_CI_CACHE_LOAD_EVT */ {BTA_GATTC_CI_LOAD, BTA_GATTC_DISCOVER_ST},
@@ -259,7 +259,7 @@ static char *gattc_state_code(tBTA_GATTC_STATE state_code);
** Function bta_gattc_sm_execute
**
** Description State machine event handling function for GATTC
-**
+**
**
** Returns void
**
@@ -316,7 +316,7 @@ void bta_gattc_sm_execute(tBTA_GATTC_CLCB *p_clcb, UINT16 event, tBTA_GATTC_DATA
** Function bta_gattc_hdl_event
**
** Description GATT client main event handling function.
-**
+**
**
** Returns void
**
@@ -383,7 +383,7 @@ BOOLEAN bta_gattc_hdl_event(BT_HDR *p_msg)
**
** Function gattc_evt_code
**
-** Description
+** Description
**
** Returns void
**
@@ -448,7 +448,7 @@ static char *gattc_evt_code(tBTA_GATTC_INT_EVT evt_code)
**
** Function gattc_state_code
**
-** Description
+** Description
**
** Returns void
**
diff --git a/bta/gatt/bta_gattc_utils.c b/bta/gatt/bta_gattc_utils.c
index 227129c..875164d 100644
--- a/bta/gatt/bta_gattc_utils.c
+++ b/bta/gatt/bta_gattc_utils.c
@@ -2,7 +2,7 @@
**
** Name: bta_gattc_utils.c
**
-** Description: This file contains the GATT client utility
+** Description: This file contains the GATT client utility
** function.
**
** Copyright (c) 2003-2010, Broadcom Corp., All Rights Reserved.
@@ -155,12 +155,12 @@ tBTA_GATTC_CLCB * bta_gattc_find_clcb_by_cif (UINT8 client_if, BD_ADDR remote_bd
for (i = 0; i < BTA_GATTC_CLCB_MAX; i ++, p_clcb ++)
{
- if (p_clcb->in_use &&
+ if (p_clcb->in_use &&
p_clcb->p_rcb->client_if == client_if &&
p_clcb->p_srcb &&
bdcmp(p_clcb->p_srcb->server_bda, remote_bda) == 0)
return p_clcb;
- }
+ }
return NULL;
}
/*******************************************************************************
@@ -182,7 +182,7 @@ tBTA_GATTC_CLCB * bta_gattc_find_clcb_by_conn_id (UINT16 conn_id)
if (p_clcb->in_use &&
p_clcb->bta_conn_id == conn_id)
return p_clcb;
- }
+ }
return NULL;
}
@@ -205,14 +205,14 @@ tBTA_GATTC_CLCB * bta_gattc_clcb_alloc(tBTA_GATTC_IF client_if, BD_ADDR remote_b
if (!bta_gattc_cb.clcb[i_clcb].in_use)
{
#if BTA_GATT_DEBUG == TRUE
- APPL_TRACE_DEBUG1("bta_gattc_clcb_alloc: found clcb[%d] available",i_clcb);
+ APPL_TRACE_DEBUG1("bta_gattc_clcb_alloc: found clcb[%d] available",i_clcb);
#endif
p_clcb = &bta_gattc_cb.clcb[i_clcb];
p_clcb->in_use = TRUE;
bdcpy(p_clcb->bda, remote_bda);
p_clcb->p_rcb = bta_gattc_cl_get_regcb(client_if);
-
+
if ((p_clcb->p_srcb = bta_gattc_find_srcb(remote_bda)) == NULL)
p_clcb->p_srcb = bta_gattc_srcb_alloc(remote_bda);
@@ -265,7 +265,7 @@ void bta_gattc_clcb_dealloc(tBTA_GATTC_CLCB *p_clcb)
{
if (p_clcb)
- {
+ {
if (p_clcb->p_srcb->num_clcb)
p_clcb->p_srcb->num_clcb --;
@@ -274,12 +274,12 @@ void bta_gattc_clcb_dealloc(tBTA_GATTC_CLCB *p_clcb)
utl_freebuf((void **)&p_clcb->p_q_cmd);
- APPL_TRACE_ERROR2("bta_gattc_clcb_dealloc in_use=%d conn_id=%d",p_clcb->in_use, p_clcb->bta_conn_id);
+ APPL_TRACE_ERROR2("bta_gattc_clcb_dealloc in_use=%d conn_id=%d",p_clcb->in_use, p_clcb->bta_conn_id);
memset(p_clcb, 0, sizeof(tBTA_GATTC_CLCB));
}
else
{
- APPL_TRACE_ERROR0("bta_gattc_clcb_dealloc p_clcb=NULL");
+ APPL_TRACE_ERROR0("bta_gattc_clcb_dealloc p_clcb=NULL");
}
}
@@ -405,7 +405,7 @@ BOOLEAN bta_gattc_enqueue(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
**
** Description pack UUID into a stream.
**
-** Returns
+** Returns
**
*******************************************************************************/
void bta_gattc_pack_attr_uuid(tBTA_GATTC_CACHE_ATTR *p_attr, tBT_UUID *p_uuid)
@@ -433,18 +433,18 @@ void bta_gattc_pack_attr_uuid(tBTA_GATTC_CACHE_ATTR *p_attr, tBT_UUID *p_uuid)
**
** Description check if the service notificaition has been registered.
**
-** Returns
+** Returns
**
*******************************************************************************/
-BOOLEAN bta_gattc_check_notif_registry(tBTA_GATTC_RCB *p_clreg, tBTA_GATTC_SERV *p_srcb,
- tBTA_GATTC_NOTIFY *p_notify)
+BOOLEAN bta_gattc_check_notif_registry(tBTA_GATTC_RCB *p_clreg, tBTA_GATTC_SERV *p_srcb,
+ tBTA_GATTC_NOTIFY *p_notify)
{
UINT8 i;
for (i = 0 ; i < BTA_GATTC_NOTIF_REG_MAX; i ++)
{
if (p_clreg->notif_reg[i].in_use &&
- bdcmp(p_clreg->notif_reg[i].remote_bda, p_srcb->server_bda) == 0 &&
+ bdcmp(p_clreg->notif_reg[i].remote_bda, p_srcb->server_bda) == 0 &&
(bta_gattc_uuid_compare(p_clreg->notif_reg[i].char_id.srvc_id.id.uuid, p_notify->char_id.srvc_id.id.uuid, FALSE) &&
p_clreg->notif_reg[i].char_id.srvc_id.id.inst_id == p_notify->char_id.srvc_id.id.inst_id &&
p_clreg->notif_reg[i].char_id.srvc_id.is_primary == p_notify->char_id.srvc_id.is_primary &&
@@ -499,28 +499,28 @@ void bta_gattc_clear_notif_registration(UINT16 conn_id)
**
** Description pack the data from read response into callback data structure.
**
-** Returns
+** Returns
**
*******************************************************************************/
-tBTA_GATT_STATUS bta_gattc_pack_read_cb_data(tBTA_GATTC_SERV *p_srcb, tBT_UUID descr_uuid,
+tBTA_GATT_STATUS bta_gattc_pack_read_cb_data(tBTA_GATTC_SERV *p_srcb, tBT_UUID descr_uuid,
tGATT_VALUE *p_attr, tBTA_GATT_READ_VAL *p_value)
{
UINT8 i = 0, *pp = p_attr->value;
tBT_UUID uuid = {LEN_UUID_16, {GATT_UUID_CHAR_AGG_FORMAT}};
UINT16 handle;
tBTA_GATT_STATUS status = BTA_GATT_OK;
-
- /* GATT_UUID_CHAR_AGG_FORMAT */
+
+ /* GATT_UUID_CHAR_AGG_FORMAT */
if (bta_gattc_uuid_compare (uuid, descr_uuid, TRUE))
{
while (p_attr->len >= 2 && i < BTA_GATTC_MULTI_MAX)
{
STREAM_TO_UINT16(handle, pp);
- if (bta_gattc_handle2id(p_srcb,
- handle,
- &p_value->aggre_value.pre_format[i].char_id.srvc_id,
- &p_value->aggre_value.pre_format[i].char_id.char_id,
+ if (bta_gattc_handle2id(p_srcb,
+ handle,
+ &p_value->aggre_value.pre_format[i].char_id.srvc_id,
+ &p_value->aggre_value.pre_format[i].char_id.char_id,
&p_value->aggre_value.pre_format[i].descr_type) == FALSE)
{
status = BTA_GATT_INTERNAL_ERROR;
@@ -557,7 +557,7 @@ BOOLEAN bta_gattc_mark_bg_conn (tBTA_GATTC_IF client_if, BD_ADDR remote_bda, BO
for (i = 0; i < BTA_GATTC_KNOWN_SR_MAX; i ++, p_bg_tck ++)
{
- if (p_bg_tck->in_use &&
+ if (p_bg_tck->in_use &&
bdcmp(p_bg_tck->remote_bda, remote_bda) == 0)
{
if (add)
@@ -576,9 +576,9 @@ BOOLEAN bta_gattc_mark_bg_conn (tBTA_GATTC_IF client_if, BD_ADDR remote_bda, BO
}
else /* adding a new device mask */
{
- for (i = 0, p_bg_tck = &bta_gattc_cb.bg_track[0];
+ for (i = 0, p_bg_tck = &bta_gattc_cb.bg_track[0];
i < BTA_GATTC_KNOWN_SR_MAX; i ++, p_bg_tck ++)
- {
+ {
if (!p_bg_tck->in_use)
{
p_bg_tck->in_use = TRUE;
@@ -608,7 +608,7 @@ BOOLEAN bta_gattc_check_bg_conn (tBTA_GATTC_IF client_if, BD_ADDR remote_bda)
for (i = 0; i < BTA_GATTC_KNOWN_SR_MAX; i ++, p_bg_tck ++)
{
- if (p_bg_tck->in_use &&
+ if (p_bg_tck->in_use &&
bdcmp(p_bg_tck->remote_bda, remote_bda) == 0)
{
if ((p_bg_tck->cif_mask &(1 <<(client_if - 1))) != 0)
@@ -624,10 +624,10 @@ BOOLEAN bta_gattc_check_bg_conn (tBTA_GATTC_IF client_if, BD_ADDR remote_bda)
**
** Description send open callback
**
-** Returns
+** Returns
**
*******************************************************************************/
-void bta_gattc_send_open_cback( tBTA_GATTC_RCB *p_clreg, tBTA_GATT_STATUS status,
+void bta_gattc_send_open_cback( tBTA_GATTC_RCB *p_clreg, tBTA_GATT_STATUS status,
BD_ADDR remote_bda, UINT16 conn_id)
{
tBTA_GATTC cb_data;
@@ -640,7 +640,7 @@ void bta_gattc_send_open_cback( tBTA_GATTC_RCB *p_clreg, tBTA_GATT_STATUS status
cb_data.open.client_if = p_clreg->client_if;
cb_data.open.conn_id = conn_id;
bdcpy(cb_data.open.remote_bda, remote_bda);
-
+
(*p_clreg->p_cback)(BTA_GATTC_OPEN_EVT, &cb_data);
}
}
diff --git a/bta/gatt/bta_gatts_act.c b/bta/gatt/bta_gatts_act.c
index cb56a32..e327d41 100644
--- a/bta/gatt/bta_gatts_act.c
+++ b/bta/gatt/bta_gatts_act.c
@@ -2,7 +2,7 @@
**
** Name: bta_gatts_act.c
**
-** Description: This file contains the GATT Server action
+** Description: This file contains the GATT Server action
** functions for the state machine.
**
** Copyright (c) 2003-2011, Broadcom Corp., All Rights Reserved.
@@ -28,9 +28,9 @@ static BOOLEAN bta_gatts_nv_srv_chg_cback(tGATTS_SRV_CHG_CMD cmd, tGATTS_SRV_CHG
static void bta_gatts_conn_cback (tGATT_IF gatt_if, BD_ADDR bda, UINT16 conn_id, BOOLEAN connected, tGATT_DISCONN_REASON reason);
static void bta_gatts_send_request_cback (UINT16 conn_id,
- UINT32 trans_id,
+ UINT32 trans_id,
tGATTS_REQ_TYPE req_type, tGATTS_DATA *p_data);
-static tGATT_CBACK bta_gatts_cback =
+static tGATT_CBACK bta_gatts_cback =
{
bta_gatts_conn_cback,
NULL,
@@ -73,8 +73,8 @@ static void bta_gatts_nv_save_cback(BOOLEAN is_add, tGATTS_HNDL_RANGE *p_hndl_ra
*******************************************************************************/
static BOOLEAN bta_gatts_nv_srv_chg_cback(tGATTS_SRV_CHG_CMD cmd, tGATTS_SRV_CHG_REQ *p_req, tGATTS_SRV_CHG_RSP *p_rsp)
{
- return bta_gatts_co_srv_chg((tBTA_GATTS_SRV_CHG_CMD) cmd,
- (tBTA_GATTS_SRV_CHG_REQ *) p_req,
+ return bta_gatts_co_srv_chg((tBTA_GATTS_SRV_CHG_CMD) cmd,
+ (tBTA_GATTS_SRV_CHG_REQ *) p_req,
(tBTA_GATTS_SRV_CHG_RSP *) p_rsp);
}
@@ -165,8 +165,8 @@ void bta_gatts_register(tBTA_GATTS_CB *p_cb, tBTA_GATTS_DATA *p_msg)
p_cb->rcb[first_unuse].in_use = TRUE;
p_cb->rcb[first_unuse].p_cback = p_msg->api_reg.p_cback;
memcpy(&p_cb->rcb[first_unuse].app_uuid, &p_msg->api_reg.app_uuid, sizeof(tBT_UUID));
- cb_data.reg_oper.server_if =
- p_cb->rcb[first_unuse].gatt_if = GATT_Register(&p_msg->api_reg.app_uuid, &bta_gatts_cback);
+ cb_data.reg_oper.server_if =
+ p_cb->rcb[first_unuse].gatt_if = GATT_Register(&p_msg->api_reg.app_uuid, &bta_gatts_cback);
if ( !p_cb->rcb[first_unuse].gatt_if)
{
status = BTA_GATT_NO_RESOURCES;
@@ -236,7 +236,7 @@ void bta_gatts_deregister(tBTA_GATTS_CB *p_cb, tBTA_GATTS_DATA *p_msg)
tBTA_GATTS cb_data;
cb_data.reg_oper.server_if = p_msg->api_dereg.server_if;
- cb_data.reg_oper.status = status;
+ cb_data.reg_oper.status = status;
for (i = 0; i < BTA_GATTS_MAX_APP_NUM; i ++)
{
@@ -244,13 +244,13 @@ void bta_gatts_deregister(tBTA_GATTS_CB *p_cb, tBTA_GATTS_DATA *p_msg)
{
p_cback = p_cb->rcb[i].p_cback;
status = BTA_GATT_OK;
-
+
/* deregister the app */
GATT_Deregister(p_cb->rcb[i].gatt_if);
/* reset cb */
memset(&p_cb->rcb[i], 0, sizeof(tBTA_GATTS_RCB));
- cb_data.reg_oper.status = status;
+ cb_data.reg_oper.status = status;
break;
}
}
@@ -275,7 +275,7 @@ void bta_gatts_deregister(tBTA_GATTS_CB *p_cb, tBTA_GATTS_DATA *p_msg)
*******************************************************************************/
void bta_gatts_create_srvc(tBTA_GATTS_CB *p_cb, tBTA_GATTS_DATA * p_msg)
{
- UINT8 rcb_idx;
+ UINT8 rcb_idx;
tBTA_GATTS cb_data;
UINT8 srvc_idx;
UINT16 service_id = 0;
@@ -292,10 +292,10 @@ void bta_gatts_create_srvc(tBTA_GATTS_CB *p_cb, tBTA_GATTS_DATA * p_msg)
if ((srvc_idx = bta_gatts_alloc_srvc_cb(p_cb, rcb_idx)) != BTA_GATTS_INVALID_APP)
{
/* create the service now */
- service_id = GATTS_CreateService (p_cb->rcb[rcb_idx].gatt_if,
- &p_msg->api_create_svc.service_uuid,
+ service_id = GATTS_CreateService (p_cb->rcb[rcb_idx].gatt_if,
+ &p_msg->api_create_svc.service_uuid,
p_msg->api_create_svc.inst,
- p_msg->api_create_svc.num_handle,
+ p_msg->api_create_svc.num_handle,
p_msg->api_create_svc.is_pri);
if (service_id != 0)
@@ -310,7 +310,7 @@ void bta_gatts_create_srvc(tBTA_GATTS_CB *p_cb, tBTA_GATTS_DATA * p_msg)
// btla-specific ++
cb_data.create.is_primary = p_msg->api_create_svc.is_pri;
// btla-specific --
- cb_data.create.server_if = p_cb->rcb[rcb_idx].gatt_if;
+ cb_data.create.server_if = p_cb->rcb[rcb_idx].gatt_if;
}
else
{
@@ -342,7 +342,7 @@ void bta_gatts_create_srvc(tBTA_GATTS_CB *p_cb, tBTA_GATTS_DATA * p_msg)
*******************************************************************************/
void bta_gatts_add_include_srvc(tBTA_GATTS_SRVC_CB *p_srvc_cb,tBTA_GATTS_DATA * p_msg)
{
- tBTA_GATTS_RCB *p_rcb = &bta_gatts_cb.rcb[p_srvc_cb->rcb_idx];
+ tBTA_GATTS_RCB *p_rcb = &bta_gatts_cb.rcb[p_srvc_cb->rcb_idx];
UINT16 attr_id = 0;
tBTA_GATTS cb_data;
@@ -376,8 +376,8 @@ void bta_gatts_add_include_srvc(tBTA_GATTS_SRVC_CB *p_srvc_cb,tBTA_GATTS_DATA *
*******************************************************************************/
void bta_gatts_add_char(tBTA_GATTS_SRVC_CB *p_srvc_cb, tBTA_GATTS_DATA * p_msg)
{
- tBTA_GATTS_RCB *p_rcb = &bta_gatts_cb.rcb[p_srvc_cb->rcb_idx];
- UINT16 attr_id = 0;
+ tBTA_GATTS_RCB *p_rcb = &bta_gatts_cb.rcb[p_srvc_cb->rcb_idx];
+ UINT16 attr_id = 0;
tBTA_GATTS cb_data;
attr_id = GATTS_AddCharacteristic(p_msg->api_add_char.hdr.layer_specific,
@@ -414,12 +414,12 @@ void bta_gatts_add_char(tBTA_GATTS_SRVC_CB *p_srvc_cb, tBTA_GATTS_DATA * p_msg)
*******************************************************************************/
void bta_gatts_add_char_descr(tBTA_GATTS_SRVC_CB *p_srvc_cb, tBTA_GATTS_DATA * p_msg)
{
- tBTA_GATTS_RCB *p_rcb = &bta_gatts_cb.rcb[p_srvc_cb->rcb_idx];
- UINT16 attr_id = 0;
+ tBTA_GATTS_RCB *p_rcb = &bta_gatts_cb.rcb[p_srvc_cb->rcb_idx];
+ UINT16 attr_id = 0;
tBTA_GATTS cb_data;
attr_id = GATTS_AddCharDescriptor(p_msg->api_add_char_descr.hdr.layer_specific,
- p_msg->api_add_char_descr.perm,
+ p_msg->api_add_char_descr.perm,
&p_msg->api_add_char_descr.descr_uuid);
cb_data.add_result.server_if = p_rcb->gatt_if;
@@ -453,13 +453,13 @@ void bta_gatts_add_char_descr(tBTA_GATTS_SRVC_CB *p_srvc_cb, tBTA_GATTS_DATA * p
*******************************************************************************/
void bta_gatts_delete_service(tBTA_GATTS_SRVC_CB *p_srvc_cb, tBTA_GATTS_DATA * p_msg)
{
- tBTA_GATTS_RCB *p_rcb = &bta_gatts_cb.rcb[p_srvc_cb->rcb_idx];
+ tBTA_GATTS_RCB *p_rcb = &bta_gatts_cb.rcb[p_srvc_cb->rcb_idx];
tBTA_GATTS cb_data;
cb_data.srvc_oper.server_if = p_rcb->gatt_if;
cb_data.srvc_oper.service_id = p_msg->api_add_incl_srvc.hdr.layer_specific;
- if (GATTS_DeleteService(p_rcb->gatt_if,
+ if (GATTS_DeleteService(p_rcb->gatt_if,
&p_srvc_cb->service_uuid,
p_srvc_cb->inst_num))
{
@@ -486,7 +486,7 @@ void bta_gatts_delete_service(tBTA_GATTS_SRVC_CB *p_srvc_cb, tBTA_GATTS_DATA * p
*******************************************************************************/
void bta_gatts_start_service(tBTA_GATTS_SRVC_CB *p_srvc_cb, tBTA_GATTS_DATA * p_msg)
{
- tBTA_GATTS_RCB *p_rcb = &bta_gatts_cb.rcb[p_srvc_cb->rcb_idx];
+ tBTA_GATTS_RCB *p_rcb = &bta_gatts_cb.rcb[p_srvc_cb->rcb_idx];
tBTA_GATTS cb_data;
cb_data.srvc_oper.server_if = p_rcb->gatt_if;
@@ -519,7 +519,7 @@ void bta_gatts_start_service(tBTA_GATTS_SRVC_CB *p_srvc_cb, tBTA_GATTS_DATA * p_
*******************************************************************************/
void bta_gatts_stop_service(tBTA_GATTS_SRVC_CB *p_srvc_cb, tBTA_GATTS_DATA * p_msg)
{
- tBTA_GATTS_RCB *p_rcb = &bta_gatts_cb.rcb[p_srvc_cb->rcb_idx];
+ tBTA_GATTS_RCB *p_rcb = &bta_gatts_cb.rcb[p_srvc_cb->rcb_idx];
tBTA_GATTS cb_data;
GATTS_StopService(p_srvc_cb->service_id);
@@ -544,14 +544,14 @@ void bta_gatts_stop_service(tBTA_GATTS_SRVC_CB *p_srvc_cb, tBTA_GATTS_DATA * p_m
void bta_gatts_send_rsp (tBTA_GATTS_CB *p_cb, tBTA_GATTS_DATA * p_msg)
{
- if (GATTS_SendRsp (p_msg->api_rsp.hdr.layer_specific,
- p_msg->api_rsp.trans_id,
- p_msg->api_rsp.status,
+ if (GATTS_SendRsp (p_msg->api_rsp.hdr.layer_specific,
+ p_msg->api_rsp.trans_id,
+ p_msg->api_rsp.status,
(tGATTS_RSP *)p_msg->api_rsp.p_rsp) != GATT_SUCCESS)
{
APPL_TRACE_ERROR0("Sending response failed");
}
-
+
}
/*******************************************************************************
**
@@ -574,17 +574,17 @@ void bta_gatts_indicate_handle (tBTA_GATTS_CB *p_cb, tBTA_GATTS_DATA * p_msg)
{
if (p_msg->api_indicate.need_confirm)
- status = GATTS_HandleValueIndication (p_msg->api_indicate.hdr.layer_specific,
- p_msg->api_indicate.attr_id,
- p_msg->api_indicate.len,
+ status = GATTS_HandleValueIndication (p_msg->api_indicate.hdr.layer_specific,
+ p_msg->api_indicate.attr_id,
+ p_msg->api_indicate.len,
p_msg->api_indicate.value);
else
- status = GATTS_HandleValueNotification (p_msg->api_indicate.hdr.layer_specific,
- p_msg->api_indicate.attr_id,
- p_msg->api_indicate.len,
+ status = GATTS_HandleValueNotification (p_msg->api_indicate.hdr.layer_specific,
+ p_msg->api_indicate.attr_id,
+ p_msg->api_indicate.len,
p_msg->api_indicate.value);
- if (status != GATT_SUCCESS &&
+ if (status != GATT_SUCCESS &&
p_msg->api_indicate.need_confirm &&
p_cb->rcb[p_srvc_cb->rcb_idx].p_cback)
{
@@ -602,7 +602,7 @@ void bta_gatts_indicate_handle (tBTA_GATTS_CB *p_cb, tBTA_GATTS_DATA * p_msg)
**
** Function bta_gatts_open
**
-** Description
+** Description
**
** Returns none.
**
@@ -633,7 +633,7 @@ void bta_gatts_open (tBTA_GATTS_CB *p_cb, tBTA_GATTS_DATA * p_msg)
**
** Function bta_gatts_cancel_open
**
-** Description
+** Description
**
** Returns none.
**
@@ -666,7 +666,7 @@ void bta_gatts_cancel_open (tBTA_GATTS_CB *p_cb, tBTA_GATTS_DATA * p_msg)
**
** Function bta_gatts_close
**
-** Description
+** Description
**
** Returns none.
**
@@ -698,7 +698,7 @@ void bta_gatts_close (tBTA_GATTS_CB *p_cb, tBTA_GATTS_DATA * p_msg)
{
APPL_TRACE_ERROR1("Unknown connection ID: %d", p_msg->hdr.layer_specific);
}
-
+
}
@@ -712,7 +712,7 @@ void bta_gatts_close (tBTA_GATTS_CB *p_cb, tBTA_GATTS_DATA * p_msg)
**
*******************************************************************************/
static void bta_gatts_send_request_cback (UINT16 conn_id,
- UINT32 trans_id,
+ UINT32 trans_id,
tGATTS_REQ_TYPE req_type, tGATTS_DATA *p_data)
{
tBTA_GATTS cb_data;
@@ -725,7 +725,7 @@ static void bta_gatts_send_request_cback (UINT16 conn_id,
{
p_rcb = bta_gatts_find_app_rcb_by_app_if(gatt_if);
- APPL_TRACE_DEBUG3 ("bta_gatts_send_request_cback conn_id=%d trans_id=%d req_type=%d", conn_id, trans_id, req_type);
+ APPL_TRACE_DEBUG3 ("bta_gatts_send_request_cback conn_id=%d trans_id=%d req_type=%d", conn_id, trans_id, req_type);
if (p_rcb && p_rcb->p_cback)
{
@@ -755,15 +755,15 @@ static void bta_gatts_send_request_cback (UINT16 conn_id,
** Returns none.
**
*******************************************************************************/
-static void bta_gatts_conn_cback (tGATT_IF gatt_if, BD_ADDR bda, UINT16 conn_id,
+static void bta_gatts_conn_cback (tGATT_IF gatt_if, BD_ADDR bda, UINT16 conn_id,
BOOLEAN connected, tGATT_DISCONN_REASON reason)
{
tBTA_GATTS cb_data;
- UINT8 evt = connected ? BTA_GATTS_CONNECT_EVT: BTA_GATTS_DISCONNECT_EVT;
+ UINT8 evt = connected ? BTA_GATTS_CONNECT_EVT: BTA_GATTS_DISCONNECT_EVT;
tBTA_GATTS_RCB *p_reg;
- APPL_TRACE_DEBUG4 ("bta_gatts_conn_cback gatt_if=%d conn_id=%d connected=%d reason = 0x%04d",
- gatt_if, conn_id, connected, reason);
+ APPL_TRACE_DEBUG4 ("bta_gatts_conn_cback gatt_if=%d conn_id=%d connected=%d reason = 0x%04d",
+ gatt_if, conn_id, connected, reason);
APPL_TRACE_DEBUG6("bta_gatts_conn_cback bda :%02x-%02x-%02x-%02x-%02x-%02x ",
bda[0], bda[1], bda[2], bda[3], bda[4], bda[5]);
diff --git a/bta/gatt/bta_gatts_api.c b/bta/gatt/bta_gatts_api.c
index 77a8f6e..ed2c5b6 100644
--- a/bta/gatt/bta_gatts_api.c
+++ b/bta/gatt/bta_gatts_api.c
@@ -2,7 +2,7 @@
**
** Name: bta_gatts_api.c
**
-** Description: This is the implementation of the API for GATT server
+** Description: This is the implementation of the API for GATT server
** of BTA.
**
** Copyright (c) 2010-2011, Broadcom Corp., All Rights Reserved.
@@ -34,13 +34,13 @@ static const tBTA_SYS_REG bta_gatts_reg =
**
** Function BTA_GATTS_AppRegister
**
-** Description This function is called to register application callbacks
+** Description This function is called to register application callbacks
** with BTA GATTS module.
**
** Parameters p_app_uuid - applicaiton UUID
** p_cback - pointer to the application callback function.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
void BTA_GATTS_AppRegister(tBT_UUID *p_app_uuid, tBTA_GATTS_CBACK *p_cback)
@@ -75,7 +75,7 @@ void BTA_GATTS_AppRegister(tBT_UUID *p_app_uuid, tBTA_GATTS_CBACK *p_cback)
** Function BTA_GATTS_AppDeregister
**
** Description De-register with GATT Server.
-**
+**
** Parameters app_id: applicatino ID.
**
** Returns void
@@ -100,11 +100,11 @@ void BTA_GATTS_AppDeregister(tBTA_GATTS_IF server_if)
** Function BTA_GATTS_CreateService
**
** Description Create a service. When service creation is done, a callback
-** event BTA_GATTS_CREATE_SRVC_EVT is called to report status
+** event BTA_GATTS_CREATE_SRVC_EVT is called to report status
** and service ID to the profile. The service ID obtained in
** the callback function needs to be used when adding included
** service and characteristics/descriptors into the service.
-**
+**
** Parameters app_id: Profile ID this service is belonged to.
** p_service_uuid: service UUID.
** inst: instance ID number of this service.
@@ -114,7 +114,7 @@ void BTA_GATTS_AppDeregister(tBTA_GATTS_IF server_if)
** Returns void
**
*******************************************************************************/
-void BTA_GATTS_CreateService(tBTA_GATTS_IF server_if, tBT_UUID *p_service_uuid, UINT8 inst,
+void BTA_GATTS_CreateService(tBTA_GATTS_IF server_if, tBT_UUID *p_service_uuid, UINT8 inst,
UINT16 num_handle, BOOLEAN is_primary)
{
tBTA_GATTS_API_CREATE_SRVC *p_buf;
@@ -140,8 +140,8 @@ void BTA_GATTS_CreateService(tBTA_GATTS_IF server_if, tBT_UUID *p_service_uuid,
** Description This function is called to add an included service. After included
** service is included, a callback event BTA_GATTS_ADD_INCL_SRVC_EVT
** is reported the included service ID.
-**
-** Parameters service_id: service ID to which this included service is to
+**
+** Parameters service_id: service ID to which this included service is to
** be added.
** included_service_id: the service ID to be included.
**
@@ -152,8 +152,8 @@ void BTA_GATTS_AddIncludeService(UINT16 service_id, UINT16 included_service_id)
{
tBTA_GATTS_API_ADD_INCL_SRVC *p_buf;
- if ((p_buf =
- (tBTA_GATTS_API_ADD_INCL_SRVC *) GKI_getbuf(sizeof(tBTA_GATTS_API_ADD_INCL_SRVC)))
+ if ((p_buf =
+ (tBTA_GATTS_API_ADD_INCL_SRVC *) GKI_getbuf(sizeof(tBTA_GATTS_API_ADD_INCL_SRVC)))
!= NULL)
{
p_buf->hdr.event = BTA_GATTS_API_ADD_INCL_SRVC_EVT;
@@ -171,14 +171,14 @@ void BTA_GATTS_AddIncludeService(UINT16 service_id, UINT16 included_service_id)
** Function BTA_GATTS_AddCharacteristic
**
** Description This function is called to add a characteristic into a service.
-**
-** Parameters service_id: service ID to which this included service is to
+**
+** Parameters service_id: service ID to which this included service is to
** be added.
** p_char_uuid : Characteristic UUID.
** perm : Characteristic value declaration attribute permission.
** property : Characteristic Properties
**
-** Returns None
+** Returns None
**
*******************************************************************************/
void BTA_GATTS_AddCharacteristic (UINT16 service_id, tBT_UUID *p_char_uuid,
@@ -208,19 +208,19 @@ void BTA_GATTS_AddCharacteristic (UINT16 service_id, tBT_UUID *p_char_uuid,
**
** Function BTA_GATTS_AddCharDescriptor
**
-** Description This function is called to add characteristic descriptor. When
+** Description This function is called to add characteristic descriptor. When
** it's done, a callback event BTA_GATTS_ADD_DESCR_EVT is called
** to report the status and an ID number for this descriptor.
**
-** Parameters service_id: service ID to which this charatceristic descriptor is to
+** Parameters service_id: service ID to which this charatceristic descriptor is to
** be added.
** perm: descriptor access permission.
-** p_descr_uuid: descriptor UUID.
+** p_descr_uuid: descriptor UUID.
**
-** Returns returns status.
+** Returns returns status.
**
*******************************************************************************/
-void BTA_GATTS_AddCharDescriptor (UINT16 service_id,
+void BTA_GATTS_AddCharDescriptor (UINT16 service_id,
tBTA_GATT_PERM perm,
tBT_UUID * p_descr_uuid)
{
@@ -250,12 +250,12 @@ void BTA_GATTS_AddCharDescriptor (UINT16 service_id,
**
** Function BTA_GATTS_DeleteService
**
-** Description This function is called to delete a service. When this is done,
+** Description This function is called to delete a service. When this is done,
** a callback event BTA_GATTS_DELETE_EVT is report with the status.
**
-** Parameters service_id: service_id to be deleted.
+** Parameters service_id: service_id to be deleted.
**
-** Returns returns none.
+** Returns returns none.
**
*******************************************************************************/
void BTA_GATTS_DeleteService(UINT16 service_id)
@@ -283,7 +283,7 @@ void BTA_GATTS_DeleteService(UINT16 service_id)
** Parameters service_id: the service ID to be started.
** sup_transport: supported trasnport.
**
-** Returns None.
+** Returns None.
**
*******************************************************************************/
void BTA_GATTS_StartService(UINT16 service_id, tBTA_GATT_TRANSPORT sup_transport)
@@ -310,7 +310,7 @@ void BTA_GATTS_StartService(UINT16 service_id, tBTA_GATT_TRANSPORT sup_transpor
**
** Parameters service_id - service to be topped.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
void BTA_GATTS_StopService(UINT16 service_id)
@@ -340,10 +340,10 @@ void BTA_GATTS_StopService(UINT16 service_id)
** p_data: data to indicate.
** need_confirm - if this indication expects a confirmation or not.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
-void BTA_GATTS_HandleValueIndication (UINT16 conn_id, UINT16 attr_id, UINT16 data_len,
+void BTA_GATTS_HandleValueIndication (UINT16 conn_id, UINT16 attr_id, UINT16 data_len,
UINT8 *p_data, BOOLEAN need_confirm)
{
tBTA_GATTS_API_INDICATION *p_buf;
@@ -380,10 +380,10 @@ void BTA_GATTS_HandleValueIndication (UINT16 conn_id, UINT16 attr_id, UINT16 dat
** status - response status
** p_msg - response data.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
-void BTA_GATTS_SendRsp (UINT16 conn_id, UINT32 trans_id,
+void BTA_GATTS_SendRsp (UINT16 conn_id, UINT32 trans_id,
tBTA_GATT_STATUS status, tBTA_GATTS_RSP *p_msg)
{
tBTA_GATTS_API_RSP *p_buf;
@@ -418,7 +418,7 @@ void BTA_GATTS_SendRsp (UINT16 conn_id, UINT32 trans_id,
**
** Description Open a direct open connection or add a background auto connection
** bd address
-**
+**
** Parameters server_if: server interface.
** remote_bda: remote device BD address.
** is_direct: direct connection or background auto connection
@@ -449,7 +449,7 @@ void BTA_GATTS_Open(tBTA_GATTS_IF server_if, BD_ADDR remote_bda, BOOLEAN is_dire
**
** Description Cancel a direct open connection or remove a background auto connection
** bd address
-**
+**
** Parameters server_if: server interface.
** remote_bda: remote device BD address.
** is_direct: direct connection or background auto connection
@@ -477,7 +477,7 @@ void BTA_GATTS_CancelOpen(tBTA_GATTS_IF server_if, BD_ADDR remote_bda, BOOLEAN i
** Function BTA_GATTS_Close
**
** Description Close a connection a remote device.
-**
+**
** Parameters conn_id: connectino ID to be closed.
**
** Returns void
diff --git a/bta/gatt/bta_gatts_int.h b/bta/gatt/bta_gatts_int.h
index 77945f0..a166e05 100644
--- a/bta/gatt/bta_gatts_int.h
+++ b/bta/gatt/bta_gatts_int.h
@@ -27,7 +27,7 @@ enum
BTA_GATTS_API_REG_EVT = BTA_SYS_EVT_START(BTA_ID_GATTS),
BTA_GATTS_INT_START_IF_EVT,
BTA_GATTS_API_DEREG_EVT,
- BTA_GATTS_API_CREATE_SRVC_EVT,
+ BTA_GATTS_API_CREATE_SRVC_EVT,
BTA_GATTS_API_INDICATION_EVT,
BTA_GATTS_API_ADD_INCL_SRVC_EVT,
@@ -68,7 +68,7 @@ typedef tBTA_GATTS_INT_START_IF tBTA_GATTS_API_DEREG;
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
tBTA_GATTS_IF server_if;
tBT_UUID service_uuid;
UINT16 num_handle;
@@ -79,7 +79,7 @@ typedef struct
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
tBT_UUID char_uuid;
tBTA_GATT_PERM perm;
tBTA_GATT_CHAR_PROP property;
@@ -88,16 +88,16 @@ typedef struct
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
UINT16 included_service_id;
}tBTA_GATTS_API_ADD_INCL_SRVC;
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
tBT_UUID descr_uuid;
- tBTA_GATT_PERM perm;
+ tBTA_GATT_PERM perm;
}tBTA_GATTS_API_ADD_DESCR;
typedef struct
@@ -166,15 +166,15 @@ typedef struct
typedef struct
{
tBT_UUID service_uuid; /* service UUID */
- UINT16 service_id; /* service handle */
+ UINT16 service_id; /* service handle */
UINT8 inst_num; /* instance ID */
- UINT8 rcb_idx;
+ UINT8 rcb_idx;
UINT8 idx; /* self index of serviec CB */
BOOLEAN in_use;
}tBTA_GATTS_SRVC_CB;
-
+
/* GATT server control block */
typedef struct
{
diff --git a/bta/gatt/bta_gatts_main.c b/bta/gatt/bta_gatts_main.c
index 6870016..0b41ce2 100644
--- a/bta/gatt/bta_gatts_main.c
+++ b/bta/gatt/bta_gatts_main.c
@@ -2,7 +2,7 @@
**
** Name: bta_gatts_main.c
**
-** Description: This file contains the GATT server main functions
+** Description: This file contains the GATT server main functions
** and state machine.
**
** Copyright (c) 2003-2010, Broadcom Corp., All Rights Reserved.
@@ -43,7 +43,7 @@ tBTA_GATTS_CB bta_gatts_cb;
** Function bta_gatts_hdl_event
**
** Description BTA GATT server main event handling function.
-**
+**
**
** Returns void
**
@@ -72,19 +72,19 @@ BOOLEAN bta_gatts_hdl_event(BT_HDR *p_msg)
break;
case BTA_GATTS_API_INDICATION_EVT:
- bta_gatts_indicate_handle(p_cb,(tBTA_GATTS_DATA *) p_msg);
+ bta_gatts_indicate_handle(p_cb,(tBTA_GATTS_DATA *) p_msg);
break;
case BTA_GATTS_API_OPEN_EVT:
- bta_gatts_open(p_cb,(tBTA_GATTS_DATA *) p_msg);
+ bta_gatts_open(p_cb,(tBTA_GATTS_DATA *) p_msg);
break;
case BTA_GATTS_API_CANCEL_OPEN_EVT:
- bta_gatts_cancel_open(p_cb,(tBTA_GATTS_DATA *) p_msg);
+ bta_gatts_cancel_open(p_cb,(tBTA_GATTS_DATA *) p_msg);
break;
case BTA_GATTS_API_CLOSE_EVT:
- bta_gatts_close(p_cb,(tBTA_GATTS_DATA *) p_msg);
+ bta_gatts_close(p_cb,(tBTA_GATTS_DATA *) p_msg);
break;
case BTA_GATTS_API_RSP_EVT:
@@ -98,7 +98,7 @@ BOOLEAN bta_gatts_hdl_event(BT_HDR *p_msg)
case BTA_GATTS_API_START_SRVC_EVT:
case BTA_GATTS_API_STOP_SRVC_EVT:
- p_srvc_cb = bta_gatts_find_srvc_cb_by_srvc_id(p_cb,
+ p_srvc_cb = bta_gatts_find_srvc_cb_by_srvc_id(p_cb,
((tBTA_GATTS_DATA *)p_msg)->api_add_incl_srvc.hdr.layer_specific);
if (p_srvc_cb != NULL)
diff --git a/bta/gatt/bta_gatts_utils.c b/bta/gatt/bta_gatts_utils.c
index 8f00793..e59f6b2 100644
--- a/bta/gatt/bta_gatts_utils.c
+++ b/bta/gatt/bta_gatts_utils.c
@@ -2,7 +2,7 @@
**
** Name: bta_gattc_utils.c
**
-** Description: This file contains the GATT client utility
+** Description: This file contains the GATT client utility
** function.
**
** Copyright (c) 2003-2010, Broadcom Corp., All Rights Reserved.
@@ -124,7 +124,7 @@ tBTA_GATTS_SRVC_CB * bta_gatts_find_srvc_cb_by_srvc_id(tBTA_GATTS_CB *p_cb, UINT
APPL_TRACE_DEBUG1("bta_gatts_find_srvc_cb_by_srvc_id service_id=%d", service_id);
for (i = 0; i < BTA_GATTS_MAX_SRVC_NUM; i ++)
{
- if (p_cb->srvc_cb[i].in_use &&
+ if (p_cb->srvc_cb[i].in_use &&
p_cb->srvc_cb[i].service_id == service_id)
{
APPL_TRACE_DEBUG1("bta_gatts_find_srvc_cb_by_srvc_id found service cb index =%d", i);
@@ -150,14 +150,14 @@ tBTA_GATTS_SRVC_CB * bta_gatts_find_srvc_cb_by_attr_id(tBTA_GATTS_CB *p_cb, UINT
{
if (/* middle service */
(i < (BTA_GATTS_MAX_SRVC_NUM - 1) &&
- p_cb->srvc_cb[i].in_use &&
- p_cb->srvc_cb[i + 1].in_use &&
+ p_cb->srvc_cb[i].in_use &&
+ p_cb->srvc_cb[i + 1].in_use &&
attr_id >= p_cb->srvc_cb[i].service_id &&
attr_id < p_cb->srvc_cb[i + 1].service_id) ||
/* last active service */
(i < (BTA_GATTS_MAX_SRVC_NUM - 1) &&
- p_cb->srvc_cb[i].in_use &&
- !p_cb->srvc_cb[i + 1].in_use &&
+ p_cb->srvc_cb[i].in_use &&
+ !p_cb->srvc_cb[i + 1].in_use &&
attr_id >= p_cb->srvc_cb[i].service_id) ||
/* last service incb */
(i == (BTA_GATTS_MAX_SRVC_NUM - 1) &&
@@ -220,4 +220,4 @@ BOOLEAN bta_gatts_uuid_compare(tBT_UUID tar, tBT_UUID src)
-#endif
+#endif
diff --git a/bta/hh/bta_hh_act.c b/bta/hh/bta_hh_act.c
index 163597e..bfd817f 100755..100644
--- a/bta/hh/bta_hh_act.c
+++ b/bta/hh/bta_hh_act.c
@@ -2,7 +2,7 @@
**
** Name: bta_hh_act.c
**
-** Description: This file contains the HID host action
+** Description: This file contains the HID host action
** functions.
**
** Copyright (c) 2005-2011, Broadcom Corp, All Rights Reserved.
@@ -30,7 +30,7 @@
/*****************************************************************************
** Local Function prototypes
*****************************************************************************/
-static void bta_hh_cback (UINT8 dev_handle, UINT8 event, UINT32 data,
+static void bta_hh_cback (UINT8 dev_handle, UINT8 event, UINT32 data,
BT_HDR *pdata);
static tBTA_HH_STATUS bta_hh_get_trans_status(UINT32 result);
@@ -47,7 +47,7 @@ static char * bta_hh_hid_event_name(UINT16 event);
** Function bta_hh_api_enable
**
** Description Perform necessary operations to enable HID host.
-**
+**
**
** Returns void
**
@@ -56,7 +56,7 @@ void bta_hh_api_enable(tBTA_HH_DATA *p_data)
{
tBTA_HH_STATUS status = BTA_HH_ERR;
UINT8 xx;
-
+
/* initialize BTE HID */
HID_HostInit();
@@ -79,9 +79,9 @@ void bta_hh_api_enable(tBTA_HH_DATA *p_data)
bta_hh_cb.kdev[xx].index = xx;
/* initialize control block map */
bta_hh_cb.cb_index[xx] = BTA_HH_MAX_KNOWN;
- }
+ }
}
-
+
/* signal BTA call back event */
(* bta_hh_cb.p_cback)(BTA_HH_ENABLE_EVT, (tBTA_HH *)&status);
}
@@ -90,7 +90,7 @@ void bta_hh_api_enable(tBTA_HH_DATA *p_data)
** Function bta_hh_api_disable
**
** Description Perform necessary operations to disable HID host.
-**
+**
**
** Returns void
**
@@ -98,7 +98,7 @@ void bta_hh_api_enable(tBTA_HH_DATA *p_data)
void bta_hh_api_disable(void)
{
UINT8 xx;
-
+
/* service is not enabled */
if (bta_hh_cb.p_cback == NULL)
return;
@@ -118,13 +118,13 @@ void bta_hh_api_disable(void)
if ( bta_hh_cb.kdev[xx].state == BTA_HH_CONN_ST )
{
/* disconnect all connected devices */
- bta_hh_sm_execute(&bta_hh_cb.kdev[xx],
+ bta_hh_sm_execute(&bta_hh_cb.kdev[xx],
BTA_HH_API_CLOSE_EVT,
NULL);
}
}
}
-
+
return;
}
@@ -133,7 +133,7 @@ void bta_hh_api_disable(void)
** Function bta_hh_disc_cmpl
**
** Description All connections have been closed, disable service.
-**
+**
**
** Returns void
**
@@ -167,7 +167,7 @@ void bta_hh_disc_cmpl(void)
** Returns void
**
*******************************************************************************/
-static void bta_hh_sdp_cback(UINT16 result, UINT16 attr_mask,
+static void bta_hh_sdp_cback(UINT16 result, UINT16 attr_mask,
tHID_DEV_SDP_INFO *sdp_rec )
{
tBTA_HH_DEV_CB *p_cb = bta_hh_cb.p_cur;
@@ -178,7 +178,7 @@ static void bta_hh_sdp_cback(UINT16 result, UINT16 attr_mask,
if (result == SDP_SUCCESS)
{
/* security is required for the connection, add attr_mask bit*/
- if (p_cb->sec_mask)
+ if (p_cb->sec_mask)
attr_mask |= HID_SEC_REQUIRED;
#if BTA_HH_DEBUG
@@ -186,9 +186,9 @@ static void bta_hh_sdp_cback(UINT16 result, UINT16 attr_mask,
attr_mask 0x%02x", \
p_cb, result, attr_mask);
#endif
-
+
/* check to see type of device is supported , and should not been added before */
- if (bta_hh_tod_spt(p_cb, sdp_rec->sub_class))
+ if (bta_hh_tod_spt(p_cb, sdp_rec->sub_class))
{
/* if not added before */
if (p_cb->hid_handle == BTA_HH_INVALID_HANDLE)
@@ -197,23 +197,23 @@ static void bta_hh_sdp_cback(UINT16 result, UINT16 attr_mask,
if((status = HID_HostAddDev (p_cb->addr, attr_mask, &hdl)) == HID_SUCCESS)
{
/* update cb_index[] map */
- bta_hh_cb.cb_index[hdl] = p_cb->index;
+ bta_hh_cb.cb_index[hdl] = p_cb->index;
}
else
- p_cb->app_id = 0;
+ p_cb->app_id = 0;
}
/* else : incoming connection after SDP should update the SDP information as well */
if (p_cb->app_id != 0)
{
/* update cb information with attr_mask, dscp_info etc. */
- bta_hh_add_device_to_list(p_cb, hdl, attr_mask,
- &sdp_rec->dscp_info,
- sdp_rec->sub_class,
+ bta_hh_add_device_to_list(p_cb, hdl, attr_mask,
+ &sdp_rec->dscp_info,
+ sdp_rec->sub_class,
sdp_rec->ssr_max_latency,
sdp_rec->ssr_min_tout,
- p_cb->app_id);
-
+ p_cb->app_id);
+
p_cb->dscp_info.ctry_code = sdp_rec->ctry_code;
status = HID_SUCCESS;
@@ -226,11 +226,11 @@ static void bta_hh_sdp_cback(UINT16 result, UINT16 attr_mask,
/* free disc_db when SDP is completed */
utl_freebuf((void **)&bta_hh_cb.p_disc_db);
-
+
/* send SDP_CMPL_EVT into state machine */
bta_hh_sm_execute(p_cb, BTA_HH_SDP_CMPL_EVT, (tBTA_HH_DATA *)&status);
-
+
return;
}
/*******************************************************************************
@@ -262,12 +262,12 @@ static void bta_hh_di_sdp_cback(UINT16 result)
bta_hh_update_di_info(p_cb, di_rec.rec.vendor, di_rec.rec.product, di_rec.rec.version);
}
}
- if ((status = HID_HostGetSDPRecord(p_cb->addr,
- bta_hh_cb.p_disc_db,
- p_bta_hh_cfg->sdp_db_size,
+ if ((status = HID_HostGetSDPRecord(p_cb->addr,
+ bta_hh_cb.p_disc_db,
+ p_bta_hh_cfg->sdp_db_size,
bta_hh_sdp_cback)) != HID_SUCCESS)
{
-#if BTA_HH_DEBUG
+#if BTA_HH_DEBUG
APPL_TRACE_DEBUG1 ("bta_hh_di_sdp_cback: HID_HostGetSDPRecord failed: \
Status 0x%2X",status);
#endif
@@ -292,8 +292,8 @@ static void bta_hh_di_sdp_cback(UINT16 result)
** Function bta_hh_start_sdp
**
** Description Start SDP service search, and obtain necessary SDP records.
-** Only one SDP service search request is allowed at the same
-** time. For every BTA_HhOpen API call, do SDP first unless SDP
+** Only one SDP service search request is allowed at the same
+** time. For every BTA_HhOpen API call, do SDP first unless SDP
** has been done previously.
**
** Returns void
@@ -311,7 +311,7 @@ void bta_hh_start_sdp(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
if (p_cb->app_id)
{
status = HID_SUCCESS;
-#if BTA_HH_DEBUG
+#if BTA_HH_DEBUG
APPL_TRACE_DEBUG0("bta_hh_start_sdp:: skip SDP for known devices");
#endif
if (p_cb->hid_handle == BTA_HH_INVALID_HANDLE)
@@ -320,11 +320,11 @@ void bta_hh_start_sdp(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
== HID_SUCCESS)
{
/* update device CB with newly register device handle */
- bta_hh_add_device_to_list(p_cb, hdl, p_cb->attr_mask, NULL,
- p_cb->sub_class,
+ bta_hh_add_device_to_list(p_cb, hdl, p_cb->attr_mask, NULL,
+ p_cb->sub_class,
p_cb->dscp_info.ssr_max_latency,
- p_cb->dscp_info.ssr_min_tout,
- p_cb->app_id);
+ p_cb->dscp_info.ssr_min_tout,
+ p_cb->app_id);
/* update cb_index[] map */
bta_hh_cb.cb_index[hdl] = p_cb->index;
}
@@ -346,12 +346,12 @@ void bta_hh_start_sdp(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
{
bta_hh_cb.p_cur = p_cb;
/* do DI discovery first */
- if (SDP_DiDiscover(p_data->api_conn.bd_addr,
- bta_hh_cb.p_disc_db,
- p_bta_hh_cfg->sdp_db_size,
+ if (SDP_DiDiscover(p_data->api_conn.bd_addr,
+ bta_hh_cb.p_disc_db,
+ p_bta_hh_cfg->sdp_db_size,
bta_hh_di_sdp_cback) != SDP_SUCCESS)
{
-#if BTA_HH_DEBUG
+#if BTA_HH_DEBUG
APPL_TRACE_DEBUG1 ("bta_hh_start_sdp: SDP_DiDiscover failed: \
Status 0x%2X",status);
#endif
@@ -375,7 +375,7 @@ void bta_hh_start_sdp(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
**
** Description When SDP completed, initiate a connection or report error depend
** on SDP result.
-**
+**
**
** Returns void
**
@@ -388,7 +388,7 @@ void bta_hh_sdp_cmpl(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
#if BTA_HH_DEBUG
APPL_TRACE_DEBUG1 ("bta_hh_sdp_cmpl: status 0x%2X",p_data->status);
#endif
-
+
/* initialize call back data */
memset((void *)&conn_dat, 0, sizeof(tBTA_HH_CONN));
conn_dat.handle = p_cb->hid_handle;
@@ -397,12 +397,12 @@ void bta_hh_sdp_cmpl(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
/* if SDP compl success */
if ( (status = p_data->status) == HID_SUCCESS)
{
- /* not incoming connection doing SDP, initiate a HID connection */
+ /* not incoming connection doing SDP, initiate a HID connection */
if (!p_cb->incoming_conn)
{
/* set security level */
HID_HostSetSecurityLevel("", p_cb->sec_mask);
-
+
/* open HID connection */
if ((status = HID_HostOpenDev (p_cb->hid_handle)) != HID_SUCCESS)
{
@@ -417,11 +417,11 @@ void bta_hh_sdp_cmpl(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
}
else /* incoming connection SDP finish */
{
- bta_hh_sm_execute(p_cb, BTA_HH_OPEN_CMPL_EVT, NULL);
+ bta_hh_sm_execute(p_cb, BTA_HH_OPEN_CMPL_EVT, NULL);
}
}
- if (status != HID_SUCCESS)
+ if (status != HID_SUCCESS)
{
/* receive SDP error */
if (p_data->status == HID_ERR_INVALID)
@@ -445,7 +445,7 @@ void bta_hh_sdp_cmpl(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
bta_hh_trace_dev_db();
#endif
}
-
+
return;
}
@@ -454,7 +454,7 @@ void bta_hh_sdp_cmpl(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
** Function bta_hh_api_disc_act
**
** Description HID Host initiate a disconnection.
-**
+**
**
** Returns void
**
@@ -462,7 +462,7 @@ void bta_hh_sdp_cmpl(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
void bta_hh_api_disc_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
{
tBTA_HH_CBDATA disc_dat;
- tHID_STATUS status;
+ tHID_STATUS status;
/* found an active connection */
disc_dat.handle = p_data ?(UINT8)p_data->hdr.layer_specific :p_cb->hid_handle;
@@ -472,7 +472,7 @@ void bta_hh_api_disc_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
if (status)
(* bta_hh_cb.p_cback)(BTA_HH_CLOSE_EVT, (tBTA_HH *)&disc_dat);
-
+
return;
}
/*******************************************************************************
@@ -480,7 +480,7 @@ void bta_hh_api_disc_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
** Function bta_hh_open_cmpl_act
**
** Description HID host connection completed
-**
+**
**
** Returns void
**
@@ -499,9 +499,9 @@ void bta_hh_open_cmpl_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
bta_hh_cb.cnt_num ++;
/* initialize device driver */
- bta_hh_co_open(p_cb->hid_handle, p_cb->sub_class,
+ bta_hh_co_open(p_cb->hid_handle, p_cb->sub_class,
p_cb->attr_mask, p_cb->app_id);
-
+
/* update SSR settings */
bta_sys_chg_ssr_config(BTA_ID_HH ,p_cb->app_id, p_cb->dscp_info.ssr_max_latency, p_cb->dscp_info.ssr_min_tout);
/* inform role manager */
@@ -510,8 +510,8 @@ void bta_hh_open_cmpl_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
/* set protocol mode when not default report mode */
if (p_cb->mode != BTA_HH_PROTO_RPT_MODE)
{
- if ((conn.status = HID_HostWriteDev(dev_handle,
- HID_TRANS_SET_PROTOCOL, HID_PAR_PROTOCOL_BOOT_MODE,
+ if ((conn.status = HID_HostWriteDev(dev_handle,
+ HID_TRANS_SET_PROTOCOL, HID_PAR_PROTOCOL_BOOT_MODE,
0,
0, NULL)) != HID_SUCCESS)
{
@@ -533,7 +533,7 @@ void bta_hh_open_cmpl_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
** Function bta_hh_open_act
**
** Description HID host receive HID_OPEN_EVT .
-**
+**
**
** Returns void
**
@@ -547,7 +547,7 @@ void bta_hh_open_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
p_cb->hid_handle;
APPL_TRACE_EVENT1 ("bta_hh_open_act: Device[%d] connected", dev_handle);
-#endif
+#endif
/* SDP has been done */
if (p_cb->app_id != 0)
@@ -555,7 +555,7 @@ void bta_hh_open_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
bta_hh_sm_execute(p_cb, BTA_HH_OPEN_CMPL_EVT, p_data);
}
else
- /* app_id == 0 indicates an incoming conenction request arrives without SDP
+ /* app_id == 0 indicates an incoming conenction request arrives without SDP
performed, do it first */
{
p_cb->incoming_conn = TRUE;
@@ -564,7 +564,7 @@ void bta_hh_open_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
bdcpy(conn_data.bd_addr, p_cb->addr);
bta_hh_start_sdp(p_cb, (tBTA_HH_DATA *)&conn_data);
}
-
+
return;
}
@@ -574,7 +574,7 @@ void bta_hh_open_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
** Function bta_hh_data_act
**
** Description HID Host process a data report
-**
+**
**
** Returns void
**
@@ -596,7 +596,7 @@ void bta_hh_data_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA * p_data)
** Function bta_hh_handsk_act
**
** Description HID Host process a handshake acknoledgement.
-**
+**
**
** Returns void
**
@@ -608,10 +608,10 @@ void bta_hh_handsk_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA * p_data)
tBTA_HH_CONN conn ;
#if BTA_HH_DEBUG
- APPL_TRACE_DEBUG2("HANDSHAKE received for: event = %s data= %d",
+ APPL_TRACE_DEBUG2("HANDSHAKE received for: event = %s data= %d",
bta_hh_get_w4_event(p_cb->w4_evt), p_data->hid_cback.data);
#endif
-
+
memset(&hs_data, 0, sizeof(tBTA_HH_HSDATA));
switch (p_cb->w4_evt)
@@ -622,7 +622,7 @@ void bta_hh_handsk_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA * p_data)
/* fall through */
case BTA_HH_GET_RPT_EVT:
case BTA_HH_GET_IDLE_EVT :
- hs_data.handle = p_cb->hid_handle;
+ hs_data.handle = p_cb->hid_handle;
/* if handshake gives an OK code for these transaction, fill in UNSUPT */
if ((hs_data.status = bta_hh_get_trans_status(p_data->hid_cback.data)) == BTA_HH_OK)
hs_data.status = BTA_HH_HS_TRANS_NOT_SPT;
@@ -640,7 +640,7 @@ void bta_hh_handsk_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA * p_data)
(* bta_hh_cb.p_cback)(p_cb->w4_evt, (tBTA_HH *)&cback_data);
p_cb->w4_evt = 0;
break;
-
+
/* SET_PROTOCOL when open connection */
case BTA_HH_OPEN_EVT:
conn.status =p_data->hid_cback.data ? BTA_HH_ERR_PROTO: BTA_HH_OK;
@@ -668,7 +668,7 @@ void bta_hh_handsk_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA * p_data)
** Function bta_hh_ctrl_dat_act
**
** Description HID Host process a data report from control channel.
-**
+**
**
** Returns void
**
@@ -680,7 +680,7 @@ void bta_hh_ctrl_dat_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA * p_data)
tBTA_HH_HSDATA hs_data;
#if BTA_HH_DEBUG
- APPL_TRACE_DEBUG1("Ctrl DATA received w4: event[%s]",
+ APPL_TRACE_DEBUG1("Ctrl DATA received w4: event[%s]",
bta_hh_get_w4_event(p_cb->w4_evt));
#endif
hs_data.status = BTA_HH_OK;
@@ -699,7 +699,7 @@ void bta_hh_ctrl_dat_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA * p_data)
hs_data.rsp_data.proto_mode = ((*data) == HID_PAR_PROTOCOL_REPORT)? \
BTA_HH_PROTO_RPT_MODE : BTA_HH_PROTO_BOOT_MODE;
#if BTA_HH_DEBUG
- APPL_TRACE_DEBUG1("GET_PROTOCOL Mode = [%s]",
+ APPL_TRACE_DEBUG1("GET_PROTOCOL Mode = [%s]",
(hs_data.rsp_data.proto_mode == BTA_HH_PROTO_RPT_MODE)? "Report" : "Boot");
#endif
break;
@@ -712,7 +712,7 @@ void bta_hh_ctrl_dat_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA * p_data)
/* fall through */
default:
#if BTA_HH_DEBUG
- APPL_TRACE_DEBUG1("invalid transaction type for DATA payload: 4_evt[%s]",
+ APPL_TRACE_DEBUG1("invalid transaction type for DATA payload: 4_evt[%s]",
bta_hh_get_w4_event(p_cb->w4_evt));
#endif
break;
@@ -734,7 +734,7 @@ void bta_hh_ctrl_dat_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA * p_data)
** Function bta_hh_close_act
**
** Description HID Host process a close event
-**
+**
**
** Returns void
**
@@ -761,30 +761,30 @@ void bta_hh_close_act (tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
conn_dat.status = (reason == HID_ERR_AUTH_FAILED) ? BTA_HH_ERR_AUTH_FAILED : BTA_HH_ERR;
bdcpy(conn_dat.bda, p_cb->addr);
HID_HostCloseDev(p_cb->hid_handle);
-
+
/* Report OPEN fail event */
(*bta_hh_cb.p_cback)(BTA_HH_OPEN_EVT, (tBTA_HH *)&conn_dat);
-
+
#if BTA_HH_DEBUG
bta_hh_trace_dev_db();
#endif
return;
- }
+ }
/* otherwise report CLOSE/VC_UNPLUG event */
- else
+ else
{
/* finaliza device driver */
bta_hh_co_close(p_cb->hid_handle, p_cb->app_id);
/* inform role manager */
- bta_sys_conn_close( BTA_ID_HH ,p_cb->app_id, p_cb->addr);
+ bta_sys_conn_close( BTA_ID_HH ,p_cb->app_id, p_cb->addr);
/* update total conn number */
bta_hh_cb.cnt_num --;
if (disc_dat.status)
- disc_dat.status = BTA_HH_ERR;
-
+ disc_dat.status = BTA_HH_ERR;
+
(*bta_hh_cb.p_cback)(event, (tBTA_HH *)&disc_dat);
-
+
/* if virtually unplug, remove device */
if (p_cb->vp )
{
@@ -800,7 +800,7 @@ void bta_hh_close_act (tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
/* clean up control block, but retain SDP info and device handle */
p_cb->vp = FALSE;
p_cb->w4_evt = 0;
-
+
/* if no connection is active and HH disable is signaled, disable service */
if (bta_hh_cb.cnt_num == 0 && bta_hh_cb.w4_disable)
{
@@ -815,7 +815,7 @@ void bta_hh_close_act (tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
** Function bta_hh_get_dscp_act
**
** Description Get device report descriptor
-**
+**
**
** Returns void
**
@@ -830,7 +830,7 @@ void bta_hh_get_dscp_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
** Function bta_hh_maint_dev_act
**
** Description HID Host maintain device list.
-**
+**
**
** Returns void
**
@@ -846,7 +846,7 @@ void bta_hh_maint_dev_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
switch (p_dev_info->sub_event)
{
- case BTA_HH_ADD_DEV_EVT: /* add a device */
+ case BTA_HH_ADD_DEV_EVT: /* add a device */
bdcpy(dev_info.bda, p_dev_info->bda);
/* initialize callback data */
if (p_cb->hid_handle == BTA_HH_INVALID_HANDLE)
@@ -858,16 +858,16 @@ void bta_hh_maint_dev_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
dev_info.status = BTA_HH_OK;
/* update DI information */
- bta_hh_update_di_info(p_cb,
+ bta_hh_update_di_info(p_cb,
p_dev_info->dscp_info.vendor_id,
- p_dev_info->dscp_info.product_id,
+ p_dev_info->dscp_info.product_id,
p_dev_info->dscp_info.version);
/* add to BTA device list */
- bta_hh_add_device_to_list(p_cb, dev_handle,
- p_dev_info->attr_mask,
- &p_dev_info->dscp_info.descriptor,
- p_dev_info->sub_class,
+ bta_hh_add_device_to_list(p_cb, dev_handle,
+ p_dev_info->attr_mask,
+ &p_dev_info->dscp_info.descriptor,
+ p_dev_info->sub_class,
p_dev_info->dscp_info.ssr_max_latency,
p_dev_info->dscp_info.ssr_min_tout,
p_dev_info->app_id);
@@ -897,7 +897,7 @@ void bta_hh_maint_dev_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
/* remove from known device list in BTA */
bta_hh_clean_up_kdev(p_cb);
- }
+ }
}
break;
@@ -913,7 +913,7 @@ void bta_hh_maint_dev_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
** Function bta_hh_write_dev_act
**
** Description Write device action. can be SET/GET/DATA transaction.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -923,8 +923,8 @@ void bta_hh_write_dev_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
UINT16 event = (p_data->api_sndcmd.t_type - BTA_HH_FST_BTE_TRANS_EVT) +
BTA_HH_FST_TRANS_CB_EVT;
- cbdata.handle = p_cb->hid_handle;
-
+ cbdata.handle = p_cb->hid_handle;
+
/* match up BTE/BTA report/boot mode def */
if (p_data->api_sndcmd.t_type == HID_TRANS_SET_PROTOCOL)
{
@@ -932,14 +932,14 @@ void bta_hh_write_dev_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
HID_PAR_PROTOCOL_REPORT :HID_PAR_PROTOCOL_BOOT_MODE;
}
- if (HID_HostWriteDev (p_cb->hid_handle,
+ if (HID_HostWriteDev (p_cb->hid_handle,
p_data->api_sndcmd.t_type,
p_data->api_sndcmd.param,
p_data->api_sndcmd.data,
p_data->api_sndcmd.rpt_id,
p_data->api_sndcmd.p_data) != HID_SUCCESS)
{
- APPL_TRACE_ERROR0("HID_HostWriteDev Error ");
+ APPL_TRACE_ERROR0("HID_HostWriteDev Error ");
cbdata.status = BTA_HH_ERR;
if (p_data->api_sndcmd.t_type != HID_TRANS_CONTROL &&
@@ -976,9 +976,9 @@ void bta_hh_write_dev_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
break;
/* currently not expected */
- case HID_TRANS_DATAC:
+ case HID_TRANS_DATAC:
default:
- APPL_TRACE_DEBUG1("bta_hh_write_dev_act:: cmd type = %d",
+ APPL_TRACE_DEBUG1("bta_hh_write_dev_act:: cmd type = %d",
p_data->api_sndcmd.t_type);
break;
}
@@ -999,25 +999,25 @@ void bta_hh_write_dev_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
bta_sys_busy(BTA_ID_HH, p_cb->app_id, p_cb->addr);
}
}
-
+
return;
}
/*****************************************************************************
-** Static Function
+** Static Function
*****************************************************************************/
/*******************************************************************************
**
** Function bta_hh_cback
**
** Description BTA HH callback function.
-**
+**
**
** Returns void
**
*******************************************************************************/
-static void bta_hh_cback (UINT8 dev_handle, UINT8 event, UINT32 data,
+static void bta_hh_cback (UINT8 dev_handle, UINT8 event, UINT32 data,
BT_HDR *pdata)
{
tBTA_HH_CBACK_DATA *p_buf = NULL;
@@ -1065,7 +1065,7 @@ static void bta_hh_cback (UINT8 dev_handle, UINT8 event, UINT32 data,
}
if (sm_event != BTA_HH_INVALID_EVT &&
- (p_buf = (tBTA_HH_CBACK_DATA *)GKI_getbuf(sizeof(tBTA_HH_CBACK_DATA) +
+ (p_buf = (tBTA_HH_CBACK_DATA *)GKI_getbuf(sizeof(tBTA_HH_CBACK_DATA) +
sizeof(BT_HDR))) != NULL)
{
p_buf->hdr.event = sm_event;
@@ -1081,8 +1081,8 @@ static void bta_hh_cback (UINT8 dev_handle, UINT8 event, UINT32 data,
**
** Function bta_hh_get_trans_status
**
-** Description translate a handshake result code into BTA HH
-** status code
+** Description translate a handshake result code into BTA HH
+** status code
**
*******************************************************************************/
static tBTA_HH_STATUS bta_hh_get_trans_status(UINT32 result)
diff --git a/bta/hh/bta_hh_api.c b/bta/hh/bta_hh_api.c
index c84243d..8effda9 100644
--- a/bta/hh/bta_hh_api.c
+++ b/bta/hh/bta_hh_api.c
@@ -34,11 +34,11 @@ static const tBTA_SYS_REG bta_hh_reg =
**
** Function BTA_HhEnable
**
-** Description Enable the HID host. This function must be called before
-** any other functions in the HID host API are called. When the
-** enable operation is complete the callback function will be
+** Description Enable the HID host. This function must be called before
+** any other functions in the HID host API are called. When the
+** enable operation is complete the callback function will be
** called with BTA_HH_ENABLE_EVT.
-**
+**
**
** Returns void
**
@@ -93,7 +93,7 @@ void BTA_HhDisable(void)
**
** Function BTA_HhClose
**
-** Description Disconnect a connection.
+** Description Disconnect a connection.
**
** Returns void
**
@@ -127,7 +127,7 @@ void BTA_HhOpen(BD_ADDR dev_bda, tBTA_HH_PROTO_MODE mode, tBTA_SEC sec_mask)
tBTA_HH_API_CONN *p_buf;
p_buf = (tBTA_HH_API_CONN *)GKI_getbuf((UINT16)sizeof(tBTA_HH_API_CONN));
-
+
if (p_buf!= NULL)
{
memset((void *)p_buf, 0, sizeof(tBTA_HH_API_CONN));
@@ -151,12 +151,12 @@ void BTA_HhOpen(BD_ADDR dev_bda, tBTA_HH_PROTO_MODE mode, tBTA_SEC sec_mask)
** Function bta_hh_snd_write_dev
**
*******************************************************************************/
-static void bta_hh_snd_write_dev(UINT8 dev_handle, UINT8 t_type, UINT8 param,
+static void bta_hh_snd_write_dev(UINT8 dev_handle, UINT8 t_type, UINT8 param,
UINT16 data, UINT8 rpt_id, BT_HDR *p_data)
{
tBTA_HH_CMD_DATA *p_buf;
UINT16 len = (UINT16) (sizeof(tBTA_HH_CMD_DATA) );
-
+
if ((p_buf = (tBTA_HH_CMD_DATA *)GKI_getbuf(len))!= NULL)
{
memset(p_buf, 0, sizeof(tBTA_HH_CMD_DATA));
@@ -179,7 +179,7 @@ static void bta_hh_snd_write_dev(UINT8 dev_handle, UINT8 t_type, UINT8 param,
** Description send SET_REPORT to device.
**
** Parameter dev_handle: device handle
-** r_type: report type, could be BTA_HH_RPTT_OUTPUT or
+** r_type: report type, could be BTA_HH_RPTT_OUTPUT or
** BTA_HH_RPTT_FEATURE.
** Returns void
**
@@ -192,7 +192,7 @@ void BTA_HhSetReport(UINT8 dev_handle, tBTA_HH_RPT_TYPE r_type, BT_HDR *p_data)
**
** Function BTA_HhGetReport
**
-** Description Send a GET_REPORT to HID device.
+** Description Send a GET_REPORT to HID device.
**
** Returns void
**
@@ -201,8 +201,8 @@ void BTA_HhGetReport(UINT8 dev_handle, tBTA_HH_RPT_TYPE r_type, UINT8 rpt_id, UI
{
UINT8 param = (buf_size) ? (r_type | 0x08) : r_type;
- bta_hh_snd_write_dev(dev_handle, HID_TRANS_GET_REPORT, param,
- buf_size, rpt_id, NULL);
+ bta_hh_snd_write_dev(dev_handle, HID_TRANS_GET_REPORT, param,
+ buf_size, rpt_id, NULL);
}
/*******************************************************************************
**
@@ -215,7 +215,7 @@ void BTA_HhGetReport(UINT8 dev_handle, tBTA_HH_RPT_TYPE r_type, UINT8 rpt_id, UI
*******************************************************************************/
void BTA_HhSetProtoMode(UINT8 dev_handle, tBTA_HH_PROTO_MODE p_type)
{
- bta_hh_snd_write_dev(dev_handle, HID_TRANS_SET_PROTOCOL, (UINT8)p_type,
+ bta_hh_snd_write_dev(dev_handle, HID_TRANS_SET_PROTOCOL, (UINT8)p_type,
0, 0, NULL);
}
/*******************************************************************************
@@ -312,15 +312,15 @@ void BTA_HhGetDscpInfo(UINT8 dev_handle)
**
** Function BTA_HhAddDev
**
-** Description Add a virtually cabled device into HID-Host device list
-** to manage and assign a device handle for future API call,
-** host applciation call this API at start-up to initialize its
-** virtually cabled devices.
+** Description Add a virtually cabled device into HID-Host device list
+** to manage and assign a device handle for future API call,
+** host applciation call this API at start-up to initialize its
+** virtually cabled devices.
**
** Returns void
**
*******************************************************************************/
-void BTA_HhAddDev(BD_ADDR bda, tBTA_HH_ATTR_MASK attr_mask, UINT8 sub_class,
+void BTA_HhAddDev(BD_ADDR bda, tBTA_HH_ATTR_MASK attr_mask, UINT8 sub_class,
UINT8 app_id, tBTA_HH_DEV_DSCP_INFO dscp_info)
{
tBTA_HH_MAINT_DEV *p_buf;
@@ -333,7 +333,7 @@ void BTA_HhAddDev(BD_ADDR bda, tBTA_HH_ATTR_MASK attr_mask, UINT8 sub_class,
memset(p_buf, 0, sizeof(tBTA_HH_MAINT_DEV));
p_buf->hdr.event = BTA_HH_API_MAINT_DEV_EVT;
- p_buf->sub_event = BTA_HH_ADD_DEV_EVT;
+ p_buf->sub_event = BTA_HH_ADD_DEV_EVT;
p_buf->hdr.layer_specific = BTA_HH_INVALID_HANDLE;
p_buf->attr_mask = (UINT16) attr_mask;
@@ -361,7 +361,7 @@ void BTA_HhAddDev(BD_ADDR bda, tBTA_HH_ATTR_MASK attr_mask, UINT8 sub_class,
**
** Function BTA_HhRemoveDev
**
-** Description Remove a device from the HID host devices list.
+** Description Remove a device from the HID host devices list.
**
** Returns void
**
@@ -377,11 +377,11 @@ void BTA_HhRemoveDev(UINT8 dev_handle )
memset(p_buf, 0, sizeof(tBTA_HH_MAINT_DEV));
p_buf->hdr.event = BTA_HH_API_MAINT_DEV_EVT;
- p_buf->sub_event = BTA_HH_RMV_DEV_EVT;
+ p_buf->sub_event = BTA_HH_RMV_DEV_EVT;
p_buf->hdr.layer_specific = (UINT16) dev_handle;
bta_sys_sendmsg(p_buf);
- }
+ }
}
/*******************************************************************************/
@@ -393,21 +393,21 @@ void BTA_HhRemoveDev(UINT8 dev_handle )
** Function BTA_HhParseBootRpt
**
** Description This utility function parse a boot mode report.
-** For keyboard report, report data will carry the keycode max
-** up to 6 key press in one report. Application need to convert
-** the keycode into keypress character according to keyboard
+** For keyboard report, report data will carry the keycode max
+** up to 6 key press in one report. Application need to convert
+** the keycode into keypress character according to keyboard
** language.
**
** Returns void
**
*******************************************************************************/
-void BTA_HhParseBootRpt(tBTA_HH_BOOT_RPT *p_data, UINT8 *p_report,
+void BTA_HhParseBootRpt(tBTA_HH_BOOT_RPT *p_data, UINT8 *p_report,
UINT16 report_len)
{
p_data->dev_type = BTA_HH_DEVT_UNKNOWN;
if (p_report)
- {
+ {
/* first byte is report ID */
switch (p_report[0])
{
@@ -426,7 +426,7 @@ void BTA_HhParseBootRpt(tBTA_HH_BOOT_RPT *p_data, UINT8 *p_report,
break;
}
}
-
+
return;
}
diff --git a/bta/hh/bta_hh_int.h b/bta/hh/bta_hh_int.h
index 51dfad1..43a9115 100644
--- a/bta/hh/bta_hh_int.h
+++ b/bta/hh/bta_hh_int.h
@@ -23,7 +23,7 @@
/* state machine events, these events are handled by the state machine */
enum
-{
+{
BTA_HH_API_OPEN_EVT = BTA_SYS_EVT_START(BTA_ID_HH),
BTA_HH_API_CLOSE_EVT,
BTA_HH_INT_OPEN_EVT,
@@ -87,7 +87,7 @@ typedef struct
typedef struct
{
BT_HDR hdr;
- BD_ADDR bd_addr;
+ BD_ADDR bd_addr;
UINT8 sec_mask;
tBTA_HH_PROTO_MODE mode;
}tBTA_HH_API_CONN;
@@ -105,7 +105,7 @@ typedef struct
BT_HDR hdr;
BD_ADDR bda;
UINT16 attr_mask;
- UINT16 sub_event;
+ UINT16 sub_event;
UINT8 sub_class;
UINT8 app_id;
tBTA_HH_DEV_DSCP_INFO dscp_info;
@@ -155,16 +155,16 @@ typedef struct
/******************************************************************************
** Main Control Block
*******************************************************************************/
-typedef struct
+typedef struct
{
- tBTA_HH_KB_CB kb_cb; /* key board control block,
- suppose BTA will connect
- to only one keyboard at
+ tBTA_HH_KB_CB kb_cb; /* key board control block,
+ suppose BTA will connect
+ to only one keyboard at
the same time */
tBTA_HH_DEV_CB kdev[BTA_HH_MAX_KNOWN]; /* device control block */
- tBTA_HH_DEV_CB* p_cur; /* current device control
+ tBTA_HH_DEV_CB* p_cur; /* current device control
block idx, used in sdp */
- UINT8 cb_index[BTA_HH_MAX_KNOWN]; /* maintain a CB index
+ UINT8 cb_index[BTA_HH_MAX_KNOWN]; /* maintain a CB index
map to dev handle */
tBTA_HH_CBACK *p_cback; /* Application callbacks */
tSDP_DISCOVERY_DB* p_disc_db;
@@ -188,7 +188,7 @@ extern tBTA_HH_CFG *p_bta_hh_cfg;
** Function prototypes
*****************************************************************************/
extern BOOLEAN bta_hh_hdl_event(BT_HDR *p_msg);
-extern void bta_hh_sm_execute(tBTA_HH_DEV_CB *p_cb, UINT16 event,
+extern void bta_hh_sm_execute(tBTA_HH_DEV_CB *p_cb, UINT16 event,
tBTA_HH_DATA *p_data);
/* action functions */
@@ -207,16 +207,16 @@ extern void bta_hh_open_cmpl_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data);
/* utility functions */
extern UINT8 bta_hh_find_cb(BD_ADDR bda);
-extern void bta_hh_parse_keybd_rpt(tBTA_HH_BOOT_RPT *p_kb_data,
+extern void bta_hh_parse_keybd_rpt(tBTA_HH_BOOT_RPT *p_kb_data,
UINT8 *p_report, UINT16 report_len);
-extern void bta_hh_parse_mice_rpt(tBTA_HH_BOOT_RPT *p_kb_data,
+extern void bta_hh_parse_mice_rpt(tBTA_HH_BOOT_RPT *p_kb_data,
UINT8 *p_report, UINT16 report_len);
extern BOOLEAN bta_hh_tod_spt(tBTA_HH_DEV_CB *p_cb,UINT8 sub_class);
extern void bta_hh_clean_up_kdev(tBTA_HH_DEV_CB *p_cb);
-extern void bta_hh_add_device_to_list(tBTA_HH_DEV_CB *p_cb, UINT8 handle,
- UINT16 attr_mask,
- tHID_DEV_DSCP_INFO *p_dscp_info,
+extern void bta_hh_add_device_to_list(tBTA_HH_DEV_CB *p_cb, UINT8 handle,
+ UINT16 attr_mask,
+ tHID_DEV_DSCP_INFO *p_dscp_info,
UINT8 sub_class, UINT16 max_latency, UINT16 min_tout, UINT8 app_id);
extern void bta_hh_update_di_info(tBTA_HH_DEV_CB *p_cb, UINT16 vendor_id, UINT16 product_id,
UINT16 version);
diff --git a/bta/hh/bta_hh_main.c b/bta/hh/bta_hh_main.c
index 648b10f..785d452 100644
--- a/bta/hh/bta_hh_main.c
+++ b/bta/hh/bta_hh_main.c
@@ -79,13 +79,13 @@ const UINT8 bta_hh_st_idle[][BTA_HH_NUM_COLS] =
/* BTA_HH_INT_CLOSE_EVT */ {BTA_HH_CLOSE_ACT, BTA_HH_IDLE_ST },
/* BTA_HH_INT_DATA_EVT */ {BTA_HH_IGNORE, BTA_HH_IDLE_ST },
/* BTA_HH_INT_CTRL_DATA */ {BTA_HH_IGNORE, BTA_HH_IDLE_ST },
-/* BTA_HH_INT_HANDSK_EVT */ {BTA_HH_IGNORE, BTA_HH_IDLE_ST },
+/* BTA_HH_INT_HANDSK_EVT */ {BTA_HH_IGNORE, BTA_HH_IDLE_ST },
/* BTA_HH_SDP_CMPL_EVT */ {BTA_HH_IGNORE, BTA_HH_IDLE_ST },
/* BTA_HH_API_WRITE_DEV_EVT */ {BTA_HH_IGNORE, BTA_HH_IDLE_ST },
/* BTA_HH_API_GET_DSCP_EVT */ {BTA_HH_IGNORE, BTA_HH_IDLE_ST },
/* BTA_HH_API_MAINT_DEV_EVT */ {BTA_HH_MAINT_DEV_ACT, BTA_HH_IDLE_ST },
/* BTA_HH_OPEN_CMPL_EVT */ {BTA_HH_IGNORE, BTA_HH_IDLE_ST }
-
+
};
@@ -98,7 +98,7 @@ const UINT8 bta_hh_st_w4_conn[][BTA_HH_NUM_COLS] =
/* BTA_HH_INT_CLOSE_EVT */ {BTA_HH_CLOSE_ACT, BTA_HH_IDLE_ST },
/* BTA_HH_INT_DATA_EVT */ {BTA_HH_IGNORE, BTA_HH_W4_CONN_ST },
/* BTA_HH_INT_CTRL_DATA */ {BTA_HH_IGNORE, BTA_HH_W4_CONN_ST },
-/* BTA_HH_INT_HANDSK_EVT */ {BTA_HH_IGNORE, BTA_HH_W4_CONN_ST },
+/* BTA_HH_INT_HANDSK_EVT */ {BTA_HH_IGNORE, BTA_HH_W4_CONN_ST },
/* BTA_HH_SDP_CMPL_EVT */ {BTA_HH_SDP_CMPL, BTA_HH_W4_CONN_ST },
/* BTA_HH_API_WRITE_DEV_EVT */ {BTA_HH_IGNORE , BTA_HH_W4_CONN_ST },
/* BTA_HH_API_GET_DSCP_EVT */ {BTA_HH_IGNORE, BTA_HH_W4_CONN_ST },
@@ -116,7 +116,7 @@ const UINT8 bta_hh_st_connected[][BTA_HH_NUM_COLS] =
/* BTA_HH_INT_CLOSE_EVT */ {BTA_HH_CLOSE_ACT, BTA_HH_IDLE_ST },
/* BTA_HH_INT_DATA_EVT */ {BTA_HH_DATA_ACT, BTA_HH_CONN_ST },
/* BTA_HH_INT_CTRL_DATA */ {BTA_HH_CTRL_DAT_ACT, BTA_HH_CONN_ST },
-/* BTA_HH_INT_HANDSK_EVT */ {BTA_HH_HANDSK_ACT, BTA_HH_CONN_ST },
+/* BTA_HH_INT_HANDSK_EVT */ {BTA_HH_HANDSK_ACT, BTA_HH_CONN_ST },
/* BTA_HH_SDP_CMPL_EVT */ {BTA_HH_IGNORE, BTA_HH_CONN_ST },
/* BTA_HH_API_WRITE_DEV_EVT */ {BTA_HH_WRITE_DEV_ACT, BTA_HH_CONN_ST },
/* BTA_HH_API_GET_DSCP_EVT */ {BTA_HH_GET_DSCP_ACT, BTA_HH_CONN_ST },
@@ -154,7 +154,7 @@ static char *bta_hh_state_code(tBTA_HH_STATE state_code);
** Function bta_hh_sm_execute
**
** Description State machine event handling function for HID Host
-**
+**
**
** Returns void
**
@@ -173,7 +173,7 @@ void bta_hh_sm_execute(tBTA_HH_DEV_CB *p_cb, UINT16 event, tBTA_HH_DATA * p_data
memset(&cback_data, 0, sizeof(tBTA_HH));
/* handle exception, no valid control block was found */
- if (!p_cb)
+ if (!p_cb)
{
/* BTA HH enabled already? otherwise ignore the event although it's bad*/
if (bta_hh_cb.p_cback != NULL)
@@ -181,7 +181,7 @@ void bta_hh_sm_execute(tBTA_HH_DEV_CB *p_cb, UINT16 event, tBTA_HH_DATA * p_data
switch (event)
{
/* no control block available for new connection */
- case BTA_HH_API_OPEN_EVT:
+ case BTA_HH_API_OPEN_EVT:
cback_event = BTA_HH_OPEN_EVT;
/* build cback data */
bdcpy(cback_data.conn.bda, ((tBTA_HH_API_CONN *)p_data)->bd_addr);
@@ -192,7 +192,7 @@ void bta_hh_sm_execute(tBTA_HH_DEV_CB *p_cb, UINT16 event, tBTA_HH_DATA * p_data
case BTA_HH_API_MAINT_DEV_EVT:
cback_event = p_data->api_maintdev.sub_event;
- if (p_data->api_maintdev.sub_event == BTA_HH_ADD_DEV_EVT)
+ if (p_data->api_maintdev.sub_event == BTA_HH_ADD_DEV_EVT)
{
bdcpy(cback_data.dev_info.bda, p_data->api_maintdev.bda);
cback_data.dev_info.status = BTA_HH_ERR_DB_FULL;
@@ -223,7 +223,7 @@ void bta_hh_sm_execute(tBTA_HH_DEV_CB *p_cb, UINT16 event, tBTA_HH_DATA * p_data
}
break;
- case BTA_HH_API_CLOSE_EVT:
+ case BTA_HH_API_CLOSE_EVT:
cback_event = BTA_HH_CLOSE_EVT;
cback_data.dev_status.status = BTA_HH_ERR_HDL;
@@ -240,7 +240,7 @@ void bta_hh_sm_execute(tBTA_HH_DEV_CB *p_cb, UINT16 event, tBTA_HH_DATA * p_data
}
}
/* corresponding CB is found, go to state machine */
- else
+ else
{
#if BTA_HH_DEBUG == TRUE
in_state = p_cb->state;
@@ -254,7 +254,7 @@ void bta_hh_sm_execute(tBTA_HH_DEV_CB *p_cb, UINT16 event, tBTA_HH_DATA * p_data
event &= 0xff;
p_cb->state = state_table[event][BTA_HH_NEXT_STATE] ;
-
+
if ((action = state_table[event][BTA_HH_ACTION]) != BTA_HH_IGNORE)
{
(*bta_hh_action[action])(p_cb, p_data);
@@ -271,14 +271,14 @@ void bta_hh_sm_execute(tBTA_HH_DEV_CB *p_cb, UINT16 event, tBTA_HH_DATA * p_data
#endif
}
- return;
+ return;
}
/*******************************************************************************
**
** Function bta_hh_hdl_event
**
** Description HID host main event handling function.
-**
+**
**
** Returns void
**
@@ -287,7 +287,7 @@ BOOLEAN bta_hh_hdl_event(BT_HDR *p_msg)
{
UINT8 index = BTA_HH_MAX_KNOWN;
tBTA_HH_DEV_CB *p_cb = NULL;
-
+
switch (p_msg->event)
{
case BTA_HH_API_ENABLE_EVT:
@@ -302,8 +302,8 @@ BOOLEAN bta_hh_hdl_event(BT_HDR *p_msg)
bta_hh_disc_cmpl();
break;
- default:
- /* all events processed in state machine need to find corresponding
+ default:
+ /* all events processed in state machine need to find corresponding
CB before proceed */
if (p_msg->event == BTA_HH_API_OPEN_EVT)
{
@@ -322,8 +322,8 @@ BOOLEAN bta_hh_hdl_event(BT_HDR *p_msg)
// btla-specific ++
/* If BT disable is done while the HID device is connected and Link_Key uses unauthenticated combination
* then we can get into a situation where remove_bonding is called with the index set to 0 (without getting
- * cleaned up). Only when VIRTUAL_UNPLUG is called do we cleanup the index and make it MAX_KNOWN.
- * So if REMOVE_DEVICE is called and in_use is FALSE then we should treat this as a NULL p_cb. Hence we
+ * cleaned up). Only when VIRTUAL_UNPLUG is called do we cleanup the index and make it MAX_KNOWN.
+ * So if REMOVE_DEVICE is called and in_use is FALSE then we should treat this as a NULL p_cb. Hence we
* force the index to be MAX_KNOWN
*/
if (bta_hh_cb.kdev[index].in_use == FALSE) {
@@ -354,7 +354,7 @@ BOOLEAN bta_hh_hdl_event(BT_HDR *p_msg)
**
** Function bta_hh_evt_code
**
-** Description
+** Description
**
** Returns void
**
diff --git a/bta/hh/bta_hh_utils.c b/bta/hh/bta_hh_utils.c
index 2b68c56..51a727c 100644
--- a/bta/hh/bta_hh_utils.c
+++ b/bta/hh/bta_hh_utils.c
@@ -136,7 +136,7 @@ void bta_hh_update_di_info(tBTA_HH_DEV_CB *p_cb, UINT16 vendor_id, UINT16 produc
UINT16 version)
{
#if BTA_HH_DEBUG
- APPL_TRACE_DEBUG3("vendor_id = 0x%2x product_id = 0x%2x version = 0x%2x",
+ APPL_TRACE_DEBUG3("vendor_id = 0x%2x product_id = 0x%2x version = 0x%2x",
vendor_id, product_id, version);
#endif
p_cb->dscp_info.vendor_id = vendor_id;
@@ -155,7 +155,7 @@ void bta_hh_update_di_info(tBTA_HH_DEV_CB *p_cb, UINT16 vendor_id, UINT16 produc
void bta_hh_add_device_to_list(tBTA_HH_DEV_CB *p_cb, UINT8 handle,
UINT16 attr_mask,
tHID_DEV_DSCP_INFO *p_dscp_info,
- UINT8 sub_class,
+ UINT8 sub_class,
UINT16 ssr_max_latency,
UINT16 ssr_min_tout,
UINT8 app_id)
diff --git a/bta/hl/bta_hl_api.c b/bta/hl/bta_hl_api.c
index 65ab7bd..e79e5a5 100644
--- a/bta/hl/bta_hl_api.c
+++ b/bta/hl/bta_hl_api.c
@@ -66,7 +66,7 @@ void BTA_HlEnable(tBTA_HL_CTRL_CBACK *p_ctrl_cback)
**
** Function BTA_HlDisable
**
-** Description Disable the HL subsystem.
+** Description Disable the HL subsystem.
**
** Returns void
**
@@ -87,11 +87,11 @@ void BTA_HlDisable(void)
**
** Function BTA_HlRegister
**
-** Description Register an HDP application
+** Description Register an HDP application
**
** Parameters app_id - Application ID
-** p_reg_param - non-platform related parameters for the
-** HDP application
+** p_reg_param - non-platform related parameters for the
+** HDP application
** p_cback - HL event callback fucntion
**
** Returns void
@@ -146,10 +146,10 @@ void BTA_HlRegister(UINT8 app_id,
**
** Description Deregister an HDP application
**
-** Parameters app_handle - Application handle
+** Parameters app_handle - Application handle
**
** Returns void
-**
+**
*******************************************************************************/
void BTA_HlDeregister(tBTA_HL_APP_HANDLE app_handle)
{
@@ -167,15 +167,15 @@ void BTA_HlDeregister(tBTA_HL_APP_HANDLE app_handle)
** Function BTA_HlCchOpen
**
** Description Open a Control channel connection with the specified BD address
-**
-** Parameters app_handle - Application Handle
+**
+** Parameters app_handle - Application Handle
** p_open_param - parameters for opening a control channel
-**
+**
** Returns void
**
** Note: The control PSM value is used to select which
** HDP insatnce should be used in case the peer device support
-** multiple HDP instances. Also, if the control PSM value is zero
+** multiple HDP instances. Also, if the control PSM value is zero
** then the first HDP instance is used for the control channel setup
*******************************************************************************/
void BTA_HlCchOpen(tBTA_HL_APP_HANDLE app_handle,
@@ -185,10 +185,10 @@ void BTA_HlCchOpen(tBTA_HL_APP_HANDLE app_handle,
if ((p_buf = (tBTA_HL_API_CCH_OPEN *)GKI_getbuf((UINT16)(sizeof(tBTA_HL_API_CCH_OPEN)))) != NULL)
{
- p_buf->hdr.event = BTA_HL_API_CCH_OPEN_EVT;
+ p_buf->hdr.event = BTA_HL_API_CCH_OPEN_EVT;
p_buf->app_handle = app_handle;
p_buf->sec_mask = (p_open_param->sec_mask | BTA_SEC_AUTHENTICATE | BTA_SEC_ENCRYPT);
- bdcpy(p_buf->bd_addr, p_open_param->bd_addr);
+ bdcpy(p_buf->bd_addr, p_open_param->bd_addr);
p_buf->ctrl_psm = p_open_param->ctrl_psm;
bta_sys_sendmsg(p_buf);
}
@@ -206,7 +206,7 @@ void BTA_HlCchOpen(tBTA_HL_APP_HANDLE app_handle,
** Returns void
**
*******************************************************************************/
-void BTA_HlCchClose(tBTA_HL_MCL_HANDLE mcl_handle)
+void BTA_HlCchClose(tBTA_HL_MCL_HANDLE mcl_handle)
{
tBTA_HL_API_CCH_CLOSE *p_buf;
@@ -223,9 +223,9 @@ void BTA_HlCchClose(tBTA_HL_MCL_HANDLE mcl_handle)
** Function BTA_HlDchOpen
**
** Description Open a data channel connection with the specified DCH parameters
-**
+**
** Parameters mcl_handle - MCL handle
-** p_open_param - parameters for opening a data channel
+** p_open_param - parameters for opening a data channel
**
** Returns void
**
@@ -239,7 +239,7 @@ void BTA_HlDchOpen(tBTA_HL_MCL_HANDLE mcl_handle,
{
p_buf->hdr.event = BTA_HL_API_DCH_OPEN_EVT;
p_buf->mcl_handle = mcl_handle;
- p_buf->ctrl_psm = p_open_param->ctrl_psm;
+ p_buf->ctrl_psm = p_open_param->ctrl_psm;
p_buf->local_mdep_id = p_open_param->local_mdep_id;
p_buf->peer_mdep_id = p_open_param->peer_mdep_id;
p_buf->local_cfg = p_open_param->local_cfg;
@@ -253,14 +253,14 @@ void BTA_HlDchOpen(tBTA_HL_MCL_HANDLE mcl_handle,
** Function BTA_HlDchReconnect
**
** Description Reconnect a data channel with the specified MDL_ID
-**
+**
** Parameters mcl_handle - MCL handle
*8 p_recon_param - parameters for reconnecting a data channel
**
** Returns void
**
*******************************************************************************/
-void BTA_HlDchReconnect(tBTA_HL_MCL_HANDLE mcl_handle,
+void BTA_HlDchReconnect(tBTA_HL_MCL_HANDLE mcl_handle,
tBTA_HL_DCH_RECONNECT_PARAM *p_recon_param)
{
tBTA_HL_API_DCH_RECONNECT *p_buf;
@@ -286,14 +286,14 @@ void BTA_HlDchReconnect(tBTA_HL_MCL_HANDLE mcl_handle,
** Returns void
**
*******************************************************************************/
-void BTA_HlDchClose(tBTA_HL_MDL_HANDLE mdl_handle)
+void BTA_HlDchClose(tBTA_HL_MDL_HANDLE mdl_handle)
{
tBTA_HL_API_DCH_CLOSE *p_buf;
if ((p_buf = (tBTA_HL_API_DCH_CLOSE *)GKI_getbuf((UINT16)(sizeof(tBTA_HL_API_DCH_CLOSE)))) != NULL)
{
p_buf->hdr.event = BTA_HL_API_DCH_CLOSE_EVT;
- p_buf->mdl_handle = mdl_handle;
+ p_buf->mdl_handle = mdl_handle;
bta_sys_sendmsg(p_buf);
}
}
@@ -306,12 +306,12 @@ void BTA_HlDchClose(tBTA_HL_MDL_HANDLE mdl_handle)
** handle
**
** Parameters mcl_handle - MCL handle
-**
+**
**
** Returns void
**
*******************************************************************************/
-void BTA_HlDchAbort(tBTA_HL_MCL_HANDLE mcl_handle)
+void BTA_HlDchAbort(tBTA_HL_MCL_HANDLE mcl_handle)
{
tBTA_HL_API_DCH_ABORT *p_buf;
@@ -327,15 +327,15 @@ void BTA_HlDchAbort(tBTA_HL_MCL_HANDLE mcl_handle)
**
** Function BTA_HlSendData
**
-** Description Send an APDU to the peer device
+** Description Send an APDU to the peer device
**
** Parameters mdl_handle - MDL handle
** pkt_size - size of the data packet to be sent
**
-** Returns void
+** Returns void
**
*******************************************************************************/
-void BTA_HlSendData(tBTA_HL_MDL_HANDLE mdl_handle,
+void BTA_HlSendData(tBTA_HL_MDL_HANDLE mdl_handle,
UINT16 pkt_size)
{
tBTA_HL_API_SEND_DATA *p_buf = NULL;
@@ -362,12 +362,12 @@ void BTA_HlSendData(tBTA_HL_MDL_HANDLE mdl_handle,
** Returns void
**
** note: If mdl_id = 0xFFFF then this means to delete all MDLs
-** and this value can only be used with DeleteMdl request only
+** and this value can only be used with DeleteMdl request only
** not other requests
**
*******************************************************************************/
-void BTA_HlDeleteMdl(tBTA_HL_MCL_HANDLE mcl_handle,
- tBTA_HL_MDL_ID mdl_id )
+void BTA_HlDeleteMdl(tBTA_HL_MCL_HANDLE mcl_handle,
+ tBTA_HL_MDL_ID mdl_id )
{
tBTA_HL_API_DELETE_MDL *p_buf;
@@ -375,7 +375,7 @@ void BTA_HlDeleteMdl(tBTA_HL_MCL_HANDLE mcl_handle,
{
p_buf->hdr.event = BTA_HL_API_DELETE_MDL_EVT;
p_buf->mcl_handle = mcl_handle;
- p_buf->mdl_id = mdl_id;
+ p_buf->mdl_id = mdl_id;
bta_sys_sendmsg(p_buf);
}
}
@@ -384,15 +384,15 @@ void BTA_HlDeleteMdl(tBTA_HL_MCL_HANDLE mcl_handle,
**
** Function BTA_HlDchEchoTest
**
-** Description Initiate an echo test with the specified MCL handle
+** Description Initiate an echo test with the specified MCL handle
**
** Parameters mcl_handle - MCL handle
-*8 p_echo_test_param - parameters for echo testing
+*8 p_echo_test_param - parameters for echo testing
**
** Returns void
**
*******************************************************************************/
-void BTA_HlDchEchoTest( tBTA_HL_MCL_HANDLE mcl_handle,
+void BTA_HlDchEchoTest( tBTA_HL_MCL_HANDLE mcl_handle,
tBTA_HL_DCH_ECHO_TEST_PARAM *p_echo_test_param)
{
tBTA_HL_API_DCH_ECHO_TEST *p_buf;
@@ -401,9 +401,9 @@ void BTA_HlDchEchoTest( tBTA_HL_MCL_HANDLE mcl_handle,
{
p_buf->hdr.event = BTA_HL_API_DCH_ECHO_TEST_EVT;
p_buf->mcl_handle = mcl_handle;
- p_buf->ctrl_psm = p_echo_test_param->ctrl_psm;
- p_buf->local_cfg = p_echo_test_param->local_cfg;
- p_buf->pkt_size = p_echo_test_param->pkt_size;
+ p_buf->ctrl_psm = p_echo_test_param->ctrl_psm;
+ p_buf->local_cfg = p_echo_test_param->local_cfg;
+ p_buf->pkt_size = p_echo_test_param->pkt_size;
bta_sys_sendmsg(p_buf);
}
}
@@ -417,7 +417,7 @@ void BTA_HlDchEchoTest( tBTA_HL_MCL_HANDLE mcl_handle,
**
** Parameters app_handle - application handle
** bd_addr - BD address
-**
+**
** Returns void
**
*******************************************************************************/
@@ -430,7 +430,7 @@ void BTA_HlSdpQuery(tBTA_HL_APP_HANDLE app_handle,
{
p_buf->hdr.event = BTA_HL_API_SDP_QUERY_EVT;
p_buf->app_handle = app_handle;
- bdcpy(p_buf->bd_addr, bd_addr);
+ bdcpy(p_buf->bd_addr, bd_addr);
bta_sys_sendmsg(p_buf);
}
}
@@ -440,19 +440,19 @@ void BTA_HlSdpQuery(tBTA_HL_APP_HANDLE app_handle,
**
** Function BTA_HlDchCreateMdlRsp
**
-** Description Set the Response and configuration values for the Create MDL
+** Description Set the Response and configuration values for the Create MDL
** request
**
** Parameters mcl_handle - MCL handle
-** p_rsp_param - parameters specified whether the request should
+** p_rsp_param - parameters specified whether the request should
** be accepted or not and if it should be accepted
-** then it also specified the configuration response
-** value
-**
+** then it also specified the configuration response
+** value
+**
** Returns void
**
*******************************************************************************/
-void BTA_HlDchCreateRsp(tBTA_HL_MCL_HANDLE mcl_handle,
+void BTA_HlDchCreateRsp(tBTA_HL_MCL_HANDLE mcl_handle,
tBTA_HL_DCH_CREATE_RSP_PARAM *p_rsp_param)
{
tBTA_HL_API_DCH_CREATE_RSP *p_buf;
diff --git a/bta/hl/bta_hl_ci.c b/bta/hl/bta_hl_ci.c
index aab858f..0ef69da 100644
--- a/bta/hl/bta_hl_ci.c
+++ b/bta/hl/bta_hl_ci.c
@@ -2,7 +2,7 @@
**
** Name: bta_hl_ci.c
**
-** Description: This is the implementation file for the HeaLth device profile
+** Description: This is the implementation file for the HeaLth device profile
** (HL) subsystem call-in functions.
**
** Copyright (c) 2009, Broadcom Corp., All Rights Reserved.
@@ -21,24 +21,24 @@
** Function bta_hl_ci_get_tx_data
**
** Description This function is called in response to the
-** bta_hl_co_get_tx_data call-out function.
+** bta_hl_co_get_tx_data call-out function.
**
** Parameters mdl_handle -MDL handle
** status - BTA_MA_STATUS_OK if operation is successful
** BTA_MA_STATUS_FAIL if any errors have occurred.
** evt - evt from the call-out function
**
-** Returns void
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_hl_ci_get_tx_data( tBTA_HL_MDL_HANDLE mdl_handle,
- tBTA_HL_STATUS status,
+ tBTA_HL_STATUS status,
UINT16 evt )
{
tBTA_HL_CI_GET_PUT_DATA *p_evt;
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG3("bta_hl_ci_get_tx_data mdl_handle=%d status=%d evt=%d\n",
+ APPL_TRACE_DEBUG3("bta_hl_ci_get_tx_data mdl_handle=%d status=%d evt=%d\n",
mdl_handle, status, evt);
#endif
@@ -56,23 +56,23 @@ BTA_API extern void bta_hl_ci_get_tx_data( tBTA_HL_MDL_HANDLE mdl_handle,
** Function bta_hl_ci_put_rx_data
**
** Description This function is called in response to the
-** bta_hl_co_put_rx_data call-out function.
+** bta_hl_co_put_rx_data call-out function.
**
** Parameters mdl_handle -MDL handle
** status - BTA_MA_STATUS_OK if operation is successful
** BTA_MA_STATUS_FAIL if any errors have occurred.
** evt - evt from the call-out function
**
-** Returns void
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_hl_ci_put_rx_data( tBTA_HL_MDL_HANDLE mdl_handle,
- tBTA_HL_STATUS status,
+ tBTA_HL_STATUS status,
UINT16 evt )
{
tBTA_HL_CI_GET_PUT_DATA *p_evt;
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG3("bta_hl_ci_put_rx_data mdl_handle=%d status=%d evt=%d\n",
+ APPL_TRACE_DEBUG3("bta_hl_ci_put_rx_data mdl_handle=%d status=%d evt=%d\n",
mdl_handle, status, evt);
#endif
@@ -91,24 +91,24 @@ BTA_API extern void bta_hl_ci_put_rx_data( tBTA_HL_MDL_HANDLE mdl_handle,
** Function bta_hl_ci_get_echo_data
**
** Description This function is called in response to the
-** bta_hl_co_get_echo_data call-out function.
+** bta_hl_co_get_echo_data call-out function.
**
** Parameters mcl_handle -MCL handle
** status - BTA_MA_STATUS_OK if operation is successful
** BTA_MA_STATUS_FAIL if any errors have occurred.
** evt - evt from the call-out function
**
-** Returns void
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_hl_ci_get_echo_data( tBTA_HL_MCL_HANDLE mcl_handle,
- tBTA_HL_STATUS status,
+ tBTA_HL_STATUS status,
UINT16 evt )
{
tBTA_HL_CI_ECHO_DATA *p_evt;
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG3("bta_hl_ci_get_echo_data mcl_handle=%d status=%d evt=%d\n",
+ APPL_TRACE_DEBUG3("bta_hl_ci_get_echo_data mcl_handle=%d status=%d evt=%d\n",
mcl_handle, status, evt);
#endif
@@ -126,24 +126,24 @@ BTA_API extern void bta_hl_ci_get_echo_data( tBTA_HL_MCL_HANDLE mcl_handle,
** Function bta_hl_ci_put_echo_data
**
** Description This function is called in response to the
-** bta_hl_co_put_echo_data call-out function.
+** bta_hl_co_put_echo_data call-out function.
**
** Parameters mcl_handle -MCL handle
** status - BTA_MA_STATUS_OK if operation is successful
** BTA_MA_STATUS_FAIL if any errors have occurred.
** evt - evt from the call-out function
**
-** Returns void
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_hl_ci_put_echo_data( tBTA_HL_MCL_HANDLE mcl_handle,
- tBTA_HL_STATUS status,
+ tBTA_HL_STATUS status,
UINT16 evt )
{
tBTA_HL_CI_ECHO_DATA *p_evt;
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG3("bta_hl_ci_put_echo_data mcl_handle=%d status=%d evt=%d\n",
+ APPL_TRACE_DEBUG3("bta_hl_ci_put_echo_data mcl_handle=%d status=%d evt=%d\n",
mcl_handle, status, evt);
#endif
diff --git a/bta/hl/bta_hl_int.h b/bta/hl/bta_hl_int.h
index 03805d4..d2380c3 100644
--- a/bta/hl/bta_hl_int.h
+++ b/bta/hl/bta_hl_int.h
@@ -52,20 +52,20 @@ typedef UINT16 (tBTA_HL_ALLOCATE_PSM) (void);
/* SDP Operations */
#define BTA_HL_SDP_OP_NONE 0
-#define BTA_HL_SDP_OP_CCH_INIT 1
-#define BTA_HL_SDP_OP_DCH_OPEN_INIT 2
-#define BTA_HL_SDP_OP_DCH_RECONNECT_INIT 3
-#define BTA_HL_SDP_OP_SDP_QUERY_NEW 4
-#define BTA_HL_SDP_OP_SDP_QUERY_CURRENT 5
+#define BTA_HL_SDP_OP_CCH_INIT 1
+#define BTA_HL_SDP_OP_DCH_OPEN_INIT 2
+#define BTA_HL_SDP_OP_DCH_RECONNECT_INIT 3
+#define BTA_HL_SDP_OP_SDP_QUERY_NEW 4
+#define BTA_HL_SDP_OP_SDP_QUERY_CURRENT 5
typedef UINT8 tBTA_HL_SDP_OPER;
/* CCH Operations */
#define BTA_HL_CCH_OP_NONE 0
-#define BTA_HL_CCH_OP_LOCAL_OPEN 1
-#define BTA_HL_CCH_OP_REMOTE_OPEN 2
-#define BTA_HL_CCH_OP_LOCAL_CLOSE 3
-#define BTA_HL_CCH_OP_REMOTE_CLOSE 4
+#define BTA_HL_CCH_OP_LOCAL_OPEN 1
+#define BTA_HL_CCH_OP_REMOTE_OPEN 2
+#define BTA_HL_CCH_OP_LOCAL_CLOSE 3
+#define BTA_HL_CCH_OP_REMOTE_CLOSE 4
typedef UINT8 tBTA_HL_CCH_OPER;
@@ -107,15 +107,15 @@ typedef UINT8 tBTA_HL_ECHO_OPER;
/* abort status mask for abort_oper */
-#define BTA_HL_ABORT_NONE_MASK 0x00
-#define BTA_HL_ABORT_PENDING_MASK 0x01
+#define BTA_HL_ABORT_NONE_MASK 0x00
+#define BTA_HL_ABORT_PENDING_MASK 0x01
#define BTA_HL_ABORT_LOCAL_MASK 0x10
#define BTA_HL_ABORT_REMOTE_MASK 0x20
#define BTA_HL_ABORT_CCH_CLOSE_MASK 0x40
/* call out mask for cout_oper */
-#define BTA_HL_CO_NONE_MASK 0x00
-#define BTA_HL_CO_GET_TX_DATA_MASK 0x01
+#define BTA_HL_CO_NONE_MASK 0x00
+#define BTA_HL_CO_GET_TX_DATA_MASK 0x01
#define BTA_HL_CO_PUT_RX_DATA_MASK 0x02
#define BTA_HL_CO_GET_ECHO_DATA_MASK 0x04
#define BTA_HL_CO_PUT_ECHO_DATA_MASK 0x08
@@ -134,37 +134,37 @@ enum
BTA_HL_CCH_OPEN_EVT = BTA_SYS_EVT_START(BTA_ID_HL),
BTA_HL_CCH_SDP_OK_EVT,
BTA_HL_CCH_SDP_FAIL_EVT,
- BTA_HL_MCA_CONNECT_IND_EVT,
- BTA_HL_MCA_DISCONNECT_IND_EVT,
+ BTA_HL_MCA_CONNECT_IND_EVT,
+ BTA_HL_MCA_DISCONNECT_IND_EVT,
BTA_HL_CCH_CLOSE_EVT,
BTA_HL_CCH_CLOSE_CMPL_EVT,
BTA_HL_MCA_RSP_TOUT_IND_EVT,
/* DCH EVENT */
BTA_HL_DCH_SDP_INIT_EVT,
BTA_HL_DCH_OPEN_EVT,
- BTA_HL_MCA_CREATE_IND_EVT,
- BTA_HL_MCA_CREATE_CFM_EVT,
+ BTA_HL_MCA_CREATE_IND_EVT,
+ BTA_HL_MCA_CREATE_CFM_EVT,
BTA_HL_MCA_OPEN_IND_EVT,
BTA_HL_MCA_OPEN_CFM_EVT,
BTA_HL_DCH_CLOSE_EVT,
- BTA_HL_MCA_CLOSE_IND_EVT,
+ BTA_HL_MCA_CLOSE_IND_EVT,
BTA_HL_MCA_CLOSE_CFM_EVT,
BTA_HL_API_SEND_DATA_EVT,
- BTA_HL_MCA_RCV_DATA_EVT,
+ BTA_HL_MCA_RCV_DATA_EVT,
BTA_HL_DCH_CLOSE_CMPL_EVT,
BTA_HL_DCH_RECONNECT_EVT,
BTA_HL_DCH_SDP_FAIL_EVT,
- BTA_HL_MCA_RECONNECT_IND_EVT,
+ BTA_HL_MCA_RECONNECT_IND_EVT,
- BTA_HL_MCA_RECONNECT_CFM_EVT,
- BTA_HL_DCH_CLOSE_ECHO_TEST_EVT,
+ BTA_HL_MCA_RECONNECT_CFM_EVT,
+ BTA_HL_DCH_CLOSE_ECHO_TEST_EVT,
BTA_HL_API_DCH_CREATE_RSP_EVT,
BTA_HL_DCH_ABORT_EVT,
- BTA_HL_MCA_ABORT_IND_EVT,
+ BTA_HL_MCA_ABORT_IND_EVT,
- BTA_HL_MCA_ABORT_CFM_EVT,
+ BTA_HL_MCA_ABORT_CFM_EVT,
BTA_HL_MCA_CONG_CHG_EVT,
BTA_HL_CI_GET_TX_DATA_EVT,
BTA_HL_CI_PUT_RX_DATA_EVT,
@@ -189,7 +189,7 @@ enum
BTA_HL_API_SDP_QUERY_EVT,
BTA_HL_SDP_QUERY_OK_EVT,
BTA_HL_SDP_QUERY_FAIL_EVT,
- BTA_HL_MCA_DELETE_IND_EVT,
+ BTA_HL_MCA_DELETE_IND_EVT,
BTA_HL_MCA_DELETE_CFM_EVT
};
typedef UINT16 tBTA_HL_INT_EVT;
@@ -233,7 +233,7 @@ typedef struct
tBTA_SEC sec_mask; /* security mask for accepting conenction*/
char srv_name[BTA_SERVICE_NAME_LEN +1]; /* service name to be used in the SDP; null terminated*/
char srv_desp[BTA_SERVICE_DESP_LEN +1]; /* service description to be used in the SDP; null terminated */
- char provider_name[BTA_PROVIDER_NAME_LEN +1]; /* provide name to be used in the SDP; null terminated */
+ char provider_name[BTA_PROVIDER_NAME_LEN +1]; /* provide name to be used in the SDP; null terminated */
} tBTA_HL_API_REGISTER;
typedef struct
@@ -267,7 +267,7 @@ typedef struct
UINT16 ctrl_psm;
tBTA_HL_MDEP_ID local_mdep_id; /* local MDEP ID */
tBTA_HL_MDEP_ID peer_mdep_id; /* peer mdep id */
- tBTA_HL_DCH_CFG local_cfg;
+ tBTA_HL_DCH_CFG local_cfg;
tBTA_SEC sec_mask; /* security mask for initiating connection*/
} tBTA_HL_API_DCH_OPEN;
@@ -314,13 +314,13 @@ typedef struct
tBTA_HL_MCL_HANDLE mcl_handle;
UINT16 ctrl_psm;
UINT16 pkt_size;
- tBTA_HL_DCH_CFG local_cfg;
+ tBTA_HL_DCH_CFG local_cfg;
} tBTA_HL_API_DCH_ECHO_TEST;
typedef struct
{
BT_HDR hdr;
- UINT8 app_idx;
+ UINT8 app_idx;
UINT8 mcl_idx;
BOOLEAN release_mcl_cb;
}tBTA_HL_CCH_SDP;
@@ -329,9 +329,9 @@ typedef struct
/* MCA callback event parameters. */
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
tBTA_HL_APP_HANDLE app_handle;
- tBTA_HL_MCL_HANDLE mcl_handle;
+ tBTA_HL_MCL_HANDLE mcl_handle;
tMCA_CTRL mca_data;
} tBTA_HL_MCA_EVT;
@@ -339,7 +339,7 @@ typedef struct
/* MCA callback event parameters. */
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
UINT8 app_idx;
UINT8 mcl_idx;
UINT8 mdl_idx;
@@ -350,7 +350,7 @@ typedef struct
typedef struct
{
BT_HDR hdr;
- UINT8 app_idx;
+ UINT8 app_idx;
UINT8 mcl_idx;
UINT8 mdl_idx;
}tBTA_HL_DCH_SDP;
@@ -366,9 +366,9 @@ typedef struct
{
BT_HDR hdr;
tBTA_HL_MCL_HANDLE mcl_handle;
- tBTA_HL_MDL_ID mdl_id;
+ tBTA_HL_MDL_ID mdl_id;
tBTA_HL_MDEP_ID local_mdep_id;
- tBTA_HL_DCH_CREATE_RSP rsp_code;
+ tBTA_HL_DCH_CREATE_RSP rsp_code;
tBTA_HL_DCH_CFG cfg_rsp;
} tBTA_HL_API_DCH_CREATE_RSP;
@@ -391,18 +391,18 @@ typedef union
{
BT_HDR hdr;
tBTA_HL_API_ENABLE api_enable; /* data for BTA_MSE_API_ENABLE_EVT */
- tBTA_HL_API_REGISTER api_reg;
- tBTA_HL_API_DEREGISTER api_dereg;
- tBTA_HL_API_CCH_OPEN api_cch_open;
- tBTA_HL_API_CCH_CLOSE api_cch_close;
+ tBTA_HL_API_REGISTER api_reg;
+ tBTA_HL_API_DEREGISTER api_dereg;
+ tBTA_HL_API_CCH_OPEN api_cch_open;
+ tBTA_HL_API_CCH_CLOSE api_cch_close;
tBTA_HL_API_DCH_CREATE_RSP api_dch_create_rsp;
- tBTA_HL_API_DCH_OPEN api_dch_open;
- tBTA_HL_API_DCH_RECONNECT api_dch_reconnect;
- tBTA_HL_API_DCH_CLOSE api_dch_close;
+ tBTA_HL_API_DCH_OPEN api_dch_open;
+ tBTA_HL_API_DCH_RECONNECT api_dch_reconnect;
+ tBTA_HL_API_DCH_CLOSE api_dch_close;
tBTA_HL_API_DELETE_MDL api_delete_mdl;
tBTA_HL_API_DCH_ABORT api_dch_abort;
- tBTA_HL_API_SEND_DATA api_send_data;
- tBTA_HL_API_DCH_ECHO_TEST api_dch_echo_test;
+ tBTA_HL_API_SEND_DATA api_send_data;
+ tBTA_HL_API_DCH_ECHO_TEST api_dch_echo_test;
tBTA_HL_API_SDP_QUERY api_sdp_query;
tBTA_HL_CCH_SDP cch_sdp;
@@ -427,19 +427,19 @@ typedef struct
UINT16 max_rx_apdu_size;
UINT16 max_tx_apdu_size;
BT_HDR *p_tx_pkt;
- BT_HDR *p_rx_pkt;
+ BT_HDR *p_rx_pkt;
tBTA_HL_MDEP_ID local_mdep_id;
UINT8 local_mdep_cfg_idx;
tBTA_HL_DCH_CFG local_cfg;
tBTA_HL_DCH_CFG remote_cfg;
- tBTA_HL_MDEP_ID peer_mdep_id;
- UINT16 peer_data_type;
+ tBTA_HL_MDEP_ID peer_mdep_id;
+ UINT16 peer_data_type;
tBTA_HL_MDEP_ROLE peer_mdep_role;
- tBTA_HL_DCH_MODE dch_mode;
- tBTA_SEC sec_mask;
+ tBTA_HL_DCH_MODE dch_mode;
+ tBTA_SEC sec_mask;
BOOLEAN is_the_first_reliable;
BOOLEAN delete_mdl;
- UINT16 mtu;
+ UINT16 mtu;
tMCA_CHNL_CFG chnl_cfg;
BOOLEAN mdl_cfg_idx_included;
UINT8 mdl_cfg_idx;
@@ -449,21 +449,21 @@ typedef struct
UINT8 cout_oper;
BT_HDR *p_echo_tx_pkt;
BT_HDR *p_echo_rx_pkt;
- tBTA_HL_STATUS ci_put_echo_data_status;
+ tBTA_HL_STATUS ci_put_echo_data_status;
}tBTA_HL_MDL_CB;
-typedef struct
+typedef struct
{
- tBTA_HL_MDL_CB mdl[BTA_HL_NUM_MDLS_PER_MCL];
+ tBTA_HL_MDL_CB mdl[BTA_HL_NUM_MDLS_PER_MCL];
tBTA_HL_DELETE_MDL delete_mdl;
BOOLEAN in_use;
- tBTA_HL_CCH_STATE cch_state;
+ tBTA_HL_CCH_STATE cch_state;
UINT16 req_ctrl_psm;
UINT16 ctrl_psm;
UINT16 data_psm;
BD_ADDR bd_addr;
UINT16 cch_mtu;
- UINT16 sec_mask;
+ UINT16 sec_mask;
tBTA_HL_MCL_HANDLE mcl_handle;
tSDP_DISCOVERY_DB *p_db; /* pointer to discovery database */
tSDP_DISC_CMPL_CB *sdp_cback;
@@ -487,10 +487,10 @@ typedef struct
BOOLEAN in_use; /* this CB is in use*/
BOOLEAN deregistering;
UINT8 app_id;
- UINT32 sdp_handle; /* SDP record handle */
+ UINT32 sdp_handle; /* SDP record handle */
tBTA_HL_SUP_FEATURE sup_feature;
tBTA_HL_MDL_CFG mdl_cfg[BTA_HL_NUM_MDL_CFGS];
- tBTA_HL_DEVICE_TYPE dev_type;
+ tBTA_HL_DEVICE_TYPE dev_type;
tBTA_HL_APP_HANDLE app_handle;
UINT16 ctrl_psm; /* L2CAP PSM for the MCAP control channel */
UINT16 data_psm; /* L2CAP PSM for the MCAP data channel */
@@ -498,7 +498,7 @@ typedef struct
char srv_name[BTA_SERVICE_NAME_LEN +1]; /* service name to be used in the SDP; null terminated*/
char srv_desp[BTA_SERVICE_DESP_LEN +1]; /* service description to be used in the SDP; null terminated */
- char provider_name[BTA_PROVIDER_NAME_LEN +1]; /* provide name to be used in the SDP; null terminated */
+ char provider_name[BTA_PROVIDER_NAME_LEN +1]; /* provide name to be used in the SDP; null terminated */
tMCA_CTRL_CBACK *p_mcap_cback; /* pointer to MCAP callback function */
tMCA_DATA_CBACK *p_data_cback;
@@ -508,7 +508,7 @@ typedef struct
typedef struct
{
BOOLEAN in_use;
- tBTA_HL_SDP_OPER sdp_oper;
+ tBTA_HL_SDP_OPER sdp_oper;
UINT8 app_idx;
UINT8 mcl_idx;
UINT8 mdl_idx;
@@ -526,7 +526,7 @@ typedef struct
tBTA_HL_APP_CB acb[BTA_HL_NUM_APPS]; /* HL Control Blocks */
tBTA_HL_CTRL_CBACK *p_ctrl_cback; /* pointer to control callback function */
BOOLEAN enable;
- BOOLEAN disabling;
+ BOOLEAN disabling;
tBTA_HL_SDP_CB scb[BTA_HL_NUM_SDP_CBACKS];
tBTA_HL_TIMER_CB tcb[BTA_HL_NUM_TIMERS];
@@ -573,11 +573,11 @@ extern "C"
/* main */
extern BOOLEAN bta_hl_hdl_event(BT_HDR *p_msg);
/* sdp */
- extern BOOLEAN bta_hl_fill_sup_feature_list( const tSDP_DISC_ATTR *p_attr,
+ extern BOOLEAN bta_hl_fill_sup_feature_list( const tSDP_DISC_ATTR *p_attr,
tBTA_HL_SUP_FEATURE_LIST_ELEM *p_list);
extern tBTA_HL_STATUS bta_hl_sdp_register (UINT8 app_idx);
- extern tSDP_DISC_REC *bta_hl_find_sink_or_src_srv_class_in_db (const tSDP_DISCOVERY_DB *p_db,
+ extern tSDP_DISC_REC *bta_hl_find_sink_or_src_srv_class_in_db (const tSDP_DISCOVERY_DB *p_db,
const tSDP_DISC_REC *p_start_rec);
/* action routines */
@@ -612,7 +612,7 @@ extern "C"
tBTA_HL_DATA *p_data);
extern void bta_hl_dch_mca_rcv_data(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx,
tBTA_HL_DATA *p_data);
- extern void bta_hl_dch_close_cmpl(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx,
+ extern void bta_hl_dch_close_cmpl(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx,
tBTA_HL_DATA *p_data);
extern void bta_hl_dch_mca_close_cfm(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx,
tBTA_HL_DATA *p_data);
@@ -645,9 +645,9 @@ extern "C"
tBTA_HL_DATA *p_data);
extern void bta_hl_deallocate_spd_cback(UINT8 sdp_cback_idx);
extern tSDP_DISC_CMPL_CB *bta_hl_allocate_spd_cback(tBTA_HL_SDP_OPER sdp_oper, UINT8 app_idx, UINT8 mcl_idx,
- UINT8 mdl_idx,
+ UINT8 mdl_idx,
UINT8 *p_sdp_cback_idx);
- extern tBTA_HL_STATUS bta_hl_init_sdp(tBTA_HL_SDP_OPER sdp_oper, UINT8 app_idx, UINT8 mcl_idx,
+ extern tBTA_HL_STATUS bta_hl_init_sdp(tBTA_HL_SDP_OPER sdp_oper, UINT8 app_idx, UINT8 mcl_idx,
UINT8 mdl_idx);
extern void bta_hl_cch_sdp_init(UINT8 app_idx, UINT8 mcl_idx, tBTA_HL_DATA *p_data);
extern void bta_hl_cch_mca_open(UINT8 app_idx, UINT8 mcl_idx, tBTA_HL_DATA *p_data);
@@ -658,9 +658,9 @@ extern "C"
extern void bta_hl_cch_mca_connect(UINT8 app_idx, UINT8 mcl_idx, tBTA_HL_DATA *p_data);
/* State machine drivers */
- extern void bta_hl_cch_sm_execute(UINT8 inst_idx, UINT8 mcl_idx,
+ extern void bta_hl_cch_sm_execute(UINT8 inst_idx, UINT8 mcl_idx,
UINT16 event, tBTA_HL_DATA *p_data);
- extern void bta_hl_dch_sm_execute(UINT8 inst_idx, UINT8 mcl_idx, UINT8 mdl_idx,
+ extern void bta_hl_dch_sm_execute(UINT8 inst_idx, UINT8 mcl_idx, UINT8 mdl_idx,
UINT16 event, tBTA_HL_DATA *p_data);
/* MCAP callback functions */
extern void bta_hl_mcap_ctrl_cback(tMCA_HANDLE handle, tMCA_CL mcl, UINT8 event,
@@ -669,10 +669,10 @@ extern "C"
extern void bta_hl_mcap_data_cback(tMCA_DL mdl, BT_HDR *p_pkt);
/* utility functions */
- extern BOOLEAN bta_hl_set_ctrl_psm_for_dch(UINT8 app_idx, UINT8 mcl_idx,
+ extern BOOLEAN bta_hl_set_ctrl_psm_for_dch(UINT8 app_idx, UINT8 mcl_idx,
UINT8 mdl_idx, UINT16 ctrl_psm);
- extern BOOLEAN bta_hl_find_sdp_idx_using_ctrl_psm(tBTA_HL_SDP *p_sdp,
- UINT16 ctrl_psm,
+ extern BOOLEAN bta_hl_find_sdp_idx_using_ctrl_psm(tBTA_HL_SDP *p_sdp,
+ UINT16 ctrl_psm,
UINT8 *p_sdp_idx);
extern UINT8 bta_hl_set_user_tx_pool_id(UINT16 max_tx_size);
extern UINT8 bta_hl_set_user_rx_pool_id(UINT16 mtu);
@@ -680,59 +680,59 @@ extern "C"
extern UINT16 bta_hl_set_mps(UINT16 mtu);
extern void bta_hl_clean_mdl_cb(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx);
extern BT_HDR * bta_hl_get_buf(UINT16 data_size);
- extern BOOLEAN bta_hl_find_service_in_db( UINT8 app_idx, UINT8 mcl_idx,
+ extern BOOLEAN bta_hl_find_service_in_db( UINT8 app_idx, UINT8 mcl_idx,
UINT16 service_uuid,
tSDP_DISC_REC **pp_rec );
extern UINT16 bta_hl_get_service_uuids(UINT8 sdp_oper, UINT8 app_idx, UINT8 mcl_idx,
UINT8 mdl_idx );
- extern BOOLEAN bta_hl_find_echo_cfg_rsp(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdep_idx, UINT8 cfg,
+ extern BOOLEAN bta_hl_find_echo_cfg_rsp(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdep_idx, UINT8 cfg,
UINT8 *p_cfg_rsp);
- extern BOOLEAN bta_hl_validate_cfg(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx,
+ extern BOOLEAN bta_hl_validate_cfg(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx,
UINT8 cfg);
- extern BOOLEAN bta_hl_find_cch_cb_indexes(tBTA_HL_DATA *p_msg,
- UINT8 *p_app_idx,
+ extern BOOLEAN bta_hl_find_cch_cb_indexes(tBTA_HL_DATA *p_msg,
+ UINT8 *p_app_idx,
UINT8 *p_mcl_idx);
- extern BOOLEAN bta_hl_find_dch_cb_indexes(tBTA_HL_DATA *p_msg,
- UINT8 *p_app_idx,
+ extern BOOLEAN bta_hl_find_dch_cb_indexes(tBTA_HL_DATA *p_msg,
+ UINT8 *p_app_idx,
UINT8 *p_mcl_idx,
UINT8 *p_mdl_idx);
extern UINT16 bta_hl_allocate_mdl_id(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx );
- extern BOOLEAN bta_hl_find_mdl_idx_using_handle(tBTA_HL_MDL_HANDLE mdl_handle,
- UINT8 *p_app_idx, UINT8 *p_mcl_idx,
+ extern BOOLEAN bta_hl_find_mdl_idx_using_handle(tBTA_HL_MDL_HANDLE mdl_handle,
+ UINT8 *p_app_idx, UINT8 *p_mcl_idx,
UINT8 *p_mdl_idx);
- extern BOOLEAN bta_hl_find_mdl_idx(UINT8 app_idx, UINT8 mcl_idx, UINT16 mdl_id,
+ extern BOOLEAN bta_hl_find_mdl_idx(UINT8 app_idx, UINT8 mcl_idx, UINT16 mdl_id,
UINT8 *p_mdl_idx);
- extern BOOLEAN bta_hl_find_an_active_mdl_idx(UINT8 app_idx, UINT8 mcl_idx,
+ extern BOOLEAN bta_hl_find_an_active_mdl_idx(UINT8 app_idx, UINT8 mcl_idx,
UINT8 *p_mdl_idx);
- extern BOOLEAN bta_hl_find_dch_setup_mdl_idx(UINT8 app_idx, UINT8 mcl_idx,
+ extern BOOLEAN bta_hl_find_dch_setup_mdl_idx(UINT8 app_idx, UINT8 mcl_idx,
UINT8 *p_mdl_idx);
- extern BOOLEAN bta_hl_find_an_in_use_mcl_idx(UINT8 app_idx,
+ extern BOOLEAN bta_hl_find_an_in_use_mcl_idx(UINT8 app_idx,
UINT8 *p_mcl_idx);
extern BOOLEAN bta_hl_find_an_in_use_app_idx(UINT8 *p_app_idx);
extern BOOLEAN bta_hl_find_app_idx(UINT8 app_id, UINT8 *p_app_idx);
- extern BOOLEAN bta_hl_find_app_idx_using_handle(tBTA_HL_APP_HANDLE app_handle,
+ extern BOOLEAN bta_hl_find_app_idx_using_handle(tBTA_HL_APP_HANDLE app_handle,
UINT8 *p_app_idx);
- extern BOOLEAN bta_hl_find_mcl_idx_using_handle( tBTA_HL_MCL_HANDLE mcl_handle,
+ extern BOOLEAN bta_hl_find_mcl_idx_using_handle( tBTA_HL_MCL_HANDLE mcl_handle,
UINT8 *p_app_idx, UINT8 *p_mcl_idx);
extern BOOLEAN bta_hl_find_mcl_idx(UINT8 app_idx, BD_ADDR p_bd_addr, UINT8 *p_mcl_idx);
extern BOOLEAN bta_hl_is_the_first_reliable_existed(UINT8 app_idx, UINT8 mcl_idx );
- extern BOOLEAN bta_hl_find_non_active_mdl_cfg(UINT8 app_idx, UINT8 start_mdl_cfg_idx,
+ extern BOOLEAN bta_hl_find_non_active_mdl_cfg(UINT8 app_idx, UINT8 start_mdl_cfg_idx,
UINT8 *p_mdl_cfg_idx);
- extern BOOLEAN bta_hl_find_avail_mdl_cfg_idx(UINT8 app_idx, UINT8 mcl_idx,
+ extern BOOLEAN bta_hl_find_avail_mdl_cfg_idx(UINT8 app_idx, UINT8 mcl_idx,
UINT8 *p_mdl_cfg_idx);
extern BOOLEAN bta_hl_find_mdl_cfg_idx(UINT8 app_idx, UINT8 mcl_idx,
tBTA_HL_MDL_ID mdl_id, UINT8 *p_mdl_cfg_idx);
extern BOOLEAN bta_hl_get_cur_time(UINT8 app_idx, UINT8 *p_cur_time);
extern void bta_hl_sort_cfg_time_idx(UINT8 app_idx, UINT8 *a, UINT8 n);
extern void bta_hl_compact_mdl_cfg_time(UINT8 app_idx);
- extern BOOLEAN bta_hl_is_mdl_exsit_in_mcl(UINT8 app_idx, BD_ADDR bd_addr,
+ extern BOOLEAN bta_hl_is_mdl_exsit_in_mcl(UINT8 app_idx, BD_ADDR bd_addr,
tBTA_HL_MDL_ID mdl_id);
- extern BOOLEAN bta_hl_delete_mdl_cfg(UINT8 app_idx, BD_ADDR bd_addr,
+ extern BOOLEAN bta_hl_delete_mdl_cfg(UINT8 app_idx, BD_ADDR bd_addr,
tBTA_HL_MDL_ID mdl_id);
extern BOOLEAN bta_hl_is_mdl_value_valid(tBTA_HL_MDL_ID mdl_id);
- extern BOOLEAN bta_hl_find_mdep_cfg_idx(UINT8 app_idx,
+ extern BOOLEAN bta_hl_find_mdep_cfg_idx(UINT8 app_idx,
tBTA_HL_MDEP_ID local_mdep_id, UINT8 *p_mdep_cfg_idx);
- extern void bta_hl_find_rxtx_apdu_size(UINT8 app_idx, UINT8 mdep_cfg_idx,
+ extern void bta_hl_find_rxtx_apdu_size(UINT8 app_idx, UINT8 mdep_cfg_idx,
UINT16 *p_rx_apu_size,
UINT16 *p_tx_apu_size);
extern BOOLEAN bta_hl_validate_peer_cfg(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx,
@@ -740,14 +740,14 @@ extern "C"
tBTA_HL_MDEP_ROLE peer_mdep_role,
UINT8 sdp_idx);
extern tBTA_HL_STATUS bta_hl_chk_local_cfg(UINT8 app_idx, UINT8 mcl_idx,
- UINT8 mdep_cfg_idx,
+ UINT8 mdep_cfg_idx,
tBTA_HL_DCH_CFG local_cfg);
extern BOOLEAN bta_hl_validate_reconnect_params(UINT8 app_idx, UINT8 mcl_idx,
tBTA_HL_API_DCH_RECONNECT *p_reconnect,
UINT8 *p_mdep_cfg_idx, UINT8 *p_mdl_cfg_idx);
extern BOOLEAN bta_hl_find_avail_mcl_idx(UINT8 app_idx, UINT8 *p_mcl_idx);
- extern BOOLEAN bta_hl_find_avail_mdl_idx(UINT8 app_idx, UINT8 mcl_idx,
+ extern BOOLEAN bta_hl_find_avail_mdl_idx(UINT8 app_idx, UINT8 mcl_idx,
UINT8 *p_mdl_idx);
extern BOOLEAN bta_hl_is_a_duplicate_id(UINT8 app_id);
extern BOOLEAN bta_hl_find_avail_app_idx(UINT8 *p_idx);
@@ -763,40 +763,40 @@ extern "C"
extern void bta_hl_clean_app(UINT8 app_idx);
extern void bta_hl_check_deregistration(UINT8 app_idx, tBTA_HL_DATA *p_data );
extern void bta_hl_check_disable(tBTA_HL_DATA *p_data );
- extern void bta_hl_build_abort_ind(tBTA_HL *p_evt_data,
- tBTA_HL_APP_HANDLE app_handle,
+ extern void bta_hl_build_abort_ind(tBTA_HL *p_evt_data,
+ tBTA_HL_APP_HANDLE app_handle,
tBTA_HL_MCL_HANDLE mcl_handle);
- extern void bta_hl_build_abort_cfm(tBTA_HL *p_evt_data,
- tBTA_HL_APP_HANDLE app_handle,
+ extern void bta_hl_build_abort_cfm(tBTA_HL *p_evt_data,
+ tBTA_HL_APP_HANDLE app_handle,
tBTA_HL_MCL_HANDLE mcl_handle,
tBTA_HL_STATUS status);
extern void bta_hl_build_dch_close_cfm(tBTA_HL *p_evt_data,
- tBTA_HL_APP_HANDLE app_handle,
+ tBTA_HL_APP_HANDLE app_handle,
tBTA_HL_MCL_HANDLE mcl_handle,
- tBTA_HL_MDL_HANDLE mdl_handle,
+ tBTA_HL_MDL_HANDLE mdl_handle,
tBTA_HL_STATUS status);
- extern void bta_hl_build_dch_close_ind(tBTA_HL *p_evt_data,
- tBTA_HL_APP_HANDLE app_handle,
+ extern void bta_hl_build_dch_close_ind(tBTA_HL *p_evt_data,
+ tBTA_HL_APP_HANDLE app_handle,
tBTA_HL_MCL_HANDLE mcl_handle,
tBTA_HL_MDL_HANDLE mdl_handle,
BOOLEAN intentional);
- extern void bta_hl_build_send_data_cfm(tBTA_HL *p_evt_data,
- tBTA_HL_APP_HANDLE app_handle,
+ extern void bta_hl_build_send_data_cfm(tBTA_HL *p_evt_data,
+ tBTA_HL_APP_HANDLE app_handle,
tBTA_HL_MCL_HANDLE mcl_handle,
- tBTA_HL_MDL_HANDLE mdl_handle,
+ tBTA_HL_MDL_HANDLE mdl_handle,
tBTA_HL_STATUS status );
- extern void bta_hl_build_rcv_data_ind(tBTA_HL *p_evt_data,
- tBTA_HL_APP_HANDLE app_handle,
+ extern void bta_hl_build_rcv_data_ind(tBTA_HL *p_evt_data,
+ tBTA_HL_APP_HANDLE app_handle,
tBTA_HL_MCL_HANDLE mcl_handle,
tBTA_HL_MDL_HANDLE mdl_handle);
- extern void bta_hl_build_cch_open_cfm(tBTA_HL *p_evt_data,
- tBTA_HL_APP_HANDLE app_handle,
- tBTA_HL_MCL_HANDLE mcl_handle,
- BD_ADDR bd_addr,
+ extern void bta_hl_build_cch_open_cfm(tBTA_HL *p_evt_data,
+ tBTA_HL_APP_HANDLE app_handle,
+ tBTA_HL_MCL_HANDLE mcl_handle,
+ BD_ADDR bd_addr,
tBTA_HL_STATUS status );
- extern void bta_hl_build_cch_open_ind(tBTA_HL *p_evt_data,
- tBTA_HL_APP_HANDLE app_handle,
- tBTA_HL_MCL_HANDLE mcl_handle,
+ extern void bta_hl_build_cch_open_ind(tBTA_HL *p_evt_data,
+ tBTA_HL_APP_HANDLE app_handle,
+ tBTA_HL_MCL_HANDLE mcl_handle,
BD_ADDR bd_addr);
extern void bta_hl_build_cch_close_cfm(tBTA_HL *p_evt_data,
tBTA_HL_APP_HANDLE app_handle,
@@ -809,8 +809,8 @@ extern "C"
extern void bta_hl_build_dch_open_cfm(tBTA_HL *p_evt_data,
tBTA_HL_APP_HANDLE app_handle,
- tBTA_HL_MCL_HANDLE mcl_handle,
- tBTA_HL_MDL_HANDLE mdl_handle,
+ tBTA_HL_MCL_HANDLE mcl_handle,
+ tBTA_HL_MDL_HANDLE mdl_handle,
tBTA_HL_MDEP_ID local_mdep_id,
tBTA_HL_MDL_ID mdl_id,
tBTA_HL_DCH_MODE dch_mode,
@@ -819,21 +819,21 @@ extern "C"
tBTA_HL_STATUS status);
extern void bta_hl_build_delete_mdl_cfm(tBTA_HL *p_evt_data,
- tBTA_HL_APP_HANDLE app_handle,
- tBTA_HL_MCL_HANDLE mcl_handle,
- tBTA_HL_MDL_ID mdl_id,
+ tBTA_HL_APP_HANDLE app_handle,
+ tBTA_HL_MCL_HANDLE mcl_handle,
+ tBTA_HL_MDL_ID mdl_id,
tBTA_HL_STATUS status);
- extern void bta_hl_build_echo_test_cfm(tBTA_HL *p_evt_data,
- tBTA_HL_APP_HANDLE app_handle,
- tBTA_HL_MCL_HANDLE mcl_handle,
+ extern void bta_hl_build_echo_test_cfm(tBTA_HL *p_evt_data,
+ tBTA_HL_APP_HANDLE app_handle,
+ tBTA_HL_MCL_HANDLE mcl_handle,
tBTA_HL_STATUS status );
extern void bta_hl_build_sdp_query_cfm(tBTA_HL *p_evt_data,
- tBTA_HL_APP_HANDLE app_handle,
- BD_ADDR bd_addr,
+ tBTA_HL_APP_HANDLE app_handle,
+ BD_ADDR bd_addr,
tBTA_HL_SDP *p_sdp,
tBTA_HL_STATUS status);
-#if (BTA_HL_DEBUG == TRUE)
+#if (BTA_HL_DEBUG == TRUE)
extern char *bta_hl_status_code(tBTA_HL_STATUS status);
extern char *bta_hl_evt_code(tBTA_HL_INT_EVT evt_code);
#endif
diff --git a/bta/hl/bta_hl_main.c b/bta/hl/bta_hl_main.c
index 3bfca86..3193438 100644
--- a/bta/hl/bta_hl_main.c
+++ b/bta/hl/bta_hl_main.c
@@ -2,7 +2,7 @@
**
** Name: bta_hl_main.c
**
-** Description: This file contains the HeaLth device profile main functions
+** Description: This file contains the HeaLth device profile main functions
** and state machine.
**
** Copyright (c) 1998-2011, Broadcom Corp., All Rights Reserved.
@@ -76,7 +76,7 @@ enum
typedef void (*tBTA_HL_DCH_ACTION)(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx, tBTA_HL_DATA *p_data);
-static const tBTA_HL_DCH_ACTION bta_hl_dch_action[] =
+static const tBTA_HL_DCH_ACTION bta_hl_dch_action[] =
{
bta_hl_dch_mca_create,
bta_hl_dch_mca_create_cfm,
@@ -361,7 +361,7 @@ static const UINT8 bta_hl_cch_st_closing[][BTA_HL_CCH_NUM_COLS] =
/* BTA_HL_CCH_OPEN_EVT */ {BTA_HL_CCH_IGNORE, BTA_HL_CCH_CLOSING_ST},
/* BTA_HL_CCH_SDP_OK_EVT */ {BTA_HL_CCH_CLOSE_CMPL, BTA_HL_CCH_IDLE_ST},
/* BTA_HL_CCH_SDP_FAIL_EVT */ {BTA_HL_CCH_CLOSE_CMPL, BTA_HL_CCH_IDLE_ST},
-/* BTA_HL_MCA_CONNECT_IND_EVT */ {BTA_HL_CCH_MCA_CONNECT, BTA_HL_CCH_OPEN_ST},
+/* BTA_HL_MCA_CONNECT_IND_EVT */ {BTA_HL_CCH_MCA_CONNECT, BTA_HL_CCH_OPEN_ST},
/* BTA_HL_MCA_DISCONNECT_IND_EVT */ {BTA_HL_CCH_MCA_DISCONNECT, BTA_HL_CCH_CLOSING_ST},
/* BTA_HL_CCH_CLOSE_EVT */ {BTA_HL_CCH_MCA_CLOSE, BTA_HL_CCH_CLOSING_ST},
/* BTA_HL_CCH_CLOSE_CMPL_EVT */ {BTA_HL_CCH_CLOSE_CMPL, BTA_HL_CCH_IDLE_ST},
@@ -396,11 +396,11 @@ tBTA_HL_CB bta_hl_cb;
** Function bta_hl_cch_sm_execute
**
** Description State machine event handling function for CCH
-**
+**
** Returns void
**
*******************************************************************************/
-void bta_hl_cch_sm_execute(UINT8 app_idx, UINT8 mcl_idx,
+void bta_hl_cch_sm_execute(UINT8 app_idx, UINT8 mcl_idx,
UINT16 event, tBTA_HL_DATA *p_data)
{
tBTA_HL_CCH_ST_TBL state_table;
@@ -458,7 +458,7 @@ void bta_hl_cch_sm_execute(UINT8 app_idx, UINT8 mcl_idx,
** Returns void
**
*******************************************************************************/
-void bta_hl_dch_sm_execute(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx,
+void bta_hl_dch_sm_execute(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx,
UINT16 event, tBTA_HL_DATA *p_data)
{
tBTA_HL_DCH_ST_TBL state_table;
@@ -496,7 +496,7 @@ void bta_hl_dch_sm_execute(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx,
}
-#if (BTA_HL_DEBUG == TRUE) && (BT_USE_TRACES == TRUE)
+#if (BTA_HL_DEBUG == TRUE) && (BT_USE_TRACES == TRUE)
if (in_state != p_cb->dch_state)
{
APPL_TRACE_DEBUG3("HL DCH State Change: [%s] -> [%s] after [%s]",
@@ -511,7 +511,7 @@ void bta_hl_dch_sm_execute(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx,
** Function bta_hl_api_enable
**
** Description Process the API enable request to enable the HL subsystem
-**
+**
** Returns void
**
*******************************************************************************/
@@ -523,7 +523,7 @@ static void bta_hl_api_enable(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
if (p_cb->enable)
{
APPL_TRACE_ERROR0("HL is already enabled");
- evt_data.enable_cfm.status = BTA_HL_STATUS_FAIL;
+ evt_data.enable_cfm.status = BTA_HL_STATUS_FAIL;
if (p_data->api_enable.p_cback)
p_data->api_enable.p_cback(BTA_HL_CTRL_ENABLE_CFM_EVT, (tBTA_HL_CTRL *) &evt_data);
return;
@@ -534,7 +534,7 @@ static void bta_hl_api_enable(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
memset(p_cb, 0, sizeof(tBTA_HL_CB));
p_cb->enable = TRUE;
p_cb->p_ctrl_cback = p_data->api_enable.p_cback;
- evt_data.enable_cfm.status = BTA_HL_STATUS_OK;
+ evt_data.enable_cfm.status = BTA_HL_STATUS_OK;
if (p_data->api_enable.p_cback)
p_data->api_enable.p_cback(BTA_HL_CTRL_ENABLE_CFM_EVT, (tBTA_HL_CTRL *) &evt_data);
@@ -551,7 +551,7 @@ static void bta_hl_api_enable(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
static void bta_hl_api_disable(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
{
tBTA_HL_CTRL evt_data;
- tBTA_HL_STATUS status = BTA_HL_STATUS_OK;
+ tBTA_HL_STATUS status = BTA_HL_STATUS_OK;
if (p_cb->enable)
{
@@ -561,7 +561,7 @@ static void bta_hl_api_disable(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
else
{
status = BTA_HL_STATUS_FAIL;
- evt_data.disable_cfm.status = status;
+ evt_data.disable_cfm.status = status;
if (p_cb->p_ctrl_cback) p_cb->p_ctrl_cback(BTA_HL_CTRL_DISABLE_CFM_EVT, (tBTA_HL_CTRL *) &evt_data);
}
@@ -580,7 +580,7 @@ static void bta_hl_api_disable(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
** Function bta_hl_api_register
**
** Description Process the API registration request to register an HDP applciation
-**
+**
** Returns void
**
*******************************************************************************/
@@ -589,7 +589,7 @@ static void bta_hl_api_register(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
tBTA_HL evt_data;
UINT8 app_idx;
tBTA_HL_APP_CB *p_acb;
- tBTA_HL_STATUS status = BTA_HL_STATUS_FAIL;
+ tBTA_HL_STATUS status = BTA_HL_STATUS_FAIL;
if (p_cb->enable)
{
@@ -606,7 +606,7 @@ static void bta_hl_api_register(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
BCM_STRNCPY_S(p_acb->srv_name, sizeof(p_acb->srv_name), p_data->api_reg.srv_name, BTA_SERVICE_NAME_LEN);
BCM_STRNCPY_S(p_acb->srv_desp, sizeof(p_acb->srv_desp), p_data->api_reg.srv_desp, BTA_SERVICE_DESP_LEN);
BCM_STRNCPY_S(p_acb->provider_name, sizeof(p_acb->provider_name), p_data->api_reg.provider_name, BTA_PROVIDER_NAME_LEN);
- bta_hl_cb.p_alloc_psm = L2CA_AllocatePSM;
+ bta_hl_cb.p_alloc_psm = L2CA_AllocatePSM;
p_acb->ctrl_psm = bta_hl_cb.p_alloc_psm();
p_acb->data_psm = bta_hl_cb.p_alloc_psm();
p_acb->p_mcap_cback = bta_hl_mcap_ctrl_cback;
@@ -614,12 +614,12 @@ static void bta_hl_api_register(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
}
else
{
- status = BTA_HL_STATUS_NO_RESOURCE;
+ status = BTA_HL_STATUS_NO_RESOURCE;
}
}
else
{
- status = BTA_HL_STATUS_DUPLICATE_APP_ID;
+ status = BTA_HL_STATUS_DUPLICATE_APP_ID;
}
}
@@ -665,7 +665,7 @@ static void bta_hl_api_register(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
**
** Function bta_hl_api_deregister
**
-** Description Process the API de-registration request
+** Description Process the API de-registration request
**
** Returns void
**
@@ -692,7 +692,7 @@ static void bta_hl_api_deregister(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
**
** Function bta_hl_api_cch_open
**
-** Description Process the API CCH open request
+** Description Process the API CCH open request
**
** Returns void
**
@@ -714,7 +714,7 @@ static void bta_hl_api_cch_open(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
{
p_mcb = BTA_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
p_mcb->in_use = TRUE;
- p_mcb->req_ctrl_psm = p_data->api_cch_open.ctrl_psm;
+ p_mcb->req_ctrl_psm = p_data->api_cch_open.ctrl_psm;
p_mcb->sec_mask = p_data->api_cch_open.sec_mask;
bdcpy(p_mcb->bd_addr, p_data->api_cch_open.bd_addr);
p_mcb->cch_oper = BTA_HL_CCH_OP_LOCAL_OPEN;
@@ -750,7 +750,7 @@ static void bta_hl_api_cch_open(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
bta_hl_build_cch_open_cfm(&evt_data, p_data->api_cch_open.app_handle,
0,
p_data->api_cch_open.bd_addr,
- status);
+ status);
p_acb = BTA_HL_GET_APP_CB_PTR(app_idx);
p_acb->p_cback(BTA_HL_CCH_OPEN_CFM_EVT,(tBTA_HL *) &evt_data );
break;
@@ -764,8 +764,8 @@ static void bta_hl_api_cch_open(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
**
** Function bta_hl_api_cch_close
**
-** Description Process the API CCH close request
-**
+** Description Process the API CCH close request
+**
** Returns void
**
*******************************************************************************/
@@ -800,7 +800,7 @@ static void bta_hl_api_cch_close(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
case BTA_HL_STATUS_FAIL:
p_acb = BTA_HL_GET_APP_CB_PTR(app_idx);
- bta_hl_build_cch_close_cfm(&evt_data,
+ bta_hl_build_cch_close_cfm(&evt_data,
p_acb->app_handle,
p_data->api_cch_close.mcl_handle,
status);
@@ -819,7 +819,7 @@ static void bta_hl_api_cch_close(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
**
** Function bta_hl_api_dch_open
**
-** Description Process the API DCH open request
+** Description Process the API DCH open request
**
** Returns void
**
@@ -863,28 +863,28 @@ static void bta_hl_api_dch_open(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
if (bta_hl_set_ctrl_psm_for_dch(app_idx, mcl_idx, mdl_idx, p_data->api_dch_open.ctrl_psm))
{
p_mdep_cfg = BTA_HL_GET_MDEP_CFG_PTR(app_idx, mdep_cfg_idx);
- p_dcb->in_use = TRUE;
+ p_dcb->in_use = TRUE;
p_dcb->dch_oper = BTA_HL_DCH_OP_LOCAL_OPEN;
- p_dcb->sec_mask = p_data->api_dch_open.sec_mask;
- p_dcb->local_mdep_id = p_data->api_dch_open.local_mdep_id;
+ p_dcb->sec_mask = p_data->api_dch_open.sec_mask;
+ p_dcb->local_mdep_id = p_data->api_dch_open.local_mdep_id;
p_dcb->peer_mdep_id = p_data->api_dch_open.peer_mdep_id;
if (p_mdep_cfg->mdep_role == BTA_HL_MDEP_ROLE_SINK)
{
- p_dcb->peer_mdep_role = BTA_HL_MDEP_ROLE_SOURCE;
+ p_dcb->peer_mdep_role = BTA_HL_MDEP_ROLE_SOURCE;
}
else
{
p_dcb->peer_mdep_role = BTA_HL_MDEP_ROLE_SINK;
}
- p_dcb->local_mdep_cfg_idx = mdep_cfg_idx;
- p_dcb->local_cfg = p_data->api_dch_open.local_cfg;
+ p_dcb->local_mdep_cfg_idx = mdep_cfg_idx;
+ p_dcb->local_cfg = p_data->api_dch_open.local_cfg;
bta_hl_find_rxtx_apdu_size(app_idx, mdep_cfg_idx,
- &p_dcb->max_rx_apdu_size,
+ &p_dcb->max_rx_apdu_size,
&p_dcb->max_tx_apdu_size);
- p_dcb->mdl_id = bta_hl_allocate_mdl_id(app_idx,mcl_idx,mdl_idx);
+ p_dcb->mdl_id = bta_hl_allocate_mdl_id(app_idx,mcl_idx,mdl_idx);
p_dcb->mdl_cfg_idx_included = FALSE;
}
else
@@ -896,7 +896,7 @@ static void bta_hl_api_dch_open(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
else
{
status = BTA_HL_STATUS_INVALID_LOCAL_MDEP_ID;
- }
+ }
}
}
else
@@ -945,7 +945,7 @@ static void bta_hl_api_dch_open(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
case BTA_HL_STATUS_INVALID_LOCAL_MDEP_ID:
case BTA_HL_STATUS_INVALID_CTRL_PSM:
p_acb = BTA_HL_GET_APP_CB_PTR(app_idx);
- bta_hl_build_dch_open_cfm(&evt_data,
+ bta_hl_build_dch_open_cfm(&evt_data,
p_acb->app_handle,
p_data->api_dch_open.mcl_handle,
BTA_HL_INVALID_MDL_HANDLE,
@@ -963,8 +963,8 @@ static void bta_hl_api_dch_open(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
**
** Function bta_hl_api_dch_close
**
-** Description Process the API DCH close request
-**
+** Description Process the API DCH close request
+**
** Returns void
**
*******************************************************************************/
@@ -1006,7 +1006,7 @@ static void bta_hl_api_dch_close(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
case BTA_HL_STATUS_FAIL:
p_acb = BTA_HL_GET_APP_CB_PTR(app_idx);
p_mcb = BTA_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
- bta_hl_build_dch_close_cfm(&evt_data,
+ bta_hl_build_dch_close_cfm(&evt_data,
p_acb->app_handle,
p_mcb->mcl_handle,
p_data->api_dch_close.mdl_handle,
@@ -1025,8 +1025,8 @@ static void bta_hl_api_dch_close(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
**
** Function bta_hl_api_dch_reconnect
**
-** Description Process the API DCH reconnect request
-**
+** Description Process the API DCH reconnect request
+**
** Returns void
**
*******************************************************************************/
@@ -1050,7 +1050,7 @@ static void bta_hl_api_dch_reconnect(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
if (bta_hl_find_avail_mdl_idx(app_idx, mcl_idx, &mdl_idx))
{
p_dcb = BTA_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
- if (bta_hl_validate_reconnect_params(app_idx, mcl_idx, &(p_data->api_dch_reconnect),
+ if (bta_hl_validate_reconnect_params(app_idx, mcl_idx, &(p_data->api_dch_reconnect),
&mdep_cfg_idx, &mdl_cfg_idx ))
{
if (!bta_hl_is_the_first_reliable_existed(app_idx, mcl_idx) &&
@@ -1065,15 +1065,15 @@ static void bta_hl_api_dch_reconnect(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
p_dcb->in_use = TRUE;
p_dcb->dch_oper = BTA_HL_DCH_OP_LOCAL_RECONNECT;
p_dcb->sec_mask = (BTA_SEC_AUTHENTICATE | BTA_SEC_ENCRYPT);
- p_dcb->local_mdep_id = p_acb->mdl_cfg[mdl_cfg_idx].local_mdep_id;
+ p_dcb->local_mdep_id = p_acb->mdl_cfg[mdl_cfg_idx].local_mdep_id;
p_dcb->local_mdep_cfg_idx = mdep_cfg_idx;
- p_dcb->local_cfg = BTA_HL_DCH_CFG_UNKNOWN;
+ p_dcb->local_cfg = BTA_HL_DCH_CFG_UNKNOWN;
p_dcb->mdl_id = p_data->api_dch_reconnect.mdl_id;
p_dcb->mdl_cfg_idx_included = TRUE;
p_dcb->mdl_cfg_idx = mdl_cfg_idx;
p_dcb->dch_mode = p_acb->mdl_cfg[mdl_cfg_idx].dch_mode;
bta_hl_find_rxtx_apdu_size(app_idx, mdep_cfg_idx,
- &p_dcb->max_rx_apdu_size,
+ &p_dcb->max_rx_apdu_size,
&p_dcb->max_tx_apdu_size);
}
else
@@ -1118,7 +1118,7 @@ static void bta_hl_api_dch_reconnect(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
}
else
{
- bta_hl_dch_sm_execute(app_idx, mcl_idx, mdl_idx, BTA_HL_DCH_SDP_INIT_EVT, p_data);
+ bta_hl_dch_sm_execute(app_idx, mcl_idx, mdl_idx, BTA_HL_DCH_SDP_INIT_EVT, p_data);
}
break;
case BTA_HL_STATUS_INVALID_RECONNECT_CFG:
@@ -1129,7 +1129,7 @@ static void bta_hl_api_dch_reconnect(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
bta_hl_build_dch_open_cfm(&evt_data,
p_acb->app_handle,
p_data->api_dch_reconnect.mcl_handle,
- BTA_HL_INVALID_MDL_HANDLE,
+ BTA_HL_INVALID_MDL_HANDLE,
0,p_data->api_dch_reconnect.mdl_id,0,0,0, status);
p_acb->p_cback(BTA_HL_DCH_RECONNECT_CFM_EVT,(tBTA_HL *) &evt_data );
break;
@@ -1143,8 +1143,8 @@ static void bta_hl_api_dch_reconnect(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
**
** Function bta_hl_api_dch_echo_test
**
-** Description Process the API Echo test request
-**
+** Description Process the API Echo test request
+**
** Returns void
**
*******************************************************************************/
@@ -1189,8 +1189,8 @@ static void bta_hl_api_dch_echo_test(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
p_dcb->mdl_cfg_idx_included = FALSE;
p_echo_cfg = BTA_HL_GET_ECHO_CFG_PTR(app_idx);
p_dcb->max_rx_apdu_size = p_echo_cfg->max_rx_apdu_size;
- p_dcb->max_tx_apdu_size = p_echo_cfg->max_tx_apdu_size;
- p_mcb->echo_test = TRUE;
+ p_dcb->max_tx_apdu_size = p_echo_cfg->max_tx_apdu_size;
+ p_mcb->echo_test = TRUE;
p_mcb->echo_mdl_idx = mdl_idx;
}
else
@@ -1251,9 +1251,9 @@ static void bta_hl_api_dch_echo_test(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
case BTA_HL_STATUS_ECHO_TEST_BUSY:
case BTA_HL_STATUS_NO_RESOURCE:
case BTA_HL_STATUS_INVALID_DCH_CFG:
- bta_hl_build_echo_test_cfm(&evt_data,
+ bta_hl_build_echo_test_cfm(&evt_data,
p_acb->app_handle,
- p_mcb->mcl_handle,
+ p_mcb->mcl_handle,
status);
p_acb->p_cback(BTA_HL_DCH_ECHO_TEST_CFM_EVT,(tBTA_HL *) &evt_data );
break;
@@ -1269,7 +1269,7 @@ static void bta_hl_api_dch_echo_test(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
**
** Function bta_hl_api_sdp_query
**
-** Description Process the API SDP query request
+** Description Process the API SDP query request
**
** Returns void
**
@@ -1320,7 +1320,7 @@ static void bta_hl_api_sdp_query(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
if (status == BTA_HL_STATUS_OK)
{
status = bta_hl_init_sdp( p_mcb->sdp_oper, app_idx, mcl_idx, 0xFF);
- if ( (status != BTA_HL_STATUS_OK) &&
+ if ( (status != BTA_HL_STATUS_OK) &&
(p_mcb->sdp_oper == BTA_HL_SDP_OP_SDP_QUERY_NEW) )
{
memset(p_mcb, 0 ,sizeof(tBTA_HL_MCL_CB));
@@ -1338,8 +1338,8 @@ static void bta_hl_api_sdp_query(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
case BTA_HL_STATUS_FAIL:
case BTA_HL_STATUS_SDP_NO_RESOURCE:
bta_hl_build_sdp_query_cfm(&evt_data,
- p_data->api_sdp_query.app_handle,
- p_data->api_sdp_query.bd_addr,
+ p_data->api_sdp_query.app_handle,
+ p_data->api_sdp_query.bd_addr,
NULL,
status);
p_acb = BTA_HL_GET_APP_CB_PTR(app_idx);
@@ -1360,7 +1360,7 @@ static void bta_hl_api_sdp_query(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
**
** Function bta_hl_sdp_query_results
**
-** Description Process the SDP query results
+** Description Process the SDP query results
**
** Returns void
**
@@ -1438,8 +1438,8 @@ static void bta_hl_sdp_query_results(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
**
** Function bta_hl_api_delete_mdl
**
-** Description Process the API DELETE MDL request
-**
+** Description Process the API DELETE MDL request
+**
** Returns void
**
*******************************************************************************/
@@ -1470,7 +1470,7 @@ static void bta_hl_api_delete_mdl(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
p_data->api_delete_mdl.mdl_id)!= MCA_SUCCESS)
{
status = BTA_HL_STATUS_FAIL;
- memset(&p_mcb->delete_mdl, 0, sizeof(tBTA_HL_DELETE_MDL));
+ memset(&p_mcb->delete_mdl, 0, sizeof(tBTA_HL_DELETE_MDL));
}
}
else
@@ -1505,7 +1505,7 @@ static void bta_hl_api_delete_mdl(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
bta_hl_build_delete_mdl_cfm(&evt_data,
p_acb->app_handle,
p_data->api_delete_mdl.mcl_handle,
- p_data->api_delete_mdl.mdl_id,
+ p_data->api_delete_mdl.mdl_id,
status);
p_acb->p_cback(BTA_HL_DELETE_MDL_CFM_EVT,(tBTA_HL *) &evt_data );
@@ -1521,8 +1521,8 @@ static void bta_hl_api_delete_mdl(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
**
** Function bta_hl_mca_delete_mdl_cfm
**
-** Description Process the DELETE MDL confirmation event
-**
+** Description Process the DELETE MDL confirmation event
+**
** Returns void
**
*******************************************************************************/
@@ -1556,7 +1556,7 @@ static void bta_hl_mca_delete_mdl_cfm(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
status = BTA_HL_STATUS_FAIL;
}
- memset(&p_mcb->delete_mdl, 0, sizeof(tBTA_HL_DELETE_MDL));
+ memset(&p_mcb->delete_mdl, 0, sizeof(tBTA_HL_DELETE_MDL));
}
else
{
@@ -1581,7 +1581,7 @@ static void bta_hl_mca_delete_mdl_cfm(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
bta_hl_build_delete_mdl_cfm(&evt_data,
p_acb->app_handle,
p_mcb->mcl_handle,
- p_delete_cfm->mdl_id,
+ p_delete_cfm->mdl_id,
status);
p_acb->p_cback(BTA_HL_DELETE_MDL_CFM_EVT,(tBTA_HL *) &evt_data );
@@ -1592,8 +1592,8 @@ static void bta_hl_mca_delete_mdl_cfm(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
**
** Function bta_hl_mca_delete_mdl_ind
**
-** Description Process the DELETE MDL indication event
-**
+** Description Process the DELETE MDL indication event
+**
** Returns void
**
*******************************************************************************/
@@ -1647,8 +1647,8 @@ static void bta_hl_mca_delete_mdl_ind(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
**
** Function bta_hl_api_dch_abort
**
-** Description Process the API DCH abort request
-**
+** Description Process the API DCH abort request
+**
** Returns void
**
*******************************************************************************/
@@ -1707,9 +1707,9 @@ static void bta_hl_api_dch_abort(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
p_mcb = BTA_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
p_acb = BTA_HL_GET_APP_CB_PTR(app_idx);
- bta_hl_build_abort_cfm(&evt_data,
+ bta_hl_build_abort_cfm(&evt_data,
p_acb->app_handle,
- p_mcb->mcl_handle,
+ p_mcb->mcl_handle,
BTA_HL_STATUS_FAIL);
p_acb->p_cback(BTA_HL_DCH_ABORT_CFM_EVT,(tBTA_HL *) &evt_data );
break;
@@ -1726,7 +1726,7 @@ static void bta_hl_api_dch_abort(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
** Function bta_hl_hdl_event
**
** Description HL main event handling function.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1736,7 +1736,7 @@ BOOLEAN bta_hl_hdl_event(BT_HDR *p_msg)
BOOLEAN success = TRUE;
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG1("BTA HL Event Handler: Event [%s]",
+ APPL_TRACE_DEBUG1("BTA HL Event Handler: Event [%s]",
bta_hl_evt_code(p_msg->event));
#endif
@@ -1803,14 +1803,14 @@ BOOLEAN bta_hl_hdl_event(BT_HDR *p_msg)
{
if (bta_hl_find_cch_cb_indexes((tBTA_HL_DATA *) p_msg, &app_idx, &mcl_idx))
{
- bta_hl_cch_sm_execute( app_idx,
- mcl_idx,
+ bta_hl_cch_sm_execute( app_idx,
+ mcl_idx,
p_msg->event, (tBTA_HL_DATA *) p_msg);
}
else
{
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_ERROR1("unable to find control block indexes for CCH: [event=%s]",
+ APPL_TRACE_ERROR1("unable to find control block indexes for CCH: [event=%s]",
bta_hl_evt_code(p_msg->event));
#else
APPL_TRACE_ERROR1("unable to find control block indexes for CCH: [event=%d]", p_msg->event);
@@ -1822,16 +1822,16 @@ BOOLEAN bta_hl_hdl_event(BT_HDR *p_msg)
{
if (bta_hl_find_dch_cb_indexes((tBTA_HL_DATA *) p_msg, &app_idx, &mcl_idx, &mdl_idx))
{
- bta_hl_dch_sm_execute( app_idx,
- mcl_idx,
+ bta_hl_dch_sm_execute( app_idx,
+ mcl_idx,
mdl_idx,
p_msg->event, (tBTA_HL_DATA *) p_msg);
}
else
{
-
+
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_ERROR1("unable to find control block indexes for DCH : [event=%s]",
+ APPL_TRACE_ERROR1("unable to find control block indexes for DCH : [event=%s]",
bta_hl_evt_code(p_msg->event));
#else
APPL_TRACE_ERROR1("unable to find control block indexes for DCH: [event=%d]", p_msg->event);
@@ -1849,14 +1849,14 @@ BOOLEAN bta_hl_hdl_event(BT_HDR *p_msg)
/*****************************************************************************
** Debug Functions
-*****************************************************************************/
+*****************************************************************************/
#if (BTA_HL_DEBUG == TRUE) && (BT_USE_TRACES == TRUE)
/*******************************************************************************
**
** Function bta_hl_cch_state_code
**
-** Description Map CCH state code to the corresponding state string
+** Description Map CCH state code to the corresponding state string
**
** Returns string pointer for the associated state name
**
@@ -1882,7 +1882,7 @@ static char *bta_hl_cch_state_code(tBTA_HL_CCH_STATE state_code)
**
** Function bta_hl_dch_state_code
**
-** Description Map DCH state code to the corresponding state string
+** Description Map DCH state code to the corresponding state string
**
** Returns string pointer for the associated state name
**
diff --git a/bta/hl/bta_hl_sdp.c b/bta/hl/bta_hl_sdp.c
index 765f6c1..9784ed6 100644
--- a/bta/hl/bta_hl_sdp.c
+++ b/bta/hl/bta_hl_sdp.c
@@ -28,7 +28,7 @@
** If found, the passed protocol list element is filled in.
**
*******************************************************************************/
-BOOLEAN bta_hl_fill_sup_feature_list( const tSDP_DISC_ATTR *p_attr,
+BOOLEAN bta_hl_fill_sup_feature_list( const tSDP_DISC_ATTR *p_attr,
tBTA_HL_SUP_FEATURE_LIST_ELEM *p_list)
{
tSDP_DISC_ATTR *p_sattr;
@@ -139,7 +139,7 @@ BOOLEAN bta_hl_add_sup_feature_list (UINT32 handle, UINT16 num_elem,
{
UINT8 *p_buf;
int offset;
- BOOLEAN result = FALSE;
+ BOOLEAN result = FALSE;
if ((p_buf = (UINT8 *)GKI_getbuf(BTA_HL_SUP_FEATURE_SDP_BUF_SIZE)) != NULL)
{
@@ -170,14 +170,14 @@ tBTA_HL_STATUS bta_hl_sdp_register (UINT8 app_idx)
UINT16 svc_class_id_list[BTA_HL_NUM_SVC_ELEMS];
tSDP_PROTOCOL_ELEM proto_elem_list[BTA_HL_NUM_PROTO_ELEMS];
tSDP_PROTO_LIST_ELEM add_proto_list;
- tBTA_HL_SUP_FEATURE_LIST_ELEM sup_feature_list;
+ tBTA_HL_SUP_FEATURE_LIST_ELEM sup_feature_list;
UINT16 browse_list[] = {UUID_SERVCLASS_PUBLIC_BROWSE_GROUP};
UINT8 i,j, cnt,mdep_id, mdep_role;
UINT8 data_exchange_spec = BTA_HL_SDP_IEEE_11073_20601;
UINT8 mcap_sup_proc = BTA_HL_MCAP_SUP_PROC_MASK;
UINT16 profile_uuid = UUID_SERVCLASS_HDP_PROFILE;
- UINT16 version = BTA_HL_VERSION_01_00;
- UINT8 num_services=1;
+ UINT16 version = BTA_HL_VERSION_01_00;
+ UINT8 num_services=1;
tBTA_HL_APP_CB *p_cb = BTA_HL_GET_APP_CB_PTR(app_idx);
BOOLEAN result = TRUE;
tBTA_HL_STATUS status = BTA_HL_STATUS_OK;
@@ -186,7 +186,7 @@ tBTA_HL_STATUS bta_hl_sdp_register (UINT8 app_idx)
APPL_TRACE_DEBUG1("bta_hl_sdp_register app_idx=%d",app_idx);
#endif
- if ((p_cb->sup_feature.app_role_mask == BTA_HL_MDEP_ROLE_MASK_SOURCE) &&
+ if ((p_cb->sup_feature.app_role_mask == BTA_HL_MDEP_ROLE_MASK_SOURCE) &&
(!p_cb->sup_feature.advertize_source_sdp))
{
return BTA_HL_STATUS_OK;
@@ -212,7 +212,7 @@ tBTA_HL_STATUS bta_hl_sdp_register (UINT8 app_idx)
svc_class_id_list[1]= UUID_SERVCLASS_HDP_SINK;
}
}
- result &= SDP_AddServiceClassIdList(p_cb->sdp_handle, num_services, svc_class_id_list);
+ result &= SDP_AddServiceClassIdList(p_cb->sdp_handle, num_services, svc_class_id_list);
if (result)
{
@@ -221,7 +221,7 @@ tBTA_HL_STATUS bta_hl_sdp_register (UINT8 app_idx)
proto_elem_list[0].num_params = 1;
proto_elem_list[0].params[0] = p_cb->ctrl_psm;
proto_elem_list[1].protocol_uuid = UUID_PROTOCOL_MCAP_CTRL;
- proto_elem_list[1].num_params = 1;
+ proto_elem_list[1].num_params = 1;
proto_elem_list[1].params[0] = version;
result &= SDP_AddProtocolList(p_cb->sdp_handle, BTA_HL_NUM_PROTO_ELEMS, proto_elem_list);
@@ -236,7 +236,7 @@ tBTA_HL_STATUS bta_hl_sdp_register (UINT8 app_idx)
add_proto_list.list_elem[0].params[0] = p_cb->data_psm;
add_proto_list.list_elem[1].protocol_uuid = UUID_PROTOCOL_MCAP_DATA;
add_proto_list.list_elem[1].num_params = 0;
- result &= SDP_AddAdditionProtoLists(p_cb->sdp_handle, BTA_HL_NUM_ADD_PROTO_LISTS,
+ result &= SDP_AddAdditionProtoLists(p_cb->sdp_handle, BTA_HL_NUM_ADD_PROTO_LISTS,
(tSDP_PROTO_LIST_ELEM *)&add_proto_list);
}
@@ -285,14 +285,14 @@ tBTA_HL_STATUS bta_hl_sdp_register (UINT8 app_idx)
cnt=0;
for (i=1; i<= p_cb->sup_feature.num_of_mdeps; i++)
{
- mdep_id = (UINT8)p_cb->sup_feature.mdep[i].mdep_id;
+ mdep_id = (UINT8)p_cb->sup_feature.mdep[i].mdep_id;
mdep_role = (UINT8)p_cb->sup_feature.mdep[i].mdep_cfg.mdep_role;
for (j=0; j<p_cb->sup_feature.mdep[i].mdep_cfg.num_of_mdep_data_types; j++)
{
sup_feature_list.list_elem[cnt].mdep_id = mdep_id;
sup_feature_list.list_elem[cnt].mdep_role = mdep_role;
- sup_feature_list.list_elem[cnt].data_type = p_cb->sup_feature.mdep[i].mdep_cfg.data_cfg[j].data_type;
+ sup_feature_list.list_elem[cnt].data_type = p_cb->sup_feature.mdep[i].mdep_cfg.data_cfg[j].data_type;
if (p_cb->sup_feature.mdep[i].mdep_cfg.data_cfg[j].desp[0] != '\0')
{
sup_feature_list.list_elem[cnt].p_mdep_desp = p_cb->sup_feature.mdep[i].mdep_cfg.data_cfg[j].desp;
@@ -311,7 +311,7 @@ tBTA_HL_STATUS bta_hl_sdp_register (UINT8 app_idx)
}
}
sup_feature_list.num_elems = cnt;
- result &= bta_hl_add_sup_feature_list (p_cb->sdp_handle,
+ result &= bta_hl_add_sup_feature_list (p_cb->sdp_handle,
sup_feature_list.num_elems,
sup_feature_list.list_elem);
}
@@ -336,8 +336,8 @@ tBTA_HL_STATUS bta_hl_sdp_register (UINT8 app_idx)
if (result)
{
for(i=0; i < num_services; i++)
- {
- bta_sys_add_uuid(svc_class_id_list[i]);
+ {
+ bta_sys_add_uuid(svc_class_id_list[i]);
APPL_TRACE_DEBUG2("dbg bta_sys_add_uuid i=%d uuid=0x%x", i, svc_class_id_list[i]); //todo
}
}
@@ -360,7 +360,7 @@ tBTA_HL_STATUS bta_hl_sdp_register (UINT8 app_idx)
**
** Function bta_hl_find_sink_or_src_srv_class_in_db
**
-** Description This function queries an SDP database for either a HDP Sink or
+** Description This function queries an SDP database for either a HDP Sink or
** Source service class ID.
** If the p_start_rec pointer is NULL, it looks from the beginning
** of the database, else it continues from the next record after
@@ -369,7 +369,7 @@ tBTA_HL_STATUS bta_hl_sdp_register (UINT8 app_idx)
** Returns Pointer to record containing service class, or NULL
**
*******************************************************************************/
-tSDP_DISC_REC *bta_hl_find_sink_or_src_srv_class_in_db (const tSDP_DISCOVERY_DB *p_db,
+tSDP_DISC_REC *bta_hl_find_sink_or_src_srv_class_in_db (const tSDP_DISCOVERY_DB *p_db,
const tSDP_DISC_REC *p_start_rec)
{
#if SDP_CLIENT_ENABLED == TRUE
diff --git a/bta/hl/bta_hl_utils.c b/bta/hl/bta_hl_utils.c
index 169e965..95e2a83 100644
--- a/bta/hl/bta_hl_utils.c
+++ b/bta/hl/bta_hl_utils.c
@@ -29,13 +29,13 @@
/*******************************************************************************
**
-** Function bta_hl_set_ctrl_psm_for_dch
+** Function bta_hl_set_ctrl_psm_for_dch
**
** Description This function set the control PSM for the DCH setup
**
-** Returns BOOLEAN - TRUE - control PSM setting is successful
+** Returns BOOLEAN - TRUE - control PSM setting is successful
*******************************************************************************/
-BOOLEAN bta_hl_set_ctrl_psm_for_dch(UINT8 app_idx, UINT8 mcl_idx,
+BOOLEAN bta_hl_set_ctrl_psm_for_dch(UINT8 app_idx, UINT8 mcl_idx,
UINT8 mdl_idx, UINT16 ctrl_psm)
{
tBTA_HL_MCL_CB *p_mcb = BTA_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
@@ -64,7 +64,7 @@ BOOLEAN bta_hl_set_ctrl_psm_for_dch(UINT8 app_idx, UINT8 mcl_idx,
#if BTA_HL_DEBUG == TRUE
if (!success)
{
- APPL_TRACE_DEBUG4("bta_hl_set_ctrl_psm_for_dch num_recs=%d success=%d update_ctrl_psm=%d ctrl_psm=0x%x ",
+ APPL_TRACE_DEBUG4("bta_hl_set_ctrl_psm_for_dch num_recs=%d success=%d update_ctrl_psm=%d ctrl_psm=0x%x ",
p_mcb->sdp.num_recs, success, update_ctrl_psm, ctrl_psm );
}
#endif
@@ -77,13 +77,13 @@ BOOLEAN bta_hl_set_ctrl_psm_for_dch(UINT8 app_idx, UINT8 mcl_idx,
**
** Function bta_hl_find_sdp_idx_using_ctrl_psm
**
-** Description
-**
-** Returns UINT8 pool_id
+** Description
+**
+** Returns UINT8 pool_id
**
*******************************************************************************/
-BOOLEAN bta_hl_find_sdp_idx_using_ctrl_psm(tBTA_HL_SDP *p_sdp,
- UINT16 ctrl_psm,
+BOOLEAN bta_hl_find_sdp_idx_using_ctrl_psm(tBTA_HL_SDP *p_sdp,
+ UINT16 ctrl_psm,
UINT8 *p_sdp_idx)
{
BOOLEAN found=FALSE;
@@ -112,7 +112,7 @@ BOOLEAN bta_hl_find_sdp_idx_using_ctrl_psm(tBTA_HL_SDP *p_sdp,
#if BTA_HL_DEBUG == TRUE
if (!found)
{
- APPL_TRACE_DEBUG3("bta_hl_find_sdp_idx_using_ctrl_psm found=%d sdp_idx=%d ctrl_psm=0x%x ",
+ APPL_TRACE_DEBUG3("bta_hl_find_sdp_idx_using_ctrl_psm found=%d sdp_idx=%d ctrl_psm=0x%x ",
found, *p_sdp_idx, ctrl_psm );
}
#endif
@@ -123,9 +123,9 @@ BOOLEAN bta_hl_find_sdp_idx_using_ctrl_psm(tBTA_HL_SDP *p_sdp,
**
** Function bta_hl_set_user_tx_pool_id
**
-** Description This function sets the user tx pool id
-**
-** Returns UINT8 pool_id
+** Description This function sets the user tx pool id
+**
+** Returns UINT8 pool_id
**
*******************************************************************************/
@@ -143,7 +143,7 @@ UINT8 bta_hl_set_user_tx_pool_id(UINT16 max_tx_size)
}
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG3("bta_hl_set_user_rx_pool_id pool_id=%d max_tx_size=%d default_ertm_pool_size=%d",
+ APPL_TRACE_DEBUG3("bta_hl_set_user_rx_pool_id pool_id=%d max_tx_size=%d default_ertm_pool_size=%d",
pool_id, max_tx_size, GKI_get_pool_bufsize (OBX_FCR_TX_POOL_ID));
#endif
@@ -154,10 +154,10 @@ UINT8 bta_hl_set_user_tx_pool_id(UINT16 max_tx_size)
**
** Function bta_hl_set_user_rx_pool_id
**
-** Description This function sets the user trx pool id
-**
-** Returns UINT8 pool_id
-**
+** Description This function sets the user trx pool id
+**
+** Returns UINT8 pool_id
+**
*******************************************************************************/
UINT8 bta_hl_set_user_rx_pool_id(UINT16 mtu)
@@ -174,7 +174,7 @@ UINT8 bta_hl_set_user_rx_pool_id(UINT16 mtu)
}
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG3("bta_hl_set_user_rx_pool_id pool_id=%d mtu=%d default_ertm_pool_size=%d",
+ APPL_TRACE_DEBUG3("bta_hl_set_user_rx_pool_id pool_id=%d mtu=%d default_ertm_pool_size=%d",
pool_id, mtu, GKI_get_pool_bufsize (OBX_FCR_RX_POOL_ID));
#endif
@@ -187,10 +187,10 @@ UINT8 bta_hl_set_user_rx_pool_id(UINT16 mtu)
**
** Function bta_hl_set_tx_win_size
**
-** Description This function sets the tx window size
-**
-** Returns UINT8 tx_win_size
-**
+** Description This function sets the tx window size
+**
+** Returns UINT8 tx_win_size
+**
*******************************************************************************/
UINT8 bta_hl_set_tx_win_size(UINT16 mtu, UINT16 mps)
{
@@ -214,7 +214,7 @@ UINT8 bta_hl_set_tx_win_size(UINT16 mtu, UINT16 mps)
}
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG3("bta_hl_set_tx_win_size win_size=%d mtu=%d mps=%d",
+ APPL_TRACE_DEBUG3("bta_hl_set_tx_win_size win_size=%d mtu=%d mps=%d",
tx_win_size, mtu, mps);
#endif
return tx_win_size;
@@ -225,9 +225,9 @@ UINT8 bta_hl_set_tx_win_size(UINT16 mtu, UINT16 mps)
** Function bta_hl_set_mps
**
** Description This function sets the MPS
-**
-** Returns UINT16 MPS
-**
+**
+** Returns UINT16 MPS
+**
*******************************************************************************/
UINT16 bta_hl_set_mps(UINT16 mtu)
{
@@ -241,7 +241,7 @@ UINT16 bta_hl_set_mps(UINT16 mtu)
mps = mtu;
}
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG2("bta_hl_set_mps mps=%d mtu=%d",
+ APPL_TRACE_DEBUG2("bta_hl_set_mps mps=%d mtu=%d",
mps, mtu);
#endif
return mps;
@@ -253,15 +253,15 @@ UINT16 bta_hl_set_mps(UINT16 mtu)
** Function bta_hl_clean_mdl_cb
**
** Description This function clean up the specified MDL control block
-**
-** Returns void
-**
+**
+** Returns void
+**
*******************************************************************************/
void bta_hl_clean_mdl_cb(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx)
{
tBTA_HL_MDL_CB *p_dcb = BTA_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG3("bta_hl_clean_mdl_cb app_idx=%d mcl_idx=%d mdl_idx=%d",
+ APPL_TRACE_DEBUG3("bta_hl_clean_mdl_cb app_idx=%d mcl_idx=%d mdl_idx=%d",
app_idx, mcl_idx, mdl_idx);
#endif
utl_freebuf((void **) &p_dcb->p_tx_pkt);
@@ -278,7 +278,7 @@ void bta_hl_clean_mdl_cb(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx)
** Function bta_hl_get_buf
**
** Description This function allocate a buffer based on the specified data size
-**
+**
** Returns BT_HDR *.
**
*******************************************************************************/
@@ -307,16 +307,16 @@ BT_HDR * bta_hl_get_buf(UINT16 data_size)
/*******************************************************************************
**
-** Function bta_hl_find_service_in_db
+** Function bta_hl_find_service_in_db
**
-** Description This function check the specified service class(es) can be find in
+** Description This function check the specified service class(es) can be find in
** the received SDP database
-**
+**
** Returns BOOLEAN TRUE - found
-** FALSE - not found
+** FALSE - not found
**
*******************************************************************************/
-BOOLEAN bta_hl_find_service_in_db( UINT8 app_idx, UINT8 mcl_idx,
+BOOLEAN bta_hl_find_service_in_db( UINT8 app_idx, UINT8 mcl_idx,
UINT16 service_uuid,
tSDP_DISC_REC **pp_rec )
{
@@ -334,7 +334,7 @@ BOOLEAN bta_hl_find_service_in_db( UINT8 app_idx, UINT8 mcl_idx,
}
break;
default:
- if (((*pp_rec = bta_hl_find_sink_or_src_srv_class_in_db(p_mcb->p_db,
+ if (((*pp_rec = bta_hl_find_sink_or_src_srv_class_in_db(p_mcb->p_db,
*pp_rec)) == NULL))
{
found = FALSE;
@@ -346,14 +346,14 @@ BOOLEAN bta_hl_find_service_in_db( UINT8 app_idx, UINT8 mcl_idx,
/*******************************************************************************
**
-** Function bta_hl_get_service_uuids
+** Function bta_hl_get_service_uuids
**
**
** Description This function finds the service class(es) for both CCH and DCH oeprations
-**
+**
** Returns UINT16 - service_id
** if service_uuid = 0xFFFF then it means service uuid
-** can be either Sink or Source
+** can be either Sink or Source
**
*******************************************************************************/
UINT16 bta_hl_get_service_uuids(UINT8 sdp_oper, UINT8 app_idx, UINT8 mcl_idx,
@@ -364,7 +364,7 @@ UINT16 bta_hl_get_service_uuids(UINT8 sdp_oper, UINT8 app_idx, UINT8 mcl_idx,
switch (sdp_oper)
{
-
+
case BTA_HL_SDP_OP_DCH_OPEN_INIT:
case BTA_HL_SDP_OP_DCH_RECONNECT_INIT:
p_dcb = BTA_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
@@ -393,16 +393,16 @@ UINT16 bta_hl_get_service_uuids(UINT8 sdp_oper, UINT8 app_idx, UINT8 mcl_idx,
/*******************************************************************************
**
-** Function bta_hl_find_echo_cfg_rsp
+** Function bta_hl_find_echo_cfg_rsp
**
**
** Description This function finds the configuration response for the echo test
-**
+**
** Returns BOOLEAN - TRUE found
-** FALSE not found
+** FALSE not found
**
*******************************************************************************/
-BOOLEAN bta_hl_find_echo_cfg_rsp(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdep_idx, UINT8 cfg,
+BOOLEAN bta_hl_find_echo_cfg_rsp(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdep_idx, UINT8 cfg,
UINT8 *p_cfg_rsp)
{
tBTA_HL_APP_CB *p_acb = BTA_HL_GET_APP_CB_PTR(app_idx);
@@ -417,7 +417,7 @@ BOOLEAN bta_hl_find_echo_cfg_rsp(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdep_idx, U
}
else if (cfg == BTA_HL_DCH_CFG_NO_PREF )
{
- *p_cfg_rsp = BTA_HL_DEFAULT_ECHO_TEST_SRC_DCH_CFG;
+ *p_cfg_rsp = BTA_HL_DEFAULT_ECHO_TEST_SRC_DCH_CFG;
}
else
{
@@ -430,7 +430,7 @@ BOOLEAN bta_hl_find_echo_cfg_rsp(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdep_idx, U
#if BTA_HL_DEBUG == TRUE
if (!status)
{
- APPL_TRACE_DEBUG4("bta_hl_find_echo_cfg_rsp status=failed app_idx=%d mcl_idx=%d mdep_idx=%d cfg=%d",
+ APPL_TRACE_DEBUG4("bta_hl_find_echo_cfg_rsp status=failed app_idx=%d mcl_idx=%d mdep_idx=%d cfg=%d",
app_idx, mcl_idx, mdep_idx, cfg);
}
#endif
@@ -440,15 +440,15 @@ BOOLEAN bta_hl_find_echo_cfg_rsp(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdep_idx, U
/*******************************************************************************
**
-** Function bta_hl_validate_dch_cfg
+** Function bta_hl_validate_dch_cfg
+**
+** Description This function validate the DCH configuration
**
-** Description This function validate the DCH configuration
-**
** Returns BOOLEAN - TRUE cfg is valid
-** FALSE not valid
+** FALSE not valid
**
*******************************************************************************/
-BOOLEAN bta_hl_validate_cfg(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx,
+BOOLEAN bta_hl_validate_cfg(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx,
UINT8 cfg)
{
tBTA_HL_MDL_CB *p_dcb = BTA_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
@@ -493,16 +493,16 @@ BOOLEAN bta_hl_validate_cfg(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx,
/*******************************************************************************
**
-** Function bta_hl_find_cch_cb_indexes
+** Function bta_hl_find_cch_cb_indexes
+**
+** Description This function finds the indexes needed for the CCH state machine
**
-** Description This function finds the indexes needed for the CCH state machine
-**
** Returns BOOLEAN - TRUE found
-** FALSE not found
+** FALSE not found
**
*******************************************************************************/
-BOOLEAN bta_hl_find_cch_cb_indexes(tBTA_HL_DATA *p_msg,
- UINT8 *p_app_idx,
+BOOLEAN bta_hl_find_cch_cb_indexes(tBTA_HL_DATA *p_msg,
+ UINT8 *p_app_idx,
UINT8 *p_mcl_idx)
{
BOOLEAN found = FALSE;
@@ -601,16 +601,16 @@ BOOLEAN bta_hl_find_cch_cb_indexes(tBTA_HL_DATA *p_msg,
/*******************************************************************************
**
-** Function bta_hl_find_dch_cb_indexes
+** Function bta_hl_find_dch_cb_indexes
+**
+** Description This function finds the indexes needed for the DCH state machine
**
-** Description This function finds the indexes needed for the DCH state machine
-**
** Returns BOOLEAN - TRUE found
-** FALSE not found
+** FALSE not found
**
*******************************************************************************/
-BOOLEAN bta_hl_find_dch_cb_indexes(tBTA_HL_DATA *p_msg,
- UINT8 *p_app_idx,
+BOOLEAN bta_hl_find_dch_cb_indexes(tBTA_HL_DATA *p_msg,
+ UINT8 *p_app_idx,
UINT8 *p_mcl_idx,
UINT8 *p_mdl_idx)
{
@@ -655,7 +655,7 @@ BOOLEAN bta_hl_find_dch_cb_indexes(tBTA_HL_DATA *p_msg,
case BTA_HL_MCA_CLOSE_CFM_EVT:
- if (bta_hl_find_mdl_idx_using_handle((tBTA_HL_MDL_HANDLE)p_msg->mca_evt.mca_data.close_cfm.mdl,
+ if (bta_hl_find_mdl_idx_using_handle((tBTA_HL_MDL_HANDLE)p_msg->mca_evt.mca_data.close_cfm.mdl,
&app_idx, &mcl_idx, &mdl_idx))
{
found = TRUE;
@@ -663,7 +663,7 @@ BOOLEAN bta_hl_find_dch_cb_indexes(tBTA_HL_DATA *p_msg,
break;
case BTA_HL_MCA_CLOSE_IND_EVT:
- if (bta_hl_find_mdl_idx_using_handle((tBTA_HL_MDL_HANDLE)p_msg->mca_evt.mca_data.close_ind.mdl,
+ if (bta_hl_find_mdl_idx_using_handle((tBTA_HL_MDL_HANDLE)p_msg->mca_evt.mca_data.close_ind.mdl,
&app_idx, &mcl_idx, &mdl_idx))
{
found = TRUE;
@@ -671,7 +671,7 @@ BOOLEAN bta_hl_find_dch_cb_indexes(tBTA_HL_DATA *p_msg,
break;
case BTA_HL_API_SEND_DATA_EVT:
- if (bta_hl_find_mdl_idx_using_handle(p_msg->api_send_data.mdl_handle,
+ if (bta_hl_find_mdl_idx_using_handle(p_msg->api_send_data.mdl_handle,
&app_idx, &mcl_idx, &mdl_idx ))
{
found = TRUE;
@@ -681,7 +681,7 @@ BOOLEAN bta_hl_find_dch_cb_indexes(tBTA_HL_DATA *p_msg,
case BTA_HL_MCA_CONG_CHG_EVT:
- if (bta_hl_find_mdl_idx_using_handle((tBTA_HL_MDL_HANDLE)p_msg->mca_evt.mca_data.cong_chg.mdl,
+ if (bta_hl_find_mdl_idx_using_handle((tBTA_HL_MDL_HANDLE)p_msg->mca_evt.mca_data.cong_chg.mdl,
&app_idx, &mcl_idx, &mdl_idx ))
{
found = TRUE;
@@ -775,11 +775,11 @@ BOOLEAN bta_hl_find_dch_cb_indexes(tBTA_HL_DATA *p_msg,
/*******************************************************************************
**
-** Function bta_hl_allocate_mdl_id
+** Function bta_hl_allocate_mdl_id
**
** Description This function allocates a MDL ID
-**
-** Returns UINT16 - MDL ID
+**
+** Returns UINT16 - MDL ID
**
*******************************************************************************/
UINT16 bta_hl_allocate_mdl_id(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx )
@@ -796,7 +796,7 @@ UINT16 bta_hl_allocate_mdl_id(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx )
/* check mdl_ids that are used for the current conenctions */
for (i=0; i< BTA_HL_NUM_MDLS_PER_MCL; i++)
{
- if (p_mcb->mdl[i].in_use &&
+ if (p_mcb->mdl[i].in_use &&
(i != mdl_idx) &&
(p_mcb->mdl[i].mdl_id == mdl_id) )
{
@@ -833,14 +833,14 @@ UINT16 bta_hl_allocate_mdl_id(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx )
}
/*******************************************************************************
**
-** Function bta_hl_find_mdl_idx
+** Function bta_hl_find_mdl_idx
**
** Description This function finds the MDL index based on mdl_id
-**
-** Returns BOOLEAN TRUE-found
+**
+** Returns BOOLEAN TRUE-found
**
*******************************************************************************/
-BOOLEAN bta_hl_find_mdl_idx(UINT8 app_idx, UINT8 mcl_idx, UINT16 mdl_id,
+BOOLEAN bta_hl_find_mdl_idx(UINT8 app_idx, UINT8 mcl_idx, UINT16 mdl_id,
UINT8 *p_mdl_idx)
{
tBTA_HL_MCL_CB *p_mcb = BTA_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
@@ -849,7 +849,7 @@ BOOLEAN bta_hl_find_mdl_idx(UINT8 app_idx, UINT8 mcl_idx, UINT16 mdl_id,
for (i=0; i < BTA_HL_NUM_MDLS_PER_MCL ; i ++)
{
- if (p_mcb->mdl[i].in_use &&
+ if (p_mcb->mdl[i].in_use &&
(mdl_id !=0) &&
(p_mcb->mdl[i].mdl_id== mdl_id))
{
@@ -872,14 +872,14 @@ BOOLEAN bta_hl_find_mdl_idx(UINT8 app_idx, UINT8 mcl_idx, UINT16 mdl_id,
/*******************************************************************************
**
-** Function bta_hl_find_an_active_mdl_idx
+** Function bta_hl_find_an_active_mdl_idx
**
-** Description This function finds an active MDL
-**
-** Returns BOOLEAN TRUE-found
+** Description This function finds an active MDL
+**
+** Returns BOOLEAN TRUE-found
**
*******************************************************************************/
-BOOLEAN bta_hl_find_an_active_mdl_idx(UINT8 app_idx, UINT8 mcl_idx,
+BOOLEAN bta_hl_find_an_active_mdl_idx(UINT8 app_idx, UINT8 mcl_idx,
UINT8 *p_mdl_idx)
{
tBTA_HL_MCL_CB *p_mcb = BTA_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
@@ -888,7 +888,7 @@ BOOLEAN bta_hl_find_an_active_mdl_idx(UINT8 app_idx, UINT8 mcl_idx,
for (i=0; i < BTA_HL_NUM_MDLS_PER_MCL ; i ++)
{
- if (p_mcb->mdl[i].in_use &&
+ if (p_mcb->mdl[i].in_use &&
(p_mcb->mdl[i].dch_state == BTA_HL_DCH_OPEN_ST))
{
found = TRUE;
@@ -910,14 +910,14 @@ BOOLEAN bta_hl_find_an_active_mdl_idx(UINT8 app_idx, UINT8 mcl_idx,
/*******************************************************************************
**
-** Function bta_hl_find_dch_setup_mdl_idx
+** Function bta_hl_find_dch_setup_mdl_idx
**
** Description This function finds a MDL which in the DCH setup state
-**
-** Returns BOOLEAN TRUE-found
+**
+** Returns BOOLEAN TRUE-found
**
*******************************************************************************/
-BOOLEAN bta_hl_find_dch_setup_mdl_idx(UINT8 app_idx, UINT8 mcl_idx,
+BOOLEAN bta_hl_find_dch_setup_mdl_idx(UINT8 app_idx, UINT8 mcl_idx,
UINT8 *p_mdl_idx)
{
tBTA_HL_MCL_CB *p_mcb = BTA_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
@@ -926,7 +926,7 @@ BOOLEAN bta_hl_find_dch_setup_mdl_idx(UINT8 app_idx, UINT8 mcl_idx,
for (i=0; i < BTA_HL_NUM_MDLS_PER_MCL ; i ++)
{
- if (p_mcb->mdl[i].in_use &&
+ if (p_mcb->mdl[i].in_use &&
(p_mcb->mdl[i].dch_state == BTA_HL_DCH_OPENING_ST))
{
found = TRUE;
@@ -948,14 +948,14 @@ BOOLEAN bta_hl_find_dch_setup_mdl_idx(UINT8 app_idx, UINT8 mcl_idx,
/*******************************************************************************
**
-** Function bta_hl_find_an_in_use_mcl_idx
+** Function bta_hl_find_an_in_use_mcl_idx
**
** Description This function finds an in-use MCL control block index
-**
-** Returns BOOLEAN TRUE-found
+**
+** Returns BOOLEAN TRUE-found
**
*******************************************************************************/
-BOOLEAN bta_hl_find_an_in_use_mcl_idx(UINT8 app_idx,
+BOOLEAN bta_hl_find_an_in_use_mcl_idx(UINT8 app_idx,
UINT8 *p_mcl_idx)
{
tBTA_HL_MCL_CB *p_mcb;
@@ -965,7 +965,7 @@ BOOLEAN bta_hl_find_an_in_use_mcl_idx(UINT8 app_idx,
for (i=0; i < BTA_HL_NUM_MCLS ; i ++)
{
p_mcb = BTA_HL_GET_MCL_CB_PTR(app_idx, i);
- if (p_mcb->in_use &&
+ if (p_mcb->in_use &&
(p_mcb->cch_state != BTA_HL_CCH_IDLE_ST))
{
found = TRUE;
@@ -988,11 +988,11 @@ BOOLEAN bta_hl_find_an_in_use_mcl_idx(UINT8 app_idx,
/*******************************************************************************
**
-** Function bta_hl_find_an_in_use_app_idx
+** Function bta_hl_find_an_in_use_app_idx
**
** Description This function finds an in-use application control block index
-**
-** Returns BOOLEAN TRUE-found
+**
+** Returns BOOLEAN TRUE-found
**
*******************************************************************************/
BOOLEAN bta_hl_find_an_in_use_app_idx(UINT8 *p_app_idx)
@@ -1024,12 +1024,12 @@ BOOLEAN bta_hl_find_an_in_use_app_idx(UINT8 *p_app_idx)
}
/*******************************************************************************
**
-** Function bta_hl_find_app_idx
+** Function bta_hl_find_app_idx
**
** Description This function finds the application control block index based on
** the application ID
-**
-** Returns BOOLEAN TRUE-found
+**
+** Returns BOOLEAN TRUE-found
**
*******************************************************************************/
BOOLEAN bta_hl_find_app_idx(UINT8 app_id, UINT8 *p_app_idx)
@@ -1039,7 +1039,7 @@ BOOLEAN bta_hl_find_app_idx(UINT8 app_id, UINT8 *p_app_idx)
for (i=0; i < BTA_HL_NUM_APPS ; i ++)
{
- if (bta_hl_cb.acb[i].in_use &&
+ if (bta_hl_cb.acb[i].in_use &&
(bta_hl_cb.acb[i].app_id == app_id))
{
found = TRUE;
@@ -1059,15 +1059,15 @@ BOOLEAN bta_hl_find_app_idx(UINT8 app_id, UINT8 *p_app_idx)
/*******************************************************************************
**
-** Function bta_hl_find_app_idx_using_handle
+** Function bta_hl_find_app_idx_using_handle
**
** Description This function finds the application control block index based on
** the application handle
-**
-** Returns BOOLEAN TRUE-found
+**
+** Returns BOOLEAN TRUE-found
**
*******************************************************************************/
-BOOLEAN bta_hl_find_app_idx_using_handle(tBTA_HL_APP_HANDLE app_handle,
+BOOLEAN bta_hl_find_app_idx_using_handle(tBTA_HL_APP_HANDLE app_handle,
UINT8 *p_app_idx)
{
BOOLEAN found=FALSE;
@@ -1075,7 +1075,7 @@ BOOLEAN bta_hl_find_app_idx_using_handle(tBTA_HL_APP_HANDLE app_handle,
for (i=0; i < BTA_HL_NUM_APPS ; i ++)
{
- if (bta_hl_cb.acb[i].in_use &&
+ if (bta_hl_cb.acb[i].in_use &&
(bta_hl_cb.acb[i].app_handle == app_handle))
{
found = TRUE;
@@ -1098,15 +1098,15 @@ BOOLEAN bta_hl_find_app_idx_using_handle(tBTA_HL_APP_HANDLE app_handle,
/*******************************************************************************
**
-** Function bta_hl_find_mcl_idx_using_handle
+** Function bta_hl_find_mcl_idx_using_handle
**
** Description This function finds the MCL control block index based on
** the MCL handle
-**
-** Returns BOOLEAN TRUE-found
+**
+** Returns BOOLEAN TRUE-found
**
*******************************************************************************/
-BOOLEAN bta_hl_find_mcl_idx_using_handle( tBTA_HL_MCL_HANDLE mcl_handle,
+BOOLEAN bta_hl_find_mcl_idx_using_handle( tBTA_HL_MCL_HANDLE mcl_handle,
UINT8 *p_app_idx, UINT8 *p_mcl_idx)
{
tBTA_HL_APP_CB *p_acb;
@@ -1143,12 +1143,12 @@ BOOLEAN bta_hl_find_mcl_idx_using_handle( tBTA_HL_MCL_HANDLE mcl_handle,
/*******************************************************************************
**
-** Function bta_hl_find_mcl_idx
+** Function bta_hl_find_mcl_idx
**
** Description This function finds the MCL control block index based on
** the peer BD address
-**
-** Returns BOOLEAN TRUE-found
+**
+** Returns BOOLEAN TRUE-found
**
*******************************************************************************/
BOOLEAN bta_hl_find_mcl_idx(UINT8 app_idx, BD_ADDR p_bd_addr, UINT8 *p_mcl_idx)
@@ -1184,16 +1184,16 @@ BOOLEAN bta_hl_find_mcl_idx(UINT8 app_idx, BD_ADDR p_bd_addr, UINT8 *p_mcl_idx)
/*******************************************************************************
**
-** Function bta_hl_find_mdl_idx_using_handle
+** Function bta_hl_find_mdl_idx_using_handle
**
** Description This function finds the MDL control block index based on
** the MDL handle
-**
-** Returns BOOLEAN TRUE-found
+**
+** Returns BOOLEAN TRUE-found
**
*******************************************************************************/
-BOOLEAN bta_hl_find_mdl_idx_using_handle(tBTA_HL_MDL_HANDLE mdl_handle,
- UINT8 *p_app_idx,UINT8 *p_mcl_idx,
+BOOLEAN bta_hl_find_mdl_idx_using_handle(tBTA_HL_MDL_HANDLE mdl_handle,
+ UINT8 *p_app_idx,UINT8 *p_mcl_idx,
UINT8 *p_mdl_idx)
{
tBTA_HL_APP_CB *p_acb;
@@ -1244,13 +1244,13 @@ BOOLEAN bta_hl_find_mdl_idx_using_handle(tBTA_HL_MDL_HANDLE mdl_handle,
}
/*******************************************************************************
**
-** Function bta_hl_is_the_first_reliable_existed
+** Function bta_hl_is_the_first_reliable_existed
**
** Description This function checks whether the first reliable DCH channel
** has been setup on the MCL or not
**
** Returns BOOLEAN - TRUE exist
-** FALSE does not exist
+** FALSE does not exist
**
*******************************************************************************/
BOOLEAN bta_hl_is_the_first_reliable_existed(UINT8 app_idx, UINT8 mcl_idx )
@@ -1276,16 +1276,16 @@ BOOLEAN bta_hl_is_the_first_reliable_existed(UINT8 app_idx, UINT8 mcl_idx )
/*******************************************************************************
**
-** Function bta_hl_find_non_active_mdl_cfg
+** Function bta_hl_find_non_active_mdl_cfg
**
** Description This function finds a valid MDL configiration index and this
** MDL ID is not active
**
** Returns BOOLEAN - TRUE found
-** FALSE not found
+** FALSE not found
**
*******************************************************************************/
-BOOLEAN bta_hl_find_non_active_mdl_cfg(UINT8 app_idx, UINT8 start_mdl_cfg_idx,
+BOOLEAN bta_hl_find_non_active_mdl_cfg(UINT8 app_idx, UINT8 start_mdl_cfg_idx,
UINT8 *p_mdl_cfg_idx)
{
@@ -1323,7 +1323,7 @@ BOOLEAN bta_hl_find_non_active_mdl_cfg(UINT8 app_idx, UINT8 start_mdl_cfg_idx,
{
break;
}
- }
+ }
if (!mdl_in_use)
{
@@ -1338,15 +1338,15 @@ BOOLEAN bta_hl_find_non_active_mdl_cfg(UINT8 app_idx, UINT8 start_mdl_cfg_idx,
/*******************************************************************************
**
-** Function bta_hl_find_mdl_cfg_idx
+** Function bta_hl_find_mdl_cfg_idx
**
** Description This function finds an available MDL configiration index
**
** Returns BOOLEAN - TRUE found
-** FALSE not found
+** FALSE not found
**
*******************************************************************************/
-BOOLEAN bta_hl_find_avail_mdl_cfg_idx(UINT8 app_idx, UINT8 mcl_idx,
+BOOLEAN bta_hl_find_avail_mdl_cfg_idx(UINT8 app_idx, UINT8 mcl_idx,
UINT8 *p_mdl_cfg_idx)
{
tBTA_HL_MDL_CFG *p_mdl, *p_mdl1, *p_mdl2;
@@ -1370,7 +1370,7 @@ BOOLEAN bta_hl_find_avail_mdl_cfg_idx(UINT8 app_idx, UINT8 mcl_idx,
if (!found)
{
- /* all available mdl cfg spaces are in use so we need to find the mdl cfg which is
+ /* all available mdl cfg spaces are in use so we need to find the mdl cfg which is
not currently in use and has the the oldest time stamp to remove*/
found = TRUE;
@@ -1432,13 +1432,13 @@ BOOLEAN bta_hl_find_avail_mdl_cfg_idx(UINT8 app_idx, UINT8 mcl_idx,
/*******************************************************************************
**
-** Function bta_hl_find_mdl_cfg_idx
+** Function bta_hl_find_mdl_cfg_idx
**
** Description This function finds the MDL configuration index based on
** the MDL ID
-**
+**
** Returns BOOLEAN - TRUE found
-** FALSE not found
+** FALSE not found
**
*******************************************************************************/
BOOLEAN bta_hl_find_mdl_cfg_idx(UINT8 app_idx, UINT8 mcl_idx,
@@ -1476,12 +1476,12 @@ BOOLEAN bta_hl_find_mdl_cfg_idx(UINT8 app_idx, UINT8 mcl_idx,
/*******************************************************************************
**
-** Function bta_hl_get_cur_time
+** Function bta_hl_get_cur_time
+**
+** Description This function get the cuurent time value
**
-** Description This function get the cuurent time value
-**
** Returns BOOLEAN - TRUE found
-** FALSE not found
+** FALSE not found
**
*******************************************************************************/
BOOLEAN bta_hl_get_cur_time(UINT8 app_idx, UINT8 *p_cur_time)
@@ -1534,7 +1534,7 @@ BOOLEAN bta_hl_get_cur_time(UINT8 app_idx, UINT8 *p_cur_time)
#if BTA_HL_DEBUG == TRUE
if (!result)
{
- APPL_TRACE_DEBUG2("bta_hl_get_cur_time result=%s cur_time=%d",
+ APPL_TRACE_DEBUG2("bta_hl_get_cur_time result=%s cur_time=%d",
(result?"OK":"FAIL"), *p_cur_time);
}
#endif
@@ -1544,20 +1544,20 @@ BOOLEAN bta_hl_get_cur_time(UINT8 app_idx, UINT8 *p_cur_time)
/*******************************************************************************
**
-** Function bta_hl_sort_cfg_time_idx
+** Function bta_hl_sort_cfg_time_idx
**
-** Description This function sort the mdl configuration idx stored in array a
-** based on decending time value
+** Description This function sort the mdl configuration idx stored in array a
+** based on decending time value
**
** Returns BOOLEAN - TRUE found
-** FALSE not found
+** FALSE not found
**
*******************************************************************************/
-void bta_hl_sort_cfg_time_idx(UINT8 app_idx, UINT8 *a, UINT8 n)
+void bta_hl_sort_cfg_time_idx(UINT8 app_idx, UINT8 *a, UINT8 n)
{
tBTA_HL_APP_CB *p_acb = BTA_HL_GET_APP_CB_PTR(app_idx);
UINT8 temp_time, temp_idx;
- INT16 i, j;
+ INT16 i, j;
for (i = 1; i < n; ++i)
{
temp_idx = a[i];
@@ -1574,13 +1574,13 @@ void bta_hl_sort_cfg_time_idx(UINT8 app_idx, UINT8 *a, UINT8 n)
/*******************************************************************************
**
-** Function bta_hl_compact_mdl_cfg_time
+** Function bta_hl_compact_mdl_cfg_time
**
** Description This function finds the MDL configuration index based on
** the MDL ID
-**
+**
** Returns BOOLEAN - TRUE found
-** FALSE not found
+** FALSE not found
**
*******************************************************************************/
void bta_hl_compact_mdl_cfg_time(UINT8 app_idx)
@@ -1627,16 +1627,16 @@ void bta_hl_compact_mdl_cfg_time(UINT8 app_idx)
/*******************************************************************************
**
-** Function bta_hl_is_mdl_exsit_in_mcl
+** Function bta_hl_is_mdl_exsit_in_mcl
**
** Description This function checks whether the MDL ID
** has already existed in teh MCL or not
**
** Returns BOOLEAN - TRUE exist
-** FALSE does not exist
+** FALSE does not exist
**
*******************************************************************************/
-BOOLEAN bta_hl_is_mdl_exsit_in_mcl(UINT8 app_idx, BD_ADDR bd_addr,
+BOOLEAN bta_hl_is_mdl_exsit_in_mcl(UINT8 app_idx, BD_ADDR bd_addr,
tBTA_HL_MDL_ID mdl_id)
{
tBTA_HL_MDL_CFG *p_mdl;
@@ -1670,15 +1670,15 @@ BOOLEAN bta_hl_is_mdl_exsit_in_mcl(UINT8 app_idx, BD_ADDR bd_addr,
/*******************************************************************************
**
-** Function bta_hl_delete_mdl_cfg
+** Function bta_hl_delete_mdl_cfg
**
** Description This function delete the specified MDL ID
-**
+**
** Returns BOOLEAN - TRUE Success
-** FALSE Failed
+** FALSE Failed
**
*******************************************************************************/
-BOOLEAN bta_hl_delete_mdl_cfg(UINT8 app_idx, BD_ADDR bd_addr,
+BOOLEAN bta_hl_delete_mdl_cfg(UINT8 app_idx, BD_ADDR bd_addr,
tBTA_HL_MDL_ID mdl_id)
{
tBTA_HL_MDL_CFG *p_mdl;
@@ -1718,16 +1718,16 @@ BOOLEAN bta_hl_delete_mdl_cfg(UINT8 app_idx, BD_ADDR bd_addr,
/*******************************************************************************
**
-** Function bta_hl_is_mdl_value_valid
+** Function bta_hl_is_mdl_value_valid
**
**
** Description This function checks the specified MDL ID is in valid range or not
-**
+**
** Returns BOOLEAN - TRUE Success
-** FALSE Failed
-**
-** note: mdl_id range 0x0000 reserved,
-** 0x0001-oxFEFF dynamic range,
+** FALSE Failed
+**
+** note: mdl_id range 0x0000 reserved,
+** 0x0001-oxFEFF dynamic range,
** 0xFF00-0xFFFE reserved,
** 0xFFFF indicates all MDLs (for delete operation only)
**
@@ -1756,16 +1756,16 @@ BOOLEAN bta_hl_is_mdl_value_valid(tBTA_HL_MDL_ID mdl_id)
/*******************************************************************************
**
-** Function bta_hl_find_mdep_cfg_idx
+** Function bta_hl_find_mdep_cfg_idx
**
** Description This function finds the MDEP configuration index based
** on the local MDEP ID
-**
+**
** Returns BOOLEAN - TRUE found
-** FALSE not found
+** FALSE not found
**
*******************************************************************************/
-BOOLEAN bta_hl_find_mdep_cfg_idx(UINT8 app_idx, tBTA_HL_MDEP_ID local_mdep_id,
+BOOLEAN bta_hl_find_mdep_cfg_idx(UINT8 app_idx, tBTA_HL_MDEP_ID local_mdep_id,
UINT8 *p_mdep_cfg_idx)
{
tBTA_HL_APP_CB *p_acb = BTA_HL_GET_APP_CB_PTR(app_idx);
@@ -1796,15 +1796,15 @@ BOOLEAN bta_hl_find_mdep_cfg_idx(UINT8 app_idx, tBTA_HL_MDEP_ID local_mdep_id,
/*******************************************************************************
**
-** Function bta_hl_find_rxtx_apdu_size
+** Function bta_hl_find_rxtx_apdu_size
**
** Description This function finds the maximum APDU rx and tx sizes based on
** the MDEP configuration data
-**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
-void bta_hl_find_rxtx_apdu_size(UINT8 app_idx, UINT8 mdep_cfg_idx,
+void bta_hl_find_rxtx_apdu_size(UINT8 app_idx, UINT8 mdep_cfg_idx,
UINT16 *p_rx_apu_size,
UINT16 *p_tx_apu_size)
{
@@ -1844,12 +1844,12 @@ void bta_hl_find_rxtx_apdu_size(UINT8 app_idx, UINT8 mdep_cfg_idx,
/*******************************************************************************
**
-** Function bta_hl_validate_peer_cfg
+** Function bta_hl_validate_peer_cfg
**
-** Description This function validates the peer DCH configuration
+** Description This function validates the peer DCH configuration
**
** Returns BOOLEAN - TRUE validation is successful
-** FALSE validation failed
+** FALSE validation failed
**
*******************************************************************************/
BOOLEAN bta_hl_validate_peer_cfg(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx,
@@ -1896,18 +1896,18 @@ BOOLEAN bta_hl_validate_peer_cfg(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx,
/*******************************************************************************
**
-** Function bta_hl_chk_local_cfg
+** Function bta_hl_chk_local_cfg
**
-** Description This function check whether the local DCH configuration is OK or not
+** Description This function check whether the local DCH configuration is OK or not
**
** Returns tBTA_HL_STATUS - OK - local DCH configuration is OK
-** NO_FIRST_RELIABLE - the streaming DCH configuration
-** is not OK and it needs to use
-** reliable DCH configuration
+** NO_FIRST_RELIABLE - the streaming DCH configuration
+** is not OK and it needs to use
+** reliable DCH configuration
**
*******************************************************************************/
tBTA_HL_STATUS bta_hl_chk_local_cfg(UINT8 app_idx, UINT8 mcl_idx,
- UINT8 mdep_cfg_idx,
+ UINT8 mdep_cfg_idx,
tBTA_HL_DCH_CFG local_cfg)
{
tBTA_HL_APP_CB *p_acb = BTA_HL_GET_APP_CB_PTR(app_idx);
@@ -1928,12 +1928,12 @@ tBTA_HL_STATUS bta_hl_chk_local_cfg(UINT8 app_idx, UINT8 mcl_idx,
/*******************************************************************************
**
-** Function bta_hl_validate_reconnect_params
+** Function bta_hl_validate_reconnect_params
**
-** Description This function validates the reconnect parameters
+** Description This function validates the reconnect parameters
**
** Returns BOOLEAN - TRUE validation is successful
-** FALSE validation failed
+** FALSE validation failed
*******************************************************************************/
BOOLEAN bta_hl_validate_reconnect_params(UINT8 app_idx, UINT8 mcl_idx,
tBTA_HL_API_DCH_RECONNECT *p_reconnect,
@@ -2011,10 +2011,10 @@ BOOLEAN bta_hl_validate_reconnect_params(UINT8 app_idx, UINT8 mcl_idx,
/*******************************************************************************
**
-** Function bta_hl_find_avail_mcl_idx
+** Function bta_hl_find_avail_mcl_idx
**
** Returns BOOLEAN - TRUE found
-** FALSE not found
+** FALSE not found
**
*******************************************************************************/
BOOLEAN bta_hl_find_avail_mcl_idx(UINT8 app_idx, UINT8 *p_mcl_idx)
@@ -2046,15 +2046,15 @@ BOOLEAN bta_hl_find_avail_mcl_idx(UINT8 app_idx, UINT8 *p_mcl_idx)
/*******************************************************************************
**
-** Function bta_hl_find_avail_mdl_idx
+** Function bta_hl_find_avail_mdl_idx
**
** Description This function finds an available MDL control block index
**
** Returns BOOLEAN - TRUE found
-** FALSE not found
+** FALSE not found
**
*******************************************************************************/
-BOOLEAN bta_hl_find_avail_mdl_idx(UINT8 app_idx, UINT8 mcl_idx,
+BOOLEAN bta_hl_find_avail_mdl_idx(UINT8 app_idx, UINT8 mcl_idx,
UINT8 *p_mdl_idx)
{
tBTA_HL_MCL_CB *p_mcb = BTA_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
@@ -2084,7 +2084,7 @@ BOOLEAN bta_hl_find_avail_mdl_idx(UINT8 app_idx, UINT8 mcl_idx,
/*******************************************************************************
**
-** Function bta_hl_is_a_duplicate_id
+** Function bta_hl_is_a_duplicate_id
**
** Description This function finds the application has been used or not
**
@@ -2098,7 +2098,7 @@ BOOLEAN bta_hl_is_a_duplicate_id(UINT8 app_id)
for (i=0; i < BTA_HL_NUM_APPS ; i ++)
{
- if (bta_hl_cb.acb[i].in_use &&
+ if (bta_hl_cb.acb[i].in_use &&
(bta_hl_cb.acb[i].app_id == app_id))
{
is_duplicate = TRUE;
@@ -2122,12 +2122,12 @@ BOOLEAN bta_hl_is_a_duplicate_id(UINT8 app_id)
/*******************************************************************************
**
-** Function bta_hl_find_avail_app_idx
+** Function bta_hl_find_avail_app_idx
**
** Description This function finds an available application control block index
**
** Returns BOOLEAN - TRUE found
-** FALSE not found
+** FALSE not found
**
*******************************************************************************/
BOOLEAN bta_hl_find_avail_app_idx(UINT8 *p_idx)
@@ -2157,19 +2157,19 @@ BOOLEAN bta_hl_find_avail_app_idx(UINT8 *p_idx)
/*******************************************************************************
**
-** Function bta_hl_app_registration
+** Function bta_hl_app_registration
**
** Description This function registers an HDP application MCAP and DP
**
** Returns tBTA_HL_STATUS -registration status
-**
+**
*******************************************************************************/
tBTA_HL_STATUS bta_hl_app_registration(UINT8 app_idx)
{
tBTA_HL_STATUS status = BTA_HL_STATUS_OK;
tBTA_HL_APP_CB *p_acb = BTA_HL_GET_APP_CB_PTR(app_idx);
tMCA_REG reg;
- tMCA_CS mca_cs;
+ tMCA_CS mca_cs;
UINT8 i, num_of_mdeps;
@@ -2188,8 +2188,8 @@ tBTA_HL_STATUS bta_hl_app_registration(UINT8 app_idx)
mca_cs.max_mdl = BTA_HL_NUM_MDLS_PER_MDEP;
mca_cs.p_data_cback = bta_hl_mcap_data_cback;
- if (MCA_CreateDep((tMCA_HANDLE)p_acb->app_handle,
- &(p_acb->sup_feature.mdep[0].mdep_id),
+ if (MCA_CreateDep((tMCA_HANDLE)p_acb->app_handle,
+ &(p_acb->sup_feature.mdep[0].mdep_id),
&mca_cs) == MCA_SUCCESS)
{
if (p_acb->sup_feature.mdep[0].mdep_id != BTA_HL_ECHO_TEST_MDEP_ID)
@@ -2217,12 +2217,12 @@ tBTA_HL_STATUS bta_hl_app_registration(UINT8 app_idx)
mca_cs.max_mdl = BTA_HL_NUM_MDLS_PER_MDEP;
mca_cs.p_data_cback = bta_hl_mcap_data_cback;
- if (MCA_CreateDep((tMCA_HANDLE)p_acb->app_handle,
+ if (MCA_CreateDep((tMCA_HANDLE)p_acb->app_handle,
&(p_acb->sup_feature.mdep[i].mdep_id), &mca_cs) == MCA_SUCCESS)
{
- if (bta_hl_co_get_mdep_config(p_acb->app_id,
- i,
- p_acb->sup_feature.mdep[i].mdep_id,
+ if (bta_hl_co_get_mdep_config(p_acb->app_id,
+ i,
+ p_acb->sup_feature.mdep[i].mdep_id,
&p_acb->sup_feature.mdep[i].mdep_cfg))
{
if (p_acb->sup_feature.mdep[i].mdep_cfg.mdep_role == BTA_HL_MDEP_ROLE_SOURCE)
@@ -2258,7 +2258,7 @@ tBTA_HL_STATUS bta_hl_app_registration(UINT8 app_idx)
(p_acb->sup_feature.app_role_mask == BTA_HL_MDEP_ROLE_MASK_SOURCE))
{
/* this is a source only applciation */
- p_acb->sup_feature.advertize_source_sdp =
+ p_acb->sup_feature.advertize_source_sdp =
bta_hl_co_advrtise_source_sdp(p_acb->app_id);
}
@@ -2300,7 +2300,7 @@ tBTA_HL_STATUS bta_hl_app_registration(UINT8 app_idx)
** Description This function discard an HDP event
**
** Returns void
-**
+**
*******************************************************************************/
void bta_hl_discard_data(UINT16 event, tBTA_HL_DATA *p_data)
{
@@ -2332,7 +2332,7 @@ void bta_hl_discard_data(UINT16 event, tBTA_HL_DATA *p_data)
** Description This function saves the MDL configuration
**
** Returns void
-**
+**
*******************************************************************************/
void bta_hl_save_mdl_cfg(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx )
{
@@ -2346,7 +2346,7 @@ void bta_hl_save_mdl_cfg(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx )
tBTA_HL_MDEP *p_mdep_cfg;
tBTA_HL_L2CAP_CFG_INFO l2cap_cfg;
UINT8 time_val;
- mdl_id = p_dcb->mdl_id;
+ mdl_id = p_dcb->mdl_id;
if (!bta_hl_find_mdl_cfg_idx(app_idx, mcl_idx, mdl_id, &mdl_cfg_idx))
{
if (!bta_hl_find_avail_mdl_cfg_idx(app_idx, mcl_idx, &mdl_cfg_idx))
@@ -2362,19 +2362,19 @@ void bta_hl_save_mdl_cfg(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx )
if (!bta_hl_get_cur_time(app_idx, &time_val ))
{
bta_hl_compact_mdl_cfg_time(app_idx);
- bta_hl_get_cur_time(app_idx, &time_val);
+ bta_hl_get_cur_time(app_idx, &time_val);
}
mdl_cfg.active = TRUE;
mdl_cfg.time = time_val;
- mdl_cfg.mdl_id = p_dcb->mdl_id;
+ mdl_cfg.mdl_id = p_dcb->mdl_id;
mdl_cfg.dch_mode = p_dcb->dch_mode;
- mdl_cfg.mtu = l2cap_cfg.mtu;
- mdl_cfg.fcs = l2cap_cfg.fcs;
+ mdl_cfg.mtu = l2cap_cfg.mtu;
+ mdl_cfg.fcs = l2cap_cfg.fcs;
- bdcpy(mdl_cfg.peer_bd_addr, p_mcb->bd_addr);
- mdl_cfg.local_mdep_id= p_dcb->local_mdep_id;
+ bdcpy(mdl_cfg.peer_bd_addr, p_mcb->bd_addr);
+ mdl_cfg.local_mdep_id= p_dcb->local_mdep_id;
p_mdep_cfg = &p_acb->sup_feature.mdep[p_dcb->local_mdep_cfg_idx];
- mdl_cfg.local_mdep_role= p_mdep_cfg->mdep_cfg.mdep_role;
+ mdl_cfg.local_mdep_role= p_mdep_cfg->mdep_cfg.mdep_role;
memcpy(&p_acb->mdl_cfg[mdl_cfg_idx], &mdl_cfg, sizeof(tBTA_HL_MDL_CFG));
bta_hl_co_save_mdl(p_acb->app_id, mdl_cfg_idx, &mdl_cfg);
}
@@ -2388,8 +2388,8 @@ void bta_hl_save_mdl_cfg(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx )
p_dcb->mtu, l2cap_cfg.mtu);
}
APPL_TRACE_DEBUG1("bta_hl_save_mdl_cfg saved=%d", found);
- APPL_TRACE_DEBUG4("Saved. L2cap cfg mdl_id=%d mtu=%d fcs=%d dch_mode=%d",
- mdl_cfg.mdl_id, mdl_cfg.mtu, mdl_cfg.fcs, mdl_cfg.dch_mode);
+ APPL_TRACE_DEBUG4("Saved. L2cap cfg mdl_id=%d mtu=%d fcs=%d dch_mode=%d",
+ mdl_cfg.mdl_id, mdl_cfg.mtu, mdl_cfg.fcs, mdl_cfg.dch_mode);
}
#endif
@@ -2399,11 +2399,11 @@ void bta_hl_save_mdl_cfg(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx )
/*******************************************************************************
**
-** Function bta_hl_set_dch_chan_cfg
+** Function bta_hl_set_dch_chan_cfg
**
** Description This function setups the L2CAP DCH channel configuration
**
-** Returns void
+** Returns void
*******************************************************************************/
void bta_hl_set_dch_chan_cfg(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx,tBTA_HL_DATA *p_data)
{
@@ -2444,12 +2444,12 @@ void bta_hl_set_dch_chan_cfg(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx,tBTA_HL
p_dcb->chnl_cfg.user_tx_pool_id = bta_hl_set_user_tx_pool_id(p_dcb->max_tx_apdu_size);
p_dcb->chnl_cfg.fcr_rx_pool_id = BTA_HL_L2C_FCR_RX_POOL_ID;
p_dcb->chnl_cfg.fcr_tx_pool_id = BTA_HL_L2C_FCR_TX_POOL_ID;
- p_dcb->chnl_cfg.data_mtu = p_dcb->max_rx_apdu_size;
+ p_dcb->chnl_cfg.data_mtu = p_dcb->max_rx_apdu_size;
p_dcb->chnl_cfg.fcs = BTA_HL_MCA_NO_FCS;
if (local_mdep_cfg_idx != BTA_HL_ECHO_TEST_MDEP_CFG_IDX)
{
- if (p_sup_feature->mdep[local_mdep_cfg_idx].mdep_cfg.mdep_role ==
+ if (p_sup_feature->mdep[local_mdep_cfg_idx].mdep_cfg.mdep_role ==
BTA_HL_MDEP_ROLE_SOURCE)
{
p_dcb->chnl_cfg.fcs = BTA_HL_DEFAULT_SOURCE_FCS;
@@ -2464,18 +2464,18 @@ void bta_hl_set_dch_chan_cfg(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx,tBTA_HL
APPL_TRACE_DEBUG1("L2CAP Params l2cap_mode[3-ERTM 4-STREAM]=%d", l2cap_mode);
APPL_TRACE_DEBUG2("Use FCS =%s mtu=%d", ((p_dcb->chnl_cfg.fcs & 1)?"YES":"NO"),
p_dcb->chnl_cfg.data_mtu);
- APPL_TRACE_DEBUG5("tx_win_sz=%d, max_transmit=%d, rtrans_tout=%d, mon_tout=%d, mps=%d",
- p_dcb->chnl_cfg.fcr_opt.tx_win_sz,
+ APPL_TRACE_DEBUG5("tx_win_sz=%d, max_transmit=%d, rtrans_tout=%d, mon_tout=%d, mps=%d",
+ p_dcb->chnl_cfg.fcr_opt.tx_win_sz,
p_dcb->chnl_cfg.fcr_opt.max_transmit,
- p_dcb->chnl_cfg.fcr_opt.rtrans_tout,
- p_dcb->chnl_cfg.fcr_opt.mon_tout,
- p_dcb->chnl_cfg.fcr_opt.mps);
+ p_dcb->chnl_cfg.fcr_opt.rtrans_tout,
+ p_dcb->chnl_cfg.fcr_opt.mon_tout,
+ p_dcb->chnl_cfg.fcr_opt.mps);
APPL_TRACE_DEBUG4("USER rx_pool_id=%d, tx_pool_id=%d, FCR rx_pool_id=%d, tx_pool_id=%d",
- p_dcb->chnl_cfg.user_rx_pool_id,
- p_dcb->chnl_cfg.user_tx_pool_id,
- p_dcb->chnl_cfg.fcr_rx_pool_id,
- p_dcb->chnl_cfg.fcr_tx_pool_id);
+ p_dcb->chnl_cfg.user_rx_pool_id,
+ p_dcb->chnl_cfg.user_tx_pool_id,
+ p_dcb->chnl_cfg.fcr_rx_pool_id,
+ p_dcb->chnl_cfg.fcr_tx_pool_id);
#endif
@@ -2490,16 +2490,16 @@ void bta_hl_set_dch_chan_cfg(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx,tBTA_HL
/*******************************************************************************
**
-** Function bta_hl_get_l2cap_cfg
+** Function bta_hl_get_l2cap_cfg
**
** Description This function get the current L2CAP channel configuration
**
-** Returns BOOLEAN - TRUE - operation is successful
+** Returns BOOLEAN - TRUE - operation is successful
*******************************************************************************/
BOOLEAN bta_hl_get_l2cap_cfg(tBTA_HL_MDL_HANDLE mdl_hnd, tBTA_HL_L2CAP_CFG_INFO *p_cfg)
{
BOOLEAN success = FALSE;
- UINT16 lcid;
+ UINT16 lcid;
tL2CAP_CFG_INFO *p_our_cfg;
tL2CAP_CH_CFG_BITS our_cfg_bits;
tL2CAP_CFG_INFO *p_peer_cfg;
@@ -2510,7 +2510,7 @@ BOOLEAN bta_hl_get_l2cap_cfg(tBTA_HL_MDL_HANDLE mdl_hnd, tBTA_HL_L2CAP_CFG_INFO
L2CA_GetCurrentConfig(lcid, &p_our_cfg, &our_cfg_bits, &p_peer_cfg,
&peer_cfg_bits))
{
- p_cfg->fcs = BTA_HL_MCA_NO_FCS;
+ p_cfg->fcs = BTA_HL_MCA_NO_FCS;
if (our_cfg_bits & L2CAP_CH_CFG_MASK_FCS)
{
p_cfg->fcs |= p_our_cfg->fcs;
@@ -2557,11 +2557,11 @@ BOOLEAN bta_hl_get_l2cap_cfg(tBTA_HL_MDL_HANDLE mdl_hnd, tBTA_HL_L2CAP_CFG_INFO
/*******************************************************************************
**
-** Function bta_hl_validate_chan_cfg
+** Function bta_hl_validate_chan_cfg
**
** Description This function validates the L2CAP channel configuration
**
-** Returns BOOLEAN - TRUE - validation is successful
+** Returns BOOLEAN - TRUE - validation is successful
*******************************************************************************/
BOOLEAN bta_hl_validate_chan_cfg(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx)
{
@@ -2596,7 +2596,7 @@ BOOLEAN bta_hl_validate_chan_cfg(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx)
{
APPL_TRACE_DEBUG4("bta_hl_validate_chan_cfg success=%d app_idx=%d mcl_idx=%d mdl_idx=%d",success, app_idx, mcl_idx, mdl_idx);
APPL_TRACE_DEBUG3("Cur. L2cap cfg mtu=%d fcs=%d dch_mode=%d", l2cap_cfg.mtu, l2cap_cfg.fcs, p_dcb->dch_mode);
- APPL_TRACE_DEBUG3("From saved: L2cap cfg mtu=%d fcs=%d dch_mode=%d", p_acb->mdl_cfg[mdl_cfg_idx].mtu,
+ APPL_TRACE_DEBUG3("From saved: L2cap cfg mtu=%d fcs=%d dch_mode=%d", p_acb->mdl_cfg[mdl_cfg_idx].mtu,
p_acb->mdl_cfg[mdl_cfg_idx].fcs , p_acb->mdl_cfg[mdl_cfg_idx].dch_mode);
}
#endif
@@ -2607,12 +2607,12 @@ BOOLEAN bta_hl_validate_chan_cfg(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx)
/*******************************************************************************
**
-** Function bta_hl_is_cong_on
+** Function bta_hl_is_cong_on
**
** Description This function checks whether the congestion condition is on or not
**
** Returns BOOLEAN - TRUE DCH is congested
-** FALSE not congested
+** FALSE not congested
**
*******************************************************************************/
BOOLEAN bta_hl_is_cong_on(UINT8 app_id, BD_ADDR bd_addr, tBTA_HL_MDL_ID mdl_id)
@@ -2639,7 +2639,7 @@ BOOLEAN bta_hl_is_cong_on(UINT8 app_id, BD_ADDR bd_addr, tBTA_HL_MDL_ID mdl_id)
/*******************************************************************************
**
-** Function bta_hl_check_cch_close
+** Function bta_hl_check_cch_close
**
** Description This function checks whether there is a pending CCH close request
** or not
@@ -2667,7 +2667,7 @@ void bta_hl_check_cch_close(UINT8 app_idx, UINT8 mcl_idx, tBTA_HL_DATA *p_data,
if (!p_dcb->abort_oper)
{
- p_dcb->abort_oper |= BTA_HL_ABORT_CCH_CLOSE_MASK;
+ p_dcb->abort_oper |= BTA_HL_ABORT_CCH_CLOSE_MASK;
bta_hl_dch_sm_execute(app_idx, mcl_idx, mdl_idx, BTA_HL_DCH_ABORT_EVT, p_data);
}
}
@@ -2728,7 +2728,7 @@ void bta_hl_clean_app(UINT8 app_idx)
/*******************************************************************************
**
-** Function bta_hl_check_deregistration
+** Function bta_hl_check_deregistration
**
** Description This function checks whether there is a pending deregistration
** request or not
@@ -2772,12 +2772,12 @@ void bta_hl_check_deregistration(UINT8 app_idx, tBTA_HL_DATA *p_data )
/*******************************************************************************
**
-** Function bta_hl_check_disable
+** Function bta_hl_check_disable
**
** Description This function checks whether there is a pending disable
** request or not
**
-** Returns void
+** Returns void
**
*******************************************************************************/
void bta_hl_check_disable(tBTA_HL_DATA *p_data )
@@ -2806,7 +2806,7 @@ void bta_hl_check_disable(tBTA_HL_DATA *p_data )
{
/* all apps are deregistered */
bta_sys_deregister(BTA_ID_HL);
- evt_data.disable_cfm.status = BTA_HL_STATUS_OK;
+ evt_data.disable_cfm.status = BTA_HL_STATUS_OK;
if (p_cb->p_ctrl_cback) p_cb->p_ctrl_cback(BTA_HL_CTRL_DISABLE_CFM_EVT, (tBTA_HL_CTRL *) &evt_data);
memset((void *) p_cb, 0, sizeof(tBTA_HL_CB));
}
@@ -2815,15 +2815,15 @@ void bta_hl_check_disable(tBTA_HL_DATA *p_data )
/*******************************************************************************
**
-** Function bta_hl_build_abort_cfm
+** Function bta_hl_build_abort_cfm
**
** Description This function builds the abort confirmation event data
**
-** Returns None
+** Returns None
**
*******************************************************************************/
-void bta_hl_build_abort_cfm(tBTA_HL *p_evt_data,
- tBTA_HL_APP_HANDLE app_handle,
+void bta_hl_build_abort_cfm(tBTA_HL *p_evt_data,
+ tBTA_HL_APP_HANDLE app_handle,
tBTA_HL_MCL_HANDLE mcl_handle,
tBTA_HL_STATUS status)
{
@@ -2837,12 +2837,12 @@ void bta_hl_build_abort_cfm(tBTA_HL *p_evt_data,
** Function bta_hl_build_abort_ind
**
** Description This function builds the abort indication event data
-**
-** Returns None
+**
+** Returns None
**
*******************************************************************************/
-void bta_hl_build_abort_ind(tBTA_HL *p_evt_data,
- tBTA_HL_APP_HANDLE app_handle,
+void bta_hl_build_abort_ind(tBTA_HL *p_evt_data,
+ tBTA_HL_APP_HANDLE app_handle,
tBTA_HL_MCL_HANDLE mcl_handle)
{
p_evt_data->dch_abort_ind.mcl_handle = mcl_handle;
@@ -2850,17 +2850,17 @@ void bta_hl_build_abort_ind(tBTA_HL *p_evt_data,
}
/*******************************************************************************
**
-** Function bta_hl_build_close_cfm
+** Function bta_hl_build_close_cfm
**
** Description This function builds the close confirmation event data
-**
-** Returns None
+**
+** Returns None
**
*******************************************************************************/
-void bta_hl_build_dch_close_cfm(tBTA_HL *p_evt_data,
- tBTA_HL_APP_HANDLE app_handle,
+void bta_hl_build_dch_close_cfm(tBTA_HL *p_evt_data,
+ tBTA_HL_APP_HANDLE app_handle,
tBTA_HL_MCL_HANDLE mcl_handle,
- tBTA_HL_MDL_HANDLE mdl_handle,
+ tBTA_HL_MDL_HANDLE mdl_handle,
tBTA_HL_STATUS status)
{
p_evt_data->dch_close_cfm.status = status;
@@ -2871,15 +2871,15 @@ void bta_hl_build_dch_close_cfm(tBTA_HL *p_evt_data,
/*******************************************************************************
**
-** Function bta_hl_build_dch_close_ind
+** Function bta_hl_build_dch_close_ind
**
** Description This function builds the close indication event data
-**
-** Returns None
+**
+** Returns None
**
*******************************************************************************/
-void bta_hl_build_dch_close_ind(tBTA_HL *p_evt_data,
- tBTA_HL_APP_HANDLE app_handle,
+void bta_hl_build_dch_close_ind(tBTA_HL *p_evt_data,
+ tBTA_HL_APP_HANDLE app_handle,
tBTA_HL_MCL_HANDLE mcl_handle,
tBTA_HL_MDL_HANDLE mdl_handle,
BOOLEAN intentional)
@@ -2892,17 +2892,17 @@ void bta_hl_build_dch_close_ind(tBTA_HL *p_evt_data,
/*******************************************************************************
**
-** Function bta_hl_build_send_data_cfm
+** Function bta_hl_build_send_data_cfm
**
** Description This function builds the send data confirmation event data
-**
-** Returns None
+**
+** Returns None
**
*******************************************************************************/
-void bta_hl_build_send_data_cfm(tBTA_HL *p_evt_data,
- tBTA_HL_APP_HANDLE app_handle,
+void bta_hl_build_send_data_cfm(tBTA_HL *p_evt_data,
+ tBTA_HL_APP_HANDLE app_handle,
tBTA_HL_MCL_HANDLE mcl_handle,
- tBTA_HL_MDL_HANDLE mdl_handle,
+ tBTA_HL_MDL_HANDLE mdl_handle,
tBTA_HL_STATUS status )
{
@@ -2914,15 +2914,15 @@ void bta_hl_build_send_data_cfm(tBTA_HL *p_evt_data,
/*******************************************************************************
**
-** Function bta_hl_build_rcv_data_ind
+** Function bta_hl_build_rcv_data_ind
**
** Description This function builds the received data indication event data
-**
-** Returns None
+**
+** Returns None
**
*******************************************************************************/
-void bta_hl_build_rcv_data_ind(tBTA_HL *p_evt_data,
- tBTA_HL_APP_HANDLE app_handle,
+void bta_hl_build_rcv_data_ind(tBTA_HL *p_evt_data,
+ tBTA_HL_APP_HANDLE app_handle,
tBTA_HL_MCL_HANDLE mcl_handle,
tBTA_HL_MDL_HANDLE mdl_handle)
{
@@ -2934,16 +2934,16 @@ void bta_hl_build_rcv_data_ind(tBTA_HL *p_evt_data,
/*******************************************************************************
**
-** Function bta_hl_build_cch_open_cfm
+** Function bta_hl_build_cch_open_cfm
**
** Description This function builds the CCH open confirmation event data
-**
-** Returns None
+**
+** Returns None
**
*******************************************************************************/
-void bta_hl_build_cch_open_cfm(tBTA_HL *p_evt_data,
- tBTA_HL_APP_HANDLE app_handle,
- tBTA_HL_MCL_HANDLE mcl_handle,
+void bta_hl_build_cch_open_cfm(tBTA_HL *p_evt_data,
+ tBTA_HL_APP_HANDLE app_handle,
+ tBTA_HL_MCL_HANDLE mcl_handle,
BD_ADDR bd_addr,
tBTA_HL_STATUS status )
{
@@ -2956,15 +2956,15 @@ void bta_hl_build_cch_open_cfm(tBTA_HL *p_evt_data,
/*******************************************************************************
**
-** Function bta_hl_build_cch_open_ind
+** Function bta_hl_build_cch_open_ind
**
** Description This function builds the CCH open indication event data
-**
-** Returns None
+**
+** Returns None
**
*******************************************************************************/
-void bta_hl_build_cch_open_ind(tBTA_HL *p_evt_data, tBTA_HL_APP_HANDLE app_handle,
- tBTA_HL_MCL_HANDLE mcl_handle,
+void bta_hl_build_cch_open_ind(tBTA_HL *p_evt_data, tBTA_HL_APP_HANDLE app_handle,
+ tBTA_HL_MCL_HANDLE mcl_handle,
BD_ADDR bd_addr )
{
@@ -2975,11 +2975,11 @@ void bta_hl_build_cch_open_ind(tBTA_HL *p_evt_data, tBTA_HL_APP_HANDLE app_hand
/*******************************************************************************
**
-** Function bta_hl_build_cch_close_cfm
+** Function bta_hl_build_cch_close_cfm
**
** Description This function builds the CCH close confirmation event data
-**
-** Returns None
+**
+** Returns None
**
*******************************************************************************/
void bta_hl_build_cch_close_cfm(tBTA_HL *p_evt_data,
@@ -2995,11 +2995,11 @@ void bta_hl_build_cch_close_cfm(tBTA_HL *p_evt_data,
/*******************************************************************************
**
-** Function bta_hl_build_cch_close_ind
+** Function bta_hl_build_cch_close_ind
**
** Description This function builds the CCH colse indication event data
-**
-** Returns None
+**
+** Returns None
**
*******************************************************************************/
void bta_hl_build_cch_close_ind(tBTA_HL *p_evt_data,
@@ -3014,17 +3014,17 @@ void bta_hl_build_cch_close_ind(tBTA_HL *p_evt_data,
/*******************************************************************************
**
-** Function bta_hl_build_dch_open_cfm
+** Function bta_hl_build_dch_open_cfm
**
** Description This function builds the DCH open confirmation event data
-**
-** Returns None
+**
+** Returns None
**
*******************************************************************************/
void bta_hl_build_dch_open_cfm(tBTA_HL *p_evt_data,
tBTA_HL_APP_HANDLE app_handle,
- tBTA_HL_MCL_HANDLE mcl_handle,
- tBTA_HL_MDL_HANDLE mdl_handle,
+ tBTA_HL_MCL_HANDLE mcl_handle,
+ tBTA_HL_MDL_HANDLE mdl_handle,
tBTA_HL_MDEP_ID local_mdep_id,
tBTA_HL_MDL_ID mdl_id,
tBTA_HL_DCH_MODE dch_mode,
@@ -3047,16 +3047,16 @@ void bta_hl_build_dch_open_cfm(tBTA_HL *p_evt_data,
/*******************************************************************************
**
-** Function bta_hl_build_sdp_query_cfm
+** Function bta_hl_build_sdp_query_cfm
**
** Description This function builds the SDP query indication event data
-**
-** Returns None
+**
+** Returns None
**
*******************************************************************************/
void bta_hl_build_sdp_query_cfm(tBTA_HL *p_evt_data,
- tBTA_HL_APP_HANDLE app_handle,
- BD_ADDR bd_addr,
+ tBTA_HL_APP_HANDLE app_handle,
+ BD_ADDR bd_addr,
tBTA_HL_SDP *p_sdp,
tBTA_HL_STATUS status)
@@ -3070,17 +3070,17 @@ void bta_hl_build_sdp_query_cfm(tBTA_HL *p_evt_data,
/*******************************************************************************
**
-** Function bta_hl_build_delete_mdl_cfm
+** Function bta_hl_build_delete_mdl_cfm
**
** Description This function builds the delete MDL confirmation event data
-**
-** Returns None
+**
+** Returns None
**
*******************************************************************************/
void bta_hl_build_delete_mdl_cfm(tBTA_HL *p_evt_data,
- tBTA_HL_APP_HANDLE app_handle,
- tBTA_HL_MCL_HANDLE mcl_handle,
- tBTA_HL_MDL_ID mdl_id,
+ tBTA_HL_APP_HANDLE app_handle,
+ tBTA_HL_MCL_HANDLE mcl_handle,
+ tBTA_HL_MDL_ID mdl_id,
tBTA_HL_STATUS status)
{
@@ -3092,16 +3092,16 @@ void bta_hl_build_delete_mdl_cfm(tBTA_HL *p_evt_data,
/*******************************************************************************
**
-** Function bta_hl_build_echo_test_cfm
+** Function bta_hl_build_echo_test_cfm
**
** Description This function builds the echo test confirmation event data
-**
-** Returns None
+**
+** Returns None
**
*******************************************************************************/
-void bta_hl_build_echo_test_cfm(tBTA_HL *p_evt_data,
- tBTA_HL_APP_HANDLE app_handle,
- tBTA_HL_MCL_HANDLE mcl_handle,
+void bta_hl_build_echo_test_cfm(tBTA_HL *p_evt_data,
+ tBTA_HL_APP_HANDLE app_handle,
+ tBTA_HL_MCL_HANDLE mcl_handle,
tBTA_HL_STATUS status )
{
p_evt_data->echo_test_cfm.mcl_handle = mcl_handle;
@@ -3113,7 +3113,7 @@ void bta_hl_build_echo_test_cfm(tBTA_HL *p_evt_data,
/*****************************************************************************
** Debug Functions
*****************************************************************************/
-#if (BTA_HL_DEBUG == TRUE)
+#if (BTA_HL_DEBUG == TRUE)
/*******************************************************************************
**
@@ -3187,7 +3187,7 @@ char *bta_hl_status_code(tBTA_HL_STATUS status)
**
** Function bta_hl_evt_code
**
-** Description Maps HL event code to the corresponding event string
+** Description Maps HL event code to the corresponding event string
**
** Returns string pointer for the associated event name
**
diff --git a/bta/include/bd.h b/bta/include/bd.h
index 0fd0cf8..272bb34 100644
--- a/bta/include/bd.h
+++ b/bta/include/bd.h
@@ -38,9 +38,9 @@ extern const BD_ADDR bd_addr_null;
** Function bdcpy
**
** Description Copy bd addr b to a.
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
extern void bdcpy(BD_ADDR a, const BD_ADDR b);
@@ -50,7 +50,7 @@ extern void bdcpy(BD_ADDR a, const BD_ADDR b);
** Function bdcmp
**
** Description Compare bd addr b to a.
-**
+**
**
** Returns Zero if b==a, nonzero otherwise (like memcmp).
**
@@ -62,7 +62,7 @@ extern int bdcmp(const BD_ADDR a, const BD_ADDR b);
** Function bdcmpany
**
** Description Compare bd addr to "any" bd addr.
-**
+**
**
** Returns Zero if a equals bd_addr_any.
**
@@ -74,7 +74,7 @@ extern int bdcmpany(const BD_ADDR a);
** Function bdsetany
**
** Description Set bd addr to "any" bd addr.
-**
+**
**
** Returns void
**
diff --git a/bta/include/bta_ag_api.h b/bta/include/bta_ag_api.h
index 32473ed..19321fe 100644
--- a/bta/include/bta_ag_api.h
+++ b/bta/include/bta_ag_api.h
@@ -66,7 +66,7 @@ typedef UINT8 tBTA_AG_STATUS;
#define BTA_AG_IND_RES 5 /* Update an indicator value */
#define BTA_AG_BVRA_RES 6 /* Update voice recognition state */
#define BTA_AG_CNUM_RES 7 /* Send subscriber number response for AT+CNUM */
-#define BTA_AG_BTRH_RES 8 /* Send CCAP incoming call hold */
+#define BTA_AG_BTRH_RES 8 /* Send CCAP incoming call hold */
#define BTA_AG_CLCC_RES 9 /* Query list of calls */
#define BTA_AG_COPS_RES 10 /* Read network operator */
#define BTA_AG_IN_CALL_RES 11 /* Indicate incoming phone call */
@@ -357,7 +357,7 @@ extern "C"
**
** Function BTA_AgEnable
**
-** Description Enable the audio gateway service. When the enable
+** Description Enable the audio gateway service. When the enable
** operation is complete the callback function will be
** called with a BTA_AG_ENABLE_EVT. This function must
** be called before other function in the AG API are
@@ -373,7 +373,7 @@ BTA_API tBTA_STATUS BTA_AgEnable(tBTA_AG_PARSE_MODE parse_mode, tBTA_AG_CBACK *p
** Function BTA_AgDisable
**
** Description Disable the audio gateway service
-**
+**
**
** Returns void
**
@@ -398,7 +398,7 @@ BTA_API void BTA_AgRegister(tBTA_SERVICE_MASK services, tBTA_SEC sec_mask,
** Function BTA_AgDeregister
**
** Description Deregister an audio gateway service.
-**
+**
**
** Returns void
**
@@ -413,7 +413,7 @@ BTA_API void BTA_AgDeregister(UINT16 handle);
** When connection is open callback function is called
** with a BTA_AG_OPEN_EVT. Only the data connection is
** opened. The audio connection is not opened.
-**
+**
**
** Returns void
**
@@ -426,7 +426,7 @@ BTA_API void BTA_AgOpen(UINT16 handle, BD_ADDR bd_addr, tBTA_SEC sec_mask, tBTA_
**
** Description Close the current connection to a headset or a handsfree
** Any current audio connection will also be closed
-**
+**
**
** Returns void
**
@@ -439,7 +439,7 @@ BTA_API void BTA_AgClose(UINT16 handle);
**
** Description Opens an audio connection to the currently connected
** headset or hnadsfree
-**
+**
**
** Returns void
**
@@ -452,7 +452,7 @@ BTA_API void BTA_AgAudioOpen(UINT16 handle);
**
** Description Close the currently active audio connection to a headset
** or hnadsfree. The data connection remains open
-**
+**
**
** Returns void
**
@@ -464,7 +464,7 @@ BTA_API void BTA_AgAudioClose(UINT16 handle);
** Function BTA_AgResult
**
** Description Send an AT result code to a headset or hands-free device.
-** This function is only used when the AG parse mode is set
+** This function is only used when the AG parse mode is set
** to BTA_AG_PARSE.
**
**
@@ -477,9 +477,9 @@ BTA_API void BTA_AgResult(UINT16 handle, tBTA_AG_RES result, tBTA_AG_RES_DATA *p
**
** Function BTA_AgSetCodec
**
-** Description Specify the codec type to be used for the subsequent
-** audio connection.
-**
+** Description Specify the codec type to be used for the subsequent
+** audio connection.
+**
**
**
** Returns void
diff --git a/bta/include/bta_ag_ci.h b/bta/include/bta_ag_ci.h
index 5fc5a61..b41a3bc 100644
--- a/bta/include/bta_ag_ci.h
+++ b/bta/include/bta_ag_ci.h
@@ -26,11 +26,11 @@ extern "C"
**
** Function bta_ag_ci_rx_write
**
-** Description This function is called to send data to the AG when the AG
+** Description This function is called to send data to the AG when the AG
** is configured for AT command pass-through. The function
-** copies data to an event buffer and sends it.
+** copies data to an event buffer and sends it.
**
-** Returns void
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_ag_ci_rx_write(UINT16 handle, char *p_data, UINT16 len);
@@ -39,11 +39,11 @@ BTA_API extern void bta_ag_ci_rx_write(UINT16 handle, char *p_data, UINT16 len);
**
** Function bta_ag_ci_slc_ready
**
-** Description This function is called to notify AG that SLC is up at
+** Description This function is called to notify AG that SLC is up at
** the application. This funcion is only used when the app
** is running in pass-through mode.
**
-** Returns void
+** Returns void
**
******************************************************************************/
BTA_API extern void bta_ag_ci_slc_ready(UINT16 handle);
@@ -56,7 +56,7 @@ BTA_API extern void bta_ag_ci_slc_ready(UINT16 handle);
** Description This function is called to notify AG that a WBS command is
** received
**
-** Returns void
+** Returns void
**
******************************************************************************/
BTA_API extern void bta_ag_ci_wbs_command (UINT16 handle, char *p_data, UINT16 len);
diff --git a/bta/include/bta_ag_co.h b/bta/include/bta_ag_co.h
index 81927aa..48a463a 100644
--- a/bta/include/bta_ag_co.h
+++ b/bta/include/bta_ag_co.h
@@ -27,8 +27,8 @@
** Description This callout function is executed by AG when it is
** started by calling BTA_AgEnable(). This function can be
** used by the phone to initialize audio paths or for other
-** initialization purposes.
-**
+** initialization purposes.
+**
**
** Returns Void.
**
@@ -41,7 +41,7 @@ BTA_API extern void bta_ag_co_init(void);
**
** Description This function is called by the AG before the audio connection
** is brought up, after it comes up, and after it goes down.
-**
+**
** Parameters handle - handle of the AG instance
** state - Audio state
** BTA_AG_CO_AUD_STATE_OFF - Audio has been turned off
@@ -62,7 +62,7 @@ BTA_API extern void bta_ag_co_audio_state(UINT16 handle, UINT8 app_id, UINT8 sta
** is opened. The phone can use this function to set
** up data paths or perform any required initialization or
** set up particular to the connected service.
-**
+**
**
** Returns void
**
@@ -75,7 +75,7 @@ BTA_API extern void bta_ag_co_data_open(UINT16 handle, tBTA_SERVICE_ID service);
**
** Description This function is called by AG when a service level
** connection is closed
-**
+**
**
** Returns void
**
@@ -86,10 +86,10 @@ BTA_API extern void bta_ag_co_data_close(UINT16 handle);
**
** Function bta_ag_co_tx_write
**
-** Description This function is called by the AG to send data to the
+** Description This function is called by the AG to send data to the
** phone when the AG is configured for AT command pass-through.
-** The implementation of this function must copy the data to
-** the phone’s memory.
+** The implementation of this function must copy the data to
+** the phone’s memory.
**
** Returns void
**
diff --git a/bta/include/bta_api.h b/bta/include/bta_api.h
index b8a4f50..39488bf 100644
--- a/bta/include/bta_api.h
+++ b/bta/include/bta_api.h
@@ -2,7 +2,7 @@
**
** Name: bta_api.h
**
-** Description: This is the public interface file for BTA, Widcomm's
+** Description: This is the public interface file for BTA, Widcomm's
** Bluetooth application layer for mobile phones.
**
** Copyright (c) 2003-2010, Broadcom Corp., All Rights Reserved.
@@ -11,7 +11,7 @@
*****************************************************************************/
#ifndef BTA_API_H
#define BTA_API_H
-
+
#include "data_types.h"
#include "bt_target.h"
#include "bt_types.h"
@@ -37,10 +37,10 @@
typedef UINT8 tBTA_STATUS;
/*
- * Service ID
+ * Service ID
*
- * NOTES: When you add a new Service ID for BTA AND require to change the value of BTA_MAX_SERVICE_ID,
- * make sure that the correct security ID of the new service from Security service definitions (btm_api.h)
+ * NOTES: When you add a new Service ID for BTA AND require to change the value of BTA_MAX_SERVICE_ID,
+ * make sure that the correct security ID of the new service from Security service definitions (btm_api.h)
* should be added to bta_service_id_to_btm_srv_id_lkup_tbl table in bta_dm_act.c.
*/
@@ -195,8 +195,8 @@ typedef UINT16 tBTA_DM_CONN;
#define BTA_DM_LIMITED_INQUIRY BTM_LIMITED_INQUIRY /* Perform limited inquiry. */
#if ((defined BLE_INCLUDED) && (BLE_INCLUDED == TRUE))
-#define BTA_BLE_INQUIRY_NONE BTM_BLE_INQUIRY_NONE
-#define BTA_BLE_GENERAL_INQUIRY BTM_BLE_GENERAL_INQUIRY /* Perform LE general inquiry. */
+#define BTA_BLE_INQUIRY_NONE BTM_BLE_INQUIRY_NONE
+#define BTA_BLE_GENERAL_INQUIRY BTM_BLE_GENERAL_INQUIRY /* Perform LE general inquiry. */
#define BTA_BLE_LIMITED_INQUIRY BTM_BLE_LIMITED_INQUIRY /* Perform LE limited inquiry. */
#endif
typedef UINT8 tBTA_DM_INQ_MODE;
@@ -211,7 +211,7 @@ typedef UINT8 tBTA_DM_INQ_FILT;
/* Authorize Response */
#define BTA_DM_AUTH_PERM 0 /* Authorized for future connections to the service */
#define BTA_DM_AUTH_TEMP 1 /* Authorized for current connection only */
-#define BTA_DM_NOT_AUTH 2 /* Not authorized for the service */
+#define BTA_DM_NOT_AUTH 2 /* Not authorized for the service */
typedef UINT8 tBTA_AUTH_RESP;
@@ -225,7 +225,7 @@ typedef UINT8 tBTA_PREF_ROLES;
enum
{
- BTA_DM_NO_SCATTERNET, /* Device doesn't support scatternet, it might
+ BTA_DM_NO_SCATTERNET, /* Device doesn't support scatternet, it might
support "role switch during connection" for
an incoming connection, when it already has
another connection in master role */
@@ -239,7 +239,7 @@ enum
/* Inquiry filter device class condition */
-typedef struct
+typedef struct
{
DEV_CLASS dev_class; /* device class of interest */
DEV_CLASS dev_class_mask; /* mask to determine the bits of device class of interest */
@@ -282,23 +282,23 @@ typedef struct
#if BLE_INCLUDED == TRUE
/* ADV data flag bit definition used for BTM_BLE_AD_TYPE_FLAG */
-#define BTA_BLE_LIMIT_DISC_FLAG BTM_BLE_LIMIT_DISC_FLAG
-#define BTA_BLE_GEN_DISC_FLAG BTM_BLE_GEN_DISC_FLAG
-#define BTA_BLE_BREDR_NOT_SPT BTM_BLE_BREDR_NOT_SPT
-#define BTA_BLE_NON_LIMIT_DISC_FLAG BTM_BLE_NON_LIMIT_DISC_FLAG
-#define BTA_BLE_ADV_FLAG_MASK BTM_BLE_ADV_FLAG_MASK
-#define BTA_BLE_LIMIT_DISC_MASK BTM_BLE_LIMIT_DISC_MASK
-
-#define BTA_BLE_AD_BIT_DEV_NAME BTM_BLE_AD_BIT_DEV_NAME
-#define BTA_BLE_AD_BIT_FLAGS BTM_BLE_AD_BIT_FLAGS
-#define BTA_BLE_AD_BIT_MANU BTM_BLE_AD_BIT_MANU
-#define BTA_BLE_AD_BIT_TX_PWR BTM_BLE_AD_BIT_TX_PWR
-#define BTA_BLE_AD_BIT_ATTR BTM_BLE_AD_BIT_ATTR
-#define BTA_BLE_AD_BIT_INT_RANGE BTM_BLE_AD_BIT_INT_RANGE
-#define BTA_BLE_AD_BIT_SERVICE BTM_BLE_AD_BIT_SERVICE
-#define BTA_BLE_AD_BIT_SERVICE_SOL BTM_BLE_AD_BIT_SERVICE_SOL
-#define BTA_BLE_AD_BIT_SERVICE_DATA BTM_BLE_AD_BIT_SERVICE_DATA
-#define BTA_BLE_AD_BIT_SIGN_DATA BTM_BLE_AD_BIT_SIGN_DATA
+#define BTA_BLE_LIMIT_DISC_FLAG BTM_BLE_LIMIT_DISC_FLAG
+#define BTA_BLE_GEN_DISC_FLAG BTM_BLE_GEN_DISC_FLAG
+#define BTA_BLE_BREDR_NOT_SPT BTM_BLE_BREDR_NOT_SPT
+#define BTA_BLE_NON_LIMIT_DISC_FLAG BTM_BLE_NON_LIMIT_DISC_FLAG
+#define BTA_BLE_ADV_FLAG_MASK BTM_BLE_ADV_FLAG_MASK
+#define BTA_BLE_LIMIT_DISC_MASK BTM_BLE_LIMIT_DISC_MASK
+
+#define BTA_BLE_AD_BIT_DEV_NAME BTM_BLE_AD_BIT_DEV_NAME
+#define BTA_BLE_AD_BIT_FLAGS BTM_BLE_AD_BIT_FLAGS
+#define BTA_BLE_AD_BIT_MANU BTM_BLE_AD_BIT_MANU
+#define BTA_BLE_AD_BIT_TX_PWR BTM_BLE_AD_BIT_TX_PWR
+#define BTA_BLE_AD_BIT_ATTR BTM_BLE_AD_BIT_ATTR
+#define BTA_BLE_AD_BIT_INT_RANGE BTM_BLE_AD_BIT_INT_RANGE
+#define BTA_BLE_AD_BIT_SERVICE BTM_BLE_AD_BIT_SERVICE
+#define BTA_BLE_AD_BIT_SERVICE_SOL BTM_BLE_AD_BIT_SERVICE_SOL
+#define BTA_BLE_AD_BIT_SERVICE_DATA BTM_BLE_AD_BIT_SERVICE_DATA
+#define BTA_BLE_AD_BIT_SIGN_DATA BTM_BLE_AD_BIT_SIGN_DATA
typedef UINT16 tBTA_BLE_AD_MASK;
/* slave preferred connection interval range */
@@ -313,7 +313,7 @@ typedef struct
typedef struct
{
UINT8 num_service;
- BOOLEAN list_cmpl;
+ BOOLEAN list_cmpl;
UINT16 *p_uuid;
}tBTA_BLE_SERVICE;
@@ -328,7 +328,7 @@ typedef struct
#define BTA_BLE_NUM_AD_ATTR_MAX BTM_BLE_NUM_AD_ATTR_MAX
/* attribute list contained in adv data */
-typedef struct
+typedef struct
{
UINT8 num_attr;
tBTA_BLE_ATTR attr_list[BTA_BLE_NUM_AD_ATTR_MAX];
@@ -355,7 +355,7 @@ typedef struct
typedef struct
{
UINT8 conn_mode;
- tBTA_BLE_AD_MASK ad_mask; /* mask of the valid adv data field */
+ tBTA_BLE_AD_MASK ad_mask; /* mask of the valid adv data field */
UINT8 flag;
UINT8 tx_power_level;
UINT8 remote_name_len;
@@ -443,15 +443,15 @@ typedef struct
#define BTA_DM_AUTH_SMP_RSP_TIMEOUT (BTA_DM_AUTH_FAIL_BASE + SMP_RSP_TIMEOUT)
/* connection parameter boundary value and dummy value */
-#define BTA_DM_BLE_SCAN_INT_MIN BTM_BLE_SCAN_INT_MIN
-#define BTA_DM_BLE_SCAN_INT_MAX BTM_BLE_SCAN_INT_MAX
-#define BTA_DM_BLE_SCAN_WIN_MIN BTM_BLE_SCAN_WIN_MIN
-#define BTA_DM_BLE_SCAN_WIN_MAX BTM_BLE_SCAN_WIN_MAX
-#define BTA_DM_BLE_CONN_INT_MIN BTM_BLE_CONN_INT_MIN
-#define BTA_DM_BLE_CONN_INT_MAX BTM_BLE_CONN_INT_MAX
-#define BTA_DM_BLE_CONN_LATENCY_MAX BTM_BLE_CONN_LATENCY_MAX
-#define BTA_DM_BLE_CONN_SUP_TOUT_MIN BTM_BLE_CONN_SUP_TOUT_MIN
-#define BTA_DM_BLE_CONN_SUP_TOUT_MAX BTM_BLE_CONN_SUP_TOUT_MAX
+#define BTA_DM_BLE_SCAN_INT_MIN BTM_BLE_SCAN_INT_MIN
+#define BTA_DM_BLE_SCAN_INT_MAX BTM_BLE_SCAN_INT_MAX
+#define BTA_DM_BLE_SCAN_WIN_MIN BTM_BLE_SCAN_WIN_MIN
+#define BTA_DM_BLE_SCAN_WIN_MAX BTM_BLE_SCAN_WIN_MAX
+#define BTA_DM_BLE_CONN_INT_MIN BTM_BLE_CONN_INT_MIN
+#define BTA_DM_BLE_CONN_INT_MAX BTM_BLE_CONN_INT_MAX
+#define BTA_DM_BLE_CONN_LATENCY_MAX BTM_BLE_CONN_LATENCY_MAX
+#define BTA_DM_BLE_CONN_SUP_TOUT_MIN BTM_BLE_CONN_SUP_TOUT_MIN
+#define BTA_DM_BLE_CONN_SUP_TOUT_MAX BTM_BLE_CONN_SUP_TOUT_MAX
#define BTA_DM_BLE_CONN_PARAM_UNDEF BTM_BLE_CONN_PARAM_UNDEF /* use this value when a specific value not to be overwritten */
@@ -489,13 +489,13 @@ typedef struct
BT_OCTET16 dhk;
}tBTA_BLE_LOCAL_ID_KEYS;
-#define BTA_DM_SEC_GRANTED BTA_SUCCESS
+#define BTA_DM_SEC_GRANTED BTA_SUCCESS
#define BTA_DM_SEC_PAIR_NOT_SPT BTA_DM_AUTH_SMP_PAIR_NOT_SUPPORT
#define BTA_DM_SEC_REP_ATTEMPTS BTA_DM_AUTH_SMP_REPEATED_ATTEMPT
typedef UINT8 tBTA_DM_BLE_SEC_GRANT;
-#define BTA_DM_BLE_ONN_NONE BTM_BLE_CONN_NONE
+#define BTA_DM_BLE_ONN_NONE BTM_BLE_CONN_NONE
#define BTA_DM_BLE_CONN_AUTO BTM_BLE_CONN_AUTO
#define BTA_DM_BLE_CONN_SELECTIVE BTM_BLE_CONN_SELECTIVE
typedef UINT8 tBTA_DM_BLE_CONN_TYPE;
@@ -567,7 +567,7 @@ typedef struct
BD_ADDR bd_addr; /* BD address peer device. */
tBTA_SIG_STRENGTH_MASK mask; /* mask for the values that are valid */
tBTA_DM_RSSI_VALUE rssi_value;
- tBTA_DM_LINK_QUALITY_VALUE link_quality_value;
+ tBTA_DM_LINK_QUALITY_VALUE link_quality_value;
} tBTA_DM_SIG_STRENGTH;
@@ -612,7 +612,7 @@ typedef tBTM_LE_AUTH_REQ tBTA_LE_AUTH_REQ; /* combination of the abo
#if BTM_OOB_INCLUDED == TRUE
#define BTA_OOB_UNKNOWN BTM_OOB_UNKNOWN
#endif
-typedef tBTM_OOB_DATA tBTA_OOB_DATA;
+typedef tBTM_OOB_DATA tBTA_OOB_DATA;
/* Structure associated with BTA_DM_SP_CFM_REQ_EVT */
typedef struct
@@ -639,7 +639,7 @@ enum
typedef UINT8 tBTA_SP_KEY_TYPE;
/* Structure associated with BTA_DM_SP_KEYPRESS_EVT */
-typedef struct
+typedef struct
{
BD_ADDR bd_addr; /* peer address */
tBTA_SP_KEY_TYPE notif_type;
@@ -704,7 +704,7 @@ typedef tBTM_VSC_CMPL_CB tBTA_VENDOR_CMPL_CBACK;
#define BTA_DM_DISC_BLE_RES_EVT 3 /* Discovery result for BLE GATT based servoce on a peer device. */
#define BTA_DM_DISC_CMPL_EVT 4 /* Discovery complete. */
#define BTA_DM_DI_DISC_CMPL_EVT 5 /* Discovery complete. */
-#define BTA_DM_SEARCH_CANCEL_CMPL_EVT 6 /* Search cancelled */
+#define BTA_DM_SEARCH_CANCEL_CMPL_EVT 6 /* Search cancelled */
typedef UINT8 tBTA_DM_SEARCH_EVT;
@@ -752,7 +752,7 @@ typedef struct
// btla-specific ++
UINT8 * p_raw_data; /* Raw data for discovery DB */
UINT32 raw_data_size; /* size of raw data */
- tBT_DEVICE_TYPE device_type; /* device type in case it is BLE device */
+ tBT_DEVICE_TYPE device_type; /* device type in case it is BLE device */
UINT32 num_uuids;
UINT8 *p_uuid_list;
// btla-specific --
@@ -787,16 +787,16 @@ typedef void (tBTA_DM_EXEC_CBACK) (void * p_param);
/* Encryption callback*/
typedef void (tBTA_DM_ENCRYPT_CBACK) (BD_ADDR bd_addr, tBTA_STATUS result);
-
+
#if BLE_INCLUDED == TRUE
-#define BTA_DM_BLE_SEC_NONE BTM_BLE_SEC_NONE
-#define BTA_DM_BLE_SEC_ENCRYPT BTM_BLE_SEC_ENCRYPT
-#define BTA_DM_BLE_SEC_NO_MITM BTM_BLE_SEC_ENCRYPT_NO_MITM
-#define BTA_DM_BLE_SEC_MITM BTM_BLE_SEC_ENCRYPT_MITM
-typedef tBTM_BLE_SEC_ACT tBTA_DM_BLE_SEC_ACT;
+#define BTA_DM_BLE_SEC_NONE BTM_BLE_SEC_NONE
+#define BTA_DM_BLE_SEC_ENCRYPT BTM_BLE_SEC_ENCRYPT
+#define BTA_DM_BLE_SEC_NO_MITM BTM_BLE_SEC_ENCRYPT_NO_MITM
+#define BTA_DM_BLE_SEC_MITM BTM_BLE_SEC_ENCRYPT_MITM
+typedef tBTM_BLE_SEC_ACT tBTA_DM_BLE_SEC_ACT;
#else
-typedef UINT8 tBTA_DM_BLE_SEC_ACT;
-#endif
+typedef UINT8 tBTA_DM_BLE_SEC_ACT;
+#endif
/* Maximum service name length */
#define BTA_SERVICE_NAME_LEN 35
@@ -877,7 +877,7 @@ typedef UINT8 tBTA_DM_ROUTE_PATH;
/* Used to set the DI record */
typedef tSDP_DI_RECORD tBTA_DI_RECORD;
/* Used to get the DI record */
-typedef tSDP_DI_GET_RECORD tBTA_DI_GET_RECORD;
+typedef tSDP_DI_GET_RECORD tBTA_DI_GET_RECORD;
/* SDP discovery database */
typedef tSDP_DISCOVERY_DB tBTA_DISCOVERY_DB;
@@ -902,7 +902,7 @@ extern "C"
** typically called at startup or when Bluetooth services
** are required by the phone. This function must be called
** before calling any other API function.
-**
+**
**
** Returns BTA_SUCCESS if successful.
** BTA_FAIL if internal failure.
@@ -917,7 +917,7 @@ BTA_API extern tBTA_STATUS BTA_EnableBluetooth(tBTA_DM_SEC_CBACK *p_cback);
** Description This function disables BTA and the Bluetooth protocol
** stack. It is called when BTA is no longer being used
** by any application in the system.
-**
+**
**
** Returns void
**
@@ -929,9 +929,9 @@ BTA_API extern tBTA_STATUS BTA_DisableBluetooth(void);
** Function BTA_EnableTestMode
**
** Description Enables bluetooth device under test mode
-**
**
-** Returns tBTA_STATUS
+**
+** Returns tBTA_STATUS
**
*******************************************************************************/
BTA_API extern tBTA_STATUS BTA_EnableTestMode(void);
@@ -941,9 +941,9 @@ BTA_API extern tBTA_STATUS BTA_EnableTestMode(void);
** Function BTA_DisableTestMode
**
** Description Disable bluetooth device under test mode
-**
**
-** Returns None
+**
+** Returns None
**
*******************************************************************************/
BTA_API extern void BTA_DisableTestMode(void);
@@ -955,10 +955,10 @@ BTA_API extern void BTA_DisableTestMode(void);
** Description This function tests whether the Bluetooth module is up
** and ready. This is a direct execution function that
** may lock task scheduling on some platforms.
-**
+**
**
** Returns TRUE if the module is ready.
-** FALSE if the module is not ready.
+** FALSE if the module is not ready.
**
*******************************************************************************/
BTA_API extern BOOLEAN BTA_DmIsDeviceUp(void);
@@ -968,7 +968,7 @@ BTA_API extern BOOLEAN BTA_DmIsDeviceUp(void);
** Function BTA_DmSetDeviceName
**
** Description This function sets the Bluetooth name of the local device.
-**
+**
**
** Returns void
**
@@ -979,11 +979,11 @@ BTA_API extern void BTA_DmSetDeviceName(char *p_name);
**
** Function BTA_DmSetVisibility
**
-** Description This function sets the Bluetooth connectable,discoverable,
-** pairable and conn paired only modesmodes of the local device.
+** Description This function sets the Bluetooth connectable,discoverable,
+** pairable and conn paired only modesmodes of the local device.
** This controls whether other Bluetooth devices can find and connect to
** the local device.
-**
+**
**
** Returns void
**
@@ -996,9 +996,9 @@ BTA_API extern void BTA_DmSetVisibility(tBTA_DM_DISC disc_mode, tBTA_DM_CONN con
**
** Description This function sets the parameters for page scan and
** inquiry scan.
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
BTA_API extern void BTA_DmSetScanParam (UINT16 page_scan_interval, UINT16 page_scan_window,
@@ -1014,7 +1014,7 @@ BTA_API extern void BTA_DmSetScanParam (UINT16 page_scan_interval, UINT16 page_s
** In order to use this API, BTM_BYPASS_AMP_AUTO_AFH must be set
** to be TRUE
**
-** Returns void
+** Returns void
**
*******************************************************************************/
BTA_API extern void BTA_DmSetAfhChannels(UINT8 first, UINT8 last);
@@ -1026,9 +1026,9 @@ BTA_API extern void BTA_DmSetAfhChannels(UINT8 first, UINT8 last);
**
** Description This function sends the vendor specific command
** to the controller
-**
**
-** Returns tBTA_STATUS
+**
+** Returns tBTA_STATUS
**
*******************************************************************************/
BTA_API extern tBTA_STATUS BTA_DmVendorSpecificCommand (UINT16 opcode, UINT8 param_len,UINT8 *p_param_buf, tBTA_VENDOR_CMPL_CBACK *p_cback);
@@ -1043,7 +1043,7 @@ BTA_API extern tBTA_STATUS BTA_DmVendorSpecificCommand (UINT16 opcode, UINT8 par
** inquiry it gets the remote name of the device. If
** parameter services is nonzero, service discovery will be
** performed on each device for the services specified.
-**
+**
**
** Returns void
**
@@ -1057,7 +1057,7 @@ BTA_API extern void BTA_DmSearch(tBTA_DM_INQ *p_dm_inq, tBTA_SERVICE_MASK servic
**
** Description This function cancels a search that has been initiated
** by calling BTA_DmSearch().
-**
+**
**
** Returns void
**
@@ -1070,7 +1070,7 @@ BTA_API extern void BTA_DmSearchCancel(void);
**
** Description This function performs service discovery for the services
** of a particular peer device.
-**
+**
**
** Returns void
**
@@ -1085,12 +1085,12 @@ BTA_API extern void BTA_DmDiscover(BD_ADDR bd_addr, tBTA_SERVICE_MASK services,
**
** Description This function performs service discovery for the services
** of a particular peer device.
-**
+**
**
** Returns void
**
*******************************************************************************/
-BTA_API extern void BTA_DmDiscoverUUID(BD_ADDR bd_addr, tSDP_UUID *uuid,
+BTA_API extern void BTA_DmDiscoverUUID(BD_ADDR bd_addr, tSDP_UUID *uuid,
tBTA_DM_SEARCH_CBACK *p_cback, BOOLEAN sdp_search);
/*******************************************************************************
@@ -1103,7 +1103,7 @@ BTA_API extern void BTA_DmDiscoverUUID(BD_ADDR bd_addr, tSDP_UUID *uuid,
** BTA_FAILURE if cached name is not available
**
*******************************************************************************/
-tBTA_STATUS BTA_DmGetCachedRemoteName(BD_ADDR remote_device, UINT8 **pp_cached_name);
+tBTA_STATUS BTA_DmGetCachedRemoteName(BD_ADDR remote_device, UINT8 **pp_cached_name);
// btla-specific --
/*******************************************************************************
@@ -1126,7 +1126,7 @@ BTA_API extern BOOLEAN BTA_DmIsMaster(BD_ADDR bd_addr);
** Description This function initiates a bonding procedure with a peer
** device. The bonding procedure enables authentication
** and optionally encryption on the Bluetooth link.
-**
+**
**
** Returns void
**
@@ -1139,7 +1139,7 @@ BTA_API extern void BTA_DmBond(BD_ADDR bd_addr);
**
** Description This function cancels a bonding procedure with a peer
** device.
-**
+**
**
** Returns void
**
@@ -1154,7 +1154,7 @@ BTA_API extern void BTA_DmBondCancel(BD_ADDR bd_addr);
** during a bonding procedure. The application should call
** this function after the security callback is called with
** a BTA_DM_PIN_REQ_EVT.
-**
+**
**
** Returns void
**
@@ -1185,7 +1185,7 @@ BTA_API extern void BTA_DmLinkPolicy(BD_ADDR bd_addr, tBTA_DM_LP_MASK policy_mas
** Description This function retrieves the OOB data from local controller.
** The result is reported by bta_dm_co_loc_oob().
**
-** Returns void
+** Returns void
**
*******************************************************************************/
BTA_API extern void BTA_DmLocalOob(void);
@@ -1198,7 +1198,7 @@ BTA_API extern void BTA_DmLocalOob(void);
** Description This function accepts or rejects the numerical value of the
** Simple Pairing process on BTA_DM_SP_CFM_REQ_EVT
**
-** Returns void
+** Returns void
**
*******************************************************************************/
BTA_API extern void BTA_DmConfirm(BD_ADDR bd_addr, BOOLEAN accept);
@@ -1210,7 +1210,7 @@ BTA_API extern void BTA_DmConfirm(BD_ADDR bd_addr, BOOLEAN accept);
** Description This function is called to cancel the simple pairing process
** reported by BTA_DM_SP_KEY_NOTIF_EVT
**
-** Returns void
+** Returns void
**
*******************************************************************************/
BTA_API extern void BTA_DmPasskeyCancel(BD_ADDR bd_addr);
@@ -1241,7 +1241,7 @@ BTA_API extern void BTA_DmAddDevice(BD_ADDR bd_addr, DEV_CLASS dev_class,
** which added bd_name and features as input parameters.
**
**
-** Returns void
+** Returns void
**
*******************************************************************************/
BTA_API extern void BTA_DmAddDevWithName (BD_ADDR bd_addr, DEV_CLASS dev_class,
@@ -1256,7 +1256,7 @@ BTA_API extern void BTA_DmAddDevWithName (BD_ADDR bd_addr, DEV_CLASS dev_class,
** Description This function removes a device from the security database.
** This is a direct execution function that may lock task
** scheduling on some platforms.
-**
+**
**
** Returns BTA_SUCCESS if successful.
** BTA_FAIL if operation failed.
@@ -1272,7 +1272,7 @@ BTA_API extern tBTA_STATUS BTA_DmRemoveDevice(BD_ADDR bd_addr);
** authorization is requested by BTA. The application calls
** this function after the security callback is called with
** a BTA_DM_AUTHORIZE_EVT.
-**
+**
**
** Returns void
**
@@ -1284,11 +1284,11 @@ BTA_API extern void BTA_DmAuthorizeReply(BD_ADDR bd_addr, tBTA_SERVICE_ID servic
**
** Function BTA_DmSignalStrength
**
-** Description This function initiates RSSI and channnel quality
+** Description This function initiates RSSI and channnel quality
** measurments. BTA_DM_SIG_STRENGTH_EVT is sent to
** application with the values of RSSI and channel
** quality
-**
+**
**
** Returns void
**
@@ -1299,8 +1299,8 @@ BTA_API extern void BTA_DmSignalStrength(tBTA_SIG_STRENGTH_MASK mask, UINT16 per
**
** Function BTA_DmWriteInqTxPower
**
-** Description This command is used to write the inquiry transmit power level
-** used to transmit the inquiry (ID) data packets.
+** Description This command is used to write the inquiry transmit power level
+** used to transmit the inquiry (ID) data packets.
**
** Parameters tx_power - tx inquiry power to use, valid value is -70 ~ 20
@@ -1317,7 +1317,7 @@ BTA_API extern void BTA_DmWriteInqTxPower(INT8 tx_power);
**
** Parameters tBT_UUID - UUID
**
-** Returns None
+** Returns None
**
*******************************************************************************/
BTA_API extern void BTA_DmEirAddUUID (tBT_UUID *p_uuid);
@@ -1330,7 +1330,7 @@ BTA_API extern void BTA_DmEirAddUUID (tBT_UUID *p_uuid);
**
** Parameters tBT_UUID - UUID
**
-** Returns None
+** Returns None
**
*******************************************************************************/
BTA_API extern void BTA_DmEirRemoveUUID (tBT_UUID *p_uuid);
@@ -1345,7 +1345,7 @@ BTA_API extern void BTA_DmEirRemoveUUID (tBT_UUID *p_uuid);
**
** Parameters Pointer to User defined EIR config
**
-** Returns None
+** Returns None
**
*******************************************************************************/
BTA_API extern void BTA_DmSetEIRConfig (tBTA_DM_EIR_CONF *p_eir_cfg);
@@ -1360,7 +1360,7 @@ BTA_API extern void BTA_DmSetEIRConfig (tBTA_DM_EIR_CONF *p_eir_cfg);
** type - finding EIR data type
** p_length - return the length of EIR data
**
-** Returns pointer of EIR data
+** Returns pointer of EIR data
**
*******************************************************************************/
BTA_API extern UINT8 *BTA_CheckEirData( UINT8 *p_eir, UINT8 tag, UINT8 *p_length );
@@ -1374,7 +1374,7 @@ BTA_API extern UINT8 *BTA_CheckEirData( UINT8 *p_eir, UINT8 tag, UINT8 *p_length
** Parameters p_eir - pointer of EIR significant part
** p_services - return the BTA service mask
**
-** Returns None
+** Returns None
**
*******************************************************************************/
BTA_API extern void BTA_GetEirService( UINT8 *p_eir, tBTA_SERVICE_MASK *p_services );
@@ -1401,21 +1401,21 @@ BTA_API extern BOOLEAN BTA_DmUseSsr( BD_ADDR bd_addr );
** Returns BTA_SUCCESS if record set sucessfully, otherwise error code.
**
*******************************************************************************/
-BTA_API extern tBTA_STATUS BTA_DmSetLocalDiRecord( tBTA_DI_RECORD *p_device_info,
+BTA_API extern tBTA_STATUS BTA_DmSetLocalDiRecord( tBTA_DI_RECORD *p_device_info,
UINT32 *p_handle );
/*******************************************************************************
**
** Function BTA_DmGetLocalDiRecord
**
-** Description Get a specified DI record to the local SDP database. If no
-** record handle is provided, the primary DI record will be
-** returned.
+** Description Get a specified DI record to the local SDP database. If no
+** record handle is provided, the primary DI record will be
+** returned.
**
** Returns BTA_SUCCESS if record set sucessfully, otherwise error code.
**
*******************************************************************************/
-BTA_API extern tBTA_STATUS BTA_DmGetLocalDiRecord( tBTA_DI_GET_RECORD *p_device_info,
+BTA_API extern tBTA_STATUS BTA_DmGetLocalDiRecord( tBTA_DI_GET_RECORD *p_device_info,
UINT32 *p_handle );
/*******************************************************************************
@@ -1462,7 +1462,7 @@ BTA_API extern void BTA_SysFeatures (UINT16 sys_features);
** This API was named in lower case because it is only intended
** for the internal customers(like BTIF).
**
-** Returns void
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_dmexecutecallback (tBTA_DM_EXEC_CBACK* p_callback, void * p_param);
@@ -1474,11 +1474,11 @@ BTA_API extern void bta_dmexecutecallback (tBTA_DM_EXEC_CBACK* p_callback, void
**
** Description initialize the down sample converter.
**
-** src_sps: original samples per second (source audio data)
+** src_sps: original samples per second (source audio data)
** (ex. 44100, 48000)
** bits: number of bits per pcm sample (16)
** n_channels: number of channels (i.e. mono(1), stereo(2)...)
-**
+**
** Returns none
**
*******************************************************************************/
@@ -1495,10 +1495,10 @@ BTA_API extern void BTA_DmPcmInitSamples (UINT32 src_sps, UINT32 bits, UINT32 n_
** in_bytes: Length of the input PCM sample buffer in byte.
** p_dst: pointer to the buffer which is to be used to store
** the converted PCM samples.
-**
+**
**
** Returns INT32: number of samples converted.
-**
+**
**************************************************************************************/
BTA_API extern INT32 BTA_DmPcmResample (void *p_src, UINT32 in_bytes, void *p_dst);
#endif
@@ -1524,11 +1524,11 @@ BTA_API extern void BTA_DmBleSecurityGrant(BD_ADDR bd_addr, tBTA_DM_BLE_SEC_GRAN
/*******************************************************************************
**
** Function BTA_DmBleSetBgConnType
-**
-** Description This function is called to set BLE connectable mode for a
+**
+** Description This function is called to set BLE connectable mode for a
** peripheral device.
**
-** Parameters bg_conn_type: it can be auto connection, or selective connection.
+** Parameters bg_conn_type: it can be auto connection, or selective connection.
** p_select_cback: callback function when selective connection procedure
** is being used.
**
@@ -1545,7 +1545,7 @@ BTA_API extern void BTA_DmBleSetBgConnType(tBTA_DM_BLE_CONN_TYPE bg_conn_type, t
**
** Parameters: bd_addr - BD address of the peer
** accept - passkey entry sucessful or declined.
-** passkey - passkey value, must be a 6 digit number,
+** passkey - passkey value, must be a 6 digit number,
** can be lead by 0.
**
** Returns void
@@ -1568,7 +1568,7 @@ BTA_API extern void BTA_DmBlePasskeyReply(BD_ADDR bd_addr, BOOLEAN accept, UINT3
** Returns void
**
*******************************************************************************/
-BTA_API extern void BTA_DmAddBleDevice(BD_ADDR bd_addr, tBLE_ADDR_TYPE addr_type,
+BTA_API extern void BTA_DmAddBleDevice(BD_ADDR bd_addr, tBLE_ADDR_TYPE addr_type,
tBT_DEVICE_TYPE dev_type);
@@ -1576,8 +1576,8 @@ BTA_API extern void BTA_DmAddBleDevice(BD_ADDR bd_addr, tBLE_ADDR_TYPE addr_type
**
** Function BTA_DmAddBleKey
**
-** Description Add/modify LE device information. This function will be
-** normally called during host startup to restore all required
+** Description Add/modify LE device information. This function will be
+** normally called during host startup to restore all required
** information stored in the NVRAM.
**
** Parameters: bd_addr - BD address of the peer
@@ -1587,14 +1587,14 @@ BTA_API extern void BTA_DmAddBleDevice(BD_ADDR bd_addr, tBLE_ADDR_TYPE addr_type
** Returns void
**
*******************************************************************************/
-BTA_API extern void BTA_DmAddBleKey (BD_ADDR bd_addr, tBTA_LE_KEY_VALUE *p_le_key,
+BTA_API extern void BTA_DmAddBleKey (BD_ADDR bd_addr, tBTA_LE_KEY_VALUE *p_le_key,
tBTA_LE_KEY_TYPE key_type);
/*******************************************************************************
**
** Function BTA_DmSetBlePrefConnParams
**
-** Description This function is called to set the preferred connection
+** Description This function is called to set the preferred connection
** parameters when default connection parameter is not desired.
**
** Parameters: bd_addr - BD address of the peripheral
@@ -1603,11 +1603,11 @@ BTA_API extern void BTA_DmAddBleKey (BD_ADDR bd_addr, tBTA_LE_KEY_VALUE *p_le_ke
** slave_latency - preferred slave latency
** supervision_tout - preferred supervision timeout
**
-**
+**
** Returns void
**
*******************************************************************************/
-BTA_API extern void BTA_DmSetBlePrefConnParams(BD_ADDR bd_addr,
+BTA_API extern void BTA_DmSetBlePrefConnParams(BD_ADDR bd_addr,
UINT16 min_conn_int, UINT16 max_conn_int,
UINT16 slave_latency, UINT16 supervision_tout );
@@ -1615,57 +1615,57 @@ BTA_API extern void BTA_DmSetBlePrefConnParams(BD_ADDR bd_addr,
**
** Function BTA_DmSetBleConnScanParams
**
-** Description This function is called to set scan parameters used in
+** Description This function is called to set scan parameters used in
** BLE connection request
**
** Parameters: bd_addr - BD address of the peripheral
** scan_interval - scan interval
** scan_window - scan window
-**
+**
** Returns void
**
*******************************************************************************/
-BTA_API extern void BTA_DmSetBleConnScanParams(UINT16 scan_interval,
+BTA_API extern void BTA_DmSetBleConnScanParams(UINT16 scan_interval,
UINT16 scan_window );
/*******************************************************************************
**
** Function BTA_DmSearchExt
**
-** Description This function searches for peer Bluetooth devices. It performs
-** an inquiry and gets the remote name for devices. Service
+** Description This function searches for peer Bluetooth devices. It performs
+** an inquiry and gets the remote name for devices. Service
** discovery is done if services is non zero
-**
+**
** Parameters p_dm_inq: inquiry conditions
** services: if service is not empty, service discovery will be done.
-** for all GATT based service condition, put num_uuid, and
+** for all GATT based service condition, put num_uuid, and
** p_uuid is the pointer to the list of UUID values.
-** p_cback: callback functino when search is completed.
-**
-**
+** p_cback: callback functino when search is completed.
+**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
-BTA_API extern void BTA_DmSearchExt(tBTA_DM_INQ *p_dm_inq, tBTA_SERVICE_MASK_EXT *p_services,
+BTA_API extern void BTA_DmSearchExt(tBTA_DM_INQ *p_dm_inq, tBTA_SERVICE_MASK_EXT *p_services,
tBTA_DM_SEARCH_CBACK *p_cback);
/*******************************************************************************
**
** Function BTA_DmDiscoverExt
**
-** Description This function does service discovery for services of a
+** Description This function does service discovery for services of a
** peer device. When services.num_uuid is 0, it indicates all
** GATT based services are to be searched; other wise a list of
-** UUID of interested services should be provided through
+** UUID of interested services should be provided through
** services.p_uuid.
-**
**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
-BTA_API extern void BTA_DmDiscoverExt(BD_ADDR bd_addr, tBTA_SERVICE_MASK_EXT *p_services,
+BTA_API extern void BTA_DmDiscoverExt(BD_ADDR bd_addr, tBTA_SERVICE_MASK_EXT *p_services,
tBTA_DM_SEARCH_CBACK *p_cback, BOOLEAN sdp_search);
@@ -1681,13 +1681,13 @@ BTA_API extern void BTA_DmDiscoverExt(BD_ADDR bd_addr, tBTA_SERVICE_MASK_EXT *p_
** Parameters: bd_addr - Address of the peer device
** p_callback - Pointer to callback function to indicat the
** link encryption status
-** sec_act - This is the security action to indicate
+** sec_act - This is the security action to indicate
** what knid of BLE security level is required for
-** the BLE link if the BLE is supported
+** the BLE link if the BLE is supported
** Note: This parameter is ignored for the BR/EDR link
-** or the BLE is not supported
-**
-** Returns void
+** or the BLE is not supported
+**
+** Returns void
**
**
*******************************************************************************/
diff --git a/bta/include/bta_ar_api.h b/bta/include/bta_ar_api.h
index bf66dca..ee15cc2 100644
--- a/bta/include/bta_ar_api.h
+++ b/bta/include/bta_ar_api.h
@@ -42,7 +42,7 @@ extern void bta_ar_init(void);
**
** Function bta_ar_reg_avdt
**
-** Description This function is called to register to AVDTP.
+** Description This function is called to register to AVDTP.
**
** Returns void
**
@@ -53,7 +53,7 @@ extern void bta_ar_reg_avdt(tAVDT_REG *p_reg, tAVDT_CTRL_CBACK *p_cback, tBTA_SY
**
** Function bta_ar_dereg_avdt
**
-** Description This function is called to de-register from AVDTP.
+** Description This function is called to de-register from AVDTP.
**
** Returns void
**
@@ -105,7 +105,7 @@ extern void bta_ar_dereg_avct(tBTA_SYS_ID sys_id);
** Returns void
**
******************************************************************************/
-extern void bta_ar_reg_avrc(UINT16 service_uuid, char *p_service_name,
+extern void bta_ar_reg_avrc(UINT16 service_uuid, char *p_service_name,
char *p_provider_name, UINT16 categories, tBTA_SYS_ID sys_id);
/******************************************************************************
diff --git a/bta/include/bta_av_api.h b/bta/include/bta_av_api.h
index 02bc30c..4d2f0dd 100644
--- a/bta/include/bta_av_api.h
+++ b/bta/include/bta_av_api.h
@@ -3,7 +3,7 @@
** Name: bta_av_api.h
**
** Description: This is the public interface file for the advanced
-** audio/video streaming (AV) subsystem of BTA, Widcomm's
+** audio/video streaming (AV) subsystem of BTA, Widcomm's
** Bluetooth application layer for mobile phones.
**
** Copyright (c) 2004-2011, Broadcom Corp., All Rights Reserved.
@@ -183,22 +183,22 @@ typedef UINT8 tBTA_AV_RC;
typedef UINT8 tBTA_AV_STATE;
/* command codes for BTA_AvVendorCmd */
-#define BTA_AV_CMD_CTRL AVRC_CMD_CTRL
-#define BTA_AV_CMD_STATUS AVRC_CMD_STATUS
-#define BTA_AV_CMD_SPEC_INQ AVRC_CMD_SPEC_INQ
-#define BTA_AV_CMD_NOTIF AVRC_CMD_NOTIF
+#define BTA_AV_CMD_CTRL AVRC_CMD_CTRL
+#define BTA_AV_CMD_STATUS AVRC_CMD_STATUS
+#define BTA_AV_CMD_SPEC_INQ AVRC_CMD_SPEC_INQ
+#define BTA_AV_CMD_NOTIF AVRC_CMD_NOTIF
#define BTA_AV_CMD_GEN_INQ AVRC_CMD_GEN_INQ
typedef UINT8 tBTA_AV_CMD;
/* response codes for BTA_AvVendorRsp */
-#define BTA_AV_RSP_NOT_IMPL AVRC_RSP_NOT_IMPL
-#define BTA_AV_RSP_ACCEPT AVRC_RSP_ACCEPT
-#define BTA_AV_RSP_REJ AVRC_RSP_REJ
-#define BTA_AV_RSP_IN_TRANS AVRC_RSP_IN_TRANS
+#define BTA_AV_RSP_NOT_IMPL AVRC_RSP_NOT_IMPL
+#define BTA_AV_RSP_ACCEPT AVRC_RSP_ACCEPT
+#define BTA_AV_RSP_REJ AVRC_RSP_REJ
+#define BTA_AV_RSP_IN_TRANS AVRC_RSP_IN_TRANS
#define BTA_AV_RSP_IMPL_STBL AVRC_RSP_IMPL_STBL
-#define BTA_AV_RSP_CHANGED AVRC_RSP_CHANGED
-#define BTA_AV_RSP_INTERIM AVRC_RSP_INTERIM
+#define BTA_AV_RSP_CHANGED AVRC_RSP_CHANGED
+#define BTA_AV_RSP_INTERIM AVRC_RSP_INTERIM
typedef UINT8 tBTA_AV_CODE;
@@ -208,7 +208,7 @@ typedef UINT8 tBTA_AV_CODE;
#define BTA_AV_ERR_RESOURCE AVDT_ERR_RESOURCE /* Insufficient resources */
#define BTA_AV_ERR_BAD_CP_TYPE A2D_BAD_CP_TYPE /* The requested Content Protection Type is not supported */
#define BTA_AV_ERR_BAD_CP_FORMAT A2D_BAD_CP_FORMAT /* The format of Content Protection Data is not correct */
-
+
typedef UINT8 tBTA_AV_ERR;
@@ -439,10 +439,10 @@ typedef union
#define BTA_MAX_VENDOR_DEPENDENT_DATA_LEN (BTA_AVC_PACKET_LEN-BTA_VENDOR_DATA_OFFSET-BTA_VENDOR_HEADER_LEN)
#define BTA_GROUP_NAVI_MSG_OP_DATA_LEN 5
-#define BTA_ERROR_INVALID_CMD AVRC_STS_BAD_CMD
-#define BTA_ERROR_INVALID_PARAM AVRC_STS_BAD_PARAM
-#define BTA_ERROR_BAD_CONTENTS AVRC_STS_NOT_FOUND
-#define BTA_ERROR_INTERNAL AVRC_STS_INTERNAL_ERR
+#define BTA_ERROR_INVALID_CMD AVRC_STS_BAD_CMD
+#define BTA_ERROR_INVALID_PARAM AVRC_STS_BAD_PARAM
+#define BTA_ERROR_BAD_CONTENTS AVRC_STS_NOT_FOUND
+#define BTA_ERROR_INTERNAL AVRC_STS_INTERNAL_ERR
#define BTA_AV_META_SINGLE_PACKET AVRC_PKT_SINGLE
@@ -494,7 +494,7 @@ extern "C"
**
** Function BTA_AvEnable
**
-** Description Enable the advanced audio/video service. When the enable
+** Description Enable the advanced audio/video service. When the enable
** operation is complete the callback function will be
** called with a BTA_AV_ENABLE_EVT. This function must
** be called before other function in the AV API are
@@ -511,7 +511,7 @@ BTA_API void BTA_AvEnable(tBTA_SEC sec_mask, tBTA_AV_FEAT features,
** Function BTA_AvDisable
**
** Description Disable the advanced audio/video service.
-**
+**
**
** Returns void
**
@@ -522,7 +522,7 @@ BTA_API void BTA_AvDisable(void);
**
** Function BTA_AvRegister
**
-** Description Register the audio or video service to stack. When the
+** Description Register the audio or video service to stack. When the
** operation is complete the callback function will be
** called with a BTA_AV_REGISTER_EVT. This function must
** be called before AVDT stream is open.
@@ -638,7 +638,7 @@ BTA_API void BTA_AvProtectReq(tBTA_AV_HNDL hndl, UINT8 *p_data, UINT16 len);
** Function BTA_AvProtectRsp
**
** Description Send a content protection response. This function must
-** be called if a BTA_AV_PROTECT_REQ_EVT is received.
+** be called if a BTA_AV_PROTECT_REQ_EVT is received.
** This function can only be used if AV is enabled with
** feature BTA_AV_FEAT_PROTECT.
**
@@ -680,7 +680,7 @@ BTA_API void BTA_AvVendorCmd(UINT8 rc_handle, UINT8 label, tBTA_AV_CODE cmd_code
** Function BTA_AvVendorRsp
**
** Description Send a vendor dependent remote control response.
-** This function must be called if a BTA_AV_VENDOR_CMD_EVT
+** This function must be called if a BTA_AV_VENDOR_CMD_EVT
** is received. This function can only be used if AV is
** enabled with feature BTA_AV_FEAT_VENDOR.
**
diff --git a/bta/include/bta_av_ci.h b/bta/include/bta_av_ci.h
index c09e5e9..80cab79 100644
--- a/bta/include/bta_av_ci.h
+++ b/bta/include/bta_av_ci.h
@@ -31,7 +31,7 @@ extern "C"
** should call bta_av_co_audio_src_data_path() or
** bta_av_co_video_src_data_path().
**
-** Returns void
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_av_ci_src_data_ready(tBTA_AV_CHNL chnl);
@@ -46,7 +46,7 @@ BTA_API extern void bta_av_ci_src_data_ready(tBTA_AV_CHNL chnl);
** AVDT_SUCCESS if the codec configuration is ok,
** otherwise error.
**
-** Returns void
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_av_ci_setconfig(tBTA_AV_HNDL hndl, UINT8 err_code,
diff --git a/bta/include/bta_av_co.h b/bta/include/bta_av_co.h
index f2fa83b..4e4c735 100644
--- a/bta/include/bta_av_co.h
+++ b/bta/include/bta_av_co.h
@@ -66,8 +66,8 @@ typedef struct
** Description This callout function is executed by AV when it is
** started by calling BTA_AvEnable(). This function can be
** used by the phone to initialize audio paths or for other
-** initialization purposes.
-**
+** initialization purposes.
+**
**
** Returns Stream codec and content protection capabilities info.
**
@@ -82,7 +82,7 @@ BTA_API extern BOOLEAN bta_av_co_audio_init(UINT8 *p_codec_type, UINT8 *p_codec_
** Description This callout function is executed by AV to report the
** number of stream end points (SEP) were found during the
** AVDT stream discovery process.
-**
+**
**
** Returns void.
**
@@ -97,7 +97,7 @@ BTA_API extern void bta_av_co_audio_disc_res(tBTA_AV_HNDL hndl, UINT8 num_seps,
** Description This callout function is executed by AV to report the
** number of stream end points (SEP) were found during the
** AVDT stream discovery process.
-**
+**
**
** Returns void.
**
@@ -112,7 +112,7 @@ BTA_API extern void bta_av_co_video_disc_res(tBTA_AV_HNDL hndl, UINT8 num_seps,
** Description This callout function is executed by AV to retrieve the
** desired codec and content protection configuration for the
** audio stream.
-**
+**
**
** Returns Stream codec and content protection configuration info.
**
@@ -128,7 +128,7 @@ BTA_API extern UINT8 bta_av_co_audio_getconfig(tBTA_AV_HNDL hndl, tBTA_AV_CODEC
** Description This callout function is executed by AV to retrieve the
** desired codec and content protection configuration for the
** video stream.
-**
+**
**
** Returns Stream codec and content protection configuration info.
**
@@ -142,10 +142,10 @@ BTA_API extern UINT8 bta_av_co_video_getconfig(tBTA_AV_HNDL hndl, tBTA_AV_CODEC
** Function bta_av_co_audio_setconfig
**
** Description This callout function is executed by AV to set the
-** codec and content protection configuration of the audio stream.
-**
+** codec and content protection configuration of the audio stream.
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_av_co_audio_setconfig(tBTA_AV_HNDL hndl, tBTA_AV_CODEC codec_type,
@@ -157,10 +157,10 @@ BTA_API extern void bta_av_co_audio_setconfig(tBTA_AV_HNDL hndl, tBTA_AV_CODEC c
** Function bta_av_co_video_setconfig
**
** Description This callout function is executed by AV to set the
-** codec and content protection configuration of the video stream.
-**
+** codec and content protection configuration of the video stream.
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_av_co_video_setconfig(tBTA_AV_HNDL hndl, tBTA_AV_CODEC codec_type,
@@ -180,8 +180,8 @@ BTA_API extern void bta_av_co_video_setconfig(tBTA_AV_HNDL hndl, tBTA_AV_CODEC c
** Returns void
**
*******************************************************************************/
-BTA_API extern void bta_av_co_audio_open(tBTA_AV_HNDL hndl,
- tBTA_AV_CODEC codec_type, UINT8 *p_codec_info,
+BTA_API extern void bta_av_co_audio_open(tBTA_AV_HNDL hndl,
+ tBTA_AV_CODEC codec_type, UINT8 *p_codec_info,
UINT16 mtu);
/*******************************************************************************
@@ -190,13 +190,13 @@ BTA_API extern void bta_av_co_audio_open(tBTA_AV_HNDL hndl,
**
** Description This function is called by AV when the video stream connection
** is opened.
-**
+**
**
** Returns void
**
*******************************************************************************/
-BTA_API extern void bta_av_co_video_open(tBTA_AV_HNDL hndl,
- tBTA_AV_CODEC codec_type, UINT8 *p_codec_info,
+BTA_API extern void bta_av_co_video_open(tBTA_AV_HNDL hndl,
+ tBTA_AV_CODEC codec_type, UINT8 *p_codec_info,
UINT16 mtu);
/*******************************************************************************
@@ -222,7 +222,7 @@ BTA_API extern void bta_av_co_audio_close(tBTA_AV_HNDL hndl, tBTA_AV_CODEC codec
**
** Description This function is called by AV when the video stream connection
** is closed.
-**
+**
**
** Returns void
**
@@ -236,7 +236,7 @@ BTA_API extern void bta_av_co_video_close(tBTA_AV_HNDL hndl, tBTA_AV_CODEC codec
**
** Description This function is called by AV when the audio streaming data
** transfer is started.
-**
+**
**
** Returns void
**
@@ -250,7 +250,7 @@ BTA_API extern void bta_av_co_audio_start(tBTA_AV_HNDL hndl, tBTA_AV_CODEC codec
**
** Description This function is called by AV when the video streaming data
** transfer is started.
-**
+**
**
** Returns void
**
@@ -264,7 +264,7 @@ BTA_API extern void bta_av_co_video_start(tBTA_AV_HNDL hndl, tBTA_AV_CODEC codec
**
** Description This function is called by AV when the audio streaming data
** transfer is stopped.
-**
+**
**
** Returns void
**
@@ -277,7 +277,7 @@ BTA_API extern void bta_av_co_audio_stop(tBTA_AV_HNDL hndl, tBTA_AV_CODEC codec_
**
** Description This function is called by AV when the video streaming data
** transfer is stopped.
-**
+**
**
** Returns void
**
@@ -303,7 +303,7 @@ BTA_API extern void * bta_av_co_audio_src_data_path(tBTA_AV_CODEC codec_type,
** Function bta_av_co_video_src_data_path
**
** Description This function is called to get the next data buffer from
-** the video codec.
+** the video codec.
**
** Returns NULL if data is not ready.
** Otherwise, a video data buffer (UINT8*).
@@ -316,7 +316,7 @@ BTA_API extern void * bta_av_co_video_src_data_path(tBTA_AV_CODEC codec_type,
**
** Function bta_av_co_audio_drop
**
-** Description An Audio packet is dropped. .
+** Description An Audio packet is dropped. .
** It's very likely that the connected headset with this handle
** is moved far away. The implementation may want to reduce
** the encoder bit rate setting to reduce the packet size.
@@ -356,7 +356,7 @@ BTA_API extern void bta_av_co_video_report_rr (UINT32 packet_lost);
**
** Description This function is called by AV when the audio stream connection
** needs to send the initial delay report to the connected SRC.
-**
+**
**
** Returns void
**
@@ -369,7 +369,7 @@ BTA_API extern void bta_av_co_audio_delay(tBTA_AV_HNDL hndl, UINT16 delay);
**
** Description This function is called by AV when the video stream connection
** needs to send the initial delay report to the connected SRC.
-**
+**
**
** Returns void
**
diff --git a/bta/include/bta_dm_ci.h b/bta/include/bta_dm_ci.h
index f662f17..2eab178 100644
--- a/bta/include/bta_dm_ci.h
+++ b/bta/include/bta_dm_ci.h
@@ -30,7 +30,7 @@ extern "C"
** bta_dm_co_io_req(), if *p_oob_data is set to BTA_OOB_UNKNOWN
** by bta_dm_co_io_req().
**
-** Returns void
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_dm_ci_io_req(BD_ADDR bd_addr, tBTA_IO_CAP io_cap,
@@ -44,7 +44,7 @@ BTA_API extern void bta_dm_ci_io_req(BD_ADDR bd_addr, tBTA_IO_CAP io_cap,
** bta_dm_co_rmt_oob() to provide the OOB data associated
** with the remote device.
**
-** Returns void
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_dm_ci_rmt_oob(BOOLEAN accept, BD_ADDR bd_addr,
@@ -53,10 +53,10 @@ BTA_API extern void bta_dm_ci_rmt_oob(BOOLEAN accept, BD_ADDR bd_addr,
**
** Function bta_dm_sco_ci_data_ready
**
-** Description This function sends an event to indicating that the phone
+** Description This function sends an event to indicating that the phone
** has SCO data ready..
**
-** Returns void
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_dm_sco_ci_data_ready(UINT16 event, UINT16 sco_handle);
diff --git a/bta/include/bta_dm_co.h b/bta/include/bta_dm_co.h
index cadf6bf..9bc5a79 100644
--- a/bta/include/bta_dm_co.h
+++ b/bta/include/bta_dm_co.h
@@ -32,8 +32,8 @@ typedef struct
tBTA_SCO_CODEC_TYPE codec_type;
}tBTA_CODEC_INFO;
-#define BTA_DM_SCO_ROUTE_PCM BTM_SCO_ROUTE_PCM
-#define BTA_DM_SCO_ROUTE_HCI BTM_SCO_ROUTE_HCI
+#define BTA_DM_SCO_ROUTE_PCM BTM_SCO_ROUTE_PCM
+#define BTA_DM_SCO_ROUTE_HCI BTM_SCO_ROUTE_HCI
typedef tBTM_SCO_ROUTE_TYPE tBTA_DM_SCO_ROUTE_TYPE;
@@ -52,13 +52,13 @@ typedef tBTM_SCO_ROUTE_TYPE tBTA_DM_SCO_ROUTE_TYPE;
** Parameters bd_addr - The peer device
** *p_io_cap - The local Input/Output capabilities
** *p_oob_data - TRUE, if OOB data is available for the peer device.
-** *p_auth_req - TRUE, if MITM protection is required.
+** *p_auth_req - TRUE, if MITM protection is required.
**
** Returns void.
**
*******************************************************************************/
BTA_API extern void bta_dm_co_io_req(BD_ADDR bd_addr, tBTA_IO_CAP *p_io_cap,
- tBTA_OOB_DATA *p_oob_data, tBTA_AUTH_REQ *p_auth_req,
+ tBTA_OOB_DATA *p_oob_data, tBTA_AUTH_REQ *p_auth_req,
BOOLEAN is_orig);
/*******************************************************************************
@@ -71,7 +71,7 @@ BTA_API extern void bta_dm_co_io_req(BD_ADDR bd_addr, tBTA_IO_CAP *p_io_cap,
** Parameters bd_addr - The peer device
** io_cap - The remote Input/Output capabilities
** oob_data - TRUE, if OOB data is available for the peer device.
-** auth_req - TRUE, if MITM protection is required.
+** auth_req - TRUE, if MITM protection is required.
**
** Returns void.
**
@@ -87,7 +87,7 @@ BTA_API extern void bta_dm_co_io_rsp(BD_ADDR bd_addr, tBTA_IO_CAP io_cap,
** platform wants allow link key upgrade
**
** Parameters bd_addr - The peer device
-** *p_upgrade - TRUE, if link key upgrade is desired.
+** *p_upgrade - TRUE, if link key upgrade is desired.
**
** Returns void.
**
@@ -131,10 +131,10 @@ BTA_API extern void bta_dm_co_rmt_oob(BD_ADDR bd_addr);
**
** Function bta_dm_sco_co_init
**
-** Description This function can be used by the phone to initialize audio
+** Description This function can be used by the phone to initialize audio
** codec or for other initialization purposes before SCO connection
-** is opened.
-**
+** is opened.
+**
**
** Returns Void.
**
@@ -148,7 +148,7 @@ BTA_API extern tBTA_DM_SCO_ROUTE_TYPE bta_dm_sco_co_init(UINT32 rx_bw, UINT32 tx
** Function bta_dm_sco_co_open
**
** Description This function is executed when a SCO connection is open.
-**
+**
**
** Returns void
**
@@ -160,7 +160,7 @@ BTA_API extern void bta_dm_sco_co_open(UINT16 handle, UINT8 pkt_size, UINT16 eve
** Function bta_dm_sco_co_close
**
** Description This function is called when a SCO connection is closed
-**
+**
**
** Returns void
**
@@ -171,7 +171,7 @@ BTA_API extern void bta_dm_sco_co_close(void);
**
** Function bta_dm_sco_co_out_data
**
-** Description This function is called to send SCO data over HCI.
+** Description This function is called to send SCO data over HCI.
**
** Returns void
**
@@ -182,7 +182,7 @@ BTA_API extern void bta_dm_sco_co_out_data(BT_HDR **p_buf);
**
** Function bta_dm_sco_co_in_data
**
-** Description This function is called to send incoming SCO data to application.
+** Description This function is called to send incoming SCO data to application.
**
** Returns void
**
@@ -201,19 +201,19 @@ BTA_API extern void bta_dm_sco_co_in_data(BT_HDR *p_buf, tBTM_SCO_DATA_FLAG sta
** Parameters bd_addr - The peer device
** *p_io_cap - The local Input/Output capabilities
** *p_oob_data - TRUE, if OOB data is available for the peer device.
-** *p_auth_req - Auth request setting (Bonding and MITM required or not)
+** *p_auth_req - Auth request setting (Bonding and MITM required or not)
** *p_max_key_size - max key size local device supported.
** *p_init_key - initiator keys.
-** *p_resp_key - responder keys.
+** *p_resp_key - responder keys.
**
** Returns void.
**
*******************************************************************************/
-BTA_API extern void bta_dm_co_ble_io_req(BD_ADDR bd_addr, tBTA_IO_CAP *p_io_cap,
+BTA_API extern void bta_dm_co_ble_io_req(BD_ADDR bd_addr, tBTA_IO_CAP *p_io_cap,
tBTA_OOB_DATA *p_oob_data,
tBTA_LE_AUTH_REQ *p_auth_req,
- UINT8 *p_max_key_size,
- tBTA_LE_KEY_TYPE *p_init_key,
+ UINT8 *p_max_key_size,
+ tBTA_LE_KEY_TYPE *p_init_key,
tBTA_LE_KEY_TYPE *p_resp_key );
@@ -224,12 +224,12 @@ BTA_API extern void bta_dm_co_ble_io_req(BD_ADDR bd_addr, tBTA_IO_CAP *p_io_cap
** Description This callout function is to load the local BLE keys if available
** on the device.
**
-** Parameters none
+** Parameters none
**
** Returns void.
**
*******************************************************************************/
-BTA_API extern void bta_dm_co_ble_load_local_keys (tBTA_DM_BLE_LOCAL_KEY_MASK *p_key_mask, BT_OCTET16 er,
+BTA_API extern void bta_dm_co_ble_load_local_keys (tBTA_DM_BLE_LOCAL_KEY_MASK *p_key_mask, BT_OCTET16 er,
tBTA_BLE_LOCAL_ID_KEYS *p_id_keys);
// btla-specific ++
@@ -243,19 +243,19 @@ BTA_API extern void bta_dm_co_ble_load_local_keys (tBTA_DM_BLE_LOCAL_KEY_MASK *p
** Parameters bd_addr - The peer device
** *p_io_cap - The local Input/Output capabilities
** *p_oob_data - TRUE, if OOB data is available for the peer device.
-** *p_auth_req - Auth request setting (Bonding and MITM required or not)
+** *p_auth_req - Auth request setting (Bonding and MITM required or not)
** *p_max_key_size - max key size local device supported.
** *p_init_key - initiator keys.
-** *p_resp_key - responder keys.
+** *p_resp_key - responder keys.
**
** Returns void.
**
*******************************************************************************/
-BTA_API extern void bta_dm_co_ble_io_req(BD_ADDR bd_addr, tBTA_IO_CAP *p_io_cap,
+BTA_API extern void bta_dm_co_ble_io_req(BD_ADDR bd_addr, tBTA_IO_CAP *p_io_cap,
tBTA_OOB_DATA *p_oob_data,
tBTA_LE_AUTH_REQ *p_auth_req,
- UINT8 *p_max_key_size,
- tBTA_LE_KEY_TYPE *p_init_key,
+ UINT8 *p_max_key_size,
+ tBTA_LE_KEY_TYPE *p_init_key,
tBTA_LE_KEY_TYPE *p_resp_key );
// btla-specific --
diff --git a/bta/include/bta_fs_api.h b/bta/include/bta_fs_api.h
index c0cb4f5..b1f11c4 100644
--- a/bta/include/bta_fs_api.h
+++ b/bta/include/bta_fs_api.h
@@ -24,7 +24,7 @@ typedef struct
{
UINT16 max_file_len; /* Maximum size file name */
UINT16 max_path_len; /* Maximum path length (includes appended file name) */
- char path_separator; /* 0x2f ('/'), or 0x5c ('\') */
+ char path_separator; /* 0x2f ('/'), or 0x5c ('\') */
} tBTA_FS_CFG;
extern tBTA_FS_CFG * p_bta_fs_cfg;
diff --git a/bta/include/bta_fs_ci.h b/bta/include/bta_fs_ci.h
index c60b3ba..dbf5761 100644
--- a/bta/include/bta_fs_ci.h
+++ b/bta/include/bta_fs_ci.h
@@ -85,7 +85,7 @@ extern "C"
**
** Function bta_fs_ci_write
**
-** Description This function sends an event to BTA indicating the phone
+** Description This function sends an event to BTA indicating the phone
** has written the number of bytes specified in the call-out
** function, bta_fs_co_write(), and is ready for more data.
** This function is used to control the TX data flow.
@@ -98,7 +98,7 @@ extern "C"
** evt - Used Internally by BTA -> MUST be same value passed
** in call-out function.
**
-** Returns void
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_fs_ci_write(int fd, tBTA_FS_CO_STATUS status, UINT16 evt);
@@ -112,7 +112,7 @@ BTA_API extern void bta_fs_ci_write(int fd, tBTA_FS_CO_STATUS status, UINT16 evt
** bta_fs_co_read() call-out function. It should only be called
** when the requested number of bytes has been read in, or aioer
** the end of the file has been detected.
-**
+**
** Parameters fd - file descriptor passed to the stack in the
** bta_fs_ci_open call-in function.
** num_bytes_read - number of bytes read into the buffer
@@ -123,7 +123,7 @@ BTA_API extern void bta_fs_ci_write(int fd, tBTA_FS_CO_STATUS status, UINT16 evt
** evt - Used Internally by BTA -> MUST be same value passed
** in call-out function.
**
-** Returns void
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_fs_ci_read(int fd, UINT16 num_bytes_read,
@@ -135,7 +135,7 @@ BTA_API extern void bta_fs_ci_read(int fd, UINT16 num_bytes_read,
**
** Description This function sends an event to BTA indicating the phone has
** finished opening a file for reading or writing.
-**
+**
** Parameters fd - file descriptor passed to the stack in the
** bta_fs_ci_open call-in function.
** status - BTA_FS_CO_OK if file was opened in mode specified
@@ -147,7 +147,7 @@ BTA_API extern void bta_fs_ci_read(int fd, UINT16 num_bytes_read,
** evt - Used Internally by BTA -> MUST be same value passed
** in call-out function.
**
-** Returns void
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_fs_ci_open(int fd, tBTA_FS_CO_STATUS status,
@@ -166,7 +166,7 @@ BTA_API extern void bta_fs_ci_open(int fd, tBTA_FS_CO_STATUS status,
** evt - Used Internally by BTA -> MUST be same value passed
** in call-out function.
**
-** Returns void
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_fs_ci_direntry(tBTA_FS_CO_STATUS status, UINT16 evt);
@@ -186,7 +186,7 @@ BTA_API extern void bta_fs_ci_direntry(tBTA_FS_CO_STATUS status, UINT16 evt);
** evt - Used Internally by BTA -> MUST be same value passed
** in call-out function.
**
-** Returns void
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_fs_ci_resume (BD_ADDR_PTR p_addr, UINT8 *p_sess_info,
@@ -206,7 +206,7 @@ BTA_API extern void bta_fs_ci_resume (BD_ADDR_PTR p_addr, UINT8 *p_sess_info,
** evt - Used Internally by BTA -> MUST be same value passed
** in call-out function.
**
-** Returns void
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_fs_ci_action(tBTA_FS_CO_STATUS status, UINT16 evt);
@@ -217,7 +217,7 @@ BTA_API extern void bta_fs_ci_action(tBTA_FS_CO_STATUS status, UINT16 evt);
**
** Description This function sends an event to BTA indicating the phone has
** finished opening a file for reading or writing on resume.
-**
+**
** Parameters fd - file descriptor passed to the stack in the
** bta_fs_ci_open call-in function.
** status - BTA_FS_CO_OK if file was opened in mode specified
@@ -230,7 +230,7 @@ BTA_API extern void bta_fs_ci_action(tBTA_FS_CO_STATUS status, UINT16 evt);
** evt - Used Internally by BTA -> MUST be same value passed
** in call-out function.
**
-** Returns void
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_fs_ci_resume_op(int fd, tBTA_FS_CO_STATUS status, const char *p_file,
diff --git a/bta/include/bta_fs_co.h b/bta/include/bta_fs_co.h
index 6b068df..ffe37e9 100644
--- a/bta/include/bta_fs_co.h
+++ b/bta/include/bta_fs_co.h
@@ -74,11 +74,11 @@ typedef UINT16 tBTA_FS_CO_STATUS;
*/
#define BTA_FS_O_RDONLY GOEP_O_RDONLY
#define BTA_FS_O_WRONLY GOEP_O_WRONLY
-#define BTA_FS_O_RDWR GOEP_O_RDWR
+#define BTA_FS_O_RDWR GOEP_O_RDWR
-#define BTA_FS_O_CREAT GOEP_O_CREAT
-#define BTA_FS_O_EXCL GOEP_O_EXCL
-#define BTA_FS_O_TRUNC GOEP_O_TRUNC
+#define BTA_FS_O_CREAT GOEP_O_CREAT
+#define BTA_FS_O_EXCL GOEP_O_EXCL
+#define BTA_FS_O_TRUNC GOEP_O_TRUNC
#define BTA_FS_O_MODE_MASK(x) (((UINT16)(x)) & 0x0003)
@@ -158,7 +158,7 @@ typedef struct
** Parameters void.
**
** Returns void
-**
+**
**
*******************************************************************************/
BTA_API extern void bta_fs_co_init(void);
@@ -168,7 +168,7 @@ BTA_API extern void bta_fs_co_init(void);
** Function bta_fs_co_open
**
** Description This function is executed by BTA when a file is opened.
-** The phone uses this function to open
+** The phone uses this function to open
** a file for reading or writing.
**
** Parameters p_path - Fully qualified path and file name.
@@ -180,7 +180,7 @@ BTA_API extern void bta_fs_co_init(void);
** of the call-out function.
**
** Returns void
-**
+**
** Note: Upon completion of the request, a file descriptor (int),
** if successful, and an error code (tBTA_FS_CO_STATUS)
** are returned in the call-in function, bta_fs_ci_open().
@@ -203,7 +203,7 @@ BTA_API extern void bta_fs_co_open(const char *p_path, int oflags, UINT32 size,
** of the call-out function.
**
** Returns void
-**
+**
*******************************************************************************/
BTA_API extern void bta_fs_co_session_info(BD_ADDR bd_addr, UINT8 *p_sess_info, UINT8 ssn,
tBTA_FS_CO_SESS_ST new_st, char *p_path, UINT8 *p_info, UINT8 app_id);
@@ -222,7 +222,7 @@ BTA_API extern void bta_fs_co_session_info(BD_ADDR bd_addr, UINT8 *p_sess_info,
** of the call-out function.
**
** Returns void
-**
+**
*******************************************************************************/
BTA_API extern void bta_fs_co_resume_op(UINT32 offset, UINT16 evt, UINT8 app_id);
@@ -242,7 +242,7 @@ BTA_API extern void bta_fs_co_resume_op(UINT32 offset, UINT16 evt, UINT8 app_id)
** of the call-out function.
**
** Returns void
-**
+**
*******************************************************************************/
BTA_API extern void bta_fs_co_suspend(BD_ADDR bd_addr, UINT8 *p_sess_info, UINT8 ssn,
UINT32 *p_timeout, UINT32 *p_offset, UINT8 info, UINT8 app_id);
@@ -260,7 +260,7 @@ BTA_API extern void bta_fs_co_suspend(BD_ADDR bd_addr, UINT8 *p_sess_info, UINT8
** of the call-out function.
**
** Returns void
-**
+**
** Note: Upon completion of the request, the related session information,
** if successful, and an error code (tBTA_FS_CO_STATUS)
** are returned in the call-in function, bta_fs_ci_resume().
@@ -283,7 +283,7 @@ BTA_API extern void bta_fs_co_resume(UINT16 evt, UINT8 app_id);
** of the call-out function.
**
** Returns void
-**
+**
*******************************************************************************/
BTA_API extern void bta_fs_co_sess_ssn(int fd, UINT8 ssn, UINT8 app_id);
@@ -291,7 +291,7 @@ BTA_API extern void bta_fs_co_sess_ssn(int fd, UINT8 ssn, UINT8 app_id);
**
** Function bta_fs_co_setdir
**
-** Description This function is executed by BTA when the server changes the
+** Description This function is executed by BTA when the server changes the
** local path
**
** Parameters p_path - the new path.
@@ -300,7 +300,7 @@ BTA_API extern void bta_fs_co_sess_ssn(int fd, UINT8 ssn, UINT8 app_id);
** of the call-out function.
**
** Returns void
-**
+**
*******************************************************************************/
BTA_API extern void bta_fs_co_setdir(const char *p_path, UINT8 app_id);
@@ -341,7 +341,7 @@ BTA_API extern tBTA_FS_CO_STATUS bta_fs_co_close(int fd, UINT8 app_id);
** of the call-out function.
**
** Returns void
-**
+**
** Note: Upon completion of the request, bta_fs_ci_read() is
** called with the buffer of data, along with the number
** of bytes read into the buffer, and a status. The
@@ -371,7 +371,7 @@ BTA_API extern void bta_fs_co_read(int fd, UINT8 *p_buf, UINT16 nbytes, UINT16 e
** of the call-out function.
**
** Returns void
-**
+**
** Note: Upon completion of the request, bta_fs_ci_write() is
** called with the file descriptor and the status. The
** call-in function should only be called when ALL requested
@@ -386,7 +386,7 @@ BTA_API extern void bta_fs_co_write(int fd, const UINT8 *p_buf, UINT16 nbytes, U
** Function bta_fs_co_seek
**
** Description This function is called by io to move the file pointer
-** of a previously opened file to the specified location for
+** of a previously opened file to the specified location for
** the next read or write operation.
**
** Parameters fd - file descriptor of file.
@@ -395,7 +395,7 @@ BTA_API extern void bta_fs_co_write(int fd, const UINT8 *p_buf, UINT16 nbytes, U
** or BTA_FS_SEEK_END.
**
** Returns void
-**
+**
*******************************************************************************/
BTA_API extern void bta_fs_co_seek (int fd, INT32 offset, INT16 origin, UINT8 app_id);
@@ -502,7 +502,7 @@ BTA_API extern tBTA_FS_CO_STATUS bta_fs_co_unlink(const char *p_path, UINT8 app_
** of the call-out function.
**
** Returns void
-**
+**
** Note: Upon completion of the request, the status is passed
** in the bta_fs_ci_direntry() call-in function.
** BTA_FS_CO_OK is returned when p_entry is valid,
@@ -532,7 +532,7 @@ BTA_API extern void bta_fs_co_getdirentry(const char *p_path, BOOLEAN first_item
** Returns (tBTA_FS_CO_STATUS) status of the call.
** [BTA_FS_CO_OK if successful]
** [BTA_FS_CO_EIS_DIR if p_src_path is a folder]
-** [BTA_FS_CO_EACCES if p_dest_path already exists or could not be created (invalid path);
+** [BTA_FS_CO_EACCES if p_dest_path already exists or could not be created (invalid path);
** or p_src_path is a directory and p_dest_path specifies a different path. ]
** [BTA_FS_CO_FAIL otherwise]
**
@@ -555,7 +555,7 @@ BTA_API extern void bta_fs_co_copy(const char *p_src_path, const char *p_dest_pa
**
** Returns (tBTA_FS_CO_STATUS) status of the call.
** [BTA_FS_CO_OK if successful]
-** [BTA_FS_CO_EACCES if p_dest_path already exists or could not be created (invalid path);
+** [BTA_FS_CO_EACCES if p_dest_path already exists or could not be created (invalid path);
** or p_src_path is a directory and p_dest_path specifies a different path. ]
** [BTA_FS_CO_FAIL otherwise]
**
@@ -577,7 +577,7 @@ BTA_API extern void bta_fs_co_rename(const char *p_src_path, const char *p_dest_
**
** Returns (tBTA_FS_CO_STATUS) status of the call.
** [BTA_FS_CO_OK if successful]
-** [BTA_FS_CO_EACCES if p_dest_path already exists or could not be created (invalid path);
+** [BTA_FS_CO_EACCES if p_dest_path already exists or could not be created (invalid path);
** or p_src_path is a directory and p_dest_path specifies a different path. ]
** [BTA_FS_CO_FAIL otherwise]
**
@@ -588,7 +588,7 @@ BTA_API extern void bta_fs_co_set_perms(const char *p_src_path, UINT8 *p_perms,
**
** Function bta_fs_co_sess_fopen
**
-** Description This function is called by bta_fs_co_open to keep track of
+** Description This function is called by bta_fs_co_open to keep track of
** the opened file (for reliable session suspend/resume.)
**
** Parameters p_path - Fully qualified path and file name.
@@ -598,7 +598,7 @@ BTA_API extern void bta_fs_co_set_perms(const char *p_src_path, UINT8 *p_perms,
** of the call-out function.
**
** Returns void
-**
+**
*******************************************************************************/
BTA_API extern void bta_fs_co_sess_fopen(const char *p_path, int oflags, UINT8 app_id);
@@ -606,7 +606,7 @@ BTA_API extern void bta_fs_co_sess_fopen(const char *p_path, int oflags, UINT8 a
**
** Function bta_fs_co_sess_fclose
**
-** Description This function is called by bta_fs_co_close
+** Description This function is called by bta_fs_co_close
**
** Parameters app_id - application ID specified in the enable functions.
** It can be used to identify which profile is the caller
@@ -621,7 +621,7 @@ BTA_API extern void bta_fs_co_sess_fclose(UINT8 app_id);
**
** Function bta_fs_co_sess_offset
**
-** Description This function is called by bta_fs_co_write to keep track of
+** Description This function is called by bta_fs_co_write to keep track of
** the last file offset (Only the receiving side needs to keep
** track of the file offset)
**
diff --git a/bta/include/bta_gatt_api.h b/bta/include/bta_gatt_api.h
index 02284a5..b498bda 100644
--- a/bta/include/bta_gatt_api.h
+++ b/bta/include/bta_gatt_api.h
@@ -43,7 +43,7 @@ typedef struct
} tBTA_GATT_ID;
/* Success code and error codes */
-#define BTA_GATT_OK GATT_SUCCESS
+#define BTA_GATT_OK GATT_SUCCESS
#define BTA_GATT_INVALID_HANDLE GATT_INVALID_HANDLE /* 0x0001 */
#define BTA_GATT_READ_NOT_PERMIT GATT_READ_NOT_PERMIT /* 0x0002 */
#define BTA_GATT_WRITE_NOT_PERMIT GATT_WRITE_NOT_PERMIT /* 0x0003 */
@@ -117,7 +117,7 @@ typedef struct
#define BTA_GATT_CLT_CONFIG_INDICATION GATT_CLT_CONFIG_INDICATION /* 0x0002 */
typedef UINT16 tBTA_GATT_CLT_CHAR_CONFIG;
-/* characteristic descriptor: server configuration value
+/* characteristic descriptor: server configuration value
*/
#define BTA_GATT_SVR_CONFIG_NONE GATT_SVR_CONFIG_NONE /* 0x0000 */
#define BTA_GATT_SVR_CONFIG_BROADCAST GATT_SVR_CONFIG_BROADCAST /* 0x0001 */
@@ -145,7 +145,7 @@ typedef struct
#define BTA_GATTC_TYPE_WRITE_NO_RSP GATT_WRITE_NO_RSP
typedef UINT8 tBTA_GATTC_WRITE_TYPE;
-#define BTA_GATT_CONN_UNKNOWN 0
+#define BTA_GATT_CONN_UNKNOWN 0
#define BTA_GATT_CONN_NO_RESOURCES GATT_CONN_NO_RESOURCES /* connection fail for l2cap resource failure */
#define BTA_GATT_CONN_TIMEOUT GATT_CONN_TIMEOUT /* 0x08 connection timeout */
#define BTA_GATT_CONN_TERMINATE_PEER_USER GATT_CONN_TERMINATE_PEER_USER /* 0x13 connection terminate by peer user */
@@ -165,19 +165,19 @@ typedef struct
typedef struct
{
tBTA_GATT_SRVC_ID srvc_id;
- tBTA_GATT_ID char_id;
+ tBTA_GATT_ID char_id;
}tBTA_GATTC_CHAR_ID;
typedef struct
{
- tBTA_GATTC_CHAR_ID char_id;
+ tBTA_GATTC_CHAR_ID char_id;
tBT_UUID descr_type;
}tBTA_GATTC_CHAR_DESCR_ID;
typedef struct
{
- tBTA_GATT_SRVC_ID srvc_id;
- tBTA_GATT_SRVC_ID incl_svc_id;
+ tBTA_GATT_SRVC_ID srvc_id;
+ tBTA_GATT_SRVC_ID incl_svc_id;
}tBTA_GATTC_INCL_SVC_ID;
#define BTA_GATT_TYPE_CHAR 0
@@ -204,11 +204,11 @@ typedef struct
}tBTA_GATTC_MULTI;
-#define BTA_GATT_AUTH_REQ_NONE GATT_AUTH_REQ_NONE
+#define BTA_GATT_AUTH_REQ_NONE GATT_AUTH_REQ_NONE
#define BTA_GATT_AUTH_REQ_NO_MITM GATT_AUTH_REQ_NO_MITM /* unauthenticated encryption */
#define BTA_GATT_AUTH_REQ_MITM GATT_AUTH_REQ_MITM /* authenticated encryption */
-#define BTA_GATT_AUTH_REQ_SIGNED_NO_MITM GATT_AUTH_REQ_SIGNED_NO_MITM
-#define BTA_GATT_AUTH_REQ_SIGNED_MITM GATT_AUTH_REQ_SIGNED_MITM
+#define BTA_GATT_AUTH_REQ_SIGNED_NO_MITM GATT_AUTH_REQ_SIGNED_NO_MITM
+#define BTA_GATT_AUTH_REQ_SIGNED_MITM GATT_AUTH_REQ_SIGNED_MITM
typedef tGATT_AUTH_REQ tBTA_GATT_AUTH_REQ;
@@ -237,7 +237,7 @@ typedef struct
typedef struct
{
tBTA_GATT_STATUS status;
- tBTA_GATTC_IF client_if;
+ tBTA_GATTC_IF client_if;
// btla-specific ++
tBT_UUID app_uuid;
// btla-specific --
@@ -278,19 +278,19 @@ typedef struct
typedef struct
{
UINT16 conn_id;
- tBTA_GATT_STATUS status;
+ tBTA_GATT_STATUS status;
}tBTA_GATTC_EXEC_CMPL;
typedef struct
{
UINT16 conn_id;
- tBTA_GATT_STATUS status;
+ tBTA_GATT_STATUS status;
}tBTA_GATTC_SEARCH_CMPL;
typedef struct
{
UINT16 conn_id;
- tBTA_GATT_SRVC_ID service_uuid;
+ tBTA_GATT_SRVC_ID service_uuid;
}tBTA_GATTC_SRVC_RES;
@@ -298,16 +298,16 @@ typedef struct
{
tBTA_GATT_STATUS status;
UINT16 conn_id;
- tBTA_GATTC_IF client_if;
- BD_ADDR remote_bda;
+ tBTA_GATTC_IF client_if;
+ BD_ADDR remote_bda;
}tBTA_GATTC_OPEN;
typedef struct
{
tBTA_GATT_STATUS status;
UINT16 conn_id;
- tBTA_GATTC_IF client_if;
- BD_ADDR remote_bda;
+ tBTA_GATTC_IF client_if;
+ BD_ADDR remote_bda;
tBTA_GATT_REASON reason; /* disconnect reason code, not useful when connect event is reported */
}tBTA_GATTC_CLOSE;
@@ -326,16 +326,16 @@ typedef struct
typedef struct
{
tBTA_GATT_STATUS status;
- tBTA_GATTC_IF client_if;
- UINT16 conn_id;
- BD_ADDR remote_bda;
+ tBTA_GATTC_IF client_if;
+ UINT16 conn_id;
+ BD_ADDR remote_bda;
}tBTA_GATTC_OPEN_CLOSE;
// btla-specific --
typedef union
{
- tBTA_GATT_STATUS status;
-
+ tBTA_GATT_STATUS status;
+
tBTA_GATTC_SEARCH_CMPL search_cmpl; /* discovery complete */
tBTA_GATTC_SRVC_RES srvc_res; /* discovery result */
tBTA_GATTC_REG reg_oper; /* registration data */
@@ -379,7 +379,7 @@ typedef tGATT_IF tBTA_GATTS_IF;
/* Attribute permissions
*/
-#define BTA_GATT_PERM_READ GATT_PERM_READ /* bit 0 - 0x0001 */
+#define BTA_GATT_PERM_READ GATT_PERM_READ /* bit 0 - 0x0001 */
#define BTA_GATT_PERM_READ_ENCRYPTED GATT_PERM_READ_ENCRYPTED /* bit 1 - 0x0002 */
#define BTA_GATT_PERM_READ_ENC_MITM GATT_PERM_READ_ENC_MITM /* bit 2 - 0x0004 */
#define BTA_GATT_PERM_WRITE GATT_PERM_WRITE /* bit 4 - 0x0010 */
@@ -389,9 +389,9 @@ typedef tGATT_IF tBTA_GATTS_IF;
#define BTA_GATT_PERM_WRITE_SIGNED_MITM GATT_PERM_WRITE_SIGNED_MITM /* bit 8 - 0x0100 */
typedef UINT16 tBTA_GATT_PERM;
-#define BTA_GATTS_INVALID_APP 0xff
+#define BTA_GATTS_INVALID_APP 0xff
-#define BTA_GATTS_INVALID_IF 0
+#define BTA_GATTS_INVALID_IF 0
/* definition of characteristic properties */
#define BTA_GATT_CHAR_PROP_BIT_BROADCAST GATT_CHAR_PROP_BIT_BROADCAST /* 0x01 */
@@ -414,17 +414,17 @@ typedef struct
{
tBT_UUID app_uuid128;
tBT_UUID svc_uuid;
- UINT16 svc_inst;
+ UINT16 svc_inst;
UINT16 s_handle;
UINT16 e_handle;
BOOLEAN is_primary; /* primary service or secondary */
} tBTA_GATTS_HNDL_RANGE;
-#define BTA_GATTS_SRV_CHG_CMD_ADD_CLIENT GATTS_SRV_CHG_CMD_ADD_CLIENT
-#define BTA_GATTS_SRV_CHG_CMD_UPDATE_CLIENT GATTS_SRV_CHG_CMD_UPDATE_CLIENT
-#define BTA_GATTS_SRV_CHG_CMD_REMOVE_CLIENT GATTS_SRV_CHG_CMD_REMOVE_CLIENT
-#define BTA_GATTS_SRV_CHG_CMD_READ_NUM_CLENTS GATTS_SRV_CHG_CMD_READ_NUM_CLENTS
-#define BTA_GATTS_SRV_CHG_CMD_READ_CLENT GATTS_SRV_CHG_CMD_READ_CLENT
+#define BTA_GATTS_SRV_CHG_CMD_ADD_CLIENT GATTS_SRV_CHG_CMD_ADD_CLIENT
+#define BTA_GATTS_SRV_CHG_CMD_UPDATE_CLIENT GATTS_SRV_CHG_CMD_UPDATE_CLIENT
+#define BTA_GATTS_SRV_CHG_CMD_REMOVE_CLIENT GATTS_SRV_CHG_CMD_REMOVE_CLIENT
+#define BTA_GATTS_SRV_CHG_CMD_READ_NUM_CLENTS GATTS_SRV_CHG_CMD_READ_NUM_CLENTS
+#define BTA_GATTS_SRV_CHG_CMD_READ_CLENT GATTS_SRV_CHG_CMD_READ_CLENT
typedef tGATTS_SRV_CHG_CMD tBTA_GATTS_SRV_CHG_CMD;
typedef tGATTS_SRV_CHG tBTA_GATTS_SRV_CHG;
@@ -435,15 +435,15 @@ enum
{
BTA_GATT_TRANSPORT_LE,
BTA_GATT_TRANSPORT_BR_EDR,
- BTA_GATT_TRANSPORT_LE_BR_EDR
+ BTA_GATT_TRANSPORT_LE_BR_EDR
};
typedef UINT8 tBTA_GATT_TRANSPORT;
/* attribute value */
-typedef tGATT_VALUE tBTA_GATT_VALUE;
+typedef tGATT_VALUE tBTA_GATT_VALUE;
/* attribute response data */
-typedef tGATTS_RSP tBTA_GATTS_RSP;
+typedef tGATTS_RSP tBTA_GATTS_RSP;
/* attribute request data from the client */
#define BTA_GATT_PREP_WRITE_CANCEL 0x00
@@ -551,13 +551,13 @@ extern "C"
**
** Function BTA_GATTC_AppRegister
**
-** Description This function is called to register application callbacks
+** Description This function is called to register application callbacks
** with BTA GATTC module.
**
** Parameters p_app_uuid - applicaiton UUID
** p_client_cb - pointer to the application callback function.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
BTA_API extern void BTA_GATTC_AppRegister(tBT_UUID *p_app_uuid, tBTA_GATTC_CBACK *p_client_cb);
@@ -566,12 +566,12 @@ BTA_API extern void BTA_GATTC_AppRegister(tBT_UUID *p_app_uuid, tBTA_GATTC_CBACK
**
** Function BTA_GATTC_AppDeregister
**
-** Description This function is called to deregister an application
+** Description This function is called to deregister an application
** from BTA GATTC module.
**
** Parameters client_if - client interface identifier.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
BTA_API extern void BTA_GATTC_AppDeregister (tBTA_GATTC_IF client_if);
@@ -582,7 +582,7 @@ BTA_API extern void BTA_GATTC_AppDeregister (tBTA_GATTC_IF client_if);
**
** Description Open a direct connection or add a background auto connection
** bd address
-**
+**
** Parameters client_if: server interface.
** remote_bda: remote device BD address.
** is_direct: direct connection or background auto connection
@@ -598,7 +598,7 @@ BTA_API extern void BTA_GATTC_Open(tBTA_GATTC_IF client_if, BD_ADDR remote_bda,
**
** Description Open a direct connection or add a background auto connection
** bd address
-**
+**
** Parameters client_if: server interface.
** remote_bda: remote device BD address.
** is_direct: direct connection or background auto connection
@@ -613,7 +613,7 @@ BTA_API extern void BTA_GATTC_CancelOpen(tBTA_GATTC_IF client_if, BD_ADDR remote
** Function BTA_GATTC_Close
**
** Description Close a connection to a GATT server.
-**
+**
** Parameters conn_id: connectino ID to be closed.
**
** Returns void
@@ -625,16 +625,16 @@ BTA_API extern void BTA_GATTC_Close(UINT16 conn_id);
**
** Function BTA_GATTC_ServiceSearchRequest
**
-** Description This function is called to request a GATT service discovery
+** Description This function is called to request a GATT service discovery
** on a GATT server. This function report service search result
** by a callback event, and followed by a service search complete
** event.
**
-** Parameters conn_id: connection ID.
+** Parameters conn_id: connection ID.
** p_srvc_uuid: a UUID of the service application is interested in.
** If Null, discover for all services.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
BTA_API extern void BTA_GATTC_ServiceSearchRequest(UINT16 conn_id, tBT_UUID *p_srvc_uuid);
@@ -646,20 +646,20 @@ BTA_API extern void BTA_GATTC_ServiceSearchRequest(UINT16 conn_id, tBT_UUID *p_s
** Description This function is called to find the first charatceristic of the
** service on the given server.
**
-** Parameters conn_id: connection ID which identify the server.
+** Parameters conn_id: connection ID which identify the server.
** p_srvc_id: the service ID of which the characteristic is belonged to.
** p_char_uuid_cond: Characteristic UUID, if NULL find the first available
-** characteristic.
-** p_char_result: output parameter which will store the GATT
+** characteristic.
+** p_char_result: output parameter which will store the GATT
** characteristic ID.
** p_property: output parameter to carry the characteristic property.
**
-** Returns returns status.
+** Returns returns status.
**
*******************************************************************************/
-BTA_API extern tBTA_GATT_STATUS BTA_GATTC_GetFirstChar (UINT16 conn_id,
- tBTA_GATT_SRVC_ID *p_srvc_id,
- tBT_UUID *p_char_uuid_cond,
+BTA_API extern tBTA_GATT_STATUS BTA_GATTC_GetFirstChar (UINT16 conn_id,
+ tBTA_GATT_SRVC_ID *p_srvc_id,
+ tBT_UUID *p_char_uuid_cond,
tBTA_GATTC_CHAR_ID *p_char_result,
tBTA_GATT_CHAR_PROP *p_property);
@@ -670,21 +670,21 @@ BTA_API extern tBTA_GATT_STATUS BTA_GATTC_GetFirstChar (UINT16 con
** Description This function is called to find the next charatceristic of the
** service on the given server.
**
-** Parameters conn_id: connection ID which identify the server.
-** p_start_char_id: start the characteristic search from the next record
+** Parameters conn_id: connection ID which identify the server.
+** p_start_char_id: start the characteristic search from the next record
** after the one identified by char_id.
** p_char_uuid_cond: Characteristic UUID, if NULL find the first available
-** characteristic.
-** p_char_result: output parameter which will store the GATT
-** characteristic ID.
+** characteristic.
+** p_char_result: output parameter which will store the GATT
+** characteristic ID.
** p_property: output parameter, characteristic property.
**
-** Returns returns status.
+** Returns returns status.
**
*******************************************************************************/
-BTA_API extern tBTA_GATT_STATUS BTA_GATTC_GetNextChar (UINT16 conn_id,
+BTA_API extern tBTA_GATT_STATUS BTA_GATTC_GetNextChar (UINT16 conn_id,
tBTA_GATTC_CHAR_ID *p_start_char_id,
- tBT_UUID *p_char_uuid_cond,
+ tBT_UUID *p_char_uuid_cond,
tBTA_GATTC_CHAR_ID *p_char_result,
tBTA_GATT_CHAR_PROP *p_property);
@@ -695,18 +695,18 @@ BTA_API extern tBTA_GATT_STATUS BTA_GATTC_GetNextChar (UINT16 conn_id,
** Description This function is called to find the first charatceristic descriptor of the
** charatceristic on the given server.
**
-** Parameters conn_id: connection ID which identify the server.
+** Parameters conn_id: connection ID which identify the server.
** p_char_id: the characteristic ID of which the descriptor is belonged to.
** p_descr_uuid_cond: Characteristic Descr UUID, if NULL find the first available
-** characteristic.
-** p_descr_result: output parameter which will store the GATT
+** characteristic.
+** p_descr_result: output parameter which will store the GATT
** characteristic descriptor ID.
**
-** Returns returns status.
+** Returns returns status.
**
*******************************************************************************/
-BTA_API extern tBTA_GATT_STATUS BTA_GATTC_GetFirstCharDescr (UINT16 conn_id, tBTA_GATTC_CHAR_ID *p_char_id,
- tBT_UUID *p_descr_uuid_cond,
+BTA_API extern tBTA_GATT_STATUS BTA_GATTC_GetFirstCharDescr (UINT16 conn_id, tBTA_GATTC_CHAR_ID *p_char_id,
+ tBT_UUID *p_descr_uuid_cond,
tBTA_GATTC_CHAR_DESCR_ID *p_descr_result);
/*******************************************************************************
@@ -716,20 +716,20 @@ BTA_API extern tBTA_GATT_STATUS BTA_GATTC_GetFirstCharDescr (UINT16 conn_id, tB
** Description This function is called to find the next charatceristic of the
** service on the given server.
**
-** Parameters conn_id: connection ID which identify the server.
-** p_start_descr_id: start the characteristic search from the next record
+** Parameters conn_id: connection ID which identify the server.
+** p_start_descr_id: start the characteristic search from the next record
** after the one identified by p_start_descr_id.
-** p_descr_uuid_cond: Characteristic descriptor UUID, if NULL find
-** the first available characteristic descriptor.
-** p_descr_result: output parameter which will store the GATT
-** characteristic descriptor ID.
+** p_descr_uuid_cond: Characteristic descriptor UUID, if NULL find
+** the first available characteristic descriptor.
+** p_descr_result: output parameter which will store the GATT
+** characteristic descriptor ID.
**
-** Returns returns status.
+** Returns returns status.
**
*******************************************************************************/
-BTA_API extern tBTA_GATT_STATUS BTA_GATTC_GetNextCharDescr (UINT16 conn_id,
+BTA_API extern tBTA_GATT_STATUS BTA_GATTC_GetNextCharDescr (UINT16 conn_id,
tBTA_GATTC_CHAR_DESCR_ID *p_start_descr_id,
- tBT_UUID *p_descr_uuid_cond,
+ tBT_UUID *p_descr_uuid_cond,
tBTA_GATTC_CHAR_DESCR_ID *p_descr_result);
@@ -740,19 +740,19 @@ BTA_API extern tBTA_GATT_STATUS BTA_GATTC_GetNextCharDescr (UINT16 conn_id,
** Description This function is called to find the first included service of the
** service on the given server.
**
-** Parameters conn_id: connection ID which identify the server.
-** p_srvc_id: the service ID of which the included service is belonged to.
+** Parameters conn_id: connection ID which identify the server.
+** p_srvc_id: the service ID of which the included service is belonged to.
** p_uuid_cond: include service UUID, if NULL find the first available
-** included service.
-** p_result: output parameter which will store the GATT ID
+** included service.
+** p_result: output parameter which will store the GATT ID
** of the included service found.
**
-** Returns returns status.
+** Returns returns status.
**
*******************************************************************************/
-BTA_API extern tBTA_GATT_STATUS BTA_GATTC_GetFirstIncludedService(UINT16 conn_id,
- tBTA_GATT_SRVC_ID *p_srvc_id,
- tBT_UUID *p_uuid_cond,
+BTA_API extern tBTA_GATT_STATUS BTA_GATTC_GetFirstIncludedService(UINT16 conn_id,
+ tBTA_GATT_SRVC_ID *p_srvc_id,
+ tBT_UUID *p_uuid_cond,
tBTA_GATTC_INCL_SVC_ID *p_result);
/*******************************************************************************
@@ -762,20 +762,20 @@ BTA_API extern tBTA_GATT_STATUS BTA_GATTC_GetFirstIncludedService(UINT16 conn_i
** Description This function is called to find the next included service of the
** service on the given server.
**
-** Parameters conn_id: connection ID which identify the server.
-** p_start_id: start the search from the next record
-** after the one identified by p_start_id.
+** Parameters conn_id: connection ID which identify the server.
+** p_start_id: start the search from the next record
+** after the one identified by p_start_id.
** p_uuid_cond: Included service UUID, if NULL find the first available
-** included service.
-** p_result: output parameter which will store the GATT ID
+** included service.
+** p_result: output parameter which will store the GATT ID
** of the included service found.
**
-** Returns returns status.
+** Returns returns status.
**
*******************************************************************************/
-BTA_API extern tBTA_GATT_STATUS BTA_GATTC_GetNextIncludedService(UINT16 conn_id,
+BTA_API extern tBTA_GATT_STATUS BTA_GATTC_GetNextIncludedService(UINT16 conn_id,
tBTA_GATTC_INCL_SVC_ID *p_start_id,
- tBT_UUID *p_uuid_cond,
+ tBT_UUID *p_uuid_cond,
tBTA_GATTC_INCL_SVC_ID *p_result);
/*******************************************************************************
@@ -788,10 +788,10 @@ BTA_API extern tBTA_GATT_STATUS BTA_GATTC_GetNextIncludedService(UINT16 conn_id
** Parameters conn_id - connectino ID.
** p_char_id - characteritic ID to read.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
-BTA_API extern void BTA_GATTC_ReadCharacteristic (UINT16 conn_id,
+BTA_API extern void BTA_GATTC_ReadCharacteristic (UINT16 conn_id,
tBTA_GATTC_CHAR_ID *p_char_id,
tBTA_GATT_AUTH_REQ auth_req);
@@ -804,10 +804,10 @@ BTA_API extern void BTA_GATTC_ReadCharacteristic (UINT16 conn_id,
** Parameters conn_id - connection ID.
** p_char_descr_id - characteritic descriptor ID to read.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
-BTA_API extern void BTA_GATTC_ReadCharDescr (UINT16 conn_id,
+BTA_API extern void BTA_GATTC_ReadCharDescr (UINT16 conn_id,
tBTA_GATTC_CHAR_DESCR_ID *p_char_descr_id,
tBTA_GATT_AUTH_REQ auth_req);
@@ -823,11 +823,11 @@ BTA_API extern void BTA_GATTC_ReadCharDescr (UINT16 conn_id,
** len: length of the data to be written.
** p_value - the value to be written.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
-BTA_API extern void BTA_GATTC_WriteCharValue (UINT16 conn_id,
- tBTA_GATTC_CHAR_ID *p_char_id,
+BTA_API extern void BTA_GATTC_WriteCharValue (UINT16 conn_id,
+ tBTA_GATTC_CHAR_ID *p_char_id,
tBTA_GATTC_WRITE_TYPE write_type,
UINT16 len,
UINT8 *p_value,
@@ -844,11 +844,11 @@ BTA_API extern void BTA_GATTC_WriteCharValue (UINT16 conn_id,
** write_type - type of write.
** p_value - the value to be written.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
-BTA_API extern void BTA_GATTC_WriteCharDescr (UINT16 conn_id,
- tBTA_GATTC_CHAR_DESCR_ID *p_char_descr_id,
+BTA_API extern void BTA_GATTC_WriteCharDescr (UINT16 conn_id,
+ tBTA_GATTC_CHAR_DESCR_ID *p_char_descr_id,
tBTA_GATTC_WRITE_TYPE write_type,
tBTA_GATT_UNFMT *p_data,
tBTA_GATT_AUTH_REQ auth_req);
@@ -862,7 +862,7 @@ BTA_API extern void BTA_GATTC_WriteCharDescr (UINT16 conn_id,
** Parameters conn_id - connection ID.
** p_char_id - characteristic ID to confrim.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
BTA_API extern void BTA_GATTC_SendIndConfirm (UINT16 conn_id, tBTA_GATTC_CHAR_ID *p_char_id);
@@ -875,13 +875,13 @@ BTA_API extern void BTA_GATTC_SendIndConfirm (UINT16 conn_id, tBTA_GATTC_CHAR_ID
**
** Parameters client_if - client interface.
** remote_bda - target GATT server.
-** p_char_id - pointer to GATT characteristic ID.
+** p_char_id - pointer to GATT characteristic ID.
**
-** Returns OK if registration succeed, otherwise failed.
+** Returns OK if registration succeed, otherwise failed.
**
*******************************************************************************/
-BTA_API extern tBTA_GATT_STATUS BTA_GATTC_RegisterForNotifications (tBTA_GATTC_IF client_if,
- BD_ADDR remote_bda,
+BTA_API extern tBTA_GATT_STATUS BTA_GATTC_RegisterForNotifications (tBTA_GATTC_IF client_if,
+ BD_ADDR remote_bda,
tBTA_GATTC_CHAR_ID *p_char_id);
@@ -895,11 +895,11 @@ BTA_API extern tBTA_GATT_STATUS BTA_GATTC_RegisterForNotifications (tBTA_GATTC_I
** remote_bda - target GATT server.
** p_char_id - pointer to a GATT characteristic ID.
**
-** Returns OK if deregistration succeed, otherwise failed.
+** Returns OK if deregistration succeed, otherwise failed.
**
*******************************************************************************/
-BTA_API extern tBTA_GATT_STATUS BTA_GATTC_DeregisterForNotifications (tBTA_GATTC_IF client_if,
- BD_ADDR remote_bda,
+BTA_API extern tBTA_GATT_STATUS BTA_GATTC_DeregisterForNotifications (tBTA_GATTC_IF client_if,
+ BD_ADDR remote_bda,
tBTA_GATTC_CHAR_ID *p_char_id);
/*******************************************************************************
@@ -914,11 +914,11 @@ BTA_API extern tBTA_GATT_STATUS BTA_GATTC_DeregisterForNotifications (tBTA_GATTC
** len: length of the data to be written.
** p_value - the value to be written.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
-BTA_API extern void BTA_GATTC_PrepareWrite (UINT16 conn_id,
- tBTA_GATTC_CHAR_ID *p_char_id,
+BTA_API extern void BTA_GATTC_PrepareWrite (UINT16 conn_id,
+ tBTA_GATTC_CHAR_ID *p_char_id,
UINT16 offset,
UINT16 len,
UINT8 *p_value,
@@ -933,7 +933,7 @@ BTA_API extern void BTA_GATTC_PrepareWrite (UINT16 conn_id,
** Parameters conn_id - connection ID.
** is_execute - execute or cancel.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
BTA_API extern void BTA_GATTC_ExecuteWrite (UINT16 conn_id, BOOLEAN is_execute);
@@ -948,7 +948,7 @@ BTA_API extern void BTA_GATTC_ExecuteWrite (UINT16 conn_id, BOOLEAN is_execute)
** Parameters conn_id - connectino ID.
** p_read_multi - read multiple parameters.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
BTA_API extern void BTA_GATTC_ReadMultiple(UINT16 conn_id, tBTA_GATTC_MULTI *p_read_multi,
@@ -964,13 +964,13 @@ BTA_API extern void BTA_GATTC_ReadMultiple(UINT16 conn_id, tBTA_GATTC_MULTI *p_r
**
** Function BTA_GATTS_AppRegister
**
-** Description This function is called to register application callbacks
+** Description This function is called to register application callbacks
** with BTA GATTS module.
**
** Parameters p_app_uuid - applicaiton UUID
** p_cback - pointer to the application callback function.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
BTA_API extern void BTA_GATTS_AppRegister(tBT_UUID *p_app_uuid, tBTA_GATTS_CBACK *p_cback);
@@ -981,7 +981,7 @@ BTA_API extern void BTA_GATTC_ReadMultiple(UINT16 conn_id, tBTA_GATTC_MULTI *p_r
** Function BTA_GATTS_AppDeregister
**
** Description De-register with BTA GATT Server.
-**
+**
** Parameters server_if: server interface
**
** Returns void
@@ -994,11 +994,11 @@ BTA_API extern void BTA_GATTC_ReadMultiple(UINT16 conn_id, tBTA_GATTC_MULTI *p_r
** Function BTA_GATTS_CreateService
**
** Description Create a service. When service creation is done, a callback
-** event BTA_GATTS_CREATE_SRVC_EVT is called to report status
+** event BTA_GATTS_CREATE_SRVC_EVT is called to report status
** and service ID to the profile. The service ID obtained in
** the callback function needs to be used when adding included
** service and characteristics/descriptors into the service.
-**
+**
** Parameters server_if: server interface.
** p_service_uuid: service UUID.
** inst: instance ID number of this service.
@@ -1008,7 +1008,7 @@ BTA_API extern void BTA_GATTC_ReadMultiple(UINT16 conn_id, tBTA_GATTC_MULTI *p_r
** Returns void
**
*******************************************************************************/
- BTA_API extern void BTA_GATTS_CreateService(tBTA_GATTS_IF server_if, tBT_UUID *p_service_uuid,
+ BTA_API extern void BTA_GATTS_CreateService(tBTA_GATTS_IF server_if, tBT_UUID *p_service_uuid,
UINT8 inst, UINT16 num_handle, BOOLEAN is_primary);
/*******************************************************************************
@@ -1018,8 +1018,8 @@ BTA_API extern void BTA_GATTC_ReadMultiple(UINT16 conn_id, tBTA_GATTC_MULTI *p_r
** Description This function is called to add an included service. After included
** service is included, a callback event BTA_GATTS_ADD_INCL_SRVC_EVT
** is reported the included service ID.
-**
-** Parameters service_id: service ID to which this included service is to
+**
+** Parameters service_id: service ID to which this included service is to
** be added.
** included_service_id: the service ID to be included.
**
@@ -1033,14 +1033,14 @@ BTA_API extern void BTA_GATTC_ReadMultiple(UINT16 conn_id, tBTA_GATTC_MULTI *p_r
** Function BTA_GATTS_AddCharacteristic
**
** Description This function is called to add a characteristic into a service.
-**
-** Parameters service_id: service ID to which this included service is to
+**
+** Parameters service_id: service ID to which this included service is to
** be added.
** p_char_uuid : Characteristic UUID.
** perm : Characteristic value declaration attribute permission.
** property : Characteristic Properties
**
-** Returns None
+** Returns None
**
*******************************************************************************/
BTA_API extern void BTA_GATTS_AddCharacteristic (UINT16 service_id, tBT_UUID *p_char_uuid,
@@ -1050,20 +1050,20 @@ BTA_API extern void BTA_GATTC_ReadMultiple(UINT16 conn_id, tBTA_GATTC_MULTI *p_r
**
** Function BTA_GATTS_AddCharDescriptor
**
-** Description This function is called to add characteristic descriptor. When
+** Description This function is called to add characteristic descriptor. When
** it's done, a callback event BTA_GATTS_ADD_DESCR_EVT is called
** to report the status and an ID number for this descriptor.
**
-** Parameters service_id: service ID to which this charatceristic descriptor is to
+** Parameters service_id: service ID to which this charatceristic descriptor is to
** be added.
** perm: descriptor access permission.
-** p_descr_uuid: descriptor UUID.
+** p_descr_uuid: descriptor UUID.
** p_descr_params: descriptor value if it's read only descriptor.
**
-** Returns returns status.
+** Returns returns status.
**
*******************************************************************************/
- BTA_API extern void BTA_GATTS_AddCharDescriptor (UINT16 service_id,
+ BTA_API extern void BTA_GATTS_AddCharDescriptor (UINT16 service_id,
tBTA_GATT_PERM perm,
tBT_UUID * p_descr_uuid);
@@ -1071,12 +1071,12 @@ BTA_API extern void BTA_GATTC_ReadMultiple(UINT16 conn_id, tBTA_GATTC_MULTI *p_r
**
** Function BTA_GATTS_DeleteService
**
-** Description This function is called to delete a service. When this is done,
+** Description This function is called to delete a service. When this is done,
** a callback event BTA_GATTS_DELETE_EVT is report with the status.
**
-** Parameters service_id: service_id to be deleted.
+** Parameters service_id: service_id to be deleted.
**
-** Returns returns none.
+** Returns returns none.
**
*******************************************************************************/
BTA_API extern void BTA_GATTS_DeleteService(UINT16 service_id);
@@ -1090,7 +1090,7 @@ BTA_API extern void BTA_GATTC_ReadMultiple(UINT16 conn_id, tBTA_GATTC_MULTI *p_r
** Parameters service_id: the service ID to be started.
** sup_transport: supported trasnport.
**
-** Returns None.
+** Returns None.
**
*******************************************************************************/
BTA_API extern void BTA_GATTS_StartService(UINT16 service_id, tBTA_GATT_TRANSPORT sup_transport);
@@ -1103,7 +1103,7 @@ BTA_API extern void BTA_GATTC_ReadMultiple(UINT16 conn_id, tBTA_GATTC_MULTI *p_r
**
** Parameters service_id - service to be topped.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
BTA_API extern void BTA_GATTS_StopService(UINT16 service_id);
@@ -1120,12 +1120,12 @@ BTA_API extern void BTA_GATTC_ReadMultiple(UINT16 conn_id, tBTA_GATTC_MULTI *p_r
** p_data: data to indicate.
** need_confirm - if this indication expects a confirmation or not.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
- BTA_API extern void BTA_GATTS_HandleValueIndication (UINT16 conn_id, UINT16 attr_id,
- UINT16 data_len,
- UINT8 *p_data,
+ BTA_API extern void BTA_GATTS_HandleValueIndication (UINT16 conn_id, UINT16 attr_id,
+ UINT16 data_len,
+ UINT8 *p_data,
BOOLEAN need_confirm);
/*******************************************************************************
@@ -1139,10 +1139,10 @@ BTA_API extern void BTA_GATTC_ReadMultiple(UINT16 conn_id, tBTA_GATTC_MULTI *p_r
** status - response status
** p_msg - response data.
**
-** Returns None
+** Returns None
**
*******************************************************************************/
- BTA_API extern void BTA_GATTS_SendRsp (UINT16 conn_id, UINT32 trans_id,
+ BTA_API extern void BTA_GATTS_SendRsp (UINT16 conn_id, UINT32 trans_id,
tBTA_GATT_STATUS status, tBTA_GATTS_RSP *p_msg);
@@ -1154,7 +1154,7 @@ BTA_API extern void BTA_GATTC_ReadMultiple(UINT16 conn_id, tBTA_GATTC_MULTI *p_r
**
** Description Open a direct open connection or add a background auto connection
** bd address
-**
+**
** Parameters server_if: server interface.
** remote_bda: remote device BD address.
** is_direct: direct connection or background auto connection
@@ -1171,7 +1171,7 @@ BTA_API extern void BTA_GATTC_ReadMultiple(UINT16 conn_id, tBTA_GATTC_MULTI *p_r
**
** Description Cancel a direct open connection or remove a background auto connection
** bd address
-**
+**
** Parameters server_if: server interface.
** remote_bda: remote device BD address.
** is_direct: direct connection or background auto connection
@@ -1187,7 +1187,7 @@ BTA_API extern void BTA_GATTC_ReadMultiple(UINT16 conn_id, tBTA_GATTC_MULTI *p_r
** Function BTA_GATTS_Close
**
** Description Close a connection a remote device.
-**
+**
** Parameters conn_id: connectino ID to be closed.
**
** Returns void
@@ -1197,7 +1197,7 @@ BTA_API extern void BTA_GATTC_ReadMultiple(UINT16 conn_id, tBTA_GATTC_MULTI *p_r
#ifdef __cplusplus
-
+
}
#endif
diff --git a/bta/include/bta_gattc_ci.h b/bta/include/bta_gattc_ci.h
index 65941fc..cb97d19 100644
--- a/bta/include/bta_gattc_ci.h
+++ b/bta/include/bta_gattc_ci.h
@@ -56,10 +56,10 @@ extern "C"
** status - BTA_GATT_OK if full buffer of data,
** BTA_GATT_FAIL if an error has occurred.
**
-** Returns void
+** Returns void
**
*******************************************************************************/
-BTA_API extern void bta_gattc_ci_cache_open(BD_ADDR server_bda, UINT16 evt,
+BTA_API extern void bta_gattc_ci_cache_open(BD_ADDR server_bda, UINT16 evt,
tBTA_GATT_STATUS status, UINT16 conn_id);
/*******************************************************************************
@@ -68,18 +68,18 @@ BTA_API extern void bta_gattc_ci_cache_open(BD_ADDR server_bda, UINT16 evt,
**
** Description This function sends an event to BTA indicating the phone has
** load the servere cache and ready to send it to the stack.
-**
+**
** Parameters server_bda - server BDA of this cache.
** num_bytes_read - number of bytes read into the buffer
** specified in the read callout-function.
** status - BTA_GATT_OK if full buffer of data,
** BTA_GATT_FAIL if an error has occurred.
**
-** Returns void
+** Returns void
**
*******************************************************************************/
-BTA_API extern void bta_gattc_ci_cache_load(BD_ADDR server_bda, UINT16 evt,
- UINT16 num_attr, tBTA_GATTC_NV_ATTR *p_atrr,
+BTA_API extern void bta_gattc_ci_cache_load(BD_ADDR server_bda, UINT16 evt,
+ UINT16 num_attr, tBTA_GATTC_NV_ATTR *p_atrr,
tBTA_GATT_STATUS status, UINT16 conn_id);
/*******************************************************************************
@@ -88,15 +88,15 @@ BTA_API extern void bta_gattc_ci_cache_load(BD_ADDR server_bda, UINT16 evt,
**
** Description This function sends an event to BTA indicating the phone has
** save the server cache.
-**
+**
** Parameters server_bda - server BDA of this cache.
** status - BTA_GATT_OK if full buffer of data,
** BTA_GATT_FAIL if an error has occurred.
**
-** Returns void
+** Returns void
**
*******************************************************************************/
-BTA_API extern void bta_gattc_ci_cache_save(BD_ADDR server_bda, UINT16 evt,
+BTA_API extern void bta_gattc_ci_cache_save(BD_ADDR server_bda, UINT16 evt,
tBTA_GATT_STATUS status, UINT16 conn_id);
diff --git a/bta/include/bta_gattc_co.h b/bta/include/bta_gattc_co.h
index 0aedf9f..a56af42 100644
--- a/bta/include/bta_gattc_co.h
+++ b/bta/include/bta_gattc_co.h
@@ -29,7 +29,7 @@
** Returns void.
**
*******************************************************************************/
-BTA_API extern void bta_gattc_co_cache_open(BD_ADDR server_bda, UINT16 evt,
+BTA_API extern void bta_gattc_co_cache_open(BD_ADDR server_bda, UINT16 evt,
UINT16 conn_id, BOOLEAN to_save);
/*******************************************************************************
@@ -37,7 +37,7 @@ BTA_API extern void bta_gattc_co_cache_open(BD_ADDR server_bda, UINT16 evt,
** Function bta_gattc_co_cache_close
**
** Description This callout function is executed by GATTC when a GATT server
-** cache is written completely.
+** cache is written completely.
**
** Parameter server_bda: server bd address of this cache belongs to
** conn_id: connection ID of this cache operation attach to.
@@ -53,18 +53,18 @@ BTA_API extern void bta_gattc_co_cache_close(BD_ADDR server_bda, UINT16 conn_id)
**
** Description This callout function is executed by GATT when a server cache
** is available to save.
-**
+**
** Parameter server_bda: server bd address of this cache belongs to
** evt: call in event to be passed in when cache save is done.
** num_attr: number of attribute to be save.
** p_attr: pointer to the list of attributes to save.
** attr_index: starting attribute index of the save operation.
** conn_id: connection ID of this cache operation attach to.
-** Returns
+** Returns
**
*******************************************************************************/
-BTA_API extern void bta_gattc_co_cache_save(BD_ADDR server_bda, UINT16 evt,
- UINT16 num_attr, tBTA_GATTC_NV_ATTR *p_attr,
+BTA_API extern void bta_gattc_co_cache_save(BD_ADDR server_bda, UINT16 evt,
+ UINT16 num_attr, tBTA_GATTC_NV_ATTR *p_attr,
UINT16 attr_index, UINT16 conn_id);
/*******************************************************************************
@@ -73,16 +73,16 @@ BTA_API extern void bta_gattc_co_cache_save(BD_ADDR server_bda, UINT16 evt,
**
** Description This callout function is executed by GATT when server cache
** is required to load.
-**
+**
** Parameter server_bda: server bd address of this cache belongs to
** evt: call in event to be passed in when cache save is done.
** num_attr: number of attribute to be save.
** attr_index: starting attribute index of the save operation.
** conn_id: connection ID of this cache operation attach to.
-** Returns
+** Returns
**
*******************************************************************************/
-BTA_API extern void bta_gattc_co_cache_load(BD_ADDR server_bda, UINT16 evt,
+BTA_API extern void bta_gattc_co_cache_load(BD_ADDR server_bda, UINT16 evt,
UINT16 start_index, UINT16 conn_id);
#endif /* BTA_GATT_CO_H */
diff --git a/bta/include/bta_gatts_co.h b/bta/include/bta_gatts_co.h
index cb1ff76..084cc0e 100644
--- a/bta/include/bta_gatts_co.h
+++ b/bta/include/bta_gatts_co.h
@@ -40,14 +40,14 @@ BTA_API extern void bta_gatts_co_update_handle_range(BOOLEAN is_add, tBTA_GATTS_
** Parameter cmd - request command
** p_req - request paramters
** p_rsp - response data for the request
-**
+**
** Returns TRUE - if the request is processed successfully and
** the response is returned in p_rsp.
** FASLE - if the request can not be processed
**
*******************************************************************************/
-BTA_API extern BOOLEAN bta_gatts_co_srv_chg(tBTA_GATTS_SRV_CHG_CMD cmd,
- tBTA_GATTS_SRV_CHG_REQ *p_req,
+BTA_API extern BOOLEAN bta_gatts_co_srv_chg(tBTA_GATTS_SRV_CHG_CMD cmd,
+ tBTA_GATTS_SRV_CHG_REQ *p_req,
tBTA_GATTS_SRV_CHG_RSP *p_rsp);
/*******************************************************************************
@@ -55,14 +55,14 @@ BTA_API extern BOOLEAN bta_gatts_co_srv_chg(tBTA_GATTS_SRV_CHG_CMD cmd,
** Function bta_gatts_co_load_handle_range
**
** Description This callout function is executed by GATTS when a GATT server
-** handle range is requested to be loaded from NV.
+** handle range is requested to be loaded from NV.
**
-** Parameter
+** Parameter
**
** Returns void.
**
*******************************************************************************/
-BTA_API extern BOOLEAN bta_gatts_co_load_handle_range(UINT8 index,
+BTA_API extern BOOLEAN bta_gatts_co_load_handle_range(UINT8 index,
tBTA_GATTS_HNDL_RANGE *p_handle);
diff --git a/bta/include/bta_hh_api.h b/bta/include/bta_hh_api.h
index dd9a528..869c22b 100755..100644
--- a/bta/include/bta_hh_api.h
+++ b/bta/include/bta_hh_api.h
@@ -21,11 +21,11 @@
#define BTA_HH_DEBUG FALSE
#endif
-#ifndef BTA_HH_SSR_MAX_LATENCY_DEF
+#ifndef BTA_HH_SSR_MAX_LATENCY_DEF
#define BTA_HH_SSR_MAX_LATENCY_DEF 1600
#endif
-#ifndef BTA_HH_SSR_MIN_TOUT_DEF
+#ifndef BTA_HH_SSR_MIN_TOUT_DEF
#define BTA_HH_SSR_MIN_TOUT_DEF 2
#endif
@@ -52,7 +52,7 @@ typedef UINT16 tBTA_HH_EVT;
/* defined the minimum offset */
#define BTA_HH_MIN_OFFSET L2CAP_MIN_OFFSET+1
-#define BTA_HH_MAX_KNOWN HID_HOST_MAX_DEVICES
+#define BTA_HH_MAX_KNOWN HID_HOST_MAX_DEVICES
/* invalid device handle */
#define BTA_HH_INVALID_HANDLE 0xff
@@ -71,13 +71,13 @@ typedef UINT8 tBTA_HH_BOOT_RPT_ID;
/* type of devices, bit mask */
#define BTA_HH_DEVT_UNKNOWN 0x00
-#define BTA_HH_DEVT_JOS 0x01 /* joy stick */
+#define BTA_HH_DEVT_JOS 0x01 /* joy stick */
#define BTA_HH_DEVT_GPD 0x02 /* game pad */
#define BTA_HH_DEVT_RMC 0x03 /* remote control */
#define BTA_HH_DEVT_SED 0x04 /* sensing device */
#define BTA_HH_DEVT_DGT 0x05 /* Digitizer tablet */
#define BTA_HH_DEVT_CDR 0x06 /* card reader */
-#define BTA_HH_DEVT_KBD 0x10 /* keyboard */
+#define BTA_HH_DEVT_KBD 0x10 /* keyboard */
#define BTA_HH_DEVT_MIC 0x20 /* pointing device */
#define BTA_HH_DEVT_COM 0x30 /* Combo keyboard/pointing */
#define BTA_HH_DEVT_OTHER 0x80
@@ -88,14 +88,14 @@ enum
BTA_HH_OK,
BTA_HH_HS_HID_NOT_READY, /* handshake error : device not ready */
BTA_HH_HS_INVALID_RPT_ID, /* handshake error : invalid report ID */
- BTA_HH_HS_TRANS_NOT_SPT, /* handshake error : transaction not spt */
- BTA_HH_HS_INVALID_PARAM, /* handshake error : invalid paremter */
+ BTA_HH_HS_TRANS_NOT_SPT, /* handshake error : transaction not spt */
+ BTA_HH_HS_INVALID_PARAM, /* handshake error : invalid paremter */
BTA_HH_HS_ERROR, /* handshake error : unspecified HS error */
BTA_HH_ERR, /* general BTA HH error */
BTA_HH_ERR_SDP, /* SDP error */
- BTA_HH_ERR_PROTO, /* SET_Protocol error,
+ BTA_HH_ERR_PROTO, /* SET_Protocol error,
only used in BTA_HH_OPEN_EVT callback */
- BTA_HH_ERR_DB_FULL, /* device database full error, used in
+ BTA_HH_ERR_DB_FULL, /* device database full error, used in
BTA_HH_OPEN_EVT/BTA_HH_ADD_DEV_EVT */
BTA_HH_ERR_TOD_UNSPT, /* type of device not supported */
BTA_HH_ERR_NO_RES, /* out of system resources */
@@ -105,14 +105,14 @@ enum
typedef UINT8 tBTA_HH_STATUS;
-#define BTA_HH_VIRTUAL_CABLE HID_VIRTUAL_CABLE
-#define BTA_HH_NORMALLY_CONNECTABLE HID_NORMALLY_CONNECTABLE
-#define BTA_HH_RECONN_INIT HID_RECONN_INIT
-#define BTA_HH_SDP_DISABLE HID_SDP_DISABLE
-#define BTA_HH_BATTERY_POWER HID_BATTERY_POWER
-#define BTA_HH_REMOTE_WAKE HID_REMOTE_WAKE
-#define BTA_HH_SUP_TOUT_AVLBL HID_SUP_TOUT_AVLBL
-#define BTA_HH_SEC_REQUIRED HID_SEC_REQUIRED
+#define BTA_HH_VIRTUAL_CABLE HID_VIRTUAL_CABLE
+#define BTA_HH_NORMALLY_CONNECTABLE HID_NORMALLY_CONNECTABLE
+#define BTA_HH_RECONN_INIT HID_RECONN_INIT
+#define BTA_HH_SDP_DISABLE HID_SDP_DISABLE
+#define BTA_HH_BATTERY_POWER HID_BATTERY_POWER
+#define BTA_HH_REMOTE_WAKE HID_REMOTE_WAKE
+#define BTA_HH_SUP_TOUT_AVLBL HID_SUP_TOUT_AVLBL
+#define BTA_HH_SEC_REQUIRED HID_SEC_REQUIRED
typedef UINT16 tBTA_HH_ATTR_MASK;
@@ -124,7 +124,7 @@ typedef struct
}tBTA_HH_SPT_TOD;
/* configuration struct */
-typedef struct
+typedef struct
{
UINT8 max_devt_spt; /* max number of types of devices spt */
tBTA_HH_SPT_TOD *p_devt_list; /* supported types of device list */
@@ -164,7 +164,7 @@ typedef struct
UINT16 ssr_max_latency; /* SSR max latency */
UINT16 ssr_min_tout; /* SSR min timeout */
UINT8 ctry_code; /*Country Code.*/
- tBTA_HH_DEV_DESCR descriptor;
+ tBTA_HH_DEV_DESCR descriptor;
}tBTA_HH_DEV_DSCP_INFO;
/* callback event data for BTA_HH_OPEN_EVT */
@@ -185,7 +185,7 @@ typedef struct
} tBTA_HH_CBDATA;
enum
-{
+{
BTA_HH_MOD_CTRL_KEY,
BTA_HH_MOD_SHFT_KEY,
BTA_HH_MOD_ALT_KEY,
@@ -197,7 +197,7 @@ enum
typedef struct
{
UINT8 this_char[6]; /* virtual key code */
- BOOLEAN mod_key[BTA_HH_MOD_MAX_KEY];
+ BOOLEAN mod_key[BTA_HH_MOD_MAX_KEY];
/* ctrl, shift, Alt, GUI */
/* modifier key: is Shift key pressed */
/* modifier key: is Ctrl key pressed */
@@ -223,7 +223,7 @@ typedef struct
{
tBTA_HH_KEYBD_RPT keybd_rpt; /* keyboard report */
tBTA_HH_MICE_RPT mice_rpt; /* mouse report */
- } data_rpt;
+ } data_rpt;
} tBTA_HH_BOOT_RPT;
/* handshake data */
@@ -245,7 +245,7 @@ typedef union
{
tBTA_HH_DEV_INFO dev_info; /* BTA_HH_ADD_DEV_EVT, BTA_HH_RMV_DEV_EVT */
tBTA_HH_CONN conn; /* BTA_HH_OPEN_EVT */
- tBTA_HH_CBDATA dev_status; /* BTA_HH_CLOSE_EVT,
+ tBTA_HH_CBDATA dev_status; /* BTA_HH_CLOSE_EVT,
BTA_HH_SET_PROTO_EVT
BTA_HH_SET_RPT_EVT
BTA_HH_SET_IDLE_EVT */
@@ -253,13 +253,13 @@ typedef union
tBTA_HH_STATUS status; /* BTA_HH_ENABLE_EVT */
tBTA_HH_DEV_DSCP_INFO dscp_info; /* BTA_HH_GET_DSCP_EVT */
tBTA_HH_HSDATA hs_data; /* GET_ transaction callback
- BTA_HH_GET_RPT_EVT
- BTA_HH_GET_PROTO_EVT
+ BTA_HH_GET_RPT_EVT
+ BTA_HH_GET_PROTO_EVT
BTA_HH_GET_IDLE_EVT */
} tBTA_HH;
/* BTA HH callback function */
-typedef void (tBTA_HH_CBACK) (tBTA_HH_EVT event, tBTA_HH *p_data);
+typedef void (tBTA_HH_CBACK) (tBTA_HH_EVT event, tBTA_HH *p_data);
/*****************************************************************************
@@ -274,7 +274,7 @@ extern "C"
**
** Function BTA_HhRegister
**
-** Description This function enable HID host and registers HID-Host with
+** Description This function enable HID host and registers HID-Host with
** lower layers.
**
** Returns void
@@ -297,14 +297,14 @@ BTA_API extern void BTA_HhDisable(void);
**
** Function BTA_HhOpen
**
-** Description This function is called to start an inquiry and read SDP
-** record of responding devices; connect to a device if only
+** Description This function is called to start an inquiry and read SDP
+** record of responding devices; connect to a device if only
** one active HID device is found.
**
** Returns void
**
*******************************************************************************/
-BTA_API extern void BTA_HhOpen (BD_ADDR dev_bda, tBTA_HH_PROTO_MODE mode,
+BTA_API extern void BTA_HhOpen (BD_ADDR dev_bda, tBTA_HH_PROTO_MODE mode,
tBTA_SEC sec_mask);
/*******************************************************************************
@@ -348,19 +348,19 @@ BTA_API extern void BTA_HhGetProtoMode(UINT8 dev_handle);
** Returns void
**
*******************************************************************************/
-BTA_API extern void BTA_HhSetReport(UINT8 dev_handle, tBTA_HH_RPT_TYPE r_type,
+BTA_API extern void BTA_HhSetReport(UINT8 dev_handle, tBTA_HH_RPT_TYPE r_type,
BT_HDR *p_data);
/*******************************************************************************
**
** Function BTA_HhGetReport
**
-** Description Send a GET_REPORT to HID device.
+** Description Send a GET_REPORT to HID device.
**
** Returns void
**
*******************************************************************************/
-BTA_API extern void BTA_HhGetReport(UINT8 dev_handle, tBTA_HH_RPT_TYPE r_type,
+BTA_API extern void BTA_HhGetReport(UINT8 dev_handle, tBTA_HH_RPT_TYPE r_type,
UINT8 rpt_id, UINT16 buf_size);
/*******************************************************************************
**
@@ -371,7 +371,7 @@ BTA_API extern void BTA_HhGetReport(UINT8 dev_handle, tBTA_HH_RPT_TYPE r_type,
** Returns void
**
*******************************************************************************/
-BTA_API extern void BTA_HhSendCtrl(UINT8 dev_handle,
+BTA_API extern void BTA_HhSendCtrl(UINT8 dev_handle,
tBTA_HH_TRANS_CTRL_TYPE c_type);
/*******************************************************************************
@@ -423,22 +423,22 @@ BTA_API extern void BTA_HhGetDscpInfo(UINT8 dev_handle);
**
** Function BTA_HhAddDev
**
-** Description Add a virtually cabled device into HID-Host device list
-** to manage and assign a device handle for future API call,
-** host applciation call this API at start-up to initialize its
-** virtually cabled devices.
+** Description Add a virtually cabled device into HID-Host device list
+** to manage and assign a device handle for future API call,
+** host applciation call this API at start-up to initialize its
+** virtually cabled devices.
**
** Returns void
**
*******************************************************************************/
-BTA_API extern void BTA_HhAddDev(BD_ADDR bda, tBTA_HH_ATTR_MASK attr_mask,
- UINT8 sub_class, UINT8 app_id,
+BTA_API extern void BTA_HhAddDev(BD_ADDR bda, tBTA_HH_ATTR_MASK attr_mask,
+ UINT8 sub_class, UINT8 app_id,
tBTA_HH_DEV_DSCP_INFO dscp_info);
/*******************************************************************************
**
** Function BTA_HhRemoveDev
**
-** Description Remove a device from the HID host devices list.
+** Description Remove a device from the HID host devices list.
**
** Returns void
**
@@ -446,7 +446,7 @@ BTA_API extern void BTA_HhAddDev(BD_ADDR bda, tBTA_HH_ATTR_MASK attr_mask,
BTA_API extern void BTA_HhRemoveDev(UINT8 dev_handle );
/*******************************************************************************
**
-** Parsing Utility Functions
+** Parsing Utility Functions
**
*******************************************************************************/
/*******************************************************************************
@@ -458,7 +458,7 @@ BTA_API extern void BTA_HhRemoveDev(UINT8 dev_handle );
** Returns void
**
*******************************************************************************/
-BTA_API extern void BTA_HhParseBootRpt(tBTA_HH_BOOT_RPT *p_data, UINT8 *p_report,
+BTA_API extern void BTA_HhParseBootRpt(tBTA_HH_BOOT_RPT *p_data, UINT8 *p_report,
UINT16 report_len);
#ifdef __cplusplus
diff --git a/bta/include/bta_hh_co.h b/bta/include/bta_hh_co.h
index 37d27ea..4123b82 100644
--- a/bta/include/bta_hh_co.h
+++ b/bta/include/bta_hh_co.h
@@ -20,14 +20,14 @@
** Function bta_hh_co_data
**
** Description This callout function is executed by HH when data is received
-** in interupt channel.
-**
+** in interupt channel.
+**
**
** Returns void.
**
*******************************************************************************/
-BTA_API extern void bta_hh_co_data(UINT8 dev_handle, UINT8 *p_rpt, UINT16 len,
- tBTA_HH_PROTO_MODE mode, UINT8 sub_class,
+BTA_API extern 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);
/*******************************************************************************
@@ -35,21 +35,21 @@ BTA_API extern void bta_hh_co_data(UINT8 dev_handle, UINT8 *p_rpt, UINT16 len,
** Function bta_hh_co_open
**
** Description This callout function is executed by HH when connection is
-** opened, and application may do some device specific
+** opened, and application may do some device specific
** initialization.
**
** Returns void.
**
*******************************************************************************/
-BTA_API extern void bta_hh_co_open(UINT8 dev_handle, UINT8 sub_class,
+BTA_API extern void bta_hh_co_open(UINT8 dev_handle, UINT8 sub_class,
UINT16 attr_mask, UINT8 app_id);
/*******************************************************************************
**
** Function bta_hh_co_close
**
-** Description This callout function is executed by HH when connection is
-** closed, and device specific finalizatio nmay be needed.
+** Description This callout function is executed by HH when connection is
+** closed, and device specific finalizatio nmay be needed.
**
** Returns void.
**
diff --git a/bta/include/bta_hl_ci.h b/bta/include/bta_hl_ci.h
index 6cb1451..90af11a 100644
--- a/bta/include/bta_hl_ci.h
+++ b/bta/include/bta_hl_ci.h
@@ -34,18 +34,18 @@
** Function bta_hl_ci_get_tx_data
**
** Description This function is called in response to the
-** bta_hl_co_get_tx_data call-out function.
+** bta_hl_co_get_tx_data call-out function.
**
** Parameters mdl_handle -MDL handle
** status - BTA_MA_STATUS_OK if operation is successful
** BTA_MA_STATUS_FAIL if any errors have occurred.
** evt - evt from the call-out function
**
-** Returns void
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_hl_ci_get_tx_data( tBTA_HL_MDL_HANDLE mdl_handle,
- tBTA_HL_STATUS status,
+ tBTA_HL_STATUS status,
UINT16 evt );
/*******************************************************************************
@@ -53,18 +53,18 @@ BTA_API extern void bta_hl_ci_get_tx_data( tBTA_HL_MDL_HANDLE mdl_handle,
** Function bta_hl_ci_put_rx_data
**
** Description This function is called in response to the
-** bta_hl_co_put_rx_data call-out function.
+** bta_hl_co_put_rx_data call-out function.
**
** Parameters mdl_handle -MDL handle
** status - BTA_MA_STATUS_OK if operation is successful
** BTA_MA_STATUS_FAIL if any errors have occurred.
** evt - evt from the call-out function
**
-** Returns void
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_hl_ci_put_rx_data( tBTA_HL_MDL_HANDLE mdl_handle,
- tBTA_HL_STATUS status,
+ tBTA_HL_STATUS status,
UINT16 evt );
@@ -74,18 +74,18 @@ BTA_API extern void bta_hl_ci_put_rx_data( tBTA_HL_MDL_HANDLE mdl_handle,
** Function bta_hl_ci_get_echo_data
**
** Description This function is called in response to the
-** bta_hl_co_get_echo_data call-out function.
+** bta_hl_co_get_echo_data call-out function.
**
** Parameters mcl_handle -MCL handle
** status - BTA_MA_STATUS_OK if operation is successful
** BTA_MA_STATUS_FAIL if any errors have occurred.
** evt - evt from the call-out function
**
-** Returns void
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_hl_ci_get_echo_data( tBTA_HL_MCL_HANDLE mcl_handle,
- tBTA_HL_STATUS status,
+ tBTA_HL_STATUS status,
UINT16 evt );
@@ -94,18 +94,18 @@ BTA_API extern void bta_hl_ci_get_echo_data( tBTA_HL_MCL_HANDLE mcl_handle,
** Function bta_hl_ci_put_echo_data
**
** Description This function is called in response to the
-** bta_hl_co_put_echo_data call-out function.
+** bta_hl_co_put_echo_data call-out function.
**
** Parameters mcl_handle -MCL handle
** status - BTA_MA_STATUS_OK if operation is successful
** BTA_MA_STATUS_FAIL if any errors have occurred.
** evt - evt from the call-out function
**
-** Returns void
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_hl_ci_put_echo_data( tBTA_HL_MCL_HANDLE mcl_handle,
- tBTA_HL_STATUS status,
+ tBTA_HL_STATUS status,
UINT16 evt );
#endif /* BTA_HL_CI_H */
diff --git a/bta/include/bta_hl_co.h b/bta/include/bta_hl_co.h
index 464e99a..720308b 100644
--- a/bta/include/bta_hl_co.h
+++ b/bta/include/bta_hl_co.h
@@ -27,11 +27,11 @@
**
** Function bta_hl_co_get_num_of_mdep
**
-** Description This function is called to get the number of MDEPs for this
+** Description This function is called to get the number of MDEPs for this
** application ID
**
-** Parameters app_id - application ID
-** p_num_of_mdep (output) - number of MDEP configurations supported
+** Parameters app_id - application ID
+** p_num_of_mdep (output) - number of MDEP configurations supported
** by the application
**
** Returns Bloolean - TRUE success
@@ -45,9 +45,9 @@ BTA_API extern BOOLEAN bta_hl_co_get_num_of_mdep(UINT8 app_id, UINT8 *p_num_of_m
** Description This function is called to find out whether the SOURCE MDEP
** configuration information should be advertize in the SDP or nopt
**
-** Parameters app_id - application ID
+** Parameters app_id - application ID
**
-** Returns Bloolean - TRUE advertise the SOURCE MDEP configuration
+** Returns Bloolean - TRUE advertise the SOURCE MDEP configuration
** information
**
*******************************************************************************/
@@ -56,21 +56,21 @@ BTA_API extern BOOLEAN bta_hl_co_advrtise_source_sdp(UINT8 app_id);
**
** Function bta_hl_co_get_mdep_config
**
-** Description This function is called to get the supported feature
+** Description This function is called to get the supported feature
** configuration for the specified mdep index and it also assigns
** the MDEP ID for the specified mdep index
**
-** Parameters app_id - HDP application ID
-** mdep_idx - the mdep index
-** mdep_id - the assigned MDEP ID for the specified medp_idx
-** p_mdl_cfg (output) - pointer to the MDEP configuration
+** Parameters app_id - HDP application ID
+** mdep_idx - the mdep index
+** mdep_id - the assigned MDEP ID for the specified medp_idx
+** p_mdl_cfg (output) - pointer to the MDEP configuration
**
**
** Returns Bloolean - TRUE success
*******************************************************************************/
-BTA_API extern BOOLEAN bta_hl_co_get_mdep_config(UINT8 app_id,
- UINT8 mdep_idx,
- tBTA_HL_MDEP_ID mdep_id,
+BTA_API extern BOOLEAN bta_hl_co_get_mdep_config(UINT8 app_id,
+ UINT8 mdep_idx,
+ tBTA_HL_MDEP_ID mdep_id,
tBTA_HL_MDEP_CFG *p_mdep_cfg);
@@ -78,16 +78,16 @@ BTA_API extern BOOLEAN bta_hl_co_get_mdep_config(UINT8 app_id,
**
** Function bta_hl_co_get_echo_config
**
-** Description This function is called to get the echo test
-** maximum APDU size configuration
+** Description This function is called to get the echo test
+** maximum APDU size configuration
**
-** Parameters app_id - HDP application ID
-** p_echo_cfg (output) - pointer to the Echo test maximum APDU size
-** configuration
+** Parameters app_id - HDP application ID
+** p_echo_cfg (output) - pointer to the Echo test maximum APDU size
+** configuration
**
** Returns Bloolean - TRUE success
*******************************************************************************/
-BTA_API extern BOOLEAN bta_hl_co_get_echo_config(UINT8 app_id,
+BTA_API extern BOOLEAN bta_hl_co_get_echo_config(UINT8 app_id,
tBTA_HL_ECHO_CFG *p_echo_cfg);
@@ -95,10 +95,10 @@ BTA_API extern BOOLEAN bta_hl_co_get_echo_config(UINT8 app_id,
**
** Function bta_hl_co_save_mdl
**
-** Description This function is called to save a MDL configuration item in persistent
+** Description This function is called to save a MDL configuration item in persistent
** storage
**
-** Parameters app_id - HDP application ID
+** Parameters app_id - HDP application ID
** item_idx - the MDL configuration storage index
** p_mdl_cfg - pointer to the MDL configuration data
**
@@ -110,10 +110,10 @@ BTA_API extern void bta_hl_co_save_mdl(UINT8 app_id, UINT8 item_idx, tBTA_HL_MDL
**
** Function bta_hl_co_delete_mdl
**
-** Description This function is called to delete a MDL configuration item in persistent
+** Description This function is called to delete a MDL configuration item in persistent
** storage
**
-** Parameters app_id - HDP application ID
+** Parameters app_id - HDP application ID
** item_idx - the MDL configuration storage index
**
** Returns void
@@ -124,19 +124,19 @@ BTA_API extern void bta_hl_co_delete_mdl(UINT8 app_id, UINT8 item_idx);
**
** Function bta_hl_co_get_mdl_config
**
-** Description This function is called to get the MDL configuration
+** Description This function is called to get the MDL configuration
** from teh persistent memory. This function shall only be called
*8 once after the device is powered up
**
-** Parameters app_id - HDP application ID
+** Parameters app_id - HDP application ID
** buffer_size - the unit of the buffer size is sizeof(tBTA_HL_MDL_CFG)
-** p_mdl_buf - Point to the starting location of the buffer
+** p_mdl_buf - Point to the starting location of the buffer
**
** Returns BOOLEAN
-**
-**
+**
+**
*******************************************************************************/
-BTA_API extern BOOLEAN bta_hl_co_load_mdl_config (UINT8 app_id, UINT8 buffer_size,
+BTA_API extern BOOLEAN bta_hl_co_load_mdl_config (UINT8 app_id, UINT8 buffer_size,
tBTA_HL_MDL_CFG *p_mdl_buf );
@@ -144,17 +144,17 @@ BTA_API extern BOOLEAN bta_hl_co_load_mdl_config (UINT8 app_id, UINT8 buffer_siz
**
** Function bta_hl_co_get_tx_data
**
-** Description Get the data to be sent
+** Description Get the data to be sent
**
-** Parameters app_id - HDP application ID
+** Parameters app_id - HDP application ID
** mdl_handle - MDL handle
-** buf_size - the size of the buffer
+** buf_size - the size of the buffer
** p_buf - the buffer pointer
-** evt - the evt to be passed back to the HL in the
+** evt - the evt to be passed back to the HL in the
** bta_hl_ci_get_tx_data call-in function
**
** Returns Void
-**
+**
*******************************************************************************/
BTA_API extern void bta_hl_co_get_tx_data (UINT8 app_id, tBTA_HL_MDL_HANDLE mdl_handle,
UINT16 buf_size, UINT8 *p_buf, UINT16 evt);
@@ -164,17 +164,17 @@ BTA_API extern void bta_hl_co_get_tx_data (UINT8 app_id, tBTA_HL_MDL_HANDLE mdl_
**
** Function bta_hl_co_put_rx_data
**
-** Description Put the received data
+** Description Put the received data
**
-** Parameters app_id - HDP application ID
+** Parameters app_id - HDP application ID
** mdl_handle - MDL handle
-** data_size - the size of the data
+** data_size - the size of the data
** p_data - the data pointer
-** evt - the evt to be passed back to the HL in the
+** evt - the evt to be passed back to the HL in the
** bta_hl_ci_put_rx_data call-in function
**
** Returns Void
-**
+**
*******************************************************************************/
BTA_API extern void bta_hl_co_put_rx_data (UINT8 app_id, tBTA_HL_MDL_HANDLE mdl_handle,
UINT16 data_size, UINT8 *p_data, UINT16 evt);
@@ -182,17 +182,17 @@ BTA_API extern void bta_hl_co_put_rx_data (UINT8 app_id, tBTA_HL_MDL_HANDLE mdl_
**
** Function bta_hl_co_get_tx_data
**
-** Description Get the Echo data to be sent
+** Description Get the Echo data to be sent
**
-** Parameters app_id - HDP application ID
+** Parameters app_id - HDP application ID
** mcl_handle - MCL handle
-** buf_size - the size of the buffer
+** buf_size - the size of the buffer
** p_buf - the buffer pointer
-** evt - the evt to be passed back to the HL in the
+** evt - the evt to be passed back to the HL in the
** bta_hl_ci_get_tx_data call-in function
**
** Returns Void
-**
+**
*******************************************************************************/
BTA_API extern void bta_hl_co_get_echo_data (UINT8 app_id, tBTA_HL_MCL_HANDLE mcl_handle,
UINT16 buf_size, UINT8 *p_buf, UINT16 evt);
@@ -201,17 +201,17 @@ BTA_API extern void bta_hl_co_get_echo_data (UINT8 app_id, tBTA_HL_MCL_HANDLE mc
**
** Function bta_hl_co_put_echo_data
**
-** Description Put the received loopback echo data
+** Description Put the received loopback echo data
**
-** Parameters app_id - HDP application ID
+** Parameters app_id - HDP application ID
** mcl_handle - MCL handle
-** data_size - the size of the data
+** data_size - the size of the data
** p_data - the data pointer
-** evt - the evt to be passed back to the HL in the
+** evt - the evt to be passed back to the HL in the
** bta_hl_ci_put_echo_data call-in function
**
** Returns Void
-**
+**
*******************************************************************************/
BTA_API extern void bta_hl_co_put_echo_data (UINT8 app_id, tBTA_HL_MCL_HANDLE mcl_handle,
UINT16 data_size, UINT8 *p_data, UINT16 evt);
diff --git a/bta/include/bta_pan_api.h b/bta/include/bta_pan_api.h
index 2b72d6a..9b98627 100644
--- a/bta/include/bta_pan_api.h
+++ b/bta/include/bta_pan_api.h
@@ -3,7 +3,7 @@
** Name: bta_pan_api.h
**
** Description: This is the public interface file for the Personal
-** Area Networking (PAN) subsystem of BTA, Widcomm's
+** Area Networking (PAN) subsystem of BTA, Widcomm's
** Bluetooth application layer for mobile phones.
**
** Copyright (c) 2004, Widcomm Inc., All Rights Reserved.
@@ -118,7 +118,7 @@ extern "C"
** Description Enable PAN service. This function must be
** called before any other functions in the PAN API are called.
** When the enable operation is complete the callback function
-** will be called with a BTA_PAN_ENABLE_EVT.
+** will be called with a BTA_PAN_ENABLE_EVT.
**
** Returns void
**
@@ -129,7 +129,7 @@ BTA_API extern void BTA_PanEnable(tBTA_PAN_CBACK p_cback);
**
** Function BTA_PanDisable
**
-** Description Disable PAN service.
+** Description Disable PAN service.
**
** Returns void
**
@@ -142,8 +142,8 @@ BTA_API extern void BTA_PanDisable(void);
** Function BTA_PanSetRole
**
** Description Sets PAN roles. When the enable operation is complete
-** the callback function will be called with a BTA_PAN_SET_ROLE_EVT.
-**
+** the callback function will be called with a BTA_PAN_SET_ROLE_EVT.
+**
** Returns void
**
*******************************************************************************/
@@ -157,8 +157,8 @@ BTA_API void BTA_PanSetRole(tBTA_PAN_ROLE role, tBTA_PAN_ROLE_INFO *p_user_info,
**
** Description Opens a connection to a peer device.
** When connection is open callback function is called
-** with a BTA_PAN_OPEN_EVT.
-**
+** with a BTA_PAN_OPEN_EVT.
+**
**
** Returns void
**
@@ -171,8 +171,8 @@ BTA_API void BTA_PanOpen(BD_ADDR bd_addr, tBTA_PAN_ROLE local_role, tBTA_PAN_
**
** Function BTA_PanClose
**
-** Description Close a PAN connection to a peer device.
-**
+** Description Close a PAN connection to a peer device.
+**
**
** Returns void
**
diff --git a/bta/include/bta_pan_ci.h b/bta/include/bta_pan_ci.h
index cd759d9..11751e8 100644
--- a/bta/include/bta_pan_ci.h
+++ b/bta/include/bta_pan_ci.h
@@ -30,9 +30,9 @@ extern "C"
** ready for more data and PAN should call bta_pan_co_tx_path().
** This function is used when the TX data path is configured
** to use a pull interface.
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_pan_ci_tx_ready(UINT16 handle);
@@ -45,9 +45,9 @@ BTA_API extern void bta_pan_ci_tx_ready(UINT16 handle);
** has data available to send to PAN and PAN should call
** bta_pan_co_rx_path(). This function is used when the RX
** data path is configured to use a pull interface.
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_pan_ci_rx_ready(UINT16 handle);
@@ -62,9 +62,9 @@ BTA_API extern void bta_pan_ci_rx_ready(UINT16 handle);
** any more data sent by bta_pan_co_tx_write() or
** bta_pan_co_tx_writebuf(). This function is used when the
** TX data path is configured to use a push interface.
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_pan_ci_tx_flow(UINT16 handle, BOOLEAN enable);
@@ -79,9 +79,9 @@ BTA_API extern void bta_pan_ci_tx_flow(UINT16 handle, BOOLEAN enable);
** the data buffer. The buffer must be allocated using
** functions GKI_getbuf() or GKI_getpoolbuf(). The buffer
** will be freed by BTA; the phone must not free the buffer.
-**
**
-** Returns TRUE if flow enabled
+**
+** Returns TRUE if flow enabled
**
*******************************************************************************/
BTA_API extern void bta_pan_ci_rx_writebuf(UINT16 handle, BD_ADDR src, BD_ADDR dst, UINT16 protocol, BT_HDR *p_buf, BOOLEAN ext);
@@ -92,24 +92,24 @@ BTA_API extern void bta_pan_ci_rx_writebuf(UINT16 handle, BD_ADDR src, BD_ADDR d
**
** Description This function is called by the phone to read data from PAN
** when the TX path is configured to use a pull interface.
-** The phone must free the buffer using function GKI_freebuf() when
+** The phone must free the buffer using function GKI_freebuf() when
** it is through processing the buffer.
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
-BTA_API extern BT_HDR * bta_pan_ci_readbuf(UINT16 handle, BD_ADDR src, BD_ADDR dst, UINT16 *p_protocol,
+BTA_API extern BT_HDR * bta_pan_ci_readbuf(UINT16 handle, BD_ADDR src, BD_ADDR dst, UINT16 *p_protocol,
BOOLEAN* p_ext, BOOLEAN* p_forward);
/*******************************************************************************
**
** Function bta_pan_ci_set_pfilters
**
-** Description This function is called to set protocol filters
-**
+** Description This function is called to set protocol filters
+**
**
-** Returns void
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_pan_ci_set_pfilters(UINT16 handle, UINT16 num_filters, UINT16 *p_start_array, UINT16 *p_end_array);
@@ -119,15 +119,15 @@ BTA_API extern void bta_pan_ci_set_pfilters(UINT16 handle, UINT16 num_filters, U
**
** Function bta_pan_ci_set_mfilters
**
-** Description This function is called to set multicast filters
-**
+** Description This function is called to set multicast filters
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
BTA_API extern void bta_pan_ci_set_mfilters(UINT16 handle, UINT16 num_mcast_filters, UINT8 *p_start_array,
UINT8 *p_end_array);
-
+
diff --git a/bta/include/bta_pan_co.h b/bta/include/bta_pan_co.h
index c8769f4..ea9f3b0 100644
--- a/bta/include/bta_pan_co.h
+++ b/bta/include/bta_pan_co.h
@@ -47,7 +47,7 @@
** used by the phone to initialize data paths or for other
** initialization purposes. The function must return the
** data flow mask as described below.
-**
+**
**
** Returns Data flow mask.
**
@@ -58,10 +58,10 @@ BTA_API extern UINT8 bta_pan_co_init(UINT8 *q_level);
**
** Function bta_pan_co_open
**
-** Description This function is executed by PAN when a connection
+** Description This function is executed by PAN when a connection
** is opened. The phone can use this function to set
** up data paths or perform any required initialization.
-**
+**
**
** Returns void
**
@@ -74,7 +74,7 @@ BTA_API extern void bta_pan_co_open(UINT16 handle, UINT8 app_id, tBTA_PAN_ROLE l
**
** Description This function is called by PAN when a connection to a
** server is closed.
-**
+**
**
** Returns void
**
@@ -88,8 +88,8 @@ BTA_API extern void bta_pan_co_close(UINT16 handle, UINT8 app_id);
** Description This function is called by PAN to transfer data on the
** TX path; that is, data being sent from BTA to the phone.
** This function is used when the TX data path is configured
-** to use the pull interface.
-**
+** to use the pull interface.
+**
**
** Returns void
**
@@ -103,8 +103,8 @@ BTA_API extern void bta_pan_co_tx_path(UINT16 handle, UINT8 app_id);
** Description This function is called by PAN to transfer data on the
** RX path; that is, data being sent from the phone to BTA.
** This function is used when the RX data path is configured
-** to use the pull interface.
-**
+** to use the pull interface.
+**
**
** Returns void
**
@@ -119,12 +119,12 @@ BTA_API extern void bta_pan_co_rx_path(UINT16 handle, UINT8 app_id);
** when the TX path is configured to use a push interface.
** The implementation of this function must copy the data to
** the phone's memory.
-**
+**
**
** Returns void
**
*******************************************************************************/
-BTA_API extern void bta_pan_co_tx_write(UINT16 handle, UINT8 app_id, BD_ADDR src, BD_ADDR dst, UINT16 protocol, UINT8 *p_data,
+BTA_API extern void bta_pan_co_tx_write(UINT16 handle, UINT8 app_id, BD_ADDR src, BD_ADDR dst, UINT16 protocol, UINT8 *p_data,
UINT16 len, BOOLEAN ext, BOOLEAN forward);
/*******************************************************************************
@@ -135,7 +135,7 @@ BTA_API extern void bta_pan_co_tx_write(UINT16 handle, UINT8 app_id, BD_ADDR src
** when the TX path is configured to use a push interface with
** zero copy. The phone must free the buffer using function
** GKI_freebuf() when it is through processing the buffer.
-**
+**
**
** Returns void
**
@@ -152,8 +152,8 @@ BTA_API extern void bta_pan_co_tx_writebuf(UINT16 handle, UINT8 app_id, BD_ADDR
** data flow on the RX path when it is configured to use
** a push interface. If data flow is disabled the phone must
** not call bta_pan_ci_rx_write() or bta_pan_ci_rx_writebuf()
-** until data flow is enabled again.
-**
+** until data flow is enabled again.
+**
**
** Returns void
**
@@ -184,6 +184,6 @@ BTA_API extern void bta_pan_co_pfilt_ind(UINT16 handle, BOOLEAN indication, tBTA
*******************************************************************************/
BTA_API extern void bta_pan_co_mfilt_ind(UINT16 handle, BOOLEAN indication, tBTA_PAN_STATUS result,
UINT16 len, UINT8 *p_filters);
-
+
#endif /* BTA_PAN_CO_H */
diff --git a/bta/include/bta_sys_ci.h b/bta/include/bta_sys_ci.h
index 48cfab1..98998ae 100644
--- a/bta/include/bta_sys_ci.h
+++ b/bta/include/bta_sys_ci.h
@@ -28,9 +28,9 @@ extern "C"
**
** Description This function must be called in response to function
** bta_sys_hw_co_enable(), when HW is indeed enabled
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
BTA_API void bta_sys_hw_ci_enabled(tBTA_SYS_HW_MODULE module );
@@ -42,9 +42,9 @@ BTA_API void bta_sys_hw_ci_enabled(tBTA_SYS_HW_MODULE module );
**
** Description This function must be called in response to function
** bta_sys_hw_co_disable() when HW is really OFF
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
BTA_API void bta_sys_hw_ci_disabled( tBTA_SYS_HW_MODULE module );
diff --git a/bta/include/bta_sys_co.h b/bta/include/bta_sys_co.h
index 2b82153..a4fd0fb 100644
--- a/bta/include/bta_sys_co.h
+++ b/bta/include/bta_sys_co.h
@@ -25,7 +25,7 @@
**
** Function bta_sys_hw_co_enable
**
-** Description This function is called by the stack to power up the HW
+** Description This function is called by the stack to power up the HW
**
** Returns void
**
@@ -36,7 +36,7 @@ BTA_API void bta_sys_hw_co_enable( tBTA_SYS_HW_MODULE module );
**
** Function bta_sys_hw_co_disable
**
-** Description This function is called by the stack to power down the HW
+** Description This function is called by the stack to power down the HW
**
** Returns void
**
diff --git a/bta/include/utl.h b/bta/include/utl.h
index 392d239..543794b 100644
--- a/bta/include/utl.h
+++ b/bta/include/utl.h
@@ -52,7 +52,7 @@ extern "C"
** Description This utility function converts a character string to an
** integer. Acceptable values in string are 0-9. If invalid
** string or string value too large, -1 is returned.
-**
+**
**
** Returns Integer value or -1 on error.
**
@@ -67,7 +67,7 @@ extern INT16 utl_str2int(const char *p_s);
** String p_s must be uppercase. String p_t is converted to
** uppercase if lowercase. If p_s ends first, the substring
** match is counted as a match.
-**
+**
**
** Returns 0 if strings match, nonzero otherwise.
**
@@ -81,7 +81,7 @@ extern int utl_strucmp(const char *p_s, const char *p_t);
** Description This utility function converts a UINT16 to a string. The
** string is NULL-terminated. The length of the string is
** returned.
-**
+**
**
** Returns Length of string.
**
@@ -95,7 +95,7 @@ extern UINT8 utl_itoa(UINT16 i, char *p_s);
** Description This function calls GKI_freebuf to free the buffer passed
** in, if buffer pointer is not NULL, and also initializes
** buffer pointer to NULL.
-**
+**
**
** Returns Nothing.
**
@@ -108,7 +108,7 @@ extern void utl_freebuf(void **p);
**
** Description This function updates the local Device Class.
**
-** Parameters:
+** Parameters:
** p_cod - Pointer to the device class to set to
**
** cmd - the fields of the device class to update.
@@ -127,9 +127,9 @@ extern BOOLEAN utl_set_device_class(tBTA_UTL_COD *p_cod, UINT8 cmd);
**
** Function utl_isintstr
**
-** Description This utility function checks if the given string is an
+** Description This utility function checks if the given string is an
** integer string or not
-**
+**
**
** Returns TRUE if successful, Otherwise FALSE
**
@@ -140,9 +140,9 @@ extern BOOLEAN utl_isintstr(const char *p_s);
**
** Function utl_isdialstr
**
-** Description This utility function checks if the given string contains
+** Description This utility function checks if the given string contains
** only dial digits or not
-**
+**
**
** Returns TRUE if successful, Otherwise FALSE
**
diff --git a/bta/pan/bta_pan_api.c b/bta/pan/bta_pan_api.c
index 5a84668..520e6e6 100644
--- a/bta/pan/bta_pan_api.c
+++ b/bta/pan/bta_pan_api.c
@@ -37,7 +37,7 @@ static const tBTA_SYS_REG bta_pan_reg =
** Description Enable PAN service. This function must be
** called before any other functions in the PAN API are called.
** When the enable operation is complete the callback function
-** will be called with a BTA_PAN_ENABLE_EVT.
+** will be called with a BTA_PAN_ENABLE_EVT.
**
** Returns void
**
@@ -66,8 +66,8 @@ void BTA_PanEnable(tBTA_PAN_CBACK p_cback)
**
** Function BTA_PanDisable
**
-** Description Disables PAN service.
-**
+** Description Disables PAN service.
+**
**
** Returns void
**
@@ -89,8 +89,8 @@ void BTA_PanDisable(void)
** Function BTA_PanSetRole
**
** Description Sets PAN roles. When the enable operation is complete
-** the callback function will be called with a BTA_PAN_SET_ROLE_EVT.
-**
+** the callback function will be called with a BTA_PAN_SET_ROLE_EVT.
+**
** Returns void
**
*******************************************************************************/
@@ -156,8 +156,8 @@ void BTA_PanSetRole(tBTA_PAN_ROLE role, tBTA_PAN_ROLE_INFO *p_user_info, tBTA_PA
**
** Description Opens a connection to a peer device.
** When connection is open callback function is called
-** with a BTA_PAN_OPEN_EVT.
-**
+** with a BTA_PAN_OPEN_EVT.
+**
**
** Returns void
**
@@ -182,8 +182,8 @@ BTA_API void BTA_PanOpen(BD_ADDR bd_addr, tBTA_PAN_ROLE local_role, tBTA_PAN_
**
** Function BTA_PanClose
**
-** Description Close a PAN connection to a peer device.
-**
+** Description Close a PAN connection to a peer device.
+**
**
** Returns void
**
diff --git a/bta/pan/bta_pan_ci.c b/bta/pan/bta_pan_ci.c
index 843d2b9..1d2aac9 100644
--- a/bta/pan/bta_pan_ci.c
+++ b/bta/pan/bta_pan_ci.c
@@ -33,9 +33,9 @@
** ready for more data and PAN should call bta_pan_co_tx_path().
** This function is used when the TX data path is configured
** to use a pull interface.
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_pan_ci_tx_ready(UINT16 handle)
@@ -58,9 +58,9 @@ void bta_pan_ci_tx_ready(UINT16 handle)
** has data available to send to PAN and PAN should call
** bta_pan_co_rx_path(). This function is used when the RX
** data path is configured to use a pull interface.
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_pan_ci_rx_ready(UINT16 handle)
@@ -85,9 +85,9 @@ void bta_pan_ci_rx_ready(UINT16 handle)
** any more data sent by bta_pan_co_tx_write() or
** bta_pan_co_tx_writebuf(). This function is used when the
** TX data path is configured to use a push interface.
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_pan_ci_tx_flow(UINT16 handle, BOOLEAN enable)
@@ -110,29 +110,29 @@ void bta_pan_ci_tx_flow(UINT16 handle, BOOLEAN enable)
** Description This function is called to send data to PAN when the RX path
** is configured to use a push interface. The function copies
** data to an event buffer and sends it to PAN.
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_pan_ci_rx_write(UINT16 handle, BD_ADDR dst, BD_ADDR src, UINT16 protocol,
UINT8 *p_data, UINT16 len, BOOLEAN ext)
{
BT_HDR * p_buf;
-
+
if((p_buf = (BT_HDR *) GKI_getpoolbuf(PAN_POOL_ID)) != NULL)
{
p_buf->offset = PAN_MINIMUM_OFFSET;
-
+
/* copy all other params before the data */
bdcpy(((tBTA_PAN_DATA_PARAMS *)p_buf)->src, src);
bdcpy(((tBTA_PAN_DATA_PARAMS *)p_buf)->dst, dst);
((tBTA_PAN_DATA_PARAMS *)p_buf)->protocol = protocol;
((tBTA_PAN_DATA_PARAMS *)p_buf)->ext = ext;
p_buf->len=len;
-
+
/* copy data */
memcpy((UINT8 *)(p_buf + 1) + p_buf->offset, p_data, len);
@@ -153,9 +153,9 @@ void bta_pan_ci_rx_write(UINT16 handle, BD_ADDR dst, BD_ADDR src, UINT16 protoco
** the data buffer. The buffer must be allocated using
** functions GKI_getbuf() or GKI_getpoolbuf(). The buffer
** will be freed by BTA; the phone must not free the buffer.
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_pan_ci_rx_writebuf(UINT16 handle, BD_ADDR dst, BD_ADDR src, UINT16 protocol,
@@ -180,13 +180,13 @@ void bta_pan_ci_rx_writebuf(UINT16 handle, BD_ADDR dst, BD_ADDR src, UINT16 prot
**
** Function bta_pan_ci_readbuf
**
-** Description
-**
+** Description
+**
**
-** Returns void
+** Returns void
**
*******************************************************************************/
-BT_HDR * bta_pan_ci_readbuf(UINT16 handle, BD_ADDR src, BD_ADDR dst, UINT16* p_protocol,
+BT_HDR * bta_pan_ci_readbuf(UINT16 handle, BD_ADDR src, BD_ADDR dst, UINT16* p_protocol,
BOOLEAN* p_ext, BOOLEAN* p_forward)
{
tBTA_PAN_SCB * p_scb;
@@ -213,10 +213,10 @@ BT_HDR * bta_pan_ci_readbuf(UINT16 handle, BD_ADDR src, BD_ADDR dst, UINT16* p_p
**
** Function bta_pan_ci_set_mfilters
**
-** Description This function is called to set multicast filters
-**
+** Description This function is called to set multicast filters
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_pan_ci_set_mfilters(UINT16 handle, UINT16 num_mcast_filters, UINT8 *p_start_array,
@@ -232,10 +232,10 @@ void bta_pan_ci_set_mfilters(UINT16 handle, UINT16 num_mcast_filters, UINT8 *p_s
**
** Function bta_pan_ci_set_mfilters
**
-** Description This function is called to set protocol filters
-**
+** Description This function is called to set protocol filters
+**
**
-** Returns void
+** Returns void
**
*******************************************************************************/
void bta_pan_ci_set_pfilters(UINT16 handle, UINT16 num_filters, UINT16 *p_start_array, UINT16 *p_end_array)
diff --git a/bta/pan/bta_pan_int.h b/bta/pan/bta_pan_int.h
index 5715c31..9d44ae0 100644
--- a/bta/pan/bta_pan_int.h
+++ b/bta/pan/bta_pan_int.h
@@ -11,7 +11,7 @@
*****************************************************************************/
#ifndef BTA_PAN_INT_H
#define BTA_PAN_INT_H
-
+
#include "bta_sys.h"
#include "bta_pan_api.h"
@@ -65,7 +65,7 @@ typedef struct
char user_name[BTA_SERVICE_NAME_LEN+1]; /* Service name */
char gn_name[BTA_SERVICE_NAME_LEN+1]; /* Service name */
char nap_name[BTA_SERVICE_NAME_LEN+1]; /* Service name */
- tBTA_PAN_ROLE role;
+ tBTA_PAN_ROLE role;
UINT8 user_app_id;
UINT8 gn_app_id;
UINT8 nap_app_id;
diff --git a/bta/pan/bta_pan_main.c b/bta/pan/bta_pan_main.c
index 34caf61..1ba520b 100644
--- a/bta/pan/bta_pan_main.c
+++ b/bta/pan/bta_pan_main.c
@@ -152,7 +152,7 @@ tBTA_PAN_CB bta_pan_cb;
** Function bta_pan_scb_alloc
**
** Description Allocate a PAN server control block.
-**
+**
**
** Returns pointer to the scb, or NULL if none could be allocated.
**
@@ -171,7 +171,7 @@ tBTA_PAN_SCB *bta_pan_scb_alloc(void)
break;
}
}
-
+
if (i == BTA_PAN_NUM_CONN)
{
/* out of scbs */
@@ -186,7 +186,7 @@ tBTA_PAN_SCB *bta_pan_scb_alloc(void)
** Function bta_pan_sm_execute
**
** Description State machine event handling function for PAN
-**
+**
**
** Returns void
**
@@ -226,7 +226,7 @@ static void bta_pan_sm_execute(tBTA_PAN_SCB *p_scb, UINT16 event, tBTA_PAN_DATA
** Function bta_pan_api_enable
**
** Description Handle an API enable event.
-**
+**
**
** Returns void
**
@@ -246,7 +246,7 @@ static void bta_pan_api_enable(tBTA_PAN_DATA *p_data)
** Function bta_pan_api_disable
**
** Description Handle an API disable event.
-**
+**
**
** Returns void
**
@@ -262,7 +262,7 @@ static void bta_pan_api_disable(tBTA_PAN_DATA *p_data)
** Function bta_pan_api_open
**
** Description Handle an API listen event.
-**
+**
**
** Returns void
**
@@ -276,7 +276,7 @@ static void bta_pan_api_open(tBTA_PAN_DATA *p_data)
if ((p_scb = bta_pan_scb_alloc()) != NULL)
{
bta_pan_open(p_scb, p_data);
- }
+ }
else
{
bdcpy(data.bd_addr, p_data->api_open.bd_addr);
@@ -290,7 +290,7 @@ static void bta_pan_api_open(tBTA_PAN_DATA *p_data)
** Function bta_pan_scb_dealloc
**
** Description Deallocate a link control block.
-**
+**
**
** Returns void
**
@@ -306,7 +306,7 @@ void bta_pan_scb_dealloc(tBTA_PAN_SCB *p_scb)
** Function bta_pan_scb_to_idx
**
** Description Given a pointer to an scb, return its index.
-**
+**
**
** Returns Index of scb.
**
@@ -324,7 +324,7 @@ UINT8 bta_pan_scb_to_idx(tBTA_PAN_SCB *p_scb)
** Function bta_pan_scb_by_handle
**
** Description Find scb associated with handle.
-**
+**
**
** Returns Pointer to scb or NULL if not found.
**
@@ -343,8 +343,8 @@ tBTA_PAN_SCB *bta_pan_scb_by_handle(UINT16 handle)
}
- APPL_TRACE_WARNING1("No scb for handle %d", handle);
-
+ APPL_TRACE_WARNING1("No scb for handle %d", handle);
+
return NULL;
}
@@ -353,7 +353,7 @@ tBTA_PAN_SCB *bta_pan_scb_by_handle(UINT16 handle)
** Function bta_pan_hdl_event
**
** Description Data gateway main event handling function.
-**
+**
**
** Returns void
**
@@ -385,7 +385,7 @@ BOOLEAN bta_pan_hdl_event(BT_HDR *p_msg)
bta_pan_api_open((tBTA_PAN_DATA *) p_msg);
break;
-
+
/* events that require buffer not be released */
case BTA_PAN_CI_RX_WRITEBUF_EVT:
freebuf = FALSE;
@@ -404,6 +404,6 @@ BOOLEAN bta_pan_hdl_event(BT_HDR *p_msg)
break;
}
- return freebuf;
+ return freebuf;
}
#endif /* BTA_PAN_INCLUDED */
diff --git a/bta/sys/bd.c b/bta/sys/bd.c
index 3c639d1..eaa2015 100644
--- a/bta/sys/bd.c
+++ b/bta/sys/bd.c
@@ -29,9 +29,9 @@ const BD_ADDR bd_addr_null= {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
** Function bdcpy
**
** Description Copy bd addr b to a.
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bdcpy(BD_ADDR a, const BD_ADDR b)
@@ -49,7 +49,7 @@ void bdcpy(BD_ADDR a, const BD_ADDR b)
** Function bdcmp
**
** Description Compare bd addr b to a.
-**
+**
**
** Returns Zero if b==a, nonzero otherwise (like memcmp).
**
@@ -73,7 +73,7 @@ int bdcmp(const BD_ADDR a, const BD_ADDR b)
** Function bdcmpany
**
** Description Compare bd addr to "any" bd addr.
-**
+**
**
** Returns Zero if a equals bd_addr_any.
**
@@ -88,7 +88,7 @@ int bdcmpany(const BD_ADDR a)
** Function bdsetany
**
** Description Set bd addr to "any" bd addr.
-**
+**
**
** Returns void
**
diff --git a/bta/sys/bta_sys.h b/bta/sys/bta_sys.h
index 32cb69a..4300a1d 100644
--- a/bta/sys/bta_sys.h
+++ b/bta/sys/bta_sys.h
@@ -79,9 +79,9 @@ typedef UINT16 tBTA_SYS_HW_MODULE;
#define BTA_ID_MSE 28 /* Message Server Equipment */
#define BTA_ID_MCE 29 /* Message Client Equipment */
#define BTA_ID_HL 30 /* Health Device Profile*/
-#define BTA_ID_GATTC 31 /* GATT Client */
-#define BTA_ID_GATTS 32 /* GATT Client */
-#define BTA_ID_BLUETOOTH_MAX 33 /* last BT profile */
+#define BTA_ID_GATTC 31 /* GATT Client */
+#define BTA_ID_GATTS 32 /* GATT Client */
+#define BTA_ID_BLUETOOTH_MAX 33 /* last BT profile */
/* FM */
#define BTA_ID_FM 34 /* FM */
@@ -165,7 +165,7 @@ typedef struct
/* data type to send events to BTA SYS HW manager */
typedef struct
{
- BT_HDR hdr;
+ BT_HDR hdr;
tBTA_SYS_HW_MODULE hw_module;
} tBTA_SYS_HW_MSG;
@@ -216,7 +216,7 @@ enum
};
typedef UINT8 tBTA_SYS_HW_EVT;
-
+
/* HW enable callback type */
typedef void (tBTA_SYS_HW_CBACK)(tBTA_SYS_HW_EVT status);
diff --git a/bta/sys/bta_sys_ci.c b/bta/sys/bta_sys_ci.c
index d8ef532..c2305a1 100644
--- a/bta/sys/bta_sys_ci.c
+++ b/bta/sys/bta_sys_ci.c
@@ -20,21 +20,21 @@
**
** Description This function must be called in response to function
** bta_sys_hw_enable_co(), when HW is indeed enabled
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_sys_hw_ci_enabled(tBTA_SYS_HW_MODULE module )
{
tBTA_SYS_HW_MSG *p_msg;
-
+
if ((p_msg = (tBTA_SYS_HW_MSG *) GKI_getbuf(sizeof(tBTA_SYS_HW_MSG))) != NULL)
{
p_msg->hdr.event = BTA_SYS_EVT_ENABLED_EVT;
p_msg->hw_module = module;
-
+
bta_sys_sendmsg(p_msg);
}
}
@@ -45,20 +45,20 @@
**
** Description This function must be called in response to function
** bta_sys_hw_disable_co() when HW is really OFF
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_sys_hw_ci_disabled( tBTA_SYS_HW_MODULE module )
{
tBTA_SYS_HW_MSG *p_msg;
-
+
if ((p_msg = (tBTA_SYS_HW_MSG *) GKI_getbuf(sizeof(tBTA_SYS_HW_MSG))) != NULL)
{
p_msg->hdr.event = BTA_SYS_EVT_DISABLED_EVT;
p_msg->hw_module = module;
-
+
bta_sys_sendmsg(p_msg);
}
}
diff --git a/bta/sys/bta_sys_conn.c b/bta/sys/bta_sys_conn.c
index 63e9fc6..4aa821a 100644
--- a/bta/sys/bta_sys_conn.c
+++ b/bta/sys/bta_sys_conn.c
@@ -21,7 +21,7 @@
** Function bta_sys_rm_register
**
** Description Called by BTA DM to register role management callbacks
-**
+**
**
** Returns void
**
@@ -37,7 +37,7 @@ void bta_sys_rm_register(tBTA_SYS_CONN_CBACK * p_cback)
** Function bta_sys_policy_register
**
** Description Called by BTA DM to register link policy change callbacks
-**
+**
**
** Returns void
**
@@ -52,7 +52,7 @@ void bta_sys_policy_register(tBTA_SYS_CONN_CBACK * p_cback)
** Function bta_sys_role_chg_register
**
** Description Called by BTA AV to register role change callbacks
-**
+**
**
** Returns void
**
@@ -66,7 +66,7 @@ void bta_sys_role_chg_register(tBTA_SYS_CONN_CBACK * p_cback)
** Function bta_sys_ssr_cfg_register
**
** Description Called by BTA DM to register SSR configuration callback
-**
+**
**
** Returns void
**
@@ -82,7 +82,7 @@ void bta_sys_ssr_cfg_register(tBTA_SYS_SSR_CFG_CBACK * p_cback)
** Function bta_sys_role_chg_register
**
** Description Called by BTA AV to register role change callbacks
-**
+**
**
** Returns void
**
@@ -100,7 +100,7 @@ void bta_sys_notify_role_chg(BD_ADDR_PTR p_bda, UINT8 new_role, UINT8 hci_status
** Function bta_sys_collision_register
**
** Description Called by any BTA module to register for collision event.
-**
+**
**
** Returns void
**
@@ -126,7 +126,7 @@ void bta_sys_collision_register(UINT8 bta_id, tBTA_SYS_CONN_CBACK *p_cback)
** Function bta_sys_notify_collision
**
** Description Called by BTA DM to notify collision event.
-**
+**
**
** Returns void
**
@@ -150,7 +150,7 @@ void bta_sys_notify_collision (BD_ADDR_PTR p_bda)
** Function bta_sys_sco_register
**
** Description Called by BTA AV to register sco connection change callbacks
-**
+**
**
** Returns void
**
@@ -165,7 +165,7 @@ void bta_sys_sco_register(tBTA_SYS_CONN_CBACK * p_cback)
** Function bta_sys_pm_register
**
** Description Called by BTA DM to register power management callbacks
-**
+**
**
** Returns void
**
@@ -179,9 +179,9 @@ void bta_sys_pm_register(tBTA_SYS_CONN_CBACK * p_cback)
**
** Function bta_sys_conn_open
**
-** Description Called by BTA subsystems when a connection is made to
+** Description Called by BTA subsystems when a connection is made to
** the service
-**
+**
**
** Returns void
**
@@ -211,7 +211,7 @@ void bta_sys_conn_open(UINT8 id, UINT8 app_id, BD_ADDR peer_addr)
**
** Description Called by BTA subsystems when a connection to the service
** is closed
-**
+**
**
** Returns void
**
@@ -240,7 +240,7 @@ void bta_sys_conn_close(UINT8 id, UINT8 app_id, BD_ADDR peer_addr)
**
** Description Called by BTA subsystems when application initiates connection
** to a peer device
-**
+**
**
** Returns void
**
@@ -260,7 +260,7 @@ void bta_sys_app_open(UINT8 id, UINT8 app_id, BD_ADDR peer_addr)
** Function bta_sys_app_close
**
** Description Called by BTA subsystems when application initiates close
-** of connection to peer device
+** of connection to peer device
**
** Returns void
**
@@ -279,7 +279,7 @@ void bta_sys_app_close(UINT8 id, UINT8 app_id, BD_ADDR peer_addr)
** Function bta_sys_sco_open
**
** Description Called by BTA subsystems when sco connection for that service
-** is open
+** is open
**
** Returns void
**
@@ -292,7 +292,7 @@ void bta_sys_sco_open(UINT8 id, UINT8 app_id, BD_ADDR peer_addr)
/* without querying BTM_GetNumScoLinks() */
bta_sys_cb.p_sco_cb(BTA_SYS_SCO_OPEN, 1, app_id, peer_addr);
}
-
+
if(bta_sys_cb.ppm_cb)
{
bta_sys_cb.ppm_cb(BTA_SYS_SCO_OPEN, id, app_id, peer_addr);
@@ -304,7 +304,7 @@ void bta_sys_sco_open(UINT8 id, UINT8 app_id, BD_ADDR peer_addr)
** Function bta_sys_sco_close
**
** Description Called by BTA subsystems when sco connection for that service
-** is closed
+** is closed
**
** Returns void
**
@@ -330,7 +330,7 @@ void bta_sys_sco_close(UINT8 id, UINT8 app_id, BD_ADDR peer_addr)
** Function bta_sys_sco_use
**
** Description Called by BTA subsystems when that service needs to use sco.
-**
+**
**
** Returns void
**
@@ -358,7 +358,7 @@ void bta_sys_sco_use(UINT8 id, UINT8 app_id, BD_ADDR peer_addr)
void bta_sys_sco_unuse(UINT8 id, UINT8 app_id, BD_ADDR peer_addr)
{
UINT8 num_sco_links;
-
+
if((bta_sys_cb.p_sco_cb))
{
num_sco_links = BTM_GetNumScoLinks();
@@ -460,7 +460,7 @@ void bta_sys_clear_default_policy (UINT8 id, UINT8 policy)
**
** Function bta_sys_idle
**
-** Description Called by BTA subsystems to indicate that the connection to
+** Description Called by BTA subsystems to indicate that the connection to
** peer device is idle
**
** Returns void
@@ -487,7 +487,7 @@ void bta_sys_idle(UINT8 id, UINT8 app_id, BD_ADDR peer_addr)
**
** Function bta_sys_busy
**
-** Description Called by BTA subsystems to indicate that the connection to
+** Description Called by BTA subsystems to indicate that the connection to
** peer device is busy
**
** Returns void
@@ -515,7 +515,7 @@ void bta_sys_busy(UINT8 id, UINT8 app_id, BD_ADDR peer_addr)
**
** Function bta_sys_eir_register
**
-** Description Called by BTA DM to register EIR utility function that can be
+** Description Called by BTA DM to register EIR utility function that can be
** used by the other BTA modules to add/remove UUID.
**
** Returns void
@@ -530,8 +530,8 @@ void bta_sys_eir_register(tBTA_SYS_EIR_CBACK * p_cback)
**
** Function bta_sys_add_uuid
**
-** Description Called by BTA subsystems to indicate to DM that new service
-** class UUID is added.
+** Description Called by BTA subsystems to indicate to DM that new service
+** class UUID is added.
**
** Returns void
**
@@ -548,8 +548,8 @@ void bta_sys_add_uuid(UINT16 uuid16)
**
** Function bta_sys_remove_uuid
**
-** Description Called by BTA subsystems to indicate to DM that the service
-** class UUID is removed.
+** Description Called by BTA subsystems to indicate to DM that the service
+** class UUID is removed.
**
** Returns void
**
diff --git a/bta/sys/bta_sys_main.c b/bta/sys/bta_sys_main.c
index 2b54289..4a3581b 100644
--- a/bta/sys/bta_sys_main.c
+++ b/bta/sys/bta_sys_main.c
@@ -63,8 +63,8 @@ const tBTA_SYS_ACTION bta_sys_action[] =
{
/* device manager local device API events - cf bta_sys.h for events */
bta_sys_hw_api_enable, /* 0 BTA_SYS_HW_API_ENABLE_EVT */
- bta_sys_hw_evt_enabled, /* 1 BTA_SYS_HW_EVT_ENABLED_EVT */
- bta_sys_hw_evt_stack_enabled, /* 2 BTA_SYS_HW_EVT_STACK_ENABLED_EVT */
+ bta_sys_hw_evt_enabled, /* 1 BTA_SYS_HW_EVT_ENABLED_EVT */
+ bta_sys_hw_evt_stack_enabled, /* 2 BTA_SYS_HW_EVT_STACK_ENABLED_EVT */
bta_sys_hw_api_disable, /* 3 BTA_SYS_HW_API_DISABLE_EVT */
bta_sys_hw_evt_disabled, /* 4 BTA_SYS_HW_EVT_DISABLED_EVT */
bta_sys_hw_error /* 5 BTA_SYS_HW_ERROR_EVT */
@@ -74,9 +74,9 @@ const tBTA_SYS_ACTION bta_sys_action[] =
enum
{
/* device manager local device API events */
- BTA_SYS_HW_API_ENABLE,
+ BTA_SYS_HW_API_ENABLE,
BTA_SYS_HW_EVT_ENABLED,
- BTA_SYS_HW_EVT_STACK_ENABLED,
+ BTA_SYS_HW_EVT_STACK_ENABLED,
BTA_SYS_HW_API_DISABLE,
BTA_SYS_HW_EVT_DISABLED,
BTA_SYS_HW_ERROR
@@ -121,7 +121,7 @@ const UINT8 bta_sys_hw_on[][BTA_SYS_NUM_COLS] =
/* EVT_ENABLED */ {BTA_SYS_IGNORE, BTA_SYS_IGNORE, BTA_SYS_HW_ON},
/* STACK_ENABLED */ {BTA_SYS_IGNORE, BTA_SYS_IGNORE, BTA_SYS_HW_ON},
/* API_DISABLE */ {BTA_SYS_HW_API_DISABLE, BTA_SYS_IGNORE, BTA_SYS_HW_ON}, /* don't change the state here, as some other modules might be active */
-/* EVT_DISABLED */ {BTA_SYS_HW_ERROR, BTA_SYS_IGNORE, BTA_SYS_HW_ON},
+/* EVT_DISABLED */ {BTA_SYS_HW_ERROR, BTA_SYS_IGNORE, BTA_SYS_HW_ON},
/* EVT_ERROR */ {BTA_SYS_HW_ERROR, BTA_SYS_IGNORE, BTA_SYS_HW_ON}
};
@@ -151,7 +151,7 @@ const tBTA_SYS_ST_TBL bta_sys_st_tbl[] = {
** Function bta_sys_init
**
** Description BTA initialization; called from task initialization.
-**
+**
**
** Returns void
**
@@ -180,7 +180,7 @@ BTA_API void bta_sys_init(void)
** Function bta_dm_sm_execute
**
** Description State machine event handling function for DM
-**
+**
**
** Returns void
**
@@ -191,9 +191,9 @@ BOOLEAN bta_sys_sm_execute(BT_HDR *p_msg)
tBTA_SYS_ST_TBL state_table;
UINT8 action;
int i;
-
+
APPL_TRACE_EVENT2("bta_sys_sm_execute state:%d, event:0x%x", bta_sys_cb.state, p_msg->event);
-
+
/* look up the state table for the current state */
state_table = bta_sys_st_tbl[bta_sys_cb.state];
/* update state */
@@ -232,16 +232,16 @@ void bta_sys_hw_unregister( tBTA_SYS_HW_MODULE module )
** Function bta_sys_hw_btm_cback
**
** Description This function is registered by BTA SYS to BTM in order to get status notifications
-**
**
-** Returns
+**
+** Returns
**
*******************************************************************************/
void bta_sys_hw_btm_cback( tBTM_DEV_STATUS status )
{
tBTA_SYS_HW_MSG *sys_event;
-
+
APPL_TRACE_DEBUG1(" bta_sys_hw_btm_cback was called with parameter: %i" , status );
/* send a message to BTA SYS */
@@ -275,8 +275,8 @@ void bta_sys_hw_btm_cback( tBTM_DEV_STATUS status )
**
** Function bta_sys_hw_error
**
-** Description In case the HW device stops answering... Try to turn it off, then re-enable all
-** previously active SW modules.
+** Description In case the HW device stops answering... Try to turn it off, then re-enable all
+** previously active SW modules.
**
** Returns success or failure
**
@@ -297,7 +297,7 @@ void bta_sys_hw_error(tBTA_SYS_HW_MSG *p_sys_hw_msg)
break;
default:
/* not yet supported */
- break;
+ break;
}
}
@@ -314,12 +314,12 @@ void bta_sys_hw_error(tBTA_SYS_HW_MSG *p_sys_hw_msg)
break;
default:
/* not yet supported */
- break;
+ break;
}
}
-
-
+
+
}
@@ -331,7 +331,7 @@ void bta_sys_hw_error(tBTA_SYS_HW_MSG *p_sys_hw_msg)
** Function bta_sys_hw_enable
**
** Description this function is called after API enable and HW has been turned on
-**
+**
**
** Returns success or failure
**
@@ -343,7 +343,7 @@ void bta_sys_hw_api_enable( tBTA_SYS_HW_MSG *p_sys_hw_msg )
{
/* register which HW module was turned on */
bta_sys_cb.sys_hw_module_active |= ((UINT32)1 << p_sys_hw_msg->hw_module );
-
+
/* use call-out to power-up HW */
bta_sys_hw_co_enable(p_sys_hw_msg->hw_module);
}
@@ -351,13 +351,13 @@ void bta_sys_hw_api_enable( tBTA_SYS_HW_MSG *p_sys_hw_msg )
{
/* register which HW module was turned on */
bta_sys_cb.sys_hw_module_active |= ((UINT32)1 << p_sys_hw_msg->hw_module );
-
+
/* HW already in use, so directly notify the caller */
if (bta_sys_cb.sys_hw_cback[p_sys_hw_msg->hw_module ]!= NULL )
- bta_sys_cb.sys_hw_cback[p_sys_hw_msg->hw_module ]( BTA_SYS_HW_ON_EVT );
+ bta_sys_cb.sys_hw_cback[p_sys_hw_msg->hw_module ]( BTA_SYS_HW_ON_EVT );
}
-
- APPL_TRACE_EVENT2 ("bta_sys_hw_api_enable for %d, active modules 0x%04X",
+
+ APPL_TRACE_EVENT2 ("bta_sys_hw_api_enable for %d, active modules 0x%04X",
p_sys_hw_msg->hw_module, bta_sys_cb.sys_hw_module_active);
}
@@ -367,28 +367,28 @@ void bta_sys_hw_api_enable( tBTA_SYS_HW_MSG *p_sys_hw_msg )
** Function bta_sys_hw_disable
**
** Description if no other module is using the HW, this function will call ( if defined ) a user-macro to turn off the HW
-**
+**
**
** Returns success or failure
**
*******************************************************************************/
void bta_sys_hw_api_disable(tBTA_SYS_HW_MSG *p_sys_hw_msg)
{
- APPL_TRACE_DEBUG2("bta_sys_hw_api_disable for %d, active modules: 0x%04X",
+ APPL_TRACE_DEBUG2("bta_sys_hw_api_disable for %d, active modules: 0x%04X",
p_sys_hw_msg->hw_module, bta_sys_cb.sys_hw_module_active );
/* make sure the related SW blocks were stopped */
- bta_sys_disable( p_sys_hw_msg->hw_module );
+ bta_sys_disable( p_sys_hw_msg->hw_module );
/* register which module we turn off */
bta_sys_cb.sys_hw_module_active &= ~((UINT32)1 << p_sys_hw_msg->hw_module );
-
+
/* if there are still some SW modules using the HW, just provide an answer to the calling */
if( bta_sys_cb.sys_hw_module_active != 0 )
- {
- /* if there are still some SW modules using the HW, directly notify the caller */
+ {
+ /* if there are still some SW modules using the HW, directly notify the caller */
if( bta_sys_cb.sys_hw_cback[p_sys_hw_msg->hw_module ]!= NULL )
bta_sys_cb.sys_hw_cback[p_sys_hw_msg->hw_module ]( BTA_SYS_HW_OFF_EVT );
}
@@ -397,7 +397,7 @@ void bta_sys_hw_api_disable(tBTA_SYS_HW_MSG *p_sys_hw_msg)
/* manually update the state of our system */
bta_sys_cb.state = BTA_SYS_HW_STOPPING;
/* and use the call-out to disable HW */
- bta_sys_hw_co_disable(p_sys_hw_msg->hw_module);
+ bta_sys_hw_co_disable(p_sys_hw_msg->hw_module);
}
}
@@ -407,8 +407,8 @@ void bta_sys_hw_api_disable(tBTA_SYS_HW_MSG *p_sys_hw_msg)
**
** Function bta_sys_hw_event_enabled
**
-** Description
-**
+** Description
+**
**
** Returns success or failure
**
@@ -416,7 +416,7 @@ void bta_sys_hw_api_disable(tBTA_SYS_HW_MSG *p_sys_hw_msg)
void bta_sys_hw_evt_enabled(tBTA_SYS_HW_MSG *p_sys_hw_msg)
{
APPL_TRACE_EVENT1("bta_sys_hw_evt_enabled for %i", p_sys_hw_msg->hw_module);
-
+
#if ( defined BTM_AUTOMATIC_HCI_RESET && BTM_AUTOMATIC_HCI_RESET == TRUE )
/* If device is already up, send a fake "BTM DEVICE UP" using BTA SYS state machine */
/* If we are in the middle device initialization, BTM_DEVICE_UP will be issued */
@@ -426,9 +426,9 @@ void bta_sys_hw_evt_enabled(tBTA_SYS_HW_MSG *p_sys_hw_msg)
bta_sys_hw_btm_cback (BTM_DEV_STATUS_UP);
}
#else
-
+
/* if HCI reset was not sent during stack start-up */
- BTM_DeviceReset( NULL );
+ BTM_DeviceReset( NULL );
#endif
}
@@ -438,8 +438,8 @@ void bta_sys_hw_evt_enabled(tBTA_SYS_HW_MSG *p_sys_hw_msg)
**
** Function bta_sys_hw_event_disabled
**
-** Description
-**
+** Description
+**
**
** Returns success or failure
**
@@ -449,7 +449,7 @@ void bta_sys_hw_evt_disabled(tBTA_SYS_HW_MSG *p_sys_hw_msg)
UINT8 hw_module_index;
APPL_TRACE_DEBUG1("bta_sys_hw_evt_disabled - module 0x%X", p_sys_hw_msg->hw_module);
-
+
for (hw_module_index = 0; hw_module_index < BTA_SYS_MAX_HW_MODULES; hw_module_index++)
{
if (bta_sys_cb.sys_hw_cback[hw_module_index] != NULL)
@@ -470,7 +470,7 @@ void bta_sys_hw_evt_disabled(tBTA_SYS_HW_MSG *p_sys_hw_msg)
void bta_sys_hw_evt_stack_enabled(tBTA_SYS_HW_MSG *p_sys_hw_msg)
{
UINT8 hw_module_index;
-
+
APPL_TRACE_DEBUG0(" bta_sys_hw_evt_stack_enabled!notify the callers");
for (hw_module_index = 0; hw_module_index < BTA_SYS_MAX_HW_MODULES; hw_module_index++ )
@@ -488,7 +488,7 @@ void bta_sys_hw_evt_stack_enabled(tBTA_SYS_HW_MSG *p_sys_hw_msg)
** Function bta_sys_event
**
** Description BTA event handler; called from task event handler.
-**
+**
**
** Returns void
**
@@ -543,7 +543,7 @@ BTA_API void bta_sys_timer_update(void)
**
** Description Called by other BTA subsystems to register their event
** handler.
-**
+**
**
** Returns void
**
@@ -560,7 +560,7 @@ void bta_sys_register(UINT8 id, const tBTA_SYS_REG *p_reg)
**
** Description Called by other BTA subsystems to de-register
** handler.
-**
+**
**
** Returns void
**
@@ -576,7 +576,7 @@ void bta_sys_deregister(UINT8 id)
**
** Description Called by other BTA subsystems to get registeration
** status.
-**
+**
**
** Returns void
**
@@ -593,7 +593,7 @@ BOOLEAN bta_sys_is_register(UINT8 id)
** Description Send a GKI message to BTA. This function is designed to
** optimize sending of messages to BTA. It is called by BTA
** API functions and call-in functions.
-**
+**
**
** Returns void
**
@@ -645,7 +645,7 @@ void bta_sys_disable(tBTA_SYS_HW_MODULE module)
{
int bta_id = 0;
int bta_id_max = 0;
-
+
APPL_TRACE_DEBUG1("bta_sys_disable: module %i", module);
switch( module )
@@ -664,9 +664,9 @@ void bta_sys_disable(tBTA_SYS_HW_MODULE module)
break;
case BTA_SYS_HW_GPS:
bta_id = BTA_ID_GPS;
- bta_id_max = BTA_ID_GPS;
+ bta_id_max = BTA_ID_GPS;
break;
- default:
+ default:
APPL_TRACE_WARNING0("bta_sys_disable: unkown module");
return;
}
@@ -677,7 +677,7 @@ void bta_sys_disable(tBTA_SYS_HW_MODULE module)
{
if (bta_sys_cb.is_reg[bta_id] == TRUE && bta_sys_cb.reg[bta_id]->disable != NULL)
{
- (*bta_sys_cb.reg[bta_id]->disable)();
+ (*bta_sys_cb.reg[bta_id]->disable)();
}
}
}
diff --git a/bta/sys/ptim.c b/bta/sys/ptim.c
index 24ed246..c9d0fe2 100644
--- a/bta/sys/ptim.c
+++ b/bta/sys/ptim.c
@@ -50,7 +50,7 @@ void ptim_timer_update(tPTIM_CB *p_cb)
UINT32 new_ticks_count;
INT32 period_in_ticks;
- /* To handle the case when the function is called less frequently than the period
+ /* To handle the case when the function is called less frequently than the period
we must convert determine the number of ticks since the last update, then
convert back to milliseconds before updating timer list */
new_ticks_count = GKI_get_tick_count();
diff --git a/bta/sys/utl.c b/bta/sys/utl.c
index 1487f2e..ca9a765 100644
--- a/bta/sys/utl.c
+++ b/bta/sys/utl.c
@@ -20,7 +20,7 @@
** integer. Acceptable values in string are 0-9. If invalid
** string or string value too large, -1 is returned. Leading
** spaces are skipped.
-**
+**
**
** Returns Integer value or -1 on error.
**
@@ -60,7 +60,7 @@ INT16 utl_str2int(const char *p_s)
** String p_s must be uppercase. String p_t is converted to
** uppercase if lowercase. If p_s ends first, the substring
** match is counted as a match.
-**
+**
**
** Returns 0 if strings match, nonzero otherwise.
**
@@ -100,7 +100,7 @@ int utl_strucmp(const char *p_s, const char *p_t)
** Description This utility function converts a UINT16 to a string. The
** string is NULL-terminated. The length of the string is
** returned;
-**
+**
**
** Returns Length of string.
**
@@ -140,7 +140,7 @@ UINT8 utl_itoa(UINT16 i, char *p_s)
** Description This function calls GKI_freebuf to free the buffer passed
** in, if buffer pointer is not NULL, and also initializes
** buffer pointer to NULL.
-**
+**
**
** Returns Nothing.
**
@@ -161,7 +161,7 @@ void utl_freebuf(void **p)
**
** Description This function updates the local Device Class.
**
-** Parameters:
+** Parameters:
** p_cod - Pointer to the device class to set to
**
** cmd - the fields of the device class to update.
@@ -234,9 +234,9 @@ BOOLEAN utl_set_device_class(tBTA_UTL_COD *p_cod, UINT8 cmd)
**
** Function utl_isintstr
**
-** Description This utility function checks if the given string is an
+** Description This utility function checks if the given string is an
** integer string or not
-**
+**
**
** Returns TRUE if successful, Otherwise FALSE
**
@@ -258,9 +258,9 @@ BOOLEAN utl_isintstr(const char *p_s)
**
** Function utl_isdialstr
**
-** Description This utility function checks if the given string contains
+** Description This utility function checks if the given string contains
** only dial digits or not
-**
+**
**
** Returns TRUE if successful, Otherwise FALSE
**
@@ -271,7 +271,7 @@ BOOLEAN utl_isdialstr(const char *p_s)
for(i=0; p_s[i] != 0; i++)
{
- if(!(((p_s[i] >= '0') && (p_s[i] <= '9'))
+ if(!(((p_s[i] >= '0') && (p_s[i] <= '9'))
|| (p_s[i] == '*') || (p_s[i] == '+') || (p_s[i] == '#') || (p_s[i] == ';')
|| ((p_s[i] >= 'A') && (p_s[i] <= 'C'))))
return FALSE;