summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Xie <mattx@google.com>2012-09-18 16:14:30 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-09-18 16:14:30 -0700
commitad2d45b15aae80ba254277c3d1fa036207d8b926 (patch)
tree27ebefd16a44995abb1b16e5c279a1bd169cf0f5
parentcc914cffd521b2e6e1be804c82aea2388b843ebf (diff)
downloadexternal_bluetooth_bluedroid-ad2d45b15aae80ba254277c3d1fa036207d8b926.zip
external_bluetooth_bluedroid-ad2d45b15aae80ba254277c3d1fa036207d8b926.tar.gz
external_bluetooth_bluedroid-ad2d45b15aae80ba254277c3d1fa036207d8b926.tar.bz2
Revert "Header file and whitespace cleanups"
This reverts commit cc914cffd521b2e6e1be804c82aea2388b843ebf More changes in the original CL after my cherry-pick. Change-Id: Ic144dba96aeb8a60611baac7565c9f628ab8f9eb
-rwxr-xr-x[-rw-r--r--]audio_a2dp_hw/Android.mk2
-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
-rwxr-xr-x[-rw-r--r--]bta/ag/bta_ag_cmd.c256
-rwxr-xr-x[-rw-r--r--]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
-rwxr-xr-x[-rw-r--r--]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
-rwxr-xr-x[-rw-r--r--]bta/dm/bta_dm_act.c526
-rwxr-xr-x[-rw-r--r--]bta/dm/bta_dm_api.c0
-rw-r--r--bta/dm/bta_dm_cfg.c20
-rw-r--r--bta/dm/bta_dm_ci.c20
-rwxr-xr-x[-rw-r--r--]bta/dm/bta_dm_int.h86
-rw-r--r--bta/dm/bta_dm_main.c20
-rwxr-xr-x[-rw-r--r--]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
-rwxr-xr-x[-rw-r--r--]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
-rwxr-xr-x[-rw-r--r--]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
-rwxr-xr-x[-rw-r--r--]btif/co/bta_hh_co.c0
-rw-r--r--btif/include/btif_api.h61
-rw-r--r--btif/include/btif_av.h34
-rw-r--r--btif/include/btif_av_api.h19
-rw-r--r--btif/include/btif_av_co.h17
-rw-r--r--btif/include/btif_common.h73
-rw-r--r--btif/include/btif_config.h23
-rw-r--r--btif/include/btif_config_util.h19
-rw-r--r--btif/include/btif_dm.h32
-rw-r--r--btif/include/btif_hh.h56
-rw-r--r--btif/include/btif_hl.h369
-rw-r--r--btif/include/btif_media.h38
-rw-r--r--btif/include/btif_pan.h13
-rw-r--r--btif/include/btif_pan_internal.h32
-rw-r--r--btif/include/btif_profile_queue.h11
-rw-r--r--btif/include/btif_sm.h27
-rw-r--r--btif/include/btif_sock.h12
-rw-r--r--btif/include/btif_sock_rfc.h17
-rw-r--r--btif/include/btif_sock_sdp.h14
-rw-r--r--btif/include/btif_sock_thread.h37
-rw-r--r--btif/include/btif_sock_util.h21
-rw-r--r--btif/include/btif_storage.h50
-rwxr-xr-x[-rw-r--r--]btif/include/btif_util.h25
-rw-r--r--btif/include/uinput.h10
-rwxr-xr-x[-rw-r--r--]btif/src/btif_core.c0
-rwxr-xr-x[-rw-r--r--]btif/src/btif_dm.c2
-rwxr-xr-x[-rw-r--r--]btif/src/btif_hh.c8
-rwxr-xr-x[-rw-r--r--]btif/src/btif_hl.c0
-rwxr-xr-x[-rw-r--r--]btif/src/btif_rc.c0
-rwxr-xr-x[-rw-r--r--]btif/src/btif_storage.c0
-rwxr-xr-x[-rw-r--r--]btif/src/btif_util.c0
-rwxr-xr-x[-rw-r--r--]conf/Android.mk0
-rwxr-xr-x[-rw-r--r--]conf/auto_pair_devlist.conf0
-rw-r--r--conf/bt_did.conf188
-rw-r--r--embdrv/sbc/encoder/include/sbc_encoder.h12
-rw-r--r--embdrv/sbc/encoder/include/sbc_if.h2
-rw-r--r--embdrv/sbc/encoder/srce/sbc_analysis.c38
-rw-r--r--embdrv/sbc/encoder/srce/sbc_dct.c112
-rw-r--r--embdrv/sbc/encoder/srce/sbc_dct_coeffs.c4
-rw-r--r--embdrv/sbc/encoder/srce/sbc_enc_bit_alloc_mono.c32
-rw-r--r--embdrv/sbc/encoder/srce/sbc_enc_bit_alloc_ste.c10
-rw-r--r--embdrv/sbc/encoder/srce/sbc_enc_coeffs.c8
-rw-r--r--embdrv/sbc/encoder/srce/sbc_encoder.c100
-rw-r--r--embdrv/sbc/encoder/srce/sbc_packing.c36
-rw-r--r--gki/Android.mk8
-rw-r--r--gki/common/gki.h36
-rw-r--r--gki/common/gki_buffer.c72
-rw-r--r--gki/common/gki_common.h2
-rw-r--r--gki/common/gki_debug.c6
-rw-r--r--gki/common/gki_inet.h2
-rw-r--r--gki/common/gki_time.c68
-rw-r--r--hci/include/bt_hci_lib.h4
-rw-r--r--hci/include/userial.h64
-rw-r--r--hci/include/utils.h62
-rwxr-xr-x[-rw-r--r--]hci/src/bt_hci_bdroid.c14
-rwxr-xr-x[-rw-r--r--]hci/src/userial.c0
-rw-r--r--hci/src/utils.c62
-rwxr-xr-x[-rw-r--r--]include/bt_target.h74
-rw-r--r--include/gki_target.h22
-rwxr-xr-x[-rw-r--r--]main/Android.mk0
-rw-r--r--main/bte_init.c12
-rwxr-xr-x[-rw-r--r--]main/bte_logmsg.c8
-rwxr-xr-x[-rw-r--r--]main/bte_main.c0
-rw-r--r--stack/Android.mk4
-rw-r--r--stack/a2dp/a2d_api.c16
-rw-r--r--stack/a2dp/a2d_int.h2
-rw-r--r--stack/a2dp/a2d_sbc.c4
-rw-r--r--stack/avct/avct_api.c24
-rw-r--r--stack/avct/avct_ccb.c12
-rw-r--r--stack/avct/avct_defs.h4
-rw-r--r--stack/avct/avct_int.h4
-rw-r--r--stack/avct/avct_l2c.c24
-rw-r--r--stack/avct/avct_lcb.c22
-rw-r--r--stack/avct/avct_lcb_act.c40
-rw-r--r--stack/avdt/avdt_ad.c34
-rw-r--r--stack/avdt/avdt_api.c36
-rw-r--r--stack/avdt/avdt_ccb.c74
-rw-r--r--stack/avdt/avdt_ccb_act.c100
-rw-r--r--stack/avdt/avdt_defs.h6
-rw-r--r--stack/avdt/avdt_l2c.c46
-rw-r--r--stack/avdt/avdt_msg.c110
-rw-r--r--stack/avdt/avdt_scb.c22
-rw-r--r--stack/avdt/avdt_scb_act.c70
-rw-r--r--stack/avrc/avrc_api.c28
-rw-r--r--stack/avrc/avrc_int.h4
-rw-r--r--stack/avrc/avrc_sdp.c10
-rw-r--r--stack/bnep/bnep_api.c8
-rw-r--r--stack/bnep/bnep_int.h4
-rw-r--r--stack/bnep/bnep_main.c8
-rw-r--r--stack/bnep/bnep_utils.c8
-rw-r--r--stack/btm/btm_acl.c70
-rw-r--r--stack/btm/btm_ble.c204
-rw-r--r--stack/btm/btm_ble_addr.c64
-rw-r--r--stack/btm/btm_ble_bgconn.c62
-rw-r--r--stack/btm/btm_ble_gap.c256
-rw-r--r--stack/btm/btm_ble_int.h10
-rw-r--r--stack/btm/btm_dev.c20
-rw-r--r--stack/btm/btm_devctl.c92
-rw-r--r--stack/btm/btm_inq.c224
-rw-r--r--stack/btm/btm_int.h32
-rw-r--r--stack/btm/btm_pm.c20
-rw-r--r--stack/btm/btm_sco.c84
-rwxr-xr-x[-rw-r--r--]stack/btm/btm_sec.c92
-rw-r--r--stack/btu/btu_hcif.c260
-rw-r--r--stack/btu/btu_init.c6
-rw-r--r--stack/btu/btu_task.c12
-rw-r--r--stack/gatt/att_protocol.c66
-rw-r--r--stack/gatt/gatt_api.c214
-rw-r--r--stack/gatt/gatt_attr.c28
-rw-r--r--stack/gatt/gatt_auth.c34
-rw-r--r--stack/gatt/gatt_cl.c184
-rw-r--r--stack/gatt/gatt_db.c200
-rw-r--r--stack/gatt/gatt_int.h80
-rw-r--r--stack/gatt/gatt_main.c76
-rw-r--r--stack/gatt/gatt_sr.c198
-rw-r--r--stack/gatt/gatt_utils.c308
-rw-r--r--stack/hcic/hciblecmds.c30
-rw-r--r--stack/hcic/hcicmds.c22
-rw-r--r--stack/hid/hid_conn.h2
-rw-r--r--stack/hid/hidh_api.c44
-rw-r--r--stack/hid/hidh_conn.c48
-rw-r--r--stack/hid/hidh_int.h4
-rw-r--r--stack/include/a2d_api.h6
-rw-r--r--stack/include/avct_api.h20
-rw-r--r--stack/include/avdt_api.h30
-rw-r--r--stack/include/avdtc_api.h28
-rw-r--r--stack/include/avrc_api.h50
-rw-r--r--stack/include/avrc_defs.h54
-rw-r--r--stack/include/bnep_api.h10
-rw-r--r--stack/include/bt_types.h26
-rw-r--r--stack/include/btm_api.h88
-rw-r--r--stack/include/btm_ble_api.h104
-rw-r--r--stack/include/btu.h12
-rw-r--r--stack/include/gatt_api.h242
-rw-r--r--stack/include/gattdefs.h8
-rw-r--r--stack/include/goep_fs.h30
-rw-r--r--stack/include/hcidefs.h72
-rw-r--r--stack/include/hcimsgs.h88
-rw-r--r--stack/include/hiddefs.h4
-rw-r--r--stack/include/hidh_api.h10
-rw-r--r--stack/include/l2c_api.h64
-rw-r--r--stack/include/l2cdefs.h4
-rw-r--r--stack/include/mca_api.h18
-rw-r--r--stack/include/mca_defs.h2
-rw-r--r--stack/include/obx_api.h70
-rw-r--r--stack/include/pan_api.h24
-rw-r--r--stack/include/rfcdefs.h24
-rw-r--r--stack/include/sdpdefs.h6
-rw-r--r--stack/include/smp_api.h34
-rw-r--r--stack/include/uipc_msg.h24
-rw-r--r--stack/include/wcassert.h14
-rw-r--r--stack/l2cap/l2c_api.c100
-rw-r--r--stack/l2cap/l2c_ble.c38
-rw-r--r--stack/l2cap/l2c_csm.c38
-rw-r--r--stack/l2cap/l2c_fcr.c50
-rw-r--r--stack/l2cap/l2c_int.h6
-rw-r--r--stack/l2cap/l2c_link.c66
-rw-r--r--stack/l2cap/l2c_main.c20
-rw-r--r--stack/l2cap/l2c_ucd.c36
-rw-r--r--stack/l2cap/l2c_utils.c100
-rw-r--r--stack/mcap/mca_api.c16
-rw-r--r--stack/mcap/mca_cact.c16
-rw-r--r--stack/mcap/mca_csm.c20
-rw-r--r--stack/mcap/mca_dact.c6
-rw-r--r--stack/mcap/mca_l2c.c40
-rw-r--r--stack/pan/pan_api.c24
-rw-r--r--stack/pan/pan_main.c4
-rw-r--r--stack/pan/pan_utils.c34
-rw-r--r--stack/rfcomm/port_rfc.c58
-rw-r--r--stack/rfcomm/port_utils.c36
-rw-r--r--stack/rfcomm/rfc_int.h32
-rw-r--r--stack/rfcomm/rfc_l2cap_if.c22
-rw-r--r--stack/rfcomm/rfc_mx_fsm.c28
-rw-r--r--stack/rfcomm/rfc_port_fsm.c80
-rw-r--r--stack/rfcomm/rfc_port_if.c48
-rw-r--r--stack/rfcomm/rfc_ts_frames.c42
-rw-r--r--stack/rfcomm/rfc_utils.c28
-rwxr-xr-x[-rw-r--r--]stack/sdp/sdp_api.c0
-rw-r--r--stack/sdp/sdp_db.c2
-rw-r--r--stack/sdp/sdp_discovery.c6
-rw-r--r--stack/sdp/sdp_server.c4
-rw-r--r--stack/sdp/sdp_utils.c14
-rw-r--r--stack/smp/aes.c40
-rw-r--r--stack/smp/smp_act.c66
-rw-r--r--stack/smp/smp_api.c30
-rw-r--r--stack/smp/smp_cmac.c42
-rw-r--r--stack/smp/smp_int.h24
-rw-r--r--stack/smp/smp_keys.c128
-rw-r--r--stack/smp/smp_l2c.c20
-rw-r--r--stack/smp/smp_main.c78
-rw-r--r--stack/smp/smp_utils.c4
285 files changed, 7395 insertions, 7339 deletions
diff --git a/audio_a2dp_hw/Android.mk b/audio_a2dp_hw/Android.mk
index d98e4bb..b451970 100644..100755
--- a/audio_a2dp_hw/Android.mk
+++ b/audio_a2dp_hw/Android.mk
@@ -6,7 +6,7 @@ LOCAL_SRC_FILES:= \
audio_a2dp_hw.c
LOCAL_C_INCLUDES+= .
-
+
LOCAL_SHARED_LIBRARIES := \
libcutils
diff --git a/bta/ag/bta_ag_act.c b/bta/ag/bta_ag_act.c
index ef7542f..de59aa5 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 f20e4d9..d2e38e2 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 21609df..4d3bcac 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 53a60d7..2bdd6ae 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 5aa11fe..bbd1a55 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 f3d5714..0ee5153 100644..100755
--- 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 0830c64..d953156 100644..100755
--- 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 cf98201..1a3bf71 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 a26a89b..bccb2cf 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 dd3a971..021b96c 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 770cc8c..6b7a5ce 100644..100755
--- 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 767e046..b3e897c 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 c5234a6..c6ce55a 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 a8f255d..4693a6e 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 496f185..762692f 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 5f89a75..ebd8bd1 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 1aa3751..c182948 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 b8d3e21..41fb565 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 6c835fa..ebf11b4 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 6142e9a..ba11752 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 f1132d9..9e74881 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 f43f8f0..c087dc8 100644..100755
--- 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 100644..100755
--- 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 9e2bf31..f0f7ac9 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 c9e979a..b003cbe 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 e470008..0d8dc6a 100644..100755
--- 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 c2b8608..38bf0af 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 afd4735..1b75b11 100644..100755
--- 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 773adaf..7ad840a 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 c60d8d2..fc18863 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 f59d8d7..d6e52b4 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 48e839a..ce0c209 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 5472600..4a87ddf 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 4d2e00a..7234598 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 ddca776..f5b4f41 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 6753b93..4ae7697 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 b068a61..5016c46 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 875164d..227129c 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 e327d41..cb56a32 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 ed2c5b6..77a8f6e 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 a166e05..77945f0 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 0b41ce2..6870016 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 e59f6b2..8f00793 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 bfd817f..163597e 100644..100755
--- 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 8effda9..c84243d 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 43a9115..51dfad1 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 785d452..648b10f 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 51a727c..2b68c56 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 e79e5a5..65ab7bd 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 0ef69da..aab858f 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 d2380c3..03805d4 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 3193438..3bfca86 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 9784ed6..765f6c1 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 95e2a83..169e965 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
-**
-** Description This function validate the DCH configuration
+** Function bta_hl_validate_dch_cfg
**
+** 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
-**
-** Description This function finds the indexes needed for the CCH state machine
+** Function bta_hl_find_cch_cb_indexes
**
+** 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
-**
-** Description This function finds the indexes needed for the DCH state machine
+** Function bta_hl_find_dch_cb_indexes
**
+** 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
-**
-** Description This function get the cuurent time value
+** Function bta_hl_get_cur_time
**
+** 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 272bb34..0fd0cf8 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 19321fe..32473ed 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 b41a3bc..5fc5a61 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 48a463a..81927aa 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 39488bf..b8a4f50 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 ee15cc2..bf66dca 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 4d2f0dd..02bc30c 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 80cab79..c09e5e9 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 4e4c735..f2fa83b 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 2eab178..f662f17 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 9bc5a79..cadf6bf 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 b1f11c4..c0cb4f5 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 dbf5761..c60b3ba 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 ffe37e9..6b068df 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 b498bda..02284a5 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 cb97d19..65941fc 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 a56af42..0aedf9f 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 084cc0e..cb1ff76 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 869c22b..dd9a528 100644..100755
--- 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 4123b82..37d27ea 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 90af11a..6cb1451 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 720308b..464e99a 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 9b98627..2b72d6a 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 11751e8..cd759d9 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 ea9f3b0..c8769f4 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 98998ae..48cfab1 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 a4fd0fb..2b82153 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 543794b..392d239 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 520e6e6..5a84668 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 1d2aac9..843d2b9 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 9d44ae0..5715c31 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 1ba520b..34caf61 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 eaa2015..3c639d1 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 4300a1d..32cb69a 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 c2305a1..d8ef532 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 4aa821a..63e9fc6 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 4a3581b..2b54289 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 c9d0fe2..24ed246 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 ca9a765..1487f2e 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;
diff --git a/btif/co/bta_hh_co.c b/btif/co/bta_hh_co.c
index a2cbd7b..a2cbd7b 100644..100755
--- a/btif/co/bta_hh_co.c
+++ b/btif/co/bta_hh_co.c
diff --git a/btif/include/btif_api.h b/btif/include/btif_api.h
index 69224d5..7916b3d 100644
--- a/btif/include/btif_api.h
+++ b/btif/include/btif_api.h
@@ -45,7 +45,7 @@
*
*****************************************************************************/
-/*******************************************************************************
+/*****************************************************************************
*
* Filename: btif_api.h
*
@@ -54,7 +54,7 @@
* require headerfiles as they would be accessed through
* callout/callins.
*
- *******************************************************************************/
+ *****************************************************************************/
#ifndef BTIF_API_H
#define BTIF_API_H
@@ -62,9 +62,31 @@
#include "btif_common.h"
#include "btif_dm.h"
-/*******************************************************************************
+/*****************************************************************************
+** Constants & Macros
+******************************************************************************/
+
+/*****************************************************************************
+** Type definitions for callback functions
+******************************************************************************/
+
+/*****************************************************************************
+** Type definitions and return values
+******************************************************************************/
+
+/*****************************************************************************
+** Extern variables and functions
+******************************************************************************/
+
+/*****************************************************************************
+** Functions
+******************************************************************************/
+
+
+/*****************************************************************************
** BTIF CORE API
-********************************************************************************/
+******************************************************************************/
+
/*******************************************************************************
**
@@ -75,6 +97,7 @@
** Returns bt_status_t
**
*******************************************************************************/
+
bt_status_t btif_init_bluetooth(void);
/*******************************************************************************
@@ -86,6 +109,7 @@ bt_status_t btif_init_bluetooth(void);
** Returns bt_status_t
**
*******************************************************************************/
+
bt_status_t btif_enable_bluetooth(void);
/*******************************************************************************
@@ -99,6 +123,7 @@ bt_status_t btif_enable_bluetooth(void);
** Returns void
**
*******************************************************************************/
+
bt_status_t btif_disable_bluetooth(void);
/*******************************************************************************
@@ -112,8 +137,10 @@ bt_status_t btif_disable_bluetooth(void);
** Returns void
**
*******************************************************************************/
+
bt_status_t btif_shutdown_bluetooth(void);
+
/*******************************************************************************
**
** Function btif_get_adapter_properties
@@ -123,6 +150,7 @@ bt_status_t btif_shutdown_bluetooth(void);
** Returns bt_status_t
**
*******************************************************************************/
+
bt_status_t btif_get_adapter_properties(void);
/*******************************************************************************
@@ -134,6 +162,7 @@ bt_status_t btif_get_adapter_properties(void);
** Returns bt_status_t
**
*******************************************************************************/
+
bt_status_t btif_get_adapter_property( bt_property_type_t type);
/*******************************************************************************
@@ -146,6 +175,7 @@ bt_status_t btif_get_adapter_property( bt_property_type_t type);
** Returns bt_status_t
**
*******************************************************************************/
+
bt_status_t btif_set_adapter_property( const bt_property_t *property);
/*******************************************************************************
@@ -157,9 +187,11 @@ bt_status_t btif_set_adapter_property( const bt_property_t *property);
** Returns bt_status_t
**
*******************************************************************************/
+
bt_status_t btif_get_remote_device_property( bt_bdaddr_t *remote_addr,
bt_property_type_t type);
+
/*******************************************************************************
**
** Function btif_get_remote_device_properties
@@ -169,8 +201,10 @@ bt_status_t btif_get_remote_device_property( bt_bdaddr_t *remote_addr,
** Returns bt_status_t
**
*******************************************************************************/
+
bt_status_t btif_get_remote_device_properties( bt_bdaddr_t *remote_addr);
+
/*******************************************************************************
**
** Function btif_set_remote_device_property
@@ -182,9 +216,11 @@ bt_status_t btif_get_remote_device_properties( bt_bdaddr_t *remote_addr);
** Returns bt_status_t
**
*******************************************************************************/
+
bt_status_t btif_set_remote_device_property( bt_bdaddr_t *remote_addr,
const bt_property_t *property);
+
/*******************************************************************************
**
** Function btif_get_remote_service_record
@@ -195,13 +231,13 @@ bt_status_t btif_set_remote_device_property( bt_bdaddr_t *remote_addr,
** Returns bt_status_t
**
*******************************************************************************/
+
bt_status_t btif_get_remote_service_record( bt_bdaddr_t *remote_addr,
bt_uuid_t *uuid);
-
-/*******************************************************************************
+/*****************************************************************************
** BTIF DM API
-********************************************************************************/
+******************************************************************************/
/*******************************************************************************
**
@@ -213,6 +249,7 @@ bt_status_t btif_get_remote_service_record( bt_bdaddr_t *remote_addr,
** Returns bt_status_t
**
*******************************************************************************/
+
bt_status_t btif_dm_start_discovery(void);
/*******************************************************************************
@@ -224,6 +261,7 @@ bt_status_t btif_dm_start_discovery(void);
** Returns bt_status_t
**
*******************************************************************************/
+
bt_status_t btif_dm_cancel_discovery(void);
/*******************************************************************************
@@ -235,6 +273,7 @@ bt_status_t btif_dm_cancel_discovery(void);
** Returns bt_status_t
**
*******************************************************************************/
+
bt_status_t btif_dm_create_bond(const bt_bdaddr_t *bd_addr);
/*******************************************************************************
@@ -246,6 +285,7 @@ bt_status_t btif_dm_create_bond(const bt_bdaddr_t *bd_addr);
** Returns bt_status_t
**
*******************************************************************************/
+
bt_status_t btif_dm_cancel_bond(const bt_bdaddr_t *bd_addr);
/*******************************************************************************
@@ -257,6 +297,7 @@ bt_status_t btif_dm_cancel_bond(const bt_bdaddr_t *bd_addr);
** Returns bt_status_t
**
*******************************************************************************/
+
bt_status_t btif_dm_remove_bond(const bt_bdaddr_t *bd_addr);
/*******************************************************************************
@@ -268,6 +309,7 @@ bt_status_t btif_dm_remove_bond(const bt_bdaddr_t *bd_addr);
** Returns bt_status_t
**
*******************************************************************************/
+
bt_status_t btif_dm_pin_reply( const bt_bdaddr_t *bd_addr, uint8_t accept,
uint8_t pin_len, bt_pin_code_t *pin_code);
@@ -280,6 +322,7 @@ bt_status_t btif_dm_pin_reply( const bt_bdaddr_t *bd_addr, uint8_t accept,
** Returns bt_status_t
**
*******************************************************************************/
+
bt_status_t btif_dm_passkey_reply( const bt_bdaddr_t *bd_addr,
uint8_t accept, uint32_t passkey);
@@ -292,6 +335,7 @@ bt_status_t btif_dm_passkey_reply( const bt_bdaddr_t *bd_addr,
** Returns bt_status_t
**
*******************************************************************************/
+
bt_status_t btif_dm_ssp_reply( const bt_bdaddr_t *bd_addr,
bt_ssp_variant_t variant, uint8_t accept,
uint32_t passkey);
@@ -305,6 +349,7 @@ bt_status_t btif_dm_ssp_reply( const bt_bdaddr_t *bd_addr,
** Returns bt_status_t
**
*******************************************************************************/
+
bt_status_t btif_dm_get_adapter_property(bt_property_t *prop);
/*******************************************************************************
@@ -316,6 +361,7 @@ bt_status_t btif_dm_get_adapter_property(bt_property_t *prop);
** Returns bt_status_t
**
*******************************************************************************/
+
bt_status_t btif_dm_get_remote_service_record(bt_bdaddr_t *remote_addr,
bt_uuid_t *uuid);
@@ -355,3 +401,4 @@ bt_status_t btif_dut_mode_configure(uint8_t enable);
bt_status_t btif_dut_mode_send(uint16_t opcode, uint8_t *buf, uint8_t len);
#endif /* BTIF_API_H */
+
diff --git a/btif/include/btif_av.h b/btif/include/btif_av.h
index 0182a80..2c08a99 100644
--- a/btif/include/btif_av.h
+++ b/btif/include/btif_av.h
@@ -45,14 +45,14 @@
*
*****************************************************************************/
-/*******************************************************************************
+/*****************************************************************************
*
* Filename: btif_av.h
*
* Description: Main API header file for all BTIF AV functions accessed
* from internal stack.
*
- *******************************************************************************/
+ *****************************************************************************/
#ifndef BTIF_AV_H
#define BTIF_AV_H
@@ -62,9 +62,14 @@
#include "bta_av_api.h"
-/*******************************************************************************
+/*****************************************************************************
+** Constants & Macros
+******************************************************************************/
+
+/*****************************************************************************
** Type definitions for callback functions
-********************************************************************************/
+******************************************************************************/
+
typedef enum {
/* Reuse BTA_AV_XXX_EVT - No need to redefine them here */
@@ -76,10 +81,26 @@ typedef enum {
BTIF_AV_RECONFIGURE_REQ_EVT,
} btif_av_sm_event_t;
+/*****************************************************************************
+** Type definitions and return values
+******************************************************************************/
-/*******************************************************************************
+/*****************************************************************************
+** Extern variables and functions
+******************************************************************************/
+
+/*****************************************************************************
+** Functions
+******************************************************************************/
+
+
+/*****************************************************************************
+** BTIF CORE API
+******************************************************************************/
+
+/*****************************************************************************
** BTIF AV API
-********************************************************************************/
+******************************************************************************/
/*******************************************************************************
**
@@ -143,3 +164,4 @@ void btif_dispatch_sm_event(btif_av_sm_event_t event, void *p_data, int len);
bt_status_t btif_av_init(void);
#endif /* BTIF_AV_H */
+
diff --git a/btif/include/btif_av_api.h b/btif/include/btif_av_api.h
index 2c908c7..4cee7b5 100644
--- a/btif/include/btif_av_api.h
+++ b/btif/include/btif_av_api.h
@@ -54,7 +54,6 @@
** Bluetooth application layer for mobile phones.
**
*****************************************************************************/
-
#ifndef BTIF_AV_API_H
#define BTIF_AV_API_H
@@ -71,7 +70,7 @@
** Constants and data types
*****************************************************************************/
-/* Codec type */
+/* codec type */
#define BTIF_AV_CODEC_NONE 0xFF
#define BTIF_AV_CODEC_SBC A2D_MEDIA_CT_SBC /* SBC media codec type */
@@ -94,7 +93,7 @@ typedef UINT8 tBTIF_AV_CHNL;
typedef UINT8 tBTIF_AV_HNDL;
-/* Operation id list for BTIF_AvRemoteCmd */
+/* operation id list for BTIF_AvRemoteCmd */
#define BTIF_AV_ID_SELECT 0x00 /* select */
#define BTIF_AV_ID_UP 0x01 /* up */
#define BTIF_AV_ID_DOWN 0x02 /* down */
@@ -156,7 +155,7 @@ typedef UINT8 tBTIF_AV_HNDL;
typedef UINT8 tBTIF_AV_RC;
-/* State flag for pass through command */
+/* state flag for pass through command */
#define BTIF_AV_STATE_PRESS 0 /* key pressed */
#define BTIF_AV_STATE_RELEASE 1 /* key released */
@@ -164,7 +163,7 @@ typedef UINT8 tBTIF_AV_STATE;
typedef UINT8 tBTIF_AV_RC_HNDL;
-/* Command codes for BTIF_AvVendorCmd */
+/* command codes for BTIF_AvVendorCmd */
#define BTIF_AV_CMD_CTRL 0
#define BTIF_AV_CMD_STATUS 1
#define BTIF_AV_CMD_SPEC_INQ 2
@@ -200,17 +199,16 @@ typedef UINT8 tBTIF_AV_FEEDING_MODE;
#define BTIF_AV_CHANNEL_MODE_DUAL A2D_SBC_IE_CH_MD_DUAL
typedef UINT8 tBTIF_AV_CHANNEL_MODE;
-
-/**
+/*
* Structure used to configure the AV codec capabilities/config
*/
typedef struct
{
tBTIF_AV_CODEC_ID id; /* Codec ID (in terms of BTIF) */
- UINT8 info[AVDT_CODEC_SIZE]; /* Codec info (can be config or capabilities) */
+ UINT8 info[AVDT_CODEC_SIZE]; /* Codec info (can be config or capabilities) */
} tBTIF_AV_CODEC_INFO;
-/**
+/*
* Structure used to configure the AV media feeding
*/
typedef struct
@@ -220,9 +218,10 @@ typedef struct
UINT8 bit_per_sample; /* Number of bits per sample (8, 16) */
} tBTIF_AV_MEDIA_FEED_CFG_PCM;
+
typedef union
{
- tBTIF_AV_MEDIA_FEED_CFG_PCM pcm; /* Raw PCM feeding format */
+ tBTIF_AV_MEDIA_FEED_CFG_PCM pcm; /* raw PCM feeding format */
}tBTIF_AV_MEDIA_FEED_CFG;
typedef struct
diff --git a/btif/include/btif_av_co.h b/btif/include/btif_av_co.h
index a446328..9945e8e 100644
--- a/btif/include/btif_av_co.h
+++ b/btif/include/btif_av_co.h
@@ -45,15 +45,19 @@
*
*****************************************************************************/
+/*****************************************************************************
+ *
+ * Filename: btif_av_co.h
+ *
+ * Description:
+ *
+ *****************************************************************************/
+
#ifndef BTIF_AV_CO_H
#define BTIF_AV_CO_H
#include "btif_media.h"
-/*******************************************************************************
-** Constants & Macros
-********************************************************************************/
-
enum
{
BTIF_SV_AV_AA_SBC_INDEX = 0,
@@ -62,10 +66,6 @@ enum
/*******************************************************************************
-** Functions
-********************************************************************************/
-
-/*******************************************************************************
**
** Function bta_av_co_cp_is_active
**
@@ -199,4 +199,5 @@ BOOLEAN bta_av_co_peer_cp_supported(tBTA_AV_HNDL hndl);
*******************************************************************************/
BOOLEAN bta_av_co_get_remote_bitpool_pref(UINT8 *min, UINT8 *max);
+
#endif
diff --git a/btif/include/btif_common.h b/btif/include/btif_common.h
index 24eaace..8e5c275 100644
--- a/btif/include/btif_common.h
+++ b/btif/include/btif_common.h
@@ -45,6 +45,14 @@
*
************************************************************************************/
+/************************************************************************************
+ *
+ * Filename: btif_common.h
+ *
+ * Description:
+ *
+ ***********************************************************************************/
+
#ifndef BTIF_COMMON_H
#define BTIF_COMMON_H
@@ -58,22 +66,21 @@
#include <utils/Log.h>
-/*******************************************************************************
+/************************************************************************************
** Constants & Macros
-********************************************************************************/
+************************************************************************************/
-#define ASSERTC(cond, msg, val) if (!(cond)) { ALOGE( \
- "### ASSERT : %s line %d %s (%d) ###", __FILE__, __LINE__, msg, val);}
+#define ASSERTC(cond, msg, val) if (!(cond)) {ALOGE("### ASSERT : %s line %d %s (%d) ###", __FILE__, __LINE__, msg, val);}
/* Calculate start of event enumeration; id is top 8 bits of event */
#define BTIF_SIG_START(id) ((id) << 8)
-/* For upstream the MSB bit is always SET */
+/* for upstream the MSB bit is always SET */
#define BTIF_SIG_CB_BIT (0x8000)
#define BTIF_SIG_CB_START(id) (((id) << 8) | BTIF_SIG_CB_BIT)
/* BTIF sub-systems */
-#define BTIF_CORE 0
+#define BTIF_CORE 0 /* core */
#define BTIF_DM 1
#define BTIF_HFP 2
#define BTIF_AV 3
@@ -90,10 +97,8 @@ extern bt_callbacks_t *bt_hal_cbacks;
ASSERTC(0, "Callback is NULL", 0); \
}
-/**
- * BTIF events for requests that require context switch to btif task
- * on downstreams path
- */
+/* btif events for requests that require context switch to btif task
+ on downstreams path */
enum
{
BTIF_CORE_API_START = BTIF_SIG_START(BTIF_CORE),
@@ -118,13 +123,12 @@ enum
BTIF_AV_API_START = BTIF_SIG_START(BTIF_AV),
/* add here */
+
};
-/**
- * BTIF events for callbacks that require context switch to btif task
- * on upstream path - Typically these would be non-BTA events
- * that are generated by the BTIF layer.
- */
+/* btif events for callbacks that require context switch to btif task
+ on upstream path - Typically these would be non-BTA events
+ that are generated by the BTIF layer */
enum
{
BTIF_CORE_CB_START = BTIF_SIG_CB_START(BTIF_CORE),
@@ -145,38 +149,33 @@ enum
};
/* Macro definitions for BD ADDR persistence */
-
-/**
- * PROPERTY_BT_BDADDR_PATH
- * The property key stores the storage location of Bluetooth Device Address
- */
+/* PROPERTY_BT_BDADDR_PATH
+ The property key stores the storage location of Bluetooth Device Address
+*/
#ifndef PROPERTY_BT_BDADDR_PATH
#define PROPERTY_BT_BDADDR_PATH "ro.bt.bdaddr_path"
#endif
-/**
- * PERSIST_BDADDR_PROPERTY
- * If there is no valid bdaddr available from PROPERTY_BT_BDADDR_PATH,
- * generating a random BDADDR and keeping it in the PERSIST_BDADDR_DROP.
- */
+/* PERSIST_BDADDR_PROPERTY
+ If there is no valid bdaddr available from PROPERTY_BT_BDADDR_PATH,
+ generating a random BDADDR and keeping it in the PERSIST_BDADDR_DROP.
+*/
#ifndef PERSIST_BDADDR_PROPERTY
#define PERSIST_BDADDR_PROPERTY "persist.service.bdroid.bdaddr"
#endif
#define FACTORY_BT_BDADDR_STORAGE_LEN 17
-
-/*******************************************************************************
+/************************************************************************************
** Type definitions for callback functions
-********************************************************************************/
+************************************************************************************/
typedef void (tBTIF_CBACK) (UINT16 event, char *p_param);
typedef void (tBTIF_COPY_CBACK) (UINT16 event, char *p_dest, char *p_src);
-
-/*******************************************************************************
+/************************************************************************************
** Type definitions and return values
-********************************************************************************/
+************************************************************************************/
/* this type handles all btif context switches between BTU and HAL */
typedef struct
@@ -190,23 +189,23 @@ typedef struct
} tBTIF_CONTEXT_SWITCH_CBACK;
-/*******************************************************************************
+/************************************************************************************
** Functions
-********************************************************************************/
-
-bt_status_t btif_transfer_context (tBTIF_CBACK *p_cback, UINT16 event, char* p_params,
- int param_len, tBTIF_COPY_CBACK *p_copy_cback);
+************************************************************************************/
+bt_status_t btif_transfer_context (tBTIF_CBACK *p_cback, UINT16 event, char* p_params, int param_len, tBTIF_COPY_CBACK *p_copy_cback);
tBTA_SERVICE_MASK btif_get_enabled_services_mask(void);
bt_status_t btif_enable_service(tBTA_SERVICE_ID service_id);
bt_status_t btif_disable_service(tBTA_SERVICE_ID service_id);
int btif_is_enabled(void);
-/**
+/*
* BTIF_Events
*/
+
void btif_enable_bluetooth_evt(tBTA_STATUS status, BD_ADDR local_bd);
void btif_disable_bluetooth_evt(void);
void btif_adapter_properties_evt(bt_status_t status, uint32_t num_props, bt_property_t *p_props);
void btif_remote_properties_evt(bt_status_t status, bt_bdaddr_t *remote_addr,
uint32_t num_props, bt_property_t *p_props);
#endif /* BTIF_COMMON_H */
+
diff --git a/btif/include/btif_config.h b/btif/include/btif_config.h
index 4bd25db..7188a0f 100644
--- a/btif/include/btif_config.h
+++ b/btif/include/btif_config.h
@@ -45,37 +45,27 @@
*
************************************************************************************/
-/*******************************************************************************
+
+/************************************************************************************
*
* Filename: btif_config.h
*
* Description: Bluetooth configuration Interface
*
- *******************************************************************************/
-
-#ifndef BTIF_CONFIG_H
-#define BTIF_CONFIG_H
+ *
+ ***********************************************************************************/
+#ifndef btif_config_h_
+#define btif_config_h_
#ifdef __cplusplus
#include <stdint.h>
extern "C" {
#endif
-
-/*******************************************************************************
-** Constants & Macros
-********************************************************************************/
-
#define BTIF_CFG_TYPE_INVALID 0
#define BTIF_CFG_TYPE_STR 1
#define BTIF_CFG_TYPE_INT (1 << 1)
#define BTIF_CFG_TYPE_BIN (1 << 2)
#define BTIF_CFG_TYPE_VOLATILE (1 << 15)
-
-
-/*******************************************************************************
-** Functions
-********************************************************************************/
-
int btif_config_init();
int btif_config_exist(const char* section, const char* key, const char* name);
@@ -98,7 +88,6 @@ int btif_config_enum(btif_config_enum_callback cb, void* user_data);
int btif_config_save();
void btif_config_flush();
-
#ifdef __cplusplus
}
#endif
diff --git a/btif/include/btif_config_util.h b/btif/include/btif_config_util.h
index f9d0d29..0612796 100644
--- a/btif/include/btif_config_util.h
+++ b/btif/include/btif_config_util.h
@@ -45,25 +45,21 @@
*
************************************************************************************/
+
/************************************************************************************
*
* Filename: btif_config_util.h
*
* Description: Bluetooth configuration utility api
*
+ *
***********************************************************************************/
-#ifndef BTIF_CONFIG_UTIL_H
-#define BTIF_CONFIG_UTIL_H
-
+#ifndef btif_config_util_h_
+#define btif_config_util_h_
#ifdef __cplusplus
extern "C" {
#endif
-
-/*******************************************************************************
-** Constants & Macros
-********************************************************************************/
-
#define BLUEZ_PATH "/data/misc/bluetoothd/"
#define BLUEZ_PATH_BAK "/data/misc/bluetoothd_bak"
#define BLUEZ_LINKKEY "linkkeys"
@@ -73,17 +69,10 @@ extern "C" {
#define BLUEZ_TYPES "types"
#define BLUEZ_CONFIG "config"
#define BLUEZ_ALIASES "aliases"
-
-
-/*******************************************************************************
-** Functions
-********************************************************************************/
-
int btif_config_save_file(const char* file_name);
int btif_config_load_file(const char* file_name);
int load_bluez_adapter_info(char* adapter_path, int size);
int load_bluez_linkkeys(const char* adapter_path);
-
#ifdef __cplusplus
}
#endif
diff --git a/btif/include/btif_dm.h b/btif/include/btif_dm.h
index 64af77a..71f2c5e 100644
--- a/btif/include/btif_dm.h
+++ b/btif/include/btif_dm.h
@@ -45,27 +45,28 @@
*
************************************************************************************/
+/************************************************************************************
+ *
+ * Filename: btif_dm.h
+ *
+ * Description:
+ *
+ ***********************************************************************************/
+
#ifndef BTIF_DM_H
#define BTIF_DM_H
-/*******************************************************************************
+/************************************************************************************
** Functions
-********************************************************************************/
+************************************************************************************/
-/**
- * BTIF callback to switch context from bte to btif
- */
+/*******************************************************************************
+**
+** Description BTIF callback to switch context from bte to btif
+**
+*******************************************************************************/
void bte_dm_evt(tBTA_DM_SEC_EVT event, tBTA_DM_SEC *p_data);
-/**
- * Notify BT disable being initiated. DM may chose to abort
- * pending commands, like pairing
- */
-void btif_dm_on_disable(void);
-
-/**
- * Out-of-band functions
- */
#if (BTM_OOB_INCLUDED == TRUE)
void btif_dm_set_oob_for_io_req(tBTA_OOB_DATA *p_oob_data);
#ifdef BTIF_DM_OOB_TEST
@@ -75,4 +76,7 @@ BOOLEAN btif_dm_proc_rmt_oob(BD_ADDR bd_addr, BT_OCTET16 p_c, BT_OCTET16 p_r);
#endif /* BTIF_DM_OOB_TEST */
#endif /* BTM_OOB_INCLUDED */
+/* Notify BT disable being initiated. DM may chose to abort pending commands, like pairing*/
+void btif_dm_on_disable(void);
+
#endif
diff --git a/btif/include/btif_hh.h b/btif/include/btif_hh.h
index 69b4581..ad438f9 100644
--- a/btif/include/btif_hh.h
+++ b/btif/include/btif_hh.h
@@ -45,6 +45,15 @@
*
*****************************************************************************/
+/*****************************************************************************
+**
+** Name: btif_hh.h
+**
+** Description:
+**
+******************************************************************************/
+
+
#ifndef BTIF_HH_H
#define BTIF_HH_H
@@ -53,9 +62,6 @@
#include <stdint.h>
#include "bta_hh_api.h"
-/*******************************************************************************
-** Constants & Macros
-********************************************************************************/
#define BTIF_HH_MAX_HID 8
#define BTIF_HH_MAX_ADDED_DEV 32
@@ -65,22 +71,6 @@
#define BTIF_HH_KEYSTATE_MASK_CAPSLOCK 0x02
#define BTIF_HH_KEYSTATE_MASK_SCROLLLOCK 0x04
-
-/*******************************************************************************
-** Type definitions and return values
-********************************************************************************/
-
-typedef enum
-{
- BTIF_HH_DISABLED = 0,
- BTIF_HH_ENABLED,
- BTIF_HH_DISABLING,
- BTIF_HH_DEV_UNKNOWN,
- BTIF_HH_DEV_CONNECTING,
- BTIF_HH_DEV_CONNECTED,
- BTIF_HH_DEV_DISCONNECTED
-} BTIF_HH_STATUS;
-
typedef struct
{
bthh_connection_state_t dev_status;
@@ -93,7 +83,7 @@ typedef struct
BT_HDR *p_buf;
} btif_hh_device_t;
-/* Control block to maintain properties of devices */
+//Control block to maintain properties of devices
typedef struct
{
UINT8 dev_handle;
@@ -101,10 +91,18 @@ typedef struct
tBTA_HH_ATTR_MASK attr_mask;
} btif_hh_added_device_t;
-/**
- * BTIF-HH control block to maintain added devices and currently
- * connected hid devices
- */
+typedef enum
+{
+ BTIF_HH_DISABLED = 0,
+ BTIF_HH_ENABLED,
+ BTIF_HH_DISABLING,
+ BTIF_HH_DEV_UNKNOWN,
+ BTIF_HH_DEV_CONNECTING,
+ BTIF_HH_DEV_CONNECTED,
+ BTIF_HH_DEV_DISCONNECTED
+} BTIF_HH_STATUS;
+
+// BTIF-HH control block to maintain added devices and current connected hid device
typedef struct
{
BTIF_HH_STATUS status;
@@ -114,18 +112,16 @@ typedef struct
btif_hh_device_t *p_curr_dev;
} btif_hh_cb_t;
-
-/*******************************************************************************
-** Functions
-********************************************************************************/
-
extern btif_hh_cb_t btif_hh_cb;
extern btif_hh_device_t *btif_hh_find_connected_dev_by_handle(UINT8 handle);
extern void btif_hh_remove_device(bt_bdaddr_t bd_addr);
-extern bt_status_t btif_hh_virtual_unplug(bt_bdaddr_t *bd_addr);
+BOOLEAN btif_hh_add_added_dev(bt_bdaddr_t bda, tBTA_HH_ATTR_MASK attr_mask);
+extern bt_status_t btif_hh_virtual_unpug(bt_bdaddr_t *bd_addr);
extern void btif_hh_disconnect(bt_bdaddr_t *bd_addr);
BOOLEAN btif_hh_add_added_dev(bt_bdaddr_t bd_addr, tBTA_HH_ATTR_MASK attr_mask);
+
#endif
+
diff --git a/btif/include/btif_hl.h b/btif/include/btif_hl.h
index ccf9bc9..cac6eb2 100644
--- a/btif/include/btif_hl.h
+++ b/btif/include/btif_hl.h
@@ -45,12 +45,21 @@
*
************************************************************************************/
+/************************************************************************************
+ *
+ * Filename: btif_hl.h
+ *
+ * Description:
+ *
+ ***********************************************************************************/
+
#ifndef BTIF_HL_H
#define BTIF_HL_H
-/*******************************************************************************
-** Constants & Macros
-********************************************************************************/
+/************************************************************************************
+** Functions
+************************************************************************************/
+
#define BTIF_HL_DATA_TYPE_NONE 0x0000
#define BTIF_HL_DATA_TYPE_PULSE_OXIMETER 0x1004 /* from BT assigned number */
@@ -63,73 +72,8 @@
#define BTIF_HL_CCH_NUM_FILTER_ELEMS 3
#define BTIF_HL_APPLICATION_NAME_LEN 512
-#define BTIF_HL_NV_MAX_APPS 16
-
-
-/*******************************************************************************
-** Type definitions and return values
-********************************************************************************/
-
-typedef enum
-{
- BTIF_HL_SOC_STATE_IDLE,
- BTIF_HL_SOC_STATE_W4_ADD,
- BTIF_HL_SOC_STATE_W4_CONN,
- BTIF_HL_SOC_STATE_W4_READ,
- BTIF_HL_SOC_STATE_W4_REL
-} btif_hl_soc_state_t;
-
-typedef enum
-{
- BTIF_HL_STATE_DISABLED,
- BTIF_HL_STATE_DISABLING,
- BTIF_HL_STATE_ENABLED,
- BTIF_HL_STATE_ENABLING,
-} btif_hl_state_t;
-
-typedef enum
-{
- BTIF_HL_CCH_OP_NONE,
- BTIF_HL_CCH_OP_MDEP_FILTERING,
- BTIF_HL_CCH_OP_MATCHED_CTRL_PSM,
- BTIF_HL_CCH_OP_DCH_OPEN,
- BTIF_HL_CCH_OP_DCH_RECONNECT,
- BTIF_HL_CCH_OP_DCH_ECHO_TEST
-} btif_hl_cch_op_t;
-
-typedef enum
-{
- BTIF_HL_PEND_DCH_OP_NONE,
- BTIF_HL_PEND_DCH_OP_DELETE_MDL,
- BTIF_HL_PEND_DCH_OP_OPEN,
- BTIF_HL_PEND_DCH_OP_RECONNECT
-} btif_hl_pend_dch_op_t;
-
-typedef enum
-{
- BTIF_HL_DCH_OP_NONE,
- BTIF_HL_DCH_OP_DISC
-} btif_hl_dch_op_t;
-
-typedef enum
-{
- BTIF_HL_CHAN_CB_STATE_NONE,
- BTIF_HL_CHAN_CB_STATE_CONNECTING_PENDING,
- BTIF_HL_CHAN_CB_STATE_CONNECTED_PENDING,
-
- BTIF_HL_CHAN_CB_STATE_DISCONNECTING_PENDING,
- BTIF_HL_CHAN_CB_STATE_DISCONNECTED_PENDING,
- BTIF_HL_CHAN_CB_STATE_DESTROYED_PENDING,
-} btif_hl_chan_cb_state_t;
-enum
-{
- BTIF_HL_SEND_CONNECTED_CB,
- BTIF_HL_SEND_DISCONNECTED_CB,
- BTIF_HL_REG_APP,
- BTIF_HL_UNREG_APP,
- BTIF_HL_UPDATE_MDL,
-};
+#define BTIF_HL_NV_MAX_APPS 16
typedef struct
{
@@ -138,6 +82,7 @@ typedef struct
tBTA_HL_MDEP_ID peer_mdep_id;
} btif_hl_extra_mdl_cfg_t;
+
typedef struct
{
tBTA_HL_MDL_CFG base;
@@ -146,75 +91,123 @@ typedef struct
typedef struct
{
- btif_hl_mdl_cfg_t mdl_cfg[BTA_HL_NUM_MDL_CFGS];
-} btif_hl_nv_mdl_data_t;
+ btif_hl_mdl_cfg_t mdl_cfg[BTA_HL_NUM_MDL_CFGS];
+}btif_hl_nv_mdl_data_t;
+
typedef struct
{
- tBTA_HL_SUP_FEATURE sup_feature;
- tBTA_HL_DCH_CFG channel_type[BTA_HL_NUM_MDEPS];
- char srv_name[BTA_SERVICE_NAME_LEN +1];
- char srv_desp[BTA_SERVICE_DESP_LEN +1];
- char provider_name[BTA_PROVIDER_NAME_LEN +1];
- char application_name[BTIF_HL_APPLICATION_NAME_LEN +1];
-} btif_hl_nv_app_data_t;
+ tBTA_HL_SUP_FEATURE sup_feature;
+ tBTA_HL_DCH_CFG channel_type[BTA_HL_NUM_MDEPS];
+ char srv_name[BTA_SERVICE_NAME_LEN +1];
+ char srv_desp[BTA_SERVICE_DESP_LEN +1];
+ char provider_name[BTA_PROVIDER_NAME_LEN +1];
+ char application_name[BTIF_HL_APPLICATION_NAME_LEN +1];
+}btif_hl_nv_app_data_t;
+
typedef struct
{
BOOLEAN in_use;
UINT16 use_freq;
-} btif_hl_nv_app_t;
+}btif_hl_nv_app_t;
typedef struct
{
btif_hl_nv_app_t app[BTIF_HL_NV_MAX_APPS];
-} btif_hl_nv_app_cb_t;
+}btif_hl_nv_app_cb_t;
+
+
typedef struct
{
UINT8 app_nv_idx;
BOOLEAN active;
UINT8 app_idx;
- btif_hl_nv_app_data_t app_data;
-} btif_hl_app_data_t;
+ btif_hl_nv_app_data_t app_data;
+}btif_hl_app_data_t;
typedef struct
{
- BOOLEAN is_app_read;
- btif_hl_nv_app_cb_t app_cb;
- BUFFER_Q app_queue;
-} btif_hl_nv_cb_t;
+ BOOLEAN is_app_read;
+ btif_hl_nv_app_cb_t app_cb;
+ BUFFER_Q app_queue;
+}btif_hl_nv_cb_t;
+
+typedef enum
+{
+ BTIF_HL_SOC_STATE_IDLE,
+ BTIF_HL_SOC_STATE_W4_ADD,
+ BTIF_HL_SOC_STATE_W4_CONN,
+ BTIF_HL_SOC_STATE_W4_READ,
+ BTIF_HL_SOC_STATE_W4_REL
+} btif_hl_soc_state_t;
typedef struct
{
- int channel_id;
- BD_ADDR bd_addr;
- UINT8 mdep_cfg_idx;
- int max_s;
- int socket_id[2];
- UINT8 app_idx;
- UINT8 mcl_idx;
- UINT8 mdl_idx;
- btif_hl_soc_state_t state;
+ int channel_id;
+ BD_ADDR bd_addr;
+ UINT8 mdep_cfg_idx;
+ int max_s;
+ int socket_id[2];
+ UINT8 app_idx;
+ UINT8 mcl_idx;
+ UINT8 mdl_idx;
+ btif_hl_soc_state_t state;
}btif_hl_soc_cb_t;
typedef struct
{
- UINT16 data_type;
- UINT16 max_tx_apdu_size;
- UINT16 max_rx_apdu_size;
+ UINT16 data_type;
+ UINT16 max_tx_apdu_size;
+ UINT16 max_rx_apdu_size;
} btif_hl_data_type_cfg_t;
+typedef enum
+{
+ BTIF_HL_STATE_DISABLED,
+ BTIF_HL_STATE_DISABLING,
+ BTIF_HL_STATE_ENABLED,
+ BTIF_HL_STATE_ENABLING,
+
+}btif_hl_state_t;
+
+typedef enum
+{
+ BTIF_HL_CCH_OP_NONE,
+ BTIF_HL_CCH_OP_MDEP_FILTERING,
+ BTIF_HL_CCH_OP_MATCHED_CTRL_PSM,
+ BTIF_HL_CCH_OP_DCH_OPEN,
+ BTIF_HL_CCH_OP_DCH_RECONNECT,
+ BTIF_HL_CCH_OP_DCH_ECHO_TEST
+}btif_hl_cch_op_t;
+
+typedef enum
+{
+ BTIF_HL_PEND_DCH_OP_NONE,
+ BTIF_HL_PEND_DCH_OP_DELETE_MDL,
+ BTIF_HL_PEND_DCH_OP_OPEN,
+ BTIF_HL_PEND_DCH_OP_RECONNECT
+} btif_hl_pend_dch_op_t;
+
+typedef enum
+{
+ BTIF_HL_DCH_OP_NONE,
+ BTIF_HL_DCH_OP_DISC
+} btif_hl_dch_op_t;
+
+
typedef struct
{
UINT16 data_type;
tBTA_HL_MDEP_ROLE peer_mdep_role;
} btif_hl_filter_elem_t;
+
typedef struct
{
- UINT8 num_elems;
- btif_hl_filter_elem_t elem[BTIF_HL_CCH_NUM_FILTER_ELEMS];
+ UINT8 num_elems;
+ btif_hl_filter_elem_t elem[BTIF_HL_CCH_NUM_FILTER_ELEMS];
} btif_hl_cch_filter_t;
typedef struct
@@ -241,93 +234,112 @@ typedef struct
BOOLEAN cong;
btif_hl_soc_cb_t *p_scb;
int channel_id;
-} btif_hl_mdl_cb_t;
+}btif_hl_mdl_cb_t;
+
+typedef enum
+{
+ BTIF_HL_CHAN_CB_STATE_NONE,
+ BTIF_HL_CHAN_CB_STATE_CONNECTING_PENDING,
+ BTIF_HL_CHAN_CB_STATE_CONNECTED_PENDING,
+ BTIF_HL_CHAN_CB_STATE_DISCONNECTING_PENDING,
+ BTIF_HL_CHAN_CB_STATE_DISCONNECTED_PENDING,
+ BTIF_HL_CHAN_CB_STATE_DESTROYED_PENDING,
+}btif_hl_chan_cb_state_t;
typedef struct
{
- int channel_id;
- int mdep_cfg_idx;
- BOOLEAN in_use;
- btif_hl_chan_cb_state_t cb_state;
- btif_hl_pend_dch_op_t op;
- BD_ADDR bd_addr;
- BOOLEAN abort_pending;
-} btif_hl_pending_chan_cb_t;
+ int channel_id;
+ int mdep_cfg_idx;
+ BOOLEAN in_use;
+ btif_hl_chan_cb_state_t cb_state;
+ btif_hl_pend_dch_op_t op;
+ BD_ADDR bd_addr;
+ BOOLEAN abort_pending;
+}btif_hl_pending_chan_cb_t;
typedef struct
{
- btif_hl_mdl_cb_t mdl[BTA_HL_NUM_MDLS_PER_MCL];
- BOOLEAN in_use;
- BOOLEAN is_connected;
- UINT16 req_ctrl_psm;
- UINT16 ctrl_psm;
- UINT16 data_psm;
- BD_ADDR bd_addr;
- UINT16 cch_mtu;
- tBTA_SEC sec_mask;
- tBTA_HL_MCL_HANDLE mcl_handle;
- btif_hl_pending_chan_cb_t pcb;
- BOOLEAN valid_sdp_idx;
- UINT8 sdp_idx;
- tBTA_HL_SDP sdp;
- btif_hl_cch_op_t cch_oper;
- BOOLEAN cch_timer_active;
- TIMER_LIST_ENT cch_timer;
-} btif_hl_mcl_cb_t;
+ btif_hl_mdl_cb_t mdl[BTA_HL_NUM_MDLS_PER_MCL];
+ BOOLEAN in_use;
+ BOOLEAN is_connected;
+ UINT16 req_ctrl_psm;
+ UINT16 ctrl_psm;
+ UINT16 data_psm;
+ BD_ADDR bd_addr;
+ UINT16 cch_mtu;
+ tBTA_SEC sec_mask;
+ tBTA_HL_MCL_HANDLE mcl_handle;
+ btif_hl_pending_chan_cb_t pcb;
+ BOOLEAN valid_sdp_idx;
+ UINT8 sdp_idx;
+ tBTA_HL_SDP sdp;
+ btif_hl_cch_op_t cch_oper;
+ BOOLEAN cch_timer_active;
+ TIMER_LIST_ENT cch_timer;
+}btif_hl_mcl_cb_t;
typedef struct
{
- BOOLEAN active;
- UINT16 mdl_id;
- UINT8 mdep_cfg_idx;
- BD_ADDR bd_addr;
- int channel_id;
+ BOOLEAN active;
+ UINT16 mdl_id;
+ UINT8 mdep_cfg_idx;
+ BD_ADDR bd_addr;
+ int channel_id;
} btif_hl_delete_mdl_t;
typedef struct
{
- btif_hl_mcl_cb_t mcb[BTA_HL_NUM_MCLS]; /* application Control Blocks */
- BOOLEAN in_use; /* this CB is in use*/
- BOOLEAN reg_pending;
- BOOLEAN is_new_app;
- UINT8 app_nv_idx;
- UINT8 app_id;
-
- tBTA_HL_SUP_FEATURE sup_feature;
- tBTA_HL_DCH_CFG channel_type[BTA_HL_NUM_MDEPS];
- tBTA_HL_SDP_INFO_IND sdp_info_ind;
- btif_hl_cch_filter_t filter;
-
- btif_hl_mdl_cfg_t mdl_cfg[BTA_HL_NUM_MDL_CFGS];
- int mdl_cfg_channel_id[BTA_HL_NUM_MDL_CFGS];
-
- btif_hl_delete_mdl_t delete_mdl;
- tBTA_HL_DEVICE_TYPE dev_type;
- tBTA_HL_APP_HANDLE app_handle;
- UINT16 sec_mask; /* Security mask for BTM_SetSecurityLevel() */
- 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 application_name[BTIF_HL_APPLICATION_NAME_LEN +1]; /* applicaiton name */
-} btif_hl_app_cb_t;
-
+ btif_hl_mcl_cb_t mcb[BTA_HL_NUM_MCLS]; /* application Control Blocks */
+ BOOLEAN in_use; /* this CB is in use*/
+ BOOLEAN reg_pending;
+ BOOLEAN is_new_app;
+ UINT8 app_nv_idx;
+ UINT8 app_id;
+ //UINT32 sdp_handle; /* SDP record handle */
+ tBTA_HL_SUP_FEATURE sup_feature;
+ tBTA_HL_DCH_CFG channel_type[BTA_HL_NUM_MDEPS];
+ tBTA_HL_SDP_INFO_IND sdp_info_ind;
+ btif_hl_cch_filter_t filter;
+
+ btif_hl_mdl_cfg_t mdl_cfg[BTA_HL_NUM_MDL_CFGS];
+ int mdl_cfg_channel_id[BTA_HL_NUM_MDL_CFGS];
+
+ btif_hl_delete_mdl_t delete_mdl;
+ tBTA_HL_DEVICE_TYPE dev_type;
+ tBTA_HL_APP_HANDLE app_handle;
+ UINT16 sec_mask; /* Security mask for BTM_SetSecurityLevel() */
+ 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 application_name[BTIF_HL_APPLICATION_NAME_LEN +1]; /* applicaiton name */
+
+}btif_hl_app_cb_t;
typedef struct
{
- BOOLEAN in_use;
- UINT8 app_idx;
-} btif_hl_pending_reg_cb_t;
+ BOOLEAN in_use;
+ UINT8 app_idx;
+}btif_hl_pending_reg_cb_t;
/* BTIF-HL control block */
typedef struct
{
- btif_hl_app_cb_t acb[BTA_HL_NUM_APPS]; /* HL Control Blocks */
- tBTA_HL_CTRL_CBACK *p_ctrl_cback; /* pointer to control callback function */
- UINT8 next_app_id;
- UINT16 next_channel_id;
- btif_hl_state_t state;
- btif_hl_nv_cb_t ncb;
+ btif_hl_app_cb_t acb[BTA_HL_NUM_APPS]; /* HL Control Blocks */
+ tBTA_HL_CTRL_CBACK *p_ctrl_cback; /* pointer to control callback function */
+ UINT8 next_app_id;
+ UINT16 next_channel_id;
+ btif_hl_state_t state;
+ btif_hl_nv_cb_t ncb;
} btif_hl_cb_t;
+
+enum
+{
+ BTIF_HL_SEND_CONNECTED_CB,
+ BTIF_HL_SEND_DISCONNECTED_CB,
+ BTIF_HL_REG_APP,
+ BTIF_HL_UNREG_APP,
+ BTIF_HL_UPDATE_MDL,
+};
typedef UINT8 btif_hl_evt_t;
typedef struct
@@ -338,29 +350,29 @@ typedef struct
int channel_id;
btif_hl_chan_cb_state_t cb_state;
int fd;
-} btif_hl_send_chan_state_cb_t;
+}btif_hl_send_chan_state_cb_t;
typedef struct
{
UINT8 app_idx;
-} btif_hl_reg_t;
-
+}btif_hl_reg_t;
typedef btif_hl_reg_t btif_hl_unreg_t;
typedef btif_hl_reg_t btif_hl_update_mdl_t;
typedef union
{
btif_hl_send_chan_state_cb_t chan_cb;
- btif_hl_reg_t reg;
- btif_hl_unreg_t unreg;
- btif_hl_update_mdl_t update_mdl;
-} btif_hl_evt_cb_t;
+ btif_hl_reg_t reg;
+ btif_hl_unreg_t unreg;
+ btif_hl_update_mdl_t update_mdl;
+}btif_hl_evt_cb_t;
-/*******************************************************************************
-** Functions
-********************************************************************************/
+
+extern btif_hl_cb_t btif_hl_cb;
+extern btif_hl_cb_t *p_btif_hl_cb;
+extern btif_hl_nv_cb_t *p_ncb;
#define BTIF_HL_GET_CB_PTR() &(btif_hl_cb)
#define BTIF_HL_GET_APP_CB_PTR(app_idx) &(btif_hl_cb.acb[(app_idx)])
@@ -369,11 +381,6 @@ typedef union
#define BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx) &(btif_hl_cb.acb[app_idx].mcb[mcl_idx].pcb)
#define BTIF_HL_GET_MDL_CFG_PTR(app_idx, item_idx) &(btif_hl_cb.acb[(app_idx)].mdl_cfg[(item_idx)])
#define BTIF_HL_GET_MDL_CFG_CHANNEL_ID_PTR(app_idx, item_idx) &(btif_hl_cb.acb[(app_idx)].mdl_cfg_channel_id[(item_idx)])
-
-extern btif_hl_cb_t btif_hl_cb;
-extern btif_hl_cb_t *p_btif_hl_cb;
-extern btif_hl_nv_cb_t *p_ncb;
-
extern BOOLEAN btif_hl_find_mcl_idx(UINT8 app_idx, BD_ADDR p_bd_addr, UINT8 *p_mcl_idx);
extern BOOLEAN btif_hl_find_app_idx(UINT8 app_id, UINT8 *p_app_idx);
extern BOOLEAN btif_hl_find_avail_mcl_idx(UINT8 app_idx, UINT8 *p_mcl_idx);
diff --git a/btif/include/btif_media.h b/btif/include/btif_media.h
index 18fbaab..9eda863 100644
--- a/btif/include/btif_media.h
+++ b/btif/include/btif_media.h
@@ -45,13 +45,14 @@
*
************************************************************************************/
-/*******************************************************************************
+/************************************************************************************
*
* Filename: btif_media.h
*
* Description: This is the audio module for the BTIF system.
*
- *******************************************************************************/
+ ***********************************************************************************/
+
#ifndef BTIF_MEDIA_H
#define BTIF_MEDIA_H
@@ -62,15 +63,15 @@
#include "btif_av_api.h"
#include "audio_a2dp_hw.h"
-/*******************************************************************************
+/*****************************************************************************
** Constants
- *******************************************************************************/
+ *****************************************************************************/
/* Generic part */
#define BTIF_SUCCESS 0
-/**
- * AV (Audio Video source) Errors
+/*
+* AV (Audio Video source) Errors
*/
#define BTIF_ERROR_SRV_AV_NOT_ENABLED 700 /* AV is not enabled */
#define BTIF_ERROR_SRV_AV_FEEDING_NOT_SUPPORTED 701 /* Requested Feeding not supported */
@@ -79,14 +80,14 @@
#define BTIF_ERROR_SRV_AV_NOT_STARTED 704 /* AV is not started */
#define BTIF_ERROR_SRV_AV_CP_NOT_SUPPORTED 705 /* Content protection is not supported by all headsets */
-/* Transcoding definition for TxTranscoding and RxTranscoding */
+/* transcoding definition for TxTranscoding and RxTranscoding */
#define BTIF_MEDIA_TRSCD_OFF 0
#define BTIF_MEDIA_TRSCD_PCM_2_SBC 1 /* Tx */
-/*******************************************************************************
+/*****************************************************************************
** Data types
- *******************************************************************************/
+ *****************************************************************************/
typedef int tBTIF_STATUS;
@@ -122,9 +123,13 @@ typedef struct
#endif
-/*******************************************************************************
- ** Public functions
- *******************************************************************************/
+/*****************************************************************************
+ ** Local data
+ *****************************************************************************/
+
+/*****************************************************************************
+ ** public functions
+ *****************************************************************************/
/*******************************************************************************
**
@@ -137,6 +142,7 @@ typedef struct
*******************************************************************************/
extern int btif_media_task(void *p);
+
/*******************************************************************************
**
** Function btif_media_task_enc_init_req
@@ -160,7 +166,6 @@ extern BOOLEAN btif_media_task_enc_init_req(tBTIF_MEDIA_INIT_AUDIO * p_msg);
#if (BTA_AV_INCLUDED == TRUE)
extern BOOLEAN btif_media_task_enc_update_req(tBTIF_MEDIA_UPDATE_AUDIO * p_msg);
#endif
-
/*******************************************************************************
**
** Function btif_media_task_start_aa_req
@@ -230,6 +235,7 @@ extern BOOLEAN btif_media_av_writebuf(UINT8 *p_media, UINT32 media_len,
UINT32 timestamp, UINT16 seq_num);
#if (BTA_AV_INCLUDED == TRUE)
+
/*******************************************************************************
**
** Function btif_media_task_audio_feeding_init_req
@@ -243,6 +249,7 @@ extern BOOLEAN btif_media_av_writebuf(UINT8 *p_media, UINT32 media_len,
extern BOOLEAN btif_media_task_audio_feeding_init_req(tBTIF_MEDIA_INIT_AUDIO_FEEDING *p_msg);
#endif
+
/*******************************************************************************
**
** Function dump_codec_info
@@ -254,8 +261,8 @@ extern BOOLEAN btif_media_task_audio_feeding_init_req(tBTIF_MEDIA_INIT_AUDIO_FEE
*******************************************************************************/
extern void dump_codec_info(unsigned char *p_codec);
-/**
- * Local adaptation helper functions between btif and media task
+/*
+ * local adaptation helper functions between btif and media task
*/
int btif_a2dp_start_media_task(void);
@@ -273,3 +280,4 @@ void btif_a2dp_on_suspended(tBTA_AV_SUSPEND *p_av);
void btif_a2dp_set_tx_flush(BOOLEAN enable);
#endif
+
diff --git a/btif/include/btif_pan.h b/btif/include/btif_pan.h
index 15d8783..47635d7 100644
--- a/btif/include/btif_pan.h
+++ b/btif/include/btif_pan.h
@@ -45,21 +45,20 @@
*
************************************************************************************/
-/*******************************************************************************
+
+/************************************************************************************
*
* Filename: btif_pan.h
*
* Description: Bluetooth pan Interface
*
- *******************************************************************************/
-
-#ifndef BTIF_PAN_H
-#define BTIF_PAN_H
+ *
+ ***********************************************************************************/
+#ifndef btif_pan_h_
+#define btif_pan_h_
#include <hardware/bt_pan.h>
-
btpan_interface_t *btif_pan_interface();
void btif_pan_init();
void btif_pan_cleanup();
-
#endif
diff --git a/btif/include/btif_pan_internal.h b/btif/include/btif_pan_internal.h
index b0ad68f..fdd9da3 100644
--- a/btif/include/btif_pan_internal.h
+++ b/btif/include/btif_pan_internal.h
@@ -45,24 +45,21 @@
*
************************************************************************************/
-/*******************************************************************************
+
+/************************************************************************************
*
* Filename: btif_pan_internal.h
*
* Description: Bluetooth pan internal
*
- *******************************************************************************/
-
-#ifndef BTIF_PAN_INTERNAL_H
-#define BTIF_PAN_INTERNAL_H
+ *
+ ***********************************************************************************/
+#ifndef btif_pan_internal_h_
+#define btif_pan_internal_h_
#include "btif_pan.h"
#include "bt_types.h"
-/*******************************************************************************
-** Constants & Macros
-********************************************************************************/
-
#define PAN_NAP_SERVICE_NAME "Android Network Access Point"
#define PANU_SERVICE_NAME "Android Network User"
#define TAP_IF_NAME "bt-pan"
@@ -77,19 +74,12 @@
#ifndef PAN_ROLE_INACTIVE
#define PAN_ROLE_INACTIVE 0
#endif
-
-
-/*******************************************************************************
-** Type definitions and return values
-********************************************************************************/
-
typedef struct eth_hdr
{
unsigned char h_dest[ETH_ADDR_LEN];
unsigned char h_src[ETH_ADDR_LEN];
short h_proto;
} tETH_HDR;
-
typedef struct
{
int handle;
@@ -110,12 +100,6 @@ typedef struct
int open_count;
btpan_conn_t conns[MAX_PAN_CONNS];
} btpan_cb_t;
-
-
-/*******************************************************************************
-** Functions
-********************************************************************************/
-
extern btpan_cb_t btpan_cb;
btpan_conn_t *btpan_new_conn(int handle, const BD_ADDR addr, int local_role, int peer_role);
btpan_conn_t *btpan_find_conn_addr(const BD_ADDR addr);
@@ -127,7 +111,6 @@ void destroy_tap_read_thread(void);
int btpan_tap_close(int tap_fd);
int btpan_tap_send(int tap_fd, const BD_ADDR src, const BD_ADDR dst, UINT16 protocol,
const char* buff, UINT16 size, BOOLEAN ext, BOOLEAN forward);
-
static inline int is_empty_eth_addr(const BD_ADDR addr)
{
int i;
@@ -136,12 +119,11 @@ static inline int is_empty_eth_addr(const BD_ADDR addr)
return 0;
return 1;
}
-
static inline int is_valid_bt_eth_addr(const BD_ADDR addr)
{
if(is_empty_eth_addr(addr))
return 0;
- return addr[0] & 1 ? 0 : 1; /* Cannot be multicasting address */
+ return addr[0] & 1 ? 0 : 1; //cannot be multicasting address
}
#endif
diff --git a/btif/include/btif_profile_queue.h b/btif/include/btif_profile_queue.h
index 5aa8a25..8f5f013 100644
--- a/btif/include/btif_profile_queue.h
+++ b/btif/include/btif_profile_queue.h
@@ -45,22 +45,23 @@
*
************************************************************************************/
-/*******************************************************************************
+/************************************************************************************
*
* Filename: btif_profile_queue.h
*
* Description: Bluetooth remote device connection queuing
*
- *******************************************************************************/
-
-#ifndef BTIF_PROFILE_QUEUE_H
-#define BTIF_PROFILE_QUEUE_H
+ ***********************************************************************************/
+#ifndef BTIF_QUEUE_H
+#define BTIF_QUEUE_H
typedef bt_status_t (btif_connect_cb_t) (bt_bdaddr_t *bda);
bt_status_t btif_queue_connect(uint16_t uuid, const bt_bdaddr_t *bda,
btif_connect_cb_t *connect_cb);
+
void btif_queue_advance();
+
void btif_queue_release();
#endif
diff --git a/btif/include/btif_sm.h b/btif/include/btif_sm.h
index c66987f..fb8ddc7 100644
--- a/btif/include/btif_sm.h
+++ b/btif/include/btif_sm.h
@@ -60,11 +60,6 @@
** Constants & Macros
******************************************************************************/
-/* Generic Enter/Exit state machine events */
-#define BTIF_SM_ENTER_EVT 0xFFFF
-#define BTIF_SM_EXIT_EVT 0xFFFE
-
-
/*****************************************************************************
** Type definitions and return values
******************************************************************************/
@@ -73,14 +68,28 @@ typedef UINT32 btif_sm_event_t;
typedef void* btif_sm_handle_t;
typedef BOOLEAN(*btif_sm_handler_t)(btif_sm_event_t event, void *data);
+/* Generic Enter/Exit state machine events */
+#define BTIF_SM_ENTER_EVT 0xFFFF
+#define BTIF_SM_EXIT_EVT 0xFFFE
+
+/*****************************************************************************
+** Extern variables and functions
+******************************************************************************/
/*****************************************************************************
** Functions
-**
-** NOTE: THESE APIs SHOULD BE INVOKED ONLY IN THE BTIF CONTEXT
-**
******************************************************************************/
+/*
+ *
+ * ########################################################################
+ *
+ * NOTE: THESE APIs SHOULD BE INVOKED ONLY IN THE BTIF CONTEXT
+ *
+ * #######################################################################
+ *
+ */
+
/*****************************************************************************
**
** Function btif_sm_init
@@ -145,3 +154,5 @@ bt_status_t btif_sm_dispatch(btif_sm_handle_t handle, btif_sm_event_t event,
bt_status_t btif_sm_change_state(btif_sm_handle_t handle, btif_sm_state_t state);
#endif /* BTIF_SM_H */
+
+
diff --git a/btif/include/btif_sock.h b/btif/include/btif_sock.h
index 920efe6..a307255 100644
--- a/btif/include/btif_sock.h
+++ b/btif/include/btif_sock.h
@@ -45,21 +45,21 @@
*
************************************************************************************/
-/*******************************************************************************
+
+/************************************************************************************
*
* Filename: btif_sock.h
*
* Description: Bluetooth socket Interface
*
- *******************************************************************************/
-
-#ifndef BTIF_SOCK_H
-#define BTIF_SOCK_H
+ *
+ ***********************************************************************************/
+#ifndef btif_sock_h_
+#define btif_sock_h_
#include <hardware/bt_sock.h>
bt_status_t btif_sock_init();
btsock_interface_t *btif_sock_get_interface();
void btif_sock_cleanup();
-
#endif
diff --git a/btif/include/btif_sock_rfc.h b/btif/include/btif_sock_rfc.h
index f7e0869..2415513 100644
--- a/btif/include/btif_sock_rfc.h
+++ b/btif/include/btif_sock_rfc.h
@@ -45,23 +45,20 @@
*
************************************************************************************/
-/*******************************************************************************
+/************************************************************************************
*
* Filename: btif_sock.h
*
* Description: Bluetooth socket Interface
*
- *******************************************************************************/
-
-#ifndef BTIF_SOCK_RFC_H
-#define BTIF_SOCK_RFC_H
+ *
+ ***********************************************************************************/
+#ifndef btif_sock_rfc_h_
+#define btif_sock_rfc_h_
bt_status_t btsock_rfc_init(int handle);
bt_status_t btsock_rfc_cleanup();
-bt_status_t btsock_rfc_listen(const char* name, const uint8_t* uuid, int channel,
- int* sock_fd, int flags);
-bt_status_t btsock_rfc_connect(const bt_bdaddr_t *bd_addr, const uint8_t* uuid,
- int channel, int* sock_fd, int flags);
+bt_status_t btsock_rfc_listen(const char* name, const uint8_t* uuid, int channel, int* sock_fd, int flags);
+bt_status_t btsock_rfc_connect(const bt_bdaddr_t *bd_addr, const uint8_t* uuid, int channel, int* sock_fd, int flags);
void btsock_rfc_signaled(int fd, int flags, uint32_t user_id);
-
#endif
diff --git a/btif/include/btif_sock_sdp.h b/btif/include/btif_sock_sdp.h
index 52af46e..012e1a9 100644
--- a/btif/include/btif_sock_sdp.h
+++ b/btif/include/btif_sock_sdp.h
@@ -45,18 +45,24 @@
*
************************************************************************************/
-#ifndef BTIF_SOCK_SDP_H
-#define BTIF_SOCK_SDP_H
+/************************************************************************************
+ *
+ * Filename: btif_sock.h
+ *
+ * Description: Bluetooth socket Interface
+ *
+ *
+ ***********************************************************************************/
+#ifndef btif_sock_sdp_h_
+#define btif_sock_sdp_h_
static inline BOOLEAN is_uuid_empty(const uint8_t* uuid)
{
static uint8_t empty_uuid[16];
return memcmp(uuid, empty_uuid, sizeof(empty_uuid)) == 0;
}
-
int add_rfc_sdp_rec(const char* name, const uint8_t* uuid, int scn);
void del_rfc_sdp_rec(int handle);
BOOLEAN is_reserved_rfc_channel(int channel);
int get_reserved_rfc_channel(const uint8_t* uuid);
-
#endif
diff --git a/btif/include/btif_sock_thread.h b/btif/include/btif_sock_thread.h
index 3678673..0f5212f 100644
--- a/btif/include/btif_sock_thread.h
+++ b/btif/include/btif_sock_thread.h
@@ -45,34 +45,29 @@
*
************************************************************************************/
+/************************************************************************************
+ *
+ * Filename: btif_sock_thread.h
+ *
+ * Description:
+ *
+ ***********************************************************************************/
+
#ifndef BTIF_SOCK_THREAD_H
#define BTIF_SOCK_THREAD_H
-
#include <hardware/bt_sock.h>
-/*******************************************************************************
-** Constants & Macros
-********************************************************************************/
-
-#define SOCK_THREAD_FD_RD 1 /* BT socket read signal */
-#define SOCK_THREAD_FD_WR (1 << 1) /* BT socket write signal */
-#define SOCK_THREAD_FD_EXCEPTION (1 << 2) /* BT socket exception singal */
-#define SOCK_THREAD_ADD_FD_SYNC (1 << 3) /* Add BT socket fd in current socket
- poll thread context immediately */
-
-/*******************************************************************************
-** Functions
-********************************************************************************/
-
-typedef void (*btsock_signaled_cb)(int fd, int type, int flags, uint32_t user_id);
-typedef void (*btsock_cmd_cb)(int cmd_fd, int type, int size, uint32_t user_id);
-
+#define SOCK_THREAD_FD_RD 1 //bt socket read signal
+#define SOCK_THREAD_FD_WR (1 << 1) //bt socket write signal
+#define SOCK_THREAD_FD_EXCEPTION (1 << 2) //bt socket exception singal
+#define SOCK_THREAD_ADD_FD_SYNC (1 << 3) //add bt socket fd in current socket poll thread context immediately
int btsock_thread_init();
int btsock_thread_add_fd(int handle, int fd, int type, int flags, uint32_t user_id);
int btsock_thread_wakeup(int handle);
-int btsock_thread_post_cmd(int handle, int cmd_type, const unsigned char* cmd_data,
- int data_size, uint32_t user_id);
+int btsock_thread_post_cmd(int handle, int cmd_type, const unsigned char* cmd_data, int data_size, uint32_t user_id);
+typedef void (*btsock_signaled_cb)(int fd, int type, int flags, uint32_t user_id);
+typedef void (*btsock_cmd_cb)(int cmd_fd, int type, int size, uint32_t user_id);
int btsock_thread_create(btsock_signaled_cb callback, btsock_cmd_cb cmd_callback);
int btsock_thread_exit(int handle);
-
#endif
+
diff --git a/btif/include/btif_sock_util.h b/btif/include/btif_sock_util.h
index fe3b881..7a7cff3 100644
--- a/btif/include/btif_sock_util.h
+++ b/btif/include/btif_sock_util.h
@@ -45,24 +45,20 @@
*
************************************************************************************/
-/*******************************************************************************
+
+/************************************************************************************
*
* Filename: btif_sock_util.h
*
* Description: Bluetooth socket Interface Helper functions
*
- *******************************************************************************/
-
-#ifndef BTIF_SOCK_UTIL_H
-#define BTIF_SOCK_UTIL_H
+ *
+ ***********************************************************************************/
+#ifndef btif_sock_util_h_
+#define btif_sock_util_h_
#include <pthread.h>
#include <cutils/log.h>
-
-/*******************************************************************************
-** Functions
-********************************************************************************/
-
static inline void init_slot_lock( pthread_mutex_t* mutex)
{
pthread_mutexattr_t attr;
@@ -70,24 +66,21 @@ static inline void init_slot_lock( pthread_mutex_t* mutex)
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
pthread_mutex_init(mutex, &attr);
}
-
static inline void lock_slot(pthread_mutex_t* mutex)
{
if(mutex->value)
pthread_mutex_lock(mutex);
else ALOGE("mutex: %p is not initialized", mutex);
}
-
static inline void unlock_slot(pthread_mutex_t* mutex)
{
if(mutex->value)
pthread_mutex_unlock(mutex);
else ALOGE("mutex: %p is not initialized", mutex);
}
-
void dump_bin(const char* title, const char* data, int size);
-
int sock_send_fd(int sock_fd, const uint8_t* buffer, int len, int send_fd);
+
int sock_send_all(int sock_fd, const uint8_t* buf, int len);
int sock_recv_all(int sock_fd, uint8_t* buf, int len);
diff --git a/btif/include/btif_storage.h b/btif/include/btif_storage.h
index 31b04fb..f4b2ca3 100644
--- a/btif/include/btif_storage.h
+++ b/btif/include/btif_storage.h
@@ -45,6 +45,14 @@
*
************************************************************************************/
+/************************************************************************************
+ *
+ * Filename: btif_storage.h
+ *
+ * Description:
+ *
+ ***********************************************************************************/
+
#ifndef BTIF_STORAGE_H
#define BTIF_STORAGE_H
@@ -53,17 +61,23 @@
#include <utils/Log.h>
-/*******************************************************************************
+/************************************************************************************
** Constants & Macros
-********************************************************************************/
+************************************************************************************/
#define BTIF_STORAGE_FILL_PROPERTY(p_prop, t, l, p_v) \
(p_prop)->type = t;(p_prop)->len = l; (p_prop)->val = (p_v);
+/************************************************************************************
+** Type definitions for callback functions
+************************************************************************************/
+
+/************************************************************************************
+** Type definitions and return values
+************************************************************************************/
-/*******************************************************************************
+/************************************************************************************
** Functions
-********************************************************************************/
-
+************************************************************************************/
/*******************************************************************************
**
** Function btif_storage_get_adapter_property
@@ -78,7 +92,6 @@
**
*******************************************************************************/
bt_status_t btif_storage_get_adapter_property(bt_property_t *property);
-
/*******************************************************************************
**
** Function btif_storage_set_adapter_property
@@ -91,7 +104,6 @@ bt_status_t btif_storage_get_adapter_property(bt_property_t *property);
**
*******************************************************************************/
bt_status_t btif_storage_set_adapter_property(bt_property_t *property);
-
/*******************************************************************************
**
** Function btif_storage_get_remote_device_property
@@ -107,7 +119,6 @@ bt_status_t btif_storage_set_adapter_property(bt_property_t *property);
*******************************************************************************/
bt_status_t btif_storage_get_remote_device_property(bt_bdaddr_t *remote_bd_addr,
bt_property_t *property);
-
/*******************************************************************************
**
** Function btif_storage_set_remote_device_property
@@ -121,7 +132,6 @@ bt_status_t btif_storage_get_remote_device_property(bt_bdaddr_t *remote_bd_addr,
*******************************************************************************/
bt_status_t btif_storage_set_remote_device_property(bt_bdaddr_t *remote_bd_addr,
bt_property_t *property);
-
/*******************************************************************************
**
** Function btif_storage_add_remote_device
@@ -137,7 +147,6 @@ bt_status_t btif_storage_set_remote_device_property(bt_bdaddr_t *remote_bd_addr,
bt_status_t btif_storage_add_remote_device(bt_bdaddr_t *remote_bdaddr,
uint32_t num_properties,
bt_property_t *properties);
-
/*******************************************************************************
**
** Function btif_storage_add_bonded_device
@@ -153,7 +162,6 @@ bt_status_t btif_storage_add_bonded_device(bt_bdaddr_t *remote_bd_addr,
LINK_KEY link_key,
uint8_t key_type,
uint8_t pin_length);
-
/*******************************************************************************
**
** Function btif_storage_remove_bonded_device
@@ -165,7 +173,6 @@ bt_status_t btif_storage_add_bonded_device(bt_bdaddr_t *remote_bd_addr,
**
*******************************************************************************/
bt_status_t btif_storage_remove_bonded_device(bt_bdaddr_t *remote_bd_addr);
-
/*******************************************************************************
**
** Function btif_storage_remove_bonded_device
@@ -177,7 +184,6 @@ bt_status_t btif_storage_remove_bonded_device(bt_bdaddr_t *remote_bd_addr);
**
*******************************************************************************/
bt_status_t btif_storage_load_bonded_devices(void);
-
/*******************************************************************************
**
** Function btif_storage_read_hl_apps_cb
@@ -201,7 +207,6 @@ bt_status_t btif_storage_read_hl_apps_cb(char *value, int value_size);
**
*******************************************************************************/
bt_status_t btif_storage_write_hl_apps_cb(char *value, int value_size);
-
/*******************************************************************************
**
** Function btif_storage_read_hl_apps_cb
@@ -213,7 +218,6 @@ bt_status_t btif_storage_write_hl_apps_cb(char *value, int value_size);
**
*******************************************************************************/
bt_status_t btif_storage_read_hl_app_data(UINT8 app_idx, char *value, int value_size);
-
/*******************************************************************************
**
** Function btif_storage_write_hl_app_data
@@ -225,7 +229,6 @@ bt_status_t btif_storage_read_hl_app_data(UINT8 app_idx, char *value, int value_
**
*******************************************************************************/
bt_status_t btif_storage_write_hl_app_data(UINT8 app_idx, char *value, int value_size);
-
/*******************************************************************************
**
** Function btif_storage_read_hl_mdl_data
@@ -237,7 +240,6 @@ bt_status_t btif_storage_write_hl_app_data(UINT8 app_idx, char *value, int value
**
*******************************************************************************/
bt_status_t btif_storage_read_hl_mdl_data(UINT8 app_idx, char *value, int value_size);
-
/*******************************************************************************
**
** Function btif_storage_write_hl_mdl_data
@@ -260,19 +262,19 @@ bt_status_t btif_storage_write_hl_mdl_data(UINT8 app_idx, char *value, int value
** BT_STATUS_FAIL otherwise
**
*******************************************************************************/
+
bt_status_t btif_storage_add_hid_device_info(bt_bdaddr_t *remote_bd_addr,
UINT16 attr_mask, UINT8 sub_class,
UINT8 app_id, UINT16 vendor_id,
UINT16 product_id, UINT16 version,
- UINT8 ctry_code, UINT16 dl_len,
- UINT8 *dsc_list);
+ UINT8 ctry_code, UINT16 dl_len, UINT8 *dsc_list);
/*******************************************************************************
**
** Function btif_storage_load_bonded_hid_info
**
-** Description BTIF storage API - Loads hid info for all the bonded devices
-** from NVRAM and adds those devices to the BTA_HH.
+** Description BTIF storage API - Loads hid info for all the bonded devices from NVRAM
+** and adds those devices to the BTA_HH.
**
** Returns BT_STATUS_SUCCESS if successful, BT_STATUS_FAIL otherwise
**
@@ -289,6 +291,7 @@ bt_status_t btif_storage_load_bonded_hid_info(void);
** BT_STATUS_FAIL otherwise
**
*******************************************************************************/
+
bt_status_t btif_storage_remove_hid_info(bt_bdaddr_t *remote_bd_addr);
/*******************************************************************************
@@ -313,6 +316,7 @@ bt_status_t btif_storage_load_autopair_device_list();
** FALSE otherwise
**
*******************************************************************************/
+
BOOLEAN btif_storage_is_device_autopair_blacklisted(bt_bdaddr_t *remote_dev_addr);
/*******************************************************************************
@@ -325,6 +329,7 @@ BOOLEAN btif_storage_is_device_autopair_blacklisted(bt_bdaddr_t *remote_dev_add
** BT_STATUS_FAIL otherwise
**
*******************************************************************************/
+
bt_status_t btif_storage_add_device_to_autopair_blacklist(bt_bdaddr_t *remote_dev_addr);
/*******************************************************************************
@@ -339,4 +344,7 @@ bt_status_t btif_storage_add_device_to_autopair_blacklist(bt_bdaddr_t *remote_de
*******************************************************************************/
BOOLEAN btif_storage_is_fixed_pin_zeros_keyboard(bt_bdaddr_t *remote_dev_addr);
+
+
#endif /* BTIF_STORAGE_H */
+
diff --git a/btif/include/btif_util.h b/btif/include/btif_util.h
index 6d146b8..cfa7945 100644..100755
--- a/btif/include/btif_util.h
+++ b/btif/include/btif_util.h
@@ -45,6 +45,14 @@
*
************************************************************************************/
+/************************************************************************************
+ *
+ * Filename: btif_util.h
+ *
+ * Description:
+ *
+ ***********************************************************************************/
+
#ifndef BTIF_UTIL_H
#define BTIF_UTIL_H
@@ -55,23 +63,26 @@
#include "data_types.h"
#include "bt_types.h"
-/*******************************************************************************
+/************************************************************************************
** Constants & Macros
-********************************************************************************/
+************************************************************************************/
#define CASE_RETURN_STR(const) case const: return #const;
-
-/*******************************************************************************
+/************************************************************************************
** Type definitions for callback functions
-********************************************************************************/
+************************************************************************************/
typedef char bdstr_t[18];
+/************************************************************************************
+** Type definitions and return values
+************************************************************************************/
-/*******************************************************************************
+
+/************************************************************************************
** Functions
-********************************************************************************/
+************************************************************************************/
const char* dump_bt_status(bt_status_t status);
const char* dump_dm_search_event(UINT16 event);
diff --git a/btif/include/uinput.h b/btif/include/uinput.h
index 0a4d928..303f4f3 100644
--- a/btif/include/uinput.h
+++ b/btif/include/uinput.h
@@ -44,6 +44,7 @@
* ESSENTIAL PURPOSE OF ANY LIMITED REMEDY.
*
************************************************************************************/
+/* TBD: tmp code here */
#ifndef __UINPUT_H
#define __UINPUT_H
@@ -56,10 +57,6 @@ extern "C" {
#include <sys/time.h>
#include <sys/ioctl.h>
-/*******************************************************************************
-** Constants & Macros
-********************************************************************************/
-
/* Events */
#define EV_SYN 0x00
@@ -583,11 +580,6 @@ extern "C" {
#define UINPUT_MAX_NAME_SIZE 80
-
-/*******************************************************************************
-** Type definitions and return values
-********************************************************************************/
-
struct uinput_id {
uint16_t bustype;
uint16_t vendor;
diff --git a/btif/src/btif_core.c b/btif/src/btif_core.c
index 555326a..555326a 100644..100755
--- a/btif/src/btif_core.c
+++ b/btif/src/btif_core.c
diff --git a/btif/src/btif_dm.c b/btif/src/btif_dm.c
index 0558846..b5cac5d 100644..100755
--- a/btif/src/btif_dm.c
+++ b/btif/src/btif_dm.c
@@ -392,7 +392,7 @@ int remove_hid_bond(bt_bdaddr_t *bd_addr)
*/
bdstr_t bdstr;
BTIF_TRACE_DEBUG2("%s---Removing HID bond--%s", __FUNCTION__,bd2str((bt_bdaddr_t *)bd_addr, &bdstr));
- return btif_hh_virtual_unplug(bd_addr);
+ return btif_hh_virtual_unpug(bd_addr);
}
/*******************************************************************************
**
diff --git a/btif/src/btif_hh.c b/btif/src/btif_hh.c
index 1726eaf..9a599dd 100644..100755
--- a/btif/src/btif_hh.c
+++ b/btif/src/btif_hh.c
@@ -551,7 +551,7 @@ BOOLEAN btif_hh_copy_hid_info(tBTA_HH_DEV_DSCP_INFO* dest , tBTA_HH_DEV_DSCP_INF
/*******************************************************************************
**
-** Function btif_hh_virtual_unplug
+** Function btif_btif_hh_virtual_unpug
**
** Description Virtual unplug initiated from the BTIF thread context
** Special handling for HID mouse-
@@ -560,7 +560,7 @@ BOOLEAN btif_hh_copy_hid_info(tBTA_HH_DEV_DSCP_INFO* dest , tBTA_HH_DEV_DSCP_INF
**
*******************************************************************************/
-bt_status_t btif_hh_virtual_unplug(bt_bdaddr_t *bd_addr)
+bt_status_t btif_hh_virtual_unpug(bt_bdaddr_t *bd_addr)
{
BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
btif_hh_device_t *p_dev;
@@ -659,7 +659,7 @@ bt_status_t btif_hh_connect(bt_bdaddr_t *bd_addr)
/*******************************************************************************
**
-** Function btif_hh_disconnect
+** Function btif_btif_hh_disconnect
**
** Description disconnection initiated from the BTIF thread context
**
@@ -1063,7 +1063,7 @@ static void btif_hh_handle_evt(UINT16 event, char *p_param)
case BTIF_HH_VUP_REQ_EVT:
{
BTIF_TRACE_EVENT2("%s: event=%d", __FUNCTION__, event);
- ret = btif_hh_virtual_unplug(bd_addr);
+ ret = btif_hh_virtual_unpug(bd_addr);
}
break;
diff --git a/btif/src/btif_hl.c b/btif/src/btif_hl.c
index 93f35fe..93f35fe 100644..100755
--- a/btif/src/btif_hl.c
+++ b/btif/src/btif_hl.c
diff --git a/btif/src/btif_rc.c b/btif/src/btif_rc.c
index 1e8a220..1e8a220 100644..100755
--- a/btif/src/btif_rc.c
+++ b/btif/src/btif_rc.c
diff --git a/btif/src/btif_storage.c b/btif/src/btif_storage.c
index d8e96d1..d8e96d1 100644..100755
--- a/btif/src/btif_storage.c
+++ b/btif/src/btif_storage.c
diff --git a/btif/src/btif_util.c b/btif/src/btif_util.c
index fb2e792..fb2e792 100644..100755
--- a/btif/src/btif_util.c
+++ b/btif/src/btif_util.c
diff --git a/conf/Android.mk b/conf/Android.mk
index 22d03d7..22d03d7 100644..100755
--- a/conf/Android.mk
+++ b/conf/Android.mk
diff --git a/conf/auto_pair_devlist.conf b/conf/auto_pair_devlist.conf
index 1e25592..1e25592 100644..100755
--- a/conf/auto_pair_devlist.conf
+++ b/conf/auto_pair_devlist.conf
diff --git a/conf/bt_did.conf b/conf/bt_did.conf
index b08a938..2b88d5e 100644
--- a/conf/bt_did.conf
+++ b/conf/bt_did.conf
@@ -1,94 +1,94 @@
-# Device ID (DID) configuration
-[DID]
-
-# Record Number: 1, 2 or 3 - maximum of 3 records
-recordNumber = 1
-
-# Primary Record - true or false (default)
-# There can be only one primary record
-primaryRecord = true
-
-# Vendor ID '0xFFFF' indicates no Device ID Service Record is present in the device
-# 0x000F = Broadcom Corporation (default)
-#vendorId = 0x000F
-
-# Vendor ID Source
-# 0x0001 = Bluetooth SIG assigned Device ID Vendor ID value (default)
-# 0x0002 = USB Implementer’s Forum assigned Device ID Vendor ID value
-#vendorIdSource = 0x0001
-
-# Product ID & Product Version
-# Per spec DID v1.3 0xJJMN for version is interpreted as JJ.M.N
-# JJ: major version number, M: minor version number, N: sub-minor version number
-# For example: 1200, v14.3.6
-productId = 0x1200
-version = 0x1436
-
-# Optional attributes
-#clientExecutableURL =
-#serviceDescription =
-#documentationURL =
-
-#=================================================================================================#
-# Device ID (DID) configuration
-[DID]
-
-# Record number: 1, 2 or 3 - maximum of 3 records
-#recordNumber = 2
-
-# Primary Record - true or false (default)
-# There can be only one primary record
-#primaryRecord = false
-
-# Vendor ID '0xFFFF' indicates no Device ID Service Record is present in the device
-# 0x000F = Broadcom Corporation (default)
-#vendorId = 0x000F
-
-# Vendor ID Source
-# 0x0001 = Bluetooth SIG assigned Device ID Vendor ID value (default)
-# 0x0002 = USB Implementer’s Forum assigned Device ID Vendor ID value
-#vendorIdSource = 0x0001
-
-# Product ID & Product Version
-# Per spec DID v1.3 0xJJMN for version is interpreted as JJ.M.N
-# JJ: major version number, M: minor version number, N: sub-minor version number
-# Default: 0x0000, v00.0.0
-#productId = 0x0000
-#version = 0x0000
-
-# Optional attributes
-#clientExecutableURL =
-#serviceDescription =
-#documentationURL =
-
-#=================================================================================================#
-# Device ID (DID) configuration
-[DID]
-
-# Record number: 1, 2 or 3 - maximum of 3 records
-#recordNumber = 3
-
-# Primary Record - true or false (default)
-# There can be only one primary record
-#primaryRecord = false
-
-# Vendor ID '0xFFFF' indicates no Device ID Service Record is present in the device
-# 0x000F = Broadcom Corporation (default)
-#vendorId = 0x000F
-
-# Vendor ID Source
-# 0x0001 = Bluetooth SIG assigned Device ID Vendor ID value (default)
-# 0x0002 = USB Implementer’s Forum assigned Device ID Vendor ID value
-#vendorIdSource = 0x0001
-
-# Product ID & Product Version
-# Per spec DID v1.3 0xJJMN for version is interpreted as JJ.M.N
-# JJ: major version number, M: minor version number, N: sub-minor version number
-# Default: 0x0000, v00.0.0
-#productId = 0x0000
-#version = 0x0000
-
-# Optional attributes
-#clientExecutableURL =
-#serviceDescription =
-#documentationURL =
+# Device ID (DID) configuration
+[DID]
+
+# Record Number: 1, 2 or 3 - maximum of 3 records
+recordNumber = 1
+
+# Primary Record - true or false (default)
+# There can be only one primary record
+primaryRecord = true
+
+# Vendor ID '0xFFFF' indicates no Device ID Service Record is present in the device
+# 0x000F = Broadcom Corporation (default)
+#vendorId = 0x000F
+
+# Vendor ID Source
+# 0x0001 = Bluetooth SIG assigned Device ID Vendor ID value (default)
+# 0x0002 = USB Implementer’s Forum assigned Device ID Vendor ID value
+#vendorIdSource = 0x0001
+
+# Product ID & Product Version
+# Per spec DID v1.3 0xJJMN for version is interpreted as JJ.M.N
+# JJ: major version number, M: minor version number, N: sub-minor version number
+# For example: 1200, v14.3.6
+productId = 0x1200
+version = 0x1436
+
+# Optional attributes
+#clientExecutableURL =
+#serviceDescription =
+#documentationURL =
+
+#=================================================================================================#
+# Device ID (DID) configuration
+[DID]
+
+# Record number: 1, 2 or 3 - maximum of 3 records
+#recordNumber = 2
+
+# Primary Record - true or false (default)
+# There can be only one primary record
+#primaryRecord = false
+
+# Vendor ID '0xFFFF' indicates no Device ID Service Record is present in the device
+# 0x000F = Broadcom Corporation (default)
+#vendorId = 0x000F
+
+# Vendor ID Source
+# 0x0001 = Bluetooth SIG assigned Device ID Vendor ID value (default)
+# 0x0002 = USB Implementer’s Forum assigned Device ID Vendor ID value
+#vendorIdSource = 0x0001
+
+# Product ID & Product Version
+# Per spec DID v1.3 0xJJMN for version is interpreted as JJ.M.N
+# JJ: major version number, M: minor version number, N: sub-minor version number
+# Default: 0x0000, v00.0.0
+#productId = 0x0000
+#version = 0x0000
+
+# Optional attributes
+#clientExecutableURL =
+#serviceDescription =
+#documentationURL =
+
+#=================================================================================================#
+# Device ID (DID) configuration
+[DID]
+
+# Record number: 1, 2 or 3 - maximum of 3 records
+#recordNumber = 3
+
+# Primary Record - true or false (default)
+# There can be only one primary record
+#primaryRecord = false
+
+# Vendor ID '0xFFFF' indicates no Device ID Service Record is present in the device
+# 0x000F = Broadcom Corporation (default)
+#vendorId = 0x000F
+
+# Vendor ID Source
+# 0x0001 = Bluetooth SIG assigned Device ID Vendor ID value (default)
+# 0x0002 = USB Implementer’s Forum assigned Device ID Vendor ID value
+#vendorIdSource = 0x0001
+
+# Product ID & Product Version
+# Per spec DID v1.3 0xJJMN for version is interpreted as JJ.M.N
+# JJ: major version number, M: minor version number, N: sub-minor version number
+# Default: 0x0000, v00.0.0
+#productId = 0x0000
+#version = 0x0000
+
+# Optional attributes
+#clientExecutableURL =
+#serviceDescription =
+#documentationURL =
diff --git a/embdrv/sbc/encoder/include/sbc_encoder.h b/embdrv/sbc/encoder/include/sbc_encoder.h
index e7415ca..b348de8 100644
--- a/embdrv/sbc/encoder/include/sbc_encoder.h
+++ b/embdrv/sbc/encoder/include/sbc_encoder.h
@@ -15,8 +15,8 @@
#define SBC_ENCODER_H
#define ENCODER_VERSION "0025"
-
-#ifdef BUILDCFG
+
+#ifdef BUILDCFG
#include "bt_target.h"
#endif
@@ -60,7 +60,7 @@
#define SBC_MAX_NUM_FRAME 1
#endif
-#ifndef SBC_DSP_OPT
+#ifndef SBC_DSP_OPT
#define SBC_DSP_OPT FALSE
#endif
@@ -101,7 +101,7 @@
/* -> more MIPS required for a better audio quality. comparasion with the SIG utilities shows a division by 10 of the RMS */
/* CAUTION: It only apply in the if SBC_FAST_DCT is set to TRUE */
#ifndef SBC_IS_64_MULT_IN_IDCT
-#define SBC_IS_64_MULT_IN_IDCT FALSE
+#define SBC_IS_64_MULT_IN_IDCT FALSE
#endif /*SBC_IS_64_MULT_IN_IDCT */
/* set SBC_IS_64_MULT_IN_QUANTIZER to TRUE to use 64 bits multiplication in the quantizer */
@@ -126,7 +126,7 @@
#endif
#define MINIMUM_ENC_VX_BUFFER_SIZE (8*10*2)
-#ifndef ENC_VX_BUFFER_SIZE
+#ifndef ENC_VX_BUFFER_SIZE
#define ENC_VX_BUFFER_SIZE (MINIMUM_ENC_VX_BUFFER_SIZE + 64)
/*#define ENC_VX_BUFFER_SIZE MINIMUM_ENC_VX_BUFFER_SIZE + 1024*/
#endif
@@ -148,7 +148,7 @@ typedef struct SBC_ENC_PARAMS_TAG
SINT16 s16NumOfChannels;
SINT16 s16NumOfBlocks; /* 4, 8, 12 or 16*/
SINT16 s16AllocationMethod; /* loudness or SNR*/
- SINT16 s16BitPool; /* 16*numOfSb for mono & dual;
+ SINT16 s16BitPool; /* 16*numOfSb for mono & dual;
32*numOfSb for stereo & joint stereo */
UINT16 u16BitRate;
UINT8 u8NumPacketToEncode; /* number of sbc frame to encode. Default is 1 */
diff --git a/embdrv/sbc/encoder/include/sbc_if.h b/embdrv/sbc/encoder/include/sbc_if.h
index 59d47f3..7e4c2c5 100644
--- a/embdrv/sbc/encoder/include/sbc_if.h
+++ b/embdrv/sbc/encoder/include/sbc_if.h
@@ -24,5 +24,5 @@ int SBC_init(int pcm_sample_freq, int channels, int bits_per_sample);
return - number of bytes written to sbc_out
*/
-int SBC_write(unsigned char *pcm_in, int length, unsigned char *sbc_out);
+int SBC_write(unsigned char *pcm_in, int length, unsigned char *sbc_out);
#endif
diff --git a/embdrv/sbc/encoder/srce/sbc_analysis.c b/embdrv/sbc/encoder/srce/sbc_analysis.c
index 9e8ba7e..77f4dbe 100644
--- a/embdrv/sbc/encoder/srce/sbc_analysis.c
+++ b/embdrv/sbc/encoder/srce/sbc_analysis.c
@@ -2,7 +2,7 @@
**
** File Name: $RCSfile: sbc_analysis.c,v $
**
-** Description: This file contains the code that performs Analysis of the input
+** Description: This file contains the code that performs Analysis of the input
** audio stream.
**
** Revision : $Id: sbc_analysis.c,v 1.29 2006/04/13 17:00:37 mjougit Exp $
@@ -64,7 +64,7 @@
#define WIND_8_SUBBANDS_5_1 (SINT32)0x0209291F /* 21 et 59 = 0x0209291F */
#define WIND_8_SUBBANDS_5_2 (SINT32)0x110ECEF0 /* 37 et 43 = 0x110ECEF0 */
#define WIND_8_SUBBANDS_5_3 (SINT32)0xFF5EEB73 /* 27 et 53 = 0xFF5EEB73 */
-#define WIND_8_SUBBANDS_5_4 (SINT32)0x0034F8B6 /* 11 et 69 = 0x0034F8B6 */
+#define WIND_8_SUBBANDS_5_4 (SINT32)0x0034F8B6 /* 11 et 69 = 0x0034F8B6 */
#define WIND_8_SUBBANDS_6_0 (SINT32)0x003060F4 /* 6 et 74 = 0x003060F4 */
#define WIND_8_SUBBANDS_6_1 (SINT32)0x02138653 /* 22 et 58 = 0x02138653 */
#define WIND_8_SUBBANDS_6_2 (SINT32)0x120435FA /* 38 et 42 = 0x120435FA */
@@ -72,7 +72,7 @@
#define WIND_8_SUBBANDS_6_4 (SINT32)0x00415B75 /* 10 et 70 = 0x00415B75 */
#define WIND_8_SUBBANDS_7_0 (SINT32)0x003A72E7 /* 7 et 73 = 0x003A72E7 */
#define WIND_8_SUBBANDS_7_1 (SINT32)0x01F5F424 /* 23 et 57 = 0x01F5F424 */
-#define WIND_8_SUBBANDS_7_2 (SINT32)0x129C226F /* 39 et 41 = 0x129C226F */
+#define WIND_8_SUBBANDS_7_2 (SINT32)0x129C226F /* 39 et 41 = 0x129C226F */
#define WIND_8_SUBBANDS_7_3 (SINT32)0x01223EBA /* 25 et 55 = 0x01223EBA */
#define WIND_8_SUBBANDS_7_4 (SINT32)0x0044EF48 /* 9 et 71 = 0x0044EF48 */
#define WIND_8_SUBBANDS_8_0 (SINT32)0x0041EC6A /* 8 et 72 = 0x0041EC6A */
@@ -126,7 +126,7 @@
#define WIND_8_SUBBANDS_5_1 (SINT16)0x0209 /* 21 et 59 = 0x0209291F */
#define WIND_8_SUBBANDS_5_2 (SINT16)0x110F /* 37 et 43 = 0x110ECEF0 */
#define WIND_8_SUBBANDS_5_3 (SINT16)0xFF5F /* 27 et 53 = 0xFF5EEB73 */
-#define WIND_8_SUBBANDS_5_4 (SINT16)0x0035 /* 11 et 69 = 0x0034F8B6 */
+#define WIND_8_SUBBANDS_5_4 (SINT16)0x0035 /* 11 et 69 = 0x0034F8B6 */
#define WIND_8_SUBBANDS_6_0 (SINT16)0x0030 /* 6 et 74 = 0x003060F4 */
#define WIND_8_SUBBANDS_6_1 (SINT16)0x0214 /* 22 et 58 = 0x02138653 */
#define WIND_8_SUBBANDS_6_2 (SINT16)0x1204 /* 38 et 42 = 0x120435FA */
@@ -134,7 +134,7 @@
#define WIND_8_SUBBANDS_6_4 (SINT16)0x0041 /* 10 et 70 = 0x00415B75 */
#define WIND_8_SUBBANDS_7_0 (SINT16)0x003A /* 7 et 73 = 0x003A72E7 */
#define WIND_8_SUBBANDS_7_1 (SINT16)0x01F6 /* 23 et 57 = 0x01F5F424 */
-#define WIND_8_SUBBANDS_7_2 (SINT16)0x129C /* 39 et 41 = 0x129C226F */
+#define WIND_8_SUBBANDS_7_2 (SINT16)0x129C /* 39 et 41 = 0x129C226F */
#define WIND_8_SUBBANDS_7_3 (SINT16)0x0122 /* 25 et 55 = 0x01223EBA */
#define WIND_8_SUBBANDS_7_4 (SINT16)0x0045 /* 9 et 71 = 0x0044EF48 */
#define WIND_8_SUBBANDS_8_0 (SINT16)0x0042 /* 8 et 72 = 0x0041EC6A */
@@ -147,7 +147,7 @@
#endif
static SINT32 s32DCTY[16] = {0};
static SINT32 s32X[ENC_VX_BUFFER_SIZE/2];
-static SINT16 *s16X=(SINT16*) s32X; /* s16X must be 32 bits aligned cf SHIFTUP_X8_2*/
+static SINT16 *s16X=(SINT16*) s32X; /* s16X must be 32 bits aligned cf SHIFTUP_X8_2*/
#if (SBC_USE_ARM_PRAGMA==TRUE)
#pragma arm section zidata
#endif
@@ -951,17 +951,17 @@ void SbcAnalysisFilter4(SBC_ENC_PARAMS *pstrEncParams)
for (s32Ch=0;s32Ch<s32NumOfChannels;s32Ch++)
{
ChOffset=s32Ch*Offset2+Offset;
-
- WINDOW_PARTIAL_4
-
+
+ WINDOW_PARTIAL_4
+
SBC_FastIDCT4(s32DCTY, ps32SbBuf);
-
+
ps32SbBuf +=SUB_BANDS_4;
}
if (s32NumOfChannels==1)
{
if (ShiftCounter>=EncMaxShiftCounter)
- {
+ {
SHIFTUP_X4;
ShiftCounter=0;
}
@@ -973,7 +973,7 @@ void SbcAnalysisFilter4(SBC_ENC_PARAMS *pstrEncParams)
else
{
if (ShiftCounter>=EncMaxShiftCounter)
- {
+ {
SHIFTUP_X4_2;
ShiftCounter=0;
}
@@ -1055,17 +1055,17 @@ void SbcAnalysisFilter8 (SBC_ENC_PARAMS *pstrEncParams)
for (s32Ch=0;s32Ch<s32NumOfChannels;s32Ch++)
{
ChOffset=s32Ch*Offset2+Offset;
-
- WINDOW_PARTIAL_8
-
+
+ WINDOW_PARTIAL_8
+
SBC_FastIDCT8 (s32DCTY, ps32SbBuf);
-
+
ps32SbBuf +=SUB_BANDS_8;
}
if (s32NumOfChannels==1)
{
if (ShiftCounter>=EncMaxShiftCounter)
- {
+ {
SHIFTUP_X8;
ShiftCounter=0;
}
@@ -1077,7 +1077,7 @@ void SbcAnalysisFilter8 (SBC_ENC_PARAMS *pstrEncParams)
else
{
if (ShiftCounter>=EncMaxShiftCounter)
- {
+ {
SHIFTUP_X8_2;
ShiftCounter=0;
}
@@ -1086,7 +1086,7 @@ void SbcAnalysisFilter8 (SBC_ENC_PARAMS *pstrEncParams)
ShiftCounter+=SUB_BANDS_8;
}
}
- }
+ }
}
void SbcAnalysisInit (void)
diff --git a/embdrv/sbc/encoder/srce/sbc_dct.c b/embdrv/sbc/encoder/srce/sbc_dct.c
index ca23c70..0ff7f1f 100644
--- a/embdrv/sbc/encoder/srce/sbc_dct.c
+++ b/embdrv/sbc/encoder/srce/sbc_dct.c
@@ -22,10 +22,10 @@
** Function SBC_FastIDCT8
**
** Description implementation of fast DCT algorithm by Feig and Winograd
-**
+**
**
** Returns y = dct(pInVect)
-**
+**
**
*******************************************************************************/
@@ -86,66 +86,66 @@ void SBC_FastIDCT8(SINT32 *pInVect, SINT32 *pOutVect)
x5 = (pInVect[9] - pInVect[15]) >>1;
x6 = (pInVect[10] - pInVect[14])>>1;
x7 = (pInVect[11] - pInVect[13])>>1;
-
- /* 2-point IDCT of x0 and x4 as in (11) */
- temp = x0 ;
+
+ /* 2-point IDCT of x0 and x4 as in (11) */
+ temp = x0 ;
SBC_IDCT_MULT(SBC_COS_PI_SUR_4, ( x0 + x4 ), x0); /*x0 = ( x0 + x4 ) * cos(1*pi/4) ; */
SBC_IDCT_MULT(SBC_COS_PI_SUR_4, ( temp - x4 ), x4); /*x4 = ( temp - x4 ) * cos(1*pi/4) ; */
-
- /* rearrangement of x2 and x6 as in (15) */
+
+ /* rearrangement of x2 and x6 as in (15) */
x2 -=x6;
- x6 <<= 1 ;
-
- /* 2-point IDCT of x2 and x6 and post-multiplication as in (15) */
+ x6 <<= 1 ;
+
+ /* 2-point IDCT of x2 and x6 and post-multiplication as in (15) */
SBC_IDCT_MULT(SBC_COS_PI_SUR_4,x6, x6); /*x6 = x6 * cos(1*pi/4) ; */
- temp = x2 ;
+ temp = x2 ;
SBC_IDCT_MULT(SBC_COS_PI_SUR_8,( x2 + x6 ), x2); /*x2 = ( x2 + x6 ) * cos(1*pi/8) ; */
- SBC_IDCT_MULT(SBC_COS_3PI_SUR_8,( temp - x6 ), x6); /*x6 = ( temp - x6 ) * cos(3*pi/8) ;*/
-
- /* 4-point IDCT of x0,x2,x4 and x6 as in (11) */
- res_even[ 0 ] = x0 + x2 ;
- res_even[ 1 ] = x4 + x6 ;
- res_even[ 2 ] = x4 - x6 ;
- res_even[ 3 ] = x0 - x2 ;
-
-
- /* rearrangement of x1,x3,x5,x7 as in (15) */
- x7 <<= 1 ;
- x5 = ( x5 <<1 ) - x7 ;
- x3 = ( x3 <<1 ) - x5 ;
+ SBC_IDCT_MULT(SBC_COS_3PI_SUR_8,( temp - x6 ), x6); /*x6 = ( temp - x6 ) * cos(3*pi/8) ;*/
+
+ /* 4-point IDCT of x0,x2,x4 and x6 as in (11) */
+ res_even[ 0 ] = x0 + x2 ;
+ res_even[ 1 ] = x4 + x6 ;
+ res_even[ 2 ] = x4 - x6 ;
+ res_even[ 3 ] = x0 - x2 ;
+
+
+ /* rearrangement of x1,x3,x5,x7 as in (15) */
+ x7 <<= 1 ;
+ x5 = ( x5 <<1 ) - x7 ;
+ x3 = ( x3 <<1 ) - x5 ;
x1 -= x3 >>1 ;
-
- /* two-dimensional IDCT of x1 and x5 */
+
+ /* two-dimensional IDCT of x1 and x5 */
SBC_IDCT_MULT(SBC_COS_PI_SUR_4, x5, x5); /*x5 = x5 * cos(1*pi/4) ; */
- temp = x1 ;
- x1 = x1 + x5 ;
- x5 = temp - x5 ;
-
- /* rearrangement of x3 and x7 as in (15) */
+ temp = x1 ;
+ x1 = x1 + x5 ;
+ x5 = temp - x5 ;
+
+ /* rearrangement of x3 and x7 as in (15) */
x3 -= x7;
- x7 <<= 1 ;
+ x7 <<= 1 ;
SBC_IDCT_MULT(SBC_COS_PI_SUR_4, x7, x7); /*x7 = x7 * cos(1*pi/4) ; */
-
- /* 2-point IDCT of x3 and x7 and post-multiplication as in (15) */
- temp = x3 ;
+
+ /* 2-point IDCT of x3 and x7 and post-multiplication as in (15) */
+ temp = x3 ;
SBC_IDCT_MULT( SBC_COS_PI_SUR_8,( x3 + x7 ), x3); /*x3 = ( x3 + x7 ) * cos(1*pi/8) ; */
- SBC_IDCT_MULT( SBC_COS_3PI_SUR_8,( temp - x7 ), x7); /*x7 = ( temp - x7 ) * cos(3*pi/8) ;*/
-
- /* 4-point IDCT of x1,x3,x5 and x7 and post multiplication by diagonal matrix as in (14) */
+ SBC_IDCT_MULT( SBC_COS_3PI_SUR_8,( temp - x7 ), x7); /*x7 = ( temp - x7 ) * cos(3*pi/8) ;*/
+
+ /* 4-point IDCT of x1,x3,x5 and x7 and post multiplication by diagonal matrix as in (14) */
SBC_IDCT_MULT((SBC_COS_PI_SUR_16), ( x1 + x3 ) , res_odd[0]); /*res_odd[ 0 ] = ( x1 + x3 ) * cos(1*pi/16) ; */
SBC_IDCT_MULT((SBC_COS_3PI_SUR_16), ( x5 + x7 ) , res_odd[1]); /*res_odd[ 1 ] = ( x5 + x7 ) * cos(3*pi/16) ; */
SBC_IDCT_MULT((SBC_COS_5PI_SUR_16), ( x5 - x7 ) , res_odd[2]); /*res_odd[ 2 ] = ( x5 - x7 ) * cos(5*pi/16) ; */
SBC_IDCT_MULT((SBC_COS_7PI_SUR_16), ( x1 - x3 ) , res_odd[3]); /*res_odd[ 3 ] = ( x1 - x3 ) * cos(7*pi/16) ; */
-
- /* additions and subtractions as in (9) */
- pOutVect[0] = (res_even[ 0 ] + res_odd[ 0 ]) ;
- pOutVect[1] = (res_even[ 1 ] + res_odd[ 1 ]) ;
- pOutVect[2] = (res_even[ 2 ] + res_odd[ 2 ]) ;
- pOutVect[3] = (res_even[ 3 ] + res_odd[ 3 ]) ;
- pOutVect[7] = (res_even[ 0 ] - res_odd[ 0 ]) ;
- pOutVect[6] = (res_even[ 1 ] - res_odd[ 1 ]) ;
- pOutVect[5] = (res_even[ 2 ] - res_odd[ 2 ]) ;
- pOutVect[4] = (res_even[ 3 ] - res_odd[ 3 ]) ;
+
+ /* additions and subtractions as in (9) */
+ pOutVect[0] = (res_even[ 0 ] + res_odd[ 0 ]) ;
+ pOutVect[1] = (res_even[ 1 ] + res_odd[ 1 ]) ;
+ pOutVect[2] = (res_even[ 2 ] + res_odd[ 2 ]) ;
+ pOutVect[3] = (res_even[ 3 ] + res_odd[ 3 ]) ;
+ pOutVect[7] = (res_even[ 0 ] - res_odd[ 0 ]) ;
+ pOutVect[6] = (res_even[ 1 ] - res_odd[ 1 ]) ;
+ pOutVect[5] = (res_even[ 2 ] - res_odd[ 2 ]) ;
+ pOutVect[4] = (res_even[ 3 ] - res_odd[ 3 ]) ;
#else
UINT8 Index, k;
SINT32 temp;
@@ -171,16 +171,16 @@ void SBC_FastIDCT8(SINT32 *pInVect, SINT32 *pOutVect)
** Function SBC_FastIDCT4
**
** Description implementation of fast DCT algorithm by Feig and Winograd
-**
+**
**
** Returns y = dct(x0)
-**
+**
**
*******************************************************************************/
void SBC_FastIDCT4(SINT32 *pInVect, SINT32 *pOutVect)
{
#if (SBC_FAST_DCT == TRUE)
-#if (SBC_ARM_ASM_OPT==TRUE)
+#if (SBC_ARM_ASM_OPT==TRUE)
#else
#if (SBC_IPAQ_OPT==TRUE)
#if (SBC_IS_64_MULT_IN_IDCT == TRUE)
@@ -211,10 +211,10 @@ void SBC_FastIDCT4(SINT32 *pInVect, SINT32 *pOutVect)
SBC_IDCT_MULT((SBC_COS_PI_SUR_8>>1), temp , tmp[4]);
tmp[6]=tmp[2]+tmp[5];
tmp[7]=tmp[3]-tmp[4];
- pOutVect[0] = (tmp[0]+tmp[6]);
- pOutVect[1] = (tmp[1]+tmp[7]);
- pOutVect[2] = (tmp[1]-tmp[7]);
- pOutVect[3] = (tmp[0]-tmp[6]);
+ pOutVect[0] = (tmp[0]+tmp[6]);
+ pOutVect[1] = (tmp[1]+tmp[7]);
+ pOutVect[2] = (tmp[1]-tmp[7]);
+ pOutVect[3] = (tmp[0]-tmp[6]);
#else
UINT8 Index, k;
SINT32 temp;
@@ -229,6 +229,6 @@ void SBC_FastIDCT4(SINT32 *pInVect, SINT32 *pOutVect)
temp += ((gas16AnalDCTcoeff4[(Index*4*2)+k] * (pInVect[k] & 0xFFFF)) >> 16);
}
pOutVect[Index] = temp;
- }
+ }
#endif
}
diff --git a/embdrv/sbc/encoder/srce/sbc_dct_coeffs.c b/embdrv/sbc/encoder/srce/sbc_dct_coeffs.c
index 3711519..03f632f 100644
--- a/embdrv/sbc/encoder/srce/sbc_dct_coeffs.c
+++ b/embdrv/sbc/encoder/srce/sbc_dct_coeffs.c
@@ -15,7 +15,7 @@
#include "sbc_encoder.h"
/*DCT coeff for 4 sub-band case.*/
#if (SBC_FAST_DCT == FALSE)
-const SINT16 gas16AnalDCTcoeff4[] =
+const SINT16 gas16AnalDCTcoeff4[] =
{
(SINT16)(0.7071*32768),
(SINT16)(0.9239*32768),
@@ -55,7 +55,7 @@ const SINT16 gas16AnalDCTcoeff4[] =
};
/*DCT coeff for 8 sub-band case.*/
-const SINT16 gas16AnalDCTcoeff8[] =
+const SINT16 gas16AnalDCTcoeff8[] =
{
(SINT16)(0.7071*32768),
(SINT16)(0.8315*32768),
diff --git a/embdrv/sbc/encoder/srce/sbc_enc_bit_alloc_mono.c b/embdrv/sbc/encoder/srce/sbc_enc_bit_alloc_mono.c
index 497f014..c8b13a9 100644
--- a/embdrv/sbc/encoder/srce/sbc_enc_bit_alloc_mono.c
+++ b/embdrv/sbc/encoder/srce/sbc_enc_bit_alloc_mono.c
@@ -2,7 +2,7 @@
**
** File Name: $RCSfile: sbc_enc_bit_alloc_mono.c,v $
**
-** Description: This file contains the code for bit allocation algorithm.
+** Description: This file contains the code for bit allocation algorithm.
** It calculates the number of bits required for the encoded stream of data.
**
** Revision : $Id: sbc_enc_bit_alloc_mono.c,v 1.9 2006/03/31 17:16:35 mjougit Exp $
@@ -17,16 +17,16 @@
#include "sbc_enc_func_declare.h"
/*global arrays*/
-const SINT16 sbc_enc_as16Offset4[4][4] = { {-1, 0, 0, 0}, {-2, 0, 0, 1},
+const SINT16 sbc_enc_as16Offset4[4][4] = { {-1, 0, 0, 0}, {-2, 0, 0, 1},
{-2, 0, 0, 1}, {-2, 0, 0, 1} };
-const SINT16 sbc_enc_as16Offset8[4][8] = { {-2, 0, 0, 0, 0, 0, 0, 1},
+const SINT16 sbc_enc_as16Offset8[4][8] = { {-2, 0, 0, 0, 0, 0, 0, 1},
{-3, 0, 0, 0, 0, 0, 1, 2},
- {-4, 0, 0, 0, 0, 0, 1, 2},
+ {-4, 0, 0, 0, 0, 0, 1, 2},
{-4, 0, 0, 0, 0, 0, 1, 2} };
/****************************************************************************
* BitAlloc - Calculates the required number of bits for the given scale factor
-* and the number of subbands.
+* and the number of subbands.
*
* RETURNS : N/A
*/
@@ -78,8 +78,8 @@ void sbc_enc_bit_alloc_mono(SBC_ENC_PARAMS *pstrCodecParams)
*(ps16GenBufPtr) = -5;
else
{
- s32Loudness =
- (SINT32)(pstrCodecParams->as16ScaleFactor[s32Ch*s32NumOfSubBands+s32Sb]
+ s32Loudness =
+ (SINT32)(pstrCodecParams->as16ScaleFactor[s32Ch*s32NumOfSubBands+s32Sb]
- *ps16GenTabPtr);
if(s32Loudness > 0)
*(ps16GenBufPtr) = (SINT16)(s32Loudness >>1);
@@ -89,7 +89,7 @@ void sbc_enc_bit_alloc_mono(SBC_ENC_PARAMS *pstrCodecParams)
ps16GenBufPtr++;
ps16GenTabPtr++;
}
-
+
}
/* max bitneed index is searched*/
@@ -112,7 +112,7 @@ void sbc_enc_bit_alloc_mono(SBC_ENC_PARAMS *pstrCodecParams)
s32BitSlice --;
s32BitCount -= s32SliceCount;
s32SliceCount = 0;
-
+
for(s32Sb=0; s32Sb<s32NumOfSubBands; s32Sb++)
{
if( (((*ps16GenBufPtr-s32BitSlice)< 16) && (*ps16GenBufPtr-s32BitSlice) >= 1))
@@ -123,17 +123,17 @@ void sbc_enc_bit_alloc_mono(SBC_ENC_PARAMS *pstrCodecParams)
s32SliceCount++;
}
ps16GenBufPtr++;
-
+
}/*end of for*/
ps16GenBufPtr = ps16BitNeed + s32Ch*s32NumOfSubBands;
}while(s32BitCount-s32SliceCount>0);
-
+
if(s32BitCount == 0)
{
s32BitCount -= s32SliceCount;
s32BitSlice --;
}
-
+
/*Bits are distributed until the last bitslice is reached*/
ps16GenArrPtr = pstrCodecParams->as16Bits+s32Ch*s32NumOfSubBands;
ps16GenBufPtr = ps16BitNeed + s32Ch*s32NumOfSubBands;
@@ -142,7 +142,7 @@ void sbc_enc_bit_alloc_mono(SBC_ENC_PARAMS *pstrCodecParams)
if(*(ps16GenBufPtr) < s32BitSlice+2)
*(ps16GenArrPtr) = 0;
else
- *(ps16GenArrPtr) = ((*(ps16GenBufPtr)-s32BitSlice)<16) ?
+ *(ps16GenArrPtr) = ((*(ps16GenBufPtr)-s32BitSlice)<16) ?
(SINT16)(*(ps16GenBufPtr)-s32BitSlice) : 16;
ps16GenBufPtr++;
@@ -159,7 +159,7 @@ void sbc_enc_bit_alloc_mono(SBC_ENC_PARAMS *pstrCodecParams)
(*(ps16GenArrPtr))++;
s32BitCount--;
}
- else if( (*(ps16GenBufPtr) == s32BitSlice+1) &&
+ else if( (*(ps16GenBufPtr) == s32BitSlice+1) &&
(s32BitCount > 1) )
{
*(ps16GenArrPtr) = 2;
@@ -170,8 +170,8 @@ void sbc_enc_bit_alloc_mono(SBC_ENC_PARAMS *pstrCodecParams)
ps16GenBufPtr++;
}
ps16GenArrPtr = pstrCodecParams->as16Bits+s32Ch*s32NumOfSubBands;
-
-
+
+
s32Sb=0;
while( (s32BitCount > 0) && (s32Sb < s32NumOfSubBands) )
{
diff --git a/embdrv/sbc/encoder/srce/sbc_enc_bit_alloc_ste.c b/embdrv/sbc/encoder/srce/sbc_enc_bit_alloc_ste.c
index cb7819b..cbcb809 100644
--- a/embdrv/sbc/encoder/srce/sbc_enc_bit_alloc_ste.c
+++ b/embdrv/sbc/encoder/srce/sbc_enc_bit_alloc_ste.c
@@ -2,7 +2,7 @@
**
** File Name: $RCSfile: sbc_enc_bit_alloc_ste.c,v $
**
-** Description: This file contains the code for bit allocation algorithm.
+** Description: This file contains the code for bit allocation algorithm.
** It calculates the number of bits required for the encoded stream of data.
**
** Revision : $Id: sbc_enc_bit_alloc_ste.c,v 1.9 2006/03/31 17:17:07 mjougit Exp $
@@ -22,7 +22,7 @@ extern const SINT16 sbc_enc_as16Offset8[4][8];
/****************************************************************************
* BitAlloc - Calculates the required number of bits for the given scale factor
-* and the number of subbands.
+* and the number of subbands.
*
* RETURNS : N/A
*/
@@ -101,7 +101,7 @@ void sbc_enc_bit_alloc_ste(SBC_ENC_PARAMS *pstrCodecParams)
s32BitCount -= s32SliceCount;
s32SliceCount = 0;
ps16GenBufPtr = ps16BitNeed;
-
+
for (s32Sb = 0; s32Sb < 2*s32NumOfSubBands; s32Sb++)
{
if ( (*ps16GenBufPtr >= s32BitSlice + 1) && (*ps16GenBufPtr < s32BitSlice + 16) )
@@ -131,7 +131,7 @@ void sbc_enc_bit_alloc_ste(SBC_ENC_PARAMS *pstrCodecParams)
if (*ps16GenBufPtr < s32BitSlice+2)
*ps16GenArrPtr = 0;
else
- *ps16GenArrPtr = ((*(ps16GenBufPtr)-s32BitSlice) < 16) ?
+ *ps16GenArrPtr = ((*(ps16GenBufPtr)-s32BitSlice) < 16) ?
(SINT16)(*(ps16GenBufPtr)-s32BitSlice):16;
ps16GenBufPtr++;
ps16GenArrPtr++;
@@ -162,7 +162,7 @@ void sbc_enc_bit_alloc_ste(SBC_ENC_PARAMS *pstrCodecParams)
s32Sb++;
ps16GenBufPtr = ps16BitNeed+s32Sb;
ps16GenArrPtr = pstrCodecParams->as16Bits+s32Sb;
-
+
}
else
{
diff --git a/embdrv/sbc/encoder/srce/sbc_enc_coeffs.c b/embdrv/sbc/encoder/srce/sbc_enc_coeffs.c
index 840e329..48cc22f 100644
--- a/embdrv/sbc/encoder/srce/sbc_enc_coeffs.c
+++ b/embdrv/sbc/encoder/srce/sbc_enc_coeffs.c
@@ -16,7 +16,7 @@
#if (SBC_ARM_ASM_OPT==FALSE && SBC_IPAQ_OPT==FALSE)
#if (SBC_IS_64_MULT_IN_WINDOW_ACCU == FALSE)
/*Window coeff for 4 sub band case*/
-const SINT16 gas32CoeffFor4SBs[] =
+const SINT16 gas32CoeffFor4SBs[] =
{
(SINT16)((SINT32)0x00000000 >> 16), (SINT16)0x00000000,
(SINT16)((SINT32)0x001194E6 >> 16), (SINT16)0x001194E6,
@@ -65,7 +65,7 @@ const SINT16 gas32CoeffFor4SBs[] =
};
/*Window coeff for 8 sub band case*/
-const SINT16 gas32CoeffFor8SBs[] =
+const SINT16 gas32CoeffFor8SBs[] =
{
(SINT16)((SINT32)0x00000000 >>16), (SINT16)0x00000000,
(SINT16)((SINT32)0x00052173 >>16), (SINT16)0x00052173,
@@ -161,7 +161,7 @@ const SINT16 gas32CoeffFor8SBs[] =
#else
/*Window coeff for 4 sub band case*/
-const SINT32 gas32CoeffFor4SBs[] =
+const SINT32 gas32CoeffFor4SBs[] =
{
(SINT32)0x00000000,
(SINT32)0x001194E6,
@@ -210,7 +210,7 @@ const SINT32 gas32CoeffFor4SBs[] =
};
/*Window coeff for 8 sub band case*/
-const SINT32 gas32CoeffFor8SBs[] =
+const SINT32 gas32CoeffFor8SBs[] =
{
(SINT32)0x00000000,
(SINT32)0x00052173,
diff --git a/embdrv/sbc/encoder/srce/sbc_encoder.c b/embdrv/sbc/encoder/srce/sbc_encoder.c
index f950f80..ce7dbb9 100644
--- a/embdrv/sbc/encoder/srce/sbc_encoder.c
+++ b/embdrv/sbc/encoder/srce/sbc_encoder.c
@@ -47,7 +47,7 @@ SINT16 EncMaxShiftCounter;
*
* if(index > 0)
* {
- * p = &u8frame[base_index];
+ * p = &u8frame[base_index];
* if((index&1)&&(u16PacketLength > (base_index+index*2)))
* {
* // odd index: swap 2 bytes
@@ -108,7 +108,7 @@ void SBC_Encoder(SBC_ENC_PARAMS *pstrEncParams)
SINT32 s32Sb; /* counter for sub-band*/
UINT32 u32Count, maxBit = 0; /* loop count*/
SINT32 s32MaxValue; /* temp variable to store max value */
-
+
SINT16 *ps16ScfL;
SINT32 *SbBuffer;
SINT32 s32Blk; /* counter for block*/
@@ -122,7 +122,7 @@ void SBC_Encoder(SBC_ENC_PARAMS *pstrEncParams)
tSBC_FR_CB *p_cur, *p_last;
UINT32 idx, tmp, tmp2;
register SINT32 s32NumOfSubBands = pstrEncParams->s16NumOfSubBands;
-
+
pstrEncParams->pu8NextPacket = pstrEncParams->pu8Packet;
#if (SBC_NO_PCM_CPY_OPTION == TRUE)
@@ -131,19 +131,19 @@ void SBC_Encoder(SBC_ENC_PARAMS *pstrEncParams)
pstrEncParams->ps16NextPcmBuffer = pstrEncParams->as16PcmBuffer;
#endif
do
- {
+ {
/* SBC ananlysis filter*/
if (s32NumOfSubBands == 4)
SbcAnalysisFilter4(pstrEncParams);
else
SbcAnalysisFilter8(pstrEncParams);
-
+
/* compute the scale factor, and save the max */
ps16ScfL = pstrEncParams->as16ScaleFactor;
s32Ch=pstrEncParams->s16NumOfChannels*s32NumOfSubBands;
pstrEncParams->ps16NextPcmBuffer+=s32Ch*s32NumOfBlocks; /* in case of multible sbc frame to encode update the pcm pointer */
-
+
for (s32Sb=0; s32Sb<s32Ch; s32Sb++)
{
SbBuffer=pstrEncParams->s32SbBuffer+s32Sb;
@@ -154,16 +154,16 @@ void SBC_Encoder(SBC_ENC_PARAMS *pstrEncParams)
s32MaxValue=abs32(*SbBuffer);
SbBuffer+=s32Ch;
}
-
+
u32Count = (s32MaxValue > 0x800000) ? 9 : 0;
-
+
for ( ; u32Count < 15; u32Count++)
{
if (s32MaxValue <= (SINT32)(0x8000 << u32Count))
break;
}
*ps16ScfL++ = (SINT16)u32Count;
-
+
if (u32Count > maxBit)
maxBit = u32Count;
}
@@ -209,30 +209,30 @@ void SBC_Encoder(SBC_ENC_PARAMS *pstrEncParams)
u32CountDiff=u32Count;
if ( (*ps16ScfL + *(ps16ScfL+s32NumOfSubBands)) > (SINT16)(u32CountSum + u32CountDiff) )
{
-
+
if (u32CountSum > maxBit)
maxBit = u32CountSum;
-
+
if (u32CountDiff > maxBit)
maxBit = u32CountDiff;
-
+
*ps16ScfL = (SINT16)u32CountSum;
*(ps16ScfL+s32NumOfSubBands) = (SINT16)u32CountDiff;
-
+
SbBuffer=pstrEncParams->s32SbBuffer+s32Sb;
pSum = s32LRSum;
pDiff = s32LRDiff;
-
+
for (s32Blk = 0; s32Blk < s32NumOfBlocks; s32Blk++)
{
- *SbBuffer = *pSum;
+ *SbBuffer = *pSum;
*(SbBuffer+s32NumOfSubBands) = *pDiff;
-
- SbBuffer += s32NumOfSubBands<<1;
+
+ SbBuffer += s32NumOfSubBands<<1;
pSum++;
pDiff++;
}
-
+
pstrEncParams->as16Join[s32Sb] = 1;
}
else
@@ -241,18 +241,18 @@ void SBC_Encoder(SBC_ENC_PARAMS *pstrEncParams)
}
ps16ScfL++;
}
- pstrEncParams->as16Join[s32Sb] = 0;
+ pstrEncParams->as16Join[s32Sb] = 0;
}
#endif
-
+
pstrEncParams->s16MaxBitNeed = (SINT16)maxBit;
-
+
/* bit allocation */
if ((pstrEncParams->s16ChannelMode == SBC_STEREO) || (pstrEncParams->s16ChannelMode == SBC_JOINT_STEREO))
sbc_enc_bit_alloc_ste(pstrEncParams);
else
sbc_enc_bit_alloc_mono(pstrEncParams);
-
+
/* save the beginning of the frame. pu8NextPacket is modified in EncPacking() */
pu8 = pstrEncParams->pu8NextPacket;
/* Quantize the encoded audio */
@@ -270,9 +270,9 @@ void SBC_Encoder(SBC_ENC_PARAMS *pstrEncParams)
SBC_PRTC_SCRMB((&pu8[sbc_prtc_cb.base]));
}
while(--(pstrEncParams->u8NumPacketToEncode));
-
+
pstrEncParams->u8NumPacketToEncode = 1; /* default is one for retrocompatibility purpose */
-
+
}
/****************************************************************************
@@ -295,7 +295,7 @@ void SBC_Encoder_Init(SBC_ENC_PARAMS *pstrEncParams)
pstrEncParams->s16NumOfChannels = 1;
else
pstrEncParams->s16NumOfChannels = 2;
-
+
/* Bit pool calculation */
if (pstrEncParams->s16SamplingFreq == SBC_sf16000)
s16SamplingFreq = 16000;
@@ -305,31 +305,31 @@ void SBC_Encoder_Init(SBC_ENC_PARAMS *pstrEncParams)
s16SamplingFreq = 44100;
else
s16SamplingFreq = 48000;
-
+
if ( (pstrEncParams->s16ChannelMode == SBC_JOINT_STEREO)
|| (pstrEncParams->s16ChannelMode == SBC_STEREO) )
{
- s16Bitpool = (SINT16)( (pstrEncParams->u16BitRate *
+ s16Bitpool = (SINT16)( (pstrEncParams->u16BitRate *
pstrEncParams->s16NumOfSubBands * 1000 / s16SamplingFreq)
- -( (32 + (4 * pstrEncParams->s16NumOfSubBands *
+ -( (32 + (4 * pstrEncParams->s16NumOfSubBands *
pstrEncParams->s16NumOfChannels)
- + ( (pstrEncParams->s16ChannelMode - 2) *
+ + ( (pstrEncParams->s16ChannelMode - 2) *
pstrEncParams->s16NumOfSubBands ) )
/ pstrEncParams->s16NumOfBlocks) );
-
+
s16FrameLen = 4 + (4*pstrEncParams->s16NumOfSubBands*
pstrEncParams->s16NumOfChannels)/8
- + ( ((pstrEncParams->s16ChannelMode - 2) *
- pstrEncParams->s16NumOfSubBands)
+ + ( ((pstrEncParams->s16ChannelMode - 2) *
+ pstrEncParams->s16NumOfSubBands)
+ (pstrEncParams->s16NumOfBlocks * s16Bitpool) ) / 8;
-
- s16BitRate = (8 * s16FrameLen * s16SamplingFreq)
- / (pstrEncParams->s16NumOfSubBands *
+
+ s16BitRate = (8 * s16FrameLen * s16SamplingFreq)
+ / (pstrEncParams->s16NumOfSubBands *
pstrEncParams->s16NumOfBlocks * 1000);
-
+
if (s16BitRate > pstrEncParams->u16BitRate)
s16Bitpool--;
-
+
if(pstrEncParams->s16NumOfSubBands == 8)
pstrEncParams->s16BitPool = (s16Bitpool > 255) ? 255 : s16Bitpool;
else
@@ -337,34 +337,34 @@ void SBC_Encoder_Init(SBC_ENC_PARAMS *pstrEncParams)
}
else
{
- s16Bitpool = (SINT16)( ((pstrEncParams->s16NumOfSubBands *
+ s16Bitpool = (SINT16)( ((pstrEncParams->s16NumOfSubBands *
pstrEncParams->u16BitRate * 1000)
/ (s16SamplingFreq * pstrEncParams->s16NumOfChannels))
- -( ( (32 / pstrEncParams->s16NumOfChannels) +
+ -( ( (32 / pstrEncParams->s16NumOfChannels) +
(4 * pstrEncParams->s16NumOfSubBands) )
/ pstrEncParams->s16NumOfBlocks ) );
-
- pstrEncParams->s16BitPool = (s16Bitpool >
+
+ pstrEncParams->s16BitPool = (s16Bitpool >
(16 * pstrEncParams->s16NumOfSubBands))
? (16*pstrEncParams->s16NumOfSubBands) : s16Bitpool;
}
-
+
if (pstrEncParams->s16BitPool < 0)
pstrEncParams->s16BitPool = 0;
/* sampling freq */
- HeaderParams = ((pstrEncParams->s16SamplingFreq & 3)<< 6);
-
+ HeaderParams = ((pstrEncParams->s16SamplingFreq & 3)<< 6);
+
/* number of blocks*/
HeaderParams |= (((pstrEncParams->s16NumOfBlocks -4) & 12) << 2);
-
+
/* channel mode: mono, dual...*/
- HeaderParams |= ((pstrEncParams->s16ChannelMode & 3)<< 2);
-
+ HeaderParams |= ((pstrEncParams->s16ChannelMode & 3)<< 2);
+
/* Loudness or SNR */
HeaderParams |= ((pstrEncParams->s16AllocationMethod & 1)<< 1);
HeaderParams |= ((pstrEncParams->s16NumOfSubBands >> 3) & 1); /*4 or 8*/
pstrEncParams->FrameHeader=HeaderParams;
-
+
if (pstrEncParams->s16NumOfSubBands==4)
{
if (pstrEncParams->s16NumOfChannels==1)
@@ -379,8 +379,8 @@ void SBC_Encoder_Init(SBC_ENC_PARAMS *pstrEncParams)
else
EncMaxShiftCounter=((ENC_VX_BUFFER_SIZE-8*10*2)>>4)<<3;
}
-
- APPL_TRACE_EVENT2("SBC_Encoder_Init : bitrate %d, bitpool %d",
+
+ APPL_TRACE_EVENT2("SBC_Encoder_Init : bitrate %d, bitpool %d",
pstrEncParams->u16BitRate, pstrEncParams->s16BitPool);
SbcAnalysisInit();
diff --git a/embdrv/sbc/encoder/srce/sbc_packing.c b/embdrv/sbc/encoder/srce/sbc_packing.c
index faa8750..55edb9b 100644
--- a/embdrv/sbc/encoder/srce/sbc_packing.c
+++ b/embdrv/sbc/encoder/srce/sbc_packing.c
@@ -2,7 +2,7 @@
**
** File Name: $RCSfile: sbc_packing.c,v $
**
-** Description: This file contains code for packing the Encoded data into bit
+** Description: This file contains code for packing the Encoded data into bit
** streams.
**
** Revision : $Id: sbc_packing.c,v 1.17 2006/04/11 17:07:03 mjougit Exp $
@@ -22,7 +22,7 @@
{ \
MUL s32OutLow,s32In1,s32In2; \
} \
-}
+}
#define Mult64(s32In1, s32In2, s32OutLow, s32OutHi) \
{ \
__asm \
@@ -74,7 +74,7 @@ void EncPacking(SBC_ENC_PARAMS *pstrEncParams)
pu8PacketPtr = pstrEncParams->pu8NextPacket; /*Initialize the ptr*/
*pu8PacketPtr++ = (UINT8)0x9C; /*Sync word*/
*pu8PacketPtr++=(UINT8)(pstrEncParams->FrameHeader);
-
+
*pu8PacketPtr = (UINT8)(pstrEncParams->s16BitPool & 0x00FF);
pu8PacketPtr += 2; /*skip for CRC*/
@@ -103,7 +103,7 @@ void EncPacking(SBC_ENC_PARAMS *pstrEncParams)
}
}
#endif
-
+
/* Pack Scale factor */
ps16GenPtr = pstrEncParams->as16ScaleFactor;
s32Sb=s32NumOfChannels*s32NumOfSubBands;
@@ -112,10 +112,10 @@ void EncPacking(SBC_ENC_PARAMS *pstrEncParams)
{
Temp<<= 4;
Temp |= *ps16GenPtr++;
-
+
if(s32PresentBit == 4)
{
- s32PresentBit = 8;
+ s32PresentBit = 8;
*(pu8PacketPtr++)=Temp;
Temp = 0;
}
@@ -124,7 +124,7 @@ void EncPacking(SBC_ENC_PARAMS *pstrEncParams)
s32PresentBit = 4;
}
}
-
+
/* Pack samples */
ps32SbPtr = pstrEncParams->s32SbBuffer;
/*Temp=*pu8PacketPtr;*/
@@ -165,10 +165,10 @@ void EncPacking(SBC_ENC_PARAMS *pstrEncParams)
s32Low>>= (*ps16ScfPtr+1);
u32QuantizedSbValue0 = (UINT16)s32Low;
#endif
- /*store the number of bits required and the quantized s32Sb
+ /*store the number of bits required and the quantized s32Sb
sample to ease the coding*/
u32QuantizedSbValue = u32QuantizedSbValue0;
-
+
if(s32PresentBit >= s32LoopCount)
{
Temp <<= s32LoopCount;
@@ -181,33 +181,33 @@ void EncPacking(SBC_ENC_PARAMS *pstrEncParams)
{
s32LoopCount -= s32PresentBit;
u32QuantizedSbValue >>= s32LoopCount;
-
+
/*remove the unwanted msbs*/
/*u32QuantizedSbValue <<= 16 - s32PresentBit;
u32QuantizedSbValue >>= 16 - s32PresentBit;*/
-
+
Temp <<= s32PresentBit;
-
+
Temp |= u32QuantizedSbValue ;
/*restore the original*/
u32QuantizedSbValue=u32QuantizedSbValue0;
-
+
*(pu8PacketPtr++)=Temp;
Temp = 0;
s32PresentBit = 8;
}
Temp <<= s32LoopCount;
-
+
/* remove the unwanted msbs */
/*u32QuantizedSbValue <<= 16 - s32LoopCount;
u32QuantizedSbValue >>= 16 - s32LoopCount;*/
-
+
Temp |= u32QuantizedSbValue;
-
+
s32PresentBit -= s32LoopCount;
}
}
- ps16ScfPtr++;
+ ps16ScfPtr++;
ps32SbPtr++;
}
}
@@ -221,7 +221,7 @@ void EncPacking(SBC_ENC_PARAMS *pstrEncParams)
s32LoopCount = s32Sb >> 1;
/*
- The loops is run from the start of the packet till the scale factor
+ The loops is run from the start of the packet till the scale factor
parameters. In case of JS, 'join' parameter is included in the packet
so that many more bytes are included in CRC calculation.
*/
diff --git a/gki/Android.mk b/gki/Android.mk
index c76c237..13a4a95 100644
--- a/gki/Android.mk
+++ b/gki/Android.mk
@@ -14,7 +14,7 @@ LOCAL_CFLAGS += -Werror $(bdroid_CFLAGS)
ifeq ($(BOARD_HAVE_BLUETOOTH_BCM),true)
LOCAL_CFLAGS += \
- -DBOARD_HAVE_BLUETOOTH_BCM
+ -DBOARD_HAVE_BLUETOOTH_BCM
endif
LOCAL_PRELINK_MODULE:=false
@@ -22,9 +22,9 @@ LOCAL_SRC_FILES:= \
./ulinux/gki_ulinux.c \
./common/gki_debug.c \
./common/gki_time.c \
- ./common/gki_buffer.c
-
-LOCAL_MODULE := libbt-brcm_gki
+ ./common/gki_buffer.c
+
+LOCAL_MODULE := libbt-brcm_gki
LOCAL_MODULE_TAGS := optional
LOCAL_SHARED_LIBRARIES := libcutils libc
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
diff --git a/gki/common/gki.h b/gki/common/gki.h
index 4bfb43f..d53ab04 100644
--- a/gki/common/gki.h
+++ b/gki/common/gki.h
@@ -94,7 +94,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 1)
#ifndef GKI_POOL_ID_0
-#define GKI_POOL_ID_0 0
+#define GKI_POOL_ID_0 0
#endif /* ifndef GKI_POOL_ID_0 */
#ifndef GKI_BUF0_SIZE
@@ -107,7 +107,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 2)
#ifndef GKI_POOL_ID_1
-#define GKI_POOL_ID_1 0
+#define GKI_POOL_ID_1 0
#endif /* ifndef GKI_POOL_ID_1 */
#ifndef GKI_BUF1_SIZE
@@ -120,7 +120,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 3)
#ifndef GKI_POOL_ID_2
-#define GKI_POOL_ID_2 0
+#define GKI_POOL_ID_2 0
#endif /* ifndef GKI_POOL_ID_2 */
#ifndef GKI_BUF2_SIZE
@@ -133,7 +133,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 4)
#ifndef GKI_POOL_ID_3
-#define GKI_POOL_ID_3 0
+#define GKI_POOL_ID_3 0
#endif /* ifndef GKI_POOL_ID_4 */
#ifndef GKI_BUF3_SIZE
@@ -146,7 +146,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 5)
#ifndef GKI_POOL_ID_4
-#define GKI_POOL_ID_4 0
+#define GKI_POOL_ID_4 0
#endif /* ifndef GKI_POOL_ID_4 */
#ifndef GKI_BUF4_SIZE
@@ -159,7 +159,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 6)
#ifndef GKI_POOL_ID_5
-#define GKI_POOL_ID_5 0
+#define GKI_POOL_ID_5 0
#endif /* ifndef GKI_POOL_ID_5 */
#ifndef GKI_BUF5_SIZE
@@ -172,7 +172,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 7)
#ifndef GKI_POOL_ID_6
-#define GKI_POOL_ID_6 0
+#define GKI_POOL_ID_6 0
#endif /* ifndef GKI_POOL_ID_6 */
#ifndef GKI_BUF6_SIZE
@@ -185,7 +185,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 8)
#ifndef GKI_POOL_ID_7
-#define GKI_POOL_ID_7 0
+#define GKI_POOL_ID_7 0
#endif /* ifndef GKI_POOL_ID_7 */
#ifndef GKI_BUF7_SIZE
@@ -198,7 +198,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 9)
#ifndef GKI_POOL_ID_8
-#define GKI_POOL_ID_8 0
+#define GKI_POOL_ID_8 0
#endif /* ifndef GKI_POOL_ID_8 */
#ifndef GKI_BUF8_SIZE
@@ -211,7 +211,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 10)
#ifndef GKI_POOL_ID_9
-#define GKI_POOL_ID_9 0
+#define GKI_POOL_ID_9 0
#endif /* ifndef GKI_POOL_ID_9 */
#ifndef GKI_BUF9_SIZE
@@ -224,7 +224,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 11)
#ifndef GKI_POOL_ID_10
-#define GKI_POOL_ID_10 0
+#define GKI_POOL_ID_10 0
#endif /* ifndef GKI_POOL_ID_10 */
#ifndef GKI_BUF10_SIZE
@@ -237,7 +237,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 12)
#ifndef GKI_POOL_ID_11
-#define GKI_POOL_ID_11 0
+#define GKI_POOL_ID_11 0
#endif /* ifndef GKI_POOL_ID_11 */
#ifndef GKI_BUF11_SIZE
@@ -250,7 +250,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 13)
#ifndef GKI_POOL_ID_12
-#define GKI_POOL_ID_12 0
+#define GKI_POOL_ID_12 0
#endif /* ifndef GKI_POOL_ID_12 */
#ifndef GKI_BUF12_SIZE
@@ -263,7 +263,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 14)
#ifndef GKI_POOL_ID_13
-#define GKI_POOL_ID_13 0
+#define GKI_POOL_ID_13 0
#endif /* ifndef GKI_POOL_ID_13 */
#ifndef GKI_BUF13_SIZE
@@ -276,7 +276,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 15)
#ifndef GKI_POOL_ID_14
-#define GKI_POOL_ID_14 0
+#define GKI_POOL_ID_14 0
#endif /* ifndef GKI_POOL_ID_14 */
#ifndef GKI_BUF14_SIZE
@@ -289,7 +289,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 16)
#ifndef GKI_POOL_ID_15
-#define GKI_POOL_ID_15 0
+#define GKI_POOL_ID_15 0
#endif /* ifndef GKI_POOL_ID_15 */
#ifndef GKI_BUF15_SIZE
@@ -324,7 +324,7 @@ typedef struct _tle
/* Define a timer list queue
*/
-typedef struct
+typedef struct
{
TIMER_LIST_ENT *p_first;
TIMER_LIST_ENT *p_last;
@@ -335,7 +335,7 @@ typedef struct
/***********************************************************************
** This queue is a general purpose buffer queue, for application use.
*/
-typedef struct
+typedef struct
{
void *p_first;
void *p_last;
diff --git a/gki/common/gki_buffer.c b/gki/common/gki_buffer.c
index ca0e0a0..fbf19b8 100644
--- a/gki/common/gki_buffer.c
+++ b/gki/common/gki_buffer.c
@@ -51,7 +51,7 @@ static void gki_init_free_queue (UINT8 id, UINT16 size, UINT16 total, void *p_me
p_cb->pool_end[id] = (UINT8 *)p_mem + (act_size * total);
}
// btla-specific --
-
+
p_cb->pool_size[id] = act_size;
p_cb->freeq[id].size = (UINT16) tempsize;
@@ -90,9 +90,9 @@ static BOOLEAN gki_alloc_free_queue(UINT8 id)
FREE_QUEUE_T *Q;
tGKI_COM_CB *p_cb = &gki_cb.com;
GKI_TRACE("\ngki_alloc_free_queue in, id:%d \n", (int)id );
-
+
Q = &p_cb->freeq[p_cb->pool_list[id]];
-
+
if(Q->p_first == 0)
{
void* p_mem = GKI_os_malloc((Q->size + BUFFER_PADDING_SIZE) * Q->total);
@@ -105,7 +105,7 @@ static BOOLEAN gki_alloc_free_queue(UINT8 id)
return TRUE;
}
GKI_exception (GKI_ERROR_BUF_SIZE_TOOBIG, "gki_alloc_free_queue: Not enough memory");
- }
+ }
GKI_TRACE("\ngki_alloc_free_queue out failed, id:%d\n", id);
return FALSE;
}
@@ -125,10 +125,10 @@ void gki_dealloc_free_queue(void)
p_cb->freeq[i].max_cnt = 0;
p_cb->freeq[i].p_first = NULL;
p_cb->freeq[i].p_last = NULL;
-
+
p_cb->pool_start[i] = NULL;
p_cb->pool_end[i] = NULL;
- p_cb->pool_size[i] = 0;
+ p_cb->pool_size[i] = 0;
}
}
}
@@ -176,7 +176,7 @@ void gki_buffer_init(void)
}
/* Use default from target.h */
- p_cb->pool_access_mask = GKI_DEF_BUFPOOL_PERM_MASK;
+ p_cb->pool_access_mask = GKI_DEF_BUFPOOL_PERM_MASK;
// btla-specific ++
#if (!defined GKI_USE_DEFERED_ALLOC_BUF_POOLS && (GKI_USE_DYNAMIC_BUFFERS == TRUE))
@@ -389,7 +389,7 @@ void *GKI_getbuf (UINT16 size)
GKI_disable();
/* search the public buffer pools that are big enough to hold the size
- * until a free buffer is found */
+ * until a free buffer is found */
for ( ; i < p_cb->curr_total_no_of_pools; i++)
{
/* Only look at PUBLIC buffer pools (bypass RESTRICTED pools) */
@@ -397,7 +397,7 @@ void *GKI_getbuf (UINT16 size)
continue;
Q = &p_cb->freeq[p_cb->pool_list[i]];
- if(Q->cur_cnt < Q->total)
+ if(Q->cur_cnt < Q->total)
{
// btla-specific ++
#ifdef GKI_USE_DEFERED_ALLOC_BUF_POOLS
@@ -494,7 +494,7 @@ void *GKI_getpoolbuf (UINT8 pool_id)
/* try for free buffers in public pools */
return (GKI_getbuf(p_cb->freeq[pool_id].size));
-
+
}
/*******************************************************************************
@@ -512,7 +512,7 @@ void GKI_freebuf (void *p_buf)
{
FREE_QUEUE_T *Q;
BUFFER_HDR_T *p_hdr;
-
+
#if (GKI_ENABLE_BUF_CORRUPTION_CHECK == TRUE)
if (!p_buf || gki_chk_buf_damage(p_buf))
{
@@ -520,23 +520,23 @@ void GKI_freebuf (void *p_buf)
return;
}
#endif
-
+
p_hdr = (BUFFER_HDR_T *) ((UINT8 *)p_buf - BUFFER_HDR_SIZE);
-
+
if (p_hdr->status != BUF_STATUS_UNLINKED)
{
GKI_exception(GKI_ERROR_FREEBUF_BUF_LINKED, "Freeing Linked Buf");
return;
}
-
+
if (p_hdr->q_id >= GKI_NUM_TOTAL_BUF_POOLS)
{
GKI_exception(GKI_ERROR_FREEBUF_BAD_QID, "Bad Buf QId");
return;
}
-
+
GKI_disable();
-
+
/*
** Release the buffer
*/
@@ -545,16 +545,16 @@ void GKI_freebuf (void *p_buf)
Q->p_last->p_next = p_hdr;
else
Q->p_first = p_hdr;
-
+
Q->p_last = p_hdr;
p_hdr->p_next = NULL;
p_hdr->status = BUF_STATUS_FREE;
p_hdr->task_id = GKI_INVALID_TASK;
if (Q->cur_cnt > 0)
Q->cur_cnt--;
-
+
GKI_enable();
-
+
return;
}
@@ -576,7 +576,7 @@ UINT16 GKI_get_buf_size (void *p_buf)
p_hdr = (BUFFER_HDR_T *)((UINT8 *) p_buf - BUFFER_HDR_SIZE);
- if ((UINT32)p_hdr & 1)
+ if ((UINT32)p_hdr & 1)
return (0);
if (p_hdr->q_id < GKI_NUM_TOTAL_BUF_POOLS)
@@ -1001,7 +1001,7 @@ void *GKI_getnext (void *p_buf)
BOOLEAN GKI_queue_is_empty(BUFFER_Q *p_q)
{
return ((BOOLEAN) (p_q->count == 0));
-}
+}
/*******************************************************************************
**
@@ -1068,10 +1068,10 @@ UINT8 GKI_set_pool_permission(UINT8 pool_id, UINT8 permission)
{
if (permission == GKI_RESTRICTED_POOL)
p_cb->pool_access_mask = (UINT16)(p_cb->pool_access_mask | (1 << pool_id));
-
+
else /* mark the pool as public */
p_cb->pool_access_mask = (UINT16)(p_cb->pool_access_mask & ~(1 << pool_id));
-
+
return (GKI_SUCCESS);
}
else
@@ -1082,7 +1082,7 @@ UINT8 GKI_set_pool_permission(UINT8 pool_id, UINT8 permission)
**
** Function gki_add_to_pool_list
**
-** Description Adds pool to the pool list which is arranged in the
+** Description Adds pool to the pool list which is arranged in the
** order of size
**
** Returns void
@@ -1095,7 +1095,7 @@ static void gki_add_to_pool_list(UINT8 pool_id)
tGKI_COM_CB *p_cb = &gki_cb.com;
/* Find the position where the specified pool should be inserted into the list */
- for(i=0; i < p_cb->curr_total_no_of_pools; i++)
+ for(i=0; i < p_cb->curr_total_no_of_pools; i++)
{
if(p_cb->freeq[pool_id].size <= p_cb->freeq[ p_cb->pool_list[i] ].size)
@@ -1117,7 +1117,7 @@ static void gki_add_to_pool_list(UINT8 pool_id)
**
** Function gki_remove_from_pool_list
**
-** Description Removes pool from the pool list. Called when a pool is deleted
+** Description Removes pool from the pool list. Called when a pool is deleted
**
** Returns void
**
@@ -1126,7 +1126,7 @@ static void gki_remove_from_pool_list(UINT8 pool_id)
{
tGKI_COM_CB *p_cb = &gki_cb.com;
UINT8 i;
-
+
for(i=0; i < p_cb->curr_total_no_of_pools; i++)
{
if(pool_id == p_cb->pool_list[i])
@@ -1184,7 +1184,7 @@ void *GKI_igetpoolbuf (UINT8 pool_id)
return ((void *) ((UINT8 *)p_hdr + BUFFER_HDR_SIZE));
}
- return (NULL);
+ return (NULL);
}
/*******************************************************************************
@@ -1393,13 +1393,13 @@ void GKI_delete_pool (UINT8 pool_id)
{
FREE_QUEUE_T *Q;
tGKI_COM_CB *p_cb = &gki_cb.com;
-
+
if ((pool_id >= GKI_NUM_TOTAL_BUF_POOLS) || (!p_cb->pool_start[pool_id]))
return;
-
+
GKI_disable();
Q = &p_cb->freeq[pool_id];
-
+
if (!Q->cur_cnt)
{
Q->size = 0;
@@ -1408,21 +1408,21 @@ void GKI_delete_pool (UINT8 pool_id)
Q->max_cnt = 0;
Q->p_first = NULL;
Q->p_last = NULL;
-
+
GKI_os_free (p_cb->pool_start[pool_id]);
-
+
p_cb->pool_start[pool_id] = NULL;
p_cb->pool_end[pool_id] = NULL;
p_cb->pool_size[pool_id] = 0;
-
+
gki_remove_from_pool_list(pool_id);
p_cb->curr_total_no_of_pools--;
}
else
GKI_exception(GKI_ERROR_DELETE_POOL_BAD_QID, "Deleting bad pool");
-
+
GKI_enable();
-
+
return;
}
diff --git a/gki/common/gki_common.h b/gki/common/gki_common.h
index a0c713e..6093abf 100644
--- a/gki/common/gki_common.h
+++ b/gki/common/gki_common.h
@@ -326,7 +326,7 @@ typedef struct
#if (GKI_DEBUG == TRUE)
UINT16 ExceptionCnt; /* number of GKI exceptions that have happened */
- EXCEPTION_T Exception[GKI_MAX_EXCEPTION];
+ EXCEPTION_T Exception[GKI_MAX_EXCEPTION];
#endif
} tGKI_COM_CB;
diff --git a/gki/common/gki_debug.c b/gki/common/gki_debug.c
index 0f0505d..45b281a 100644
--- a/gki/common/gki_debug.c
+++ b/gki/common/gki_debug.c
@@ -94,7 +94,7 @@ void GKI_PrintBuffer(void)
** Function gki_calc_stack
**
** Description This function tries to calculate the amount of
-** stack used by looking non magic num. Magic num is consider
+** stack used by looking non magic num. Magic num is consider
** the first byte in the stack.
**
** Returns the number of unused byte on the stack. 4 in case of stack overrun
@@ -146,7 +146,7 @@ void GKI_print_task(void)
}
}
-#endif
+#endif
}
@@ -288,7 +288,7 @@ void gki_print_exception(FP_PRINT print)
{
pExp = &gki_cb.com.Exception[i];
print("%d: Type=%d, Task=%d: %s\n", i,
- (INT32)pExp->type, (INT32)pExp->taskid, (INT8 *)pExp->msg);
+ (INT32)pExp->type, (INT32)pExp->taskid, (INT8 *)pExp->msg);
}
}
diff --git a/gki/common/gki_inet.h b/gki/common/gki_inet.h
index 0180303..780e9a0 100644
--- a/gki/common/gki_inet.h
+++ b/gki/common/gki_inet.h
@@ -5,7 +5,7 @@
** Function This file contains macros and interfaces for host-to-network
** conversions used in Internet operations.
**
-**
+**
** Copyright (c) 2002-2004, WIDCOMM Inc., All Rights Reserved.
** Proprietary and confidential.
**
diff --git a/gki/common/gki_time.c b/gki/common/gki_time.c
index 7fd2303..8121654 100644
--- a/gki/common/gki_time.c
+++ b/gki/common/gki_time.c
@@ -1,13 +1,13 @@
/****************************************************************************
+**
+** Name GKI_time.c
**
-** Name GKI_time.c
-**
-** Function this file contains GKI time related functions
-**
+** Function this file contains GKI time related functions
+**
** Copyright (c) 1999-2011, Broadcom Corp., All Rights Reserved.
-** Proprietary and confidential.
-**
+** Proprietary and confidential.
+**
*****************************************************************************/
#include "gki_int.h"
@@ -50,22 +50,22 @@ void gki_timers_init(void)
{
gki_cb.com.OSWaitTmr [tt] = 0;
-#if (GKI_NUM_TIMERS > 0)
+#if (GKI_NUM_TIMERS > 0)
gki_cb.com.OSTaskTmr0 [tt] = 0;
gki_cb.com.OSTaskTmr0R [tt] = 0;
#endif
-#if (GKI_NUM_TIMERS > 1)
+#if (GKI_NUM_TIMERS > 1)
gki_cb.com.OSTaskTmr1 [tt] = 0;
gki_cb.com.OSTaskTmr1R [tt] = 0;
#endif
-#if (GKI_NUM_TIMERS > 2)
+#if (GKI_NUM_TIMERS > 2)
gki_cb.com.OSTaskTmr2 [tt] = 0;
gki_cb.com.OSTaskTmr2R [tt] = 0;
#endif
-#if (GKI_NUM_TIMERS > 3)
+#if (GKI_NUM_TIMERS > 3)
gki_cb.com.OSTaskTmr3 [tt] = 0;
gki_cb.com.OSTaskTmr3R [tt] = 0;
#endif
@@ -87,7 +87,7 @@ void gki_timers_init(void)
** Function gki_timers_is_timer_running
**
** Description This internal function is called to test if any gki timer are running
-**
+**
**
** Returns TRUE if at least one time is running in the system, FALSE else.
**
@@ -98,28 +98,28 @@ BOOLEAN gki_timers_is_timer_running(void)
for (tt = 0; tt < GKI_MAX_TASKS; tt++)
{
-#if (GKI_NUM_TIMERS > 0)
+#if (GKI_NUM_TIMERS > 0)
if(gki_cb.com.OSTaskTmr0 [tt])
{
return TRUE;
}
#endif
-#if (GKI_NUM_TIMERS > 1)
+#if (GKI_NUM_TIMERS > 1)
if(gki_cb.com.OSTaskTmr1 [tt] )
{
return TRUE;
}
#endif
-#if (GKI_NUM_TIMERS > 2)
+#if (GKI_NUM_TIMERS > 2)
if(gki_cb.com.OSTaskTmr2 [tt] )
{
return TRUE;
}
#endif
-#if (GKI_NUM_TIMERS > 3)
+#if (GKI_NUM_TIMERS > 3)
if(gki_cb.com.OSTaskTmr3 [tt] )
{
return TRUE;
@@ -150,7 +150,7 @@ UINT32 GKI_get_tick_count(void)
**
** Function GKI_ready_to_sleep
**
-** Description This function returns the number of system ticks until the
+** Description This function returns the number of system ticks until the
** next timer will expire. It is typically called by a power
** savings manager to find out how long it can have the system
** sleep before it needs to service the next entry.
@@ -335,9 +335,9 @@ void GKI_stop_timer (UINT8 tnum)
}
GKI_disable();
-
+
if (gki_timers_is_timer_running() == FALSE)
- {
+ {
if (gki_cb.com.p_tick_cb)
{
#if (defined(GKI_DELAY_STOP_SYS_TICK) && (GKI_DELAY_STOP_SYS_TICK > 0))
@@ -417,7 +417,7 @@ void GKI_timer_update (INT32 ticks_since_last_update)
gki_cb.com.OSTicksTilStop -= ticks_since_last_update;
}
#endif
-
+
/* No need to update the ticks if no timeout has occurred */
if (gki_cb.com.OSTicksTilExp > 0)
{
@@ -580,10 +580,10 @@ void GKI_timer_update (INT32 ticks_since_last_update)
**
** Function GKI_timer_queue_empty
**
-** Description This function is called by applications to see whether the timer
+** Description This function is called by applications to see whether the timer
** queue is empty
**
-** Parameters
+** Parameters
**
** Returns BOOLEAN
**
@@ -591,7 +591,7 @@ void GKI_timer_update (INT32 ticks_since_last_update)
BOOLEAN GKI_timer_queue_empty (void)
{
UINT8 tt;
-
+
for (tt = 0; tt < GKI_MAX_TIMER_QUEUES; tt++)
{
if (gki_cb.com.timer_queues[tt])
@@ -606,8 +606,8 @@ BOOLEAN GKI_timer_queue_empty (void)
** Function GKI_timer_queue_register_callback
**
** Description This function is called by applications to register system tick
-** start/stop callback for time queues
-**
+** start/stop callback for time queues
+**
**
** Parameters p_callback - (input) pointer to the system tick callback
**
@@ -617,7 +617,7 @@ BOOLEAN GKI_timer_queue_empty (void)
void GKI_timer_queue_register_callback (SYSTEM_TICK_CBACK *p_callback)
{
gki_cb.com.p_tick_cb = p_callback;
-
+
return;
}
@@ -727,7 +727,7 @@ UINT16 GKI_update_timer_list (TIMER_LIST_Q *p_timer_listq, INT32 num_units_since
p_timer_listq->last_ticks -= num_units_since_last_update;
/* If the last timer has expired set last_ticks to 0 so that other list update
- * functions will calculate correctly
+ * functions will calculate correctly
*/
if (p_timer_listq->last_ticks < 0)
p_timer_listq->last_ticks = 0;
@@ -740,7 +740,7 @@ UINT16 GKI_update_timer_list (TIMER_LIST_Q *p_timer_listq, INT32 num_units_since
**
** Function GKI_get_remaining_ticks
**
-** Description This function is called by an application to get remaining
+** Description This function is called by an application to get remaining
** ticks to expire
**
** Parameters p_timer_listq - (input) pointer to the timer list queue object
@@ -806,7 +806,7 @@ void GKI_add_to_timer_list (TIMER_LIST_Q *p_timer_listq, TIMER_LIST_ENT *p_tle)
UINT32 nr_ticks_total;
UINT8 tt;
TIMER_LIST_ENT *p_temp;
-
+
/* Only process valid tick values */
if (p_tle->ticks >= 0)
{
@@ -821,15 +821,15 @@ void GKI_add_to_timer_list (TIMER_LIST_Q *p_timer_listq, TIMER_LIST_ENT *p_tle)
/* Insert the entry onto the end of the list */
if (p_timer_listq->p_last != NULL)
p_timer_listq->p_last->p_next = p_tle;
-
+
p_tle->p_prev = p_timer_listq->p_last;
}
-
+
p_tle->p_next = NULL;
p_timer_listq->p_last = p_tle;
nr_ticks_total = p_tle->ticks;
p_tle->ticks -= p_timer_listq->last_ticks;
-
+
p_timer_listq->last_ticks = nr_ticks_total;
}
else /* This entry needs to be inserted before the last entry */
@@ -844,7 +844,7 @@ void GKI_add_to_timer_list (TIMER_LIST_Q *p_timer_listq, TIMER_LIST_ENT *p_tle)
p_temp = p_temp->p_next;
}
-
+
/* The new entry is the first in the list */
if (p_temp == p_timer_listq->p_first)
{
@@ -876,7 +876,7 @@ void GKI_add_to_timer_list (TIMER_LIST_Q *p_timer_listq, TIMER_LIST_ENT *p_tle)
if (gki_cb.com.timer_queues[tt] == NULL)
break;
}
- if (tt < GKI_MAX_TIMER_QUEUES)
+ if (tt < GKI_MAX_TIMER_QUEUES)
{
gki_cb.com.timer_queues[tt] = p_timer_listq;
}
@@ -1006,7 +1006,7 @@ void gki_adjust_timer_count (INT32 ticks)
{
/* See if the new timer expires before the current first expiration */
if (gki_cb.com.OSNumOrigTicks == 0 || (ticks < gki_cb.com.OSTicksTilExp && gki_cb.com.OSTicksTilExp > 0))
- {
+ {
gki_cb.com.OSNumOrigTicks = (gki_cb.com.OSNumOrigTicks - gki_cb.com.OSTicksTilExp) + ticks;
gki_cb.com.OSTicksTilExp = ticks;
}
diff --git a/hci/include/bt_hci_lib.h b/hci/include/bt_hci_lib.h
index 7a37f36..59feeb9 100644
--- a/hci/include/bt_hci_lib.h
+++ b/hci/include/bt_hci_lib.h
@@ -159,7 +159,7 @@ typedef struct {
/* notifies caller result of preload request */
preload_result_cb preload_cb;
-
+
/* notifies caller result of postload request */
postload_result_cb postload_cb;
@@ -221,7 +221,7 @@ typedef struct {
} bt_hc_interface_t;
-/*
+/*
* External shared lib functions
*/
diff --git a/hci/include/userial.h b/hci/include/userial.h
index a5ed22c..57da4e0 100644
--- a/hci/include/userial.h
+++ b/hci/include/userial.h
@@ -3,44 +3,44 @@
* Copyright (C) 2009-2012 Broadcom Corporation
*
* This program is the proprietary software of Broadcom Corporation and/or its
- * licensors, and may only be used, duplicated, modified or distributed
- * pursuant to the terms and conditions of a separate, written license
- * agreement executed between you and Broadcom (an "Authorized License").
- * Except as set forth in an Authorized License, Broadcom grants no license
- * (express or implied), right to use, or waiver of any kind with respect to
- * the Software, and Broadcom expressly reserves all rights in and to the
- * Software and all intellectual property rights therein.
- * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS
- * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE
- * ALL USE OF THE SOFTWARE.
+ * licensors, and may only be used, duplicated, modified or distributed
+ * pursuant to the terms and conditions of a separate, written license
+ * agreement executed between you and Broadcom (an "Authorized License").
+ * Except as set forth in an Authorized License, Broadcom grants no license
+ * (express or implied), right to use, or waiver of any kind with respect to
+ * the Software, and Broadcom expressly reserves all rights in and to the
+ * Software and all intellectual property rights therein.
+ * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS
+ * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE
+ * ALL USE OF THE SOFTWARE.
*
* Except as expressly set forth in the Authorized License,
*
- * 1. This program, including its structure, sequence and organization,
- * constitutes the valuable trade secrets of Broadcom, and you shall
- * use all reasonable efforts to protect the confidentiality thereof,
- * and to use this information only in connection with your use of
+ * 1. This program, including its structure, sequence and organization,
+ * constitutes the valuable trade secrets of Broadcom, and you shall
+ * use all reasonable efforts to protect the confidentiality thereof,
+ * and to use this information only in connection with your use of
* Broadcom integrated circuit products.
*
- * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED
- * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES,
- * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY,
- * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY
- * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY,
- * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES,
- * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR
+ * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED
+ * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES,
+ * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY,
+ * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY
+ * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY,
+ * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES,
+ * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR
* CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT
* OF USE OR PERFORMANCE OF THE SOFTWARE.
*
* 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR
- * ITS LICENSORS BE LIABLE FOR
- * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY
- * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO
- * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM
- * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR
- * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE
- * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE
- * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF
+ * ITS LICENSORS BE LIABLE FOR
+ * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY
+ * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO
+ * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM
+ * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR
+ * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE
+ * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE
+ * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF
* ESSENTIAL PURPOSE OF ANY LIMITED REMEDY.
*
******************************************************************************/
@@ -126,7 +126,7 @@ uint8_t userial_open(uint8_t port);
**
** Description Read data from the userial port
**
-** Returns Number of bytes actually read from the userial port and
+** Returns Number of bytes actually read from the userial port and
** copied into p_data. This may be less than len.
**
*******************************************************************************/
@@ -138,7 +138,7 @@ uint16_t userial_read(uint16_t msg_id, uint8_t *p_buffer, uint16_t len);
**
** Description Write data to the userial port
**
-** Returns Number of bytes actually written to the userial port. This
+** Returns Number of bytes actually written to the userial port. This
** may be less than len.
**
*******************************************************************************/
@@ -159,7 +159,7 @@ void userial_close(void);
**
** Function userial_ioctl
**
-** Description ioctl inteface
+** Description ioctl inteface
**
** Returns None
**
diff --git a/hci/include/utils.h b/hci/include/utils.h
index 2853b3f..85800bf 100644
--- a/hci/include/utils.h
+++ b/hci/include/utils.h
@@ -3,44 +3,44 @@
* Copyright (C) 2009-2012 Broadcom Corporation
*
* This program is the proprietary software of Broadcom Corporation and/or its
- * licensors, and may only be used, duplicated, modified or distributed
- * pursuant to the terms and conditions of a separate, written license
- * agreement executed between you and Broadcom (an "Authorized License").
- * Except as set forth in an Authorized License, Broadcom grants no license
- * (express or implied), right to use, or waiver of any kind with respect to
- * the Software, and Broadcom expressly reserves all rights in and to the
- * Software and all intellectual property rights therein.
- * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS
- * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE
- * ALL USE OF THE SOFTWARE.
+ * licensors, and may only be used, duplicated, modified or distributed
+ * pursuant to the terms and conditions of a separate, written license
+ * agreement executed between you and Broadcom (an "Authorized License").
+ * Except as set forth in an Authorized License, Broadcom grants no license
+ * (express or implied), right to use, or waiver of any kind with respect to
+ * the Software, and Broadcom expressly reserves all rights in and to the
+ * Software and all intellectual property rights therein.
+ * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS
+ * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE
+ * ALL USE OF THE SOFTWARE.
*
* Except as expressly set forth in the Authorized License,
*
- * 1. This program, including its structure, sequence and organization,
- * constitutes the valuable trade secrets of Broadcom, and you shall
- * use all reasonable efforts to protect the confidentiality thereof,
- * and to use this information only in connection with your use of
+ * 1. This program, including its structure, sequence and organization,
+ * constitutes the valuable trade secrets of Broadcom, and you shall
+ * use all reasonable efforts to protect the confidentiality thereof,
+ * and to use this information only in connection with your use of
* Broadcom integrated circuit products.
*
- * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED
- * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES,
- * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY,
- * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY
- * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY,
- * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES,
- * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR
+ * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED
+ * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES,
+ * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY,
+ * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY
+ * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY,
+ * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES,
+ * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR
* CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT
* OF USE OR PERFORMANCE OF THE SOFTWARE.
*
* 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR
- * ITS LICENSORS BE LIABLE FOR
- * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY
- * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO
- * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM
- * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR
- * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE
- * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE
- * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF
+ * ITS LICENSORS BE LIABLE FOR
+ * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY
+ * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO
+ * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM
+ * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR
+ * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE
+ * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE
+ * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF
* ESSENTIAL PURPOSE OF ANY LIMITED REMEDY.
*
******************************************************************************/
@@ -68,7 +68,7 @@
** Type definitions
******************************************************************************/
-typedef struct
+typedef struct
{
void *p_first;
void *p_last;
@@ -144,7 +144,7 @@ void *utils_dequeue (BUFFER_Q *p_q);
**
** Description Return a pointer to the next buffer linked to the given buffer
**
-** Returns NULL if the given buffer does not point to any next buffer,
+** Returns NULL if the given buffer does not point to any next buffer,
** else next buffer address
**
*******************************************************************************/
diff --git a/hci/src/bt_hci_bdroid.c b/hci/src/bt_hci_bdroid.c
index c8460bc..19610e5 100644..100755
--- a/hci/src/bt_hci_bdroid.c
+++ b/hci/src/bt_hci_bdroid.c
@@ -419,7 +419,7 @@ static void *bt_hc_worker_thread(void *arg)
if (events & HC_EVENT_POSTLOAD)
{
/* Start from SCO related H/W configuration, if SCO configuration
- * is required. Then, follow with reading requests of getting
+ * is required. Then, follow with reading requests of getting
* ACL data length for both BR/EDR and LE.
*/
int result = -1;
@@ -434,7 +434,7 @@ static void *bt_hc_worker_thread(void *arg)
if (events & HC_EVENT_TX)
{
- /*
+ /*
* We will go through every packets in the tx queue.
* Fine to clear tx_cmd_pkts_pending.
*/
@@ -446,11 +446,11 @@ static void *bt_hc_worker_thread(void *arg)
if ((p_next_msg->event & MSG_EVT_MASK)==MSG_STACK_TO_HC_HCI_CMD)
{
/*
- * if we have used up controller's outstanding HCI command
- * credits (normally is 1), skip all HCI command packets in
- * the queue.
- * The pending command packets will be sent once controller
- * gives back us credits through CommandCompleteEvent or
+ * if we have used up controller's outstanding HCI command
+ * credits (normally is 1), skip all HCI command packets in
+ * the queue.
+ * The pending command packets will be sent once controller
+ * gives back us credits through CommandCompleteEvent or
* CommandStatusEvent.
*/
if ((tx_cmd_pkts_pending == TRUE) || (num_hci_cmd_pkts <= 0))
diff --git a/hci/src/userial.c b/hci/src/userial.c
index 2d468b7..2d468b7 100644..100755
--- a/hci/src/userial.c
+++ b/hci/src/userial.c
diff --git a/hci/src/utils.c b/hci/src/utils.c
index 780732b..9c1711b 100644
--- a/hci/src/utils.c
+++ b/hci/src/utils.c
@@ -3,44 +3,44 @@
* Copyright (C) 2009-2012 Broadcom Corporation
*
* This program is the proprietary software of Broadcom Corporation and/or its
- * licensors, and may only be used, duplicated, modified or distributed
- * pursuant to the terms and conditions of a separate, written license
- * agreement executed between you and Broadcom (an "Authorized License").
- * Except as set forth in an Authorized License, Broadcom grants no license
- * (express or implied), right to use, or waiver of any kind with respect to
- * the Software, and Broadcom expressly reserves all rights in and to the
- * Software and all intellectual property rights therein.
- * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS
- * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE
- * ALL USE OF THE SOFTWARE.
+ * licensors, and may only be used, duplicated, modified or distributed
+ * pursuant to the terms and conditions of a separate, written license
+ * agreement executed between you and Broadcom (an "Authorized License").
+ * Except as set forth in an Authorized License, Broadcom grants no license
+ * (express or implied), right to use, or waiver of any kind with respect to
+ * the Software, and Broadcom expressly reserves all rights in and to the
+ * Software and all intellectual property rights therein.
+ * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS
+ * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE
+ * ALL USE OF THE SOFTWARE.
*
* Except as expressly set forth in the Authorized License,
*
- * 1. This program, including its structure, sequence and organization,
- * constitutes the valuable trade secrets of Broadcom, and you shall
- * use all reasonable efforts to protect the confidentiality thereof,
- * and to use this information only in connection with your use of
+ * 1. This program, including its structure, sequence and organization,
+ * constitutes the valuable trade secrets of Broadcom, and you shall
+ * use all reasonable efforts to protect the confidentiality thereof,
+ * and to use this information only in connection with your use of
* Broadcom integrated circuit products.
*
- * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED
- * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES,
- * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY,
- * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY
- * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY,
- * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES,
- * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR
+ * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED
+ * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES,
+ * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY,
+ * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY
+ * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY,
+ * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES,
+ * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR
* CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT
* OF USE OR PERFORMANCE OF THE SOFTWARE.
*
* 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR
- * ITS LICENSORS BE LIABLE FOR
- * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY
- * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO
- * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM
- * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR
- * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE
- * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE
- * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF
+ * ITS LICENSORS BE LIABLE FOR
+ * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY
+ * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO
+ * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM
+ * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR
+ * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE
+ * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE
+ * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF
* ESSENTIAL PURPOSE OF ANY LIMITED REMEDY.
*
******************************************************************************/
@@ -190,10 +190,10 @@ void *utils_dequeue (BUFFER_Q *p_q)
**
** Function utils_getnext
**
-** Description Return a pointer to the next buffer linked to the given
+** Description Return a pointer to the next buffer linked to the given
** buffer
**
-** Returns NULL if the given buffer does not point to any next buffer,
+** Returns NULL if the given buffer does not point to any next buffer,
** else next buffer address
**
*******************************************************************************/
diff --git a/include/bt_target.h b/include/bt_target.h
index a14e101..766e3b2 100644..100755
--- a/include/bt_target.h
+++ b/include/bt_target.h
@@ -680,7 +680,7 @@
/* AVRCP pool size for protocol messages */
#ifndef AVRC_CMD_POOL_SIZE
-#define AVRC_CMD_POOL_SIZE GKI_BUF1_SIZE
+#define AVRC_CMD_POOL_SIZE GKI_BUF1_SIZE
#endif
/* AVRCP Metadata pool for protocol messages */
@@ -690,13 +690,13 @@
/* AVRCP Metadata pool size for protocol messages */
#ifndef AVRC_META_CMD_POOL_SIZE
-#define AVRC_META_CMD_POOL_SIZE GKI_BUF2_SIZE
+#define AVRC_META_CMD_POOL_SIZE GKI_BUF2_SIZE
#endif
/* AVRCP buffer size for browsing channel messages */
#ifndef AVRC_BROWSE_POOL_SIZE
-#define AVRC_BROWSE_POOL_SIZE GKI_MAX_BUF_SIZE
+#define AVRC_BROWSE_POOL_SIZE GKI_MAX_BUF_SIZE
#endif
/* HDP buffer size for the Pulse Oximeter */
@@ -828,8 +828,8 @@ BT_API extern void bte_main_lpm_allow_bt_device_sleep(void);
** BTM
**
******************************************************************************/
-/* if set to TRUE, stack will automatically send an HCI reset at start-up. To be
-set to FALSE for advanced start-up / shut-down procedures using USER_HW_ENABLE_API
+/* if set to TRUE, stack will automatically send an HCI reset at start-up. To be
+set to FALSE for advanced start-up / shut-down procedures using USER_HW_ENABLE_API
and USER_HW_DISABLE_API macros */
#ifndef BTM_AUTOMATIC_HCI_RESET
#define BTM_AUTOMATIC_HCI_RESET FALSE
@@ -888,7 +888,7 @@ and USER_HW_DISABLE_API macros */
#endif
/**************************
-** Initial SCO TX credit
+** Initial SCO TX credit
*************************/
/* max TX SCO data packet size */
#ifndef BTM_SCO_DATA_SIZE_MAX
@@ -1441,7 +1441,7 @@ and USER_HW_DISABLE_API macros */
#define GATT_MAX_SR_PROFILES 32 /* max is 32 */
#endif
-#ifndef GATT_MAX_APPS
+#ifndef GATT_MAX_APPS
#define GATT_MAX_APPS 10 /* note: 2 apps used internally GATT and GAP */
#endif
@@ -1477,7 +1477,7 @@ and USER_HW_DISABLE_API macros */
#define SMP_DEBUG FALSE
#endif
-#ifndef SMP_DEFAULT_AUTH_REQ
+#ifndef SMP_DEFAULT_AUTH_REQ
#define SMP_DEFAULT_AUTH_REQ SMP_AUTH_NB_ENC_ONLY
#endif
@@ -1835,7 +1835,7 @@ and USER_HW_DISABLE_API macros */
#define OBX_MAX_SR_SESSION 4
#endif
-/* The maximum number of sessions for all registered servers.
+/* The maximum number of sessions for all registered servers.
* (must be equal or bigger than OBX_NUM_SERVERS) */
#ifndef OBX_NUM_SR_SESSIONS
#define OBX_NUM_SR_SESSIONS 26
@@ -1896,11 +1896,11 @@ GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
#endif
/* This option is application when OBX_14_INCLUDED=TRUE
-GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
-L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
+GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
+L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
Note: This pool needs to have enough buffers to hold two times the window size negotiated
- in the L2CA_SetFCROptions (2 * tx_win_size) to allow for retransmissions.
- The size of each buffer must be able to hold the maximum MPS segment size passed in
+ in the L2CA_SetFCROptions (2 * tx_win_size) to allow for retransmissions.
+ The size of each buffer must be able to hold the maximum MPS segment size passed in
L2CA_SetFCROptions plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
*/
#ifndef OBX_FCR_TX_POOL_ID
@@ -2051,7 +2051,7 @@ Range: Minimum 12000 (12 secs) on BR/EDR when supporting PBF.
#ifndef AVDT_NUM_SEPS
#define AVDT_NUM_SEPS 3
#endif
-
+
/* Number of transport channels setup per media stream(audio or video) */
#ifndef AVDT_NUM_CHANNELS
@@ -2064,8 +2064,8 @@ Range: Minimum 12000 (12 secs) on BR/EDR when supporting PBF.
#endif
#endif
-
-/* Number of transport channels setup by AVDT for all media streams
+
+/* Number of transport channels setup by AVDT for all media streams
* AVDT_NUM_CHANNELS * Number of simultaneous streams.
*/
#ifndef AVDT_NUM_TC_TBL
@@ -2604,7 +2604,7 @@ Range: Minimum 12000 (12 secs) on BR/EDR when supporting PBF.
/* SCO packet type(s) to use (bitmask: see spec), 0 - device default (recommended) */
#ifndef HSP2_SCO_PKT_TYPES
-#define HSP2_SCO_PKT_TYPES ((UINT16)0x0000)
+#define HSP2_SCO_PKT_TYPES ((UINT16)0x0000)
#endif
/* The default settings of the SCO voice link. */
@@ -2617,7 +2617,7 @@ Range: Minimum 12000 (12 secs) on BR/EDR when supporting PBF.
#endif
#ifndef HSP2_MAX_AT_VAL_LENGTH
-#if (defined(HFP_INCLUDED) && HFP_INCLUDED == TRUE)
+#if (defined(HFP_INCLUDED) && HFP_INCLUDED == TRUE)
#define HSP2_MAX_AT_VAL_LENGTH 310
#else
#define HSP2_MAX_AT_VAL_LENGTH 5
@@ -2808,15 +2808,15 @@ Range: Minimum 12000 (12 secs) on BR/EDR when supporting PBF.
#endif
#ifndef HID_CONTROL_POOL_ID
-#define HID_CONTROL_POOL_ID 2
+#define HID_CONTROL_POOL_ID 2
#endif
#ifndef HID_INTERRUPT_POOL_ID
-#define HID_INTERRUPT_POOL_ID 2
+#define HID_INTERRUPT_POOL_ID 2
#endif
/*************************************************************************
-** Definitions for Both HID-Host & Device
+** Definitions for Both HID-Host & Device
*/
#ifndef HID_MAX_SVC_NAME_LEN
#define HID_MAX_SVC_NAME_LEN 32
@@ -3163,30 +3163,30 @@ Range: Minimum 12000 (12 secs) on BR/EDR when supporting PBF.
/* TRUE to show the received XML object in trace for conformance tests */
#ifndef BIP_TRACE_XML
-#define BIP_TRACE_XML TRUE
+#define BIP_TRACE_XML TRUE
#endif
/* in case that the received XML object is not complete, the XML parser state machine needs
* to keep a copy of the data from the last '<'
- * This macro specifies the maximun amount of data for this purpose */
+ * This macro specifies the maximun amount of data for this purpose */
#ifndef BIP_XML_CARRY_OVER_LEN
-#define BIP_XML_CARRY_OVER_LEN 100
+#define BIP_XML_CARRY_OVER_LEN 100
#endif
/* minimum 4, maximum is 255. The value should be set to the maximum size of encoding string + 1. JPEG2000.
* If vendor specific format is supported, it might be bigger than 9 */
#ifndef BIP_IMG_ENCODE_SIZE
-#define BIP_IMG_ENCODE_SIZE 9
+#define BIP_IMG_ENCODE_SIZE 9
#endif
/* MIME type: text/plain */
#ifndef BIP_TYPE_SIZE
-#define BIP_TYPE_SIZE 20
+#define BIP_TYPE_SIZE 20
#endif
/* example: iso-8895-1 */
#ifndef BIP_CHARSET_SIZE
-#define BIP_CHARSET_SIZE 10
+#define BIP_CHARSET_SIZE 10
#endif
/* friendly name */
@@ -3433,11 +3433,11 @@ GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
#endif
/*
-GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
-L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
+GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
+L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
Note: This pool needs to have enough buffers to hold two times the window size negotiated
- in the tL2CAP_FCR_OPTIONS (2 * tx_win_size) to allow for retransmissions.
- The size of each buffer must be able to hold the maximum MPS segment size passed in
+ in the tL2CAP_FCR_OPTIONS (2 * tx_win_size) to allow for retransmissions.
+ The size of each buffer must be able to hold the maximum MPS segment size passed in
tL2CAP_FCR_OPTIONS plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
*/
#ifndef AVCT_BR_FCR_TX_POOL_ID
@@ -3549,11 +3549,11 @@ GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
#endif
/*
-GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
-L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
+GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
+L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
Note: This pool needs to have enough buffers to hold two times the window size negotiated
- in the tL2CAP_FCR_OPTIONS (2 * tx_win_size) to allow for retransmissions.
- The size of each buffer must be able to hold the maximum MPS segment size passed in
+ in the tL2CAP_FCR_OPTIONS (2 * tx_win_size) to allow for retransmissions.
+ The size of each buffer must be able to hold the maximum MPS segment size passed in
tL2CAP_FCR_OPTIONS plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
*/
#ifndef MCA_FCR_TX_POOL_ID
@@ -3561,7 +3561,7 @@ Note: This pool needs to have enough buffers to hold two times the window size
#endif
/* MCAP control channel FCR Option:
-Size of the transmission window when using enhanced retransmission mode.
+Size of the transmission window when using enhanced retransmission mode.
1 is defined by HDP specification for control channel.
*/
#ifndef MCA_FCR_OPT_TX_WINDOW_SIZE
@@ -3782,7 +3782,7 @@ The maximum number of payload octets that the local device can receive in a sing
#define BTE_PLATFORM_IDLE
#endif
-#ifndef BTE_IDLE_TASK_INCLUDED
+#ifndef BTE_IDLE_TASK_INCLUDED
#define BTE_IDLE_TASK_INCLUDED FALSE
#endif
diff --git a/include/gki_target.h b/include/gki_target.h
index 928f69b..c2c2b6b 100644
--- a/include/gki_target.h
+++ b/include/gki_target.h
@@ -45,7 +45,7 @@
#if defined (GKI_DEBUG) && (GKI_DEBUG == TRUE)
#define GKI_TRACE(fmt, ...) ALOGI ("%s: " fmt, __FUNCTION__, ## __VA_ARGS__)
#else
-#define GKI_TRACE(fmt, ...)
+#define GKI_TRACE(fmt, ...)
#endif
/******************************************************************************
@@ -242,8 +242,8 @@ Devices with small amount of RAM should limit the number of active obex objects.
#endif
/* The number of fixed GKI buffer pools.
-eL2CAP requires Pool ID 5
-If BTM_SCO_HCI_INCLUDED is FALSE, Pool ID 6 is unnecessary, otherwise set to 7
+eL2CAP requires Pool ID 5
+If BTM_SCO_HCI_INCLUDED is FALSE, Pool ID 6 is unnecessary, otherwise set to 7
If BTA_HL_INCLUDED is FALSE then Pool ID 7 is uncessary and set the following to 7, otherwise set to 8
If BLE_INCLUDED is FALSE then Pool ID 8 is uncessary and set the following to 8, otherwise set to 9
POOL_ID 9 is a public pool meant for large buffer needs such as SDP_DB
@@ -327,7 +327,7 @@ over HCI data and intentionally kept out of order */
#define GKI_POOL_ID_6 6
#endif
-/* The size of the buffers in pool 6,
+/* The size of the buffers in pool 6,
BUF_SIZE = max SCO data 255 + sizeof(BT_HDR) = 8 + SCO packet header 3 + padding 2 = 268 */
#ifndef GKI_BUF6_SIZE
#define GKI_BUF6_SIZE 268
@@ -339,10 +339,10 @@ over HCI data and intentionally kept out of order */
#endif
-/* The following pool is a dedicated pool for HDP
- If a shared pool is more desirable then
+/* The following pool is a dedicated pool for HDP
+ If a shared pool is more desirable then
1. set BTA_HL_LRG_DATA_POOL_ID to the desired Gki Pool ID
- 2. make sure that the shared pool size is larger than 9472
+ 2. make sure that the shared pool size is larger than 9472
3. adjust GKI_NUM_FIXED_BUF_POOLS accordingly since
POOL ID 7 is not needed
*/
@@ -362,10 +362,10 @@ over HCI data and intentionally kept out of order */
#define GKI_BUF7_MAX 2
#endif
-/* The following pool is a dedicated pool for GATT
- If a shared pool is more desirable then
+/* The following pool is a dedicated pool for GATT
+ If a shared pool is more desirable then
1. set GATT_DB_POOL_ID to the desired Gki Pool ID
- 2. make sure that the shared pool size fit a common GATT database needs
+ 2. make sure that the shared pool size fit a common GATT database needs
3. adjust GKI_NUM_FIXED_BUF_POOLS accordingly since
POOL ID 8 is not needed
*/
@@ -418,7 +418,7 @@ over HCI data and intentionally kept out of order */
#define GKI_TRACE_ERROR_6(m,p1,p2,p3,p4,p5,p6) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_GKI | TRACE_ORG_GKI | TRACE_TYPE_ERROR,m,p1,p2,p3,p4,p5,p6)
#ifdef __cplusplus
-extern "C"
+extern "C"
{
#endif
diff --git a/main/Android.mk b/main/Android.mk
index 2a5ed93..2a5ed93 100644..100755
--- a/main/Android.mk
+++ b/main/Android.mk
diff --git a/main/bte_init.c b/main/bte_init.c
index 26d8fc1..14a6006 100644
--- a/main/bte_init.c
+++ b/main/bte_init.c
@@ -84,7 +84,7 @@
#endif
#if ((defined(HSP2_INCLUDED) && HSP2_INCLUDED == TRUE)) || \
- ((defined(HFP_INCLUDED) && HFP_INCLUDED == TRUE))
+ ((defined(HFP_INCLUDED) && HFP_INCLUDED == TRUE))
#include "hsp2_api.h"
#endif
@@ -455,13 +455,13 @@ BT_API void BTE_InitStack(void)
#endif
#if BTA_SS_INCLUDED==TRUE
memset((void*)bta_ss_cb_ptr, 0, sizeof(tBTA_SS_CB));
-#endif
-#if BTA_CT_INCLUDED==TRUE
+#endif
+#if BTA_CT_INCLUDED==TRUE
memset((void*)bta_ct_cb_ptr, 0, sizeof(tBTA_CT_CB));
-#endif
-#if BTA_CG_INCLUDED==TRUE
+#endif
+#if BTA_CG_INCLUDED==TRUE
memset((void*)bta_cg_cb_ptr, 0, sizeof(tBTA_CG_CB));
-#endif
+#endif
#if BTA_BI_INCLUDED==TRUE
memset((void *)bta_bic_cb_ptr, 0, sizeof(tBTA_BIC_CB));
memset((void *)bta_bis_cb_ptr, 0, sizeof(tBTA_BIS_CB));
diff --git a/main/bte_logmsg.c b/main/bte_logmsg.c
index 5a490e3..c67dbbd 100644..100755
--- a/main/bte_logmsg.c
+++ b/main/bte_logmsg.c
@@ -213,7 +213,7 @@ LogMsg(UINT32 trace_set_mask, const char *fmt_str, ...)
struct timezone tz;
struct tm *tm;
time_t t;
-
+
gettimeofday(&tv, &tz);
time(&t);
tm = localtime(&t);
@@ -268,14 +268,14 @@ ScrLog(UINT32 trace_set_mask, const char *fmt_str, ...)
int trace_layer = TRACE_GET_LAYER(trace_set_mask);
if (trace_layer >= TRACE_LAYER_MAX_NUM)
trace_layer = 0;
-
+
gettimeofday(&tv, &tz);
time(&t);
tm = localtime(&t);
sprintf(buffer, "%02d:%02d:%02d.%03ld ", tm->tm_hour, tm->tm_min, tm->tm_sec,
tv.tv_usec / 1000);
-
+
va_start(ap, fmt_str);
vsnprintf(&buffer[strlen(buffer)], BTE_LOG_MAX_SIZE, fmt_str, ap);
va_end(ap);
@@ -347,7 +347,7 @@ BT_API tBTTRC_LEVEL * BTA_SysSetTraceLevel(tBTTRC_LEVEL * p_levels)
while (0 != p_l->layer_id)
{
p_f_map = &bttrc_set_level_map[0];
-
+
while (0 != p_f_map->layer_id_start)
{
printf("BTA_SysSetTraceLevel - trace id in map start = %d end= %d, paramter id = %d\r\n", p_f_map->layer_id_start, p_f_map->layer_id_end, p_l->layer_id );
diff --git a/main/bte_main.c b/main/bte_main.c
index 6cf7dfe..6cf7dfe 100644..100755
--- a/main/bte_main.c
+++ b/main/bte_main.c
diff --git a/stack/Android.mk b/stack/Android.mk
index 968cfdb..f209fb7 100644
--- a/stack/Android.mk
+++ b/stack/Android.mk
@@ -34,7 +34,7 @@ LOCAL_CFLAGS += $(bdroid_CFLAGS)
ifeq ($(BOARD_HAVE_BLUETOOTH_BCM),true)
LOCAL_CFLAGS += \
- -DBOARD_HAVE_BLUETOOTH_BCM
+ -DBOARD_HAVE_BLUETOOTH_BCM
endif
LOCAL_PRELINK_MODULE:=false
@@ -130,7 +130,7 @@ LOCAL_SRC_FILES:= \
./l2cap/l2c_link.c \
./l2cap/l2c_ble.c
-LOCAL_MODULE := libbt-brcm_stack
+LOCAL_MODULE := libbt-brcm_stack
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_SHARED_LIBRARIES := libcutils libc
diff --git a/stack/a2dp/a2d_api.c b/stack/a2dp/a2d_api.c
index b77c60c..dbff646 100644
--- a/stack/a2dp/a2d_api.c
+++ b/stack/a2dp/a2d_api.c
@@ -54,7 +54,7 @@ static void a2d_sdp_cback(UINT16 status)
do
{
/* get next record; if none found, we're done */
- if ((p_rec = SDP_FindServiceInDb(a2d_cb.find.p_db,
+ if ((p_rec = SDP_FindServiceInDb(a2d_cb.find.p_db,
a2d_cb.find.service_uuid, p_rec)) == NULL)
{
break;
@@ -112,7 +112,7 @@ static void a2d_sdp_cback(UINT16 status)
**
** Function a2d_set_avdt_sdp_ver
**
-** Description This function allows the script wrapper to change the
+** Description This function allows the script wrapper to change the
** avdt version of a2dp.
**
** Returns None
@@ -172,7 +172,7 @@ tA2D_STATUS A2D_AddRecord(UINT16 service_uuid, char *p_service_name, char *p_pro
result &= SDP_AddServiceClassIdList(sdp_handle, 1, &service_uuid);
memset((void*) proto_list, 0 , A2D_NUM_PROTO_ELEMS*sizeof(tSDP_PROTOCOL_ELEM));
-
+
/* add protocol descriptor list */
proto_list[0].protocol_uuid = UUID_PROTOCOL_L2CAP;
proto_list[0].num_params = 1;
@@ -239,7 +239,7 @@ tA2D_STATUS A2D_AddRecord(UINT16 service_uuid, char *p_service_name, char *p_pro
**
** p_db: Pointer to the information to initialize
** the discovery database.
-**
+**
** p_cback: Pointer to the A2D_FindService()
** callback function.
**
@@ -269,7 +269,7 @@ tA2D_STATUS A2D_FindService(UINT16 service_uuid, BD_ADDR bd_addr,
p_db == NULL || p_db->p_db == NULL || p_cback == NULL)
return A2D_INVALID_PARAMS;
- if( a2d_cb.find.service_uuid == UUID_SERVCLASS_AUDIO_SOURCE ||
+ if( a2d_cb.find.service_uuid == UUID_SERVCLASS_AUDIO_SOURCE ||
a2d_cb.find.service_uuid == UUID_SERVCLASS_AUDIO_SINK)
return A2D_BUSY;
@@ -360,9 +360,9 @@ UINT8 A2D_BitsSet(UINT8 num)
** Function A2D_Init
**
** Description This function is called to initialize the control block
-** for this layer. It must be called before accessing any
+** for this layer. It must be called before accessing any
** other API functions for this layer. It is typically called
-** once during the start up of the stack.
+** once during the start up of the stack.
**
** Returns void
**
@@ -372,7 +372,7 @@ void A2D_Init(void)
memset(&a2d_cb, 0, sizeof(tA2D_CB));
a2d_cb.avdt_sdp_ver = AVDT_VERSION;
-
+
#if defined(A2D_INITIAL_TRACE_LEVEL)
a2d_cb.trace_level = A2D_INITIAL_TRACE_LEVEL;
#else
diff --git a/stack/a2dp/a2d_int.h b/stack/a2dp/a2d_int.h
index b90b701..07cf34c 100644
--- a/stack/a2dp/a2d_int.h
+++ b/stack/a2dp/a2d_int.h
@@ -29,7 +29,7 @@
*****************************************************************************/
/* Control block used by A2D_FindService(). */
-typedef struct
+typedef struct
{
tA2D_FIND_CBACK *p_cback; /* pointer to application callback */
tSDP_DISCOVERY_DB *p_db; /* pointer to discovery database */
diff --git a/stack/a2dp/a2d_sbc.c b/stack/a2dp/a2d_sbc.c
index 77549ee..cec335a 100644
--- a/stack/a2dp/a2d_sbc.c
+++ b/stack/a2dp/a2d_sbc.c
@@ -2,7 +2,7 @@
**
** Name: a2d_sbc.c
**
-** Description:utility functions to help build and parse SBC
+** Description:utility functions to help build and parse SBC
** Codec Information Element and Media Payload.
** Copyright (c) 2002-2004, WIDCOMM Inc., All Rights Reserved.
** WIDCOMM Bluetooth Core. Proprietary and confidential.
@@ -46,7 +46,7 @@
*
* if(index > 0)
* {
- * p = &u8frame[base_index];
+ * p = &u8frame[base_index];
* if((index&1)&&(u16PacketLength > (base_index+index*2)))
* {
* // odd index: swap 2 bytes
diff --git a/stack/avct/avct_api.c b/stack/avct/avct_api.c
index 90edb3d..d1d5cee 100644
--- a/stack/avct/avct_api.c
+++ b/stack/avct/avct_api.c
@@ -34,7 +34,7 @@ tAVCT_CB avct_cb;
** prepares the protocol stack for its use. This function
** must be called once by the system or platform using AVCTP
** before the other functions of the API an be used.
-**
+**
**
** Returns void
**
@@ -45,7 +45,7 @@ void AVCT_Register(UINT16 mtu, UINT16 mtu_br, UINT8 sec_mask)
/* register PSM with L2CAP */
L2CA_Register(AVCT_PSM, (tL2CAP_APPL_INFO *) &avct_l2c_appl);
-
+
/* set security level */
BTM_SetSecurityLevel(TRUE, "", BTM_SEC_SERVICE_AVCTP, sec_mask, AVCT_PSM, 0, 0);
BTM_SetSecurityLevel(FALSE, "", BTM_SEC_SERVICE_AVCTP, sec_mask, AVCT_PSM, 0, 0);
@@ -86,7 +86,7 @@ void AVCT_Register(UINT16 mtu, UINT16 mtu_br, UINT8 sec_mask)
** application in the system. Before this function can be
** called, all connections must be removed with
** AVCT_RemoveConn().
-**
+**
**
** Returns void
**
@@ -108,9 +108,9 @@ void AVCT_Deregister(void)
** the p_cc->role parameter. When this function is called to
** create an initiator connection, an AVCTP connection to
** the peer device is initiated if one does not already exist.
-** If an acceptor connection is created, the connection waits
+** If an acceptor connection is created, the connection waits
** passively for an incoming AVCTP connection from a peer device.
-**
+**
**
** Returns AVCT_SUCCESS if successful, otherwise error.
**
@@ -173,7 +173,7 @@ UINT16 AVCT_CreateConn(UINT8 *p_handle, tAVCT_CC *p_cc, BD_ADDR peer_addr)
** the application is no longer using a connection. If this
** is the last connection to a peer the L2CAP channel for AVCTP
** will be closed.
-**
+**
**
** Returns AVCT_SUCCESS if successful, otherwise error.
**
@@ -212,9 +212,9 @@ UINT16 AVCT_RemoveConn(UINT8 handle)
** the role parameter. When this function is called to
** create an initiator connection, the Browse channel to
** the peer device is initiated if one does not already exist.
-** If an acceptor connection is created, the connection waits
+** If an acceptor connection is created, the connection waits
** passively for an incoming AVCTP connection from a peer device.
-**
+**
**
** Returns AVCT_SUCCESS if successful, otherwise error.
**
@@ -289,7 +289,7 @@ UINT16 AVCT_CreateBrowse (UINT8 handle, UINT8 role)
** the application is no longer using a connection. If this
** is the last connection to a peer the L2CAP channel for AVCTP
** will be closed.
-**
+**
**
** Returns AVCT_SUCCESS if successful, otherwise error.
**
@@ -322,7 +322,7 @@ UINT16 AVCT_RemoveBrowse (UINT8 handle)
**
** Function AVCT_GetBrowseMtu
**
-** Description Get the peer_mtu for the AVCTP Browse channel of the given
+** Description Get the peer_mtu for the AVCTP Browse channel of the given
** connection.
**
** Returns the peer browsing channel MTU.
@@ -346,7 +346,7 @@ UINT16 AVCT_GetBrowseMtu (UINT8 handle)
**
** Function AVCT_GetPeerMtu
**
-** Description Get the peer_mtu for the AVCTP channel of the given
+** Description Get the peer_mtu for the AVCTP channel of the given
** connection.
**
** Returns the peer MTU size.
@@ -423,7 +423,7 @@ UINT16 AVCT_MsgReq(UINT8 handle, UINT8 label, UINT8 cr, BT_HDR *p_msg)
ul_msg.p_buf = p_msg;
ul_msg.p_ccb = p_ccb;
ul_msg.label = label;
- ul_msg.cr = cr;
+ ul_msg.cr = cr;
#if (AVCT_BROWSE_INCLUDED == TRUE)
/* send msg event to bcb */
diff --git a/stack/avct/avct_ccb.c b/stack/avct/avct_ccb.c
index 1de4652..89465a2 100644
--- a/stack/avct/avct_ccb.c
+++ b/stack/avct/avct_ccb.c
@@ -21,7 +21,7 @@
** Function avct_ccb_alloc
**
** Description Allocate a connection control block; copy parameters to ccb.
-**
+**
**
** Returns pointer to the ccb, or NULL if none could be allocated.
**
@@ -41,7 +41,7 @@ tAVCT_CCB *avct_ccb_alloc(tAVCT_CC *p_cc)
break;
}
}
-
+
if (i == AVCT_NUM_CONN)
{
/* out of ccbs */
@@ -57,7 +57,7 @@ tAVCT_CCB *avct_ccb_alloc(tAVCT_CC *p_cc)
**
** Description Deallocate a connection control block and call application
** callback.
-**
+**
**
** Returns void.
**
@@ -91,7 +91,7 @@ void avct_ccb_dealloc(tAVCT_CCB *p_ccb, UINT8 event, UINT16 result, BD_ADDR bd_a
** Function avct_ccb_to_idx
**
** Description Given a pointer to an ccb, return its index.
-**
+**
**
** Returns Index of ccb.
**
@@ -107,7 +107,7 @@ UINT8 avct_ccb_to_idx(tAVCT_CCB *p_ccb)
** Function avct_ccb_by_idx
**
** Description Return ccb pointer based on ccb index (or handle).
-**
+**
**
** Returns pointer to the ccb, or NULL if none found.
**
@@ -126,7 +126,7 @@ tAVCT_CCB *avct_ccb_by_idx(UINT8 idx)
{
p_ccb = NULL;
AVCT_TRACE_WARNING1("ccb %d not allocated", idx);
- }
+ }
}
else
{
diff --git a/stack/avct/avct_defs.h b/stack/avct/avct_defs.h
index 4496acd..dd03c1e 100644
--- a/stack/avct/avct_defs.h
+++ b/stack/avct/avct_defs.h
@@ -5,7 +5,7 @@
** Description: This contains constants definitions and other information
** from the AVCTP specification. This file is intended for
** use internal to AVCT only.
-**
+**
**
** Copyright (c) 2003-2004, WIDCOMM Inc., All Rights Reserved.
** WIDCOMM Bluetooth Core. Proprietary and confidential.
@@ -47,5 +47,5 @@
#define AVCT_PRS_PKT_TYPE(p, type) \
type = (*(p) >> 2) & 3;
-
+
#endif /* AVCT_DEFS_H */
diff --git a/stack/avct/avct_int.h b/stack/avct/avct_int.h
index 193ecb1..d67c404 100644
--- a/stack/avct/avct_int.h
+++ b/stack/avct/avct_int.h
@@ -3,7 +3,7 @@
** Name: avct_int.h
**
** Description: This file contains interfaces which are internal to AVCTP.
-**
+**
**
** Copyright (c) 2003-2008, Broadcom Corp., All Rights Reserved.
** WIDCOMM Bluetooth Core. Proprietary and confidential.
@@ -104,7 +104,7 @@ typedef struct {
UINT8 label;
UINT8 cr;
} tAVCT_UL_MSG;
-
+
/* union associated with lcb state machine events */
typedef union {
tAVCT_UL_MSG ul_msg;
diff --git a/stack/avct/avct_l2c.c b/stack/avct/avct_l2c.c
index b5f10a7..cf1a652 100644
--- a/stack/avct/avct_l2c.c
+++ b/stack/avct/avct_l2c.c
@@ -82,7 +82,7 @@ static BOOLEAN avct_l2c_is_passive (tAVCT_LCB *p_lcb)
** Function avct_l2c_connect_ind_cback
**
** Description This is the L2CAP connect indication callback function.
-**
+**
**
** Returns void
**
@@ -118,14 +118,14 @@ void avct_l2c_connect_ind_cback(BD_ADDR bd_addr, UINT16 lcid, UINT16 psm, UINT8
AVCT_TRACE_DEBUG1("avct_l2c_connect_ind_cback conflict_lcid:0x%x", p_lcb->conflict_lcid);
}
}
-
+
if(p_lcb)
{
AVCT_TRACE_DEBUG3("avct_l2c_connect_ind_cback: 0x%x, res: %d, ch_state: %d",
lcid, result, p_lcb->ch_state);
}
/* Send L2CAP connect rsp */
- L2CA_ConnectRsp(bd_addr, id, lcid, result, 0);
+ L2CA_ConnectRsp(bd_addr, id, lcid, result, 0);
/* if result ok, proceed with connection */
if (result == L2CAP_CONN_OK)
@@ -155,7 +155,7 @@ void avct_l2c_connect_ind_cback(BD_ADDR bd_addr, UINT16 lcid, UINT16 psm, UINT8
** Function avct_l2c_connect_cfm_cback
**
** Description This is the L2CAP connect confirm callback function.
-**
+**
**
** Returns void
**
@@ -216,7 +216,7 @@ void avct_l2c_connect_cfm_cback(UINT16 lcid, UINT16 result)
** Function avct_l2c_config_cfm_cback
**
** Description This is the L2CAP config confirm callback function.
-**
+**
**
** Returns void
**
@@ -266,7 +266,7 @@ void avct_l2c_config_cfm_cback(UINT16 lcid, tL2CAP_CFG_INFO *p_cfg)
** Function avct_l2c_config_ind_cback
**
** Description This is the L2CAP config indication callback function.
-**
+**
**
** Returns void
**
@@ -296,7 +296,7 @@ void avct_l2c_config_ind_cback(UINT16 lcid, tL2CAP_CFG_INFO *p_cfg)
/* if first config ind */
if ((p_lcb->ch_flags & AVCT_L2C_CFG_IND_DONE) == 0)
- {
+ {
/* update flags */
p_lcb->ch_flags |= AVCT_L2C_CFG_IND_DONE;
@@ -316,7 +316,7 @@ void avct_l2c_config_ind_cback(UINT16 lcid, tL2CAP_CFG_INFO *p_cfg)
** Function avct_l2c_disconnect_ind_cback
**
** Description This is the L2CAP disconnect indication callback function.
-**
+**
**
** Returns void
**
@@ -335,7 +335,7 @@ void avct_l2c_disconnect_ind_cback(UINT16 lcid, BOOLEAN ack_needed)
/* send L2CAP disconnect response */
L2CA_DisconnectRsp(lcid);
}
-
+
avct_lcb_event(p_lcb, AVCT_LCB_LL_CLOSE_EVT, (tAVCT_LCB_EVT *) &result);
AVCT_TRACE_DEBUG1("ch_state di: %d ", p_lcb->ch_state);
}
@@ -346,7 +346,7 @@ void avct_l2c_disconnect_ind_cback(UINT16 lcid, BOOLEAN ack_needed)
** Function avct_l2c_disconnect_cfm_cback
**
** Description This is the L2CAP disconnect confirm callback function.
-**
+**
**
** Returns void
**
@@ -375,7 +375,7 @@ void avct_l2c_disconnect_cfm_cback(UINT16 lcid, UINT16 result)
** Function avct_l2c_congestion_ind_cback
**
** Description This is the L2CAP congestion indication callback function.
-**
+**
**
** Returns void
**
@@ -397,7 +397,7 @@ void avct_l2c_congestion_ind_cback(UINT16 lcid, BOOLEAN is_congested)
** Function avct_l2c_data_ind_cback
**
** Description This is the L2CAP data indication callback function.
-**
+**
**
** Returns void
**
diff --git a/stack/avct/avct_lcb.c b/stack/avct/avct_lcb.c
index abbe1ad..f7127a3 100644
--- a/stack/avct/avct_lcb.c
+++ b/stack/avct/avct_lcb.c
@@ -173,7 +173,7 @@ const tAVCT_LCB_ST_TBL avct_lcb_st_tbl[] = {
** Function avct_lcb_event
**
** Description State machine event handling function for lcb
-**
+**
**
** Returns Nothing.
**
@@ -215,7 +215,7 @@ void avct_lcb_event(tAVCT_LCB *p_lcb, UINT8 event, tAVCT_LCB_EVT *p_data)
** Function avct_bcb_event
**
** Description State machine event handling function for lcb
-**
+**
**
** Returns Nothing.
**
@@ -259,7 +259,7 @@ void avct_bcb_event(tAVCT_BCB *p_bcb, UINT8 event, tAVCT_LCB_EVT *p_data)
** Function avct_lcb_by_bd
**
** Description This lookup function finds the lcb for a BD address.
-**
+**
**
** Returns pointer to the lcb, or NULL if none found.
**
@@ -277,7 +277,7 @@ tAVCT_LCB *avct_lcb_by_bd(BD_ADDR bd_addr)
break;
}
}
-
+
if (i == AVCT_NUM_LINKS)
{
/* if no lcb found */
@@ -294,7 +294,7 @@ tAVCT_LCB *avct_lcb_by_bd(BD_ADDR bd_addr)
** Function avct_lcb_alloc
**
** Description Allocate a link control block.
-**
+**
**
** Returns pointer to the lcb, or NULL if none could be allocated.
**
@@ -314,7 +314,7 @@ tAVCT_LCB *avct_lcb_alloc(BD_ADDR bd_addr)
break;
}
}
-
+
if (i == AVCT_NUM_LINKS)
{
/* out of lcbs */
@@ -329,7 +329,7 @@ tAVCT_LCB *avct_lcb_alloc(BD_ADDR bd_addr)
** Function avct_lcb_dealloc
**
** Description Deallocate a link control block.
-**
+**
**
** Returns void.
**
@@ -374,7 +374,7 @@ void avct_lcb_dealloc(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
** Function avct_lcb_by_lcid
**
** Description Find the LCB associated with the L2CAP LCID
-**
+**
**
** Returns pointer to the lcb, or NULL if none found.
**
@@ -391,7 +391,7 @@ tAVCT_LCB *avct_lcb_by_lcid(UINT16 lcid)
break;
}
}
-
+
if (i == AVCT_NUM_LINKS)
{
/* out of lcbs */
@@ -407,7 +407,7 @@ tAVCT_LCB *avct_lcb_by_lcid(UINT16 lcid)
** Function avct_lcb_has_pid
**
** Description See if any ccbs on this lcb have a particular pid.
-**
+**
**
** Returns Pointer to CCB if PID found, NULL otherwise.
**
@@ -432,7 +432,7 @@ tAVCT_CCB *avct_lcb_has_pid(tAVCT_LCB *p_lcb, UINT16 pid)
** Function avct_lcb_last_ccb
**
** Description See if given ccb is only one on the lcb.
-**
+**
**
** Returns TRUE if ccb is last, FALSE otherwise.
**
diff --git a/stack/avct/avct_lcb_act.c b/stack/avct/avct_lcb_act.c
index 186c5d2..8d48c10 100644
--- a/stack/avct/avct_lcb_act.c
+++ b/stack/avct/avct_lcb_act.c
@@ -24,14 +24,14 @@ const UINT8 avct_lcb_pkt_type_len[] = {
AVCT_HDR_LEN_START,
AVCT_HDR_LEN_CONT,
AVCT_HDR_LEN_END
-};
+};
/*******************************************************************************
**
** Function avct_lcb_msg_asmbl
**
** Description Reassemble incoming message.
-**
+**
**
** Returns Pointer to reassembled message; NULL if no message
** available.
@@ -150,7 +150,7 @@ static BT_HDR *avct_lcb_msg_asmbl(tAVCT_LCB *p_lcb, BT_HDR *p_buf)
** Function avct_lcb_chnl_open
**
** Description Open L2CAP channel to peer
-**
+**
**
** Returns Nothing.
**
@@ -174,7 +174,7 @@ void avct_lcb_chnl_open(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
** Function avct_lcb_unbind_disc
**
** Description Deallocate ccb and call callback with disconnect event.
-**
+**
**
** Returns Nothing.
**
@@ -192,7 +192,7 @@ void avct_lcb_unbind_disc(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
** bound to this lcb, send a connect event. For each
** unbound ccb with a new PID, bind that ccb to this lcb and
** send a connect event.
-**
+**
**
** Returns Nothing.
**
@@ -243,7 +243,7 @@ void avct_lcb_open_ind(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
**
** Description L2CAP channel open attempt failed. Deallocate any ccbs
** on this lcb and send connect confirm event with failure.
-**
+**
**
** Returns Nothing.
**
@@ -269,7 +269,7 @@ void avct_lcb_open_fail(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
**
** Description L2CAP channel closed by peer. Deallocate any initiator
** ccbs on this lcb and send disconnect ind event.
-**
+**
**
** Returns Nothing.
**
@@ -304,7 +304,7 @@ void avct_lcb_close_ind(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
**
** Description L2CAP channel closed by us. Deallocate any initiator
** ccbs on this lcb and send disconnect ind or cfm event.
-**
+**
**
** Returns Nothing.
**
@@ -349,7 +349,7 @@ void avct_lcb_close_cfm(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
** Function avct_lcb_bind_conn
**
** Description Bind ccb to lcb and send connect cfm event.
-**
+**
**
** Returns Nothing.
**
@@ -365,10 +365,10 @@ void avct_lcb_bind_conn(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
**
** Function avct_lcb_chk_disc
**
-** Description A ccb wants to close; if it is the last ccb on this lcb,
+** Description A ccb wants to close; if it is the last ccb on this lcb,
** close channel. Otherwise just deallocate and call
** callback.
-**
+**
**
** Returns Nothing.
**
@@ -397,7 +397,7 @@ void avct_lcb_chk_disc(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
** Function avct_lcb_chnl_disc
**
** Description Disconnect L2CAP channel.
-**
+**
**
** Returns Nothing.
**
@@ -411,9 +411,9 @@ void avct_lcb_chnl_disc(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
**
** Function avct_lcb_bind_fail
**
-** Description Deallocate ccb and call callback with connect event
+** Description Deallocate ccb and call callback with connect event
** with failure result.
-**
+**
**
** Returns Nothing.
**
@@ -428,7 +428,7 @@ void avct_lcb_bind_fail(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
** Function avct_lcb_cong_ind
**
** Description Handle congestion indication from L2CAP.
-**
+**
**
** Returns Nothing.
**
@@ -469,7 +469,7 @@ void avct_lcb_cong_ind(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
** Function avct_lcb_discard_msg
**
** Description Discard a message sent in from the API.
-**
+**
**
** Returns Nothing.
**
@@ -486,7 +486,7 @@ void avct_lcb_discard_msg(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
** Function avct_lcb_send_msg
**
** Description Build and send an AVCTP message.
-**
+**
**
** Returns Nothing.
**
@@ -502,7 +502,7 @@ void avct_lcb_send_msg(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
UINT16 temp;
UINT16 buf_size = p_lcb->peer_mtu + L2CAP_MIN_OFFSET + BT_HDR_SIZE;
-
+
/* store msg len */
curr_msg_len = p_data->ul_msg.p_buf->len;
@@ -604,7 +604,7 @@ void avct_lcb_send_msg(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
** Function avct_lcb_free_msg_ind
**
** Description Discard an incoming AVCTP message.
-**
+**
**
** Returns Nothing.
**
@@ -621,7 +621,7 @@ void avct_lcb_free_msg_ind(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
** Function avct_lcb_msg_ind
**
** Description Handle an incoming AVCTP message.
-**
+**
**
** Returns Nothing.
**
diff --git a/stack/avdt/avdt_ad.c b/stack/avdt/avdt_ad.c
index 3de56ae..cebbb93 100644
--- a/stack/avdt/avdt_ad.c
+++ b/stack/avdt/avdt_ad.c
@@ -25,7 +25,7 @@
** Function avdt_ad_type_to_tcid
**
** Description Derives the TCID from the channel type and SCB.
-**
+**
**
** Returns TCID value.
**
@@ -53,7 +53,7 @@ UINT8 avdt_ad_type_to_tcid(UINT8 type, tAVDT_SCB *p_scb)
** Function avdt_ad_tcid_to_type
**
** Description Derives the channel type from the TCID.
-**
+**
**
** Returns Channel type value.
**
@@ -85,7 +85,7 @@ static UINT8 avdt_ad_tcid_to_type(UINT8 tcid)
** Function avdt_ad_init
**
** Description Initialize adaption layer.
-**
+**
**
** Returns Nothing.
**
@@ -110,7 +110,7 @@ void avdt_ad_init(void)
**
** Description Find adaption layer transport channel table entry matching
** the given state.
-**
+**
**
** Returns Pointer to matching entry. For control channel it returns
** the matching entry. For media or other it returns the
@@ -180,7 +180,7 @@ tAVDT_TC_TBL *avdt_ad_tc_tbl_by_st(UINT8 type, tAVDT_CCB *p_ccb, UINT8 state)
** Function avdt_ad_tc_tbl_by_lcid
**
** Description Find adaption layer transport channel table entry by LCID.
-**
+**
**
** Returns Pointer to entry.
**
@@ -188,7 +188,7 @@ tAVDT_TC_TBL *avdt_ad_tc_tbl_by_st(UINT8 type, tAVDT_CCB *p_ccb, UINT8 state)
tAVDT_TC_TBL *avdt_ad_tc_tbl_by_lcid(UINT16 lcid)
{
UINT8 idx;
-
+
idx = avdt_cb.ad.lcid_tbl[lcid - L2CAP_BASE_APPL_CID];
if (idx < AVDT_NUM_TC_TBL)
@@ -208,7 +208,7 @@ tAVDT_TC_TBL *avdt_ad_tc_tbl_by_lcid(UINT16 lcid)
**
** Description This function retrieves the transport channel table entry
** for a particular channel.
-**
+**
**
** Returns Pointer to transport channel table entry.
**
@@ -242,7 +242,7 @@ tAVDT_TC_TBL *avdt_ad_tc_tbl_by_type(UINT8 type, tAVDT_CCB *p_ccb, tAVDT_SCB *p_
** Function avdt_ad_tc_tbl_alloc
**
** Description Allocate an entry in the traffic channel table.
-**
+**
**
** Returns Pointer to entry.
**
@@ -278,7 +278,7 @@ tAVDT_TC_TBL *avdt_ad_tc_tbl_alloc(tAVDT_CCB *p_ccb)
** Function avdt_ad_tc_tbl_to_idx
**
** Description Convert a transport channel table entry to an index.
-**
+**
**
** Returns Index value.
**
@@ -299,7 +299,7 @@ UINT8 avdt_ad_tc_tbl_to_idx(tAVDT_TC_TBL *p_tbl)
** the channel and sends it a close event. The reason
** parameter is the same value passed by the L2CAP
** callback function.
-**
+**
**
** Returns Nothing.
**
@@ -345,7 +345,7 @@ void avdt_ad_tc_close_ind(tAVDT_TC_TBL *p_tbl, UINT16 reason)
** Description This function is called by the L2CAP interface when
** the L2CAP channel is opened. It looks up the CCB or SCB
** for the channel and sends it an open event.
-**
+**
**
** Returns Nothing.
**
@@ -402,7 +402,7 @@ void avdt_ad_tc_open_ind(tAVDT_TC_TBL *p_tbl)
** or SCB for the channel and sends it a congestion event.
** The is_congested parameter is the same value passed by
** the L2CAP callback function.
-**
+**
**
** Returns Nothing.
**
@@ -438,7 +438,7 @@ void avdt_ad_tc_cong_ind(tAVDT_TC_TBL *p_tbl, BOOLEAN is_congested)
** Description This function is called by the L2CAP interface layer when
** incoming data is received from L2CAP. It looks up the CCB
** or SCB for the channel and routes the data accordingly.
-**
+**
**
** Returns Nothing.
**
@@ -479,7 +479,7 @@ void avdt_ad_tc_data_ind(tAVDT_TC_TBL *p_tbl, BT_HDR *p_buf)
** transport channel. It looks up the LCID of the channel
** based on the type, CCB, and SCB (if present). Then it
** passes the data to L2CA_DataWrite().
-**
+**
**
** Returns AVDT_AD_SUCCESS, if data accepted, else FALSE
** AVDT_AD_CONGESTED, if data accepted and the channel is congested
@@ -509,7 +509,7 @@ UINT8 avdt_ad_write_req(UINT8 type, tAVDT_CCB *p_ccb, tAVDT_SCB *p_scb, BT_HDR *
** as an initiator the function will start an L2CAP connection.
** When opened as an acceptor the function simply configures
** the table entry to listen for an incoming channel.
-**
+**
**
** Returns Nothing.
**
@@ -536,7 +536,7 @@ void avdt_ad_open_req(UINT8 type, tAVDT_CCB *p_ccb, tAVDT_SCB *p_scb, UINT8 role
/* otherwise get mtu from scb */
p_tbl->my_mtu = p_scb->cs.mtu;
p_tbl->my_flush_to = p_scb->cs.flush_to;
-
+
/* also set scb_hdl in rt_tbl */
avdt_cb.ad.rt_tbl[avdt_ccb_to_idx(p_ccb)][p_tbl->tcid].scb_hdl = avdt_scb_to_hdl(p_scb);
AVDT_TRACE_DEBUG3("avdt_cb.ad.rt_tbl[%d][%d].scb_hdl = %d",
@@ -582,7 +582,7 @@ void avdt_ad_open_req(UINT8 type, tAVDT_CCB *p_ccb, tAVDT_SCB *p_scb, UINT8 role
** Description This function is called by a CCB or SCB to close a
** transport channel. The function looks up the LCID for the
** channel and calls L2CA_DisconnectReq().
-**
+**
**
** Returns Nothing.
**
diff --git a/stack/avdt/avdt_api.c b/stack/avdt/avdt_api.c
index 4b3c465..02e9e57 100644
--- a/stack/avdt/avdt_api.c
+++ b/stack/avdt/avdt_api.c
@@ -40,7 +40,7 @@ tAVDT_CB avdt_cb;
** appropriate CCB or SCB state machine.
**
** This function is for use internal to the stack only.
-**
+**
**
** Returns void
**
@@ -92,7 +92,7 @@ void avdt_process_timeout(TIMER_LIST_ENT *p_tle)
** prepares the protocol stack for its use. This function
** must be called once by the system or platform using AVDTP
** before the other functions of the API an be used.
-**
+**
**
** Returns void
**
@@ -104,7 +104,7 @@ void AVDT_Register(tAVDT_REG *p_reg, tAVDT_CTRL_CBACK *p_cback)
/* register PSM with L2CAP */
L2CA_Register(AVDT_PSM, (tL2CAP_APPL_INFO *) &avdt_l2c_appl);
-
+
/* set security level */
BTM_SetSecurityLevel(TRUE, "", BTM_SEC_SERVICE_AVDTP, p_reg->sec_mask,
AVDT_PSM, BTM_SEC_PROTO_AVDT, AVDT_CHAN_SIG);
@@ -148,7 +148,7 @@ void AVDT_Register(tAVDT_REG *p_reg, tAVDT_CTRL_CBACK *p_cback)
** It is called when AVDTP is no longer being used by any
** application in the system. Before this function can be
** called, all streams must be removed with AVDT_RemoveStream().
-**
+**
**
** Returns void
**
@@ -170,7 +170,7 @@ void AVDT_Deregister(void)
** this endpoint and an endpoint on a peer device. In
** addition, a peer device can discover, get the capabilities,
** and connect to this endpoint.
-**
+**
**
** Returns AVDT_SUCCESS if successful, otherwise error.
**
@@ -186,7 +186,7 @@ UINT16 AVDT_CreateStream(UINT8 *p_handle, tAVDT_CS *p_cs)
if (((p_cs->cfg.psc_mask & (~AVDT_PSC)) != 0) || (p_cs->p_ctrl_cback == NULL))
{
result = AVDT_BAD_PARAMS;
- }
+ }
/* Allocate scb; if no scbs, return failure */
else if ((p_scb = avdt_scb_alloc(p_cs)) == NULL)
{
@@ -208,7 +208,7 @@ UINT16 AVDT_CreateStream(UINT8 *p_handle, tAVDT_CS *p_cs)
** If this function is called when the endpoint is connected
** the connection is closed and then the stream endpoint
** is removed.
-**
+**
**
** Returns AVDT_SUCCESS if successful, otherwise error.
**
@@ -244,7 +244,7 @@ UINT16 AVDT_RemoveStream(UINT8 handle)
** that AVDTP discovery is unrelated to SDP discovery).
** This function can be called at any time regardless of whether
** there is an AVDTP connection to the peer device.
-**
+**
** When discovery is complete, an AVDT_DISCOVER_CFM_EVT
** is sent to the application via its callback function.
** The application must not call AVDT_GetCapReq() or
@@ -354,7 +354,7 @@ static UINT16 avdt_get_cap_req(BD_ADDR bd_addr, tAVDT_CCB_API_GETCAP *p_evt)
** capabilities of a stream endpoint on the peer device.
** This function can be called at any time regardless of
** whether there is an AVDTP connection to the peer device.
-**
+**
** When the procedure is complete, an AVDT_GETCAP_CFM_EVT is
** sent to the application via its callback function. The
** application must not call AVDT_GetCapReq() or
@@ -391,7 +391,7 @@ UINT16 AVDT_GetCapReq(BD_ADDR bd_addr, UINT8 seid, tAVDT_CFG *p_cfg, tAVDT_CTRL_
** capabilities of a stream endpoint on the peer device.
** This function can be called at any time regardless of
** whether there is an AVDTP connection to the peer device.
-**
+**
** When the procedure is complete, an AVDT_GETCAP_CFM_EVT is
** sent to the application via its callback function. The
** application must not call AVDT_GetCapReq() or
@@ -582,7 +582,7 @@ UINT16 AVDT_StartReq(UINT8 *p_handles, UINT8 num_handles)
tAVDT_CCB_EVT evt;
UINT16 result = AVDT_SUCCESS;
int i;
-
+
BTTRC_AVDT_API0(AVDT_TRACE_API_START_REQ);
if ((num_handles == 0) || (num_handles > AVDT_NUM_SEPS))
@@ -640,7 +640,7 @@ UINT16 AVDT_SuspendReq(UINT8 *p_handles, UINT8 num_handles)
tAVDT_CCB_EVT evt;
UINT16 result = AVDT_SUCCESS;
int i;
-
+
BTTRC_AVDT_API0(AVDT_TRACE_API_SUSPEND_REQ);
if ((num_handles == 0) || (num_handles > AVDT_NUM_SEPS))
@@ -967,7 +967,7 @@ UINT16 AVDT_ConnectReq(BD_ADDR bd_addr, UINT8 sec_mask, tAVDT_CTRL_CBACK *p_cbac
/* ccb was already allocated for the incoming signalling. */
result = AVDT_BUSY;
}
-
+
if (result == AVDT_SUCCESS)
{
/* send event to ccb */
@@ -1177,10 +1177,10 @@ AVDT_API extern UINT16 AVDT_WriteDataReq(UINT8 handle, UINT8 *p_data, UINT32 dat
** buffer if argument p_buf is NULL. This function can only
** be called if the stream is a SNK.
**
-** AVDTP uses this buffer to reassemble fragmented media packets.
+** AVDTP uses this buffer to reassemble fragmented media packets.
** When AVDTP receives a complete media packet, it calls the
** p_media_cback assigned by AVDT_CreateStream().
-** This function can be called during callback to assign a
+** This function can be called during callback to assign a
** different buffer for next media packet or can leave the current
** buffer for next packet.
**
@@ -1219,11 +1219,11 @@ AVDT_API extern UINT16 AVDT_SetMediaBuf(UINT8 handle, UINT8 *p_buf, UINT32 buf_l
**
** Function AVDT_SendReport
**
-** Description
-**
+** Description
+**
**
**
-** Returns
+** Returns
**
*******************************************************************************/
UINT16 AVDT_SendReport(UINT8 handle, AVDT_REPORT_TYPE type,
diff --git a/stack/avdt/avdt_ccb.c b/stack/avdt/avdt_ccb.c
index 808c22f..ea1990d 100644
--- a/stack/avdt/avdt_ccb.c
+++ b/stack/avdt/avdt_ccb.c
@@ -35,33 +35,33 @@ const char * const avdt_ccb_st_str[] = {
/* verbose event strings for trace */
const char * const avdt_ccb_evt_str[] = {
- "API_DISCOVER_REQ_EVT",
- "API_GETCAP_REQ_EVT",
- "API_START_REQ_EVT",
- "API_SUSPEND_REQ_EVT",
- "API_DISCOVER_RSP_EVT",
- "API_GETCAP_RSP_EVT",
- "API_START_RSP_EVT",
- "API_SUSPEND_RSP_EVT",
- "API_CONNECT_REQ_EVT",
+ "API_DISCOVER_REQ_EVT",
+ "API_GETCAP_REQ_EVT",
+ "API_START_REQ_EVT",
+ "API_SUSPEND_REQ_EVT",
+ "API_DISCOVER_RSP_EVT",
+ "API_GETCAP_RSP_EVT",
+ "API_START_RSP_EVT",
+ "API_SUSPEND_RSP_EVT",
+ "API_CONNECT_REQ_EVT",
"API_DISCONNECT_REQ_EVT",
- "MSG_DISCOVER_CMD_EVT",
- "MSG_GETCAP_CMD_EVT",
- "MSG_START_CMD_EVT",
- "MSG_SUSPEND_CMD_EVT",
- "MSG_DISCOVER_RSP_EVT",
- "MSG_GETCAP_RSP_EVT",
- "MSG_START_RSP_EVT",
- "MSG_SUSPEND_RSP_EVT",
- "RCVRSP_EVT",
- "SENDMSG_EVT",
- "RET_TOUT_EVT",
- "RSP_TOUT_EVT",
- "IDLE_TOUT_EVT",
- "UL_OPEN_EVT",
- "UL_CLOSE_EVT",
- "LL_OPEN_EVT",
- "LL_CLOSE_EVT",
+ "MSG_DISCOVER_CMD_EVT",
+ "MSG_GETCAP_CMD_EVT",
+ "MSG_START_CMD_EVT",
+ "MSG_SUSPEND_CMD_EVT",
+ "MSG_DISCOVER_RSP_EVT",
+ "MSG_GETCAP_RSP_EVT",
+ "MSG_START_RSP_EVT",
+ "MSG_SUSPEND_RSP_EVT",
+ "RCVRSP_EVT",
+ "SENDMSG_EVT",
+ "RET_TOUT_EVT",
+ "RSP_TOUT_EVT",
+ "IDLE_TOUT_EVT",
+ "UL_OPEN_EVT",
+ "UL_CLOSE_EVT",
+ "LL_OPEN_EVT",
+ "LL_CLOSE_EVT",
"LL_CONG_EVT"
};
@@ -261,7 +261,7 @@ const tAVDT_CCB_ST_TBL avdt_ccb_st_tbl[] = {
** Function avdt_ccb_init
**
** Description Initialize channel control block module.
-**
+**
**
** Returns Nothing.
**
@@ -277,7 +277,7 @@ void avdt_ccb_init(void)
** Function avdt_ccb_event
**
** Description State machine event handling function for ccb
-**
+**
**
** Returns Nothing.
**
@@ -306,7 +306,7 @@ void avdt_ccb_event(tAVDT_CCB *p_ccb, UINT8 event, tAVDT_CCB_EVT *p_data)
{
if ((action = state_table[event][i]) != AVDT_CCB_IGNORE)
{
- BTTRC_AVDT_CCB_ACTION(action);
+ BTTRC_AVDT_CCB_ACTION(action);
(*avdt_cb.p_ccb_act[action])(p_ccb, p_data);
}
else
@@ -322,7 +322,7 @@ void avdt_ccb_event(tAVDT_CCB *p_ccb, UINT8 event, tAVDT_CCB_EVT *p_data)
** Function avdt_ccb_by_bd
**
** Description This lookup function finds the ccb for a BD address.
-**
+**
**
** Returns pointer to the ccb, or NULL if none found.
**
@@ -340,7 +340,7 @@ tAVDT_CCB *avdt_ccb_by_bd(BD_ADDR bd_addr)
break;
}
}
-
+
if (i == AVDT_NUM_LINKS)
{
/* if no ccb found */
@@ -357,7 +357,7 @@ tAVDT_CCB *avdt_ccb_by_bd(BD_ADDR bd_addr)
** Function avdt_ccb_alloc
**
** Description Allocate a channel control block.
-**
+**
**
** Returns pointer to the ccb, or NULL if none could be allocated.
**
@@ -380,7 +380,7 @@ tAVDT_CCB *avdt_ccb_alloc(BD_ADDR bd_addr)
break;
}
}
-
+
if (i == AVDT_NUM_LINKS)
{
/* out of ccbs */
@@ -395,7 +395,7 @@ tAVDT_CCB *avdt_ccb_alloc(BD_ADDR bd_addr)
** Function avdt_ccb_dealloc
**
** Description Deallocate a stream control block.
-**
+**
**
** Returns void.
**
@@ -412,7 +412,7 @@ void avdt_ccb_dealloc(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** Function avdt_ccb_to_idx
**
** Description Given a pointer to an ccb, return its index.
-**
+**
**
** Returns Index of ccb.
**
@@ -428,7 +428,7 @@ UINT8 avdt_ccb_to_idx(tAVDT_CCB *p_ccb)
** Function avdt_ccb_by_idx
**
** Description Return ccb pointer based on ccb index.
-**
+**
**
** Returns pointer to the ccb, or NULL if none found.
**
@@ -440,7 +440,7 @@ tAVDT_CCB *avdt_ccb_by_idx(UINT8 idx)
/* verify index */
if (idx < AVDT_NUM_LINKS)
{
- p_ccb = &avdt_cb.ccb[idx];
+ p_ccb = &avdt_cb.ccb[idx];
}
else
{
diff --git a/stack/avdt/avdt_ccb_act.c b/stack/avdt/avdt_ccb_act.c
index 3237028..87de480 100644
--- a/stack/avdt/avdt_ccb_act.c
+++ b/stack/avdt/avdt_ccb_act.c
@@ -24,9 +24,9 @@
**
** Function avdt_ccb_clear_ccb
**
-** Description This function clears out certain buffers, queues, and
+** Description This function clears out certain buffers, queues, and
** other data elements of a ccb.
-**
+**
**
** Returns void.
**
@@ -66,7 +66,7 @@ static void avdt_ccb_clear_ccb(tAVDT_CCB *p_ccb)
**
** Description This function calls avdt_ad_open_req() to
** initiate a signaling channel connection.
-**
+**
**
** Returns void.
**
@@ -83,7 +83,7 @@ void avdt_ccb_chan_open(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
**
** Description This function calls avdt_ad_close_req() to close a
** signaling channel connection.
-**
+**
**
** Returns void.
**
@@ -100,7 +100,7 @@ void avdt_ccb_chan_close(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
**
** Description This function checks for active streams on this CCB.
** If there are none, it starts an idle timer.
-**
+**
**
** Returns void.
**
@@ -134,7 +134,7 @@ void avdt_ccb_chk_close(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** received from the peer. It gathers up the stream
** information for all allocated streams and initiates
** sending of a discover response.
-**
+**
**
** Returns void.
**
@@ -144,7 +144,7 @@ void avdt_ccb_hdl_discover_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
tAVDT_SEP_INFO sep_info[AVDT_NUM_SEPS];
tAVDT_SCB *p_scb = &avdt_cb.scb[0];
int i;
-
+
p_data->msg.discover_rsp.p_sep_info = sep_info;
p_data->msg.discover_rsp.num_seps = 0;
@@ -174,7 +174,7 @@ void avdt_ccb_hdl_discover_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** Description This function is called when a discover response or
** reject is received from the peer. It calls the application
** callback function with the results.
-**
+**
**
** Returns void.
**
@@ -185,7 +185,7 @@ void avdt_ccb_hdl_discover_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
p_ccb->proc_busy = FALSE;
/* call app callback with results */
- (*p_ccb->proc_cback)(0, p_ccb->peer_addr, AVDT_DISCOVER_CFM_EVT,
+ (*p_ccb->proc_cback)(0, p_ccb->peer_addr, AVDT_DISCOVER_CFM_EVT,
(tAVDT_CTRL *)(&p_data->msg.discover_rsp));
}
@@ -197,7 +197,7 @@ void avdt_ccb_hdl_discover_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** is received from the peer. It retrieves the stream
** configuration for the requested stream and initiates
** sending of a get capabilities response.
-**
+**
**
** Returns void.
**
@@ -221,7 +221,7 @@ void avdt_ccb_hdl_getcap_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** Description This function is called with a get capabilities response
** or reject is received from the peer. It calls the
** application callback function with the results.
-**
+**
**
** Returns void.
**
@@ -232,7 +232,7 @@ void avdt_ccb_hdl_getcap_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
p_ccb->proc_busy = FALSE;
/* call app callback with results */
- (*p_ccb->proc_cback)(0, p_ccb->peer_addr, AVDT_GETCAP_CFM_EVT,
+ (*p_ccb->proc_cback)(0, p_ccb->peer_addr, AVDT_GETCAP_CFM_EVT,
(tAVDT_CTRL *)(&p_data->msg.svccap));
}
@@ -244,7 +244,7 @@ void avdt_ccb_hdl_getcap_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** from the peer. It verifies that all requested streams
** are in the proper state. If so, it initiates sending of
** a start response. Otherwise it sends a start reject.
-**
+**
**
** Returns void.
**
@@ -278,7 +278,7 @@ void avdt_ccb_hdl_start_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** is received from the peer. Using the SEIDs stored in the
** current command message, it sends a start response or start
** reject event to each SCB associated with the command.
-**
+**
**
** Returns void.
**
@@ -316,7 +316,7 @@ void avdt_ccb_hdl_start_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** in the proper state. If so, it initiates sending of a
** suspend response. Otherwise it sends a suspend reject.
-**
+**
**
** Returns void.
**
@@ -351,7 +351,7 @@ void avdt_ccb_hdl_suspend_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** current command message, it sends a suspend response or
** suspend reject event to each SCB associated with the command.
**
-**
+**
**
** Returns void.
**
@@ -388,7 +388,7 @@ void avdt_ccb_hdl_suspend_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** peer. It copies variables needed for the procedure from
** the event to the CCB. It marks the CCB as busy and then
** sends a discover command.
-**
+**
**
** Returns void.
**
@@ -414,7 +414,7 @@ void avdt_ccb_snd_discover_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** Description This function is called to send a discover response to
** the peer. It takes the stream information passed in the
** event and sends a discover response.
-**
+**
**
** Returns void.
**
@@ -433,7 +433,7 @@ void avdt_ccb_snd_discover_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** to the peer. It copies variables needed for the procedure
** from the event to the CCB. It marks the CCB as busy and
** then sends a get capabilities command.
-**
+**
**
** Returns void.
**
@@ -463,7 +463,7 @@ void avdt_ccb_snd_getcap_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** Description This function is called to send a get capabilities response
** to the peer. It takes the stream information passed in the
** event and sends a get capabilities response.
-**
+**
**
** Returns void.
**
@@ -487,7 +487,7 @@ void avdt_ccb_snd_getcap_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** peer. It verifies that all requested streams are in the
** proper state. If so, it sends a start command. Otherwise
** send ourselves back a start reject.
-**
+**
**
** Returns void.
**
@@ -533,7 +533,7 @@ void avdt_ccb_snd_start_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** peer. It takes the stream information passed in the event
** and sends a start response. Then it sends a start event
** to the SCB for each stream.
-**
+**
**
** Returns void.
**
@@ -565,7 +565,7 @@ void avdt_ccb_snd_start_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** proper state. If so, it sends a suspend command.
** Otherwise it calls the callback function for each requested
** stream and sends a suspend confirmation with failure.
-**
+**
**
** Returns void.
**
@@ -611,14 +611,14 @@ void avdt_ccb_snd_suspend_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** peer. It takes the stream information passed in the event
** and sends a suspend response. Then it sends a suspend event
** to the SCB for each stream.
-**
+**
**
** Returns void.
**
*******************************************************************************/
void avdt_ccb_snd_suspend_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
- tAVDT_SCB *p_scb;
+ tAVDT_SCB *p_scb;
int i;
/* send response message */
@@ -643,7 +643,7 @@ void avdt_ccb_snd_suspend_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** command in the command queue, it frees the command and
** calls the application callback function indicating failure.
** Certain CCB variables are also initialized.
-**
+**
**
** Returns void.
**
@@ -686,9 +686,9 @@ void avdt_ccb_clear_cmds(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** Function avdt_ccb_cmd_fail
**
** Description This function is called when there is a response timeout.
-** The currently pending command is freed and we fake a
+** The currently pending command is freed and we fake a
** reject message back to ourselves.
-**
+**
**
** Returns void.
**
@@ -705,7 +705,7 @@ void avdt_ccb_cmd_fail(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
msg.hdr.err_code = p_data->err_code;
msg.hdr.err_param = 0;
msg.hdr.ccb_idx = avdt_ccb_to_idx(p_ccb);
-
+
/* pretend that we received a rej message */
evt = avdt_msg_rej_2_evt[p_ccb->p_curr_cmd->event - 1];
@@ -722,7 +722,7 @@ void avdt_ccb_cmd_fail(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
avdt_scb_event(p_scb, evt, (tAVDT_SCB_EVT *) &msg);
}
}
-
+
GKI_freebuf(p_ccb->p_curr_cmd);
p_ccb->p_curr_cmd = NULL;
}
@@ -734,7 +734,7 @@ void avdt_ccb_cmd_fail(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
**
** Description This function is called when a response is received for a
** currently pending command. The command is freed.
-**
+**
**
** Returns void.
**
@@ -754,7 +754,7 @@ void avdt_ccb_free_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
**
** Description This function is called to set the congestion state for
** the CCB.
-**
+**
**
** Returns void.
**
@@ -772,7 +772,7 @@ void avdt_ccb_cong_state(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** pending command. The retransmission count is incremented.
** If the count reaches the maximum number of retransmissions,
** the event is treated as a response timeout.
-**
+**
**
** Returns void.
**
@@ -805,7 +805,7 @@ void avdt_ccb_ret_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
avdt_msg_send(p_ccb, p_msg);
}
}
-
+
/* restart timer */
btu_start_timer(&p_ccb->timer_entry, BTU_TTYPE_AVDT_CCB_RET, avdt_cb.rcb.ret_tout);
}
@@ -817,7 +817,7 @@ void avdt_ccb_ret_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
**
** Description This function is called the send the next command,
** if any, in the command queue.
-**
+**
**
** Returns void.
**
@@ -848,8 +848,8 @@ void avdt_ccb_snd_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
**
** Function avdt_ccb_snd_msg
**
-** Description
-**
+** Description
+**
**
** Returns void.
**
@@ -878,7 +878,7 @@ void avdt_ccb_snd_msg(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
}
}
}
-
+
/* do we have commands to send? send next command */
avdt_ccb_snd_cmd(p_ccb, NULL);
}
@@ -891,7 +891,7 @@ void avdt_ccb_snd_msg(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** Description This function is called to enable a reconnect attempt when
** a channel transitions from closing to idle state. It sets
** the reconn variable to TRUE.
-**
+**
**
** Returns void.
**
@@ -906,7 +906,7 @@ void avdt_ccb_set_reconn(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** Function avdt_ccb_clr_reconn
**
** Description This function is called to clear the reconn variable.
-**
+**
**
** Returns void.
**
@@ -923,7 +923,7 @@ void avdt_ccb_clr_reconn(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** Description This function is called to check if a reconnect attempt
** is enabled. If enabled, it sends an AVDT_CCB_UL_OPEN_EVT
** to the CCB. If disabled, the CCB is deallocated.
-**
+**
**
** Returns void.
**
@@ -957,7 +957,7 @@ void avdt_ccb_chk_reconn(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
**
** Description This function stops the CCB timer if the idle timer is
** running.
-**
+**
**
** Returns void.
**
@@ -975,7 +975,7 @@ void avdt_ccb_chk_timer(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** Function avdt_ccb_set_conn
**
** Description Set CCB variables associated with AVDT_ConnectReq().
-**
+**
**
** Returns void.
**
@@ -995,7 +995,7 @@ void avdt_ccb_set_conn(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** Function avdt_ccb_set_disconn
**
** Description Set CCB variables associated with AVDT_DisconnectReq().
-**
+**
**
** Returns void.
**
@@ -1016,7 +1016,7 @@ void avdt_ccb_set_disconn(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** Function avdt_ccb_do_disconn
**
** Description Do action associated with AVDT_DisconnectReq().
-**
+**
**
** Returns void.
**
@@ -1035,7 +1035,7 @@ void avdt_ccb_do_disconn(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** Function avdt_ccb_ll_closed
**
** Description Clear commands from and deallocate CCB.
-**
+**
**
** Returns void.
**
@@ -1063,7 +1063,7 @@ void avdt_ccb_ll_closed(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
avdt_ctrl.hdr.err_code = 0;
(*p_cback)(0, bd_addr, AVDT_DISCONNECT_IND_EVT, &avdt_ctrl);
- }
+ }
}
/*******************************************************************************
@@ -1071,7 +1071,7 @@ void avdt_ccb_ll_closed(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** Function avdt_ccb_ll_opened
**
** Description Call callback on open.
-**
+**
**
** Returns void.
**
@@ -1081,7 +1081,7 @@ void avdt_ccb_ll_opened(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
tAVDT_CTRL avdt_ctrl;
p_ccb->ll_opened = TRUE;
-
+
if (!p_ccb->p_conn_cback)
p_ccb->p_conn_cback = avdt_cb.p_conn_cback;
@@ -1091,5 +1091,5 @@ void avdt_ccb_ll_opened(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
avdt_ctrl.hdr.err_code = 0;
avdt_ctrl.hdr.err_param = p_data->msg.hdr.err_param;
(*p_ccb->p_conn_cback)(0, p_ccb->peer_addr, AVDT_CONNECT_IND_EVT, &avdt_ctrl);
- }
+ }
}
diff --git a/stack/avdt/avdt_defs.h b/stack/avdt/avdt_defs.h
index 283e7f8..4f67853 100644
--- a/stack/avdt/avdt_defs.h
+++ b/stack/avdt/avdt_defs.h
@@ -5,7 +5,7 @@
** Description: This contains constants definitions and other information
** from the AVDTP specification. This file is intended for
** use internal to AVDT only.
-**
+**
**
** Copyright (c) 2002-2010, Broadcom Corp., All Rights Reserved.
** Broadcom Bluetooth Core. Proprietary and confidential.
@@ -165,7 +165,7 @@
#define AVDT_MSG_PRS_M_PT(p, m_pt, marker) \
marker = *(p) >> 7; \
m_pt = *(p)++ & 0x7F;
-
+
#define AVDT_MSG_BLD_HDR(p, lbl, pkt, msg) \
*(p)++ = (UINT8) ((lbl) << 4) | ((pkt) << 2) | (msg);
@@ -187,6 +187,6 @@
#define AVDT_MSG_BLD_NOSP(p, nosp) \
*(p)++ = (UINT8) (nosp);
-
+
#endif /* AVDT_DEFS_H */
diff --git a/stack/avdt/avdt_l2c.c b/stack/avdt/avdt_l2c.c
index 6dec38d..ecab37d 100644
--- a/stack/avdt/avdt_l2c.c
+++ b/stack/avdt/avdt_l2c.c
@@ -50,8 +50,8 @@ const tL2CAP_APPL_INFO avdt_l2c_appl = {
**
** Function avdt_sec_check_complete_term
**
-** Description The function called when Security Manager finishes
-** verification of the service side connection
+** Description The function called when Security Manager finishes
+** verification of the service side connection
**
** Returns void
**
@@ -70,7 +70,7 @@ static void avdt_sec_check_complete_term (BD_ADDR bd_addr, void *p_ref_data, UIN
}
p_ccb = avdt_ccb_by_bd(bd_addr);
-
+
p_tbl = avdt_ad_tc_tbl_by_st(AVDT_CHAN_SIG, p_ccb, AVDT_AD_ST_SEC_ACP);
if (p_tbl == NULL)
return;
@@ -78,7 +78,7 @@ static void avdt_sec_check_complete_term (BD_ADDR bd_addr, void *p_ref_data, UIN
if (res == BTM_SUCCESS)
{
/* Send response to the L2CAP layer. */
- L2CA_ConnectRsp (bd_addr, p_tbl->id, p_tbl->lcid, L2CAP_CONN_OK, L2CAP_CONN_OK);
+ L2CA_ConnectRsp (bd_addr, p_tbl->id, p_tbl->lcid, L2CAP_CONN_OK, L2CAP_CONN_OK);
/* store idx in LCID table, store LCID in routing table */
avdt_cb.ad.lcid_tbl[p_tbl->lcid - L2CAP_BASE_APPL_CID] = avdt_ad_tc_tbl_to_idx(p_tbl);
@@ -97,7 +97,7 @@ static void avdt_sec_check_complete_term (BD_ADDR bd_addr, void *p_ref_data, UIN
}
else
{
- L2CA_ConnectRsp (bd_addr, p_tbl->id, p_tbl->lcid, L2CAP_CONN_SECURITY_BLOCK, L2CAP_CONN_OK);
+ L2CA_ConnectRsp (bd_addr, p_tbl->id, p_tbl->lcid, L2CAP_CONN_SECURITY_BLOCK, L2CAP_CONN_OK);
avdt_ad_tc_close_ind(p_tbl, L2CAP_CONN_SECURITY_BLOCK);
}
}
@@ -106,8 +106,8 @@ static void avdt_sec_check_complete_term (BD_ADDR bd_addr, void *p_ref_data, UIN
**
** Function avdt_sec_check_complete_orig
**
-** Description The function called when Security Manager finishes
-** verification of the service side connection
+** Description The function called when Security Manager finishes
+** verification of the service side connection
**
** Returns void
**
@@ -149,7 +149,7 @@ static void avdt_sec_check_complete_orig (BD_ADDR bd_addr, void *p_ref_data, UIN
** Function avdt_l2c_connect_ind_cback
**
** Description This is the L2CAP connect indication callback function.
-**
+**
**
** Returns void
**
@@ -184,13 +184,13 @@ void avdt_l2c_connect_ind_cback(BD_ADDR bd_addr, UINT16 lcid, UINT16 psm, UINT8
p_tbl->cfg_flags = AVDT_L2C_CFG_CONN_ACP;
/* Check the security */
- rc = btm_sec_mx_access_request (bd_addr, AVDT_PSM,
- FALSE, BTM_SEC_PROTO_AVDT,
+ rc = btm_sec_mx_access_request (bd_addr, AVDT_PSM,
+ FALSE, BTM_SEC_PROTO_AVDT,
AVDT_CHAN_SIG,
&avdt_sec_check_complete_term, NULL);
if(rc == BTM_CMD_STARTED)
{
- L2CA_ConnectRsp (p_ccb->peer_addr, p_tbl->id, lcid, L2CAP_CONN_PENDING, L2CAP_CONN_OK);
+ L2CA_ConnectRsp (p_ccb->peer_addr, p_tbl->id, lcid, L2CAP_CONN_PENDING, L2CAP_CONN_OK);
}
return;
}
@@ -226,7 +226,7 @@ void avdt_l2c_connect_ind_cback(BD_ADDR bd_addr, UINT16 lcid, UINT16 psm, UINT8
}
/* Send L2CAP connect rsp */
- L2CA_ConnectRsp(bd_addr, id, lcid, result, 0);
+ L2CA_ConnectRsp(bd_addr, id, lcid, result, 0);
/* if result ok, proceed with connection */
if (result == L2CAP_CONN_OK)
@@ -253,7 +253,7 @@ void avdt_l2c_connect_ind_cback(BD_ADDR bd_addr, UINT16 lcid, UINT16 psm, UINT8
** Function avdt_l2c_connect_cfm_cback
**
** Description This is the L2CAP connect confirm callback function.
-**
+**
**
** Returns void
**
@@ -303,8 +303,8 @@ void avdt_l2c_connect_cfm_cback(UINT16 lcid, UINT16 result)
p_tbl->cfg_flags = AVDT_L2C_CFG_CONN_INT;
/* Check the security */
- btm_sec_mx_access_request (p_ccb->peer_addr, AVDT_PSM,
- TRUE, BTM_SEC_PROTO_AVDT,
+ btm_sec_mx_access_request (p_ccb->peer_addr, AVDT_PSM,
+ TRUE, BTM_SEC_PROTO_AVDT,
AVDT_CHAN_SIG,
&avdt_sec_check_complete_orig, NULL);
}
@@ -325,7 +325,7 @@ void avdt_l2c_connect_cfm_cback(UINT16 lcid, UINT16 result)
** Function avdt_l2c_config_cfm_cback
**
** Description This is the L2CAP config confirm callback function.
-**
+**
**
** Returns void
**
@@ -367,7 +367,7 @@ void avdt_l2c_config_cfm_cback(UINT16 lcid, tL2CAP_CFG_INFO *p_cfg)
** Function avdt_l2c_config_ind_cback
**
** Description This is the L2CAP config indication callback function.
-**
+**
**
** Returns void
**
@@ -415,7 +415,7 @@ void avdt_l2c_config_ind_cback(UINT16 lcid, tL2CAP_CFG_INFO *p_cfg)
** Function avdt_l2c_disconnect_ind_cback
**
** Description This is the L2CAP disconnect indication callback function.
-**
+**
**
** Returns void
**
@@ -434,7 +434,7 @@ void avdt_l2c_disconnect_ind_cback(UINT16 lcid, BOOLEAN ack_needed)
/* send L2CAP disconnect response */
L2CA_DisconnectRsp(lcid);
}
-
+
avdt_ad_tc_close_ind(p_tbl, 0);
}
}
@@ -444,7 +444,7 @@ void avdt_l2c_disconnect_ind_cback(UINT16 lcid, BOOLEAN ack_needed)
** Function avdt_l2c_disconnect_cfm_cback
**
** Description This is the L2CAP disconnect confirm callback function.
-**
+**
**
** Returns void
**
@@ -457,7 +457,7 @@ void avdt_l2c_disconnect_cfm_cback(UINT16 lcid, UINT16 result)
lcid, result);
/* look up info for this channel */
if ((p_tbl = avdt_ad_tc_tbl_by_lcid(lcid)) != NULL)
- {
+ {
avdt_ad_tc_close_ind(p_tbl, result);
}
}
@@ -467,7 +467,7 @@ void avdt_l2c_disconnect_cfm_cback(UINT16 lcid, UINT16 result)
** Function avdt_l2c_congestion_ind_cback
**
** Description This is the L2CAP congestion indication callback function.
-**
+**
**
** Returns void
**
@@ -488,7 +488,7 @@ void avdt_l2c_congestion_ind_cback(UINT16 lcid, BOOLEAN is_congested)
** Function avdt_l2c_data_ind_cback
**
** Description This is the L2CAP data indication callback function.
-**
+**
**
** Returns void
**
diff --git a/stack/avdt/avdt_msg.c b/stack/avdt/avdt_msg.c
index 3242407..35066f9 100644
--- a/stack/avdt/avdt_msg.c
+++ b/stack/avdt/avdt_msg.c
@@ -138,7 +138,7 @@ const tAVDT_MSG_BLD avdt_msg_bld_cmd[] = {
avdt_msg_bld_single, /* abort */
avdt_msg_bld_security_cmd, /* security control */
avdt_msg_bld_single, /* get all capabilities */
- avdt_msg_bld_delay_rpt /* delay report */
+ avdt_msg_bld_delay_rpt /* delay report */
};
/* function table for building response messages */
@@ -249,7 +249,7 @@ const UINT8 avdt_msg_rej_2_evt[] = {
**
** Description This function builds the configuration parameters contained
** in a command or response message.
-**
+**
**
** Returns void.
**
@@ -280,22 +280,22 @@ static void avdt_msg_bld_cfg(UINT8 **p, tAVDT_CFG *p_cfg)
if (p_cfg->num_codec != 0)
{
*(*p)++ = AVDT_CAT_CODEC;
- len = p_cfg->codec_info[0] + 1;
- if( len > AVDT_CODEC_SIZE )
+ len = p_cfg->codec_info[0] + 1;
+ if( len > AVDT_CODEC_SIZE )
len = AVDT_CODEC_SIZE;
memcpy(*p, p_cfg->codec_info, len);
*p += len;
}
-
+
/* content protection */
if (p_cfg->num_protect != 0)
- {
+ {
*(*p)++ = AVDT_CAT_PROTECT;
- len = p_cfg->protect_info[0] + 1;
+ len = p_cfg->protect_info[0] + 1;
if( len > AVDT_PROTECT_SIZE )
len = AVDT_PROTECT_SIZE;
-
+
memcpy(*p, p_cfg->protect_info, len);
*p += len;
}
@@ -354,7 +354,7 @@ static void avdt_msg_bld_cfg(UINT8 **p, tAVDT_CFG *p_cfg)
** Function avdt_msg_bld_none
**
** Description This message building function builds an empty message.
-**
+**
**
** Returns void.
**
@@ -370,7 +370,7 @@ static void avdt_msg_bld_none(UINT8 **p, tAVDT_MSG *p_msg)
**
** Description This message building function builds a message containing
** a single SEID.
-**
+**
**
** Returns void.
**
@@ -386,7 +386,7 @@ static void avdt_msg_bld_single(UINT8 **p, tAVDT_MSG *p_msg)
**
** Description This message building function builds a set configuration
** command message.
-**
+**
**
** Returns void.
**
@@ -404,7 +404,7 @@ static void avdt_msg_bld_setconfig_cmd(UINT8 **p, tAVDT_MSG *p_msg)
**
** Description This message building function builds a reconfiguration
** command message.
-**
+**
**
** Returns void.
**
@@ -424,7 +424,7 @@ static void avdt_msg_bld_reconfig_cmd(UINT8 **p, tAVDT_MSG *p_msg)
**
** Description This message building function builds a message containing
** multiple SEID's.
-**
+**
**
** Returns void.
**
@@ -445,7 +445,7 @@ static void avdt_msg_bld_multi(UINT8 **p, tAVDT_MSG *p_msg)
**
** Description This message building function builds a security
** command message.
-**
+**
** Returns void.
**
*******************************************************************************/
@@ -478,7 +478,7 @@ static void avdt_msg_bld_delay_rpt(UINT8 **p, tAVDT_MSG *p_msg)
**
** Description This message building function builds a discover
** response message.
-**
+**
**
** Returns void.
**
@@ -503,7 +503,7 @@ static void avdt_msg_bld_discover_rsp(UINT8 **p, tAVDT_MSG *p_msg)
**
** Description This message building function builds a message containing
** service capabilities parameters.
-**
+**
**
** Returns void.
**
@@ -524,7 +524,7 @@ static void avdt_msg_bld_svccap(UINT8 **p, tAVDT_MSG *p_msg)
**
** Description This message building function builds a message containing
** service capabilities parameters.
-**
+**
**
** Returns void.
**
@@ -540,7 +540,7 @@ static void avdt_msg_bld_all_svccap(UINT8 **p, tAVDT_MSG *p_msg)
**
** Description This message building function builds a security
** response message.
-**
+**
**
** Returns void.
**
@@ -557,9 +557,9 @@ static void avdt_msg_bld_security_rsp(UINT8 **p, tAVDT_MSG *p_msg)
**
** Description This message parsing function parses the configuration
** parameters field of a message.
+**
**
-**
-** Returns Error code or zero if no error, and element that failed
+** Returns Error code or zero if no error, and element that failed
** in p_elem.
**
*******************************************************************************/
@@ -622,7 +622,7 @@ static UINT8 avdt_msg_prs_cfg(tAVDT_CFG *p_cfg, UINT8 *p, UINT16 len, UINT8* p_e
continue;
}
}
-
+
if ((elem_len > avdt_msg_ie_len_max[elem]) ||
(elem_len < avdt_msg_ie_len_min[elem]))
{
@@ -675,8 +675,8 @@ static UINT8 avdt_msg_prs_cfg(tAVDT_CFG *p_cfg, UINT8 *p, UINT16 len, UINT8* p_e
case AVDT_CAT_MUX:
/* verify length */
AVDT_TRACE_WARNING2("psc_mask=0x%x elem_len=%d", p_cfg->psc_mask, elem_len);
- if( ((0 == (p_cfg->psc_mask & (AVDT_PSC_RECOV|AVDT_PSC_REPORT))) && (elem_len != 3))
- || ((p_cfg->psc_mask & AVDT_PSC_RECOV) && (elem_len != 7))
+ if( ((0 == (p_cfg->psc_mask & (AVDT_PSC_RECOV|AVDT_PSC_REPORT))) && (elem_len != 3))
+ || ((p_cfg->psc_mask & AVDT_PSC_RECOV) && (elem_len != 7))
|| ((p_cfg->psc_mask & AVDT_PSC_REPORT) && (elem_len != 5)) )
{
err = AVDT_ERR_MUX_FMT;
@@ -752,7 +752,7 @@ static UINT8 avdt_msg_prs_cfg(tAVDT_CFG *p_cfg, UINT8 *p, UINT16 len, UINT8* p_e
**
** Description This message parsing function parses a message with no parameters.
-**
+**
**
** Returns Error code or zero if no error.
**
@@ -768,7 +768,7 @@ static UINT8 avdt_msg_prs_none(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
**
** Description This message parsing function parses a message with a
** single SEID.
-**
+**
**
** Returns Error code or zero if no error.
**
@@ -800,7 +800,7 @@ static UINT8 avdt_msg_prs_single(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
**
** Description This message parsing function parses a set configuration
** command message.
-**
+**
**
** Returns Error code or zero if no error.
**
@@ -808,7 +808,7 @@ static UINT8 avdt_msg_prs_single(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
static UINT8 avdt_msg_prs_setconfig_cmd(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
{
UINT8 err = 0;
-
+
p_msg->hdr.err_param = 0;
/* verify len */
@@ -817,7 +817,7 @@ static UINT8 avdt_msg_prs_setconfig_cmd(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
err = AVDT_ERR_LENGTH;
}
else
- {
+ {
/* get seids */
AVDT_MSG_PRS_SEID(p, p_msg->config_cmd.hdr.seid);
if (avdt_scb_by_hdl(p_msg->config_cmd.hdr.seid) == NULL)
@@ -859,7 +859,7 @@ static UINT8 avdt_msg_prs_setconfig_cmd(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
**
** Description This message parsing function parses a reconfiguration
** command message.
-**
+**
**
** Returns Error code or zero if no error.
**
@@ -867,7 +867,7 @@ static UINT8 avdt_msg_prs_setconfig_cmd(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
static UINT8 avdt_msg_prs_reconfig_cmd(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
{
UINT8 err = 0;
-
+
p_msg->hdr.err_param = 0;
/* verify len */
@@ -876,7 +876,7 @@ static UINT8 avdt_msg_prs_reconfig_cmd(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
err = AVDT_ERR_LENGTH;
}
else
- {
+ {
/* get seid */
AVDT_MSG_PRS_SEID(p, p_msg->reconfig_cmd.hdr.seid);
if (avdt_scb_by_hdl(p_msg->reconfig_cmd.hdr.seid) == NULL)
@@ -910,7 +910,7 @@ static UINT8 avdt_msg_prs_reconfig_cmd(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
**
** Description This message parsing function parses a message containing
** multiple SEID's.
-**
+**
**
** Returns Error code or zero if no error.
**
@@ -952,7 +952,7 @@ static UINT8 avdt_msg_prs_multi(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
**
** Description This message parsing function parses a security
** command message.
-**
+**
**
** Returns Error code or zero if no error.
**
@@ -989,7 +989,7 @@ static UINT8 avdt_msg_prs_security_cmd(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
**
** Description This message parsing function parses a discover
** response message.
-**
+**
**
** Returns Error code or zero if no error.
**
@@ -1034,7 +1034,7 @@ static UINT8 avdt_msg_prs_discover_rsp(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
**
** Description This message parsing function parses a message containing
** service capabilities parameters.
-**
+**
**
** Returns Error code or zero if no error.
**
@@ -1057,7 +1057,7 @@ static UINT8 avdt_msg_prs_svccap(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
**
** Description This message parsing function parses a message containing
** service capabilities parameters.
-**
+**
**
** Returns Error code or zero if no error.
**
@@ -1078,7 +1078,7 @@ static UINT8 avdt_msg_prs_all_svccap(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
**
** Description This message parsing function parsing a security
** response message.
-**
+**
**
** Returns Error code or zero if no error.
**
@@ -1095,8 +1095,8 @@ static UINT8 avdt_msg_prs_security_rsp(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
**
** Function avdt_msg_prs_rej
**
-** Description
-**
+** Description
+**
**
** Returns Error code or zero if no error.
**
@@ -1117,7 +1117,7 @@ static UINT8 avdt_msg_prs_rej(tAVDT_MSG *p_msg, UINT8 *p, UINT8 sig)
{
p_msg->hdr.err_code = *p;
}
-
+
return 0;
}
@@ -1127,7 +1127,7 @@ static UINT8 avdt_msg_prs_rej(tAVDT_MSG *p_msg, UINT8 *p, UINT8 sig)
**
** Description This message parsing function parses a security
** command message.
-**
+**
**
** Returns Error code or zero if no error.
**
@@ -1166,7 +1166,7 @@ static UINT8 avdt_msg_prs_delay_rpt (tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
** Function avdt_msg_send
**
** Description Send, and if necessary fragment the next message.
-**
+**
**
** Returns Congested state; TRUE if CCB congested, FALSE if not.
**
@@ -1183,7 +1183,7 @@ BOOLEAN avdt_msg_send(tAVDT_CCB *p_ccb, BT_HDR *p_msg)
UINT8 msg;
UINT8 sig;
UINT8 nosp = 0; /* number of subsequent packets */
-
+
/* look up transport channel table entry to get peer mtu */
p_tbl = avdt_ad_tc_tbl_by_type(AVDT_CHAN_SIG, p_ccb, NULL);
@@ -1325,7 +1325,7 @@ BOOLEAN avdt_msg_send(tAVDT_CCB *p_ccb, BT_HDR *p_msg)
** Function avdt_msg_asmbl
**
** Description Reassemble incoming message.
-**
+**
**
** Returns Pointer to reassembled message; NULL if no message
** available.
@@ -1447,7 +1447,7 @@ BT_HDR *avdt_msg_asmbl(tAVDT_CCB *p_ccb, BT_HDR *p_buf)
** from the AVDTP command pool, executes the message building
** function for this message type. It then queues the message
** in the command queue for this CCB.
-**
+**
**
** Returns Nothing.
**
@@ -1516,7 +1516,7 @@ void avdt_msg_send_cmd(tAVDT_CCB *p_ccb, void *p_scb, UINT8 sig_id, tAVDT_MSG *p
** from the AVDTP command pool, executes the message building
** function for this message type. It then queues the message
** in the response queue for this CCB.
-**
+**
**
** Returns Nothing.
**
@@ -1561,7 +1561,7 @@ void avdt_msg_send_rsp(tAVDT_CCB *p_ccb, UINT8 sig_id, tAVDT_MSG *p_params)
** message based on the message type and the error code.
** It then queues the message in the response queue for
** this CCB.
-**
+**
**
** Returns Nothing.
**
@@ -1579,7 +1579,7 @@ void avdt_msg_send_rej(tAVDT_CCB *p_ccb, UINT8 sig_id, tAVDT_MSG *p_params)
/* set up gki buf pointer and offset */
p_buf->offset = AVDT_MSG_OFFSET;
p_start = p = (UINT8 *)(p_buf + 1) + p_buf->offset;
-
+
/* if sig id included, build into message */
if (sig_id != AVDT_SIG_NONE)
{
@@ -1622,7 +1622,7 @@ void avdt_msg_send_rej(tAVDT_CCB *p_ccb, UINT8 sig_id, tAVDT_MSG *p_params)
** message based on the message type and the error code.
** It then queues the message in the response queue for
** this CCB.
-**
+**
**
** Returns Nothing.
**
@@ -1640,7 +1640,7 @@ void avdt_msg_send_grej(tAVDT_CCB *p_ccb, UINT8 sig_id, tAVDT_MSG *p_params)
/* set up gki buf pointer and offset */
p_buf->offset = AVDT_MSG_OFFSET;
p_start = p = (UINT8 *)(p_buf + 1) + p_buf->offset;
-
+
/* calculate length */
p_buf->len = (UINT16) (p - p_start);
@@ -1664,7 +1664,7 @@ void avdt_msg_send_grej(tAVDT_CCB *p_ccb, UINT8 sig_id, tAVDT_MSG *p_params)
** incoming message is received on the signaling channel.
** It parses the message and sends an event to the appropriate
** SCB or CCB for the message.
-**
+**
**
** Returns Nothing.
**
@@ -1750,7 +1750,7 @@ void avdt_msg_ind(tAVDT_CCB *p_ccb, BT_HDR *p_buf)
msg.discover_rsp.p_sep_info = (tAVDT_SEP_INFO *) p_ccb->p_proc_data;
msg.discover_rsp.num_seps = p_ccb->proc_param;
}
- else if ((msg_type == AVDT_MSG_TYPE_RSP) &&
+ else if ((msg_type == AVDT_MSG_TYPE_RSP) &&
((sig == AVDT_SIG_GETCAP) || (sig == AVDT_SIG_GET_ALLCAP)))
{
/* parse discover rsp message to struct supplied by app */
@@ -1764,7 +1764,7 @@ void avdt_msg_ind(tAVDT_CCB *p_ccb, BT_HDR *p_buf)
else if ((msg_type == AVDT_MSG_TYPE_CMD) && (sig == AVDT_SIG_SETCONFIG))
{
/* parse config cmd message to struct allocated locally */
- msg.config_cmd.p_cfg = &cfg;
+ msg.config_cmd.p_cfg = &cfg;
}
else if ((msg_type == AVDT_MSG_TYPE_CMD) && (sig == AVDT_SIG_RECONFIG))
{
@@ -1833,7 +1833,7 @@ void avdt_msg_ind(tAVDT_CCB *p_ccb, BT_HDR *p_buf)
}
}
}
-
+
if (ok)
{
/* if it's a ccb event send to ccb */
@@ -1844,7 +1844,7 @@ void avdt_msg_ind(tAVDT_CCB *p_ccb, BT_HDR *p_buf)
/* if it's a scb event */
else
{
- /* Scb events always have a single seid. For cmd, get seid from
+ /* Scb events always have a single seid. For cmd, get seid from
** message. For rej and rsp, get seid from p_curr_cmd.
*/
if (msg_type == AVDT_MSG_TYPE_CMD)
diff --git a/stack/avdt/avdt_scb.c b/stack/avdt/avdt_scb.c
index c43262b..346d1ad 100644
--- a/stack/avdt/avdt_scb.c
+++ b/stack/avdt/avdt_scb.c
@@ -86,7 +86,7 @@ const char * const avdt_scb_evt_str[] = {
"CC_CLOSE_EVT"
};
-#endif
+#endif
/* action function list */
@@ -503,7 +503,7 @@ const tAVDT_SCB_ST_TBL avdt_scb_st_tbl[] = {
** Function avdt_scb_event
**
** Description State machine event handling function for scb
-**
+**
**
** Returns Nothing.
**
@@ -552,7 +552,7 @@ void avdt_scb_event(tAVDT_SCB *p_scb, UINT8 event, tAVDT_SCB_EVT *p_data)
** Function avdt_scb_init
**
** Description Initialize stream control block module.
-**
+**
**
** Returns Nothing.
**
@@ -569,7 +569,7 @@ void avdt_scb_init(void)
** Function avdt_scb_alloc
**
** Description Allocate a stream control block.
-**
+**
**
** Returns pointer to the scb, or NULL if none could be allocated.
**
@@ -608,7 +608,7 @@ tAVDT_SCB *avdt_scb_alloc(tAVDT_CS *p_cs)
break;
}
}
-
+
if (i == AVDT_NUM_SEPS)
{
/* out of ccbs */
@@ -624,7 +624,7 @@ tAVDT_SCB *avdt_scb_alloc(tAVDT_CS *p_cs)
** Function avdt_scb_dealloc
**
** Description Deallocate a stream control block.
-**
+**
**
** Returns void.
**
@@ -652,7 +652,7 @@ void avdt_scb_dealloc(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
** Function avdt_scb_to_hdl
**
** Description Given a pointer to an scb, return its handle (or seid).
-**
+**
**
** Returns Index of scb.
**
@@ -667,7 +667,7 @@ UINT8 avdt_scb_to_hdl(tAVDT_SCB *p_scb)
** Function avdt_scb_by_hdl
**
** Description Given an scb handle (or seid), return a pointer to the scb.
-**
+**
**
** Returns Pointer to scb or NULL if index is out of range or scb
** is not allocated.
@@ -681,7 +681,7 @@ tAVDT_SCB *avdt_scb_by_hdl(UINT8 hdl)
if ((hdl > 0) && (hdl <= AVDT_NUM_SEPS))
{
p_scb = &avdt_cb.scb[hdl - 1];
-
+
/* verify scb is allocated */
if (!p_scb->allocated)
{
@@ -702,7 +702,7 @@ tAVDT_SCB *avdt_scb_by_hdl(UINT8 hdl)
** Function avdt_scb_verify
**
** Description Verify the condition of a list of scbs.
-**
+**
**
** Returns SEID that failed, or 0 if success.
**
@@ -766,7 +766,7 @@ UINT8 avdt_scb_verify(tAVDT_CCB *p_ccb, UINT8 state, UINT8 *p_seid, UINT16 num_s
**
** Description Given a list of SCB handles, return a list of peer SEIDs
** for the handles, copied in place into the struct passed in.
-**
+**
**
** Returns Nothing.
**
diff --git a/stack/avdt/avdt_scb_act.c b/stack/avdt/avdt_scb_act.c
index f117f33..1784713 100644
--- a/stack/avdt/avdt_scb_act.c
+++ b/stack/avdt/avdt_scb_act.c
@@ -25,15 +25,15 @@
** allowing for this table.
*/
const UINT8 avdt_scb_cback_evt[] = {
- 0, /* API_REMOVE_EVT (no event) */
- AVDT_WRITE_CFM_EVT, /* API_WRITE_REQ_EVT */
- 0, /* API_GETCONFIG_REQ_EVT (no event) */
+ 0, /* API_REMOVE_EVT (no event) */
+ AVDT_WRITE_CFM_EVT, /* API_WRITE_REQ_EVT */
+ 0, /* API_GETCONFIG_REQ_EVT (no event) */
0, /* API_DELAY_RPT_REQ_EVT (no event) */
- AVDT_OPEN_CFM_EVT, /* API_SETCONFIG_REQ_EVT */
- AVDT_OPEN_CFM_EVT, /* API_OPEN_REQ_EVT */
- AVDT_CLOSE_CFM_EVT, /* API_CLOSE_REQ_EVT */
- AVDT_RECONFIG_CFM_EVT, /* API_RECONFIG_REQ_EVT */
- AVDT_SECURITY_CFM_EVT, /* API_SECURITY_REQ_EVT */
+ AVDT_OPEN_CFM_EVT, /* API_SETCONFIG_REQ_EVT */
+ AVDT_OPEN_CFM_EVT, /* API_OPEN_REQ_EVT */
+ AVDT_CLOSE_CFM_EVT, /* API_CLOSE_REQ_EVT */
+ AVDT_RECONFIG_CFM_EVT, /* API_RECONFIG_REQ_EVT */
+ AVDT_SECURITY_CFM_EVT, /* API_SECURITY_REQ_EVT */
0 /* API_ABORT_REQ_EVT (no event) */
};
@@ -214,7 +214,7 @@ void avdt_scb_hdl_open_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
**
** Function avdt_scb_hdl_pkt_no_frag
**
-** Description
+** Description
**
** Returns Nothing.
**
@@ -261,7 +261,7 @@ void avdt_scb_hdl_pkt_no_frag(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
/* padding length in last byte of packet */
pad_len = *(p_start + p_data->p_pkt->len);
}
-
+
/* do sanity check */
if ((offset > p_data->p_pkt->len) || ((pad_len + offset) > p_data->p_pkt->len))
{
@@ -285,7 +285,7 @@ void avdt_scb_hdl_pkt_no_frag(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
#if AVDT_MULTIPLEXING == TRUE
if ((p_scb->cs.p_media_cback != NULL)
- && (p_scb->p_media_buf != NULL)
+ && (p_scb->p_media_buf != NULL)
&& (p_scb->media_buf_len > p_data->p_pkt->len))
{
/* media buffer enough length is assigned by application. Lets use it*/
@@ -305,7 +305,7 @@ void avdt_scb_hdl_pkt_no_frag(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
**
** Function avdt_scb_hdl_report
**
-** Description
+** Description
**
** Returns Nothing.
**
@@ -382,7 +382,7 @@ UINT8 * avdt_scb_hdl_report(tAVDT_SCB *p_scb, UINT8 *p, UINT16 len)
**
** Function avdt_scb_hdl_pkt_frag
**
-** Description
+** Description
**
** Returns Nothing.
**
@@ -423,7 +423,7 @@ void avdt_scb_hdl_pkt_frag(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
al_tsid = (*p)>>3;
al_frag = ( (*p) >> 2 ) & 0x01;
al_lcode = (*p++) & AVDT_ALH_LCODE_MASK;
-
+
/* in case of TSID=00000, a second AL header byte, before the length field,
** is expected and contains the actual TSID, aligned with MSB */
if(al_tsid == 0)
@@ -451,8 +451,8 @@ void avdt_scb_hdl_pkt_frag(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
if(frag_len >= al_len)
frag_len = al_len;
- /* check TSID corresponds to config */
- if (al_tsid != p_scb->curr_cfg.mux_tsid_media)
+ /* check TSID corresponds to config */
+ if (al_tsid != p_scb->curr_cfg.mux_tsid_media)
{
#if AVDT_REPORTING == TRUE
if((p_scb->curr_cfg.psc_mask & AVDT_PSC_REPORT) &&
@@ -470,7 +470,7 @@ void avdt_scb_hdl_pkt_frag(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
}
}
/* check are buffer for assembling and related callback set */
- else if ((p_scb->p_media_buf == NULL) || (p_scb->cs.p_media_cback == NULL))
+ else if ((p_scb->p_media_buf == NULL) || (p_scb->cs.p_media_cback == NULL))
{
AVDT_TRACE_WARNING0("NULL p_media_buf or p_media_cback");
break;
@@ -486,19 +486,19 @@ void avdt_scb_hdl_pkt_frag(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
p_scb->frag_off = 0;
p_scb->frag_org_len = al_len; /* total length of original media packet */
/* length check: minimum length of media header is 12 */
- if (p_scb->frag_org_len < 12)
+ if (p_scb->frag_org_len < 12)
{
AVDT_TRACE_WARNING1("bad al_len: %d(<12)", al_len);
break;
}
/* check that data fit into buffer */
- if (al_len > p_scb->media_buf_len)
+ if (al_len > p_scb->media_buf_len)
{
AVDT_TRACE_WARNING2("bad al_len: %d(>%d)", al_len, p_scb->media_buf_len);
break;
}
/* make sure it is the last fragment in l2cap packet */
- if (p + al_len < p_end)
+ if (p + al_len < p_end)
{
AVDT_TRACE_WARNING2("bad al_len: %d(>%d)", al_len, p_scb->media_buf_len);
break;
@@ -513,13 +513,13 @@ void avdt_scb_hdl_pkt_frag(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
if(al_len != p_scb->frag_org_len - p_scb->frag_off)
{
AVDT_TRACE_WARNING4("al_len:%d != (frag_org_len:%d - frag_off:%d) %d",
- al_len, p_scb->frag_org_len, p_scb->frag_off,
+ al_len, p_scb->frag_org_len, p_scb->frag_off,
(p_scb->frag_org_len- p_scb->frag_off));
break;
}
/* do sanity check */
- if (p_scb->frag_off == 0)
+ if (p_scb->frag_off == 0)
{
AVDT_TRACE_WARNING0("frag_off=0");
break;
@@ -532,7 +532,7 @@ void avdt_scb_hdl_pkt_frag(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
p_scb->frag_off, p_scb->frag_org_len, p_scb->media_buf_len);
break;
}
-
+
AVDT_TRACE_DEBUG4("Received fragment org_len=%d off=%d al_len=%d frag_len=%d",
p_scb->frag_org_len, p_scb->frag_off, al_len, frag_len);
@@ -612,7 +612,7 @@ void avdt_scb_hdl_pkt_frag(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
**
** Function avdt_scb_hdl_pkt
**
-** Description
+** Description
**
** Returns Nothing.
**
@@ -629,7 +629,7 @@ void avdt_scb_hdl_pkt(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
avdt_scb_hdl_pkt_frag(p_scb, p_data);
}
- else
+ else
#endif
#if AVDT_REPORTING == TRUE
if(p_data->p_pkt->layer_specific == AVDT_CHAN_REPORT)
@@ -718,7 +718,7 @@ void avdt_scb_hdl_reconfig_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
memcpy(p_scb->curr_cfg.protect_info, p_scb->req_cfg.protect_info, AVDT_PROTECT_SIZE);
}
}
-
+
p_data->msg.svccap.p_cfg = &p_scb->curr_cfg;
/* call application callback */
@@ -861,7 +861,7 @@ void avdt_scb_hdl_setconfig_rej(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
void avdt_scb_hdl_setconfig_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
tAVDT_EVT_HDR single;
-
+
if (p_scb->p_ccb != NULL)
{
/* save configuration */
@@ -950,9 +950,9 @@ void avdt_scb_hdl_suspend_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
** Function avdt_scb_hdl_tc_close
**
** Description This function is called when the transport channel is
-** closed. It marks the SCB as not in use and
-** initializes certain SCB parameters. It then sends
-** an AVDT_CCB_UL_CLOSE_EVT to the CCB if the SCB
+** closed. It marks the SCB as not in use and
+** initializes certain SCB parameters. It then sends
+** an AVDT_CCB_UL_CLOSE_EVT to the CCB if the SCB
** initiated the close. It then checks to see if the SCB
** is to be removed. If it is it deallocates the SCB. Finally,
** it calls the application callback with a close indication.
@@ -1000,7 +1000,7 @@ void avdt_scb_hdl_tc_close(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
if (p_scb->remove)
{
- avdt_scb_dealloc(p_scb, NULL);
+ avdt_scb_dealloc(p_scb, NULL);
}
/* call app callback */
@@ -1122,7 +1122,7 @@ void avdt_scb_hdl_tc_open(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
/* stop transport channel connect timer */
btu_stop_timer(&p_scb->timer_entry);
-
+
event = (p_scb->role == AVDT_OPEN_INT) ? AVDT_OPEN_CFM_EVT : AVDT_OPEN_IND_EVT;
p_data->open.hdr.err_code = 0;
@@ -1330,7 +1330,7 @@ void avdt_scb_snd_abort_req(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
tAVDT_EVT_HDR hdr;
if (p_scb->p_ccb != NULL)
- {
+ {
p_scb->role = AVDT_CLOSE_INT;
hdr.seid = p_scb->peer_seid;
@@ -1493,7 +1493,7 @@ void avdt_scb_snd_open_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
/* send response */
avdt_msg_send_rsp(p_scb->p_ccb, AVDT_SIG_OPEN, &p_data->msg);
-
+
/* start tc connect timer */
btu_start_timer(&p_scb->timer_entry, BTU_TTYPE_AVDT_SCB_TC, AVDT_SCB_TC_CONN_TOUT);
}
@@ -1548,7 +1548,7 @@ void avdt_scb_snd_reconfig_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
/* send reject */
avdt_msg_send_rej(p_scb->p_ccb, AVDT_SIG_RECONFIG, &p_data->msg);
- }
+ }
}
/*******************************************************************************
diff --git a/stack/avrc/avrc_api.c b/stack/avrc/avrc_api.c
index e2ffd45..94425af 100644
--- a/stack/avrc/avrc_api.c
+++ b/stack/avrc/avrc_api.c
@@ -22,7 +22,7 @@
#define AVRC_MAX_RCV_CTRL_EVT AVCT_BROWSE_UNCONG_IND_EVT
-static const UINT8 avrc_ctrl_event_map[] =
+static const UINT8 avrc_ctrl_event_map[] =
{
AVRC_OPEN_IND_EVT, /* AVCT_CONNECT_CFM_EVT */
AVRC_OPEN_IND_EVT, /* AVCT_CONNECT_IND_EVT */
@@ -30,8 +30,8 @@ static const UINT8 avrc_ctrl_event_map[] =
AVRC_CLOSE_IND_EVT, /* AVCT_DISCONNECT_IND_EVT */
AVRC_CONG_IND_EVT, /* AVCT_CONG_IND_EVT */
AVRC_UNCONG_IND_EVT,/* AVCT_UNCONG_IND_EVT */
- AVRC_BROWSE_OPEN_IND_EVT, /* AVCT_BROWSE_CONN_CFM_EVT */
- AVRC_BROWSE_OPEN_IND_EVT, /* AVCT_BROWSE_CONN_IND_EVT */
+ AVRC_BROWSE_OPEN_IND_EVT, /* AVCT_BROWSE_CONN_CFM_EVT */
+ AVRC_BROWSE_OPEN_IND_EVT, /* AVCT_BROWSE_CONN_IND_EVT */
AVRC_BROWSE_CLOSE_IND_EVT, /* AVCT_BROWSE_DISCONN_CFM_EVT */
AVRC_BROWSE_CLOSE_IND_EVT, /* AVCT_BROWSE_DISCONN_IND_EVT */
AVRC_BROWSE_CONG_IND_EVT, /* AVCT_BROWSE_CONG_IND_EVT */
@@ -262,7 +262,7 @@ static void avrc_msg_cback(UINT8 handle, UINT8 label, UINT8 cr,
msg.pass.state = FALSE;
p_data++;
msg.pass.pass_len = *p_data++;
- if (msg.pass.pass_len != p_pkt->len - 5)
+ if (msg.pass.pass_len != p_pkt->len - 5)
msg.pass.pass_len = p_pkt->len - 5;
if (msg.pass.pass_len)
msg.pass.p_pass_data = p_data;
@@ -389,13 +389,13 @@ static BT_HDR * avrc_pass_msg(tAVRC_MSG_PASS *p_msg)
**
** Function AVRC_Open
**
-** Description This function is called to open a connection to AVCTP.
+** Description This function is called to open a connection to AVCTP.
** The connection can be either an initiator or acceptor, as
-** determined by the p_ccb->stream parameter.
+** determined by the p_ccb->stream parameter.
** The connection can be a target, a controller or for both role,
-** as determined by the p_ccb->control parameter.
+** as determined by the p_ccb->control parameter.
** By definition, a target connection is an acceptor connection
-** that waits for an incoming AVCTP connection from the peer.
+** that waits for an incoming AVCTP connection from the peer.
** The connection remains available to the application until
** the application closes it by calling AVRC_Close(). The
** application does not need to reopen the connection after an
@@ -407,7 +407,7 @@ static BT_HDR * avrc_pass_msg(tAVRC_MSG_PASS *p_msg)
** p_ccb->p_ctrl_cback: Pointer to control callback function.
**
** p_ccb->p_msg_cback: Pointer to message callback function.
-**
+**
** p_ccb->conn: AVCTP connection role. This is set to
** AVCTP_INT for initiator connections and AVCTP_ACP
** for acceptor connections.
@@ -422,7 +422,7 @@ static BT_HDR * avrc_pass_msg(tAVRC_MSG_PASS *p_msg)
** connections it can be set to NULL.
**
** Output Parameters:
-** p_handle: Pointer to handle. This parameter is only
+** p_handle: Pointer to handle. This parameter is only
** valid if AVRC_SUCCESS is returned.
**
** Returns AVRC_SUCCESS if successful.
@@ -482,10 +482,10 @@ UINT16 AVRC_Close(UINT8 handle)
**
** Description This function is used to send the AVRCP byte stream in p_pkt
** down to AVCTP.
-**
+**
** It is expected that p_pkt->offset is at least AVCT_MSG_OFFSET
** p_pkt->layer_specific is AVCT_DATA_CTRL or AVCT_DATA_BROWSE
-** p_pkt->event is AVRC_OP_VENDOR, AVRC_OP_PASS_THRU or AVRC_OP_BROWSE
+** p_pkt->event is AVRC_OP_VENDOR, AVRC_OP_PASS_THRU or AVRC_OP_BROWSE
** The above BT_HDR settings are set by the AVRC_Bld* functions.
**
** Returns AVRC_SUCCESS if successful.
@@ -512,7 +512,7 @@ UINT16 AVRC_MsgReq (UINT8 handle, UINT8 label, UINT8 ctype, BT_HDR *p_pkt)
**
** label: Transaction label.
**
-** p_msg: Pointer to PASS THROUGH message structure.
+** p_msg: Pointer to PASS THROUGH message structure.
**
** Output Parameters:
** None.
@@ -540,7 +540,7 @@ UINT16 AVRC_PassCmd(UINT8 handle, UINT8 label, tAVRC_MSG_PASS *p_msg)
** Function AVRC_PassRsp
**
** Description Send a PASS THROUGH response to the peer device. This
-** function can only be called for target role connections.
+** function can only be called for target role connections.
** This function must be called when a PASS THROUGH command
** message is received from the peer through the
** tAVRC_MSG_CBACK callback function.
diff --git a/stack/avrc/avrc_int.h b/stack/avrc/avrc_int.h
index ee8f1f8..a2a4073 100644
--- a/stack/avrc/avrc_int.h
+++ b/stack/avrc/avrc_int.h
@@ -17,8 +17,8 @@
#include "avrc_api.h"
/* DEBUG FLAGS
- *
- * #define META_DEBUG_ENABLED
+ *
+ * #define META_DEBUG_ENABLED
*/
/*****************************************************************************
** Constants
diff --git a/stack/avrc/avrc_sdp.c b/stack/avrc/avrc_sdp.c
index d856b4e..c9ad935 100644
--- a/stack/avrc/avrc_sdp.c
+++ b/stack/avrc/avrc_sdp.c
@@ -22,7 +22,7 @@ tAVRC_CB avrc_cb;
#endif
/* update AVRC_NUM_PROTO_ELEMS if this constant is changed */
-const tSDP_PROTOCOL_ELEM avrc_proto_list [] =
+const tSDP_PROTOCOL_ELEM avrc_proto_list [] =
{
{UUID_PROTOCOL_L2CAP, 1, {AVCT_PSM, 0} },
{UUID_PROTOCOL_AVCTP, 1, {AVCT_REV_1_0, 0} }
@@ -65,7 +65,7 @@ static void avrc_sdp_cback(UINT16 status)
** Description This function is called by the application to perform service
** discovery and retrieve AVRCP SDP record information from a
** peer device. Information is returned for the first service
-** record found on the server that matches the service UUID.
+** record found on the server that matches the service UUID.
** The callback function will be executed when service discovery
** is complete. There can only be one outstanding call to
** AVRC_FindService() at a time; the application must wait for
@@ -83,7 +83,7 @@ static void avrc_sdp_cback(UINT16 status)
** bd_addr: BD address of the peer device.
**
** p_db: SDP discovery database parameters.
-**
+**
** p_cback: Pointer to the callback function.
**
** Output Parameters:
@@ -113,7 +113,7 @@ UINT16 AVRC_FindService(UINT16 service_uuid, BD_ADDR bd_addr,
return AVRC_BAD_PARAM;
/* check if it is busy */
- if( avrc_cb.service_uuid == UUID_SERVCLASS_AV_REM_CTRL_TARGET ||
+ if( avrc_cb.service_uuid == UUID_SERVCLASS_AV_REM_CTRL_TARGET ||
avrc_cb.service_uuid == UUID_SERVCLASS_AV_REMOTE_CONTROL)
return AVRC_NO_RESOURCES;
@@ -149,7 +149,7 @@ UINT16 AVRC_FindService(UINT16 service_uuid, BD_ADDR bd_addr,
** Function AVRC_AddRecord
**
** Description This function is called to build an AVRCP SDP record.
-** Prior to calling this function the application must
+** Prior to calling this function the application must
** call SDP_CreateRecord() to create an SDP record.
**
** Input Parameters:
diff --git a/stack/bnep/bnep_api.c b/stack/bnep/bnep_api.c
index 90dd946..7c4dee9 100644
--- a/stack/bnep/bnep_api.c
+++ b/stack/bnep/bnep_api.c
@@ -46,7 +46,7 @@ void BNEP_Init (void)
** its callbacks with BNEP
**
** Parameters: p_reg_info - contains all callback function pointers
-**
+**
**
** Returns BNEP_SUCCESS if registered successfully
** BNEP_FAILURE if connection state callback is missing
@@ -65,7 +65,7 @@ tBNEP_RESULT BNEP_Register (tBNEP_REGISTER *p_reg_info)
bnep_cb.p_filter_ind_cb = p_reg_info->p_filter_ind_cb;
bnep_cb.p_mfilter_ind_cb = p_reg_info->p_mfilter_ind_cb;
bnep_cb.p_tx_data_flow_cb = p_reg_info->p_tx_data_flow_cb;
-
+
if (bnep_register_with_l2cap ())
return BNEP_SECURITY_FAIL;
@@ -83,7 +83,7 @@ tBNEP_RESULT BNEP_Register (tBNEP_REGISTER *p_reg_info)
** its callbacks.
**
** Parameters: void
-**
+**
**
** Returns void
**
@@ -214,7 +214,7 @@ tBNEP_RESULT BNEP_Connect (BD_ADDR p_rem_bda,
** Function BNEP_ConnectResp
**
** Description This function is called in responce to connection indication
-**
+**
**
** Parameters: handle - handle given in the connection indication
** resp - responce for the connection indication
diff --git a/stack/bnep/bnep_int.h b/stack/bnep/bnep_int.h
index adc5c2b..a849052 100644
--- a/stack/bnep/bnep_int.h
+++ b/stack/bnep/bnep_int.h
@@ -206,9 +206,9 @@ extern void bnepu_release_bcb (tBNEP_CONN *p_bcb);
extern void bnepu_send_peer_our_filters (tBNEP_CONN *p_bcb);
extern void bnepu_send_peer_our_multi_filters (tBNEP_CONN *p_bcb);
extern BOOLEAN bnepu_does_dest_support_prot (tBNEP_CONN *p_bcb, UINT16 protocol);
-extern void bnepu_build_bnep_hdr (tBNEP_CONN *p_bcb, BT_HDR *p_buf, UINT16 protocol,
+extern void bnepu_build_bnep_hdr (tBNEP_CONN *p_bcb, BT_HDR *p_buf, UINT16 protocol,
UINT8 *p_src_addr, UINT8 *p_dest_addr, BOOLEAN ext_bit);
-extern void test_bnepu_build_bnep_hdr (tBNEP_CONN *p_bcb, BT_HDR *p_buf, UINT16 protocol,
+extern void test_bnepu_build_bnep_hdr (tBNEP_CONN *p_bcb, BT_HDR *p_buf, UINT16 protocol,
UINT8 *p_src_addr, UINT8 *p_dest_addr, UINT8 type);
extern tBNEP_CONN *bnepu_get_route_to_dest (UINT8 *p_bda);
diff --git a/stack/bnep/bnep_main.c b/stack/bnep/bnep_main.c
index 2a4933a..fca0d22 100644
--- a/stack/bnep/bnep_main.c
+++ b/stack/bnep/bnep_main.c
@@ -99,7 +99,7 @@ tBNEP_RESULT bnep_register_with_l2cap (void)
**
** Description This function handles an inbound connection indication
** from L2CAP. This is the case where we are acting as a
-** server.
+** server.
**
** Returns void
**
@@ -113,7 +113,7 @@ static void bnep_connect_ind (BD_ADDR bd_addr, UINT16 l2cap_cid, UINT16 psm, UI
if (!(bnep_cb.profile_registered) || (p_bcb)
|| ((p_bcb = bnepu_allocate_bcb(bd_addr)) == NULL))
{
- L2CA_ConnectRsp (bd_addr, l2cap_id, l2cap_cid, L2CAP_CONN_NO_PSM, 0);
+ L2CA_ConnectRsp (bd_addr, l2cap_id, l2cap_cid, L2CAP_CONN_NO_PSM, 0);
return;
}
@@ -124,7 +124,7 @@ static void bnep_connect_ind (BD_ADDR bd_addr, UINT16 l2cap_cid, UINT16 psm, UI
p_bcb->l2cap_cid = l2cap_cid;
/* Send response to the L2CAP layer. */
- L2CA_ConnectRsp (bd_addr, l2cap_id, l2cap_cid, L2CAP_CONN_OK, L2CAP_CONN_OK);
+ L2CA_ConnectRsp (bd_addr, l2cap_id, l2cap_cid, L2CAP_CONN_OK, L2CAP_CONN_OK);
/* Send a Configuration Request. */
L2CA_ConfigReq (l2cap_cid, &bnep_cb.l2cap_my_cfg);
@@ -385,7 +385,7 @@ static void bnep_disconnect_cfm (UINT16 l2cap_cid, UINT16 result)
**
** Function bnep_congestion_ind
**
-** Description This is a callback function called by L2CAP when
+** Description This is a callback function called by L2CAP when
** congestion status changes
**
*******************************************************************************/
diff --git a/stack/bnep/bnep_utils.c b/stack/bnep/bnep_utils.c
index 8c23877..22c2730 100644
--- a/stack/bnep/bnep_utils.c
+++ b/stack/bnep/bnep_utils.c
@@ -469,7 +469,7 @@ void bnepu_check_send_packet (tBNEP_CONN *p_bcb, BT_HDR *p_buf)
** Returns void
**
*******************************************************************************/
-void bnepu_build_bnep_hdr (tBNEP_CONN *p_bcb, BT_HDR *p_buf, UINT16 protocol,
+void bnepu_build_bnep_hdr (tBNEP_CONN *p_bcb, BT_HDR *p_buf, UINT16 protocol,
UINT8 *p_src_addr, UINT8 *p_dest_addr, BOOLEAN fw_ext_present)
{
UINT8 ext_bit, *p = (UINT8 *)NULL;
@@ -650,7 +650,7 @@ void bnep_process_setup_conn_req (tBNEP_CONN *p_bcb, UINT8 *p_setup, UINT8 len)
bnep_sec_check_complete (p_bcb->rem_bda, p_bcb, BTM_SUCCESS);
else
#endif
- btm_sec_mx_access_request (p_bcb->rem_bda, BT_PSM_BNEP, FALSE,
+ btm_sec_mx_access_request (p_bcb->rem_bda, BT_PSM_BNEP, FALSE,
BTM_SEC_PROTO_BNEP, bnep_get_uuid32(&(p_bcb->src_uuid)),
&bnep_sec_check_complete, p_bcb);
@@ -960,7 +960,7 @@ void bnepu_process_peer_filter_set (tBNEP_CONN *p_bcb, UINT8 *p_filters, UINT16
** Function bnepu_process_peer_filter_rsp
**
** Description This function processes a peer's filter control
-** 'response' message.
+** 'response' message.
**
** Returns void
**
@@ -1012,7 +1012,7 @@ void bnepu_process_peer_filter_rsp (tBNEP_CONN *p_bcb, UINT8 *p_data)
** Function bnepu_process_multicast_filter_rsp
**
** Description This function processes multicast filter control
-** 'response' message.
+** 'response' message.
**
** Returns void
**
diff --git a/stack/btm/btm_acl.c b/stack/btm/btm_acl.c
index 57a7b5b..4dd229c 100644
--- a/stack/btm/btm_acl.c
+++ b/stack/btm/btm_acl.c
@@ -131,7 +131,7 @@ UINT8 btm_handle_to_acl_index (UINT16 hci_handle)
** Returns void
**
*******************************************************************************/
-void btm_acl_created (BD_ADDR bda, DEV_CLASS dc, BD_NAME bdn,
+void btm_acl_created (BD_ADDR bda, DEV_CLASS dc, BD_NAME bdn,
UINT16 hci_handle, UINT8 link_role, UINT8 is_le_link)
{
tBTM_SEC_DEV_REC *p_dev_rec;
@@ -194,10 +194,10 @@ void btm_acl_created (BD_ADDR bda, DEV_CLASS dc, BD_NAME bdn,
{
BTM_TRACE_DEBUG1 ("device_type=0x%x", p_dev_rec->device_type);
}
-#endif
+#endif
- if (p_dev_rec
+ if (p_dev_rec
#if (BLE_INCLUDED == TRUE)
&& p_dev_rec->device_type != BT_DEVICE_TYPE_BLE
#endif
@@ -213,7 +213,7 @@ void btm_acl_created (BD_ADDR bda, DEV_CLASS dc, BD_NAME bdn,
if (p_dev_rec->features[yy])
{
memcpy (p->features, p_dev_rec->features, BD_FEATURES_LEN);
- if (BTM_SEC_MODE_SP == btm_cb.security_mode &&
+ if (BTM_SEC_MODE_SP == btm_cb.security_mode &&
HCI_SIMPLE_PAIRING_SUPPORTED(p->features))
{
/* if SM4 supported, check peer support for SM4
@@ -237,7 +237,7 @@ void btm_acl_created (BD_ADDR bda, DEV_CLASS dc, BD_NAME bdn,
btm_establish_continue(p);
if (link_role == HCI_ROLE_MASTER)
- {
+ {
btm_ble_update_bg_state();
btm_ble_resume_bg_conn (NULL, FALSE);
@@ -337,7 +337,7 @@ void btm_acl_removed (BD_ADDR bda)
#if (defined BLE_INCLUDED && BLE_INCLUDED == TRUE)
- BTM_TRACE_DEBUG4 ("acl hci_handle=%d is_le_link=%d connectable_mode=0x%0x link_role=%d",
+ BTM_TRACE_DEBUG4 ("acl hci_handle=%d is_le_link=%d connectable_mode=0x%0x link_role=%d",
p->hci_handle,
p->is_le_link,
btm_cb.ble_ctr_cb.inq_var.connectable_mode,
@@ -380,7 +380,7 @@ void btm_acl_removed (BD_ADDR bda)
}
else
{
- BTM_TRACE_DEBUG0("Bletooth link down");
+ BTM_TRACE_DEBUG0("Bletooth link down");
p_dev_rec->sec_flags &= ~(BTM_SEC_AUTHORIZED | BTM_SEC_AUTHENTICATED | BTM_SEC_ENCRYPTED | BTM_SEC_ROLE_SWITCHED);
}
BTM_TRACE_DEBUG1("after update p_dev_rec->sec_flags=0x%x", p_dev_rec->sec_flags);
@@ -530,7 +530,7 @@ tBTM_STATUS BTM_GetRole (BD_ADDR remote_bd_addr, UINT8 *p_role)
** Function BTM_SwitchRole
**
** Description This function is called to switch role between master and
-** slave. If role is already set it will do nothing. If the
+** slave. If role is already set it will do nothing. If the
** command was initiated, the callback function is called upon
** completion.
**
@@ -626,7 +626,7 @@ tBTM_STATUS BTM_SwitchRole (BD_ADDR remote_bd_addr, UINT8 new_role, tBTM_CMPL_CB
/* Coverity FALSE-POSITIVE error from Coverity tool. Please do NOT remove following comment. */
/* coverity[uninit_use_in_call] False-positive: setting the mode to BTM_PM_MD_ACTIVE only uses settings.mode
the other data members of tBTM_PM_PWR_MD are ignored
-*/
+*/
settings.mode = BTM_PM_MD_ACTIVE;
status = BTM_SetPowerMode (BTM_PM_SET_ONLY_ID, p->remote_addr, &settings);
if (status != BTM_CMD_STARTED)
@@ -671,7 +671,7 @@ tBTM_STATUS BTM_SwitchRole (BD_ADDR remote_bd_addr, UINT8 new_role, tBTM_CMPL_CB
if (p_cb)
{
memcpy (btm_cb.devcb.switch_role_ref_data.remote_bd_addr, remote_bd_addr,
- BD_ADDR_LEN);
+ BD_ADDR_LEN);
btm_cb.devcb.switch_role_ref_data.role = new_role;
/* initialized to an error code */
btm_cb.devcb.switch_role_ref_data.hci_status = HCI_ERR_UNSUPPORTED_VALUE;
@@ -736,7 +736,7 @@ tBTM_STATUS BTM_ChangeLinkKey (BD_ADDR remote_bd_addr, tBTM_CMPL_CB *p_cb)
/* Coverity: FALSE-POSITIVE error from Coverity tool. Please do NOT remove following comment. */
/* coverity[uninit_use_in_call] False-positive: setting the mode to BTM_PM_MD_ACTIVE only uses settings.mode
the other data members of tBTM_PM_PWR_MD are ignored
-*/
+*/
settings.mode = BTM_PM_MD_ACTIVE;
status = BTM_SetPowerMode (BTM_PM_SET_ONLY_ID, p->remote_addr, &settings);
if (status != BTM_CMD_STARTED)
@@ -770,7 +770,7 @@ tBTM_STATUS BTM_ChangeLinkKey (BD_ADDR remote_bd_addr, tBTM_CMPL_CB *p_cb)
/* Initialize return structure in case request fails */
memcpy (btm_cb.devcb.chg_link_key_ref_data.remote_bd_addr, remote_bd_addr,
- BD_ADDR_LEN);
+ BD_ADDR_LEN);
btm_cb.devcb.p_chg_link_key_cb = p_cb;
return(BTM_CMD_STARTED);
}
@@ -843,7 +843,7 @@ void btm_acl_link_key_change (UINT16 handle, UINT8 status)
**
** Function btm_acl_encrypt_change
**
-** Description This function is when encryption of the connection is
+** Description This function is when encryption of the connection is
** completed by the LM. Checks to see if a role switch or
** change of link key was active and initiates or continues
** process if needed.
@@ -930,7 +930,7 @@ void btm_acl_encrypt_change (UINT16 handle, UINT8 status, UINT8 encr_enable)
BTM_TRACE_WARNING0("btm_acl_encrypt_change -> Issuing delayed HCI_Disconnect!!!");
btsnd_hcic_disconnect(p_dev_rec->hci_handle, HCI_ERR_PEER_USER);
}
- BTM_TRACE_ERROR2("btm_acl_encrypt_change: tBTM_SEC_DEV:0x%x rs_disc_pending=%d",
+ BTM_TRACE_ERROR2("btm_acl_encrypt_change: tBTM_SEC_DEV:0x%x rs_disc_pending=%d",
(UINT32)p_dev_rec, p_dev_rec->rs_disc_pending);
p_dev_rec->rs_disc_pending = BTM_SEC_RS_NOT_PENDING; /* reset flag */
}
@@ -1216,7 +1216,7 @@ void btm_read_remote_features_complete (UINT8 *p)
memcpy (p_dev_rec->features, p_acl_cb->features, BD_FEATURES_LEN);
- if (BTM_SEC_MODE_SP == btm_cb.security_mode &&
+ if (BTM_SEC_MODE_SP == btm_cb.security_mode &&
HCI_SIMPLE_PAIRING_SUPPORTED(p_acl_cb->features))
{
/* if SM4 supported, check peer support for SM4
@@ -1375,10 +1375,10 @@ static void btm_establish_continue (tACL_CONN *p_acl_cb)
btm_acl_update_busy_level (BTM_BLI_ACL_UP_EVT);
#else
if (btm_cb.p_acl_changed_cb)
- (*btm_cb.p_acl_changed_cb) (p_acl_cb->remote_addr,
- p_acl_cb->remote_dc,
- p_acl_cb->remote_name,
- p_acl_cb->features,
+ (*btm_cb.p_acl_changed_cb) (p_acl_cb->remote_addr,
+ p_acl_cb->remote_dc,
+ p_acl_cb->remote_name,
+ p_acl_cb->features,
TRUE);
#endif
}
@@ -1421,7 +1421,7 @@ tBTM_STATUS BTM_SetLinkSuperTout (BD_ADDR remote_bda, UINT16 timeout)
/* Only send if current role is Master; 2.0 spec requires this */
if (p->link_role == BTM_ROLE_MASTER)
{
- if (!btsnd_hcic_write_link_super_tout (LOCAL_BR_EDR_CONTROLLER_ID,
+ if (!btsnd_hcic_write_link_super_tout (LOCAL_BR_EDR_CONTROLLER_ID,
p->hci_handle, timeout))
return(BTM_NO_RESOURCES);
@@ -1812,7 +1812,7 @@ BOOLEAN BTM_IsAclConnectionUp (BD_ADDR remote_bda)
**
** Function BTM_GetNumAclLinks
**
-** Description This function is called to count the number of
+** Description This function is called to count the number of
** ACL links that are active.
**
** Returns UINT16 Number of active ACL links
@@ -2098,7 +2098,7 @@ UINT8 BTM_AllocateSCN(void)
** Function BTM_TryAllocateSCN
**
** Description Try to allocate a fixed server channel
-**
+**
** Returns Returns TRUE if server channel was available
**
*******************************************************************************/
@@ -2119,7 +2119,7 @@ BOOLEAN BTM_TryAllocateSCN(UINT8 scn)
btm_cb.btm_scn[scn-1] = TRUE;
return TRUE;
}
-
+
return (FALSE); /* Port was busy */
}
@@ -2291,7 +2291,7 @@ UINT16 btm_get_max_packet_size (BD_ADDR addr)
#ifdef BRCM_VS
/* Using HCI size 1017 instead of 1021 */
- if ((pkt_size == HCI_EDR3_DH5_PACKET_SIZE)
+ if ((pkt_size == HCI_EDR3_DH5_PACKET_SIZE)
&& (btu_cb.hcit_acl_data_size == 1017))
pkt_size = 1017;
#endif
@@ -2423,7 +2423,7 @@ tBTM_STATUS BTM_SetQoS (BD_ADDR bd, FLOW_SPEC *p_flow, tBTM_CMPL_CB *p_cb)
btu_start_timer (&btm_cb.devcb.qossu_timer, BTU_TTYPE_BTM_ACL, BTM_DEV_REPLY_TIMEOUT);
btm_cb.devcb.p_qossu_cmpl_cb = p_cb;
- if (!btsnd_hcic_qos_setup (p->hci_handle, p_flow->qos_flags, p_flow->service_type,
+ if (!btsnd_hcic_qos_setup (p->hci_handle, p_flow->qos_flags, p_flow->service_type,
p_flow->token_rate, p_flow->peak_bandwidth, p_flow->latency,p_flow->delay_variation))
{
btm_cb.devcb.p_qossu_cmpl_cb = NULL;
@@ -2469,7 +2469,7 @@ void btm_qos_setup_complete (UINT8 status, UINT16 handle, FLOW_SPEC *p_flow)
qossu.flow.token_rate = p_flow->token_rate;
qossu.flow.peak_bandwidth = p_flow->peak_bandwidth;
qossu.flow.latency = p_flow->latency;
- qossu.flow.delay_variation = p_flow->delay_variation;
+ qossu.flow.delay_variation = p_flow->delay_variation;
}
BTM_TRACE_DEBUG1 ("BTM: p_flow->delay_variation: 0x%02x",
qossu.flow.delay_variation);
@@ -2571,8 +2571,8 @@ tBTM_STATUS BTM_ReadLinkQuality (BD_ADDR remote_bda, tBTM_CMPL_CB *p_cb)
**
** Function BTM_ReadTxPower
**
-** Description This function is called to read the current
-** TX power of the connection. The tx power level results
+** Description This function is called to read the current
+** TX power of the connection. The tx power level results
** are returned in the callback.
** (tBTM_RSSI_RESULTS)
**
@@ -2608,7 +2608,7 @@ tBTM_STATUS BTM_ReadTxPower (BD_ADDR remote_bda, tBTM_CMPL_CB *p_cb)
memcpy(btm_cb.devcb.read_tx_pwr_addr, remote_bda, BD_ADDR_LEN);
ret = btsnd_hcic_ble_read_adv_chnl_tx_power();
}
- else
+ else
#endif
{
ret = btsnd_hcic_read_tx_power (p->hci_handle, BTM_READ_RSSI_TYPE_CUR);
@@ -2656,7 +2656,7 @@ void btm_read_tx_power_complete (UINT8 *p, BOOLEAN is_ble)
if (results.hci_status == HCI_SUCCESS)
{
results.status = BTM_SUCCESS;
-
+
if (!is_ble)
{
STREAM_TO_UINT16 (handle, p);
@@ -2871,7 +2871,7 @@ void btm_cont_rswitch_or_chglinkkey (tACL_CONN *p, tBTM_SEC_DEV_REC *p_dev_rec,
BOOLEAN sw_ok = TRUE;
BOOLEAN chlk_ok = TRUE;
BTM_TRACE_DEBUG0 ("btm_cont_rswitch_or_chglinkkey ");
- /* Check to see if encryption needs to be turned off if pending
+ /* Check to see if encryption needs to be turned off if pending
change of link key or role switch */
if (p->switch_role_state == BTM_ACL_SWKEY_STATE_MODE_CHANGE ||
p->change_key_state == BTM_ACL_SWKEY_STATE_MODE_CHANGE)
@@ -3102,13 +3102,13 @@ void btm_acl_chk_peer_pkt_type_support (tACL_CONN *p, UINT16 *p_pkt_type)
/* 3 and 5 slot packets? */
if (!HCI_3_SLOT_PACKETS_SUPPORTED(p->features))
*p_pkt_type &= ~(BTM_ACL_PKT_TYPES_MASK_DH3 +BTM_ACL_PKT_TYPES_MASK_DM3);
-
+
if (!HCI_5_SLOT_PACKETS_SUPPORTED(p->features))
*p_pkt_type &= ~(BTM_ACL_PKT_TYPES_MASK_DH5 + BTM_ACL_PKT_TYPES_MASK_DM5);
- /* If HCI version > 2.0, then also check EDR packet types */
+ /* If HCI version > 2.0, then also check EDR packet types */
if (btm_cb.devcb.local_version.hci_version >= HCI_PROTO_VERSION_2_0)
- {
+ {
/* 2 and 3 MPS support? */
if (!HCI_EDR_ACL_2MPS_SUPPORTED(p->features))
/* Not supported. Add 'not_supported' mask for all 2MPS packet types */
@@ -3118,7 +3118,7 @@ void btm_acl_chk_peer_pkt_type_support (tACL_CONN *p, UINT16 *p_pkt_type)
/* Not supported. Add 'not_supported' mask for all 3MPS packet types */
*p_pkt_type |= (BTM_ACL_PKT_TYPES_MASK_NO_3_DH1 + BTM_ACL_PKT_TYPES_MASK_NO_3_DH3 + BTM_ACL_PKT_TYPES_MASK_NO_3_DH5);
- /* EDR 3 and 5 slot support? */
+ /* EDR 3 and 5 slot support? */
if (HCI_EDR_ACL_2MPS_SUPPORTED(p->features) || HCI_EDR_ACL_3MPS_SUPPORTED(p->features))
{
if (!HCI_3_SLOT_EDR_ACL_SUPPORTED(p->features))
diff --git a/stack/btm/btm_ble.c b/stack/btm/btm_ble.c
index 6b1db39..e34b8e2 100644
--- a/stack/btm/btm_ble.c
+++ b/stack/btm/btm_ble.c
@@ -47,7 +47,7 @@ static void btm_ble_update_active_bgconn_scan_params(void);
** Returns TRUE if added OK, else FALSE
**
*******************************************************************************/
-BOOLEAN BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name, tBT_DEVICE_TYPE dev_type,
+BOOLEAN BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name, tBT_DEVICE_TYPE dev_type,
tBLE_ADDR_TYPE addr_type)
{
#if BLE_INCLUDED == TRUE
@@ -78,9 +78,9 @@ BOOLEAN BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name, tBT_DEVICE_TYPE d
p_dev_rec->hci_handle = BTM_GetHCIConnHandle (bd_addr);
/* update conn params, use default value for background connection params */
- p_dev_rec->conn_params.min_conn_int =
- p_dev_rec->conn_params.max_conn_int =
- p_dev_rec->conn_params.supervision_tout =
+ p_dev_rec->conn_params.min_conn_int =
+ p_dev_rec->conn_params.max_conn_int =
+ p_dev_rec->conn_params.supervision_tout =
p_dev_rec->conn_params.slave_latency = BTM_BLE_CONN_PARAM_UNDEF;
BTM_TRACE_DEBUG1 ("hci_handl=0x%x ", p_dev_rec->hci_handle );
@@ -106,7 +106,7 @@ BOOLEAN BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name, tBT_DEVICE_TYPE d
}
p_dev_rec->device_type = dev_type;
p_dev_rec->ble.ble_addr_type = addr_type;
- BTM_TRACE_DEBUG3 ("p_dev_rec->device_type =0x%x addr_type=0x%x sec_flags=0x%x",
+ BTM_TRACE_DEBUG3 ("p_dev_rec->device_type =0x%x addr_type=0x%x sec_flags=0x%x",
dev_type, addr_type, p_dev_rec->sec_flags);
/* sync up with the Inq Data base*/
@@ -115,7 +115,7 @@ BOOLEAN BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name, tBT_DEVICE_TYPE d
{
p_info->results.ble_addr_type = p_dev_rec->ble.ble_addr_type ;
p_info->results.device_type = p_dev_rec->device_type;
- BTM_TRACE_DEBUG2 ("InqDb device_type =0x%x addr_type=0x%x",
+ BTM_TRACE_DEBUG2 ("InqDb device_type =0x%x addr_type=0x%x",
p_info->results.device_type, p_info->results.ble_addr_type);
}
@@ -127,8 +127,8 @@ BOOLEAN BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name, tBT_DEVICE_TYPE d
**
** Function BTM_SecAddBleKey
**
-** 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
@@ -144,7 +144,7 @@ BOOLEAN BTM_SecAddBleKey (BD_ADDR bd_addr, tBTM_LE_KEY_VALUE *p_le_key, tBTM_LE_
tBTM_SEC_DEV_REC *p_dev_rec;
BTM_TRACE_DEBUG0 ("BTM_SecAddBleKey");
p_dev_rec = btm_find_dev (bd_addr);
- if (!p_dev_rec || !p_le_key ||
+ if (!p_dev_rec || !p_le_key ||
(key_type != BTM_LE_KEY_PENC && key_type != BTM_LE_KEY_PID &&
key_type != BTM_LE_KEY_PCSRK && key_type != BTM_LE_KEY_LENC))
{
@@ -168,7 +168,7 @@ BOOLEAN BTM_SecAddBleKey (BD_ADDR bd_addr, tBTM_LE_KEY_VALUE *p_le_key, tBTM_LE_
#endif
- return(TRUE);
+ return(TRUE);
}
/*******************************************************************************
@@ -299,8 +299,8 @@ void BTM_ReadConnectionAddr (BD_ADDR conn_addr)
** Description This function is called to grant security process.
**
** Parameters bd_addr - peer device bd address.
-** res - result of the operation BTM_SUCCESS if success.
-** Otherwise, BTM_REPEATED_ATTEMPTS is too many attempts.
+** res - result of the operation BTM_SUCCESS if success.
+** Otherwise, BTM_REPEATED_ATTEMPTS is too many attempts.
**
** Returns None
**
@@ -322,7 +322,7 @@ void BTM_SecurityGrant(BD_ADDR bd_addr, UINT8 res)
** passkey request to the application.
**
** Parameters: bd_addr - Address of the device for which passkey was requested
-** res - result of the operation BTM_SUCCESS if success
+** res - result of the operation BTM_SUCCESS if success
** key_len - length in bytes of the Passkey
** p_passkey - pointer to array with the passkey
** trusted_mask - bitwise OR of trusted services (array of UINT32)
@@ -348,7 +348,7 @@ void BTM_BlePasskeyReply (BD_ADDR bd_addr, UINT8 res, UINT32 passkey)
** SMP in response to BTM_LE_OOB_REQ_EVT
**
** Parameters: bd_addr - Address of the peer device
-** res - result of the operation SMP_SUCCESS if success
+** res - result of the operation SMP_SUCCESS if success
** p_data - simple pairing Randomizer C.
**
*******************************************************************************/
@@ -398,8 +398,8 @@ void BTM_BleSetConnScanParams (UINT16 scan_interval, UINT16 scan_window)
p_ble_cb->scan_win = scan_window;
new_param = TRUE;
}
-
- if (new_param)
+
+ if (new_param)
btm_ble_update_active_bgconn_scan_params();
}
else
@@ -426,7 +426,7 @@ void BTM_BleSetConnScanParams (UINT16 scan_interval, UINT16 scan_window)
** Returns void
**
*******************************************************************************/
-void BTM_BleSetPrefConnParams (BD_ADDR bd_addr,
+void BTM_BleSetPrefConnParams (BD_ADDR bd_addr,
UINT16 min_conn_int, UINT16 max_conn_int,
UINT16 slave_latency, UINT16 supervision_tout)
{
@@ -486,8 +486,8 @@ void BTM_BleSetPrefConnParams (BD_ADDR bd_addr,
**
** Function BTM_ReadDevInfo
**
-** Description This function is called to read the device/address type
-** of BD address.
+** Description This function is called to read the device/address type
+** of BD address.
**
** Parameter remote_bda: remote device address
** p_dev_type: output parameter to read the device type.
@@ -499,7 +499,7 @@ void BTM_ReadDevInfo (BD_ADDR remote_bda, tBT_DEVICE_TYPE *p_dev_type, tBLE_ADDR
#if BLE_INCLUDED == TRUE
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (remote_bda);
tBTM_INQ_INFO *p_inq_info = BTM_InqDbRead(remote_bda);
-
+
*p_dev_type = BT_DEVICE_TYPE_BREDR;
*p_addr_type = BLE_ADDR_PUBLIC;
@@ -566,7 +566,7 @@ static void btm_ble_update_active_bgconn_scan_params(void)
btm_ble_start_select_conn(TRUE, p_select_cback);
}
}
- return;
+ return;
}
/*******************************************************************************
@@ -654,7 +654,7 @@ void btm_ble_increment_sign_ctr(BD_ADDR bd_addr, BOOLEAN is_local )
else
p_dev_rec->ble.keys.counter++;
BTM_TRACE_DEBUG3 ("is_local=%d local sign counter=%d peer sign counter=%d",
- is_local,
+ is_local,
p_dev_rec->ble.keys.local_counter,
p_dev_rec->ble.keys.counter);
}
@@ -727,7 +727,7 @@ BOOLEAN btm_get_local_div (BD_ADDR bd_addr, UINT16 *p_div)
** Returns void
**
*******************************************************************************/
-void btm_sec_save_le_key(BD_ADDR bd_addr, tBTM_LE_KEY_TYPE key_type, tBTM_LE_KEY_VALUE *p_keys,
+void btm_sec_save_le_key(BD_ADDR bd_addr, tBTM_LE_KEY_TYPE key_type, tBTM_LE_KEY_VALUE *p_keys,
BOOLEAN pass_to_application)
{
tBTM_SEC_DEV_REC *p_rec;
@@ -750,20 +750,20 @@ void btm_sec_save_le_key(BD_ADDR bd_addr, tBTM_LE_KEY_TYPE key_type, tBTM_LE_KEY
memcpy(p_rec->ble.keys.rand, p_keys->penc_key.rand, BT_OCTET8_LEN);
p_rec->ble.keys.sec_level = p_keys->penc_key.sec_level;
p_rec->ble.keys.ediv = p_keys->penc_key.ediv;
- p_rec->ble.keys.key_size = p_keys->penc_key.key_size;
+ p_rec->ble.keys.key_size = p_keys->penc_key.key_size;
p_rec->ble.key_type |= BTM_LE_KEY_PENC;
p_rec->sec_flags |= BTM_SEC_LINK_KEY_KNOWN;
if (p_keys->penc_key.sec_level == SMP_SEC_AUTHENTICATED)
p_rec->sec_flags |= BTM_SEC_LINK_KEY_AUTHED;
else
p_rec->sec_flags &= ~BTM_SEC_LINK_KEY_AUTHED;
- BTM_TRACE_DEBUG3("BTM_LE_KEY_PENC key_type=0x%x sec_flags=0x%x sec_leve=0x%x",
- p_rec->ble.key_type,
+ BTM_TRACE_DEBUG3("BTM_LE_KEY_PENC key_type=0x%x sec_flags=0x%x sec_leve=0x%x",
+ p_rec->ble.key_type,
p_rec->sec_flags,
p_rec->ble.keys.sec_level);
break;
- case BTM_LE_KEY_PID:
+ case BTM_LE_KEY_PID:
memcpy(p_rec->ble.keys.irk, p_keys->pid_key, BT_OCTET16_LEN);
p_rec->ble.key_type |= BTM_LE_KEY_PID;
BTM_TRACE_DEBUG1("BTM_LE_KEY_PID key_type=0x%x save peer IRK", p_rec->ble.key_type);
@@ -780,8 +780,8 @@ void btm_sec_save_le_key(BD_ADDR bd_addr, tBTM_LE_KEY_TYPE key_type, tBTM_LE_KEY
else
p_rec->sec_flags &= ~BTM_SEC_LINK_KEY_AUTHED;
- BTM_TRACE_DEBUG4("BTM_LE_KEY_PCSRK key_type=0x%x sec_flags=0x%x sec_level=0x%x peer_counter=%d",
- p_rec->ble.key_type,
+ BTM_TRACE_DEBUG4("BTM_LE_KEY_PCSRK key_type=0x%x sec_flags=0x%x sec_level=0x%x peer_counter=%d",
+ p_rec->ble.key_type,
p_rec->sec_flags,
p_rec->ble.keys.srk_sec_level,
p_rec->ble.keys.counter );
@@ -790,11 +790,11 @@ void btm_sec_save_le_key(BD_ADDR bd_addr, tBTM_LE_KEY_TYPE key_type, tBTM_LE_KEY
case BTM_LE_KEY_LENC:
p_rec->ble.keys.div = p_keys->lenc_key.div; /* update DIV */
p_rec->ble.keys.sec_level = p_keys->lenc_key.sec_level;
- p_rec->ble.keys.key_size = p_keys->lenc_key.key_size;
+ p_rec->ble.keys.key_size = p_keys->lenc_key.key_size;
p_rec->ble.key_type |= BTM_LE_KEY_LENC;
- BTM_TRACE_DEBUG4("BTM_LE_KEY_LENC key_type=0x%x DIV=0x%x key_size=0x%x sec_level=0x%x",
- p_rec->ble.key_type,
+ BTM_TRACE_DEBUG4("BTM_LE_KEY_LENC key_type=0x%x DIV=0x%x key_size=0x%x sec_level=0x%x",
+ p_rec->ble.key_type,
p_rec->ble.keys.div,
p_rec->ble.keys.key_size,
p_rec->ble.keys.sec_level );
@@ -805,8 +805,8 @@ void btm_sec_save_le_key(BD_ADDR bd_addr, tBTM_LE_KEY_TYPE key_type, tBTM_LE_KEY
p_rec->ble.keys.local_csrk_sec_level = p_keys->lcsrk_key.sec_level;
p_rec->ble.keys.local_counter = p_keys->lcsrk_key.counter;
p_rec->ble.key_type |= BTM_LE_KEY_LCSRK;
- BTM_TRACE_DEBUG4("BTM_LE_KEY_LCSRK key_type=0x%x DIV=0x%x scrk_sec_level=0x%x local_counter=%d",
- p_rec->ble.key_type,
+ BTM_TRACE_DEBUG4("BTM_LE_KEY_LCSRK key_type=0x%x DIV=0x%x scrk_sec_level=0x%x local_counter=%d",
+ p_rec->ble.key_type,
p_rec->ble.keys.div,
p_rec->ble.keys.local_csrk_sec_level,
p_rec->ble.keys.local_counter );
@@ -818,7 +818,7 @@ void btm_sec_save_le_key(BD_ADDR bd_addr, tBTM_LE_KEY_TYPE key_type, tBTM_LE_KEY
}
BTM_TRACE_DEBUG3 ("BLE key type 0x%02x updated for BDA: %08x%04x (btm_sec_save_le_key)", key_type,
- (bd_addr[0]<<24)+(bd_addr[1]<<16)+(bd_addr[2]<<8)+bd_addr[3],
+ (bd_addr[0]<<24)+(bd_addr[1]<<16)+(bd_addr[2]<<8)+bd_addr[3],
(bd_addr[4]<<8)+bd_addr[5]);
/* Notify the application that one of the BLE keys has been updated
@@ -834,7 +834,7 @@ void btm_sec_save_le_key(BD_ADDR bd_addr, tBTM_LE_KEY_TYPE key_type, tBTM_LE_KEY
}
BTM_TRACE_WARNING3 ("BLE key type 0x%02x called for Unknown BDA or type: %08x%04x !! (btm_sec_save_le_key)", key_type,
- (bd_addr[0]<<24)+(bd_addr[1]<<16)+(bd_addr[2]<<8)+bd_addr[3],
+ (bd_addr[0]<<24)+(bd_addr[1]<<16)+(bd_addr[2]<<8)+bd_addr[3],
(bd_addr[4]<<8)+bd_addr[5]);
if (p_rec)
@@ -899,11 +899,11 @@ void btm_ble_link_sec_check(BD_ADDR bd_addr, tBTM_LE_AUTH_REQ auth_req, tBTM_BLE
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (bd_addr);
UINT8 req_sec_level, cur_sec_level;
- BTM_TRACE_DEBUG1 ("btm_ble_link_sec_check auth_req =0x%x", auth_req);
+ BTM_TRACE_DEBUG1 ("btm_ble_link_sec_check auth_req =0x%x", auth_req);
if (p_dev_rec == NULL)
{
- BTM_TRACE_ERROR0 ("btm_ble_link_sec_check received for unknown device");
+ BTM_TRACE_ERROR0 ("btm_ble_link_sec_check received for unknown device");
return;
}
@@ -939,7 +939,7 @@ void btm_ble_link_sec_check(BD_ADDR bd_addr, tBTM_LE_AUTH_REQ auth_req, tBTM_BLE
else
cur_sec_level = BTM_LE_SEC_NONE;
}
-
+
if (cur_sec_level >= req_sec_level)
{
if (cur_sec_level == BTM_LE_SEC_NONE)
@@ -965,7 +965,7 @@ void btm_ble_link_sec_check(BD_ADDR bd_addr, tBTM_LE_AUTH_REQ auth_req, tBTM_BLE
BTM_TRACE_DEBUG3("cur_sec_level=%d req_sec_level=%d sec_req_act=%d",
cur_sec_level,
req_sec_level,
- *p_sec_req_act);
+ *p_sec_req_act);
}
@@ -973,7 +973,7 @@ void btm_ble_link_sec_check(BD_ADDR bd_addr, tBTM_LE_AUTH_REQ auth_req, tBTM_BLE
**
** Function btm_ble_set_encryption
**
-** Description This function is called to ensure that LE connection is
+** Description This function is called to ensure that LE connection is
** encrypted. Should be called only on an open connection.
** Typically only needed for connections that first want to
** bring up unencrypted links, then later encrypt them.
@@ -1006,7 +1006,7 @@ tBTM_STATUS btm_ble_set_encryption (BD_ADDR bd_addr, void *p_ref_data, UINT8 lin
if (link_role == BTM_ROLE_MASTER)
{
/* start link layer encryption using the security info stored */
- btm_ble_start_encrypt(bd_addr, FALSE, NULL);
+ btm_ble_start_encrypt(bd_addr, FALSE, NULL);
p_rec->sec_state = BTM_SEC_STATE_ENCRYPTING;
cmd = BTM_CMD_STARTED;
break;
@@ -1018,7 +1018,7 @@ tBTM_STATUS btm_ble_set_encryption (BD_ADDR bd_addr, void *p_ref_data, UINT8 lin
if (SMP_Pair(bd_addr) == SMP_STARTED)
{
- cmd = BTM_CMD_STARTED;
+ cmd = BTM_CMD_STARTED;
p_rec->sec_state = BTM_SEC_STATE_AUTHENTICATING;
}
break;
@@ -1036,8 +1036,8 @@ tBTM_STATUS btm_ble_set_encryption (BD_ADDR bd_addr, void *p_ref_data, UINT8 lin
**
** Description This function is called when encryption request is received
** on a slave device.
-**
-**
+**
+**
** Returns void
**
*******************************************************************************/
@@ -1064,8 +1064,8 @@ void btm_ble_ltk_request(UINT16 handle, UINT8 rand[8], UINT16 ediv)
** Function btm_ble_start_encrypt
**
** Description This function is called to start LE encryption.
-**
-**
+**
+**
** Returns void
**
*******************************************************************************/
@@ -1092,19 +1092,19 @@ BOOLEAN btm_ble_start_encrypt(BD_ADDR bda, BOOLEAN use_stk, BT_OCTET16 stk)
}
else
{
- if (!btsnd_hcic_ble_start_enc(p_rec->hci_handle, p_rec->ble.keys.rand,
+ if (!btsnd_hcic_ble_start_enc(p_rec->hci_handle, p_rec->ble.keys.rand,
p_rec->ble.keys.ediv, p_rec->ble.keys.ltk))
return FALSE;
}
return TRUE;
-}
+}
/*******************************************************************************
**
** Function btm_ble_link_encrypted
**
** Description This function is called when LE link encrption status is changed.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1179,7 +1179,7 @@ static void btm_enc_proc_slave_y(tSMP_ENC *p)
BTM_TRACE_DEBUG0 ("LTK request OK");
/* calculating LTK , LTK = E er(div) */
SMP_Encrypt(p_cb->devcb.er, BT_OCTET16_LEN, (UINT8 *)&div, 2, &output);
- btm_enc_proc_ltk(&output);
+ btm_enc_proc_ltk(&output);
}
else
{
@@ -1190,15 +1190,15 @@ static void btm_enc_proc_slave_y(tSMP_ENC *p)
}
}
-}
+}
/*******************************************************************************
**
** Function btm_ble_ltk_request_reply
**
-** Description This function is called to send a LTK request reply on a slave
+** Description This function is called to send a LTK request reply on a slave
** device.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1226,18 +1226,18 @@ void btm_ble_ltk_request_reply(BD_ADDR bda, BOOLEAN use_stk, BT_OCTET16 stk)
else /* calculate LTK using peer device */
{
/* generate Y= Encrypt(DHK, Rand) received from encrypt request */
- SMP_Encrypt(p_cb->devcb.id_keys.dhk, BT_OCTET16_LEN, p_cb->enc_rand,
+ SMP_Encrypt(p_cb->devcb.id_keys.dhk, BT_OCTET16_LEN, p_cb->enc_rand,
BT_OCTET8_LEN, &output);
btm_enc_proc_slave_y(&output);
}
-}
+}
/*******************************************************************************
**
** Function btm_ble_io_capabilities_req
**
** Description This function is called to handle SMP get IO capability request.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1258,7 +1258,7 @@ UINT8 btm_ble_io_capabilities_req(tBTM_SEC_DEV_REC *p_dev_rec, tBTM_LE_IO_REQ *p
{
p_data->auth_req &= BTM_LE_AUTH_REQ_MASK;
- BTM_TRACE_DEBUG2 ("btm_ble_io_capabilities_req 1: p_dev_rec->security_required = %d auth_req:%d",
+ BTM_TRACE_DEBUG2 ("btm_ble_io_capabilities_req 1: p_dev_rec->security_required = %d auth_req:%d",
p_dev_rec->security_required, p_data->auth_req);
BTM_TRACE_DEBUG2 ("btm_ble_io_capabilities_req 2: i_keys=0x%x r_keys=0x%x (bit 0-LTK 1-IRK 2-CSRK)",
p_data->init_keys,
@@ -1280,7 +1280,7 @@ UINT8 btm_ble_io_capabilities_req(tBTM_SEC_DEV_REC *p_dev_rec, tBTM_LE_IO_REQ *p
p_data->init_keys,
p_data->resp_keys);
- BTM_TRACE_DEBUG2 ("btm_ble_io_capabilities_req 5: p_data->io_cap = %d auth_req:%d",
+ BTM_TRACE_DEBUG2 ("btm_ble_io_capabilities_req 5: p_data->io_cap = %d auth_req:%d",
p_data->io_cap, p_data->auth_req);
/* remove MITM protection requirement if IO cap does not allow it */
@@ -1328,7 +1328,7 @@ UINT8 btm_proc_smp_cback(tSMP_EVT event, BD_ADDR bd_addr, tSMP_EVT_DATA *p_data)
}
else
{
- BTM_TRACE_ERROR0 ("btm_proc_smp_cback: btm_cb.api.p_le_callback ==NULL");
+ BTM_TRACE_ERROR0 ("btm_proc_smp_cback: btm_cb.api.p_le_callback ==NULL");
}
if (event == SMP_COMPLT_EVT)
@@ -1337,7 +1337,7 @@ UINT8 btm_proc_smp_cback(tSMP_EVT event, BD_ADDR bd_addr, tSMP_EVT_DATA *p_data)
res = (p_data->cmplt.reason == SMP_SUCCESS) ? BTM_SUCCESS : BTM_ERR_PROCESSING;
- BTM_TRACE_DEBUG3 ("after update result=%d sec_level=0x%x sec_flags=0x%x",
+ BTM_TRACE_DEBUG3 ("after update result=%d sec_level=0x%x sec_flags=0x%x",
res, p_data->cmplt.sec_level , p_dev_rec->sec_flags );
btm_sec_dev_rec_cback_event(p_dev_rec, res);
@@ -1366,12 +1366,12 @@ UINT8 btm_proc_smp_cback(tSMP_EVT event, BD_ADDR bd_addr, tSMP_EVT_DATA *p_data)
btm_remove_acl(bd_addr);
#endif
- BTM_TRACE_DEBUG3 ("btm_cb pairing_state=%x pairing_flags=%x pin_code_len=%x",
- btm_cb.pairing_state,
+ BTM_TRACE_DEBUG3 ("btm_cb pairing_state=%x pairing_flags=%x pin_code_len=%x",
+ btm_cb.pairing_state,
btm_cb.pairing_flags,
btm_cb.pin_code_len );
BTM_TRACE_DEBUG6 ("btm_cb.pairing_bda %02x:%02x:%02x:%02x:%02x:%02x",
- btm_cb.pairing_bda[0], btm_cb.pairing_bda[1], btm_cb.pairing_bda[2],
+ btm_cb.pairing_bda[0], btm_cb.pairing_bda[1], btm_cb.pairing_bda[2],
btm_cb.pairing_bda[3], btm_cb.pairing_bda[4], btm_cb.pairing_bda[5]);
memset (btm_cb.pairing_bda, 0xff, BD_ADDR_LEN);
@@ -1407,14 +1407,14 @@ UINT8 btm_proc_smp_cback(tSMP_EVT event, BD_ADDR bd_addr, tSMP_EVT_DATA *p_data)
**
** Parameter bd_addr: target device the data to be signed for.
** p_text: singing data
-** len: length of the data to be signed.
-** signature: output parameter where data signature is going to
-** be stored.
+** len: length of the data to be signed.
+** signature: output parameter where data signature is going to
+** be stored.
**
** Returns TRUE if signing sucessul, otherwise FALSE.
**
*******************************************************************************/
-BOOLEAN BTM_BleDataSignature (BD_ADDR bd_addr, UINT8 *p_text, UINT16 len,
+BOOLEAN BTM_BleDataSignature (BD_ADDR bd_addr, UINT8 *p_text, UINT16 len,
BLE_SIGNATURE signature)
{
BOOLEAN ret = FALSE;
@@ -1428,7 +1428,7 @@ BOOLEAN BTM_BleDataSignature (BD_ADDR bd_addr, UINT8 *p_text, UINT16 len,
UINT16 r=1;
UINT8 *p=temp, *p_mac = (UINT8 *)signature;
tSMP_ENC output;
- BT_OCTET16 local_csrk;
+ BT_OCTET16 local_csrk;
BTM_TRACE_DEBUG0 ("BTM_BleDataSignature");
if (p_rec == NULL)
@@ -1439,7 +1439,7 @@ BOOLEAN BTM_BleDataSignature (BD_ADDR bd_addr, UINT8 *p_text, UINT16 len,
{
if ((p_buf = (UINT8 *)GKI_getbuf((UINT16)(len + 4))) != NULL)
{
- BTM_TRACE_DEBUG0("Start to generate Local CSRK");
+ BTM_TRACE_DEBUG0("Start to generate Local CSRK");
/* prepare plain text */
if (p_text)
{
@@ -1472,30 +1472,30 @@ BOOLEAN BTM_BleDataSignature (BD_ADDR bd_addr, UINT8 *p_text, UINT16 len,
if (!SMP_Encrypt(er, BT_OCTET16_LEN, temp, 4, &output))
{
- BTM_TRACE_ERROR0("Local CSRK generation failed ");
+ BTM_TRACE_ERROR0("Local CSRK generation failed ");
}
else
{
- BTM_TRACE_DEBUG0("local CSRK generation success");
- memcpy((void *)local_csrk, output.param_buf, BT_OCTET16_LEN);
+ BTM_TRACE_DEBUG0("local CSRK generation success");
+ memcpy((void *)local_csrk, output.param_buf, BT_OCTET16_LEN);
#if BTM_BLE_CONFORMANCE_TESTING == TRUE
if (btm_cb.devcb.enable_test_local_sign_cntr)
{
- UINT32_TO_STREAM(p_mac, btm_cb.devcb.test_local_sign_cntr);
+ UINT32_TO_STREAM(p_mac, btm_cb.devcb.test_local_sign_cntr);
}
else
{
- UINT32_TO_STREAM(p_mac, p_rec->ble.keys.local_counter);
+ UINT32_TO_STREAM(p_mac, p_rec->ble.keys.local_counter);
}
#else
- UINT32_TO_STREAM(p_mac, p_rec->ble.keys.local_counter);
+ UINT32_TO_STREAM(p_mac, p_rec->ble.keys.local_counter);
#endif
if ((ret = AES_CMAC(local_csrk, p_buf, (UINT16)(len + 4), BTM_CMAC_TLEN_SIZE, p_mac)) == TRUE)
{
- btm_ble_increment_sign_ctr(bd_addr, TRUE);
+ btm_ble_increment_sign_ctr(bd_addr, TRUE);
#if BTM_BLE_CONFORMANCE_TESTING == TRUE
if ( btm_cb.devcb.enable_test_mac_val)
@@ -1506,9 +1506,9 @@ BOOLEAN BTM_BleDataSignature (BD_ADDR bd_addr, UINT8 *p_text, UINT16 len,
#endif
}
BTM_TRACE_DEBUG1("BTM_BleDataSignature p_mac = %d", p_mac);
- BTM_TRACE_DEBUG4("p_mac[0] = 0x%02x p_mac[1] = 0x%02x p_mac[2] = 0x%02x p_mac[3] = 0x%02x",
+ BTM_TRACE_DEBUG4("p_mac[0] = 0x%02x p_mac[1] = 0x%02x p_mac[2] = 0x%02x p_mac[3] = 0x%02x",
*p_mac, *(p_mac + 1), *(p_mac + 2), *(p_mac + 3));
- BTM_TRACE_DEBUG4("p_mac[4] = 0x%02x p_mac[5] = 0x%02x p_mac[6] = 0x%02x p_mac[7] = 0x%02x",
+ BTM_TRACE_DEBUG4("p_mac[4] = 0x%02x p_mac[5] = 0x%02x p_mac[6] = 0x%02x p_mac[7] = 0x%02x",
*(p_mac + 4), *(p_mac + 5), *(p_mac + 6), *(p_mac + 7));
GKI_freebuf(p_buf);
@@ -1528,9 +1528,9 @@ BOOLEAN BTM_BleDataSignature (BD_ADDR bd_addr, UINT8 *p_text, UINT16 len,
**
** Parameter bd_addr: target device the data to be signed for.
** p_orig: original data before signature.
-** len: length of the signing data
+** len: length of the signing data
** counter: counter used when doing data signing
-** p_comp: signature to be compared against.
+** p_comp: signature to be compared against.
** Returns TRUE if signature verified correctly; otherwise FALSE.
**
@@ -1558,7 +1558,7 @@ BOOLEAN BTM_BleVerifySignature (BD_ADDR bd_addr, UINT8 *p_orig, UINT16 len, UINT
else
{
BTM_TRACE_DEBUG2 ("BTM_BleVerifySignature rcv_cnt=%d >= expected_cnt=%d", counter, p_rec->ble.keys.counter);
-
+
if (AES_CMAC(p_rec->ble.keys.csrk, p_orig, len, BTM_CMAC_TLEN_SIZE, p_mac))
{
if (memcmp(p_mac, p_comp, BTM_CMAC_TLEN_SIZE) == 0)
@@ -1580,9 +1580,9 @@ BOOLEAN BTM_BleVerifySignature (BD_ADDR bd_addr, UINT8 *p_orig, UINT16 len, UINT
**
** Function btm_notify_new_key
**
-** Description This function is to notify application new keys have been
+** Description This function is to notify application new keys have been
** generated.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1621,7 +1621,7 @@ static void btm_notify_new_key(UINT8 key_type)
**
** Description This function is called when ER is generated, store it in
** local control block.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1647,7 +1647,7 @@ static void btm_ble_process_er2(tBTM_RAND_ENC *p)
**
** Description This function is called when ER is generated, store it in
** local control block.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1677,7 +1677,7 @@ static void btm_ble_process_er(tBTM_RAND_ENC *p)
**
** Description This function is called when IRK is generated, store it in
** local control block.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1706,9 +1706,9 @@ static void btm_ble_process_irk(tSMP_ENC *p)
** Function btm_ble_process_dhk
**
** Description This function is called when DHK is calculated, store it in
-** local control block, and proceed to generate ER, a 128-bits
+** local control block, and proceed to generate ER, a 128-bits
** random number.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1726,7 +1726,7 @@ static void btm_ble_process_dhk(tSMP_ENC *p)
BTM_TRACE_DEBUG0("BLE DHK generated.");
/* IRK = D1(IR, 1) */
- if (!SMP_Encrypt(btm_cb.devcb.id_keys.ir, BT_OCTET16_LEN, &btm_ble_irk_pt,
+ if (!SMP_Encrypt(btm_cb.devcb.id_keys.ir, BT_OCTET16_LEN, &btm_ble_irk_pt,
1, &output))
{
/* reset all identity root related key */
@@ -1751,7 +1751,7 @@ static void btm_ble_process_dhk(tSMP_ENC *p)
**
** Description This function is called when IR is generated, proceed to calculate
** DHK = Eir({0x03, 0, 0 ...})
-**
+**
**
** Returns void
**
@@ -1771,9 +1771,9 @@ static void btm_ble_process_ir2(tBTM_RAND_ENC *p)
/* generate DHK= Eir({0x03, 0x00, 0x00 ...}) */
- SMP_Encrypt(btm_cb.devcb.id_keys.ir, BT_OCTET16_LEN, &btm_ble_dhk_pt,
- 1, &output);
- btm_ble_process_dhk(&output);
+ SMP_Encrypt(btm_cb.devcb.id_keys.ir, BT_OCTET16_LEN, &btm_ble_dhk_pt,
+ 1, &output);
+ btm_ble_process_dhk(&output);
BTM_TRACE_DEBUG0("BLE IR generated.");
}
@@ -1790,7 +1790,7 @@ static void btm_ble_process_ir2(tBTM_RAND_ENC *p)
**
** Description This function is called when IR is generated, proceed to calculate
** DHK = Eir({0x02, 0, 0 ...})
-**
+**
**
** Returns void
**
@@ -1817,7 +1817,7 @@ static void btm_ble_process_ir(tBTM_RAND_ENC *p)
** Function btm_ble_reset_id
**
** Description This function is called to reset LE device identity.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1837,9 +1837,9 @@ void btm_ble_reset_id( void )
**
** Function btm_ble_set_no_disc_if_pair_fail
**
-** Description This function indicates that whether no disconnect of the ACL
+** Description This function indicates that whether no disconnect of the ACL
** should be used if pairing failed
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1854,7 +1854,7 @@ void btm_ble_set_no_disc_if_pair_fail(BOOLEAN disable_disc )
** Function btm_ble_set_test_mac_value
**
** Description This function set test MAC value
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1870,16 +1870,16 @@ void btm_ble_set_test_mac_value(BOOLEAN enable, UINT8 *p_test_mac_val )
** Function btm_ble_set_test_local_sign_cntr_value
**
** Description This function set test local sign counter value
-**
+**
** Returns void
**
*******************************************************************************/
void btm_ble_set_test_local_sign_cntr_value(BOOLEAN enable, UINT32 test_local_sign_cntr )
{
- BTM_TRACE_DEBUG2 ("btm_ble_set_test_local_sign_cntr_value enable=%d local_sign_cntr=%d",
+ BTM_TRACE_DEBUG2 ("btm_ble_set_test_local_sign_cntr_value enable=%d local_sign_cntr=%d",
enable, test_local_sign_cntr);
btm_cb.devcb.enable_test_local_sign_cntr = enable;
- btm_cb.devcb.test_local_sign_cntr = test_local_sign_cntr;
+ btm_cb.devcb.test_local_sign_cntr = test_local_sign_cntr;
}
#endif /* BTM_BLE_CONFORMANCE_TESTING */
diff --git a/stack/btm/btm_ble_addr.c b/stack/btm/btm_ble_addr.c
index c73f967..08a3018 100644
--- a/stack/btm/btm_ble_addr.c
+++ b/stack/btm/btm_ble_addr.c
@@ -26,22 +26,22 @@
**
** Function btm_gen_resolve_paddr_cmpl
**
-** Description This is callback functioin when resolvable private address
+** Description This is callback functioin when resolvable private address
** generation is complete.
-**
+**
** Returns void
**
*******************************************************************************/
-static void btm_gen_resolve_paddr_cmpl(tSMP_ENC *p)
+static void btm_gen_resolve_paddr_cmpl(tSMP_ENC *p)
{
tBTM_LE_RANDOM_CB *p_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb;
tBTM_BLE_INQ_CB *p_inq_cb = &btm_cb.ble_ctr_cb.inq_var;
BTM_TRACE_EVENT0 ("btm_gen_resolve_paddr_cmpl");
if (p && p->param_buf)
{
- /* get the high bytes of the random address */
- p_cb->private_addr[2] = p->param_buf[0];
- p_cb->private_addr[1] = p->param_buf[1];
+ /* get the high bytes of the random address */
+ p_cb->private_addr[2] = p->param_buf[0];
+ p_cb->private_addr[1] = p->param_buf[1];
p_cb->private_addr[0] = p->param_buf[2];
/* mask off the 1st MSB */
p_cb->private_addr[0] &= 0xfe;
@@ -54,8 +54,8 @@ static void btm_gen_resolve_paddr_cmpl(tSMP_ENC *p)
/* start a periodical timer to refresh random addr */
btu_stop_timer(&p_cb->raddr_timer_ent);
- btu_start_timer (&p_cb->raddr_timer_ent, BTU_TTYPE_BLE_RANDOM_ADDR,
- BTM_BLE_PRIVATE_ADDR_INT);
+ btu_start_timer (&p_cb->raddr_timer_ent, BTU_TTYPE_BLE_RANDOM_ADDR,
+ BTM_BLE_PRIVATE_ADDR_INT);
/* if adv is active, restart adv with new private addr */
if (p_inq_cb->adv_mode == BTM_BLE_ADV_ENABLE)
@@ -63,12 +63,12 @@ static void btm_gen_resolve_paddr_cmpl(tSMP_ENC *p)
btsnd_hcic_ble_set_adv_enable (BTM_BLE_ADV_DISABLE);
btsnd_hcic_ble_write_adv_params (p_inq_cb->adv_interval_min,
- p_inq_cb->adv_interval_max,
- p_inq_cb->evt_type,
- p_inq_cb->own_addr_type,
- p_inq_cb->direct_bda.type,
+ p_inq_cb->adv_interval_max,
+ p_inq_cb->evt_type,
+ p_inq_cb->own_addr_type,
+ p_inq_cb->direct_bda.type,
p_inq_cb->direct_bda.bda,
- p_inq_cb->adv_chnl_map,
+ p_inq_cb->adv_chnl_map,
p_inq_cb->afp);
}
}
@@ -84,7 +84,7 @@ static void btm_gen_resolve_paddr_cmpl(tSMP_ENC *p)
**
** Description This function is called when random address has generate the
** random number base for low 3 byte bd address.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -97,8 +97,8 @@ static void btm_gen_resolve_paddr_low(tBTM_RAND_ENC *p)
BTM_TRACE_EVENT0 ("btm_gen_resolve_paddr_low");
if (p && p->param_buf)
{
- p_cb->private_addr[5] = p->param_buf[0];
- p_cb->private_addr[4] = p->param_buf[1];
+ p_cb->private_addr[5] = p->param_buf[0];
+ p_cb->private_addr[4] = p->param_buf[1];
p_cb->private_addr[3] = p->param_buf[2];
/* encrypt with ur IRK */
@@ -133,9 +133,9 @@ void btm_gen_resolvable_private_addr (void)
**
** Function btm_gen_non_resolve_paddr_cmpl
**
-** Description This is the callback function when non-resolvable private
+** Description This is the callback function when non-resolvable private
** function is generated and write to controller.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -157,7 +157,7 @@ static void btm_gen_non_resolve_paddr_cmpl(tBTM_RAND_ENC *p)
}
else
{
- BTM_TRACE_DEBUG0("btm_gen_non_resolvable_private_addr failed");
+ BTM_TRACE_DEBUG0("btm_gen_non_resolvable_private_addr failed");
}
}
/*******************************************************************************
@@ -165,7 +165,7 @@ static void btm_gen_non_resolve_paddr_cmpl(tBTM_RAND_ENC *p)
** Function btm_gen_non_resolvable_private_addr
**
** Description This function generate a non-resolvable private address.
-**
+**
**
** Returns void
**
@@ -188,7 +188,7 @@ void btm_gen_non_resolvable_private_addr (void)
**
** Description This function sends the random address resolving complete
** callback.
-**
+**
** Returns None.
**
*******************************************************************************/
@@ -211,7 +211,7 @@ static void btm_ble_resolve_address_cmpl(void)
**
** Description This function compares the X with random address 3 MSO bytes
** to find a match, if not match, continue for next record.
-**
+**
** Returns None.
**
*******************************************************************************/
@@ -243,8 +243,8 @@ static BOOLEAN btm_ble_proc_resolve_x(tSMP_ENC *p)
**
** Description This function match the random address to the appointed device
** record, starting from calculating IRK. If record index exceed
-** the maximum record number, matching failed and send callback.
-**
+** the maximum record number, matching failed and send callback.
+**
** Returns None.
**
*******************************************************************************/
@@ -272,8 +272,8 @@ static BOOLEAN btm_ble_match_random_bda(UINT16 rec_index)
if ((p_dev_rec->device_type == BT_DEVICE_TYPE_BLE) &&
(p_dev_rec->ble.key_type & BTM_LE_KEY_PID))
{
- /* generate X = E irk(R0, R1, R2) and R is random address 3 LSO */
- SMP_Encrypt(p_dev_rec->ble.keys.irk, BT_OCTET16_LEN,
+ /* generate X = E irk(R0, R1, R2) and R is random address 3 LSO */
+ SMP_Encrypt(p_dev_rec->ble.keys.irk, BT_OCTET16_LEN,
&rand[0], 3, &output);
return btm_ble_proc_resolve_x(&output);
}
@@ -296,13 +296,13 @@ static BOOLEAN btm_ble_match_random_bda(UINT16 rec_index)
** Function btm_ble_resolve_random_addr
**
** Description This function is called to resolve a random address.
-**
-** Returns pointer to the security record of the device whom a random
+**
+** Returns pointer to the security record of the device whom a random
** address is matched to.
**
*******************************************************************************/
void btm_ble_resolve_random_addr(BD_ADDR random_bda, tBTM_BLE_RESOLVE_CBACK * p_cback, void *p)
-{
+{
tBTM_LE_RANDOM_CB *p_mgnt_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb;
BTM_TRACE_EVENT0 ("btm_ble_resolve_random_addr");
@@ -310,7 +310,7 @@ void btm_ble_resolve_random_addr(BD_ADDR random_bda, tBTM_BLE_RESOLVE_CBACK * p_
{
p_mgnt_cb->p = p;
p_mgnt_cb->busy = TRUE;
- p_mgnt_cb->index = 0;
+ p_mgnt_cb->index = 0;
p_mgnt_cb->p_resolve_cback = p_cback;
memcpy(p_mgnt_cb->random_bda, random_bda, BD_ADDR_LEN);
/* start to resolve random address */
@@ -342,7 +342,7 @@ tBLE_ADDR_TYPE btm_ble_map_bda_to_conn_bda(BD_ADDR bd_addr)
{
tBTM_SEC_DEV_REC *p_dev_rec = NULL;
BTM_TRACE_EVENT0 ("btm_ble_map_bda_to_conn_bda");
- if ((p_dev_rec = btm_find_dev (bd_addr)) != NULL &&
+ if ((p_dev_rec = btm_find_dev (bd_addr)) != NULL &&
p_dev_rec->device_type == BT_DEVICE_TYPE_BLE)
{
if (p_dev_rec->ble.ble_addr_type != BLE_ADDR_PUBLIC)
@@ -358,7 +358,7 @@ tBLE_ADDR_TYPE btm_ble_map_bda_to_conn_bda(BD_ADDR bd_addr)
**
** Function btm_ble_map_bda_to_pseudo_bda
**
-** Description This function map a BD address to a pseudo address when the
+** Description This function map a BD address to a pseudo address when the
** address given is a random address.
**
*******************************************************************************/
diff --git a/stack/btm/btm_ble_bgconn.c b/stack/btm/btm_ble_bgconn.c
index 84c8421..bf574ab 100644
--- a/stack/btm/btm_ble_bgconn.c
+++ b/stack/btm/btm_ble_bgconn.c
@@ -33,12 +33,12 @@ void btm_update_scanner_filter_policy(tBTM_BLE_SFP scan_policy)
{
tBTM_BLE_INQ_CB *p_inq = &btm_cb.ble_ctr_cb.inq_var;
BTM_TRACE_EVENT0 ("btm_update_scanner_filter_policy");
- btm_cb.ble_ctr_cb.inq_var.sfp = scan_policy;
+ btm_cb.ble_ctr_cb.inq_var.sfp = scan_policy;
btsnd_hcic_ble_set_scan_params ((UINT8)((p_inq->scan_type == BTM_BLE_SCAN_MODE_NONE) ? BTM_BLE_SCAN_MODE_ACTI: p_inq->scan_type),
- (UINT16)(!p_inq->scan_interval ? BTM_BLE_GAP_DISC_SCAN_INT : p_inq->scan_interval),
+ (UINT16)(!p_inq->scan_interval ? BTM_BLE_GAP_DISC_SCAN_INT : p_inq->scan_interval),
(UINT16)(!p_inq->scan_window ? BTM_BLE_GAP_DISC_SCAN_WIN : p_inq->scan_window),
- BLE_ADDR_PUBLIC,
+ BLE_ADDR_PUBLIC,
scan_policy);
}
/*******************************************************************************
@@ -65,7 +65,7 @@ BOOLEAN btm_update_dev_to_white_list(BOOLEAN to_add, BD_ADDR bd_addr, tBLE_ADDR_
tBTM_BLE_CB *p_cb = &btm_cb.ble_ctr_cb;
tBTM_SEC_DEV_REC *p_dev_rec;
BD_ADDR dummy_bda = {0};
- BOOLEAN started = FALSE, suspend = FALSE;
+ BOOLEAN started = FALSE, suspend = FALSE;
if (btm_cb.btm_inq_vars.inq_active)
{
@@ -73,7 +73,7 @@ BOOLEAN btm_update_dev_to_white_list(BOOLEAN to_add, BD_ADDR bd_addr, tBLE_ADDR_
btsnd_hcic_ble_set_scan_enable (BTM_BLE_SCAN_DISABLE, BTM_BLE_DUPLICATE_ENABLE);
}
- if ((p_dev_rec = btm_find_dev (bd_addr)) != NULL &&
+ if ((p_dev_rec = btm_find_dev (bd_addr)) != NULL &&
p_dev_rec->device_type == BT_DEVICE_TYPE_BLE)
{
BTM_TRACE_DEBUG0("btm_update_dev_to_white_list 1");
@@ -87,7 +87,7 @@ BOOLEAN btm_update_dev_to_white_list(BOOLEAN to_add, BD_ADDR bd_addr, tBLE_ADDR_
if ( p_dev_rec->ble.ble_addr_type == BLE_ADDR_PUBLIC)
- {
+ {
if (to_add)
started = btsnd_hcic_ble_add_white_list (BLE_ADDR_PUBLIC, bd_addr);
else
@@ -152,7 +152,7 @@ void btm_ble_clear_white_list_complete(UINT8 *p_data, UINT16 evt_len)
UINT8 status;
BTM_TRACE_EVENT0 ("btm_ble_clear_white_list_complete");
STREAM_TO_UINT8 (status, p_data);
-
+
if (status == HCI_SUCCESS)
p_cb->num_empty_filter = p_cb->max_filter_entries;
@@ -281,7 +281,7 @@ BOOLEAN btm_update_bg_conn_list(BOOLEAN to_add, BD_ADDR bd_addr)
**
** Function btm_write_bg_conn_wl
**
-** Description This function write background connection device list into
+** Description This function write background connection device list into
** controller.
*******************************************************************************/
void btm_write_bg_conn_wl(void)
@@ -304,8 +304,8 @@ void btm_write_bg_conn_wl(void)
**
** Description This function is to start/stop auto connection procedure.
**
-** Parameters start: TRUE to start; FALSE to stop.
-**
+** Parameters start: TRUE to start; FALSE to stop.
+**
** Returns void
**
*******************************************************************************/
@@ -318,7 +318,7 @@ BOOLEAN btm_ble_start_auto_conn(BOOLEAN start)
scan_int = (p_cb->scan_int == BTM_BLE_CONN_PARAM_UNDEF) ? BTM_BLE_CONN_EST_SCAN_INT : p_cb->scan_int;
scan_win = (p_cb->scan_win == BTM_BLE_CONN_PARAM_UNDEF) ? BTM_BLE_CONN_EST_SCAN_WIND : p_cb->scan_win;
-
+
if (start)
{
if (!l2cb.is_ble_connecting &&
@@ -331,7 +331,7 @@ BOOLEAN btm_ble_start_auto_conn(BOOLEAN start)
0x01, /* UINT8 white_list */
BLE_ADDR_PUBLIC, /* UINT8 addr_type_peer */
dummy_bda, /* BD_ADDR bda_peer */
- BLE_ADDR_PUBLIC, /* UINT8 addr_type_own */
+ BLE_ADDR_PUBLIC, /* UINT8 addr_type_own */
BTM_BLE_CONN_INT_MIN_DEF, /* UINT16 conn_int_min */
BTM_BLE_CONN_INT_MAX_DEF, /* UINT16 conn_int_max */
BTM_BLE_CONN_SLAVE_LATENCY_DEF, /* UINT16 conn_latency */
@@ -349,7 +349,7 @@ BOOLEAN btm_ble_start_auto_conn(BOOLEAN start)
}
}
else
- exec = FALSE;
+ exec = FALSE;
}
else
{
@@ -370,10 +370,10 @@ BOOLEAN btm_ble_start_auto_conn(BOOLEAN start)
**
** Description This function is to start/stop selective connection procedure.
**
-** Parameters start: TRUE to start; FALSE to stop.
-** p_select_cback: callback function to return application
+** Parameters start: TRUE to start; FALSE to stop.
+** p_select_cback: callback function to return application
** selection.
-**
+**
** Returns BOOLEAN: selective connectino procedure is started.
**
*******************************************************************************/
@@ -388,7 +388,7 @@ BOOLEAN btm_ble_start_select_conn(BOOLEAN start,tBTM_BLE_SEL_CBACK *p_select_c
scan_win = (p_cb->scan_win == BTM_BLE_CONN_PARAM_UNDEF) ? BTM_BLE_CONN_EST_SCAN_WIND : p_cb->scan_win;
if (start)
- {
+ {
if (!btm_cb.btm_inq_vars.inq_active)
{
btm_cb.ble_ctr_cb.p_select_cback = p_select_cback;
@@ -408,7 +408,7 @@ BOOLEAN btm_ble_start_select_conn(BOOLEAN start,tBTM_BLE_SEL_CBACK *p_select_c
BTM_TRACE_ERROR0("peripheral device cannot initiate a selective connection");
return FALSE;
}
- else if (p_cb->bg_conn_dev_num > 0 && btm_ble_count_unconn_dev_in_whitelist() > 0 )
+ else if (p_cb->bg_conn_dev_num > 0 && btm_ble_count_unconn_dev_in_whitelist() > 0 )
{
if (!btsnd_hcic_ble_set_scan_enable(TRUE, TRUE)) /* duplicate filtering enabled */
@@ -451,10 +451,10 @@ BOOLEAN btm_ble_start_select_conn(BOOLEAN start,tBTM_BLE_SEL_CBACK *p_select_c
**
** Description This function is to start/stop selective connection procedure.
**
-** Parameters start: TRUE to start; FALSE to stop.
-** p_select_cback: callback function to return application
+** Parameters start: TRUE to start; FALSE to stop.
+** p_select_cback: callback function to return application
** selection.
-**
+**
** Returns BOOLEAN: selective connectino procedure is started.
**
*******************************************************************************/
@@ -478,7 +478,7 @@ void btm_ble_initiate_select_conn(BD_ADDR bda)
** procedure.
**
** Parameters none.
-**
+**
** Returns none.
**
*******************************************************************************/
@@ -501,7 +501,7 @@ void btm_ble_suspend_bg_sele_conn(void)
** procedure.
**
** Parameters none.
-**
+**
** Returns none.
**
*******************************************************************************/
@@ -520,7 +520,7 @@ void btm_ble_suspend_bg_conn(void)
**
** Function btm_ble_scan_param_idle
**
-** Description This function is to process the scan parameter idle timeout
+** Description This function is to process the scan parameter idle timeout
** timeout.
********************************************************************************/
void btm_ble_scan_param_idle(void)
@@ -535,7 +535,7 @@ void btm_ble_scan_param_idle(void)
** procedure.
**
** Parameters none.
-**
+**
** Returns none.
**
*******************************************************************************/
@@ -552,11 +552,11 @@ BOOLEAN btm_ble_resume_bg_conn(tBTM_BLE_SEL_CBACK *p_sele_callback, BOOLEAN def_
p_cb->scan_win = BTM_BLE_CONN_PARAM_UNDEF;
/* start scan param idle timer */
- btu_start_timer(&p_cb->scan_param_idle_timer,
- BTU_TTYPE_BLE_SCAN_PARAM_IDLE,
+ btu_start_timer(&p_cb->scan_param_idle_timer,
+ BTU_TTYPE_BLE_SCAN_PARAM_IDLE,
BTM_BLE_SCAN_PARAM_TOUT);
- }
-
+ }
+
if (p_cb->bg_conn_type == BTM_BLE_CONN_AUTO)
ret = btm_ble_start_auto_conn(TRUE);
@@ -575,7 +575,7 @@ BOOLEAN btm_ble_resume_bg_conn(tBTM_BLE_SEL_CBACK *p_sele_callback, BOOLEAN def_
if (ret)
p_cb->bg_conn_state = BLE_BG_CONN_ACTIVE;
-
+
}
return ret;
@@ -587,7 +587,7 @@ BOOLEAN btm_ble_resume_bg_conn(tBTM_BLE_SEL_CBACK *p_sele_callback, BOOLEAN def_
** Description This function is to update the bg connection status.
**
** Parameters none.
-**
+**
** Returns none.
**
*******************************************************************************/
diff --git a/stack/btm/btm_ble_gap.c b/stack/btm/btm_ble_gap.c
index 9911cb5..9092d5d 100644
--- a/stack/btm/btm_ble_gap.c
+++ b/stack/btm/btm_ble_gap.c
@@ -27,9 +27,9 @@
#define BTM_BLE_NAME_CMPL 0x02
#define BTM_BLE_FILTER_TARGET_UNKNOWN 0xff
-#define BTM_BLE_POLICY_UNKNOWN 0xff
+#define BTM_BLE_POLICY_UNKNOWN 0xff
-#define BLE_RESOLVE_ADDR_MSB 0x40 /* most significant bit, bit7, bit6 is 01 to be resolvable random */
+#define BLE_RESOLVE_ADDR_MSB 0x40 /* most significant bit, bit7, bit6 is 01 to be resolvable random */
#define BLE_RESOLVE_ADDR_MASK 0xc0 /* bit 6, and bit7 */
#define BTM_BLE_IS_RESOLVE_BDA(x) ((x[0] & BLE_RESOLVE_ADDR_MASK) == BLE_RESOLVE_ADDR_MSB)
@@ -60,7 +60,7 @@ static UINT8 *btm_ble_build_adv_data(tBTM_BLE_AD_MASK *p_data_mask, UINT8 **p_ds
** Description This function is called to reset ULP controller.
**
** Parameters None.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -73,16 +73,16 @@ void BTM_BleReset(void)
**
** Function BTM_BleObserve
**
-** Description This procedure keep the device listening for advertising
-** events from a broadcast device.
+** Description This procedure keep the device listening for advertising
+** events from a broadcast device.
**
** Parameters start: start or stop observe.
** white_list: use white list in observer mode or not.
-**
+**
** Returns void
**
*******************************************************************************/
-tBTM_STATUS BTM_BleObserve(BOOLEAN start, UINT8 duration,
+tBTM_STATUS BTM_BleObserve(BOOLEAN start, UINT8 duration,
tBTM_INQ_RESULTS_CB *p_results_cb, tBTM_CMPL_CB *p_cmpl_cb)
{
tBTM_BLE_INQ_CB *p_inq = &btm_cb.ble_ctr_cb.inq_var;
@@ -100,7 +100,7 @@ tBTM_STATUS BTM_BleObserve(BOOLEAN start, UINT8 duration,
/* allow config scanning type */
if (btsnd_hcic_ble_set_scan_params ((UINT8)((p_inq->scan_type == BTM_BLE_SCAN_MODE_NONE) ? BTM_BLE_SCAN_MODE_ACTI: p_inq->scan_type),
- (UINT16)(!p_inq->scan_interval ? BTM_BLE_GAP_DISC_SCAN_INT : p_inq->scan_interval),
+ (UINT16)(!p_inq->scan_interval ? BTM_BLE_GAP_DISC_SCAN_INT : p_inq->scan_interval),
(UINT16)(!p_inq->scan_window ? BTM_BLE_GAP_DISC_SCAN_WIN : p_inq->scan_window),
BLE_ADDR_PUBLIC,
BTM_BLE_DEFAULT_SFP)) /* assume observe always not using white list */
@@ -115,7 +115,7 @@ tBTM_STATUS BTM_BleObserve(BOOLEAN start, UINT8 duration,
if (duration != 0)
{
/* start inquiry timer */
- btu_start_timer (&p_inq->inq_timer_ent, BTU_TTYPE_BLE_INQUIRY, duration);
+ btu_start_timer (&p_inq->inq_timer_ent, BTU_TTYPE_BLE_INQUIRY, duration);
}
}
}
@@ -132,10 +132,10 @@ tBTM_STATUS BTM_BleObserve(BOOLEAN start, UINT8 duration,
**
** Function BTM_BleBroadcast
**
-** Description This function is to start or stop broadcasting.
+** Description This function is to start or stop broadcasting.
**
** Parameters start: start or stop broadcasting.
-**
+**
** Returns status.
**
*******************************************************************************/
@@ -143,12 +143,12 @@ tBTM_STATUS BTM_BleBroadcast(BOOLEAN start)
{
tBTM_STATUS status = BTM_NO_RESOURCES;
tBTM_BLE_INQ_CB *p_cb = &btm_cb.ble_ctr_cb.inq_var;
- UINT8 evt_type = p_cb->scan_rsp ? BTM_BLE_DISCOVER_EVT: BTM_BLE_NON_CONNECT_EVT;
+ UINT8 evt_type = p_cb->scan_rsp ? BTM_BLE_DISCOVER_EVT: BTM_BLE_NON_CONNECT_EVT;
#ifdef BTM_BLE_PC_ADV_TEST_MODE
if (BTM_BLE_PC_ADV_TEST_MODE)
{
- evt_type = p_cb->scan_rsp ? BTM_BLE_CONNECT_EVT: BTM_BLE_NON_CONNECT_EVT;
+ evt_type = p_cb->scan_rsp ? BTM_BLE_CONNECT_EVT: BTM_BLE_NON_CONNECT_EVT;
}
#endif
@@ -156,11 +156,11 @@ tBTM_STATUS BTM_BleBroadcast(BOOLEAN start)
{
/* update adv params */
if (!btsnd_hcic_ble_write_adv_params ((UINT16)(p_cb->adv_interval_min ? p_cb->adv_interval_min : BTM_BLE_GAP_ADV_INT),
- (UINT16)(p_cb->adv_interval_max ? p_cb->adv_interval_max : BTM_BLE_GAP_ADV_INT),
- evt_type,
- p_cb->own_addr_type,
+ (UINT16)(p_cb->adv_interval_max ? p_cb->adv_interval_max : BTM_BLE_GAP_ADV_INT),
+ evt_type,
+ p_cb->own_addr_type,
p_cb->direct_bda.type, p_cb->direct_bda.bda,
- p_cb->adv_chnl_map,
+ p_cb->adv_chnl_map,
p_cb->afp))
status = BTM_NO_RESOURCES;
@@ -186,7 +186,7 @@ tBTM_STATUS BTM_BleBroadcast(BOOLEAN start)
else
{
status = BTM_WRONG_MODE;
- BTM_TRACE_ERROR2("Can not %s Broadcast, device %s in Broadcast mode",
+ BTM_TRACE_ERROR2("Can not %s Broadcast, device %s in Broadcast mode",
(start ? "Start" : "Stop"), (start ? "alerady" :"not"));
}
@@ -203,12 +203,12 @@ tBTM_STATUS BTM_BleBroadcast(BOOLEAN start)
**
** Function BTM_RegisterScanReqEvt
**
-** Description This function is called to register a scan request callback
+** Description This function is called to register a scan request callback
** on the advertiser.
**
** Parameters p_scan_req_cback: scan request callback. If NULL, remove the
-** registration.
-**
+** registration.
+**
** Returns void
**
*******************************************************************************/
@@ -226,11 +226,11 @@ void BTM_RegisterScanReqEvt(tBTM_BLE_SCAN_REQ_CBACK *p_scan_req_cback)
**
** Function BTM_BleConfigPrivacy
**
-** Description This function is called to enable or disable the privacy in
+** Description This function is called to enable or disable the privacy in
** the local device.
**
-** Parameters enable: TRUE to enable it; FALSE to disable it.
-**
+** Parameters enable: TRUE to enable it; FALSE to disable it.
+**
** Returns void
**
*******************************************************************************/
@@ -245,17 +245,17 @@ void BTM_BleConfigPrivacy(BOOLEAN enable)
**
** Function BTM_BleSetBgConnType
**
-** 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.
-**
+**
** Returns void
**
*******************************************************************************/
-BOOLEAN BTM_BleSetBgConnType(tBTM_BLE_CONN_TYPE bg_conn_type,
+BOOLEAN BTM_BleSetBgConnType(tBTM_BLE_CONN_TYPE bg_conn_type,
tBTM_BLE_SEL_CBACK *p_select_cback)
{
BOOLEAN started = TRUE;
@@ -275,7 +275,7 @@ BOOLEAN BTM_BleSetBgConnType(tBTM_BLE_CONN_TYPE bg_conn_type,
{
btm_ble_start_auto_conn(FALSE);
}
- started = btm_ble_start_select_conn(TRUE, p_select_cback);
+ started = btm_ble_start_select_conn(TRUE, p_select_cback);
break;
case BTM_BLE_CONN_NONE:
@@ -313,7 +313,7 @@ BOOLEAN BTM_BleSetBgConnType(tBTM_BLE_CONN_TYPE bg_conn_type,
**
** Parameters add_remove: TRUE to add; FALSE to remove.
** remote_bda: device address to add/remove.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -366,12 +366,12 @@ BOOLEAN BTM_BleUpdateBgConnDev(BOOLEAN add_remove, BD_ADDR remote_bda)
**
** Function BTM_BleSetConnMode
**
-** 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 directed: is directed connectable mode, or non-directed.
-** p_dir_bda: connectable direct initiator's LE device address
-**
+** p_dir_bda: connectable direct initiator's LE device address
+**
** Returns void
**
*******************************************************************************/
@@ -423,13 +423,13 @@ tBTM_STATUS BTM_BleSetConnMode(BOOLEAN directed, tBLE_BD_ADDR *p_dir_bda)
**
** Parameters adv_int_min: minimum advertising interval
** adv_int_max: maximum advertising interval
-** p_dir_bda: connectable direct initiator's LE device address
+** p_dir_bda: connectable direct initiator's LE device address
** chnl_map: advertising channel map.
-**
+**
** Returns void
**
*******************************************************************************/
-tBTM_STATUS BTM_BleSetAdvParams(UINT16 adv_int_min, UINT16 adv_int_max,
+tBTM_STATUS BTM_BleSetAdvParams(UINT16 adv_int_min, UINT16 adv_int_max,
tBLE_BD_ADDR *p_dir_bda,
tBTM_BLE_ADV_CHNL_MAP chnl_map)
{
@@ -474,16 +474,16 @@ tBTM_STATUS BTM_BleSetAdvParams(UINT16 adv_int_min, UINT16 adv_int_max,
else
/* update adv params */
if (!btsnd_hcic_ble_write_adv_params (p_cb->adv_interval_min,
- p_cb->adv_interval_max,
- p_cb->evt_type,
- p_cb->own_addr_type,
- p_cb->direct_bda.type,
+ p_cb->adv_interval_max,
+ p_cb->evt_type,
+ p_cb->own_addr_type,
+ p_cb->direct_bda.type,
p_cb->direct_bda.bda,
- p_cb->adv_chnl_map,
+ p_cb->adv_chnl_map,
p_cb->afp))
status = BTM_NO_RESOURCES;
-
+
else if (!btsnd_hcic_ble_set_adv_enable (BTM_BLE_ADV_ENABLE))
{
p_cb->adv_mode = BTM_BLE_ADV_DISABLE;
@@ -504,9 +504,9 @@ tBTM_STATUS BTM_BleSetAdvParams(UINT16 adv_int_min, UINT16 adv_int_max,
**
** Parameters adv_int_min: minimum advertising interval
** adv_int_max: maximum advertising interval
-** p_dir_bda: connectable direct initiator's LE device address
+** p_dir_bda: connectable direct initiator's LE device address
** chnl_map: advertising channel map.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -536,10 +536,10 @@ void BTM_BleReadAdvParams (UINT16 *adv_int_min, UINT16 *adv_int_max,
**
** Parameters adv_int_min: minimum advertising interval
** adv_int_max: maximum advertising interval
-** p_dir_bda: connectable direct initiator's LE device address
+** p_dir_bda: connectable direct initiator's LE device address
** chnl_map: advertising channel map.
** scan_type: active scan or passive scan
-**
+**
** Returns void
**
*******************************************************************************/
@@ -548,7 +548,7 @@ void BTM_BleSetScanParams(UINT16 scan_interval, UINT16 scan_window, tBTM_BLE_SCA
tBTM_BLE_INQ_CB *p_cb = &btm_cb.ble_ctr_cb.inq_var;
BTM_TRACE_EVENT0 (" BTM_BleSetScanParams");
-
+
if (BTM_BLE_VALID_PRAM(scan_interval, BTM_BLE_SCAN_INT_MIN, BTM_BLE_SCAN_INT_MAX) &&
BTM_BLE_VALID_PRAM(scan_window, BTM_BLE_SCAN_WIN_MIN, BTM_BLE_SCAN_WIN_MAX) &&
(scan_mode == BTM_BLE_SCAN_MODE_ACTI || scan_mode == BTM_BLE_SCAN_MODE_PASS))
@@ -563,7 +563,7 @@ void BTM_BleSetScanParams(UINT16 scan_interval, UINT16 scan_window, tBTM_BLE_SCA
}
else
{
- BTM_TRACE_ERROR2("Illegal params: scan_interval = %d scan_window = %d",
+ BTM_TRACE_ERROR2("Illegal params: scan_interval = %d scan_window = %d",
scan_interval, scan_window);
}
@@ -576,14 +576,14 @@ void BTM_BleSetScanParams(UINT16 scan_interval, UINT16 scan_window, tBTM_BLE_SCA
** Description This function is called to write LE scan response.
**
** Parameters: p_scan_rsp: scan response information.
-**
+**
** Returns void
**
*******************************************************************************/
tBTM_STATUS BTM_BleWriteScanRsp(tBTM_BLE_AD_MASK data_mask, tBTM_BLE_ADV_DATA *p_data)
{
tBTM_STATUS status = BTM_NO_RESOURCES;
- UINT8 rsp_data[BTM_BLE_AD_DATA_LEN],
+ UINT8 rsp_data[BTM_BLE_AD_DATA_LEN],
*p = rsp_data;
BTM_TRACE_EVENT0 (" BTM_BleWriteScanRsp");
@@ -592,7 +592,7 @@ tBTM_STATUS BTM_BleWriteScanRsp(tBTM_BLE_AD_MASK data_mask, tBTM_BLE_ADV_DATA *p
if (btsnd_hcic_ble_set_scan_rsp_data((UINT8)(p - rsp_data), rsp_data))
{
- status = BTM_SUCCESS;
+ status = BTM_SUCCESS;
if (p_data != NULL)
btm_cb.ble_ctr_cb.inq_var.scan_rsp = TRUE;
@@ -612,7 +612,7 @@ tBTM_STATUS BTM_BleWriteScanRsp(tBTM_BLE_AD_MASK data_mask, tBTM_BLE_ADV_DATA *p
** Description This function is called to write advertising data.
**
** Parameters: None.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -638,7 +638,7 @@ tBTM_STATUS BTM_BleWriteAdvData(tBTM_BLE_AD_MASK data_mask, tBTM_BLE_ADV_DATA *p
p_cb_data->data_mask &= ~mask;
- if (btsnd_hcic_ble_set_adv_data((UINT8)(p_cb_data->p_pad - p_cb_data->ad_data),
+ if (btsnd_hcic_ble_set_adv_data((UINT8)(p_cb_data->p_pad - p_cb_data->ad_data),
p_cb_data->ad_data))
return BTM_SUCCESS;
else
@@ -656,7 +656,7 @@ tBTM_STATUS BTM_BleWriteAdvData(tBTM_BLE_AD_MASK data_mask, tBTM_BLE_ADV_DATA *p
** type - finding ADV data type
** p_length - return the length of ADV data not including type
**
-** Returns pointer of ADV data
+** Returns pointer of ADV data
**
*******************************************************************************/
UINT8 *BTM_CheckAdvData( UINT8 *p_adv, UINT8 type, UINT8 *p_length)
@@ -695,7 +695,7 @@ UINT8 *BTM_CheckAdvData( UINT8 *p_adv, UINT8 type, UINT8 *p_length)
static UINT8 *btm_ble_build_adv_data(tBTM_BLE_AD_MASK *p_data_mask, UINT8 **p_dst, tBTM_BLE_ADV_DATA *p_data)
{
UINT16 data_mask = *p_data_mask;
- UINT8 *p = *p_dst,
+ UINT8 *p = *p_dst,
*p_flag = NULL;
UINT16 len = BTM_BLE_AD_DATA_LEN, cp_len = 0;
UINT8 i = 0;
@@ -736,14 +736,14 @@ static UINT8 *btm_ble_build_adv_data(tBTM_BLE_AD_MASK *p_data_mask, UINT8 **p_ds
cp_len = (UINT16)strlen(btm_cb.cfg.bd_name);
*p++ = cp_len + 1;
*p++ = BTM_BLE_AD_TYPE_NAME_CMPL;
- ARRAY_TO_STREAM(p, btm_cb.cfg.bd_name, cp_len);
+ ARRAY_TO_STREAM(p, btm_cb.cfg.bd_name, cp_len);
}
len -= (cp_len + 2);
data_mask &= ~BTM_BLE_AD_BIT_DEV_NAME;
}
/* manufacturer data */
- if (len > 2 && data_mask & BTM_BLE_AD_BIT_MANU &&
+ if (len > 2 && data_mask & BTM_BLE_AD_BIT_MANU &&
p_data && p_data->manu.len != 0 && p_data->manu.p_val)
{
if (p_data->manu.len > (len - 2))
@@ -777,13 +777,13 @@ static UINT8 *btm_ble_build_adv_data(tBTM_BLE_AD_MASK *p_data_mask, UINT8 **p_ds
{
cp_len = (len - 2)/2;
*p ++ = 1 + cp_len * 2;
- *p++ = BTM_BLE_AD_TYPE_SRV_PART;
+ *p++ = BTM_BLE_AD_TYPE_SRV_PART;
}
else
{
cp_len = p_data->services.num_service;
*p++ = 1 + cp_len * 2;
- *p++ = BTM_BLE_AD_TYPE_SRV_CMPL;
+ *p++ = BTM_BLE_AD_TYPE_SRV_CMPL;
}
for (i = 0; i < cp_len; i ++)
{
@@ -820,7 +820,7 @@ static UINT8 *btm_ble_build_adv_data(tBTM_BLE_AD_MASK *p_data_mask, UINT8 **p_ds
}
else
break;
- }
+ }
if (i == p_data->attr.num_attr)
data_mask &= ~BTM_BLE_AD_BIT_ATTR;
}
@@ -861,7 +861,7 @@ static UINT8 *btm_ble_build_adv_data(tBTM_BLE_AD_MASK *p_data_mask, UINT8 **p_ds
** Description This function is called to set BLE discoverable mode.
**
** Parameters: mode: discoverability mode.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -906,13 +906,13 @@ tBTM_STATUS btm_ble_set_discoverability(UINT16 combined_mode)
{
BTM_TRACE_EVENT0 ("mode == BTM_BLE_NON_DISCOVERABLE ");
- if (p_cb->connectable_mode == BTM_BLE_NON_CONNECTABLE)
+ if (p_cb->connectable_mode == BTM_BLE_NON_CONNECTABLE)
{
p_cb->br_edr_supported_flag = 0;
BTM_TRACE_EVENT0 ("always disable adv in non-discoverable non-connectable mode if no scan rsp ");
if (!p_cb->scan_rsp )
- new_mode = BTM_BLE_ADV_DISABLE;
+ new_mode = BTM_BLE_ADV_DISABLE;
}
else
{
@@ -943,11 +943,11 @@ tBTM_STATUS btm_ble_set_discoverability(UINT16 combined_mode)
/* update adv params */
if (!btsnd_hcic_ble_write_adv_params ((UINT16)(p_cb->adv_interval_min ? p_cb->adv_interval_min : BTM_BLE_GAP_ADV_INT),
- (UINT16)(p_cb->adv_interval_max ? p_cb->adv_interval_max : BTM_BLE_GAP_ADV_INT),
- evt_type,
- p_cb->own_addr_type,
+ (UINT16)(p_cb->adv_interval_max ? p_cb->adv_interval_max : BTM_BLE_GAP_ADV_INT),
+ evt_type,
+ p_cb->own_addr_type,
p_cb->direct_bda.type, p_cb->direct_bda.bda,
- p_cb->adv_chnl_map,
+ p_cb->adv_chnl_map,
p_cb->afp))
status = BTM_NO_RESOURCES;
@@ -969,8 +969,8 @@ tBTM_STATUS btm_ble_set_discoverability(UINT16 combined_mode)
{
BTM_TRACE_EVENT1 ("start timer for limited disc mode duration=%d (30 secs)", BTM_BLE_GAP_LIM_TOUT);
/* start Tgap(lim_timeout) */
- btu_start_timer (&p_cb->inq_timer_ent, BTU_TTYPE_BLE_GAP_LIM_DISC,
- BTM_BLE_GAP_LIM_TOUT);
+ btu_start_timer (&p_cb->inq_timer_ent, BTU_TTYPE_BLE_GAP_LIM_DISC,
+ BTM_BLE_GAP_LIM_TOUT);
}
return status;
}
@@ -982,7 +982,7 @@ tBTM_STATUS btm_ble_set_discoverability(UINT16 combined_mode)
** Description This function is called to set BLE connectability mode.
**
** Parameters: mode: connectability mode.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -992,10 +992,10 @@ tBTM_STATUS btm_ble_set_connectability(UINT16 combined_mode)
UINT16 mode = (combined_mode & BTM_BLE_CONNECTABLE_MASK);
UINT8 cur_flag = 0;
UINT8 cur_br_edr_not_sup_flag;
- UINT8 new_flag;
+ UINT8 new_flag;
UINT8 new_mode = BTM_BLE_ADV_ENABLE;
UINT8 evt_type = (p_cb->scan_rsp) ? BTM_BLE_DISCOVER_EVT: BTM_BLE_NON_CONNECT_EVT;
- tBTM_STATUS status = BTM_SUCCESS;
+ tBTM_STATUS status = BTM_SUCCESS;
BTM_TRACE_EVENT2 ("btm_ble_set_connectability mode=0x%0x combined_mode=0x%x", mode, combined_mode);
@@ -1051,12 +1051,12 @@ tBTM_STATUS btm_ble_set_connectability(UINT16 combined_mode)
}
if (!btsnd_hcic_ble_write_adv_params ((UINT16)(p_cb->adv_interval_min ? p_cb->adv_interval_min : BTM_BLE_GAP_ADV_INT),
- (UINT16)(p_cb->adv_interval_max ? p_cb->adv_interval_max : BTM_BLE_GAP_ADV_INT),
- evt_type,
- p_cb->own_addr_type,
- p_cb->direct_bda.type,
+ (UINT16)(p_cb->adv_interval_max ? p_cb->adv_interval_max : BTM_BLE_GAP_ADV_INT),
+ evt_type,
+ p_cb->own_addr_type,
+ p_cb->direct_bda.type,
p_cb->direct_bda.bda,
- p_cb->adv_chnl_map,
+ p_cb->adv_chnl_map,
p_cb->afp))
status = BTM_NO_RESOURCES;
else
@@ -1088,7 +1088,7 @@ tBTM_STATUS btm_ble_set_connectability(UINT16 combined_mode)
** p_results_cb - callback returning pointer to results (tBTM_INQ_RESULTS)
** p_cmpl_cb - callback indicating the end of an inquiry
**
-**
+**
**
** Returns BTM_CMD_STARTED if successfully started
** BTM_ILLEGAL_VALUE if a bad parameter is detected
@@ -1117,15 +1117,15 @@ tBTM_STATUS btm_ble_start_inquiry (UINT8 mode, UINT8 duration)
if (btsnd_hcic_ble_set_scan_enable (BTM_BLE_SCAN_ENABLE, BTM_BLE_DUPLICATE_DISABLE))
{
status = BTM_SUCCESS;
- p_inq->proc_mode = mode;
+ p_inq->proc_mode = mode;
if (duration != 0)
{
/* start inquiry timer */
- btu_start_timer (&p_inq->inq_timer_ent, BTU_TTYPE_BLE_INQUIRY, duration);
+ btu_start_timer (&p_inq->inq_timer_ent, BTU_TTYPE_BLE_INQUIRY, duration);
}
}
-
+
return status;
}
@@ -1134,7 +1134,7 @@ tBTM_STATUS btm_ble_start_inquiry (UINT8 mode, UINT8 duration)
** Function btm_ble_read_remote_name_cmpl
**
** Description This function is called when BLE remote name is received.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1159,11 +1159,11 @@ void btm_ble_read_remote_name_cmpl(BOOLEAN status, BD_ADDR bda, UINT16 length, c
**
** Function btm_ble_read_remote_name
**
-** Description This function read remote LE device name using GATT read
+** Description This function read remote LE device name using GATT read
** procedure.
**
** Parameters: None.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1205,7 +1205,7 @@ tBTM_STATUS btm_ble_read_remote_name(BD_ADDR remote_bda, tBTM_INQ_INFO *p_cur, t
** Description This function cancel read remote LE device name.
**
** Parameters: None.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1231,7 +1231,7 @@ BOOLEAN btm_ble_cancel_remote_name(BD_ADDR remote_bda)
** data.
**
** Parameters: None.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1261,11 +1261,11 @@ static void btm_ble_update_adv_flag(UINT8 flag)
*p++ = 2;
*p++ = BTM_BLE_AD_TYPE_FLAG;
p_adv_data->p_flags = p;
- *p++ = flag;
+ *p++ = flag;
p_adv_data->p_pad = p;
}
- if (btsnd_hcic_ble_set_adv_data((UINT8)(p_adv_data->p_pad - p_adv_data->ad_data),
+ if (btsnd_hcic_ble_set_adv_data((UINT8)(p_adv_data->p_pad - p_adv_data->ad_data),
p_adv_data->ad_data))
p_adv_data->data_mask |= BTM_BLE_AD_BIT_FLAGS;
@@ -1281,12 +1281,12 @@ static void btm_ble_update_adv_flag(UINT8 flag)
** Returns pointer to entry, or NULL if not found
**
*******************************************************************************/
-static void btm_ble_parse_adv_data(tBTM_INQ_INFO *p_info, UINT8 *p_data,
+static void btm_ble_parse_adv_data(tBTM_INQ_INFO *p_info, UINT8 *p_data,
UINT8 len, tBTM_BLE_INQ_DATA *p_adv_data, UINT8 *p_buf)
{
UINT8 *p_cur = p_data;
UINT8 ad_len, ad_type, ad_flag;
- tBTM_BLE_ATTR *p_attr;
+ tBTM_BLE_ATTR *p_attr;
BTM_TRACE_EVENT0 (" btm_ble_parse_adv_data");
@@ -1312,7 +1312,7 @@ static void btm_ble_parse_adv_data(tBTM_INQ_INFO *p_info, UINT8 *p_data,
BTM_BLE_NAME_SHORT: BTM_BLE_NAME_CMPL;
memcpy(p_info->remote_name, p_cur, ad_len -1);
p_info->remote_name[ad_len] = 0;
- p_adv_data->p_remote_name = p_info->remote_name;
+ p_adv_data->p_remote_name = p_info->remote_name;
p_info->remote_name_len = p_adv_data->remote_name_len = ad_len - 1;
BTM_TRACE_DEBUG1("BTM_BLE_AD_TYPE_NAME name = %s",p_adv_data->p_remote_name);
}
@@ -1375,7 +1375,7 @@ static void btm_ble_parse_adv_data(tBTM_INQ_INFO *p_info, UINT8 *p_data,
**
** Function btm_ble_cache_adv_data
**
-** Description Update advertising cache data.
+** Description Update advertising cache data.
**
** Returns void
**
@@ -1421,7 +1421,7 @@ void btm_ble_cache_adv_data(tBTM_INQ_RESULTS *p_cur, UINT8 data_len, UINT8 *p, U
** Description check ADV flag to make sure device is discoverable and match
** the search condition
**
-** Parameters
+** Parameters
**
** Returns void
**
@@ -1448,14 +1448,14 @@ BOOLEAN btm_ble_is_discoverable(BD_ADDR bda, UINT8 evt_type, UINT8 *p)
BTM_TRACE_DEBUG0("BD ADDR does not meet filter condition");
return FALSE;
}
-
+
/* scan response does not include the flag */
if (evt_type == BTM_BLE_SCAN_RSP_EVT)
return FALSE;
if (data_len > BTM_BLE_ADV_DATA_LEN_MAX)
{
- BTM_TRACE_WARNING1("ADV data too long %d. discard", data_len);
+ BTM_TRACE_WARNING1("ADV data too long %d. discard", data_len);
return FALSE;
}
@@ -1464,30 +1464,30 @@ BOOLEAN btm_ble_is_discoverable(BD_ADDR bda, UINT8 evt_type, UINT8 *p)
if ((p_flag = BTM_CheckAdvData(p, BTM_BLE_AD_TYPE_FLAG, &data_len)) != NULL)
{
flag = * p_flag;
-
+
if ((btm_cb.ble_ctr_cb.inq_var.proc_mode == BTM_BLE_GENERAL_INQUIRY) &&
(flag & (BTM_BLE_LIMIT_DISC_FLAG|BTM_BLE_GEN_DISC_FLAG)) != 0)
{
- BTM_TRACE_DEBUG0("Find Generable Discoverable device");
+ BTM_TRACE_DEBUG0("Find Generable Discoverable device");
is_discoverable = TRUE;
}
else if (btm_cb.ble_ctr_cb.inq_var.proc_mode == BTM_BLE_LIMITED_INQUIRY &&
(flag & BTM_BLE_LIMIT_DISC_FLAG) != 0)
{
- BTM_TRACE_DEBUG0("Find limited discoverable device");
+ BTM_TRACE_DEBUG0("Find limited discoverable device");
is_discoverable = TRUE;
}
-
+
}
}
-
+
if (!is_discoverable)
{
BTM_TRACE_ERROR1("discoverable flag not desired: %d", flag);
}
- return is_discoverable;
+ return is_discoverable;
}
/*******************************************************************************
**
@@ -1495,7 +1495,7 @@ BOOLEAN btm_ble_is_discoverable(BD_ADDR bda, UINT8 evt_type, UINT8 *p)
**
** Description Update adv packet information into inquiry result.
**
-** Parameters
+** Parameters
**
** Returns void
**
@@ -1515,7 +1515,7 @@ BOOLEAN btm_ble_update_inq_result(tINQ_DB_ENT *p_i, UINT8 addr_type, UINT8 evt_t
if (data_len > BTM_BLE_ADV_DATA_LEN_MAX)
{
- BTM_TRACE_WARNING1("EIR data too long %d. discard", data_len);
+ BTM_TRACE_WARNING1("EIR data too long %d. discard", data_len);
return FALSE;
}
btm_ble_cache_adv_data(p_cur, data_len, p, evt_type);
@@ -1557,12 +1557,12 @@ BOOLEAN btm_ble_update_inq_result(tINQ_DB_ENT *p_i, UINT8 addr_type, UINT8 evt_t
/* if BR/EDR not supported is not set, assume is a DUMO device */
if ((p_cur->flag & BTM_BLE_BREDR_NOT_SPT) == 0)
{
- BTM_TRACE_ERROR0("BR/EDR NOT support bit not set, treat as DUMO");
+ BTM_TRACE_ERROR0("BR/EDR NOT support bit not set, treat as DUMO");
p_cur->device_type |= BT_DEVICE_TYPE_DUMO;
}
else
{
- BTM_TRACE_DEBUG0("BR/EDR NOT SUPPORT bit set, LE only device");
+ BTM_TRACE_DEBUG0("BR/EDR NOT SUPPORT bit set, LE only device");
}
return to_report;
@@ -1575,7 +1575,7 @@ BOOLEAN btm_ble_update_inq_result(tINQ_DB_ENT *p_i, UINT8 addr_type, UINT8 evt_t
**
** Description send selection connection request callback.
**
-** Parameters
+** Parameters
**
** Returns void
**
@@ -1585,13 +1585,13 @@ void btm_send_sel_conn_callback(BD_ADDR remote_bda, UINT8 evt_type, UINT8 *p_dat
UINT8 data_len, len;
UINT8 *p_dev_name, remname[31] = {0};
- if (btm_cb.ble_ctr_cb.p_select_cback == NULL ||
+ if (btm_cb.ble_ctr_cb.p_select_cback == NULL ||
/* non-connectable device */
(evt_type != BTM_BLE_EVT_CONN_ADV && evt_type != BTM_BLE_EVT_CONN_DIR_ADV))
return;
STREAM_TO_UINT8 (data_len, p_data);
-
+
/* get the device name if exist in ADV data */
if (data_len != 0)
{
@@ -1615,7 +1615,7 @@ void btm_send_sel_conn_callback(BD_ADDR remote_bda, UINT8 evt_type, UINT8 *p_dat
**
** Function btm_ble_resolve_random_addr_cmpl
**
-** Description resolve random address complete callback.
+** Description resolve random address complete callback.
**
** Returns void
**
@@ -1648,17 +1648,17 @@ static void btm_ble_resolve_random_addr_cmpl(void * p_rec, void *p)
btm_ble_process_adv_pkt_cont(bda, addr_type, evt_type, pp);
return;
-}
+}
/*******************************************************************************
**
** Function btm_ble_process_adv_pkt
**
-** Description This function is called when adv packet report events are
-** received from the device. It updates the inquiry database.
+** Description This function is called when adv packet report events are
+** received from the device. It updates the inquiry database.
** If the inquiry database is full, the oldest entry is discarded.
**
-** Parameters
+** Parameters
**
** Returns void
**
@@ -1688,9 +1688,9 @@ void btm_ble_process_adv_pkt (UINT8 *p_data)
#endif
/* Only process the results if the inquiry is still active */
- if (!btm_cb.btm_inq_vars.inq_active &&
+ if (!btm_cb.btm_inq_vars.inq_active &&
(btm_cb.ble_ctr_cb.bg_conn_type != BTM_BLE_CONN_SELECTIVE ||
- /* or selective auto connection is active */
+ /* or selective auto connection is active */
btm_cb.ble_ctr_cb.p_select_cback == NULL))
return;
@@ -1709,10 +1709,10 @@ void btm_ble_process_adv_pkt (UINT8 *p_data)
**
** Function btm_ble_process_adv_pkt_cont
**
-** Description This function is called after random address resolution is
+** Description This function is called after random address resolution is
** done, and proceed to process adv packet.
**
-** Parameters
+** Parameters
**
** Returns void
**
@@ -1731,11 +1731,11 @@ static void btm_ble_process_adv_pkt_cont(BD_ADDR bda, UINT8 addr_type, UINT8 evt
if (btm_inq_find_bdaddr(bda))
{
/* never been report as an LE device */
- if ((p_i &&
+ if ((p_i &&
(!(p_i->inq_info.results.device_type & BT_DEVICE_TYPE_BLE) ||
/* scan repsonse to be updated */
(!p_i->scan_rsp)))
- ||
+ ||
btm_cb.ble_ctr_cb.inq_var.proc_mode == BTM_BLE_OBSERVE)
{
BTM_TRACE_DEBUG0("update new BLE information ");
@@ -1761,7 +1761,7 @@ static void btm_ble_process_adv_pkt_cont(BD_ADDR bda, UINT8 addr_type, UINT8 evt
{
if ((p_i = btm_inq_db_new (bda)) != NULL)
{
- p_inq->inq_cmpl_info.num_resp++;
+ p_inq->inq_cmpl_info.num_resp++;
BTM_TRACE_DEBUG0("adv pkt process: new record is added into inq db");
to_report = TRUE;
}
@@ -1776,7 +1776,7 @@ static void btm_ble_process_adv_pkt_cont(BD_ADDR bda, UINT8 addr_type, UINT8 evt
}
else if (p_i->inq_count != p_inq->inq_counter) /* first time seen in this inquiry */
{
- p_inq->inq_cmpl_info.num_resp++;
+ p_inq->inq_cmpl_info.num_resp++;
}
/* update the LE device information in inquiry database */
@@ -1787,7 +1787,7 @@ static void btm_ble_process_adv_pkt_cont(BD_ADDR bda, UINT8 addr_type, UINT8 evt
#if BTM_USE_INQ_RESULTS_FILTER == TRUE
/* If the number of responses found and limited, issue a cancel inquiry */
- if (p_inq->inqparms.max_resps &&
+ if (p_inq->inqparms.max_resps &&
p_inq->inq_cmpl_info.num_resp == p_inq->inqparms.max_resps)
{
/* new device */
@@ -1795,7 +1795,7 @@ static void btm_ble_process_adv_pkt_cont(BD_ADDR bda, UINT8 addr_type, UINT8 evt
(/* assume a DUMO device, BR/EDR inquiry is always active */
p_i && p_i->inq_info.results.device_type == BT_DEVICE_TYPE_BLE && p_i->scan_rsp))
{
- BTM_TRACE_WARNING0("INQ RES: Extra Response Received...cancelling inquiry..");
+ BTM_TRACE_WARNING0("INQ RES: Extra Response Received...cancelling inquiry..");
if (!(p_inq->inq_active & BTM_PERIODIC_INQUIRY_ACTIVE) )
btsnd_hcic_inq_cancel();
@@ -1813,11 +1813,11 @@ static void btm_ble_process_adv_pkt_cont(BD_ADDR bda, UINT8 addr_type, UINT8 evt
/* background connection in selective connection mode */
if (btm_cb.ble_ctr_cb.bg_conn_type == BTM_BLE_CONN_SELECTIVE)
{
- btm_send_sel_conn_callback(bda, evt_type, p, addr_type);
+ btm_send_sel_conn_callback(bda, evt_type, p, addr_type);
}
else if (p_inq_results_cb && to_report)
{
- BTM_TRACE_DEBUG0("BTMINQ LE: Found devices, send callback btm_inqrslt_cb");
+ BTM_TRACE_DEBUG0("BTMINQ LE: Found devices, send callback btm_inqrslt_cb");
if (p_inq->inq_active)
(p_inq_results_cb)((tBTM_INQ_RESULTS *) &p_i->inq_info.results, p_le_inq_cb->adv_data_cache);
@@ -1850,7 +1850,7 @@ void btm_ble_stop_scan(void)
btsnd_hcic_ble_set_scan_enable (BTM_BLE_SCAN_DISABLE, BTM_BLE_DUPLICATE_ENABLE);
/* If we have a callback registered for inquiry complete, call it */
- BTM_TRACE_DEBUG2 ("BTM Inq Compl Callback: status 0x%02x, num results %d",
+ BTM_TRACE_DEBUG2 ("BTM Inq Compl Callback: status 0x%02x, num results %d",
p_inq->inq_cmpl_info.status, p_inq->inq_cmpl_info.num_resp);
btm_update_scanner_filter_policy(SP_ADV_ALL);
@@ -1863,7 +1863,7 @@ void btm_ble_stop_scan(void)
**
** Function btm_ble_stop_adv
**
-** Description Stop the BLE advertising.
+** Description Stop the BLE advertising.
**
** Returns void
**
@@ -1920,7 +1920,7 @@ void btm_ble_timeout(TIMER_LIST_ENT *p_tle)
**
** Function btm_ble_connected
**
-** Description This function is when a LE connection to the peer device is
+** Description This function is when a LE connection to the peer device is
** establsihed
**
** Returns void
diff --git a/stack/btm/btm_ble_int.h b/stack/btm/btm_ble_int.h
index 29d231f..b03e124 100644
--- a/stack/btm/btm_ble_int.h
+++ b/stack/btm/btm_ble_int.h
@@ -61,7 +61,7 @@
#define BTM_BLE_SEC_REQ_ACT_NONE 0
#define BTM_BLE_SEC_REQ_ACT_ENCRYPT 1 /* encrypt the link using current key or key refresh */
-#define BTM_BLE_SEC_REQ_ACT_PAIR 2
+#define BTM_BLE_SEC_REQ_ACT_PAIR 2
#define BTM_BLE_SEC_REQ_ACT_DISCARD 3 /* discard the sec request while encryption is started but not completed */
typedef UINT8 tBTM_BLE_SEC_REQ_ACT;
@@ -121,7 +121,7 @@ typedef struct
UINT8 max_bd_entries;
tBLE_BD_ADDR local_bda;
-
+
tBTM_BLE_LOCAL_ADV_DATA adv_data;
tBTM_BLE_ADV_CHNL_MAP adv_chnl_map;
@@ -180,19 +180,19 @@ typedef struct
#define BLE_BG_CONN_IDLE 0
#define BLE_BG_CONN_ACTIVE 1
#define BLE_BG_CONN_SUSPEND 2
-
+
UINT8 bg_conn_state;
/* random address management control block */
tBTM_LE_RANDOM_CB addr_mgnt_cb;
-
+
/* white list information */
UINT8 num_empty_filter; /* Number of entries in white list */
UINT8 max_filter_entries; /* Maximum number of entries that can be stored */
BOOLEAN enabled;
BOOLEAN privacy; /* privacy enabled or disabled */
-#ifdef BTM_BLE_PC_ADV_TEST_MODE
+#ifdef BTM_BLE_PC_ADV_TEST_MODE
tBTM_BLE_SCAN_REQ_CBACK *p_scan_req_cback;
#endif
diff --git a/stack/btm/btm_dev.c b/stack/btm/btm_dev.c
index f6e40dc..f163403 100644
--- a/stack/btm/btm_dev.c
+++ b/stack/btm/btm_dev.c
@@ -36,14 +36,14 @@ static tBTM_SEC_DEV_REC *btm_find_oldest_dev (void);
** dev_class - Device Class
** bd_name - Name of the peer device. NULL if unknown.
** features - Remote device's supported features. NULL if not known
-** trusted_mask - Bitwise OR of services that do not
+** trusted_mask - Bitwise OR of services that do not
** require authorization. (array of UINT32)
** link_key - Connection link key. NULL if unknown.
**
** Returns TRUE if added OK, else FALSE
**
*******************************************************************************/
-BOOLEAN BTM_SecAddDevice (BD_ADDR bd_addr, DEV_CLASS dev_class, BD_NAME bd_name,
+BOOLEAN BTM_SecAddDevice (BD_ADDR bd_addr, DEV_CLASS dev_class, BD_NAME bd_name,
BD_FEATURES features, UINT32 trusted_mask[],
LINK_KEY link_key, UINT8 key_type, tBTM_IO_CAP io_cap)
{
@@ -178,7 +178,7 @@ char *BTM_SecReadDevName (BD_ADDR bd_addr)
**
** Function btm_sec_alloc_dev
**
-** Description Look for the record in the device database for the record
+** Description Look for the record in the device database for the record
** with specified handle
**
** Returns Pointer to the record or NULL
@@ -310,7 +310,7 @@ BOOLEAN btm_dev_support_switch (BD_ADDR bd_addr)
break;
}
}
-
+
/* If we don't know peer's capabilities, assume it supports Role-switch */
if (feature_empty)
{
@@ -327,7 +327,7 @@ BOOLEAN btm_dev_support_switch (BD_ADDR bd_addr)
**
** Function btm_find_dev_by_handle
**
-** Description Look for the record in the device database for the record
+** Description Look for the record in the device database for the record
** with specified handle
**
** Returns Pointer to the record or NULL
@@ -340,7 +340,7 @@ tBTM_SEC_DEV_REC *btm_find_dev_by_handle (UINT16 handle)
for (i = 0; i < BTM_SEC_MAX_DEVICE_RECORDS; i++, p_dev_rec++)
{
- if ((p_dev_rec->sec_flags & BTM_SEC_IN_USE)
+ if ((p_dev_rec->sec_flags & BTM_SEC_IN_USE)
&& (p_dev_rec->hci_handle == handle))
return(p_dev_rec);
}
@@ -351,7 +351,7 @@ tBTM_SEC_DEV_REC *btm_find_dev_by_handle (UINT16 handle)
**
** Function btm_find_dev
**
-** Description Look for the record in the device database for the record
+** Description Look for the record in the device database for the record
** with specified BD address
**
** Returns Pointer to the record or NULL
@@ -366,7 +366,7 @@ tBTM_SEC_DEV_REC *btm_find_dev (BD_ADDR bd_addr)
{
for (i = 0; i < BTM_SEC_MAX_DEVICE_RECORDS; i++, p_dev_rec++)
{
- if ((p_dev_rec->sec_flags & BTM_SEC_IN_USE)
+ if ((p_dev_rec->sec_flags & BTM_SEC_IN_USE)
&& (!memcmp (p_dev_rec->bd_addr, bd_addr, BD_ADDR_LEN)))
return(p_dev_rec);
}
@@ -378,7 +378,7 @@ tBTM_SEC_DEV_REC *btm_find_dev (BD_ADDR bd_addr)
**
** Function btm_find_or_alloc_dev
**
-** Description Look for the record in the device database for the record
+** Description Look for the record in the device database for the record
** with specified BD address
**
** Returns Pointer to the record or NULL
@@ -418,7 +418,7 @@ tBTM_SEC_DEV_REC *btm_find_oldest_dev (void)
/* First look for the non-paired devices for the oldest entry */
for (i = 0; i < BTM_SEC_MAX_DEVICE_RECORDS; i++, p_dev_rec++)
{
- if (((p_dev_rec->sec_flags & BTM_SEC_IN_USE) == 0)
+ if (((p_dev_rec->sec_flags & BTM_SEC_IN_USE) == 0)
|| ((p_dev_rec->sec_flags & BTM_SEC_LINK_KEY_KNOWN) != 0))
continue; /* Device is paired so skip it */
diff --git a/stack/btm/btm_devctl.c b/stack/btm/btm_devctl.c
index 4465f6c..f668caf 100644
--- a/stack/btm/btm_devctl.c
+++ b/stack/btm/btm_devctl.c
@@ -67,19 +67,19 @@ extern BOOLEAN BTA_PRM_CHECK_FW_VER(UINT8 *p);
#define BTM_AFTER_RESET_TIMEOUT 0
#endif
-/* Internal baseband so the parameters such as local features, version etc. are known
+/* Internal baseband so the parameters such as local features, version etc. are known
so there is no need to issue HCI commands and wait for responses at BTM initialization */
#ifndef BTM_INTERNAL_BB
#define BTM_INTERNAL_BB FALSE
#endif
-/* The local version information in the format specified in the HCI read local version
+/* The local version information in the format specified in the HCI read local version
response message */
#ifndef BTM_INTERNAL_LOCAL_VER
#define BTM_INTERNAL_LOCAL_VER {0x00, 0x01, 0x05, 0x81, 0x01, 0x30, 0x00, 0x40, 0x8D}
#endif
-/* The local features information in the format specified in the HCI read local features
+/* The local features information in the format specified in the HCI read local features
response message */
#ifndef BTM_INTERNAL_LOCAL_FEA
#define BTM_INTERNAL_LOCAL_FEA {0x00, 0xFF, 0xF9, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00}
@@ -239,7 +239,7 @@ void btm_dev_absent (void)
** Function BTM_DeviceReset
**
** Description This function is called to reset the HCI. Callback function
-** if provided is called when startup of the device is
+** if provided is called when startup of the device is
** completed.
**
** Returns void
@@ -300,7 +300,7 @@ BOOLEAN BTM_IsDeviceUp (void)
*******************************************************************************/
tBTM_STATUS BTM_SetAfhChannels (UINT8 first, UINT8 last)
{
- BTM_TRACE_API4 ("BTM_SetAfhChannels first: %d (%d) last: %d (%d)",
+ BTM_TRACE_API4 ("BTM_SetAfhChannels first: %d (%d) last: %d (%d)",
first, btm_cb.first_disabled_channel, last,
btm_cb.last_disabled_channel);
@@ -377,9 +377,9 @@ void BTM_ContinueReset (void)
**
*******************************************************************************/
static void btm_dev_reset (void)
-{
+{
btm_cb.devcb.state = BTM_DEV_STATE_WAIT_RESET_CMPLT;
-
+
/* flush out the command complete queue and command transmit queue */
btu_hcif_flush_cmd_queue();
@@ -403,12 +403,12 @@ static void btm_dev_reset (void)
*******************************************************************************/
void btm_get_hci_buf_size (void)
{
-
+
btu_start_timer (&btm_cb.devcb.reset_timer, BTU_TTYPE_BTM_DEV_CTL, BTM_DEV_REPLY_TIMEOUT);
/* Send a Read Buffer Size message to the Host Controller. */
btsnd_hcic_read_buffer_size ();
-
+
}
#if BLE_INCLUDED == TRUE
/*******************************************************************************
@@ -425,7 +425,7 @@ void btm_read_ble_wl_size(void)
BTM_TRACE_DEBUG0("btm_read_ble_wl_size ");
btu_start_timer (&btm_cb.devcb.reset_timer, BTU_TTYPE_BTM_DEV_CTL, BTM_DEV_REPLY_TIMEOUT);
- /* Send a Read Buffer Size message to the Host Controller. */
+ /* Send a Read Buffer Size message to the Host Controller. */
btsnd_hcic_ble_read_white_list_size();
}
/*******************************************************************************
@@ -457,7 +457,7 @@ void btm_get_ble_buffer_size(void)
*******************************************************************************/
void btm_get_local_version (void)
{
-
+
btu_start_timer (&btm_cb.devcb.reset_timer, BTU_TTYPE_BTM_DEV_CTL, BTM_DEV_REPLY_TIMEOUT);
/* Send a Read Local Version message to the Host Controller. */
@@ -467,7 +467,7 @@ void btm_get_local_version (void)
#if BTM_PWR_MGR_INCLUDED == TRUE
btm_pm_reset();
#endif
-
+
}
/*******************************************************************************
@@ -521,7 +521,7 @@ void btm_dev_timeout (TIMER_LIST_ENT *p_tle)
**
** Description This function is called when command complete for HCI_Reset
** is received. It does not make sense to send next command
-** because device is resetting after command complete is
+** because device is resetting after command complete is
** received. Just start timer and set required state.
**
** Returns void
@@ -641,7 +641,7 @@ void btm_after_reset_hold_complete (void)
**
** Function btm_read_hci_buf_size_complete
**
-** Description This function is called when command complete for
+** Description This function is called when command complete for
** get HCI buffer size is received. Start timer and send
** read local featues request
**
@@ -705,7 +705,7 @@ void btm_read_hci_buf_size_complete (UINT8 *p, UINT16 evt_len)
**
** Function btm_read_ble_buf_size_complete
**
-** Description This function is called when command complete for
+** Description This function is called when command complete for
** get HCI buffer size is received. Start timer and send
** read local featues request
**
@@ -791,7 +791,7 @@ void btm_read_local_version_complete (UINT8 *p, UINT16 evt_len)
STREAM_TO_UINT8 (status, p);
if (status == HCI_SUCCESS)
{
-
+
STREAM_TO_UINT8 (p_vi->hci_version, p);
STREAM_TO_UINT16 (p_vi->hci_revision, p);
STREAM_TO_UINT8 (p_vi->lmp_version, p);
@@ -847,7 +847,7 @@ void btm_read_local_features_complete (UINT8 *p, UINT16 evt_len)
{
/* stop guard timer to avoid accidental timeout */
btu_stop_timer(&p_devcb->reset_timer);
-
+
p_devcb->state = BTM_DEV_STATE_READY;
/* Extract features and create "btm_acl_pkt_types_supported" flag
@@ -865,10 +865,10 @@ void btm_read_local_features_complete (UINT8 *p, UINT16 evt_len)
BTM_ACL_PKT_TYPES_MASK_DM3);
if (HCI_5_SLOT_PACKETS_SUPPORTED(p_devcb->local_features))
- btm_cb.btm_acl_pkt_types_supported |= (BTM_ACL_PKT_TYPES_MASK_DH5 +
+ btm_cb.btm_acl_pkt_types_supported |= (BTM_ACL_PKT_TYPES_MASK_DH5 +
BTM_ACL_PKT_TYPES_MASK_DM5);
- /* _NO_X_DXX masks are reserved before ver 2.0.
+ /* _NO_X_DXX masks are reserved before ver 2.0.
Set them only for later versions of controller */
if (btm_cb.devcb.local_version.hci_version >= HCI_PROTO_VERSION_2_0)
{
@@ -902,7 +902,7 @@ void btm_read_local_features_complete (UINT8 *p, UINT16 evt_len)
}
}
- BTM_TRACE_DEBUG1("Local supported ACL packet types: 0x%04x",
+ BTM_TRACE_DEBUG1("Local supported ACL packet types: 0x%04x",
btm_cb.btm_acl_pkt_types_supported);
/* Create (e)SCO supported packet types mask
@@ -960,7 +960,7 @@ void btm_read_local_features_complete (UINT8 *p, UINT16 evt_len)
}
#endif
- BTM_TRACE_DEBUG1("Local supported SCO packet types: 0x%04x",
+ BTM_TRACE_DEBUG1("Local supported SCO packet types: 0x%04x",
btm_cb.btm_sco_pkt_types_supported);
/* Create Default Policy Settings
@@ -1113,7 +1113,7 @@ tBTM_STATUS BTM_SetLocalDeviceName (char *p_name)
** Returns status of the operation
** If success, BTM_SUCCESS is returned and p_name points stored
** local device name
-** If BTM doesn't store local device name, BTM_NO_RESOURCES is
+** If BTM doesn't store local device name, BTM_NO_RESOURCES is
** is returned and p_name is set to NULL
**
*******************************************************************************/
@@ -1133,7 +1133,7 @@ tBTM_STATUS BTM_ReadLocalDeviceName (char **p_name)
**
** Function BTM_ReadLocalDeviceNameFromController
**
-** Description Get local device name from controller. Do not use cached
+** Description Get local device name from controller. Do not use cached
** name (used to get chip-id prior to btm reset complete).
**
** Returns BTM_CMD_STARTED if successful, otherwise an error
@@ -1145,12 +1145,12 @@ tBTM_STATUS BTM_ReadLocalDeviceNameFromController (tBTM_CMPL_CB *p_rln_cmpl_cbac
if (btm_cb.devcb.p_rln_cmpl_cb)
return(BTM_NO_RESOURCES);
- /* Save callback */
+ /* Save callback */
btm_cb.devcb.p_rln_cmpl_cb = p_rln_cmpl_cback;
-
+
btsnd_hcic_read_name();
btu_start_timer (&btm_cb.devcb.rln_timer, BTU_TTYPE_BTM_DEV_CTL, BTM_DEV_REPLY_TIMEOUT);
-
+
return BTM_CMD_STARTED;
}
@@ -1288,7 +1288,7 @@ tBTM_STATUS BTM_SetDeviceClass (DEV_CLASS dev_class)
if (!btsnd_hcic_write_dev_class (dev_class))
return (BTM_NO_RESOURCES);
- return (BTM_SUCCESS);
+ return (BTM_SUCCESS);
}
@@ -1337,7 +1337,7 @@ UINT8 *BTM_ReadBrcmFeatures (void)
/*******************************************************************************
**
-** Function BTM_RegisterForDeviceStatusNotif
+** Function BTM_RegisterForDeviceStatusNotif
**
** Description This function is called to register for device status
** change notifications.
@@ -1359,7 +1359,7 @@ tBTM_DEV_STATUS_CB *BTM_RegisterForDeviceStatusNotif (tBTM_DEV_STATUS_CB *p_cb)
/*******************************************************************************
**
-** Function BTM_VendorSpecificCommand
+** Function BTM_VendorSpecificCommand
**
** Description Send a vendor specific HCI command to the controller.
**
@@ -1408,7 +1408,7 @@ tBTM_STATUS BTM_VendorSpecificCommand(UINT16 opcode, UINT8 param_len,
**
** Returns void
**
-*******************************************************************************/
+*******************************************************************************/
void btm_vsc_complete (UINT8 *p, UINT16 opcode, UINT16 evt_len,
tBTM_CMPL_CB *p_vsc_cplt_cback)
{
@@ -1487,9 +1487,9 @@ tBTM_STATUS BTM_RegisterForVSEvents (tBTM_VS_EVT_CB *p_cb, BOOLEAN is_register)
/*******************************************************************************
**
-** Function btm_vendor_specific_evt
+** Function btm_vendor_specific_evt
**
-** Description Process event HCI_VENDOR_SPECIFIC_EVT
+** Description Process event HCI_VENDOR_SPECIFIC_EVT
**
** Note: Some controllers do not send command complete, so
** the callback and busy flag are cleared here also.
@@ -1513,12 +1513,12 @@ void btm_vendor_specific_evt (UINT8 *p, UINT8 evt_len)
/*******************************************************************************
**
-** Function BTM_WritePageTimeout
+** Function BTM_WritePageTimeout
**
** Description Send HCI Write Page Timeout.
**
** Returns
-** BTM_SUCCESS Command sent.
+** BTM_SUCCESS Command sent.
** BTM_NO_RESOURCES If out of resources to send the command.
**
**
@@ -1536,13 +1536,13 @@ tBTM_STATUS BTM_WritePageTimeout(UINT16 timeout)
/*******************************************************************************
**
-** Function BTM_WriteVoiceSettings
+** Function BTM_WriteVoiceSettings
**
** Description Send HCI Write Voice Settings command.
** See hcidefs.h for settings bitmask values.
**
** Returns
-** BTM_SUCCESS Command sent.
+** BTM_SUCCESS Command sent.
** BTM_NO_RESOURCES If out of resources to send the command.
**
**
@@ -1560,22 +1560,22 @@ tBTM_STATUS BTM_WriteVoiceSettings(UINT16 settings)
/*******************************************************************************
**
-** Function BTM_EnableTestMode
+** Function BTM_EnableTestMode
**
** Description Send HCI the enable device under test command.
**
-** Note: Controller can only be taken out of this mode by
+** Note: Controller can only be taken out of this mode by
** resetting the controller.
**
** Returns
-** BTM_SUCCESS Command sent.
+** BTM_SUCCESS Command sent.
** BTM_NO_RESOURCES If out of resources to send the command.
**
**
*******************************************************************************/
tBTM_STATUS BTM_EnableTestMode(void)
{
- UINT8 cond;
+ UINT8 cond;
BTM_TRACE_EVENT0 ("BTM: BTM_EnableTestMode");
@@ -1591,23 +1591,23 @@ tBTM_STATUS BTM_EnableTestMode(void)
/* put device to connectable mode */
if (!BTM_SetConnectability(BTM_CONNECTABLE, BTM_DEFAULT_CONN_WINDOW,
- BTM_DEFAULT_CONN_INTERVAL) == BTM_SUCCESS)
+ BTM_DEFAULT_CONN_INTERVAL) == BTM_SUCCESS)
{
- return BTM_NO_RESOURCES;
+ return BTM_NO_RESOURCES;
}
/* put device to discoverable mode */
if (!BTM_SetDiscoverability(BTM_GENERAL_DISCOVERABLE, BTM_DEFAULT_DISC_WINDOW,
- BTM_DEFAULT_DISC_INTERVAL) == BTM_SUCCESS)
+ BTM_DEFAULT_DISC_INTERVAL) == BTM_SUCCESS)
{
- return BTM_NO_RESOURCES;
+ return BTM_NO_RESOURCES;
}
/* mask off all of event from controller */
if (!btsnd_hcic_set_event_mask(LOCAL_BR_EDR_CONTROLLER_ID,
(UINT8 *)"\x00\x00\x00\x00\x00\x00\x00\x00"))
{
- return BTM_NO_RESOURCES;
+ return BTM_NO_RESOURCES;
}
/* Send the HCI command */
@@ -1641,7 +1641,7 @@ UINT8 btm_get_hci_version (void)
** device from the NVRAM storage attached to the Bluetooth
** controller.
**
-** Parameters: bd_addr - Address of the device
+** Parameters: bd_addr - Address of the device
** p_cb - Call back function to be called to return
** the results
**
diff --git a/stack/btm/btm_inq.c b/stack/btm/btm_inq.c
index c028822..2339150 100644
--- a/stack/btm/btm_inq.c
+++ b/stack/btm/btm_inq.c
@@ -141,7 +141,7 @@ static UINT8 btm_convert_uuid_to_eir_service( UINT16 uuid16 );
#endif
#if (BTM_EIR_CLIENT_INCLUDED == TRUE)
static void btm_set_eir_uuid( UINT8 *p_eir, tBTM_INQ_RESULTS *p_results );
-static UINT8 *btm_eir_get_uuid_list( UINT8 *p_eir, UINT8 uuid_size,
+static UINT8 *btm_eir_get_uuid_list( UINT8 *p_eir, UINT8 uuid_size,
UINT8 *p_num_uuid, UINT8 *p_uuid_list_type );
static UINT16 btm_convert_uuid_to_uuid16( UINT8 *p_uuid, UINT8 uuid_size );
#endif
@@ -174,13 +174,13 @@ tBTM_STATUS BTM_SetDiscoverability (UINT16 inq_mode, UINT16 window, UINT16 inter
BOOLEAN cod_limited;
BTM_TRACE_API0 ("BTM_SetDiscoverability");
-#if (BLE_INCLUDED == TRUE && BLE_INCLUDED == TRUE)
- if (btm_ble_set_discoverability((UINT16)(inq_mode))
+#if (BLE_INCLUDED == TRUE && BLE_INCLUDED == TRUE)
+ if (btm_ble_set_discoverability((UINT16)(inq_mode))
== BTM_SUCCESS)
{
btm_cb.btm_inq_vars.discoverable_mode &= (~BTM_BLE_DISCOVERABLE_MASK);
btm_cb.btm_inq_vars.discoverable_mode |= (inq_mode & BTM_BLE_CONNECTABLE_MASK);
- }
+ }
inq_mode &= ~BTM_BLE_DISCOVERABLE_MASK;
#endif
@@ -216,7 +216,7 @@ tBTM_STATUS BTM_SetDiscoverability (UINT16 inq_mode, UINT16 window, UINT16 inter
return (BTM_ILLEGAL_VALUE);
}
}
-
+
/* Set the IAC if needed */
if (inq_mode != BTM_NON_DISCOVERABLE)
{
@@ -225,9 +225,9 @@ tBTM_STATUS BTM_SetDiscoverability (UINT16 inq_mode, UINT16 window, UINT16 inter
/* Use the GIAC and LIAC codes for limited discoverable mode */
memcpy (temp_lap[0], limited_inq_lap, LAP_LEN);
memcpy (temp_lap[1], general_inq_lap, LAP_LEN);
-
+
if (!btsnd_hcic_write_cur_iac_lap (2, (LAP * const) temp_lap))
- return (BTM_NO_RESOURCES); /* Cannot continue */
+ return (BTM_NO_RESOURCES); /* Cannot continue */
}
else
{
@@ -250,10 +250,10 @@ tBTM_STATUS BTM_SetDiscoverability (UINT16 inq_mode, UINT16 window, UINT16 inter
else
return (BTM_NO_RESOURCES);
}
-
+
if (btm_cb.btm_inq_vars.connectable_mode & BTM_CONNECTABLE_MASK)
scan_mode |= HCI_PAGE_SCAN_ENABLED;
-
+
if (btsnd_hcic_write_scan_enable (scan_mode))
{
btm_cb.btm_inq_vars.discoverable_mode &= (~BTM_DISCOVERABLE_MASK);
@@ -470,21 +470,21 @@ tBTM_STATUS BTM_SetPeriodicInquiryMode (tBTM_INQ_PARMS *p_inqparms, UINT16 max_d
BTM_TRACE_API6 ("BTM_SetPeriodicInquiryMode: mode: %d, dur: %d, rsps: %d, flt: %d, min: %d, max: %d",
p_inqparms->mode, p_inqparms->duration, p_inqparms->max_resps,
p_inqparms->filter_cond_type, min_delay, max_delay);
-
+
/*** Make sure the device is ready ***/
if (!BTM_IsDeviceUp())
return (BTM_WRONG_MODE);
-
+
/* Only one active inquiry is allowed in this implementation.
Also do not allow an inquiry if the inquiry filter is being updated */
if (p_inq->inq_active || p_inq->inqfilt_active)
return (BTM_BUSY);
-
+
/* If illegal parameters return FALSE */
if (p_inqparms->mode != BTM_GENERAL_INQUIRY &&
p_inqparms->mode != BTM_LIMITED_INQUIRY)
return (BTM_ILLEGAL_VALUE);
-
+
/* Verify the parameters for this command */
if (p_inqparms->duration < BTM_MIN_INQUIRY_LEN ||
p_inqparms->duration > BTM_MAX_INQUIRY_LENGTH ||
@@ -497,7 +497,7 @@ tBTM_STATUS BTM_SetPeriodicInquiryMode (tBTM_INQ_PARMS *p_inqparms, UINT16 max_d
{
return (BTM_ILLEGAL_VALUE);
}
-
+
/* Save the inquiry parameters to be used upon the completion of setting/clearing the inquiry filter */
p_inq->inqparms = *p_inqparms;
p_inq->per_min_delay = min_delay;
@@ -528,16 +528,16 @@ tBTM_STATUS BTM_SetPeriodicInquiryMode (tBTM_INQ_PARMS *p_inqparms, UINT16 max_d
}
else /* The filter is not being used so simply clear it; the inquiry can start after this operation */
p_inq->state = BTM_INQ_SET_FILT_STATE;
-
+
/* Before beginning the inquiry the current filter must be cleared, so initiate the command */
if ((status = btm_set_inq_event_filter (p_inqparms->filter_cond_type, &p_inqparms->filter_cond)) != BTM_CMD_STARTED)
{
/* If set filter command is not succesful reset the state */
p_inq->p_inq_results_cb = NULL;
p_inq->state = BTM_INQ_INACTIVE_STATE;
-
+
}
-
+
#endif
return (status);
}
@@ -560,7 +560,7 @@ tBTM_STATUS BTM_CancelPeriodicInquiry(void)
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
tBTM_STATUS status = BTM_SUCCESS;
BTM_TRACE_API0 ("BTM_CancelPeriodicInquiry called");
-
+
/*** Make sure the device is ready ***/
if (!BTM_IsDeviceUp())
return (BTM_WRONG_MODE);
@@ -582,7 +582,7 @@ tBTM_STATUS BTM_CancelPeriodicInquiry(void)
p_inq->inqfilt_active = FALSE;
p_inq->inq_counter++;
}
-
+
return (status);
}
@@ -607,14 +607,14 @@ tBTM_STATUS BTM_SetConnectability (UINT16 page_mode, UINT16 window, UINT16 inter
BTM_TRACE_API0 ("BTM_SetConnectability");
-#if (BLE_INCLUDED == TRUE && BLE_INCLUDED == TRUE)
+#if (BLE_INCLUDED == TRUE && BLE_INCLUDED == TRUE)
if (btm_ble_set_connectability(page_mode) == BTM_SUCCESS)
{
p_inq->connectable_mode &= (~BTM_BLE_CONNECTABLE_MASK);
p_inq->connectable_mode |= (page_mode & BTM_BLE_CONNECTABLE_MASK);
}
page_mode &= ~BTM_BLE_CONNECTABLE_MASK;
-
+
#endif
/*** Check mode parameter ***/
@@ -664,7 +664,7 @@ tBTM_STATUS BTM_SetConnectability (UINT16 page_mode, UINT16 window, UINT16 inter
/* Keep the inquiry scan as previouosly set */
if (p_inq->discoverable_mode & BTM_DISCOVERABLE_MASK)
scan_mode |= HCI_INQUIRY_SCAN_ENABLED;
-
+
if (btsnd_hcic_write_scan_enable (scan_mode))
{
p_inq->connectable_mode &= (~BTM_CONNECTABLE_MASK);
@@ -819,7 +819,7 @@ tBTM_STATUS BTM_CancelInquiry(void)
*******************************************************************************/
tBTM_STATUS BTM_StartInquiry (tBTM_INQ_PARMS *p_inqparms, tBTM_INQ_RESULTS_CB *p_results_cb,
tBTM_CMPL_CB *p_cmpl_cb)
-{
+{
tBTM_STATUS status;
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
@@ -854,7 +854,7 @@ tBTM_STATUS BTM_StartInquiry (tBTM_INQ_PARMS *p_inqparms, tBTM_INQ_RESULTS_CB *p
p_inq->p_inq_results_cb = p_results_cb;
p_inq->inq_cmpl_info.num_resp = 0; /* Clear the results counter */
p_inq->inq_active = (UINT8)(1 << (p_inqparms->mode & BTM_BR_INQUIRY_MASK));
-
+
BTM_TRACE_DEBUG1("BTM_StartInquiry: p_inq->inq_active = 0x%02x", p_inq->inq_active);
/* start LE inquiry here if requested */
@@ -939,11 +939,11 @@ tBTM_STATUS BTM_ReadRemoteDeviceName (BD_ADDR remote_bda, tBTM_CMPL_CB *p_cb)
tBTM_INQ_INFO *p_cur = NULL;
tINQ_DB_ENT *p_i;
-#if BLE_INCLUDED == TRUE
+#if BLE_INCLUDED == TRUE
tBT_DEVICE_TYPE dev_type;
tBLE_ADDR_TYPE addr_type;
#endif
-
+
BTM_TRACE_API6 ("BTM_ReadRemoteDeviceName: bd addr [%02x%02x%02x%02x%02x%02x]",
remote_bda[0], remote_bda[1], remote_bda[2],
remote_bda[3], remote_bda[4], remote_bda[5]);
@@ -996,11 +996,11 @@ tBTM_STATUS BTM_CancelRemoteDeviceName (void)
tBT_DEVICE_TYPE dev_type;
tBLE_ADDR_TYPE addr_type;
#endif
-
+
BTM_TRACE_API0 ("BTM_CancelRemoteDeviceName()");
/* Make sure there is not already one in progress */
- if (p_inq->remname_active)
+ if (p_inq->remname_active)
{
#if BLE_INCLUDED == TRUE
BTM_ReadDevInfo(p_inq->remname_bda, &dev_type, &addr_type);
@@ -1027,7 +1027,7 @@ tBTM_STATUS BTM_CancelRemoteDeviceName (void)
** Function BTM_InqFirstResult
**
** Description This function looks through the inquiry database for the first
-** used entrysince the LAST inquiry. This is used in conjunction
+** used entrysince the LAST inquiry. This is used in conjunction
** with BTM_InqNext by applications as a way to walk through the
** inquiry results database.
**
@@ -1067,18 +1067,18 @@ tBTM_INQ_INFO *BTM_InqNextResult (tBTM_INQ_INFO *p_cur)
tINQ_DB_ENT *p_ent;
UINT16 inx;
UINT32 cur_inq_count = btm_cb.btm_inq_vars.inq_counter - 1;
-
+
if (p_cur)
{
p_ent = (tINQ_DB_ENT *) ((UINT8 *)p_cur - offsetof (tINQ_DB_ENT, inq_info));
inx = (UINT16)((p_ent - btm_cb.btm_inq_vars.inq_db) + 1);
-
+
for (p_ent = &btm_cb.btm_inq_vars.inq_db[inx]; inx < BTM_INQ_DB_SIZE; inx++, p_ent++)
{
if (p_ent->in_use && p_ent->inq_count == cur_inq_count)
return (&p_ent->inq_info);
}
-
+
/* If here, more entries found */
return ((tBTM_INQ_INFO *)NULL);
}
@@ -1160,18 +1160,18 @@ tBTM_INQ_INFO *BTM_InqDbNext (tBTM_INQ_INFO *p_cur)
{
tINQ_DB_ENT *p_ent;
UINT16 inx;
-
+
if (p_cur)
{
p_ent = (tINQ_DB_ENT *) ((UINT8 *)p_cur - offsetof (tINQ_DB_ENT, inq_info));
inx = (UINT16)((p_ent - btm_cb.btm_inq_vars.inq_db) + 1);
-
+
for (p_ent = &btm_cb.btm_inq_vars.inq_db[inx]; inx < BTM_INQ_DB_SIZE; inx++, p_ent++)
{
if (p_ent->in_use)
return (&p_ent->inq_info);
}
-
+
/* If here, more entries found */
return ((tBTM_INQ_INFO *)NULL);
}
@@ -1199,7 +1199,7 @@ tBTM_STATUS BTM_ClearInqDb (BD_ADDR p_bda)
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
/* If an inquiry or remote name is in progress return busy */
- if (p_inq->inq_active != BTM_INQUIRY_INACTIVE ||
+ if (p_inq->inq_active != BTM_INQUIRY_INACTIVE ||
p_inq->inqfilt_active)
return (BTM_BUSY);
@@ -1257,7 +1257,7 @@ tBTM_STATUS BTM_InquiryRegisterForChanges (tBTM_INQ_DB_CHANGE_CB *p_cb)
**
** Function BTM_SetInquiryFilterCallback
**
-** Description Host can register to be asked whenever an inquiry result
+** Description Host can register to be asked whenever an inquiry result
** is received. If host does not like the device no name
** request is issued for the device
**
@@ -1274,7 +1274,7 @@ void BTM_SetInquiryFilterCallback (tBTM_FILTER_CB *p_callback)
** Function BTM_ReadInquiryRspTxPower
**
** Description This command will read the inquiry Transmit Power level used
-** to transmit the FHS and EIR data packets.
+** to transmit the FHS and EIR data packets.
** This can be used directly in the Tx Power Level EIR data type.
**
** Returns BTM_SUCCESS if successful
@@ -1303,11 +1303,11 @@ tBTM_STATUS BTM_ReadInquiryRspTxPower (tBTM_CMPL_CB *p_cb)
**
** Function BTM_WriteInquiryTxPower
**
-** Description This command is used to write the inquiry transmit power level
-** used to transmit the inquiry (ID) data packets. The Controller
+** Description This command is used to write the inquiry transmit power level
+** used to transmit the inquiry (ID) data packets. The Controller
** should use the supported TX power level closest to the Tx_Power
** parameter.
-**
+**
** Returns BTM_SUCCESS if successful
**
*******************************************************************************/
@@ -1321,7 +1321,7 @@ tBTM_STATUS BTM_WriteInquiryTxPower (INT8 tx_power)
}
else if (!btsnd_hcic_write_inq_tx_power(tx_power))
status = BTM_NO_RESOURCES;
-
+
return status;
}
/*********************************************************************************
@@ -1371,10 +1371,10 @@ void btm_inq_db_reset (void)
}
/* Cancel a remote name request if active, and notify the caller (if waiting) */
- if (p_inq->remname_active )
+ if (p_inq->remname_active )
{
btu_stop_timer (&p_inq->rmt_name_timer_ent);
- p_inq->remname_active = FALSE;
+ p_inq->remname_active = FALSE;
memset(p_inq->remname_bda, 0, BD_ADDR_LEN);
if (p_inq->p_remname_cmpl_cb)
@@ -1400,7 +1400,7 @@ void btm_inq_db_reset (void)
p_inq->state = BTM_INQ_INACTIVE_STATE;
p_inq->pending_filt_complete_event = 0;
- p_inq->p_inq_results_cb = NULL;
+ p_inq->p_inq_results_cb = NULL;
btm_clr_inq_db(NULL); /* Clear out all the entries in the database */
btm_clr_inq_result_flt();
@@ -1503,7 +1503,7 @@ void btm_clr_inq_db (BD_ADDR p_bda)
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
tINQ_DB_ENT *p_ent = p_inq->inq_db;
UINT16 xx;
-
+
#if (BTM_INQ_DEBUG == TRUE)
BTM_TRACE_DEBUG2 ("btm_clr_inq_db: inq_active:0x%x state:%d",
btm_cb.btm_inq_vars.inq_active, btm_cb.btm_inq_vars.state);
@@ -1520,7 +1520,7 @@ void btm_clr_inq_db (BD_ADDR p_bda)
#if (BTM_INQ_GET_REMOTE_NAME == TRUE)
p_ent->inq_info.remote_name_state = BTM_INQ_RMT_NAME_EMPTY;
#endif
-
+
if (btm_cb.btm_inq_vars.p_inq_change_cb)
(*btm_cb.btm_inq_vars.p_inq_change_cb) (&p_ent->inq_info, FALSE);
}
@@ -1691,7 +1691,7 @@ tINQ_DB_ENT *btm_inq_db_new (BD_ADDR p_bda)
** (BTM_SetInqEventFilter). It is used internally as part of the
** inquiry processing.
**
-** Input Params:
+** Input Params:
** filter_cond_type - this is the type of inquiry filter to apply:
** BTM_FILTER_COND_DEVICE_CLASS,
** BTM_FILTER_COND_BD_ADDR, or
@@ -1741,7 +1741,7 @@ static tBTM_STATUS btm_set_inq_event_filter (UINT8 filter_cond_type,
case BTM_CLR_INQUIRY_FILTER:
condition_length = 0;
break;
-
+
default:
return (BTM_ILLEGAL_VALUE); /* Bad parameter was passed in */
}
@@ -1751,7 +1751,7 @@ static tBTM_STATUS btm_set_inq_event_filter (UINT8 filter_cond_type,
/* Filter the inquiry results for the specified condition type and value */
if (btsnd_hcic_set_event_filter(HCI_FILTER_INQUIRY_RESULT, filter_cond_type,
p_cond, condition_length))
-
+
return (BTM_CMD_STARTED);
else
return (BTM_NO_RESOURCES);
@@ -1775,7 +1775,7 @@ void btm_event_filter_complete (UINT8 *p)
tBTM_STATUS status;
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
tBTM_CMPL_CB *p_cb = p_inq->p_inqfilter_cmpl_cb;
-
+
#if (BTM_INQ_DEBUG == TRUE)
BTM_TRACE_DEBUG3 ("btm_event_filter_complete: inq_active:0x%x state:%d inqfilt_active:%d",
btm_cb.btm_inq_vars.inq_active, btm_cb.btm_inq_vars.state, btm_cb.btm_inq_vars.inqfilt_active);
@@ -1801,7 +1801,7 @@ void btm_event_filter_complete (UINT8 *p)
}
else
status = BTM_SUCCESS;
-
+
/* If the set filter was initiated externally (via BTM_SetInqEventFilter), call the
callback function to notify the initiator that it has completed */
if (p_inq->state == BTM_INQ_INACTIVE_STATE)
@@ -1947,7 +1947,7 @@ void btm_process_inq_results (UINT8 *p, UINT8 inq_res_mode)
tBTM_INQ_RESULTS *p_cur;
BOOLEAN is_new = TRUE;
BOOLEAN update = FALSE;
- INT8 i_rssi;
+ INT8 i_rssi;
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
tBTM_INQ_RESULTS_CB *p_inq_results_cb = p_inq->p_inq_results_cb;
UINT8 page_scan_rep_mode = 0;
@@ -1995,13 +1995,13 @@ void btm_process_inq_results (UINT8 *p, UINT8 inq_res_mode)
p_i = btm_inq_db_find (bda);
-#if BTM_USE_INQ_RESULTS_FILTER == TRUE
+#if BTM_USE_INQ_RESULTS_FILTER == TRUE
/* Only process the num_resp is smaller than max_resps.
If results are queued to BTU task while canceling inquiry,
or when more than one result is in this response, > max_resp
responses could be processed which can confuse some apps
*/
- if (p_inq->inqparms.max_resps &&
+ if (p_inq->inqparms.max_resps &&
p_inq->inq_cmpl_info.num_resp >= p_inq->inqparms.max_resps
#if BLE_INCLUDED == TRUE
/* new device response */
@@ -2027,7 +2027,7 @@ void btm_process_inq_results (UINT8 *p, UINT8 inq_res_mode)
i_rssi = (INT8)rssi;
/* If this new RSSI is higher than the last one */
- if(p_inq->inqparms.report_dup && (rssi != 0) &&
+ if(p_inq->inqparms.report_dup && (rssi != 0) &&
p_i && (i_rssi > p_i->inq_info.results.rssi || p_i->inq_info.results.rssi == 0
#if BLE_INCLUDED == TRUE
/* BR/EDR inquiry information update */
@@ -2117,11 +2117,11 @@ void btm_process_inq_results (UINT8 *p, UINT8 inq_res_mode)
#if BTM_USE_INQ_RESULTS_FILTER == TRUE
/* If the number of responses found and not unlimited, issue a cancel inquiry */
if (!(p_inq->inq_active & BTM_PERIODIC_INQUIRY_ACTIVE) &&
- p_inq->inqparms.max_resps &&
+ p_inq->inqparms.max_resps &&
p_inq->inq_cmpl_info.num_resp == p_inq->inqparms.max_resps
#if BLE_INCLUDED == TRUE
/* BLE scanning is active and received adv */
- && ((((p_inq->inqparms.mode & BTM_BLE_INQUIRY_MASK) != 0) &&
+ && ((((p_inq->inqparms.mode & BTM_BLE_INQUIRY_MASK) != 0) &&
p_cur->device_type == BT_DEVICE_TYPE_DUMO && p_i->scan_rsp) ||
(p_inq->inqparms.mode & BTM_BLE_INQUIRY_MASK) == 0)
#endif
@@ -2151,10 +2151,10 @@ void btm_process_inq_results (UINT8 *p, UINT8 inq_res_mode)
#if (BTM_EIR_CLIENT_INCLUDED == TRUE)
if( inq_res_mode == BTM_INQ_RESULT_EXTENDED )
{
- if((p_eir_data = BTM_CheckEirData( p, BTM_EIR_COMPLETE_LOCAL_NAME_TYPE,
+ if((p_eir_data = BTM_CheckEirData( p, BTM_EIR_COMPLETE_LOCAL_NAME_TYPE,
&remote_name_len )) == NULL)
{
- p_eir_data = BTM_CheckEirData( p, BTM_EIR_SHORTENED_LOCAL_NAME_TYPE,
+ p_eir_data = BTM_CheckEirData( p, BTM_EIR_SHORTENED_LOCAL_NAME_TYPE,
&remote_name_len );
}
@@ -2182,7 +2182,7 @@ void btm_process_inq_results (UINT8 *p, UINT8 inq_res_mode)
#if (BTM_EIR_CLIENT_INCLUDED == TRUE)
if( inq_res_mode == BTM_INQ_RESULT_EXTENDED )
{
- memset( p_cur->eir_uuid, 0,
+ memset( p_cur->eir_uuid, 0,
BTM_EIR_SERVICE_ARRAY_SIZE * (BTM_EIR_ARRAY_BITS/8));
/* set bit map of UUID list from received EIR */
btm_set_eir_uuid( p, p_cur );
@@ -2224,10 +2224,10 @@ void btm_sort_inq_result(void)
tINQ_DB_ENT *p_ent = btm_cb.btm_inq_vars.inq_db;
tINQ_DB_ENT *p_next = btm_cb.btm_inq_vars.inq_db+1;
int size;
-
+
num_resp = (btm_cb.btm_inq_vars.inq_cmpl_info.num_resp<BTM_INQ_DB_SIZE)?
btm_cb.btm_inq_vars.inq_cmpl_info.num_resp: BTM_INQ_DB_SIZE;
-
+
if((p_tmp = (tINQ_DB_ENT *)GKI_getbuf(sizeof(tINQ_DB_ENT))) != NULL)
{
size = sizeof(tINQ_DB_ENT);
@@ -2243,7 +2243,7 @@ void btm_sort_inq_result(void)
}
}
}
-
+
GKI_freebuf(p_tmp);
}
}
@@ -2265,7 +2265,7 @@ void btm_process_inq_complete (UINT8 status, UINT8 mode)
{
tBTM_CMPL_CB *p_inq_cb = btm_cb.btm_inq_vars.p_inq_cmpl_cb;
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
-
+
#if (BTM_INQ_GET_REMOTE_NAME==TRUE)
tBTM_INQ_INFO *p_cur;
UINT8 tempstate;
@@ -2305,7 +2305,7 @@ void btm_process_inq_complete (UINT8 status, UINT8 mode)
}
}
#endif
-
+
/* Notify caller that the inquiry has completed; (periodic inquiries do not send completion events */
if (!(p_inq->inq_active & BTM_PERIODIC_INQUIRY_ACTIVE) && p_inq->inqparms.mode == 0)
{
@@ -2315,7 +2315,7 @@ void btm_process_inq_complete (UINT8 status, UINT8 mode)
p_inq->inq_counter++;
btm_clr_inq_result_flt();
-
+
if((p_inq->inq_cmpl_info.status == BTM_SUCCESS) && HCI_LMP_INQ_RSSI_SUPPORTED(btm_cb.devcb.local_features))
{
btm_sort_inq_result();
@@ -2327,7 +2327,7 @@ void btm_process_inq_complete (UINT8 status, UINT8 mode)
p_inq->p_inq_cmpl_cb = (tBTM_CMPL_CB *) NULL;
/* If we have a callback registered for inquiry complete, call it */
- BTM_TRACE_DEBUG2 ("BTM Inq Compl Callback: status 0x%02x, num results %d",
+ BTM_TRACE_DEBUG2 ("BTM Inq Compl Callback: status 0x%02x, num results %d",
p_inq->inq_cmpl_info.status, p_inq->inq_cmpl_info.num_resp);
if (p_inq_cb)
@@ -2385,13 +2385,13 @@ tBTM_STATUS btm_initiate_rem_name (BD_ADDR remote_bda, tBTM_INQ_INFO *p_cur,
{
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
BOOLEAN cmd_ok;
-
-
+
+
/*** Make sure the device is ready ***/
if (!BTM_IsDeviceUp())
return (BTM_WRONG_MODE);
-
-
+
+
if (origin == BTM_RMT_NAME_SEC)
{
cmd_ok = btsnd_hcic_rmt_name_req (remote_bda, HCI_PAGE_SCAN_REP_MODE_R1,
@@ -2404,12 +2404,12 @@ tBTM_STATUS btm_initiate_rem_name (BD_ADDR remote_bda, tBTM_INQ_INFO *p_cur,
/* Make sure there are no two remote name requests from external API in progress */
else if (origin == BTM_RMT_NAME_EXT)
{
- if (p_inq->remname_active)
- {
+ if (p_inq->remname_active)
+ {
return (BTM_BUSY);
}
else
- {
+ {
/* If there is no remote name request running,call the callback function and start timer */
p_inq->p_remname_cmpl_cb = p_cb;
memcpy(p_inq->remname_bda, remote_bda, BD_ADDR_LEN);
@@ -2442,7 +2442,7 @@ tBTM_STATUS btm_initiate_rem_name (BD_ADDR remote_bda, tBTM_INQ_INFO *p_cur,
}
/* If the inquire feature is on */
#if (BTM_INQ_GET_REMOTE_NAME==TRUE)
-
+
else if (origin == BTM_RMT_NAME_INQ)
{
/* If the database entry exists for the device, use its clock offset */
@@ -2464,16 +2464,16 @@ tBTM_STATUS btm_initiate_rem_name (BD_ADDR remote_bda, tBTM_INQ_INFO *p_cur,
else
return BTM_NO_RESOURCES;
}
-#endif
+#endif
else
{
-
+
return BTM_ILLEGAL_VALUE;
-
+
}
-
+
}
/*******************************************************************************
@@ -2493,9 +2493,9 @@ void btm_process_remote_name (BD_ADDR bda, BD_NAME bdn, UINT16 evt_len, UINT8 hc
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
tBTM_CMPL_CB *p_cb = p_inq->p_remname_cmpl_cb;
UINT8 *p_n1;
-
+
UINT16 temp_evt_len;
-
+
#if (BTM_INQ_GET_REMOTE_NAME==TRUE)
/*** These are only used if part of the Inquiry Process ***/
tBTM_CMPL_CB *p_inq_cb;
@@ -2503,12 +2503,12 @@ void btm_process_remote_name (BD_ADDR bda, BD_NAME bdn, UINT16 evt_len, UINT8 hc
UINT8 *p_n;
tBTM_INQ_INFO *p_cur;
#endif
-#if BLE_INCLUDED == TRUE
+#if BLE_INCLUDED == TRUE
tBT_DEVICE_TYPE dev_type;
tBLE_ADDR_TYPE addr_type;
#endif
-
+
if (bda != NULL)
{
BTM_TRACE_EVENT6("BDA %02x:%02x:%02x:%02x:%02x:%02x",bda[0], bda[1],
@@ -2519,10 +2519,10 @@ void btm_process_remote_name (BD_ADDR bda, BD_NAME bdn, UINT16 evt_len, UINT8 hc
BTM_TRACE_EVENT6("Inquire BDA %02x:%02x:%02x:%02x:%02x:%02x",p_inq->remname_bda[0], p_inq->remname_bda[1],
p_inq->remname_bda[2], p_inq->remname_bda[3],
p_inq->remname_bda[4], p_inq->remname_bda[5]);
+
-
-
- /* If the inquire BDA and remote DBA are the same, then stop the timer and set the active to false */
+
+ /* If the inquire BDA and remote DBA are the same, then stop the timer and set the active to false */
if ((p_inq->remname_active ==TRUE)&&
(((bda != NULL) &&
(memcmp(bda, p_inq->remname_bda,BD_ADDR_LEN)==0)) || bda == NULL))
@@ -2543,7 +2543,7 @@ void btm_process_remote_name (BD_ADDR bda, BD_NAME bdn, UINT16 evt_len, UINT8 hc
/* inquiry complete callback is called. */
if ((hci_status == HCI_SUCCESS))
- {
+ {
/* Copy the name from the data stream into the return structure */
/* Note that even if it is not being returned, it is used as a */
/* temporary buffer. */
@@ -2557,9 +2557,9 @@ void btm_process_remote_name (BD_ADDR bda, BD_NAME bdn, UINT16 evt_len, UINT8 hc
*p_n1++ = *bdn++;
temp_evt_len--;
}
- }
-
-
+ }
+
+
/* If processing a stand alone remote name then report the error in the callback */
else
{
@@ -2572,7 +2572,7 @@ void btm_process_remote_name (BD_ADDR bda, BD_NAME bdn, UINT16 evt_len, UINT8 hc
p_inq->p_remname_cmpl_cb = NULL;
if (p_cb)
- (p_cb)((tBTM_REMOTE_DEV_NAME *)&rem_name);
+ (p_cb)((tBTM_REMOTE_DEV_NAME *)&rem_name);
}
@@ -2652,7 +2652,7 @@ void btm_process_remote_name (BD_ADDR bda, BD_NAME bdn, UINT16 evt_len, UINT8 hc
p_inq->state = BTM_INQ_INACTIVE_STATE;
p_inq->inq_active = BTM_INQUIRY_INACTIVE;
p_inq->p_inq_cmpl_cb = NULL;
-
+
/* If we have a callback registered for inquiry complete, call it */
if (p_inq_cb)
(p_inq_cb)((tBTM_INQUIRY_CMPL *) &p_inq->inq_cmpl_info);
@@ -2734,10 +2734,10 @@ void btm_read_linq_tx_power_complete(UINT8 *p)
**
** Description This function is called to write EIR data to controller.
**
-** Parameters p_buff - allocated HCI command buffer including extended
+** Parameters p_buff - allocated HCI command buffer including extended
** inquriry response
**
-** Returns BTM_SUCCESS - if successful
+** Returns BTM_SUCCESS - if successful
** BTM_MODE_UNSUPPORTED - if local device cannot support it
**
*******************************************************************************/
@@ -2771,7 +2771,7 @@ tBTM_STATUS BTM_WriteEIR( BT_HDR *p_buff )
** type - finding EIR data type
** p_length - return the length of EIR data not including type
**
-** Returns pointer of EIR data
+** Returns pointer of EIR data
**
*******************************************************************************/
UINT8 *BTM_CheckEirData( UINT8 *p_eir, UINT8 type, UINT8 *p_length )
@@ -2837,7 +2837,7 @@ static UINT8 btm_convert_uuid_to_eir_service( UINT16 uuid16 )
**
** Description This function is called to know if UUID in bit map of UUID.
**
-** Parameters p_eir_uuid - bit map of UUID list
+** Parameters p_eir_uuid - bit map of UUID list
** uuid16 - UUID 16-bit
**
** Returns TRUE - if found
@@ -2952,7 +2952,7 @@ void BTM_RemoveEirService( UINT32 *p_eir_uuid, UINT16 uuid16 )
** BTM_EIR_COMPLETE_16BITS_UUID_TYPE, otherwise
**
*******************************************************************************/
-UINT8 BTM_GetEirSupportedServices( UINT32 *p_eir_uuid, UINT8 **p,
+UINT8 BTM_GetEirSupportedServices( UINT32 *p_eir_uuid, UINT8 **p,
UINT8 max_num_uuid16, UINT8 *p_num_uuid16)
{
#if (BTM_EIR_SERVER_INCLUDED == TRUE)
@@ -3003,7 +3003,7 @@ UINT8 BTM_GetEirSupportedServices( UINT32 *p_eir_uuid, UINT8 **p,
** BTM_EIR_MORE_128BITS_UUID_TYPE
**
*******************************************************************************/
-UINT8 BTM_GetEirUuidList( UINT8 *p_eir, UINT8 uuid_size, UINT8 *p_num_uuid,
+UINT8 BTM_GetEirUuidList( UINT8 *p_eir, UINT8 uuid_size, UINT8 *p_num_uuid,
UINT8 *p_uuid_list, UINT8 max_num_uuid)
{
#if (BTM_EIR_CLIENT_INCLUDED == TRUE)
@@ -3023,18 +3023,18 @@ UINT8 BTM_GetEirUuidList( UINT8 *p_eir, UINT8 uuid_size, UINT8 *p_num_uuid,
if( *p_num_uuid > max_num_uuid )
{
BTM_TRACE_WARNING2("BTM_GetEirUuidList number of uuid in EIR = %d, size of uuid list = %d",
- *p_num_uuid, max_num_uuid );
+ *p_num_uuid, max_num_uuid );
*p_num_uuid = max_num_uuid;
}
- BTM_TRACE_DEBUG2("BTM_GetEirUuidList type = %02X, number of uuid = %d", type, *p_num_uuid );
-
+ BTM_TRACE_DEBUG2("BTM_GetEirUuidList type = %02X, number of uuid = %d", type, *p_num_uuid );
+
if( uuid_size == LEN_UUID_16 )
{
for( yy = 0; yy < *p_num_uuid; yy++ )
{
STREAM_TO_UINT16(*(p_uuid16 + yy), p_uuid_data);
- BTM_TRACE_DEBUG1(" 0x%04X", *(p_uuid16 + yy));
+ BTM_TRACE_DEBUG1(" 0x%04X", *(p_uuid16 + yy));
}
}
else if( uuid_size == LEN_UUID_32 )
@@ -3042,7 +3042,7 @@ UINT8 BTM_GetEirUuidList( UINT8 *p_eir, UINT8 uuid_size, UINT8 *p_num_uuid,
for( yy = 0; yy < *p_num_uuid; yy++ )
{
STREAM_TO_UINT32(*(p_uuid32 + yy), p_uuid_data);
- BTM_TRACE_DEBUG1(" 0x%08X", *(p_uuid32 + yy));
+ BTM_TRACE_DEBUG1(" 0x%08X", *(p_uuid32 + yy));
}
}
else if( uuid_size == LEN_UUID_128 )
@@ -3052,7 +3052,7 @@ UINT8 BTM_GetEirUuidList( UINT8 *p_eir, UINT8 uuid_size, UINT8 *p_num_uuid,
STREAM_TO_ARRAY16(p_uuid_list + yy * LEN_UUID_128, p_uuid_data);
for( xx = 0; xx < LEN_UUID_128; xx++ )
sprintf(buff + xx*2, "%02X", *(p_uuid_list + yy * LEN_UUID_128 + xx));
- BTM_TRACE_DEBUG1(" 0x%s", buff);
+ BTM_TRACE_DEBUG1(" 0x%s", buff);
}
}
@@ -3077,10 +3077,10 @@ UINT8 BTM_GetEirUuidList( UINT8 *p_eir, UINT8 uuid_size, UINT8 *p_num_uuid,
** p_uuid_list_type - EIR data type
**
** Returns NULL - if UUID list with uuid_size is not found
-** beginning of UUID list in EIR - otherwise
+** beginning of UUID list in EIR - otherwise
**
*******************************************************************************/
-static UINT8 *btm_eir_get_uuid_list( UINT8 *p_eir, UINT8 uuid_size,
+static UINT8 *btm_eir_get_uuid_list( UINT8 *p_eir, UINT8 uuid_size,
UINT8 *p_num_uuid, UINT8 *p_uuid_list_type )
{
UINT8 *p_uuid_data;
@@ -3118,7 +3118,7 @@ static UINT8 *btm_eir_get_uuid_list( UINT8 *p_eir, UINT8 uuid_size,
*p_uuid_list_type = complete_type;
}
- *p_num_uuid = uuid_len / uuid_size;
+ *p_num_uuid = uuid_len / uuid_size;
return p_uuid_data;
}
@@ -3132,7 +3132,7 @@ static UINT8 *btm_eir_get_uuid_list( UINT8 *p_eir, UINT8 uuid_size,
** uuid_size - size of UUID
**
** Returns 0 - if UUID cannot be converted to UUID 16-bit
-** UUID 16-bit - otherwise
+** UUID 16-bit - otherwise
**
*******************************************************************************/
static UINT16 btm_convert_uuid_to_uuid16( UINT8 *p_uuid, UINT8 uuid_size )
@@ -3191,7 +3191,7 @@ static UINT16 btm_convert_uuid_to_uuid16( UINT8 *p_uuid, UINT8 uuid_size )
** Parameters p_eir - pointer of EIR significant part
** p_results - pointer of inquiry result
**
-** Returns None
+** Returns None
**
*******************************************************************************/
void btm_set_eir_uuid( UINT8 *p_eir, tBTM_INQ_RESULTS *p_results )
@@ -3248,8 +3248,8 @@ void btm_set_eir_uuid( UINT8 *p_eir, tBTM_INQ_RESULTS *p_results )
}
}
- BTM_TRACE_DEBUG2("btm_set_eir_uuid eir_uuid=0x%08X %08X",
- p_results->eir_uuid[1], p_results->eir_uuid[0] );
+ BTM_TRACE_DEBUG2("btm_set_eir_uuid eir_uuid=0x%08X %08X",
+ p_results->eir_uuid[1], p_results->eir_uuid[0] );
}
#endif
diff --git a/stack/btm/btm_int.h b/stack/btm/btm_int.h
index 8d9d96a..e8fb57b 100644
--- a/stack/btm/btm_int.h
+++ b/stack/btm/btm_int.h
@@ -89,8 +89,8 @@ typedef struct
#define BTM_ACL_SWKEY_STATE_SWITCHING 3
#define BTM_ACL_SWKEY_STATE_ENCRYPTION_ON 4
#define BTM_ACL_SWKEY_STATE_IN_PROGRESS 5
- UINT8 switch_role_state;
- UINT8 change_key_state;
+ UINT8 switch_role_state;
+ UINT8 change_key_state;
#define BTM_ACL_ENCRYPT_STATE_IDLE 0
#define BTM_ACL_ENCRYPT_STATE_ENCRYPT_OFF 1 /* encryption turning off */
@@ -141,7 +141,7 @@ typedef struct
TIMER_LIST_ENT txpwer_timer;
tBTM_CMPL_CB *p_txpwer_cmpl_cb; /* Callback function to be called when */
/* read inq tx power function completes */
-
+
TIMER_LIST_ENT qossu_timer;
tBTM_CMPL_CB *p_qossu_cmpl_cb; /* Callback function to be called when */
/* qos setup function completes */
@@ -168,7 +168,7 @@ typedef struct
BT_OCTET16 er; /* BLE encryption key */
#if BTM_BLE_CONFORMANCE_TESTING == TRUE
- BOOLEAN no_disc_if_pair_fail;
+ BOOLEAN no_disc_if_pair_fail;
BOOLEAN enable_test_mac_val;
BT_OCTET8 test_mac;
BOOLEAN enable_test_local_sign_cntr;
@@ -302,7 +302,7 @@ typedef struct
typedef UINT8 *BTM_BD_NAME_PTR; /* Pointer to Device name */
-/* Security callback is called by this unit when security
+/* Security callback is called by this unit when security
** procedures are completed. Parameters are
** BD Address of remote
** Result of the operation
@@ -406,7 +406,7 @@ extern void btm_sco_chk_pend_rolechange (UINT16 hci_handle);
/*
** Define structure for Security Service Record.
-** A record exists for each service registered with the Security Manager
+** A record exists for each service registered with the Security Manager
*/
typedef struct
{
@@ -431,15 +431,15 @@ typedef struct
{
BT_OCTET16 irk; /* peer diverified identity root */
BT_OCTET16 ltk; /* peer long term key */
- BT_OCTET16 csrk; /* peer SRK peer device used to secured sign local data */
+ BT_OCTET16 csrk; /* peer SRK peer device used to secured sign local data */
BT_OCTET8 rand; /* random vector for LTK generation */
- UINT16 ediv; /* LTK diversifier of this slave device */
+ UINT16 ediv; /* LTK diversifier of this slave device */
UINT16 div; /* local DIV to generate local LTK=d1(ER,DIV,0) and CSRK=d1(ER,DIV,1) */
UINT8 sec_level; /* local pairing security level */
UINT8 key_size; /* key size of the LTK delivered to peer device */
- UINT8 srk_sec_level; /* security property of peer SRK for this device */
- UINT8 local_csrk_sec_level; /* security property of local CSRK for this device */
+ UINT8 srk_sec_level; /* security property of peer SRK for this device */
+ UINT8 local_csrk_sec_level; /* security property of local CSRK for this device */
UINT32 counter; /* peer sign counter for verifying rcv signed cmd */
UINT32 local_counter; /* local sign counter for sending signed write cmd*/
@@ -477,9 +477,9 @@ typedef struct
DEV_CLASS dev_class; /* DEV_CLASS of the device */
LINK_KEY link_key; /* Device link key */
-#define BTM_SEC_AUTHORIZED BTM_SEC_FLAG_AUTHORIZED
+#define BTM_SEC_AUTHORIZED BTM_SEC_FLAG_AUTHORIZED
#define BTM_SEC_AUTHENTICATED BTM_SEC_FLAG_AUTHENTICATED
-#define BTM_SEC_ENCRYPTED BTM_SEC_FLAG_ENCRYPTED
+#define BTM_SEC_ENCRYPTED BTM_SEC_FLAG_ENCRYPTED
#define BTM_SEC_NAME_KNOWN 0x08
#define BTM_SEC_LINK_KEY_KNOWN BTM_SEC_FLAG_LKEY_KNOWN
#define BTM_SEC_LINK_KEY_AUTHED 0x20
@@ -624,7 +624,7 @@ typedef struct
{
tBTM_PM_STATUS_CBACK *cback;/* to notify the registered party of mode change event */
UINT8 mask; /* registered request mask. 0, if this entry is not used */
-} tBTM_PM_RCB;
+} tBTM_PM_RCB;
#endif /* BTM_PWR_MGR_INCLUDED */
enum
@@ -755,7 +755,7 @@ typedef struct
tBTM_BLE_CB ble_ctr_cb;
UINT16 enc_handle;
- BT_OCTET8 enc_rand; /* received rand value from LTK request*/
+ BT_OCTET8 enc_rand; /* received rand value from LTK request*/
UINT16 ediv; /* received ediv value from LTK request */
UINT8 key_size;
#endif
@@ -777,7 +777,7 @@ typedef struct
*****************************************************/
#if BTM_SCO_INCLUDED == TRUE
tSCO_CB sco_cb;
-#endif
+#endif
/*****************************************************
** Security Management
@@ -802,7 +802,7 @@ typedef struct
BOOLEAN pin_type_changed; /* pin type changed during bonding */
BOOLEAN sec_req_pending; /* TRUE if a request is pending */
// btla-specific ++
-#ifdef PORCHE_PAIRING_CONFLICT
+#ifdef PORCHE_PAIRING_CONFLICT
UINT8 pin_code_len_saved; /* for legacy devices */
#endif
// btla-specific --
diff --git a/stack/btm/btm_pm.c b/stack/btm/btm_pm.c
index 7949c61..afe7275 100644
--- a/stack/btm/btm_pm.c
+++ b/stack/btm/btm_pm.c
@@ -83,7 +83,7 @@ static tBTM_STATUS btm_pm_snd_md_req( UINT8 pm_id, int link_ind, tBTM_PM_PWR_MD
*/
#if BTM_PM_DEBUG == TRUE
-const char * btm_pm_state_str[] =
+const char * btm_pm_state_str[] =
{
"pm_active_state",
"pm_hold_state",
@@ -92,7 +92,7 @@ const char * btm_pm_state_str[] =
"pm_pend_state"
};
-const char * btm_pm_event_str[] =
+const char * btm_pm_event_str[] =
{
"pm_set_mode_event",
"pm_hci_sts_event",
@@ -100,7 +100,7 @@ const char * btm_pm_event_str[] =
"pm_update_event"
};
-const char * btm_pm_action_str[] =
+const char * btm_pm_action_str[] =
{
"pm_set_mode_action",
"pm_update_db_action",
@@ -222,7 +222,7 @@ tBTM_STATUS BTM_SetPowerMode (UINT8 pm_id, BD_ADDR remote_bda, tBTM_PM_PWR_MD *p
temp_pm_id = BTM_MAX_PM_RECORDS;
/* update mode database */
- if( ((pm_id != BTM_PM_SET_ONLY_ID) &&
+ if( ((pm_id != BTM_PM_SET_ONLY_ID) &&
(btm_cb.pm_reg_db[pm_id].mask & BTM_PM_REG_SET))
|| ((pm_id == BTM_PM_SET_ONLY_ID) && (btm_cb.pm_pend_link != MAX_L2CAP_LINKS)) )
{
@@ -252,7 +252,7 @@ tBTM_STATUS BTM_SetPowerMode (UINT8 pm_id, BD_ADDR remote_bda, tBTM_PM_PWR_MD *p
return BTM_CMD_STORED;
}
-
+
return btm_pm_snd_md_req(pm_id, acl_ind, p_mode);
}
@@ -560,7 +560,7 @@ static tBTM_PM_MODE btm_pm_get_set_mode(UINT8 pm_id, tBTM_PM_MCB *p_cb, tBTM_PM_
** Function btm_pm_snd_md_req
** Description get the resulting mode and send the resuest to host controller
** Returns tBTM_STATUS
-**, BOOLEAN *p_chg_ind
+**, BOOLEAN *p_chg_ind
*******************************************************************************/
static tBTM_STATUS btm_pm_snd_md_req(UINT8 pm_id, int link_ind, tBTM_PM_PWR_MD *p_mode)
{
@@ -635,7 +635,7 @@ static tBTM_STATUS btm_pm_snd_md_req(UINT8 pm_id, int link_ind, tBTM_PM_PWR_MD *
break;
case BTM_PM_MD_HOLD:
- if (btsnd_hcic_hold_mode (btm_cb.acl_db[link_ind].hci_handle,
+ if (btsnd_hcic_hold_mode (btm_cb.acl_db[link_ind].hci_handle,
md_res.max, md_res.min))
{
btm_cb.pm_pend_link = link_ind;
@@ -643,7 +643,7 @@ static tBTM_STATUS btm_pm_snd_md_req(UINT8 pm_id, int link_ind, tBTM_PM_PWR_MD *
break;
case BTM_PM_MD_SNIFF:
- if (btsnd_hcic_sniff_mode (btm_cb.acl_db[link_ind].hci_handle,
+ if (btsnd_hcic_sniff_mode (btm_cb.acl_db[link_ind].hci_handle,
md_res.max, md_res.min, md_res.attempt,
md_res.timeout))
{
@@ -652,7 +652,7 @@ static tBTM_STATUS btm_pm_snd_md_req(UINT8 pm_id, int link_ind, tBTM_PM_PWR_MD *
break;
case BTM_PM_MD_PARK:
- if (btsnd_hcic_park_mode (btm_cb.acl_db[link_ind].hci_handle,
+ if (btsnd_hcic_park_mode (btm_cb.acl_db[link_ind].hci_handle,
md_res.max, md_res.min))
{
btm_cb.pm_pend_link = link_ind;
@@ -810,7 +810,7 @@ void btm_pm_proc_mode_change (UINT8 hci_status, UINT16 hci_handle, UINT8 mode, U
/* Mode changed from Sniff to Active while SCO is open. */
/* Packet types of active mode, not sniff mode, should be used for ACL when SCO is closed. */
p->restore_pkt_types = btm_cb.btm_acl_pkt_types_supported;
-
+
/* Exclude packet types not supported by the peer */
btm_acl_chk_peer_pkt_type_support (p, &p->restore_pkt_types);
}
diff --git a/stack/btm/btm_sco.c b/stack/btm/btm_sco.c
index d631480..394ac0a 100644
--- a/stack/btm/btm_sco.c
+++ b/stack/btm/btm_sco.c
@@ -80,7 +80,7 @@ void btm_sco_flush_sco_data(UINT16 sco_inx)
p = &btm_cb.sco_cb.sco_db[sco_inx];
while (p->xmit_data_q.p_first)
{
- if ((p_buf = (BT_HDR *)GKI_dequeue (&p->xmit_data_q)) != NULL)
+ if ((p_buf = (BT_HDR *)GKI_dequeue (&p->xmit_data_q)) != NULL)
GKI_freebuf (p_buf);
}
}
@@ -120,7 +120,7 @@ void btm_sco_init (void)
** the tx_bw, max_latency, content format, and packet_types are
** valid. The hci_status parameter should be
** ([0x0] to accept, [0x0d..0x0f] to reject)
-**
+**
** Returns void
**
*******************************************************************************/
@@ -190,7 +190,7 @@ static void btm_esco_conn_rsp (UINT16 sco_inx, UINT8 hci_status, BD_ADDR bda,
if (p_sco->esco.data.link_type == BTM_LINK_TYPE_SCO)
{
temp_pkt_types &= BTM_SCO_LINK_ONLY_MASK;
-
+
if (btm_cb.devcb.local_version.hci_version >= HCI_PROTO_VERSION_2_0)
{
temp_pkt_types |= BTM_SCO_EXCEPTION_PKTS_MASK;
@@ -242,7 +242,7 @@ void btm_sco_check_send_pkts (UINT16 sco_inx)
/* If there is data to send, send it now */
while (p_ccb->xmit_data_q.p_first != NULL)
- {
+ {
p_buf = NULL;
#if BTM_SCO_HCI_DEBUG
@@ -267,14 +267,14 @@ void btm_sco_check_send_pkts (UINT16 sco_inx)
void btm_route_sco_data(BT_HDR *p_msg)
{
#if BTM_SCO_HCI_INCLUDED == TRUE
- UINT16 sco_inx, handle;
+ UINT16 sco_inx, handle;
UINT8 *p = (UINT8 *)(p_msg + 1) + p_msg->offset;
UINT8 pkt_size = 0;
UINT8 pkt_status = 0;
/* Extract Packet_Status_Flag and handle */
STREAM_TO_UINT16 (handle, p);
- pkt_status = HCID_GET_EVENT(handle);
+ pkt_status = HCID_GET_EVENT(handle);
handle = HCID_GET_HANDLE (handle);
STREAM_TO_UINT8 (pkt_size, p);
@@ -285,8 +285,8 @@ void btm_route_sco_data(BT_HDR *p_msg)
if (!btm_cb.sco_cb.p_data_cb )
/* if no data callback registered, just free the buffer */
GKI_freebuf (p_msg);
- else
- {
+ else
+ {
(*btm_cb.sco_cb.p_data_cb)(sco_inx, p_msg, (tBTM_SCO_DATA_FLAG) pkt_status);
}
}
@@ -306,20 +306,20 @@ void btm_route_sco_data(BT_HDR *p_msg)
** Function BTM_WriteScoData
**
** Description This function write SCO data to a specified instance. The data
-** to be written p_buf needs to carry an offset of
-** HCI_SCO_PREAMBLE_SIZE bytes, and the data length can not
+** to be written p_buf needs to carry an offset of
+** HCI_SCO_PREAMBLE_SIZE bytes, and the data length can not
** exceed BTM_SCO_DATA_SIZE_MAX bytes, whose default value is set
-** to 60 and is configurable. Data longer than the maximum bytes
-** will be truncated.
+** to 60 and is configurable. Data longer than the maximum bytes
+** will be truncated.
**
** Returns BTM_SUCCESS: data write is successful
** BTM_ILLEGAL_VALUE: SCO data contains illegal offset value.
-** BTM_SCO_BAD_LENGTH: SCO data length exceeds the max SCO packet
-** size.
+** BTM_SCO_BAD_LENGTH: SCO data length exceeds the max SCO packet
+** size.
** BTM_NO_RESOURCES: no resources.
** BTM_UNKNOWN_ADDR: unknown SCO connection handle, or SCO is not
** routed via HCI.
-**
+**
**
*******************************************************************************/
tBTM_STATUS BTM_WriteScoData (UINT16 sco_inx, BT_HDR *p_buf)
@@ -347,7 +347,7 @@ tBTM_STATUS BTM_WriteScoData (UINT16 sco_inx, BT_HDR *p_buf)
p = (UINT8 *)(p_buf + 1) + p_buf->offset;
/* add HCI handle */
UINT16_TO_STREAM (p, p_ccb->hci_handle);
- /* only sent the first BTM_SCO_DATA_SIZE_MAX bytes data if more than max,
+ /* only sent the first BTM_SCO_DATA_SIZE_MAX bytes data if more than max,
and set warning status */
if (p_buf->len > BTM_SCO_DATA_SIZE_MAX)
{
@@ -359,7 +359,7 @@ tBTM_STATUS BTM_WriteScoData (UINT16 sco_inx, BT_HDR *p_buf)
p_buf->len += HCI_SCO_PREAMBLE_SIZE;
GKI_enqueue (&p_ccb->xmit_data_q, p_buf);
-
+
btm_sco_check_send_pkts (sco_inx);
}
}
@@ -367,7 +367,7 @@ tBTM_STATUS BTM_WriteScoData (UINT16 sco_inx, BT_HDR *p_buf)
{
GKI_freebuf(p_buf);
- BTM_TRACE_WARNING2 ("BTM_WriteScoData, invalid sco index: %d at state [%d]",
+ BTM_TRACE_WARNING2 ("BTM_WriteScoData, invalid sco index: %d at state [%d]",
sco_inx, btm_cb.sco_cb.sco_db[sco_inx].state);
status = BTM_UNKNOWN_ADDR;
}
@@ -441,7 +441,7 @@ static tBTM_STATUS btm_send_connect_request(UINT16 acl_handle,
p_setup->tx_bw, p_setup->rx_bw,
p_setup->max_latency, p_setup->voice_contfmt,
p_setup->retrans_effort, temp_pkt_types);
-
+
if (!btsnd_hcic_setup_esco_conn(acl_handle,
p_setup->tx_bw,
p_setup->rx_bw,
@@ -613,7 +613,7 @@ tBTM_STATUS BTM_CreateSco (BD_ADDR remote_bda, BOOLEAN is_orig, UINT16 pkt_types
/* Coverity: FALSE-POSITIVE error from Coverity tool. Please do NOT remove following comment. */
/* coverity[uninit_use_in_call] False-positive: setting the mode to BTM_PM_MD_ACTIVE only uses settings.mode
the other data members of tBTM_PM_PWR_MD are ignored
-*/
+*/
pm.mode = BTM_PM_MD_ACTIVE;
BTM_SetPowerMode(BTM_PM_SET_ONLY_ID, remote_bda, &pm);
p->state = SCO_ST_PEND_UNPARK;
@@ -682,7 +682,7 @@ tBTM_STATUS BTM_CreateSco (BD_ADDR remote_bda, BOOLEAN is_orig, UINT16 pkt_types
}
if( p->state != SCO_ST_PEND_UNPARK && p->state != SCO_ST_PEND_ROLECHANGE )
- {
+ {
if (is_orig)
{
BTM_TRACE_API2("BTM_CreateSco -> (e)SCO Link for ACL handle 0x%04x, Desired Type %d",
@@ -762,7 +762,7 @@ void btm_sco_chk_pend_rolechange (UINT16 hci_handle)
for (xx = 0; xx < BTM_MAX_SCO_LINKS; xx++, p++)
{
- if ((p->state == SCO_ST_PEND_ROLECHANGE) &&
+ if ((p->state == SCO_ST_PEND_ROLECHANGE) &&
((acl_handle = BTM_GetHCIConnHandle (p->esco.data.bd_addr)) == hci_handle))
{
@@ -842,7 +842,7 @@ void btm_sco_conn_req (BD_ADDR bda, DEV_CLASS dev_class, UINT8 link_type)
}
/* TCS usage */
- if (btm_cb.sco_cb.app_sco_ind_cb)
+ if (btm_cb.sco_cb.app_sco_ind_cb)
{
/* Now, try to find an unused control block */
for (xx = 0, p = &btm_cb.sco_cb.sco_db[0]; xx < BTM_MAX_SCO_LINKS; xx++, p++)
@@ -858,8 +858,8 @@ void btm_sco_conn_req (BD_ADDR bda, DEV_CLASS dev_class, UINT8 link_type)
break;
}
}
- if( xx < BTM_MAX_SCO_LINKS)
- {
+ if( xx < BTM_MAX_SCO_LINKS)
+ {
btm_cb.sco_cb.app_sco_ind_cb(xx);
return;
}
@@ -976,7 +976,7 @@ void btm_sco_connected (UINT8 hci_status, BD_ADDR bda, UINT16 hci_handle,
** Description Look through all active SCO connection for a match based on the
** HCI handle.
**
-** Returns index to matched SCO connection CB, or BTM_MAX_SCO_LINKS if
+** Returns index to matched SCO connection CB, or BTM_MAX_SCO_LINKS if
** no match.
**
*******************************************************************************/
@@ -1070,7 +1070,7 @@ void btm_remove_sco_links (BD_ADDR bda)
** Function btm_sco_removed
**
** Description This function is called by BTIF when an SCO connection
-** is removed.
+** is removed.
**
** Returns void
**
@@ -1131,7 +1131,7 @@ void btm_sco_acl_removed (BD_ADDR bda)
if ((!bda) || (!memcmp (p->esco.data.bd_addr, bda, BD_ADDR_LEN) && p->rem_bd_known))
{
btm_sco_flush_sco_data(xx);
-
+
p->state = SCO_ST_UNUSED;
p->esco.p_esco_cback = NULL; /* Deregister eSCO callback */
(*p->p_disc_cb)(xx);
@@ -1388,13 +1388,13 @@ tBTM_STATUS BTM_SetEScoMode (tBTM_SCO_TYPE sco_mode, tBTM_ESCO_PARAMS *p_parms)
** Function BTM_RegForEScoEvts
**
** Description This function registers a SCO event callback with the
-** specified instance. It should be used to received
+** specified instance. It should be used to received
** connection indication events and change of link parameter
-** events.
+** events.
**
** Returns BTM_SUCCESS if the successful.
** BTM_ILLEGAL_VALUE if there is an illegal sco_inx
-** BTM_MODE_UNSUPPORTED if controller version is not BT1.2 or
+** BTM_MODE_UNSUPPORTED if controller version is not BT1.2 or
** later or does not support eSCO.
**
*******************************************************************************/
@@ -1440,7 +1440,7 @@ tBTM_STATUS BTM_ReadEScoLinkParms (UINT16 sco_inx, tBTM_ESCO_DATA *p_parms)
#if (BTM_MAX_SCO_LINKS>0)
BTM_TRACE_API1("BTM_ReadEScoLinkParms -> sco_inx 0x%04x", sco_inx);
- if (sco_inx < BTM_MAX_SCO_LINKS &&
+ if (sco_inx < BTM_MAX_SCO_LINKS &&
btm_cb.sco_cb.sco_db[sco_inx].state >= SCO_ST_CONNECTED)
{
*p_parms = btm_cb.sco_cb.sco_db[sco_inx].esco.data;
@@ -1477,12 +1477,12 @@ tBTM_STATUS BTM_ChangeEScoLinkParms (UINT16 sco_inx, tBTM_CHG_ESCO_PARAMS *p_par
tBTM_ESCO_PARAMS *p_setup;
tSCO_CONN *p_sco;
UINT16 temp_pkt_types;
-
+
/* Make sure sco handle is valid and on an active link */
- if (sco_inx >= BTM_MAX_SCO_LINKS ||
+ if (sco_inx >= BTM_MAX_SCO_LINKS ||
btm_cb.sco_cb.sco_db[sco_inx].state != SCO_ST_CONNECTED)
return (BTM_WRONG_MODE);
-
+
p_sco = &btm_cb.sco_cb.sco_db[sco_inx];
p_setup = &p_sco->esco.setup;
@@ -1490,9 +1490,9 @@ tBTM_STATUS BTM_ChangeEScoLinkParms (UINT16 sco_inx, tBTM_CHG_ESCO_PARAMS *p_par
if (p_sco->esco.data.link_type == BTM_LINK_TYPE_SCO ||
!btm_cb.sco_cb.esco_supported)
{
- p_setup->packet_types = p_parms->packet_types &
+ p_setup->packet_types = p_parms->packet_types &
(btm_cb.btm_sco_pkt_types_supported & BTM_SCO_LINK_ONLY_MASK);
-
+
BTM_TRACE_API2("BTM_ChangeEScoLinkParms -> SCO Link for handle 0x%04x, pkt 0x%04x",
p_sco->hci_handle, p_setup->packet_types);
@@ -1548,7 +1548,7 @@ tBTM_STATUS BTM_ChangeEScoLinkParms (UINT16 sco_inx, tBTM_CHG_ESCO_PARAMS *p_par
** the tx_bw, max_latency, content format, and packet_types are
** valid. The hci_status parameter should be
** ([0x0] to accept, [0x0d..0x0f] to reject)
-**
+**
**
** Returns void
**
@@ -1570,9 +1570,9 @@ void BTM_EScoConnRsp (UINT16 sco_inx, UINT8 hci_status, tBTM_ESCO_PARAMS *p_parm
**
** Function btm_read_def_esco_mode
**
-** Description This function copies the current default esco settings into
+** Description This function copies the current default esco settings into
** the return buffer.
-**
+**
** Returns tBTM_SCO_TYPE
**
*******************************************************************************/
@@ -1591,7 +1591,7 @@ tBTM_SCO_TYPE btm_read_def_esco_mode (tBTM_ESCO_PARAMS *p_parms)
** Function btm_esco_proc_conn_chg
**
** Description This function is called by BTIF when an SCO connection
-** is changed.
+** is changed.
**
** Returns void
**
@@ -1636,7 +1636,7 @@ void btm_esco_proc_conn_chg (UINT8 status, UINT16 handle, UINT8 tx_interval,
**
** Function btm_is_sco_active
**
-** Description This function is called to see if a SCO handle is already in
+** Description This function is called to see if a SCO handle is already in
** use.
**
** Returns BOOLEAN
diff --git a/stack/btm/btm_sec.c b/stack/btm/btm_sec.c
index a9199cf..5ef45b1 100644..100755
--- a/stack/btm/btm_sec.c
+++ b/stack/btm/btm_sec.c
@@ -68,8 +68,8 @@ BOOLEAN btm_sec_are_all_trusted(UINT32 p_mask[]);
static tBTM_STATUS btm_sec_send_hci_disconnect (tBTM_SEC_DEV_REC *p_dev_rec, UINT8 reason);
tBTM_SEC_DEV_REC *btm_sec_find_dev_by_sec_state (UINT8 state);
-static BOOLEAN btm_sec_set_security_level ( CONNECTION_TYPE conn_type, char *p_name, UINT8 service_id,
- UINT16 sec_level, UINT16 psm, UINT32 mx_proto_id,
+static BOOLEAN btm_sec_set_security_level ( CONNECTION_TYPE conn_type, char *p_name, UINT8 service_id,
+ UINT16 sec_level, UINT16 psm, UINT32 mx_proto_id,
UINT32 mx_chan_id);
/* TRUE - authenticated link key is possible */
@@ -126,8 +126,8 @@ BOOLEAN BTM_SecRegister (tBTM_APPL_INFO *p_cb_info)
}
#endif
-
-
+
+
btm_cb.api = *p_cb_info;
#if BLE_INCLUDED == TRUE && SMP_INCLUDED == TRUE
BTM_TRACE_ERROR1 ("BTM_SecRegister: btm_cb.api.p_le_callback = 0x%x ", btm_cb.api.p_le_callback);
@@ -391,11 +391,11 @@ void BTM_SetPairableMode (BOOLEAN allow_pairing, BOOLEAN connect_only_paired)
** Description Register UCD service security level with Security Manager
**
** Parameters: is_originator - TRUE if originating the connection, FALSE if not
-** p_name - Name of the service relevant only if
+** p_name - Name of the service relevant only if
** authorization will show this name to user. ignored
** if BTM_SEC_SERVICE_NAME_LEN is 0.
** service_id - service ID for the service passed to authorization callback
-** sec_level - bit mask of the security features
+** sec_level - bit mask of the security features
** psm - L2CAP PSM
** mx_proto_id - protocol ID of multiplexing proto below
** mx_chan_id - channel ID of multiplexing proto below
@@ -403,8 +403,8 @@ void BTM_SetPairableMode (BOOLEAN allow_pairing, BOOLEAN connect_only_paired)
** Returns TRUE if registered OK, else FALSE
**
*******************************************************************************/
-BOOLEAN BTM_SetUCDSecurityLevel (BOOLEAN is_originator, char *p_name, UINT8 service_id,
- UINT16 sec_level, UINT16 psm, UINT32 mx_proto_id,
+BOOLEAN BTM_SetUCDSecurityLevel (BOOLEAN is_originator, char *p_name, UINT8 service_id,
+ UINT16 sec_level, UINT16 psm, UINT32 mx_proto_id,
UINT32 mx_chan_id)
{
#if (L2CAP_UCD_INCLUDED == TRUE)
@@ -415,7 +415,7 @@ BOOLEAN BTM_SetUCDSecurityLevel (BOOLEAN is_originator, char *p_name, UINT8 serv
else
conn_type = CONNLESS_TERM;
- return(btm_sec_set_security_level (conn_type, p_name, service_id,
+ return(btm_sec_set_security_level (conn_type, p_name, service_id,
sec_level, psm, mx_proto_id, mx_chan_id));
#else
return FALSE;
@@ -429,11 +429,11 @@ BOOLEAN BTM_SetUCDSecurityLevel (BOOLEAN is_originator, char *p_name, UINT8 serv
** Description Register service security level with Security Manager
**
** Parameters: is_originator - TRUE if originating the connection, FALSE if not
-** p_name - Name of the service relevant only if
+** p_name - Name of the service relevant only if
** authorization will show this name to user. ignored
** if BTM_SEC_SERVICE_NAME_LEN is 0.
** service_id - service ID for the service passed to authorization callback
-** sec_level - bit mask of the security features
+** sec_level - bit mask of the security features
** psm - L2CAP PSM
** mx_proto_id - protocol ID of multiplexing proto below
** mx_chan_id - channel ID of multiplexing proto below
@@ -453,10 +453,10 @@ BOOLEAN BTM_SetSecurityLevel (BOOLEAN is_originator, char *p_name, UINT8 service
else
conn_type = CONN_ORIENT_TERM;
- return(btm_sec_set_security_level (conn_type, p_name, service_id,
+ return(btm_sec_set_security_level (conn_type, p_name, service_id,
sec_level, psm, mx_proto_id, mx_chan_id));
#else
- return(btm_sec_set_security_level (is_originator, p_name, service_id,
+ return(btm_sec_set_security_level (is_originator, p_name, service_id,
sec_level, psm, mx_proto_id, mx_chan_id));
#endif
}
@@ -468,11 +468,11 @@ BOOLEAN BTM_SetSecurityLevel (BOOLEAN is_originator, char *p_name, UINT8 service
** Description Register service security level with Security Manager
**
** Parameters: conn_type - TRUE if originating the connection, FALSE if not
-** p_name - Name of the service relevant only if
+** p_name - Name of the service relevant only if
** authorization will show this name to user. ignored
** if BTM_SEC_SERVICE_NAME_LEN is 0.
** service_id - service ID for the service passed to authorization callback
-** sec_level - bit mask of the security features
+** sec_level - bit mask of the security features
** psm - L2CAP PSM
** mx_proto_id - protocol ID of multiplexing proto below
** mx_chan_id - channel ID of multiplexing proto below
@@ -480,8 +480,8 @@ BOOLEAN BTM_SetSecurityLevel (BOOLEAN is_originator, char *p_name, UINT8 service
** Returns TRUE if registered OK, else FALSE
**
*******************************************************************************/
-static BOOLEAN btm_sec_set_security_level (CONNECTION_TYPE conn_type, char *p_name, UINT8 service_id,
- UINT16 sec_level, UINT16 psm, UINT32 mx_proto_id,
+static BOOLEAN btm_sec_set_security_level (CONNECTION_TYPE conn_type, char *p_name, UINT8 service_id,
+ UINT16 sec_level, UINT16 psm, UINT32 mx_proto_id,
UINT32 mx_chan_id)
{
tBTM_SEC_SERV_REC *p_srec;
@@ -766,9 +766,9 @@ UINT8 btm_sec_clr_service_by_psm (UINT16 psm)
**
** Function BTM_SecClrUCDService
**
-** Description
+** Description
**
-** Parameters Service ID - Id of the service to remove.
+** Parameters Service ID - Id of the service to remove.
** ('0' removes all service records )
**
** Returns Number of records that were cleared.
@@ -784,7 +784,7 @@ UINT8 BTM_SecClrUCDService (UINT8 service_id)
for (i = 0; i < BTM_SEC_MAX_SERVICE_RECORDS; i++, p_srec++)
{
/* Delete services with specified name (if in use and not SDP) */
- if ((p_srec->security_flags & BTM_SEC_IN_USE) &&
+ if ((p_srec->security_flags & BTM_SEC_IN_USE) &&
(!service_id || (service_id == (UINT32)p_srec->service_id)))
{
BTM_TRACE_API2("BTM_UCD_SEC_CLR[%d]: id %d", i, service_id);
@@ -902,7 +902,7 @@ void BTM_PINCodeReply (BD_ADDR bd_addr, UINT8 res, UINT8 pin_len, UINT8 *p_pin,
btm_sec_change_pairing_state (BTM_PAIR_STATE_IDLE);
p_dev_rec->sec_flags &= ~BTM_SEC_LINK_KEY_AUTHED;
- (*btm_cb.api.p_auth_complete_callback) (p_dev_rec->bd_addr, p_dev_rec->dev_class,
+ (*btm_cb.api.p_auth_complete_callback) (p_dev_rec->bd_addr, p_dev_rec->dev_class,
p_dev_rec->sec_bd_name, HCI_ERR_AUTH_FAILURE);
}
return;
@@ -911,7 +911,7 @@ void BTM_PINCodeReply (BD_ADDR bd_addr, UINT8 res, UINT8 pin_len, UINT8 *p_pin,
btm_sec_change_pairing_state (BTM_PAIR_STATE_WAIT_AUTH_COMPLETE);
btm_cb.acl_disc_reason = HCI_SUCCESS;
-#ifdef PORCHE_PAIRING_CONFLICT
+#ifdef PORCHE_PAIRING_CONFLICT
BTM_TRACE_EVENT2("BTM_PINCodeReply(): Saving pin_len: %d btm_cb.pin_code_len: %d", pin_len, btm_cb.pin_code_len);
/* if this was not pre-fetched, save the PIN */
if (btm_cb.pin_code_len == 0)
@@ -1209,7 +1209,7 @@ tBTM_STATUS BTM_SecBondCancel (BD_ADDR bd_addr)
#if SMP_INCLUDED == TRUE
p = btm_bda_to_acl(bd_addr);
- if (p && p->is_le_link &&
+ if (p && p->is_le_link &&
(p_dev_rec->sec_state == BTM_SEC_STATE_AUTHENTICATING))
{
BTM_TRACE_DEBUG0 ("Cancel LE pairing");
@@ -1219,7 +1219,7 @@ tBTM_STATUS BTM_SecBondCancel (BD_ADDR bd_addr)
}
else
{
- return BTM_WRONG_MODE;
+ return BTM_WRONG_MODE;
}
}
@@ -1450,12 +1450,12 @@ static tBTM_STATUS btm_sec_send_hci_disconnect (tBTM_SEC_DEV_REC *p_dev_rec, UIN
#if BTM_DISC_DURING_RS == TRUE
/* If a Role Switch is in progress, delay the HCI Disconnect to avoid controller problem (4329B1) */
if (p_dev_rec->rs_disc_pending == BTM_SEC_RS_PENDING)
- {
+ {
BTM_TRACE_ERROR0("RS in progress - Set DISC Pending flag in btm_sec_send_hci_disconnect to delay disconnect");
p_dev_rec->rs_disc_pending = BTM_SEC_DISC_PENDING;
return BTM_SUCCESS;
}
-#endif
+#endif
/* Tear down the HCI link */
if (!btsnd_hcic_disconnect (p_dev_rec->hci_handle, reason))
{
@@ -2224,7 +2224,7 @@ tBTM_STATUS btm_sec_l2cap_access_req (BD_ADDR bd_addr, UINT16 psm, UINT16 handle
(p_dev_rec->sec_flags & BTM_SEC_AUTHENTICATED), (p_dev_rec->sec_flags & BTM_SEC_ENCRYPTED));
/* SM4, but we do not know for sure which level of security we need.
* as long as we have a link key, it's OK */
- if ((0 == (p_dev_rec->sec_flags & BTM_SEC_AUTHENTICATED))
+ if ((0 == (p_dev_rec->sec_flags & BTM_SEC_AUTHENTICATED))
||(0 == (p_dev_rec->sec_flags & BTM_SEC_ENCRYPTED)))
{
rc = BTM_DELAY_CHECK;
@@ -2885,7 +2885,7 @@ void btm_sec_rmt_name_request_complete (UINT8 *p_bd_addr, UINT8 *p_bd_name, UINT
{
btm_sec_change_pairing_state (BTM_PAIR_STATE_IDLE);
- (*btm_cb.api.p_auth_complete_callback) (p_dev_rec->bd_addr, p_dev_rec->dev_class,
+ (*btm_cb.api.p_auth_complete_callback) (p_dev_rec->bd_addr, p_dev_rec->dev_class,
p_dev_rec->sec_bd_name, status);
return;
}
@@ -2902,7 +2902,7 @@ void btm_sec_rmt_name_request_complete (UINT8 *p_bd_addr, UINT8 *p_bd_name, UINT
}
}
- /* BT 2.1 or carkit, bring up the connection to force the peer to request PIN.
+ /* BT 2.1 or carkit, bring up the connection to force the peer to request PIN.
** Else prefetch (btm_sec_check_prefetch_pin will do the prefetching if needed)
*/
if ((p_dev_rec->sm4 != BTM_SM4_KNOWN) || !btm_sec_check_prefetch_pin(p_dev_rec))
@@ -2920,7 +2920,7 @@ void btm_sec_rmt_name_request_complete (UINT8 *p_bd_addr, UINT8 *p_bd_name, UINT
btm_sec_change_pairing_state (BTM_PAIR_STATE_IDLE);
- (*btm_cb.api.p_auth_complete_callback) (p_dev_rec->bd_addr, p_dev_rec->dev_class,
+ (*btm_cb.api.p_auth_complete_callback) (p_dev_rec->bd_addr, p_dev_rec->dev_class,
p_dev_rec->sec_bd_name, HCI_ERR_MEMORY_FULL);
}
}
@@ -3222,8 +3222,8 @@ void btm_io_capabilities_rsp (UINT8 *p)
* Use the connecting device's CoD for the connection */
/* coverity[uninit_use_in_call]
Event uninit_use_in_call: Using uninitialized element of array "evt_data.bd_addr" in call to function "memcmp"
-FALSE-POSITIVE error from Coverity test-tool. evt_data.bd_addr is set at the beginning with: STREAM_TO_BDADDR (evt_data.bd_addr, p);
-*/
+FALSE-POSITIVE error from Coverity test-tool. evt_data.bd_addr is set at the beginning with: STREAM_TO_BDADDR (evt_data.bd_addr, p);
+*/
if (!memcmp (evt_data.bd_addr, btm_cb.connecting_bda, BD_ADDR_LEN))
memcpy (p_dev_rec->dev_class, btm_cb.connecting_dc, DEV_CLASS_LEN);
@@ -3683,7 +3683,7 @@ void btm_sec_auth_complete (UINT16 handle, UINT8 status)
&& (old_state != BTM_PAIR_STATE_IDLE) )
{
(*btm_cb.api.p_auth_complete_callback) (p_dev_rec->bd_addr,
- p_dev_rec->dev_class,
+ p_dev_rec->dev_class,
p_dev_rec->sec_bd_name, status);
}
return;
@@ -3943,7 +3943,7 @@ static void btm_sec_connect_after_reject_timeout (TIMER_LIST_ENT *p_tle)
btm_sec_change_pairing_state (BTM_PAIR_STATE_IDLE);
- (*btm_cb.api.p_auth_complete_callback) (p_dev_rec->bd_addr, p_dev_rec->dev_class,
+ (*btm_cb.api.p_auth_complete_callback) (p_dev_rec->bd_addr, p_dev_rec->dev_class,
p_dev_rec->sec_bd_name, HCI_ERR_MEMORY_FULL);
}
}
@@ -4107,8 +4107,8 @@ void btm_sec_connected (UINT8 *bda, UINT16 handle, UINT8 status, UINT8 enc_mode)
/* We need to notify host that the key is not known any more */
if (btm_cb.api.p_auth_complete_callback)
{
- (*btm_cb.api.p_auth_complete_callback) (p_dev_rec->bd_addr,
- p_dev_rec->dev_class,
+ (*btm_cb.api.p_auth_complete_callback) (p_dev_rec->bd_addr,
+ p_dev_rec->dev_class,
p_dev_rec->sec_bd_name, status);
}
}
@@ -4326,7 +4326,7 @@ void btm_sec_disconnected (UINT16 handle, UINT8 reason)
return;
#if BTM_DISC_DURING_RS == TRUE
- BTM_TRACE_ERROR0("btm_sec_disconnected - Clearing Pending flag");
+ BTM_TRACE_ERROR0("btm_sec_disconnected - Clearing Pending flag");
p_dev_rec->rs_disc_pending = BTM_SEC_RS_NOT_PENDING; /* reset flag */
#endif
@@ -4485,7 +4485,7 @@ void btm_sec_link_key_request (UINT8 *p_bda)
btsnd_hcic_link_key_req_reply (p_bda, p_dev_rec->link_key);
return;
}
-
+
/* Notify L2CAP to increase timeout */
l2c_pin_code_request (p_bda);
@@ -4654,7 +4654,7 @@ void btm_sec_pin_code_request (UINT8 *p_bda)
if (btm_cb.pairing_state != BTM_PAIR_STATE_IDLE)
{
- if ( (memcmp (p_bda, btm_cb.pairing_bda, BD_ADDR_LEN) == 0) &&
+ if ( (memcmp (p_bda, btm_cb.pairing_bda, BD_ADDR_LEN) == 0) &&
(btm_cb.pairing_state == BTM_PAIR_STATE_WAIT_AUTH_COMPLETE) )
{
/* fake this out - porshe carkit issue - */
@@ -4727,7 +4727,7 @@ void btm_sec_pin_code_request (UINT8 *p_bda)
BTM_TRACE_EVENT0 ("btm_sec_pin_code_request bonding sending reply");
btsnd_hcic_pin_code_req_reply (p_bda, btm_cb.pin_code_len, p_cb->pin_code);
-#ifdef PORCHE_PAIRING_CONFLICT
+#ifdef PORCHE_PAIRING_CONFLICT
btm_cb.pin_code_len_saved = btm_cb.pin_code_len;
#endif
@@ -5189,7 +5189,7 @@ static tBTM_SEC_SERV_REC *btm_sec_find_mx_serv (UINT8 is_originator, UINT16 psm,
for (i = 0; i < BTM_SEC_MAX_SERVICE_RECORDS; i++, p_serv_rec++)
{
if ((p_serv_rec->security_flags & BTM_SEC_IN_USE)
- && (p_serv_rec->psm == psm)
+ && (p_serv_rec->psm == psm)
&& (p_serv_rec->mx_proto_id == mx_proto_id)
&& (( is_originator && (p_serv_rec->orig_mx_chan_id == mx_chan_id))
|| (!is_originator && (p_serv_rec->term_mx_chan_id == mx_chan_id))))
@@ -5583,7 +5583,7 @@ void btm_sec_clear_ble_keys (tBTM_SEC_DEV_REC *p_dev_rec)
BOOLEAN btm_sec_is_a_bonded_dev (BD_ADDR bda)
{
- tBTM_SEC_DEV_REC *p_dev_rec= btm_find_dev (bda);
+ tBTM_SEC_DEV_REC *p_dev_rec= btm_find_dev (bda);
BOOLEAN is_bonded= FALSE;
#if (SMP_INCLUDED== TRUE)
@@ -5600,7 +5600,7 @@ BOOLEAN btm_sec_is_a_bonded_dev (BD_ADDR bda)
**
** Function btm_sec_find_bonded_dev
**
-** Description Find a bonded device starting from the specified index
+** Description Find a bonded device starting from the specified index
**
** Returns TRUE - found a bonded device
**
@@ -5610,7 +5610,7 @@ BOOLEAN btm_sec_find_bonded_dev (UINT8 start_idx, UINT8 *p_found_idx, tBTM_SEC_D
BOOLEAN found= FALSE;
#if (SMP_INCLUDED== TRUE)
- tBTM_SEC_DEV_REC *p_dev_rec;
+ tBTM_SEC_DEV_REC *p_dev_rec;
int i;
if (start_idx >= BTM_SEC_MAX_DEVICE_RECORDS)
{
@@ -5623,9 +5623,9 @@ BOOLEAN btm_sec_find_bonded_dev (UINT8 start_idx, UINT8 *p_found_idx, tBTM_SEC_D
{
if (p_dev_rec->ble.key_type || (p_dev_rec->sec_flags & BTM_SEC_LINK_KEY_KNOWN))
{
- *p_found_idx = i;
+ *p_found_idx = i;
p_rec = p_dev_rec;
- break;
+ break;
}
}
BTM_TRACE_DEBUG1 ("btm_sec_find_bonded_dev=%d", found);
diff --git a/stack/btu/btu_hcif.c b/stack/btu/btu_hcif.c
index 5a972c0..1ee6b94 100644
--- a/stack/btu/btu_hcif.c
+++ b/stack/btu/btu_hcif.c
@@ -160,7 +160,7 @@ static void btu_hcif_store_cmd (UINT8 controller_id, BT_HDR *p_buf)
/* If vendor specific save the callback function */
if ((opcode & HCI_GRP_VENDOR_SPECIFIC) == HCI_GRP_VENDOR_SPECIFIC
#if BLE_INCLUDED == TRUE
- || (opcode == HCI_BLE_RAND )
+ || (opcode == HCI_BLE_RAND )
|| (opcode == HCI_BLE_ENCRYPT)
#endif
)
@@ -386,17 +386,17 @@ void btu_hcif_process_event (UINT8 controller_id, BT_HDR *p_msg)
case HCI_BLE_ADV_PKT_RPT_EVT: /* result of inquiry */
btu_ble_process_adv_pkt(p, hci_evt_len);
break;
- case HCI_BLE_CONN_COMPLETE_EVT:
+ case HCI_BLE_CONN_COMPLETE_EVT:
btu_ble_ll_conn_complete_evt(p, hci_evt_len);
break;
case HCI_BLE_LL_CONN_PARAM_UPD_EVT:
- btu_ble_ll_conn_param_upd_evt(p, hci_evt_len);
+ btu_ble_ll_conn_param_upd_evt(p, hci_evt_len);
break;
case HCI_BLE_READ_REMOTE_FEAT_CMPL_EVT:
- btu_ble_read_remote_feat_evt(p, hci_evt_len);
+ btu_ble_read_remote_feat_evt(p, hci_evt_len);
break;
case HCI_BLE_LTK_REQ_EVT: /* received only at slave device */
- btu_ble_proc_ltk_req(p, hci_evt_len);
+ btu_ble_proc_ltk_req(p, hci_evt_len);
break;
}
break;
@@ -437,7 +437,7 @@ void btu_hcif_send_cmd (UINT8 controller_id, BT_HDR *p_buf)
/* Allow for startup case, where no acks may be received */
if ( ((controller_id == LOCAL_BR_EDR_CONTROLLER_ID)
- && (p_hci_cmd_cb->cmd_window == 0)
+ && (p_hci_cmd_cb->cmd_window == 0)
&& (btm_cb.devcb.state == BTM_DEV_STATE_WAIT_RESET_CMPLT)) )
{
p_hci_cmd_cb->cmd_window = p_hci_cmd_cb->cmd_xmit_q.count + 1;
@@ -528,9 +528,9 @@ void btu_hcif_send_host_rdy_for_data(void)
/*******************************************************************************
**
-** Function btu_hcif_inquiry_comp_evt
+** Function btu_hcif_inquiry_comp_evt
**
-** Description Process event HCI_INQUIRY_COMP_EVT
+** Description Process event HCI_INQUIRY_COMP_EVT
**
** Returns void
**
@@ -548,9 +548,9 @@ static void btu_hcif_inquiry_comp_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_inquiry_result_evt
+** Function btu_hcif_inquiry_result_evt
**
-** Description Process event HCI_INQUIRY_RESULT_EVT
+** Description Process event HCI_INQUIRY_RESULT_EVT
**
** Returns void
**
@@ -563,9 +563,9 @@ static void btu_hcif_inquiry_result_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_inquiry_rssi_result_evt
+** Function btu_hcif_inquiry_rssi_result_evt
**
-** Description Process event HCI_INQUIRY_RSSI_RESULT_EVT
+** Description Process event HCI_INQUIRY_RSSI_RESULT_EVT
**
** Returns void
**
@@ -578,9 +578,9 @@ static void btu_hcif_inquiry_rssi_result_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_extended_inquiry_result_evt
+** Function btu_hcif_extended_inquiry_result_evt
**
-** Description Process event HCI_EXTENDED_INQUIRY_RESULT_EVT
+** Description Process event HCI_EXTENDED_INQUIRY_RESULT_EVT
**
** Returns void
**
@@ -595,9 +595,9 @@ static void btu_hcif_extended_inquiry_result_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_connection_comp_evt
+** Function btu_hcif_connection_comp_evt
**
-** Description Process event HCI_CONNECTION_COMP_EVT
+** Description Process event HCI_CONNECTION_COMP_EVT
**
** Returns void
**
@@ -635,15 +635,15 @@ static void btu_hcif_connection_comp_evt (UINT8 *p, UINT16 evt_len)
memcpy (esco_data.bd_addr, bda, BD_ADDR_LEN);
btm_sco_connected (status, bda, handle, &esco_data);
}
-#endif /* BTM_SCO_INCLUDED */
+#endif /* BTM_SCO_INCLUDED */
}
/*******************************************************************************
**
-** Function btu_hcif_connection_request_evt
+** Function btu_hcif_connection_request_evt
**
-** Description Process event HCI_CONNECTION_REQUEST_EVT
+** Description Process event HCI_CONNECTION_REQUEST_EVT
**
** Returns void
**
@@ -675,9 +675,9 @@ static void btu_hcif_connection_request_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_disconnection_comp_evt
+** Function btu_hcif_disconnection_comp_evt
**
-** Description Process event HCI_DISCONNECTION_COMP_EVT
+** Description Process event HCI_DISCONNECTION_COMP_EVT
**
** Returns void
**
@@ -708,9 +708,9 @@ static void btu_hcif_disconnection_comp_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_authentication_comp_evt
+** Function btu_hcif_authentication_comp_evt
**
-** Description Process event HCI_AUTHENTICATION_COMP_EVT
+** Description Process event HCI_AUTHENTICATION_COMP_EVT
**
** Returns void
**
@@ -729,9 +729,9 @@ static void btu_hcif_authentication_comp_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_rmt_name_request_comp_evt
+** Function btu_hcif_rmt_name_request_comp_evt
**
-** Description Process event HCI_RMT_NAME_REQUEST_COMP_EVT
+** Description Process event HCI_RMT_NAME_REQUEST_COMP_EVT
**
** Returns void
**
@@ -754,9 +754,9 @@ static void btu_hcif_rmt_name_request_comp_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_encryption_change_evt
+** Function btu_hcif_encryption_change_evt
**
-** Description Process event HCI_ENCRYPTION_CHANGE_EVT
+** Description Process event HCI_ENCRYPTION_CHANGE_EVT
**
** Returns void
**
@@ -778,9 +778,9 @@ static void btu_hcif_encryption_change_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_change_conn_link_key_evt
+** Function btu_hcif_change_conn_link_key_evt
**
-** Description Process event HCI_CHANGE_CONN_LINK_KEY_EVT
+** Description Process event HCI_CHANGE_CONN_LINK_KEY_EVT
**
** Returns void
**
@@ -799,9 +799,9 @@ static void btu_hcif_change_conn_link_key_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_master_link_key_comp_evt
+** Function btu_hcif_master_link_key_comp_evt
**
-** Description Process event HCI_MASTER_LINK_KEY_COMP_EVT
+** Description Process event HCI_MASTER_LINK_KEY_COMP_EVT
**
** Returns void
**
@@ -822,9 +822,9 @@ static void btu_hcif_master_link_key_comp_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_read_rmt_features_comp_evt
+** Function btu_hcif_read_rmt_features_comp_evt
**
-** Description Process event HCI_READ_RMT_FEATURES_COMP_EVT
+** Description Process event HCI_READ_RMT_FEATURES_COMP_EVT
**
** Returns void
**
@@ -836,9 +836,9 @@ static void btu_hcif_read_rmt_features_comp_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_read_rmt_ext_features_comp_evt
+** Function btu_hcif_read_rmt_ext_features_comp_evt
**
-** Description Process event HCI_READ_RMT_EXT_FEATURES_COMP_EVT
+** Description Process event HCI_READ_RMT_EXT_FEATURES_COMP_EVT
**
** Returns void
**
@@ -854,9 +854,9 @@ static void btu_hcif_read_rmt_ext_features_comp_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_read_rmt_version_comp_evt
+** Function btu_hcif_read_rmt_version_comp_evt
**
-** Description Process event HCI_READ_RMT_VERSION_COMP_EVT
+** Description Process event HCI_READ_RMT_VERSION_COMP_EVT
**
** Returns void
**
@@ -869,9 +869,9 @@ static void btu_hcif_read_rmt_version_comp_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_qos_setup_comp_evt
+** Function btu_hcif_qos_setup_comp_evt
**
-** Description Process event HCI_QOS_SETUP_COMP_EVT
+** Description Process event HCI_QOS_SETUP_COMP_EVT
**
** Returns void
**
@@ -897,9 +897,9 @@ static void btu_hcif_qos_setup_comp_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_esco_connection_comp_evt
+** Function btu_hcif_esco_connection_comp_evt
**
-** Description Process event HCI_ESCO_CONNECTION_COMP_EVT
+** Description Process event HCI_ESCO_CONNECTION_COMP_EVT
**
** Returns void
**
@@ -931,9 +931,9 @@ static void btu_hcif_esco_connection_comp_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_esco_connection_chg_evt
+** Function btu_hcif_esco_connection_chg_evt
**
-** Description Process event HCI_ESCO_CONNECTION_CHANGED_EVT
+** Description Process event HCI_ESCO_CONNECTION_CHANGED_EVT
**
** Returns void
**
@@ -964,9 +964,9 @@ static void btu_hcif_esco_connection_chg_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_hdl_command_complete
+** Function btu_hcif_hdl_command_complete
**
-** Description Handle command complete event
+** Description Handle command complete event
**
** Returns void
**
@@ -1057,11 +1057,11 @@ static void btu_hcif_hdl_command_complete (UINT16 opcode, UINT8 *p, UINT16 evt_l
btm_read_white_list_size_complete(p, evt_len);
break;
- case HCI_BLE_ADD_WHITE_LIST:
+ case HCI_BLE_ADD_WHITE_LIST:
btm_ble_add_2_white_list_complete(p, evt_len);
break;
- case HCI_BLE_CLEAR_WHITE_LIST:
+ case HCI_BLE_CLEAR_WHITE_LIST:
btm_ble_clear_white_list_complete(p, evt_len);
break;
@@ -1097,9 +1097,9 @@ static void btu_hcif_hdl_command_complete (UINT16 opcode, UINT8 *p, UINT16 evt_l
/*******************************************************************************
**
-** Function btu_hcif_command_complete_evt
+** Function btu_hcif_command_complete_evt
**
-** Description Process event HCI_COMMAND_COMPLETE_EVT
+** Description Process event HCI_COMMAND_COMPLETE_EVT
**
** Returns void
**
@@ -1128,7 +1128,7 @@ static void btu_hcif_command_complete_evt (UINT8 controller_id, UINT8 *p, UINT16
{
/* dequeue and free stored command */
-/* always use cmd code check, when one cmd timeout waiting for cmd_cmpl,
+/* always use cmd code check, when one cmd timeout waiting for cmd_cmpl,
it'll cause the rest of the command goes in wrong order */
p_cmd = (BT_HDR *) GKI_getfirst (&p_hci_cmd_cb->cmd_cmpl_q);
@@ -1152,7 +1152,7 @@ static void btu_hcif_command_complete_evt (UINT8 controller_id, UINT8 *p, UINT16
/* If command was a VSC, then extract command_complete callback */
if ((cc_opcode & HCI_GRP_VENDOR_SPECIFIC) == HCI_GRP_VENDOR_SPECIFIC
#if BLE_INCLUDED == TRUE
- || (cc_opcode == HCI_BLE_RAND )
+ || (cc_opcode == HCI_BLE_RAND )
|| (cc_opcode == HCI_BLE_ENCRYPT)
#endif
)
@@ -1173,7 +1173,7 @@ static void btu_hcif_command_complete_evt (UINT8 controller_id, UINT8 *p, UINT16
#if (defined(BTU_CMD_CMPL_TOUT_DOUBLE_CHECK) && BTU_CMD_CMPL_TOUT_DOUBLE_CHECK == TRUE)
p_hci_cmd_cb->checked_hcisu = FALSE;
#endif
- btu_start_timer (&(p_hci_cmd_cb->cmd_cmpl_timer),
+ btu_start_timer (&(p_hci_cmd_cb->cmd_cmpl_timer),
(UINT16)(BTU_TTYPE_BTU_CMD_CMPL + controller_id),
BTU_CMD_CMPL_TIMEOUT);
}
@@ -1196,7 +1196,7 @@ static void btu_hcif_command_complete_evt (UINT8 controller_id, UINT8 *p, UINT16
**
** Function btu_hcif_hdl_command_status
**
-** Description Handle a command status event
+** Description Handle a command status event
**
** Returns void
**
@@ -1281,7 +1281,7 @@ static void btu_hcif_hdl_command_status (UINT16 opcode, UINT8 status, UINT8 *p_c
btm_acl_role_changed(status, bd_addr, BTM_ROLE_UNDEFINED);
}
else
- btm_acl_role_changed(status, NULL, BTM_ROLE_UNDEFINED);
+ btm_acl_role_changed(status, NULL, BTM_ROLE_UNDEFINED);
l2c_link_role_changed (NULL, BTM_ROLE_UNDEFINED, HCI_ERR_COMMAND_DISALLOWED);
break;
@@ -1354,9 +1354,9 @@ static void btu_hcif_hdl_command_status (UINT16 opcode, UINT8 status, UINT8 *p_c
/*******************************************************************************
**
-** Function btu_hcif_command_status_evt
+** Function btu_hcif_command_status_evt
**
-** Description Process event HCI_COMMAND_STATUS_EVT
+** Description Process event HCI_COMMAND_STATUS_EVT
**
** Returns void
**
@@ -1413,7 +1413,7 @@ static void btu_hcif_command_status_evt (UINT8 controller_id, UINT8 *p, UINT16 e
#if (defined(BTU_CMD_CMPL_TOUT_DOUBLE_CHECK) && BTU_CMD_CMPL_TOUT_DOUBLE_CHECK == TRUE)
p_hci_cmd_cb->checked_hcisu = FALSE;
#endif
- btu_start_timer (&(p_hci_cmd_cb->cmd_cmpl_timer),
+ btu_start_timer (&(p_hci_cmd_cb->cmd_cmpl_timer),
(UINT16)(BTU_TTYPE_BTU_CMD_CMPL + controller_id),
BTU_CMD_CMPL_TIMEOUT);
}
@@ -1439,7 +1439,7 @@ static void btu_hcif_command_status_evt (UINT8 controller_id, UINT8 *p, UINT16 e
/*******************************************************************************
**
-** Function btu_hcif_cmd_timeout
+** Function btu_hcif_cmd_timeout
**
** Description Handle a command timeout
**
@@ -1465,7 +1465,7 @@ void btu_hcif_cmd_timeout (UINT8 controller_id)
/* trigger HCISU to read any pending data in transport buffer */
GKI_send_event(HCISU_TASK, HCISU_EVT_MASK);
- btu_start_timer (&(p_hci_cmd_cb->cmd_cmpl_timer),
+ btu_start_timer (&(p_hci_cmd_cb->cmd_cmpl_timer),
(UINT16)(BTU_TTYPE_BTU_CMD_CMPL + controller_id),
2); /* start short timer, if timer is set to 1 then it could expire before HCISU checks. */
@@ -1494,7 +1494,7 @@ void btu_hcif_cmd_timeout (UINT8 controller_id)
#if (defined(BTU_CMD_CMPL_TOUT_DOUBLE_CHECK) && BTU_CMD_CMPL_TOUT_DOUBLE_CHECK == TRUE)
p_hci_cmd_cb->checked_hcisu = FALSE;
#endif
- btu_start_timer (&(p_hci_cmd_cb->cmd_cmpl_timer),
+ btu_start_timer (&(p_hci_cmd_cb->cmd_cmpl_timer),
(UINT16)(BTU_TTYPE_BTU_CMD_CMPL + controller_id),
BTU_CMD_CMPL_TIMEOUT);
}
@@ -1519,7 +1519,7 @@ void btu_hcif_cmd_timeout (UINT8 controller_id)
ALOGE("#");
ALOGE("# WARNING : BTU HCI(id=%d) command timeout. opcode=0x%x", controller_id, opcode);
ALOGE("#");
- ALOGE("######################################################################");
+ ALOGE("######################################################################");
#else
BT_TRACE_2 (TRACE_LAYER_HCI, TRACE_TYPE_WARNING, "BTU HCI(id=%d) command timeout. opcode=0x%x", controller_id, opcode);
#endif
@@ -1553,7 +1553,7 @@ void btu_hcif_cmd_timeout (UINT8 controller_id)
default:
/* If vendor specific restore the callback function */
- if ((opcode & HCI_GRP_VENDOR_SPECIFIC) == HCI_GRP_VENDOR_SPECIFIC
+ if ((opcode & HCI_GRP_VENDOR_SPECIFIC) == HCI_GRP_VENDOR_SPECIFIC
#if BLE_INCLUDED == TRUE
|| (opcode == HCI_BLE_RAND ) ||
(opcode == HCI_BLE_ENCRYPT)
@@ -1573,7 +1573,7 @@ void btu_hcif_cmd_timeout (UINT8 controller_id)
event = HCI_ERR_UNSPECIFIED;
btu_hcif_hdl_command_complete (opcode, (UINT8 *)&event, 1, p_cplt_cback, controller_id);
// btla-specific --
- break;
+ break;
}
/* free stored command */
@@ -1588,9 +1588,9 @@ void btu_hcif_cmd_timeout (UINT8 controller_id)
/*******************************************************************************
**
-** Function btu_hcif_hardware_error_evt
+** Function btu_hcif_hardware_error_evt
**
-** Description Process event HCI_HARDWARE_ERROR_EVT
+** Description Process event HCI_HARDWARE_ERROR_EVT
**
** Returns void
**
@@ -1610,9 +1610,9 @@ static void btu_hcif_hardware_error_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_flush_occured_evt
+** Function btu_hcif_flush_occured_evt
**
-** Description Process event HCI_FLUSH_OCCURED_EVT
+** Description Process event HCI_FLUSH_OCCURED_EVT
**
** Returns void
**
@@ -1624,9 +1624,9 @@ static void btu_hcif_flush_occured_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_role_change_evt
+** Function btu_hcif_role_change_evt
**
-** Description Process event HCI_ROLE_CHANGE_EVT
+** Description Process event HCI_ROLE_CHANGE_EVT
**
** Returns void
**
@@ -1648,9 +1648,9 @@ static void btu_hcif_role_change_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_num_compl_data_pkts_evt
+** Function btu_hcif_num_compl_data_pkts_evt
**
-** Description Process event HCI_NUM_COMPL_DATA_PKTS_EVT
+** Description Process event HCI_NUM_COMPL_DATA_PKTS_EVT
**
** Returns void
**
@@ -1666,9 +1666,9 @@ static void btu_hcif_num_compl_data_pkts_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_mode_change_evt
+** Function btu_hcif_mode_change_evt
**
-** Description Process event HCI_MODE_CHANGE_EVT
+** Description Process event HCI_MODE_CHANGE_EVT
**
** Returns void
**
@@ -1701,9 +1701,9 @@ static void btu_hcif_mode_change_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_ssr_evt
+** Function btu_hcif_ssr_evt
**
-** Description Process event HCI_SNIFF_SUB_RATE_EVT
+** Description Process event HCI_SNIFF_SUB_RATE_EVT
**
** Returns void
**
@@ -1720,9 +1720,9 @@ static void btu_hcif_ssr_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_return_link_keys_evt
+** Function btu_hcif_return_link_keys_evt
**
-** Description Process event HCI_RETURN_LINK_KEYS_EVT
+** Description Process event HCI_RETURN_LINK_KEYS_EVT
**
** Returns void
**
@@ -1751,9 +1751,9 @@ static void btu_hcif_return_link_keys_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_pin_code_request_evt
+** Function btu_hcif_pin_code_request_evt
**
-** Description Process event HCI_PIN_CODE_REQUEST_EVT
+** Description Process event HCI_PIN_CODE_REQUEST_EVT
**
** Returns void
**
@@ -1774,9 +1774,9 @@ static void btu_hcif_pin_code_request_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_link_key_request_evt
+** Function btu_hcif_link_key_request_evt
**
-** Description Process event HCI_LINK_KEY_REQUEST_EVT
+** Description Process event HCI_LINK_KEY_REQUEST_EVT
**
** Returns void
**
@@ -1792,9 +1792,9 @@ static void btu_hcif_link_key_request_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_link_key_notification_evt
+** Function btu_hcif_link_key_notification_evt
**
-** Description Process event HCI_LINK_KEY_NOTIFICATION_EVT
+** Description Process event HCI_LINK_KEY_NOTIFICATION_EVT
**
** Returns void
**
@@ -1815,9 +1815,9 @@ static void btu_hcif_link_key_notification_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_loopback_command_evt
+** Function btu_hcif_loopback_command_evt
**
-** Description Process event HCI_LOOPBACK_COMMAND_EVT
+** Description Process event HCI_LOOPBACK_COMMAND_EVT
**
** Returns void
**
@@ -1829,9 +1829,9 @@ static void btu_hcif_loopback_command_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_data_buf_overflow_evt
+** Function btu_hcif_data_buf_overflow_evt
**
-** Description Process event HCI_DATA_BUF_OVERFLOW_EVT
+** Description Process event HCI_DATA_BUF_OVERFLOW_EVT
**
** Returns void
**
@@ -1843,9 +1843,9 @@ static void btu_hcif_data_buf_overflow_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_max_slots_changed_evt
+** Function btu_hcif_max_slots_changed_evt
**
-** Description Process event HCI_MAX_SLOTS_CHANGED_EVT
+** Description Process event HCI_MAX_SLOTS_CHANGED_EVT
**
** Returns void
**
@@ -1857,9 +1857,9 @@ static void btu_hcif_max_slots_changed_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_read_clock_off_comp_evt
+** Function btu_hcif_read_clock_off_comp_evt
**
-** Description Process event HCI_READ_CLOCK_OFF_COMP_EVT
+** Description Process event HCI_READ_CLOCK_OFF_COMP_EVT
**
** Returns void
**
@@ -1888,9 +1888,9 @@ static void btu_hcif_read_clock_off_comp_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_conn_pkt_type_change_evt
+** Function btu_hcif_conn_pkt_type_change_evt
**
-** Description Process event HCI_CONN_PKT_TYPE_CHANGE_EVT
+** Description Process event HCI_CONN_PKT_TYPE_CHANGE_EVT
**
** Returns void
**
@@ -1902,9 +1902,9 @@ static void btu_hcif_conn_pkt_type_change_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_qos_violation_evt
+** Function btu_hcif_qos_violation_evt
**
-** Description Process event HCI_QOS_VIOLATION_EVT
+** Description Process event HCI_QOS_VIOLATION_EVT
**
** Returns void
**
@@ -1924,9 +1924,9 @@ static void btu_hcif_qos_violation_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_page_scan_mode_change_evt
+** Function btu_hcif_page_scan_mode_change_evt
**
-** Description Process event HCI_PAGE_SCAN_MODE_CHANGE_EVT
+** Description Process event HCI_PAGE_SCAN_MODE_CHANGE_EVT
**
** Returns void
**
@@ -1938,9 +1938,9 @@ static void btu_hcif_page_scan_mode_change_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_page_scan_rep_mode_chng_evt
+** Function btu_hcif_page_scan_rep_mode_chng_evt
**
-** Description Process event HCI_PAGE_SCAN_REP_MODE_CHNG_EVT
+** Description Process event HCI_PAGE_SCAN_REP_MODE_CHNG_EVT
**
** Returns void
**
@@ -1955,9 +1955,9 @@ static void btu_hcif_page_scan_rep_mode_chng_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_host_support_evt
+** Function btu_hcif_host_support_evt
**
-** Description Process event HCI_RMT_HOST_SUP_FEAT_NOTIFY_EVT
+** Description Process event HCI_RMT_HOST_SUP_FEAT_NOTIFY_EVT
**
** Returns void
**
@@ -1969,9 +1969,9 @@ static void btu_hcif_host_support_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_io_cap_request_evt
+** Function btu_hcif_io_cap_request_evt
**
-** Description Process event HCI_IO_CAPABILITY_REQUEST_EVT
+** Description Process event HCI_IO_CAPABILITY_REQUEST_EVT
**
** Returns void
**
@@ -1984,9 +1984,9 @@ static void btu_hcif_io_cap_request_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_io_cap_response_evt
+** Function btu_hcif_io_cap_response_evt
**
-** Description Process event HCI_IO_CAPABILITY_RESPONSE_EVT
+** Description Process event HCI_IO_CAPABILITY_RESPONSE_EVT
**
** Returns void
**
@@ -1999,9 +1999,9 @@ static void btu_hcif_io_cap_response_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_user_conf_request_evt
+** Function btu_hcif_user_conf_request_evt
**
-** Description Process event HCI_USER_CONFIRMATION_REQUEST_EVT
+** Description Process event HCI_USER_CONFIRMATION_REQUEST_EVT
**
** Returns void
**
@@ -2014,9 +2014,9 @@ static void btu_hcif_user_conf_request_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_user_passkey_request_evt
+** Function btu_hcif_user_passkey_request_evt
**
-** Description Process event HCI_USER_PASSKEY_REQUEST_EVT
+** Description Process event HCI_USER_PASSKEY_REQUEST_EVT
**
** Returns void
**
@@ -2028,9 +2028,9 @@ static void btu_hcif_user_passkey_request_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_user_passkey_notif_evt
+** Function btu_hcif_user_passkey_notif_evt
**
-** Description Process event HCI_USER_PASSKEY_NOTIFY_EVT
+** Description Process event HCI_USER_PASSKEY_NOTIFY_EVT
**
** Returns void
**
@@ -2042,9 +2042,9 @@ static void btu_hcif_user_passkey_notif_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_keypress_notif_evt
+** Function btu_hcif_keypress_notif_evt
**
-** Description Process event HCI_KEYPRESS_NOTIFY_EVT
+** Description Process event HCI_KEYPRESS_NOTIFY_EVT
**
** Returns void
**
@@ -2056,9 +2056,9 @@ static void btu_hcif_keypress_notif_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_link_super_tout_evt
+** Function btu_hcif_link_super_tout_evt
**
-** Description Process event HCI_LINK_SUPER_TOUT_CHANGED_EVT
+** Description Process event HCI_LINK_SUPER_TOUT_CHANGED_EVT
**
** Returns void
**
@@ -2074,9 +2074,9 @@ static void btu_hcif_link_super_tout_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_rem_oob_request_evt
+** Function btu_hcif_rem_oob_request_evt
**
-** Description Process event HCI_REMOTE_OOB_DATA_REQUEST_EVT
+** Description Process event HCI_REMOTE_OOB_DATA_REQUEST_EVT
**
** Returns void
**
@@ -2090,9 +2090,9 @@ static void btu_hcif_rem_oob_request_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_simple_pair_complete_evt
+** Function btu_hcif_simple_pair_complete_evt
**
-** Description Process event HCI_SIMPLE_PAIRING_COMPLETE_EVT
+** Description Process event HCI_SIMPLE_PAIRING_COMPLETE_EVT
**
** Returns void
**
@@ -2103,7 +2103,7 @@ static void btu_hcif_simple_pair_complete_evt (UINT8 *p, UINT16 evt_len)
}
/*******************************************************************************
**
-** Function btu_hcif_flush_cmd_queue
+** Function btu_hcif_flush_cmd_queue
**
** Description Flush the HCI command complete queue and transmit queue when
** needed.
@@ -2111,11 +2111,11 @@ static void btu_hcif_simple_pair_complete_evt (UINT8 *p, UINT16 evt_len)
** Returns void
**
*******************************************************************************/
-void btu_hcif_flush_cmd_queue(void)
-{
- BT_HDR *p_cmd;
+void btu_hcif_flush_cmd_queue(void)
+{
+ BT_HDR *p_cmd;
- btu_cb.hci_cmd_cb[0].cmd_window = 0;
+ btu_cb.hci_cmd_cb[0].cmd_window = 0;
while ((p_cmd = (BT_HDR *) GKI_dequeue (&btu_cb.hci_cmd_cb[0].cmd_cmpl_q)) != NULL)
{
GKI_freebuf (p_cmd);
@@ -2128,9 +2128,9 @@ void btu_hcif_flush_cmd_queue(void)
/*******************************************************************************
**
-** Function btu_hcif_enhanced_flush_complete_evt
+** Function btu_hcif_enhanced_flush_complete_evt
**
-** Description Process event HCI_ENHANCED_FLUSH_COMPLETE_EVT
+** Description Process event HCI_ENHANCED_FLUSH_COMPLETE_EVT
**
** Returns void
**
@@ -2192,7 +2192,7 @@ static void btu_ble_ll_conn_complete_evt ( UINT8 *p, UINT16 evt_len)
{
btm_ble_connected(bda, handle, HCI_ENCRYPT_MODE_DISABLED, role);
- l2cble_conn_comp (handle, role, bda, bda_type, conn_interval,
+ l2cble_conn_comp (handle, role, bda, bda_type, conn_interval,
conn_latency, conn_timeout);
}
else
@@ -2227,12 +2227,12 @@ static void btu_ble_read_remote_feat_evt (UINT8 *p, UINT16 evt_len)
static void btu_ble_proc_ltk_req (UINT8 *p, UINT16 evt_len)
{
- UINT16 ediv, handle;
+ UINT16 ediv, handle;
UINT8 *pp;
- STREAM_TO_UINT16(handle, p);
+ STREAM_TO_UINT16(handle, p);
pp = p + 8;
- STREAM_TO_UINT16(ediv, pp);
+ STREAM_TO_UINT16(ediv, pp);
#if SMP_INCLUDED == TRUE
btm_ble_ltk_request(handle, p, ediv);
#endif
diff --git a/stack/btu/btu_init.c b/stack/btu/btu_init.c
index f21aaa4..a153ed8 100644
--- a/stack/btu/btu_init.c
+++ b/stack/btu/btu_init.c
@@ -127,7 +127,7 @@ UINT16 BTU_BleAclPktSize(void)
**
** Function btu_uipc_rx_cback
**
-** Description
+** Description
**
**
** Returns void
@@ -135,9 +135,9 @@ UINT16 BTU_BleAclPktSize(void)
*******************************************************************************/
void btu_uipc_rx_cback(BT_HDR *p_msg)
{
- BT_TRACE_3 (TRACE_LAYER_BTM, TRACE_TYPE_DEBUG, "btu_uipc_rx_cback event 0x%x, len %d, offset %d",
+ BT_TRACE_3 (TRACE_LAYER_BTM, TRACE_TYPE_DEBUG, "btu_uipc_rx_cback event 0x%x, len %d, offset %d",
p_msg->event, p_msg->len, p_msg->offset);
GKI_send_msg(BTU_TASK, BTU_HCI_RCV_MBOX, p_msg);
-
+
}
diff --git a/stack/btu/btu_task.c b/stack/btu/btu_task.c
index 291e149..5753154 100644
--- a/stack/btu/btu_task.c
+++ b/stack/btu/btu_task.c
@@ -51,7 +51,7 @@
#include "bip_int.h"
#endif /* BIP */
-#if (BPP_SND_INCLUDED == TRUE || BPP_INCLUDED == TRUE)
+#if (BPP_SND_INCLUDED == TRUE || BPP_INCLUDED == TRUE)
#include "bpp_int.h"
#endif /* BPP */
@@ -114,7 +114,7 @@ extern void avdt_rcv_sync_info (BT_HDR *p_buf); /* this is for hci_test */
#endif
#ifdef __cplusplus
-extern "C"
+extern "C"
{
#endif
@@ -157,7 +157,7 @@ BTU_API UINT32 btu_task (UINT32 param)
/* wait an event that HCISU is ready */
GKI_wait(0xFFFF, 0);
#endif
- /* Initialize the mandatory core stack control blocks
+ /* Initialize the mandatory core stack control blocks
(BTU, BTM, L2CAP, and SDP)
*/
btu_init_core();
@@ -206,7 +206,7 @@ BTU_API UINT32 btu_task (UINT32 param)
#if BTM_SCO_INCLUDED == TRUE
btm_route_sco_data (p_msg);
break;
-#endif
+#endif
case BT_EVT_TO_BTU_HCI_EVT:
btu_hcif_process_event ((UINT8)(p_msg->event & BT_SUB_EVT_MASK), p_msg);
@@ -431,7 +431,7 @@ BTU_API UINT32 btu_task (UINT32 param)
case BTU_TTYPE_ATT_WAIT_FOR_RSP:
gatt_rsp_timeout(p_tle);
break;
-
+
case BTU_TTYPE_ATT_WAIT_FOR_IND_ACK:
gatt_ind_ack_timeout(p_tle);
break;
@@ -806,7 +806,7 @@ void btu_deregister_event_range (UINT16 range)
*******************************************************************************/
void btu_check_bt_sleep (void)
{
- if ((btu_cb.hci_cmd_cb[LOCAL_BR_EDR_CONTROLLER_ID].cmd_cmpl_q.count == 0)
+ if ((btu_cb.hci_cmd_cb[LOCAL_BR_EDR_CONTROLLER_ID].cmd_cmpl_q.count == 0)
&&(btu_cb.hci_cmd_cb[LOCAL_BR_EDR_CONTROLLER_ID].cmd_xmit_q.count == 0))
{
if (l2cb.controller_xmit_window == l2cb.num_lm_acl_bufs)
diff --git a/stack/gatt/att_protocol.c b/stack/gatt/att_protocol.c
index 2f3a196..f3c3a28 100644
--- a/stack/gatt/att_protocol.c
+++ b/stack/gatt/att_protocol.c
@@ -10,7 +10,7 @@
******************************************************************************/
#include "bt_target.h"
-
+
#if BLE_INCLUDED == TRUE
#include "gatt_int.h"
@@ -43,7 +43,7 @@ BT_HDR *attp_build_mtu_cmd(UINT8 op_code, UINT16 rx_mtu)
UINT16_TO_STREAM (p, rx_mtu);
p_buf->offset = L2CAP_MIN_OFFSET;
- p_buf->len = GATT_HDR_SIZE; /* opcode + 2 bytes mtu */
+ p_buf->len = GATT_HDR_SIZE; /* opcode + 2 bytes mtu */
}
return p_buf;
}
@@ -103,7 +103,7 @@ BT_HDR *attp_build_err_cmd(UINT8 cmd_code, UINT16 err_handle, UINT8 reason)
UINT8_TO_STREAM (p, GATT_RSP_ERROR);
UINT8_TO_STREAM (p, cmd_code);
UINT16_TO_STREAM(p, err_handle);
- UINT8_TO_STREAM (p, reason);
+ UINT8_TO_STREAM (p, reason);
p_buf->offset = L2CAP_MIN_OFFSET;
/* GATT_HDR_SIZE (1B ERR_RSP op code+ 2B handle) + 1B cmd_op_code + 1B status */
@@ -153,7 +153,7 @@ BT_HDR *attp_build_read_handles_cmd (UINT16 payload_size, tGATT_FIND_TYPE_VALUE
{
BT_HDR *p_buf = NULL;
UINT8 *p;
- UINT16 len = p_value_type->value_len;
+ UINT16 len = p_value_type->value_len;
if ((p_buf = (BT_HDR *)GKI_getbuf((UINT16)(sizeof(BT_HDR) + payload_size + L2CAP_MIN_OFFSET))) != NULL)
{
@@ -199,7 +199,7 @@ BT_HDR *attp_build_read_multi_cmd(UINT16 payload_size, UINT16 num_handle, UINT16
p_buf->len = 1;
UINT8_TO_STREAM (p, GATT_REQ_READ_MULTI);
-
+
for (i = 0; i < num_handle && p_buf->len + 2 <= payload_size; i ++)
{
UINT16_TO_STREAM (p, *(p_handle + i));
@@ -239,7 +239,7 @@ BT_HDR *attp_build_handle_cmd(UINT8 op_code, UINT16 handle, UINT16 offset)
{
UINT16_TO_STREAM (p, offset);
p_buf->len += 2;
- }
+ }
}
@@ -279,7 +279,7 @@ BT_HDR *attp_build_opcode_cmd(UINT8 op_code)
** Returns None.
**
*******************************************************************************/
-BT_HDR *attp_build_value_cmd (UINT16 payload_size, UINT8 op_code, UINT16 handle,
+BT_HDR *attp_build_value_cmd (UINT16 payload_size, UINT8 op_code, UINT16 handle,
UINT16 offset, UINT16 len, UINT8 *p_data)
{
BT_HDR *p_buf = NULL;
@@ -298,12 +298,12 @@ BT_HDR *attp_build_value_cmd (UINT16 payload_size, UINT8 op_code, UINT16 handle,
p_pair_len = p;
pair_len = len + 2;
UINT8_TO_STREAM (p, pair_len);
- p_buf->len += 1;
+ p_buf->len += 1;
}
if (op_code != GATT_RSP_READ_BLOB && op_code != GATT_RSP_READ)
{
UINT16_TO_STREAM (p, handle);
- p_buf->len += 2;
+ p_buf->len += 2;
}
if (op_code == GATT_REQ_PREPARE_WRITE ||op_code == GATT_RSP_PREPARE_WRITE )
@@ -313,7 +313,7 @@ BT_HDR *attp_build_value_cmd (UINT16 payload_size, UINT8 op_code, UINT16 handle,
}
if (len > 0 && p_data != NULL)
- {
+ {
/* ensure data not exceed MTU size */
if (payload_size - p_buf->len < len)
{
@@ -351,7 +351,7 @@ BOOLEAN attp_send_msg_to_L2CAP(tGATT_TCB *p_tcb, BT_HDR *p_toL2CAP)
if (l2cap_ret == L2CAP_DW_FAILED)
{
- GATT_TRACE_ERROR1("ATT failed to pass msg:0x%0x to L2CAP",
+ GATT_TRACE_ERROR1("ATT failed to pass msg:0x%0x to L2CAP",
*((UINT8 *)(p_toL2CAP + 1) + p_toL2CAP->offset));
GKI_freebuf(p_toL2CAP);
return FALSE;
@@ -371,7 +371,7 @@ BOOLEAN attp_send_msg_to_L2CAP(tGATT_TCB *p_tcb, BT_HDR *p_toL2CAP)
*******************************************************************************/
BT_HDR *attp_build_sr_msg(tGATT_TCB *p_tcb, UINT8 op_code, tGATT_SR_MSG *p_msg)
{
- BT_HDR *p_cmd = NULL;
+ BT_HDR *p_cmd = NULL;
UINT16 offset = 0;
switch (op_code)
@@ -388,14 +388,14 @@ BT_HDR *attp_build_sr_msg(tGATT_TCB *p_tcb, UINT8 op_code, tGATT_SR_MSG *p_msg)
case GATT_RSP_READ:
case GATT_HANDLE_VALUE_NOTIF:
case GATT_HANDLE_VALUE_IND:
- p_cmd = attp_build_value_cmd(p_tcb->payload_size,
- op_code,
+ p_cmd = attp_build_value_cmd(p_tcb->payload_size,
+ op_code,
p_msg->attr_value.handle,
offset,
- p_msg->attr_value.len,
+ p_msg->attr_value.len,
p_msg->attr_value.value);
break;
-
+
case GATT_RSP_WRITE:
p_cmd = attp_build_opcode_cmd(op_code);
break;
@@ -427,14 +427,14 @@ BT_HDR *attp_build_sr_msg(tGATT_TCB *p_tcb, UINT8 op_code, tGATT_SR_MSG *p_msg)
**
** Function attp_send_sr_msg
**
-** Description This function sends the server response or indication message
+** Description This function sends the server response or indication message
** to client.
**
** Parameter p_tcb: pointer to the connecton control block.
** p_msg: pointer to message parameters structure.
**
** Returns GATT_SUCCESS if sucessfully sent; otherwise error code.
-**
+**
**
*******************************************************************************/
tGATT_STATUS attp_send_sr_msg (tGATT_TCB *p_tcb, BT_HDR *p_msg)
@@ -468,9 +468,9 @@ tGATT_STATUS attp_send_sr_msg (tGATT_TCB *p_tcb, BT_HDR *p_msg)
UINT8 attp_cl_send_cmd(tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 cmd_code, BT_HDR *p_cmd)
{
UINT8 att_ret = GATT_SUCCESS;
-
+
if (p_tcb != NULL)
- {
+ {
cmd_code &= ~GATT_AUTH_SIGN_MASK;
if (p_tcb->pending_cl_req == p_tcb->next_slot_inq ||
@@ -501,7 +501,7 @@ UINT8 attp_cl_send_cmd(tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 cmd_code, BT_HDR
**
** Function attp_send_cl_msg
**
-** Description This function sends the client request or confirmation message
+** Description This function sends the client request or confirmation message
** to server.
**
** Parameter p_tcb: pointer to the connectino control block.
@@ -510,13 +510,13 @@ UINT8 attp_cl_send_cmd(tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 cmd_code, BT_HDR
** p_msg: pointer to message parameters structure.
**
** Returns GATT_SUCCESS if sucessfully sent; otherwise error code.
-**
+**
**
*******************************************************************************/
tGATT_STATUS attp_send_cl_msg (tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 op_code, tGATT_CL_MSG *p_msg)
{
tGATT_STATUS status = GATT_NO_RESOURCES;
- BT_HDR *p_cmd = NULL;
+ BT_HDR *p_cmd = NULL;
UINT16 offset = 0, handle;
if (p_tcb != NULL)
@@ -540,9 +540,9 @@ tGATT_STATUS attp_send_cl_msg (tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 op_code,
GATT_HANDLE_IS_VALID (p_msg->browse.e_handle) &&
p_msg->browse.s_handle <= p_msg->browse.e_handle)
{
- p_cmd = attp_build_browse_cmd(op_code,
- p_msg->browse.s_handle,
- p_msg->browse.e_handle,
+ p_cmd = attp_build_browse_cmd(op_code,
+ p_msg->browse.s_handle,
+ p_msg->browse.e_handle,
p_msg->browse.uuid);
}
else
@@ -555,7 +555,7 @@ tGATT_STATUS attp_send_cl_msg (tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 op_code,
case GATT_REQ_READ:
handle = (op_code == GATT_REQ_READ) ? p_msg->handle: p_msg->read_blob.handle;
/* handle checking */
- if (GATT_HANDLE_IS_VALID (handle))
+ if (GATT_HANDLE_IS_VALID (handle))
{
p_cmd = attp_build_handle_cmd(op_code, handle, offset);
}
@@ -575,7 +575,7 @@ tGATT_STATUS attp_send_cl_msg (tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 op_code,
case GATT_SIGN_CMD_WRITE:
if (GATT_HANDLE_IS_VALID (p_msg->attr_value.handle))
{
- p_cmd = attp_build_value_cmd (p_tcb->payload_size,
+ p_cmd = attp_build_value_cmd (p_tcb->payload_size,
op_code, p_msg->attr_value.handle,
offset,
p_msg->attr_value.len,
@@ -589,14 +589,14 @@ tGATT_STATUS attp_send_cl_msg (tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 op_code,
p_cmd = attp_build_exec_write_cmd(op_code, p_msg->exec_write);
break;
- case GATT_REQ_FIND_TYPE_VALUE:
- p_cmd = attp_build_read_handles_cmd(p_tcb->payload_size, &p_msg->find_type_value);
+ case GATT_REQ_FIND_TYPE_VALUE:
+ p_cmd = attp_build_read_handles_cmd(p_tcb->payload_size, &p_msg->find_type_value);
break;
case GATT_REQ_READ_MULTI:
- p_cmd = attp_build_read_multi_cmd(p_tcb->payload_size,
- p_msg->read_multi.num_handles,
- p_msg->read_multi.handles);
+ p_cmd = attp_build_read_multi_cmd(p_tcb->payload_size,
+ p_msg->read_multi.num_handles,
+ p_msg->read_multi.handles);
break;
default:
diff --git a/stack/gatt/gatt_api.c b/stack/gatt/gatt_api.c
index 2157277..c01d617 100644
--- a/stack/gatt/gatt_api.c
+++ b/stack/gatt/gatt_api.c
@@ -60,8 +60,8 @@ UINT8 GATT_SetTraceLevel (UINT8 new_level)
** Function GATTS_AddHandleRange
**
** Description This function add the allocated handles range for the specifed
-** application UUID, service UUID and service instance
-**
+** application UUID, service UUID and service instance
+**
** Parameter p_hndl_range: pointer to allocated handles information
**
** Returns TRUE if handle range is added sucessfully; otherwise FALSE.
@@ -76,7 +76,7 @@ BOOLEAN GATTS_AddHandleRange(tGATTS_HNDL_RANGE *p_hndl_range)
if ((p_buf = gatt_alloc_hdl_buffer()) != NULL)
{
p_buf->asgn_range = *p_hndl_range;
- status = gatt_add_an_item_to_list(&gatt_cb.hdl_list_info, p_buf);
+ status = gatt_add_an_item_to_list(&gatt_cb.hdl_list_info, p_buf);
}
return status;
}
@@ -87,7 +87,7 @@ BOOLEAN GATTS_AddHandleRange(tGATTS_HNDL_RANGE *p_hndl_range)
** Function GATTS_NVRegister
**
** Description Application manager calls this function to register for
-** NV save callback function. There can be one and only one
+** NV save callback function. There can be one and only one
** NV save callback function.
**
** Parameter p_cb_info : callback informaiton
@@ -138,11 +138,11 @@ UINT16 GATTS_CreateService (tGATT_IF gatt_if, tBT_UUID *p_svc_uuid,
tBT_UUID *p_app_uuid128;
- GATT_TRACE_API0 ("GATTS_CreateService" );
+ GATT_TRACE_API0 ("GATTS_CreateService" );
if (p_reg == NULL)
{
- GATT_TRACE_ERROR1 ("Inavlid gatt_if=%d", gatt_if);
+ GATT_TRACE_ERROR1 ("Inavlid gatt_if=%d", gatt_if);
return(0);
}
@@ -151,7 +151,7 @@ UINT16 GATTS_CreateService (tGATT_IF gatt_if, tBT_UUID *p_svc_uuid,
if ((p_list = gatt_find_hdl_buffer_by_app_id(p_app_uuid128, p_svc_uuid, svc_inst)) != NULL)
{
s_hdl = p_list->asgn_range.s_handle;
- GATT_TRACE_DEBUG0 ("Service already been created!!");
+ GATT_TRACE_DEBUG0 ("Service already been created!!");
}
else
{
@@ -183,14 +183,14 @@ UINT16 GATTS_CreateService (tGATT_IF gatt_if, tBT_UUID *p_svc_uuid,
/* check for space */
if (num_handles > (0xFFFF - s_hdl + 1))
{
- GATT_TRACE_ERROR2 ("GATTS_ReserveHandles: no handles, s_hdl: %u needed: %u", s_hdl, num_handles);
+ GATT_TRACE_ERROR2 ("GATTS_ReserveHandles: no handles, s_hdl: %u needed: %u", s_hdl, num_handles);
return(0);
}
if ( (p_list = gatt_alloc_hdl_buffer()) == NULL)
{
/* No free entry */
- GATT_TRACE_ERROR0 ("GATTS_ReserveHandles: no free handle blocks");
+ GATT_TRACE_ERROR0 ("GATTS_ReserveHandles: no free handle blocks");
return(0);
}
@@ -211,7 +211,7 @@ UINT16 GATTS_CreateService (tGATT_IF gatt_if, tBT_UUID *p_svc_uuid,
if ( (p_buf = gatt_add_pending_new_srv_start(&p_list->asgn_range)) == NULL)
{
/* No free entry */
- GATT_TRACE_ERROR0 ("gatt_add_pending_new_srv_start: no free blocks");
+ GATT_TRACE_ERROR0 ("gatt_add_pending_new_srv_start: no free blocks");
if (p_list)
{
@@ -221,13 +221,13 @@ UINT16 GATTS_CreateService (tGATT_IF gatt_if, tBT_UUID *p_svc_uuid,
return(0);
}
- GATT_TRACE_DEBUG0 ("Add a new srv chg item");
+ GATT_TRACE_DEBUG0 ("Add a new srv chg item");
}
}
if (!gatts_init_service_db(&p_list->svc_db, *p_svc_uuid, is_pri, s_hdl , num_handles))
{
- GATT_TRACE_ERROR0 ("GATTS_ReserveHandles: service DB initialization failed");
+ GATT_TRACE_ERROR0 ("GATTS_ReserveHandles: service DB initialization failed");
if (p_list)
{
gatt_remove_an_item_from_list(p_list_info, p_list);
@@ -239,11 +239,11 @@ UINT16 GATTS_CreateService (tGATT_IF gatt_if, tBT_UUID *p_svc_uuid,
return(0);
}
- GATT_TRACE_DEBUG6 ("GATTS_CreateService(success): handles needed:%u s_hdl=%u e_hdl=%u %s[%x] is_primary=%d",
+ GATT_TRACE_DEBUG6 ("GATTS_CreateService(success): handles needed:%u s_hdl=%u e_hdl=%u %s[%x] is_primary=%d",
num_handles, p_list->asgn_range.s_handle , p_list->asgn_range.e_handle,
((p_list->asgn_range.svc_uuid.len == 2) ? "uuid16": "uuid128" ),
p_list->asgn_range.svc_uuid.uu.uuid16,
- p_list->asgn_range.is_primary);
+ p_list->asgn_range.is_primary);
return(s_hdl);
}
@@ -257,7 +257,7 @@ UINT16 GATTS_CreateService (tGATT_IF gatt_if, tBT_UUID *p_svc_uuid,
** Parameter service_handle : To which service this included service is added to.
** include_svc_handle : included service handle.
**
-** Returns included service attribute handle. If 0, add included service
+** Returns included service attribute handle. If 0, add included service
** fail.
**
*******************************************************************************/
@@ -277,8 +277,8 @@ UINT16 GATTS_AddIncludeService (UINT16 service_handle, UINT16 include_svc_handle
return 0;
}
- return gatts_add_included_service(&p_decl->svc_db,
- p_incl_decl->asgn_range.s_handle,
+ return gatts_add_included_service(&p_decl->svc_db,
+ p_incl_decl->asgn_range.s_handle,
p_incl_decl->asgn_range.e_handle,
p_incl_decl->asgn_range.svc_uuid);
}
@@ -314,34 +314,34 @@ UINT16 GATTS_AddCharacteristic (UINT16 service_handle, tBT_UUID *p_char_uuid,
((perm & GATT_WRITE_SIGNED_PERM) && !(property & GATT_CHAR_PROP_BIT_AUTH)) )
{
GATT_TRACE_DEBUG2("Invalid configuration property=0x%x perm=0x%x ", property, perm);
- return 0;
+ return 0;
}
- return gatts_add_characteristic(&p_decl->svc_db,
- perm,
+ return gatts_add_characteristic(&p_decl->svc_db,
+ perm,
property,
- p_char_uuid);
+ p_char_uuid);
}
/*******************************************************************************
**
** Function GATTS_AddCharDescriptor
**
-** Description This function is called to add a characteristic descriptor
-** into a service database. Add descriptor should follow add char
-** to which it belongs, and next add char should be done only
+** Description This function is called to add a characteristic descriptor
+** into a service database. Add descriptor should follow add char
+** to which it belongs, and next add char should be done only
** after all add descriptors for the previous char.
**
-** Parameter service_handle : To which service this characteristic descriptor
+** Parameter service_handle : To which service this characteristic descriptor
** is added to.
-** perm : Characteristic value declaration attribute
+** perm : Characteristic value declaration attribute
** permission.
** p_descr_uuid : Characteristic descriptor UUID
**
-** Returns Characteristic descriptor attribute handle. 0 if add
+** Returns Characteristic descriptor attribute handle. 0 if add
** characteristic descriptor failed.
**
*******************************************************************************/
-UINT16 GATTS_AddCharDescriptor (UINT16 service_handle,
+UINT16 GATTS_AddCharDescriptor (UINT16 service_handle,
tGATT_PERM perm,
tBT_UUID * p_descr_uuid)
{
@@ -352,15 +352,15 @@ UINT16 GATTS_AddCharDescriptor (UINT16 service_handle,
GATT_TRACE_DEBUG0("Service not created");
return 0;
}
- if (p_descr_uuid == NULL ||
+ if (p_descr_uuid == NULL ||
(p_descr_uuid->len != LEN_UUID_128 && p_descr_uuid->len != LEN_UUID_16))
{
GATT_TRACE_DEBUG0("Illegal parameter");
return 0;
}
- return gatts_add_char_descr(&p_decl->svc_db,
- perm,
+ return gatts_add_char_descr(&p_decl->svc_db,
+ perm,
p_descr_uuid);
}
@@ -387,26 +387,26 @@ BOOLEAN GATTS_DeleteService (tGATT_IF gatt_if, tBT_UUID *p_svc_uuid, UINT16 svc_
tGATT_REG *p_reg = gatt_get_regcb(gatt_if);
tBT_UUID *p_app_uuid128;
- GATT_TRACE_DEBUG0 ("GATTS_DeleteService");
+ GATT_TRACE_DEBUG0 ("GATTS_DeleteService");
if (p_reg == NULL)
{
- GATT_TRACE_ERROR0 ("Applicaiton not foud");
+ GATT_TRACE_ERROR0 ("Applicaiton not foud");
return(FALSE);
}
p_app_uuid128 = &p_reg->app_uuid128;
if ((p_list = gatt_find_hdl_buffer_by_app_id(p_app_uuid128, p_svc_uuid, svc_inst)) == NULL)
{
- GATT_TRACE_ERROR0 ("No Service found");
+ GATT_TRACE_ERROR0 ("No Service found");
return(FALSE);
}
- if ( (p_buf = gatt_sr_is_new_srv_chg(&p_list->asgn_range.app_uuid128,
- &p_list->asgn_range.svc_uuid,
+ if ( (p_buf = gatt_sr_is_new_srv_chg(&p_list->asgn_range.app_uuid128,
+ &p_list->asgn_range.svc_uuid,
p_list->asgn_range.svc_inst)) != NULL)
{
- GATT_TRACE_DEBUG0 ("Delete a new service changed item - the service has not yet started");
+ GATT_TRACE_DEBUG0 ("Delete a new service changed item - the service has not yet started");
GKI_freebuf (GKI_remove_from_queue (&gatt_cb.pending_new_srv_start_q, p_buf));
}
else
@@ -414,17 +414,17 @@ BOOLEAN GATTS_DeleteService (tGATT_IF gatt_if, tBT_UUID *p_svc_uuid, UINT16 svc_
gatt_proc_srv_chg();
}
- if ((i_sreg = gatt_sr_find_i_rcb_by_app_id (p_app_uuid128,
- p_svc_uuid,
+ if ((i_sreg = gatt_sr_find_i_rcb_by_app_id (p_app_uuid128,
+ p_svc_uuid,
svc_inst)) != GATT_MAX_SR_PROFILES)
{
GATTS_StopService(gatt_cb.sr_reg[i_sreg].s_hdl);
}
- GATT_TRACE_DEBUG2 ("released handles s_hdl=%u e_hdl=%u",
- p_list->asgn_range.s_handle , p_list->asgn_range.e_handle );
+ GATT_TRACE_DEBUG2 ("released handles s_hdl=%u e_hdl=%u",
+ p_list->asgn_range.s_handle , p_list->asgn_range.e_handle );
- if ( (p_list->asgn_range.s_handle >= gatt_cb.hdl_cfg.app_start_hdl)
+ if ( (p_list->asgn_range.s_handle >= gatt_cb.hdl_cfg.app_start_hdl)
&& gatt_cb.cb_info.p_nv_save_callback)
(*gatt_cb.cb_info.p_nv_save_callback)(FALSE, &p_list->asgn_range);
@@ -447,7 +447,7 @@ BOOLEAN GATTS_DeleteService (tGATT_IF gatt_if, tBT_UUID *p_svc_uuid, UINT16 svc_
** return GATT_SUCCESS if sucessfully started; otherwise error code.
**
*******************************************************************************/
-tGATT_STATUS GATTS_StartService (tGATT_IF gatt_if, UINT16 service_handle,
+tGATT_STATUS GATTS_StartService (tGATT_IF gatt_if, UINT16 service_handle,
tGATT_TRANSPORT sup_transport)
{
tGATT_SR_REG *p_sreg;
@@ -458,24 +458,24 @@ tGATT_STATUS GATTS_StartService (tGATT_IF gatt_if, UINT16 service_handle,
tGATTS_PENDING_NEW_SRV_START *p_buf;
- GATT_TRACE_API0 ("GATTS_StartService");
+ GATT_TRACE_API0 ("GATTS_StartService");
if (p_reg == NULL)
{
/* Not found */
- GATT_TRACE_ERROR0 ("Applicaiton not found ");
+ GATT_TRACE_ERROR0 ("Applicaiton not found ");
return GATT_NOT_FOUND;
}
if ((p_list = gatt_find_hdl_buffer_by_handle(service_handle)) == NULL)
{
/* Not found */
- GATT_TRACE_ERROR0 ("no service found");
+ GATT_TRACE_ERROR0 ("no service found");
return GATT_NOT_FOUND;
}
- if (gatt_sr_find_i_rcb_by_app_id (&p_list->asgn_range.app_uuid128,
- &p_list->asgn_range.svc_uuid,
+ if (gatt_sr_find_i_rcb_by_app_id (&p_list->asgn_range.app_uuid128,
+ &p_list->asgn_range.svc_uuid,
p_list->asgn_range.svc_inst) != GATT_MAX_SR_PROFILES)
{
GATT_TRACE_ERROR0 ("Duplicate Service start - Service already started");
@@ -485,7 +485,7 @@ tGATT_STATUS GATTS_StartService (tGATT_IF gatt_if, UINT16 service_handle,
/*this is a new application servoce start */
if ((i_sreg = gatt_sr_alloc_rcb(p_list)) == GATT_MAX_SR_PROFILES)
{
- GATT_TRACE_ERROR0 ("GATTS_StartService: no free server registration block");
+ GATT_TRACE_ERROR0 ("GATTS_StartService: no free server registration block");
return GATT_NO_RESOURCES;
}
@@ -495,7 +495,7 @@ tGATT_STATUS GATTS_StartService (tGATT_IF gatt_if, UINT16 service_handle,
switch (sup_transport)
{
case GATT_TRANSPORT_BR_EDR:
- case GATT_TRANSPORT_LE_BR_EDR:
+ case GATT_TRANSPORT_LE_BR_EDR:
if (p_sreg->type == GATT_UUID_PRI_SERVICE)
{
p_uuid = gatts_get_service_uuid (p_sreg->p_db);
@@ -507,7 +507,7 @@ tGATT_STATUS GATTS_StartService (tGATT_IF gatt_if, UINT16 service_handle,
break;
}
- gatts_update_srv_list_elem(i_sreg, p_sreg->s_hdl,
+ gatts_update_srv_list_elem(i_sreg, p_sreg->s_hdl,
p_list->asgn_range.is_primary);
gatt_add_a_srv_to_list(&gatt_cb.srv_list_info, &gatt_cb.srv_list[i_sreg]);
@@ -515,13 +515,13 @@ tGATT_STATUS GATTS_StartService (tGATT_IF gatt_if, UINT16 service_handle,
GATT_TRACE_DEBUG1 ("allocated i_sreg=%d ",i_sreg);
GATT_TRACE_DEBUG5 ("s_hdl=%d e_hdl=%d type=0x%x svc_inst=%d sdp_hdl=0x%x",
- p_sreg->s_hdl,p_sreg->e_hdl,
+ p_sreg->s_hdl,p_sreg->e_hdl,
p_sreg->type, p_sreg->service_instance,
p_sreg->sdp_handle);
- if ( (p_buf = gatt_sr_is_new_srv_chg(&p_list->asgn_range.app_uuid128,
- &p_list->asgn_range.svc_uuid,
+ if ( (p_buf = gatt_sr_is_new_srv_chg(&p_list->asgn_range.app_uuid128,
+ &p_list->asgn_range.svc_uuid,
p_list->asgn_range.svc_inst)) != NULL)
{
gatt_proc_srv_chg();
@@ -536,10 +536,10 @@ tGATT_STATUS GATTS_StartService (tGATT_IF gatt_if, UINT16 service_handle,
**
** Function GATTS_StopService
**
-** Description This function is called to stop a service
-**
-** Parameter service_handle : this is the start handle of a service
+** Description This function is called to stop a service
**
+** Parameter service_handle : this is the start handle of a service
+**
** Returns None.
**
*******************************************************************************/
@@ -569,7 +569,7 @@ void GATTS_StopService (UINT16 service_handle)
**
** Function GATTs_HandleValueIndication
**
-** Description This function sends a handle value indication to a client.
+** Description This function sends a handle value indication to a client.
**
** Parameter conn_id: connection identifier.
** attr_handle: Attribute handle of this handle value indication.
@@ -592,7 +592,7 @@ tGATT_STATUS GATTS_HandleValueIndication (UINT16 conn_id, UINT16 attr_handle, U
tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx);
- GATT_TRACE_API0 ("GATTS_HandleValueIndication");
+ GATT_TRACE_API0 ("GATTS_HandleValueIndication");
if ( (p_reg == NULL) || (p_tcb == NULL))
{
GATT_TRACE_ERROR1 ("GATTS_HandleValueIndication Unknown conn_id: %u ", conn_id);
@@ -608,10 +608,10 @@ tGATT_STATUS GATTS_HandleValueIndication (UINT16 conn_id, UINT16 attr_handle, U
{
if (GATT_HANDLE_IS_VALID(p_tcb->indicate_handle))
{
- GATT_TRACE_DEBUG0 ("Add a pending indication");
+ GATT_TRACE_DEBUG0 ("Add a pending indication");
if ((p_buf = gatt_add_pending_ind(p_tcb, &indication)) !=NULL)
{
- cmd_status = GATT_SUCCESS;
+ cmd_status = GATT_SUCCESS;
}
else
{
@@ -640,7 +640,7 @@ tGATT_STATUS GATTS_HandleValueIndication (UINT16 conn_id, UINT16 attr_handle, U
**
** Function GATTS_HandleValueNotification
**
-** Description This function sends a handle value notification to a client.
+** Description This function sends a handle value notification to a client.
**
** Parameter conn_id: connection identifier.
** attr_handle: Attribute handle of this handle value indication.
@@ -696,7 +696,7 @@ tGATT_STATUS GATTS_HandleValueNotification (UINT16 conn_id, UINT16 attr_handle,
** Returns GATT_SUCCESS if sucessfully sent; otherwise error code.
**
*******************************************************************************/
-tGATT_STATUS GATTS_SendRsp (UINT16 conn_id, UINT32 trans_id,
+tGATT_STATUS GATTS_SendRsp (UINT16 conn_id, UINT32 trans_id,
tGATT_STATUS status, tGATTS_RSP *p_msg)
{
tGATT_STATUS cmd_sent = GATT_ILLEGAL_PARAMETER;
@@ -705,7 +705,7 @@ tGATT_STATUS GATTS_SendRsp (UINT16 conn_id, UINT32 trans_id,
tGATT_REG *p_reg = gatt_get_regcb(gatt_if);
tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx);
- GATT_TRACE_API3 ("GATTS_SendRsp: conn_id: %u trans_id: %u Status: 0x%04x",
+ GATT_TRACE_API3 ("GATTS_SendRsp: conn_id: %u trans_id: %u Status: 0x%04x",
conn_id, trans_id, status);
if ( (p_reg == NULL) || (p_tcb == NULL))
@@ -722,7 +722,7 @@ tGATT_STATUS GATTS_SendRsp (UINT16 conn_id, UINT32 trans_id,
return(GATT_WRONG_STATE);
}
/* Process App response */
- cmd_sent = gatt_sr_process_app_rsp (p_tcb, gatt_if, trans_id, p_tcb->sr_cmd.op_code, status, p_msg);
+ cmd_sent = gatt_sr_process_app_rsp (p_tcb, gatt_if, trans_id, p_tcb->sr_cmd.op_code, status, p_msg);
return cmd_sent;
}
@@ -740,14 +740,14 @@ tGATT_STATUS GATTS_SendRsp (UINT16 conn_id, UINT32 trans_id,
/*******************************************************************************
**
-** Function GATTC_ConfigureMTU
+** Function GATTC_ConfigureMTU
**
** Description This function is called to configure the ATT MTU size.
**
-** Parameters conn_id: connection identifier.
+** Parameters conn_id: connection identifier.
** mtu - attribute MTU size..
**
-** Returns GATT_SUCCESS if command started successfully.
+** Returns GATT_SUCCESS if command started successfully.
**
*******************************************************************************/
tGATT_STATUS GATTC_ConfigureMTU (UINT16 conn_id, UINT16 mtu)
@@ -781,7 +781,7 @@ tGATT_STATUS GATTC_ConfigureMTU (UINT16 conn_id, UINT16 mtu)
p_clcb->p_tcb->payload_size = mtu;
p_clcb->operation = GATTC_OPTYPE_CONFIG;
- ret = attp_send_cl_msg (p_clcb->p_tcb, p_clcb->clcb_idx, GATT_REQ_MTU, (tGATT_CL_MSG *)&mtu);
+ ret = attp_send_cl_msg (p_clcb->p_tcb, p_clcb->clcb_idx, GATT_REQ_MTU, (tGATT_CL_MSG *)&mtu);
}
return ret;
@@ -789,18 +789,18 @@ tGATT_STATUS GATTC_ConfigureMTU (UINT16 conn_id, UINT16 mtu)
/*******************************************************************************
**
-** Function GATTC_Discover
+** Function GATTC_Discover
**
** Description This function is called to do a discovery procedure on ATT server.
**
-** Parameters conn_id: connection identifier.
+** Parameters conn_id: connection identifier.
** disc_type:discovery type.
** p_param: parameters of discovery requirement.
**
-** Returns GATT_SUCCESS if command received/sent successfully.
+** Returns GATT_SUCCESS if command received/sent successfully.
**
*******************************************************************************/
-tGATT_STATUS GATTC_Discover (UINT16 conn_id, tGATT_DISC_TYPE disc_type,
+tGATT_STATUS GATTC_Discover (UINT16 conn_id, tGATT_DISC_TYPE disc_type,
tGATT_DISC_PARAM *p_param)
{
tGATT_STATUS status = GATT_SUCCESS;
@@ -830,10 +830,10 @@ tGATT_STATUS GATTC_Discover (UINT16 conn_id, tGATT_DISC_TYPE disc_type,
if ((p_clcb = gatt_clcb_alloc(conn_id)) != NULL )
{
- if (!GATT_HANDLE_IS_VALID(p_param->s_handle) ||
+ if (!GATT_HANDLE_IS_VALID(p_param->s_handle) ||
!GATT_HANDLE_IS_VALID(p_param->e_handle) ||
/* search by type does not have a valid UUID param */
- (disc_type == GATT_DISC_SRVC_BY_UUID &&
+ (disc_type == GATT_DISC_SRVC_BY_UUID &&
p_param->service.len == 0))
{
return GATT_ILLEGAL_PARAMETER;
@@ -856,16 +856,16 @@ tGATT_STATUS GATTC_Discover (UINT16 conn_id, tGATT_DISC_TYPE disc_type,
/*******************************************************************************
**
-** Function GATTC_Read
+** Function GATTC_Read
**
** Description This function is called to read the value of an attribute from
** the server.
**
-** Parameters conn_id: connection identifier.
+** Parameters conn_id: connection identifier.
** type - attribute read type.
** p_read - read operation parameters.
**
-** Returns GATT_SUCCESS if command started successfully.
+** Returns GATT_SUCCESS if command started successfully.
**
*******************************************************************************/
tGATT_STATUS GATTC_Read (UINT16 conn_id, tGATT_READ_TYPE type, tGATT_READ_PARAM *p_read)
@@ -910,7 +910,7 @@ tGATT_STATUS GATTC_Read (UINT16 conn_id, tGATT_READ_TYPE type, tGATT_READ_PARAM
break;
case GATT_READ_MULTIPLE:
p_clcb->s_handle = 0;
- /* copy multiple handles in CB */
+ /* copy multiple handles in CB */
p_read_multi = (tGATT_READ_MULTI *)GKI_getbuf(sizeof(tGATT_READ_MULTI));
p_clcb->p_attr_buf = (UINT8*)p_read_multi;
memcpy (p_read_multi, &p_read->read_multiple, sizeof(tGATT_READ_MULTI));
@@ -944,16 +944,16 @@ tGATT_STATUS GATTC_Read (UINT16 conn_id, tGATT_READ_TYPE type, tGATT_READ_PARAM
/*******************************************************************************
**
-** Function GATTC_Write
+** Function GATTC_Write
**
** Description This function is called to write the value of an attribute to
** the server.
**
-** Parameters conn_id: connection identifier.
+** Parameters conn_id: connection identifier.
** type - attribute write type.
** p_write - write operation parameters.
**
-** Returns GATT_SUCCESS if command started successfully.
+** Returns GATT_SUCCESS if command started successfully.
**
*******************************************************************************/
tGATT_STATUS GATTC_Write (UINT16 conn_id, tGATT_WRITE_TYPE type, tGATT_VALUE *p_write)
@@ -1019,15 +1019,15 @@ tGATT_STATUS GATTC_Write (UINT16 conn_id, tGATT_WRITE_TYPE type, tGATT_VALUE *p_
/*******************************************************************************
**
-** Function GATTC_ExecuteWrite
+** Function GATTC_ExecuteWrite
**
** Description This function is called to send an Execute write request to
** the server.
**
-** Parameters conn_id: connection identifier.
+** Parameters conn_id: connection identifier.
** is_execute - to execute or cancel the prepare write requet(s)
**
-** Returns GATT_SUCCESS if command started successfully.
+** Returns GATT_SUCCESS if command started successfully.
**
*******************************************************************************/
tGATT_STATUS GATTC_ExecuteWrite (UINT16 conn_id, BOOLEAN is_execute)
@@ -1058,7 +1058,7 @@ tGATT_STATUS GATTC_ExecuteWrite (UINT16 conn_id, BOOLEAN is_execute)
{
p_clcb->operation = GATTC_OPTYPE_EXE_WRITE;
flag = is_execute ? GATT_PREP_WRITE_EXEC : GATT_PREP_WRITE_CANCEL;
- gatt_send_queue_write_cancel (p_clcb->p_tcb, p_clcb, flag);
+ gatt_send_queue_write_cancel (p_clcb->p_tcb, p_clcb, flag);
}
else
{
@@ -1070,21 +1070,21 @@ tGATT_STATUS GATTC_ExecuteWrite (UINT16 conn_id, BOOLEAN is_execute)
/*******************************************************************************
**
-** Function GATTC_SendHandleValueConfirm
+** Function GATTC_SendHandleValueConfirm
**
** Description This function is called to send a handle value confirmation
** as response to a handle value notification from server.
**
-** Parameters conn_id: connection identifier.
+** Parameters conn_id: connection identifier.
** handle: the handle of the attribute confirmation.
**
-** Returns GATT_SUCCESS if command started successfully.
+** Returns GATT_SUCCESS if command started successfully.
**
*******************************************************************************/
tGATT_STATUS GATTC_SendHandleValueConfirm (UINT16 conn_id, UINT16 handle)
{
tGATT_STATUS ret = GATT_ILLEGAL_PARAMETER;
- tGATT_TCB *p_tcb=gatt_get_tcb_by_idx(GATT_GET_TCB_IDX(conn_id));
+ tGATT_TCB *p_tcb=gatt_get_tcb_by_idx(GATT_GET_TCB_IDX(conn_id));
GATT_TRACE_API2 ("GATTC_SendHandleValueConfirm conn_id=%d handle=0x%x", conn_id, handle);
@@ -1124,7 +1124,7 @@ tGATT_STATUS GATTC_SendHandleValueConfirm (UINT16 conn_id, UINT16 handle)
**
** Function GATT_SetIdleTimeout
**
-** Description This function (common to both client and server) sets the idle
+** Description This function (common to both client and server) sets the idle
** timeout for a tansport connection
**
** Parameter bd_addr: target device bd address.
@@ -1150,7 +1150,7 @@ void GATT_SetIdleTimeout (BD_ADDR bd_addr, UINT16 idle_tout)
}
}
- GATT_TRACE_API2 ("GATT_SetIdleTimeout idle_tout=%d status=%d(1-OK 0-not performed)",
+ GATT_TRACE_API2 ("GATT_SetIdleTimeout idle_tout=%d status=%d(1-OK 0-not performed)",
idle_tout, status);
}
@@ -1159,7 +1159,7 @@ void GATT_SetIdleTimeout (BD_ADDR bd_addr, UINT16 idle_tout)
**
** Function GATT_Register
**
-** Description This function is called to register an application
+** Description This function is called to register an application
** with GATT
**
** Parameter p_app_uuid128: Application UUID
@@ -1210,11 +1210,11 @@ tGATT_IF GATT_Register (tBT_UUID *p_app_uuid128, tGATT_CBACK *p_cb_info)
**
** Function GATT_Deregister
**
-** Description This function deregistered the application from GATT.
+** Description This function deregistered the application from GATT.
**
** Parameters gatt_if: applicaiton interface.
**
-** Returns None.
+** Returns None.
**
*******************************************************************************/
void GATT_Deregister (tGATT_IF gatt_if)
@@ -1267,7 +1267,7 @@ void GATT_Deregister (tGATT_IF gatt_if)
for (j = 0, p_clcb= &gatt_cb.clcb[j]; j < GATT_CL_MAX_LCB; j++, p_clcb++)
{
- if (p_clcb->in_use &&
+ if (p_clcb->in_use &&
(p_clcb->p_reg->gatt_if == gatt_if) &&
(p_clcb->p_tcb->tcb_idx == p_tcb->tcb_idx))
{
@@ -1315,8 +1315,8 @@ void GATT_StartIf (tGATT_IF gatt_if)
p_tcb = gatt_find_tcb_by_addr(bda);
if (p_reg->app_cb.p_conn_cb)
{
- conn_id = GATT_CREATE_CONN_ID(p_tcb->tcb_idx, gatt_if);
- (*p_reg->app_cb.p_conn_cb)(gatt_if, bda, conn_id, TRUE, 0);
+ conn_id = GATT_CREATE_CONN_ID(p_tcb->tcb_idx, gatt_if);
+ (*p_reg->app_cb.p_conn_cb)(gatt_if, bda, conn_id, TRUE, 0);
}
start_idx = ++found_idx;
}
@@ -1330,7 +1330,7 @@ void GATT_StartIf (tGATT_IF gatt_if)
**
** Description This function initiate a connecttion to a ATT server.
**
-** Parameters gatt_if: applicaiton interface
+** Parameters gatt_if: applicaiton interface
** bd_addr: peer device address.
** is_direct: is a direct conenection or a background auto connection
**
@@ -1366,7 +1366,7 @@ BOOLEAN GATT_Connect (tGATT_IF gatt_if, BD_ADDR bd_addr, BOOLEAN is_direct){
** Description This function initiate a connecttion to a ATT server.
**
** Parameters gatt_if: client interface. If 0 used as unconditionally disconnect,
-** typically used for direct connection cancellation.
+** typically used for direct connection cancellation.
** bd_addr: peer device address.
**
** Returns TRUE if connection started; FALSE if connection start failure.
@@ -1398,7 +1398,7 @@ BOOLEAN GATT_CancelConnect (tGATT_IF gatt_if, BD_ADDR bd_addr, BOOLEAN is_direct
{
while (status && gatt_find_app_hold_link(p_tcb, start_idx, &found_idx, &temp_gatt_if))
{
- status = gatt_cancel_open(temp_gatt_if, bd_addr);
+ status = gatt_cancel_open(temp_gatt_if, bd_addr);
start_idx = ++found_idx;
}
}
@@ -1443,7 +1443,7 @@ BOOLEAN GATT_CancelConnect (tGATT_IF gatt_if, BD_ADDR bd_addr, BOOLEAN is_direct
**
** Description This function disconnect a logic channel.
**
-** Parameters conn_id: connection identifier.
+** Parameters conn_id: connection identifier.
**
** Returns GATT_SUCCESS if disconnected.
**
@@ -1480,7 +1480,7 @@ tGATT_STATUS GATT_Disconnect (UINT16 conn_id)
** interface
**
** Parameters conn_id: connection id (input)
-** p_gatt_if: applicaiton interface (output)
+** p_gatt_if: applicaiton interface (output)
** bd_addr: peer device address. (output)
**
** Returns TRUE the ligical link information is found for conn_id
@@ -1499,8 +1499,8 @@ BOOLEAN GATT_GetConnectionInfor(UINT16 conn_id, tGATT_IF *p_gatt_if, BD_ADDR bd_
if (p_tcb && p_reg )
{
- memcpy(bd_addr, p_tcb->peer_bda, BD_ADDR_LEN);
- *p_gatt_if = gatt_if;
+ memcpy(bd_addr, p_tcb->peer_bda, BD_ADDR_LEN);
+ *p_gatt_if = gatt_if;
status = TRUE;
}
return status;
@@ -1514,11 +1514,11 @@ BOOLEAN GATT_GetConnectionInfor(UINT16 conn_id, tGATT_IF *p_gatt_if, BD_ADDR bd_
** Description This function find the conn_id if the logical link for BD address
** and applciation interface is connected
**
-** Parameters gatt_if: applicaiton interface (input)
+** Parameters gatt_if: applicaiton interface (input)
** bd_addr: peer device address. (input)
** p_conn_id: connection id (output)
**
-** Returns TRUE the ligical link is connected
+** Returns TRUE the ligical link is connected
**
*******************************************************************************/
BOOLEAN GATT_GetConnIdIfConnected(tGATT_IF gatt_if, BD_ADDR bd_addr, UINT16 *p_conn_id)
diff --git a/stack/gatt/gatt_attr.c b/stack/gatt/gatt_attr.c
index fdd2984..d8b417f 100644
--- a/stack/gatt/gatt_attr.c
+++ b/stack/gatt/gatt_attr.c
@@ -28,7 +28,7 @@
static void gatt_profile_request_cback (UINT16 conn_id, UINT32 trans_id, UINT8 op_code, tGATTS_DATA *p_data);
static void gatt_profile_connect_cback (tGATT_IF gatt_if, BD_ADDR bda, UINT16 conn_id, BOOLEAN connected, tGATT_DISCONN_REASON reason);
-static tGATT_CBACK gatt_profile_cback =
+static tGATT_CBACK gatt_profile_cback =
{
gatt_profile_connect_cback,
NULL,
@@ -144,14 +144,14 @@ BOOLEAN gatt_profile_clcb_dealloc (UINT16 conn_id)
**
** Function gatt_profile_request_cback
**
-** Description GATT profile attribute access request callback.
+** Description GATT profile attribute access request callback.
**
** Returns void.
**
*******************************************************************************/
-static void gatt_profile_request_cback (UINT16 conn_id, UINT32 trans_id, tGATTS_REQ_TYPE type,
+static void gatt_profile_request_cback (UINT16 conn_id, UINT32 trans_id, tGATTS_REQ_TYPE type,
tGATTS_DATA *p_data)
-{
+{
UINT8 status = GATT_INVALID_PDU;
tGATTS_RSP rsp_msg ;
BOOLEAN ignore = FALSE;
@@ -165,7 +165,7 @@ static void gatt_profile_request_cback (UINT16 conn_id, UINT32 trans_id, tGATTS_
break;
case GATTS_REQ_TYPE_WRITE:
- status = GATT_WRITE_NOT_PERMIT;
+ status = GATT_WRITE_NOT_PERMIT;
break;
case GATTS_REQ_TYPE_WRITE_EXEC:
@@ -198,11 +198,11 @@ static void gatt_profile_request_cback (UINT16 conn_id, UINT32 trans_id, tGATTS_
** Returns void
**
*******************************************************************************/
-static void gatt_profile_connect_cback (tGATT_IF gatt_if, BD_ADDR bda, UINT16 conn_id,
+static void gatt_profile_connect_cback (tGATT_IF gatt_if, BD_ADDR bda, UINT16 conn_id,
BOOLEAN connected, tGATT_DISCONN_REASON reason)
{
- GATT_TRACE_EVENT5 ("gatt_profile_connect_cback: from %08x%04x connected:%d conn_id=%d reason = 0x%04x",
- (bda[0]<<24)+(bda[1]<<16)+(bda[2]<<8)+bda[3],
+ GATT_TRACE_EVENT5 ("gatt_profile_connect_cback: from %08x%04x connected:%d conn_id=%d reason = 0x%04x",
+ (bda[0]<<24)+(bda[1]<<16)+(bda[2]<<8)+bda[3],
(bda[4]<<8)+bda[5], connected, conn_id, reason);
if (connected)
@@ -243,21 +243,21 @@ void gatt_profile_db_init (void)
GATT_StartIf(gatt_cb.gatt_if);
service_handle = GATTS_CreateService (gatt_cb.gatt_if , &uuid, 0, GATTP_MAX_ATTR_NUM, TRUE);
- /* add Service Changed characteristic
+ /* add Service Changed characteristic
*/
- uuid.uu.uuid16 = gatt_cb.gattp_attr.uuid = GATT_UUID_GATT_SRV_CHGD;
+ uuid.uu.uuid16 = gatt_cb.gattp_attr.uuid = GATT_UUID_GATT_SRV_CHGD;
gatt_cb.gattp_attr.service_change = 0;
- gatt_cb.gattp_attr.handle =
+ gatt_cb.gattp_attr.handle =
gatt_cb.handle_of_h_r = GATTS_AddCharacteristic(service_handle, &uuid, 0, GATT_CHAR_PROP_BIT_INDICATE);
- GATT_TRACE_DEBUG1 ("gatt_profile_db_init: handle of service changed%d",
+ GATT_TRACE_DEBUG1 ("gatt_profile_db_init: handle of service changed%d",
gatt_cb.handle_of_h_r );
- /* start service
+ /* start service
*/
status = GATTS_StartService (gatt_cb.gatt_if, service_handle, GATT_TRANSPORT_LE_BR_EDR);
- GATT_TRACE_DEBUG2 ("gatt_profile_db_init: gatt_if=%d start status%d",
+ GATT_TRACE_DEBUG2 ("gatt_profile_db_init: gatt_if=%d start status%d",
gatt_cb.gatt_if, status);
}
diff --git a/stack/gatt/gatt_auth.c b/stack/gatt/gatt_auth.c
index 9ac5e8a..b7fa13f 100644
--- a/stack/gatt/gatt_auth.c
+++ b/stack/gatt/gatt_auth.c
@@ -49,13 +49,13 @@ static BOOLEAN gatt_sign_data (tGATT_CLCB *p_clcb)
p_attr->len = payload_size - GATT_AUTH_SIGN_LEN - 3;
p_signature = p_attr->value + p_attr->len;
- if (BTM_BleDataSignature(p_clcb->p_tcb->peer_bda,
- p_data,
+ if (BTM_BleDataSignature(p_clcb->p_tcb->peer_bda,
+ p_data,
(UINT16)(p_attr->len + 3), /* 3 = 2 byte handle + opcode */
p_signature))
{
- p_attr->len += BTM_BLE_AUTH_SIGN_LEN;
- gatt_set_ch_state(p_clcb->p_tcb, GATT_CH_OPEN);
+ p_attr->len += BTM_BLE_AUTH_SIGN_LEN;
+ gatt_set_ch_state(p_clcb->p_tcb, GATT_CH_OPEN);
gatt_act_write(p_clcb);
}
else
@@ -73,17 +73,17 @@ static BOOLEAN gatt_sign_data (tGATT_CLCB *p_clcb)
**
** Function gatt_verify_signature
**
-** Description This function start to verify the sign data when receiving
+** Description This function start to verify the sign data when receiving
** the data from peer device.
**
-** Returns
+** Returns
**
*******************************************************************************/
void gatt_verify_signature(tGATT_TCB *p_tcb, BT_HDR *p_buf)
{
UINT16 cmd_len;
UINT8 op_code;
- UINT8 *p, *p_orig = (UINT8 *)(p_buf + 1) + p_buf->offset;
+ UINT8 *p, *p_orig = (UINT8 *)(p_buf + 1) + p_buf->offset;
UINT32 counter;
cmd_len = p_buf->len - GATT_AUTH_SIGN_LEN + 4;
@@ -137,7 +137,7 @@ void gatt_sec_check_complete(BOOLEAN sec_check_ok, tGATT_CLCB *p_clcb)
**
** Description link encryption complete callback.
**
-** Returns
+** Returns
**
*******************************************************************************/
void gatt_enc_cmpl_cback(BD_ADDR bd_addr, void *p_ref_data, tBTM_STATUS result)
@@ -149,7 +149,7 @@ void gatt_enc_cmpl_cback(BD_ADDR bd_addr, void *p_ref_data, tBTM_STATUS result)
GATT_TRACE_DEBUG0("gatt_enc_cmpl_cback");
if ((p_tcb = gatt_find_tcb_by_addr(bd_addr)) != NULL)
{
- gatt_set_ch_state(p_tcb, GATT_CH_OPEN);
+ gatt_set_ch_state(p_tcb, GATT_CH_OPEN);
if (result == BTM_SUCCESS)
{
@@ -271,8 +271,8 @@ tGATT_SEC_ACTION gatt_determine_sec_act(tGATT_CLCB *p_clcb )
/* now check link needs to be encrypted or not if the link key upgrade is not required */
if (act == GATT_SEC_OK)
{
- if (is_le_link &&
- (p_clcb->operation == GATTC_OPTYPE_WRITE) &&
+ if (is_le_link &&
+ (p_clcb->operation == GATTC_OPTYPE_WRITE) &&
(p_clcb->op_subtype == GATT_WRITE_NO_RSP))
{
/* this is a write command request
@@ -282,7 +282,7 @@ tGATT_SEC_ACTION gatt_determine_sec_act(tGATT_CLCB *p_clcb )
btm_ble_get_enc_key_type(p_tcb->peer_bda, &key_type);
if ( (key_type & BTM_LE_KEY_LCSRK) &&
- ((auth_req == GATT_AUTH_REQ_SIGNED_NO_MITM) ||
+ ((auth_req == GATT_AUTH_REQ_SIGNED_NO_MITM) ||
(auth_req == GATT_AUTH_REQ_SIGNED_MITM)))
{
act = GATT_SEC_SIGN_DATA;
@@ -314,7 +314,7 @@ tGATT_SEC_ACTION gatt_determine_sec_act(tGATT_CLCB *p_clcb )
** Function gatt_get_link_encrypt_status
**
** Description This routine get the encryption status of the specified link
-**
+**
**
** Returns tGATT_STATUS link encryption status
**
@@ -322,7 +322,7 @@ tGATT_SEC_ACTION gatt_determine_sec_act(tGATT_CLCB *p_clcb )
tGATT_STATUS gatt_get_link_encrypt_status(tGATT_TCB *p_tcb)
{
tGATT_STATUS encrypt_status = GATT_NOT_ENCRYPTED;
- UINT8 sec_flag=0;
+ UINT8 sec_flag=0;
BTM_GetSecurityFlags(p_tcb->peer_bda, &sec_flag);
@@ -400,8 +400,8 @@ BOOLEAN gatt_security_check_start(tGATT_CLCB *p_clcb)
case GATT_SEC_ENCRYPT_NO_MITM:
case GATT_SEC_ENCRYPT_MITM:
GATT_TRACE_DEBUG0("gatt_security_check_start: Encrypt now or key upgreade first");
- gatt_convert_sec_action(p_tcb->sec_act, &btm_ble_sec_act);
- gatt_set_ch_state(p_tcb, GATT_CH_W4_SEC_COMP);
+ gatt_convert_sec_action(p_tcb->sec_act, &btm_ble_sec_act);
+ gatt_set_ch_state(p_tcb, GATT_CH_W4_SEC_COMP);
p_tcb->p_clcb = p_clcb; /* keep the clcb pointer in CCB */
btm_status = BTM_SetEncryption(p_tcb->peer_bda, gatt_enc_cmpl_cback, &btm_ble_sec_act);
if ( (btm_status != BTM_SUCCESS) && (btm_status != BTM_CMD_STARTED))
@@ -419,7 +419,7 @@ BOOLEAN gatt_security_check_start(tGATT_CLCB *p_clcb)
if (status == FALSE)
{
gatt_set_sec_act(p_tcb, GATT_SEC_NONE);
- gatt_set_ch_state(p_tcb, GATT_CH_OPEN);
+ gatt_set_ch_state(p_tcb, GATT_CH_OPEN);
}
}
else
diff --git a/stack/gatt/gatt_cl.c b/stack/gatt/gatt_cl.c
index ca6d2e1..9853694 100644
--- a/stack/gatt/gatt_cl.c
+++ b/stack/gatt/gatt_cl.c
@@ -25,17 +25,17 @@
*********************************************************************************/
void gatt_send_prepare_write(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb);
-UINT8 disc_type_to_att_opcode[GATT_DISC_MAX] =
+UINT8 disc_type_to_att_opcode[GATT_DISC_MAX] =
{
0,
- GATT_REQ_READ_BY_GRP_TYPE, /* GATT_DISC_SRVC_ALL = 1, */
- GATT_REQ_FIND_TYPE_VALUE, /* GATT_DISC_SRVC_BY_UUID, */
- GATT_REQ_READ_BY_TYPE, /* GATT_DISC_INC_SRVC, */
- GATT_REQ_READ_BY_TYPE, /* GATT_DISC_CHAR, */
- GATT_REQ_FIND_INFO /* GATT_DISC_CHAR_DSCPT, */
+ GATT_REQ_READ_BY_GRP_TYPE, /* GATT_DISC_SRVC_ALL = 1, */
+ GATT_REQ_FIND_TYPE_VALUE, /* GATT_DISC_SRVC_BY_UUID, */
+ GATT_REQ_READ_BY_TYPE, /* GATT_DISC_INC_SRVC, */
+ GATT_REQ_READ_BY_TYPE, /* GATT_DISC_CHAR, */
+ GATT_REQ_FIND_INFO /* GATT_DISC_CHAR_DSCPT, */
};
-UINT16 disc_type_to_uuid[GATT_DISC_MAX] =
+UINT16 disc_type_to_uuid[GATT_DISC_MAX] =
{
0, /* reserved */
GATT_UUID_PRI_SERVICE, /* <service> DISC_SRVC_ALL */
@@ -50,7 +50,7 @@ UINT16 disc_type_to_uuid[GATT_DISC_MAX] =
**
** Function gatt_act_discovery
**
-** Description GATT discovery operation.
+** Description GATT discovery operation.
**
** Returns void.
**
@@ -96,7 +96,7 @@ void gatt_act_discovery(tGATT_CLCB *p_clcb)
**
** Function gatt_act_read
**
-** Description GATT read operation.
+** Description GATT read operation.
**
** Returns void.
**
@@ -165,7 +165,7 @@ void gatt_act_read (tGATT_CLCB *p_clcb, UINT16 offset)
msg.handle = p_clcb->s_handle;
p_clcb->op_subtype &= ~ 0x90;
break;
-
+
default:
GATT_TRACE_ERROR1("Unknown read type: %d", p_clcb->op_subtype);
break;
@@ -174,7 +174,7 @@ void gatt_act_read (tGATT_CLCB *p_clcb, UINT16 offset)
if ( op_code == 0 ||
(rt = attp_send_cl_msg(p_tcb, p_clcb->clcb_idx, op_code, &msg)) != GATT_SUCCESS)
{
- gatt_end_operation(p_clcb, rt, NULL);
+ gatt_end_operation(p_clcb, rt, NULL);
}
}
@@ -182,7 +182,7 @@ void gatt_act_read (tGATT_CLCB *p_clcb, UINT16 offset)
**
** Function gatt_act_write
**
-** Description GATT write operation.
+** Description GATT write operation.
**
** Returns void.
**
@@ -198,14 +198,14 @@ void gatt_act_write (tGATT_CLCB *p_clcb)
switch (p_clcb->op_subtype)
{
case GATT_WRITE_NO_RSP:
- p_clcb->s_handle = p_attr->handle;
+ p_clcb->s_handle = p_attr->handle;
op_code = (p_tcb->sec_act & GATT_SEC_SIGN_DATA) ? GATT_SIGN_CMD_WRITE : GATT_CMD_WRITE;
- rt = gatt_send_write_msg(p_tcb,
- p_clcb->clcb_idx,
- op_code,
- p_attr->handle,
- p_attr->len,
- 0,
+ rt = gatt_send_write_msg(p_tcb,
+ p_clcb->clcb_idx,
+ op_code,
+ p_attr->handle,
+ p_attr->len,
+ 0,
p_attr->value);
break;
@@ -214,12 +214,12 @@ void gatt_act_write (tGATT_CLCB *p_clcb)
{
p_clcb->s_handle = p_attr->handle;
- rt = gatt_send_write_msg(p_tcb,
- p_clcb->clcb_idx,
- GATT_REQ_WRITE,
- p_attr->handle,
- p_attr->len,
- 0,
+ rt = gatt_send_write_msg(p_tcb,
+ p_clcb->clcb_idx,
+ GATT_REQ_WRITE,
+ p_attr->handle,
+ p_attr->len,
+ 0,
p_attr->value);
}
else /* prepare write for long attribute */
@@ -228,8 +228,8 @@ void gatt_act_write (tGATT_CLCB *p_clcb)
}
break;
- case GATT_WRITE_PREPARE:
- gatt_send_prepare_write(p_tcb, p_clcb);
+ case GATT_WRITE_PREPARE:
+ gatt_send_prepare_write(p_tcb, p_clcb);
break;
default:
@@ -241,12 +241,12 @@ void gatt_act_write (tGATT_CLCB *p_clcb)
else
rt = GATT_INTERNAL_ERROR;
- if ((rt != GATT_SUCCESS && rt != GATT_CMD_STARTED)
+ if ((rt != GATT_SUCCESS && rt != GATT_CMD_STARTED)
|| (rt != GATT_CMD_STARTED && p_clcb->op_subtype == GATT_WRITE_NO_RSP))
{
if (rt != GATT_SUCCESS)
{
- GATT_TRACE_ERROR1("gatt_act_write() failed op_code=0x%x", op_code);
+ GATT_TRACE_ERROR1("gatt_act_write() failed op_code=0x%x", op_code);
}
gatt_end_operation(p_clcb, rt, NULL);
}
@@ -311,7 +311,7 @@ BOOLEAN gatt_check_write_long_terminate(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, t
}
if (exec)
{
- gatt_send_queue_write_cancel (p_tcb, p_clcb, flag);
+ gatt_send_queue_write_cancel (p_tcb, p_clcb, flag);
return TRUE;
}
return FALSE;
@@ -326,7 +326,7 @@ BOOLEAN gatt_check_write_long_terminate(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, t
**
*******************************************************************************/
void gatt_send_prepare_write(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb)
-{
+{
tGATT_VALUE *p_attr = (tGATT_VALUE *)p_clcb->p_attr_buf;
UINT16 to_send, offset;
UINT8 rt = GATT_SUCCESS;
@@ -343,15 +343,15 @@ void gatt_send_prepare_write(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb)
offset = p_attr->offset;
if (type == GATT_WRITE_PREPARE)
{
- offset += p_clcb->start_offset;
+ offset += p_clcb->start_offset;
}
GATT_TRACE_DEBUG2("offset =0x%x len=%d", offset, to_send );
- rt = gatt_send_write_msg(p_tcb,
- p_clcb->clcb_idx,
- GATT_REQ_PREPARE_WRITE,
- p_attr->handle,
+ rt = gatt_send_write_msg(p_tcb,
+ p_clcb->clcb_idx,
+ GATT_REQ_PREPARE_WRITE,
+ p_attr->handle,
to_send, /* length */
offset, /* used as offset */
p_attr->value + p_attr->offset); /* data */
@@ -377,43 +377,43 @@ void gatt_send_prepare_write(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb)
*******************************************************************************/
void gatt_proc_disc_read_by_type_rsp(tGATT_CLCB *p_clcb, UINT16 len, UINT8 *p_data)
{
- /*
+ /*
tGATT_TCB *p_tcb = p_clcb->p_tcb;
tGATT_DISCOVERY_DB *p_db = p_clcb->p_disc_db;
tGATT_DISC_REC *p_rec;
tGATT_STATUS status = GATT_INTERNAL_ERROR;
-
-
+
+
if ((p_rec = gatt_add_record(p_clcb->p_disc_db)) != NULL)
{
p_rec->handle = handle;
p_rec->type = p_db->uuid_filter;
p_rec->attr_len = len;
-
- // copy the attibute value into DB
+
+ // copy the attibute value into DB
p_rec->p_value = p_db->p_free_mem;
memcpy(p_rec->p_value, p_value, len);
p_db->p_free_mem += len;
p_db->mem_free -= len;
-
+
if (handle < p_clcb->e_handle)
{
// send another request
- if (gatt_act_send_browse(p_tcb, p_clcb->conn_id,
- GATT_REQ_READ_BY_TYPE,
- (UINT16)(handle + 1), // starting handle
- p_clcb->e_handle, // end handle
+ if (gatt_act_send_browse(p_tcb, p_clcb->conn_id,
+ GATT_REQ_READ_BY_TYPE,
+ (UINT16)(handle + 1), // starting handle
+ p_clcb->e_handle, // end handle
p_clcb->p_disc_db->uuid_filter) // uuid filter /
- == GATT_SUCCESS)
+ == GATT_SUCCESS)
{
- status = GATT_SUCCESS;
+ status = GATT_SUCCESS;
}
}
}
else
status = GATT_DB_FULL;
-
- if (status != GATT_SUCCESS) // DB full
+
+ if (status != GATT_SUCCESS) // DB full
{
gatt_end_operation(p_clcb, status, NULL);
}*/
@@ -465,14 +465,14 @@ void gatt_process_find_type_value_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UIN
**
** Function gatt_process_read_info_rsp
**
-** Description This function is called to handle the read information
+** Description This function is called to handle the read information
** response.
**
**
** Returns void
**
*******************************************************************************/
-void gatt_process_read_info_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
+void gatt_process_read_info_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
UINT16 len, UINT8 *p_data)
{
tGATT_DISC_RES result;
@@ -482,7 +482,7 @@ void gatt_process_read_info_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_c
if (p_clcb->operation != GATTC_OPTYPE_DISCOVERY || p_clcb->op_subtype != GATT_DISC_CHAR_DSCPT)
return;
- STREAM_TO_UINT8(type, p);
+ STREAM_TO_UINT8(type, p);
len -= 1;
if (type == GATT_INFO_TYPE_PAIR_16)
@@ -522,7 +522,7 @@ void gatt_process_read_info_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_c
** Returns void.
**
*******************************************************************************/
-void gatt_proc_disc_error_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 opcode,
+void gatt_proc_disc_error_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 opcode,
UINT16 handle, UINT8 reason)
{
tGATT_STATUS status = (tGATT_STATUS) reason;
@@ -553,13 +553,13 @@ void gatt_proc_disc_error_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 opcode
**
** Function gatt_process_error_rsp
**
-** Description This function is called to handle the error response
+** Description This function is called to handle the error response
**
**
** Returns void
**
*******************************************************************************/
-void gatt_process_error_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
+void gatt_process_error_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
UINT16 len, UINT8 *p_data)
{
UINT8 opcode, reason, * p= p_data;
@@ -567,9 +567,9 @@ void gatt_process_error_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
tGATT_VALUE *p_attr = (tGATT_VALUE *)p_clcb->p_attr_buf;
GATT_TRACE_DEBUG0("gatt_process_error_rsp ");
- STREAM_TO_UINT8(opcode, p);
- STREAM_TO_UINT16(handle, p);
- STREAM_TO_UINT8(reason, p);
+ STREAM_TO_UINT8(opcode, p);
+ STREAM_TO_UINT16(handle, p);
+ STREAM_TO_UINT8(reason, p);
if (p_clcb->operation == GATTC_OPTYPE_DISCOVERY)
{
@@ -603,13 +603,13 @@ void gatt_process_error_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
**
** Function gatt_process_prep_write_rsp
**
-** Description This function is called to handle the read response
+** Description This function is called to handle the read response
**
**
** Returns void
**
*******************************************************************************/
-void gatt_process_prep_write_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
+void gatt_process_prep_write_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
UINT16 len, UINT8 *p_data)
{
tGATT_VALUE value = {0};
@@ -617,7 +617,7 @@ void gatt_process_prep_write_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op
GATT_TRACE_ERROR2("value resp op_code = %s len = %d", gatt_dbg_op_name(op_code), len);
- STREAM_TO_UINT16 (value.handle, p);
+ STREAM_TO_UINT16 (value.handle, p);
STREAM_TO_UINT16 (value.offset, p);
value.len = len - 4;
@@ -650,14 +650,14 @@ void gatt_process_prep_write_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op
** Returns void
**
*******************************************************************************/
-void gatt_process_notification(tGATT_TCB *p_tcb, UINT8 op_code,
+void gatt_process_notification(tGATT_TCB *p_tcb, UINT8 op_code,
UINT16 len, UINT8 *p_data)
{
tGATT_VALUE value = {0};
tGATT_REG *p_reg;
UINT16 conn_id;
tGATT_STATUS encrypt_status;
- UINT8 *p= p_data, i,
+ UINT8 *p= p_data, i,
event = (op_code == GATT_HANDLE_VALUE_NOTIF) ? GATTC_OPTYPE_NOTIFICATION : GATTC_OPTYPE_INDICATION;
GATT_TRACE_DEBUG0("gatt_process_notification ");
@@ -715,7 +715,7 @@ void gatt_process_notification(tGATT_TCB *p_tcb, UINT8 op_code,
encrypt_status = gatt_get_link_encrypt_status(p_tcb);
(*p_reg->app_cb.p_cmpl_cb) (conn_id, event, encrypt_status, (tGATT_CL_COMPLETE *)&value);
}
- }
+ }
}
@@ -748,7 +748,7 @@ void gatt_process_read_by_type_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8
{
/* this is an error case that server's response containing a value length which is larger than MTU-2
or value_len > message total length -1 */
- GATT_TRACE_ERROR4("gatt_process_read_by_type_rsp: Discard response op_code=%d vale_len=%d > (MTU-2=%d or msg_len-1=%d)",
+ GATT_TRACE_ERROR4("gatt_process_read_by_type_rsp: Discard response op_code=%d vale_len=%d > (MTU-2=%d or msg_len-1=%d)",
op_code, value_len, (p_tcb->payload_size - 2), (len-1));
gatt_end_operation(p_clcb, GATT_ERROR, NULL);
return;
@@ -773,13 +773,13 @@ void gatt_process_read_by_type_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8
memset(&result, 0, sizeof(tGATT_DISC_RES));
memset(&record_value, 0, sizeof(tGATT_DISC_VALUE));
- result.handle = handle;
+ result.handle = handle;
result.type.len = 2;
result.type.uu.uuid16 = disc_type_to_uuid[p_clcb->op_subtype];
/* discover all services */
if (p_clcb->operation == GATTC_OPTYPE_DISCOVERY &&
- p_clcb->op_subtype == GATT_DISC_SRVC_ALL &&
+ p_clcb->op_subtype == GATT_DISC_SRVC_ALL &&
op_code == GATT_RSP_READ_BY_GRP_TYPE)
{
STREAM_TO_UINT16(handle, p);
@@ -804,7 +804,7 @@ void gatt_process_read_by_type_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8
{
STREAM_TO_UINT16(record_value.incl_service.s_handle, p);
STREAM_TO_UINT16(record_value.incl_service.e_handle, p);
-
+
if (!GATT_HANDLE_IS_VALID(record_value.incl_service.s_handle) ||
!GATT_HANDLE_IS_VALID(record_value.incl_service.e_handle))
{
@@ -822,7 +822,7 @@ void gatt_process_read_by_type_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8
p_clcb->s_handle = record_value.incl_service.s_handle;
p_clcb->read_uuid128.wait_for_read_rsp = TRUE;
p_clcb->read_uuid128.next_disc_start_hdl = handle + 1;
- memcpy(&p_clcb->read_uuid128.result, &result, sizeof(result));
+ memcpy(&p_clcb->read_uuid128.result, &result, sizeof(result));
memcpy(&p_clcb->read_uuid128.result.value, &record_value, sizeof (result.value));
p_clcb->op_subtype |= 0x90;
gatt_act_read(p_clcb, 0);
@@ -846,15 +846,15 @@ void gatt_process_read_by_type_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8
if (!p_clcb->p_attr_buf)
p_clcb->p_attr_buf = (UINT8 *)GKI_getbuf(GATT_MAX_ATTR_LEN);
if (p_clcb->p_attr_buf && p_clcb->counter <= GATT_MAX_ATTR_LEN)
- {
+ {
memcpy(p_clcb->p_attr_buf, p, p_clcb->counter);
- gatt_act_read(p_clcb, p_clcb->counter);
+ gatt_act_read(p_clcb, p_clcb->counter);
}
else
gatt_end_operation(p_clcb, GATT_INTERNAL_ERROR, (void *)p);
}
else
- {
+ {
gatt_end_operation(p_clcb, GATT_SUCCESS, (void *)p);
}
return;
@@ -870,7 +870,7 @@ void gatt_process_read_by_type_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8
}
gatt_parse_uuid_from_cmd(&record_value.dclr_value.char_uuid, (UINT16)(value_len - 3), &p);
- /* UUID not matching */
+ /* UUID not matching */
if (!gatt_uuid_compare(record_value.dclr_value.char_uuid, p_clcb->uuid))
{
len -= (value_len + 2);
@@ -879,7 +879,7 @@ void gatt_process_read_by_type_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8
else if (p_clcb->operation == GATTC_OPTYPE_READ)
/* UUID match for read characteristic value */
{
- /* only read the first matching UUID characteristic value, and
+ /* only read the first matching UUID characteristic value, and
discard the rest results */
p_clcb->s_handle = record_value.dclr_value.val_handle;
p_clcb->op_subtype |= 0x80;
@@ -914,13 +914,13 @@ void gatt_process_read_by_type_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8
**
** Function gatt_process_read_rsp
**
-** Description This function is called to handle the read BLOB response
+** Description This function is called to handle the read BLOB response
**
**
** Returns void
**
*******************************************************************************/
-void gatt_process_read_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
+void gatt_process_read_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
UINT16 len, UINT8 *p_data)
{
UINT16 offset = p_clcb->counter;
@@ -948,7 +948,7 @@ void gatt_process_read_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
p_clcb->counter += len;
- memcpy(p_clcb->p_attr_buf + offset, p, len);
+ memcpy(p_clcb->p_attr_buf + offset, p, len);
/* send next request if needed */
@@ -957,7 +957,7 @@ void gatt_process_read_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
{
GATT_TRACE_DEBUG3("full pkt issue read blob for remianing bytes old offset=%d len=%d new offset=%d",
offset, len, p_clcb->counter);
- gatt_act_read(p_clcb, p_clcb->counter);
+ gatt_act_read(p_clcb, p_clcb->counter);
}
else /* end of request, send callback */
{
@@ -981,12 +981,12 @@ void gatt_process_read_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
p_clcb->read_uuid128.wait_for_read_rsp = FALSE;
if (len == LEN_UUID_128)
{
-
- memcpy(p_clcb->read_uuid128.result.value.incl_service.service_type.uu.uuid128, p, len);
+
+ memcpy(p_clcb->read_uuid128.result.value.incl_service.service_type.uu.uuid128, p, len);
p_clcb->read_uuid128.result.value.incl_service.service_type.len = LEN_UUID_128;
if ( p_clcb->p_reg->app_cb.p_disc_res_cb)
(*p_clcb->p_reg->app_cb.p_disc_res_cb)(p_clcb->conn_id, p_clcb->op_subtype, &p_clcb->read_uuid128.result);
- gatt_act_discovery(p_clcb) ;
+ gatt_act_discovery(p_clcb) ;
}
else
{
@@ -1002,7 +1002,7 @@ void gatt_process_read_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
**
** Function gatt_process_handle_rsp
**
-** Description This function is called to handle the write response
+** Description This function is called to handle the write response
**
**
** Returns void
@@ -1013,7 +1013,7 @@ void gatt_process_handle_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code
UINT16 handle;
UINT8 * p= p_data;
- STREAM_TO_UINT16(handle, p);
+ STREAM_TO_UINT16(handle, p);
len -= 2;
if (op_code == GATT_RSP_WRITE)
@@ -1074,7 +1074,7 @@ BOOLEAN gatt_cl_send_next_cmd_inq(tGATT_TCB *p_tcb)
tGATT_CMD_Q *p_cmd = &p_tcb->cl_cmd_q[p_tcb->pending_cl_req];
BOOLEAN sent = FALSE;
- while (!sent &&
+ while (!sent &&
p_tcb->pending_cl_req != p_tcb->next_slot_inq &&
p_cmd->to_send && p_cmd->p_cmd != NULL)
{
@@ -1095,22 +1095,22 @@ BOOLEAN gatt_cl_send_next_cmd_inq(tGATT_TCB *p_tcb)
p_tcb->pending_cl_req ++;
p_cmd = &p_tcb->cl_cmd_q[p_tcb->pending_cl_req];
}
- }
- return sent;
+ }
+ return sent;
}
/*******************************************************************************
**
** Function gatt_client_handle_server_rsp
**
-** Description This function is called to handle the server response to
+** Description This function is called to handle the server response to
** client.
**
**
** Returns void
**
*******************************************************************************/
-void gatt_client_handle_server_rsp (tGATT_TCB *p_tcb, UINT8 op_code,
+void gatt_client_handle_server_rsp (tGATT_TCB *p_tcb, UINT8 op_code,
UINT16 len, UINT8 *p_data)
{
tGATT_CLCB *p_clcb = NULL;
@@ -1180,18 +1180,18 @@ void gatt_client_handle_server_rsp (tGATT_TCB *p_tcb, UINT8 op_code,
gatt_process_prep_write_rsp(p_tcb, p_clcb, op_code, len, p_data);
break;
- case GATT_RSP_EXEC_WRITE:
+ case GATT_RSP_EXEC_WRITE:
gatt_end_operation(p_clcb, p_clcb->status, NULL);
break;
case GATT_HANDLE_VALUE_NOTIF:
- case GATT_HANDLE_VALUE_IND:
+ case GATT_HANDLE_VALUE_IND:
gatt_process_notification(p_tcb, op_code, len, p_data);
break;
default:
GATT_TRACE_ERROR1("Unknown opcode = %d", op_code);
- break;
+ break;
}
}
diff --git a/stack/gatt/gatt_db.c b/stack/gatt/gatt_db.c
index 7aac9b7..68982bd 100644
--- a/stack/gatt/gatt_db.c
+++ b/stack/gatt/gatt_db.c
@@ -29,22 +29,22 @@ static BOOLEAN deallocate_attr_in_db(tGATT_SVC_DB *p_db, void *p_attr);
static BOOLEAN copy_extra_byte_in_db(tGATT_SVC_DB *p_db, void **p_dst, UINT16 len);
static void gatts_db_add_service_declaration(tGATT_SVC_DB *p_db, tBT_UUID service, BOOLEAN is_pri);
-static tGATT_STATUS gatts_send_app_read_request(tGATT_TCB *p_tcb, UINT8 op_code,
+static tGATT_STATUS gatts_send_app_read_request(tGATT_TCB *p_tcb, UINT8 op_code,
UINT16 handle, UINT16 offset, UINT32 trans_id);
/*******************************************************************************
**
-** Function gatts_init_service_db
+** Function gatts_init_service_db
**
** Description This function initialize a memory space to be a service database.
**
** Parameter p_db: database pointer.
** len: size of the memory space.
**
-** Returns Status of te operation.
+** Returns Status of te operation.
**
*******************************************************************************/
-BOOLEAN gatts_init_service_db (tGATT_SVC_DB *p_db, tBT_UUID service, BOOLEAN is_pri,
+BOOLEAN gatts_init_service_db (tGATT_SVC_DB *p_db, tBT_UUID service, BOOLEAN is_pri,
UINT16 s_hdl, UINT16 num_handle)
{
if (!allocate_svc_db_buf(p_db))
@@ -53,7 +53,7 @@ BOOLEAN gatts_init_service_db (tGATT_SVC_DB *p_db, tBT_UUID service, BOOLEAN is
return FALSE;
}
- GATT_TRACE_DEBUG0("gatts_init_service_db");
+ GATT_TRACE_DEBUG0("gatts_init_service_db");
GATT_TRACE_DEBUG2("s_hdl = %d num_handle = %d", s_hdl, num_handle );
/* update service database information */
@@ -67,14 +67,14 @@ BOOLEAN gatts_init_service_db (tGATT_SVC_DB *p_db, tBT_UUID service, BOOLEAN is
/*******************************************************************************
**
-** Function gatts_init_service_db
+** Function gatts_init_service_db
**
** Description This function initialize a memory space to be a service database.
**
** Parameter p_db: database pointer.
** len: size of the memory space.
**
-** Returns Status of te operation.
+** Returns Status of te operation.
**
*******************************************************************************/
tBT_UUID * gatts_get_service_uuid (tGATT_SVC_DB *p_db)
@@ -93,15 +93,15 @@ tBT_UUID * gatts_get_service_uuid (tGATT_SVC_DB *p_db)
/*******************************************************************************
**
-** Function gatts_check_attr_readability
+** Function gatts_check_attr_readability
**
** Description check attribute readability
**
-** Returns status of operation.
+** Returns status of operation.
**
*******************************************************************************/
-static tGATT_STATUS gatts_check_attr_readability(tGATT_ATTR16 *p_attr,
- UINT16 offset,
+static tGATT_STATUS gatts_check_attr_readability(tGATT_ATTR16 *p_attr,
+ UINT16 offset,
BOOLEAN read_long,
tGATT_SEC_FLAG sec_flag,
UINT8 key_size)
@@ -142,7 +142,7 @@ static tGATT_STATUS gatts_check_attr_readability(tGATT_ATTR16 *p_attr,
if ( (perm & GATT_READ_ENCRYPTED_REQUIRED) && (sec_flag & GATT_SEC_FLAG_ENCRYPTED) && (key_size < min_key_size))
{
GATT_TRACE_ERROR0( "GATT_INSUF_KEY_SIZE");
- return GATT_INSUF_KEY_SIZE;
+ return GATT_INSUF_KEY_SIZE;
}
@@ -171,7 +171,7 @@ static tGATT_STATUS gatts_check_attr_readability(tGATT_ATTR16 *p_attr,
/*******************************************************************************
**
-** Function read_attr_value
+** Function read_attr_value
**
** Description Utility function to read an attribute value.
**
@@ -181,15 +181,15 @@ static tGATT_STATUS gatts_check_attr_readability(tGATT_ATTR16 *p_attr,
** p_len: output parameter to carry out the attribute length.
** read_long: this is a read blob request.
** mtu: MTU
-** sec_flag: current link security status.
-** key_size: encryption key size.
+** sec_flag: current link security status.
+** key_size: encryption key size.
**
-** Returns status of operation.
+** Returns status of operation.
**
*******************************************************************************/
-static tGATT_STATUS read_attr_value (void *p_attr,
- UINT16 offset,
- UINT8 **p_data,
+static tGATT_STATUS read_attr_value (void *p_attr,
+ UINT16 offset,
+ UINT8 **p_data,
BOOLEAN read_long,
UINT16 mtu,
UINT16 *p_len,
@@ -204,7 +204,7 @@ static tGATT_STATUS read_attr_value (void *p_attr,
GATT_TRACE_DEBUG5("read_attr_value uuid=0x%04x perm=0x%0x sec_flag=0x%x offset=%d read_long=%d",
p_attr16->uuid,
- p_attr16->permission,
+ p_attr16->permission,
sec_flag,
offset,
read_long);
@@ -282,7 +282,7 @@ static tGATT_STATUS read_attr_value (void *p_attr,
/*******************************************************************************
**
-** Function gatts_db_read_attr_value_by_type
+** Function gatts_db_read_attr_value_by_type
**
** Description Query attribute value by attribute type.
**
@@ -292,20 +292,20 @@ static tGATT_STATUS read_attr_value (void *p_attr,
** e_handle: ending handle of the range we are looking for.
** type: Attribute type.
** mtu: MTU.
-** sec_flag: current link security status.
-** key_size: encryption key size.
+** sec_flag: current link security status.
+** key_size: encryption key size.
**
-** Returns Status of the operation.
+** Returns Status of the operation.
**
*******************************************************************************/
-tGATT_STATUS gatts_db_read_attr_value_by_type (tGATT_TCB *p_tcb,
+tGATT_STATUS gatts_db_read_attr_value_by_type (tGATT_TCB *p_tcb,
tGATT_SVC_DB *p_db,
UINT8 op_code,
- BT_HDR *p_rsp,
- UINT16 s_handle,
- UINT16 e_handle,
- tBT_UUID type,
- UINT16 *p_len,
+ BT_HDR *p_rsp,
+ UINT16 s_handle,
+ UINT16 e_handle,
+ tBT_UUID type,
+ UINT16 *p_len,
tGATT_SEC_FLAG sec_flag,
UINT8 key_size,
UINT32 trans_id,
@@ -344,7 +344,7 @@ tGATT_STATUS gatts_db_read_attr_value_by_type (tGATT_TCB *p_tcb,
UINT16_TO_STREAM (p, p_attr->handle);
- status = read_attr_value ((void *)p_attr, 0, &p, FALSE, (UINT16)(*p_len -2), &len, sec_flag, key_size);
+ status = read_attr_value ((void *)p_attr, 0, &p, FALSE, (UINT16)(*p_len -2), &len, sec_flag, key_size);
if (status == GATT_PENDING)
{
@@ -385,22 +385,22 @@ tGATT_STATUS gatts_db_read_attr_value_by_type (tGATT_TCB *p_tcb,
/*******************************************************************************
**
-** Function gatts_add_included_service
+** Function gatts_add_included_service
**
** Description This function adds an included service into a database.
**
** Parameter p_db: database pointer.
** inc_srvc_type: included service type.
**
-** Returns Status of the operation.
+** Returns Status of the operation.
**
*******************************************************************************/
-UINT16 gatts_add_included_service (tGATT_SVC_DB *p_db, UINT16 s_handle, UINT16 e_handle,
+UINT16 gatts_add_included_service (tGATT_SVC_DB *p_db, UINT16 s_handle, UINT16 e_handle,
tBT_UUID service)
{
tGATT_ATTR16 *p_attr;
- GATT_TRACE_DEBUG3("gatts_add_included_service: s_hdl = 0x%04x e_hdl = 0x%04x uuid = 0x%04x",
+ GATT_TRACE_DEBUG3("gatts_add_included_service: s_hdl = 0x%04x e_hdl = 0x%04x uuid = 0x%04x",
s_handle, e_handle, service.uu.uuid16);
if (service.len == 0 || s_handle == 0 || e_handle == 0)
@@ -430,7 +430,7 @@ UINT16 gatts_add_included_service (tGATT_SVC_DB *p_db, UINT16 s_handle, UINT16 e
/*******************************************************************************
**
-** Function gatts_add_characteristic
+** Function gatts_add_characteristic
**
** Description This function add a characteristics and its descriptor into
** a servce identified by the service database pointer.
@@ -440,11 +440,11 @@ UINT16 gatts_add_included_service (tGATT_SVC_DB *p_db, UINT16 s_handle, UINT16 e
** property: property of the characteristic.
** p_char: characteristic value information.
**
-** Returns Status of te operation.
+** Returns Status of te operation.
**
*******************************************************************************/
-UINT16 gatts_add_characteristic (tGATT_SVC_DB *p_db, tGATT_PERM perm,
- tGATT_CHAR_PROP property,
+UINT16 gatts_add_characteristic (tGATT_SVC_DB *p_db, tGATT_PERM perm,
+ tGATT_CHAR_PROP property,
tBT_UUID * p_char_uuid)
{
tGATT_ATTR16 *p_char_decl, *p_char_val;
@@ -456,7 +456,7 @@ UINT16 gatts_add_characteristic (tGATT_SVC_DB *p_db, tGATT_PERM perm,
{
if (!copy_extra_byte_in_db(p_db, (void **)&p_char_decl->p_value, sizeof(tGATT_CHAR_DECL)))
{
- deallocate_attr_in_db(p_db, p_char_decl);
+ deallocate_attr_in_db(p_db, p_char_decl);
return 0;
}
@@ -464,7 +464,7 @@ UINT16 gatts_add_characteristic (tGATT_SVC_DB *p_db, tGATT_PERM perm,
if (p_char_val == NULL)
{
- deallocate_attr_in_db(p_db, p_char_decl);
+ deallocate_attr_in_db(p_db, p_char_decl);
return 0;
}
@@ -481,11 +481,11 @@ UINT16 gatts_add_characteristic (tGATT_SVC_DB *p_db, tGATT_PERM perm,
/*******************************************************************************
**
-** Function gatt_convertchar_descr_type
+** Function gatt_convertchar_descr_type
**
** Description This function convert a char descript UUID into descriptor type.
**
-** Returns descriptor type.
+** Returns descriptor type.
**
*******************************************************************************/
UINT8 gatt_convertchar_descr_type(tBT_UUID *p_descr_uuid)
@@ -525,7 +525,7 @@ UINT8 gatt_convertchar_descr_type(tBT_UUID *p_descr_uuid)
/*******************************************************************************
**
-** Function gatts_add_char_descr
+** Function gatts_add_char_descr
**
** Description This function add a characteristics descriptor.
**
@@ -534,10 +534,10 @@ UINT8 gatt_convertchar_descr_type(tBT_UUID *p_descr_uuid)
** char_dscp_tpye: the characteristic descriptor masks.
** p_dscp_params: characteristic descriptors values.
**
-** Returns Status of the operation.
+** Returns Status of the operation.
**
*******************************************************************************/
-UINT16 gatts_add_char_descr (tGATT_SVC_DB *p_db, tGATT_PERM perm,
+UINT16 gatts_add_char_descr (tGATT_SVC_DB *p_db, tGATT_PERM perm,
tBT_UUID * p_descr_uuid)
{
tGATT_ATTR16 *p_char_dscptr;
@@ -546,10 +546,10 @@ UINT16 gatts_add_char_descr (tGATT_SVC_DB *p_db, tGATT_PERM perm,
GATT_TRACE_DEBUG1("gatts_add_char_descr uuid=0x%04x", p_descr_uuid->uu.uuid16);
/* Add characteristic descriptors */
- if ((p_char_dscptr = (tGATT_ATTR16 *)allocate_attr_in_db(p_db,
- uuid16,
- p_descr_uuid->uu.uuid128,
- perm))
+ if ((p_char_dscptr = (tGATT_ATTR16 *)allocate_attr_in_db(p_db,
+ uuid16,
+ p_descr_uuid->uu.uuid128,
+ perm))
== NULL)
{
GATT_TRACE_DEBUG0("gatts_add_char_descr Fail for adding char descriptors.");
@@ -566,7 +566,7 @@ UINT16 gatts_add_char_descr (tGATT_SVC_DB *p_db, tGATT_PERM perm,
/*******************************************************************************/
/*******************************************************************************
**
-** Function gatts_read_attr_value_by_handle
+** Function gatts_read_attr_value_by_handle
**
** Description Query attribute value by attribute handle.
**
@@ -577,17 +577,17 @@ UINT16 gatts_add_char_descr (tGATT_SVC_DB *p_db, tGATT_PERM perm,
** p_len: output parameter as attribute length read.
** read_long: this is a read blob request.
** mtu: MTU.
-** sec_flag: current link security status.
-** key_size: encryption key size
+** sec_flag: current link security status.
+** key_size: encryption key size
**
-** Returns Status of operation.
+** Returns Status of operation.
**
*******************************************************************************/
tGATT_STATUS gatts_read_attr_value_by_handle(tGATT_TCB *p_tcb,
- tGATT_SVC_DB *p_db,
- UINT8 op_code,
- UINT16 handle, UINT16 offset,
- UINT8 *p_value, UINT16 *p_len,
+ tGATT_SVC_DB *p_db,
+ UINT8 op_code,
+ UINT16 handle, UINT16 offset,
+ UINT8 *p_value, UINT16 *p_len,
UINT16 mtu,
tGATT_SEC_FLAG sec_flag,
UINT8 key_size,
@@ -605,8 +605,8 @@ tGATT_STATUS gatts_read_attr_value_by_handle(tGATT_TCB *p_tcb,
{
if (p_attr->handle == handle)
{
- status = read_attr_value (p_attr, offset, &pp,
- (BOOLEAN)(op_code == GATT_REQ_READ_BLOB),
+ status = read_attr_value (p_attr, offset, &pp,
+ (BOOLEAN)(op_code == GATT_REQ_READ_BLOB),
mtu, p_len, sec_flag, key_size);
if (status == GATT_PENDING)
@@ -624,7 +624,7 @@ tGATT_STATUS gatts_read_attr_value_by_handle(tGATT_TCB *p_tcb,
/*******************************************************************************
**
-** Function gatts_read_attr_perm_check
+** Function gatts_read_attr_perm_check
**
** Description Check attribute readability.
**
@@ -635,15 +635,15 @@ tGATT_STATUS gatts_read_attr_value_by_handle(tGATT_TCB *p_tcb,
** p_len: output parameter as attribute length read.
** read_long: this is a read blob request.
** mtu: MTU.
-** sec_flag: current link security status.
-** key_size: encryption key size
+** sec_flag: current link security status.
+** key_size: encryption key size
**
-** Returns Status of operation.
+** Returns Status of operation.
**
*******************************************************************************/
-tGATT_STATUS gatts_read_attr_perm_check(tGATT_SVC_DB *p_db,
- BOOLEAN is_long,
- UINT16 handle,
+tGATT_STATUS gatts_read_attr_perm_check(tGATT_SVC_DB *p_db,
+ BOOLEAN is_long,
+ UINT16 handle,
tGATT_SEC_FLAG sec_flag,
UINT8 key_size)
{
@@ -658,8 +658,8 @@ tGATT_STATUS gatts_read_attr_perm_check(tGATT_SVC_DB *p_db,
{
if (p_attr->handle == handle)
{
- status = gatts_check_attr_readability (p_attr, 0,
- is_long,
+ status = gatts_check_attr_readability (p_attr, 0,
+ is_long,
sec_flag, key_size);
break;
}
@@ -671,7 +671,7 @@ tGATT_STATUS gatts_read_attr_perm_check(tGATT_SVC_DB *p_db,
}
/*******************************************************************************
**
-** Function gatts_write_attr_perm_check
+** Function gatts_write_attr_perm_check
**
** Description Write attribute value into database.
**
@@ -681,14 +681,14 @@ tGATT_STATUS gatts_read_attr_perm_check(tGATT_SVC_DB *p_db,
** offset: Write offset if write op code is write blob.
** p_data: Attribute value to write.
** len: attribute data length.
-** sec_flag: current link security status.
-** key_size: encryption key size
+** sec_flag: current link security status.
+** key_size: encryption key size
**
-** Returns Status of the operation.
+** Returns Status of the operation.
**
*******************************************************************************/
tGATT_STATUS gatts_write_attr_perm_check (tGATT_SVC_DB *p_db, UINT8 op_code,
- UINT16 handle, UINT16 offset, UINT8 *p_data,
+ UINT16 handle, UINT16 offset, UINT8 *p_data,
UINT16 len, tGATT_SEC_FLAG sec_flag, UINT8 key_size)
{
tGATT_STATUS status = GATT_NOT_FOUND;
@@ -697,7 +697,7 @@ tGATT_STATUS gatts_write_attr_perm_check (tGATT_SVC_DB *p_db, UINT8 op_code,
tGATT_PERM perm;
UINT16 min_key_size;
- GATT_TRACE_DEBUG6( "gatts_write_attr_perm_check op_code=0x%0x handle=0x%04x offset=%d len=%d sec_flag=0x%0x key_size=%d",
+ GATT_TRACE_DEBUG6( "gatts_write_attr_perm_check op_code=0x%0x handle=0x%04x offset=%d len=%d sec_flag=0x%0x key_size=%d",
op_code, handle, offset, len, sec_flag, key_size);
if (p_db != NULL)
@@ -714,7 +714,7 @@ tGATT_STATUS gatts_write_attr_perm_check (tGATT_SVC_DB *p_db, UINT8 op_code,
{
min_key_size +=6;
}
- GATT_TRACE_DEBUG2( "gatts_write_attr_perm_check p_attr->permission =0x%04x min_key_size==0x%04x",
+ GATT_TRACE_DEBUG2( "gatts_write_attr_perm_check p_attr->permission =0x%04x min_key_size==0x%04x",
p_attr->permission,
min_key_size);
@@ -836,9 +836,9 @@ tGATT_STATUS gatts_write_attr_perm_check (tGATT_SVC_DB *p_db, UINT8 op_code,
/*******************************************************************************
**
-** Function allocate_attr_in_db
+** Function allocate_attr_in_db
**
-** Description Allocate a memory space for a new attribute, and link this
+** Description Allocate a memory space for a new attribute, and link this
** attribute into the database attribute list.
**
**
@@ -865,7 +865,7 @@ static void *allocate_attr_in_db(tGATT_SVC_DB *p_db, UINT16 uuid16, UINT8 *uuid1
if (p_db->end_handle <= p_db->next_handle)
{
GATT_TRACE_DEBUG2("handle space full. handle_max = %d next_handle = %d",
- p_db->end_handle, p_db->next_handle);
+ p_db->end_handle, p_db->next_handle);
return NULL;
}
@@ -878,8 +878,8 @@ static void *allocate_attr_in_db(tGATT_SVC_DB *p_db, UINT16 uuid16, UINT8 *uuid1
}
}
- p_attr16 = (tGATT_ATTR16 *) p_db->p_free_mem;
- p_attr128 = (tGATT_ATTR128 *) p_db->p_free_mem;
+ p_attr16 = (tGATT_ATTR16 *) p_db->p_free_mem;
+ p_attr128 = (tGATT_ATTR128 *) p_db->p_free_mem;
memset(p_attr16, 0, len);
@@ -901,7 +901,7 @@ static void *allocate_attr_in_db(tGATT_SVC_DB *p_db, UINT16 uuid16, UINT8 *uuid1
p_attr16->permission = perm;
p_attr16->p_next = NULL;
- /* link the attribute record into the end of DB */
+ /* link the attribute record into the end of DB */
if (p_db->p_attr_list == NULL)
p_db->p_attr_list = p_attr16;
else
@@ -916,13 +916,13 @@ static void *allocate_attr_in_db(tGATT_SVC_DB *p_db, UINT16 uuid16, UINT8 *uuid1
if (p_attr16->uuid_type == GATT_ATTR_UUID_TYPE_16)
{
- GATT_TRACE_DEBUG3("=====> handle = [0x%04x] uuid = [0x%04x] perm=0x%02x ",
+ GATT_TRACE_DEBUG3("=====> handle = [0x%04x] uuid = [0x%04x] perm=0x%02x ",
p_attr16->handle, p_attr16->uuid, p_attr16->permission);
}
else
{
- GATT_TRACE_DEBUG4("=====> handle = [0x%04x] uuid128 = [0x%02x:0x%02x] perm=0x%02x ",
- p_attr128->handle, p_attr128->uuid[0],p_attr128->uuid[1],
+ GATT_TRACE_DEBUG4("=====> handle = [0x%04x] uuid128 = [0x%02x:0x%02x] perm=0x%02x ",
+ p_attr128->handle, p_attr128->uuid[0],p_attr128->uuid[1],
p_attr128->permission);
}
return(void *)p_attr16;
@@ -930,9 +930,9 @@ static void *allocate_attr_in_db(tGATT_SVC_DB *p_db, UINT16 uuid16, UINT8 *uuid1
/*******************************************************************************
**
-** Function deallocate_attr_in_db
+** Function deallocate_attr_in_db
**
-** Description Free an attribute within the database.
+** Description Free an attribute within the database.
**
** Parameter p_db: database pointer.
** p_attr: pointer to the attribute record to be freed.
@@ -951,7 +951,7 @@ static BOOLEAN deallocate_attr_in_db(tGATT_SVC_DB *p_db, void *p_attr)
p_cur = (tGATT_ATTR16 *) p_db->p_attr_list;
p_next = (tGATT_ATTR16 *) p_cur->p_next;
- for (; p_cur != NULL && p_next != NULL;
+ for (; p_cur != NULL && p_next != NULL;
p_cur = p_next, p_next = (tGATT_ATTR16 *)p_next->p_next)
{
if (p_next == p_attr)
@@ -974,7 +974,7 @@ static BOOLEAN deallocate_attr_in_db(tGATT_SVC_DB *p_db, void *p_attr)
/*******************************************************************************
**
-** Function copy_extra_byte_in_db
+** Function copy_extra_byte_in_db
**
** Description Utility function to allocate extra bytes memory in DB and copy
** the value from a source place.
@@ -985,7 +985,7 @@ static BOOLEAN deallocate_attr_in_db(tGATT_SVC_DB *p_db, void *p_attr)
** p_src: source data pointer.
** len: data length to be copied.
**
-** Returns None.
+** Returns None.
**
*******************************************************************************/
static BOOLEAN copy_extra_byte_in_db(tGATT_SVC_DB *p_db, void **p_dst, UINT16 len)
@@ -1003,7 +1003,7 @@ static BOOLEAN copy_extra_byte_in_db(tGATT_SVC_DB *p_db, void **p_dst, UINT16 le
p = p_db->p_free_mem;
p_db->p_free_mem += len;
- p_db->mem_free -= len;
+ p_db->mem_free -= len;
memset((void *)p, 0, len);
*p_dst = (void *)p;
@@ -1012,11 +1012,11 @@ static BOOLEAN copy_extra_byte_in_db(tGATT_SVC_DB *p_db, void **p_dst, UINT16 le
/*******************************************************************************
**
-** Function allocate_svc_db_buf
+** Function allocate_svc_db_buf
**
** Description Utility function to allocate extra buffer for service database.
**
-** Returns TRUE if allocation succeed, otherwise FALSE.
+** Returns TRUE if allocation succeed, otherwise FALSE.
**
*******************************************************************************/
static BOOLEAN allocate_svc_db_buf(tGATT_SVC_DB *p_db)
@@ -1043,14 +1043,14 @@ static BOOLEAN allocate_svc_db_buf(tGATT_SVC_DB *p_db)
/*******************************************************************************
**
-** Function gatts_send_app_read_request
+** Function gatts_send_app_read_request
**
** Description Send application read request callback
**
-** Returns status of operation.
+** Returns status of operation.
**
*******************************************************************************/
-static tGATT_STATUS gatts_send_app_read_request(tGATT_TCB *p_tcb, UINT8 op_code,
+static tGATT_STATUS gatts_send_app_read_request(tGATT_TCB *p_tcb, UINT8 op_code,
UINT16 handle, UINT16 offset, UINT32 trans_id)
{
tGATTS_DATA sr_data;
@@ -1064,7 +1064,7 @@ static tGATT_STATUS gatts_send_app_read_request(tGATT_TCB *p_tcb, UINT8 op_code,
if (trans_id == 0)
{
- trans_id = gatt_sr_enqueue_cmd(p_tcb, op_code, handle);
+ trans_id = gatt_sr_enqueue_cmd(p_tcb, op_code, handle);
gatt_sr_update_cback_cnt(p_tcb, p_sreg->gatt_if, TRUE, TRUE);
}
@@ -1076,7 +1076,7 @@ static tGATT_STATUS gatts_send_app_read_request(tGATT_TCB *p_tcb, UINT8 op_code,
sr_data.read_req.is_long = (BOOLEAN)(op_code == GATT_REQ_READ_BLOB);
sr_data.read_req.offset = offset;
- gatt_sr_send_req_callback(conn_id,
+ gatt_sr_send_req_callback(conn_id,
trans_id, GATTS_REQ_TYPE_READ, &sr_data);
return(tGATT_STATUS) GATT_PENDING;
}
@@ -1087,7 +1087,7 @@ static tGATT_STATUS gatts_send_app_read_request(tGATT_TCB *p_tcb, UINT8 op_code,
/*******************************************************************************
**
-** Function gatts_db_add_service_declaration
+** Function gatts_db_add_service_declaration
**
** Description Update a service database service declaration record.
**
@@ -1102,7 +1102,7 @@ static void gatts_db_add_service_declaration(tGATT_SVC_DB *p_db, tBT_UUID servic
tGATT_ATTR16 *p_attr;
UINT16 service_type = is_pri ? GATT_UUID_PRI_SERVICE: GATT_UUID_SEC_SERVICE;
- GATT_TRACE_DEBUG0( "add_service_declaration");
+ GATT_TRACE_DEBUG0( "add_service_declaration");
/* add service declration record */
if ((p_attr = (tGATT_ATTR16 *)(allocate_attr_in_db(p_db, service_type, NULL, GATT_PERM_READ))) != NULL)
diff --git a/stack/gatt/gatt_int.h b/stack/gatt/gatt_int.h
index 850d1c9..7c7fb89 100644
--- a/stack/gatt/gatt_int.h
+++ b/stack/gatt/gatt_int.h
@@ -25,11 +25,11 @@
#include <string.h>
-#define GATT_CREATE_CONN_ID(tcb_idx, gatt_if) ((UINT16) ((((UINT8)(tcb_idx) ) << 8) | ((UINT8) (gatt_if))))
-#define GATT_GET_TCB_IDX(conn_id) ((UINT8) (((UINT16) (conn_id)) >> 8))
-#define GATT_GET_GATT_IF(conn_id) ((tGATT_IF)((UINT8) (conn_id)))
+#define GATT_CREATE_CONN_ID(tcb_idx, gatt_if) ((UINT16) ((((UINT8)(tcb_idx) ) << 8) | ((UINT8) (gatt_if))))
+#define GATT_GET_TCB_IDX(conn_id) ((UINT8) (((UINT16) (conn_id)) >> 8))
+#define GATT_GET_GATT_IF(conn_id) ((tGATT_IF)((UINT8) (conn_id)))
-#define GATT_GET_SR_REG_PTR(index) (&gatt_cb.sr_reg[(UINT8) (index)]);
+#define GATT_GET_SR_REG_PTR(index) (&gatt_cb.sr_reg[(UINT8) (index)]);
#define GATT_TRANS_ID_MAX 0x0fffffff /* 4 MSB is reserved */
/* security action for GATT write and read request */
@@ -37,7 +37,7 @@
#define GATT_SEC_OK 1
#define GATT_SEC_ENCRYPT 2 /* encrypt the link with current key */
#define GATT_SEC_ENCRYPT_NO_MITM 3 /* unauthenticated encryption or better */
-#define GATT_SEC_ENCRYPT_MITM 4 /* authenticated encryption */
+#define GATT_SEC_ENCRYPT_MITM 4 /* authenticated encryption */
#define GATT_SEC_SIGN_DATA 5 /* compute the signature for the write cmd */
typedef UINT8 tGATT_SEC_ACTION;
@@ -86,7 +86,7 @@ typedef UINT8 tGATT_SEC_ACTION;
#define GATT_SEC_FLAG_ENCRYPTED BTM_SEC_FLAG_ENCRYPTED
typedef UINT8 tGATT_SEC_FLAG;
-/* Find Information Response Type
+/* Find Information Response Type
*/
#define GATT_INFO_TYPE_PAIR_16 0x01
#define GATT_INFO_TYPE_PAIR_128 0x02
@@ -101,18 +101,18 @@ typedef struct
UINT8 value[GATT_MAX_MTU_SIZE]; /* pointer to the attribute value to be found */
} tGATT_FIND_TYPE_VALUE;
-/* client request message to ATT protocol
+/* client request message to ATT protocol
*/
typedef union
{
tGATT_READ_BY_TYPE browse; /* read by type request */
tGATT_FIND_TYPE_VALUE find_type_value;/* find by type value */
- tGATT_READ_MULTI read_multi; /* read multiple request */
+ tGATT_READ_MULTI read_multi; /* read multiple request */
tGATT_READ_PARTIAL read_blob; /* read blob */
tGATT_VALUE attr_value; /* write request */
/* prepare write */
/* write blob */
- UINT16 handle; /* read, handle value confirmation */
+ UINT16 handle; /* read, handle value confirmation */
UINT16 mtu;
tGATT_EXEC_FLAG exec_write; /* execute write */
}tGATT_CL_MSG;
@@ -125,7 +125,7 @@ typedef struct
UINT8 reason;
}tGATT_ERROR;
-/* server response message to ATT protocol
+/* server response message to ATT protocol
*/
typedef union
{
@@ -139,15 +139,15 @@ typedef union
/* Characteristic declaration attribute value
*/
-typedef struct
+typedef struct
{
tGATT_CHAR_PROP property;
UINT16 char_val_handle;
} tGATT_CHAR_DECL;
-/* attribute value maintained in the server database
+/* attribute value maintained in the server database
*/
-typedef union
+typedef union
{
tBT_UUID uuid; /* service declaration */
tGATT_CHAR_DECL char_decl; /* characteristic declaration */
@@ -155,7 +155,7 @@ typedef union
} tGATT_ATTR_VALUE;
-/* Attribute UUID type
+/* Attribute UUID type
*/
#define GATT_ATTR_UUID_TYPE_16 0
#define GATT_ATTR_UUID_TYPE_128 1
@@ -165,7 +165,7 @@ typedef UINT8 tGATT_ATTR_UUID_TYPE;
*/
typedef struct
{
- void *p_next; /* pointer to the next attribute,
+ void *p_next; /* pointer to the next attribute,
either tGATT_ATTR16 or tGATT_ATTR128 */
tGATT_ATTR_VALUE *p_value;
tGATT_ATTR_UUID_TYPE uuid_type;
@@ -178,7 +178,7 @@ typedef struct
*/
typedef struct
{
- void *p_next; /* pointer to the next attribute,
+ void *p_next; /* pointer to the next attribute,
either tGATT_ATTR16 or tGATT_ATTR128 */
tGATT_ATTR_VALUE *p_value;
tGATT_ATTR_UUID_TYPE uuid_type;
@@ -191,7 +191,7 @@ typedef struct
*/
typedef struct
{
- void *p_attr_list; /* pointer to the first attribute,
+ void *p_attr_list; /* pointer to the first attribute,
either tGATT_ATTR16 or tGATT_ATTR128 */
UINT8 *p_free_mem; /* Pointer to free memory */
BUFFER_Q svc_buffer; /* buffer queue used for service database */
@@ -203,7 +203,7 @@ typedef struct
/* Data Structure used for GATT server */
/* A GATT registration record consists of a handle, and 1 or more attributes */
/* A service registration information record consists of beginning and ending */
-/* attribute handle, service UUID and a set of GATT server callback. */
+/* attribute handle, service UUID and a set of GATT server callback. */
typedef struct
{
tGATT_SVC_DB *p_db; /* pointer to the service database */
@@ -215,7 +215,7 @@ typedef struct
UINT16 s_hdl; /* service starting handle */
UINT16 e_hdl; /* service ending handle */
tGATT_IF gatt_if; /* this service is belong to which application */
- BOOLEAN in_use;
+ BOOLEAN in_use;
} tGATT_SR_REG;
@@ -227,7 +227,7 @@ typedef struct
typedef struct
{
tBT_UUID app_uuid128;
- tGATT_CBACK app_cb;
+ tGATT_CBACK app_cb;
tGATT_IF gatt_if; /* one based */
BOOLEAN in_use;
} tGATT_REG;
@@ -325,8 +325,8 @@ typedef struct
typedef struct
{
- void *p_clcb; /* which clcb is doing encryption */
- tGATT_SEC_ACTION sec_act;
+ void *p_clcb; /* which clcb is doing encryption */
+ tGATT_SEC_ACTION sec_act;
BD_ADDR peer_bda;
UINT32 trans_id;
@@ -342,14 +342,14 @@ typedef struct
/* server response data */
tGATT_SR_CMD sr_cmd;
UINT16 indicate_handle;
- BUFFER_Q pending_ind_q;
+ BUFFER_Q pending_ind_q;
TIMER_LIST_ENT conf_timer_ent; /* peer confirm to indication timer */
UINT8 prep_cnt[GATT_MAX_APPS];
- UINT8 ind_count;
+ UINT8 ind_count;
- tGATT_CMD_Q cl_cmd_q[GATT_CL_MAX_LCB];
+ tGATT_CMD_Q cl_cmd_q[GATT_CL_MAX_LCB];
TIMER_LIST_ENT rsp_timer_ent; /* peer response timer */
TIMER_LIST_ENT ind_ack_timer_ent; /* local app confirm to indication timer */
UINT8 pending_cl_req;
@@ -368,7 +368,7 @@ typedef struct
} tGATT_READ_INC_UUID128;
typedef struct
{
- tGATT_TCB *p_tcb; /* associated TCB of this CLCB */
+ tGATT_TCB *p_tcb; /* associated TCB of this CLCB */
tGATT_REG *p_reg; /* owner of this CLCB */
UINT8 sccb_idx;
UINT8 *p_attr_buf; /* attribute buffer for read multiple, prepare write */
@@ -378,14 +378,14 @@ typedef struct
UINT16 s_handle; /* starting handle of the active request */
UINT16 e_handle; /* ending handle of the active request */
UINT16 counter; /* used as offset, attribute length, num of prepare write */
- UINT16 start_offset;
+ UINT16 start_offset;
tGATT_AUTH_REQ auth_req; /* authentication requirement */
UINT8 operation; /* one logic channel can have one operation active */
UINT8 op_subtype; /* operation subtype */
UINT8 status; /* operation status */
BOOLEAN first_read_blob_after_read;
tGATT_READ_INC_UUID128 read_uuid128;
- BOOLEAN in_use;
+ BOOLEAN in_use;
} tGATT_CLCB;
#define GATT_SIGN_WRITE 1
@@ -409,7 +409,7 @@ typedef struct
typedef struct
{
UINT16 clcb_idx;
- BOOLEAN in_use;
+ BOOLEAN in_use;
} tGATT_SCCB;
typedef struct
@@ -421,7 +421,7 @@ typedef struct
typedef struct
{
- tGATT_IF gatt_if[GATT_MAX_APPS];
+ tGATT_IF gatt_if[GATT_MAX_APPS];
BD_ADDR remote_bda;
BOOLEAN in_use;
}tGATT_BG_CONN_DEV;
@@ -451,7 +451,7 @@ typedef struct
BUFFER_Q srv_chg_clt_q; /* service change clients queue */
BUFFER_Q pending_new_srv_start_q; /* pending new service start queue */
- tGATT_REG cl_rcb[GATT_MAX_APPS];
+ tGATT_REG cl_rcb[GATT_MAX_APPS];
tGATT_CLCB clcb[GATT_CL_MAX_LCB]; /* connection link control block*/
tGATT_SCCB sccb[GATT_MAX_SCCB]; /* sign complete callback function GATT_MAX_SCCB <= GATT_CL_MAX_LCB */
UINT8 trace_level;
@@ -494,7 +494,7 @@ GATT_API extern tGATT_CB *gatt_cb_ptr;
GATT_API extern void gatt_set_err_rsp(BOOLEAN enable, UINT8 req_op_code, UINT8 err_status);
#endif
-#ifdef __cplusplus
+#ifdef __cplusplus
}
#endif
@@ -587,11 +587,11 @@ extern UINT8 gatt_sr_find_i_rcb_by_handle(UINT16 handle);
extern UINT8 gatt_sr_find_i_rcb_by_app_id(tBT_UUID *p_app_uuid128, tBT_UUID *p_svc_uuid, UINT16 svc_inst);
extern UINT8 gatt_sr_alloc_rcb(tGATT_HDL_LIST_ELEM *p_list);
extern tGATT_STATUS gatt_sr_process_app_rsp (tGATT_TCB *p_tcb, tGATT_IF gatt_if, UINT32 trans_id, UINT8 op_code, tGATT_STATUS status, tGATTS_RSP *p_msg);
-extern void gatt_server_handle_client_req (tGATT_TCB *p_tcb, UINT8 op_code,
+extern void gatt_server_handle_client_req (tGATT_TCB *p_tcb, UINT8 op_code,
UINT16 len, UINT8 *p_data);
-extern void gatt_sr_send_req_callback(UINT16 conn_id, UINT32 trans_id,
+extern void gatt_sr_send_req_callback(UINT16 conn_id, UINT32 trans_id,
UINT8 op_code, tGATTS_DATA *p_req_data);
-extern UINT32 gatt_sr_enqueue_cmd (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 handle);
+extern UINT32 gatt_sr_enqueue_cmd (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 handle);
extern BOOLEAN gatt_cancel_open(tGATT_IF gatt_if, BD_ADDR bda);
/* */
@@ -628,11 +628,11 @@ extern void gatt_end_operation(tGATT_CLCB *p_clcb, tGATT_STATUS status, void *p_
extern void gatt_act_discovery(tGATT_CLCB *p_clcb);
extern void gatt_act_read(tGATT_CLCB *p_clcb, UINT16 offset);
extern void gatt_act_write(tGATT_CLCB *p_clcb);
-extern UINT8 gatt_act_send_browse(tGATT_TCB *p_tcb, UINT16 index, UINT8 op, UINT16 s_handle, UINT16 e_handle,
+extern UINT8 gatt_act_send_browse(tGATT_TCB *p_tcb, UINT16 index, UINT8 op, UINT16 s_handle, UINT16 e_handle,
tBT_UUID uuid);
extern tGATT_CLCB *gatt_cmd_dequeue(tGATT_TCB *p_tcb, UINT8 *p_opcode);
extern BOOLEAN gatt_cmd_enq(tGATT_TCB *p_tcb, UINT16 clcb_idx, BOOLEAN to_send, UINT8 op_code, BT_HDR *p_buf);
-extern void gatt_client_handle_server_rsp (tGATT_TCB *p_tcb, UINT8 op_code,
+extern void gatt_client_handle_server_rsp (tGATT_TCB *p_tcb, UINT8 op_code,
UINT16 len, UINT8 *p_data);
extern void gatt_send_queue_write_cancel (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, tGATT_EXEC_FLAG flag);
@@ -649,11 +649,11 @@ extern BOOLEAN gatts_init_service_db (tGATT_SVC_DB *p_db, tBT_UUID service, BOOL
extern UINT16 gatts_add_included_service (tGATT_SVC_DB *p_db, UINT16 s_handle, UINT16 e_handle, tBT_UUID service);
extern UINT16 gatts_add_characteristic (tGATT_SVC_DB *p_db, tGATT_PERM perm, tGATT_CHAR_PROP property, tBT_UUID *p_char_uuid);
extern UINT16 gatts_add_char_descr (tGATT_SVC_DB *p_db, tGATT_PERM perm, tBT_UUID *p_dscp_uuid);
-extern tGATT_STATUS gatts_db_read_attr_value_by_type (tGATT_TCB *p_tcb, tGATT_SVC_DB *p_db, UINT8 op_code, BT_HDR *p_rsp, UINT16 s_handle,
+extern tGATT_STATUS gatts_db_read_attr_value_by_type (tGATT_TCB *p_tcb, tGATT_SVC_DB *p_db, UINT8 op_code, BT_HDR *p_rsp, UINT16 s_handle,
UINT16 e_handle, tBT_UUID type, UINT16 *p_len, tGATT_SEC_FLAG sec_flag, UINT8 key_size,UINT32 trans_id, UINT16 *p_cur_handle);
-extern tGATT_STATUS gatts_read_attr_value_by_handle(tGATT_TCB *p_tcb,tGATT_SVC_DB *p_db, UINT8 op_code, UINT16 handle, UINT16 offset,
+extern tGATT_STATUS gatts_read_attr_value_by_handle(tGATT_TCB *p_tcb,tGATT_SVC_DB *p_db, UINT8 op_code, UINT16 handle, UINT16 offset,
UINT8 *p_value, UINT16 *p_len, UINT16 mtu,tGATT_SEC_FLAG sec_flag,UINT8 key_size,UINT32 trans_id);
-extern tGATT_STATUS gatts_write_attr_perm_check (tGATT_SVC_DB *p_db, UINT8 op_code,UINT16 handle, UINT16 offset, UINT8 *p_data,
+extern tGATT_STATUS gatts_write_attr_perm_check (tGATT_SVC_DB *p_db, UINT8 op_code,UINT16 handle, UINT16 offset, UINT8 *p_data,
UINT16 len, tGATT_SEC_FLAG sec_flag, UINT8 key_size);
extern tGATT_STATUS gatts_read_attr_perm_check(tGATT_SVC_DB *p_db, BOOLEAN is_long, UINT16 handle, tGATT_SEC_FLAG sec_flag,UINT8 key_size);
extern void gatts_update_srv_list_elem(UINT8 i_sreg, UINT16 handle, BOOLEAN is_primary);
diff --git a/stack/gatt/gatt_main.c b/stack/gatt/gatt_main.c
index f233c4c..396367a 100644
--- a/stack/gatt/gatt_main.c
+++ b/stack/gatt/gatt_main.c
@@ -37,7 +37,7 @@ static void gatt_l2cif_disconnect_cfm_cback (UINT16 l2cap_cid, UINT16 result);
static void gatt_l2cif_data_ind_cback (UINT16 l2cap_cid, BT_HDR *p_msg);
static void gatt_send_conn_cback (BOOLEAN is_bg_conn, tGATT_TCB *p_tcb);
-static const tL2CAP_APPL_INFO dyn_info =
+static const tL2CAP_APPL_INFO dyn_info =
{
gatt_l2cif_connect_ind_cback,
gatt_l2cif_connect_cfm_cback,
@@ -57,7 +57,7 @@ tGATT_CB gatt_cb;
/*******************************************************************************
**
-** Function gatt_init
+** Function gatt_init
**
** Description This function is enable the GATT profile on the device.
** It clears out the control blocks, and registers with L2CAP.
@@ -103,9 +103,9 @@ void gatt_init (void)
BTM_SetSecurityLevel(TRUE, "", BTM_SEC_SERVICE_ATT, BTM_SEC_NONE, BT_PSM_ATT, 0, 0);
BTM_SetSecurityLevel(FALSE, "", BTM_SEC_SERVICE_ATT, BTM_SEC_NONE, BT_PSM_ATT, 0, 0);
- gatt_cb.hdl_cfg.gatt_start_hdl = GATT_GATT_START_HANDLE;
- gatt_cb.hdl_cfg.gap_start_hdl = GATT_GAP_START_HANDLE;
- gatt_cb.hdl_cfg.app_start_hdl = GATT_APP_START_HANDLE;
+ gatt_cb.hdl_cfg.gatt_start_hdl = GATT_GATT_START_HANDLE;
+ gatt_cb.hdl_cfg.gap_start_hdl = GATT_GAP_START_HANDLE;
+ gatt_cb.hdl_cfg.app_start_hdl = GATT_APP_START_HANDLE;
gatt_profile_db_init();
}
@@ -118,7 +118,7 @@ void gatt_init (void)
**
** Description This function is called to initiate a connection to a peer device.
**
-** Parameter rem_bda: remote device address to connect to.
+** Parameter rem_bda: remote device address to connect to.
**
** Returns TRUE if connection is started, otherwise return FALSE.
**
@@ -153,9 +153,9 @@ BOOLEAN gatt_connect (BD_ADDR rem_bda, tGATT_TCB *p_tcb)
**
** Description This function is called to disconnect to an ATT device.
**
-** Parameter rem_bda: remote device address to disconnect from.
+** Parameter rem_bda: remote device address to disconnect from.
**
-** Returns TRUE: if connection found and to be disconnected; otherwise
+** Returns TRUE: if connection found and to be disconnected; otherwise
** return FALSE.
**
*******************************************************************************/
@@ -208,7 +208,7 @@ BOOLEAN gatt_disconnect (BD_ADDR rem_bda)
void gatt_update_app_hold_link_status (tGATT_IF gatt_if, tGATT_TCB *p_tcb, BOOLEAN is_add)
{
UINT8 i;
- BOOLEAN found=FALSE;
+ BOOLEAN found=FALSE;
if (p_tcb == NULL)
{
@@ -259,13 +259,13 @@ void gatt_update_app_hold_link_status (tGATT_IF gatt_if, tGATT_TCB *p_tcb, BOOLE
*******************************************************************************/
void gatt_update_app_use_link_flag (tGATT_IF gatt_if, tGATT_TCB *p_tcb, BOOLEAN is_add, BOOLEAN check_acl_link)
{
- GATT_TRACE_DEBUG2("gatt_update_app_use_link_flag is_add=%d chk_link=%d",
+ GATT_TRACE_DEBUG2("gatt_update_app_use_link_flag is_add=%d chk_link=%d",
is_add, check_acl_link);
gatt_update_app_hold_link_status(gatt_if, p_tcb, is_add);
if (check_acl_link &&
- p_tcb &&
+ p_tcb &&
(BTM_GetHCIConnHandle(p_tcb->peer_bda) != GATT_INVALID_ACL_HANDLE))
{
if (is_add)
@@ -320,7 +320,7 @@ BOOLEAN gatt_act_connect (tGATT_REG *p_reg, BD_ADDR bd_addr)
if (!gatt_connect(bd_addr, p_tcb))
{
GATT_TRACE_ERROR0("gatt_connect failed");
- memset(p_tcb, 0, sizeof(tGATT_TCB));
+ memset(p_tcb, 0, sizeof(tGATT_TCB));
}
else
ret = TRUE;
@@ -336,7 +336,7 @@ BOOLEAN gatt_act_connect (tGATT_REG *p_reg, BD_ADDR bd_addr)
{
gatt_update_app_use_link_flag(p_reg->gatt_if, p_tcb, TRUE, FALSE);
}
-
+
return ret;
}
@@ -345,7 +345,7 @@ BOOLEAN gatt_act_connect (tGATT_REG *p_reg, BD_ADDR bd_addr)
** Function gatt_le_connect_cback
**
** Description This callback function is called by L2CAP to indicate that
-** the ATT fixed channel for LE is
+** the ATT fixed channel for LE is
** connected (conn = TRUE)/disconnected (conn = FALSE).
**
*******************************************************************************/
@@ -360,7 +360,7 @@ static void gatt_le_connect_cback (BD_ADDR bd_addr, BOOLEAN connected, UINT16 re
GATT_TRACE_DEBUG3 ("GATT ATT protocol channel with BDA: %08x%04x is %s",
- (bd_addr[0]<<24)+(bd_addr[1]<<16)+(bd_addr[2]<<8)+bd_addr[3],
+ (bd_addr[0]<<24)+(bd_addr[1]<<16)+(bd_addr[2]<<8)+bd_addr[3],
(bd_addr[4]<<8)+bd_addr[5], (connected) ? "connected" : "disconnected");
@@ -376,7 +376,7 @@ static void gatt_le_connect_cback (BD_ADDR bd_addr, BOOLEAN connected, UINT16 re
if (connected)
{
- GATT_TRACE_DEBUG1("connected is TRUE reason=%d",reason );
+ GATT_TRACE_DEBUG1("connected is TRUE reason=%d",reason );
/* BR/EDR lik, ignore this callback */
if (reason == 0)
return;
@@ -477,7 +477,7 @@ static void gatt_le_data_ind (BD_ADDR bd_addr, BT_HDR *p_buf)
**
** Description This function handles an inbound connection indication
** from L2CAP. This is the case where we are acting as a
-** server.
+** server.
**
** Returns void
**
@@ -509,7 +509,7 @@ static void gatt_l2cif_connect_ind_cback (BD_ADDR bd_addr, UINT16 lcid, UINT16
}
/* Send L2CAP connect rsp */
- L2CA_ConnectRsp(bd_addr, id, lcid, result, 0);
+ L2CA_ConnectRsp(bd_addr, id, lcid, result, 0);
/* if result ok, proceed with connection */
if (result == L2CAP_CONN_OK)
@@ -531,7 +531,7 @@ static void gatt_l2cif_connect_ind_cback (BD_ADDR bd_addr, UINT16 lcid, UINT16
** Function gatt_l2c_connect_cfm_cback
**
** Description This is the L2CAP connect confirm callback function.
-**
+**
**
** Returns void
**
@@ -583,7 +583,7 @@ void gatt_l2cif_connect_cfm_cback(UINT16 lcid, UINT16 result)
** Function gatt_l2cif_config_cfm_cback
**
** Description This is the L2CAP config confirm callback function.
-**
+**
**
** Returns void
**
@@ -639,7 +639,7 @@ void gatt_l2cif_config_cfm_cback(UINT16 lcid, tL2CAP_CFG_INFO *p_cfg)
** Function gatt_l2cif_config_ind_cback
**
** Description This is the L2CAP config indication callback function.
-**
+**
**
** Returns void
**
@@ -694,7 +694,7 @@ void gatt_l2cif_config_ind_cback(UINT16 lcid, tL2CAP_CFG_INFO *p_cfg)
** Function gatt_l2cif_disconnect_ind_cback
**
** Description This is the L2CAP disconnect indication callback function.
-**
+**
**
** Returns void
**
@@ -728,7 +728,7 @@ void gatt_l2cif_disconnect_ind_cback(UINT16 lcid, BOOLEAN ack_needed)
** Function gatt_l2cif_disconnect_cfm_cback
**
** Description This is the L2CAP disconnect confirm callback function.
-**
+**
**
** Returns void
**
@@ -757,7 +757,7 @@ void gatt_l2cif_disconnect_cfm_cback(UINT16 lcid, UINT16 result)
** Function gatt_l2cif_data_ind_cback
**
** Description This is the L2CAP data indication callback function.
-**
+**
**
** Returns void
**
@@ -782,14 +782,14 @@ void gatt_l2cif_data_ind_cback(UINT16 lcid, BT_HDR *p_buf)
** Function gatt_send_conn_cback
**
** Description Callback used to notify layer above about a connection.
-**
+**
**
** Returns void
**
*******************************************************************************/
static void gatt_send_conn_cback(BOOLEAN is_bg_conn, tGATT_TCB *p_tcb)
{
- UINT8 i;
+ UINT8 i;
tGATT_REG *p_reg;
tGATT_BG_CONN_DEV *p_bg_dev=NULL;
UINT16 conn_id;
@@ -807,7 +807,7 @@ static void gatt_send_conn_cback(BOOLEAN is_bg_conn, tGATT_TCB *p_tcb)
if (p_reg->app_cb.p_conn_cb)
{
- conn_id = GATT_CREATE_CONN_ID(p_tcb->tcb_idx, p_reg->gatt_if);
+ conn_id = GATT_CREATE_CONN_ID(p_tcb->tcb_idx, p_reg->gatt_if);
(*p_reg->app_cb.p_conn_cb)(p_reg->gatt_if, p_tcb->peer_bda, conn_id, TRUE, 0);
}
}
@@ -854,7 +854,7 @@ void gatt_data_process (tGATT_TCB *p_tcb, BT_HDR *p_buf)
if (pseudo_op_code < GATT_OP_CODE_MAX)
{
if (op_code == GATT_SIGN_CMD_WRITE)
- {
+ {
gatt_verify_signature(p_tcb, p_buf);
return;
}
@@ -870,12 +870,12 @@ void gatt_data_process (tGATT_TCB *p_tcb, BT_HDR *p_buf)
else
{
GATT_TRACE_ERROR1 ("ATT - Rcvd L2CAP data, unknown cmd: 0x%x", op_code);
- }
+ }
}
else
{
GATT_TRACE_ERROR0 ("invalid data length, ignore");
- }
+ }
GKI_freebuf (p_buf);
}
@@ -885,7 +885,7 @@ void gatt_data_process (tGATT_TCB *p_tcb, BT_HDR *p_buf)
** Function gatt_add_a_bonded_dev_for_srv_chg
**
** Description Add a bonded dev to the service changed client list
-**
+**
** Returns void
**
*******************************************************************************/
@@ -938,8 +938,8 @@ void gatt_send_srv_chg_ind (BD_ADDR peer_bda)
}
else
{
- GATT_TRACE_ERROR2("Unable to find conn_id for %08x%04x ",
- (peer_bda[0]<<24)+(peer_bda[1]<<16)+(peer_bda[2]<<8)+peer_bda[3],
+ GATT_TRACE_ERROR2("Unable to find conn_id for %08x%04x ",
+ (peer_bda[0]<<24)+(peer_bda[1]<<16)+(peer_bda[2]<<8)+peer_bda[3],
(peer_bda[4]<<8)+peer_bda[5] );
}
}
@@ -957,7 +957,7 @@ void gatt_send_srv_chg_ind (BD_ADDR peer_bda)
*******************************************************************************/
void gatt_chk_srv_chg(tGATTS_SRV_CHG *p_srv_chg_clt)
{
- GATT_TRACE_DEBUG1("gatt_chk_srv_chg srv_changed=%d", p_srv_chg_clt->srv_changed );
+ GATT_TRACE_DEBUG1("gatt_chk_srv_chg srv_changed=%d", p_srv_chg_clt->srv_changed );
if (p_srv_chg_clt->srv_changed)
{
@@ -997,10 +997,10 @@ void gatt_init_srv_chg (void)
{
GATT_TRACE_DEBUG1("gatt_init_srv_chg num_srv_chg_clt_clients=%d", rsp.num_clients);
num_clients = rsp.num_clients;
- i = 1; /* use one based index */
+ i = 1; /* use one based index */
while ((i <= num_clients) && status)
{
- req.client_read_index = i;
+ req.client_read_index = i;
if ((status = (*gatt_cb.cb_info.p_srv_chg_callback)(GATTS_SRV_CHG_CMD_READ_CLENT, &req, &rsp)))
{
memcpy(&srv_chg_clt, &rsp.srv_chg ,sizeof(tGATTS_SRV_CHG));
@@ -1036,7 +1036,7 @@ void gatt_proc_srv_chg (void)
BOOLEAN srv_chg_ind_pending=FALSE;
tGATT_TCB *p_tcb;
- GATT_TRACE_DEBUG0 ("gatt_proc_srv_chg");
+ GATT_TRACE_DEBUG0 ("gatt_proc_srv_chg");
if (gatt_cb.cb_info.p_srv_chg_callback && gatt_cb.handle_of_h_r)
{
@@ -1053,7 +1053,7 @@ void gatt_proc_srv_chg (void)
}
else
{
- GATT_TRACE_DEBUG0 ("discard srv chg - already has one in the queue");
+ GATT_TRACE_DEBUG0 ("discard srv chg - already has one in the queue");
}
start_idx = ++found_idx;
}
diff --git a/stack/gatt/gatt_sr.c b/stack/gatt/gatt_sr.c
index a4b3b90..9da6c34 100644
--- a/stack/gatt/gatt_sr.c
+++ b/stack/gatt/gatt_sr.c
@@ -11,7 +11,7 @@
#include "bt_target.h"
#if BLE_INCLUDED == TRUE
-#include <string.h>
+#include <string.h>
#include "gatt_int.h"
#include "l2c_api.h"
@@ -20,7 +20,7 @@
**
** Function gatt_sr_enqueue_cmd
**
-** Description This function enqueue the request from client which needs a
+** Description This function enqueue the request from client which needs a
** application response, and update the transaction ID.
**
** Returns void
@@ -31,11 +31,11 @@ UINT32 gatt_sr_enqueue_cmd (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 handle)
tGATT_SR_CMD *p_cmd = &p_tcb->sr_cmd;
UINT32 trans_id = 0;
- if ( (p_cmd->op_code == 0) ||
+ if ( (p_cmd->op_code == 0) ||
(op_code == GATT_HANDLE_VALUE_CONF)) /* no pending request */
{
- if (op_code == GATT_CMD_WRITE ||
- op_code == GATT_SIGN_CMD_WRITE ||
+ if (op_code == GATT_CMD_WRITE ||
+ op_code == GATT_SIGN_CMD_WRITE ||
op_code == GATT_REQ_MTU ||
op_code == GATT_HANDLE_VALUE_CONF)
{
@@ -43,7 +43,7 @@ UINT32 gatt_sr_enqueue_cmd (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 handle)
}
else
{
- p_cmd->trans_id = ++p_tcb->trans_id;
+ p_cmd->trans_id = ++p_tcb->trans_id;
p_cmd->op_code = op_code;
p_cmd->handle = handle;
p_cmd->status = GATT_NOT_FOUND;
@@ -91,7 +91,7 @@ void gatt_dequeue_sr_cmd (tGATT_TCB *p_tcb)
while (p_tcb->sr_cmd.multi_rsp_q.p_first)
GKI_freebuf (GKI_dequeue (&p_tcb->sr_cmd.multi_rsp_q));
- memset( &p_tcb->sr_cmd, 0, sizeof(tGATT_SR_CMD));
+ memset( &p_tcb->sr_cmd, 0, sizeof(tGATT_SR_CMD));
}
/*******************************************************************************
@@ -127,7 +127,7 @@ static BOOLEAN process_read_multi_rsp (tGATT_SR_CMD *p_cmd, tGATT_STATUS status,
p_cmd->status = status;
if (status == GATT_SUCCESS)
{
- GATT_TRACE_DEBUG2 ("Multi read count=%d num_hdls=%d",
+ GATT_TRACE_DEBUG2 ("Multi read count=%d num_hdls=%d",
p_cmd->multi_rsp_q.count, p_cmd->multi_req.num_handles);
/* Wait till we get all the responses */
if (p_cmd->multi_rsp_q.count == p_cmd->multi_req.num_handles)
@@ -168,7 +168,7 @@ static BOOLEAN process_read_multi_rsp (tGATT_SR_CMD *p_cmd, tGATT_STATUS status,
{
/* just send the partial response for the overflow case */
len = p_rsp->attr_value.len - (total_len - mtu);
- is_overflow = TRUE;
+ is_overflow = TRUE;
GATT_TRACE_DEBUG2 ("multi read overflow available len=%d val_len=%d", len, p_rsp->attr_value.len );
}
else
@@ -185,7 +185,7 @@ static BOOLEAN process_read_multi_rsp (tGATT_SR_CMD *p_cmd, tGATT_STATUS status,
}
else
{
- p_cmd->status = GATT_NOT_FOUND;
+ p_cmd->status = GATT_NOT_FOUND;
break;
}
@@ -195,7 +195,7 @@ static BOOLEAN process_read_multi_rsp (tGATT_SR_CMD *p_cmd, tGATT_STATUS status,
}
else
{
- p_cmd->status = GATT_NOT_FOUND;
+ p_cmd->status = GATT_NOT_FOUND;
break;
}
@@ -235,7 +235,7 @@ static BOOLEAN process_read_multi_rsp (tGATT_SR_CMD *p_cmd, tGATT_STATUS status,
**
** Function gatt_sr_process_app_rsp
**
-** Description This function checks whether the response message from application
+** Description This function checks whether the response message from application
** match any pending request or not.
**
** Returns void
@@ -267,7 +267,7 @@ tGATT_STATUS gatt_sr_process_app_rsp (tGATT_TCB *p_tcb, tGATT_IF gatt_if,
p_tcb->sr_cmd.status = status;
- if (gatt_sr_is_cback_cnt_zero(p_tcb)
+ if (gatt_sr_is_cback_cnt_zero(p_tcb)
&& status == GATT_SUCCESS)
{
if (p_tcb->sr_cmd.p_rsp_msg == NULL)
@@ -280,7 +280,7 @@ tGATT_STATUS gatt_sr_process_app_rsp (tGATT_TCB *p_tcb, tGATT_IF gatt_if,
}
}
}
- if (gatt_sr_is_cback_cnt_zero(p_tcb))
+ if (gatt_sr_is_cback_cnt_zero(p_tcb))
{
if ( (p_tcb->sr_cmd.status == GATT_SUCCESS) && (p_tcb->sr_cmd.p_rsp_msg) )
{
@@ -289,7 +289,7 @@ tGATT_STATUS gatt_sr_process_app_rsp (tGATT_TCB *p_tcb, tGATT_IF gatt_if,
}
else
{
- ret_code = gatt_send_error_rsp (p_tcb, status, op_code, p_tcb->sr_cmd.handle, FALSE);
+ ret_code = gatt_send_error_rsp (p_tcb, status, op_code, p_tcb->sr_cmd.handle, FALSE);
}
gatt_dequeue_sr_cmd(p_tcb);
@@ -304,7 +304,7 @@ tGATT_STATUS gatt_sr_process_app_rsp (tGATT_TCB *p_tcb, tGATT_IF gatt_if,
**
** Function gatt_process_exec_write_req
**
-** Description This function is called to process the execute write request
+** Description This function is called to process the execute write request
** from client.
**
** Returns void
@@ -322,12 +322,12 @@ void gatt_process_exec_write_req (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, U
/* mask the flag */
flag &= GATT_PREP_WRITE_EXEC;
-
+
/* no prep write is queued */
if (!gatt_sr_is_prep_cnt_zero(p_tcb))
{
- trans_id = gatt_sr_enqueue_cmd(p_tcb, op_code, 0);
+ trans_id = gatt_sr_enqueue_cmd(p_tcb, op_code, 0);
gatt_sr_copy_prep_cnt_to_cback_cnt(p_tcb);
for (i=0; i<GATT_MAX_APPS; i++)
@@ -336,9 +336,9 @@ void gatt_process_exec_write_req (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, U
{
gatt_if = (tGATT_IF) (i+1);
conn_id = GATT_CREATE_CONN_ID(p_tcb->tcb_idx, gatt_if);
- gatt_sr_send_req_callback(conn_id,
- trans_id,
- GATTS_REQ_TYPE_WRITE_EXEC,
+ gatt_sr_send_req_callback(conn_id,
+ trans_id,
+ GATTS_REQ_TYPE_WRITE_EXEC,
(tGATTS_DATA *)&flag);
p_tcb->prep_cnt[i]= 0;
}
@@ -360,7 +360,7 @@ void gatt_process_exec_write_req (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, U
**
** Function gatt_process_read_multi_req
**
-** Description This function is called to process the read multiple request
+** Description This function is called to process the read multiple request
** from client.
**
** Returns void
@@ -375,12 +375,12 @@ void gatt_process_read_multi_req (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, U
UINT8 sec_flag, key_size;
tGATTS_RSP *p_msg;
- GATT_TRACE_DEBUG0("gatt_process_read_multi_req" );
+ GATT_TRACE_DEBUG0("gatt_process_read_multi_req" );
p_tcb->sr_cmd.multi_req.num_handles = 0;
- gatt_sr_get_sec_info(p_tcb->peer_bda,
- (BOOLEAN)(p_tcb->att_lcid == L2CAP_ATT_CID),
- &sec_flag,
+ gatt_sr_get_sec_info(p_tcb->peer_bda,
+ (BOOLEAN)(p_tcb->att_lcid == L2CAP_ATT_CID),
+ &sec_flag,
&key_size);
#if GATT_CONFORMANCE_TESTING == TRUE
@@ -407,9 +407,9 @@ void gatt_process_read_multi_req (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, U
/* check read permission */
if ((err = gatts_read_attr_perm_check( gatt_cb.sr_reg[i_rcb].p_db,
FALSE,
- handle,
+ handle,
sec_flag,
- key_size))
+ key_size))
!= GATT_SUCCESS)
{
GATT_TRACE_DEBUG1("read permission denied : 0x%02x", err);
@@ -424,7 +424,7 @@ void gatt_process_read_multi_req (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, U
}
ll -= 2;
}
-
+
if (ll != 0)
{
GATT_TRACE_ERROR0("max attribute handle reached in ReadMultiple Request.");
@@ -452,21 +452,21 @@ void gatt_process_read_multi_req (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, U
err = gatts_read_attr_value_by_handle(p_tcb,
gatt_cb.sr_reg[i_rcb].p_db,
op_code,
- handle,
- 0,
- p_msg->attr_value.value,
+ handle,
+ 0,
+ p_msg->attr_value.value,
&p_msg->attr_value.len,
- GATT_MAX_ATTR_LEN,
+ GATT_MAX_ATTR_LEN,
sec_flag,
key_size,
- trans_id);
+ trans_id);
if (err == GATT_SUCCESS)
{
gatt_sr_process_app_rsp(p_tcb, gatt_cb.sr_reg[i_rcb].gatt_if ,trans_id, op_code, GATT_SUCCESS, p_msg);
}
/* either not using or done using the buffer, release it now */
- GKI_freebuf(p_msg);
+ GKI_freebuf(p_msg);
}
else
{
@@ -495,8 +495,8 @@ void gatt_process_read_multi_req (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, U
** Returns void
**
*******************************************************************************/
-static tGATT_STATUS gatt_build_primary_service_rsp (BT_HDR *p_msg, tGATT_TCB *p_tcb,
- UINT8 op_code, UINT16 s_hdl,
+static tGATT_STATUS gatt_build_primary_service_rsp (BT_HDR *p_msg, tGATT_TCB *p_tcb,
+ UINT8 op_code, UINT16 s_hdl,
UINT16 e_hdl, UINT8 *p_data, tBT_UUID value)
{
tGATT_STATUS status = GATT_NOT_FOUND;
@@ -512,7 +512,7 @@ static tGATT_STATUS gatt_build_primary_service_rsp (BT_HDR *p_msg, tGATT_TCB *p_
while (p_srv)
{
- p_rcb = GATT_GET_SR_REG_PTR(p_srv->i_sreg);
+ p_rcb = GATT_GET_SR_REG_PTR(p_srv->i_sreg);
if (p_rcb->in_use &&
p_rcb->s_hdl >= s_hdl &&
@@ -561,7 +561,7 @@ static tGATT_STATUS gatt_build_primary_service_rsp (BT_HDR *p_msg, tGATT_TCB *p_
gatt_build_uuid_to_stream(&p, *p_uuid);
status = GATT_SUCCESS;
- p_msg->len += p_msg->offset;
+ p_msg->len += p_msg->offset;
}
}
else
@@ -585,7 +585,7 @@ static tGATT_STATUS gatt_build_primary_service_rsp (BT_HDR *p_msg, tGATT_TCB *p_
** FALSE: packet full, or format mismatch.
**
*******************************************************************************/
-static tGATT_STATUS gatt_build_find_info_rsp(tGATT_SR_REG *p_rcb, BT_HDR *p_msg, UINT16 *p_len,
+static tGATT_STATUS gatt_build_find_info_rsp(tGATT_SR_REG *p_rcb, BT_HDR *p_msg, UINT16 *p_len,
UINT16 s_hdl, UINT16 e_hdl)
{
tGATT_STATUS status = GATT_NOT_FOUND;
@@ -621,7 +621,7 @@ static tGATT_STATUS gatt_build_find_info_rsp(tGATT_SR_REG *p_rcb, BT_HDR *p_msg,
UINT16_TO_STREAM(p, p_attr->handle);
UINT16_TO_STREAM(p, p_attr->uuid);
}
- else if (p_msg->offset == GATT_INFO_TYPE_PAIR_128 &&
+ else if (p_msg->offset == GATT_INFO_TYPE_PAIR_128 &&
p_attr->uuid_type == GATT_ATTR_UUID_TYPE_128 )
{
UINT16_TO_STREAM(p, p_attr->handle);
@@ -661,7 +661,7 @@ static tGATT_STATUS gatt_build_find_info_rsp(tGATT_SR_REG *p_rcb, BT_HDR *p_msg,
** Returns void
**
*******************************************************************************/
-static tGATT_STATUS gatts_validate_packet_format(UINT8 op_code, UINT16 *p_len,
+static tGATT_STATUS gatts_validate_packet_format(UINT8 op_code, UINT16 *p_len,
UINT8 **p_data, tBT_UUID *p_uuid_filter,
UINT16 *p_s_hdl, UINT16 *p_e_hdl)
{
@@ -682,7 +682,7 @@ static tGATT_STATUS gatts_validate_packet_format(UINT8 op_code, UINT16 *p_len,
reason = GATT_INVALID_HANDLE;
}
/* for these PDUs, uuid filter must present */
- else if (op_code == GATT_REQ_READ_BY_GRP_TYPE ||
+ else if (op_code == GATT_REQ_READ_BY_GRP_TYPE ||
op_code == GATT_REQ_FIND_TYPE_VALUE ||
op_code == GATT_REQ_READ_BY_TYPE)
{
@@ -717,7 +717,7 @@ static tGATT_STATUS gatts_validate_packet_format(UINT8 op_code, UINT16 *p_len,
**
** Function gatts_process_primary_service_req
**
-** Description process ReadByGroupType/ReadByTypeValue request, for discover
+** Description process ReadByGroupType/ReadByTypeValue request, for discover
** all primary services or discover primary service by UUID request.
**
** Returns void
@@ -769,7 +769,7 @@ void gatts_process_primary_service_req(tGATT_TCB *p_tcb, UINT8 op_code, UINT16 l
/* we do not support ReadByTypeValue with any non-primamry_service type */
reason = GATT_NOT_FOUND;
GATT_TRACE_DEBUG1("unexpected ReadByTypeValue type: 0x%04x", uuid.uu.uuid16);
- }
+ }
}
}
@@ -787,7 +787,7 @@ void gatts_process_primary_service_req(tGATT_TCB *p_tcb, UINT8 op_code, UINT16 l
**
** Function gatts_process_find_info
**
-** Description process find information request, for discover character
+** Description process find information request, for discover character
** descriptors.
**
** Returns void
@@ -827,7 +827,7 @@ static void gatts_process_find_info(tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len,
while (p_srv)
{
- p_rcb = GATT_GET_SR_REG_PTR(p_srv->i_sreg);
+ p_rcb = GATT_GET_SR_REG_PTR(p_srv->i_sreg);
if (p_rcb->in_use &&
!(p_rcb->s_hdl > e_hdl ||
@@ -873,7 +873,7 @@ static void gatts_process_mtu_req (tGATT_TCB *p_tcb, UINT16 len, UINT8 *p_data)
UINT16 mtu = 0;
UINT8 *p = p_data, i;
BT_HDR *p_buf;
- UINT16 conn_id;
+ UINT16 conn_id;
STREAM_TO_UINT16 (mtu, p);
@@ -902,7 +902,7 @@ static void gatts_process_mtu_req (tGATT_TCB *p_tcb, UINT16 len, UINT8 *p_data)
if (gatt_cb.cl_rcb[i].in_use )
{
conn_id = GATT_CREATE_CONN_ID(p_tcb->tcb_idx, gatt_cb.cl_rcb[i].gatt_if);
- gatt_sr_send_req_callback(conn_id, 0, GATTS_REQ_TYPE_MTU,
+ gatt_sr_send_req_callback(conn_id, 0, GATTS_REQ_TYPE_MTU,
(tGATTS_DATA *)&p_tcb->payload_size);
}
}
@@ -918,7 +918,7 @@ static void gatts_process_mtu_req (tGATT_TCB *p_tcb, UINT16 len, UINT8 *p_data)
** Description process Read By type request.
** This PDU can be used to perform:
** - read characteristic value
-** - read characteristic descriptor value
+** - read characteristic descriptor value
** - discover characteristic
** - discover characteristic by UUID
** - relationship discovery
@@ -931,7 +931,7 @@ void gatts_process_read_by_type_req(tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len,
tBT_UUID uuid;
tGATT_SR_REG *p_rcb;
UINT16 msg_len = (UINT16)(sizeof(BT_HDR) + p_tcb->payload_size + L2CAP_MIN_OFFSET),
- buf_len,
+ buf_len,
s_hdl, e_hdl, err_hdl = 0;
BT_HDR *p_msg = NULL;
tGATT_STATUS reason, ret;
@@ -977,23 +977,23 @@ void gatts_process_read_by_type_req(tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len,
while (p_srv)
{
- p_rcb = GATT_GET_SR_REG_PTR(p_srv->i_sreg);
+ p_rcb = GATT_GET_SR_REG_PTR(p_srv->i_sreg);
if (p_rcb->in_use &&
!(p_rcb->s_hdl > e_hdl ||
p_rcb->e_hdl < s_hdl))
{
- gatt_sr_get_sec_info(p_tcb->peer_bda,
- (BOOLEAN)(p_tcb->att_lcid == L2CAP_ATT_CID),
- &sec_flag,
+ gatt_sr_get_sec_info(p_tcb->peer_bda,
+ (BOOLEAN)(p_tcb->att_lcid == L2CAP_ATT_CID),
+ &sec_flag,
&key_size);
- ret = gatts_db_read_attr_value_by_type(p_tcb,
- p_rcb->p_db,
+ ret = gatts_db_read_attr_value_by_type(p_tcb,
+ p_rcb->p_db,
op_code,
- p_msg,
- s_hdl,
- e_hdl,
+ p_msg,
+ s_hdl,
+ e_hdl,
uuid,
&buf_len,
sec_flag,
@@ -1036,7 +1036,7 @@ void gatts_process_read_by_type_req(tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len,
**
** Function gatts_process_write_req
**
-** Description This function is called to process the write request
+** Description This function is called to process the write request
** from client.
**
** Returns void
@@ -1065,7 +1065,7 @@ void gatts_process_write_req (tGATT_TCB *p_tcb, UINT8 i_rcb, UINT16 handle,
if (op_code == GATT_SIGN_CMD_WRITE)
{
GATT_TRACE_DEBUG0("Write CMD with data sigining" );
- len -= GATT_AUTH_SIGN_LEN;
+ len -= GATT_AUTH_SIGN_LEN;
}
/* fall through */
case GATT_CMD_WRITE:
@@ -1078,18 +1078,18 @@ void gatts_process_write_req (tGATT_TCB *p_tcb, UINT8 i_rcb, UINT16 handle,
break;
}
- gatt_sr_get_sec_info(p_tcb->peer_bda,
- (BOOLEAN)(p_tcb->att_lcid == L2CAP_ATT_CID),
- &sec_flag,
+ gatt_sr_get_sec_info(p_tcb->peer_bda,
+ (BOOLEAN)(p_tcb->att_lcid == L2CAP_ATT_CID),
+ &sec_flag,
&key_size);
status = gatts_write_attr_perm_check (gatt_cb.sr_reg[i_rcb].p_db,
op_code,
- handle,
- sr_data.write_req.offset,
- p,
- len,
- sec_flag,
+ handle,
+ sr_data.write_req.offset,
+ p,
+ len,
+ sec_flag,
key_size);
if (status == GATT_SUCCESS)
@@ -1099,10 +1099,10 @@ void gatts_process_write_req (tGATT_TCB *p_tcb, UINT8 i_rcb, UINT16 handle,
p_sreg = &gatt_cb.sr_reg[i_rcb];
conn_id = GATT_CREATE_CONN_ID(p_tcb->tcb_idx, p_sreg->gatt_if);
gatt_sr_send_req_callback(conn_id,
- trans_id,
- GATTS_REQ_TYPE_WRITE,
+ trans_id,
+ GATTS_REQ_TYPE_WRITE,
&sr_data);
-
+
status = GATT_PENDING;
}
else
@@ -1125,13 +1125,13 @@ void gatts_process_write_req (tGATT_TCB *p_tcb, UINT8 i_rcb, UINT16 handle,
**
** Function gatts_process_read_req
**
-** Description This function is called to process the read request
+** Description This function is called to process the read request
** from client.
**
** Returns void
**
*******************************************************************************/
-static void gatts_process_read_req(tGATT_TCB *p_tcb, tGATT_SR_REG *p_rcb, UINT8 op_code,
+static void gatts_process_read_req(tGATT_TCB *p_tcb, tGATT_SR_REG *p_rcb, UINT8 op_code,
UINT16 handle, UINT16 len, UINT8 *p_data)
{
UINT16 buf_len = (UINT16)(sizeof(BT_HDR) + p_tcb->payload_size + L2CAP_MIN_OFFSET);
@@ -1157,22 +1157,22 @@ static void gatts_process_read_req(tGATT_TCB *p_tcb, tGATT_SR_REG *p_rcb, UINT8
p_msg->len = 1;
buf_len = p_tcb->payload_size - 1;
- gatt_sr_get_sec_info(p_tcb->peer_bda,
- (BOOLEAN)(p_tcb->att_lcid == L2CAP_ATT_CID),
- &sec_flag,
+ gatt_sr_get_sec_info(p_tcb->peer_bda,
+ (BOOLEAN)(p_tcb->att_lcid == L2CAP_ATT_CID),
+ &sec_flag,
&key_size);
reason = gatts_read_attr_value_by_handle(p_tcb,
p_rcb->p_db,
op_code,
- handle,
- offset,
- p,
+ handle,
+ offset,
+ p,
&value_len,
- buf_len,
+ buf_len,
sec_flag,
key_size,
- 0);
+ 0);
p_msg->len += value_len;
}
@@ -1194,13 +1194,13 @@ static void gatts_process_read_req(tGATT_TCB *p_tcb, tGATT_SR_REG *p_rcb, UINT8
**
** Function gatts_process_attribute_req
**
-** Description This function is called to process the per attribute handle request
+** Description This function is called to process the per attribute handle request
** from client.
**
** Returns void
**
*******************************************************************************/
-void gatts_process_attribute_req (tGATT_TCB *p_tcb, UINT8 op_code,
+void gatts_process_attribute_req (tGATT_TCB *p_tcb, UINT8 op_code,
UINT16 len, UINT8 *p_data)
{
UINT16 handle;
@@ -1237,13 +1237,13 @@ void gatts_process_attribute_req (tGATT_TCB *p_tcb, UINT8 op_code,
{
switch (op_code)
{
- case GATT_REQ_READ: /* read char/char descriptor value */
+ case GATT_REQ_READ: /* read char/char descriptor value */
case GATT_REQ_READ_BLOB:
gatts_process_read_req(p_tcb, p_rcb, op_code, handle, len, p);
break;
case GATT_REQ_WRITE: /* write char/char descriptor value */
- case GATT_CMD_WRITE:
+ case GATT_CMD_WRITE:
case GATT_SIGN_CMD_WRITE:
case GATT_REQ_PREPARE_WRITE:
gatts_process_write_req(p_tcb, i, handle, op_code, len, p);
@@ -1269,13 +1269,13 @@ void gatts_process_attribute_req (tGATT_TCB *p_tcb, UINT8 op_code,
**
** Function gatts_proc_srv_chg_ind_ack
**
-** Description This function process the service changed indicaiton ACK
+** Description This function process the service changed indicaiton ACK
**
** Returns void
**
*******************************************************************************/
static void gatts_proc_srv_chg_ind_ack(tGATT_TCB *p_tcb )
-{
+{
tGATTS_SRV_CHG_REQ req;
tGATTS_SRV_CHG *p_buf = NULL;
@@ -1320,7 +1320,7 @@ static void gatts_chk_pending_ind(tGATT_TCB *p_tcb )
**
** Function gatts_proc_ind_ack
**
-** Description This function process the Indication ack
+** Description This function process the Indication ack
**
** Returns TRUE continue to process the indication ack by the aaplication
** if the ACk is not a Service Changed Indication Ack
@@ -1375,7 +1375,7 @@ void gatts_process_value_conf(tGATT_TCB *p_tcb, UINT8 op_code)
{
trans_id = gatt_sr_enqueue_cmd(p_tcb, op_code, handle);
conn_id = GATT_CREATE_CONN_ID(p_tcb->tcb_idx, p_rcb->gatt_if);
- gatt_sr_send_req_callback(conn_id,
+ gatt_sr_send_req_callback(conn_id,
trans_id, GATTS_REQ_TYPE_CONF, (tGATTS_DATA *)&handle);
}
}
@@ -1391,14 +1391,14 @@ void gatts_process_value_conf(tGATT_TCB *p_tcb, UINT8 op_code)
**
** Function gatt_server_handle_client_req
**
-** Description This function is called to handle the client requests to
+** Description This function is called to handle the client requests to
** server.
**
**
** Returns void
**
*******************************************************************************/
-void gatt_server_handle_client_req (tGATT_TCB *p_tcb, UINT8 op_code,
+void gatt_server_handle_client_req (tGATT_TCB *p_tcb, UINT8 op_code,
UINT16 len, UINT8 *p_data)
{
/* there is pending command, discard this one */
@@ -1411,11 +1411,11 @@ void gatt_server_handle_client_req (tGATT_TCB *p_tcb, UINT8 op_code,
{
GATT_TRACE_ERROR2("server receive invalid PDU size:%d pdu size:%d", len + 1, p_tcb->payload_size );
/* for invalid request expecting response, send it now */
- if (op_code != GATT_CMD_WRITE &&
- op_code != GATT_SIGN_CMD_WRITE &&
+ if (op_code != GATT_CMD_WRITE &&
+ op_code != GATT_SIGN_CMD_WRITE &&
op_code != GATT_HANDLE_VALUE_CONF)
{
- gatt_send_error_rsp (p_tcb, GATT_INVALID_PDU, op_code, 0, FALSE);
+ gatt_send_error_rsp (p_tcb, GATT_INVALID_PDU, op_code, 0, FALSE);
}
/* otherwise, ignore the pkt */
}
@@ -1438,10 +1438,10 @@ void gatt_server_handle_client_req (tGATT_TCB *p_tcb, UINT8 op_code,
break;
- case GATT_REQ_READ: /* read char/char descriptor value */
+ case GATT_REQ_READ: /* read char/char descriptor value */
case GATT_REQ_READ_BLOB:
case GATT_REQ_WRITE: /* write char/char descriptor value */
- case GATT_CMD_WRITE:
+ case GATT_CMD_WRITE:
case GATT_SIGN_CMD_WRITE:
case GATT_REQ_PREPARE_WRITE:
gatts_process_attribute_req (p_tcb, op_code, len, p_data);
@@ -1464,7 +1464,7 @@ void gatt_server_handle_client_req (tGATT_TCB *p_tcb, UINT8 op_code,
break;
default:
- break;
+ break;
}
}
}
diff --git a/stack/gatt/gatt_utils.c b/stack/gatt/gatt_utils.c
index abb60c9..ca72f9d 100644
--- a/stack/gatt/gatt_utils.c
+++ b/stack/gatt/gatt_utils.c
@@ -28,39 +28,39 @@
const char * const op_code_name[] =
{
- "UNKNOWN",
- "ATT_RSP_ERROR",
- "ATT_REQ_MTU",
- "ATT_RSP_MTU",
- "ATT_REQ_READ_INFO",
- "ATT_RSP_READ_INFO",
- "ATT_REQ_FIND_TYPE_VALUE",
- "ATT_RSP_FIND_TYPE_VALUE",
- "ATT_REQ_READ_BY_TYPE",
- "ATT_RSP_READ_BY_TYPE",
- "ATT_REQ_READ",
- "ATT_RSP_READ",
- "ATT_REQ_READ_BLOB",
- "ATT_RSP_READ_BLOB",
- "GATT_REQ_READ_MULTI",
- "GATT_RSP_READ_MULTI",
+ "UNKNOWN",
+ "ATT_RSP_ERROR",
+ "ATT_REQ_MTU",
+ "ATT_RSP_MTU",
+ "ATT_REQ_READ_INFO",
+ "ATT_RSP_READ_INFO",
+ "ATT_REQ_FIND_TYPE_VALUE",
+ "ATT_RSP_FIND_TYPE_VALUE",
+ "ATT_REQ_READ_BY_TYPE",
+ "ATT_RSP_READ_BY_TYPE",
+ "ATT_REQ_READ",
+ "ATT_RSP_READ",
+ "ATT_REQ_READ_BLOB",
+ "ATT_RSP_READ_BLOB",
+ "GATT_REQ_READ_MULTI",
+ "GATT_RSP_READ_MULTI",
"GATT_REQ_READ_BY_GRP_TYPE",
"GATT_RSP_READ_BY_GRP_TYPE",
- "ATT_REQ_WRITE",
- "ATT_RSP_WRITE",
- "ATT_CMD_WRITE",
- "ATT_SIGN_CMD_WRITE",
- "ATT_REQ_PREPARE_WRITE",
- "ATT_RSP_PREPARE_WRITE",
- "ATT_REQ_EXEC_WRITE",
- "ATT_RSP_EXEC_WRITE",
- "Reserved",
- "ATT_HANDLE_VALUE_NOTIF",
- "Reserved",
- "ATT_HANDLE_VALUE_IND",
- "ATT_HANDLE_VALUE_CONF",
- "ATT_OP_CODE_MAX"
-};
+ "ATT_REQ_WRITE",
+ "ATT_RSP_WRITE",
+ "ATT_CMD_WRITE",
+ "ATT_SIGN_CMD_WRITE",
+ "ATT_REQ_PREPARE_WRITE",
+ "ATT_RSP_PREPARE_WRITE",
+ "ATT_REQ_EXEC_WRITE",
+ "ATT_RSP_EXEC_WRITE",
+ "Reserved",
+ "ATT_HANDLE_VALUE_NOTIF",
+ "Reserved",
+ "ATT_HANDLE_VALUE_IND",
+ "ATT_HANDLE_VALUE_CONF",
+ "ATT_OP_CODE_MAX"
+};
static const UINT8 base_uuid[LEN_UUID_128] = {0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80,
0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
@@ -70,9 +70,9 @@ static const UINT8 base_uuid[LEN_UUID_128] = {0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x0
**
** Function gatt_free_pending_ind
**
-** Description Free all pending indications
+** Description Free all pending indications
**
-** Returns None
+** Returns None
**
*******************************************************************************/
void gatt_free_pending_ind(tGATT_TCB *p_tcb)
@@ -87,9 +87,9 @@ void gatt_free_pending_ind(tGATT_TCB *p_tcb)
**
** Function gatt_delete_dev_from_srv_chg_clt_list
**
-** Description Delete a device from the service changed client lit
+** Description Delete a device from the service changed client lit
**
-** Returns None
+** Returns None
**
*******************************************************************************/
void gatt_delete_dev_from_srv_chg_clt_list(BD_ADDR bd_addr)
@@ -97,7 +97,7 @@ void gatt_delete_dev_from_srv_chg_clt_list(BD_ADDR bd_addr)
tGATTS_SRV_CHG *p_buf;
tGATTS_SRV_CHG_REQ req;
- GATT_TRACE_DEBUG0 ("gatt_delete_dev_from_srv_chg_clt_list");
+ GATT_TRACE_DEBUG0 ("gatt_delete_dev_from_srv_chg_clt_list");
if ((p_buf = gatt_is_bda_in_the_srv_chg_clt_list(bd_addr)) != NULL)
{
if (gatt_cb.cb_info.p_srv_chg_callback)
@@ -115,9 +115,9 @@ void gatt_delete_dev_from_srv_chg_clt_list(BD_ADDR bd_addr)
**
** Function gatt_set_srv_chg
**
-** Description Set the service changed flag to TRUE
+** Description Set the service changed flag to TRUE
**
-** Returns None
+** Returns None
**
*******************************************************************************/
void gatt_set_srv_chg(void)
@@ -125,13 +125,13 @@ void gatt_set_srv_chg(void)
tGATTS_SRV_CHG *p_buf = (tGATTS_SRV_CHG *)GKI_getfirst(&gatt_cb.srv_chg_clt_q);
tGATTS_SRV_CHG_REQ req;
- GATT_TRACE_DEBUG0 ("gatt_set_srv_chg");
+ GATT_TRACE_DEBUG0 ("gatt_set_srv_chg");
while (p_buf)
{
- GATT_TRACE_DEBUG0 ("found a srv_chg clt");
+ GATT_TRACE_DEBUG0 ("found a srv_chg clt");
if (!p_buf->srv_changed)
{
- GATT_TRACE_DEBUG0 ("set srv_changed to TRUE");
+ GATT_TRACE_DEBUG0 ("set srv_changed to TRUE");
p_buf->srv_changed= TRUE;
memcpy(&req.srv_chg, p_buf, sizeof(tGATTS_SRV_CHG));
if (gatt_cb.cb_info.p_srv_chg_callback)
@@ -145,9 +145,9 @@ void gatt_set_srv_chg(void)
**
** Function gatt_sr_is_new_srv_chg
**
-** Description Find the app id in on the new service changed list
+** Description Find the app id in on the new service changed list
**
-** Returns Pointer to the found new service changed item othwerwise NULL
+** Returns Pointer to the found new service changed item othwerwise NULL
**
*******************************************************************************/
tGATTS_PENDING_NEW_SRV_START *gatt_sr_is_new_srv_chg(tBT_UUID *p_app_uuid128, tBT_UUID *p_svc_uuid, UINT16 svc_inst)
@@ -166,28 +166,28 @@ tGATTS_PENDING_NEW_SRV_START *gatt_sr_is_new_srv_chg(tBT_UUID *p_app_uuid128, tB
break;
}
p_buf = (tGATTS_PENDING_NEW_SRV_START *)GKI_getnext(p_buf);
- }
+ }
- return p_buf;
+ return p_buf;
}
/*******************************************************************************
**
-** Function gatt_add_pending_ind
+** Function gatt_add_pending_ind
**
** Description Add a pending indication
-**
-** Returns Pointer to the current pending indication buffer, NULL no buffer available
+**
+** Returns Pointer to the current pending indication buffer, NULL no buffer available
**
*******************************************************************************/
tGATT_VALUE *gatt_add_pending_ind(tGATT_TCB *p_tcb, tGATT_VALUE *p_ind)
{
tGATT_VALUE *p_buf;
- GATT_TRACE_DEBUG0 ("gatt_add_pending_ind");
+ GATT_TRACE_DEBUG0 ("gatt_add_pending_ind");
if ((p_buf = (tGATT_VALUE *)GKI_getbuf((UINT16)sizeof(tGATT_VALUE))) != NULL)
{
- GATT_TRACE_DEBUG0 ("enqueue a pending indication");
+ GATT_TRACE_DEBUG0 ("enqueue a pending indication");
memcpy(p_buf, p_ind, sizeof(tGATT_VALUE));
GKI_enqueue (&p_tcb->pending_ind_q, p_buf);
}
@@ -197,22 +197,22 @@ tGATT_VALUE *gatt_add_pending_ind(tGATT_TCB *p_tcb, tGATT_VALUE *p_ind)
/*******************************************************************************
**
-** Function gatt_add_pending_new_srv_start
+** Function gatt_add_pending_new_srv_start
**
** Description Add a pending new srv start to the new service start queue
-**
-** Returns Pointer to the new service start buffer, NULL no buffer available
+**
+** Returns Pointer to the new service start buffer, NULL no buffer available
**
*******************************************************************************/
tGATTS_PENDING_NEW_SRV_START *gatt_add_pending_new_srv_start(tGATTS_HNDL_RANGE *p_new_srv_start)
{
tGATTS_PENDING_NEW_SRV_START *p_buf;
- GATT_TRACE_DEBUG0 ("gatt_add_pending_new_srv_start");
+ GATT_TRACE_DEBUG0 ("gatt_add_pending_new_srv_start");
if ((p_buf = (tGATTS_PENDING_NEW_SRV_START *)GKI_getbuf((UINT16)sizeof(tGATTS_PENDING_NEW_SRV_START))) != NULL)
{
- GATT_TRACE_DEBUG0 ("enqueue a new pending new srv start");
- p_buf->p_new_srv_start = p_new_srv_start;
+ GATT_TRACE_DEBUG0 ("enqueue a new pending new srv start");
+ p_buf->p_new_srv_start = p_new_srv_start;
GKI_enqueue (&gatt_cb.pending_new_srv_start_q, p_buf);
}
return p_buf;
@@ -221,20 +221,20 @@ tGATTS_PENDING_NEW_SRV_START *gatt_add_pending_new_srv_start(tGATTS_HNDL_RANGE *
/*******************************************************************************
**
-** Function gatt_add_srv_chg_clt
+** Function gatt_add_srv_chg_clt
**
** Description Add a service chnage client to the service change client queue
-**
-** Returns Pointer to the service change client buffer; Null no buffer available
+**
+** Returns Pointer to the service change client buffer; Null no buffer available
**
*******************************************************************************/
tGATTS_SRV_CHG *gatt_add_srv_chg_clt(tGATTS_SRV_CHG *p_srv_chg)
{
tGATTS_SRV_CHG *p_buf;
- GATT_TRACE_DEBUG0 ("gatt_add_srv_chg_clt");
+ GATT_TRACE_DEBUG0 ("gatt_add_srv_chg_clt");
if ((p_buf = (tGATTS_SRV_CHG *)GKI_getbuf((UINT16)sizeof(tGATTS_SRV_CHG))) != NULL)
{
- GATT_TRACE_DEBUG0 ("enqueue a srv chg client");
+ GATT_TRACE_DEBUG0 ("enqueue a srv chg client");
memcpy(p_buf, p_srv_chg, sizeof(tGATTS_SRV_CHG));
GKI_enqueue (&gatt_cb.srv_chg_clt_q, p_buf);
}
@@ -245,11 +245,11 @@ tGATTS_SRV_CHG *gatt_add_srv_chg_clt(tGATTS_SRV_CHG *p_srv_chg)
/*******************************************************************************
**
-** Function gatt_alloc_hdl_buffer
+** Function gatt_alloc_hdl_buffer
**
** Description Allocate a handle buufer
-**
-** Returns Pointer to the allocated buffer, NULL no buffer available
+**
+** Returns Pointer to the allocated buffer, NULL no buffer available
**
*******************************************************************************/
tGATT_HDL_LIST_ELEM *gatt_alloc_hdl_buffer(void)
@@ -273,11 +273,11 @@ tGATT_HDL_LIST_ELEM *gatt_alloc_hdl_buffer(void)
/*******************************************************************************
**
-** Function gatt_find_hdl_buffer_by_handle
+** Function gatt_find_hdl_buffer_by_handle
**
** Description Find handle range buffer by service handle.
-**
-** Returns Pointer to the buffer, NULL no buffer available
+**
+** Returns Pointer to the buffer, NULL no buffer available
**
*******************************************************************************/
tGATT_HDL_LIST_ELEM *gatt_find_hdl_buffer_by_handle(UINT16 handle)
@@ -299,14 +299,14 @@ tGATT_HDL_LIST_ELEM *gatt_find_hdl_buffer_by_handle(UINT16 handle)
}
/*******************************************************************************
**
-** Function gatt_find_hdl_buffer_by_app_id
+** Function gatt_find_hdl_buffer_by_app_id
**
** Description Find handle range buffer by app ID, service and service instance ID.
-**
-** Returns Pointer to the buffer, NULL no buffer available
+**
+** Returns Pointer to the buffer, NULL no buffer available
**
*******************************************************************************/
-tGATT_HDL_LIST_ELEM *gatt_find_hdl_buffer_by_app_id (tBT_UUID *p_app_uuid128,
+tGATT_HDL_LIST_ELEM *gatt_find_hdl_buffer_by_app_id (tBT_UUID *p_app_uuid128,
tBT_UUID *p_svc_uuid,
UINT16 svc_inst)
{
@@ -321,7 +321,7 @@ tGATT_HDL_LIST_ELEM *gatt_find_hdl_buffer_by_app_id (tBT_UUID *p_app_uuid128,
&& gatt_uuid_compare (*p_svc_uuid, p_list->asgn_range.svc_uuid)
&& (svc_inst == p_list->asgn_range.svc_inst) )
{
- GATT_TRACE_DEBUG0 ("Already allocated handles for this service before!!");
+ GATT_TRACE_DEBUG0 ("Already allocated handles for this service before!!");
return(p_list);
}
p_list = p_list->p_next;
@@ -330,11 +330,11 @@ tGATT_HDL_LIST_ELEM *gatt_find_hdl_buffer_by_app_id (tBT_UUID *p_app_uuid128,
}
/*******************************************************************************
**
-** Function gatt_free_hdl_buffer
+** Function gatt_free_hdl_buffer
**
** Description free a handle buffer
-**
-** Returns None
+**
+** Returns None
**
*******************************************************************************/
void gatt_free_hdl_buffer(tGATT_HDL_LIST_ELEM *p)
@@ -349,12 +349,12 @@ void gatt_free_hdl_buffer(tGATT_HDL_LIST_ELEM *p)
}
/*******************************************************************************
**
-** Function gatt_free_srvc_db_buffer_app_id
+** Function gatt_free_srvc_db_buffer_app_id
**
** Description free the service attribute database buffers by the owner of the
** service app ID.
-**
-** Returns None
+**
+** Returns None
**
*******************************************************************************/
void gatt_free_srvc_db_buffer_app_id(tBT_UUID *p_app_id)
@@ -376,11 +376,11 @@ void gatt_free_srvc_db_buffer_app_id(tBT_UUID *p_app_id)
}
/*******************************************************************************
**
-** Function gatt_is_last_attribute
+** Function gatt_is_last_attribute
**
** Description Check this is the last attribute of the specified value or not
-**
-** Returns TRUE - yes this is the last attribute
+**
+** Returns TRUE - yes this is the last attribute
**
*******************************************************************************/
BOOLEAN gatt_is_last_attribute(tGATT_SRV_LIST_INFO *p_list, tGATT_SRV_LIST_ELEM *p_start, tBT_UUID value)
@@ -413,11 +413,11 @@ BOOLEAN gatt_is_last_attribute(tGATT_SRV_LIST_INFO *p_list, tGATT_SRV_LIST_ELEM
/*******************************************************************************
**
-** Function gatt_update_last_pri_srv_info
+** Function gatt_update_last_pri_srv_info
**
** Description Update the the last primary info for the service list info
-**
-** Returns None
+**
+** Returns None
**
*******************************************************************************/
void gatt_update_last_pri_srv_info(tGATT_SRV_LIST_INFO *p_list)
@@ -438,11 +438,11 @@ void gatt_update_last_pri_srv_info(tGATT_SRV_LIST_INFO *p_list)
}
/*******************************************************************************
**
-** Function gatts_update_srv_list_elem
+** Function gatts_update_srv_list_elem
**
** Description update an element in the service list.
**
-** Returns None.
+** Returns None.
**
*******************************************************************************/
void gatts_update_srv_list_elem(UINT8 i_sreg, UINT16 handle, BOOLEAN is_primary)
@@ -456,12 +456,12 @@ void gatts_update_srv_list_elem(UINT8 i_sreg, UINT16 handle, BOOLEAN is_primary)
}
/*******************************************************************************
**
-** Function gatt_add_a_srv_to_list
+** Function gatt_add_a_srv_to_list
**
-** Description add an service to the list in ascending
+** Description add an service to the list in ascending
** order of the start handle
**
-** Returns BOOLEAN TRUE-if add is successful
+** Returns BOOLEAN TRUE-if add is successful
**
*******************************************************************************/
BOOLEAN gatt_add_a_srv_to_list(tGATT_SRV_LIST_INFO *p_list, tGATT_SRV_LIST_ELEM *p_new)
@@ -478,7 +478,7 @@ BOOLEAN gatt_add_a_srv_to_list(tGATT_SRV_LIST_INFO *p_list, tGATT_SRV_LIST_ELEM
{
/* this is an empty list */
p_list->p_first =
- p_list->p_last = p_new;
+ p_list->p_last = p_new;
p_new->p_next =
p_new->p_prev = NULL;
}
@@ -507,7 +507,7 @@ BOOLEAN gatt_add_a_srv_to_list(tGATT_SRV_LIST_INFO *p_list, tGATT_SRV_LIST_ELEM
p_new->p_prev = p_old->p_prev;
p_new->p_next = p_old;
- p_old->p_prev = p_new;
+ p_old->p_prev = p_new;
break;
}
}
@@ -523,11 +523,11 @@ BOOLEAN gatt_add_a_srv_to_list(tGATT_SRV_LIST_INFO *p_list, tGATT_SRV_LIST_ELEM
/*******************************************************************************
**
-** Function gatt_remove_a_srv_from_list
+** Function gatt_remove_a_srv_from_list
**
-** Description Remove a service from the list
+** Description Remove a service from the list
**
-** Returns BOOLEAN TRUE-if remove is successful
+** Returns BOOLEAN TRUE-if remove is successful
**
*******************************************************************************/
BOOLEAN gatt_remove_a_srv_from_list(tGATT_SRV_LIST_INFO *p_list, tGATT_SRV_LIST_ELEM *p_remove)
@@ -547,7 +547,7 @@ BOOLEAN gatt_remove_a_srv_from_list(tGATT_SRV_LIST_INFO *p_list, tGATT_SRV_LIST_
else if (p_remove->p_next == NULL)
{
p_list->p_last = p_remove->p_prev;
- p_remove->p_prev->p_next = NULL;
+ p_remove->p_prev->p_next = NULL;
}
else
{
@@ -562,12 +562,12 @@ BOOLEAN gatt_remove_a_srv_from_list(tGATT_SRV_LIST_INFO *p_list, tGATT_SRV_LIST_
/*******************************************************************************
**
-** Function gatt_add_an_item_to_list
+** Function gatt_add_an_item_to_list
**
-** Description add an service handle range to the list in decending
+** Description add an service handle range to the list in decending
** order of the start handle
**
-** Returns BOOLEAN TRUE-if add is successful
+** Returns BOOLEAN TRUE-if add is successful
**
*******************************************************************************/
BOOLEAN gatt_add_an_item_to_list(tGATT_HDL_LIST_INFO *p_list, tGATT_HDL_LIST_ELEM *p_new)
@@ -583,7 +583,7 @@ BOOLEAN gatt_add_an_item_to_list(tGATT_HDL_LIST_INFO *p_list, tGATT_HDL_LIST_ELE
{
/* this is an empty list */
p_list->p_first =
- p_list->p_last = p_new;
+ p_list->p_last = p_new;
p_new->p_next =
p_new->p_prev = NULL;
}
@@ -613,7 +613,7 @@ BOOLEAN gatt_add_an_item_to_list(tGATT_HDL_LIST_INFO *p_list, tGATT_HDL_LIST_ELE
p_new->p_next = p_old;
- p_old->p_prev = p_new;
+ p_old->p_prev = p_new;
break;
}
}
@@ -627,11 +627,11 @@ BOOLEAN gatt_add_an_item_to_list(tGATT_HDL_LIST_INFO *p_list, tGATT_HDL_LIST_ELE
/*******************************************************************************
**
-** Function gatt_remove_an_item_from_list
+** Function gatt_remove_an_item_from_list
**
-** Description Remove an service handle range from the list
+** Description Remove an service handle range from the list
**
-** Returns BOOLEAN TRUE-if remove is successful
+** Returns BOOLEAN TRUE-if remove is successful
**
*******************************************************************************/
BOOLEAN gatt_remove_an_item_from_list(tGATT_HDL_LIST_INFO *p_list, tGATT_HDL_LIST_ELEM *p_remove)
@@ -651,7 +651,7 @@ BOOLEAN gatt_remove_an_item_from_list(tGATT_HDL_LIST_INFO *p_list, tGATT_HDL_LIS
else if (p_remove->p_next == NULL)
{
p_list->p_last = p_remove->p_prev;
- p_remove->p_prev->p_next = NULL;
+ p_remove->p_prev->p_next = NULL;
}
else
{
@@ -667,7 +667,7 @@ BOOLEAN gatt_remove_an_item_from_list(tGATT_HDL_LIST_INFO *p_list, tGATT_HDL_LIS
**
** Function gatt_find_the_connected_bda
**
-** Description This function find the connected bda
+** Description This function find the connected bda
**
** Returns TRUE if found
**
@@ -691,7 +691,7 @@ BOOLEAN gatt_find_the_connected_bda(UINT8 start_idx, BD_ADDR bda, UINT8 *p_found
}
}
GATT_TRACE_DEBUG2("gatt_find_the_connected_bda found=%d found_idx=%d", found, i);
- return found;
+ return found;
}
@@ -731,7 +731,7 @@ BOOLEAN gatt_is_srv_chg_ind_pending (tGATT_TCB *p_tcb)
}
GATT_TRACE_DEBUG1("srv_chg_ind_pending = %d", srv_chg_ind_pending);
- return srv_chg_ind_pending;
+ return srv_chg_ind_pending;
}
@@ -759,9 +759,9 @@ tGATTS_SRV_CHG *gatt_is_bda_in_the_srv_chg_clt_list (BD_ADDR bda)
break;
}
p_buf = (tGATTS_SRV_CHG *)GKI_getnext(p_buf);
- }
+ }
- return p_buf;
+ return p_buf;
}
@@ -769,7 +769,7 @@ tGATTS_SRV_CHG *gatt_is_bda_in_the_srv_chg_clt_list (BD_ADDR bda)
**
** Function gatt_is_bda_connected
**
-** Description
+** Description
**
** Returns GATT_INDEX_INVALID if not found. Otherwise index to the tcb.
**
@@ -788,7 +788,7 @@ BOOLEAN gatt_is_bda_connected(BD_ADDR bda)
break;
}
}
- return connected;
+ return connected;
}
/*******************************************************************************
@@ -812,7 +812,7 @@ UINT8 gatt_find_i_tcb_by_addr(BD_ADDR bda)
break;
}
}
- return j;
+ return j;
}
@@ -832,7 +832,7 @@ tGATT_TCB * gatt_get_tcb_by_idx(UINT8 tcb_idx)
if ( (tcb_idx < GATT_MAX_PHY_CHANNEL) && gatt_cb.tcb[tcb_idx].in_use)
p_tcb = &gatt_cb.tcb[tcb_idx];
- return p_tcb;
+ return p_tcb;
}
/*******************************************************************************
@@ -852,7 +852,7 @@ tGATT_TCB * gatt_find_tcb_by_addr(BD_ADDR bda)
if ((i = gatt_find_i_tcb_by_addr(bda)) != GATT_INDEX_INVALID)
p_tcb = &gatt_cb.tcb[i];
- return p_tcb;
+ return p_tcb;
}
/*******************************************************************************
**
@@ -875,7 +875,7 @@ UINT8 gatt_find_i_tcb_free(void)
break;
}
}
- return j;
+ return j;
}
/*******************************************************************************
**
@@ -888,7 +888,7 @@ UINT8 gatt_find_i_tcb_free(void)
*******************************************************************************/
tGATT_TCB * gatt_allocate_tcb_by_bdaddr(BD_ADDR bda)
{
- UINT8 i = 0;
+ UINT8 i = 0;
BOOLEAN allocated = FALSE;
tGATT_TCB *p_tcb = NULL;
@@ -1087,8 +1087,8 @@ BOOLEAN gatt_parse_uuid_from_cmd(tBT_UUID *p_uuid_rec, UINT16 uuid_size, UINT8 *
void gatt_start_rsp_timer(tGATT_TCB *p_tcb)
{
p_tcb->rsp_timer_ent.param = (TIMER_PARAM_TYPE)p_tcb;
- btu_start_timer (&p_tcb->rsp_timer_ent, BTU_TTYPE_ATT_WAIT_FOR_RSP,
- GATT_WAIT_FOR_RSP_TOUT);
+ btu_start_timer (&p_tcb->rsp_timer_ent, BTU_TTYPE_ATT_WAIT_FOR_RSP,
+ GATT_WAIT_FOR_RSP_TOUT);
}
/*******************************************************************************
**
@@ -1102,8 +1102,8 @@ void gatt_start_rsp_timer(tGATT_TCB *p_tcb)
void gatt_start_conf_timer(tGATT_TCB *p_tcb)
{
p_tcb->conf_timer_ent.param = (TIMER_PARAM_TYPE)p_tcb;
- btu_start_timer (&p_tcb->conf_timer_ent, BTU_TTYPE_ATT_WAIT_FOR_RSP,
- GATT_WAIT_FOR_RSP_TOUT);
+ btu_start_timer (&p_tcb->conf_timer_ent, BTU_TTYPE_ATT_WAIT_FOR_RSP,
+ GATT_WAIT_FOR_RSP_TOUT);
}
/*******************************************************************************
**
@@ -1118,7 +1118,7 @@ void gatt_start_ind_ack_timer(tGATT_TCB *p_tcb)
{
p_tcb->ind_ack_timer_ent.param = (TIMER_PARAM_TYPE)p_tcb;
/* start notification cache timer */
- btu_start_timer (&p_tcb->ind_ack_timer_ent, BTU_TTYPE_ATT_WAIT_FOR_IND_ACK,
+ btu_start_timer (&p_tcb->ind_ack_timer_ent, BTU_TTYPE_ATT_WAIT_FOR_IND_ACK,
GATT_WAIT_FOR_RSP_TOUT);
}
@@ -1204,12 +1204,12 @@ UINT8 gatt_sr_find_i_rcb_by_app_id(tBT_UUID *p_app_uuid128, tBT_UUID *p_svc_uuid
p_this_uuid = gatts_get_service_uuid (p_sreg->p_db);
if (p_this_uuid &&
- gatt_uuid_compare (*p_app_uuid128, p_sreg->app_uuid ) &&
- gatt_uuid_compare (*p_svc_uuid, *p_this_uuid) &&
+ gatt_uuid_compare (*p_app_uuid128, p_sreg->app_uuid ) &&
+ gatt_uuid_compare (*p_svc_uuid, *p_this_uuid) &&
(svc_inst == p_sreg->service_instance))
{
GATT_TRACE_ERROR0 ("Active Service Found ");
- gatt_dbg_display_uuid(*p_svc_uuid);
+ gatt_dbg_display_uuid(*p_svc_uuid);
break;
}
@@ -1242,7 +1242,7 @@ UINT8 gatt_sr_alloc_rcb(tGATT_HDL_LIST_ELEM *p_list )
memcpy (&p_sreg->app_uuid, &p_list->asgn_range.app_uuid128, sizeof(tBT_UUID));
p_sreg->service_instance = p_list->asgn_range.svc_inst;
- p_sreg->type = p_list->asgn_range.is_primary ? GATT_UUID_PRI_SERVICE: GATT_UUID_SEC_SERVICE;
+ p_sreg->type = p_list->asgn_range.is_primary ? GATT_UUID_PRI_SERVICE: GATT_UUID_SEC_SERVICE;
p_sreg->s_hdl = p_list->asgn_range.s_handle;
p_sreg->e_hdl = p_list->asgn_range.e_handle;
//p_sreg->sr_cb = *p_cback;
@@ -1261,7 +1261,7 @@ UINT8 gatt_sr_alloc_rcb(tGATT_HDL_LIST_ELEM *p_list )
**
** Description Get the security flag and key size information for the peer
** device.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1280,14 +1280,14 @@ void gatt_sr_get_sec_info(BD_ADDR rem_bda, BOOLEAN le_conn, UINT8 *p_sec_flag, U
**
** Function gatt_sr_send_req_callback
**
-** Description
-**
+** Description
+**
**
** Returns void
**
*******************************************************************************/
-void gatt_sr_send_req_callback(UINT16 conn_id,
- UINT32 trans_id,
+void gatt_sr_send_req_callback(UINT16 conn_id,
+ UINT32 trans_id,
tGATTS_REQ_TYPE type, tGATTS_DATA *p_data)
{
tGATT_IF gatt_if = GATT_GET_GATT_IF(conn_id);
@@ -1299,10 +1299,10 @@ void gatt_sr_send_req_callback(UINT16 conn_id,
return;
}
- if ( p_reg->in_use &&
+ if ( p_reg->in_use &&
p_reg->app_cb.p_req_cb)
{
- (*p_reg->app_cb.p_req_cb)(conn_id, trans_id, type, p_data);
+ (*p_reg->app_cb.p_req_cb)(conn_id, trans_id, type, p_data);
}
else
{
@@ -1320,14 +1320,14 @@ void gatt_sr_send_req_callback(UINT16 conn_id,
** Returns void
**
*******************************************************************************/
-tGATT_STATUS gatt_send_error_rsp (tGATT_TCB *p_tcb, UINT8 err_code, UINT8 op_code,
+tGATT_STATUS gatt_send_error_rsp (tGATT_TCB *p_tcb, UINT8 err_code, UINT8 op_code,
UINT16 handle, BOOLEAN deq)
{
tGATT_ERROR error;
tGATT_STATUS status;
BT_HDR *p_buf;
- error.cmd_code = op_code;
+ error.cmd_code = op_code;
error.reason = err_code;
error.handle =handle;
@@ -1390,7 +1390,7 @@ UINT32 gatt_add_sdp_record (tBT_UUID *p_uuid, UINT16 start_hdl, UINT16 end_hdl)
proto_elem_list[0].protocol_uuid = UUID_PROTOCOL_L2CAP;
proto_elem_list[0].num_params = 1;
proto_elem_list[0].params[0] = BT_PSM_ATT;
- proto_elem_list[1].protocol_uuid = UUID_PROTOCOL_ATT;
+ proto_elem_list[1].protocol_uuid = UUID_PROTOCOL_ATT;
proto_elem_list[1].num_params = 2;
proto_elem_list[1].params[0] = start_hdl;
proto_elem_list[1].params[1] = end_hdl;
@@ -1455,7 +1455,7 @@ tGATT_REG *gatt_get_regcb (tGATT_IF gatt_if)
**
** Function gatt_is_clcb_allocated
**
-** Description The function check clcb for conn_id is allocated or not
+** Description The function check clcb for conn_id is allocated or not
**
** Returns True already allocated
**
@@ -1471,7 +1471,7 @@ BOOLEAN gatt_is_clcb_allocated (UINT16 conn_id)
if (gatt_cb.clcb[i].in_use && (gatt_cb.clcb[i].conn_id == conn_id))
{
is_allocated = TRUE;
- break;
+ break;
}
}
@@ -1536,7 +1536,7 @@ void gatt_clcb_dealloc (tGATT_CLCB *p_clcb)
**
** Function gatt_find_tcb_by_cid
**
-** Description The function searches for an empty entry
+** Description The function searches for an empty entry
** in registration info table for GATT client
**
** Returns NULL if not found. Otherwise pointer to the rcb.
@@ -1743,7 +1743,7 @@ void gatt_sr_reset_prep_cnt(tGATT_TCB *p_tcb )
**
** Function gatt_sr_update_cback_cnt
**
-** Description Update the teh applicaiton callback count
+** Description Update the teh applicaiton callback count
**
** Returns None
**
@@ -1778,9 +1778,9 @@ void gatt_sr_update_cback_cnt(tGATT_TCB *p_tcb, tGATT_IF gatt_if, BOOLEAN is_inc
**
** Function gatt_sr_update_prep_cnt
**
-** Description Update the teh prepare write request count
+** Description Update the teh prepare write request count
**
-** Returns None
+** Returns None
**
*******************************************************************************/
void gatt_sr_update_prep_cnt(tGATT_TCB *p_tcb, tGATT_IF gatt_if, BOOLEAN is_inc, BOOLEAN is_reset_first)
@@ -1788,7 +1788,7 @@ void gatt_sr_update_prep_cnt(tGATT_TCB *p_tcb, tGATT_IF gatt_if, BOOLEAN is_inc,
UINT8 idx = ((UINT8) gatt_if) - 1 ;
GATT_TRACE_DEBUG4("gatt_sr_update_prep_cnt tcb idx=%d gatt_if=%d is_inc=%d is_reset_first=%d",
- p_tcb->tcb_idx, gatt_if, is_inc, is_reset_first);
+ p_tcb->tcb_idx, gatt_if, is_inc, is_reset_first);
if (p_tcb)
{
@@ -1936,8 +1936,8 @@ tGATT_CLCB * gatt_cmd_dequeue(tGATT_TCB *p_tcb, UINT8 *p_op_code)
** Returns status code
**
*******************************************************************************/
-UINT8 gatt_send_write_msg (tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 op_code,
- UINT16 handle, UINT16 len,
+UINT8 gatt_send_write_msg (tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 op_code,
+ UINT16 handle, UINT16 len,
UINT16 offset, UINT8 *p_data)
{
tGATT_CL_MSG msg;
@@ -1962,7 +1962,7 @@ UINT8 gatt_send_write_msg (tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 op_code,
** Returns status code
**
*******************************************************************************/
-UINT8 gatt_act_send_browse(tGATT_TCB *p_tcb, UINT16 index, UINT8 op, UINT16 s_handle,
+UINT8 gatt_act_send_browse(tGATT_TCB *p_tcb, UINT16 index, UINT8 op, UINT16 s_handle,
UINT16 e_handle, tBT_UUID uuid)
{
tGATT_CL_MSG msg;
@@ -1994,7 +1994,7 @@ void gatt_end_operation(tGATT_CLCB *p_clcb, tGATT_STATUS status, void *p_data)
UINT16 conn_id;
UINT8 operation;
- GATT_TRACE_DEBUG3 ("gatt_end_operation status=%d op=%d subtype=%d",
+ GATT_TRACE_DEBUG3 ("gatt_end_operation status=%d op=%d subtype=%d",
status, p_clcb->operation, p_clcb->op_subtype);
if (p_cmpl_cb != NULL && p_clcb->operation != 0)
@@ -2050,7 +2050,7 @@ void gatt_end_operation(tGATT_CLCB *p_clcb, tGATT_STATUS status, void *p_data)
else if (p_cmpl_cb && op)
(*p_cmpl_cb)(conn_id, op, status, &cb_data);
else
- GATT_TRACE_WARNING3 ("gatt_end_operation not sent out op=%d p_disc_cmpl_cb:%p p_cmpl_cb:%p",
+ GATT_TRACE_WARNING3 ("gatt_end_operation not sent out op=%d p_disc_cmpl_cb:%p p_cmpl_cb:%p",
operation, p_disc_cmpl_cb, p_cmpl_cb);
}
@@ -2102,7 +2102,7 @@ void gatt_cleanup_upon_disc(BD_ADDR bda, UINT16 reason)
p_reg = &gatt_cb.cl_rcb[i];
if (p_reg->in_use && p_reg->app_cb.p_conn_cb)
{
- conn_id = GATT_CREATE_CONN_ID(p_tcb->tcb_idx, p_reg->gatt_if);
+ conn_id = GATT_CREATE_CONN_ID(p_tcb->tcb_idx, p_reg->gatt_if);
GATT_TRACE_DEBUG3 ("found p_reg tcb_idx=%d gatt_if=%d conn_id=0x%x", p_tcb->tcb_idx, p_reg->gatt_if, conn_id);
(*p_reg->app_cb.p_conn_cb)(p_reg->gatt_if, bda, conn_id, FALSE, reason);
}
@@ -2162,12 +2162,12 @@ void gatt_dbg_display_uuid(tBT_UUID bt_uuid)
}
else if (bt_uuid.len == LEN_UUID_128)
{
- x += sprintf(&str_buf[x], "0x%02x%02x%02x%02x%02x%02x%02x%02x",
+ x += sprintf(&str_buf[x], "0x%02x%02x%02x%02x%02x%02x%02x%02x",
bt_uuid.uu.uuid128[15], bt_uuid.uu.uuid128[14],
bt_uuid.uu.uuid128[13], bt_uuid.uu.uuid128[12],
bt_uuid.uu.uuid128[11], bt_uuid.uu.uuid128[10],
bt_uuid.uu.uuid128[9], bt_uuid.uu.uuid128[8]);
- sprintf(&str_buf[x], "%02x%02x%02x%02x%02x%02x%02x%02x",
+ sprintf(&str_buf[x], "%02x%02x%02x%02x%02x%02x%02x%02x",
bt_uuid.uu.uuid128[7], bt_uuid.uu.uuid128[6],
bt_uuid.uu.uuid128[5], bt_uuid.uu.uuid128[4],
bt_uuid.uu.uuid128[3], bt_uuid.uu.uuid128[2],
@@ -2403,8 +2403,8 @@ BOOLEAN gatt_remove_bg_dev_from_list(tGATT_IF gatt_if, BD_ADDR bd_addr)
p_dev->gatt_if[i] = 0;
for (j = i + 1; j < GATT_MAX_APPS; j ++)
- p_dev->gatt_if[j - 1] = p_dev->gatt_if[j];
-
+ p_dev->gatt_if[j - 1] = p_dev->gatt_if[j];
+
if (p_dev->gatt_if[0] == 0)
{
ret = BTM_BleUpdateBgConnDev(FALSE, p_dev->remote_bda);
@@ -2444,7 +2444,7 @@ void gatt_deregister_bgdev_list(tGATT_IF gatt_if)
else if (p_dev_list->gatt_if[j] == gatt_if)
{
for (k = j + 1; k < GATT_MAX_APPS; k ++)
- p_dev_list->gatt_if[k - 1] = p_dev_list->gatt_if[k];
+ p_dev_list->gatt_if[k - 1] = p_dev_list->gatt_if[k];
if (p_dev_list->gatt_if[0] == 0)
{
@@ -2477,7 +2477,7 @@ void gatt_reset_bgdev_list(void)
**
** Function gatt_update_auto_connect_dev
**
-** Description This function add or remove a device for background connection
+** Description This function add or remove a device for background connection
** procedure.
**
** Parameters gatt_if: Application ID.
diff --git a/stack/hcic/hciblecmds.c b/stack/hcic/hciblecmds.c
index 7be3520..d491ca4 100644
--- a/stack/hcic/hciblecmds.c
+++ b/stack/hcic/hciblecmds.c
@@ -148,7 +148,7 @@ BOOLEAN btsnd_hcic_ble_set_random_addr (BD_ADDR random_bda)
return (TRUE);
}
-BOOLEAN btsnd_hcic_ble_write_adv_params (UINT16 adv_int_min, UINT16 adv_int_max,
+BOOLEAN btsnd_hcic_ble_write_adv_params (UINT16 adv_int_min, UINT16 adv_int_max,
UINT8 adv_type, UINT8 addr_type_own,
UINT8 addr_type_dir, BD_ADDR direct_bda,
UINT8 channel_map, UINT8 adv_filter_policy)
@@ -252,7 +252,7 @@ BOOLEAN btsnd_hcic_ble_set_scan_rsp_data (UINT8 data_len, UINT8 *p_scan_rsp)
if (p_scan_rsp != NULL && data_len > 0)
{
- if (data_len > HCIC_PARAM_SIZE_BLE_WRITE_SCAN_RSP )
+ if (data_len > HCIC_PARAM_SIZE_BLE_WRITE_SCAN_RSP )
data_len = HCIC_PARAM_SIZE_BLE_WRITE_SCAN_RSP;
UINT8_TO_STREAM (pp, data_len);
@@ -286,8 +286,8 @@ BOOLEAN btsnd_hcic_ble_set_adv_enable (UINT8 adv_enable)
btu_hcif_send_cmd (LOCAL_BR_EDR_CONTROLLER_ID, p);
return (TRUE);
}
-BOOLEAN btsnd_hcic_ble_set_scan_params (UINT8 scan_type,
- UINT16 scan_int, UINT16 scan_win,
+BOOLEAN btsnd_hcic_ble_set_scan_params (UINT8 scan_type,
+ UINT16 scan_int, UINT16 scan_win,
UINT8 addr_type_own, UINT8 scan_filter_policy)
{
BT_HDR *p;
@@ -338,11 +338,11 @@ BOOLEAN btsnd_hcic_ble_set_scan_enable (UINT8 scan_enable, UINT8 duplicate)
}
/* link layer connection management commands */
-BOOLEAN btsnd_hcic_ble_create_ll_conn (UINT16 scan_int, UINT16 scan_win,
- UINT8 init_filter_policy,
- UINT8 addr_type_peer, BD_ADDR bda_peer,
+BOOLEAN btsnd_hcic_ble_create_ll_conn (UINT16 scan_int, UINT16 scan_win,
+ UINT8 init_filter_policy,
+ UINT8 addr_type_peer, BD_ADDR bda_peer,
UINT8 addr_type_own,
- UINT16 conn_int_min, UINT16 conn_int_max,
+ UINT16 conn_int_min, UINT16 conn_int_max,
UINT16 conn_latency, UINT16 conn_timeout,
UINT16 min_ce_len, UINT16 max_ce_len)
{
@@ -486,7 +486,7 @@ BOOLEAN btsnd_hcic_ble_remove_from_white_list (UINT8 addr_type, BD_ADDR bda)
return (TRUE);
}
-BOOLEAN btsnd_hcic_ble_upd_ll_conn_params (UINT16 handle,
+BOOLEAN btsnd_hcic_ble_upd_ll_conn_params (UINT16 handle,
UINT16 conn_int_min, UINT16 conn_int_max,
UINT16 conn_latency, UINT16 conn_timeout,
UINT16 min_ce_len, UINT16 max_ce_len)
@@ -585,14 +585,14 @@ BOOLEAN btsnd_hcic_ble_read_remote_feat (UINT16 handle)
}
/* security management commands */
-BOOLEAN btsnd_hcic_ble_encrypt (UINT8 *key, UINT8 key_len,
- UINT8 *plain_text, UINT8 pt_len,
+BOOLEAN btsnd_hcic_ble_encrypt (UINT8 *key, UINT8 key_len,
+ UINT8 *plain_text, UINT8 pt_len,
void *p_cmd_cplt_cback)
{
BT_HDR *p;
UINT8 *pp;
- if ((p = HCI_GET_CMD_BUF(sizeof(BT_HDR) + sizeof (void *) +
+ if ((p = HCI_GET_CMD_BUF(sizeof(BT_HDR) + sizeof (void *) +
HCIC_PARAM_SIZE_BLE_ENCRYPT)) == NULL)
return (FALSE);
@@ -603,7 +603,7 @@ BOOLEAN btsnd_hcic_ble_encrypt (UINT8 *key, UINT8 key_len,
*((void **)pp) = p_cmd_cplt_cback; /* Store command complete callback in buffer */
pp += sizeof(void *); /* Skip over callback pointer */
-
+
UINT16_TO_STREAM (pp, HCI_BLE_ENCRYPT);
UINT8_TO_STREAM (pp, HCIC_PARAM_SIZE_BLE_ENCRYPT);
@@ -612,7 +612,7 @@ BOOLEAN btsnd_hcic_ble_encrypt (UINT8 *key, UINT8 key_len,
if (key_len > HCIC_BLE_ENCRYT_KEY_SIZE) key_len = HCIC_BLE_ENCRYT_KEY_SIZE;
if (pt_len > HCIC_BLE_ENCRYT_KEY_SIZE) pt_len = HCIC_BLE_ENCRYT_KEY_SIZE;
-
+
ARRAY_TO_STREAM (pp, key, key_len);
pp += (HCIC_BLE_ENCRYT_KEY_SIZE - key_len);
ARRAY_TO_STREAM (pp, plain_text, pt_len);
@@ -626,7 +626,7 @@ BOOLEAN btsnd_hcic_ble_rand (void *p_cmd_cplt_cback)
BT_HDR *p;
UINT8 *pp;
- if ((p = HCI_GET_CMD_BUF(sizeof(BT_HDR) + sizeof (void *) +
+ if ((p = HCI_GET_CMD_BUF(sizeof(BT_HDR) + sizeof (void *) +
HCIC_PARAM_SIZE_BLE_RAND)) == NULL)
return (FALSE);
diff --git a/stack/hcic/hcicmds.c b/stack/hcic/hcicmds.c
index 2a5299e..edc98a2 100644
--- a/stack/hcic/hcicmds.c
+++ b/stack/hcic/hcicmds.c
@@ -71,7 +71,7 @@ BOOLEAN btsnd_hcic_inq_cancel(void)
return (TRUE);
}
-BOOLEAN btsnd_hcic_per_inq_mode (UINT16 max_period, UINT16 min_period,
+BOOLEAN btsnd_hcic_per_inq_mode (UINT16 max_period, UINT16 min_period,
const LAP inq_lap, UINT8 duration, UINT8 response_cnt)
{
BT_HDR *p;
@@ -325,7 +325,7 @@ BOOLEAN btsnd_hcic_link_key_neg_reply (BD_ADDR bd_addr)
return (TRUE);
}
-BOOLEAN btsnd_hcic_pin_code_req_reply (BD_ADDR bd_addr, UINT8 pin_code_len,
+BOOLEAN btsnd_hcic_pin_code_req_reply (BD_ADDR bd_addr, UINT8 pin_code_len,
PIN_CODE pin_code)
{
BT_HDR *p;
@@ -348,7 +348,7 @@ BOOLEAN btsnd_hcic_pin_code_req_reply (BD_ADDR bd_addr, UINT8 pin_code_len,
for (i = 0; i < pin_code_len; i++)
*pp++ = *pin_code++;
-
+
for (; i < PIN_CODE_LEN; i++)
*pp++ = 0;
@@ -793,7 +793,7 @@ BOOLEAN btsnd_hcic_sniff_mode (UINT16 handle, UINT16 max_sniff_period,
}
BOOLEAN btsnd_hcic_exit_sniff_mode (UINT16 handle)
-{
+{
BT_HDR *p;
UINT8 *pp;
@@ -840,7 +840,7 @@ BOOLEAN btsnd_hcic_park_mode (UINT16 handle, UINT16 beacon_max_interval,
}
BOOLEAN btsnd_hcic_exit_park_mode (UINT16 handle)
-{
+{
BT_HDR *p;
UINT8 *pp;
@@ -864,7 +864,7 @@ BOOLEAN btsnd_hcic_exit_park_mode (UINT16 handle)
BOOLEAN btsnd_hcic_qos_setup (UINT16 handle, UINT8 flags, UINT8 service_type,
UINT32 token_rate, UINT32 peak, UINT32 latency,
UINT32 delay_var)
-{
+{
BT_HDR *p;
UINT8 *pp;
@@ -1025,7 +1025,7 @@ BOOLEAN btsnd_hcic_flow_specification(UINT16 handle, UINT8 flags, UINT8 flow_dir
UINT8 service_type, UINT32 token_rate,
UINT32 token_bucket_size, UINT32 peak,
UINT32 latency)
-{
+{
BT_HDR *p;
UINT8 *pp;
@@ -1287,7 +1287,7 @@ BOOLEAN btsnd_hcic_read_stored_key (BD_ADDR bd_addr, BOOLEAN read_all_flag)
BOOLEAN btsnd_hcic_write_stored_key (UINT8 num_keys, BD_ADDR *bd_addr,
LINK_KEY *link_key)
-{
+{
BT_HDR *p;
UINT8 *pp;
int j;
@@ -1981,7 +1981,7 @@ BOOLEAN btsnd_hcic_set_host_flow_ctrl (UINT8 value)
return (TRUE);
}
-BOOLEAN btsnd_hcic_set_host_buf_size (UINT16 acl_len, UINT8 sco_len,
+BOOLEAN btsnd_hcic_set_host_buf_size (UINT16 acl_len, UINT8 sco_len,
UINT16 acl_num, UINT16 sco_num)
{
BT_HDR *p;
@@ -2237,9 +2237,9 @@ BOOLEAN btsnd_hcic_write_page_scan_mode (UINT8 mode)
*******************************************/
#if BTM_SSR_INCLUDED == TRUE
-BOOLEAN btsnd_hcic_sniff_sub_rate(UINT16 handle, UINT16 max_lat,
+BOOLEAN btsnd_hcic_sniff_sub_rate(UINT16 handle, UINT16 max_lat,
UINT16 min_remote_lat, UINT16 min_local_lat)
-{
+{
BT_HDR *p;
UINT8 *pp;
diff --git a/stack/hid/hid_conn.h b/stack/hid/hid_conn.h
index 436b8d9..41eeaaf 100644
--- a/stack/hid/hid_conn.h
+++ b/stack/hid/hid_conn.h
@@ -51,6 +51,6 @@ typedef struct hid_conn
#define HID_NOSEC_CHN 2
#define HIDD_SEC_CHN 3
-#define HIDD_NOSEC_CHN 4
+#define HIDD_NOSEC_CHN 4
#endif
diff --git a/stack/hid/hidh_api.c b/stack/hid/hidh_api.c
index e0314f4..268b405 100644
--- a/stack/hid/hidh_api.c
+++ b/stack/hid/hidh_api.c
@@ -134,31 +134,31 @@ static void hidh_search_callback (UINT16 sdp_result)
attr_mask |= HID_VIRTUAL_CABLE;
}
- if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_RECONNECT_INITIATE)) != NULL) &&
+ if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_RECONNECT_INITIATE)) != NULL) &&
(p_attr->attr_value.v.u8) )
{
attr_mask |= HID_RECONN_INIT;
}
- if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_NORMALLY_CONNECTABLE)) != NULL) &&
+ if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_NORMALLY_CONNECTABLE)) != NULL) &&
(p_attr->attr_value.v.u8) )
{
attr_mask |= HID_NORMALLY_CONNECTABLE;
}
- if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_SDP_DISABLE)) != NULL)&&
+ if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_SDP_DISABLE)) != NULL)&&
(p_attr->attr_value.v.u8) )
{
attr_mask |= HID_SDP_DISABLE;
}
- if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_BATTERY_POWER)) != NULL)&&
+ if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_BATTERY_POWER)) != NULL)&&
(p_attr->attr_value.v.u8) )
{
attr_mask |= HID_BATTERY_POWER;
}
- if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_REMOTE_WAKE)) != NULL)&&
+ if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_REMOTE_WAKE)) != NULL)&&
(p_attr->attr_value.v.u8) )
{
attr_mask |= HID_REMOTE_WAKE;
@@ -169,33 +169,33 @@ static void hidh_search_callback (UINT16 sdp_result)
hidh_get_str_attr( p_rec, ATTR_ID_PROVIDER_NAME, HID_MAX_PROV_NAME_LEN, p_nvi->prov_name );
if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_DEVICE_RELNUM)) != NULL))
- {
+ {
p_nvi->rel_num = p_attr->attr_value.v.u16;
}
if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_COUNTRY_CODE)) != NULL))
- {
+ {
p_nvi->ctry_code = p_attr->attr_value.v.u8;
}
if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_DEVICE_SUBCLASS)) != NULL))
- {
+ {
p_nvi->sub_class = p_attr->attr_value.v.u8;
}
if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_PARSER_VERSION)) != NULL))
- {
+ {
p_nvi->hpars_ver = p_attr->attr_value.v.u16;
}
if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_LINK_SUPERVISION_TO)) != NULL))
- {
+ {
attr_mask |= HID_SUP_TOUT_AVLBL;
p_nvi->sup_timeout = p_attr->attr_value.v.u16;
}
if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_SSR_HOST_MAX_LAT)) != NULL))
- {
+ {
attr_mask |= HID_SSR_MAX_LATENCY;
p_nvi->ssr_max_latency = p_attr->attr_value.v.u16;
}
@@ -203,7 +203,7 @@ static void hidh_search_callback (UINT16 sdp_result)
p_nvi->ssr_max_latency = HID_SSR_PARAM_INVALID;
if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_SSR_HOST_MIN_TOUT)) != NULL))
- {
+ {
attr_mask |= HID_SSR_MIN_TOUT;
p_nvi->ssr_min_tout = p_attr->attr_value.v.u16;
}
@@ -304,7 +304,7 @@ tHID_STATUS HID_HostDeregister(void)
{
HID_HostRemoveDev( i ) ;
}
-
+
hidh_conn_dereg();
hh_cb.reg_flag = FALSE;
@@ -421,11 +421,11 @@ tHID_STATUS HID_HostOpenDev ( UINT8 dev_handle )
**
** report_id: is only used on GET_REPORT transaction if is specified.
** only valid when it's a non-zero value.
-**
+**
** Returns void
**
*******************************************************************************/
-tHID_STATUS HID_HostWriteDev( UINT8 dev_handle, UINT8 t_type,
+tHID_STATUS HID_HostWriteDev( UINT8 dev_handle, UINT8 t_type,
UINT8 param, UINT16 data, UINT8 report_id, BT_HDR *pbuf )
{
tHID_STATUS status = HID_SUCCESS;
@@ -455,7 +455,7 @@ tHID_STATUS HID_HostWriteDev( UINT8 dev_handle, UINT8 t_type,
}
else
status = hidh_conn_snd_data( dev_handle, t_type, param, data, report_id, pbuf ) ;
-
+
return status;
}
@@ -488,42 +488,42 @@ tHID_STATUS HID_HostCloseDev( UINT8 dev_handle )
tHID_STATUS HID_HostSetSecurityLevel( char serv_name[], UINT8 sec_lvl )
{
- if (!BTM_SetSecurityLevel (FALSE, serv_name, BTM_SEC_SERVICE_HID_SEC_CTRL,
+ if (!BTM_SetSecurityLevel (FALSE, serv_name, BTM_SEC_SERVICE_HID_SEC_CTRL,
sec_lvl, HID_PSM_CONTROL, BTM_SEC_PROTO_HID, HID_SEC_CHN))
{
HIDH_TRACE_ERROR0 ("Security Registration 1 failed");
return (HID_ERR_NO_RESOURCES);
}
- if (!BTM_SetSecurityLevel (TRUE, serv_name, BTM_SEC_SERVICE_HID_SEC_CTRL,
+ if (!BTM_SetSecurityLevel (TRUE, serv_name, BTM_SEC_SERVICE_HID_SEC_CTRL,
sec_lvl, HID_PSM_CONTROL, BTM_SEC_PROTO_HID, HID_SEC_CHN))
{
HIDH_TRACE_ERROR0 ("Security Registration 2 failed");
return (HID_ERR_NO_RESOURCES);
}
- if (!BTM_SetSecurityLevel (FALSE, serv_name, BTM_SEC_SERVICE_HID_NOSEC_CTRL,
+ if (!BTM_SetSecurityLevel (FALSE, serv_name, BTM_SEC_SERVICE_HID_NOSEC_CTRL,
BTM_SEC_NONE, HID_PSM_CONTROL, BTM_SEC_PROTO_HID, HID_NOSEC_CHN))
{
HIDH_TRACE_ERROR0 ("Security Registration 3 failed");
return (HID_ERR_NO_RESOURCES);
}
- if (!BTM_SetSecurityLevel (TRUE, serv_name, BTM_SEC_SERVICE_HID_NOSEC_CTRL,
+ if (!BTM_SetSecurityLevel (TRUE, serv_name, BTM_SEC_SERVICE_HID_NOSEC_CTRL,
BTM_SEC_NONE, HID_PSM_CONTROL, BTM_SEC_PROTO_HID, HID_NOSEC_CHN))
{
HIDH_TRACE_ERROR0 ("Security Registration 4 failed");
return (HID_ERR_NO_RESOURCES);
}
- if (!BTM_SetSecurityLevel (TRUE, serv_name, BTM_SEC_SERVICE_HID_INTR,
+ if (!BTM_SetSecurityLevel (TRUE, serv_name, BTM_SEC_SERVICE_HID_INTR,
BTM_SEC_NONE, HID_PSM_INTERRUPT, BTM_SEC_PROTO_HID, 0))
{
HIDH_TRACE_ERROR0 ("Security Registration 5 failed");
return (HID_ERR_NO_RESOURCES);
}
- if (!BTM_SetSecurityLevel (FALSE, serv_name, BTM_SEC_SERVICE_HID_INTR,
+ if (!BTM_SetSecurityLevel (FALSE, serv_name, BTM_SEC_SERVICE_HID_INTR,
BTM_SEC_NONE, HID_PSM_INTERRUPT, BTM_SEC_PROTO_HID, 0))
{
HIDH_TRACE_ERROR0 ("Security Registration 6 failed");
diff --git a/stack/hid/hidh_conn.c b/stack/hid/hidh_conn.c
index 2664dcf..29c4025 100644
--- a/stack/hid/hidh_conn.c
+++ b/stack/hid/hidh_conn.c
@@ -46,7 +46,7 @@ static void hidh_l2cif_data_ind (UINT16 l2cap_cid, BT_HDR *p_msg);
static void hidh_l2cif_disconnect_cfm (UINT16 l2cap_cid, UINT16 result);
static void hidh_l2cif_cong_ind (UINT16 l2cap_cid, BOOLEAN congested);
-static const tL2CAP_APPL_INFO hst_reg_info =
+static const tL2CAP_APPL_INFO hst_reg_info =
{
hidh_l2cif_connect_ind,
hidh_l2cif_connect_cfm,
@@ -159,18 +159,18 @@ void hidh_sec_check_complete_term (BD_ADDR bd_addr, void *p_ref_data, UINT8 res)
p_dev->conn.conn_state = HID_CONN_STATE_CONNECTING_INTR;
/* Send response to the L2CAP layer. */
- L2CA_ConnectRsp (p_dev->addr, p_dev->conn.ctrl_id, p_dev->conn.ctrl_cid, L2CAP_CONN_OK, L2CAP_CONN_OK);
+ L2CA_ConnectRsp (p_dev->addr, p_dev->conn.ctrl_id, p_dev->conn.ctrl_cid, L2CAP_CONN_OK, L2CAP_CONN_OK);
/* Send a Configuration Request. */
L2CA_ConfigReq (p_dev->conn.ctrl_cid, &hh_cb.l2cap_cfg);
-
+
}
/* security check fail */
- else if (res != BTM_SUCCESS)
+ else if (res != BTM_SUCCESS)
{
p_dev->conn.disc_reason = HID_ERR_AUTH_FAILED; /* Save reason for disconnecting */
p_dev->conn.conn_state = HID_CONN_STATE_UNUSED;
- L2CA_ConnectRsp (p_dev->addr, p_dev->conn.ctrl_id, p_dev->conn.ctrl_cid, L2CAP_CONN_SECURITY_BLOCK, L2CAP_CONN_OK);
+ L2CA_ConnectRsp (p_dev->addr, p_dev->conn.ctrl_id, p_dev->conn.ctrl_cid, L2CAP_CONN_SECURITY_BLOCK, L2CAP_CONN_OK);
}
}
@@ -180,7 +180,7 @@ void hidh_sec_check_complete_term (BD_ADDR bd_addr, void *p_ref_data, UINT8 res)
**
** Description This function handles an inbound connection indication
** from L2CAP. This is the case where we are acting as a
-** server.
+** server.
**
** Returns void
**
@@ -190,7 +190,7 @@ static void hidh_l2cif_connect_ind (BD_ADDR bd_addr, UINT16 l2cap_cid, UINT16 p
tHID_CONN *p_hcon;
BOOLEAN bAccept = TRUE;
int i;
- tHID_HOST_DEV_CTB *p_dev;
+ tHID_HOST_DEV_CTB *p_dev;
HIDH_TRACE_EVENT2 ("HID - Rcvd L2CAP conn ind, PSM: 0x%04x CID 0x%x", psm, l2cap_cid);
@@ -228,7 +228,7 @@ static void hidh_l2cif_connect_ind (BD_ADDR bd_addr, UINT16 l2cap_cid, UINT16 p
#if defined(HID_HOST_ACPT_NEW_CONN) && (HID_HOST_ACPT_NEW_CONN == TRUE)
p_hcon->ctrl_cid = p_hcon->intr_cid = 0;
p_hcon->conn_state = HID_CONN_STATE_UNUSED;
-#else
+#else
if (p_hcon->conn_state != HID_CONN_STATE_UNUSED)
{
HIDH_TRACE_WARNING1 ("HID - Rcvd CTL L2CAP conn ind, wrong state: %d", p_hcon->conn_state);
@@ -251,12 +251,12 @@ static void hidh_l2cif_connect_ind (BD_ADDR bd_addr, UINT16 l2cap_cid, UINT16 p
p_hcon->disc_reason = HID_L2CAP_CONN_FAIL; /* In case disconnection occurs before security is completed, then set CLOSE_EVT reason code to 'connection failure' */
p_hcon->conn_state = HID_CONN_STATE_SECURITY;
- if(btm_sec_mx_access_request (p_dev->addr, HID_PSM_CONTROL,
- FALSE, BTM_SEC_PROTO_HID,
+ if(btm_sec_mx_access_request (p_dev->addr, HID_PSM_CONTROL,
+ FALSE, BTM_SEC_PROTO_HID,
(p_dev->attr_mask & HID_SEC_REQUIRED) ? HID_SEC_CHN : HID_NOSEC_CHN,
&hidh_sec_check_complete_term, p_dev) == BTM_CMD_STARTED)
{
- L2CA_ConnectRsp (bd_addr, l2cap_id, l2cap_cid, L2CAP_CONN_PENDING, L2CAP_CONN_OK);
+ L2CA_ConnectRsp (bd_addr, l2cap_id, l2cap_cid, L2CAP_CONN_PENDING, L2CAP_CONN_OK);
}
return;
@@ -267,7 +267,7 @@ static void hidh_l2cif_connect_ind (BD_ADDR bd_addr, UINT16 l2cap_cid, UINT16 p
p_hcon->intr_cid = l2cap_cid;
/* Send response to the L2CAP layer. */
- L2CA_ConnectRsp (bd_addr, l2cap_id, l2cap_cid, L2CAP_CONN_OK, L2CAP_CONN_OK);
+ L2CA_ConnectRsp (bd_addr, l2cap_id, l2cap_cid, L2CAP_CONN_OK, L2CAP_CONN_OK);
/* Send a Configuration Request. */
L2CA_ConfigReq (l2cap_cid, &hh_cb.l2cap_cfg);
@@ -342,12 +342,12 @@ void hidh_sec_check_complete_orig (BD_ADDR bd_addr, void *p_ref_data, UINT8 res)
hidh_conn_retry (dhandle);
return;
}
- else
+ else
cb_res = HID_L2CAP_CONN_FAIL | HCI_ERR_PAGE_TIMEOUT ;
}
#endif
p_dev->conn.disc_reason = HID_ERR_AUTH_FAILED; /* Save reason for disconnecting */
- hidh_conn_disconnect(dhandle);
+ hidh_conn_disconnect(dhandle);
}
}
@@ -368,7 +368,7 @@ static void hidh_l2cif_connect_cfm (UINT16 l2cap_cid, UINT16 result)
UINT8 dhandle;
tHID_CONN *p_hcon = NULL;
UINT32 reason;
- tHID_HOST_DEV_CTB *p_dev = NULL;
+ tHID_HOST_DEV_CTB *p_dev = NULL;
/* Find CCB based on CID, and verify we are in a state to accept this message */
if( (dhandle = find_conn_by_cid(l2cap_cid)) < HID_HOST_MAX_DEVICES )
@@ -397,7 +397,7 @@ static void hidh_l2cif_connect_cfm (UINT16 l2cap_cid, UINT16 result)
#if (HID_HOST_MAX_CONN_RETRY > 0)
if( (hh_cb.devices[dhandle].conn_tries <= HID_HOST_MAX_CONN_RETRY) &&
- (result == HCI_ERR_CONNECTION_TOUT || result == HCI_ERR_UNSPECIFIED ||
+ (result == HCI_ERR_CONNECTION_TOUT || result == HCI_ERR_UNSPECIFIED ||
result == HCI_ERR_PAGE_TIMEOUT) )
{
hidh_conn_retry(dhandle);
@@ -417,8 +417,8 @@ static void hidh_l2cif_connect_cfm (UINT16 l2cap_cid, UINT16 result)
p_hcon->conn_state = HID_CONN_STATE_SECURITY;
p_hcon->disc_reason = HID_L2CAP_CONN_FAIL; /* In case disconnection occurs before security is completed, then set CLOSE_EVT reason code to "connection failure" */
- btm_sec_mx_access_request (p_dev->addr, HID_PSM_CONTROL,
- TRUE, BTM_SEC_PROTO_HID,
+ btm_sec_mx_access_request (p_dev->addr, HID_PSM_CONTROL,
+ TRUE, BTM_SEC_PROTO_HID,
(p_dev->attr_mask & HID_SEC_REQUIRED) ? HID_SEC_CHN : HID_NOSEC_CHN,
&hidh_sec_check_complete_orig, p_dev);
}
@@ -448,7 +448,7 @@ static void hidh_l2cif_config_ind (UINT16 l2cap_cid, tL2CAP_CFG_INFO *p_cfg)
{
UINT8 dhandle;
tHID_CONN *p_hcon = NULL;
- tHID_HOST_DEV_CTB *p_dev;
+ tHID_HOST_DEV_CTB *p_dev;
/* Find CCB based on CID */
if( (dhandle = find_conn_by_cid(l2cap_cid)) < HID_HOST_MAX_DEVICES )
@@ -597,7 +597,7 @@ static void hidh_l2cif_disconnect_ind (UINT16 l2cap_cid, BOOLEAN ack_needed)
disc_res = btm_get_acl_disc_reason_code();
#if (HID_HOST_MAX_CONN_RETRY > 0)
- if( (disc_res == HCI_ERR_CONNECTION_TOUT || disc_res == HCI_ERR_UNSPECIFIED) &&
+ if( (disc_res == HCI_ERR_CONNECTION_TOUT || disc_res == HCI_ERR_UNSPECIFIED) &&
(!(hh_cb.devices[dhandle].attr_mask & HID_RECONN_INIT)) &&
(hh_cb.devices[dhandle].attr_mask & HID_NORMALLY_CONNECTABLE))
{
@@ -612,7 +612,7 @@ static void hidh_l2cif_disconnect_ind (UINT16 l2cap_cid, BOOLEAN ack_needed)
hid_close_evt_reason = p_hcon->disc_reason;
/* If we got baseband sent HCI_DISCONNECT_COMPLETE_EVT due to security failure, then set reason to HID_ERR_AUTH_FAILED */
- if ((disc_res == HCI_ERR_AUTH_FAILURE) ||
+ if ((disc_res == HCI_ERR_AUTH_FAILURE) ||
(disc_res == HCI_ERR_KEY_MISSING) ||
(disc_res == HCI_ERR_HOST_REJECT_SECURITY) ||
(disc_res == HCI_ERR_PAIRING_NOT_ALLOWED) ||
@@ -775,13 +775,13 @@ static void hidh_l2cif_data_ind (UINT16 l2cap_cid, BT_HDR *p_msg)
case HID_TRANS_DATA:
- evt = (hh_cb.devices[dhandle].conn.intr_cid == l2cap_cid) ?
+ evt = (hh_cb.devices[dhandle].conn.intr_cid == l2cap_cid) ?
HID_HDEV_EVT_INTR_DATA : HID_HDEV_EVT_CTRL_DATA;
hh_cb.callback(dhandle, evt, rep_type, p_msg);
break;
case HID_TRANS_DATAC:
- evt = (hh_cb.devices[dhandle].conn.intr_cid == l2cap_cid) ?
+ evt = (hh_cb.devices[dhandle].conn.intr_cid == l2cap_cid) ?
HID_HDEV_EVT_INTR_DATC : HID_HDEV_EVT_CTRL_DATC;
hh_cb.callback(dhandle, evt, rep_type, p_msg);
break;
@@ -802,7 +802,7 @@ static void hidh_l2cif_data_ind (UINT16 l2cap_cid, BT_HDR *p_msg)
** Returns tHID_STATUS
**
*******************************************************************************/
-tHID_STATUS hidh_conn_snd_data (UINT8 dhandle, UINT8 trans_type, UINT8 param,
+tHID_STATUS hidh_conn_snd_data (UINT8 dhandle, UINT8 trans_type, UINT8 param,
UINT16 data, UINT8 report_id, BT_HDR *buf)
{
tHID_CONN *p_hcon = &hh_cb.devices[dhandle].conn;
diff --git a/stack/hid/hidh_int.h b/stack/hid/hidh_int.h
index 6be1337..8e1a8a2 100644
--- a/stack/hid/hidh_int.h
+++ b/stack/hid/hidh_int.h
@@ -28,7 +28,7 @@ typedef struct per_device_ctb
UINT16 attr_mask; /* 0x01- virtual_cable; 0x02- normally_connectable; 0x03- reconn_initiate;
0x04- sdp_disable; */
UINT8 state; /* Device state if in HOST-KNOWN mode */
- UINT8 conn_substate;
+ UINT8 conn_substate;
UINT8 conn_tries; /* Remembers to the number of connection attempts while CONNECTING */
tHID_CONN conn; /* L2CAP channel info */
@@ -43,7 +43,7 @@ typedef struct host_ctb
#define MAX_SERVICE_DB_SIZE 4000
BOOLEAN sdp_busy;
- tHID_HOST_SDP_CALLBACK *sdp_cback;
+ tHID_HOST_SDP_CALLBACK *sdp_cback;
tSDP_DISCOVERY_DB *p_sdp_db;
tHID_DEV_SDP_INFO sdp_rec;
BOOLEAN reg_flag;
diff --git a/stack/include/a2d_api.h b/stack/include/a2d_api.h
index 32122dd..6bb7f0b 100644
--- a/stack/include/a2d_api.h
+++ b/stack/include/a2d_api.h
@@ -44,7 +44,7 @@
#define A2D_INVALID_PARAMS 0x0C /* bad parameters */
#define A2D_WRONG_CODEC 0x0D /* wrong codec info */
#define A2D_BAD_CODEC_TYPE 0xC1 /* Media Codec Type is not valid */
-#define A2D_NS_CODEC_TYPE 0xC2 /* Media Codec Type is not supported */
+#define A2D_NS_CODEC_TYPE 0xC2 /* Media Codec Type is not supported */
#define A2D_BAD_SAMP_FREQ 0xC3 /* Sampling Frequency is not valid or multiple values have been selected */
#define A2D_NS_SAMP_FREQ 0xC4 /* Sampling Frequency is not supported */
#define A2D_BAD_CH_MODE 0xC5 /* Channel Mode is not valid or multiple values have been selected */
@@ -67,7 +67,7 @@
#define A2D_BAD_OBJ_TYPE 0xD6 /* Either 1) Object type is not valid (b3-b0) or 2) None or multiple values have been selected for Object Type */
#define A2D_NS_OBJ_TYPE 0xD7 /* Object type is not supported */
#define A2D_BAD_CHANNEL 0xD8 /* None or multiple values have been selected for Channels */
-#define A2D_NS_CHANNEL 0xD9 /* Channels is not supported */
+#define A2D_NS_CHANNEL 0xD9 /* Channels is not supported */
#define A2D_BAD_BLOCK_LEN 0xDD /* None or multiple values have been selected for Block Length */
#define A2D_BAD_CP_TYPE 0xE0 /* The requested CP Type is not supported. */
#define A2D_BAD_CP_FORMAT 0xE1 /* The format of Content Protection Service Capability/Content Protection Scheme Dependent Data is not correct. */
@@ -175,7 +175,7 @@ A2D_API extern tA2D_STATUS A2D_AddRecord(UINT16 service_uuid, char *p_service_na
**
** p_db: Pointer to the information to initialize
** the discovery database.
-**
+**
** p_cback: Pointer to the A2D_FindService()
** callback function.
**
diff --git a/stack/include/avct_api.h b/stack/include/avct_api.h
index b244570..b4e819b 100644
--- a/stack/include/avct_api.h
+++ b/stack/include/avct_api.h
@@ -120,7 +120,7 @@ extern "C"
** prepares the protocol stack for its use. This function
** must be called once by the system or platform using AVCTP
** before the other functions of the API an be used.
-**
+**
**
** Returns void
**
@@ -136,7 +136,7 @@ AVCT_API extern void AVCT_Register(UINT16 mtu, UINT16 mtu_br, UINT8 sec_mask);
** application in the system. Before this function can be
** called, all connections must be removed with
** AVCT_RemoveConn().
-**
+**
**
** Returns void
**
@@ -152,9 +152,9 @@ AVCT_API extern void AVCT_Deregister(void);
** the p_cc->role parameter. When this function is called to
** create an initiator connection, an AVCTP connection to
** the peer device is initiated if one does not already exist.
-** If an acceptor connection is created, the connection waits
+** If an acceptor connection is created, the connection waits
** passively for an incoming AVCTP connection from a peer device.
-**
+**
**
** Returns AVCT_SUCCESS if successful, otherwise error.
**
@@ -170,7 +170,7 @@ AVCT_API extern UINT16 AVCT_CreateConn(UINT8 *p_handle, tAVCT_CC *p_cc,
** the application is no longer using a connection. If this
** is the last connection to a peer the L2CAP channel for AVCTP
** will be closed.
-**
+**
**
** Returns AVCT_SUCCESS if successful, otherwise error.
**
@@ -186,9 +186,9 @@ AVCT_API extern UINT16 AVCT_RemoveConn(UINT8 handle);
** the p_cc->role parameter. When this function is called to
** create an initiator connection, an AVCTP connection to
** the peer device is initiated if one does not already exist.
-** If an acceptor connection is created, the connection waits
+** If an acceptor connection is created, the connection waits
** passively for an incoming AVCTP connection from a peer device.
-**
+**
**
** Returns AVCT_SUCCESS if successful, otherwise error.
**
@@ -203,7 +203,7 @@ AVCT_API extern UINT16 AVCT_CreateBrowse(UINT8 handle, UINT8 role);
** the application is no longer using a connection. If this
** is the last connection to a peer the L2CAP channel for AVCTP
** will be closed.
-**
+**
**
** Returns AVCT_SUCCESS if successful, otherwise error.
**
@@ -214,7 +214,7 @@ AVCT_API extern UINT16 AVCT_RemoveBrowse(UINT8 handle);
**
** Function AVCT_GetBrowseMtu
**
-** Description Get the peer_mtu for the AVCTP Browse channel of the given
+** Description Get the peer_mtu for the AVCTP Browse channel of the given
** connection.
**
** Returns the peer browsing channel MTU.
@@ -226,7 +226,7 @@ AVCT_API extern UINT16 AVCT_GetBrowseMtu (UINT8 handle);
**
** Function AVCT_GetPeerMtu
**
-** Description Get the peer_mtu for the AVCTP channel of the given
+** Description Get the peer_mtu for the AVCTP channel of the given
** connection.
**
** Returns the peer MTU size.
diff --git a/stack/include/avdt_api.h b/stack/include/avdt_api.h
index 6995430..317386e 100644
--- a/stack/include/avdt_api.h
+++ b/stack/include/avdt_api.h
@@ -57,7 +57,7 @@
/* The marker bit is used by the application to mark significant events such
** as frame boundaries in the data stream. This constant is used to check or
** set the marker bit in the m_pt parameter of an AVDT_WriteReq()
-** or AVDT_DATA_IND_EVT.
+** or AVDT_DATA_IND_EVT.
*/
#define AVDT_MARKER_SET 0x80
@@ -273,7 +273,7 @@ typedef struct {
} tAVDT_EVT_HDR;
/* This data structure is associated with the AVDT_GETCAP_CFM_EVT,
-** AVDT_RECONFIG_IND_EVT, and AVDT_RECONFIG_CFM_EVT.
+** AVDT_RECONFIG_IND_EVT, and AVDT_RECONFIG_CFM_EVT.
*/
typedef struct {
tAVDT_EVT_HDR hdr; /* Event header */
@@ -365,7 +365,7 @@ typedef void (tAVDT_MEDIA_CBACK)(UINT8 handle, UINT8 *p_payload, UINT32 payload_
#if AVDT_REPORTING == TRUE
/* This is the report callback function. It is executed when AVDTP has a reporting
-** packet ready for the application. This function is required for streams
+** packet ready for the application. This function is required for streams
** created with AVDT_PSC_REPORT.
*/
typedef void (tAVDT_REPORT_CBACK)(UINT8 handle, AVDT_REPORT_TYPE type,
@@ -412,7 +412,7 @@ extern "C"
** prepares the protocol stack for its use. This function
** must be called once by the system or platform using AVDTP
** before the other functions of the API an be used.
-**
+**
**
** Returns void
**
@@ -427,7 +427,7 @@ AVDT_API extern void AVDT_Register(tAVDT_REG *p_reg, tAVDT_CTRL_CBACK *p_cback);
** It is called when AVDTP is no longer being used by any
** application in the system. Before this function can be
** called, all streams must be removed with AVDT_RemoveStream().
-**
+**
**
** Returns void
**
@@ -443,7 +443,7 @@ AVDT_API extern void AVDT_Deregister(void);
** this endpoint and an endpoint on a peer device. In
** addition, a peer device can discover, get the capabilities,
** and connect to this endpoint.
-**
+**
**
** Returns AVDT_SUCCESS if successful, otherwise error.
**
@@ -459,7 +459,7 @@ AVDT_API extern UINT16 AVDT_CreateStream(UINT8 *p_handle, tAVDT_CS *p_cs);
** If this function is called when the endpoint is connected
** the connection is closed and then the stream endpoint
** is removed.
-**
+**
**
** Returns AVDT_SUCCESS if successful, otherwise error.
**
@@ -476,7 +476,7 @@ AVDT_API extern UINT16 AVDT_RemoveStream(UINT8 handle);
** that AVDTP discovery is unrelated to SDP discovery).
** This function can be called at any time regardless of whether
** there is an AVDTP connection to the peer device.
-**
+**
** When discovery is complete, an AVDT_DISCOVER_CFM_EVT
** is sent to the application via its callback function.
** The application must not call AVDT_GetCapReq() or
@@ -505,7 +505,7 @@ AVDT_API extern UINT16 AVDT_DiscoverReq(BD_ADDR bd_addr, tAVDT_SEP_INFO *p_sep_i
** capabilities of a stream endpoint on the peer device.
** This function can be called at any time regardless of
** whether there is an AVDTP connection to the peer device.
-**
+**
** When the procedure is complete, an AVDT_GETCAP_CFM_EVT is
** sent to the application via its callback function. The
** application must not call AVDT_GetCapReq() or
@@ -532,7 +532,7 @@ AVDT_API extern UINT16 AVDT_GetCapReq(BD_ADDR bd_addr, UINT8 seid, tAVDT_CFG *p_
** capabilities of a stream endpoint on the peer device.
** This function can be called at any time regardless of
** whether there is an AVDTP connection to the peer device.
-**
+**
** When the procedure is complete, an AVDT_GETCAP_CFM_EVT is
** sent to the application via its callback function. The
** application must not call AVDT_GetCapReq() or
@@ -832,10 +832,10 @@ AVDT_API extern UINT16 AVDT_WriteDataReq(UINT8 handle, UINT8 *p_data, UINT32 dat
** buffer if argument p_buf is NULL. This function can only
** be called if the stream is a SNK.
**
-** AVDTP uses this buffer to reassemble fragmented media packets.
+** AVDTP uses this buffer to reassemble fragmented media packets.
** When AVDTP receives a complete media packet, it calls the
** p_media_cback assigned by AVDT_CreateStream().
-** This function can be called during callback to assign a
+** This function can be called during callback to assign a
** different buffer for next media packet or can leave the current
** buffer for next packet.
**
@@ -848,11 +848,11 @@ AVDT_API extern UINT16 AVDT_SetMediaBuf(UINT8 handle, UINT8 *p_buf, UINT32 buf_l
**
** Function AVDT_SendReport
**
-** Description
-**
+** Description
+**
**
**
-** Returns
+** Returns
**
*******************************************************************************/
AVDT_API extern UINT16 AVDT_SendReport(UINT8 handle, AVDT_REPORT_TYPE type,
diff --git a/stack/include/avdtc_api.h b/stack/include/avdtc_api.h
index 444bafd..3b43221 100644
--- a/stack/include/avdtc_api.h
+++ b/stack/include/avdtc_api.h
@@ -3,9 +3,9 @@
** Name: avdt_capi.h
**
** Description: This interface file contains the interface AVDTP
-** conformance API. These additional API functions and
-** callback events are provided for conformance testing
-** purposes only. They are not intended to be used by
+** conformance API. These additional API functions and
+** callback events are provided for conformance testing
+** purposes only. They are not intended to be used by
** an application.
**
** Copyright (c) 2002-2009, Broadcom Corp., All Rights Reserved.
@@ -60,7 +60,7 @@ extern "C"
** Description This function is called to begin using the conformance API.
** It must be called after AVDT_Register() and before any
** other API or conformance API functions are called.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -71,7 +71,7 @@ AVDT_API extern void AVDTC_Init(tAVDTC_CTRL_CBACK *p_cback);
** Function AVDTC_DiscoverRsp
**
** Description Send a discover response.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -82,7 +82,7 @@ AVDT_API extern void AVDTC_DiscoverRsp(BD_ADDR bd_addr, UINT8 label,
**
** Function AVDTC_GetCapRsp
**
-** Description Send a get capabilities response.
+** Description Send a get capabilities response.
**
** Returns void
**
@@ -93,7 +93,7 @@ AVDT_API extern void AVDTC_GetCapRsp(BD_ADDR bd_addr, UINT8 label, tAVDT_CFG *p_
**
** Function AVDTC_GetAllCapRsp
**
-** Description Send a get all capabilities response.
+** Description Send a get all capabilities response.
**
** Returns void
**
@@ -116,7 +116,7 @@ AVDT_API extern void AVDTC_GetConfigReq(UINT8 handle);
** Function AVDTC_GetConfigRsp
**
** Description Send a get configuration response.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -127,7 +127,7 @@ AVDT_API extern void AVDTC_GetConfigRsp(UINT8 handle, UINT8 label, tAVDT_CFG *p_
** Function AVDTC_OpenReq
**
** Description Send an open request.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -149,7 +149,7 @@ AVDT_API extern void AVDTC_OpenRsp(UINT8 handle, UINT8 label);
** Function AVDTC_StartRsp
**
** Description Send a start response.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -160,7 +160,7 @@ AVDT_API extern void AVDTC_StartRsp(UINT8 *p_handles, UINT8 num_handles, UINT8 l
** Function AVDTC_CloseRsp
**
** Description Send a close response.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -182,7 +182,7 @@ AVDT_API extern void AVDTC_SuspendRsp(UINT8 *p_handles, UINT8 num_handles, UINT8
** Function AVDTC_AbortReq
**
** Description Send an abort request.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -193,7 +193,7 @@ AVDT_API extern void AVDTC_AbortReq(UINT8 handle);
** Function AVDTC_AbortRsp
**
** Description Send an abort response.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -208,7 +208,7 @@ AVDT_API extern void AVDTC_AbortRsp(UINT8 handle, UINT8 label);
** Returns void
**
*******************************************************************************/
-AVDT_API extern void AVDTC_Rej(UINT8 handle, BD_ADDR bd_addr, UINT8 cmd, UINT8 label,
+AVDT_API extern void AVDTC_Rej(UINT8 handle, BD_ADDR bd_addr, UINT8 cmd, UINT8 label,
UINT8 err_code, UINT8 err_param);
#ifdef __cplusplus
diff --git a/stack/include/avrc_api.h b/stack/include/avrc_api.h
index cdffd73..d7e8ee4 100644
--- a/stack/include/avrc_api.h
+++ b/stack/include/avrc_api.h
@@ -48,7 +48,7 @@
* This event can result from a call to AVRC_Close() or when the peer closes
* the connection. It is also sent when a connection attempted through
* AVRC_Open() fails. */
-#define AVRC_CLOSE_IND_EVT 1
+#define AVRC_CLOSE_IND_EVT 1
/* AVRC_CONG_IND_EVT event indicates that AVCTP is congested and cannot send
* any more messages. */
@@ -56,8 +56,8 @@
/* AVRC_UNCONG_IND_EVT event indicates that AVCTP is uncongested and ready to
* send messages. */
-#define AVRC_UNCONG_IND_EVT 3
-
+#define AVRC_UNCONG_IND_EVT 3
+
/* AVRC_BROWSE_OPEN_IND_EVT event is sent when the browse channel is successfully opened.
* This eventis sent in response to an AVRC_Open() or AVRC_OpenBrowse() . */
#define AVRC_BROWSE_OPEN_IND_EVT 4
@@ -66,7 +66,7 @@
* This event can result from a call to AVRC_Close(), AVRC_CloseBrowse() or when the peer closes
* the connection. It is also sent when a connection attempted through
* AVRC_OpenBrowse() fails. */
-#define AVRC_BROWSE_CLOSE_IND_EVT 5
+#define AVRC_BROWSE_CLOSE_IND_EVT 5
/* AVRC_BROWSE_CONG_IND_EVT event indicates that AVCTP browse channel is congested and cannot send
* any more messages. */
@@ -74,7 +74,7 @@
/* AVRC_BROWSE_UNCONG_IND_EVT event indicates that AVCTP browse channel is uncongested and ready to
* send messages. */
-#define AVRC_BROWSE_UNCONG_IND_EVT 7
+#define AVRC_BROWSE_UNCONG_IND_EVT 7
/* Supported categories */
#define AVRC_SUPF_CT_CAT1 0x0001 /* Category 1 */
@@ -123,7 +123,7 @@ typedef struct
* to remain after the callback function exits. */
typedef void (tAVRC_FIND_CBACK) (UINT16 status);
-
+
/* This is the control callback function. This function passes events
* listed in Table 20 to the application. */
typedef void (tAVRC_CTRL_CBACK) (UINT8 handle, UINT8 event, UINT16 result,
@@ -161,7 +161,7 @@ extern "C"
** Function AVRC_AddRecord
**
** Description This function is called to build an AVRCP SDP record.
-** Prior to calling this function the application must
+** Prior to calling this function the application must
** call SDP_CreateRecord() to create an SDP record.
**
** Input Parameters:
@@ -197,7 +197,7 @@ AVRC_API extern UINT16 AVRC_AddRecord(UINT16 service_uuid, char *p_service_name,
** Description This function is called by the application to perform service
** discovery and retrieve AVRCP SDP record information from a
** peer device. Information is returned for the first service
-** record found on the server that matches the service UUID.
+** record found on the server that matches the service UUID.
** The callback function will be executed when service discovery
** is complete. There can only be one outstanding call to
** AVRC_FindService() at a time; the application must wait for
@@ -215,7 +215,7 @@ AVRC_API extern UINT16 AVRC_AddRecord(UINT16 service_uuid, char *p_service_name,
** bd_addr: BD address of the peer device.
**
** p_db: SDP discovery database parameters.
-**
+**
** p_cback: Pointer to the callback function.
**
** Output Parameters:
@@ -234,13 +234,13 @@ AVRC_API extern UINT16 AVRC_FindService(UINT16 service_uuid, BD_ADDR bd_addr,
**
** Function AVRC_Open
**
-** Description This function is called to open a connection to AVCTP.
+** Description This function is called to open a connection to AVCTP.
** The connection can be either an initiator or acceptor, as
-** determined by the p_ccb->stream parameter.
+** determined by the p_ccb->stream parameter.
** The connection can be a target, a controller or for both role,
-** as determined by the p_ccb->control parameter.
+** as determined by the p_ccb->control parameter.
** By definition, a target connection is an acceptor connection
-** that waits for an incoming AVCTP connection from the peer.
+** that waits for an incoming AVCTP connection from the peer.
** The connection remains available to the application until
** the application closes it by calling AVRC_Close(). The
** application does not need to reopen the connection after an
@@ -252,7 +252,7 @@ AVRC_API extern UINT16 AVRC_FindService(UINT16 service_uuid, BD_ADDR bd_addr,
** p_ccb->p_ctrl_cback: Pointer to control callback function.
**
** p_ccb->p_msg_cback: Pointer to message callback function.
-**
+**
** p_ccb->conn: AVCTP connection role. This is set to
** AVCTP_INT for initiator connections and AVCTP_ACP
** for acceptor connections.
@@ -267,7 +267,7 @@ AVRC_API extern UINT16 AVRC_FindService(UINT16 service_uuid, BD_ADDR bd_addr,
** connections it can be set to NULL.
**
** Output Parameters:
-** p_handle: Pointer to handle. This parameter is only
+** p_handle: Pointer to handle. This parameter is only
** valid if AVRC_SUCCESS is returned.
**
** Returns AVRC_SUCCESS if successful.
@@ -302,9 +302,9 @@ AVRC_API extern UINT16 AVRC_Close(UINT8 handle);
**
** Function AVRC_OpenBrowse
**
-** Description This function is called to open a browsing connection to AVCTP.
+** Description This function is called to open a browsing connection to AVCTP.
** The connection can be either an initiator or acceptor, as
-** determined by the conn_role.
+** determined by the conn_role.
** The handle is returned by a previous call to AVRC_Open.
**
** Returns AVRC_SUCCESS if successful.
@@ -334,10 +334,10 @@ AVRC_API extern UINT16 AVRC_CloseBrowse(UINT8 handle);
**
** Description This function is used to send the AVRCP byte stream in p_pkt
** down to AVCTP.
-**
+**
** It is expected that p_pkt->offset is at least AVCT_MSG_OFFSET
** p_pkt->layer_specific is AVCT_DATA_CTRL or AVCT_DATA_BROWSE
-** p_pkt->event is AVRC_OP_VENDOR, AVRC_OP_PASS_THRU or AVRC_OP_BROWSING
+** p_pkt->event is AVRC_OP_VENDOR, AVRC_OP_PASS_THRU or AVRC_OP_BROWSING
** The above BT_HDR settings are set by the AVRC_Bld* functions.
**
** Returns AVRC_SUCCESS if successful.
@@ -411,7 +411,7 @@ AVRC_API extern UINT16 AVRC_SubCmd(UINT8 handle, UINT8 label, UINT8 page);
**
** label: Transaction label.
**
-** p_msg: Pointer to PASS THROUGH message structure.
+** p_msg: Pointer to PASS THROUGH message structure.
**
** Output Parameters:
** None.
@@ -427,7 +427,7 @@ AVRC_API extern UINT16 AVRC_PassCmd(UINT8 handle, UINT8 label, tAVRC_MSG_PASS *p
** Function AVRC_PassRsp
**
** Description Send a PASS THROUGH response to the peer device. This
-** function can only be called for target role connections.
+** function can only be called for target role connections.
** This function must be called when a PASS THROUGH command
** message is received from the peer through the
** tAVRC_MSG_CBACK callback function.
@@ -568,7 +568,7 @@ AVRC_API extern tAVRC_STS AVRC_ParsResponse (tAVRC_MSG *p_msg, tAVRC_RESPONSE *p
**
** Function AVRC_BldCommand
**
-** Description This function builds the given AVRCP command to the given
+** Description This function builds the given AVRCP command to the given
** GKI buffer
**
** Returns AVRC_STS_NO_ERROR, if the command is built successfully
@@ -581,7 +581,7 @@ AVRC_API extern tAVRC_STS AVRC_BldCommand( tAVRC_COMMAND *p_cmd, BT_HDR **pp_pkt
**
** Function AVRC_BldResponse
**
-** Description This function builds the given AVRCP response to the given
+** Description This function builds the given AVRCP response to the given
** GKI buffer
**
** Returns AVRC_STS_NO_ERROR, if the response is built successfully
@@ -607,10 +607,10 @@ AVRC_API extern BOOLEAN AVRC_IsValidAvcType(UINT8 pdu_id, UINT8 avc_type);
** Function AVRC_IsValidPlayerAttr
**
** Description Check if the given attrib value is a valid one
-**
+**
**
** Returns returns TRUE if it is valid
-**
+**
*******************************************************************************/
AVRC_API extern BOOLEAN AVRC_IsValidPlayerAttr(UINT8 attr);
diff --git a/stack/include/avrc_defs.h b/stack/include/avrc_defs.h
index 6d538cb..3f82948 100644
--- a/stack/include/avrc_defs.h
+++ b/stack/include/avrc_defs.h
@@ -164,7 +164,7 @@
** Metadata transfer definitions
*****************************************************************************/
-/* Define the Metadata Packet types
+/* Define the Metadata Packet types
*/
#define AVRC_PKT_SINGLE 0
#define AVRC_PKT_START 1
@@ -190,15 +190,15 @@
#define AVRC_PDU_ABORT_CONTINUATION_RSP 0x41
/* added in 1.4 */
#define AVRC_PDU_SET_ABSOLUTE_VOLUME 0x50
-#define AVRC_PDU_SET_ADDRESSED_PLAYER 0x60
-#define AVRC_PDU_SET_BROWSED_PLAYER 0x70
-#define AVRC_PDU_GET_FOLDER_ITEMS 0x71
-#define AVRC_PDU_CHANGE_PATH 0x72
-#define AVRC_PDU_GET_ITEM_ATTRIBUTES 0x73
-#define AVRC_PDU_PLAY_ITEM 0x74
-#define AVRC_PDU_SEARCH 0x80
-#define AVRC_PDU_ADD_TO_NOW_PLAYING 0x90
-#define AVRC_PDU_GENERAL_REJECT 0xA0
+#define AVRC_PDU_SET_ADDRESSED_PLAYER 0x60
+#define AVRC_PDU_SET_BROWSED_PLAYER 0x70
+#define AVRC_PDU_GET_FOLDER_ITEMS 0x71
+#define AVRC_PDU_CHANGE_PATH 0x72
+#define AVRC_PDU_GET_ITEM_ATTRIBUTES 0x73
+#define AVRC_PDU_PLAY_ITEM 0x74
+#define AVRC_PDU_SEARCH 0x80
+#define AVRC_PDU_ADD_TO_NOW_PLAYING 0x90
+#define AVRC_PDU_GENERAL_REJECT 0xA0
/* Define the vendor unique id carried in the pass through data
*/
@@ -346,7 +346,7 @@ typedef UINT8 tAVRC_SYSTEMSTATE;
#define AVRC_ITEM_MEDIA 0x03
#define AVRC_SCOPE_PLAYER_LIST 0x00 /* Media Player Item - Contains all available media players */
-#define AVRC_SCOPE_FILE_SYSTEM 0x01 /* Folder Item, Media Element Item
+#define AVRC_SCOPE_FILE_SYSTEM 0x01 /* Folder Item, Media Element Item
- The virtual filesystem containing the media content of the browsed player */
#define AVRC_SCOPE_SEARCH 0x02 /* Media Element Item The results of a search operation on the browsed player */
#define AVRC_SCOPE_NOW_PLAYING 0x03 /* Media Element Item The Now Playing list (or queue) of the addressed player */
@@ -381,7 +381,7 @@ typedef UINT8 tAVRC_SYSTEMSTATE;
#define AVRC_DIR_UP 0x00 /* Folder Up */
#define AVRC_DIR_DOWN 0x01 /* Folder Down */
-
+
#define AVRC_UID_SIZE 8
typedef UINT8 tAVRC_UID[AVRC_UID_SIZE];
@@ -741,7 +741,7 @@ typedef UINT8 tAVRC_UID[AVRC_UID_SIZE];
/*
This structure contains the header parameters of an AV/C message.
*/
-typedef struct
+typedef struct
{
UINT8 ctype; /* Command type. */
UINT8 subunit_type; /* Subunit type. */
@@ -766,7 +766,7 @@ typedef struct
tAVRC_HDR hdr; /* Message header. */
UINT8 subunit_type[AVRC_SUB_TYPE_LEN];
/* Array containing subunit type values. */
- BOOLEAN panel; /* TRUE if the panel subunit type is in the
+ BOOLEAN panel; /* TRUE if the panel subunit type is in the
* subunit_type array, FALSE otherwise. */
UINT8 page; /* Specifies which part of the subunit type table is
* returned. For AVRCP it is typically zero.
@@ -826,7 +826,7 @@ typedef union
#define AVRC_IS_VALID_CAP_ID(a) (((a == AVRC_CAP_COMPANY_ID) || (a == AVRC_CAP_EVENTS_SUPPORTED)) ? TRUE : FALSE)
#define AVRC_IS_VALID_EVENT_ID(a) (((a >= AVRC_EVT_PLAY_STATUS_CHANGE) && \
- (a <= AVRC_EVT_APP_SETTING_CHANGE)) ? TRUE : FALSE)
+ (a <= AVRC_EVT_APP_SETTING_CHANGE)) ? TRUE : FALSE)
#define AVRC_IS_VALID_ATTRIBUTE(a) (((((a > 0) && a <= AVRC_PLAYER_SETTING_SCAN)) || \
((a >= AVRC_PLAYER_SETTING_LOW_MENU_EXT) && \
@@ -834,7 +834,7 @@ typedef union
#define AVRC_IS_VALID_MEDIA_ATTRIBUTE(a) ((a >= AVRC_MEDIA_ATTR_ID_TITLE) && \
- (a <= AVRC_MEDIA_ATTR_ID_PLAYING_TIME) ? TRUE : FALSE)
+ (a <= AVRC_MEDIA_ATTR_ID_PLAYING_TIME) ? TRUE : FALSE)
#define AVRC_IS_VALID_BATTERY_STATUS(a) ((a <= AVRC_BATTERY_STATUS_FULL_CHARGE) ? TRUE : FALSE)
@@ -902,13 +902,13 @@ typedef UINT8 tAVRC_FEATURE_MASK[AVRC_FEATURE_MASK_SIZE];
typedef struct
{
- UINT16 player_id; /* A unique identifier for this media player.*/
- UINT8 major_type; /* Use AVRC_MJ_TYPE_AUDIO, AVRC_MJ_TYPE_VIDEO, AVRC_MJ_TYPE_BC_AUDIO, or AVRC_MJ_TYPE_BC_VIDEO.*/
- UINT32 sub_type; /* Use AVRC_SUB_TYPE_NONE, AVRC_SUB_TYPE_AUDIO_BOOK, or AVRC_SUB_TYPE_PODCAST*/
+ UINT16 player_id; /* A unique identifier for this media player.*/
+ UINT8 major_type; /* Use AVRC_MJ_TYPE_AUDIO, AVRC_MJ_TYPE_VIDEO, AVRC_MJ_TYPE_BC_AUDIO, or AVRC_MJ_TYPE_BC_VIDEO.*/
+ UINT32 sub_type; /* Use AVRC_SUB_TYPE_NONE, AVRC_SUB_TYPE_AUDIO_BOOK, or AVRC_SUB_TYPE_PODCAST*/
UINT8 play_status; /* Use AVRC_PLAYSTATE_STOPPED, AVRC_PLAYSTATE_PLAYING, AVRC_PLAYSTATE_PAUSED, AVRC_PLAYSTATE_FWD_SEEK,
- AVRC_PLAYSTATE_REV_SEEK, or AVRC_PLAYSTATE_ERROR*/
- tAVRC_FEATURE_MASK features; /* Supported feature bit mask*/
- tAVRC_FULL_NAME name; /* The player name, name length and character set id.*/
+ AVRC_PLAYSTATE_REV_SEEK, or AVRC_PLAYSTATE_ERROR*/
+ tAVRC_FEATURE_MASK features; /* Supported feature bit mask*/
+ tAVRC_FULL_NAME name; /* The player name, name length and character set id.*/
} tAVRC_ITEM_PLAYER;
typedef struct
@@ -916,7 +916,7 @@ typedef struct
tAVRC_UID uid; /* The uid of this folder */
UINT8 type; /* Use AVRC_FOLDER_TYPE_MIXED, AVRC_FOLDER_TYPE_TITLES,
AVRC_FOLDER_TYPE_ALNUMS, AVRC_FOLDER_TYPE_ARTISTS, AVRC_FOLDER_TYPE_GENRES,
- AVRC_FOLDER_TYPE_PLAYLISTS, or AVRC_FOLDER_TYPE_YEARS.*/
+ AVRC_FOLDER_TYPE_PLAYLISTS, or AVRC_FOLDER_TYPE_YEARS.*/
BOOLEAN playable; /* TRUE, if the folder can be played. */
tAVRC_FULL_NAME name; /* The folder name, name length and character set id. */
} tAVRC_ITEM_FOLDER;
@@ -985,7 +985,7 @@ typedef struct
UINT8 opcode; /* Op Code (assigned by AVRC_BldCommand according to pdu) */
UINT8 num_val;
tAVRC_APP_SETTING *p_vals;
-} tAVRC_SET_APP_VALUE_CMD;
+} tAVRC_SET_APP_VALUE_CMD;
/* GetAppAttrTxt */
typedef struct
@@ -1045,7 +1045,7 @@ typedef struct
UINT8 opcode; /* Op Code (assigned by AVRC_BldCommand according to pdu) */
UINT8 event_id;
UINT32 param;
-} tAVRC_REG_NOTIF_CMD;
+} tAVRC_REG_NOTIF_CMD;
/* SetAddrPlayer */
typedef struct
@@ -1227,7 +1227,7 @@ typedef struct
UINT8 opcode; /* Op Code (copied from avrc_cmd.opcode by AVRC_BldResponse user. invalid one to generate according to pdu) */
UINT8 num_val;
tAVRC_APP_SETTING *p_vals;
-} tAVRC_GET_CUR_APP_VALUE_RSP;
+} tAVRC_GET_CUR_APP_VALUE_RSP;
/* GetAppAttrTxt */
typedef struct
@@ -1292,7 +1292,7 @@ typedef union
UINT8 volume;
} tAVRC_NOTIF_RSP_PARAM;
-/* RegNotify */
+/* RegNotify */
typedef struct
{
UINT8 pdu;
diff --git a/stack/include/bnep_api.h b/stack/include/bnep_api.h
index 1c5dd90..4ac9abb 100644
--- a/stack/include/bnep_api.h
+++ b/stack/include/bnep_api.h
@@ -19,7 +19,7 @@
*****************************************************************************/
/* Define the minimum offset needed in a GKI buffer for
-** sending BNEP packets. Note, we are currently not sending
+** sending BNEP packets. Note, we are currently not sending
** extension headers, but may in the future, so allow
** space for them
*/
@@ -53,7 +53,7 @@ enum
BNEP_IGNORE_CMD, /* To ignore the rcvd command */
BNEP_TX_FLOW_ON, /* tx data flow enabled */
BNEP_TX_FLOW_OFF /* tx data flow disabled */
-
+
}; typedef UINT8 tBNEP_RESULT;
@@ -223,7 +223,7 @@ extern "C" {
** its callbacks with BNEP
**
** Parameters: p_reg_info - contains all callback function pointers
-**
+**
**
** Returns BNEP_SUCCESS if registered successfully
** BNEP_FAILURE if connection state callback is missing
@@ -239,7 +239,7 @@ BNEP_API extern tBNEP_RESULT BNEP_Register (tBNEP_REGISTER *p_reg_info);
** its callbacks.
**
** Parameters: void
-**
+**
**
** Returns void
**
@@ -273,7 +273,7 @@ BNEP_API extern tBNEP_RESULT BNEP_Connect (BD_ADDR p_rem_bda,
** Function BNEP_ConnectResp
**
** Description This function is called in responce to connection indication
-**
+**
**
** Parameters: handle - handle given in the connection indication
** resp - responce for the connection indication
diff --git a/stack/include/bt_types.h b/stack/include/bt_types.h
index 258826d..801b153 100644
--- a/stack/include/bt_types.h
+++ b/stack/include/bt_types.h
@@ -29,7 +29,7 @@
** that global events MUST be one of these events defined below.
**
** The convention used is the the event name contains the layer that the
-** event is going to.
+** event is going to.
*/
#define BT_EVT_MASK 0xFF00
#define BT_SUB_EVT_MASK 0x00FF
@@ -149,7 +149,7 @@
/* BPP Events */
#define BT_EVT_TO_BPP_PR_CMDS 0x6100 /* Printer Events */
-#define BT_EVT_TO_BPP_SND_CMDS 0x6200 /* BPP Sender Events */
+#define BT_EVT_TO_BPP_SND_CMDS 0x6200 /* BPP Sender Events */
/* BIP Events */
#define BT_EVT_TO_BIP_CMDS 0x6300
@@ -205,7 +205,7 @@ typedef struct
#define BT_PSM_BNEP 0x000F
#define BT_PSM_HIDC 0x0011
#define BT_PSM_HIDI 0x0013
-#define BT_PSM_UPNP 0x0015
+#define BT_PSM_UPNP 0x0015
#define BT_PSM_AVCTP 0x0017
#define BT_PSM_AVDTP 0x0019
#define BT_PSM_AVCTP_13 0x001B /* Advanced Control - Browsing */
@@ -353,7 +353,7 @@ typedef struct {
UINT32 token_bucket_size; /* bytes */
UINT32 peak_bandwidth; /* bytes/second */
UINT32 latency; /* microseconds */
- UINT32 delay_variation; /* microseconds */
+ UINT32 delay_variation; /* microseconds */
} FLOW_SPEC;
/* Values for service_type */
@@ -459,8 +459,8 @@ typedef struct
*/
/* Structure to hold connection stats */
-#ifndef BT_CONN_STATS_DEFINED
-#define BT_CONN_STATS_DEFINED
+#ifndef BT_CONN_STATS_DEFINED
+#define BT_CONN_STATS_DEFINED
/* These bits are used in the bIsConnected field */
#define BT_CONNECTED_USING_BREDR 1
@@ -563,11 +563,11 @@ typedef UINT8 tBT_DEVICE_TYPE;
#define TRACE_LAYER_BNEP 0x001b0000
#define TRACE_LAYER_PAN 0x001c0000
#define TRACE_LAYER_HFP 0x001d0000
-#define TRACE_LAYER_HID 0x001e0000
-#define TRACE_LAYER_BIP 0x001f0000
-#define TRACE_LAYER_AVP 0x00200000
-#define TRACE_LAYER_A2D 0x00210000
-#define TRACE_LAYER_SAP 0x00220000
+#define TRACE_LAYER_HID 0x001e0000
+#define TRACE_LAYER_BIP 0x001f0000
+#define TRACE_LAYER_AVP 0x00200000
+#define TRACE_LAYER_A2D 0x00210000
+#define TRACE_LAYER_SAP 0x00220000
#define TRACE_LAYER_AMP 0x00230000
#define TRACE_LAYER_MCA 0x00240000
#define TRACE_LAYER_ATT 0x00250000
@@ -627,7 +627,7 @@ typedef UINT8 tBT_DEVICE_TYPE;
#define TRACE_TYPE_CMD_TX 0x0000000b
#define TRACE_TYPE_EVT_TX 0x0000000c
#define TRACE_TYPE_ACL_TX 0x0000000d
-#define TRACE_TYPE_CMD_RX 0x0000000e
+#define TRACE_TYPE_CMD_RX 0x0000000e
#define TRACE_TYPE_EVT_RX 0x0000000f
#define TRACE_TYPE_ACL_RX 0x00000010
#define TRACE_TYPE_TARGET_TRACE 0x00000011
@@ -676,7 +676,7 @@ typedef UINT8 tBT_DEVICE_TYPE;
/* Define PSMs HID uses */
#define HID_PSM_CONTROL 0x0011
#define HID_PSM_INTERRUPT 0x0013
-
+
/* Define a function for logging */
typedef void (BT_LOG_FUNC) (int trace_type, const char *fmt_str, ...);
diff --git a/stack/include/btm_api.h b/stack/include/btm_api.h
index 613436b..76b6e03 100644
--- a/stack/include/btm_api.h
+++ b/stack/include/btm_api.h
@@ -452,7 +452,7 @@ enum
/* BTM_EIR_UUID_SERVCLASS_HDP_PROFILE */
BTM_EIR_UUID_SERVCLASS_MESSAGE_ACCESS,
BTM_EIR_UUID_SERVCLASS_MESSAGE_NOTIFICATION,
- BTM_EIR_UUID_SERVCLASS_HDP_SOURCE,
+ BTM_EIR_UUID_SERVCLASS_HDP_SOURCE,
BTM_EIR_UUID_SERVCLASS_HDP_SINK,
BTM_EIR_MAX_SERVICES
};
@@ -494,7 +494,7 @@ typedef UINT8 tBTM_EIR_SEARCH_RESULT;
#if BLE_INCLUDED == TRUE
#define BTM_BLE_SEC_NONE 0
#define BTM_BLE_SEC_ENCRYPT 1 /* encrypt the link using current key */
-#define BTM_BLE_SEC_ENCRYPT_NO_MITM 2
+#define BTM_BLE_SEC_ENCRYPT_NO_MITM 2
#define BTM_BLE_SEC_ENCRYPT_MITM 3
typedef UINT8 tBTM_BLE_SEC_ACT;
#endif
@@ -630,7 +630,7 @@ typedef struct
typedef struct
{
- UINT8 pcm_intf_rate; /* PCM interface rate: 0: 128kbps, 1: 256 kbps;
+ UINT8 pcm_intf_rate; /* PCM interface rate: 0: 128kbps, 1: 256 kbps;
2:512 bps; 3: 1024kbps; 4: 2048kbps */
UINT8 frame_type; /* frame type: 0: short; 1: long */
UINT8 sync_mode; /* sync mode: 0: slave; 1: master */
@@ -908,7 +908,7 @@ typedef UINT8 tBTM_SCO_TYPE;
/*******************
-** SCO Routing Path
+** SCO Routing Path
********************/
#define BTM_SCO_ROUTE_PCM HCI_BRCM_SCO_ROUTE_PCM
#define BTM_SCO_ROUTE_HCI HCI_BRCM_SCO_ROUTE_HCI
@@ -916,7 +916,7 @@ typedef UINT8 tBTM_SCO_ROUTE_TYPE;
/*******************
-** SCO Codec Types
+** SCO Codec Types
********************/
#define BTM_SCO_CODEC_NONE 0x0000
#define BTM_SCO_CODEC_CVSD 0x0001
@@ -924,7 +924,7 @@ typedef UINT8 tBTM_SCO_ROUTE_TYPE;
typedef UINT16 tBTM_SCO_CODEC_TYPE;
/*******************
-** SCO Voice Settings
+** SCO Voice Settings
********************/
#define BTM_VOICE_SETTING_CVSD ((UINT16) (HCI_INP_CODING_LINEAR | \
HCI_INP_DATA_FMT_2S_COMPLEMENT | \
@@ -937,7 +937,7 @@ typedef UINT16 tBTM_SCO_CODEC_TYPE;
HCI_AIR_CODING_FORMAT_TRANSPNT))
/*******************
-** SCO Data Status
+** SCO Data Status
********************/
enum
{
@@ -945,7 +945,7 @@ enum
BTM_SCO_DATA_PAR_ERR,
BTM_SCO_DATA_NONE,
BTM_SCO_DATA_PAR_LOST
-};
+};
typedef UINT8 tBTM_SCO_DATA_FLAG;
/***************************
@@ -1494,7 +1494,7 @@ typedef union
tBTM_SP_LOC_OOB loc_oob; /* BTM_SP_LOC_OOB_EVT */
tBTM_SP_RMT_OOB rmt_oob; /* BTM_SP_RMT_OOB_EVT */
tBTM_SP_COMPLT complt; /* BTM_SP_COMPLT_EVT */
- tBTM_SP_UPGRADE upgrade; /* BTM_SP_UPGRADE_EVT */
+ tBTM_SP_UPGRADE upgrade; /* BTM_SP_UPGRADE_EVT */
} tBTM_SP_EVT_DATA;
/* Simple Pairing Events. Called by the stack when Simple Pairing related
@@ -1519,7 +1519,7 @@ typedef void (tBTM_SEC_CBACK) (BD_ADDR bd_addr, void *p_ref_data, tBTM_STATUS re
*/
typedef void (tBTM_BOND_CANCEL_CMPL_CALLBACK) (tBTM_STATUS result);
-/* LE related event and data structure
+/* LE related event and data structure
*/
enum
{
@@ -1541,7 +1541,7 @@ typedef UINT8 tBTM_LE_EVT;
#define BTM_LE_KEY_LCSRK (SMP_SEC_KEY_TYPE_CSRK << 3) /* local CSRK has been deliver to peer */
typedef UINT8 tBTM_LE_KEY_TYPE;
-#define BTM_LE_AUTH_REQ_NO_BOND SMP_AUTH_NO_BOND /* 0 */
+#define BTM_LE_AUTH_REQ_NO_BOND SMP_AUTH_NO_BOND /* 0 */
#define BTM_LE_AUTH_REQ_BOND SMP_AUTH_GEN_BOND /* 1 << 0 */
#define BTM_LE_AUTH_REQ_MITM SMP_AUTH_YN_BIT /* 1 << 2 */
typedef UINT8 tBTM_LE_AUTH_REQ;
@@ -1549,9 +1549,9 @@ typedef UINT8 tBTM_LE_AUTH_REQ;
#define BTM_LE_AUTH_REQ_MASK SMP_AUTH_MASK /* 0x03*/
/* LE security level */
-#define BTM_LE_SEC_NONE SMP_SEC_NONE
-#define BTM_LE_SEC_UNAUTHENTICATE SMP_SEC_UNAUTHENTICATE
-#define BTM_LE_SEC_AUTHENTICATED SMP_SEC_AUTHENTICATED
+#define BTM_LE_SEC_NONE SMP_SEC_NONE
+#define BTM_LE_SEC_UNAUTHENTICATE SMP_SEC_UNAUTHENTICATE
+#define BTM_LE_SEC_AUTHENTICATED SMP_SEC_AUTHENTICATED
typedef UINT8 tBTM_LE_SEC;
@@ -1643,7 +1643,7 @@ typedef UINT8 (tBTM_LE_CALLBACK) (tBTM_LE_EVT event, BD_ADDR bda, tBTM_LE_EVT_DA
#define BTM_BLE_KEY_TYPE_ID 1
#define BTM_BLE_KEY_TYPE_ER 2
-#define BTM_BLE_KEY_TYPE_COUNTER 3 //tobe obsolete
+#define BTM_BLE_KEY_TYPE_COUNTER 3 //tobe obsolete
typedef struct
{
@@ -1679,7 +1679,7 @@ typedef struct
tBTM_ABORT_CALLBACK *p_abort_callback;
tBTM_BOND_CANCEL_CMPL_CALLBACK *p_bond_cancel_cmpl_callback;
tBTM_SP_CALLBACK *p_sp_callback;
-#if BLE_INCLUDED == TRUE
+#if BLE_INCLUDED == TRUE
#if SMP_INCLUDED == TRUE
tBTM_LE_CALLBACK *p_le_callback;
#endif
@@ -2066,7 +2066,7 @@ extern "C" {
**
** Function BTM_ReadLocalDeviceNameFromController
**
-** Description Get local device name from controller. Do not use cached
+** Description Get local device name from controller. Do not use cached
** name (used to get chip-id prior to btm reset complete).
**
** Returns BTM_CMD_STARTED if successful, otherwise an error
@@ -2747,7 +2747,7 @@ BTM_API extern BOOLEAN BTM_TryAllocateSCN(UINT8 scn);
** Function BTM_ReadInquiryRspTxPower
**
** Description This command will read the inquiry Transmit Power level used
-** to transmit the FHS and EIR data packets.
+** to transmit the FHS and EIR data packets.
** This can be used directly in the Tx Power Level EIR data type.
**
** Returns BTM_SUCCESS if successful
@@ -2759,8 +2759,8 @@ BTM_API extern BOOLEAN BTM_TryAllocateSCN(UINT8 scn);
**
** Function BTM_WriteInquiryTxPower
**
-** Description This command is used to write the inquiry transmit power level
-** used to transmit the inquiry (ID) data packets. The Controller
+** Description This command is used to write the inquiry transmit power level
+** used to transmit the inquiry (ID) data packets. The Controller
** should use the supported TX power level closest to the Tx_Power
** parameter.
**
@@ -3127,8 +3127,8 @@ BTM_API extern BOOLEAN BTM_TryAllocateSCN(UINT8 scn);
**
** Function BTM_ReadTxPower
**
-** Description This function is called to read the current connection
-** TX power of the connection. The TX power level results
+** Description This function is called to read the current connection
+** TX power of the connection. The TX power level results
** are returned in the callback.
** (tBTM_RSSI_RESULTS)
**
@@ -3379,7 +3379,7 @@ BTM_API extern BOOLEAN BTM_TryAllocateSCN(UINT8 scn);
** WBS codec for the upcoming eSCO connection.
**
** Returns BTM_SUCCESS.
-**
+**
**
*******************************************************************************/
BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type);
@@ -3649,8 +3649,8 @@ BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type);
** Returns TRUE if registered OK, else FALSE
**
*******************************************************************************/
- BTM_API extern BOOLEAN BTM_SetUCDSecurityLevel (BOOLEAN is_originator, char *p_name, UINT8 service_id,
- UINT16 sec_level, UINT16 psm, UINT32 mx_proto_id,
+ BTM_API extern BOOLEAN BTM_SetUCDSecurityLevel (BOOLEAN is_originator, char *p_name, UINT8 service_id,
+ UINT16 sec_level, UINT16 psm, UINT32 mx_proto_id,
UINT32 mx_chan_id);
/*******************************************************************************
@@ -3684,7 +3684,7 @@ BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type);
**
** Function BTM_SecClrUCDService
**
-** Description
+** Description
**
** Parameters Service ID - Id of the service to remove. ('0' removes all service
** records.
@@ -3966,7 +3966,7 @@ BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type);
**
** Function BTM_ReadOobData
**
-** Description This function is called to parse the OOB data payload
+** Description This function is called to parse the OOB data payload
** received over OOB (non-Bluetooth) link
**
** Parameters: p_data - the location for OOB data
@@ -4343,7 +4343,7 @@ BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type);
** main stack (running on phone baseband) to embedded light stack
** (running on Multimedia or Bluetooth Controller chip)
**
-** Parameters
+** Parameters
** p_sync_callback: callback function for event notification
** Returns
**
@@ -4373,10 +4373,10 @@ BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type);
** Function BTM_IpcSendBuf
**
** Description For Dual-Stack support. Called to send ipc messages from
-** full stack to lite stack and vice-versa. This API is
+** full stack to lite stack and vice-versa. This API is
** typically called by bta layers e.g. bta_av_sync.
**
-**
+**
** Parameters p_buf: Pointer to the buffer to be passed in the IPC message
**
** Returns void
@@ -4455,7 +4455,7 @@ BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type);
**
** Parameter codec_type: codec_type to be used for sco connection.
** role: master or slave role
-** sample_rate: sampling rate
+** sample_rate: sampling rate
** clock_rate:clock rate 128K to 2048K
**
**
@@ -4472,14 +4472,14 @@ BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type);
**
** Function BTM_ConfigScoPath
**
-** Description This function enable/disable SCO over HCI and registers SCO
-** data callback if SCO over HCI is enabled.
+** Description This function enable/disable SCO over HCI and registers SCO
+** data callback if SCO over HCI is enabled.
**
** Parameter path: SCO or HCI
-** p_sco_data_cb: callback function or SCO data if path is set
+** p_sco_data_cb: callback function or SCO data if path is set
** to transport.
** p_pcm_param: pointer to the PCM interface parameter. If a NULL
-** pointer is used, PCM parameter maintained in
+** pointer is used, PCM parameter maintained in
** the control block will be used; otherwise update
** control block value.
** err_data_rpt: Lisbon feature to enable the erronous data report
@@ -4489,10 +4489,10 @@ BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type);
** BTM_NO_RESOURCES: no rsource to start the command.
** BTM_ILLEGAL_VALUE: invalid callback function pointer.
** BTM_CMD_STARTED :Command sent. Waiting for command cmpl event.
-**
+**
**
*******************************************************************************/
- BTM_API extern tBTM_STATUS BTM_ConfigScoPath (tBTM_SCO_ROUTE_TYPE path,
+ BTM_API extern tBTM_STATUS BTM_ConfigScoPath (tBTM_SCO_ROUTE_TYPE path,
tBTM_SCO_DATA_CB *p_sco_data_cb,
tBTM_SCO_PCM_PARAM *p_pcm_param,
BOOLEAN err_data_rpt);
@@ -4502,20 +4502,20 @@ BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type);
** Function BTM_WriteScoData
**
** Description This function write SCO data to a specified instance. The data
-** to be written p_buf needs to carry an offset of
-** HCI_SCO_PREAMBLE_SIZE bytes, and the data length can not
+** to be written p_buf needs to carry an offset of
+** HCI_SCO_PREAMBLE_SIZE bytes, and the data length can not
** exceed BTM_SCO_DATA_SIZE_MAX bytes, whose default value is set
-** to 60 and is configurable. Data longer than the maximum bytes
-** will be truncated.
+** to 60 and is configurable. Data longer than the maximum bytes
+** will be truncated.
**
** Returns BTM_SUCCESS: data write is successful
** BTM_ILLEGAL_VALUE: SCO data contains illegal offset value.
-** BTM_SCO_BAD_LENGTH: SCO data length exceeds the max SCO packet
-** size.
+** BTM_SCO_BAD_LENGTH: SCO data length exceeds the max SCO packet
+** size.
** BTM_NO_RESOURCES: no resources.
** BTM_UNKNOWN_ADDR: unknown SCO connection handle, or SCO is not
** routed via HCI.
-**
+**
**
*******************************************************************************/
BTM_API extern tBTM_STATUS BTM_WriteScoData (UINT16 sco_inx, BT_HDR *p_buf);
diff --git a/stack/include/btm_ble_api.h b/stack/include/btm_ble_api.h
index 44e3d87..4bcd797 100644
--- a/stack/include/btm_ble_api.h
+++ b/stack/include/btm_ble_api.h
@@ -29,7 +29,7 @@ typedef UINT8 tBTM_BLE_SCAN_MODE;
typedef UINT8 tBTM_BLE_ADV_CHNL_MAP;
/*d efault advertising channel map */
-#ifndef BTM_BLE_DEFAULT_ADV_CHNL_MAP
+#ifndef BTM_BLE_DEFAULT_ADV_CHNL_MAP
#define BTM_BLE_DEFAULT_ADV_CHNL_MAP (BTM_BLE_ADV_CHNL_37| BTM_BLE_ADV_CHNL_38| BTM_BLE_ADV_CHNL_39)
#endif
@@ -71,7 +71,7 @@ typedef UINT8 tBTM_BLE_SFP;
#define BTM_BLE_CONN_SUP_TOUT_MAX 0x0C80
#define BTM_BLE_CONN_PARAM_UNDEF 0xffff /* use this value when a specific value not to be overwritten */
-/* default connection parameters if not configured, use GAP recommend value for auto/selective connection */
+/* default connection parameters if not configured, use GAP recommend value for auto/selective connection */
/* default scan interval */
#ifndef BTM_BLE_CONN_EST_SCAN_INT
#define BTM_BLE_CONN_EST_SCAN_INT 96 /* 312.5 ms = 500 *0.625 */
@@ -103,7 +103,7 @@ typedef UINT8 tBTM_BLE_SFP;
#endif
/* default supervision timeout */
#ifndef BTM_BLE_CONN_TIMEOUT_DEF
-#define BTM_BLE_CONN_TIMEOUT_DEF 2000
+#define BTM_BLE_CONN_TIMEOUT_DEF 2000
#endif
#define BTM_CMAC_TLEN_SIZE 8 /* 64 bits */
@@ -136,7 +136,7 @@ typedef struct
{
UINT8 adv_int_min;
UINT8 adv_int_max;
- tBTM_BLE_CHNL_MAP chnl_map;
+ tBTM_BLE_CHNL_MAP chnl_map;
}tBTM_BLE_ADV_PARAMS;
@@ -187,7 +187,7 @@ typedef struct
typedef struct
{
UINT8 num_service;
- BOOLEAN list_cmpl;
+ BOOLEAN list_cmpl;
UINT16 *p_uuid;
}tBTM_BLE_SERVICE;
@@ -203,7 +203,7 @@ typedef struct
#define BTM_BLE_NUM_AD_ATTR_MAX 10
#endif
/* attribute list contained in adv data */
-typedef struct
+typedef struct
{
UINT8 num_attr;
tBTM_BLE_ATTR attr_list[BTM_BLE_NUM_AD_ATTR_MAX];
@@ -215,7 +215,7 @@ typedef struct
UINT8 *p_val;
}tBTM_BLE_MANU;
-typedef struct
+typedef struct
{
UINT8 adv_type;
UINT8 len;
@@ -244,7 +244,7 @@ typedef struct
typedef struct
{
UINT8 conn_mode;
- tBTM_BLE_AD_MASK ad_mask; /* mask of the valid adv data field */
+ tBTM_BLE_AD_MASK ad_mask; /* mask of the valid adv data field */
UINT8 flag;
UINT8 tx_power_level;
UINT8 remote_name_len;
@@ -292,15 +292,15 @@ extern "C" {
** Returns TRUE if added OK, else FALSE
**
*******************************************************************************/
-BTM_API extern BOOLEAN BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name,
+BTM_API extern BOOLEAN BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name,
tBT_DEVICE_TYPE dev_type, tBLE_ADDR_TYPE addr_type);
/*******************************************************************************
**
** Function BTM_SecAddBleKey
**
-** 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
@@ -310,7 +310,7 @@ BTM_API extern BOOLEAN BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name,
** Returns TRUE if added OK, else FALSE
**
*******************************************************************************/
-BTM_API extern BOOLEAN BTM_SecAddBleKey (BD_ADDR bd_addr, tBTM_LE_KEY_VALUE *p_le_key,
+BTM_API extern BOOLEAN BTM_SecAddBleKey (BD_ADDR bd_addr, tBTM_LE_KEY_VALUE *p_le_key,
tBTM_LE_KEY_TYPE key_type);
/*******************************************************************************
@@ -320,11 +320,11 @@ BTM_API extern BOOLEAN BTM_SecAddBleKey (BD_ADDR bd_addr, tBTM_LE_KEY_VALUE *p_l
** Description This function is called to set advertising parameters.
**
** Parameters: None.
-**
+**
** Returns void
**
*******************************************************************************/
-BTM_API extern tBTM_STATUS BTM_BleSetAdvParams(UINT16 adv_int_min, UINT16 adv_int_max,
+BTM_API extern tBTM_STATUS BTM_BleSetAdvParams(UINT16 adv_int_min, UINT16 adv_int_max,
tBLE_BD_ADDR *p_dir_bda, tBTM_BLE_ADV_CHNL_MAP chnl_map);
/*******************************************************************************
@@ -334,11 +334,11 @@ BTM_API extern tBTM_STATUS BTM_BleSetAdvParams(UINT16 adv_int_min, UINT16 adv_in
** Description This function is called to write advertising data.
**
** Parameters: None.
-**
+**
** Returns void
**
*******************************************************************************/
-BTM_API extern tBTM_STATUS BTM_BleWriteAdvData(tBTM_BLE_AD_MASK data_mask,
+BTM_API extern tBTM_STATUS BTM_BleWriteAdvData(tBTM_BLE_AD_MASK data_mask,
tBTM_BLE_ADV_DATA *p_data);
/*******************************************************************************
@@ -349,9 +349,9 @@ BTM_API extern tBTM_STATUS BTM_BleWriteAdvData(tBTM_BLE_AD_MASK data_mask,
**
** Parameters adv_int_min: minimum advertising interval
** adv_int_max: maximum advertising interval
-** p_dir_bda: connectable direct initiator's LE device address
+** p_dir_bda: connectable direct initiator's LE device address
** chnl_map: advertising channel map.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -368,7 +368,7 @@ BTM_API extern void BTM_BleReadAdvParams (UINT16 *adv_int_min, UINT16 *adv_int_m
** Parameters adv_int_min: minimum advertising interval
** adv_int_max: maximum advertising interval
** scan_type: scan mode.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -382,11 +382,11 @@ BTM_API extern void BTM_BleSetScanParams(UINT16 scan_interval, UINT16 scan_windo
** Description This function is called to write LE scan response.
**
** Parameters: p_scan_rsp: scan response.
-**
+**
** Returns status
**
*******************************************************************************/
-BTM_API extern tBTM_STATUS BTM_BleWriteScanRsp(tBTM_BLE_AD_MASK data_mask,
+BTM_API extern tBTM_STATUS BTM_BleWriteScanRsp(tBTM_BLE_AD_MASK data_mask,
tBTM_BLE_ADV_DATA *p_data);
/*******************************************************************************
@@ -396,7 +396,7 @@ BTM_API extern tBTM_STATUS BTM_BleWriteScanRsp(tBTM_BLE_AD_MASK data_mask,
** Description This function is called to reset ULP controller.
**
** Parameters None.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -406,15 +406,15 @@ BTM_API extern void BTM_BleReset(void);
**
** Function BTM_BleObserve
**
-** Description This procedure keep the device listening for advertising
-** events from a broadcast device.
+** Description This procedure keep the device listening for advertising
+** events from a broadcast device.
**
** Parameters start: start or stop observe.
-**
+**
** Returns void
**
*******************************************************************************/
-BTM_API extern tBTM_STATUS BTM_BleObserve(BOOLEAN start, UINT8 duration,
+BTM_API extern tBTM_STATUS BTM_BleObserve(BOOLEAN start, UINT8 duration,
tBTM_INQ_RESULTS_CB *p_results_cb, tBTM_CMPL_CB *p_cmpl_cb);
@@ -463,8 +463,8 @@ BTM_API extern void BTM_GetDeviceDHK (BT_OCTET16 dhk);
** Description This function is called to grant security process.
**
** Parameters bd_addr - peer device bd address.
-** res - result of the operation BTM_SUCCESS if success.
-** Otherwise, BTM_REPEATED_ATTEMPTS is too many attempts.
+** res - result of the operation BTM_SUCCESS if success.
+** Otherwise, BTM_REPEATED_ATTEMPTS is too many attempts.
**
** Returns None
**
@@ -479,7 +479,7 @@ BTM_API extern void BTM_SecurityGrant(BD_ADDR bd_addr, UINT8 res);
** passkey request to the application.
**
** Parameters: bd_addr - Address of the device for which passkey was requested
-** res - result of the operation SMP_SUCCESS if success
+** res - result of the operation SMP_SUCCESS if success
** passkey - numeric value in the range of
** BTM_MIN_PASSKEY_VAL(0) - BTM_MAX_PASSKEY_VAL(999999(0xF423F)).
**
@@ -494,7 +494,7 @@ BTM_API extern void BTM_BlePasskeyReply (BD_ADDR bd_addr, UINT8 res, UINT32 pass
** SMP in response to BTM_LE_OOB_REQ_EVT
**
** Parameters: bd_addr - Address of the peer device
-** res - result of the operation SMP_SUCCESS if success
+** res - result of the operation SMP_SUCCESS if success
** p_data - simple pairing Randomizer C.
**
*******************************************************************************/
@@ -510,14 +510,14 @@ BTM_API extern void BTM_BleOobDataReply(BD_ADDR bd_addr, UINT8 res, UINT8 len, U
**
** Parameter bd_addr: target device the data to be signed for.
** p_text: singing data
-** len: length of the signing data
-** signature: output parameter where data signature is going to
-** be stored.
+** len: length of the signing data
+** signature: output parameter where data signature is going to
+** be stored.
**
** Returns TRUE if signing sucessul, otherwise FALSE.
**
*******************************************************************************/
-BTM_API extern BOOLEAN BTM_BleDataSignature (BD_ADDR bd_addr, UINT8 *p_text, UINT16 len,
+BTM_API extern BOOLEAN BTM_BleDataSignature (BD_ADDR bd_addr, UINT8 *p_text, UINT16 len,
BLE_SIGNATURE signature);
/*******************************************************************************
@@ -528,14 +528,14 @@ BTM_API extern BOOLEAN BTM_BleDataSignature (BD_ADDR bd_addr, UINT8 *p_text, UIN
**
** Parameter bd_addr: target device the data to be signed for.
** p_orig: original data before signature.
-** len: length of the signing data
+** len: length of the signing data
** counter: counter used when doing data signing
-** p_comp: signature to be compared against.
+** p_comp: signature to be compared against.
** Returns TRUE if signature verified correctly; otherwise FALSE.
**
*******************************************************************************/
-BTM_API extern BOOLEAN BTM_BleVerifySignature (BD_ADDR bd_addr, UINT8 *p_orig,
+BTM_API extern BOOLEAN BTM_BleVerifySignature (BD_ADDR bd_addr, UINT8 *p_orig,
UINT16 len, UINT32 counter,
UINT8 *p_comp);
@@ -583,17 +583,17 @@ BTM_API extern void BTM_BleLoadLocalKeys(UINT8 key_type, tBTM_BLE_LOCAL_KEYS *p_
**
** Function BTM_BleSetBgConnType
**
-** Description This function is called to set BLE background connection
+** Description This function is called to set BLE background connection
** procedure type. It can be auto connection, or selective connection.
**
-** Parameters conn_type: it can be auto connection, or selective connection.
+** Parameters conn_type: it can be auto connection, or selective connection.
** p_select_cback: callback function when selective connection procedure
** is being used.
-**
+**
** Returns void
**
*******************************************************************************/
-BTM_API extern BOOLEAN BTM_BleSetBgConnType(tBTM_BLE_CONN_TYPE conn_type,
+BTM_API extern BOOLEAN BTM_BleSetBgConnType(tBTM_BLE_CONN_TYPE conn_type,
tBTM_BLE_SEL_CBACK *p_select_cback);
/*******************************************************************************
@@ -607,7 +607,7 @@ BTM_API extern BOOLEAN BTM_BleSetBgConnType(tBTM_BLE_CONN_TYPE conn_type,
**
** Parameters add_remove: TRUE to add; FALSE to remove.
** remote_bda: device address to add/remove.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -620,7 +620,7 @@ BTM_API extern BOOLEAN BTM_BleUpdateBgConnDev(BOOLEAN add_remove, BD_ADDR remo
**
** Description Set a peripheral's preferred connection parameters. When
** any of the value does not want to be updated while others
-** do, use BTM_BLE_CONN_PARAM_UNDEF for the ones want to
+** do, use BTM_BLE_CONN_PARAM_UNDEF for the ones want to
** leave untouched.
**
** Parameters: bd_addr - BD address of the peripheral
@@ -660,7 +660,7 @@ BTM_API extern void BTM_BleSetConnScanParams (UINT16 scan_interval, UINT16 scan
** type - finding ADV data type
** p_length - return the length of ADV data not including type
**
-** Returns pointer of ADV data
+** Returns pointer of ADV data
**
*******************************************************************************/
BTM_API extern UINT8 *BTM_CheckAdvData( UINT8 *p_adv, UINT8 type, UINT8 *p_length);
@@ -669,25 +669,25 @@ BTM_API extern UINT8 *BTM_CheckAdvData( UINT8 *p_adv, UINT8 type, UINT8 *p_leng
**
** Function BTM_ReadDevInfo
**
-** Description This function is called to read the device/address type
-** of BD address.
+** Description This function is called to read the device/address type
+** of BD address.
**
** Parameter remote_bda: remote device address
** p_dev_type: output parameter to read the device type.
** p_addr_type: output parameter to read the address type.
**
*******************************************************************************/
-BTM_API extern void BTM_ReadDevInfo (BD_ADDR remote_bda, tBT_DEVICE_TYPE *p_dev_type,
+BTM_API extern void BTM_ReadDevInfo (BD_ADDR remote_bda, tBT_DEVICE_TYPE *p_dev_type,
tBLE_ADDR_TYPE *p_addr_type);
/*******************************************************************************
**
** Function BTM_BleBroadcast
**
-** Description This function is to start or stop broadcasting.
+** Description This function is to start or stop broadcasting.
**
** Parameters start: start or stop broadcasting.
-**
+**
** Returns status.
**
*******************************************************************************/
@@ -697,12 +697,12 @@ BTM_API extern tBTM_STATUS BTM_BleBroadcast(BOOLEAN start);
**
** Function BTM_RegisterScanReqEvt
**
-** Description This function is called to register a scan request callback
+** Description This function is called to register a scan request callback
** on the advertiser.
**
** Parameters p_scan_req_cback: scan request callback. If NULL, remove the
-** registration.
-**
+** registration.
+**
** Returns void
**
*******************************************************************************/
diff --git a/stack/include/btu.h b/stack/include/btu.h
index 8897ca6..6a3b68f 100644
--- a/stack/include/btu.h
+++ b/stack/include/btu.h
@@ -133,8 +133,8 @@ typedef void (*tBTU_EVENT_CALLBACK)(BT_HDR *p_hdr);
/* BTU internal timer for BLE activity */
#define BTU_TTYPE_BLE_INQUIRY 99
#define BTU_TTYPE_BLE_GAP_LIM_DISC 100
-#define BTU_TTYPE_ATT_WAIT_FOR_RSP 101
-#define BTU_TTYPE_SMP_PAIRING_CMD 102
+#define BTU_TTYPE_ATT_WAIT_FOR_RSP 101
+#define BTU_TTYPE_SMP_PAIRING_CMD 102
#define BTU_TTYPE_BLE_RANDOM_ADDR 103
#define BTU_TTYPE_ATT_WAIT_FOR_APP_RSP 104
#define BTU_TTYPE_ATT_WAIT_FOR_IND_ACK 105
@@ -246,7 +246,7 @@ BTU_API extern const BD_ADDR BT_BD_ANY;
/* Functions provided by btu_task.c
************************************
*/
-BTU_API extern void btu_start_timer (TIMER_LIST_ENT *p_tle, UINT16 type, UINT32 timeout);
+BTU_API extern void btu_start_timer (TIMER_LIST_ENT *p_tle, UINT16 type, UINT32 timeout);
BTU_API extern void btu_stop_timer (TIMER_LIST_ENT *p_tle);
BTU_API extern void btu_register_timer (TIMER_LIST_ENT *p_tle, UINT16 type, UINT32 timeout, tBTU_TIMER_CALLBACK timer_cb);
BTU_API extern void btu_deregister_timer(TIMER_LIST_ENT *p_tle);
@@ -257,13 +257,13 @@ BTU_API extern void btu_register_event_range (UINT16 range, tBTU_EVENT_CALLBACK
BTU_API extern void btu_deregister_event_range (UINT16 range);
BTU_API extern void btu_uipc_rx_cback(BT_HDR *p_msg);
-BTU_API extern void btu_hcif_flush_cmd_queue(void);
+BTU_API extern void btu_hcif_flush_cmd_queue(void);
/*
** Quick Timer
*/
#if defined(QUICK_TIMER_TICKS_PER_SEC) && (QUICK_TIMER_TICKS_PER_SEC > 0)
-#define QUICK_TIMER_TICKS (GKI_SECS_TO_TICKS (1)/QUICK_TIMER_TICKS_PER_SEC)
-BTU_API extern void btu_start_quick_timer (TIMER_LIST_ENT *p_tle, UINT16 type, UINT32 timeout);
+#define QUICK_TIMER_TICKS (GKI_SECS_TO_TICKS (1)/QUICK_TIMER_TICKS_PER_SEC)
+BTU_API extern void btu_start_quick_timer (TIMER_LIST_ENT *p_tle, UINT16 type, UINT32 timeout);
BTU_API extern void btu_stop_quick_timer (TIMER_LIST_ENT *p_tle);
BTU_API extern void btu_process_quick_timer_evt (void);
BTU_API extern void process_quick_timer_evt (TIMER_LIST_Q *p_tlq);
diff --git a/stack/include/gatt_api.h b/stack/include/gatt_api.h
index c2db201..1c64d1b 100644
--- a/stack/include/gatt_api.h
+++ b/stack/include/gatt_api.h
@@ -12,7 +12,7 @@
#define GATT_API_H
#include "bt_target.h"
-#include "gattdefs.h"
+#include "gattdefs.h"
/*****************************************************************************
** Constants
@@ -24,7 +24,7 @@
#define GATT_WRITE_NOT_PERMIT 0x0003
#define GATT_INVALID_PDU 0x0004
#define GATT_INSUF_AUTHENTICATION 0x0005
-#define GATT_REQ_NOT_SUPPORTED 0x0006
+#define GATT_REQ_NOT_SUPPORTED 0x0006
#define GATT_INVALID_OFFSET 0x0007
#define GATT_INSUF_AUTHORIZATION 0x0008
#define GATT_PREPARE_Q_FULL 0x0009
@@ -51,7 +51,7 @@
#define GATT_MORE 0x008a
#define GATT_INVALID_CFG 0x008b
#define GATT_SERVICE_STARTED 0x008c
-#define GATT_ENCRYPED_MITM GATT_SUCCESS
+#define GATT_ENCRYPED_MITM GATT_SUCCESS
#define GATT_ENCRYPED_NO_MITM 0x008d
#define GATT_NOT_ENCRYPTED 0x008e
@@ -62,30 +62,30 @@ typedef UINT8 tGATT_STATUS;
#define GATT_RSP_ERROR 0x01
#define GATT_REQ_MTU 0x02
#define GATT_RSP_MTU 0x03
-#define GATT_REQ_FIND_INFO 0x04
-#define GATT_RSP_FIND_INFO 0x05
+#define GATT_REQ_FIND_INFO 0x04
+#define GATT_RSP_FIND_INFO 0x05
#define GATT_REQ_FIND_TYPE_VALUE 0x06
#define GATT_RSP_FIND_TYPE_VALUE 0x07
-#define GATT_REQ_READ_BY_TYPE 0x08
-#define GATT_RSP_READ_BY_TYPE 0x09
-#define GATT_REQ_READ 0x0A
-#define GATT_RSP_READ 0x0B
-#define GATT_REQ_READ_BLOB 0x0C
-#define GATT_RSP_READ_BLOB 0x0D
-#define GATT_REQ_READ_MULTI 0x0E
-#define GATT_RSP_READ_MULTI 0x0F
-#define GATT_REQ_READ_BY_GRP_TYPE 0x10
-#define GATT_RSP_READ_BY_GRP_TYPE 0x11
+#define GATT_REQ_READ_BY_TYPE 0x08
+#define GATT_RSP_READ_BY_TYPE 0x09
+#define GATT_REQ_READ 0x0A
+#define GATT_RSP_READ 0x0B
+#define GATT_REQ_READ_BLOB 0x0C
+#define GATT_RSP_READ_BLOB 0x0D
+#define GATT_REQ_READ_MULTI 0x0E
+#define GATT_RSP_READ_MULTI 0x0F
+#define GATT_REQ_READ_BY_GRP_TYPE 0x10
+#define GATT_RSP_READ_BY_GRP_TYPE 0x11
#define GATT_REQ_WRITE 0x12 /* 0001-0010 (write)*/
-#define GATT_RSP_WRITE 0x13
-#define GATT_CMD_WRITE 0x52 /* changed in V4.0 01001-0010(write cmd)*/
-#define GATT_REQ_PREPARE_WRITE 0x16
-#define GATT_RSP_PREPARE_WRITE 0x17
-#define GATT_REQ_EXEC_WRITE 0x18
-#define GATT_RSP_EXEC_WRITE 0x19
-#define GATT_HANDLE_VALUE_NOTIF 0x1B
-#define GATT_HANDLE_VALUE_IND 0x1D
-#define GATT_HANDLE_VALUE_CONF 0x1E
+#define GATT_RSP_WRITE 0x13
+#define GATT_CMD_WRITE 0x52 /* changed in V4.0 01001-0010(write cmd)*/
+#define GATT_REQ_PREPARE_WRITE 0x16
+#define GATT_RSP_PREPARE_WRITE 0x17
+#define GATT_REQ_EXEC_WRITE 0x18
+#define GATT_RSP_EXEC_WRITE 0x19
+#define GATT_HANDLE_VALUE_NOTIF 0x1B
+#define GATT_HANDLE_VALUE_IND 0x1D
+#define GATT_HANDLE_VALUE_CONF 0x1E
#define GATT_SIGN_CMD_WRITE 0xD2 /* changed in V4.0 1101-0010 (signed write) see write cmd above*/
#define GATT_OP_CODE_MAX GATT_HANDLE_VALUE_CONF + 1 /* 0x1E = 30 + 1 = 31*/
@@ -102,16 +102,16 @@ typedef UINT8 tGATT_STATUS;
#define GATT_CONN_CANCEL L2CAP_CONN_CANCEL /* 0x0100 L2CAP connection cancelled */
typedef UINT16 tGATT_DISCONN_REASON;
-/* MAX GATT MTU size
+/* MAX GATT MTU size
*/
-#ifndef GATT_MAX_MTU_SIZE
+#ifndef GATT_MAX_MTU_SIZE
#define GATT_MAX_MTU_SIZE 517
#endif
-/* max legth of an attribute value
+/* max legth of an attribute value
*/
-#ifndef GATT_MAX_ATTR_LEN
- #define GATT_MAX_ATTR_LEN 600
+#ifndef GATT_MAX_ATTR_LEN
+ #define GATT_MAX_ATTR_LEN 600
#endif
/* default GATT MTU size over LE link
@@ -122,17 +122,17 @@ typedef UINT16 tGATT_DISCONN_REASON;
*/
#define GATT_INVALID_CONN_ID 0xFFFF
-#ifndef GATT_CL_MAX_LCB
+#ifndef GATT_CL_MAX_LCB
#define GATT_CL_MAX_LCB 22
#endif
-#ifndef GATT_MAX_SCCB
+#ifndef GATT_MAX_SCCB
#define GATT_MAX_SCCB 10
#endif
-/* GATT notification caching timer, default to be three seconds
+/* GATT notification caching timer, default to be three seconds
*/
#ifndef GATTC_NOTIF_TIMEOUT
#define GATTC_NOTIF_TIMEOUT 3
@@ -144,7 +144,7 @@ typedef UINT16 tGATT_DISCONN_REASON;
/* Attribute permissions
*/
-#define GATT_PERM_READ (1 << 0) /* bit 0 */
+#define GATT_PERM_READ (1 << 0) /* bit 0 */
#define GATT_PERM_READ_ENCRYPTED (1 << 1) /* bit 1 */
#define GATT_PERM_READ_ENC_MITM (1 << 2) /* bit 2 */
#define GATT_PERM_WRITE (1 << 4) /* bit 4 */
@@ -154,7 +154,7 @@ typedef UINT16 tGATT_DISCONN_REASON;
#define GATT_PERM_WRITE_SIGNED_MITM (1 << 8) /* bit 8 */
typedef UINT16 tGATT_PERM;
-#define GATT_ENCRYPT_KEY_SIZE_MASK (0xF000) /* the MS nibble of tGATT_PERM; key size 7=0; size 16=9 */
+#define GATT_ENCRYPT_KEY_SIZE_MASK (0xF000) /* the MS nibble of tGATT_PERM; key size 7=0; size 16=9 */
#define GATT_READ_ALLOWED (GATT_PERM_READ | GATT_PERM_READ_ENCRYPTED | GATT_PERM_READ_ENC_MITM)
#define GATT_READ_AUTH_REQUIRED (GATT_PERM_READ_ENC_MITM)
@@ -223,7 +223,7 @@ enum
};
typedef UINT8 tGATT_FORMAT;
-/* Characteristic Presentation Format Descriptor value
+/* Characteristic Presentation Format Descriptor value
*/
typedef struct
{
@@ -258,15 +258,15 @@ typedef struct
#define GATT_CHAR_BIT_WRITE_AUX 0x0002 /* permits writes to the characteristic descriptor */
-/* characteristic descriptor: client configuration value
+/* characteristic descriptor: client configuration value
*/
-#define GATT_CLT_CONFIG_NONE 0x0000
+#define GATT_CLT_CONFIG_NONE 0x0000
#define GATT_CLT_CONFIG_NOTIFICATION 0x0001
#define GATT_CLT_CONFIG_INDICATION 0x0002
typedef UINT16 tGATT_CLT_CHAR_CONFIG;
-/* characteristic descriptor: server configuration value
+/* characteristic descriptor: server configuration value
*/
#define GATT_SVR_CONFIG_NONE 0x0000
#define GATT_SVR_CONFIG_BROADCAST 0x0001
@@ -283,10 +283,10 @@ typedef UINT16 tGATT_SVR_CHAR_CONFIG;
#define GATT_AUTH_REQ_NO_MITM 1 /* unauthenticated encryption */
#define GATT_AUTH_REQ_MITM 2 /* authenticated encryption */
#define GATT_AUTH_REQ_SIGNED_NO_MITM 3
-#define GATT_AUTH_REQ_SIGNED_MITM 4
+#define GATT_AUTH_REQ_SIGNED_MITM 4
typedef UINT8 tGATT_AUTH_REQ;
-/* Attribute Value structure
+/* Attribute Value structure
*/
typedef struct
{
@@ -314,7 +314,7 @@ enum
{
GATT_TRANSPORT_LE,
GATT_TRANSPORT_BR_EDR,
- GATT_TRANSPORT_LE_BR_EDR
+ GATT_TRANSPORT_LE_BR_EDR
};
typedef UINT8 tGATT_TRANSPORT;
@@ -349,7 +349,7 @@ typedef union
tGATT_WRITE_REQ write_req; /* write */
/* prepare write */
/* write blob */
- UINT16 handle; /* handle value confirmation */
+ UINT16 handle; /* handle value confirmation */
UINT16 mtu; /* MTU exchange request */
tGATT_EXEC_FLAG exec_write; /* execute write */
} tGATTS_DATA;
@@ -368,7 +368,7 @@ typedef UINT8 tGATTS_REQ_TYPE;
-/* Client Used Data Structure
+/* Client Used Data Structure
*/
/* definition of different discovery types */
enum
@@ -404,7 +404,7 @@ enum
};
typedef UINT8 tGATT_READ_TYPE;
-/* Read By Type Request (GATT_READ_BY_TYPE) Data
+/* Read By Type Request (GATT_READ_BY_TYPE) Data
*/
typedef struct
{
@@ -414,7 +414,7 @@ typedef struct
tBT_UUID uuid;
} tGATT_READ_BY_TYPE;
-/* GATT_READ_MULTIPLE request data
+/* GATT_READ_MULTIPLE request data
*/
#define GATT_MAX_READ_MULTI_HANDLES 10 /* Max attributes to read in one request */
typedef struct
@@ -428,18 +428,18 @@ typedef struct
typedef struct
{
tGATT_AUTH_REQ auth_req;
- UINT16 handle;
+ UINT16 handle;
} tGATT_READ_BY_HANDLE;
/* READ_BT_HANDLE_Request data */
typedef struct
{
tGATT_AUTH_REQ auth_req;
- UINT16 handle;
+ UINT16 handle;
UINT16 offset;
} tGATT_READ_PARTIAL;
-/* Read Request Data
+/* Read Request Data
*/
typedef union
{
@@ -475,12 +475,12 @@ typedef union
#define GATTC_OPTYPE_READ 2
#define GATTC_OPTYPE_WRITE 3
#define GATTC_OPTYPE_EXE_WRITE 4
-#define GATTC_OPTYPE_CONFIG 5
+#define GATTC_OPTYPE_CONFIG 5
#define GATTC_OPTYPE_NOTIFICATION 6
#define GATTC_OPTYPE_INDICATION 7
typedef UINT8 tGATTC_OPTYPE;
-/* characteristic declaration
+/* characteristic declaration
*/
typedef struct
{
@@ -489,8 +489,8 @@ typedef struct
tBT_UUID char_uuid; /* characteristic UUID type */
} tGATT_CHAR_DCLR_VAL;
-/* primary service group data
-*/
+/* primary service group data
+*/
typedef struct
{
UINT16 e_handle; /* ending handle of the group */
@@ -498,7 +498,7 @@ typedef struct
} tGATT_GROUP_VALUE;
-/* included service attribute value
+/* included service attribute value
*/
typedef struct
{
@@ -510,17 +510,17 @@ typedef struct
typedef union
{
tGATT_INCL_SRVC incl_service; /* include service value */
- tGATT_GROUP_VALUE group_value; /* Service UUID type.
- This field is used with GATT_DISC_SRVC_ALL
+ tGATT_GROUP_VALUE group_value; /* Service UUID type.
+ This field is used with GATT_DISC_SRVC_ALL
type of discovery result callback. */
- UINT16 handle; /* When used with GATT_DISC_SRVC_BY_UUID type
- discovery result, it is the ending handle of a
- known service to be discovered. When used with
- GATT_DISC_INC_SRVC type discovery result,
+ UINT16 handle; /* When used with GATT_DISC_SRVC_BY_UUID type
+ discovery result, it is the ending handle of a
+ known service to be discovered. When used with
+ GATT_DISC_INC_SRVC type discovery result,
it is the included service starting handle.*/
- tGATT_CHAR_DCLR_VAL dclr_value; /* Characteristic declaration value.
+ tGATT_CHAR_DCLR_VAL dclr_value; /* Characteristic declaration value.
This field is used with GATT_DISC_CHAR type discovery.*/
} tGATT_DISC_VALUE;
@@ -538,7 +538,7 @@ typedef UINT8 tGATT_IF;
#define GATT_LINK_IDLE_TIMEOUT_WHEN_NO_APP 0 /* start a idle timer for this duration when no application
need to use the link */
-#define GATT_LINK_NO_IDLE_TIMEOUT 0xFFFF
+#define GATT_LINK_NO_IDLE_TIMEOUT 0xFFFF
#define GATT_INVALID_ACL_HANDLE 0xFFFF
/* discover result callback function */
@@ -567,9 +567,9 @@ typedef struct
{
tGATT_CONN_CBACK *p_conn_cb;
tGATT_CMPL_CBACK *p_cmpl_cb;
- tGATT_DISC_RES_CB *p_disc_res_cb;
- tGATT_DISC_CMPL_CB *p_disc_cmpl_cb;
- tGATT_REQ_CBACK *p_req_cb;
+ tGATT_DISC_RES_CB *p_disc_res_cb;
+ tGATT_DISC_CMPL_CB *p_disc_cmpl_cb;
+ tGATT_REQ_CBACK *p_req_cb;
} tGATT_CBACK;
/*********************** Start Handle Management Definitions **********************
@@ -580,7 +580,7 @@ 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 */
@@ -595,7 +595,7 @@ typedef struct
#define GATTS_SRV_CHG_CMD_READ_CLENT 5
typedef UINT8 tGATTS_SRV_CHG_CMD;
-typedef struct
+typedef struct
{
BD_ADDR bda;
BOOLEAN srv_changed;
@@ -616,7 +616,7 @@ typedef union
-typedef struct
+typedef struct
{
tGATTS_HNDL_RANGE *p_new_srv_start;
} tGATTS_PENDING_NEW_SRV_START;
@@ -666,8 +666,8 @@ extern "C"
** Function GATTS_AddHandleRange
**
** Description This function add the allocated handles range for the specifed
-** application UUID, service UUID and service instance
-**
+** application UUID, service UUID and service instance
+**
** Parameter p_hndl_range: pointer to allocated handles information
**
** Returns TRUE if handle range is added sucessfully; otherwise FALSE.
@@ -681,7 +681,7 @@ extern "C"
** Function GATTS_NVRegister
**
** Description Application manager calls this function to register for
-** NV save callback function. There can be one and only one
+** NV save callback function. There can be one and only one
** NV save callback function.
**
** Parameter p_cb_info : callback informaiton
@@ -722,11 +722,11 @@ extern "C"
** Parameter service_handle : To which service this included service is added to.
** include_svc_handle : included service handle.
**
-** Returns included service attribute handle. If 0, add included service
+** Returns included service attribute handle. If 0, add included service
** fail.
**
*******************************************************************************/
- GATT_API extern UINT16 GATTS_AddIncludeService (UINT16 service_handle,
+ GATT_API extern UINT16 GATTS_AddIncludeService (UINT16 service_handle,
UINT16 include_svc_handle);
@@ -744,7 +744,7 @@ extern "C"
** perm : Characteristic value declaration attribute permission.
** property : Characteristic Properties
**
-** Returns Characteristic value declaration attribute handle. 0 if add
+** Returns Characteristic value declaration attribute handle. 0 if add
** characteristic failed.
**
*******************************************************************************/
@@ -755,18 +755,18 @@ extern "C"
**
** Function GATTS_AddCharDescriptor
**
-** Description This function is called to add a characteristic descriptor
-** into a service database. Add descriptor should follow add char
-** to which it belongs, and next add char should be done only
+** Description This function is called to add a characteristic descriptor
+** into a service database. Add descriptor should follow add char
+** to which it belongs, and next add char should be done only
** after all add descriptors for the previous char.
**
-** Parameter service_handle : To which service this characteristic descriptor
+** Parameter service_handle : To which service this characteristic descriptor
** is added to.
-** perm : Characteristic value declaration attribute
+** perm : Characteristic value declaration attribute
** permission.
** p_descr_uuid : Characteristic descriptor UUID.
**
-** Returns Characteristic descriptor attribute handle. 0 if add
+** Returns Characteristic descriptor attribute handle. 0 if add
** characteristic descriptor failed.
**
*******************************************************************************/
@@ -801,7 +801,7 @@ extern "C"
** return GATT_SUCCESS if sucessfully started; otherwise error code.
**
*******************************************************************************/
- GATT_API extern tGATT_STATUS GATTS_StartService (tGATT_IF gatt_if, UINT16 service_handle,
+ GATT_API extern tGATT_STATUS GATTS_StartService (tGATT_IF gatt_if, UINT16 service_handle,
tGATT_TRANSPORT sup_transport);
@@ -809,10 +809,10 @@ extern "C"
**
** Function GATTS_StopService
**
-** Description This function is called to stop a service
-**
-** Parameter service_handle : this is the start handle of a service
+** Description This function is called to stop a service
**
+** Parameter service_handle : this is the start handle of a service
+**
** Returns None.
**
*******************************************************************************/
@@ -823,7 +823,7 @@ extern "C"
**
** Function GATTs_HandleValueIndication
**
-** Description This function sends a handle value indication to a client.
+** Description This function sends a handle value indication to a client.
**
** Parameter conn_id: connection identifier.
** attr_handle: Attribute handle of this handle value indication.
@@ -833,15 +833,15 @@ extern "C"
** Returns GATT_SUCCESS if sucessfully sent or queued; otherwise error code.
**
*******************************************************************************/
- GATT_API extern tGATT_STATUS GATTS_HandleValueIndication (UINT16 conn_id,
- UINT16 attr_handle,
+ GATT_API extern tGATT_STATUS GATTS_HandleValueIndication (UINT16 conn_id,
+ UINT16 attr_handle,
UINT16 val_len, UINT8 *p_val);
/*******************************************************************************
**
** Function GATTS_HandleValueNotification
**
-** Description This function sends a handle value notification to a client.
+** Description This function sends a handle value notification to a client.
**
** Parameter conn_id: connection identifier.
** attr_handle: Attribute handle of this handle value indication.
@@ -869,7 +869,7 @@ extern "C"
** Returns GATT_SUCCESS if sucessfully sent; otherwise error code.
**
*******************************************************************************/
- GATT_API extern tGATT_STATUS GATTS_SendRsp (UINT16 conn_id, UINT32 trans_id,
+ GATT_API extern tGATT_STATUS GATTS_SendRsp (UINT16 conn_id, UINT32 trans_id,
tGATT_STATUS status, tGATTS_RSP *p_msg);
@@ -879,96 +879,96 @@ extern "C"
/*******************************************************************************
**
-** Function GATTC_ConfigureMTU
+** Function GATTC_ConfigureMTU
**
** Description This function is called to configure the ATT MTU size for
** a connection on an LE transport.
**
-** Parameters conn_id: connection identifier.
+** Parameters conn_id: connection identifier.
** mtu - attribute MTU size..
**
-** Returns GATT_SUCCESS if command started successfully.
+** Returns GATT_SUCCESS if command started successfully.
**
*******************************************************************************/
GATT_API extern tGATT_STATUS GATTC_ConfigureMTU (UINT16 conn_id, UINT16 mtu);
/*******************************************************************************
**
-** Function GATTC_Discover
+** Function GATTC_Discover
**
** Description This function is called to do a discovery procedure on ATT server.
**
-** Parameters conn_id: connection identifier.
+** Parameters conn_id: connection identifier.
** disc_type:discovery type.
** p_param: parameters of discovery requirement.
**
-** Returns GATT_SUCCESS if command received/sent successfully.
+** Returns GATT_SUCCESS if command received/sent successfully.
**
*******************************************************************************/
- GATT_API extern tGATT_STATUS GATTC_Discover (UINT16 conn_id,
- tGATT_DISC_TYPE disc_type,
+ GATT_API extern tGATT_STATUS GATTC_Discover (UINT16 conn_id,
+ tGATT_DISC_TYPE disc_type,
tGATT_DISC_PARAM *p_param );
/*******************************************************************************
**
-** Function GATTC_Read
+** Function GATTC_Read
**
** Description This function is called to read the value of an attribute from
** the server.
**
-** Parameters conn_id: connection identifier.
+** Parameters conn_id: connection identifier.
** type - attribute read type.
** p_read - read operation parameters.
**
-** Returns GATT_SUCCESS if command started successfully.
+** Returns GATT_SUCCESS if command started successfully.
**
*******************************************************************************/
- GATT_API extern tGATT_STATUS GATTC_Read (UINT16 conn_id, tGATT_READ_TYPE type,
+ GATT_API extern tGATT_STATUS GATTC_Read (UINT16 conn_id, tGATT_READ_TYPE type,
tGATT_READ_PARAM *p_read);
/*******************************************************************************
**
-** Function GATTC_Write
+** Function GATTC_Write
**
** Description This function is called to read the value of an attribute from
** the server.
**
-** Parameters conn_id: connection identifier.
+** Parameters conn_id: connection identifier.
** type - attribute write type.
** p_write - write operation parameters.
**
-** Returns GATT_SUCCESS if command started successfully.
+** Returns GATT_SUCCESS if command started successfully.
**
*******************************************************************************/
- GATT_API extern tGATT_STATUS GATTC_Write (UINT16 conn_id, tGATT_WRITE_TYPE type,
+ GATT_API extern tGATT_STATUS GATTC_Write (UINT16 conn_id, tGATT_WRITE_TYPE type,
tGATT_VALUE *p_write);
/*******************************************************************************
**
-** Function GATTC_ExecuteWrite
+** Function GATTC_ExecuteWrite
**
** Description This function is called to send an Execute write request to
** the server.
**
-** Parameters conn_id: connection identifier.
+** Parameters conn_id: connection identifier.
** is_execute - to execute or cancel the prepare write requet(s)
**
-** Returns GATT_SUCCESS if command started successfully.
+** Returns GATT_SUCCESS if command started successfully.
**
*******************************************************************************/
GATT_API extern tGATT_STATUS GATTC_ExecuteWrite (UINT16 conn_id, BOOLEAN is_execute);
/*******************************************************************************
**
-** Function GATTC_SendHandleValueConfirm
+** Function GATTC_SendHandleValueConfirm
**
** Description This function is called to send a handle value confirmation
** as response to a handle value notification from server.
**
-** Parameters conn_id: connection identifier.
+** Parameters conn_id: connection identifier.
** handle: the handle of the attribute confirmation.
**
-** Returns GATT_SUCCESS if command started successfully.
+** Returns GATT_SUCCESS if command started successfully.
**
*******************************************************************************/
GATT_API extern tGATT_STATUS GATTC_SendHandleValueConfirm (UINT16 conn_id, UINT16 handle);
@@ -978,7 +978,7 @@ extern "C"
**
** Function GATT_SetIdleTimeout
**
-** Description This function (common to both client and server) sets the idle
+** Description This function (common to both client and server) sets the idle
** timeout for a tansport connection
**
** Parameter bd_addr: target device bd address.
@@ -994,7 +994,7 @@ extern "C"
**
** Function GATT_Register
**
-** Description This function is called to register an application
+** Description This function is called to register an application
** with GATT
**
** Parameter p_app_uuid128: Application UUID
@@ -1009,11 +1009,11 @@ extern "C"
**
** Function GATT_Deregister
**
-** Description This function deregistered the application from GATT.
+** Description This function deregistered the application from GATT.
**
** Parameters gatt_if: applicaiton interface.
**
-** Returns None.
+** Returns None.
**
*******************************************************************************/
GATT_API extern void GATT_Deregister (tGATT_IF gatt_if);
@@ -1039,7 +1039,7 @@ extern "C"
**
** Description This function initiate a connecttion to a ATT server.
**
-** Parameters gatt_if: applicaiton interface
+** Parameters gatt_if: applicaiton interface
** bd_addr: peer device address.
** is_direct: is a direct conenection or a background auto connection
**
@@ -1056,7 +1056,7 @@ extern "C"
** Description This function initiate a cancel connecttion to a ATT server.
**
** Parameters gatt_if: client interface. If 0 used as unconditionally disconnect,
-** typically used for direct connection cancellation.
+** typically used for direct connection cancellation.
** bd_addr: peer device address.
** is_direct: is a direct conenection or a background auto connection
**
@@ -1071,7 +1071,7 @@ extern "C"
**
** Description This function disconnect a logic channel.
**
-** Parameters conn_id: connection identifier.
+** Parameters conn_id: connection identifier.
**
** Returns GATT_SUCCESS if disconnected.
**
@@ -1088,7 +1088,7 @@ extern "C"
** interface
**
** Parameters conn_id: connection id (input)
-** p_gatt_if: applicaiton interface (output)
+** p_gatt_if: applicaiton interface (output)
** bd_addr: peer device address. (output)
**
** Returns TRUE the ligical link information is found for conn_id
@@ -1104,17 +1104,17 @@ extern "C"
** Description This function find the conn_id if the logical link for BD address
** and applciation interface is connected
**
-** Parameters gatt_if: applicaiton interface (input)
+** Parameters gatt_if: applicaiton interface (input)
** bd_addr: peer device address. (input)
** p_conn_id: connection id (output)
**
-** Returns TRUE the ligical link is connected
+** Returns TRUE the ligical link is connected
**
*******************************************************************************/
GATT_API extern BOOLEAN GATT_GetConnIdIfConnected(tGATT_IF gatt_if, BD_ADDR bd_addr, UINT16 *p_conn_id);
#ifdef __cplusplus
-
+
}
#endif
diff --git a/stack/include/gattdefs.h b/stack/include/gattdefs.h
index b7c1375..def3270 100644
--- a/stack/include/gattdefs.h
+++ b/stack/include/gattdefs.h
@@ -64,10 +64,10 @@
#define GATT_UUID_RINGER_SETTING 0x2A41 /* ringer setting */
/* Glucose Service */
-#define GATT_UUID_GM_MEASUREMENT 0x2A18
-#define GATT_UUID_GM_CONTEXT 0x2A34
-#define GATT_UUID_GM_CONTROL_POINT 0x2A52
-#define GATT_UUID_GM_FEATURE 0x2A51
+#define GATT_UUID_GM_MEASUREMENT 0x2A18
+#define GATT_UUID_GM_CONTEXT 0x2A34
+#define GATT_UUID_GM_CONTROL_POINT 0x2A52
+#define GATT_UUID_GM_FEATURE 0x2A51
/* device infor characteristic */
#define GATT_UUID_SYSTEM_ID 0x2A23
diff --git a/stack/include/goep_fs.h b/stack/include/goep_fs.h
index dd2b198..095449a 100644
--- a/stack/include/goep_fs.h
+++ b/stack/include/goep_fs.h
@@ -125,7 +125,7 @@ typedef struct
**
** Callback Function: tGOEP_OPEN_CBACK
**
-** Description This function is executed by OBX profiles to open
+** Description This function is executed by OBX profiles to open
** a file for reading or writing.
**
** Parameters p_path - Fully qualified path and file name.
@@ -134,7 +134,7 @@ typedef struct
** event_id - code that must be passed to the call-in function.
**
** Returns void
-**
+**
** Note: Upon completion of the request, a file descriptor (tGOEP_FD),
** file size (UINT32), and an status code (tGOEP_STATUS)
** are returned in GOEP_OpenRsp().
@@ -151,7 +151,7 @@ typedef void (tGOEP_OPEN_CBACK) (const UINT8 *p_name, UINT16 flags, UINT32 size,
** is no longer in use.
**
** Returns void
-**
+**
*******************************************************************************/
typedef void (tGOEP_CLOSE_CBACK) (tGOEP_FD fd, UINT8 app_id);
@@ -159,11 +159,11 @@ typedef void (tGOEP_CLOSE_CBACK) (tGOEP_FD fd, UINT8 app_id);
**
** Callback Function: tGOEP_READ_CBACK
**
-** Description This function is executed by OBX profiles to read in data from the
+** Description This function is executed by OBX profiles to read in data from the
** previously opened file.
**
** Returns void
-**
+**
** Note: Upon completion of the request, GOEP_ReadRsp() is
** called with the buffer of data, along with the number
** of bytes read into the buffer, and a status. The
@@ -179,11 +179,11 @@ typedef void (tGOEP_READ_CBACK) (tGOEP_FD fd, void *p_data, INT16 size,
**
** Callback Function: tGOEP_WRITE_CBACK
**
-** Description This function is executed by OBX profiles to write the data to the
+** Description This function is executed by OBX profiles to write the data to the
** previously opened file.
**
** Returns void
-**
+**
** Note: Upon completion of the request, GOEP_WriteRsp() is
** called with the file descriptor and the status. The
** call-in function should only be called when ALL requested
@@ -198,11 +198,11 @@ typedef void (tGOEP_WRITE_CBACK) (tGOEP_FD fd, const void *p_data, INT16 size,
** Callback Function: tGOEP_SEEK_CBACK
**
** Description This function is executed by OBX profiles to Move a file pointer
-** of a previously opened file to the specified location for the
+** of a previously opened file to the specified location for the
** next read or write operation.
**
** Returns void
-**
+**
*******************************************************************************/
typedef void (tGOEP_SEEK_CBACK) (tGOEP_FD fd, INT32 offset, INT16 origin, UINT8 app_id);
@@ -223,7 +223,7 @@ typedef void (tGOEP_SEEK_CBACK) (tGOEP_FD fd, INT32 offset, INT16 origin, UINT8
** event_id - event that must be passed into the call-in function.
**
** Returns void
-**
+**
** Note: Upon completion of the request, GOEP_DirentryRsp() is
** filled in entry and the status.
** GOEP_OK is returned when p_entry is valid,
@@ -246,7 +246,7 @@ typedef void (tGOEP_DIRENTRY_CBACK) (const char *p_path, BOOLEAN first_item,
** [GOEP_OK if it exists]
** [GOEP_EACCES if permissions are wrong]
** [GOEP_FAIL if it does not exist]
-**
+**
*******************************************************************************/
typedef tGOEP_STATUS (tGOEP_ACCESS_CBACK) (const char *p_path, UINT16 mode,
BOOLEAN *p_is_dir, UINT8 app_id);
@@ -264,7 +264,7 @@ typedef tGOEP_STATUS (tGOEP_ACCESS_CBACK) (const char *p_path, UINT16 mode,
** Returns (tGOEP_STATUS) status of the call.
** [GOEP_OK if successful]
** [GOEP_FAIL if unsuccessful]
-**
+**
*******************************************************************************/
typedef tGOEP_STATUS (tGOEP_MKDIR_CBACK) (const char *p_path, UINT8 app_id);
@@ -282,7 +282,7 @@ typedef tGOEP_STATUS (tGOEP_MKDIR_CBACK) (const char *p_path, UINT8 app_id);
** [GOEP_EACCES if read-only]
** [GOEP_ENOTEMPTY if directory is not empty]
** [GOEP_FAIL otherwise]
-**
+**
*******************************************************************************/
typedef tGOEP_STATUS (tGOEP_RMDIR_CBACK) (const char *p_path, UINT8 app_id);
@@ -299,7 +299,7 @@ typedef tGOEP_STATUS (tGOEP_RMDIR_CBACK) (const char *p_path, UINT8 app_id);
** [GOEP_OK if successful]
** [GOEP_EACCES if read-only]
** [GOEP_FAIL otherwise]
-**
+**
*******************************************************************************/
typedef tGOEP_STATUS (tGOEP_UNLINK_CBACK) (const char *p_path, UINT8 app_id);
@@ -374,7 +374,7 @@ GOEP_API extern void GOEP_WriteRsp (tGOEP_FD fd, tGOEP_STATUS status, UINT16 eve
** GOEP_FAIL if any errors have occurred.
** event_id - event id as given in the tGOEP_DIRENTRY_CBACK function.
**
-** Returns void
+** Returns void
**
*******************************************************************************/
GOEP_API extern void GOEP_DirentryRsp(tGOEP_STATUS status, UINT16 event_id);
diff --git a/stack/include/hcidefs.h b/stack/include/hcidefs.h
index 839ec32..c2ee429 100644
--- a/stack/include/hcidefs.h
+++ b/stack/include/hcidefs.h
@@ -22,7 +22,7 @@
#define HCI_PROTO_VERSION_2_1 0x04 /* Version for BT spec 2.1 [Lisbon] */
#define HCI_PROTO_VERSION_3_0 0x05 /* Version for BT spec 3.0 */
#define HCI_PROTO_REVISION 0x000C /* Current implementation version */
-/*
+/*
** Definitions for HCI groups
*/
#define HCI_GRP_LINK_CONTROL_CMDS (0x01 << 10) /* 0x0400 */
@@ -205,7 +205,7 @@
#define HCI_SHORT_RANGE_MODE (0x006B | HCI_GRP_HOST_CONT_BASEBAND_CMDS) /* 802.11 only */
#define HCI_CONT_BASEBAND_CMDS_FIRST HCI_SET_EVENT_MASK
-#define HCI_CONT_BASEBAND_CMDS_LAST HCI_SHORT_RANGE_MODE
+#define HCI_CONT_BASEBAND_CMDS_LAST HCI_SHORT_RANGE_MODE
/* Commands of HCI_GRP_INFORMATIONAL_PARAMS group */
@@ -250,7 +250,7 @@
#define HCI_AMP_TEST_END (0x0008 | HCI_GRP_TESTING_CMDS)
#define HCI_AMP_TEST (0x0009 | HCI_GRP_TESTING_CMDS)
-#define HCI_TESTING_CMDS_FIRST HCI_READ_LOOPBACK_MODE
+#define HCI_TESTING_CMDS_FIRST HCI_READ_LOOPBACK_MODE
#define HCI_TESTING_CMDS_LAST HCI_AMP_TEST
#define HCI_VENDOR_CMDS_FIRST 0x0001
@@ -377,18 +377,18 @@
/* ULP HCI Event */
#define HCI_BLE_EVENT 0x03E
/* ULP Event sub code */
-#define HCI_BLE_CONN_COMPLETE_EVT 0x01
-#define HCI_BLE_ADV_PKT_RPT_EVT 0x02
-#define HCI_BLE_LL_CONN_PARAM_UPD_EVT 0x03
+#define HCI_BLE_CONN_COMPLETE_EVT 0x01
+#define HCI_BLE_ADV_PKT_RPT_EVT 0x02
+#define HCI_BLE_LL_CONN_PARAM_UPD_EVT 0x03
#define HCI_BLE_READ_REMOTE_FEAT_CMPL_EVT 0x04
#define HCI_BLE_LTK_REQ_EVT 0x05
-#define HCI_EVENT_RSP_FIRST HCI_INQUIRY_COMP_EVT
+#define HCI_EVENT_RSP_FIRST HCI_INQUIRY_COMP_EVT
#define HCI_EVENT_RSP_LAST HCI_AMP_STATUS_CHANGE_EVT
#define HCI_VENDOR_SPECIFIC_EVT 0xFF /* Vendor specific events */
#define HCI_NAP_TRACE_EVT 0xFF /* was define 0xFE, 0xFD, change to 0xFF
- because conflict w/ TCI_EVT and per
+ because conflict w/ TCI_EVT and per
specification compliant */
@@ -435,7 +435,7 @@
#define HCI_ERR_LMP_ERR_TRANS_COLLISION 0x23
#define HCI_ERR_LMP_PDU_NOT_ALLOWED 0x24
#define HCI_ERR_ENCRY_MODE_NOT_ACCEPTABLE 0x25
-#define HCI_ERR_UNIT_KEY_USED 0x26
+#define HCI_ERR_UNIT_KEY_USED 0x26
#define HCI_ERR_QOS_NOT_SUPPORTED 0x27
#define HCI_ERR_INSTANT_PASSED 0x28
#define HCI_ERR_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED 0x29
@@ -555,7 +555,7 @@
*/
-/*
+/*
** Definitions for packet type masks (BT1.2 and BT2.0 definitions)
*/
#define HCI_PKT_TYPES_MASK_NO_2_DH1 0x0002
@@ -581,7 +581,7 @@
&& ((t) != 0))
-
+
/* Packet type should not be invalid and at least one should be specified */
@@ -604,7 +604,7 @@
| HCI_PKT_TYPES_MASK_DM5 \
| HCI_PKT_TYPES_MASK_DH5)) != 0))
-/*
+/*
** Definitions for eSCO packet type masks (BT1.2 and BT2.0 definitions)
*/
#define HCI_ESCO_PKT_TYPES_MASK_HV1 0x0001
@@ -637,14 +637,14 @@
| HCI_ESCO_PKT_TYPES_MASK_EV5)) == 0)) \
&& ((t) != 0))
-/*
+/*
** Define parameters to allow role switch during create connection
*/
#define HCI_CR_CONN_NOT_ALLOW_SWITCH 0x00
#define HCI_CR_CONN_ALLOW_SWITCH 0x01
-/*
-** Hold Mode command destination
+/*
+** Hold Mode command destination
*/
#define HOLD_MODE_DEST_LOCAL_DEVICE 0x00
#define HOLD_MODE_DEST_RMT_DEVICE 0x01
@@ -880,10 +880,10 @@
#define HCI_CVSD_SUPPORTED(x) (((x) & HCI_AIR_CODING_FORMAT_MASK) == HCI_AIR_CODING_FORMAT_CVSD)
#define HCI_U_LAW_SUPPORTED(x) (((x) & HCI_AIR_CODING_FORMAT_MASK) == HCI_AIR_CODING_FORMAT_U_LAW)
#define HCI_A_LAW_SUPPORTED(x) (((x) & HCI_AIR_CODING_FORMAT_MASK) == HCI_AIR_CODING_FORMAT_A_LAW)
-#define HCI_TRANSPNT_SUPPORTED(x) (((x) & HCI_AIR_CODING_FORMAT_MASK) == HCI_AIR_CODING_FORMAT_TRANSPNT)
+#define HCI_TRANSPNT_SUPPORTED(x) (((x) & HCI_AIR_CODING_FORMAT_MASK) == HCI_AIR_CODING_FORMAT_TRANSPNT)
/* Retransmit timer definitions in 0.625 */
-#define HCI_MAX_AUTO_FLUSH_TOUT 0x07FF
+#define HCI_MAX_AUTO_FLUSH_TOUT 0x07FF
#define HCI_DEFAULT_AUTO_FLUSH_TOUT 0 /* No auto flush */
/* Broadcast retransmitions */
@@ -1002,7 +1002,7 @@ typedef struct
#define HCI_BRCM_ACL_PRIORITY_HIGH 0xFF
#define HCI_BRCM_SET_ACL_PRIORITY (0x0057 | HCI_GRP_VENDOR_SPECIFIC)
-/* Define values for LMP Test Control parameters
+/* Define values for LMP Test Control parameters
** Test Scenario, Hopping Mode, Power Control Mode
*/
#define LMP_TESTCTL_TESTSC_PAUSE 0
@@ -1028,12 +1028,12 @@ typedef struct
#define LMP_TESTCTL_POWCTL_ADAPTIVE 1
-/*
+/*
** Define company IDs (from Bluetooth Assigned Numbers v1.1, section 2.2)
*/
#define LMP_COMPID_ERICSSON 0
#define LMP_COMPID_NOKIA 1
-#define LMP_COMPID_INTEL 2
+#define LMP_COMPID_INTEL 2
#define LMP_COMPID_IBM 3
#define LMP_COMPID_TOSHIBA 4
#define LMP_COMPID_3COM 5
@@ -1121,9 +1121,9 @@ typedef struct
#define LMP_COMPID_HARMON_INTL_IND 87
#define LMP_COMPID_VIZIO 88
#define LMP_COMPID_NORDIC SEMI 89
-#define LMP_COMPID_EM MICRO 90
+#define LMP_COMPID_EM MICRO 90
#define LMP_COMPID_RALINK TECH 91
-#define LMP_COMPID_BELKIN INC 92
+#define LMP_COMPID_BELKIN INC 92
#define LMP_COMPID_REALTEK SEMI 93
#define LMP_COMPID_STONESTREET ONE 94
#define LMP_COMPID_WICENTRIC 95
@@ -1131,7 +1131,7 @@ typedef struct
#define LMP_COMPID_RDA MICRO 97
#define LMP_COMPID_GIBSON GUITARS 98
#define LMP_COMPID_MICOMMAND INC 99
-#define LMP_COMPID_BAND XI 100
+#define LMP_COMPID_BAND XI 100
#define LMP_COMPID_HP COMPANY 101
#define LMP_COMPID_9SOLUTIONS OY 102
#define LMP_COMPID_GN NETCOM 103
@@ -1140,8 +1140,8 @@ typedef struct
#define LMP_COMPID_MINDTREE LTD 106
#define LMP_COMPID_POLAR ELECTRO 107
#define LMP_COMPID_BEAUTIFUL ENTERPRISE 108
-#define LMP_COMPID_BRIARTEK 109
-#define LMP_COMPID_SUMMIT DATA COMM 110
+#define LMP_COMPID_BRIARTEK 109
+#define LMP_COMPID_SUMMIT DATA COMM 110
#define LMP_COMPID_SOUND ID 111
#define LMP_COMPID_MONSTER LLC 112
#define LMP_COMPID_CONNECTBLU 113
@@ -1196,7 +1196,7 @@ typedef struct
#define HCI_EDR3_DH3_PACKET_SIZE 552
#define HCI_EDR3_DH5_PACKET_SIZE 1021
-/*
+/*
** Features encoding - page 0
*/
#define HCI_NUM_FEATURE_BYTES 8
@@ -1434,14 +1434,14 @@ typedef struct
#define HCI_FEATURE_EXTENDED_OFF 7
#define HCI_LMP_EXTENDED_SUPPORTED(x) ((x)[HCI_FEATURE_EXTENDED_OFF] & HCI_FEATURE_EXTENDED_MASK)
-/*
+/*
** Features encoding - page 1
*/
#define HCI_EXT_FEATURE_SSP_HOST_MASK 0x01
#define HCI_EXT_FEATURE_SSP_HOST_OFF 0
#define HCI_SSP_HOST_SUPPORTED(x) ((x)[HCI_EXT_FEATURE_SSP_HOST_OFF] & HCI_EXT_FEATURE_SSP_HOST_MASK)
-/*
+/*
** Local Supported Commands encoding
*/
#define HCI_NUM_SUPP_COMMANDS_BYTES 64
@@ -2161,15 +2161,15 @@ Commands of HCI_GRP_VENDOR_SPECIFIC group for WIDCOMM SW LM Simulator
#define LM_HOLD_MODE (0x00DC | HCI_GRP_VENDOR_SPECIFIC)
#define LM_EXIT_PARK_MODE (0x00DD | HCI_GRP_VENDOR_SPECIFIC)
-#define LM_SCO_LINK_REQUEST (0x00E0 | HCI_GRP_VENDOR_SPECIFIC)
-#define LM_SCO_CHANGE (0x00E4 | HCI_GRP_VENDOR_SPECIFIC)
-#define LM_SCO_REMOVE (0x00E8 | HCI_GRP_VENDOR_SPECIFIC)
-#define LM_MAX_SLOTS (0x00F1 | HCI_GRP_VENDOR_SPECIFIC)
+#define LM_SCO_LINK_REQUEST (0x00E0 | HCI_GRP_VENDOR_SPECIFIC)
+#define LM_SCO_CHANGE (0x00E4 | HCI_GRP_VENDOR_SPECIFIC)
+#define LM_SCO_REMOVE (0x00E8 | HCI_GRP_VENDOR_SPECIFIC)
+#define LM_MAX_SLOTS (0x00F1 | HCI_GRP_VENDOR_SPECIFIC)
#define LM_MAX_SLOTS_REQUEST (0x00F2 | HCI_GRP_VENDOR_SPECIFIC)
#ifdef INCLUDE_OPTIONAL_PAGING_SCHEME
-#define LM_OPTIONAL_PAGE_REQUEST (0x00F3 | HCI_GRP_VENDOR_SPECIFIC)
-#define LM_OPTIONAL_PAGESCAN_REQUEST (0x00F4 | HCI_GRP_VENDOR_SPECIFIC)
+#define LM_OPTIONAL_PAGE_REQUEST (0x00F3 | HCI_GRP_VENDOR_SPECIFIC)
+#define LM_OPTIONAL_PAGESCAN_REQUEST (0x00F4 | HCI_GRP_VENDOR_SPECIFIC)
#endif
#define LM_SETUP_COMPLETE (0x00FF | HCI_GRP_VENDOR_SPECIFIC)
@@ -2194,7 +2194,7 @@ Commands of HCI_GRP_VENDOR_SPECIFIC group for WIDCOMM SW LM Simulator
#define LM_HIST_HCI_UPDATA (0x0110 | HCI_GRP_VENDOR_SPECIFIC)
#define LM_HIST_HCI_DNDATA (0x0111 | HCI_GRP_VENDOR_SPECIFIC)
-#define HCI_ENTER_TEST_MODE (0x0300 | HCI_GRP_VENDOR_SPECIFIC)
+#define HCI_ENTER_TEST_MODE (0x0300 | HCI_GRP_VENDOR_SPECIFIC)
#define HCI_LMP_TEST_CNTRL (0x0301 | HCI_GRP_VENDOR_SPECIFIC)
#define HCI_DEBUG_LC_CMD_MIN (0x0300 | HCI_GRP_VENDOR_SPECIFIC)
#define HCI_DEBUG_LC_CMD_MAX (0x03FF | HCI_GRP_VENDOR_SPECIFIC)
@@ -2223,4 +2223,4 @@ Commands of HCI_GRP_VENDOR_SPECIFIC group for WIDCOMM SW LM Simulator
#endif
-
+
diff --git a/stack/include/hcimsgs.h b/stack/include/hcimsgs.h
index 556aca8..5cfdcc2 100644
--- a/stack/include/hcimsgs.h
+++ b/stack/include/hcimsgs.h
@@ -23,7 +23,7 @@ extern "C" {
#endif
/* Message by message.... */
-
+
#define HCIC_GET_UINT8(p, off) (UINT8)(*((UINT8 *)((p) + 1) + p->offset + 3 + (off)))
#define HCIC_GET_UINT16(p, off) (UINT16)((*((UINT8 *)((p) + 1) + p->offset + 3 + (off)) + \
@@ -77,7 +77,7 @@ HCI_API extern BOOLEAN btsnd_hcic_inquiry(const LAP inq_lap, UINT8 duration,
#define HCIC_INQ_DUR_OFF 3
#define HCIC_INQ_RSP_CNT_OFF 4
/* Inquiry */
-
+
/* Inquiry Cancel */
HCI_API extern BOOLEAN btsnd_hcic_inq_cancel(void);
@@ -104,7 +104,7 @@ HCI_API extern BOOLEAN btsnd_hcic_exit_per_inq(void);
/* Create Connection */
HCI_API extern BOOLEAN btsnd_hcic_create_conn(BD_ADDR dest, UINT16 packet_types,
UINT8 page_scan_rep_mode,
- UINT8 page_scan_mode,
+ UINT8 page_scan_mode,
UINT16 clock_offset,
UINT8 allow_switch);
@@ -184,7 +184,7 @@ HCI_API extern BOOLEAN btsnd_hcic_link_key_neg_reply (BD_ADDR bd_addr);
/* PIN Code Request Reply */
HCI_API extern BOOLEAN btsnd_hcic_pin_code_req_reply (BD_ADDR bd_addr,
- UINT8 pin_code_len,
+ UINT8 pin_code_len,
PIN_CODE pin_code);
#define HCIC_PARAM_SIZE_PIN_CODE_REQ_REPLY 23
@@ -406,7 +406,7 @@ HCI_API extern BOOLEAN btsnd_hcic_write_policy_set(UINT16 handle, UINT16 setting
/* Write Policy Settings */
/* Read Default Policy Settings */
-HCI_API extern BOOLEAN btsnd_hcic_read_def_policy_set(void);
+HCI_API extern BOOLEAN btsnd_hcic_read_def_policy_set(void);
#define HCIC_PARAM_SIZE_READ_DEF_POLICY_SET 0
/* Read Default Policy Settings */
@@ -464,7 +464,7 @@ HCI_API extern BOOLEAN btsnd_hcic_sniff_sub_rate(UINT16 handle, UINT16 max_lat,
/* Extended Inquiry Response */
#if (BTM_EIR_SERVER_INCLUDED == TRUE)
-HCI_API extern void btsnd_hcic_write_ext_inquiry_response(void *buffer, UINT8 fec_req);
+HCI_API extern void btsnd_hcic_write_ext_inquiry_response(void *buffer, UINT8 fec_req);
#define HCIC_PARAM_SIZE_EXT_INQ_RESP 241
@@ -478,7 +478,7 @@ HCI_API extern BOOLEAN btsnd_hcic_read_ext_inquiry_response(void); /* Read Ext
#endif
/* Write Simple Pairing Mode */
/**** Simple Pairing Commands ****/
-HCI_API extern BOOLEAN btsnd_hcic_write_simple_pairing_mode(UINT8 mode);
+HCI_API extern BOOLEAN btsnd_hcic_write_simple_pairing_mode(UINT8 mode);
#define HCIC_PARAM_SIZE_W_SIMP_PAIR 1
@@ -490,7 +490,7 @@ HCI_API extern BOOLEAN btsnd_hcic_read_simple_pairing_mode (void);
#define HCIC_PARAM_SIZE_R_SIMP_PAIR 0
/* Write Simple Pairing Debug Mode */
-HCI_API extern BOOLEAN btsnd_hcic_write_simp_pair_debug_mode(UINT8 debug_mode);
+HCI_API extern BOOLEAN btsnd_hcic_write_simp_pair_debug_mode(UINT8 debug_mode);
#define HCIC_PARAM_SIZE_SIMP_PAIR_DBUG 1
@@ -506,7 +506,7 @@ HCI_API extern BOOLEAN btsnd_hcic_io_cap_req_reply (BD_ADDR bd_addr, UINT8 capab
#define HCI_IO_CAPABILITY_OFF 6
#define HCI_IO_CAP_OOB_DATA_OFF 7
#define HCI_IO_CAP_AUTH_REQ_OFF 8
-
+
/* IO Capabilities Req Neg Reply */
HCI_API extern BOOLEAN btsnd_hcic_io_cap_req_neg_reply (BD_ADDR bd_addr, UINT8 err_code);
@@ -514,7 +514,7 @@ HCI_API extern BOOLEAN btsnd_hcic_io_cap_req_neg_reply (BD_ADDR bd_addr, UINT8 e
#define HCI_IO_CAP_NR_BD_ADDR_OFF 0
#define HCI_IO_CAP_NR_ERR_CODE 6
-
+
/* Read Local OOB Data */
HCI_API extern BOOLEAN btsnd_hcic_read_local_oob_data (void);
@@ -527,21 +527,21 @@ HCI_API extern BOOLEAN btsnd_hcic_user_conf_reply (BD_ADDR bd_addr, BOOLEAN is_y
#define HCI_USER_CONF_BD_ADDR_OFF 0
-
+
HCI_API extern BOOLEAN btsnd_hcic_user_passkey_reply (BD_ADDR bd_addr, UINT32 value);
#define HCIC_PARAM_SIZE_U_PKEY_REPLY 10
#define HCI_USER_PASSKEY_BD_ADDR_OFF 0
#define HCI_USER_PASSKEY_VALUE_OFF 6
-
+
HCI_API extern BOOLEAN btsnd_hcic_user_passkey_neg_reply (BD_ADDR bd_addr);
#define HCIC_PARAM_SIZE_U_PKEY_NEG_REPLY 6
#define HCI_USER_PASSKEY_NEG_BD_ADDR_OFF 0
-
+
/* Remote OOB Data Request Reply */
HCI_API extern BOOLEAN btsnd_hcic_rem_oob_reply (BD_ADDR bd_addr, UINT8 *p_c,
UINT8 *p_r);
@@ -551,32 +551,32 @@ HCI_API extern BOOLEAN btsnd_hcic_rem_oob_reply (BD_ADDR bd_addr, UINT8 *p_c,
#define HCI_REM_OOB_DATA_BD_ADDR_OFF 0
#define HCI_REM_OOB_DATA_C_OFF 6
#define HCI_REM_OOB_DATA_R_OFF 22
-
+
/* Remote OOB Data Request Negative Reply */
HCI_API extern BOOLEAN btsnd_hcic_rem_oob_neg_reply (BD_ADDR bd_addr);
#define HCIC_PARAM_SIZE_REM_OOB_NEG_REPLY 6
#define HCI_REM_OOB_DATA_NEG_BD_ADDR_OFF 0
-
+
/* Read Tx Power Level */
HCI_API extern BOOLEAN btsnd_hcic_read_inq_tx_power (void);
#define HCIC_PARAM_SIZE_R_TX_POWER 0
/* Write Tx Power Level */
-HCI_API extern BOOLEAN btsnd_hcic_write_inq_tx_power (INT8 level);
+HCI_API extern BOOLEAN btsnd_hcic_write_inq_tx_power (INT8 level);
#define HCIC_PARAM_SIZE_W_TX_POWER 1
#define HCIC_WRITE_TX_POWER_LEVEL_OFF 0
- /* Read Default Erroneous Data Reporting */
+ /* Read Default Erroneous Data Reporting */
HCI_API extern BOOLEAN btsnd_hcic_read_default_erroneous_data_rpt (void);
#define HCIC_PARAM_SIZE_R_ERR_DATA_RPT 0
/* Write Default Erroneous Data Reporting */
-HCI_API extern BOOLEAN btsnd_hcic_write_default_erroneous_data_rpt (UINT8 level);
+HCI_API extern BOOLEAN btsnd_hcic_write_default_erroneous_data_rpt (UINT8 level);
#define HCIC_PARAM_SIZE_W_ERR_DATA_RPT 1
@@ -729,7 +729,7 @@ HCI_API extern BOOLEAN btsnd_hcic_write_pagescan_cfg(UINT16 interval,
HCI_API extern BOOLEAN btsnd_hcic_read_inqscan_cfg(void); /* Read Inquiry Scan Activity */
/* Write Inquiry Scan Activity */
-HCI_API extern BOOLEAN btsnd_hcic_write_inqscan_cfg(UINT16 interval, UINT16 window);
+HCI_API extern BOOLEAN btsnd_hcic_write_inqscan_cfg(UINT16 interval, UINT16 window);
#define HCIC_PARAM_SIZE_WRITE_INQSCAN_CFG 4
@@ -786,7 +786,7 @@ HCI_API extern BOOLEAN btsnd_hcic_write_sco_flow_enable(UINT8 flag);
/* Set Host Buffer Size */
HCI_API extern BOOLEAN btsnd_hcic_set_host_buf_size (UINT16 acl_len,
- UINT8 sco_len,
+ UINT8 sco_len,
UINT16 acl_num,
UINT16 sco_num);
@@ -797,7 +797,7 @@ HCI_API extern BOOLEAN btsnd_hcic_set_host_buf_size (UINT16 acl_len,
#define HCI_HOST_BUF_SIZE_ACL_NUM_OFF 3
#define HCI_HOST_BUF_SIZE_SCO_NUM_OFF 5
-
+
HCI_API extern BOOLEAN btsnd_hcic_host_num_xmitted_pkts (UINT8 num_handles,
UINT16 *handle,
UINT16 *num_pkts); /* Set Host Buffer Size */
@@ -889,7 +889,7 @@ HCI_API extern BOOLEAN btsnd_hcic_write_afh_channel_assessment_mode (UINT8 mode)
HCI_API extern BOOLEAN btsnd_hcic_set_afh_host_channel_class (UINT8 *p_afhchannelmap);
HCI_API extern BOOLEAN btsnd_hcic_read_afh_channel_assessment_mode(void);
HCI_API extern BOOLEAN btsnd_hcic_read_afh_channel_map (UINT16 handle);
-HCI_API extern BOOLEAN btsnd_hcic_nop(void); /* NOP */
+HCI_API extern BOOLEAN btsnd_hcic_nop(void); /* NOP */
/* Send HCI Data */
HCI_API extern void btsnd_hcic_data (BT_HDR *p_buf, UINT16 len, UINT16 handle, UINT8 boundary, UINT8 broadcast);
@@ -935,13 +935,13 @@ HCI_API extern void btsnd_hcie_inq_comp(void *buffer, UINT8 status);
#define HCIE_PARAM_SIZE_INQ_COMP 1
/* Inquiry Response Event */
-HCI_API extern void btsnd_hcie_inq_res(void *buffer, UINT8 num_resp, UINT8 **bd_addr,
- UINT8 *page_scan_rep_mode, UINT8 *page_scan_per_mode,
- UINT8 *page_scan_mode, UINT8 **dev_class,
+HCI_API extern void btsnd_hcie_inq_res(void *buffer, UINT8 num_resp, UINT8 **bd_addr,
+ UINT8 *page_scan_rep_mode, UINT8 *page_scan_per_mode,
+ UINT8 *page_scan_mode, UINT8 **dev_class,
UINT16 *clock_offset);
/* Connection Complete Event */
-HCI_API extern void btsnd_hcie_connection_comp(void *buffer, UINT8 status, UINT16 handle,
+HCI_API extern void btsnd_hcie_connection_comp(void *buffer, UINT8 status, UINT16 handle,
BD_ADDR bd_addr, UINT8 link_type, UINT8 encr_mode);
#define HCIE_PARAM_SIZE_CONNECTION_COMP 11
@@ -1029,16 +1029,16 @@ HCI_API extern void btsnd_hcie_read_rmt_version (void *buffer, UINT8 status, UIN
/* QOS setup complete */
-HCI_API extern void btsnd_hcie_qos_setup_compl (void *buffer, UINT8 status, UINT16 handle, UINT8 flags,
- UINT8 service_type, UINT32 token_rate, UINT32 peak,
+HCI_API extern void btsnd_hcie_qos_setup_compl (void *buffer, UINT8 status, UINT16 handle, UINT8 flags,
+ UINT8 service_type, UINT32 token_rate, UINT32 peak,
UINT32 latency, UINT32 delay_var);
#define HCIE_PARAM_SIZE_QOS_SETUP_COMP 21
/* Flow Specification complete */
-HCI_API extern void btsnd_hcie_flow_spec_compl (void *buffer, UINT8 status, UINT16 handle, UINT8 flags,
- UINT8 flow_direction, UINT8 service_type, UINT32 token_rate, UINT32 token_bucket_size,
+HCI_API extern void btsnd_hcie_flow_spec_compl (void *buffer, UINT8 status, UINT16 handle, UINT8 flags,
+ UINT8 flow_direction, UINT8 service_type, UINT32 token_rate, UINT32 token_bucket_size,
UINT32 peak, UINT32 latency);
#define HCIE_PARAM_SIZE_FLOW_SPEC_COMP 22
@@ -1057,20 +1057,20 @@ HCI_API extern void btsnd_hcie_cmd_comp_params (void *buffer, UINT8 max_host_cmd
/* Command Complete Event with 1-byte param */
-HCI_API extern void btsnd_hcie_cmd_comp_param1(void *buffer, UINT8 max_host_cmds, UINT16 opcode,
+HCI_API extern void btsnd_hcie_cmd_comp_param1(void *buffer, UINT8 max_host_cmds, UINT16 opcode,
UINT8 status, UINT8 param1);
#define HCIE_PARAM_SIZE_CMD_COMP_PARAM1 5
/* Command Complete Event with 2-byte param */
-HCI_API extern void btsnd_hcie_cmd_comp_param2(void *buffer, UINT8 max_host_cmds, UINT16 opcode,
+HCI_API extern void btsnd_hcie_cmd_comp_param2(void *buffer, UINT8 max_host_cmds, UINT16 opcode,
UINT8 status, UINT16 param2);
#define HCIE_PARAM_SIZE_CMD_COMP_PARAM2 6
/* Command Complete Event with BD-addr as param */
-HCI_API extern void btsnd_hcie_cmd_comp_bd_addr(void *buffer, UINT8 max_host_cmds, UINT16 opcode,
+HCI_API extern void btsnd_hcie_cmd_comp_bd_addr(void *buffer, UINT8 max_host_cmds, UINT16 opcode,
UINT8 status, BD_ADDR bd_addr);
#define HCIE_PARAM_SIZE_CMD_COMP_BD_ADDR 10
@@ -1107,7 +1107,7 @@ HCI_API extern void btsnd_hcie_num_compl_pkts (void *buffer, UINT8 num_handles,
/* Mode Change Event */
-HCI_API extern void btsnd_hcie_mode_change (void *buffer, UINT8 status, UINT16 handle,
+HCI_API extern void btsnd_hcie_mode_change (void *buffer, UINT8 status, UINT16 handle,
UINT8 mode, UINT16 interval);
#define HCIE_PARAM_SIZE_MODE_CHANGE 6
@@ -1165,7 +1165,7 @@ HCI_API extern void btsnd_hcie_max_slots_change(void *buffer, UINT16 handle, UIN
/* Read Clock Offset Complet Event */
-HCI_API extern void btsnd_hcie_read_clock_off_comp(void *buffer, UINT8 status, UINT16 handle,
+HCI_API extern void btsnd_hcie_read_clock_off_comp(void *buffer, UINT8 status, UINT16 handle,
UINT16 clock_offset);
#define HCIE_PARAM_SIZE_READ_CLOCK_OFF_COMP 5
@@ -1199,7 +1199,7 @@ HCI_API extern void btsnd_hcie_pagescan_rep_mode_chng (void *buffer, BD_ADDR bd_
/* Sniff Sub Rate Event */
-HCI_API extern void btsnd_hcie_sniff_sub_rate(void *buffer, UINT8 status, UINT16 handle, UINT16 max_tx_lat, UINT16 max_rx_lat,
+HCI_API extern void btsnd_hcie_sniff_sub_rate(void *buffer, UINT8 status, UINT16 handle, UINT16 max_tx_lat, UINT16 max_rx_lat,
UINT16 min_remote_timeout, UINT16 min_local_timeout);
#define HCIE_PARAM_SIZE_SNIFF_SUB_RATE 11
@@ -1207,8 +1207,8 @@ HCI_API extern void btsnd_hcie_sniff_sub_rate(void *buffer, UINT8 status, UINT16
/* Extended Inquiry Result Event */
-HCI_API extern void btsnd_hcie_ext_inquiry_result(void *buffer, UINT8 num_resp, UINT8 **bd_addr,
- UINT8 *page_scan_rep_mode, UINT8 *reserved,
+HCI_API extern void btsnd_hcie_ext_inquiry_result(void *buffer, UINT8 num_resp, UINT8 **bd_addr,
+ UINT8 *page_scan_rep_mode, UINT8 *reserved,
UINT8 **dev_class, UINT16 *clock_offset, UINT8 *rssi, UINT8 *p_data);
@@ -1257,7 +1257,7 @@ HCI_API extern BOOLEAN btsnd_hcic_ble_set_local_used_feat (UINT8 feat_set[8]);
HCI_API extern BOOLEAN btsnd_hcic_ble_set_random_addr (BD_ADDR random_addr);
-HCI_API extern BOOLEAN btsnd_hcic_ble_write_adv_params (UINT16 adv_int_min, UINT16 adv_int_max,
+HCI_API extern BOOLEAN btsnd_hcic_ble_write_adv_params (UINT16 adv_int_min, UINT16 adv_int_max,
UINT8 adv_type, UINT8 addr_type_own,
UINT8 addr_type_dir, BD_ADDR direct_bda,
UINT8 channel_map, UINT8 adv_filter_policy);
@@ -1270,13 +1270,13 @@ HCI_API extern BOOLEAN btsnd_hcic_ble_set_scan_rsp_data (UINT8 data_len, UINT8 *
HCI_API extern BOOLEAN btsnd_hcic_ble_set_adv_enable (UINT8 adv_enable);
-HCI_API extern BOOLEAN btsnd_hcic_ble_set_scan_params (UINT8 scan_type,
- UINT16 scan_int, UINT16 scan_win,
+HCI_API extern BOOLEAN btsnd_hcic_ble_set_scan_params (UINT8 scan_type,
+ UINT16 scan_int, UINT16 scan_win,
UINT8 addr_type, UINT8 scan_filter_policy);
HCI_API extern BOOLEAN btsnd_hcic_ble_set_scan_enable (UINT8 scan_enable, UINT8 duplicate);
-HCI_API extern BOOLEAN btsnd_hcic_ble_create_ll_conn (UINT16 scan_int, UINT16 scan_win,
+HCI_API extern BOOLEAN btsnd_hcic_ble_create_ll_conn (UINT16 scan_int, UINT16 scan_win,
UINT8 init_filter_policy, UINT8 addr_type_peer, BD_ADDR bda_peer, UINT8 addr_type_own,
UINT16 conn_int_min, UINT16 conn_int_max, UINT16 conn_latency, UINT16 conn_timeout,
UINT16 min_ce_len, UINT16 max_ce_len);
@@ -1304,7 +1304,7 @@ HCI_API extern BOOLEAN btsnd_hcic_ble_encrypt (UINT8* key, UINT8 key_len, UINT8*
HCI_API extern BOOLEAN btsnd_hcic_ble_rand (void *p_cmd_cplt_cback);
-HCI_API extern BOOLEAN btsnd_hcic_ble_start_enc ( UINT16 handle,
+HCI_API extern BOOLEAN btsnd_hcic_ble_start_enc ( UINT16 handle,
UINT8 rand[HCIC_BLE_RAND_DI_SIZE],
UINT16 ediv, UINT8 ltk[HCIC_BLE_ENCRYT_KEY_SIZE]);
@@ -1314,7 +1314,7 @@ HCI_API extern BOOLEAN btsnd_hcic_ble_ltk_req_neg_reply (UINT16 handle);
HCI_API extern BOOLEAN btsnd_hcic_ble_read_supported_states (void);
-
+
#endif /* BLE_INCLUDED */
#ifdef __cplusplus
diff --git a/stack/include/hiddefs.h b/stack/include/hiddefs.h
index 3e13017..7d8e75a 100644
--- a/stack/include/hiddefs.h
+++ b/stack/include/hiddefs.h
@@ -100,7 +100,7 @@ typedef UINT8 tHID_STATUS;
*/
/* Buffer size in two bytes after Report ID */
-#define HID_PAR_GET_REP_BUFSIZE_FOLLOWS (0x08)
+#define HID_PAR_GET_REP_BUFSIZE_FOLLOWS (0x08)
/* Parameters for Protocol Type
@@ -137,7 +137,7 @@ typedef struct sdp_info
UINT8 ctry_code; /*Country Code.*/
UINT16 sup_timeout;/* Supervisory Timeout */
- tHID_DEV_DSCP_INFO dscp_info; /* Descriptor list and Report list to be set in the SDP record.
+ tHID_DEV_DSCP_INFO dscp_info; /* Descriptor list and Report list to be set in the SDP record.
This parameter is used if HID_DEV_USE_GLB_SDP_REC is set to FALSE.*/
tSDP_DISC_REC *p_sdp_layer_rec;
} tHID_DEV_SDP_INFO;
diff --git a/stack/include/hidh_api.h b/stack/include/hidh_api.h
index 5845f66..bc3f8c8 100644
--- a/stack/include/hidh_api.h
+++ b/stack/include/hidh_api.h
@@ -42,15 +42,15 @@ enum {
*****************************************************************************/
typedef void (tHID_HOST_SDP_CALLBACK) (UINT16 result, UINT16 attr_mask,
- tHID_DEV_SDP_INFO *sdp_rec );
+ tHID_DEV_SDP_INFO *sdp_rec );
/* HID-HOST returns the events in the following table to the application via tHID_HOST_DEV_CALLBACK
-HID_HDEV_EVT_OPEN Connected to device with Interrupt and Control Channels in OPEN state.
+HID_HDEV_EVT_OPEN Connected to device with Interrupt and Control Channels in OPEN state.
Data = NA
HID_HDEV_EVT_CLOSE Connection with device is closed. Data=reason code.
-HID_HDEV_EVT_RETRYING Lost connection is being re-connected.
+HID_HDEV_EVT_RETRYING Lost connection is being re-connected.
Data=Retrial number
-HID_HDEV_EVT_IN_REPORT Device sent an input report Data=Report Type pdata= pointer to BT_HDR
+HID_HDEV_EVT_IN_REPORT Device sent an input report Data=Report Type pdata= pointer to BT_HDR
(GKI buffer having report data.)
HID_HDEV_EVT_HANDSHAKE Device sent SET_REPORT Data=Result-code pdata=NA.
HID_HDEV_EVT_VC_UNPLUG Device sent Virtual Unplug Data=NA. pdata=NA.
@@ -69,7 +69,7 @@ enum
HID_HDEV_EVT_VC_UNPLUG
};
typedef void (tHID_HOST_DEV_CALLBACK) (UINT8 dev_handle,
- UINT8 event, /* Event from HID-DEVICE. */
+ UINT8 event, /* Event from HID-DEVICE. */
UINT32 data, /* Integer data corresponding to the event.*/
BT_HDR *p_buf ); /* Pointer data corresponding to the event. */
diff --git a/stack/include/l2c_api.h b/stack/include/l2c_api.h
index b04f480..fbd45d8 100644
--- a/stack/include/l2c_api.h
+++ b/stack/include/l2c_api.h
@@ -75,18 +75,18 @@ typedef UINT8 tL2CAP_CHNL_DATA_RATE;
/* length of the HCI header block */
/* HCI header(4) + SNK count(1) + FCR bits(1) + AV data length(2) */
-#define L2CAP_MULTI_AV_HCI_HDR_LEN 8
+#define L2CAP_MULTI_AV_HCI_HDR_LEN 8
/* length of padding for 4 bytes align */
#define L2CAP_MULTI_AV_PADDING_LEN 2
/* length of the HCI header block with padding for FCR */
/* HCI header(4) + SNK count(1) + FCR bits(1) + AV data length(2) + padding(2) */
-#define L2CAP_MULTI_AV_HCI_HDR_LEN_WITH_PADDING 10
+#define L2CAP_MULTI_AV_HCI_HDR_LEN_WITH_PADDING 10
/* length of the L2CAP header block */
/* HCI header(4) + L2CAP header(4) + padding(4) or control word(2) + FCS(2) */
-#define L2CAP_MULTI_AV_L2C_HDR_LEN 12
+#define L2CAP_MULTI_AV_L2C_HDR_LEN 12
/* definition used for L2CA_SetDesireRole */
#define L2CAP_ROLE_SLAVE HCI_ROLE_SLAVE
@@ -107,7 +107,7 @@ typedef UINT8 tL2CAP_CHNL_DATA_RATE;
/* Validity check for PSM. PSM values must be odd. Also, all PSM values must
** be assigned such that the least significant bit of the most sigificant
** octet equals zero.
-*/
+*/
#define L2C_INVALID_PSM(psm) (((psm) & 0x0101) != 0x0001)
#define L2C_IS_VALID_PSM(psm) (((psm) & 0x0101) == 0x0001)
@@ -261,7 +261,7 @@ typedef void (tL2CA_ECHO_DATA_CB) (BD_ADDR, UINT16, UINT8 *);
typedef void (tL2CA_CONGESTION_STATUS_CB) (UINT16, BOOLEAN);
/* Callback prototype for number of packets completed events.
-** This callback notifies the application when Number of Completed Packets
+** This callback notifies the application when Number of Completed Packets
** event has been received.
** This callback is originally designed for 3DG devices.
** The parameter is:
@@ -366,7 +366,7 @@ L2C_API extern void L2CA_Deregister (UINT16 psm);
** Description Other layers call this function to find an unused PSM for L2CAP
** services.
**
-** Returns PSM to use.
+** Returns PSM to use.
**
*******************************************************************************/
L2C_API extern UINT16 L2CA_AllocatePSM(void);
@@ -427,7 +427,7 @@ L2C_API extern UINT16 L2CA_ErtmConnectReq (UINT16 psm, BD_ADDR p_bd_addr,
** Returns TRUE for success, FALSE for failure
**
*******************************************************************************/
-L2C_API extern BOOLEAN L2CA_ErtmConnectRsp (BD_ADDR p_bd_addr, UINT8 id, UINT16 lcid,
+L2C_API extern BOOLEAN L2CA_ErtmConnectRsp (BD_ADDR p_bd_addr, UINT8 id, UINT16 lcid,
UINT16 result, UINT16 status,
tL2CAP_ERTM_INFO *p_ertm_info);
@@ -469,7 +469,7 @@ L2C_API extern BOOLEAN L2CA_DisconnectReq (UINT16 cid);
**
** Function L2CA_DisconnectRsp
**
-** Description Higher layers call this function to acknowledge the
+** Description Higher layers call this function to acknowledge the
** disconnection of a channel.
**
** Returns void
@@ -536,18 +536,18 @@ L2C_API extern BOOLEAN L2CA_SetIdleTimeout (UINT16 cid, UINT16 timeout,
** Function L2CA_SetIdleTimeoutByBdAddr
**
** Description Higher layers call this function to set the idle timeout for
-** a connection. The "idle timeout" is the amount of time that
-** a connection can remain up with no L2CAP channels on it.
-** A timeout of zero means that the connection will be torn
-** down immediately when the last channel is removed.
-** A timeout of 0xFFFF means no timeout. Values are in seconds.
-** A bd_addr is the remote BD address. If bd_addr = BT_BD_ANY,
-** then the idle timeouts for all active l2cap links will be
+** a connection. The "idle timeout" is the amount of time that
+** a connection can remain up with no L2CAP channels on it.
+** A timeout of zero means that the connection will be torn
+** down immediately when the last channel is removed.
+** A timeout of 0xFFFF means no timeout. Values are in seconds.
+** A bd_addr is the remote BD address. If bd_addr = BT_BD_ANY,
+** then the idle timeouts for all active l2cap links will be
** changed.
**
** Returns TRUE if command succeeded, FALSE if failed
**
-** NOTE This timeout applies to all logical channels active on the
+** NOTE This timeout applies to all logical channels active on the
** ACL link.
*******************************************************************************/
L2C_API extern BOOLEAN L2CA_SetIdleTimeoutByBdAddr(BD_ADDR bd_addr, UINT16 timeout);
@@ -690,21 +690,21 @@ typedef void (tL2CA_RESERVE_CMPL_CBACK) (void);
**
** Function L2CA_SetFlushTimeout
**
-** Description This function set the automatic flush time out in Baseband
+** Description This function set the automatic flush time out in Baseband
** for ACL-U packets.
** BdAddr : the remote BD address of ACL link. If it is BT_DB_ANY
** then the flush time out will be applied to all ACL link.
** FlushTimeout: flush time out in ms
-** 0x0000 : No automatic flush
-** L2CAP_NO_RETRANSMISSION : No retransmission
-** 0x0002 - 0xFFFE : flush time out, if (flush_tout*8)+3/5)
+** 0x0000 : No automatic flush
+** L2CAP_NO_RETRANSMISSION : No retransmission
+** 0x0002 - 0xFFFE : flush time out, if (flush_tout*8)+3/5)
** <= HCI_MAX_AUTO_FLUSH_TOUT (in 625us slot).
** Otherwise, return FALSE.
-** L2CAP_NO_AUTOMATIC_FLUSH : No automatic flush
+** L2CAP_NO_AUTOMATIC_FLUSH : No automatic flush
**
** Returns TRUE if command succeeded, FALSE if failed
**
-** NOTE This flush timeout applies to all logical channels active on the
+** NOTE This flush timeout applies to all logical channels active on the
** ACL link.
*******************************************************************************/
L2C_API extern BOOLEAN L2CA_SetFlushTimeout (BD_ADDR bd_addr, UINT16 flush_tout);
@@ -730,7 +730,7 @@ L2C_API extern UINT8 L2CA_DataWriteEx (UINT16 cid, BT_HDR *p_data, UINT16 flags)
**
** Function L2CA_SetChnlFlushability
**
-** Description Higher layers call this function to set a channels
+** Description Higher layers call this function to set a channels
** flushability flags
**
** Returns TRUE if CID found, else FALSE
@@ -854,7 +854,7 @@ L2C_API extern BOOLEAN L2CA_UcdDeregister ( UINT16 psm );
** Parameters: PSM
** BD_ADDR of remote device
** info_type : L2CAP_UCD_INFO_TYPE_RECEPTION
-** L2CAP_UCD_INFO_TYPE_MTU
+** L2CAP_UCD_INFO_TYPE_MTU
**
**
** Return value: TRUE if successs
@@ -870,7 +870,7 @@ L2C_API extern BOOLEAN L2CA_UcdDiscover ( UINT16 psm, BD_ADDR rem_bda, UINT8 inf
**
** Parameters: PSM
** BD Address of remote
-** Pointer to buffer of type BT_HDR
+** Pointer to buffer of type BT_HDR
** flags : L2CAP_FLUSHABLE_CH_BASED
** L2CAP_FLUSHABLE_PKT
** L2CAP_NON_FLUSHABLE_PKT
@@ -975,7 +975,7 @@ L2C_API extern BOOLEAN L2CA_ConnectFixedChnl (UINT16 fixed_cid, BD_ADDR bd_addr)
**
** Parameters: Fixed CID
** BD Address of remote
-** Pointer to buffer of type BT_HDR
+** Pointer to buffer of type BT_HDR
**
** Return value L2CAP_DW_SUCCESS, if data accepted
** L2CAP_DW_FAILED, if error
@@ -1005,11 +1005,11 @@ L2C_API extern BOOLEAN L2CA_RemoveFixedChnl (UINT16 fixed_cid, BD_ADDR rem_bda);
** Description Higher layers call this function to set the idle timeout for
** a fixed channel. The "idle timeout" is the amount of time that
** a connection can remain up with no L2CAP channels on it.
-** A timeout of zero means that the connection will be torn
-** down immediately when the last channel is removed.
-** A timeout of 0xFFFF means no timeout. Values are in seconds.
-** A bd_addr is the remote BD address. If bd_addr = BT_BD_ANY,
-** then the idle timeouts for all active l2cap links will be
+** A timeout of zero means that the connection will be torn
+** down immediately when the last channel is removed.
+** A timeout of 0xFFFF means no timeout. Values are in seconds.
+** A bd_addr is the remote BD address. If bd_addr = BT_BD_ANY,
+** then the idle timeouts for all active l2cap links will be
** changed.
**
** Returns TRUE if command succeeded, FALSE if failed
@@ -1032,7 +1032,7 @@ L2C_API extern BOOLEAN L2CA_SetFixedChannelTout (BD_ADDR rem_bda, UINT16 fixed_c
** Returns TRUE if successful
**
*******************************************************************************/
-L2C_API extern BOOLEAN L2CA_GetCurrentConfig (UINT16 lcid,
+L2C_API extern BOOLEAN L2CA_GetCurrentConfig (UINT16 lcid,
tL2CAP_CFG_INFO **pp_our_cfg, tL2CAP_CH_CFG_BITS *p_our_cfg_bits,
tL2CAP_CFG_INFO **pp_peer_cfg, tL2CAP_CH_CFG_BITS *p_peer_cfg_bits);
diff --git a/stack/include/l2cdefs.h b/stack/include/l2cdefs.h
index eded75a..b2740cd 100644
--- a/stack/include/l2cdefs.h
+++ b/stack/include/l2cdefs.h
@@ -203,7 +203,7 @@
#define L2CAP_INFO_RESP_RESULT_SUCCESS 0
#define L2CAP_INFO_RESP_RESULT_NOT_SUPPORTED 1
-/* Define the info-type fields of information request & response
+/* Define the info-type fields of information request & response
*/
#define L2CAP_CONNLESS_MTU_INFO_TYPE 0x0001
#define L2CAP_EXTENDED_FEATURES_INFO_TYPE 0x0002 /* Used in Information Req/Response */
@@ -249,7 +249,7 @@
#define L2CAP_MAX_HEADER_FCS (L2CAP_PKT_OVERHEAD + L2CAP_EXT_CONTROL_OVERHEAD + L2CAP_SDU_LEN_OVERHEAD + L2CAP_FCS_LEN)
/* length(2), channel(2), control(4), SDU length(2) FCS(2) */
/* Part of L2CAP_MIN_OFFSET that is not part of L2CAP
-*/
+*/
#define L2CAP_OFFSET_WO_L2HDR (L2CAP_MIN_OFFSET-(L2CAP_PKT_OVERHEAD+L2CAP_FCR_OVERHEAD))
/* SAR bits in the control word
diff --git a/stack/include/mca_api.h b/stack/include/mca_api.h
index 568cb0e..4ac2c89 100644
--- a/stack/include/mca_api.h
+++ b/stack/include/mca_api.h
@@ -2,7 +2,7 @@
**
** Name: mca_api.h
**
-** Description: This interface file contains the interface to the
+** Description: This interface file contains the interface to the
** Multi-Channel Adaptation Protocol (MCAP).
**
** Copyright (c) 2009-2009, Broadcom Corp., All Rights Reserved.
@@ -72,7 +72,7 @@ typedef UINT8 tMCA_DEP; /* the handle for MCA_CreateDep. This is also the lo
typedef UINT16 tMCA_DL; /* the handle for the data channel. This is reported at MCA_OPEN_CFM_EVT or MCA_OPEN_IND_EVT */
/* This is the data callback function. It is executed when MCAP has a data
-** packet ready for the application.
+** packet ready for the application.
*/
typedef void (tMCA_DATA_CBACK)(tMCA_DL mdl, BT_HDR *p_pkt);
@@ -195,7 +195,7 @@ typedef union {
} tMCA_CTRL;
/* This is the control callback function. This function passes control events
-** to the application.
+** to the application.
*/
typedef void (tMCA_CTRL_CBACK)(tMCA_HANDLE handle, tMCA_CL mcl, UINT8 event,
tMCA_CTRL *p_data);
@@ -244,7 +244,7 @@ MCA_API extern UINT8 MCA_SetTraceLevel (UINT8 level);
** It is assumed that the control channel PSM and data channel
** PSM are not used by any other instances of the stack.
** If the given p_reg->ctrl_psm is 0, this handle is INT only.
-**
+**
** Returns 0, if failed. Otherwise, the MCA handle.
**
*******************************************************************************/
@@ -270,7 +270,7 @@ MCA_API extern void MCA_Deregister(tMCA_HANDLE handle);
** Description Create a data endpoint. If the MDEP is created successfully,
** the MDEP ID is returned in *p_dep. After a data endpoint is
** created, an application can initiate a connection between this
-** endpoint and an endpoint on a peer device.
+** endpoint and an endpoint on a peer device.
**
** Returns MCA_SUCCESS if successful, otherwise error.
**
@@ -296,7 +296,7 @@ MCA_API extern tMCA_RESULT MCA_DeleteDep(tMCA_HANDLE handle, tMCA_DEP dep);
**
** Function MCA_ConnectReq
**
-** Description This function initiates an MCAP control channel connection
+** Description This function initiates an MCAP control channel connection
** to the peer device. When the connection is completed, an
** MCA_CONNECT_IND_EVT is reported to the application via its
** control callback function.
@@ -317,7 +317,7 @@ MCA_API extern tMCA_RESULT MCA_ConnectReq(tMCA_HANDLE handle, BD_ADDR bd_addr,
** Function MCA_DisconnectReq
**
** Description This function disconnect an MCAP control channel
-** to the peer device.
+** to the peer device.
** If associated data channel exists, they are disconnected.
** When the MCL is disconnected an MCA_DISCONNECT_IND_EVT is
** reported to the application via its control callback function.
@@ -334,7 +334,7 @@ MCA_API extern tMCA_RESULT MCA_DisconnectReq(tMCA_CL mcl);
** Description This function sends a CREATE_MDL request to the peer device.
** When the response is received, a MCA_CREATE_CFM_EVT is reported
** with the given MDL ID.
-** If the response is successful, a data channel is open
+** If the response is successful, a data channel is open
** with the given p_chnl_cfg
** When the data channel is open successfully, a MCA_OPEN_CFM_EVT
** is reported. This data channel is identified as tMCA_DL.
@@ -452,7 +452,7 @@ MCA_API extern tMCA_RESULT MCA_Delete(tMCA_CL mcl, UINT16 mdl_id);
**
** Function MCA_WriteReq
**
-** Description Send a data packet to the peer device.
+** Description Send a data packet to the peer device.
**
** The application passes the packet using the BT_HDR structure.
** The offset field must be equal to or greater than L2CAP_MIN_OFFSET.
diff --git a/stack/include/mca_defs.h b/stack/include/mca_defs.h
index 8561621..aebf315 100644
--- a/stack/include/mca_defs.h
+++ b/stack/include/mca_defs.h
@@ -4,7 +4,7 @@
**
** Description: This contains constants definitions and other information
** from the MCAP specification.
-**
+**
**
** Copyright (c) 2009-2009, Broadcom Corp., All Rights Reserved.
** WIDCOMM Bluetooth Core. Proprietary and confidential.
diff --git a/stack/include/obx_api.h b/stack/include/obx_api.h
index e05b6a9..ab6cae6 100644
--- a/stack/include/obx_api.h
+++ b/stack/include/obx_api.h
@@ -99,7 +99,7 @@ typedef UINT8 tOBX_SETPATH_FLAG;
/* Authentication Challenge Options */
#define OBX_AO_NONE 0x00 /* If this is used in OBX_StartServer and the authenticate
- * flag is TRUE, the optional Challenge Information (tag 0x01)
+ * flag is TRUE, the optional Challenge Information (tag 0x01)
* will not be sent. */
#define OBX_AO_USR_ID 0x01 /* Set this bit to make the client respond with the user ID. */
typedef UINT8 tOBX_AUTH_OPT;
@@ -243,26 +243,26 @@ enum
{
OBX_NULL_DISP,
/* server events */
- OBX_CONNECT_REQ_DISP,
- OBX_SESSION_REQ_DISP,
+ OBX_CONNECT_REQ_DISP,
+ OBX_SESSION_REQ_DISP,
OBX_DISCONNECT_REQ_DISP,
- OBX_PUT_REQ_DISP,
+ OBX_PUT_REQ_DISP,
OBX_GET_REQ_DISP,
- OBX_SETPATH_REQ_DISP,
+ OBX_SETPATH_REQ_DISP,
OBX_ABORT_REQ_DISP,
- OBX_ACTION_REQ_DISP,
+ OBX_ACTION_REQ_DISP,
/* client events */
- OBX_CONNECT_RSP_DISP,
- OBX_SESSION_RSP_DISP,
+ OBX_CONNECT_RSP_DISP,
+ OBX_SESSION_RSP_DISP,
OBX_DISCONNECT_RSP_DISP,
OBX_PUT_RSP_DISP,
OBX_GET_RSP_DISP,
OBX_SETPATH_RSP_DISP,
OBX_ABORT_RSP_DISP,
- OBX_ACTION_RSP_DISP,
+ OBX_ACTION_RSP_DISP,
/* common events */
- OBX_CLOSE_IND_DISP,
- OBX_TIMEOUT_DISP,
+ OBX_CLOSE_IND_DISP,
+ OBX_TIMEOUT_DISP,
OBX_PASSWORD_DISP
};
#define OBX_DISP_IS_RECV 0x80
@@ -410,8 +410,8 @@ typedef UINT8 tOBX_RSP_CODE;
#define OBX_USERID_RSP_TAG 1
#define OBX_NONCE_RSP_TAG 2
-typedef struct
-{
+typedef struct
+{
UINT8 tag;
UINT8 len;
UINT8 *p_array;
@@ -466,7 +466,7 @@ extern "C"
** Function OBX_Init
**
** Description This function is called to initialize the control block for this
-** layer. It must be called before accessing any other of its API
+** layer. It must be called before accessing any other of its API
** functions. It is typically called once during the start up of
** the stack.
**
@@ -552,7 +552,7 @@ OBX_API extern tOBX_STATUS OBX_AddSuspendedSession(tOBX_HANDLE shandle, BD_ADDR
**
** Function OBX_ConnectRsp
**
-** Description This function is called to send the response to a Connect
+** Description This function is called to send the response to a Connect
** Request from an OBEX client.
**
** Returns OBX_SUCCESS, if successful.
@@ -566,20 +566,20 @@ OBX_API extern tOBX_STATUS OBX_ConnectRsp(tOBX_HANDLE shandle, UINT8 rsp_code, B
** Function OBX_SessionRsp
**
** Description This function is called to respond to a request to create a reliable session.
-**
+**
**
** Returns OBX_SUCCESS, if successful.
** OBX_BAD_HANDLE, if the handle is not valid.
**
*******************************************************************************/
-OBX_API extern tOBX_STATUS OBX_SessionRsp(tOBX_HANDLE shandle, UINT8 rsp_code,
+OBX_API extern tOBX_STATUS OBX_SessionRsp(tOBX_HANDLE shandle, UINT8 rsp_code,
UINT8 ssn, UINT32 offset, BT_HDR *p_pkt);
/*******************************************************************************
**
** Function OBX_SetPathRsp
**
-** Description This function is called to send the response to a Set Path
+** Description This function is called to send the response to a Set Path
** Request from an OBEX client.
**
** Returns OBX_SUCCESS, if successful.
@@ -685,7 +685,7 @@ OBX_API extern UINT16 OBX_GetPeerAddr(tOBX_HANDLE shandle, BD_ADDR bd_addr);
** Function OBX_GetPortHandle
**
** Description This function is called to get the RFCOMM port handle for the obex connection.
-**
+**
**
** Returns OBX_SUCCESS, if successful.
** OBX_NO_RESOURCES, if no existing connection.
@@ -835,7 +835,7 @@ OBX_API extern tOBX_STATUS OBX_DisconnectReq(tOBX_HANDLE handle, BT_HDR *p_pkt);
** Function OBX_ActionReq
**
** Description This function sends a Action request to the connected server.
-** The Name Header and DestName Header must be in p_pkt for
+** The Name Header and DestName Header must be in p_pkt for
** the Copy and Move Object action.
** The Name header and Permission Header must be in p_pkt for
** the Set Object Permission action.
@@ -989,7 +989,7 @@ OBX_API extern BOOLEAN OBX_AddAsciiDescrHdr(BT_HDR *p_pkt, char *p_descr);
** Function OBX_AddTargetHdr
**
** Description This function is called to add an OBEX Target header to an OBEX
-** packet. This header is most commonly used in Connect packets.
+** packet. This header is most commonly used in Connect packets.
**
** NOTE: The target header must be the first header in an OBEX message.
**
@@ -1047,7 +1047,7 @@ OBX_API extern UINT8 *OBX_AddBodyStart(BT_HDR *p_pkt, UINT16 *p_len);
** Description This function is called to add the HI and the length of HV of an
** OBEX body header to an OBEX packet. If end is TRUE, HI is
** OBX_HI_BODY_END. If FALSE, HI is OBX_HI_BODY. It is assumed that
-** the actual value of the body has been copied into the OBEX packet.
+** the actual value of the body has been copied into the OBEX packet.
**
** Returns void
**
@@ -1231,7 +1231,7 @@ OBX_API extern UINT8 * OBX_CheckHdr(BT_HDR *p_pkt, UINT8 id);
**
** Function OBX_ReadNumHdrs
**
-** Description This function is called to check the number of headers in the
+** Description This function is called to check the number of headers in the
** given OBEX packet
**
** Returns number of headers.
@@ -1256,7 +1256,7 @@ OBX_API extern UINT16 OBX_ReadHdrLen(BT_HDR *p_pkt, UINT8 id);
**
** Function OBX_ReadNameHdr
**
-** Description This function is called to get the Name Header in the given
+** Description This function is called to get the Name Header in the given
** OBEX packet.
**
** Returns TRUE, if the header is in the OBEX packet.
@@ -1280,7 +1280,7 @@ OBX_API extern void OBX_WcharToChar (char *a_str, UINT16* w_str, UINT16 a_size)
**
** Function OBX_ReadAsciiNameHdr
**
-** Description This function is called to get the Name Header in the given
+** Description This function is called to get the Name Header in the given
** OBEX packet. If Name header exists in the given OBEX packet,
** it is converted to ASCII format and copied into p_name.
**
@@ -1294,7 +1294,7 @@ OBX_API extern BOOLEAN OBX_ReadAsciiNameHdr(BT_HDR *p_pkt, char *p_name, UINT16
**
** Function OBX_ReadTypeHdr
**
-** Description This function is called to get the Type Header in the given
+** Description This function is called to get the Type Header in the given
** OBEX packet.
**
** Returns TRUE, if the header is in the OBEX packet.
@@ -1307,7 +1307,7 @@ OBX_API extern BOOLEAN OBX_ReadTypeHdr(BT_HDR *p_pkt, UINT8 **p_type, UINT16 *p_
**
** Function OBX_ReadLengthHdr
**
-** Description This function is called to get the Length Header in the given
+** Description This function is called to get the Length Header in the given
** OBEX packet.
**
** Returns TRUE, if the header is in the OBEX packet.
@@ -1320,7 +1320,7 @@ OBX_API extern BOOLEAN OBX_ReadLengthHdr(BT_HDR *p_pkt, UINT32 *p_len);
**
** Function OBX_ReadTimeHdr
**
-** Description This function is called to get the Time Header in the given
+** Description This function is called to get the Time Header in the given
** OBEX packet.
**
** Returns TRUE, if the header is in the OBEX packet.
@@ -1468,7 +1468,7 @@ OBX_API extern BOOLEAN OBX_ReadPermissionHdr(BT_HDR *p_pkt, UINT8 *p_user, UINT8
**
** Function OBX_Read1ByteHdr
**
-** Description This function is called to get the UINT8 HV of the given HI
+** Description This function is called to get the UINT8 HV of the given HI
** in the given OBEX packet.
**
** Returns TRUE, if the header is in the OBEX packet.
@@ -1481,7 +1481,7 @@ OBX_API extern BOOLEAN OBX_Read1ByteHdr(BT_HDR *p_pkt, UINT8 id, UINT8 *p_data);
**
** Function OBX_Read4ByteHdr
**
-** Description This function is called to get the UINT32 HV of the given HI
+** Description This function is called to get the UINT32 HV of the given HI
** in the given OBEX packet.
**
** Returns TRUE, if the header is in the OBEX packet.
@@ -1533,7 +1533,7 @@ OBX_API extern BOOLEAN OBX_ReadTriplet(BT_HDR *p_pkt, UINT8 id, tOBX_TRIPLET *p_
**
** Function OBX_ReadActionIdHdr
**
-** Description This function is called to get the HV of the Action ID header
+** Description This function is called to get the HV of the Action ID header
** in the given OBEX packet.
**
** Returns TRUE, if the header is in the OBEX packet.
@@ -1546,7 +1546,7 @@ OBX_API extern BOOLEAN OBX_ReadActionIdHdr(BT_HDR *p_pkt, UINT8 *p_data);
**
** Function OBX_ReadChallenge
**
-** Description This function is called to read the Realm and options of the
+** Description This function is called to read the Realm and options of the
** Authentication Challenge Header in the given OBEX packet.
**
** Returns TRUE, if the header is in the OBEX packet.
@@ -1561,7 +1561,7 @@ OBX_API extern BOOLEAN OBX_ReadChallenge(BT_HDR *p_pkt, tOBX_CHARSET *p_charset,
**
** Function OBX_ReadAuthParams
**
-** Description This function is called to read the User ID of the
+** Description This function is called to read the User ID of the
** Authentication Response Header in the given OBEX packet.
**
** Returns TRUE, if the header is in the OBEX packet.
@@ -1639,7 +1639,7 @@ OBX_API extern BOOLEAN OBX_AddUtf8DestNameHdr(BT_HDR *p_pkt, UINT8 *p_dest);
**
** Function OBX_ReadUtf8NameHdr
**
-** Description This function is called to get the Name Header in the given
+** Description This function is called to get the Name Header in the given
** OBEX packet. If Name header exists in the given OBEX packet,
** it is converted to UTF8 format and copied into p_name.
**
@@ -1669,7 +1669,7 @@ OBX_API extern BOOLEAN OBX_ReadUtf8DescrHdr(BT_HDR *p_pkt, UINT8 *p_descr, UINT1
** Function OBX_ReadUtf8DestNameHdr
**
** Description This function is called to get the DestName Header in the
-** given OBEX packet.
+** given OBEX packet.
**
** Returns TRUE, if the header is in the OBEX packet.
** FALSE, otherwise.
diff --git a/stack/include/pan_api.h b/stack/include/pan_api.h
index f387077..9af03de 100644
--- a/stack/include/pan_api.h
+++ b/stack/include/pan_api.h
@@ -18,7 +18,7 @@
*****************************************************************************/
/* Define the minimum offset needed in a GKI buffer for
-** sending PAN packets. Note, we are currently not sending
+** sending PAN packets. Note, we are currently not sending
** extension headers, but may in the future, so allow
** space for them
*/
@@ -81,7 +81,7 @@ typedef UINT8 tPAN_RESULT;
** to the application. The second parameter TRUE means
** to create the bridge and FALSE means to remove it.
*/
-typedef void (tPAN_CONN_STATE_CB) (UINT16 handle, BD_ADDR bd_addr, tPAN_RESULT state, BOOLEAN is_role_change,
+typedef void (tPAN_CONN_STATE_CB) (UINT16 handle, BD_ADDR bd_addr, tPAN_RESULT state, BOOLEAN is_role_change,
UINT8 src_role, UINT8 dst_role);
@@ -218,7 +218,7 @@ extern "C"
** should set the PAN role explicitly.
**
** Parameters: p_register - contains all callback function pointers
-**
+**
**
** Returns none
**
@@ -259,7 +259,7 @@ PAN_API extern void PAN_Deregister (void);
** p_gn_name - Service name for GN role
** p_nap_name - Service name for NAP role
** Can be NULL if user wants it to be default
-**
+**
** Returns PAN_SUCCESS - if the role is set successfully
** PAN_FAILURE - if the role is not valid
**
@@ -274,7 +274,7 @@ PAN_API extern tPAN_RESULT PAN_SetRole (UINT8 role,
**
** Function PAN_Connect
**
-** Description This function is called by the application to initiate a
+** Description This function is called by the application to initiate a
** connection to the remote device
**
** Parameters: rem_bda - BD Addr of the remote device
@@ -284,7 +284,7 @@ PAN_API extern tPAN_RESULT PAN_SetRole (UINT8 role,
** PAN_ROLE_GN_SERVER is for GN role
** PAN_ROLE_NAP_SERVER is for NAP role
** *handle - Pointer for returning Handle to the connection
-**
+**
** Returns PAN_SUCCESS - if the connection is initiated successfully
** PAN_NO_RESOURCES - resources are not sufficent
** PAN_FAILURE - if the connection cannot be initiated
@@ -299,10 +299,10 @@ PAN_API extern tPAN_RESULT PAN_Connect (BD_ADDR rem_bda, UINT8 src_role, UINT8 d
**
** Function PAN_Disconnect
**
-** Description This is used to disconnect the connection
+** Description This is used to disconnect the connection
**
** Parameters: handle - handle for the connection
-**
+**
** Returns PAN_SUCCESS - if the connection is closed successfully
** PAN_FAILURE - if the connection is not found or
** there is an error in disconnecting
@@ -327,7 +327,7 @@ PAN_API extern tPAN_RESULT PAN_Disconnect (UINT16 handle);
** p_data - pointer to the data
** len - length of the data
** ext - to indicate that extension headers present
-**
+**
** Returns PAN_SUCCESS - if the data is sent successfully
** PAN_FAILURE - if the connection is not found or
** there is an error in sending data
@@ -357,7 +357,7 @@ PAN_API extern tPAN_RESULT PAN_Write (UINT16 handle,
** protocol - protocol of the ethernet packet like IP or ARP
** p_buf - pointer to the data buffer
** ext - to indicate that extension headers present
-**
+**
** Returns PAN_SUCCESS - if the data is sent successfully
** PAN_FAILURE - if the connection is not found or
** there is an error in sending data
@@ -380,7 +380,7 @@ PAN_API extern tPAN_RESULT PAN_WriteBuf (UINT16 handle,
** num_filters - number of protocol filter ranges
** start - array of starting protocol numbers
** end - array of ending protocol numbers
-**
+**
**
** Returns PAN_SUCCESS if protocol filters are set successfully
** PAN_FAILURE if connection not found or error in setting
@@ -403,7 +403,7 @@ PAN_API extern tPAN_RESULT PAN_SetProtocolFilters (UINT16 handle,
** multicast address ranges
** p_end_array - Pointer to sequence of ends of all
** multicast address ranges
-**
+**
**
** Returns PAN_SUCCESS if multicast filters are set successfully
** PAN_FAILURE if connection not found or error in setting
diff --git a/stack/include/rfcdefs.h b/stack/include/rfcdefs.h
index 98ab965..4dacda1 100644
--- a/stack/include/rfcdefs.h
+++ b/stack/include/rfcdefs.h
@@ -16,7 +16,7 @@
#define PORT_MAX_RFC_PORTS 31
/*
-** If nothing is negotiated MTU should be 127
+** If nothing is negotiated MTU should be 127
*/
#define RFCOMM_DEFAULT_MTU 127
@@ -86,10 +86,10 @@
}
#define RFCOMM_FRAME_IS_CMD(initiator, cr) \
- (( (initiator) && !(cr)) || (!(initiator) && (cr)))
+ (( (initiator) && !(cr)) || (!(initiator) && (cr)))
#define RFCOMM_FRAME_IS_RSP(initiator, cr) \
- (( (initiator) && (cr)) || (!(initiator) && !(cr)))
+ (( (initiator) && (cr)) || (!(initiator) && !(cr)))
#define RFCOMM_CR(initiator, is_command) \
(( ( (initiator) && (is_command)) \
@@ -129,9 +129,9 @@
#define RFCOMM_MSC_RTR 0x08 /* Ready to receive*/
#define RFCOMM_MSC_IC 0x40 /* Incomming call indicator*/
#define RFCOMM_MSC_DV 0x80 /* Data Valid*/
-
-#define RFCOMM_MSC_SHIFT_BREAK 4
-#define RFCOMM_MSC_BREAK_MASK 0xF0
+
+#define RFCOMM_MSC_SHIFT_BREAK 4
+#define RFCOMM_MSC_BREAK_MASK 0xF0
#define RFCOMM_MSC_BREAK_PRESENT_MASK 0x02
#define RFCOMM_BAUD_RATE_2400 0x00
@@ -143,26 +143,26 @@
#define RFCOMM_BAUD_RATE_57600 0x06
#define RFCOMM_BAUD_RATE_115200 0x07
#define RFCOMM_BAUD_RATE_230400 0x08
-
+
#define RFCOMM_5_BITS 0x00
#define RFCOMM_6_BITS 0x01
#define RFCOMM_7_BITS 0x02
#define RFCOMM_8_BITS 0x03
-
+
#define RFCOMM_RPN_BITS_MASK 0x03
#define RFCOMM_RPN_BITS_SHIFT 0
-
+
#define RFCOMM_ONESTOPBIT 0x00
#define RFCOMM_ONE5STOPBITS 0x01
-
+
#define RFCOMM_RPN_STOP_BITS_MASK 0x01
#define RFCOMM_RPN_STOP_BITS_SHIFT 2
-
+
#define RFCOMM_PARITY_NO 0x00
#define RFCOMM_PARITY_YES 0x01
#define RFCOMM_RPN_PARITY_MASK 0x01
#define RFCOMM_RPN_PARITY_SHIFT 3
-
+
#define RFCOMM_ODD_PARITY 0x00
#define RFCOMM_EVEN_PARITY 0x01
#define RFCOMM_MARK_PARITY 0x02
diff --git a/stack/include/sdpdefs.h b/stack/include/sdpdefs.h
index 886808c..6ef2972 100644
--- a/stack/include/sdpdefs.h
+++ b/stack/include/sdpdefs.h
@@ -164,7 +164,7 @@
#define UUID_PROTOCOL_MCAP_CTRL 0x001E
#define UUID_PROTOCOL_MCAP_DATA 0x001F
#define UUID_PROTOCOL_L2CAP 0x0100
-#define UUID_PROTOCOL_ATT 0x0007
+#define UUID_PROTOCOL_ATT 0x0007
/* Define common 16-bit service class UUIDs
*/
@@ -240,8 +240,8 @@
#define UUID_SERVCLASS_MESSAGE_ACCESS 0X1132 /* Message Access Service UUID */
#define UUID_SERVCLASS_MESSAGE_NOTIFICATION 0X1133 /* Message Notification Service UUID */
-#define UUID_SERVCLASS_GAP_SERVER 0x1800
-#define UUID_SERVCLASS_GATT_SERVER 0x1801
+#define UUID_SERVCLASS_GAP_SERVER 0x1800
+#define UUID_SERVCLASS_GATT_SERVER 0x1801
#define UUID_SERVCLASS_IMMEDIATE_ALERT 0x1802 /* immediate alert */
#define UUID_SERVCLASS_LINKLOSS 0x1803 /* Link Loss Alert */
#define UUID_SERVCLASS_TX_POWER 0x1804 /* TX power */
diff --git a/stack/include/smp_api.h b/stack/include/smp_api.h
index 1fd7c18..f04ff92 100644
--- a/stack/include/smp_api.h
+++ b/stack/include/smp_api.h
@@ -81,25 +81,25 @@ enum
typedef UINT8 tSMP_OOB_FLAG;
#define SMP_AUTH_NO_BOND 0x00
-#define SMP_AUTH_GEN_BOND 0x01 //todo sdh change GEN_BOND to BOND
+#define SMP_AUTH_GEN_BOND 0x01 //todo sdh change GEN_BOND to BOND
/* SMP Authentication requirement */
#define SMP_AUTH_YN_BIT (1 << 2)
#define SMP_AUTH_MASK (SMP_AUTH_GEN_BOND|SMP_AUTH_YN_BIT)
-#define SMP_AUTH_BOND SMP_AUTH_GEN_BOND
+#define SMP_AUTH_BOND SMP_AUTH_GEN_BOND
#define SMP_AUTH_NB_ENC_ONLY 0x00 //(SMP_AUTH_MASK | BTM_AUTH_SP_NO) /* no MITM, No Bonding, Encryptino only */
-#define SMP_AUTH_NB_IOCAP (SMP_AUTH_NO_BOND | SMP_AUTH_YN_BIT) /* MITM, No Bonding, Use IO Capability
- to detrermine authenticaion procedure */
+#define SMP_AUTH_NB_IOCAP (SMP_AUTH_NO_BOND | SMP_AUTH_YN_BIT) /* MITM, No Bonding, Use IO Capability
+ to detrermine authenticaion procedure */
#define SMP_AUTH_GB_ENC_ONLY (SMP_AUTH_GEN_BOND ) /* no MITM, General Bonding, Encryptino only */
-#define SMP_AUTH_GB_IOCAP (SMP_AUTH_GEN_BOND | SMP_AUTH_YN_BIT) /* MITM, General Bonding, Use IO Capability
+#define SMP_AUTH_GB_IOCAP (SMP_AUTH_GEN_BOND | SMP_AUTH_YN_BIT) /* MITM, General Bonding, Use IO Capability
to detrermine authenticaion procedure */
typedef UINT8 tSMP_AUTH_REQ;
#define SMP_SEC_NONE 0
-#define SMP_SEC_UNAUTHENTICATE (1 << 0)
+#define SMP_SEC_UNAUTHENTICATE (1 << 0)
#define SMP_SEC_AUTHENTICATED (1 << 2)
typedef UINT8 tSMP_SEC_LEVEL;
@@ -120,7 +120,7 @@ typedef struct
tSMP_AUTH_REQ auth_req; /* Authentication required (for local device) */
UINT8 max_key_size; /* max encryption key size */
tSMP_KEYS init_keys; /* initiator keys to be distributed */
- tSMP_KEYS resp_keys; /* responder keys */
+ tSMP_KEYS resp_keys; /* responder keys */
} tSMP_IO_REQ;
typedef struct
@@ -228,8 +228,8 @@ extern "C"
** Description This function is called to grant security process.
**
** Parameters bd_addr - peer device bd address.
-** res - result of the operation SMP_SUCCESS if success.
-** Otherwise, SMP_REPEATED_ATTEMPTS is too many attempts.
+** res - result of the operation SMP_SUCCESS if success.
+** Otherwise, SMP_REPEATED_ATTEMPTS is too many attempts.
**
** Returns None
**
@@ -244,7 +244,7 @@ extern "C"
** Passkey request to the application.
**
** Parameters: bd_addr - Address of the device for which PIN was requested
-** res - result of the operation BTM_SUCCESS if success
+** res - result of the operation BTM_SUCCESS if success
** passkey - numeric value in the range of
** BTM_MIN_PASSKEY_VAL(0) - BTM_MAX_PASSKEY_VAL(999999(0xF423F)).
**
@@ -259,11 +259,11 @@ extern "C"
** Simple Pairing in response to BTM_SP_RMT_OOB_EVT
**
** Parameters: bd_addr - Address of the peer device
-** res - result of the operation SMP_SUCCESS if success
+** res - result of the operation SMP_SUCCESS if success
** p_data - simple pairing Randomizer C.
**
*******************************************************************************/
- SMP_API extern void SMP_OobDataReply(BD_ADDR bd_addr, tSMP_STATUS res, UINT8 len,
+ SMP_API extern void SMP_OobDataReply(BD_ADDR bd_addr, tSMP_STATUS res, UINT8 len,
UINT8 *p_data);
/*******************************************************************************
@@ -272,18 +272,18 @@ extern "C"
**
** Description This function is called to encrypt the data with the specified
** key
-**
+**
** Parameters: key - Pointer to key key[0] conatins the MSB
** key_len - key length
** plain_text - Pointer to data to be encrypted
** plain_text[0] conatins the MSB
** pt_len - plain text length
** p_out - pointer to the encrypted outputs
-**
-** Returns Boolean - TRUE: encryption is successful
+**
+** Returns Boolean - TRUE: encryption is successful
*******************************************************************************/
- SMP_API extern BOOLEAN SMP_Encrypt (UINT8 *key, UINT8 key_len,
- UINT8 *plain_text, UINT8 pt_len,
+ SMP_API extern BOOLEAN SMP_Encrypt (UINT8 *key, UINT8 key_len,
+ UINT8 *plain_text, UINT8 pt_len,
tSMP_ENC *p_out);
#ifdef __cplusplus
diff --git a/stack/include/uipc_msg.h b/stack/include/uipc_msg.h
index 14f4391..0091687 100644
--- a/stack/include/uipc_msg.h
+++ b/stack/include/uipc_msg.h
@@ -26,7 +26,7 @@
********************************/
/* tUIPC_STATUS codes*/
-enum
+enum
{
UIPC_STATUS_SUCCESS,
UIPC_STATUS_FAIL
@@ -107,7 +107,7 @@ typedef struct t_uipc_log_msg
#define SLIP_SYNC_SUCCESS 0
#define SLIP_SYNC_FAILURE 1
-typedef struct
+typedef struct
{
UINT8 op_code;
UINT8 status;
@@ -152,7 +152,7 @@ typedef struct t_l2c_stream_info
typedef struct t_l2c_sync_to_lite_req
{
- UINT8 op_code; /* L2C_SYNC_TO_LITE_REQ */
+ UINT8 op_code; /* L2C_SYNC_TO_LITE_REQ */
UINT16 light_xmit_quota; /* Total quota for light stack */
UINT16 acl_data_size; /* Max ACL data size across HCI transport */
UINT16 non_flushable_pbf; /* L2CAP_PKT_START_NON_FLUSHABLE if controller supports */
@@ -387,8 +387,8 @@ typedef UINT16 tAUDIO_CODEC_TYPE;
#define CODEC_INFO_SBC_SUBBAND_8 0x01
/* MPEG audio version ID */
-#define CODEC_INFO_MP25_ID 0x00
-#define CODEC_INFO_RESERVE 0x01
+#define CODEC_INFO_MP25_ID 0x00
+#define CODEC_INFO_RESERVE 0x01
#define CODEC_INFO_MP2_ID 0x02
#define CODEC_INFO_MP3_ID 0x03
@@ -564,10 +564,10 @@ typedef struct
typedef struct
{
- UINT16 sampling_freq;
+ UINT16 sampling_freq;
UINT8 channel_mode; /* 0x02:mono, 0x01:dual */
UINT32 bitrate; /* 0 - 320K */
- UINT32 sbr_profile; /* 1: ON, 0: OFF */
+ UINT32 sbr_profile; /* 1: ON, 0: OFF */
} tCODEC_INFO_AAC;
typedef union
@@ -686,7 +686,7 @@ typedef struct
tAUDIO_ROUTE_SF src_sf;
tAUDIO_ROUTE_OUT out;
tAUDIO_ROUTE_SF out_codec_sf;
- tAUDIO_ROUTE_SF out_i2s_sf;
+ tAUDIO_ROUTE_SF out_i2s_sf;
tAUDIO_ROUTE_EQ eq_mode;
} tAUDIO_ROUTE_CONFIG_REQ;
@@ -720,13 +720,13 @@ typedef struct
UINT32 audio_l_g2; /* IIR biquad filter left ch gain 2 */
UINT32 audio_l_g3; /* IIR biquad filter left ch gain 3 */
UINT32 audio_l_g4; /* IIR biquad filter left ch gain 4 */
- UINT32 audio_l_gl; /* IIR biquad filter left ch global gain */
+ UINT32 audio_l_gl; /* IIR biquad filter left ch global gain */
UINT32 audio_r_g0; /* IIR biquad filter left ch gain 0 */
UINT32 audio_r_g1; /* IIR biquad filter left ch gain 1 */
UINT32 audio_r_g2; /* IIR biquad filter left ch gain 2 */
UINT32 audio_r_g3; /* IIR biquad filter left ch gain 3 */
UINT32 audio_r_g4; /* IIR biquad filter left ch gain 4 */
- UINT32 audio_r_gl; /* IIR biquad filter left ch global gain */
+ UINT32 audio_r_gl; /* IIR biquad filter left ch global gain */
} tEQ_GAIN_CONFIG;
typedef struct
@@ -734,7 +734,7 @@ typedef struct
UINT8 opcode; /* AUDIO_MIX_CONFIG_REQ */
tAUDIO_ROUTE_MIX mix_src;
tAUDIO_ROUTE_SF mix_src_sf;
- tMIX_SCALE_CONFIG mix_scale;
+ tMIX_SCALE_CONFIG mix_scale;
tCHIRP_CONFIG chirp_config;
} tAUDIO_MIX_CONFIG_REQ;
@@ -771,7 +771,7 @@ typedef struct
typedef struct
{
UINT8 opcode; /* AUDIO_SCALE_CONFIG_REQ */
- tMIX_SCALE_CONFIG mix_scale;
+ tMIX_SCALE_CONFIG mix_scale;
} tAUDIO_SCALE_CONFIG_REQ;
typedef UINT8 tBTA_AV_DUAL_STACK_EVT;
diff --git a/stack/include/wcassert.h b/stack/include/wcassert.h
index e0a22a3..459081f 100644
--- a/stack/include/wcassert.h
+++ b/stack/include/wcassert.h
@@ -8,17 +8,17 @@
** development / debugging to do precondition and postcondition
** checks for routines.
**
-** The macros are enabled when _DEBUG is defined.
-** Note:
-** None.
+** The macros are enabled when _DEBUG is defined.
+** Note:
+** None.
**
-** Revision History:
-** 10/23/99 Stephen Lee Create
+** Revision History:
+** 10/23/99 Stephen Lee Create
**
-** Copyright (c) 1999-2004 WIDCOMM Inc., All Rights Reserved.
+** Copyright (c) 1999-2004 WIDCOMM Inc., All Rights Reserved.
**
*******************************************************************************/
-
+
#ifdef _DEBUG
diff --git a/stack/l2cap/l2c_api.c b/stack/l2cap/l2c_api.c
index 8800df4..476ded1 100644
--- a/stack/l2cap/l2c_api.c
+++ b/stack/l2cap/l2c_api.c
@@ -31,7 +31,7 @@
** services.
**
** Returns PSM to use or zero if error. Typically, the PSM returned
-** is the same as was passed in, but for an outgoing-only
+** is the same as was passed in, but for an outgoing-only
** connection to a dynamic PSM, a "virtual" PSM is returned
** and should be used in the calls to L2CA_ConnectReq(),
** L2CA_ErtmConnectReq() and L2CA_Deregister()
@@ -150,7 +150,7 @@ void L2CA_Deregister (UINT16 psm)
** Description Other layers call this function to find an unused PSM for L2CAP
** services.
**
-** Returns PSM to use.
+** Returns PSM to use.
**
*******************************************************************************/
UINT16 L2CA_AllocatePSM(void)
@@ -221,8 +221,8 @@ UINT16 L2CA_ErtmConnectReq (UINT16 psm, BD_ADDR p_bd_addr, tL2CAP_ERTM_INFO *p_e
tL2C_RCB *p_rcb;
L2CAP_TRACE_API6 ("L2CA_ErtmConnectReq() PSM: 0x%04x BDA: %08x%04x p_ertm_info: 0x%08x allowed:0x%x preferred:%d", psm,
- (p_bd_addr[0]<<24)+(p_bd_addr[1]<<16)+(p_bd_addr[2]<<8)+p_bd_addr[3],
- (p_bd_addr[4]<<8)+p_bd_addr[5], p_ertm_info,
+ (p_bd_addr[0]<<24)+(p_bd_addr[1]<<16)+(p_bd_addr[2]<<8)+p_bd_addr[3],
+ (p_bd_addr[4]<<8)+p_bd_addr[5], p_ertm_info,
(p_ertm_info) ? p_ertm_info->allowed_modes : 0, (p_ertm_info) ? p_ertm_info->preferred_mode : 0);
/* Fail if we have not established communications with the controller */
@@ -341,9 +341,9 @@ BOOLEAN L2CA_ErtmConnectRsp (BD_ADDR p_bd_addr, UINT8 id, UINT16 lcid, UINT16 re
tL2C_LCB *p_lcb;
tL2C_CCB *p_ccb;
- L2CAP_TRACE_API6 ("L2CA_ErtmConnectRsp() CID: 0x%04x Result: %d Status: %d BDA: %08x%04x p_ertm_info:0x%08x",
+ L2CAP_TRACE_API6 ("L2CA_ErtmConnectRsp() CID: 0x%04x Result: %d Status: %d BDA: %08x%04x p_ertm_info:0x%08x",
lcid, result, status,
- (p_bd_addr[0]<<24)+(p_bd_addr[1]<<16)+(p_bd_addr[2]<<8)+p_bd_addr[3],
+ (p_bd_addr[0]<<24)+(p_bd_addr[1]<<16)+(p_bd_addr[2]<<8)+p_bd_addr[3],
(p_bd_addr[4]<<8)+p_bd_addr[5], p_ertm_info);
/* First, find the link control block */
@@ -424,7 +424,7 @@ BOOLEAN L2CA_ConfigReq (UINT16 cid, tL2CAP_CFG_INFO *p_cfg)
{
tL2C_CCB *p_ccb;
- L2CAP_TRACE_API5 ("L2CA_ConfigReq() CID 0x%04x: fcr_present:%d (mode %d) mtu_present:%d (%d)",
+ L2CAP_TRACE_API5 ("L2CA_ConfigReq() CID 0x%04x: fcr_present:%d (mode %d) mtu_present:%d (%d)",
cid, p_cfg->fcr_present, p_cfg->fcr.mode, p_cfg->mtu_present, p_cfg->mtu);
/* Find the channel control block. We don't know the link it is on. */
@@ -475,7 +475,7 @@ BOOLEAN L2CA_ConfigRsp (UINT16 cid, tL2CAP_CFG_INFO *p_cfg)
{
tL2C_CCB *p_ccb;
- L2CAP_TRACE_API6 ("L2CA_ConfigRsp() CID: 0x%04x Result: %d MTU present:%d Flush TO:%d FCR:%d FCS:%d",
+ L2CAP_TRACE_API6 ("L2CA_ConfigRsp() CID: 0x%04x Result: %d MTU present:%d Flush TO:%d FCR:%d FCS:%d",
cid, p_cfg->result, p_cfg->mtu_present, p_cfg->flush_to_present, p_cfg->fcr_present, p_cfg->fcs_present);
/* Find the channel control block. We don't know the link it is on. */
@@ -537,7 +537,7 @@ BOOLEAN L2CA_DisconnectReq (UINT16 cid)
**
** Function L2CA_DisconnectRsp
**
-** Description Higher layers call this function to acknowledge the
+** Description Higher layers call this function to acknowledge the
** disconnection of a channel.
**
** Returns void
@@ -663,7 +663,7 @@ BOOLEAN L2CA_Echo (BD_ADDR p_bd_addr, BT_HDR *p_data, tL2CA_ECHO_DATA_CB *p_cal
L2CAP_TRACE_ERROR0 ("L2CA_Echo ERROR : link not established");
return FALSE;
}
-
+
if (p_lcb->link_state != LST_CONNECTED)
{
L2CAP_TRACE_ERROR0 ("L2CA_Echo ERROR : link is not connected");
@@ -679,7 +679,7 @@ BOOLEAN L2CA_Echo (BD_ADDR p_bd_addr, BT_HDR *p_data, tL2CA_ECHO_DATA_CB *p_cal
l2cu_send_peer_echo_req (p_lcb, pp, p_data->len);
return (TRUE);
-
+
}
/*******************************************************************************
@@ -735,18 +735,18 @@ BOOLEAN L2CA_SetIdleTimeout (UINT16 cid, UINT16 timeout, BOOLEAN is_global)
** Function L2CA_SetIdleTimeoutByBdAddr
**
** Description Higher layers call this function to set the idle timeout for
-** a connection. The "idle timeout" is the amount of time that
-** a connection can remain up with no L2CAP channels on it.
-** A timeout of zero means that the connection will be torn
-** down immediately when the last channel is removed.
-** A timeout of 0xFFFF means no timeout. Values are in seconds.
-** A bd_addr is the remote BD address. If bd_addr = BT_BD_ANY,
-** then the idle timeouts for all active l2cap links will be
+** a connection. The "idle timeout" is the amount of time that
+** a connection can remain up with no L2CAP channels on it.
+** A timeout of zero means that the connection will be torn
+** down immediately when the last channel is removed.
+** A timeout of 0xFFFF means no timeout. Values are in seconds.
+** A bd_addr is the remote BD address. If bd_addr = BT_BD_ANY,
+** then the idle timeouts for all active l2cap links will be
** changed.
**
** Returns TRUE if command succeeded, FALSE if failed
**
-** NOTE This timeout applies to all logical channels active on the
+** NOTE This timeout applies to all logical channels active on the
** ACL link.
*******************************************************************************/
BOOLEAN L2CA_SetIdleTimeoutByBdAddr(BD_ADDR bd_addr, UINT16 timeout)
@@ -908,7 +908,7 @@ UINT16 L2CA_LocalLoopbackReq (UINT16 psm, UINT16 handle, BD_ADDR p_bd_addr)
BOOLEAN L2CA_SetAclPriority (BD_ADDR bd_addr, UINT8 priority)
{
L2CAP_TRACE_API6 ("L2CA_SetAclPriority() bdaddr: %02x%02x%02x%02x%04x, priority:%d",
- bd_addr[0], bd_addr[1], bd_addr[2],
+ bd_addr[0], bd_addr[1], bd_addr[2],
bd_addr[3], (bd_addr[4] << 8) + bd_addr[5], priority);
return (l2cu_set_acl_priority(bd_addr, priority, FALSE));
@@ -1056,21 +1056,21 @@ BOOLEAN L2CA_SetChnlDataRate (UINT16 cid, tL2CAP_CHNL_DATA_RATE tx, tL2CAP_CHNL_
**
** Function L2CA_SetFlushTimeout
**
-** Description This function set the automatic flush time out in Baseband
+** Description This function set the automatic flush time out in Baseband
** for ACL-U packets.
** BdAddr : the remote BD address of ACL link. If it is BT_DB_ANY
** then the flush time out will be applied to all ACL link.
** FlushTimeout: flush time out in ms
-** 0x0000 : No automatic flush
-** L2CAP_NO_RETRANSMISSION : No retransmission
-** 0x0002 - 0xFFFE : flush time out, if (flush_tout*8)+3/5)
+** 0x0000 : No automatic flush
+** L2CAP_NO_RETRANSMISSION : No retransmission
+** 0x0002 - 0xFFFE : flush time out, if (flush_tout*8)+3/5)
** <= HCI_MAX_AUTO_FLUSH_TOUT (in 625us slot).
** Otherwise, return FALSE.
-** L2CAP_NO_AUTOMATIC_FLUSH : No automatic flush
+** L2CAP_NO_AUTOMATIC_FLUSH : No automatic flush
**
** Returns TRUE if command succeeded, FALSE if failed
**
-** NOTE This flush timeout applies to all logical channels active on the
+** NOTE This flush timeout applies to all logical channels active on the
** ACL link.
*******************************************************************************/
BOOLEAN L2CA_SetFlushTimeout (BD_ADDR bd_addr, UINT16 flush_tout)
@@ -1094,7 +1094,7 @@ BOOLEAN L2CA_SetFlushTimeout (BD_ADDR bd_addr, UINT16 flush_tout)
hci_flush_to = flush_tout;
}
/* no automatic flush (infinite timeout) */
- else if (flush_tout == L2CAP_NO_AUTOMATIC_FLUSH)
+ else if (flush_tout == L2CAP_NO_AUTOMATIC_FLUSH)
{
hci_flush_to = 0x0000;
}
@@ -1125,7 +1125,7 @@ BOOLEAN L2CA_SetFlushTimeout (BD_ADDR bd_addr, UINT16 flush_tout)
{
p_lcb->link_flush_tout = flush_tout;
- L2CAP_TRACE_API4 ("L2CA_SetFlushTimeout 0x%04x ms for bd_addr [...;%02x%02x%02x]",
+ L2CAP_TRACE_API4 ("L2CA_SetFlushTimeout 0x%04x ms for bd_addr [...;%02x%02x%02x]",
flush_tout, bd_addr[3], bd_addr[4], bd_addr[5]);
if (!btsnd_hcic_write_auto_flush_tout (p_lcb->handle, hci_flush_to))
@@ -1134,7 +1134,7 @@ BOOLEAN L2CA_SetFlushTimeout (BD_ADDR bd_addr, UINT16 flush_tout)
}
else
{
- L2CAP_TRACE_WARNING3 ("WARNING L2CA_SetFlushTimeout No lcb for bd_addr [...;%02x%02x%02x]",
+ L2CAP_TRACE_WARNING3 ("WARNING L2CA_SetFlushTimeout No lcb for bd_addr [...;%02x%02x%02x]",
bd_addr[3], bd_addr[4], bd_addr[5]);
return (FALSE);
}
@@ -1152,8 +1152,8 @@ BOOLEAN L2CA_SetFlushTimeout (BD_ADDR bd_addr, UINT16 flush_tout)
{
p_lcb->link_flush_tout = flush_tout;
- L2CAP_TRACE_API4 ("L2CA_SetFlushTimeout 0x%04x ms for bd_addr [...;%02x%02x%02x]",
- flush_tout, p_lcb->remote_bd_addr[3],
+ L2CAP_TRACE_API4 ("L2CA_SetFlushTimeout 0x%04x ms for bd_addr [...;%02x%02x%02x]",
+ flush_tout, p_lcb->remote_bd_addr[3],
p_lcb->remote_bd_addr[4], p_lcb->remote_bd_addr[5]);
if (!btsnd_hcic_write_auto_flush_tout(p_lcb->handle, hci_flush_to))
@@ -1185,14 +1185,14 @@ BOOLEAN L2CA_GetPeerFeatures (BD_ADDR bd_addr, UINT32 *p_ext_feat, UINT8 *p_chnl
/* We must already have a link to the remote */
if ((p_lcb = l2cu_find_lcb_by_bd_addr (bd_addr)) == NULL)
{
- L2CAP_TRACE_WARNING2 ("L2CA_GetPeerFeatures() No BDA: %08x%04x",
- (bd_addr[0]<<24)+(bd_addr[1]<<16)+(bd_addr[2]<<8)+bd_addr[3],
+ L2CAP_TRACE_WARNING2 ("L2CA_GetPeerFeatures() No BDA: %08x%04x",
+ (bd_addr[0]<<24)+(bd_addr[1]<<16)+(bd_addr[2]<<8)+bd_addr[3],
(bd_addr[4]<<8)+bd_addr[5]);
return (FALSE);
}
- L2CAP_TRACE_API4 ("L2CA_GetPeerFeatures() BDA: %08x%04x ExtFea: 0x%08x Chnl_Mask[0]: 0x%02x",
- (bd_addr[0]<<24)+(bd_addr[1]<<16)+(bd_addr[2]<<8)+bd_addr[3],
+ L2CAP_TRACE_API4 ("L2CA_GetPeerFeatures() BDA: %08x%04x ExtFea: 0x%08x Chnl_Mask[0]: 0x%02x",
+ (bd_addr[0]<<24)+(bd_addr[1]<<16)+(bd_addr[2]<<8)+bd_addr[3],
(bd_addr[4]<<8)+bd_addr[5], p_lcb->peer_ext_fea, p_lcb->peer_chnl_mask[0]);
*p_ext_feat = p_lcb->peer_ext_fea;
@@ -1218,7 +1218,7 @@ BOOLEAN L2CA_GetBDAddrbyHandle (UINT16 handle, BD_ADDR bd_addr)
{
tL2C_LCB *p_lcb = NULL;
BOOLEAN found_dev = FALSE;
-
+
p_lcb = l2cu_find_lcb_by_handle (handle);
if (p_lcb)
{
@@ -1299,7 +1299,7 @@ BOOLEAN L2CA_ConnectFixedChnl (UINT16 fixed_cid, BD_ADDR rem_bda)
UINT16 reason;
#endif
- L2CAP_TRACE_API3 ("L2CA_ConnectFixedChnl() CID: 0x%04x BDA: %08x%04x", fixed_cid,
+ L2CAP_TRACE_API3 ("L2CA_ConnectFixedChnl() CID: 0x%04x BDA: %08x%04x", fixed_cid,
(rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3], (rem_bda[4]<<8)+rem_bda[5]);
/* Check CID is valid and registered */
@@ -1322,7 +1322,7 @@ BOOLEAN L2CA_ConnectFixedChnl (UINT16 fixed_cid, BD_ADDR rem_bda)
{
if (!(p_lcb->peer_chnl_mask[0] & (1 << fixed_cid)))
{
- L2CAP_TRACE_EVENT3 ("L2CA_ConnectFixedChnl() CID: 0x%04x BDA: %08x%04x not supported", fixed_cid,
+ L2CAP_TRACE_EVENT3 ("L2CA_ConnectFixedChnl() CID: 0x%04x BDA: %08x%04x not supported", fixed_cid,
(rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3], (rem_bda[4]<<8)+rem_bda[5]);
return (FALSE);
}
@@ -1368,7 +1368,7 @@ BOOLEAN L2CA_ConnectFixedChnl (UINT16 fixed_cid, BD_ADDR rem_bda)
**
** Parameters: Fixed CID
** BD Address of remote
-** Pointer to buffer of type BT_HDR
+** Pointer to buffer of type BT_HDR
**
** Return value L2CAP_DW_SUCCESS, if data accepted
** L2CAP_DW_FAILED, if error
@@ -1378,7 +1378,7 @@ UINT16 L2CA_SendFixedChnlData (UINT16 fixed_cid, BD_ADDR rem_bda, BT_HDR *p_buf)
{
tL2C_LCB *p_lcb;
- L2CAP_TRACE_API3 ("L2CA_SendFixedChnlData() CID: 0x%04x BDA: %08x%04x", fixed_cid,
+ L2CAP_TRACE_API3 ("L2CA_SendFixedChnlData() CID: 0x%04x BDA: %08x%04x", fixed_cid,
(rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3], (rem_bda[4]<<8)+rem_bda[5]);
/* Check CID is valid and registered */
@@ -1464,7 +1464,7 @@ BOOLEAN L2CA_RemoveFixedChnl (UINT16 fixed_cid, BD_ADDR rem_bda)
p_lcb = l2cu_find_lcb_by_bd_addr (rem_bda);
if ( ((p_lcb) == NULL) || (!p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL]) )
{
- L2CAP_TRACE_WARNING3 ("L2CA_RemoveFixedChnl() CID: 0x%04x BDA: %08x%04x not connected", fixed_cid,
+ L2CAP_TRACE_WARNING3 ("L2CA_RemoveFixedChnl() CID: 0x%04x BDA: %08x%04x not connected", fixed_cid,
(rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3], (rem_bda[4]<<8)+rem_bda[5]);
return (FALSE);
}
@@ -1489,11 +1489,11 @@ BOOLEAN L2CA_RemoveFixedChnl (UINT16 fixed_cid, BD_ADDR rem_bda)
** Description Higher layers call this function to set the idle timeout for
** a fixed channel. The "idle timeout" is the amount of time that
** a connection can remain up with no L2CAP channels on it.
-** A timeout of zero means that the connection will be torn
-** down immediately when the last channel is removed.
-** A timeout of 0xFFFF means no timeout. Values are in seconds.
-** A bd_addr is the remote BD address. If bd_addr = BT_BD_ANY,
-** then the idle timeouts for all active l2cap links will be
+** A timeout of zero means that the connection will be torn
+** down immediately when the last channel is removed.
+** A timeout of 0xFFFF means no timeout. Values are in seconds.
+** A bd_addr is the remote BD address. If bd_addr = BT_BD_ANY,
+** then the idle timeouts for all active l2cap links will be
** changed.
**
** Returns TRUE if command succeeded, FALSE if failed
@@ -1507,7 +1507,7 @@ BOOLEAN L2CA_SetFixedChannelTout (BD_ADDR rem_bda, UINT16 fixed_cid, UINT16 idle
p_lcb = l2cu_find_lcb_by_bd_addr (rem_bda);
if ( ((p_lcb) == NULL) || (!p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL]) )
{
- L2CAP_TRACE_WARNING3 ("L2CA_SetFixedChannelTout() CID: 0x%04x BDA: %08x%04x not connected", fixed_cid,
+ L2CAP_TRACE_WARNING3 ("L2CA_SetFixedChannelTout() CID: 0x%04x BDA: %08x%04x not connected", fixed_cid,
(rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3], (rem_bda[4]<<8)+rem_bda[5]);
return (FALSE);
}
@@ -1538,7 +1538,7 @@ BOOLEAN L2CA_SetFixedChannelTout (BD_ADDR rem_bda, UINT16 fixed_cid, UINT16 idle
** Returns TRUE if successful
**
*******************************************************************************/
-BOOLEAN L2CA_GetCurrentConfig (UINT16 lcid,
+BOOLEAN L2CA_GetCurrentConfig (UINT16 lcid,
tL2CAP_CFG_INFO **pp_our_cfg, tL2CAP_CH_CFG_BITS *p_our_cfg_bits,
tL2CAP_CFG_INFO **pp_peer_cfg, tL2CAP_CH_CFG_BITS *p_peer_cfg_bits)
{
@@ -1628,7 +1628,7 @@ UINT8 L2CA_DataWrite (UINT16 cid, BT_HDR *p_data)
**
** Function L2CA_SetChnlFlushability
**
-** Description Higher layers call this function to set a channels
+** Description Higher layers call this function to set a channels
** flushability flags
**
** Returns TRUE if CID found, else FALSE
@@ -1673,7 +1673,7 @@ BOOLEAN L2CA_SetChnlFlushability (UINT16 cid, BOOLEAN is_flushable)
*******************************************************************************/
UINT8 L2CA_DataWriteEx (UINT16 cid, BT_HDR *p_data, UINT16 flags)
{
- L2CAP_TRACE_API3 ("L2CA_DataWriteEx() CID: 0x%04x Len: %d Flags:0x%04X",
+ L2CAP_TRACE_API3 ("L2CA_DataWriteEx() CID: 0x%04x Len: %d Flags:0x%04X",
cid, p_data->len, flags);
return l2c_data_write (cid, p_data, flags);
}
diff --git a/stack/l2cap/l2c_ble.c b/stack/l2cap/l2c_ble.c
index 8c686f9..8c69dee 100644
--- a/stack/l2cap/l2c_ble.c
+++ b/stack/l2cap/l2c_ble.c
@@ -63,7 +63,7 @@ BOOLEAN L2CA_CancelBleConnectReq (BD_ADDR rem_bda)
btm_ble_update_bg_state();
btm_ble_resume_bg_conn(NULL, TRUE);
- return(TRUE);
+ return(TRUE);
}
else
return(FALSE);
@@ -163,19 +163,19 @@ BOOLEAN L2CA_EnableUpdateBleConnParams (BD_ADDR rem_bda, BOOLEAN enable)
p_lcb->upd_disabled = UPD_ENABLED;
}
}
- else
+ else
{
- /* application requests to disable parameters update. If parameters are already updated, lets set them
+ /* application requests to disable parameters update. If parameters are already updated, lets set them
up to what has been requested during connection establishement */
if (p_lcb->upd_disabled == UPD_UPDATED)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_or_alloc_dev (rem_bda);
- btsnd_hcic_ble_upd_ll_conn_params (p_lcb->handle,
+ btsnd_hcic_ble_upd_ll_conn_params (p_lcb->handle,
(UINT16)((p_dev_rec->conn_params.min_conn_int != BTM_BLE_CONN_PARAM_UNDEF) ? p_dev_rec->conn_params.min_conn_int : L2CAP_LE_INT_MIN),
(UINT16)((p_dev_rec->conn_params.max_conn_int != BTM_BLE_CONN_PARAM_UNDEF) ? p_dev_rec->conn_params.max_conn_int : L2CAP_LE_INT_MAX),
- (UINT16)((p_dev_rec->conn_params.slave_latency != BTM_BLE_CONN_PARAM_UNDEF) ? p_dev_rec->conn_params.slave_latency : 0),
- (UINT16) ((p_dev_rec->conn_params.supervision_tout != BTM_BLE_CONN_PARAM_UNDEF) ? p_dev_rec->conn_params.supervision_tout : L2CAP_LE_TIMEOUT_MAX),
+ (UINT16)((p_dev_rec->conn_params.slave_latency != BTM_BLE_CONN_PARAM_UNDEF) ? p_dev_rec->conn_params.slave_latency : 0),
+ (UINT16) ((p_dev_rec->conn_params.supervision_tout != BTM_BLE_CONN_PARAM_UNDEF) ? p_dev_rec->conn_params.supervision_tout : L2CAP_LE_TIMEOUT_MAX),
0, 0);
}
p_lcb->upd_disabled = UPD_DISABLED;
@@ -295,21 +295,21 @@ void l2cble_scanner_conn_comp (UINT16 handle, BD_ADDR bda, tBLE_ADDR_TYPE type,
(p_dev_rec->conn_params.slave_latency <= L2CAP_LE_LATENCY_MAX ) &&
(p_dev_rec->conn_params.supervision_tout >= L2CAP_LE_TIMEOUT_MIN) &&
(p_dev_rec->conn_params.supervision_tout <= L2CAP_LE_TIMEOUT_MAX) &&
- ((conn_interval < p_dev_rec->conn_params.min_conn_int &&
- p_dev_rec->conn_params.min_conn_int != BTM_BLE_CONN_PARAM_UNDEF) ||
- (conn_interval > p_dev_rec->conn_params.max_conn_int) ||
- (conn_latency > p_dev_rec->conn_params.slave_latency) ||
+ ((conn_interval < p_dev_rec->conn_params.min_conn_int &&
+ p_dev_rec->conn_params.min_conn_int != BTM_BLE_CONN_PARAM_UNDEF) ||
+ (conn_interval > p_dev_rec->conn_params.max_conn_int) ||
+ (conn_latency > p_dev_rec->conn_params.slave_latency) ||
(conn_timeout > p_dev_rec->conn_params.supervision_tout)))
{
L2CAP_TRACE_ERROR5 ("upd_ll_conn_params: HANDLE=%d min_conn_int=%d max_conn_int=%d slave_latency=%d supervision_tout=%d",
handle, p_dev_rec->conn_params.min_conn_int, p_dev_rec->conn_params.max_conn_int,
p_dev_rec->conn_params.slave_latency, p_dev_rec->conn_params.supervision_tout);
- btsnd_hcic_ble_upd_ll_conn_params (handle,
- p_dev_rec->conn_params.min_conn_int,
+ btsnd_hcic_ble_upd_ll_conn_params (handle,
+ p_dev_rec->conn_params.min_conn_int,
p_dev_rec->conn_params.max_conn_int,
- p_dev_rec->conn_params.slave_latency,
- p_dev_rec->conn_params.supervision_tout,
+ p_dev_rec->conn_params.slave_latency,
+ p_dev_rec->conn_params.supervision_tout,
0, 0);
}
@@ -318,7 +318,7 @@ void l2cble_scanner_conn_comp (UINT16 handle, BD_ADDR bda, tBLE_ADDR_TYPE type,
if (p_lcb->p_echo_rsp_cb)
{
- L2CAP_TRACE_ERROR0 ("l2cu_send_peer_echo_req");
+ L2CAP_TRACE_ERROR0 ("l2cu_send_peer_echo_req");
l2cu_send_peer_echo_req (p_lcb, NULL, 0);
}
@@ -399,7 +399,7 @@ void l2cble_advertiser_conn_comp (UINT16 handle, BD_ADDR bda, tBLE_ADDR_TYPE typ
** Returns void
**
*******************************************************************************/
-void l2cble_conn_comp(UINT16 handle, UINT8 role, BD_ADDR bda, tBLE_ADDR_TYPE type,
+void l2cble_conn_comp(UINT16 handle, UINT8 role, BD_ADDR bda, tBLE_ADDR_TYPE type,
UINT16 conn_interval, UINT16 conn_latency, UINT16 conn_timeout)
{
if (role == HCI_ROLE_MASTER)
@@ -415,7 +415,7 @@ void l2cble_conn_comp(UINT16 handle, UINT8 role, BD_ADDR bda, tBLE_ADDR_TYPE typ
**
** Function l2cble_process_sig_cmd
**
-** Description This function is called when a signalling packet is received
+** Description This function is called when a signalling packet is received
** on the BLE signalling CID
**
** Returns void
@@ -464,7 +464,7 @@ void l2cble_process_sig_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
{
if (min_interval < L2CAP_LE_INT_MIN || min_interval > L2CAP_LE_INT_MAX ||
max_interval < L2CAP_LE_INT_MIN || max_interval > L2CAP_LE_INT_MAX ||
- latency > L2CAP_LE_LATENCY_MAX ||
+ latency > L2CAP_LE_LATENCY_MAX ||
/*(timeout >= max_interval && latency > (timeout * 10/(max_interval * 1.25) - 1)) ||*/
timeout < L2CAP_LE_TIMEOUT_MIN || timeout > L2CAP_LE_TIMEOUT_MAX ||
max_interval < min_interval)
@@ -514,7 +514,7 @@ void l2cble_process_sig_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
**
** Function l2cble_create_conn
**
-** Description This function initiates an acl connection via HCI
+** Description This function initiates an acl connection via HCI
**
** Returns TRUE if successful, FALSE if connection not started.
**
diff --git a/stack/l2cap/l2c_csm.c b/stack/l2cap/l2c_csm.c
index 67de4f4..216f45b 100644
--- a/stack/l2cap/l2c_csm.c
+++ b/stack/l2cap/l2c_csm.c
@@ -154,13 +154,13 @@ static void l2c_csm_closed (tL2C_CCB *p_ccb, UINT16 event, void *p_data)
case L2CEVT_LP_CONNECT_CFM: /* Link came up */
p_ccb->chnl_state = CST_ORIG_W4_SEC_COMP;
- btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm,
+ btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm,
p_ccb->p_lcb->handle, TRUE, &l2c_link_sec_comp, p_ccb);
break;
case L2CEVT_LP_CONNECT_CFM_NEG: /* Link failed */
/* Disconnect unless ACL collision and upper layer wants to handle it */
- if (p_ci->status != HCI_ERR_CONNECTION_EXISTS
+ if (p_ci->status != HCI_ERR_CONNECTION_EXISTS
|| !btm_acl_notif_conn_collision(p_ccb->p_lcb->remote_bd_addr))
{
L2CAP_TRACE_API2 ("L2CAP - Calling ConnectCfm_Cb(), CID: 0x%04x Status: %d", p_ccb->local_cid, p_ci->status);
@@ -182,9 +182,9 @@ static void l2c_csm_closed (tL2C_CCB *p_ccb, UINT16 event, void *p_data)
Event uninit_use_in_call: Using uninitialized value "settings" (field "settings".timeout uninitialized) in call to function "BTM_SetPowerMode" [details]
Event uninit_use_in_call: Using uninitialized value "settings.max" in call to function "BTM_SetPowerMode" [details]
Event uninit_use_in_call: Using uninitialized value "settings.min" in call to function "BTM_SetPowerMode"
-// FALSE-POSITIVE error from Coverity test-tool. Please do NOT remove following comment.
-// coverity[uninit_use_in_call] False-positive: setting the mode to BTM_PM_MD_ACTIVE only uses settings.mode the other data members of tBTM_PM_PWR_MD are ignored
-*/
+// FALSE-POSITIVE error from Coverity test-tool. Please do NOT remove following comment.
+// coverity[uninit_use_in_call] False-positive: setting the mode to BTM_PM_MD_ACTIVE only uses settings.mode the other data members of tBTM_PM_PWR_MD are ignored
+*/
BTM_SetPowerMode (BTM_PM_SET_ONLY_ID, p_ccb->p_lcb->remote_bd_addr, &settings);
}
#else
@@ -192,7 +192,7 @@ Event uninit_use_in_call: Using uninitialized value "settings.min" in call to fu
#endif
/* If sec access does not result in started SEC_COM or COMP_NEG are already processed */
- if (btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm,
+ if (btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm,
p_ccb->p_lcb->handle, TRUE, &l2c_link_sec_comp, p_ccb) == BTM_CMD_STARTED)
p_ccb->chnl_state = CST_ORIG_W4_SEC_COMP;
break;
@@ -239,9 +239,9 @@ Event uninit_use_in_call: Using uninitialized value "settings.min" in call to fu
Event uninit_use_in_call: Using uninitialized value "settings" (field "settings".timeout uninitialized) in call to function "BTM_SetPowerMode" [details]
Event uninit_use_in_call: Using uninitialized value "settings.max" in call to function "BTM_SetPowerMode" [details]
Event uninit_use_in_call: Using uninitialized value "settings.min" in call to function "BTM_SetPowerMode"
-// FALSE-POSITIVE error from Coverity test-tool. Please do NOT remove following comment.
-// coverity[uninit_use_in_call] False-positive: setting the mode to BTM_PM_MD_ACTIVE only uses settings.mode the other data members of tBTM_PM_PWR_MD are ignored
-*/
+// FALSE-POSITIVE error from Coverity test-tool. Please do NOT remove following comment.
+// coverity[uninit_use_in_call] False-positive: setting the mode to BTM_PM_MD_ACTIVE only uses settings.mode the other data members of tBTM_PM_PWR_MD are ignored
+*/
BTM_SetPowerMode (BTM_PM_SET_ONLY_ID, p_ccb->p_lcb->remote_bd_addr, &settings);
}
#else
@@ -249,7 +249,7 @@ Event uninit_use_in_call: Using uninitialized value "settings.min" in call to fu
#endif
p_ccb->chnl_state = CST_TERM_W4_SEC_COMP;
- if (btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm,
+ if (btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm,
p_ccb->p_lcb->handle, FALSE, &l2c_link_sec_comp, p_ccb) == BTM_CMD_STARTED)
{
/* started the security process, tell the peer to set a longer timer */
@@ -319,7 +319,7 @@ static void l2c_csm_orig_w4_sec_comp (tL2C_CCB *p_ccb, UINT16 event, void *p_dat
case L2CEVT_SEC_RE_SEND_CMD: /* BTM has enough info to proceed */
case L2CEVT_LP_CONNECT_CFM: /* Link came up */
- btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm,
+ btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm,
p_ccb->p_lcb->handle, TRUE, &l2c_link_sec_comp, p_ccb);
break;
@@ -426,11 +426,11 @@ static void l2c_csm_term_w4_sec_comp (tL2C_CCB *p_ccb, UINT16 event, void *p_dat
else
{
/*
- ** L2CAP Connect Response will be sent out by 3 sec timer expiration
- ** because Bluesoleil doesn't respond to L2CAP Information Request.
- ** Bluesoleil seems to disconnect ACL link as failure case, because
- ** it takes too long (4~7secs) to get response.
- ** product version : Bluesoleil 2.1.1.0 EDR Release 060123
+ ** L2CAP Connect Response will be sent out by 3 sec timer expiration
+ ** because Bluesoleil doesn't respond to L2CAP Information Request.
+ ** Bluesoleil seems to disconnect ACL link as failure case, because
+ ** it takes too long (4~7secs) to get response.
+ ** product version : Bluesoleil 2.1.1.0 EDR Release 060123
** stack version : 05.04.11.20060119
*/
@@ -480,7 +480,7 @@ static void l2c_csm_term_w4_sec_comp (tL2C_CCB *p_ccb, UINT16 event, void *p_dat
break;
case L2CEVT_SEC_RE_SEND_CMD: /* BTM has enough info to proceed */
- btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm,
+ btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm,
p_ccb->p_lcb->handle, FALSE, &l2c_link_sec_comp, p_ccb);
break;
}
@@ -736,7 +736,7 @@ static void l2c_csm_config (tL2C_CCB *p_ccb, UINT16 event, void *p_data)
if (p_cfg->result != L2CAP_CFG_PENDING)
{
/* TBD: When config options grow beyong minimum MTU (48 bytes)
- * logic needs to be added to handle responses with
+ * logic needs to be added to handle responses with
* continuation bit set in flags field.
* 1. Send additional config request out until C-bit is cleared in response
*/
@@ -1007,7 +1007,7 @@ static void l2c_csm_open (tL2C_CCB *p_ccb, UINT16 event, void *p_data)
BTM_CancelSniffMode (p_ccb->p_lcb->remote_bd_addr);
#endif
// btla-specific --
-
+
p_ccb->chnl_state = CST_W4_L2CA_DISCONNECT_RSP;
btu_start_timer (&p_ccb->timer_entry, BTU_TTYPE_L2CAP_CHNL, L2CAP_CHNL_DISCONNECT_TOUT);
L2CAP_TRACE_API1 ("L2CAP - Calling Disconnect_Ind_Cb(), CID: 0x%04x Conf Needed", p_ccb->local_cid);
diff --git a/stack/l2cap/l2c_fcr.c b/stack/l2cap/l2c_fcr.c
index c8126be..25a9b3f 100644
--- a/stack/l2cap/l2c_fcr.c
+++ b/stack/l2cap/l2c_fcr.c
@@ -107,7 +107,7 @@ unsigned short l2c_fcr_updcrc(unsigned short icrc, unsigned char *icp, int icnt)
register unsigned char *cp = icp;
register int cnt = icnt;
- while (cnt--)
+ while (cnt--)
{
crc = ((crc >> 8) & 0xff) ^ crctab[(crc & 0xff) ^ *cp++];
}
@@ -254,14 +254,14 @@ void l2c_fcr_cleanup (tL2C_CCB *p_ccb)
if (p_str)
{
sprintf(p_str, "Sent Pkts:%08u Bytes:%10u(%06u/sec) RR:%08u REJ:%08u RNR:%08u SREJ:%08u",
- p_ccb->fcrb.ertm_pkt_counts[0], p_ccb->fcrb.ertm_byte_counts[0],
+ p_ccb->fcrb.ertm_pkt_counts[0], p_ccb->fcrb.ertm_byte_counts[0],
(dur >= 10 ? (p_ccb->fcrb.ertm_byte_counts[0] * 100) / (dur / 10) : 0),
p_ccb->fcrb.s_frames_sent[0], p_ccb->fcrb.s_frames_sent[1], p_ccb->fcrb.s_frames_sent[2], p_ccb->fcrb.s_frames_sent[3]);
BT_TRACE_1(TRACE_CTRL_GENERAL | TRACE_LAYER_GKI | TRACE_ORG_GKI , TRACE_TYPE_GENERIC, "%s", p_str);
sprintf(p_str, "Rcvd Pkts:%08u Bytes:%10u(%06u/sec) RR:%08u REJ:%08u RNR:%08u SREJ:%08u",
- p_ccb->fcrb.ertm_pkt_counts[1], p_ccb->fcrb.ertm_byte_counts[1],
+ p_ccb->fcrb.ertm_pkt_counts[1], p_ccb->fcrb.ertm_byte_counts[1],
(dur >= 10 ? (p_ccb->fcrb.ertm_byte_counts[1] * 100) / (dur / 10) : 0),
p_ccb->fcrb.s_frames_rcvd[0], p_ccb->fcrb.s_frames_rcvd[1], p_ccb->fcrb.s_frames_rcvd[2], p_ccb->fcrb.s_frames_rcvd[3]);
@@ -280,7 +280,7 @@ void l2c_fcr_cleanup (tL2C_CCB *p_ccb)
continue;
}
- sprintf(p_str, "[%02u] throughput: %5u, ack_delay avg:%3u, min:%3u, max:%3u, ack_q_count avg:%3u, min:%3u, max:%3u",
+ sprintf(p_str, "[%02u] throughput: %5u, ack_delay avg:%3u, min:%3u, max:%3u, ack_q_count avg:%3u, min:%3u, max:%3u",
i, p_ccb->fcrb.throughput[i],
p_ccb->fcrb.ack_delay_avg[i], p_ccb->fcrb.ack_delay_min[i], p_ccb->fcrb.ack_delay_max[i],
p_ccb->fcrb.ack_q_count_avg[i], p_ccb->fcrb.ack_q_count_min[i], p_ccb->fcrb.ack_q_count_max[i] );
@@ -297,7 +297,7 @@ void l2c_fcr_cleanup (tL2C_CCB *p_ccb)
ack_q_count_avg /= (L2CAP_ERTM_STATS_NUM_AVG - 1);
BT_TRACE_3(TRACE_CTRL_GENERAL | TRACE_LAYER_GKI | TRACE_ORG_GKI , TRACE_TYPE_GENERIC,
- "throughput_avg: %8u (kbytes/sec), ack_delay_avg: %8u ms, ack_q_count_avg: %8u",
+ "throughput_avg: %8u (kbytes/sec), ack_delay_avg: %8u ms, ack_q_count_avg: %8u",
throughput_avg, ack_delay_avg, ack_q_count_avg );
GKI_freebuf(p_str);
@@ -853,7 +853,7 @@ void l2c_fcr_proc_pdu (tL2C_CCB *p_ccb, BT_HDR *p_buf)
void l2c_fcr_proc_tout (tL2C_CCB *p_ccb)
{
L2CAP_TRACE_DEBUG5 ("l2c_fcr_proc_tout: CID: 0x%04x num_tries: %u (max: %u) wait_ack: %u ack_q_count: %u",
- p_ccb->local_cid, p_ccb->fcrb.num_tries, p_ccb->peer_cfg.fcr.max_transmit,
+ p_ccb->local_cid, p_ccb->fcrb.num_tries, p_ccb->peer_cfg.fcr.max_transmit,
p_ccb->fcrb.wait_ack, p_ccb->fcrb.waiting_for_ack_q.count);
#if (L2CAP_ERTM_STATS == TRUE)
@@ -888,7 +888,7 @@ void l2c_fcr_proc_tout (tL2C_CCB *p_ccb)
*******************************************************************************/
void l2c_fcr_proc_ack_tout (tL2C_CCB *p_ccb)
{
- L2CAP_TRACE_DEBUG5 ("l2c_fcr_proc_ack_tout: CID: 0x%04x State: %u Wack:%u Rq:%d Acked:%d", p_ccb->local_cid,
+ L2CAP_TRACE_DEBUG5 ("l2c_fcr_proc_ack_tout: CID: 0x%04x State: %u Wack:%u Rq:%d Acked:%d", p_ccb->local_cid,
p_ccb->chnl_state, p_ccb->fcrb.wait_ack, p_ccb->fcrb.next_seq_expected, p_ccb->fcrb.last_ack_sent);
if ( (p_ccb->chnl_state == CST_OPEN) && (!p_ccb->fcrb.wait_ack)
@@ -1232,7 +1232,7 @@ static void process_i_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_word, B
/* Seq number is the next expected. Clear possible reject exception in case it occured */
p_fcrb->rej_sent = p_fcrb->srej_sent = FALSE;
- /* Adjust the next_seq, so that if the upper layer sends more data in the callback
+ /* Adjust the next_seq, so that if the upper layer sends more data in the callback
context, the received frame is acked by an I-frame. */
p_fcrb->next_seq_expected = (tx_seq + 1) & L2CAP_FCR_SEQ_MODULO;
@@ -1259,7 +1259,7 @@ static void process_i_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_word, B
/* If it is the first I frame we did not ack, start ack timer */
if (!p_ccb->fcrb.ack_timer.in_use)
{
- btu_start_quick_timer (&p_ccb->fcrb.ack_timer, BTU_TTYPE_L2CAP_FCR_ACK,
+ btu_start_quick_timer (&p_ccb->fcrb.ack_timer, BTU_TTYPE_L2CAP_FCR_ACK,
(L2CAP_FCR_ACK_TOUT*QUICK_TIMER_TICKS_PER_SEC)/1000);
}
}
@@ -1475,7 +1475,7 @@ static BOOLEAN do_sar_reassembly (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_wo
{
#if (L2CAP_NUM_FIXED_CHNLS > 0)
if (p_ccb->local_cid < L2CAP_BASE_APPL_CID)
- (*l2cb.fixed_reg[p_ccb->local_cid - L2CAP_FIRST_FIXED_CHNL].pL2CA_FixedData_Cb)(p_ccb->p_lcb->remote_bd_addr, p_buf);
+ (*l2cb.fixed_reg[p_ccb->local_cid - L2CAP_FIRST_FIXED_CHNL].pL2CA_FixedData_Cb)(p_ccb->p_lcb->remote_bd_addr, p_buf);
else
#endif
l2c_csm_execute (p_ccb, L2CEVT_L2CAP_DATA, p_buf);
@@ -1506,7 +1506,7 @@ static BOOLEAN retransmit_i_frames (tL2C_CCB *p_ccb, UINT8 tx_seq)
&& (p_ccb->fcrb.num_tries >= p_ccb->peer_cfg.fcr.max_transmit) )
{
L2CAP_TRACE_EVENT5 ("Max Tries Exceeded: (last_acq: %d CID: 0x%04x num_tries: %u (max: %u) ack_q_count: %u",
- p_ccb->fcrb.last_rx_ack, p_ccb->local_cid, p_ccb->fcrb.num_tries, p_ccb->peer_cfg.fcr.max_transmit,
+ p_ccb->fcrb.last_rx_ack, p_ccb->local_cid, p_ccb->fcrb.num_tries, p_ccb->peer_cfg.fcr.max_transmit,
p_ccb->fcrb.waiting_for_ack_q.count);
l2cu_disconnect_chnl (p_ccb);
@@ -1667,7 +1667,7 @@ BT_HDR *l2c_fcr_get_next_xmit_sdu_seg (tL2C_CCB *p_ccb, UINT16 max_packet_length
mid_seg = TRUE;
/* Get a new buffer and copy the data that can be sent in a PDU */
- p_xmit = l2c_fcr_clone_buf (p_buf, L2CAP_MIN_OFFSET + L2CAP_SDU_LEN_OFFSET,
+ p_xmit = l2c_fcr_clone_buf (p_buf, L2CAP_MIN_OFFSET + L2CAP_SDU_LEN_OFFSET,
max_pdu, p_ccb->ertm_info.fcr_tx_pool_id);
if (p_xmit != NULL)
@@ -1834,7 +1834,7 @@ UINT8 l2c_fcr_chk_chan_modes (tL2C_CCB *p_ccb)
**
** Function l2c_fcr_adj_our_req_options
**
-** Description Validates and sets up the FCR options passed in from
+** Description Validates and sets up the FCR options passed in from
** L2CA_ConfigReq based on remote device's features.
**
** Returns TRUE if no errors, Otherwise FALSE
@@ -1951,7 +1951,7 @@ BOOLEAN l2c_fcr_adj_our_req_options (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
**
** Function l2c_fcr_adj_monitor_retran_timeout
**
-** Description Overrides monitor/retrans timer value based on controller
+** Description Overrides monitor/retrans timer value based on controller
**
** Returns None
**
@@ -1962,7 +1962,7 @@ void l2c_fcr_adj_monitor_retran_timeout (tL2C_CCB *p_ccb)
if (p_ccb->out_cfg_fcr_present)
{
/*
- ** if we requestd ERTM or accepted ERTM
+ ** if we requestd ERTM or accepted ERTM
** We may accept ERTM even if we didn't request ERTM, in case of requesting STREAM
*/
if ((p_ccb->our_cfg.fcr.mode == L2CAP_FCR_ERTM_MODE)
@@ -1986,7 +1986,7 @@ void l2c_fcr_adj_monitor_retran_timeout (tL2C_CCB *p_ccb)
**
** Function l2c_fcr_adj_our_rsp_options
**
-** Description Overrides any neccesary FCR options passed in from
+** Description Overrides any neccesary FCR options passed in from
** L2CA_ConfigRsp based on our FCR options.
** Only makes adjustments if channel is in ERTM mode.
**
@@ -2012,7 +2012,7 @@ void l2c_fcr_adj_our_rsp_options (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
p_ccb->peer_cfg.fcr.tx_win_sz = p_ccb->our_cfg.fcr.tx_win_sz;
}
// btla-specific --
-
+
p_cfg->fcr.mode = p_ccb->peer_cfg.fcr.mode;
p_cfg->fcr.tx_win_sz = p_ccb->peer_cfg.fcr.tx_win_sz;
p_cfg->fcr.max_transmit = p_ccb->peer_cfg.fcr.max_transmit;
@@ -2027,7 +2027,7 @@ void l2c_fcr_adj_our_rsp_options (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
** Function l2c_fcr_renegotiate_chan
**
** Description Called upon unsuccessful peer response to config request.
-** If the error is because of the channel mode, it will try
+** If the error is because of the channel mode, it will try
** to resend using another supported optional channel.
**
** Returns TRUE if resent configuration, False if channel matches or
@@ -2106,7 +2106,7 @@ BOOLEAN l2c_fcr_renegotiate_chan(tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
p_cfg->mtu = L2CAP_MTU_SIZE;
}
}
-
+
l2cu_process_our_cfg_req (p_ccb, &p_ccb->our_cfg);
l2cu_send_peer_config_req (p_ccb, &p_ccb->our_cfg);
btu_start_timer (&p_ccb->timer_entry, BTU_TTYPE_L2CAP_CHNL, L2CAP_CHNL_CFG_TIMEOUT);
@@ -2146,7 +2146,7 @@ UINT8 l2c_fcr_process_peer_cfg_req(tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
p_ccb->p_lcb->w4_info_rsp = FALSE; /* Handles T61x SonyEricsson Bug in Info Request */
L2CAP_TRACE_EVENT5 ("l2c_fcr_process_peer_cfg_req() CFG fcr_present:%d fcr.mode:%d CCB FCR mode:%d preferred: %u allowed:%u",
- p_cfg->fcr_present, p_cfg->fcr.mode, p_ccb->our_cfg.fcr.mode, p_ccb->ertm_info.preferred_mode,
+ p_cfg->fcr_present, p_cfg->fcr.mode, p_ccb->our_cfg.fcr.mode, p_ccb->ertm_info.preferred_mode,
p_ccb->ertm_info.allowed_modes);
/* If Peer wants basic, we are done (accept it or disconnect) */
@@ -2181,10 +2181,10 @@ UINT8 l2c_fcr_process_peer_cfg_req(tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
p_cfg->fcr.max_transmit = p_cfg->fcr.tx_win_sz = 0;
p_cfg->fcr.rtrans_tout = p_cfg->fcr.mon_tout = p_cfg->fcr.mps = 0;
p_ccb->our_cfg.fcr.rtrans_tout = p_ccb->our_cfg.fcr.mon_tout = p_ccb->our_cfg.fcr.mps = 0;
- fcr_ok = L2CAP_PEER_CFG_UNACCEPTABLE;
+ fcr_ok = L2CAP_PEER_CFG_UNACCEPTABLE;
}
- /* Only other valid case is if they want ERTM and we wanted STM which should be
+ /* Only other valid case is if they want ERTM and we wanted STM which should be
accepted if we support it; otherwise the channel should be disconnected */
else if ( (p_cfg->fcr.mode != L2CAP_FCR_ERTM_MODE)
|| !(p_ccb->ertm_info.allowed_modes & L2CAP_FCR_CHAN_OPT_ERTM) )
@@ -2669,7 +2669,7 @@ static void l2c_fcr_collect_ack_delay (tL2C_CCB *p_ccb, UINT8 num_bufs_acked)
p_ccb->fcrb.throughput_start = timestamp;
- sprintf(str, "[%02u] throughput: %5u, ack_delay avg:%3u, min:%3u, max:%3u, ack_q_count avg:%3u, min:%3u, max:%3u",
+ sprintf(str, "[%02u] throughput: %5u, ack_delay avg:%3u, min:%3u, max:%3u, ack_q_count avg:%3u, min:%3u, max:%3u",
index, p_ccb->fcrb.throughput[index],
p_ccb->fcrb.ack_delay_avg[index], p_ccb->fcrb.ack_delay_min[index], p_ccb->fcrb.ack_delay_max[index],
p_ccb->fcrb.ack_q_count_avg[index], p_ccb->fcrb.ack_q_count_min[index], p_ccb->fcrb.ack_q_count_max[index] );
@@ -2678,12 +2678,12 @@ static void l2c_fcr_collect_ack_delay (tL2C_CCB *p_ccb, UINT8 num_bufs_acked)
index = (index + 1) % L2CAP_ERTM_STATS_NUM_AVG;
p_ccb->fcrb.ack_delay_avg_index = index;
-
+
p_ccb->fcrb.ack_q_count_max[index] = 0;
p_ccb->fcrb.ack_q_count_min[index] = 0xFFFFFFFF;
p_ccb->fcrb.ack_q_count_avg[index] = 0;
-
+
p_ccb->fcrb.ack_delay_max[index] = 0;
p_ccb->fcrb.ack_delay_min[index] = 0xFFFFFFFF;
p_ccb->fcrb.ack_delay_avg[index] = 0;
diff --git a/stack/l2cap/l2c_int.h b/stack/l2cap/l2c_int.h
index dcbe8dc..0630e12 100644
--- a/stack/l2cap/l2c_int.h
+++ b/stack/l2cap/l2c_int.h
@@ -293,7 +293,7 @@ typedef struct t_l2c_ccb
UINT8 flags;
tL2CAP_CFG_INFO our_cfg; /* Our saved configuration options */
- tL2CAP_CH_CFG_BITS peer_cfg_bits; /* Store what peer wants to configure */
+ tL2CAP_CH_CFG_BITS peer_cfg_bits; /* Store what peer wants to configure */
tL2CAP_CFG_INFO peer_cfg; /* Peer's saved configuration options */
BUFFER_Q xmit_hold_q; /* Transmit data hold queue */
@@ -332,7 +332,7 @@ typedef struct t_l2c_ccb
/***********************************************************************
** Define a queue of linked CCBs.
*/
-typedef struct
+typedef struct
{
tL2C_CCB *p_first_ccb; /* The first channel in this queue */
tL2C_CCB *p_last_ccb; /* The last channel in this queue */
@@ -745,7 +745,7 @@ extern void l2c_fcr_stop_timer (tL2C_CCB *p_ccb);
#if (BLE_INCLUDED == TRUE)
extern BOOLEAN l2cble_create_conn (tL2C_LCB *p_lcb);
extern void l2cble_process_sig_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len);
-extern void l2cble_conn_comp (UINT16 handle, UINT8 role, BD_ADDR bda, tBLE_ADDR_TYPE type,
+extern void l2cble_conn_comp (UINT16 handle, UINT8 role, BD_ADDR bda, tBLE_ADDR_TYPE type,
UINT16 conn_interval, UINT16 conn_latency, UINT16 conn_timeout);
#endif
diff --git a/stack/l2cap/l2c_link.c b/stack/l2cap/l2c_link.c
index 8da26be..2183888 100644
--- a/stack/l2cap/l2c_link.c
+++ b/stack/l2cap/l2c_link.c
@@ -389,7 +389,7 @@ BOOLEAN l2c_link_hci_disc_comp (UINT16 handle, UINT8 reason)
/* If waiting for disconnect and reconnect is pending start the reconnect now
race condition where layer above issued connect request on link that was
- disconnecting
+ disconnecting
*/
if (p_lcb->ccb_queue.p_first_ccb != NULL)
{
@@ -481,12 +481,12 @@ void l2c_link_timeout (tL2C_LCB *p_lcb)
UINT16 timeout;
tBTM_STATUS rc;
- L2CAP_TRACE_EVENT3 ("L2CAP - l2c_link_timeout() link state %d first CCB %p is_bonding:%d",
+ L2CAP_TRACE_EVENT3 ("L2CAP - l2c_link_timeout() link state %d first CCB %p is_bonding:%d",
p_lcb->link_state, p_lcb->ccb_queue.p_first_ccb, p_lcb->is_bonding);
/* If link was connecting or disconnecting, clear all channels and drop the LCB */
if ((p_lcb->link_state == LST_CONNECTING_WAIT_SWITCH) ||
- (p_lcb->link_state == LST_CONNECTING) ||
+ (p_lcb->link_state == LST_CONNECTING) ||
(p_lcb->link_state == LST_CONNECT_HOLDING) ||
(p_lcb->link_state == LST_DISCONNECTING))
{
@@ -503,7 +503,7 @@ void l2c_link_timeout (tL2C_LCB *p_lcb)
p_ccb = pn;
}
#if (BLE_INCLUDED == TRUE)
- if (p_lcb->link_state == LST_CONNECTING &&
+ if (p_lcb->link_state == LST_CONNECTING &&
l2cb.is_ble_connecting == TRUE)
{
L2CA_CancelBleConnectReq(l2cb.ble_connecting_bda);
@@ -661,7 +661,7 @@ void l2c_link_adjust_allocation (void)
UINT16 hi_quota, low_quota;
UINT16 num_lowpri_links = 0;
UINT16 num_hipri_links = 0;
- UINT16 controller_xmit_quota = l2cb.num_lm_acl_bufs;
+ UINT16 controller_xmit_quota = l2cb.num_lm_acl_bufs;
UINT16 high_pri_link_quota = L2CAP_HIGH_PRI_MIN_XMIT_QUOTA_A;
/* If no links active, nothing to do. */
@@ -758,8 +758,8 @@ void l2c_link_adjust_allocation (void)
/* There is a special case where we have readjusted the link quotas and */
/* this link may have sent anything but some other link sent packets so */
/* so we may need a timer to kick off this link's transmissions. */
- if ( (p_lcb->link_state == LST_CONNECTED)
- && (p_lcb->link_xmit_data_q.count)
+ if ( (p_lcb->link_state == LST_CONNECTED)
+ && (p_lcb->link_xmit_data_q.count)
&& (p_lcb->sent_not_acked < p_lcb->link_xmit_quota) )
btu_start_timer (&p_lcb->timer_entry, BTU_TTYPE_L2CAP_LINK, L2CAP_LINK_FLOW_CONTROL_TOUT);
}
@@ -803,7 +803,7 @@ void l2c_link_adjust_chnl_allocation (void)
/* channel required higher data rate will get more buffer quota */
for (xx = 0; xx < MAX_L2CAP_CHANNELS; xx++)
{
- p_ccb = l2cb.ccb_pool + xx;
+ p_ccb = l2cb.ccb_pool + xx;
if (!p_ccb->in_use)
continue;
@@ -844,7 +844,7 @@ void l2c_link_adjust_chnl_allocation (void)
else
quota_per_weighted_chnls[xx] = 1;
- L2CAP_TRACE_DEBUG5 ("POOL ID:%d, GKI_poolcount = %d, reserved_buff = %d, weighted_chnls = %d, quota_per_weighted_chnls = %d",
+ L2CAP_TRACE_DEBUG5 ("POOL ID:%d, GKI_poolcount = %d, reserved_buff = %d, weighted_chnls = %d, quota_per_weighted_chnls = %d",
xx, GKI_poolcount(xx), reserved_buff[xx], weighted_chnls[xx], quota_per_weighted_chnls[xx] );
}
else
@@ -855,7 +855,7 @@ void l2c_link_adjust_chnl_allocation (void)
/* assign buffer quota to each channel based on its data rate requirement */
for (xx = 0; xx < MAX_L2CAP_CHANNELS; xx++)
{
- p_ccb = l2cb.ccb_pool + xx;
+ p_ccb = l2cb.ccb_pool + xx;
if (!p_ccb->in_use)
continue;
@@ -1046,14 +1046,14 @@ BOOLEAN l2c_link_check_power_mode (tL2C_LCB *p_lcb)
{
L2CAP_TRACE_DEBUG1 ("LCB(0x%x) is in park mode", p_lcb->handle);
// Coverity:
-// FALSE-POSITIVE error from Coverity test tool. Please do NOT remove following comment.
+// FALSE-POSITIVE error from Coverity test tool. Please do NOT remove following comment.
// coverity[uninit_use_in_call] False-positive: setting the mode to BTM_PM_MD_ACTIVE only uses settings.mode
the other data members of tBTM_PM_PWR_MD are ignored
memset((void*)&pm, 0, sizeof(pm));
pm.mode = BTM_PM_MD_ACTIVE;
BTM_SetPowerMode(BTM_PM_SET_ONLY_ID, p_lcb->remote_bd_addr, &pm);
- btu_start_timer (&p_lcb->timer_entry,
+ btu_start_timer (&p_lcb->timer_entry,
BTU_TTYPE_L2CAP_LINK, L2CAP_WAIT_UNPARK_TOUT);
return TRUE;
}
@@ -1062,7 +1062,7 @@ BOOLEAN l2c_link_check_power_mode (tL2C_LCB *p_lcb)
{
L2CAP_TRACE_DEBUG1 ("LCB(0x%x) is in PM pending state", p_lcb->handle);
- btu_start_timer (&p_lcb->timer_entry,
+ btu_start_timer (&p_lcb->timer_entry,
BTU_TTYPE_L2CAP_LINK, L2CAP_WAIT_UNPARK_TOUT);
return TRUE;
}
@@ -1126,11 +1126,11 @@ void l2c_link_check_send_pkts (tL2C_LCB *p_lcb, tL2C_CCB *p_ccb, BT_HDR *p_buf)
for (xx = 0; xx < MAX_L2CAP_LINKS; xx++, p_lcb++)
{
/* If controller window is full, nothing to do */
- if ( (l2cb.controller_xmit_window == 0
+ if ( (l2cb.controller_xmit_window == 0
#if (BLE_INCLUDED == TRUE)
- && !p_lcb->is_ble_link
+ && !p_lcb->is_ble_link
#endif
- )
+ )
#if (BLE_INCLUDED == TRUE)
|| (p_lcb->is_ble_link && l2cb.controller_le_xmit_window == 0 )
#endif
@@ -1188,7 +1188,7 @@ void l2c_link_check_send_pkts (tL2C_LCB *p_lcb, tL2C_CCB *p_ccb, BT_HDR *p_buf)
/* See if we can send anything from the link queue */
#if (BLE_INCLUDED == TRUE)
while ( ((l2cb.controller_xmit_window != 0 && !p_lcb->is_ble_link) ||
- (l2cb.controller_le_xmit_window != 0 && p_lcb->is_ble_link))
+ (l2cb.controller_le_xmit_window != 0 && p_lcb->is_ble_link))
&& (p_lcb->sent_not_acked < p_lcb->link_xmit_quota))
#else
while ( (l2cb.controller_xmit_window != 0)
@@ -1207,7 +1207,7 @@ void l2c_link_check_send_pkts (tL2C_LCB *p_lcb, tL2C_CCB *p_ccb, BT_HDR *p_buf)
/* See if we can send anything for any channel */
#if (BLE_INCLUDED == TRUE)
while ( ((l2cb.controller_xmit_window != 0 && !p_lcb->is_ble_link) ||
- (l2cb.controller_le_xmit_window != 0 && p_lcb->is_ble_link))
+ (l2cb.controller_le_xmit_window != 0 && p_lcb->is_ble_link))
&& (p_lcb->sent_not_acked < p_lcb->link_xmit_quota))
#else
while ((l2cb.controller_xmit_window != 0) && (p_lcb->sent_not_acked < p_lcb->link_xmit_quota))
@@ -1256,7 +1256,7 @@ static BOOLEAN l2c_link_send_to_lower (tL2C_LCB *p_lcb, BT_HDR *p_buf)
p_lcb->sent_not_acked++;
p_buf->layer_specific = 0;
-
+
#if (BLE_INCLUDED == TRUE)
if (p_lcb->is_ble_link)
{
@@ -1342,8 +1342,8 @@ static BOOLEAN l2c_link_send_to_lower (tL2C_LCB *p_lcb, BT_HDR *p_buf)
if (p_lcb->is_ble_link)
{
L2CAP_TRACE_DEBUG6 ("TotalWin=%d,Hndl=0x%x,Quota=%d,Unack=%d,RRQuota=%d,RRUnack=%d",
- l2cb.controller_le_xmit_window,
- p_lcb->handle,
+ l2cb.controller_le_xmit_window,
+ p_lcb->handle,
p_lcb->link_xmit_quota, p_lcb->sent_not_acked,
l2cb.round_robin_quota, l2cb.round_robin_unacked);
}
@@ -1351,8 +1351,8 @@ static BOOLEAN l2c_link_send_to_lower (tL2C_LCB *p_lcb, BT_HDR *p_buf)
#endif
{
L2CAP_TRACE_DEBUG6 ("TotalWin=%d,Hndl=0x%x,Quota=%d,Unack=%d,RRQuota=%d,RRUnack=%d",
- l2cb.controller_xmit_window,
- p_lcb->handle,
+ l2cb.controller_xmit_window,
+ p_lcb->handle,
p_lcb->link_xmit_quota, p_lcb->sent_not_acked,
l2cb.round_robin_quota, l2cb.round_robin_unacked);
}
@@ -1403,7 +1403,7 @@ void l2c_link_process_num_completed_pkts (UINT8 *p)
#endif
{
- /* Maintain the total window to the controller */
+ /* Maintain the total window to the controller */
l2cb.controller_xmit_window += num_sent;
}
@@ -1428,7 +1428,7 @@ void l2c_link_process_num_completed_pkts (UINT8 *p)
l2c_link_check_send_pkts (p_lcb, NULL, NULL);
/* If we were doing round-robin for low priority links, check 'em */
- if ( (p_lcb->acl_priority == L2CAP_PRIORITY_HIGH)
+ if ( (p_lcb->acl_priority == L2CAP_PRIORITY_HIGH)
&& (l2cb.check_round_robin)
&& (l2cb.round_robin_unacked < l2cb.round_robin_quota) )
{
@@ -1443,7 +1443,7 @@ void l2c_link_process_num_completed_pkts (UINT8 *p)
if (p_lcb->is_ble_link)
{
L2CAP_TRACE_DEBUG5 ("TotalWin=%d,LinkUnack(0x%x)=%d,RRCheck=%d,RRUnack=%d",
- l2cb.controller_le_xmit_window,
+ l2cb.controller_le_xmit_window,
p_lcb->handle, p_lcb->sent_not_acked,
l2cb.check_round_robin, l2cb.round_robin_unacked);
}
@@ -1451,7 +1451,7 @@ void l2c_link_process_num_completed_pkts (UINT8 *p)
#endif
{
L2CAP_TRACE_DEBUG5 ("TotalWin=%d,LinkUnack(0x%x)=%d,RRCheck=%d,RRUnack=%d",
- l2cb.controller_xmit_window,
+ l2cb.controller_xmit_window,
p_lcb->handle, p_lcb->sent_not_acked,
l2cb.check_round_robin, l2cb.round_robin_unacked);
@@ -1462,13 +1462,13 @@ void l2c_link_process_num_completed_pkts (UINT8 *p)
#if (BLE_INCLUDED == TRUE)
L2CAP_TRACE_DEBUG5 ("TotalWin=%d LE_Win: %d, Handle=0x%x, RRCheck=%d, RRUnack=%d",
l2cb.controller_xmit_window,
- l2cb.controller_le_xmit_window,
- handle,
+ l2cb.controller_le_xmit_window,
+ handle,
l2cb.check_round_robin, l2cb.round_robin_unacked);
#else
L2CAP_TRACE_DEBUG4 ("TotalWin=%d Handle=0x%x RRCheck=%d RRUnack=%d",
- l2cb.controller_xmit_window,
- handle,
+ l2cb.controller_xmit_window,
+ handle,
l2cb.check_round_robin, l2cb.round_robin_unacked);
#endif
}
@@ -1508,7 +1508,7 @@ BT_HDR *l2cap_link_chk_pkt_start (BT_HDR *p_cur_buf)
tL2C_LCB *p_lcb;
BT_HDR * p_return_buf; /* CR419: To avoid returning from too many places */
-
+
if (p_cur_buf)
{
p = (UINT8 *)(p_cur_buf + 1) + p_cur_buf->offset;
@@ -1579,7 +1579,7 @@ BT_HDR *l2cap_link_chk_pkt_start (BT_HDR *p_cur_buf)
+ p_cur_buf->offset
+ HCI_DATA_PREAMBLE_SIZE;
UINT8 * p1 = (UINT8 *)(p_return_buf + 1)
- + p_return_buf->offset
+ + p_return_buf->offset
+ p_return_buf->len;
/* Copy data from new buffer into base buffer then update the data */
diff --git a/stack/l2cap/l2c_main.c b/stack/l2cap/l2c_main.c
index a60140c..17b9df1 100644
--- a/stack/l2cap/l2c_main.c
+++ b/stack/l2cap/l2c_main.c
@@ -43,7 +43,7 @@ extern void tcs_proc_bcst_msg( BD_ADDR addr, BT_HDR *p_msg ) ;
**
** Function l2c_bcst_msg
**
-** Description
+** Description
**
** Returns void
**
@@ -251,7 +251,7 @@ void l2c_rcv_acl_data (BT_HDR *p_msg)
}
#endif
#if (L2CAP_NUM_FIXED_CHNLS > 0)
- else if ((rcv_cid >= L2CAP_FIRST_FIXED_CHNL) && (rcv_cid <= L2CAP_LAST_FIXED_CHNL) &&
+ else if ((rcv_cid >= L2CAP_FIRST_FIXED_CHNL) && (rcv_cid <= L2CAP_LAST_FIXED_CHNL) &&
(l2cb.fixed_reg[rcv_cid - L2CAP_FIRST_FIXED_CHNL].pL2CA_FixedData_Cb != NULL) )
{
/* If no CCB for this channel, allocate one */
@@ -262,7 +262,7 @@ void l2c_rcv_acl_data (BT_HDR *p_msg)
if (p_ccb->peer_cfg.fcr.mode != L2CAP_FCR_BASIC_MODE)
l2c_fcr_proc_pdu (p_ccb, p_msg);
else
- (*l2cb.fixed_reg[rcv_cid - L2CAP_FIRST_FIXED_CHNL].pL2CA_FixedData_Cb)(p_lcb->remote_bd_addr, p_msg);
+ (*l2cb.fixed_reg[rcv_cid - L2CAP_FIRST_FIXED_CHNL].pL2CA_FixedData_Cb)(p_lcb->remote_bd_addr, p_msg);
}
else
GKI_freebuf (p_msg);
@@ -457,7 +457,7 @@ static void process_l2cap_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
p_cfg_start = p;
- cfg_info.flush_to_present = cfg_info.mtu_present = cfg_info.qos_present =
+ cfg_info.flush_to_present = cfg_info.mtu_present = cfg_info.qos_present =
cfg_info.fcr_present = cfg_info.fcs_present = FALSE;
while (p < p_cfg_end)
@@ -559,7 +559,7 @@ static void process_l2cap_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
STREAM_TO_UINT16 (cfg_info.flags, p);
STREAM_TO_UINT16 (cfg_info.result, p);
- cfg_info.flush_to_present = cfg_info.mtu_present = cfg_info.qos_present =
+ cfg_info.flush_to_present = cfg_info.mtu_present = cfg_info.qos_present =
cfg_info.fcr_present = cfg_info.fcs_present = FALSE;
while (p < p_cfg_end)
@@ -688,7 +688,7 @@ static void process_l2cap_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
l2cu_send_peer_echo_rsp (p_lcb, id, NULL, 0);
#endif
break;
-
+
case L2CAP_CMD_ECHO_RSP:
#if (L2CAP_ENHANCED_FEATURES != 0)
l2cu_check_feature_rsp (p_lcb, id, p, cmd_len);
@@ -722,7 +722,7 @@ static void process_l2cap_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
p_lcb->info_rx_bits |= (1 << info_type);
- if ( (info_type == L2CAP_EXTENDED_FEATURES_INFO_TYPE)
+ if ( (info_type == L2CAP_EXTENDED_FEATURES_INFO_TYPE)
&& (result == L2CAP_INFO_RESP_RESULT_SUCCESS) )
{
STREAM_TO_UINT32( p_lcb->peer_ext_fea, p );
@@ -783,7 +783,7 @@ static void process_l2cap_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
** Function l2c_process_held_packets
**
** Description This function processes any L2CAP packets that arrived before
-** the HCI connection complete arrived. It is a work around for
+** the HCI connection complete arrived. It is a work around for
** badly behaved controllers.
**
** Returns void
@@ -946,9 +946,9 @@ UINT8 l2c_data_write (UINT16 cid, BT_HDR *p_data, UINT16 flags)
return (L2CAP_DW_FAILED);
}
-#ifndef TESTER /* Tester may send any amount of data. otherwise sending message
+#ifndef TESTER /* Tester may send any amount of data. otherwise sending message
bigger than mtu size of peer is a violation of protocol */
- if (p_data->len > p_ccb->peer_cfg.mtu)
+ if (p_data->len > p_ccb->peer_cfg.mtu)
{
L2CAP_TRACE_WARNING1 ("L2CAP - CID: 0x%04x cannot send message bigger than peer's mtu size", cid);
GKI_freebuf (p_data);
diff --git a/stack/l2cap/l2c_ucd.c b/stack/l2cap/l2c_ucd.c
index 03e55af..375988e 100644
--- a/stack/l2cap/l2c_ucd.c
+++ b/stack/l2cap/l2c_ucd.c
@@ -125,7 +125,7 @@ static void l2c_ucd_congestion_status_cback (BD_ADDR rem_bda, BOOLEAN is_congest
{
L2CAP_TRACE_DEBUG4 ("L2CAP - Calling UCDCongestionStatus_Cb (%d), PSM=0x%04x, BDA: %08x%04x,",
is_congested, p_rcb->psm,
- (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
+ (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
(rem_bda[4]<<8)+rem_bda[5]);
p_rcb->ucd.cb_info.pL2CA_UCD_Congestion_Status_Cb ( rem_bda, is_congested );
@@ -305,7 +305,7 @@ BOOLEAN L2CA_UcdDeregister ( UINT16 psm )
** Parameters: PSM
** BD_ADDR of remote device
** info_type : L2CAP_UCD_INFO_TYPE_RECEPTION
-** L2CAP_UCD_INFO_TYPE_MTU
+** L2CAP_UCD_INFO_TYPE_MTU
**
**
** Return value: TRUE if successs
@@ -318,7 +318,7 @@ BOOLEAN L2CA_UcdDiscover ( UINT16 psm, BD_ADDR rem_bda, UINT8 info_type )
tL2C_RCB *p_rcb;
L2CAP_TRACE_API4 ("L2CA_UcdDiscover() PSM: 0x%04x BDA: %08x%04x, InfoType=0x%02x", psm,
- (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
+ (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
(rem_bda[4]<<8)+rem_bda[5], info_type);
/* Fail if the PSM is not registered */
@@ -368,7 +368,7 @@ BOOLEAN L2CA_UcdDiscover ( UINT16 psm, BD_ADDR rem_bda, UINT8 info_type )
**
** Parameters: PSM
** BD Address of remote
-** Pointer to buffer of type BT_HDR
+** Pointer to buffer of type BT_HDR
** flags : L2CAP_FLUSHABLE_CH_BASED
** L2CAP_FLUSHABLE_PKT
** L2CAP_NON_FLUSHABLE_PKT
@@ -385,7 +385,7 @@ UINT16 L2CA_UcdDataWrite (UINT16 psm, BD_ADDR rem_bda, BT_HDR *p_buf, UINT16 fla
UINT8 *p;
L2CAP_TRACE_API3 ("L2CA_UcdDataWrite() PSM: 0x%04x BDA: %08x%04x", psm,
- (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
+ (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
(rem_bda[4]<<8)+rem_bda[5]);
/* Fail if the PSM is not registered */
@@ -436,7 +436,7 @@ UINT16 L2CA_UcdDataWrite (UINT16 psm, BD_ADDR rem_bda, BT_HDR *p_buf, UINT16 fla
if (p_ccb->cong_sent)
{
L2CAP_TRACE_ERROR3 ("L2CAP - Handle: 0x%04x UCD cannot be sent, already congested count: %u buff_quota: %u",
- p_lcb->handle,
+ p_lcb->handle,
(p_ccb->xmit_hold_q.count + p_lcb->ucd_out_sec_pending_q.count),
p_ccb->buff_quota);
@@ -473,7 +473,7 @@ BOOLEAN L2CA_UcdSetIdleTimeout ( BD_ADDR rem_bda, UINT16 timeout )
tL2C_CCB *p_ccb;
L2CAP_TRACE_API3 ("L2CA_UcdSetIdleTimeout() Timeout: 0x%04x BDA: %08x%04x", timeout,
- (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
+ (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
(rem_bda[4]<<8)+rem_bda[5]);
/* First, see if we already have a link to the remote */
@@ -506,7 +506,7 @@ BOOLEAN L2CA_UCDSetTxPriority ( BD_ADDR rem_bda, tL2CAP_CHNL_PRIORITY priority )
tL2C_CCB *p_ccb;
L2CAP_TRACE_API3 ("L2CA_UCDSetTxPriority() priority: 0x%02x BDA: %08x%04x", priority,
- (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
+ (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
(rem_bda[4]<<8)+rem_bda[5]);
if ((p_lcb = l2cu_find_lcb_by_bd_addr (rem_bda)) == NULL)
@@ -545,8 +545,8 @@ static BOOLEAN l2c_ucd_connect ( BD_ADDR rem_bda )
tL2C_CCB *p_ccb;
tL2C_RCB *p_rcb;
- L2CAP_TRACE_DEBUG2 ("l2c_ucd_connect() BDA: %08x%04x",
- (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
+ L2CAP_TRACE_DEBUG2 ("l2c_ucd_connect() BDA: %08x%04x",
+ (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
(rem_bda[4]<<8)+rem_bda[5]);
/* Fail if we have not established communications with the controller */
@@ -674,8 +674,8 @@ BOOLEAN l2c_ucd_check_pending_info_req(tL2C_CCB *p_ccb)
l2cu_release_ccb (p_ccb);
}
- p_ccb->p_rcb->ucd.cb_info.pL2CA_UCD_Discover_Cb (p_ccb->p_lcb->remote_bd_addr,
- L2CAP_UCD_INFO_TYPE_RECEPTION,
+ p_ccb->p_rcb->ucd.cb_info.pL2CA_UCD_Discover_Cb (p_ccb->p_lcb->remote_bd_addr,
+ L2CAP_UCD_INFO_TYPE_RECEPTION,
p_ccb->p_lcb->peer_ext_fea & L2CAP_EXTFEA_UCD_RECEPTION);
}
else
@@ -694,8 +694,8 @@ BOOLEAN l2c_ucd_check_pending_info_req(tL2C_CCB *p_ccb)
/* if this information is available */
if ( p_ccb->p_lcb->info_rx_bits & (1 << L2CAP_CONNLESS_MTU_INFO_TYPE))
{
- p_ccb->p_rcb->ucd.cb_info.pL2CA_UCD_Discover_Cb (p_ccb->p_lcb->remote_bd_addr,
- L2CAP_UCD_INFO_TYPE_MTU,
+ p_ccb->p_rcb->ucd.cb_info.pL2CA_UCD_Discover_Cb (p_ccb->p_lcb->remote_bd_addr,
+ L2CAP_UCD_INFO_TYPE_MTU,
p_ccb->p_lcb->ucd_mtu);
}
else
@@ -750,7 +750,7 @@ BOOLEAN l2c_ucd_check_pending_out_sec_q(tL2C_CCB *p_ccb)
STREAM_TO_UINT16(psm, p)
p_ccb->chnl_state = CST_ORIG_W4_SEC_COMP;
- btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, psm,
+ btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, psm,
p_ccb->p_lcb->handle, CONNLESS_ORIG, &l2c_link_sec_comp, p_ccb);
return (TRUE);
@@ -827,7 +827,7 @@ BOOLEAN l2c_ucd_check_pending_in_sec_q(tL2C_CCB *p_ccb)
STREAM_TO_UINT16(psm, p)
p_ccb->chnl_state = CST_TERM_W4_SEC_COMP;
- btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, psm,
+ btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, psm,
p_ccb->p_lcb->handle, CONNLESS_TERM, &l2c_link_sec_comp, p_ccb);
return (TRUE);
@@ -989,7 +989,7 @@ BOOLEAN l2c_ucd_process_event(tL2C_CCB *p_ccb, UINT16 event, void *p_data)
break;
}
break;
-
+
case CST_ORIG_W4_SEC_COMP:
switch (event)
{
@@ -1045,7 +1045,7 @@ BOOLEAN l2c_ucd_process_event(tL2C_CCB *p_ccb, UINT16 event, void *p_data)
}
break;
-
+
case CST_TERM_W4_SEC_COMP:
switch (event)
{
diff --git a/stack/l2cap/l2c_utils.c b/stack/l2cap/l2c_utils.c
index 698e336..80d092e 100644
--- a/stack/l2cap/l2c_utils.c
+++ b/stack/l2cap/l2c_utils.c
@@ -85,8 +85,8 @@ void l2cu_update_lcb_4_bonding (BD_ADDR p_bd_addr, BOOLEAN is_bonding)
if (p_lcb)
{
- L2CAP_TRACE_DEBUG3 ("l2cu_update_lcb_4_bonding BDA: %08x%04x is_bonding: %d",
- (p_bd_addr[0]<<24)+(p_bd_addr[1]<<16)+(p_bd_addr[2]<<8)+p_bd_addr[3],
+ L2CAP_TRACE_DEBUG3 ("l2cu_update_lcb_4_bonding BDA: %08x%04x is_bonding: %d",
+ (p_bd_addr[0]<<24)+(p_bd_addr[1]<<16)+(p_bd_addr[2]<<8)+p_bd_addr[3],
(p_bd_addr[4]<<8)+p_bd_addr[5], is_bonding);
p_lcb->is_bonding = is_bonding;
}
@@ -340,7 +340,7 @@ void l2cu_send_peer_cmd_reject (tL2C_LCB *p_lcb, UINT16 reason, UINT8 rem_id,
return;
}
- p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE +
+ p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE +
L2CAP_PKT_OVERHEAD + L2CAP_CMD_OVERHEAD;
UINT16_TO_STREAM (p, reason);
@@ -376,14 +376,14 @@ void l2cu_send_peer_connect_req (tL2C_CCB *p_ccb)
p_ccb->local_id = p_ccb->p_lcb->id;
- if ((p_buf = l2cu_build_header (p_ccb->p_lcb, L2CAP_CONN_REQ_LEN, L2CAP_CMD_CONN_REQ,
+ if ((p_buf = l2cu_build_header (p_ccb->p_lcb, L2CAP_CONN_REQ_LEN, L2CAP_CMD_CONN_REQ,
p_ccb->local_id)) == NULL)
{
L2CAP_TRACE_WARNING0 ("L2CAP - no buffer for conn_req");
return;
}
- p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET+HCI_DATA_PREAMBLE_SIZE +
+ p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET+HCI_DATA_PREAMBLE_SIZE +
L2CAP_PKT_OVERHEAD + L2CAP_CMD_OVERHEAD;
UINT16_TO_STREAM (p, p_ccb->p_rcb->real_psm);
@@ -423,7 +423,7 @@ void l2cu_send_peer_connect_rsp (tL2C_CCB *p_ccb, UINT16 result, UINT16 status)
return;
}
- p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET+HCI_DATA_PREAMBLE_SIZE +
+ p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET+HCI_DATA_PREAMBLE_SIZE +
L2CAP_PKT_OVERHEAD + L2CAP_CMD_OVERHEAD;
UINT16_TO_STREAM (p, p_ccb->local_cid);
@@ -509,7 +509,7 @@ void l2cu_send_peer_config_req (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
return;
}
- p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE +
+ p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE +
L2CAP_PKT_OVERHEAD + L2CAP_CMD_OVERHEAD;
UINT16_TO_STREAM (p, p_ccb->remote_cid);
@@ -739,7 +739,7 @@ void l2cu_send_peer_config_rej (tL2C_CCB *p_ccb, UINT8 *p_data, UINT16 data_len,
p_data += cfg_len + L2CAP_CFG_OPTION_OVERHEAD;
break;
- /* unknown options; copy into rsp if not hints */
+ /* unknown options; copy into rsp if not hints */
default:
/* sanity check option length */
if ((cfg_len + L2CAP_CFG_OPTION_OVERHEAD) <= data_len)
@@ -800,7 +800,7 @@ void l2cu_send_peer_disc_req (tL2C_CCB *p_ccb)
UINT16_TO_STREAM (p, p_ccb->remote_cid);
UINT16_TO_STREAM (p, p_ccb->local_cid);
- /* Move all queued data packets to the LCB. In FCR mode, assume the higher
+ /* Move all queued data packets to the LCB. In FCR mode, assume the higher
layer checks that all buffers are sent before disconnecting.
*/
if (p_ccb->peer_cfg.fcr.mode == L2CAP_FCR_BASIC_MODE)
@@ -831,7 +831,7 @@ void l2cu_send_peer_disc_req (tL2C_CCB *p_ccb)
** Returns void
**
*******************************************************************************/
-void l2cu_send_peer_disc_rsp (tL2C_LCB *p_lcb, UINT8 remote_id, UINT16 local_cid,
+void l2cu_send_peer_disc_rsp (tL2C_LCB *p_lcb, UINT8 remote_id, UINT16 local_cid,
UINT16 remote_cid)
{
BT_HDR *p_buf;
@@ -905,9 +905,9 @@ void l2cu_send_peer_echo_rsp (tL2C_LCB *p_lcb, UINT8 id, UINT8 *p_data, UINT16 d
UINT16 maxlen;
/* Don't return data if it does not fit in ACL and L2CAP MTU */
- maxlen = (GKI_get_pool_bufsize(L2CAP_CMD_POOL_ID) > btu_cb.hcit_acl_pkt_size) ?
+ maxlen = (GKI_get_pool_bufsize(L2CAP_CMD_POOL_ID) > btu_cb.hcit_acl_pkt_size) ?
btu_cb.hcit_acl_data_size : (UINT16)GKI_get_pool_bufsize(L2CAP_CMD_POOL_ID);
- maxlen -= (UINT16)(BT_HDR_SIZE + HCI_DATA_PREAMBLE_SIZE + L2CAP_PKT_OVERHEAD +
+ maxlen -= (UINT16)(BT_HDR_SIZE + HCI_DATA_PREAMBLE_SIZE + L2CAP_PKT_OVERHEAD +
L2CAP_CMD_OVERHEAD + L2CAP_ECHO_RSP_LEN);
if (data_len > maxlen)
@@ -919,7 +919,7 @@ void l2cu_send_peer_echo_rsp (tL2C_LCB *p_lcb, UINT8 id, UINT8 *p_data, UINT16 d
return;
}
- p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE +
+ p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE +
L2CAP_PKT_OVERHEAD + L2CAP_CMD_OVERHEAD;
if (data_len)
@@ -935,7 +935,7 @@ void l2cu_send_peer_echo_rsp (tL2C_LCB *p_lcb, UINT8 id, UINT8 *p_data, UINT16 d
** Function l2cu_send_peer_info_req
**
** Description Build and send an L2CAP "info request" message
-** to the peer.
+** to the peer.
** Returns void
**
*******************************************************************************/
@@ -956,7 +956,7 @@ void l2cu_send_peer_info_req (tL2C_LCB *p_lcb, UINT16 info_type)
L2CAP_TRACE_EVENT1 ("l2cu_send_peer_info_req: type 0x%04x", info_type);
- p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET+HCI_DATA_PREAMBLE_SIZE +
+ p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET+HCI_DATA_PREAMBLE_SIZE +
L2CAP_PKT_OVERHEAD + L2CAP_CMD_OVERHEAD;
UINT16_TO_STREAM (p, info_type);
@@ -988,7 +988,7 @@ void l2cu_send_peer_info_rsp (tL2C_LCB *p_lcb, UINT8 remote_id, UINT16 info_type
if ((info_type == L2CAP_EXTENDED_FEATURES_INFO_TYPE)
&& (l2cb.test_info_resp & (L2CAP_EXTFEA_ENH_RETRANS | L2CAP_EXTFEA_STREAM_MODE |
L2CAP_EXTFEA_NO_CRC | L2CAP_EXTFEA_EXT_FLOW_SPEC |
- L2CAP_EXTFEA_FIXED_CHNLS | L2CAP_EXTFEA_EXT_WINDOW |
+ L2CAP_EXTFEA_FIXED_CHNLS | L2CAP_EXTFEA_EXT_WINDOW |
L2CAP_EXTFEA_UCD_RECEPTION )) )
#else
if ((info_type == L2CAP_EXTENDED_FEATURES_INFO_TYPE)
@@ -1034,7 +1034,7 @@ void l2cu_send_peer_info_rsp (tL2C_LCB *p_lcb, UINT8 remote_id, UINT16 info_type
if (p_lcb->is_ble_link)
{
/* optional data are not added for now */
- UINT32_TO_STREAM (p, L2CAP_BLE_EXTFEA_MASK);
+ UINT32_TO_STREAM (p, L2CAP_BLE_EXTFEA_MASK);
}
else
#endif
@@ -1110,7 +1110,7 @@ void l2cu_enqueue_ccb (tL2C_CCB *p_ccb)
return;
}
- L2CAP_TRACE_DEBUG2 ("l2cu_enqueue_ccb CID: 0x%04x priority: %d",
+ L2CAP_TRACE_DEBUG2 ("l2cu_enqueue_ccb CID: 0x%04x priority: %d",
p_ccb->local_cid, p_ccb->ccb_priority);
/* If the queue is empty, we go at the front */
@@ -1264,7 +1264,7 @@ void l2cu_dequeue_ccb (tL2C_CCB *p_ccb)
**
** Function l2cu_change_pri_ccb
**
-** Description
+** Description
**
** Returns -
**
@@ -1408,7 +1408,7 @@ tL2C_CCB *l2cu_allocate_ccb (tL2C_LCB *p_lcb, UINT16 cid)
// btla-specific ++
/* CSP408639 Fix: When L2CAP send amp move channel request or receive
- * L2CEVT_AMP_MOVE_REQ do following sequence. Send channel move
+ * L2CEVT_AMP_MOVE_REQ do following sequence. Send channel move
* request -> Stop retrans/monitor timer -> Change channel state to CST_AMP_MOVING. */
if (p_ccb->fcrb.mon_retrans_timer.in_use)
btu_stop_quick_timer (&p_ccb->fcrb.mon_retrans_timer);
@@ -1544,8 +1544,8 @@ void l2cu_release_ccb (tL2C_CCB *p_ccb)
l2c_fcr_cleanup (p_ccb);
/* Channel may not be assigned to any LCB if it was just pre-reserved */
- if ( (p_lcb) &&
- ( (p_ccb->local_cid >= L2CAP_BASE_APPL_CID)
+ if ( (p_lcb) &&
+ ( (p_ccb->local_cid >= L2CAP_BASE_APPL_CID)
#if (L2CAP_UCD_INCLUDED == TRUE)
||(p_ccb->local_cid == L2CAP_CONNECTIONLESS_CID)
#endif
@@ -1597,7 +1597,7 @@ void l2cu_release_ccb (tL2C_CCB *p_ccb)
** Function l2cu_find_ccb_by_remote_cid
**
** Description Look through all active CCBs on a link for a match based
-** on the remote CID.
+** on the remote CID.
**
** Returns pointer to matched CCB, or NULL if no match
**
@@ -1760,7 +1760,7 @@ UINT8 l2cu_process_peer_cfg_req (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
if (!p_cfg->fcr_present)
p_cfg->fcr.mode = L2CAP_FCR_BASIC_MODE;
- /* Save the MTU that our peer can receive */
+ /* Save the MTU that our peer can receive */
if (p_cfg->mtu_present)
{
/* Make sure MTU is at least the minimum */
@@ -1902,7 +1902,7 @@ void l2cu_process_peer_cfg_rsp (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
else
p_ccb->fcrb.max_held_acks = p_ccb->our_cfg.fcr.tx_win_sz / 3;
- L2CAP_TRACE_DEBUG3 ("l2cu_process_peer_cfg_rsp(): peer tx_win_sz: %d, our tx_win_sz: %d, max_held_acks: %d",
+ L2CAP_TRACE_DEBUG3 ("l2cu_process_peer_cfg_rsp(): peer tx_win_sz: %d, our tx_win_sz: %d, max_held_acks: %d",
p_cfg->fcr.tx_win_sz, p_ccb->our_cfg.fcr.tx_win_sz, p_ccb->fcrb.max_held_acks);
}
}
@@ -2027,7 +2027,7 @@ void l2cu_process_our_cfg_rsp (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
**
** Function l2cu_device_reset
**
-** Description This function is called when reset of the device is
+** Description This function is called when reset of the device is
** completed. For all active connection simulate HCI_DISC
**
** Returns void
@@ -2055,7 +2055,7 @@ extern UINT16 tcs_wug_get_clk_offset( BD_ADDR addr ) ;
**
** Function l2cu_create_conn
**
-** Description This function initiates an acl connection via HCI
+** Description This function initiates an acl connection via HCI
**
** Returns TRUE if successful, FALSE if gki get buffer fails.
**
@@ -2107,7 +2107,7 @@ BOOLEAN l2cu_create_conn (tL2C_LCB *p_lcb)
if (is_sco_active == TRUE)
continue; /* No Master Slave switch not allowed when SCO Active */
#endif
-
+
if (HCI_SWITCH_SUPPORTED(btm_cb.devcb.local_features))
{
/* mark this lcb waiting for switch to be completed and
@@ -2135,7 +2135,7 @@ BOOLEAN l2cu_create_conn (tL2C_LCB *p_lcb)
**
** Description Gets the number of high priority channels.
**
-** Returns
+** Returns
**
*******************************************************************************/
UINT8 l2cu_get_num_hi_priority (void)
@@ -2159,7 +2159,7 @@ UINT8 l2cu_get_num_hi_priority (void)
**
** Function l2cu_create_conn_after_switch
**
-** Description This function initiates an acl connection via HCI
+** Description This function initiates an acl connection via HCI
** If switch required to create connection it is already done.
**
** Returns TRUE if successful, FALSE if gki get buffer fails.
@@ -2280,7 +2280,7 @@ tL2C_LCB *l2cu_find_lcb_by_state (tL2C_LINK_STATE state)
** Function l2cu_lcb_disconnecting
**
** Description On each active lcb, check if the lcb is in disconnecting
-** state, or if there are no ccb's on the lcb (implying
+** state, or if there are no ccb's on the lcb (implying
idle timeout is running), or if last ccb on the link
is in disconnecting state.
**
@@ -2437,9 +2437,9 @@ BOOLEAN l2cu_check_feature_req (tL2C_LCB *p_lcb, UINT8 id, UINT8 *p_data, UINT16
UINT8 pe_type, pe_len;
if ((data_len <= 4)
- || (p_data[0] != 'R')
+ || (p_data[0] != 'R')
|| (p_data[1] != 'Q')
- || (p_data[data_len - 2] != 'r')
+ || (p_data[data_len - 2] != 'r')
|| (p_data[data_len - 1] != 'q')
|| (id != L2CAP_FEATURE_REQ_ID))
return (FALSE);
@@ -2494,9 +2494,9 @@ void l2cu_check_feature_rsp (tL2C_LCB *p_lcb, UINT8 id, UINT8 *p_data, UINT16 da
UINT8 *p_end = p_data + data_len - 2;
if ((data_len <= 4)
- || (p_data[0] != 'R')
+ || (p_data[0] != 'R')
|| (p_data[1] != 'S')
- || (p_data[data_len - 2] != 'r')
+ || (p_data[data_len - 2] != 'r')
|| (p_data[data_len - 1] != 's')
|| (id != L2CAP_FEATURE_RSP_ID))
{
@@ -2608,7 +2608,7 @@ void l2cu_resubmit_pending_sec_req (BD_ADDR p_bda)
**
** Function l2cu_set_info_rsp_mask
**
-** Description This function allows the script wrapper to change the
+** Description This function allows the script wrapper to change the
** info resp mask for conformance testing.
**
** Returns pointer to CCB, or NULL if none
@@ -2649,8 +2649,8 @@ void l2cu_adjust_out_mps (tL2C_CCB *p_ccb)
/* We try to negotiate MTU that each packet can be split into whole
number of max packets. For example if link is 1.2 max packet size is 339 bytes.
At first calculate how many whole packets it is. MAX L2CAP is 1691 + 4 overhead.
- 1695, that will be 5 Dh5 packets. Now maximum L2CAP packet is
- 5 * 339 = 1695. Minus 4 bytes L2CAP header 1691.
+ 1695, that will be 5 Dh5 packets. Now maximum L2CAP packet is
+ 5 * 339 = 1695. Minus 4 bytes L2CAP header 1691.
For EDR 2.0 packet size is 1027. So we better send RFCOMM packet as 1 3DH5 packet
1 * 1027 = 1027. Minus 4 bytes L2CAP header 1023. */
@@ -2763,7 +2763,7 @@ void l2cu_no_dynamic_ccbs (tL2C_LCB *p_lcb)
{
p_lcb->link_state = LST_DISCONNECTING;
timeout = L2CAP_LINK_DISCONNECT_TOUT;
- }
+ }
else if (rc == BTM_SUCCESS)
{
/* BTM SEC will make sure that link is release (probably after pairing is done) */
@@ -2775,7 +2775,7 @@ void l2cu_no_dynamic_ccbs (tL2C_LCB *p_lcb)
{
p_lcb->link_state = LST_DISCONNECTING;
timeout = L2CAP_LINK_DISCONNECT_TOUT;
- }
+ }
else
{
/* probably no buffer to send disconnect */
@@ -2807,7 +2807,7 @@ void l2cu_no_dynamic_ccbs (tL2C_LCB *p_lcb)
void l2cu_process_fixed_chnl_resp (tL2C_LCB *p_lcb)
{
int xx;
-#if BLE_INCLUDED == TRUE
+#if BLE_INCLUDED == TRUE
UINT16 reason = (p_lcb->is_ble_link ) ? 1 : 0;
#else
UINT16 reason =0;
@@ -2862,7 +2862,7 @@ void l2cu_send_peer_ble_par_req (tL2C_LCB *p_lcb, UINT16 min_int, UINT16 max_int
return;
}
- p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE +
+ p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE +
L2CAP_PKT_OVERHEAD + L2CAP_CMD_OVERHEAD;
UINT16_TO_STREAM (p, min_int);
@@ -2894,7 +2894,7 @@ void l2cu_send_peer_ble_par_rsp (tL2C_LCB *p_lcb, UINT16 reason, UINT8 rem_id)
return;
}
- p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE +
+ p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE +
L2CAP_PKT_OVERHEAD + L2CAP_CMD_OVERHEAD;
UINT16_TO_STREAM (p, reason);
@@ -3031,7 +3031,7 @@ static tL2C_CCB *l2cu_get_next_channel_in_rr(tL2C_LCB *p_lcb)
return NULL;
}
- L2CAP_TRACE_DEBUG3("RR scan pri=%d, lcid=0x%04x, q_cout=%d",
+ L2CAP_TRACE_DEBUG3("RR scan pri=%d, lcid=0x%04x, q_cout=%d",
p_ccb->ccb_priority, p_ccb->local_cid, p_ccb->xmit_hold_q.count );
/* store the next serving channel */
@@ -3095,9 +3095,9 @@ static tL2C_CCB *l2cu_get_next_channel_in_rr(tL2C_LCB *p_lcb)
if (p_serve_ccb)
{
- L2CAP_TRACE_DEBUG3("RR service pri=%d, quota=%d, lcid=0x%04x",
- p_serve_ccb->ccb_priority,
- p_lcb->rr_serv[p_serve_ccb->ccb_priority].quota,
+ L2CAP_TRACE_DEBUG3("RR service pri=%d, quota=%d, lcid=0x%04x",
+ p_serve_ccb->ccb_priority,
+ p_lcb->rr_serv[p_serve_ccb->ccb_priority].quota,
p_serve_ccb->local_cid );
}
@@ -3110,7 +3110,7 @@ static tL2C_CCB *l2cu_get_next_channel_in_rr(tL2C_LCB *p_lcb)
**
** Function l2cu_get_next_channel
**
-** Description get the next channel to send on a link bassed on priority
+** Description get the next channel to send on a link bassed on priority
** scheduling.
**
** Returns pointer to CCB or NULL
@@ -3120,7 +3120,7 @@ static tL2C_CCB *l2cu_get_next_channel(tL2C_LCB *p_lcb)
{
tL2C_CCB *p_ccb;
- /* Get the first CCB with data to send.
+ /* Get the first CCB with data to send.
*/
for (p_ccb = p_lcb->ccb_queue.p_first_ccb; p_ccb; p_ccb = p_ccb->p_next_ccb)
{
@@ -3373,7 +3373,7 @@ void l2cu_check_channel_congestion (tL2C_CCB *p_ccb)
{
L2CAP_TRACE_DEBUG3 ("L2CAP - Calling CongestionStatus_Cb (TRUE),CID:0x%04x,XmitQ:%u,Quota:%u",
p_ccb->local_cid, q_count, p_ccb->buff_quota);
-
+
(*p_ccb->p_rcb->api.pL2CA_CongestionStatus_Cb)(p_ccb->local_cid, TRUE);
}
#if (L2CAP_UCD_INCLUDED == TRUE)
diff --git a/stack/mcap/mca_api.c b/stack/mcap/mca_api.c
index 1a0a58f..c4cf7a3 100644
--- a/stack/mcap/mca_api.c
+++ b/stack/mcap/mca_api.c
@@ -2,7 +2,7 @@
**
** Name: mca_api.c
**
-** Description: This is the API implementation file for the
+** Description: This is the API implementation file for the
** Multi-Channel Adaptation Protocol (MCAP).
**
** Copyright (c) 2009-2011, Broadcom Corp., All Rights Reserved.
@@ -27,7 +27,7 @@
** Function mca_process_timeout
**
** Description This function is called by BTU when an MCA timer
-** expires.
+** expires.
**
** This function is for use internal to the stack only.
**
@@ -101,7 +101,7 @@ UINT8 MCA_SetTraceLevel (UINT8 level)
** It is assumed that the control channel PSM and data channel
** PSM are not used by any other instances of the stack.
** If the given p_reg->ctrl_psm is 0, this handle is INT only.
-**
+**
** Returns 0, if failed. Otherwise, the MCA handle.
**
*******************************************************************************/
@@ -196,7 +196,7 @@ void MCA_Deregister(tMCA_HANDLE handle)
** Description Create a data endpoint. If the MDEP is created successfully,
** the MDEP ID is returned in *p_dep. After a data endpoint is
** created, an application can initiate a connection between this
-** endpoint and an endpoint on a peer device.
+** endpoint and an endpoint on a peer device.
**
** Returns MCA_SUCCESS if successful, otherwise error.
**
@@ -307,7 +307,7 @@ tMCA_RESULT MCA_DeleteDep(tMCA_HANDLE handle, tMCA_DEP dep)
**
** Function MCA_ConnectReq
**
-** Description This function initiates an MCAP control channel connection
+** Description This function initiates an MCAP control channel connection
** to the peer device. When the connection is completed, an
** MCA_CONNECT_IND_EVT is reported to the application via its
** control callback function.
@@ -367,7 +367,7 @@ tMCA_RESULT MCA_ConnectReq(tMCA_HANDLE handle, BD_ADDR bd_addr,
** Function MCA_DisconnectReq
**
** Description This function disconnect an MCAP control channel
-** to the peer device.
+** to the peer device.
** If associated data channel exists, they are disconnected.
** When the MCL is disconnected an MCA_DISCONNECT_IND_EVT is
** reported to the application via its control callback function.
@@ -397,7 +397,7 @@ tMCA_RESULT MCA_DisconnectReq(tMCA_CL mcl)
** Description This function sends a CREATE_MDL request to the peer device.
** When the response is received, a MCA_CREATE_CFM_EVT is reported
** with the given MDL ID.
-** If the response is successful, a data channel is open
+** If the response is successful, a data channel is open
** with the given p_chnl_cfg
** If p_chnl_cfg is NULL, the data channel is not initiated until
** MCA_DataChnlCfg is called to provide the p_chnl_cfg.
@@ -853,7 +853,7 @@ tMCA_RESULT MCA_Delete(tMCA_CL mcl, UINT16 mdl_id)
**
** Function MCA_WriteReq
**
-** Description Send a data packet to the peer device.
+** Description Send a data packet to the peer device.
**
** The application passes the packet using the BT_HDR structure.
** The offset field must be equal to or greater than L2CAP_MIN_OFFSET.
diff --git a/stack/mcap/mca_cact.c b/stack/mcap/mca_cact.c
index 9ec4f5f..d074172 100644
--- a/stack/mcap/mca_cact.c
+++ b/stack/mcap/mca_cact.c
@@ -88,7 +88,7 @@ void mca_ccb_snd_req(tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
if ((p_ccb->status == MCA_CCB_STAT_PENDING) && (p_msg->op_code == MCA_OP_MDL_ABORT_REQ))
{
p_dcb = mca_dcb_by_hdl(p_ccb->p_tx_req->dcb_idx);
- /* the Abort API does not have the associated mdl_id.
+ /* the Abort API does not have the associated mdl_id.
* Get the mdl_id in dcb to compose the request */
p_msg->mdl_id = p_dcb->mdl_id;
mca_dcb_event(p_dcb, MCA_DCB_API_CLOSE_EVT, NULL);
@@ -231,7 +231,7 @@ void mca_ccb_cong(tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
** Function mca_ccb_hdl_req
**
** Description This function is called when a MCAP request is received from
-** the peer. It calls the application callback function to
+** the peer. It calls the application callback function to
** report the event.
**
** Returns void.
@@ -294,7 +294,7 @@ void mca_ccb_hdl_req(tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
check_req = TRUE;
reject_code = MCA_RSP_SUCCESS;
/* drop the previous request */
- if ((p_ccb->p_tx_req->op_code == MCA_OP_MDL_CREATE_REQ) &&
+ if ((p_ccb->p_tx_req->op_code == MCA_OP_MDL_CREATE_REQ) &&
((p_dcb = mca_dcb_by_hdl(p_ccb->p_tx_req->dcb_idx)) != NULL))
{
mca_dcb_dealloc(p_dcb, NULL);
@@ -311,9 +311,9 @@ void mca_ccb_hdl_req(tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
}
else if (p_pkt->layer_specific != MCA_RSP_SUCCESS)
{
-
+
reject_code = (UINT8)p_pkt->layer_specific;
- if (((evt_data.hdr.op_code >= MCA_NUM_STANDARD_OPCODE) &&
+ if (((evt_data.hdr.op_code >= MCA_NUM_STANDARD_OPCODE) &&
(evt_data.hdr.op_code < MCA_FIRST_SYNC_OP)) ||
(evt_data.hdr.op_code > MCA_LAST_SYNC_OP))
{
@@ -387,7 +387,7 @@ void mca_ccb_hdl_req(tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
}
}
- if (((reject_code != MCA_RSP_SUCCESS) && (evt_data.hdr.op_code != MCA_OP_SYNC_INFO_IND))
+ if (((reject_code != MCA_RSP_SUCCESS) && (evt_data.hdr.op_code != MCA_OP_SYNC_INFO_IND))
|| send_rsp)
{
p_buf = (BT_HDR *)GKI_getbuf (MCA_CTRL_MTU);
@@ -432,7 +432,7 @@ void mca_ccb_hdl_req(tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
** Function mca_ccb_hdl_rsp
**
** Description This function is called when a MCAP response is received from
-** the peer. It calls the application callback function with
+** the peer. It calls the application callback function with
** the results.
**
** Returns void.
@@ -533,7 +533,7 @@ void mca_ccb_hdl_rsp(tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
**
** Function mca_ccb_ll_open
**
-** Description This function is called to report MCA_CONNECT_IND_EVT event.
+** Description This function is called to report MCA_CONNECT_IND_EVT event.
** It also clears the congestion flag (ccb.cong).
**
** Returns void.
diff --git a/stack/mcap/mca_csm.c b/stack/mcap/mca_csm.c
index c36c2fb..411ee6a 100644
--- a/stack/mcap/mca_csm.c
+++ b/stack/mcap/mca_csm.c
@@ -144,7 +144,7 @@ static const char * const mca_ccb_st_str[] = {
**
** Function mca_stop_timer
**
-** Description This function is stop a MCAP timer
+** Description This function is stop a MCAP timer
**
** This function is for use internal to MCAP only.
**
@@ -164,8 +164,8 @@ void mca_stop_timer(tMCA_CCB *p_ccb)
**
** Function mca_ccb_event
**
-** Description This function is the CCB state machine main function.
-** It uses the state and action function tables to execute
+** Description This function is the CCB state machine main function.
+** It uses the state and action function tables to execute
** action functions.
**
** Returns void.
@@ -181,7 +181,7 @@ void mca_ccb_event(tMCA_CCB *p_ccb, UINT8 event, tMCA_CCB_EVT *p_data)
#else
MCA_TRACE_EVENT3("CCB ccb=%d event=%d state=%d", mca_ccb_to_hdl(p_ccb), event, p_ccb->state);
#endif
-
+
/* look up the state table for the current state */
state_table = mca_ccb_st_tbl[p_ccb->state - 1];
@@ -199,8 +199,8 @@ void mca_ccb_event(tMCA_CCB *p_ccb, UINT8 event, tMCA_CCB_EVT *p_data)
**
** Function mca_ccb_by_bd
**
-** Description This function looks up the CCB based on the BD address.
-** It returns a pointer to the CCB.
+** Description This function looks up the CCB based on the BD address.
+** It returns a pointer to the CCB.
** If no CCB is found it returns NULL.
**
** Returns void.
@@ -234,7 +234,7 @@ tMCA_CCB *mca_ccb_by_bd(tMCA_HANDLE handle, BD_ADDR bd_addr)
** Function mca_ccb_alloc
**
** Description This function allocates a CCB and copies the BD address to
-** the CCB. It returns a pointer to the CCB. If no CCB can
+** the CCB. It returns a pointer to the CCB. If no CCB can
** be allocated it returns NULL.
**
** Returns void.
@@ -273,7 +273,7 @@ tMCA_CCB *mca_ccb_alloc(tMCA_HANDLE handle, BD_ADDR bd_addr)
**
** Function mca_ccb_dealloc
**
-** Description This function deallocates a CCB.
+** Description This function deallocates a CCB.
**
** Returns void.
**
@@ -311,7 +311,7 @@ void mca_ccb_dealloc(tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
**
** Function mca_ccb_to_hdl
**
-** Description This function converts a pointer to a CCB to a tMCA_CL
+** Description This function converts a pointer to a CCB to a tMCA_CL
** and returns the value.
**
** Returns void.
@@ -326,7 +326,7 @@ tMCA_CL mca_ccb_to_hdl(tMCA_CCB *p_ccb)
**
** Function mca_ccb_by_hdl
**
-** Description This function converts an index value to a CCB. It returns
+** Description This function converts an index value to a CCB. It returns
** a pointer to the CCB. If no valid CCB matches the index it
** returns NULL.
**
diff --git a/stack/mcap/mca_dact.c b/stack/mcap/mca_dact.c
index 0a5f780..5ace8fa 100644
--- a/stack/mcap/mca_dact.c
+++ b/stack/mcap/mca_dact.c
@@ -37,8 +37,8 @@ void mca_dcb_report_cong (tMCA_DCB *p_dcb)
**
** Function mca_dcb_tc_open
**
-** Description This function is called to report MCA_OPEN_IND_EVT or
-** MCA_OPEN_CFM_EVT event.
+** Description This function is called to report MCA_OPEN_IND_EVT or
+** MCA_OPEN_CFM_EVT event.
** It also clears the congestion flag (dcb.cong).
**
** Returns void.
@@ -136,7 +136,7 @@ void mca_dcb_snd_data (tMCA_DCB *p_dcb, tMCA_DCB_EVT *p_data)
**
** Function mca_dcb_hdl_data
**
-** Description This function reports the received data through the data
+** Description This function reports the received data through the data
** callback function.
**
** Returns void.
diff --git a/stack/mcap/mca_l2c.c b/stack/mcap/mca_l2c.c
index 046e6ae..a776568 100644
--- a/stack/mcap/mca_l2c.c
+++ b/stack/mcap/mca_l2c.c
@@ -58,8 +58,8 @@ const tL2CAP_FCR_OPTS mca_l2c_fcr_opts_def = {
**
** Function mca_sec_check_complete_term
**
-** Description The function called when Security Manager finishes
-** verification of the service side connection
+** Description The function called when Security Manager finishes
+** verification of the service side connection
**
** Returns void
**
@@ -83,7 +83,7 @@ static void mca_sec_check_complete_term (BD_ADDR bd_addr, void *p_ref_data, UINT
ertm_info.fcr_rx_pool_id = MCA_FCR_RX_POOL_ID;
ertm_info.fcr_tx_pool_id = MCA_FCR_TX_POOL_ID;
/* Send response to the L2CAP layer. */
- L2CA_ErtmConnectRsp (bd_addr, p_tbl->id, p_tbl->lcid, L2CAP_CONN_OK, L2CAP_CONN_OK, &ertm_info);
+ L2CA_ErtmConnectRsp (bd_addr, p_tbl->id, p_tbl->lcid, L2CAP_CONN_OK, L2CAP_CONN_OK, &ertm_info);
/* transition to configuration state */
p_tbl->state = MCA_TC_ST_CFG;
@@ -94,7 +94,7 @@ static void mca_sec_check_complete_term (BD_ADDR bd_addr, void *p_ref_data, UINT
}
else
{
- L2CA_ConnectRsp (bd_addr, p_tbl->id, p_tbl->lcid, L2CAP_CONN_SECURITY_BLOCK, L2CAP_CONN_OK);
+ L2CA_ConnectRsp (bd_addr, p_tbl->id, p_tbl->lcid, L2CAP_CONN_SECURITY_BLOCK, L2CAP_CONN_OK);
mca_tc_close_ind(p_tbl, L2CAP_CONN_SECURITY_BLOCK);
}
}
@@ -103,8 +103,8 @@ static void mca_sec_check_complete_term (BD_ADDR bd_addr, void *p_ref_data, UINT
**
** Function mca_sec_check_complete_orig
**
-** Description The function called when Security Manager finishes
-** verification of the service side connection
+** Description The function called when Security Manager finishes
+** verification of the service side connection
**
** Returns void
**
@@ -190,9 +190,9 @@ void mca_l2c_cconn_ind_cback(BD_ADDR bd_addr, UINT16 lcid, UINT16 psm, UINT8 id)
if (!p_tbl || (p_tbl->state != MCA_TC_ST_CFG))
{
/* Send L2CAP connect rsp */
- L2CA_ErtmConnectRsp (bd_addr, id, lcid, result, L2CAP_CONN_OK, p_ertm_info);
+ L2CA_ErtmConnectRsp (bd_addr, id, lcid, result, L2CAP_CONN_OK, p_ertm_info);
- /* if result ok, proceed with connection and send L2CAP
+ /* if result ok, proceed with connection and send L2CAP
config req */
if (result == L2CAP_CONN_OK)
{
@@ -211,7 +211,7 @@ void mca_l2c_cconn_ind_cback(BD_ADDR bd_addr, UINT16 lcid, UINT16 psm, UINT8 id)
** Function mca_l2c_dconn_ind_cback
**
** Description This is the L2CAP connect indication callback function.
-**
+**
**
** Returns void
**
@@ -253,13 +253,13 @@ void mca_l2c_dconn_ind_cback(BD_ADDR bd_addr, UINT16 lcid, UINT16 psm, UINT8 id)
}
else
{
- /* else we're not listening for traffic channel; reject
+ /* else we're not listening for traffic channel; reject
* (this error code is specified by MCAP spec) */
result = L2CAP_CONN_NO_RESOURCES;
}
/* Send L2CAP connect rsp */
- L2CA_ErtmConnectRsp (bd_addr, id, lcid, result, result, p_ertm_info);
+ L2CA_ErtmConnectRsp (bd_addr, id, lcid, result, result, p_ertm_info);
/* if result ok, proceed with connection */
if (result == L2CAP_CONN_OK)
@@ -278,7 +278,7 @@ void mca_l2c_dconn_ind_cback(BD_ADDR bd_addr, UINT16 lcid, UINT16 psm, UINT8 id)
** Function mca_l2c_connect_cfm_cback
**
** Description This is the L2CAP connect confirm callback function.
-**
+**
**
** Returns void
**
@@ -325,8 +325,8 @@ void mca_l2c_connect_cfm_cback(UINT16 lcid, UINT16 result)
p_tbl->cfg_flags= MCA_L2C_CFG_CONN_INT;
/* Check the security */
- btm_sec_mx_access_request (p_ccb->peer_addr, p_ccb->ctrl_vpsm,
- TRUE, BTM_SEC_PROTO_MCA,
+ btm_sec_mx_access_request (p_ccb->peer_addr, p_ccb->ctrl_vpsm,
+ TRUE, BTM_SEC_PROTO_MCA,
p_tbl->tcid,
&mca_sec_check_complete_orig, p_tbl);
}
@@ -348,7 +348,7 @@ void mca_l2c_connect_cfm_cback(UINT16 lcid, UINT16 result)
** Function mca_l2c_config_cfm_cback
**
** Description This is the L2CAP config confirm callback function.
-**
+**
**
** Returns void
**
@@ -390,7 +390,7 @@ void mca_l2c_config_cfm_cback(UINT16 lcid, tL2CAP_CFG_INFO *p_cfg)
** Function mca_l2c_config_ind_cback
**
** Description This is the L2CAP config indication callback function.
-**
+**
**
** Returns void
**
@@ -443,7 +443,7 @@ void mca_l2c_config_ind_cback(UINT16 lcid, tL2CAP_CFG_INFO *p_cfg)
** Function mca_l2c_disconnect_ind_cback
**
** Description This is the L2CAP disconnect indication callback function.
-**
+**
**
** Returns void
**
@@ -476,7 +476,7 @@ void mca_l2c_disconnect_ind_cback(UINT16 lcid, BOOLEAN ack_needed)
** Function mca_l2c_disconnect_cfm_cback
**
** Description This is the L2CAP disconnect confirm callback function.
-**
+**
**
** Returns void
**
@@ -501,7 +501,7 @@ void mca_l2c_disconnect_cfm_cback(UINT16 lcid, UINT16 result)
** Function mca_l2c_congestion_ind_cback
**
** Description This is the L2CAP congestion indication callback function.
-**
+**
**
** Returns void
**
@@ -522,7 +522,7 @@ void mca_l2c_congestion_ind_cback(UINT16 lcid, BOOLEAN is_congested)
** Function mca_l2c_data_ind_cback
**
** Description This is the L2CAP data indication callback function.
-**
+**
**
** Returns void
**
diff --git a/stack/pan/pan_api.c b/stack/pan/pan_api.c
index 2f86305..3cc6dec 100644
--- a/stack/pan/pan_api.c
+++ b/stack/pan/pan_api.c
@@ -32,7 +32,7 @@
** should set the PAN role explicitly.
**
** Parameters: p_register - contains all callback function pointers
-**
+**
**
** Returns none
**
@@ -70,7 +70,7 @@ void PAN_Register (tPAN_REGISTER *p_register)
** and close all active connections
**
** Parameters: none
-**
+**
**
** Returns none
**
@@ -112,7 +112,7 @@ void PAN_Deregister (void)
** p_gn_name - Service name for GN role
** p_nap_name - Service name for NAP role
** Can be NULL if user wants it to be default
-**
+**
** Returns PAN_SUCCESS - if the role is set successfully
** PAN_FAILURE - if the role is not valid
**
@@ -261,7 +261,7 @@ tPAN_RESULT PAN_SetRole (UINT8 role,
**
** Function PAN_Connect
**
-** Description This function is called by the application to initiate a
+** Description This function is called by the application to initiate a
** connection to the remote device
**
** Parameters: rem_bda - BD Addr of the remote device
@@ -271,7 +271,7 @@ tPAN_RESULT PAN_SetRole (UINT8 role,
** PAN_ROLE_GN_SERVER is for GN role
** PAN_ROLE_NAP_SERVER is for NAP role
** *handle - Pointer for returning Handle to the connection
-**
+**
** Returns PAN_SUCCESS - if the connection is initiated successfully
** PAN_NO_RESOURCES - resources are not sufficent
** PAN_FAILURE - if the connection cannot be initiated
@@ -429,10 +429,10 @@ tPAN_RESULT PAN_Connect (BD_ADDR rem_bda, UINT8 src_role, UINT8 dst_role, UINT16
**
** Function PAN_Disconnect
**
-** Description This is used to disconnect the connection
+** Description This is used to disconnect the connection
**
** Parameters: handle - handle for the connection
-**
+**
** Returns PAN_SUCCESS - if the connection is closed successfully
** PAN_FAILURE - if the connection is not found or
** there is an error in disconnecting
@@ -489,7 +489,7 @@ tPAN_RESULT PAN_Disconnect (UINT16 handle)
** p_data - pointer to the data
** len - length of the data
** ext - to indicate that extension headers present
-**
+**
** Returns PAN_SUCCESS - if the data is sent successfully
** PAN_FAILURE - if the connection is not found or
** there is an error in sending data
@@ -598,7 +598,7 @@ tPAN_RESULT PAN_Write (UINT16 handle, BD_ADDR dst, BD_ADDR src, UINT16 protocol,
** protocol - protocol of the ethernet packet like IP or ARP
** p_buf - pointer to the data buffer
** ext - to indicate that extension headers present
-**
+**
** Returns PAN_SUCCESS - if the data is sent successfully
** PAN_FAILURE - if the connection is not found or
** there is an error in sending data
@@ -707,7 +707,7 @@ tPAN_RESULT PAN_WriteBuf (UINT16 handle, BD_ADDR dst, BD_ADDR src, UINT16 protoc
** num_filters - number of protocol filter ranges
** start - array of starting protocol numbers
** end - array of ending protocol numbers
-**
+**
**
** Returns PAN_SUCCESS if protocol filters are set successfully
** PAN_FAILURE if connection not found or error in setting
@@ -756,7 +756,7 @@ tPAN_RESULT PAN_SetProtocolFilters (UINT16 handle,
** num_filters - number of multicast filter ranges
** start - array of starting multicast filter addresses
** end - array of ending multicast filter addresses
-**
+**
**
** Returns PAN_SUCCESS if multicast filters are set successfully
** PAN_FAILURE if connection not found or error in setting
@@ -822,7 +822,7 @@ UINT8 PAN_SetTraceLevel (UINT8 new_level)
** Description This function initializes the PAN module variables
**
** Parameters: none
-**
+**
** Returns none
**
*******************************************************************************/
diff --git a/stack/pan/pan_main.c b/stack/pan/pan_main.c
index 9b03775..36d7a8c 100644
--- a/stack/pan/pan_main.c
+++ b/stack/pan/pan_main.c
@@ -37,7 +37,7 @@ UINT8 constant_pan_uuid[UUID_CONSTANT_PART] = {0, 0, 0x10, 0, 0x80, 0x00, 0x00,
** Description This function registers PAN profile with BNEP
**
** Parameters: none
-**
+**
** Returns none
**
*******************************************************************************/
@@ -73,7 +73,7 @@ void pan_register_with_bnep (void)
** remote_uuid - UUID of the source role (peer device role)
** local_uuid - UUID of the destination role (local device role)
** is_role_change - Flag to indicate that it is a role change
-**
+**
** Returns none
**
*******************************************************************************/
diff --git a/stack/pan/pan_utils.c b/stack/pan/pan_utils.c
index c1fb390..33cd151 100644
--- a/stack/pan/pan_utils.c
+++ b/stack/pan/pan_utils.c
@@ -40,9 +40,9 @@ static const UINT8 pan_proto_elem_data[] = {
**
** Function pan_register_with_sdp
**
-** Description
+** Description
**
-** Returns
+** Returns
**
*******************************************************************************/
UINT32 pan_register_with_sdp (UINT16 uuid, UINT8 sec_mask, char *p_name, char *p_desc)
@@ -73,7 +73,7 @@ UINT32 pan_register_with_sdp (UINT16 uuid, UINT8 sec_mask, char *p_name, char *p
#if 0
availability = 0xFF;
SDP_AddAttribute (sdp_handle, ATTR_ID_SERVICE_AVAILABILITY, UINT_DESC_TYPE, 1, &availability);
-#endif
+#endif
// btla-specific --
/* Language base */
@@ -91,7 +91,7 @@ UINT32 pan_register_with_sdp (UINT16 uuid, UINT8 sec_mask, char *p_name, char *p
(UINT8) (strlen(p_desc) + 1), (UINT8 *)p_desc);
/* Security description */
- if (sec_mask)
+ if (sec_mask)
{
UINT16_TO_BE_FIELD(&security, 0x0001);
}
@@ -115,9 +115,9 @@ UINT32 pan_register_with_sdp (UINT16 uuid, UINT8 sec_mask, char *p_name, char *p
SDP_AddAttribute (sdp_handle, ATTR_ID_MAX_NET_ACCESS_RATE, UINT_DESC_TYPE, 4, array);
/* Register with Security Manager for the specific security level */
- if ((!BTM_SetSecurityLevel (TRUE, p_name, BTM_SEC_SERVICE_BNEP_NAP,
+ if ((!BTM_SetSecurityLevel (TRUE, p_name, BTM_SEC_SERVICE_BNEP_NAP,
sec_mask, BT_PSM_BNEP, BTM_SEC_PROTO_BNEP, UUID_SERVCLASS_NAP))
- || (!BTM_SetSecurityLevel (FALSE, p_name, BTM_SEC_SERVICE_BNEP_NAP,
+ || (!BTM_SetSecurityLevel (FALSE, p_name, BTM_SEC_SERVICE_BNEP_NAP,
sec_mask, BT_PSM_BNEP, BTM_SEC_PROTO_BNEP, UUID_SERVCLASS_NAP)))
{
PAN_TRACE_ERROR0 ("PAN Security Registration failed for PANU");
@@ -127,9 +127,9 @@ UINT32 pan_register_with_sdp (UINT16 uuid, UINT8 sec_mask, char *p_name, char *p
#if (defined (PAN_SUPPORTS_ROLE_GN) && PAN_SUPPORTS_ROLE_GN == TRUE)
if (uuid == UUID_SERVCLASS_GN)
{
- if ((!BTM_SetSecurityLevel (TRUE, p_name, BTM_SEC_SERVICE_BNEP_GN,
+ if ((!BTM_SetSecurityLevel (TRUE, p_name, BTM_SEC_SERVICE_BNEP_GN,
sec_mask, BT_PSM_BNEP, BTM_SEC_PROTO_BNEP, UUID_SERVCLASS_GN))
- || (!BTM_SetSecurityLevel (FALSE, p_name, BTM_SEC_SERVICE_BNEP_GN,
+ || (!BTM_SetSecurityLevel (FALSE, p_name, BTM_SEC_SERVICE_BNEP_GN,
sec_mask, BT_PSM_BNEP, BTM_SEC_PROTO_BNEP, UUID_SERVCLASS_GN)))
{
PAN_TRACE_ERROR0 ("PAN Security Registration failed for GN");
@@ -139,9 +139,9 @@ UINT32 pan_register_with_sdp (UINT16 uuid, UINT8 sec_mask, char *p_name, char *p
#if (defined (PAN_SUPPORTS_ROLE_PANU) && PAN_SUPPORTS_ROLE_PANU == TRUE)
if (uuid == UUID_SERVCLASS_PANU)
{
- if ((!BTM_SetSecurityLevel (TRUE, p_name, BTM_SEC_SERVICE_BNEP_PANU,
+ if ((!BTM_SetSecurityLevel (TRUE, p_name, BTM_SEC_SERVICE_BNEP_PANU,
sec_mask, BT_PSM_BNEP, BTM_SEC_PROTO_BNEP, UUID_SERVCLASS_PANU))
- || (!BTM_SetSecurityLevel (FALSE, p_name, BTM_SEC_SERVICE_BNEP_PANU,
+ || (!BTM_SetSecurityLevel (FALSE, p_name, BTM_SEC_SERVICE_BNEP_PANU,
sec_mask, BT_PSM_BNEP, BTM_SEC_PROTO_BNEP, UUID_SERVCLASS_PANU)))
{
PAN_TRACE_ERROR0 ("PAN Security Registration failed for PANU");
@@ -162,9 +162,9 @@ UINT32 pan_register_with_sdp (UINT16 uuid, UINT8 sec_mask, char *p_name, char *p
**
** Function pan_allocate_pcb
**
-** Description
+** Description
**
-** Returns
+** Returns
**
*******************************************************************************/
tPAN_CONN *pan_allocate_pcb (BD_ADDR p_bda, UINT16 handle)
@@ -203,9 +203,9 @@ tPAN_CONN *pan_allocate_pcb (BD_ADDR p_bda, UINT16 handle)
**
** Function pan_get_pcb_by_handle
**
-** Description
+** Description
**
-** Returns
+** Returns
**
*******************************************************************************/
tPAN_CONN *pan_get_pcb_by_handle (UINT16 handle)
@@ -227,9 +227,9 @@ tPAN_CONN *pan_get_pcb_by_handle (UINT16 handle)
**
** Function pan_get_pcb_by_addr
**
-** Description
+** Description
**
-** Returns
+** Returns
**
*******************************************************************************/
tPAN_CONN *pan_get_pcb_by_addr (BD_ADDR p_bda)
@@ -261,7 +261,7 @@ tPAN_CONN *pan_get_pcb_by_addr (BD_ADDR p_bda)
**
** Function pan_close_all_connections
**
-** Description
+** Description
**
** Returns void
**
diff --git a/stack/rfcomm/port_rfc.c b/stack/rfcomm/port_rfc.c
index d5ad359..ef84fef 100644
--- a/stack/rfcomm/port_rfc.c
+++ b/stack/rfcomm/port_rfc.c
@@ -20,7 +20,7 @@
#include "port_int.h"
#include "rfc_int.h"
-/*
+/*
** Local function definitions
*/
UINT32 port_rfc_send_tx_data (tPORT *p_port);
@@ -85,7 +85,7 @@ int port_open_continue (tPORT *p_port)
**
** Function port_start_control
**
-** Description This function is called in the BTU_TASK context to
+** Description This function is called in the BTU_TASK context to
** send control information
**
** Returns void
@@ -106,7 +106,7 @@ void port_start_control (tPORT *p_port)
**
** Function port_start_par_neg
**
-** Description This function is called in the BTU_TASK context to
+** Description This function is called in the BTU_TASK context to
** send configuration information
**
** Returns void
@@ -127,7 +127,7 @@ void port_start_par_neg (tPORT *p_port)
**
** Function port_start_close
**
-** Description This function is called in the BTU_TASK context to
+** Description This function is called in the BTU_TASK context to
** release DLC
**
** Returns void
@@ -240,7 +240,7 @@ void PORT_StartCnf (tRFC_MCB *p_mcb, UINT16 result)
** Function PORT_StartInd
**
** Description This function is called from the RFCOMM layer when
-** some peer device wants to establish a multiplexer
+** some peer device wants to establish a multiplexer
** connection. Check if there are any ports open with this
** or not assigned multiplexer.
**
@@ -292,9 +292,9 @@ void PORT_ParNegInd (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu, UINT8 cl, UINT8 k)
{
/* If the port cannot be opened, send a DM. Per Errata 1205 */
rfc_send_dm(p_mcb, dlci, FALSE);
- /* check if this is the last port open, some headsets have
+ /* check if this is the last port open, some headsets have
problem, they don't disconnect if we send DM */
- rfc_check_mcb_active( p_mcb );
+ rfc_check_mcb_active( p_mcb );
RFCOMM_TRACE_EVENT0( "PORT_ParNegInd: port not found" );
return;
}
@@ -315,7 +315,7 @@ void PORT_ParNegInd (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu, UINT8 cl, UINT8 k)
/* use that. Otherwise both must want credit based, so use that. If flow is */
/* already defined for this mux, we respond with that value. */
if (p_mcb->flow == PORT_FC_UNDEFINED)
- {
+ {
if ((PORT_FC_DEFAULT == PORT_FC_TS710) || (cl == RFCOMM_PN_CONV_LAYER_TYPE_1))
{
p_mcb->flow = PORT_FC_TS710;
@@ -376,11 +376,11 @@ void PORT_ParNegCnf (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu, UINT8 cl, UINT8 k)
if (!p_port)
return;
- /* Flow control mechanism not set yet. Negotiate flow control mechanism. */
+ /* Flow control mechanism not set yet. Negotiate flow control mechanism. */
if (p_mcb->flow == PORT_FC_UNDEFINED)
{
/* Our stack is configured for TS07.10 and they responded with credit-based. */
- /* This is illegal-- negotiation fails. */
+ /* This is illegal-- negotiation fails. */
if ((PORT_FC_DEFAULT == PORT_FC_TS710) && (cl == RFCOMM_PN_CONV_LAYER_CBFC_R))
{
rfc_send_disc (p_mcb, p_port->dlci);
@@ -420,10 +420,10 @@ void PORT_ParNegCnf (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu, UINT8 cl, UINT8 k)
** Function PORT_DlcEstablishInd
**
** Description This function is called from the RFCOMM layer when peer
-** device wants to establish a new DLC. If this is not the
-** first message in the establishment procedure port_handle
+** device wants to establish a new DLC. If this is not the
+** first message in the establishment procedure port_handle
** has a handle to the port control block otherwise the control
-** block should be found based on the muliplexer channel and
+** block should be found based on the muliplexer channel and
** dlci. The block should be allocated allocated before
** meaning that application already made open.
**
@@ -473,7 +473,7 @@ void PORT_DlcEstablishInd (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu)
**
** Description This function is called from the RFCOMM layer when peer
** acknowledges establish procedure (SABME/UA). Send reply
-** to the user and set state to OPENED if result was
+** to the user and set state to OPENED if result was
** successfull.
**
*******************************************************************************/
@@ -509,7 +509,7 @@ void PORT_DlcEstablishCnf (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu, UINT16 resul
p_port->state = PORT_STATE_OPENED;
/* RPN is required only if we want to tell DTE how the port should be opened */
- if ((p_port->uuid == UUID_SERVCLASS_DIALUP_NETWORKING)
+ if ((p_port->uuid == UUID_SERVCLASS_DIALUP_NETWORKING)
|| (p_port->uuid == UUID_SERVCLASS_FAX))
RFCOMM_PortNegReq (p_port->rfc.p_mcb, p_port->dlci, NULL);
else
@@ -523,8 +523,8 @@ void PORT_DlcEstablishCnf (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu, UINT16 resul
**
** Description This function is called from the RFCOMM layer when peer
** device wants to set parameters of the port. As per the spec
-** this message has to be sent before the first data packet
-** and can be sent before establish. The block should be
+** this message has to be sent before the first data packet
+** and can be sent before establish. The block should be
** allocated before meaning that application already made open.
**
*******************************************************************************/
@@ -763,7 +763,7 @@ void PORT_CloseInd (tRFC_MCB *p_mcb)
p_port = &rfc_cb.port.port[0];
for (i = 0; i < MAX_RFC_PORTS; i++, p_port++)
{
- if (p_port->rfc.p_mcb == p_mcb)
+ if (p_port->rfc.p_mcb == p_mcb)
{
port_rfc_closed (p_port, PORT_PEER_CONNECTION_FAILED);
}
@@ -775,7 +775,7 @@ void PORT_CloseInd (tRFC_MCB *p_mcb)
**
** Function Port_TimeOutCloseMux
**
-** Description This function is called when RFCOMM timesout on a command
+** Description This function is called when RFCOMM timesout on a command
** as a result multiplexer connection is closed.
**
*******************************************************************************/
@@ -789,7 +789,7 @@ void Port_TimeOutCloseMux (tRFC_MCB *p_mcb)
p_port = &rfc_cb.port.port[0];
for (i = 0; i < MAX_RFC_PORTS; i++, p_port++)
{
- if (p_port->rfc.p_mcb == p_mcb)
+ if (p_port->rfc.p_mcb == p_mcb)
{
port_rfc_closed (p_port, PORT_PEER_TIMEOUT);
}
@@ -802,7 +802,7 @@ void Port_TimeOutCloseMux (tRFC_MCB *p_mcb)
** Function PORT_DataInd
**
** Description This function is called from the RFCOMM layer when data
-** buffer is received from the peer.
+** buffer is received from the peer.
**
*******************************************************************************/
void PORT_DataInd (tRFC_MCB *p_mcb, UINT8 dlci, BT_HDR *p_buf)
@@ -901,7 +901,7 @@ void PORT_DataInd (tRFC_MCB *p_mcb, UINT8 dlci, BT_HDR *p_buf)
**
** Function PORT_FlowInd
**
-** Description This function is called from the RFCOMM layer on the flow
+** Description This function is called from the RFCOMM layer on the flow
** control signal change. Propagate change to the user.
**
*******************************************************************************/
@@ -931,13 +931,13 @@ void PORT_FlowInd (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN enable_data)
if (dlci == 0)
{
p_port = &rfc_cb.port.port[i];
- if (!p_port->in_use
+ if (!p_port->in_use
|| (p_port->rfc.p_mcb != p_mcb)
|| (p_port->rfc.state != RFC_STATE_OPENED))
continue;
}
events = 0;
-
+
/* Check if flow of data is still enabled */
events |= port_flow_control_user (p_port);
@@ -988,14 +988,14 @@ UINT32 port_rfc_send_tx_data (tPORT *p_port)
RFCOMM_TRACE_DEBUG1 ("Sending RFCOMM_DataReq tx.queue_size=%d", p_port->tx.queue_size);
RFCOMM_DataReq (p_port->rfc.p_mcb, p_port->dlci, p_buf);
-
+
events |= PORT_EV_TXCHAR;
if (p_port->tx.queue_size == 0)
{
events |= PORT_EV_TXEMPTY;
break;
- }
+ }
}
/* queue is empty-- all data sent */
else
@@ -1083,9 +1083,9 @@ void port_rfc_closed (tPORT *p_port, UINT8 res)
** Function port_get_credits
**
** Description Set initial values for credits.
-** Adjust max number of rx credits based on negotiated MTU.
-** Check max allowed num of bytes, max allowed num buffers,
-** should be less then 255
+** Adjust max number of rx credits based on negotiated MTU.
+** Check max allowed num of bytes, max allowed num buffers,
+** should be less then 255
**
*******************************************************************************/
void port_get_credits (tPORT *p_port, UINT8 k)
diff --git a/stack/rfcomm/port_utils.c b/stack/rfcomm/port_utils.c
index b764798..3de9ec0 100644
--- a/stack/rfcomm/port_utils.c
+++ b/stack/rfcomm/port_utils.c
@@ -27,7 +27,7 @@
#define asrt(s) if(!(s)) ALOGE ("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__)
-static const tPORT_STATE default_port_pars =
+static const tPORT_STATE default_port_pars =
{
PORT_BAUD_RATE_9600,
PORT_8_BITS,
@@ -48,7 +48,7 @@ static const tPORT_STATE default_port_pars =
**
** Description Look through the Port Control Blocks for a free one. Note
** that one server can open several ports with the same SCN
-** if it can support simulteneous requests from different
+** if it can support simulteneous requests from different
** clients.
**
** Returns Pointer to the PORT or NULL if not found
@@ -126,7 +126,7 @@ void port_set_defaults (tPORT *p_port)
** Function port_select_mtu
**
** Description Select MTU which will best serve connection from our
-** point of view.
+** point of view.
** If our device is 1.2 or lower we calculate how many DH5s
** fit into 1 RFCOMM buffer.
**
@@ -152,7 +152,7 @@ void port_select_mtu (tPORT *p_port)
/* We try to negotiate MTU that each packet can be split into whole
number of max packets. For example if link is 1.2 max packet size is 339 bytes.
At first calculate how many whole packets it is. MAX L2CAP is 1691 + 4 overhead.
- 1695, that will be 5 Dh5 packets. Now maximum RFCOMM packet is
+ 1695, that will be 5 Dh5 packets. Now maximum RFCOMM packet is
5 * 339 = 1695. Minus 4 bytes L2CAP header 1691. Minus RFCOMM 6 bytes header overhead 1685
For EDR 2.0 packet size is 1027. So we better send RFCOMM packet as 1 3DH5 packet
@@ -182,7 +182,7 @@ void port_select_mtu (tPORT *p_port)
p_port->rx_buf_critical = (PORT_RX_CRITICAL_WM / p_port->mtu);
if( p_port->rx_buf_critical > PORT_RX_BUF_CRITICAL_WM )
p_port->rx_buf_critical = PORT_RX_BUF_CRITICAL_WM;
- RFCOMM_TRACE_DEBUG3 ("port_select_mtu credit_rx_max %d, credit_rx_low %d, rx_buf_critical %d",
+ RFCOMM_TRACE_DEBUG3 ("port_select_mtu credit_rx_max %d, credit_rx_low %d, rx_buf_critical %d",
p_port->credit_rx_max, p_port->credit_rx_low, p_port->rx_buf_critical);
}
@@ -191,7 +191,7 @@ void port_select_mtu (tPORT *p_port)
**
** Function port_release_port
**
-** Description Release port infor control block.
+** Description Release port infor control block.
**
** Returns Pointer to the PORT or NULL if not found
**
@@ -238,7 +238,7 @@ void port_release_port (tPORT *p_port)
mask = p_port->ev_mask;
p_port_cb = p_port->p_callback;
user_port_pars = p_port->user_port_pars;
-
+
port_set_defaults(p_port);
/* restore */
p_port->ev_mask = mask;
@@ -292,7 +292,7 @@ tRFC_MCB *port_find_mcb (BD_ADDR bd_addr)
**
** Function port_find_mcb_dlci_port
**
-** Description Find port on the multiplexer channel based on DLCI. If
+** Description Find port on the multiplexer channel based on DLCI. If
** this port with DLCI not found try to use even DLCI. This
** is for the case when client is establishing connection on
** none-initiator MCB.
@@ -303,7 +303,7 @@ tRFC_MCB *port_find_mcb (BD_ADDR bd_addr)
tPORT *port_find_mcb_dlci_port (tRFC_MCB *p_mcb, UINT8 dlci)
{
UINT8 inx;
-
+
if (!p_mcb)
return (NULL);
@@ -369,7 +369,7 @@ tPORT *port_find_port (UINT8 dlci, BD_ADDR bd_addr)
for (i = 0; i < MAX_RFC_PORTS; i++)
{
p_port = &rfc_cb.port.port[i];
- if (p_port->in_use
+ if (p_port->in_use
&& (p_port->dlci == dlci)
&& !memcmp (p_port->bd_addr, bd_addr, BD_ADDR_LEN))
{
@@ -385,7 +385,7 @@ tPORT *port_find_port (UINT8 dlci, BD_ADDR bd_addr)
** Function port_flow_control_user
**
** Description Check the current user flow control and if necessary return
-** events to be send to the user based on the user's specified
+** events to be send to the user based on the user's specified
** flow control type.
**
** Returns event mask to be returned to the application
@@ -398,7 +398,7 @@ UINT32 port_flow_control_user (tPORT *p_port)
/* Flow control to the user can be caused by flow controlling by the peer */
/* (FlowInd, or flow control by the peer RFCOMM (Fcon) or internally if */
/* tx_queue is full */
- BOOLEAN fc = p_port->tx.peer_fc
+ BOOLEAN fc = p_port->tx.peer_fc
|| !p_port->rfc.p_mcb
|| !p_port->rfc.p_mcb->peer_ready
|| (p_port->tx.queue_size > PORT_TX_HIGH_WM)
@@ -497,7 +497,7 @@ void port_flow_control_peer(tPORT *p_port, BOOLEAN enable, UINT16 count)
/* If credit count is less than low credit watermark, and user */
/* did not force flow control, send a credit update */
/* There might be a special case when we just adjusted rx_max */
- if ((p_port->credit_rx <= p_port->credit_rx_low)
+ if ((p_port->credit_rx <= p_port->credit_rx_low)
&& !p_port->rx.user_fc
&& (p_port->credit_rx_max > p_port->credit_rx))
{
@@ -505,7 +505,7 @@ void port_flow_control_peer(tPORT *p_port, BOOLEAN enable, UINT16 count)
(UINT8) (p_port->credit_rx_max - p_port->credit_rx));
p_port->credit_rx = p_port->credit_rx_max;
-
+
p_port->rx.peer_fc = FALSE;
}
}
@@ -525,14 +525,14 @@ void port_flow_control_peer(tPORT *p_port, BOOLEAN enable, UINT16 count)
}
}
/* else using TS 07.10 flow control */
- else
+ else
{
/* if want to enable flow from peer */
if (enable)
{
/* If rfcomm suspended traffic from the peer based on the rx_queue_size */
/* check if it can be resumed now */
- if (p_port->rx.peer_fc
+ if (p_port->rx.peer_fc
&& (p_port->rx.queue_size < PORT_RX_LOW_WM)
&& (p_port->rx.queue.count < PORT_RX_BUF_LOW_WM))
{
@@ -554,7 +554,7 @@ void port_flow_control_peer(tPORT *p_port, BOOLEAN enable, UINT16 count)
}
/* Check the size of the rx queue. If it exceeds certain */
/* level and flow control has not been sent to the peer do it now */
- else if ( ((p_port->rx.queue_size > PORT_RX_HIGH_WM)
+ else if ( ((p_port->rx.queue_size > PORT_RX_HIGH_WM)
|| (p_port->rx.queue.count > PORT_RX_BUF_HIGH_WM))
&& !p_port->rx.peer_fc)
{
@@ -562,7 +562,7 @@ void port_flow_control_peer(tPORT *p_port, BOOLEAN enable, UINT16 count)
p_port->rx.peer_fc = TRUE;
RFCOMM_FlowReq (p_port->rfc.p_mcb, p_port->dlci, FALSE);
- }
+ }
}
}
}
diff --git a/stack/rfcomm/rfc_int.h b/stack/rfcomm/rfc_int.h
index 23c72ce..fcafdf0 100644
--- a/stack/rfcomm/rfc_int.h
+++ b/stack/rfcomm/rfc_int.h
@@ -14,7 +14,7 @@
#include "l2c_api.h"
#include "port_int.h"
-/*
+/*
** Define RFCOMM result codes
*/
#define RFCOMM_SUCCESS 0
@@ -26,9 +26,9 @@
#define RFCOMM_SECURITY_ERR 112
/*
-** Define max and min RFCOMM MTU (N1)
+** Define max and min RFCOMM MTU (N1)
*/
-#define RFCOMM_MIN_MTU 23
+#define RFCOMM_MIN_MTU 23
#define RFCOMM_MAX_MTU 32767
extern void RFCOMM_StartReq (tRFC_MCB *p_mcb);
@@ -59,7 +59,7 @@ extern void RFCOMM_ControlRsp (tRFC_MCB *p_mcb, UINT8 dlci, tPORT_CTRL *p_pars);
extern void RFCOMM_LineStatusReq (tRFC_MCB *p_mcb, UINT8 dlci, UINT8 line_status);
/*
-** Define logical struct used for sending and decoding MX frames
+** Define logical struct used for sending and decoding MX frames
*/
typedef struct
{
@@ -88,14 +88,14 @@ typedef struct
UINT8 *p_data;
UINT16 data_len;
} test;
- struct
+ struct
{
UINT8 dlci;
UINT8 signals;
UINT8 break_present;
UINT8 break_duration;
} msc;
- struct
+ struct
{
UINT8 ea;
UINT8 cr;
@@ -141,7 +141,7 @@ typedef struct
#define RFC_MX_STATE_DISC_WAIT_UA 6
/*
-** Define port states
+** Define port states
*/
#define RFC_STATE_CLOSED 0
#define RFC_STATE_SABME_WAIT_UA 1
@@ -150,8 +150,8 @@ typedef struct
#define RFC_STATE_OPENED 4
#define RFC_STATE_DISC_WAIT_UA 5
-/*
-** Events that can be received by multiplexer as well as port state machines
+/*
+** Events that can be received by multiplexer as well as port state machines
*/
#define RFC_EVENT_SABME 0
#define RFC_EVENT_UA 1
@@ -195,7 +195,7 @@ typedef struct
#define RFC_T2_TIMEOUT 20 /* timeout to wait for Mx UIH */
// btla-specific --
#define RFC_DISC_TIMEOUT 3 /* If something goes wrong and we send DISC we should not wait for min */
-#define RFC_CLOSE_TIMEOUT 10
+#define RFC_CLOSE_TIMEOUT 10
#define RFCOMM_CONN_TIMEOUT 120 /* first connection to be established on Mx */
@@ -269,7 +269,7 @@ extern "C" {
extern void rfc_mx_sm_execute (tRFC_MCB *p_mcb, UINT16 event, void *p_data);
-/*
+/*
** Functions provided by the rfc_port_fsm.c
*/
extern void rfc_port_sm_execute (tPORT *p_port, UINT16 event, void *p_data);
@@ -285,7 +285,7 @@ extern void rfc_process_fcon (tRFC_MCB *p_rfc_mcb, BOOLEAN is_command);
extern void rfc_process_fcoff (tRFC_MCB *p_rfc_mcb, BOOLEAN is_command);
extern void rfc_process_l2cap_congestion (tRFC_MCB *p_mcb, BOOLEAN is_congested);
-/*
+/*
** Functions provided by the rfc_utils.c
*/
tRFC_MCB *rfc_alloc_multiplexer_channel (BD_ADDR bd_addr, BOOLEAN is_initiator);
@@ -306,7 +306,7 @@ extern void rfc_inc_credit (tPORT *p_port, UINT8 credit);
extern void rfc_dec_credit (tPORT *p_port);
extern void rfc_check_send_cmd(tRFC_MCB *p_mcb, BT_HDR *p_buf);
-/*
+/*
** Functions provided by the rfc_ts_frames.c
*/
extern void rfc_send_sabme (tRFC_MCB *p_rfc_mcb, UINT8 dlci);
@@ -316,10 +316,10 @@ extern void rfc_send_disc (tRFC_MCB *p_rfc_mcb, UINT8 dlci);
extern void rfc_send_pn (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command, UINT16 mtu,
UINT8 cl, UINT8 k);
extern void rfc_send_test (tRFC_MCB *p_rfc_mcb, BOOLEAN is_command, BT_HDR *p_buf);
-extern void rfc_send_msc (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command,
+extern void rfc_send_msc (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command,
tPORT_CTRL *p_pars);
extern void rfc_send_rls (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command, UINT8 status);
-extern void rfc_send_rpn (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command,
+extern void rfc_send_rpn (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command,
tPORT_STATE *p_pars, UINT16 mask);
extern void rfc_send_fcon (tRFC_MCB *p_mcb, BOOLEAN is_command);
extern void rfc_send_fcoff (tRFC_MCB *p_mcb, BOOLEAN is_command);
@@ -328,7 +328,7 @@ extern void rfc_send_credit(tRFC_MCB *p_mcb, UINT8 dlci, UINT8 credit);
extern void rfc_process_mx_message (tRFC_MCB *p_rfc_mcb, BT_HDR *p_buf);
extern UINT8 rfc_parse_data (tRFC_MCB *p_rfc_mcb, MX_FRAME *p_frame, BT_HDR *p_buf);
-/*
+/*
** Functions provided by the rfc_disp.c
*/
diff --git a/stack/rfcomm/rfc_l2cap_if.c b/stack/rfcomm/rfc_l2cap_if.c
index ec888e0..fb10d07 100644
--- a/stack/rfcomm/rfc_l2cap_if.c
+++ b/stack/rfcomm/rfc_l2cap_if.c
@@ -20,7 +20,7 @@
#include "rfc_int.h"
-/*
+/*
** Define Callback functions to be called by L2CAP
*/
static void RFCOMM_ConnectInd (BD_ADDR bd_addr, UINT16 lcid, UINT16 psm, UINT8 id);
@@ -66,7 +66,7 @@ void rfcomm_l2cap_if_init (void)
**
** Function RFCOMM_ConnectInd
**
-** Description This is a callback function called by L2CAP when
+** Description This is a callback function called by L2CAP when
** L2CA_ConnectInd received. Allocate multiplexer control block
** and dispatch the event to it.
**
@@ -120,7 +120,7 @@ void RFCOMM_ConnectInd (BD_ADDR bd_addr, UINT16 lcid, UINT16 psm, UINT8 id)
**
** Function RFCOMM_ConnectCnf
**
-** Description This is a callback function called by L2CAP when
+** Description This is a callback function called by L2CAP when
** L2CA_ConnectCnf received. Save L2CAP handle and dispatch
** event to the FSM.
**
@@ -192,7 +192,7 @@ void RFCOMM_ConnectCnf (UINT16 lcid, UINT16 result)
**
** Function RFCOMM_ConfigInd
**
-** Description This is a callback function called by L2CAP when
+** Description This is a callback function called by L2CAP when
** L2CA_ConfigInd received. Save parameters in the control
** block and dispatch event to the FSM.
**
@@ -215,7 +215,7 @@ void RFCOMM_ConfigInd (UINT16 lcid, tL2CAP_CFG_INFO *p_cfg)
**
** Function RFCOMM_ConfigCnf
**
-** Description This is a callback function called by L2CAP when
+** Description This is a callback function called by L2CAP when
** L2CA_ConfigCnf received. Save L2CAP handle and dispatch
** event to the FSM.
**
@@ -238,7 +238,7 @@ void RFCOMM_ConfigCnf (UINT16 lcid, tL2CAP_CFG_INFO *p_cfg)
**
** Function RFCOMM_QoSViolationInd
**
-** Description This is a callback function called by L2CAP when
+** Description This is a callback function called by L2CAP when
** L2CA_QoSViolationIndInd received. Dispatch event to the FSM.
**
*******************************************************************************/
@@ -251,7 +251,7 @@ void RFCOMM_QoSViolationInd (BD_ADDR bd_addr)
**
** Function RFCOMM_DisconnectInd
**
-** Description This is a callback function called by L2CAP when
+** Description This is a callback function called by L2CAP when
** L2CA_DisconnectInd received. Dispatch event to the FSM.
**
*******************************************************************************/
@@ -278,8 +278,8 @@ void RFCOMM_DisconnectInd (UINT16 lcid, BOOLEAN is_conf_needed)
**
** Function RFCOMM_BufDataInd
**
-** Description This is a callback function called by L2CAP when
-** data RFCOMM frame is received. Parse the frames, check
+** Description This is a callback function called by L2CAP when
+** data RFCOMM frame is received. Parse the frames, check
** the checksum and dispatch event to multiplexer or port
** state machine depending on the frame destination.
**
@@ -352,7 +352,7 @@ void RFCOMM_BufDataInd (UINT16 lcid, BT_HDR *p_buf)
rfc_port_sm_execute (p_port, event, p_buf);
else
GKI_freebuf (p_buf);
-
+
if (rfc_cb.rfc.rx_frame.credit != 0)
rfc_inc_credit (p_port, rfc_cb.rfc.rx_frame.credit);
@@ -366,7 +366,7 @@ void RFCOMM_BufDataInd (UINT16 lcid, BT_HDR *p_buf)
**
** Function RFCOMM_CongestionStatusInd
**
-** Description This is a callback function called by L2CAP when
+** Description This is a callback function called by L2CAP when
** data RFCOMM L2CAP congestion status changes
**
*******************************************************************************/
diff --git a/stack/rfcomm/rfc_mx_fsm.c b/stack/rfcomm/rfc_mx_fsm.c
index 6a9b49d..2f267a7 100644
--- a/stack/rfcomm/rfc_mx_fsm.c
+++ b/stack/rfcomm/rfc_mx_fsm.c
@@ -158,8 +158,8 @@ void rfc_mx_sm_state_idle (tRFC_MCB *p_mcb, UINT16 event, void *p_data)
**
** Function rfc_mx_sm_state_wait_conn_cnf
**
-** Description This function handles events when the multiplexer is
-** waiting for Connection Confirm from L2CAP.
+** Description This function handles events when the multiplexer is
+** waiting for Connection Confirm from L2CAP.
**
** Returns void
**
@@ -276,7 +276,7 @@ void rfc_mx_sm_state_configure (tRFC_MCB *p_mcb, UINT16 event, void *p_data)
p_mcb->state = RFC_MX_STATE_IDLE;
L2CA_DisconnectReq (p_mcb->lcid);
- PORT_StartCnf (p_mcb, RFCOMM_ERROR);
+ PORT_StartCnf (p_mcb, RFCOMM_ERROR);
return;
}
RFCOMM_TRACE_EVENT2 ("RFCOMM MX ignored - evt:%d in state:%d", event, p_mcb->state);
@@ -287,7 +287,7 @@ void rfc_mx_sm_state_configure (tRFC_MCB *p_mcb, UINT16 event, void *p_data)
**
** Function rfc_mx_sm_sabme_wait_ua
**
-** Description This function handles events when the multiplexer sent
+** Description This function handles events when the multiplexer sent
** SABME and is waiting for UA reply.
**
** Returns void
@@ -338,7 +338,7 @@ void rfc_mx_sm_sabme_wait_ua (tRFC_MCB *p_mcb, UINT16 event, void *p_data)
p_mcb->state = RFC_MX_STATE_IDLE;
L2CA_DisconnectReq (p_mcb->lcid);
- PORT_StartCnf (p_mcb, RFCOMM_ERROR);
+ PORT_StartCnf (p_mcb, RFCOMM_ERROR);
return;
}
RFCOMM_TRACE_EVENT2 ("RFCOMM MX ignored - evt:%d in state:%d", event, p_mcb->state);
@@ -348,7 +348,7 @@ void rfc_mx_sm_sabme_wait_ua (tRFC_MCB *p_mcb, UINT16 event, void *p_data)
**
** Function rfc_mx_sm_state_wait_sabme
**
-** Description This function handles events when the multiplexer is
+** Description This function handles events when the multiplexer is
** waiting for SABME on the acceptor side after configuration
**
** Returns void
@@ -382,7 +382,7 @@ void rfc_mx_sm_state_wait_sabme (tRFC_MCB *p_mcb, UINT16 event, void *p_data)
else
{
rfc_timer_stop (p_mcb);
- PORT_StartInd (p_mcb);
+ PORT_StartInd (p_mcb);
}
return;
@@ -415,7 +415,7 @@ void rfc_mx_sm_state_wait_sabme (tRFC_MCB *p_mcb, UINT16 event, void *p_data)
**
** Function rfc_mx_sm_state_connected
**
-** Description This function handles events when the multiplexer is
+** Description This function handles events when the multiplexer is
** in the CONNECTED state
**
** Returns void
@@ -459,7 +459,7 @@ void rfc_mx_sm_state_connected (tRFC_MCB *p_mcb, UINT16 event, void *p_data)
**
** Function rfc_mx_sm_state_disc_wait_ua
**
-** Description This function handles events when the multiplexer sent
+** Description This function handles events when the multiplexer sent
** DISC and is waiting for UA reply.
**
** Returns void
@@ -537,8 +537,8 @@ void rfc_mx_sm_state_disc_wait_ua (tRFC_MCB *p_mcb, UINT16 event, void *p_data)
**
** Function rfc_mx_send_config_req
**
-** Description This function handles L2CA_ConnectInd message from the
-** L2CAP. Accept connection.
+** Description This function handles L2CA_ConnectInd message from the
+** L2CAP. Accept connection.
**
*******************************************************************************/
static void rfc_mx_send_config_req (tRFC_MCB *p_mcb)
@@ -568,8 +568,8 @@ static void rfc_mx_send_config_req (tRFC_MCB *p_mcb)
**
** Function rfc_mx_conf_cnf
**
-** Description This function handles L2CA_ConfigCnf message from the
-** L2CAP. If result is not success tell upper layer that
+** Description This function handles L2CA_ConfigCnf message from the
+** L2CAP. If result is not success tell upper layer that
** start has not been accepted. If initiator send SABME
** on DLCI 0. T1 is still running.
**
@@ -611,7 +611,7 @@ static void rfc_mx_conf_cnf (tRFC_MCB *p_mcb, tL2CAP_CFG_INFO *p_cfg)
**
** Function rfc_mx_conf_ind
**
-** Description This function handles L2CA_ConfigInd message from the
+** Description This function handles L2CA_ConfigInd message from the
** L2CAP. Send the L2CA_ConfigRsp message.
**
*******************************************************************************/
diff --git a/stack/rfcomm/rfc_port_fsm.c b/stack/rfcomm/rfc_port_fsm.c
index d0c6b12..2d34edb 100644
--- a/stack/rfcomm/rfc_port_fsm.c
+++ b/stack/rfcomm/rfc_port_fsm.c
@@ -86,7 +86,7 @@ void rfc_port_sm_execute (tPORT *p_port, UINT16 event, void *p_data)
** Function rfc_port_sm_state_closed
**
** Description This function handles events when the port is in
-** CLOSED state. This state exists when port is
+** CLOSED state. This state exists when port is
** being initially established.
**
** Returns void
@@ -98,7 +98,7 @@ void rfc_port_sm_state_closed (tPORT *p_port, UINT16 event, void *p_data)
{
case RFC_EVENT_OPEN:
p_port->rfc.state = RFC_STATE_ORIG_WAIT_SEC_CHECK;
- btm_sec_mx_access_request (p_port->rfc.p_mcb->bd_addr, BT_PSM_RFCOMM, TRUE,
+ btm_sec_mx_access_request (p_port->rfc.p_mcb->bd_addr, BT_PSM_RFCOMM, TRUE,
BTM_SEC_PROTO_RFCOMM, (UINT32)(p_port->dlci / 2),
&rfc_sec_check_complete, p_port);
return;
@@ -119,7 +119,7 @@ void rfc_port_sm_state_closed (tPORT *p_port, UINT16 event, void *p_data)
/* Open will be continued after security checks are passed */
p_port->rfc.state = RFC_STATE_TERM_WAIT_SEC_CHECK;
- btm_sec_mx_access_request (p_port->rfc.p_mcb->bd_addr, BT_PSM_RFCOMM, FALSE,
+ btm_sec_mx_access_request (p_port->rfc.p_mcb->bd_addr, BT_PSM_RFCOMM, FALSE,
BTM_SEC_PROTO_RFCOMM, (UINT32)(p_port->dlci / 2),
&rfc_sec_check_complete, p_port);
return;
@@ -187,18 +187,18 @@ void rfc_port_sm_sabme_wait_ua (tPORT *p_port, UINT16 event, void *p_data)
case RFC_EVENT_UA:
rfc_port_timer_stop (p_port);
p_port->rfc.state = RFC_STATE_OPENED;
- PORT_DlcEstablishCnf (p_port->rfc.p_mcb, p_port->dlci, p_port->rfc.p_mcb->peer_l2cap_mtu, RFCOMM_SUCCESS);
+ PORT_DlcEstablishCnf (p_port->rfc.p_mcb, p_port->dlci, p_port->rfc.p_mcb->peer_l2cap_mtu, RFCOMM_SUCCESS);
return;
case RFC_EVENT_DM:
p_port->rfc.p_mcb->is_disc_initiator = TRUE;
- PORT_DlcEstablishCnf (p_port->rfc.p_mcb, p_port->dlci, p_port->rfc.p_mcb->peer_l2cap_mtu, RFCOMM_ERROR);
+ PORT_DlcEstablishCnf (p_port->rfc.p_mcb, p_port->dlci, p_port->rfc.p_mcb->peer_l2cap_mtu, RFCOMM_ERROR);
rfc_port_closed (p_port);
return;
case RFC_EVENT_DISC:
rfc_send_ua (p_port->rfc.p_mcb, p_port->dlci);
- PORT_DlcEstablishCnf (p_port->rfc.p_mcb, p_port->dlci, p_port->rfc.p_mcb->peer_l2cap_mtu, RFCOMM_ERROR);
+ PORT_DlcEstablishCnf (p_port->rfc.p_mcb, p_port->dlci, p_port->rfc.p_mcb->peer_l2cap_mtu, RFCOMM_ERROR);
rfc_port_closed (p_port);
return;
@@ -213,7 +213,7 @@ void rfc_port_sm_sabme_wait_ua (tPORT *p_port, UINT16 event, void *p_data)
case RFC_EVENT_TIMEOUT:
p_port->rfc.state = RFC_STATE_CLOSED;
- PORT_DlcEstablishCnf (p_port->rfc.p_mcb, p_port->dlci, p_port->rfc.p_mcb->peer_l2cap_mtu, RFCOMM_ERROR);
+ PORT_DlcEstablishCnf (p_port->rfc.p_mcb, p_port->dlci, p_port->rfc.p_mcb->peer_l2cap_mtu, RFCOMM_ERROR);
return;
}
RFCOMM_TRACE_WARNING1 ("Port state sabme_wait_ua Event ignored %d", event);
@@ -224,7 +224,7 @@ void rfc_port_sm_sabme_wait_ua (tPORT *p_port, UINT16 event, void *p_data)
**
** Function rfc_port_sm_term_wait_sec_check
**
-** Description This function handles events for the port in the
+** Description This function handles events for the port in the
** WAIT_SEC_CHECK state. SABME has been received from the
** peer and Security Manager verifes BD_ADDR, before we can
** send ESTABLISH_IND to the Port entity
@@ -250,7 +250,7 @@ void rfc_port_sm_term_wait_sec_check (tPORT *p_port, UINT16 event, void *p_data)
}
else
{
- PORT_DlcEstablishInd (p_port->rfc.p_mcb, p_port->dlci, p_port->rfc.p_mcb->peer_l2cap_mtu);
+ PORT_DlcEstablishInd (p_port->rfc.p_mcb, p_port->dlci, p_port->rfc.p_mcb->peer_l2cap_mtu);
}
return;
@@ -278,7 +278,7 @@ void rfc_port_sm_term_wait_sec_check (tPORT *p_port, UINT16 event, void *p_data)
p_port->rfc.state = RFC_STATE_CLOSED;
rfc_send_ua (p_port->rfc.p_mcb, p_port->dlci);
- PORT_DlcReleaseInd (p_port->rfc.p_mcb, p_port->dlci);
+ PORT_DlcReleaseInd (p_port->rfc.p_mcb, p_port->dlci);
return;
case RFC_EVENT_UIH:
@@ -306,7 +306,7 @@ void rfc_port_sm_term_wait_sec_check (tPORT *p_port, UINT16 event, void *p_data)
**
** Function rfc_port_sm_orig_wait_sec_check
**
-** Description This function handles events for the port in the
+** Description This function handles events for the port in the
** ORIG_WAIT_SEC_CHECK state. RFCOMM is waiting for Security
** manager to finish before sending SABME to the peer
**
@@ -321,7 +321,7 @@ void rfc_port_sm_orig_wait_sec_check (tPORT *p_port, UINT16 event, void *p_data)
if (*((UINT8 *)p_data) != BTM_SUCCESS)
{
p_port->rfc.p_mcb->is_disc_initiator = TRUE;
- PORT_DlcEstablishCnf (p_port->rfc.p_mcb, p_port->dlci, 0, RFCOMM_SECURITY_ERR);
+ PORT_DlcEstablishCnf (p_port->rfc.p_mcb, p_port->dlci, 0, RFCOMM_SECURITY_ERR);
rfc_port_closed (p_port);
return;
}
@@ -410,7 +410,7 @@ void rfc_port_sm_opened (tPORT *p_port, UINT16 event, void *p_data)
return;
case RFC_EVENT_DM:
- PORT_DlcReleaseInd (p_port->rfc.p_mcb, p_port->dlci);
+ PORT_DlcReleaseInd (p_port->rfc.p_mcb, p_port->dlci);
rfc_port_closed (p_port);
return;
@@ -424,7 +424,7 @@ void rfc_port_sm_opened (tPORT *p_port, UINT16 event, void *p_data)
rfc_port_timer_start (p_port, RFC_DISC_TIMEOUT);
}
else
- PORT_DlcReleaseInd (p_port->rfc.p_mcb, p_port->dlci);
+ PORT_DlcReleaseInd (p_port->rfc.p_mcb, p_port->dlci);
return;
case RFC_EVENT_UIH:
@@ -463,10 +463,10 @@ void rfc_port_sm_disc_wait_ua (tPORT *p_port, UINT16 event, void *p_data)
rfc_port_closed (p_port);
return;
- case RFC_EVENT_DATA:
- GKI_freebuf (p_data);
- return;
-
+ case RFC_EVENT_DATA:
+ GKI_freebuf (p_data);
+ return;
+
case RFC_EVENT_UA:
p_port->rfc.p_mcb->is_disc_initiator = TRUE;
/* Case falls through */
@@ -549,7 +549,7 @@ void rfc_process_pn (tRFC_MCB *p_mcb, BOOLEAN is_command, MX_FRAME *p_frame)
rfc_port_timer_stop (p_port);
PORT_ParNegCnf (p_mcb, dlci, p_frame->u.pn.mtu,
- p_frame->u.pn.conv_layer, p_frame->u.pn.k);
+ p_frame->u.pn.conv_layer, p_frame->u.pn.k);
}
@@ -557,17 +557,17 @@ void rfc_process_pn (tRFC_MCB *p_mcb, BOOLEAN is_command, MX_FRAME *p_frame)
**
** Function rfc_process_rpn
**
-** Description This function handles Remote DLC parameter negotiation
-** command/response. Pass command to the user.
+** Description This function handles Remote DLC parameter negotiation
+** command/response. Pass command to the user.
**
*******************************************************************************/
-void rfc_process_rpn (tRFC_MCB *p_mcb, BOOLEAN is_command,
+void rfc_process_rpn (tRFC_MCB *p_mcb, BOOLEAN is_command,
BOOLEAN is_request, MX_FRAME *p_frame)
{
tPORT_STATE port_pars;
tPORT *p_port;
- if ((p_port = port_find_mcb_dlci_port (p_mcb, p_frame->dlci)) == NULL)
+ if ((p_port = port_find_mcb_dlci_port (p_mcb, p_frame->dlci)) == NULL)
{
/* This is the first command on the port */
if (is_command)
@@ -575,7 +575,7 @@ void rfc_process_rpn (tRFC_MCB *p_mcb, BOOLEAN is_command,
memset(&port_pars, 0, sizeof(tPORT_STATE));
rfc_set_port_state(&port_pars, p_frame);
-
+
PORT_PortNegInd(p_mcb, p_frame->dlci, &port_pars, p_frame->u.rpn.param_mask);
}
return;
@@ -626,7 +626,7 @@ void rfc_process_rpn (tRFC_MCB *p_mcb, BOOLEAN is_command,
p_port->peer_port_pars.fc_type = (RFCOMM_FC_RTR_ON_INPUT | RFCOMM_FC_RTR_ON_OUTPUT);
p_port->rfc.expected_rsp |= RFC_RSP_RPN;
- rfc_send_rpn (p_mcb, p_frame->dlci, TRUE, &p_port->peer_port_pars,
+ rfc_send_rpn (p_mcb, p_frame->dlci, TRUE, &p_port->peer_port_pars,
RFCOMM_RPN_PM_RTR_ON_INPUT | RFCOMM_RPN_PM_RTR_ON_OUTPUT);
rfc_port_timer_start (p_port, RFC_T2_TIMEOUT) ;
return;
@@ -636,9 +636,9 @@ void rfc_process_rpn (tRFC_MCB *p_mcb, BOOLEAN is_command,
p_port->rfc.expected_rsp &= ~RFC_RSP_RPN;
/* Check if all suggested parameters were accepted */
- if (((p_frame->u.rpn.param_mask & (RFCOMM_RPN_PM_RTR_ON_INPUT | RFCOMM_RPN_PM_RTR_ON_OUTPUT)) ==
+ if (((p_frame->u.rpn.param_mask & (RFCOMM_RPN_PM_RTR_ON_INPUT | RFCOMM_RPN_PM_RTR_ON_OUTPUT)) ==
(RFCOMM_RPN_PM_RTR_ON_INPUT | RFCOMM_RPN_PM_RTR_ON_OUTPUT))
- || ((p_frame->u.rpn.param_mask & (RFCOMM_RPN_PM_RTC_ON_INPUT | RFCOMM_RPN_PM_RTC_ON_OUTPUT)) ==
+ || ((p_frame->u.rpn.param_mask & (RFCOMM_RPN_PM_RTC_ON_INPUT | RFCOMM_RPN_PM_RTC_ON_OUTPUT)) ==
(RFCOMM_RPN_PM_RTC_ON_INPUT | RFCOMM_RPN_PM_RTC_ON_OUTPUT)))
{
PORT_PortNegCnf (p_mcb, p_port->dlci, &port_pars, RFCOMM_SUCCESS);
@@ -655,7 +655,7 @@ void rfc_process_rpn (tRFC_MCB *p_mcb, BOOLEAN is_command,
p_port->rfc.expected_rsp |= RFC_RSP_RPN;
- rfc_send_rpn (p_mcb, p_frame->dlci, TRUE, &p_port->peer_port_pars,
+ rfc_send_rpn (p_mcb, p_frame->dlci, TRUE, &p_port->peer_port_pars,
RFCOMM_RPN_PM_RTC_ON_INPUT | RFCOMM_RPN_PM_RTC_ON_OUTPUT);
rfc_port_timer_start (p_port, RFC_T2_TIMEOUT) ;
return;
@@ -674,8 +674,8 @@ void rfc_process_rpn (tRFC_MCB *p_mcb, BOOLEAN is_command,
**
** Function rfc_process_msc
**
-** Description This function handles Modem Status Command.
-** Pass command to the user.
+** Description This function handles Modem Status Command.
+** Pass command to the user.
**
*******************************************************************************/
void rfc_process_msc (tRFC_MCB *p_mcb, BOOLEAN is_command, MX_FRAME *p_frame)
@@ -686,7 +686,7 @@ void rfc_process_msc (tRFC_MCB *p_mcb, BOOLEAN is_command, MX_FRAME *p_frame)
BOOLEAN new_peer_fc = FALSE;
p_port = port_find_mcb_dlci_port (p_mcb, p_frame->dlci);
- if (p_port == NULL)
+ if (p_port == NULL)
return;
pars.modem_signal = 0;
@@ -704,8 +704,8 @@ void rfc_process_msc (tRFC_MCB *p_mcb, BOOLEAN is_command, MX_FRAME *p_frame)
pars.modem_signal |= MODEM_SIGNAL_DCD;
pars.fc = ((modem_signals & RFCOMM_MSC_FC) == RFCOMM_MSC_FC);
-
- pars.break_signal = (p_frame->u.msc.break_present) ?
+
+ pars.break_signal = (p_frame->u.msc.break_present) ?
p_frame->u.msc.break_duration : 0;
pars.discard_buffers = 0;
pars.break_signal_seq = RFCOMM_CTRL_BREAK_IN_SEQ; /* this is default */
@@ -745,8 +745,8 @@ void rfc_process_msc (tRFC_MCB *p_mcb, BOOLEAN is_command, MX_FRAME *p_frame)
**
** Function rfc_process_rls
**
-** Description This function handles Remote Line Status command.
-** Pass command to the user.
+** Description This function handles Remote Line Status command.
+** Pass command to the user.
**
*******************************************************************************/
void rfc_process_rls (tRFC_MCB *p_mcb, BOOLEAN is_command, MX_FRAME *p_frame)
@@ -790,7 +790,7 @@ void rfc_process_nsc (tRFC_MCB *p_mcb, MX_FRAME *p_frame)
** Function rfc_process_test
**
** Description This function handles Test frame. If this is a command
-** reply to it. Otherwise pass response to the user.
+** reply to it. Otherwise pass response to the user.
**
*******************************************************************************/
void rfc_process_test_rsp (tRFC_MCB *p_mcb, BT_HDR *p_buf)
@@ -803,8 +803,8 @@ void rfc_process_test_rsp (tRFC_MCB *p_mcb, BT_HDR *p_buf)
**
** Function rfc_process_fcon
**
-** Description This function handles FCON frame. The peer entity is able
-** to receive new information
+** Description This function handles FCON frame. The peer entity is able
+** to receive new information
**
*******************************************************************************/
void rfc_process_fcon (tRFC_MCB *p_mcb, BOOLEAN is_command)
@@ -824,8 +824,8 @@ void rfc_process_fcon (tRFC_MCB *p_mcb, BOOLEAN is_command)
**
** Function rfc_process_fcoff
**
-** Description This function handles FCOFF frame. The peer entity is unable
-** to receive new information
+** Description This function handles FCOFF frame. The peer entity is unable
+** to receive new information
**
*******************************************************************************/
void rfc_process_fcoff (tRFC_MCB *p_mcb, BOOLEAN is_command)
diff --git a/stack/rfcomm/rfc_port_if.c b/stack/rfcomm/rfc_port_if.c
index c9159f5..03fb339 100644
--- a/stack/rfcomm/rfc_port_if.c
+++ b/stack/rfcomm/rfc_port_if.c
@@ -44,7 +44,7 @@ void RFCOMM_StartReq (tRFC_MCB *p_mcb)
** Function RFCOMM_StartRsp
**
** Description This function handles Start Response from the upper layer.
-** Save upper layer handle and result of the Start Indication
+** Save upper layer handle and result of the Start Indication
** in the control block and dispatch event to the FSM.
**
*******************************************************************************/
@@ -58,18 +58,18 @@ void RFCOMM_StartRsp (tRFC_MCB *p_mcb, UINT16 result)
**
** Function RFCOMM_DlcEstablishReq
**
-** Description This function is called by the user app to establish
+** Description This function is called by the user app to establish
** connection with the specific dlci on a specific bd device.
-** It will allocate RFCOMM connection control block if not
-** allocated before and dispatch open event to the state
+** It will allocate RFCOMM connection control block if not
+** allocated before and dispatch open event to the state
** machine.
**
*******************************************************************************/
void RFCOMM_DlcEstablishReq (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu)
{
tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
-
- if (p_mcb->state != RFC_MX_STATE_CONNECTED)
+
+ if (p_mcb->state != RFC_MX_STATE_CONNECTED)
{
PORT_DlcEstablishCnf (p_mcb, dlci, 0, RFCOMM_ERROR);
return;
@@ -90,7 +90,7 @@ void RFCOMM_DlcEstablishReq (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu)
void RFCOMM_DlcEstablishRsp (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu, UINT16 result)
{
tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
-
+
if ((p_mcb->state != RFC_MX_STATE_CONNECTED) && (result == RFCOMM_SUCCESS))
{
PORT_DlcReleaseInd (p_mcb, dlci);
@@ -108,7 +108,7 @@ void RFCOMM_DlcEstablishRsp (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu, UINT16 res
** Description This function is called by the user app to start
** DLC parameter negotiation. Port emulation can send this
** request before actually establishing the DLC. In this
-** case the function will allocate RFCOMM connection control
+** case the function will allocate RFCOMM connection control
** block.
**
*******************************************************************************/
@@ -119,7 +119,7 @@ void RFCOMM_ParNegReq (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu)
UINT8 cl;
UINT8 k;
- if (p_mcb->state != RFC_MX_STATE_CONNECTED)
+ if (p_mcb->state != RFC_MX_STATE_CONNECTED)
{
p_port->error = PORT_PAR_NEG_FAILED;
return;
@@ -157,7 +157,7 @@ void RFCOMM_ParNegReq (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu)
** Function RFCOMM_ParNegRsp
**
** Description This function is called by the user app to acknowledge
-** DLC parameter negotiation.
+** DLC parameter negotiation.
**
*******************************************************************************/
void RFCOMM_ParNegRsp (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu, UINT8 cl, UINT8 k)
@@ -175,17 +175,17 @@ void RFCOMM_ParNegRsp (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu, UINT8 cl, UINT8
** Function RFCOMM_PortNegReq
**
** Description This function is called by the user app to start
-** Remote Port parameter negotiation. Port emulation can
-** send this request before actually establishing the DLC.
-** In this case the function will allocate RFCOMM connection
+** Remote Port parameter negotiation. Port emulation can
+** send this request before actually establishing the DLC.
+** In this case the function will allocate RFCOMM connection
** control block.
**
*******************************************************************************/
void RFCOMM_PortNegReq (tRFC_MCB *p_mcb, UINT8 dlci, tPORT_STATE *p_pars)
{
tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
-
- if (p_mcb->state != RFC_MX_STATE_CONNECTED)
+
+ if (p_mcb->state != RFC_MX_STATE_CONNECTED)
{
PORT_PortNegCnf (p_mcb, dlci, NULL, RFCOMM_ERROR);
return;
@@ -208,13 +208,13 @@ void RFCOMM_PortNegReq (tRFC_MCB *p_mcb, UINT8 dlci, tPORT_STATE *p_pars)
** Function RFCOMM_PortNegRsp
**
** Description This function is called by the user app to acknowledge
-** Port parameters negotiation.
+** Port parameters negotiation.
**
*******************************************************************************/
-void RFCOMM_PortNegRsp (tRFC_MCB *p_mcb, UINT8 dlci, tPORT_STATE *p_pars,
+void RFCOMM_PortNegRsp (tRFC_MCB *p_mcb, UINT8 dlci, tPORT_STATE *p_pars,
UINT16 param_mask)
{
- if (p_mcb->state != RFC_MX_STATE_CONNECTED)
+ if (p_mcb->state != RFC_MX_STATE_CONNECTED)
return;
rfc_send_rpn (p_mcb, dlci, FALSE, p_pars, param_mask);
@@ -233,7 +233,7 @@ void RFCOMM_ControlReq (tRFC_MCB *p_mcb, UINT8 dlci, tPORT_CTRL *p_pars)
{
tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
- if ((p_port->state != PORT_STATE_OPENED)
+ if ((p_port->state != PORT_STATE_OPENED)
|| (p_port->rfc.state != RFC_STATE_OPENED))
return;
@@ -251,7 +251,7 @@ void RFCOMM_ControlReq (tRFC_MCB *p_mcb, UINT8 dlci, tPORT_CTRL *p_pars)
**
** Function RFCOMM_FlowReq
**
-** Description This function is called by the port entity when flow
+** Description This function is called by the port entity when flow
** control state has changed. Enable flag passed shows if
** port can accept more data.
**
@@ -260,14 +260,14 @@ void RFCOMM_FlowReq (tRFC_MCB *p_mcb, UINT8 dlci, UINT8 enable)
{
tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
- if ((p_port->state != PORT_STATE_OPENED)
+ if ((p_port->state != PORT_STATE_OPENED)
|| (p_port->rfc.state != RFC_STATE_OPENED))
return;
p_port->local_ctrl.fc = !enable;
p_port->rfc.expected_rsp |= RFC_RSP_MSC;
-
+
rfc_send_msc (p_mcb, dlci, TRUE, &p_port->local_ctrl);
rfc_port_timer_start (p_port, RFC_T2_TIMEOUT) ;
@@ -286,7 +286,7 @@ void RFCOMM_LineStatusReq (tRFC_MCB *p_mcb, UINT8 dlci, UINT8 status)
{
tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
- if ((p_port->state != PORT_STATE_OPENED)
+ if ((p_port->state != PORT_STATE_OPENED)
|| (p_port->rfc.state != RFC_STATE_OPENED))
return;
@@ -301,7 +301,7 @@ void RFCOMM_LineStatusReq (tRFC_MCB *p_mcb, UINT8 dlci, UINT8 status)
**
** Function RFCOMM_DlcReleaseReq
**
-** Description This function is called by the PORT unit to close DLC
+** Description This function is called by the PORT unit to close DLC
**
*******************************************************************************/
void RFCOMM_DlcReleaseReq (tRFC_MCB *p_mcb, UINT8 dlci)
diff --git a/stack/rfcomm/rfc_ts_frames.c b/stack/rfcomm/rfc_ts_frames.c
index ec5385d..ad9aaef 100644
--- a/stack/rfcomm/rfc_ts_frames.c
+++ b/stack/rfcomm/rfc_ts_frames.c
@@ -168,7 +168,7 @@ void rfc_send_buf_uih (tRFC_MCB *p_mcb, UINT8 dlci, BT_HDR *p_buf)
if (credits)
p_buf->offset--;
-
+
p_data = (UINT8 *)(p_buf + 1) + p_buf->offset;
/* UIH frame, command, PF = 0, dlci */
@@ -316,7 +316,7 @@ void rfc_send_fcoff (tRFC_MCB *p_mcb, BOOLEAN is_command)
** Description This function sends Modem Status Command Frame.
**
*******************************************************************************/
-void rfc_send_msc (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command,
+void rfc_send_msc (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command,
tPORT_CTRL *p_pars)
{
BT_HDR *p_buf;
@@ -343,13 +343,13 @@ void rfc_send_msc (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command,
*p_data++ = RFCOMM_EA | (len << 1);
*p_data++ = RFCOMM_EA | RFCOMM_CR_MASK | (dlci << RFCOMM_SHIFT_DLCI);
- *p_data++ = RFCOMM_EA |
+ *p_data++ = RFCOMM_EA |
((p_pars->fc) ? RFCOMM_MSC_FC : 0) |
((signals & MODEM_SIGNAL_DTRDSR) ? RFCOMM_MSC_RTC : 0) |
((signals & MODEM_SIGNAL_RTSCTS) ? RFCOMM_MSC_RTR : 0) |
((signals & MODEM_SIGNAL_RI) ? RFCOMM_MSC_IC : 0) |
((signals & MODEM_SIGNAL_DCD) ? RFCOMM_MSC_DV : 0);
-
+
if (break_duration)
{
*p_data++ = RFCOMM_EA | RFCOMM_MSC_BREAK_PRESENT_MASK |
@@ -415,8 +415,8 @@ void rfc_send_nsc (tRFC_MCB *p_mcb)
*p_data++ = RFCOMM_EA | RFCOMM_I_CR(FALSE) | RFCOMM_MX_NSC;
*p_data++ = RFCOMM_EA | (RFCOMM_MX_NSC_LEN << 1);
- *p_data++ = rfc_cb.rfc.rx_frame.ea |
- (rfc_cb.rfc.rx_frame.cr << RFCOMM_SHIFT_CR) |
+ *p_data++ = rfc_cb.rfc.rx_frame.ea |
+ (rfc_cb.rfc.rx_frame.cr << RFCOMM_SHIFT_CR) |
rfc_cb.rfc.rx_frame.type;
/* Total length is sizeof NSC data + mx header 2 */
@@ -433,7 +433,7 @@ void rfc_send_nsc (tRFC_MCB *p_mcb)
** Description This function sends Remote Port Negotiation Command
**
*******************************************************************************/
-void rfc_send_rpn (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command,
+void rfc_send_rpn (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command,
tPORT_STATE *p_pars, UINT16 mask)
{
BT_HDR *p_buf;
@@ -605,8 +605,8 @@ UINT8 rfc_parse_data (tRFC_MCB *p_mcb, MX_FRAME *p_frame, BT_HDR *p_buf)
switch (p_frame->type)
{
case RFCOMM_SABME:
- if (RFCOMM_FRAME_IS_RSP(p_mcb->is_initiator, p_frame->cr)
- || !p_frame->pf || len || !RFCOMM_VALID_DLCI (p_frame->dlci)
+ if (RFCOMM_FRAME_IS_RSP(p_mcb->is_initiator, p_frame->cr)
+ || !p_frame->pf || len || !RFCOMM_VALID_DLCI (p_frame->dlci)
|| !rfc_check_fcs (RFCOMM_CTRL_FRAME_LEN, p_start, fcs))
{
RFCOMM_TRACE_ERROR0 ("Bad SABME");
@@ -616,7 +616,7 @@ UINT8 rfc_parse_data (tRFC_MCB *p_mcb, MX_FRAME *p_frame, BT_HDR *p_buf)
return (RFC_EVENT_SABME);
case RFCOMM_UA:
- if (RFCOMM_FRAME_IS_CMD(p_mcb->is_initiator, p_frame->cr)
+ if (RFCOMM_FRAME_IS_CMD(p_mcb->is_initiator, p_frame->cr)
|| !p_frame->pf || len || !RFCOMM_VALID_DLCI (p_frame->dlci)
|| !rfc_check_fcs (RFCOMM_CTRL_FRAME_LEN, p_start, fcs))
{
@@ -627,8 +627,8 @@ UINT8 rfc_parse_data (tRFC_MCB *p_mcb, MX_FRAME *p_frame, BT_HDR *p_buf)
return (RFC_EVENT_UA);
case RFCOMM_DM:
- if (RFCOMM_FRAME_IS_CMD(p_mcb->is_initiator, p_frame->cr)
- || len || !RFCOMM_VALID_DLCI(p_frame->dlci)
+ if (RFCOMM_FRAME_IS_CMD(p_mcb->is_initiator, p_frame->cr)
+ || len || !RFCOMM_VALID_DLCI(p_frame->dlci)
|| !rfc_check_fcs (RFCOMM_CTRL_FRAME_LEN, p_start, fcs))
{
RFCOMM_TRACE_ERROR0 ("Bad DM");
@@ -638,8 +638,8 @@ UINT8 rfc_parse_data (tRFC_MCB *p_mcb, MX_FRAME *p_frame, BT_HDR *p_buf)
return (RFC_EVENT_DM);
case RFCOMM_DISC:
- if (RFCOMM_FRAME_IS_RSP(p_mcb->is_initiator, p_frame->cr)
- || !p_frame->pf || len || !RFCOMM_VALID_DLCI(p_frame->dlci)
+ if (RFCOMM_FRAME_IS_RSP(p_mcb->is_initiator, p_frame->cr)
+ || !p_frame->pf || len || !RFCOMM_VALID_DLCI(p_frame->dlci)
|| !rfc_check_fcs (RFCOMM_CTRL_FRAME_LEN, p_start, fcs))
{
RFCOMM_TRACE_ERROR0 ("Bad DISC");
@@ -649,11 +649,11 @@ UINT8 rfc_parse_data (tRFC_MCB *p_mcb, MX_FRAME *p_frame, BT_HDR *p_buf)
return (RFC_EVENT_DISC);
case RFCOMM_UIH:
- if (!RFCOMM_VALID_DLCI(p_frame->dlci))
+ if (!RFCOMM_VALID_DLCI(p_frame->dlci))
{
RFCOMM_TRACE_ERROR0 ("Bad UIH - invalid DLCI");
return (RFC_EVENT_BAD_FRAME);
- }
+ }
else if (!rfc_check_fcs (2, p_start, fcs))
{
RFCOMM_TRACE_ERROR0 ("Bad UIH - FCS");
@@ -665,7 +665,7 @@ UINT8 rfc_parse_data (tRFC_MCB *p_mcb, MX_FRAME *p_frame, BT_HDR *p_buf)
RFCOMM_TRACE_ERROR0 ("Bad UIH - response");
return (RFC_EVENT_UIH);
}
- else
+ else
return (RFC_EVENT_UIH);
}
@@ -677,7 +677,7 @@ UINT8 rfc_parse_data (tRFC_MCB *p_mcb, MX_FRAME *p_frame, BT_HDR *p_buf)
**
** Function rfc_process_mx_message
**
-** Description This function processes UIH frames received on the
+** Description This function processes UIH frames received on the
** multiplexer control channel.
**
*******************************************************************************/
@@ -708,7 +708,7 @@ void rfc_process_mx_message (tRFC_MCB *p_mcb, BT_HDR *p_buf)
mx_len = *p_data++ >> RFCOMM_SHIFT_LENGTH1;
length--;
-
+
if (!ea)
{
mx_len += *p_data++ << RFCOMM_SHIFT_LENGTH2;
@@ -833,7 +833,7 @@ void rfc_process_mx_message (tRFC_MCB *p_mcb, BT_HDR *p_buf)
if ((length != RFCOMM_MX_RPN_REQ_LEN) && (length != RFCOMM_MX_RPN_LEN))
break;
- ea = *p_data & RFCOMM_EA;
+ ea = *p_data & RFCOMM_EA;
cr = (*p_data & RFCOMM_CR_MASK) >> RFCOMM_SHIFT_CR;
p_rx_frame->dlci = *p_data++ >> RFCOMM_SHIFT_DLCI;
@@ -868,7 +868,7 @@ void rfc_process_mx_message (tRFC_MCB *p_mcb, BT_HDR *p_buf)
if (length != RFCOMM_MX_RLS_LEN)
break;
- ea = *p_data & RFCOMM_EA;
+ ea = *p_data & RFCOMM_EA;
cr = (*p_data & RFCOMM_CR_MASK) >> RFCOMM_SHIFT_CR;
p_rx_frame->dlci = *p_data++ >> RFCOMM_SHIFT_DLCI;
diff --git a/stack/rfcomm/rfc_utils.c b/stack/rfcomm/rfc_utils.c
index e3f194d..9395891 100644
--- a/stack/rfcomm/rfc_utils.c
+++ b/stack/rfcomm/rfc_utils.c
@@ -29,7 +29,7 @@
** Description Reversed CRC Table , 8-bit, poly=0x07
** (GSM 07.10 TS 101 369 V6.3.0)
*******************************************************************************/
-static const UINT8 rfc_crctable[] =
+static const UINT8 rfc_crctable[] =
{
0x00, 0x91, 0xE3, 0x72, 0x07, 0x96, 0xE4, 0x75, 0x0E, 0x9F, 0xED, 0x7C, 0x09, 0x98, 0xEA, 0x7B,
0x1C, 0x8D, 0xFF, 0x6E, 0x1B, 0x8A, 0xF8, 0x69, 0x12, 0x83, 0xF1, 0x60, 0x15, 0x84, 0xF6, 0x67,
@@ -57,7 +57,7 @@ static const UINT8 rfc_crctable[] =
**
** Function rfc_calc_fcs
**
-** Description This function calculate FCS for the RFCOMM frame
+** Description This function calculate FCS for the RFCOMM frame
** (GSM 07.10 TS 101 369 V6.3.0)
**
** Input len - number of bytes in the message
@@ -82,7 +82,7 @@ UINT8 rfc_calc_fcs (UINT16 len, UINT8 *p)
**
** Function rfc_check_fcs
**
-** Description This function checks FCS for the RFCOMM frame
+** Description This function checks FCS for the RFCOMM frame
** (GSM 07.10 TS 101 369 V6.3.0)
**
** Input len - number of bytes in the message
@@ -192,7 +192,7 @@ void rfc_release_multiplexer_channel (tRFC_MCB *p_mcb)
void rfc_timer_start (tRFC_MCB *p_mcb, UINT16 timeout)
{
TIMER_LIST_ENT *p_tle = &p_mcb->tle;
-
+
RFCOMM_TRACE_EVENT1 ("rfc_timer_start - timeout:%d", timeout);
p_tle->param = (UINT32)p_mcb;
@@ -205,7 +205,7 @@ void rfc_timer_start (tRFC_MCB *p_mcb, UINT16 timeout)
**
** Function rfc_timer_stop
**
-** Description Stop RFC Timer
+** Description Stop RFC Timer
**
*******************************************************************************/
void rfc_timer_stop (tRFC_MCB *p_mcb)
@@ -239,7 +239,7 @@ void rfc_port_timer_start (tPORT *p_port, UINT16 timeout)
**
** Function rfc_port_timer_stop
**
-** Description Stop RFC Timer
+** Description Stop RFC Timer
**
*******************************************************************************/
void rfc_port_timer_stop (tPORT *p_port)
@@ -315,8 +315,8 @@ void rfcomm_process_timeout (TIMER_LIST_ENT *p_tle)
**
** Function rfc_sec_check_complete
**
-** Description The function called when Security Manager finishes
-** verification of the service side connection
+** Description The function called when Security Manager finishes
+** verification of the service side connection
**
** Returns void
**
@@ -326,7 +326,7 @@ void rfc_sec_check_complete (BD_ADDR bd_addr, void *p_ref_data, UINT8 res)
tPORT *p_port = (tPORT *)p_ref_data;
/* Verify that PORT is still waiting for Security to complete */
- if (!p_port->in_use
+ if (!p_port->in_use
|| ((p_port->rfc.state != RFC_STATE_ORIG_WAIT_SEC_CHECK)
&& (p_port->rfc.state != RFC_STATE_TERM_WAIT_SEC_CHECK)))
return;
@@ -340,18 +340,18 @@ void rfc_sec_check_complete (BD_ADDR bd_addr, void *p_ref_data, UINT8 res)
** Function rfc_port_closed
**
** Description The function is called when port is released based on the
-** event received from the lower layer, typically L2CAP
+** event received from the lower layer, typically L2CAP
** connection down, DISC, or DM frame.
**
** Returns void
**
*******************************************************************************/
void rfc_port_closed (tPORT *p_port)
-{
+{
tRFC_MCB *p_mcb = p_port->rfc.p_mcb;
RFCOMM_TRACE_DEBUG0 ("rfc_port_closed");
-
+
rfc_port_timer_stop (p_port);
p_port->rfc.state = RFC_STATE_CLOSED;
@@ -385,7 +385,7 @@ void rfc_inc_credit (tPORT *p_port, UINT8 credit)
if (p_port->rfc.p_mcb->flow == PORT_FC_CREDIT)
{
p_port->credit_tx += credit;
-
+
RFCOMM_TRACE_EVENT1 ("rfc_inc_credit:%d", p_port->credit_tx);
if (p_port->tx.peer_fc == TRUE)
@@ -410,7 +410,7 @@ void rfc_dec_credit (tPORT *p_port)
{
if (p_port->credit_tx > 0)
p_port->credit_tx--;
-
+
if (p_port->credit_tx == 0)
p_port->tx.peer_fc = TRUE;
}
diff --git a/stack/sdp/sdp_api.c b/stack/sdp/sdp_api.c
index ef662f6..ef662f6 100644..100755
--- a/stack/sdp/sdp_api.c
+++ b/stack/sdp/sdp_api.c
diff --git a/stack/sdp/sdp_db.c b/stack/sdp/sdp_db.c
index e52e69c..e9a35fc 100644
--- a/stack/sdp/sdp_db.c
+++ b/stack/sdp/sdp_db.c
@@ -212,7 +212,7 @@ static int sdp_compose_proto_list( UINT8 *p, UINT16 num_elem,
/* First, build the protocol list. This consists of a set of data element
** sequences, one for each layer. Each layer sequence consists of layer's
- ** UUID and optional parameters
+ ** UUID and optional parameters
*/
for (xx = 0; xx < num_elem; xx++, p_elem_list++)
{
diff --git a/stack/sdp/sdp_discovery.c b/stack/sdp/sdp_discovery.c
index 30ea277..1092584 100644
--- a/stack/sdp/sdp_discovery.c
+++ b/stack/sdp/sdp_discovery.c
@@ -372,7 +372,7 @@ static void sdp_copy_raw_data (tCONN_CB *p_ccb, UINT16 len, BOOLEAN offset)
UINT8 * p_temp;
UINT8 type;
UINT32 delta_len = 0;
-
+
#if (SDP_DEBUG_RAW == TRUE)
UINT8 num_array[SDP_MAX_LIST_BYTE_COUNT];
UINT32 i;
@@ -395,7 +395,7 @@ static void sdp_copy_raw_data (tCONN_CB *p_ccb, UINT16 len, BOOLEAN offset)
type = *p++;
p = sdpu_get_len_from_type (p, type, &list_len);
}
- if(list_len && list_len < cpy_len )
+ if(list_len && list_len < cpy_len )
{
cpy_len = list_len;
}
@@ -1003,7 +1003,7 @@ static UINT8 *add_attr (UINT8 *p, tSDP_DISCOVERY_DB *p_db, tSDP_DISC_REC *p_rec,
else
{
/* coverity[overrun-local] */
- /*
+ /*
Event overrun-local: Overrun of static array "p_attr->attr_value.v.array" of size 4 at position 15 with index variable "ijk"
False-positive: SDP uses scratch buffer to hold the attribute value.
The actual size of tSDP_DISC_ATVAL does not matter.
diff --git a/stack/sdp/sdp_server.c b/stack/sdp/sdp_server.c
index 463ec7e..3640dc2 100644
--- a/stack/sdp/sdp_server.c
+++ b/stack/sdp/sdp_server.c
@@ -217,7 +217,7 @@ static void process_service_search (tCONN_CB *p_ccb, UINT16 trans_num,
/* Calculate how many handles will fit in one PDU */
cur_handles = (UINT16)((p_ccb->rem_mtu_size - SDP_MAX_SERVICE_RSPHDR_LEN) / 4);
-
+
if (rem_handles <= cur_handles)
cur_handles = rem_handles;
else /* Continuation is set */
@@ -405,7 +405,7 @@ static void process_service_attr_req (tCONN_CB *p_ccb, UINT16 trans_num,
/* if there is a partial attribute pending to be sent */
if (p_ccb->cont_info.attr_offset)
{
- p_rsp = sdpu_build_partial_attrib_entry (p_rsp, p_attr, rem_len,
+ p_rsp = sdpu_build_partial_attrib_entry (p_rsp, p_attr, rem_len,
&p_ccb->cont_info.attr_offset);
/* If the partial attrib could not been fully added yet */
diff --git a/stack/sdp/sdp_utils.c b/stack/sdp/sdp_utils.c
index bba3e60..d98a30c 100644
--- a/stack/sdp/sdp_utils.c
+++ b/stack/sdp/sdp_utils.c
@@ -256,7 +256,7 @@ UINT8 *sdpu_build_attrib_entry (UINT8 *p_out, tSDP_ATTRIBUTE *p_attr)
return (p_out);
}
-
+
/* Now, store the attribute value */
switch (p_attr->len)
{
@@ -347,7 +347,7 @@ void sdpu_build_n_send_error (tCONN_CB *p_ccb, UINT16 trans_num, UINT16 error_co
** Function sdpu_extract_uid_seq
**
** Description This function extracts a UUID sequence from the passed input
-** buffer, and puts it into the passed output list.
+** buffer, and puts it into the passed output list.
**
** Returns Pointer to next byte in the input buffer after the sequence.
**
@@ -461,7 +461,7 @@ UINT8 *sdpu_extract_uid_seq (UINT8 *p, UINT16 param_len, tSDP_UUID_SEQ *p_seq)
** Function sdpu_extract_attr_seq
**
** Description This function extracts an attribute sequence from the passed
-** input buffer, and puts it into the passed output list.
+** input buffer, and puts it into the passed output list.
**
** Returns Pointer to next byte in the input buffer after the sequence.
**
@@ -772,7 +772,7 @@ BOOLEAN sdpu_compare_uuid_with_attr (tBT_UUID *p_btuuid, tSDP_DISC_ATTR *p_attr)
Event overrun-buffer-arg: Overrun of static array "&p_attr->attr_value.v.array" of size 4 bytes by passing it to a function which indexes it with argument "16U" at byte position 15
FALSE-POSITIVE error from Coverity test tool. Please do NOT remove following comment.
False-positive: SDP uses scratch buffer to hold the attribute value.
- The actual size of tSDP_DISC_ATVAL does not matter.
+ The actual size of tSDP_DISC_ATVAL does not matter.
If the array size in tSDP_DISC_ATVAL is increase, we would increase the system RAM usage unnecessarily
*/
else if (!memcmp (p_btuuid->uu.uuid128, p_attr->attr_value.v.array, MAX_UUID_SIZE))
@@ -820,7 +820,7 @@ void sdpu_sort_attr_list( UINT16 num_attr, tSDP_DISCOVERY_DB *p_db )
}
else
i++;
- }
+ }
}
@@ -946,7 +946,7 @@ UINT16 sdpu_get_attrib_entry_len(tSDP_ATTRIBUTE *p_attr)
len += p_attr->len;
return len;
}
-
+
/* Now, the attribute value */
switch (p_attr->len)
{
@@ -1010,7 +1010,7 @@ UINT8 *sdpu_build_partial_attrib_entry (UINT8 *p_out, tSDP_ATTRIBUTE *p_attr, UI
** Description This function converts UUID-16 to UUID-128 by including the base UUID
**
** uuid16: 2-byte UUID
-** p_uuid128: Expanded 128-bit UUID
+** p_uuid128: Expanded 128-bit UUID
**
** Returns None
**
diff --git a/stack/smp/aes.c b/stack/smp/aes.c
index 1028d5b..5b3fefa 100644
--- a/stack/smp/aes.c
+++ b/stack/smp/aes.c
@@ -231,7 +231,7 @@ static uint_8t hibit(const uint_8t x)
static uint_8t gf_inv(const uint_8t x)
{ uint_8t p1 = x, p2 = BPOLY, n1 = hibit(x), n2 = 0x80, v1 = 1, v2 = 0;
- if(x < 2)
+ if(x < 2)
return x;
for( ; ; )
@@ -239,20 +239,20 @@ static uint_8t gf_inv(const uint_8t x)
if(n1)
while(n2 >= n1) /* divide polynomial p2 by p1 */
{
- n2 /= n1; /* shift smaller polynomial left */
+ n2 /= n1; /* shift smaller polynomial left */
p2 ^= (p1 * n2) & 0xff; /* and remove from larger one */
- v2 ^= (v1 * n2); /* shift accumulated value and */
+ v2 ^= (v1 * n2); /* shift accumulated value and */
n2 = hibit(p2); /* add into result */
}
else
return v1;
- if(n2) /* repeat with values swapped */
+ if(n2) /* repeat with values swapped */
while(n1 >= n2)
{
- n1 /= n2;
- p1 ^= p2 * n1;
- v1 ^= v2 * n1;
+ n1 /= n2;
+ p1 ^= p2 * n1;
+ v1 ^= v2 * n1;
n1 = hibit(p1);
}
else
@@ -262,13 +262,13 @@ static uint_8t gf_inv(const uint_8t x)
/* The forward and inverse affine transformations used in the S-box */
uint_8t fwd_affine(const uint_8t x)
-{
+{
#if defined( HAVE_UINT_32T )
uint_32t w = x;
w ^= (w << 1) ^ (w << 2) ^ (w << 3) ^ (w << 4);
return 0x63 ^ ((w ^ (w >> 8)) & 0xff);
#else
- return 0x63 ^ x ^ (x << 1) ^ (x << 2) ^ (x << 3) ^ (x << 4)
+ return 0x63 ^ x ^ (x << 1) ^ (x << 2) ^ (x << 3) ^ (x << 4)
^ (x >> 7) ^ (x >> 6) ^ (x >> 5) ^ (x >> 4);
#endif
}
@@ -280,7 +280,7 @@ uint_8t inv_affine(const uint_8t x)
w = (w << 1) ^ (w << 3) ^ (w << 6);
return 0x05 ^ ((w ^ (w >> 8)) & 0xff);
#else
- return 0x05 ^ (x << 1) ^ (x << 3) ^ (x << 6)
+ return 0x05 ^ (x << 1) ^ (x << 3) ^ (x << 6)
^ (x >> 7) ^ (x >> 5) ^ (x >> 2);
#endif
}
@@ -502,19 +502,19 @@ return_type aes_set_key( const unsigned char key[], length_type keylen, aes_cont
switch( keylen )
{
case 16:
- case 128:
- keylen = 16;
+ case 128:
+ keylen = 16;
break;
case 24:
- case 192:
- keylen = 24;
+ case 192:
+ keylen = 24;
break;
case 32:
- case 256:
- keylen = 32;
+ case 256:
+ keylen = 32;
break;
- default:
- ctx->rnd = 0;
+ default:
+ ctx->rnd = 0;
return (return_type)-1;
}
block_copy_nn(ctx->ksch, key, keylen);
@@ -640,10 +640,10 @@ return_type aes_decrypt( const unsigned char in[N_BLOCK], unsigned char out[N_BL
return_type aes_cbc_decrypt( const unsigned char *in, unsigned char *out,
int n_block, unsigned char iv[N_BLOCK], const aes_context ctx[1] )
-{
+{
while(n_block--)
{ uint_8t tmp[N_BLOCK];
-
+
memcpy(tmp, in, N_BLOCK);
if(aes_decrypt(in, out, ctx) != EXIT_SUCCESS)
return EXIT_FAILURE;
diff --git a/stack/smp/smp_act.c b/stack/smp/smp_act.c
index 0948153..af4bd2e 100644
--- a/stack/smp/smp_act.c
+++ b/stack/smp/smp_act.c
@@ -36,7 +36,7 @@ const UINT8 smp_association_table[2][SMP_IO_CAP_MAX][SMP_IO_CAP_MAX] =
/* display only */ /*SMP_CAP_IO = 1 */ /* keyboard only */ /* No InputOutput */ /* keyboard display */
};
-const tSMP_ACT smp_distribute_act [] =
+const tSMP_ACT smp_distribute_act [] =
{
smp_generate_ltk,
smp_send_id_info,
@@ -84,7 +84,7 @@ void smp_send_app_cback(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
cb_data.io_req.auth_req = p_cb->peer_auth_req;
cb_data.io_req.oob_data = SMP_OOB_NONE;
cb_data.io_req.io_cap = SMP_DEFAULT_IO_CAPS;
- cb_data.io_req.max_key_size = SMP_MAX_ENC_KEY_SIZE;
+ cb_data.io_req.max_key_size = SMP_MAX_ENC_KEY_SIZE;
cb_data.io_req.init_keys = p_cb->loc_i_key ;
cb_data.io_req.resp_keys = p_cb->loc_r_key ;
@@ -118,7 +118,7 @@ void smp_send_app_cback(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
}
/*******************************************************************************
** Function smp_send_pair_fail
-** Description pairing failure to peer device if needed.
+** Description pairing failure to peer device if needed.
*******************************************************************************/
void smp_send_pair_fail(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
@@ -145,7 +145,7 @@ void smp_send_pair_req(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
/* erase all keys when master sends pairing req*/
if (p_dev_rec)
btm_sec_clear_ble_keys(p_dev_rec);
- /* do not manipulate the key, let app decide,
+ /* do not manipulate the key, let app decide,
leave out to BTM to mandate key distribution for bonding case */
smp_send_cmd(SMP_OPCODE_PAIRING_REQ, p_cb);
}
@@ -191,7 +191,7 @@ void smp_send_init(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
}
#endif
- smp_send_cmd(SMP_OPCODE_INIT, p_cb);
+ smp_send_cmd(SMP_OPCODE_INIT, p_cb);
}
/*******************************************************************************
** Function smp_send_enc_info
@@ -204,8 +204,8 @@ void smp_send_enc_info(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
SMP_TRACE_DEBUG1 ("smp_send_enc_info p_cb->loc_enc_size = %d", p_cb->loc_enc_size);
smp_update_key_mask (p_cb, SMP_SEC_KEY_TYPE_ENC, FALSE);
- smp_send_cmd(SMP_OPCODE_ENCRYPT_INFO, p_cb);
- smp_send_cmd(SMP_OPCODE_MASTER_ID, p_cb);
+ smp_send_cmd(SMP_OPCODE_ENCRYPT_INFO, p_cb);
+ smp_send_cmd(SMP_OPCODE_MASTER_ID, p_cb);
/* save the DIV and key size information when acting as slave device */
le_key.div = p_cb->div;
@@ -226,8 +226,8 @@ void smp_send_id_info(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
SMP_TRACE_DEBUG0 ("smp_send_id_info ");
smp_update_key_mask (p_cb, SMP_SEC_KEY_TYPE_ID, FALSE);
- smp_send_cmd(SMP_OPCODE_IDENTITY_INFO, p_cb);
- smp_send_cmd(SMP_OPCODE_ID_ADDR, p_cb);
+ smp_send_cmd(SMP_OPCODE_IDENTITY_INFO, p_cb);
+ smp_send_cmd(SMP_OPCODE_ID_ADDR, p_cb);
SMP_TRACE_WARNING0( "smp_send_id_info");
@@ -377,7 +377,7 @@ void smp_proc_pair_cmd(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
if (p_cb->peer_enc_size < SMP_MIN_ENC_KEY_SIZE)
{
smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &reason);
- }
+ }
else if (p_cb->role == HCI_ROLE_SLAVE)
{
if (!(p_cb->flags & SMP_PAIR_FLAGS_WE_STARTED_DD))
@@ -410,7 +410,7 @@ void smp_proc_confirm(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
}
p_cb->flags |= SMP_PAIR_FLAGS_CMD_CONFIRM;
-}
+}
/*******************************************************************************
** Function smp_proc_init
@@ -536,14 +536,14 @@ void smp_proc_compare(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
p_cb->loc_i_key = p_cb->peer_i_key;
p_cb->loc_r_key = p_cb->peer_r_key;
- smp_sm_event(p_cb, SMP_ENC_REQ_EVT, NULL);
+ smp_sm_event(p_cb, SMP_ENC_REQ_EVT, NULL);
}
}
else
{
reason = p_cb->failure = SMP_CONFIRM_VALUE_ERR;
- smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &reason);
+ smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &reason);
}
}
/*******************************************************************************
@@ -581,7 +581,7 @@ void smp_start_enc(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
if (p_data != NULL)
cmd = btm_ble_start_encrypt(p_cb->pairing_bda, TRUE, p_data->key.p_data);
else
- cmd = btm_ble_start_encrypt(p_cb->pairing_bda, FALSE, NULL);
+ cmd = btm_ble_start_encrypt(p_cb->pairing_bda, FALSE, NULL);
if (!cmd)
smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &reason);
@@ -644,7 +644,7 @@ void smp_check_auth_req(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
UINT8 enc_enable = *(UINT8 *)p_data;
UINT8 reason = enc_enable ? SMP_SUCCESS : SMP_ENC_FAIL;
- SMP_TRACE_DEBUG3 ("smp_check_auth_req enc_enable=%d i_keys=0x%x r_keys=0x%x (i-initiator r-responder)",
+ SMP_TRACE_DEBUG3 ("smp_check_auth_req enc_enable=%d i_keys=0x%x r_keys=0x%x (i-initiator r-responder)",
enc_enable, p_cb->loc_i_key, p_cb->loc_r_key);
if (enc_enable == 1)
{
@@ -701,7 +701,7 @@ void smp_key_pick_key(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
void smp_key_distribution(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
UINT8 reason = SMP_SUCCESS;
- SMP_TRACE_DEBUG3 ("smp_key_distribution role=%d (0-master) r_keys=0x%x i_keys=0x%x",
+ SMP_TRACE_DEBUG3 ("smp_key_distribution role=%d (0-master) r_keys=0x%x i_keys=0x%x",
p_cb->role, p_cb->loc_r_key, p_cb->loc_i_key);
if (p_cb->role == HCI_ROLE_SLAVE||
@@ -720,7 +720,7 @@ void smp_key_distribution(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
/*******************************************************************************
** Function smp_decide_asso_model
** Description This function is called to compare both sides' io capability
-** oob data flag and authentication request, and decide the
+** oob data flag and authentication request, and decide the
** association model to use for the authentication.
*******************************************************************************/
void smp_decide_asso_model(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
@@ -728,11 +728,11 @@ void smp_decide_asso_model(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
UINT8 failure = SMP_UNKNOWN_IO_CAP;
tSMP_ASSO_MODEL model = SMP_MODEL_MAX;
UINT8 int_evt = 0;
- tSMP_KEY key;
- tSMP_INT_DATA *p;
+ tSMP_KEY key;
+ tSMP_INT_DATA *p;
SMP_TRACE_DEBUG3 ("smp_decide_asso_model p_cb->peer_io_caps = %d p_cb->loc_io_caps = %d \
- p_cb->peer_auth_req = %02x",
+ p_cb->peer_auth_req = %02x",
p_cb->peer_io_caps, p_cb->loc_io_caps, p_cb->peer_auth_req);
/* OOB data present on both devices, use OOB association model */
@@ -741,7 +741,7 @@ void smp_decide_asso_model(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
model = SMP_MODEL_OOB;
}
/* no MITM required, ignore IO cap, use encryption only */
- else if (SMP_NO_MITM_REQUIRED (p_cb->peer_auth_req) &&
+ else if (SMP_NO_MITM_REQUIRED (p_cb->peer_auth_req) &&
SMP_NO_MITM_REQUIRED(p_cb->loc_auth_req))
{
model = SMP_MODEL_ENC_ONLY;
@@ -787,7 +787,7 @@ void smp_decide_asso_model(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
else if (model == SMP_MODEL_ENC_ONLY) /* TK = 0, go calculate Confirm */
{
if (p_cb->role == HCI_ROLE_MASTER &&
- ((p_cb->peer_auth_req & SMP_AUTH_YN_BIT) != 0) &&
+ ((p_cb->peer_auth_req & SMP_AUTH_YN_BIT) != 0) &&
((p_cb->loc_auth_req & SMP_AUTH_YN_BIT) == 0))
{
SMP_TRACE_ERROR0("IO capability does not meet authentication requirement");
@@ -804,7 +804,7 @@ void smp_decide_asso_model(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
key.p_data = p_cb->tk;
p = (tSMP_INT_DATA *)&key;
- memset(p_cb->tk, 0, BT_OCTET16_LEN);
+ memset(p_cb->tk, 0, BT_OCTET16_LEN);
/* TK, ready */
int_evt = SMP_KEY_READY_EVT;
}
@@ -840,7 +840,7 @@ void smp_proc_io_rsp(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
}
/*******************************************************************************
** Function smp_pairing_cmpl
-** Description This function is called to send the pairing complete callback
+** Description This function is called to send the pairing complete callback
** and remove the connection if needed.
*******************************************************************************/
void smp_pairing_cmpl(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
@@ -848,7 +848,7 @@ void smp_pairing_cmpl(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
SMP_TRACE_DEBUG0 ("smp_pairing_cmpl ");
- if ((p_cb->status == SMP_SUCCESS) ||
+ if ((p_cb->status == SMP_SUCCESS) ||
(p_cb->status <= SMP_REPEATED_ATTEMPTS && p_cb->status != SMP_SUCCESS))
{
smp_sm_event(p_cb, SMP_RELEASE_DELAY_EVT, p_data);
@@ -862,7 +862,7 @@ void smp_pairing_cmpl(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
}
/*******************************************************************************
** Function smp_pair_terminate
-** Description This function is called to send the pairing complete callback
+** Description This function is called to send the pairing complete callback
** and remove the connection if needed.
*******************************************************************************/
void smp_pair_terminate(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
@@ -892,8 +892,8 @@ void smp_idle_terminate(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
** Description This function is called when link is encrypted and notified to
** slave device. Proceed to to send LTK, DIV and ER to master if
** bonding the devices.
-**
-**
+**
+**
** Returns void
**
*******************************************************************************/
@@ -913,26 +913,26 @@ void smp_link_encrypted(BD_ADDR bda, UINT8 encr_enable)
btm_ble_update_sec_key_size(bda, p_cb->loc_enc_size);
}
- smp_sm_event(&smp_cb, SMP_ENCRYPTED_EVT, &encr_enable);
+ smp_sm_event(&smp_cb, SMP_ENCRYPTED_EVT, &encr_enable);
}
}
/*******************************************************************************
**
** Function smp_proc_ltk_request
**
-** Description This function is called when LTK request is received from
+** Description This function is called when LTK request is received from
** controller.
-**
+**
** Returns void
**
*******************************************************************************/
BOOLEAN smp_proc_ltk_request(BD_ADDR bda)
{
SMP_TRACE_DEBUG1 ("smp_proc_ltk_request state = %d", smp_cb.state);
- if ( smp_cb.state == SMP_ST_ENC_PENDING &&
+ if ( smp_cb.state == SMP_ST_ENC_PENDING &&
!memcmp(bda, smp_cb.pairing_bda, BD_ADDR_LEN))
{
- smp_sm_event(&smp_cb, SMP_ENC_REQ_EVT, NULL);
+ smp_sm_event(&smp_cb, SMP_ENC_REQ_EVT, NULL);
return TRUE;
}
diff --git a/stack/smp/smp_api.c b/stack/smp/smp_api.c
index 753e65e..e0c37e0 100644
--- a/stack/smp/smp_api.c
+++ b/stack/smp/smp_api.c
@@ -44,7 +44,7 @@ void SMP_Init(void)
smp_cb.trace_level = BT_TRACE_LEVEL_NONE; /* No traces */
#endif
- smp_l2cap_if_init();
+ smp_l2cap_if_init();
}
@@ -104,7 +104,7 @@ BOOLEAN SMP_Register (tSMP_CALLBACK *p_cback)
**
** Function SMP_Pair
**
-** Description This function call to perform a SMP pairing with peer device.
+** Description This function call to perform a SMP pairing with peer device.
** Device support one SMP pairing at one time.
**
** Parameters bd_addr - peer device bd address.
@@ -127,7 +127,7 @@ tSMP_STATUS SMP_Pair (BD_ADDR bd_addr)
{
p_cb->flags = SMP_PAIR_FLAGS_WE_STARTED_DD;
- memcpy (p_cb->pairing_bda, bd_addr, BD_ADDR_LEN);
+ memcpy (p_cb->pairing_bda, bd_addr, BD_ADDR_LEN);
if (!L2CA_ConnectFixedChnl (L2CAP_SMP_CID, bd_addr))
{
@@ -145,7 +145,7 @@ tSMP_STATUS SMP_Pair (BD_ADDR bd_addr)
**
** Function SMP_PairCancel
**
-** Description This function call to cancel a SMP pairing with peer device.
+** Description This function call to cancel a SMP pairing with peer device.
**
** Parameters bd_addr - peer device bd address.
**
@@ -159,7 +159,7 @@ BOOLEAN SMP_PairCancel (BD_ADDR bd_addr)
BOOLEAN status = FALSE;
BTM_TRACE_EVENT2 ("SMP_CancelPair state=%d flag=0x%x ", p_cb->state, p_cb->flags);
- if ( (p_cb->state != SMP_ST_IDLE) &&
+ if ( (p_cb->state != SMP_ST_IDLE) &&
(!memcmp (p_cb->pairing_bda, bd_addr, BD_ADDR_LEN)) )
{
p_cb->is_pair_cancel = TRUE;
@@ -177,8 +177,8 @@ BOOLEAN SMP_PairCancel (BD_ADDR bd_addr)
** Description This function is called to grant security process.
**
** Parameters bd_addr - peer device bd address.
-** res - result of the operation SMP_SUCCESS if success.
-** Otherwise, SMP_REPEATED_ATTEMPTS is too many attempts.
+** res - result of the operation SMP_SUCCESS if success.
+** Otherwise, SMP_REPEATED_ATTEMPTS is too many attempts.
**
** Returns None
**
@@ -191,7 +191,7 @@ void SMP_SecurityGrant(BD_ADDR bd_addr, UINT8 res)
memcmp (smp_cb.pairing_bda, bd_addr, BD_ADDR_LEN))
return;
- smp_sm_event(&smp_cb, SMP_API_SEC_GRANT_EVT, &res);
+ smp_sm_event(&smp_cb, SMP_API_SEC_GRANT_EVT, &res);
}
/*******************************************************************************
@@ -202,7 +202,7 @@ void SMP_SecurityGrant(BD_ADDR bd_addr, UINT8 res)
** passkey request to the application.
**
** Parameters: bd_addr - Address of the device for which passkey was requested
-** res - result of the operation SMP_SUCCESS if success
+** res - result of the operation SMP_SUCCESS if success
** passkey - numeric value in the range of
** BTM_MIN_PASSKEY_VAL(0) - BTM_MAX_PASSKEY_VAL(999999(0xF423F)).
**
@@ -259,7 +259,7 @@ void SMP_PasskeyReply (BD_ADDR bd_addr, UINT8 res, UINT32 passkey)
** SMP in response to SMP_OOB_REQ_EVT
**
** Parameters: bd_addr - Address of the peer device
-** res - result of the operation SMP_SUCCESS if success
+** res - result of the operation SMP_SUCCESS if success
** p_data - simple pairing Randomizer C.
**
*******************************************************************************/
@@ -300,18 +300,18 @@ void SMP_OobDataReply(BD_ADDR bd_addr, tSMP_STATUS res, UINT8 len, UINT8 *p_data
**
** Description This function is called to encrypt the data with the specified
** key
-**
+**
** Parameters: key - Pointer to key key[0] conatins the MSB
** key_len - key length
** plain_text - Pointer to data to be encrypted
** plain_text[0] conatins the MSB
** pt_len - plain text length
** p_out - output of the encrypted texts
-**
-** Returns Boolean - request is successful
+**
+** Returns Boolean - request is successful
*******************************************************************************/
-BOOLEAN SMP_Encrypt (UINT8 *key, UINT8 key_len,
- UINT8 *plain_text, UINT8 pt_len,
+BOOLEAN SMP_Encrypt (UINT8 *key, UINT8 key_len,
+ UINT8 *plain_text, UINT8 pt_len,
tSMP_ENC *p_out)
{
diff --git a/stack/smp/smp_cmac.c b/stack/smp/smp_cmac.c
index d31930b..d72c3b5 100644
--- a/stack/smp/smp_cmac.c
+++ b/stack/smp/smp_cmac.c
@@ -26,7 +26,7 @@ typedef struct
UINT16 len;
UINT16 round;
}tCMAC_CB;
-
+
tCMAC_CB cmac_cb;
/* Rb for AES-128 as block cipher, LSB as [0] */
@@ -45,8 +45,8 @@ void print128(BT_OCTET16 x, const UINT8 *key_name)
for (i = 0; i < 4; i ++)
{
- SMP_TRACE_WARNING4("%02x %02x %02x %02x",
- p[BT_OCTET16_LEN - i*4 -1], p[BT_OCTET16_LEN - i*4 -2],
+ SMP_TRACE_WARNING4("%02x %02x %02x %02x",
+ p[BT_OCTET16_LEN - i*4 -1], p[BT_OCTET16_LEN - i*4 -2],
p[BT_OCTET16_LEN - i*4 -3], p[BT_OCTET16_LEN - i*4 -4]);
}
#endif
@@ -56,11 +56,11 @@ void print128(BT_OCTET16 x, const UINT8 *key_name)
**
** Function padding
**
-** Description utility function to padding the given text to be a 128 bits
+** Description utility function to padding the given text to be a 128 bits
** data. The parameter dest is input and output parameter, it
** must point to a BT_OCTET16_LEN memory space; where include
** length bytes valid data.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -76,7 +76,7 @@ static void padding ( BT_OCTET16 dest, UINT8 length )
** Function leftshift_onebit
**
** Description utility function to left shift one bit for a 128 bits value.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -98,12 +98,12 @@ static void leftshift_onebit(UINT8 *input, UINT8 *output)
** Function cmac_aes_cleanup
**
** Description clean up function for AES_CMAC algorithm.
-**
+**
** Returns void
**
*******************************************************************************/
static void cmac_aes_cleanup(void)
-{
+{
if (cmac_cb.text != NULL)
{
GKI_freebuf(cmac_cb.text);
@@ -116,7 +116,7 @@ static void cmac_aes_cleanup(void)
** Function cmac_aes_k_calculate
**
** Description This function is the calculation of block cipher using AES-128.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -138,7 +138,7 @@ static BOOLEAN cmac_aes_k_calculate(BT_OCTET16 key, UINT8 *p_signature, UINT16 t
err = 1;
break;
}
-
+
memcpy(x, output.param_buf, BT_OCTET16_LEN);
i ++;
}
@@ -149,9 +149,9 @@ static BOOLEAN cmac_aes_k_calculate(BT_OCTET16 key, UINT8 *p_signature, UINT16 t
memcpy(p_signature, p_mac, tlen);
SMP_TRACE_DEBUG2("tlen = %d p_mac = %d", tlen, p_mac);
- SMP_TRACE_DEBUG4("p_mac[0] = 0x%02x p_mac[1] = 0x%02x p_mac[2] = 0x%02x p_mac[3] = 0x%02x",
+ SMP_TRACE_DEBUG4("p_mac[0] = 0x%02x p_mac[1] = 0x%02x p_mac[2] = 0x%02x p_mac[3] = 0x%02x",
*p_mac, *(p_mac + 1), *(p_mac + 2), *(p_mac + 3));
- SMP_TRACE_DEBUG4("p_mac[4] = 0x%02x p_mac[5] = 0x%02x p_mac[6] = 0x%02x p_mac[7] = 0x%02x",
+ SMP_TRACE_DEBUG4("p_mac[4] = 0x%02x p_mac[5] = 0x%02x p_mac[6] = 0x%02x p_mac[7] = 0x%02x",
*(p_mac + 4), *(p_mac + 5), *(p_mac + 6), *(p_mac + 7));
return TRUE;
@@ -166,7 +166,7 @@ static BOOLEAN cmac_aes_k_calculate(BT_OCTET16 key, UINT8 *p_signature, UINT16 t
**
** Description This function proceeed to prepare the last block of message
** Mn depending on the size of the message.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -197,7 +197,7 @@ static void cmac_prepare_last_block (BT_OCTET16 k1, BT_OCTET16 k2)
** Function cmac_subkey_cont
**
** Description This is the callback function when CIPHk(0[128]) is completed.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -242,9 +242,9 @@ static void cmac_subkey_cont(tSMP_ENC *p)
** Function cmac_generate_subkey
**
** Description This is the function to generate the two subkeys.
-**
+**
** Parameters key - CMAC key, expect SRK when used by SMP.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -269,13 +269,13 @@ static BOOLEAN cmac_generate_subkey(BT_OCTET16 key)
** Function AES_CMAC
**
** Description This is the AES-CMAC Generation Function with tlen implemented.
-**
+**
** Parameters key - CMAC key in little endian order, expect SRK when used by SMP.
** input - text to be signed in little endian byte order.
** length - length of the input in byte.
** tlen - lenth of mac desired
** p_signature - data pointer to where signed data to be stored, tlen long.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -288,7 +288,7 @@ BOOLEAN AES_CMAC ( BT_OCTET16 key, UINT8 *input, UINT16 length,
SMP_TRACE_EVENT0 ("AES_CMAC ");
- if (n == 0) n = 1;
+ if (n == 0) n = 1;
len = n * BT_OCTET16_LEN;
SMP_TRACE_WARNING1("AES128_CMAC started, allocate buffer size = %d", len);
@@ -314,7 +314,7 @@ BOOLEAN AES_CMAC ( BT_OCTET16 key, UINT8 *input, UINT16 length,
/* start calculation */
ret = cmac_aes_k_calculate(key, p_signature, tlen);
}
- /* clean up */
+ /* clean up */
cmac_aes_cleanup();
}
else
@@ -322,7 +322,7 @@ BOOLEAN AES_CMAC ( BT_OCTET16 key, UINT8 *input, UINT16 length,
ret = FALSE;
SMP_TRACE_ERROR0("No resources");
}
-
+
return ret;
}
diff --git a/stack/smp/smp_int.h b/stack/smp/smp_int.h
index d9042d2..4ca9563 100644
--- a/stack/smp/smp_int.h
+++ b/stack/smp/smp_int.h
@@ -55,7 +55,7 @@ typedef UINT8 tSMP_ASSO_MODEL;
#define SMP_SIGN_INFO_EVT SMP_OPCODE_SIGN_INFO
#define SMP_SECURITY_REQ_EVT SMP_OPCODE_SEC_REQ
-#define SMP_SELF_DEF_EVT SMP_SECURITY_REQ_EVT
+#define SMP_SELF_DEF_EVT SMP_SECURITY_REQ_EVT
#define SMP_KEY_READY_EVT (SMP_SELF_DEF_EVT + 1)
#define SMP_ENCRYPTED_EVT (SMP_SELF_DEF_EVT + 2)
#define SMP_L2CAP_CONN_EVT (SMP_SELF_DEF_EVT + 3)
@@ -81,7 +81,7 @@ enum
SMP_ST_IDLE,
SMP_ST_WAIT_APP_RSP,
SMP_ST_SEC_REQ_PENDING,
- SMP_ST_PAIR_REQ_RSP,
+ SMP_ST_PAIR_REQ_RSP,
SMP_ST_WAIT_CONFIRM,
SMP_ST_CONFIRM,
SMP_ST_RAND,
@@ -128,8 +128,8 @@ typedef union
}tSMP_INT_DATA;
/* internal status mask */
-#define SMP_PAIR_FLAGS_WE_STARTED_DD (1)
-#define SMP_PAIR_FLAGS_PEER_STARTED_DD (1 << 1)
+#define SMP_PAIR_FLAGS_WE_STARTED_DD (1)
+#define SMP_PAIR_FLAGS_PEER_STARTED_DD (1 << 1)
#define SMP_PAIR_FLAGS_CMD_CONFIRM (1 << SMP_OPCODE_CONFIRM) /* 1 << 3 */
#define SMP_PAIR_FLAG_ENC_AFTER_PAIR (1 << 4)
@@ -215,7 +215,7 @@ extern "C"
#define smp_cb (*smp_cb_ptr)
#endif
-#ifdef __cplusplus
+#ifdef __cplusplus
}
#endif
@@ -224,15 +224,15 @@ SMP_API extern void smp_init (void);
#if SMP_CONFORMANCE_TESTING == TRUE
/* Used only for conformance testing */
-SMP_API extern void smp_set_test_confirm_value (BOOLEAN enable, UINT8 *p_c_value);
-SMP_API extern void smp_set_test_rand_value (BOOLEAN enable, UINT8 *p_c_value);
-SMP_API extern void smp_set_test_pair_fail_status (BOOLEAN enable, UINT8 status);
-SMP_API extern void smp_remove_fixed_channel_disable (BOOLEAN disable);
+SMP_API extern void smp_set_test_confirm_value (BOOLEAN enable, UINT8 *p_c_value);
+SMP_API extern void smp_set_test_rand_value (BOOLEAN enable, UINT8 *p_c_value);
+SMP_API extern void smp_set_test_pair_fail_status (BOOLEAN enable, UINT8 status);
+SMP_API extern void smp_remove_fixed_channel_disable (BOOLEAN disable);
#endif
/* smp main */
extern void smp_sm_event(tSMP_CB *p_cb, tSMP_EVENT event, void *p_data);
-extern void smp_proc_sec_request(tSMP_CB *p_cb, tSMP_INT_DATA *p_data);
+extern void smp_proc_sec_request(tSMP_CB *p_cb, tSMP_INT_DATA *p_data);
extern void smp_send_pair_req(tSMP_CB *p_cb, tSMP_INT_DATA *p_data);
extern void smp_send_confirm(tSMP_CB *p_cb, tSMP_INT_DATA *p_data);
extern void smp_send_pair_fail(tSMP_CB *p_cb, tSMP_INT_DATA *p_data);
@@ -282,8 +282,8 @@ extern void smp_convert_string_to_tk(BT_OCTET16 tk, UINT32 passkey);
extern void smp_mask_enc_key(UINT8 loc_enc_size, UINT8 * p_data);
extern void smp_rsp_timeout(TIMER_LIST_ENT *p_tle);
extern void smp_xor_128(BT_OCTET16 a, BT_OCTET16 b);
-extern BOOLEAN smp_encrypt_data (UINT8 *key, UINT8 key_len,
- UINT8 *plain_text, UINT8 pt_len,
+extern BOOLEAN smp_encrypt_data (UINT8 *key, UINT8 key_len,
+ UINT8 *plain_text, UINT8 pt_len,
tSMP_ENC *p_out);
/* smp key */
extern void smp_generate_confirm (tSMP_CB *p_cb, tSMP_INT_DATA *p_data);
diff --git a/stack/smp/smp_keys.c b/stack/smp/smp_keys.c
index 9139c9c..a7c8496 100644
--- a/stack/smp/smp_keys.c
+++ b/stack/smp/smp_keys.c
@@ -26,7 +26,7 @@
#include "aes.h"
#ifndef SMP_MAX_ENC_REPEAT
#define SMP_MAX_ENC_REPEAT 3
- #endif
+ #endif
static void smp_rand_back(tBTM_RAND_ENC *p);
static void smp_genenrate_confirm(tSMP_CB *p_cb, tSMP_INT_DATA *p_data);
@@ -46,7 +46,7 @@ static const tSMP_ACT smp_encrypt_action[] =
smp_generate_stk, /* SMP_GEN_STK*/
smp_genenrate_ltk_cont, /* SMP_GEN_LTK */
smp_generate_ltk, /* SMP_GEN_DIV_LTK */
- smp_generate_rand_vector, /* SMP_GEN_RAND_V */
+ smp_generate_rand_vector, /* SMP_GEN_RAND_V */
smp_generate_y, /* SMP_GEN_EDIV */
smp_generate_passkey, /* SMP_GEN_TK */
smp_generate_confirm, /* SMP_GEN_SRAND_MRAND */
@@ -78,19 +78,19 @@ static void smp_debug_print_nbyte_little_endian (UINT8 *p, const UINT8 *key_name
** Function smp_encrypt_data
**
** Description This function is called to generate passkey.
-**
+**
** Returns void
**
*******************************************************************************/
-BOOLEAN smp_encrypt_data (UINT8 *key, UINT8 key_len,
- UINT8 *plain_text, UINT8 pt_len,
+BOOLEAN smp_encrypt_data (UINT8 *key, UINT8 key_len,
+ UINT8 *plain_text, UINT8 pt_len,
tSMP_ENC *p_out)
{
aes_context ctx;
UINT8 *p_start = NULL;
UINT8 *p = NULL;
UINT8 *p_rev_data = NULL; /* input data in big endilan format */
- UINT8 *p_rev_key = NULL; /* input key in big endilan format */
+ UINT8 *p_rev_key = NULL; /* input key in big endilan format */
UINT8 *p_rev_output = NULL; /* encrypted output in big endilan format */
SMP_TRACE_DEBUG0 ("smp_encrypt_data");
@@ -117,19 +117,19 @@ BOOLEAN smp_encrypt_data (UINT8 *key, UINT8 key_len,
p_rev_key = p; /* start at byte 32 */
REVERSE_ARRAY_TO_STREAM (p, key, SMP_ENCRYT_KEY_SIZE); /* byte 32 to byte 47 */
- smp_debug_print_nbyte_little_endian(key, (const UINT8 *)"Key", SMP_ENCRYT_KEY_SIZE);
- smp_debug_print_nbyte_little_endian(p_start, (const UINT8 *)"Plain text", SMP_ENCRYT_DATA_SIZE);
+ smp_debug_print_nbyte_little_endian(key, (const UINT8 *)"Key", SMP_ENCRYT_KEY_SIZE);
+ smp_debug_print_nbyte_little_endian(p_start, (const UINT8 *)"Plain text", SMP_ENCRYT_DATA_SIZE);
p_rev_output = p;
aes_set_key(p_rev_key, SMP_ENCRYT_KEY_SIZE, &ctx);
aes_encrypt(p_rev_data, p, &ctx); /* outputs in byte 48 to byte 63 */
p = p_out->param_buf;
- REVERSE_ARRAY_TO_STREAM (p, p_rev_output, SMP_ENCRYT_DATA_SIZE);
- smp_debug_print_nbyte_little_endian(p_out->param_buf, (const UINT8 *)"Encrypted text", SMP_ENCRYT_KEY_SIZE);
+ REVERSE_ARRAY_TO_STREAM (p, p_rev_output, SMP_ENCRYT_DATA_SIZE);
+ smp_debug_print_nbyte_little_endian(p_out->param_buf, (const UINT8 *)"Encrypted text", SMP_ENCRYT_KEY_SIZE);
p_out->param_len = SMP_ENCRYT_KEY_SIZE;
p_out->status = HCI_SUCCESS;
- p_out->opcode = HCI_BLE_ENCRYPT;
+ p_out->opcode = HCI_BLE_ENCRYPT;
GKI_freebuf(p_start);
@@ -142,7 +142,7 @@ BOOLEAN smp_encrypt_data (UINT8 *key, UINT8 key_len,
** Function smp_generate_passkey
**
** Description This function is called to generate passkey.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -160,7 +160,7 @@ void smp_generate_passkey(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
** Function smp_proc_passkey
**
** Description This function is called to process a passkey.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -178,7 +178,7 @@ void smp_proc_passkey(tSMP_CB *p_cb , tBTM_RAND_ENC *p)
/* truncate by maximum value */
while (passkey > BTM_MAX_PASSKEY_VAL)
passkey >>= 1;
- SMP_TRACE_ERROR1("Passkey generated = %d", passkey);
+ SMP_TRACE_ERROR1("Passkey generated = %d", passkey);
/* save the TK */
memset(p_cb->tk, 0, BT_OCTET16_LEN);
@@ -192,7 +192,7 @@ void smp_proc_passkey(tSMP_CB *p_cb , tBTM_RAND_ENC *p)
(*p_cb->p_callback)(SMP_PASSKEY_NOTIF_EVT, p_cb->pairing_bda, (tSMP_EVT_DATA *)&passkey);
}
- smp_sm_event(p_cb, SMP_KEY_READY_EVT, (tSMP_INT_DATA *)&key);
+ smp_sm_event(p_cb, SMP_KEY_READY_EVT, (tSMP_INT_DATA *)&key);
}
@@ -200,8 +200,8 @@ void smp_proc_passkey(tSMP_CB *p_cb , tBTM_RAND_ENC *p)
**
** Function smp_generate_stk
**
-** Description This function is called to generate STK calculated by running
-** AES with the TK value as key and a concatenation of the random
+** Description This function is called to generate STK calculated by running
+** AES with the TK value as key and a concatenation of the random
** values.
**
** Returns void
@@ -231,8 +231,8 @@ void smp_generate_stk (tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
/* generate STK = Etk(rand|rrand)*/
if (!SMP_Encrypt( p_cb->tk, BT_OCTET16_LEN, ptext, BT_OCTET16_LEN, &output))
{
- SMP_TRACE_ERROR0("smp_generate_stk failed");
- smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &status);
+ SMP_TRACE_ERROR0("smp_generate_stk failed");
+ smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &status);
}
else
{
@@ -246,7 +246,7 @@ void smp_generate_stk (tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
**
** Description This function is called to start the second pairing phase by
** start generating initializer random number.
-**
+**
**
** Returns void
**
@@ -265,12 +265,12 @@ void smp_generate_confirm (tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
**
** Description This function is called to generate another 64 bits random for
** MRand or Srand.
-**
+**
** Returns void
**
*******************************************************************************/
void smp_genenrate_rand_cont(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
-{
+{
SMP_TRACE_DEBUG0 ("smp_genenrate_rand_cont ");
p_cb->rand_enc_proc = SMP_GEN_SRAND_MRAND_CONT;
/* generate 64 MSB of MRand or SRand */
@@ -284,7 +284,7 @@ void smp_genenrate_rand_cont(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
**
** Description This function is called to calculate LTK, starting with DIV
** generation.
-**
+**
**
** Returns void
**
@@ -317,7 +317,7 @@ void smp_generate_ltk(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
** Function smp_compute_csrk
**
** Description This function is called to calculate CSRK
-**
+**
**
** Returns void
**
@@ -339,12 +339,12 @@ void smp_compute_csrk(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
if (!SMP_Encrypt(er, BT_OCTET16_LEN, buffer, 4, &output))
{
- SMP_TRACE_ERROR0("smp_generate_csrk failed");
- smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &status);
+ SMP_TRACE_ERROR0("smp_generate_csrk failed");
+ smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &status);
}
else
{
- memcpy((void *)p_cb->csrk, output.param_buf, BT_OCTET16_LEN);
+ memcpy((void *)p_cb->csrk, output.param_buf, BT_OCTET16_LEN);
smp_send_csrk_info(p_cb, NULL);
}
}
@@ -355,7 +355,7 @@ void smp_compute_csrk(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
**
** Description This function is called to calculate LTK, starting with DIV
** generation.
-**
+**
**
** Returns void
**
@@ -406,7 +406,7 @@ void smp_concatenate_local( tSMP_CB *p_cb, UINT8 **p_data, UINT8 op_code)
*******************************************************************************/
void smp_concatenate_peer( tSMP_CB *p_cb, UINT8 **p_data, UINT8 op_code)
{
- UINT8 *p = *p_data;
+ UINT8 *p = *p_data;
SMP_TRACE_DEBUG0 ("smp_concatenate_peer ");
UINT8_TO_STREAM(p, op_code);
@@ -423,9 +423,9 @@ void smp_concatenate_peer( tSMP_CB *p_cb, UINT8 **p_data, UINT8 op_code)
**
** Function smp_gen_p1_4_confirm
**
-** Description Generate Confirm/Compare Step1:
+** Description Generate Confirm/Compare Step1:
** p1 = pres || preq || rat' || iat'
-**
+**
** Returns void
**
*******************************************************************************/
@@ -474,9 +474,9 @@ void smp_gen_p1_4_confirm( tSMP_CB *p_cb, BT_OCTET16 p1)
**
** Function smp_gen_p2_4_confirm
**
-** Description Generate Confirm/Compare Step2:
+** Description Generate Confirm/Compare Step2:
** p2 = padding || ia || ra
-**
+**
** Returns void
**
*******************************************************************************/
@@ -511,7 +511,7 @@ void smp_gen_p2_4_confirm( tSMP_CB *p_cb, BT_OCTET16 p2)
** Function smp_calculate_comfirm
**
** Description This function is called to calculate Confirm value.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -533,8 +533,8 @@ void smp_calculate_comfirm (tSMP_CB *p_cb, BT_OCTET16 rand, BD_ADDR bda)
/* calculate e(k, r XOR p1), where k = TK */
if (!SMP_Encrypt(p_cb->tk, BT_OCTET16_LEN, p1, BT_OCTET16_LEN, &output))
{
- SMP_TRACE_ERROR0("smp_generate_csrk failed");
- smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &status);
+ SMP_TRACE_ERROR0("smp_generate_csrk failed");
+ smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &status);
}
else
{
@@ -547,7 +547,7 @@ void smp_calculate_comfirm (tSMP_CB *p_cb, BT_OCTET16 rand, BD_ADDR bda)
**
** Description This function is called when SConfirm/MConfirm is generated
** proceed to send the Confirm request/response to peer device.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -572,8 +572,8 @@ static void smp_calculate_comfirm_cont(tSMP_CB *p_cb, tSMP_ENC *p)
/* calculate: Confirm = E(k, p1' XOR p2) */
if (!SMP_Encrypt(p_cb->tk, BT_OCTET16_LEN, p2, BT_OCTET16_LEN, &output))
{
- SMP_TRACE_ERROR0("smp_calculate_comfirm_cont failed");
- smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &status);
+ SMP_TRACE_ERROR0("smp_calculate_comfirm_cont failed");
+ smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &status);
}
else
{
@@ -595,12 +595,12 @@ static void smp_calculate_comfirm_cont(tSMP_CB *p_cb, tSMP_ENC *p)
**
** Description This function is called when a 48 bits random number is generated
** as SRand or MRand, continue to calculate Sconfirm or MConfirm.
-**
+**
** Returns void
**
*******************************************************************************/
static void smp_genenrate_confirm(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
-{
+{
SMP_TRACE_DEBUG0 ("smp_genenrate_confirm ");
p_cb->rand_enc_proc = SMP_GEN_CONFIRM;
@@ -615,12 +615,12 @@ static void smp_genenrate_confirm(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
** Description This function is called to generate SConfirm for Slave device,
** or MSlave for Master device. This function can be also used for
** generating Compare number for confirm value check.
-**
+**
** Returns void
**
*******************************************************************************/
void smp_generate_compare (tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
-{
+{
SMP_TRACE_DEBUG0 ("smp_generate_compare ");
p_cb->rand_enc_proc = SMP_GEN_COMPARE;
@@ -634,7 +634,7 @@ void smp_generate_compare (tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
**
** Description This function is called when SConfirm/MConfirm is generated
** proceed to send the Confirm request/response to peer device.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -659,7 +659,7 @@ static void smp_process_confirm(tSMP_CB *p_cb, tSMP_ENC *p)
#if (SMP_DEBUG == TRUE)
SMP_TRACE_DEBUG0("Confirm Generated");
smp_debug_print_nbyte_little_endian ((UINT8 *)p_cb->confirm, (const UINT8 *)"Confirm", 16);
-#endif
+#endif
key.key_type = SMP_KEY_TYPE_CFM;
key.p_data = p->param_buf;
@@ -670,9 +670,9 @@ static void smp_process_confirm(tSMP_CB *p_cb, tSMP_ENC *p)
**
** Function smp_process_compare
**
-** Description This function is called when Compare is generated using the
+** Description This function is called when Compare is generated using the
** RRand and local BDA, TK information.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -697,7 +697,7 @@ static void smp_process_compare(tSMP_CB *p_cb, tSMP_ENC *p)
**
** Description This function is called when STK is generated
** proceed to send the encrypt the link using STK.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -722,7 +722,7 @@ static void smp_process_stk(tSMP_CB *p_cb, tSMP_ENC *p)
** Function smp_genenrate_ltk_cont
**
** Description This function is to calculate LTK = d1(ER, DIV, 0)= e(ER, DIV)
-**
+**
** Returns void
**
*******************************************************************************/
@@ -736,17 +736,17 @@ static void smp_genenrate_ltk_cont(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
BTM_GetDeviceEncRoot(er);
/* LTK = d1(ER, DIV, 0)= e(ER, DIV)*/
- if (!SMP_Encrypt(er, BT_OCTET16_LEN, (UINT8 *)&p_cb->div,
+ if (!SMP_Encrypt(er, BT_OCTET16_LEN, (UINT8 *)&p_cb->div,
sizeof(UINT16), &output))
{
- SMP_TRACE_ERROR0("smp_genenrate_ltk_cont failed");
- smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &status);
+ SMP_TRACE_ERROR0("smp_genenrate_ltk_cont failed");
+ smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &status);
}
else
{
/* mask the LTK */
smp_mask_enc_key(p_cb->loc_enc_size, output.param_buf);
- memcpy((void *)p_cb->ltk, output.param_buf, BT_OCTET16_LEN);
+ memcpy((void *)p_cb->ltk, output.param_buf, BT_OCTET16_LEN);
smp_generate_rand_vector(p_cb, NULL);
}
@@ -757,12 +757,12 @@ static void smp_genenrate_ltk_cont(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
** Function smp_generate_y
**
** Description This function is to proceed generate Y = E(DHK, Rand)
-**
+**
** Returns void
**
*******************************************************************************/
static void smp_generate_y(tSMP_CB *p_cb, tSMP_INT_DATA *p)
-{
+{
BT_OCTET16 dhk;
tSMP_ENC output;
tSMP_STATUS status = SMP_PAIR_FAIL_UNKNOWN;
@@ -771,11 +771,11 @@ static void smp_generate_y(tSMP_CB *p_cb, tSMP_INT_DATA *p)
SMP_TRACE_DEBUG0 ("smp_generate_y ");
BTM_GetDeviceDHK(dhk);
- if (!SMP_Encrypt(dhk, BT_OCTET16_LEN, p_cb->enc_rand,
+ if (!SMP_Encrypt(dhk, BT_OCTET16_LEN, p_cb->enc_rand,
BT_OCTET8_LEN, &output))
{
- SMP_TRACE_ERROR0("smp_generate_y failed");
- smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &status);
+ SMP_TRACE_ERROR0("smp_generate_y failed");
+ smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &status);
}
else
{
@@ -788,7 +788,7 @@ static void smp_generate_y(tSMP_CB *p_cb, tSMP_INT_DATA *p)
**
** Description This function is called when LTK is generated, send state machine
** event to SMP.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -807,7 +807,7 @@ static void smp_generate_rand_vector (tSMP_CB *p_cb, tSMP_INT_DATA *p)
** Function smp_genenrate_smp_process_edivltk_cont
**
** Description This function is to calculate EDIV = Y xor DIV
-**
+**
** Returns void
**
*******************************************************************************/
@@ -836,12 +836,12 @@ static void smp_process_ediv(tSMP_CB *p_cb, tSMP_ENC *p)
**
** Description This function is to process the rand command finished,
** process the random/encrypted number for further action.
-**
+**
** Returns void
**
*******************************************************************************/
static void smp_rand_back(tBTM_RAND_ENC *p)
-{
+{
tSMP_CB *p_cb = &smp_cb;
UINT8 *pp = p->param_buf;
UINT8 failure = SMP_PAIR_FAIL_UNKNOWN;
@@ -852,7 +852,7 @@ static void smp_rand_back(tBTM_RAND_ENC *p)
{
switch (state)
{
-
+
case SMP_GEN_SRAND_MRAND:
memcpy((void *)p_cb->rand, p->param_buf, p->param_len);
smp_genenrate_rand_cont(p_cb, NULL);
@@ -889,7 +889,7 @@ static void smp_rand_back(tBTM_RAND_ENC *p)
SMP_TRACE_ERROR1("smp_rand_back Key generation failed: (%d)", p_cb->rand_enc_proc);
- smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &failure);
+ smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &failure);
}
#endif
diff --git a/stack/smp/smp_l2c.c b/stack/smp/smp_l2c.c
index 36e6ee7..0356612 100644
--- a/stack/smp/smp_l2c.c
+++ b/stack/smp/smp_l2c.c
@@ -46,7 +46,7 @@ void smp_l2cap_if_init (void)
fixed_reg.pL2CA_FixedConn_Cb = smp_connect_cback;
fixed_reg.pL2CA_FixedData_Cb = smp_data_ind;
fixed_reg.default_idle_tout = 60; /* set 60 seconds timeout, 0xffff default idle timeout */
-
+
/* Now, register with L2CAP */
L2CA_RegisterFixedChannel (L2CAP_SMP_CID, &fixed_reg);
}
@@ -55,8 +55,8 @@ void smp_l2cap_if_init (void)
**
** Function smp_connect_cback
**
-** Description This callback function is called by L2CAP to indicate that
-** SMP channel is
+** Description This callback function is called by L2CAP to indicate that
+** SMP channel is
** connected (conn = TRUE)/disconnected (conn = FALSE).
**
*******************************************************************************/
@@ -70,7 +70,7 @@ static void smp_connect_cback (BD_ADDR bd_addr, BOOLEAN connected, UINT16 reason
if (memcmp(bd_addr, p_cb->pairing_bda, BD_ADDR_LEN) == 0)
{
SMP_TRACE_EVENT3 ("smp_connect_cback() for pairing BDA: %08x%04x Event: %s",
- (bd_addr[0]<<24)+(bd_addr[1]<<16)+(bd_addr[2]<<8) + bd_addr[3],
+ (bd_addr[0]<<24)+(bd_addr[1]<<16)+(bd_addr[2]<<8) + bd_addr[3],
(bd_addr[4]<<8)+bd_addr[5], (connected) ? "connected" : "disconnected");
if (connected)
@@ -80,13 +80,13 @@ static void smp_connect_cback (BD_ADDR bd_addr, BOOLEAN connected, UINT16 reason
p_cb->connect_initialized = TRUE;
/* initiating connection established */
p_cb->role = L2CA_GetBleConnRole(bd_addr);
-
+
/* initialize local i/r key to be default keys */
p_cb->loc_r_key = p_cb->loc_i_key = SMP_SEC_DEFAULT_KEY;
p_cb->loc_auth_req = p_cb->peer_auth_req = SMP_DEFAULT_AUTH_REQ;
p_cb->cb_evt = SMP_IO_CAP_REQ_EVT;
smp_sm_event(p_cb, SMP_L2CAP_CONN_EVT, NULL);
-
+
BTM_ReadConnectionAddr(p_cb->local_bda);
}
}
@@ -105,7 +105,7 @@ static void smp_connect_cback (BD_ADDR bd_addr, BOOLEAN connected, UINT16 reason
**
** Description This function is called when data is received from L2CAP on
** SMP channel.
-**
+**
**
** Returns void
**
@@ -120,7 +120,7 @@ static void smp_data_ind (BD_ADDR bd_addr, BT_HDR *p_buf)
SMP_TRACE_EVENT0 ("Got smp_data_ind");
STREAM_TO_UINT8(cmd, p);
-
+
/* reject the pairing request if there is an on-going SMP pairing */
if (SMP_OPCODE_PAIRING_REQ == cmd || SMP_OPCODE_SEC_REQ == cmd)
@@ -138,10 +138,10 @@ static void smp_data_ind (BD_ADDR bd_addr, BT_HDR *p_buf)
}
if (memcmp(&bd_addr[0], p_cb->pairing_bda, BD_ADDR_LEN) == 0)
- {
+ {
btu_stop_timer (&p_cb->rsp_timer_ent);
smp_sm_event(p_cb, cmd, p);
- }
+ }
GKI_freebuf (p_buf);
}
diff --git a/stack/smp/smp_main.c b/stack/smp/smp_main.c
index 91d0989..1b67011 100644
--- a/stack/smp/smp_main.c
+++ b/stack/smp/smp_main.c
@@ -17,12 +17,12 @@
#include "smp_int.h"
-const char * const smp_state_name [] =
+const char * const smp_state_name [] =
{
"SMP_ST_IDLE",
"SMP_ST_WAIT_APP_RSP",
"SMP_ST_SEC_REQ_PENDING",
- "SMP_ST_PAIR_REQ_RSP",
+ "SMP_ST_PAIR_REQ_RSP",
"SMP_ST_WAIT_CONFIRM",
"SMP_ST_CONFIRM",
"SMP_ST_RAND",
@@ -31,29 +31,29 @@ const char * const smp_state_name [] =
"SMP_ST_RELEASE_DELAY",
"SMP_ST_MAX"
};
-const char * const smp_event_name [] =
+const char * const smp_event_name [] =
{
- "PAIRING_REQ_EVT",
- "PAIRING_RSP_EVT",
- "CONFIRM_EVT",
- "RAND_EVT",
- "PAIRING_FAILED_EVT",
- "ENC_INFO_EVT",
+ "PAIRING_REQ_EVT",
+ "PAIRING_RSP_EVT",
+ "CONFIRM_EVT",
+ "RAND_EVT",
+ "PAIRING_FAILED_EVT",
+ "ENC_INFO_EVT",
"MASTER_ID_EVT",
"ID_INFO_EVT",
"ID_ADDR_EVT",
"SIGN_INFO_EVT",
- "SECURITY_REQ_EVT",
- "KEY_READY_EVT",
- "ENCRYPTED_EVT",
- "L2CAP_CONN_EVT",
- "L2CAP_DISCONN_EVT",
- "API_IO_RSP_EVT",
- "API_SEC_GRANT_EVT",
- "TK_REQ_EVT",
- "AUTH_CMPL_EVT",
- "ENC_REQ_EVT",
- "BOND_REQ_EVT",
+ "SECURITY_REQ_EVT",
+ "KEY_READY_EVT",
+ "ENCRYPTED_EVT",
+ "L2CAP_CONN_EVT",
+ "L2CAP_DISCONN_EVT",
+ "API_IO_RSP_EVT",
+ "API_SEC_GRANT_EVT",
+ "TK_REQ_EVT",
+ "AUTH_CMPL_EVT",
+ "ENC_REQ_EVT",
+ "BOND_REQ_EVT",
"DISCARD_SEC_REQ_EVT",
"RELEASE_DELAY_EVT",
"RELEASE_DELAY_TOUT_EVT",
@@ -109,9 +109,9 @@ enum
SMP_SM_NO_ACTION
};
-static const tSMP_ACT smp_sm_action[] =
+static const tSMP_ACT smp_sm_action[] =
{
- smp_proc_sec_req,
+ smp_proc_sec_req,
smp_send_pair_req,
smp_send_pair_rsp,
smp_send_confirm,
@@ -194,11 +194,11 @@ static const UINT8 smp_ma_idle_table[][SMP_SM_NUM_COLS] = {
static const UINT8 smp_ma_wait_app_rsp_table[][SMP_SM_NUM_COLS] = {
/* Event Action Next State */
-/* SEC_GRANT */ { SMP_PROC_SEC_GRANT, SMP_SEND_APP_CBACK, SMP_ST_WAIT_APP_RSP},
+/* SEC_GRANT */ { SMP_PROC_SEC_GRANT, SMP_SEND_APP_CBACK, SMP_ST_WAIT_APP_RSP},
/* IO_RSP */ { SMP_SEND_PAIR_REQ, SMP_SM_NO_ACTION, SMP_ST_PAIR_REQ_RSP},
-/* KEY_READY */ { SMP_GENERATE_CONFIRM, SMP_SM_NO_ACTION, SMP_ST_WAIT_CONFIRM},/* TK ready */
-/* ENC_REQ */ { SMP_START_ENC, SMP_SM_NO_ACTION, SMP_ST_ENC_PENDING},/* start enc mode setup */
-/* DISCARD_SEC_REQ */ { SMP_PROC_DISCARD, SMP_SM_NO_ACTION, SMP_ST_IDLE}
+/* KEY_READY */ { SMP_GENERATE_CONFIRM, SMP_SM_NO_ACTION, SMP_ST_WAIT_CONFIRM},/* TK ready */
+/* ENC_REQ */ { SMP_START_ENC, SMP_SM_NO_ACTION, SMP_ST_ENC_PENDING},/* start enc mode setup */
+/* DISCARD_SEC_REQ */ { SMP_PROC_DISCARD, SMP_SM_NO_ACTION, SMP_ST_IDLE}
};
static const UINT8 smp_ma_pair_req_rsp_table [][SMP_SM_NUM_COLS] = {
@@ -250,7 +250,7 @@ static const UINT8 smp_ma_rel_delay_table[][SMP_SM_NUM_COLS] = {
/************ SMP Slave FSM State/Event Indirection Table **************/
static const UINT8 smp_sl_entry_map[][SMP_ST_MAX] =
{
-/* state name: Idle Wait SecReq Pair Wait Confirm Init Enc Bond Rel
+/* state name: Idle Wait SecReq Pair Wait Confirm Init Enc Bond Rel
AppRsp Pend ReqRsp Cfm Pend Pend Delay */
/* PAIR_REQ */ { 2, 0, 1, 0, 0, 0, 0, 0, 0, 0 },
/* PAIR_RSP */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
@@ -380,20 +380,20 @@ void smp_set_state(tSMP_STATE state)
{
if (state < SMP_ST_MAX)
{
- SMP_TRACE_DEBUG4( "State change: %s(%d) ==> %s(%d)",
+ SMP_TRACE_DEBUG4( "State change: %s(%d) ==> %s(%d)",
smp_get_state_name(smp_cb.state), smp_cb.state,
- smp_get_state_name(state), state );
+ smp_get_state_name(state), state );
smp_cb.state = state;
}
else
{
- SMP_TRACE_DEBUG1("smp_set_state invalid state =%d", state );
+ SMP_TRACE_DEBUG1("smp_set_state invalid state =%d", state );
}
}
/*******************************************************************************
** Function smp_get_state
-** Returns The smp state
+** Returns The smp state
*******************************************************************************/
tSMP_STATE smp_get_state(void)
{
@@ -406,11 +406,11 @@ tSMP_STATE smp_get_state(void)
** Function smp_sm_event
**
** Description Handle events to the state machine. It looks up the entry
-** in the smp_entry_table array.
-** If it is a valid entry, it gets the state table.Set the next state,
-** if not NULL state.Execute the action function according to the
-** state table. If the state returned by action function is not NULL
-** state, adjust the new state to the returned state.If (api_evt != MAX),
+** in the smp_entry_table array.
+** If it is a valid entry, it gets the state table.Set the next state,
+** if not NULL state.Execute the action function according to the
+** state table. If the state returned by action function is not NULL
+** state, adjust the new state to the returned state.If (api_evt != MAX),
** call callback function.
**
** Returns void.
@@ -431,7 +431,7 @@ void smp_sm_event(tSMP_CB *p_cb, tSMP_EVENT event, void *p_data)
}
SMP_TRACE_DEBUG5( "SMP Role: %s State: [%s (%d)], Event: [%s (%d)]",\
- (p_cb->role == 0x01) ?"Slave" : "Master", smp_get_state_name( p_cb->state),
+ (p_cb->role == 0x01) ?"Slave" : "Master", smp_get_state_name( p_cb->state),
p_cb->state, smp_get_event_name(event), event) ;
/* look up the state table for the current state */
@@ -450,7 +450,7 @@ void smp_sm_event(tSMP_CB *p_cb, tSMP_EVENT event, void *p_data)
}
else
{
- SMP_TRACE_DEBUG4( "Ignore event [%s (%d)] in state [%s (%d)]",
+ SMP_TRACE_DEBUG4( "Ignore event [%s (%d)] in state [%s (%d)]",
smp_get_event_name(event), event, smp_get_state_name(curr_state), curr_state);
return;
}
@@ -489,7 +489,7 @@ const char * smp_get_state_name(tSMP_STATE state)
if (state < SMP_ST_MAX)
{
- p_str = smp_state_name[state];
+ p_str = smp_state_name[state];
}
return p_str;
}
diff --git a/stack/smp/smp_utils.c b/stack/smp/smp_utils.c
index 5065823..91e7057 100644
--- a/stack/smp/smp_utils.c
+++ b/stack/smp/smp_utils.c
@@ -475,7 +475,7 @@ void smp_mask_enc_key(UINT8 loc_enc_size, UINT8 * p_data)
**
** Description utility function to do an biteise exclusive-OR of two bit
** strings of the length of BT_OCTET16_LEN.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -628,7 +628,7 @@ void smp_set_test_rand_value(BOOLEAN enable, UINT8 *p_c_val)
**
** Function smp_set_test_pair_fail_status
**
-** Description This function is called to set the test fairing fair status
+** Description This function is called to set the test fairing fair status
**
** Returns void
**